Simulation and measurement of beam loading effects in magnetic alloy rf cavity of CSNS RCS

Different from the ferrite cavity, the Q value of magnetic alloy cavity in CSNS RCS is only about 1.25, the frequency band of impedance is wide, and the beam loading effects is strong. Based on the impedance measurement results, the influence of the beam loading effects on the longitudinal distribution of the magnetic alloy cavity in CSNS RCS is studied by simulation, and the induced voltage measured on the machine is consistent with it.


Introduction
The average beam power of 125 kW has been achieved in February 2022, 25% more than the designed power.In order to further improve the beam power, a magnetic alloy (MA) material rf cavity [1] was added to the rapid cycling synchrotron (RCS) during the summer maintenance in 2022 to form a double harmonic system with the ferrite cavity, so as to improve the longitudinal beam distribution, increase the bunching factor and mitigate the space charge effects in the first few milliseconds.Compared to the ferrite cavity, MA cavity has a higher accelerating voltage gradient and the lower Q value gives it a wider bandwidth, eliminating the need for an additional tuning system.However, the beam loading effect of MA cavities is very serious, which should be considered carefully in high-intensity proton synchrotrons [2] [3].In order to reduce the beam loading effects, a feedback system is used in the MA cavity to compensate for the induced voltage.In this paper, the measured impedance is used to simulate the beam loading effects using PyORBIT [4], and some custumized functions have been added to meet the requirements of the simulation [7].The induced voltage in MA cavity has been also measured.

Measurement and simulation
The wake voltage due to the beam loading effects is expressed as where V cavity and I beam are the wake voltage and beam current at the frequency ω.The impedance Z cavity of MA cavity per half gap is given in FIG. 1, which is measured by the coaxial-wire method [5][6].The impedance Z cavity can be represented in the LRC model, which is where the shunt resistance R L is 196.7 Ω, the resonant frequency ω r is 2.06 MHz, the quality factor Q L is about 1.25.The measurement accuracy will be affected by vector network analyzer (VNA), ambient temperature and positioning accuracy of copper wire.To reduce instrument errors, VNA preheats for 30 minutes and also has been calibrated.The copper wire used for measurement has some inductance, which is within the acceptable range.The inductance of carbon film resistor used is very small.The temperature and humidity are almost the same in multiple measurements.The results of single-cell and multi-cell measurements are consistent.
The main RCS parameters are shown in the Table .1  To evaluate the importance of beam loading compensation, the simulation has been taken with and without beam loading effects, and the rf curve is shown as FIG. 2. The longitudinal phase space at 20 ms with the beam loading effect is shown as the left one of FIG. 3, where it can be seen that the length of the beam increases slightly and its energy has a significant shift compare to the one without considering beam loading effect.Both the longitudinal phase spaces with and without the beam loading effect are matched to the bucket after the injection.The wake voltage of different harmonic components are shown in FIG. 4, in which h represents the harmonic number.It shows that the most serious effects is caused by h = 2, which can reach up to 11 kV and account for up to 18.3% of the fundamental rf voltage.And the components of h > 6 are less than 1 kV, which don't affect the beam much at present.Only the fundamental cavity voltage is used during the measurement.
In order to verify the accuracy of the calculation, the original signal of the gap voltage has been measured as shown in FIG. 5. Since the cavity was not driven, the gap voltage consists of only the wake voltage.The four-transistor amplifier of MA cavity works on the push-pull mode, and the conversion formular of the gap voltage is in which V a and V b is the amplitude of tank A and tank B, and the constant 1.8 × 10 3 is the conversion coefficient.The magnitude of the RF voltage displayed in the FIG. 5 is the value processed by the algorithm of the low-level rf (LLRF) control system.Due to the presence of attenuators in the circuit, there is a difference between it and the actual RF voltage.The actual RF voltage are measured through a high-voltage probe, and by comparing the value obtained from the LLRF with the measurement value of the probe, the conversion coefficient can be obtained.The maximum harmonic wake voltage values of the h=2 to h=8 excited are about 10 kV, 3 kV, 1 kV and 0.5 kV, which is consistent with the simulation results as shown in FIG. 6.After using multiharmonic compensation through the feedback system of LLRF, all the components can be less than 0.5 kV.The parasitic impedance at 21.6 MHz has also been found from measurement, as shown in FIG. 7.Although the impedance value is large, its frequency is far from the fundamental frequency and the harmonic components of beam current are weak.The simulation result as FIG. 8 shows that all the components of the wake voltage are less than 0.8 kV in 20 ms, which have negligible influence on the beam current at this stage.Considering the CSNS-II [7], more than 5 times the beam intensity of CSNS and two more MA cavities installed, the effects can be more serious.And the range of accelerating frequency in CSNS-II, which is from 1.717 to 2.444 MHz, is narrower than the one in CSNS.This makes the beam keep some higher harmonic components for a longer period of time during the accelerating, which can also exacerbate the effects of parasitic impedance.The wake voltage in CSNS-II is shown as FIG. 9, in which the injection energy is 300 MeV and the particle number is 7.8 × 10 13 ppp for a single bunch.It can be seen that the wake voltage increases significantly and that h=14,16,18,20 all reach the kV magnitude at the extraction stage.FIG. 10 shows that the wake voltage will distort the phase space distribution, however the maximum bunch length doesn't increase compared to the one without this impedance.The effects in higher beam power are further being studied.

SUMMARY
We measure the impedance of the MA cavity by the coaxial-wire method and simulate its beam loading effects with PyORBIT.The shunt resistance R L is 196.7 Ω, the resonant frequency ω r is 2.06 MHz, the quality factor Q L is about 1.25 and the maximum harmonic wake voltage values of the h=2 to h=8 excited are about 10 kV, 3 kV, 1 kV and 0.5 kV, which is consistent with the simulation results.A parasitic impedance of 21.6 MHz was also found from measurement, which has negligible influence on the beam current at this stage.However, with the increase of beam power, the influence of parasitic impedance will be amplified and may become one of the sources of instability.

Figure 1 .
Figure 1.The real (blue) and imaginary (orange) part of the measured impedance corresponding to the half gap of MA cavity

Figure 2 .
Figure 2. Fundamental harmonic(blue) and second harmonic(orange) voltage curve in 20 ms

Figure 3 .
Figure 3.Comparison of the longitudinal phase space at extraction stage with (left) and without (right) beam loading effects in the simulation.

Figure 4 .
Figure 4.The wake voltage at different harmonic components.Both the fundamental and the second cavity voltage are used in the simulation.

Figure 5 .
Figure 5.The harmonic components of wake voltage in MA cavity.Only the fundamental cavity voltage is used during the measurement.

Figure 6 .
Figure 6.The wake voltage at different harmonic components.Only the fundamental cavity voltage is used in the simulation.

Figure 8 .
Figure 8.The wake voltage of parasitic impedance in CSNS.

Figure 9 .
Figure 9.The wake voltage of parasitic impedance in CSNS-II.

14thFigure 10 .
Figure 10.Comparison of the longitudinal phase space at extraction stage with (left) and without (right) beam loading effects in CSNS-II.