Effects of cavity pre-detuning on RF power transients at injection into the LHC

At injection into the Large Hadron Collider (LHC), the radio frequency (RF) system is perturbed by beam-induced voltage resulting in strong RF power transients and the instant detuning of the cavities. The automatic tuning system, however, needs time for the mechanical compensation of the resonance frequency to take place. Acting back on the beam, the transients in RF power are expected to limit the maximum injected intensity by generating unacceptable beam loss. Reducing them is therefore essential to reach the target intensity during the High Luminosity (HL) LHC era. At LHC flat bottom, the cavities are operated using the half-detuning beam-loading compensation scheme. As implemented today, the tuner control algorithm starts acting only after the injection of the first longer bunch train which causes the bunches for this injection to experience the largest power spikes. This contribution presents an adapted detuning scheme for the RF cavities before injection. It was proposed as a path to decrease the transients, hence increasing the available intensity margin for the available RF power. The expected gain is evaluated in particle tracking simulations and measurements acquired during operation.


Introduction
Strong RF power transients occur due to the incoming beam during Super Proton Synchrotron (SPS) to LHC injection [1].The maximum possible injected bunch intensity, for bunch trains with lengths comparable to the cavity filling time, is limited by the size of these transients.The strongest transient occurs for the first of these bunch trains, because the RF system goes from steady state without beam to a new equilibrium with beam, passing through a transient state.The detuning of the RF cavity voltage due to beam-induced voltage is compensated by a tuner [2,3], which tunes the cavity half-way between being resonant with and without beam, the so-called half-detuning beam-loading compensation scheme [4].The tuner needs several seconds to act compared to the time scale of the injection transient and its effect is not present immediately after the first injection.Pre-detuning the eight cavities per beam before injecting the first batch into beam 1 (clockwise) and beam 2 (counterclockwise), was therefore proposed as a way to significantly reduce the transients and increase the maximum bunch intensity possible to capture.
This contribution details the predicted benefit of this scheme based on simulation using the Beam Longitudinal Dynamics (BLonD) code [5].Additionally, results from measurements from operation during the summer of 2023 are shown and compared with the simulations.

Beam-loading in the LHC
The relation between the cavity gap voltage,  ant , the generator current,  gen , and the RF beam current,  b,rf , can be described by the following relation [6] Here, (/) is the  upon ,  rf is the RF angular frequency,   is the loaded quality factor and Δ is the detuning in frequency defined as Δ ≡   −  rf , where   is the resonant frequency of the cavity.The RF power needed to supply the cavity is [6]  gen () = During flat bottom in the LHC, the cavities are operated in half-detuning [4].In this scheme, the required RF power is minimized through setting Δ opt = (/)  b,rf  rf /(4 In operation, the cavities are tuned via a mechanical tuner moved by a step motor which is controlled through firmware [7].A steepest-descent algorithm is programmed, which minimizes the average of the maximum and minimum of the 2-dimensional cross-product between  ant and  b,rf [3].In the complex plane, the cross-product can be expressed as ℑ  ant  * b,rf = , which is down-sampled with a cascaded integrator-comb (CIC) filter.The algorithm computes the correction turn-by-turn and gradually moves   .Here  is a coefficient which determines how fast the tuner acts and is always negative.In the LHC this constant is set to a value such that the algorithm converges on the order of a second.It also follows from eq. (2.4) that the tuner only acts when  b,rf ≠ 0, i.e. when there is already beam in the ring.The pre-detuning is implemented by adding a static phase-offset  Δ in the tuner control module, which is then disabled once a certain intensity is reached in the ring.The phase offset  Δ is given as Here,  cav is the impedance of an LHC 400 MHz cavity.With local feedback systems acting,  cav is the effective impedance including the impedance reduction by these loops.The LHC RF system consists of 16 superconducting cavities, eight per ring [8].Each cavity is supplied with power through a klystron, which can deliver up to 300 kW [9], and is controlled via its own cavity controller low-level RF system.The full system, from the low-level RF to the cavity, will be referred to as the RF line and there are 16 of these lines in the LHC.The cavities are referred to by their number along the beamline and then the beam they serve, e.g.cavity number 5 in beam 1 is referred to as cavity 5B1.

Measurements in operation
Since the exact value of the detuning for each cavity may vary, measurement of the klystron forward power line-by-line was performed during operation to verify the reduction of the transients.A scan was first done with four fills at  Δ = 25 • , six at 30 • and three at 35 • with a bunch intensity of 1.58 × 10 11 protons per bunch (p/b).For each fill the first 20-26 turns of transients are captured after the injection of the first batch with comparable length to the cavity filling time.
The reduction in peak transient for the first long batch is illustrated in figure 1.The error bar for each measurement point is the standard deviation computed from all the fills with a given detuning angle and a given RF line.The plot shows that the peak power decreases with increasing detuning angle, with the exception of lines 5, 6 and 8 for beam 1.The increase in peak power for these cavities at 35 • could be due to a lower optimum phase than the rest of the cavities.The lower value of the optimum detuning can be due to variations in parameters like   , gain of the one-turn delay feedback (OTFB) and the gain of the analog RF feedback (RFFB).
-2 - Table 1.The average reduction in peak power as a function of the pre-detuning phase  Δ .The last column is the mean standard deviation of all the measurement points shown in figure 1.The average values of change in peak power for Beam 1 exclude cavities 5B1, 6B1 and 8B1.The gain in power margin is reproducible from fill to fill compared to the gain itself.For a given beam type, the results for all RF lines have a standard deviation between 2.6 kW and 6.8 kW for beam 1 and between 2.4 kW and 7.9 kW for beam 2. The average reduction in power is found in table 1.It should therefore be possible to fine-tune the optimum power for each line within 2.5 • , if the average reduction close to the minimum (30 • -35 • ) is considered.

Simulations and further improvements
BLonD simulations with the model of the LHC cavity loops [10] were performed with the measured beam and RF parameters.The operational LHC batch consisted of a 56-bunch 8b4e PS batch followed by three 36-bunch standard 25 ns batches [11].In the LHC, the bunches sit in 25 ns slots, corresponding to 10 RF buckets.In 8b4e bunch trains a pattern of 8 filled slots followed by 4 slots empty is repeated along the batch.For an average intensity of 1.58 × 10 11 p/b, an average bunch length at injection of 1.46 ns, and the given injection scheme, the peak RF beam current was found to be 1.33 A. The BLonD model of the LHC tuner control gave an optimum detuning of around 44 • (−9.5 kHz) for this type of hybrid filling pattern.
The parameter space probed during the measurement scan presented in this paper was limited by the availability of the LHC during the end of the proton run in 2023.Hence, more measurements -3 - are needed to further improve the performance of the pre-detuning.A parameter scan in detuning angle was therefore performed in simulation to show how the transients vary below and above the optimum detuning angle.The result of this scan is plotted in figure 2. As the detuning phase in operation is a static phase offset added to a static setpoint phase, the partial detuning due the initial 12-bunch injection has to be taken into account.In order to compare simulation and measurement, the detuning phase  Δ has to be shifted to the effective detuning phase φΔ , Here, Δ Δ,12b is the detuning from the tuner algorithm due to the twelve circulating bunches and  set is the setpoint reference phase of the tuner.The exact value of Δ Δ,12b depends on the beam parameters of the batch and for the relevant period of operation a shift of −3.4 kHz, corresponding to 12 • , was assumed.In addition, the reference phase,  set , is calibrated, and it has an estimated 5 • uncertainty.The uncertainty from this calibration, corresponding to the black dashed lines in figure 2, shifts the minimum of the peak power in simulations with respect to measurements.Furthermore, there is a substantial error expected on the RF power measurements.The reading of the forward power, used in this analysis, is calibrated using thermal measurements, which has several sources of error.In addition, a line-by-line spread is observed, which from operational experience is up to ±20 %.This spread is represented in figures 2 and 3 with a gray shaded area in order to better compare the simulation results to the measurements.
As can be seen from eqs. (2.1) and (2.2), in steady state, the peak power should have a square dependence on the detuning in frequency.Figure 2 shows that this is the case in simulations above the minimum.However, below the optimum detuning the dependency seems to be linear.This is because the steady-state condition assumed for eq.(2.2) is not valid anymore, as the RF beam current is oscillating after injection.The longitudinal oscillations are dipolar and quadrupolar components excited in the injected beam due to the mismatch of the aspect ratio between the SPS and LHC.The dipolar component modifies the phase of the RF beam current while the quadrupolar one changes the amplitude of the current, affecting the peak RF power.The oscillations can be seen in figure 4 for lower values of effective detuning, φΔ .The value of the detuning,  Δ , corresponding to the minimum peak power, oscillates turn-by-turn after injection.The observed optimum detuning changes therefore -4 -  depending on how many turns are measured during the first 100 turns after injection.However, due to the size of the buffer of the acquisition system used to perform the measurements, only 36 turns can be recorded at a time.For each injection one usually end up with between 10 to 16 empty turns, due to the precision of synchronizing the software trigger to the acquisition.It is therefore currently only possible to record 20 to 26 turns after injection.Since the transients have a bucket-by-bucket structure the highest sampling rate was used to measure them.For further optimization of the detuning, being able to acquire more turns will be important, perhaps by lowering the decimation of the acquisition.Another observation is that the optimum pre-detuning phase can in general differ from the optimum half-detuning phase, since half-detuning is only best in steady state.In addition, it also suggests that the minimum possible peak power, around 150 kW in simulation, will never be as low as the optimum average half-detuning value which is around 140 kW in theory.

JINST 19 T04005
The measured transients in peak power compared with the results from simulation are shown in figure 3. The shaded areas in blue and red correspond to the line-by-line spread in power for the eight RF cavities for beam 1 and beam 2, respectively.The three outlier cavities in beam 1 are also plotted in this figure.Figure 3 indicates that, although the spread in measurements for both beams is considerable, the overall reduction in power follows the simulation.The operational setting of the -5 -pre-detuning phase to minimize the peak injection power transient should therefore lie between 28 • and 38 • according to simulation.Hence, the minimum of the outliers is not far from that of the simulations when taking into account the error due to the reference phase calibration (figure 2).Furthermore, the slope of the outliers differs from the rest, which can be due to a variation in   as seen in figure 2. However, because the reduction for the outlier cavities are within the fill-by-fill variation, it could be that they were not pre-detuned as expected.The slope from simulation of peak power as a function of detuning was found to be −3.44 kW/ • below the minimum.The reduction in power per degree of pre-detuning phase predicts that a phase precision of 1.4 • should be possible in simulations when the fill-by-fill variation in measurements is taken into account.Lastly, the offset in power in figure 3 between simulation and measurement could be due to a difference in gap voltage [12].

Conclusions
The pre-detuning of cavities was put into operation with protons in the LHC to reduce the power transients at injection of the first long batch, and it has demonstrated a significant gain in power margin.A parameter scan was performed during LHC operation to optimize the pre-detuning phase and clearly yields a reduction of transients that matches predictions.Measurements over multiple injections of bunch trains show that a fine-tuning of the phase up to 2.5 • can be achieved due to the small variation of each of the RF lines for a given phase value and beam type.
Simulations predict that the optimum operational setting of the pre-detuning phase should lie between 28 • and 38 • , depending on the RF line.Furthermore, to further optimize the phase accuracy, at least 100 turns should be acquired after injection.

igure 1 .
The measured peak klystron forward power cavity-by-cavity at different detuning angles for all eight lines per beam, for beam 1 (top) and beam 2 (bottom) lines.

Figure 2 .
Figure 2. The peak power over the first 30 turns as a function of the effective predetuning φΔ in simulation.

Figure 3 .
Figure 3.The peak power over the first 30 turns as a function of the effective predetuning, φΔ .

Figure 4 .
Figure 4.The turn-by-turn peak power transient for different φΔ and turn-by-turn minimum (black) in simulation.The lines at turns 200 and 400 are numerical artifacts.
b,rf , while keeping the gap voltage constant in both amplitude and phase.The average steady-state generator power then becomes ant ) and  ,opt = -1 -2 ant / (/)