PEP-II LLRF Station Configuration Procedure


  1. Before beginning all hardware should be setup as instructed by the Hardware Setup Procedure.  The VXI crate should be booted and the station's EPICS displays should be live.  No modules or EPICS panels should be purple.  The 120 Watt drive amplifier should be ON.  It's best (but not totally necessary) to let the crate warm up 30 minutes with the shielded rack doors closed to allow temperatures to stabilize.

  2. Bring up the main EPICS station panel for the appropriate station by clicking the desired station button.

  3. Verify that the RF reference is present.  Bring up the Phase/Powers EPICS panel and verify that IQA module #1 channel #6 is between 20 mw and 40 mW.  If it is not, then measure the reference power delivered to the rear of the shielded rack.  Should be approximately 10 mW.  If not check reference distribution system power levels.  If it is OK than the amplifier in the clock module or a bad cable is most likely to be at fault.  Repair as required before proceeding.

  4. Measure the 471.1 MHz LO power delivered to each IQA module (top SMA connector on each IQA) with a trusted power meter.  The power should be +13dBm +/- 3dB.  If out of range the clock module or SMA cables/connectors must be repaired or replaced.  Be sure to reinstall each LO cable to the same IQA module it came from.  The cables should be labeled.  If labels are missing be sure to apply new labels after sorting out to which module the cable should be connected.

  5. If the IQA modules have not been previously calibrated or if a clock module has been changed, the IQA modules should be recalibrated as instructed in the IQA module calibration procedure.

  6. Verify that the bunch 0 turn clock is present.  The "fiducial missing" LED on the clock module should be OFF.  If the turn clock is missing the problem must be corrected.  The turn clock is generated by a PEPII PDU/STB module pair in a CAMAC crate and cabled over to the shielded rack via a Heliax cable.  The turn clock is a 60 ns NIM level (must be terminated in 50 ohms) pulse repeating at 136.3 kHz.

  7. Bring up the RF Processing (RFP) Module panel from the Modu Diags panel on the main station EPICS display.  On the left side about 1/3 down from the top of the RFP Module panel is a purple button with two possible titles, "DAC Set Points" or "Module Status".  With the right mouse button select "DAC Set Points" to bring up the DAC panel.  On the lower left of this panel is a button labeled "Calibrate".  Activate the calibration procedure with a left mouse button click.  Note that RF must be OFF to allow the calibration procedure to begin (prevents accidental calibrates during operation).

  8. The DAC calibration procedure will take 10-15 minutes.  It first uses a binary search method to find the null (0 gain) DAC offset setting for each of the analog multipliers present in the RFP module by dithering the input to each multiplier and measuring the output as the DAC setting is varied.  This technique does not work for the comb filters since each comb filter has a DC nulling circuit on the input which removed the dither.  The comb loop coefficient offset is simply preset to a reasonable value (130 counts offset).  You can watch the progress of the calibration procedure on the DAC panel and messages on the local ASCII terminal on top of the shielded rack.  Coefficient offsets should range from 110-140 counts.  The procedure also nulls out DC offsets in the RFP module analog electronics using a Newton's method search technique.  Typical DC offsets range are between -1000 and +1000 counts, full scale is -2047-->+2048 (12 bits bipolar). This calibration procedure is not bullet proof.  If it fails try it again after typing in 0 for the entries the program reports that it failed to complete.  Large offset values may indicate a hardware problem.  A successful calibration will report "Calibration Complete".  Unsuccessful calibration will report "Calibration Completed With Errors".

  9. The next step is to prepare the station for running RF power.  On the Klys and Circ panel, energize the klystron filament and solenoids using the ON/OFF button on the right side of the panel.  The solenoids will come on immediately but the filament will ramp up slowly.  There is a ~20 minute timeout on the filament which prevents closing the station contactor until the filament has reached full temperature.  Never override the filament timeout without instruction from a qualified klystron department expert.  Applying high voltage to a cold filament can ruin the klystron.  After the filament has timed out close the high voltage contactor using the button on the main station panel or the HVPS panel.

  10. A non-configured station should be activated with the feedback loops on the following state.  You will find the loop controls on the Feedback panel which is reached from the main station panel.  Set the loops as listed below:

    Direct Loop - OFF
    Comb Loop - OFF
    Tuner Loop - OFF
    HVPS Loop - OFF
    Ripple Loop - ON
    Gap FF Loop - ON
    LFB Woofer - OFF

    All other loop control buttons will not affect the calibration procedure since they only activate under certain conditions.  More on these details later.  Close the Feedback panel and return to the main station panel.

  11. The ripple loop parameters must be checked to insure they are properly setup. From the Modu Diags button bring up the RFP Module panel. Check that the following entries are set:

    IMSK is 197 - Interrupt mask for the module.
    DSPE is /dsp/rippleRfp - Current DSP ripple loop program.
    (NOTE: Use the load/run button to the right to reboot the DSP.)
    DDSF is /dat/ripple.dat - This file is written to view DSP data. Not yet used.

    On the left side about 1/3 down from the top of the RFP Module panel is a purple button with two possible titles, "Ripple Loop Parameters" or "Module Status". With the right mouse button select "Ripple Loop Parameters" to bring up the RF Processing Module Ripple Loop Params panel. Check that the following entries are set:

    PHSG to 0.0050 - Gain term for the DC phase across the klystron.
    ACDF is /tbl/AmplCoefs.tbl - Amplitude coefficients for the ripple loop DSP code.
    PCDF is /tbl/AmplCoefs.tbl - Phase coefficients for the ripple loop DSP code.

    After setting any of these parameters, use the "Load" button on the right to update the hardware.

    AMSP is the amplitude set point (gain) for the baseband modulator used in the ripple loop. Its value is set by the gain tracking loop and does not require manual configuration. The gain tracking loop is configured when running the "ConfDirect" Matlab task. Normally AMSP is configured to 0.9 volts with no beam and decreases as klystron gain increases.

    Close the RFP and the Ripple Loop panels and open the main station panel.

  12. Open the HVPS panel from the main station panel.  If the station has not been run for a long period of time or if the klystron is new, a low amount of high voltage should be initially applied.  Under these conditions the "Stn Turn-On Voltage" should be set to 10 kV otherwise 45 kV is the nominal value.   Return to the main station panel.

  13. Verify that the drive power settings are reasonable following instructions for the Main Station panel.

  14. Activate the station to the "ON_CW" mode.  Drive power should come up to the "Drive Pwr Setpoint" level and the HVPS voltage should reach the "Stn Turn-On Voltage" in a few seconds.  If you are trying to high voltage process the klystron gun, let the station run for 10 minutes at the 10 kV level and then raise the HVPS voltage in 10 kV steps until the 45 kV level is reached.  Observe the klystron ion pump current to insure the tube is not gassy.  Klystron experts should be involved in processing new tubes.  Once the tube appears to be processed move on to the next step.

  15. From the main station panel access the More MATLAB panel.  Activate the "Tune Cavs" Matlab task.  This will open a Matlab window and execute the tune_cavities.m Matlab script.  This task will take 10-25 minutes depending on which Sun workstation the EPICS display was running on.  The tuners will be configured and the tuner loop will be activated.  If the Matlab task hangs-up and appears frozen  a "Control-c" while the Matlab window is selected will kill the task.  Be sure to recheck the "Drive Pwr Setpoint" before restarting the "Tune Cavs" task since it may have been modified during the tuning procedure.  Note that there is also a "Tune Cavities Directivity" Matlab task on the More MATLAB panel.  This task corrects for the non-perfect cavity coupler directivity and has been demonstrated but should be considered experimental at this point.  Directivity correction is only important when we get into very precise gap transient matching and "Magic Detuning".  This may never prove necessary.

  16. If the cavities are in need of processing to improve vacuum level, the HVPS loop can be placed in "PROC" mode which will slowly increase the klystron power as vacuum levels improve.  A klystron expert should set the limits of the processing loop following guidance for the Main Station panel.

    Cavity processing may be done in "TUNE", "ON_CW", or "ON_FM" modes.  The first two options perform processing with CW RF power, while "ON_FM" plays modulation files through the built-in network analyzer in the RFP module to scrub more areas of the system.  If necessary, processing with "ON_FM" can be done before the tune cavities task to improve vacuum if faults prevent the tune cavities operation from reaching completion.

  17. We are now ready to configure the direct RF feedback loop.  There should be no beam in the ring during this configuration procedure.  Make sure the station is operating in "ON_CW" mode and the station gap voltage is set to the value you plan to run the station at.  This is important because the gain tracking loop, which reduces the direct loop gain as the klystron gain increases, is initially set to its full gain and the direct loop gain is then configured.  If the station gap voltage is altered then the klystron power will be different, and the klystron gain will not match the configured value in the gain tracking loop.

    Once the station gap voltage and drive power is set, you can start the Matlab task to configure the direct loop.  From the main station panel access the More MATLAB panel.  Activate the "ConfDirect" Matlab task.  This will open a Matlab window and execute the configure_direct.m Matlab script.  This task will take just a few minutes to complete.  It will find the proper gain and phase to achieve the preset phase margin which is currently 66 degrees (desired_margin in configure_direct.m Matlab script).  The gain tracking EPICS loop will also be configured.  Both lead and integral compensation will be activated.  The EPICS task which closes the direct loop will initially offset the gain by the initial gain offset (nominally -10 dB) and increase the gain up by the increment setting (nominally +1 dB) until at the desired gain.  In the end it will measure the closed loop response of the damped cavity and plot on top of the open loop response.

    After the task has finished we have been manually reducing the direct loop gain slightly.  On the Feedback panel change the Loop Gain on the upper left to 15.0 dB.  Be sure to hit return to record your entry.  Direct loop is now all set.

  18. At this point we could make an equalizer for the comb filters and the woofer.  There is a Matlab task "Make Equal" which calls the Matlab script, make_equalizer.m .  It should not be necessary to repeat this task since the equalizers are made with cavity detuning corresponding to full beam loading.  The equalizer is determined by measuring the phase response through the comb filter path while the comb filters are set for a "through" response (no comb filtering).  There are, however, some constants in the make_equalizer.m script which could be modified (such as roll off frequency) if there was a need to optimize performance in the future.  The parameter "added_ticks" in the Matlab script is used to center the filter response across the 32 taps available.  I suspect it will not be necessary to alter the existing equalizers but wanted to mention the possibility.

  19. We are now ready to configure the comb filter loop.  The station should be running at the desired gap voltage and drive power with the direct loop operating.  From the main station panel access the More MATLAB panel.  Activate the "Conf Comb" Matlab task.  This will open a Matlab window and execute the configure_comb.m Matlab script.  This task will take just a few minutes to complete.  It will find the proper gain, phase and one turn delay setting (delay is on the comb filter module panel) to achieve 17dB loop gain (desired_gain in configure_comb.m Matlab script).  In theory, this gain could be raised to 20dB but so far we have found it unnecessary to do so.  Comb delay can be set in 25ns increments.  The configure comb task (unlike configure direct) does not close the loop when the configuration is done (but it could).

  20. Close the comb filter loop by using the left mouse button on the Feedback panel to flip the comb loop button from Off to On.  The EPICS task which closes the comb loop will initially offset the gain by the initial gain offset (nominally -20 dB) and increase the gain up by the increment setting (nominally +5 dB) until at the desired gain.  The comb loop is now operating.

  21. To check that the RF feedback loops are configured and operating properly, one can measure the closed loop response of the RF cavities.  With the station operating (with or without beam), the Matlab task measure_direct_closed.m can be used to verify the performance of the feedback electronics.  From the main station panel or the feedback panel access the More MATLAB panel.  Activate the "MeasDirCls" Matlab task.  A small 50 ms burst of band limited noise will be injected into the RF drive to measure the cavity impedance.  The result will be plotted and can be compared to other stations.  Basically, it should look like a rounded hump with notches removed by the combs.  If beam is present, revolution harmonics will appear between comb filter notches.

  22. At this point the station RF loops are configured with the exception of the woofer (see the Woofer Configuration Procedure.)