PEP-II LLRF Woofer Configuration Procedure


  1. Before beginning the woofer configuration procedure, the longitudinal feedback system (LFB) must be configured and properly phased.  The woofer uses a band limited portion of the LFB kick signal to phase modulate one or more RF stations.  The signal path for each woofer is:

    LFB system computing farm - measures the phase of each bunch and calculates a correction signal (kick).  A ~4 MHz lowpass version of the kick is digitized in the LFB back-end module and broadcast over a dedicated fiber optic link to the RF stations.

    Fiber optic link - sends 10 bits of data and is updated 72 times per turn (9.814 MHz).  There are two fibers for the HER - one goes to region 8 and the other to region 12.  The LER has only one fiber to region 4.  In each RF region, the fiber daisy chains through the Gap modules so that a loss in signal or failure of a module will prevent the woofer kick data from being transmitted to stations further down the chain.

    Gap voltage feed forward module - Generates the baseband IQ references for the RF station.  Uses data from the woofer link to modulate the reference based on a programmable look-up table following a preset ~1 turn delay.  Retransmits the woofer kick signal to the next RF station in the woofer chain.

  2. Verify that each RF station is receiving woofer data. Open the Feedback panel from the main station panel. Near the middle right is an area labeled "Woofer State" - it should read "Kick".  This indicates the LFB system is operating.  If there is a white box instead of the "Kick" label, the LFB EPICS system is not available. Below the "Kick" label, there should be text indicating "Taxi Link OK".  If not send a sync command using the "send" button (left mouse click).  The link must be synchronized before proceeding.  The fiber optic link sends 1/2 a word of data each sample and reassembles the data at the receiver.  The sync command instructs the LFB back-end module to transmit a resync command over the fiber link, allowing the receivers to distinguish the first portion of the word from the last.

  3. Test the data transmission using the fast history buffers in the Gap module.  From the Feedback panel, access the MoreMATLAB panel.  Activate the "TestWoofer" Matlab task. The script will plot the data being sent to the Gap module from the LFB system.  With no beam there should be 50 counts peak to peak noise.  The spectrum will have a pair of peaks around each synchrotron sideband and the signal should roll off above 1 MHz.  The woofer hardware has proven to be very reliable.

  4. The next step is to remove the offset from the woofer data.  The station should be running with Direct/Comb loops operating.  With no beam present, open and close the woofer loop using the "LFB Woofer" ON/OFF button on the Feedback panel while observing the cavity 1 probe phase signal on the Phase/Powers EPICS panel.  If the phase changes as the woofer loop is applied, correct for the offset. Open the Gap Voltage Feed Forward Module EPICS panel (GVF) using a right mouse click on the  the Modu Diags button on the Main station or Feedback panel.  Under the Sine & Cosine Look-up-tables area, there is an entry for Phase Offset (Deg).  The value in this box will need to be changed by the amount the probe phase changes as you turn on the woofer loop.  To change this entry:

    -Put the gap module in Load state using the button at the bottom of Gap module panel.
    -Type in the new phase offset value and be sure to hit the return key.
    -Load in the new look-up table using the Load button to the right of the phase offset entry.
    -Return the module to Run state using the button at the bottom of Gap module panel.

    Repeat this procedure until opening/closing the woofer loop introduces no phase offset.  Once the proper value of the phase offset entry has been determined, this value will be valid for every RF station in that ring (HER or LER).  You can then bring up the Gap module panel for each if these stations and make a new look-up table using the above procedure with the same phase offset.  The offset value WILL be different for HER and LER stations.

  5. Next we verify the setting of the  woofer 1 turn delay value.  Due to the fact that it takes time for the kick signal to reach the RF baseband reference, we add an additional partial turn delay to align the kick with the bunch it was computed for.  In reality, the transmission/processing delay is more than 1 turn so we add another portion of a turn to form a total delay of 2 turns.  This is still a small fraction of a synchrotron oscillation, allowing the woofer to function as designed.  The proper 1 turn delay settings for each woofer was determined using a network analyzer connected though the LFB system in region 4.  The delay was adjusted to produce the same transmission phase (system open loop phase) at frequencies corresponding to a fixed offset above each revolution harmonic from mode 1 to mode 15.  The offset frequency was chosen to be just off the peak of the synchrotron resonance.  The delay was optimized to achieve just a few degrees variation across the entire woofer band - this also demonstrated the quality of the equalizer filter.  The delays values are:

    LR44 - 1700 ns
    LR45 - 1900 ns
    HR81 - 6100 ns
    HR83 - 6000 ns
    HR85 - 5900 ns
    HR21 - 5200 ns
    HR23 - 5200 ns

    The value of the 1 turn delay should not need to be altered unless there is a hardware change which would affect the transmission delay by at least 50 ns.  This would require altering the length of a fiber optic cable by 30 feet.  The resolution of the delay adjustment is 100 ns since the delay FIFO clocks at 9.814 MHz.

  6. Like with the comb filters, the woofer also uses a group delay equalization filter or equalizer.  It is the same FIR filter IC used in the comb filters.  The topology is a 32 tap FIR filter clocking at 9.814 MHz.  Presently the equalizer coefficients for the comb and woofer are the same (although each ring is different).  For clarity, woofer and comb equalizers do have different filenames.  On the Gap module panel, the filenames for the woofer equalizers are:

    E0CF = /tbl/gvfHERdetun.tbl - HER woofer equalizer file - same for all HER stations
    E0CF = /tbl/gvfLERdetun.tbl - LER woofer equalizer file - same for all LER stations

    Make sure the Equalizer Bank (lower right on Gap module panel) is set to "Bank 0" using the right mouse key to select.  Bank 1 corresponds to no equalization and could be used to measure the non-equalized channel response in the future.

  7. Make sure the "Pre-DAC Data Alignment" is set to 0.  It is located on the lower right of the Gap module panel and is selected with a right mouse click.  This is a shift gain adjustment.  Since the woofer data can often exceed 1/2 scale during normal operation, using any shift gain would result in overflow.

  8. With the delay and equalizer now properly set, the remaining task is to configure the look-up table to have the desired amount of gain.  There are two parameters used to set the gain.  Both are located in the "Sine & Cosine Look-up-tables" area of the Gap module panel.  The first value is the "Phase range (Deg/full Scale)" which sets the overall gain of the woofer for this station.  A full scale woofer signal will produce the entered number of degrees modulation to the station baseband reference.  The nominal value of full scale kick is +20 degrees.  Note that entering -20 degrees would invert the phase of the woofer kick.

    The second parameter is Max Phase (Deg Peak-to-Peak).  The nominal setting is 10 degrees.  This limits the maximum kick magnitude to prevent large phase modulations to generate huge phase modulations which might cause the station to fault.

    When any of the woofer table parameters are modified, the table must be regenerated using the following procedure:

    -Put the gap module in Load state using the button at the bottom of the Gap module panel.
    -Type in the new look-up-table parameters and be sure to hit the return key.
    -Load in the new look-up table using the Load button to the right of the phase offset entry.
    -Return the module to Run state using the button at the bottom of the Gap module panel.

  9. Note that the woofer gain is also a function of the LFB system gain.  If the LFB gain is increased it may be necessary to decrease the woofer gain.  Decreasing gain can be achieved by regenerating the look-up tables or activating the woofer on fewer stations.  Typically the woofer loops are activated on 2 or 3 stations.

  10. A couple of comments on measuring the woofer transfer function.  The gap module does have the capability to inject a known signal into the RF system and measure the response through the woofer link.  There are "Play buffer" and "Record buffer" file names on the Gap module panel and a Matlab script called configure_woofer.m in the $RFMAT directory.  Presently the WOOFER_NOISE.tbl file contains band limited noise corresponding to peaks in the synchrotron response and the Matlab script tries to measure the transfer function across many harmonics.  It was never successful in making a clean measurement.  I suspect that one could use a different approach successfully.  Rewrite the Matlab script to inject a sine wave corresponding to mode 1, measure the transfer function and repeat for modes 5,10 and 15.  From the phase response it should be possible to properly set the 1 turn delay and measure the gain.

    To measure the transfer function with the network analyzer in region 4, start by inserting the network analyzer into the loop by disconnecting a SMA cable which carries the woofer info to the back-end module, placing the network analyzer in series.  Make sure the network analyzer is calibrated to remove any additional cable length required to make the connection.  Next inject beam and adjust the stimulus level to result in a clean response measurement around the first revolution harmonic.  Do not measure the 0-mode due to the presence of klystron ripple which could confuse the measurement. The transfer function around the first revolution harmonic should clearly show the two synchrotron sidebands and 180 phase near each peak.  If this is not observed than the bunch-by-bunch filter coefficients in the LFB system are not correct and need to be optimized.  There is no possible way for the RF system to introduce the magnitude of delay error needed to produce large phase errors at 136 kHz.  I mention this because we experienced this before.  Once the transfer function is correct for mode 1, observe the higher harmonics and adjust the 1-turn delay to make the phase correct.  Gain can also be observed but be careful about driving the system into saturation while measuring.