====== Tuning procedure: two cavity station ====== This is a rough tuning procedure for a two cavity RF station under LLRF9 control. The procedure assumes that channel loss factors have already been established (based on power meter measurements, cavity parameters, possibly with beam-based calibration). ===== Initial setup ===== Start from resetting interlocks and turning on the station in an open-loop mode. Tuner loops should be open. Setpoint should be chosen as follows: * High enough to generate forward power in each cavity above the tuner loop minimum power level * Low enough not to generate a reflected power trip with fully detuned cavity Typically, minimum forward power threshold is several orders of magnitude lower than reflected power trip level, a suitable setpoint is easy to find. Lower values are, in general, preferable. ===== Cavity tuning ===== Turn on the network analyzer excitation at relatively low level (-48 to -60(nbsp)dB). Set sweep span to 600(nbsp) kHz. For each cavity, do the following: * Set network analyzer input to cavity 1 or 2 rotated * Move tuner motor manually to tune the cavity on resonance Displayed transfer function is more or less sufficient to perform this step, but Matlab tools can be used to speed up the process and to make more precise measurements. Use the following two commands to read out RTNA data and to fit the cavity response: data = read_rtna('LLRF', 'BRD1'); data1 = direct_fit(data, [-300e3 300e3]); ==== Tuner loop configuration and turn-on ==== Once the cavity is tuned on resonance, tuner loop must be configured. Adjust phase offset for the cavity forward channel to bring tuner error to zero (cavity forward phase should match cavity probe phase). It might be helpful here to stop the RTNA sweep, in order to remove periodic perturbation of the cavity signals. Re-check that tuner error is zero and cavity is still tuned on resonance. If so, turn on the tuner loop (this procedure assumes tuner loop gain and sign have been previously configured). Record the current setting of the tuner loop deadband and set it (temporarily) to 0.1 degrees. Re-enable RTNA sweep and use the code provided above to read out cavity response and to verify on-resonance condition. With tuner loop closed, make fine adjustments to cavity forward phase offset to bring the cavity detuning to zero (typical variation from measurement to measurement will be ±200(nbsp)Hz). ===== Vector sum configuration ===== Once both cavities are tuned on resonance, it's time to configure the vector sum signal. Cavity vector sum signal is calculated in real time by LLRF9 FPGA and is compared to the cavity setpoint in the closed loop operation to generate the feedback loop error signal. The error signal is amplified by proportional and integral loops to derive appropriate klystron/SSA drive signal. Probe signals from two cavities pass through digital gain/phase blocks before being summed together. Gain/phase block can be used to apply arbitrary phase shift and attenuation to the probe signal.