Stability analysis of double-harmonic cavity system in heavy beam loading with its feedback loops by a mathematical method based on Pedersen model

With the high beam current in storage ring, it is necessary to consider the instability problem caused by the heavy beam loading effect. It has been demonstrated that direct RF feedback (DRFB), autolevel control loop (ALC) and phase-lock loop (PLL) in the main cavity can lessen the impact of the beam effect. This paper regarded the beam, main cavity, harmonic cavity and feedback loops as double harmonic cavity system, and extended the transfer functions in the Pedersen model to this system. Some quantitative evaluations of simulation results have been got and conclusions have been drawn. In the case of a passive harmonic cavity, the optimization strategy of the controller parameters in the pre-detuning, ALC and PLL, as well as the gain and phase shift of DRFB were discussed. Meanwhile, it also involved the impact of the harmonic cavity feedback loop on the system stability at the optimum stretching condition when an active harmonic cavity was present. The research results can be used as guidelines for beam operation with beam current increasing in the future.


Introduction
Higher harmonic cavity (HHC) has demonstrated to improve beam life and suppress instabilities through Landau damping without affecting energy diffusion and brightness [1] [2].However, passing through the HHC in the fundamental mode can cause beam destabilization according to the Robinson criterion, which requires detuning the main cavity to maintain stability [3].When studying RF system instability, the influence of HHC cannot be overlooked.Techniques such as direct RF feedback (DRFB) can reduce heavy beam loading and increase beam current limit by increasing cavity bandwidth and reducing the RF cavity shunt impedance [4].Autolevel control loop (ALC) and phase lock loop (PLL) in low-level RF (LLRF) systems stabilize cavity voltage while affecting overall system stability.Pedersen model based feedback loop explains Robinson instability using beam and transmitter current modulations [5][6].This paper introduces HHC, DRFB, ALC, and PLL to Pedersen model to analyze instability and evaluate the influence of pre-detuning angle, HHC detuning, ALC and PLL controller parameters, and DRFB gain and phase shift on the maximum beam current limit.As a case study, the instability effects of various parameters are analyzed at the Shanghai Synchrotron Radiation Facility (SSRF), and suggestions were proposed.

Model description
Taking passive harmonic double cavity system as an example, the steady-state phasor diagram is shown in Fig. 1.The voltage ṼC in the main cavity is determined by beam current ĨB , excitation source current ĨG , DRFB current ĨF and cavity impedance.φ s , φ L and θ L are the synchronization angle, detuning angle, and pre-detuning angle, respectively.The total voltage ṼT is the vector sum of the main cavity voltage and the passive HHC voltage ṼH .Y = I B /I 0 is usually used to characterize the severity of the beam loading effect, where I 0 is the projection of I T onto V C .Based on this, the parameter X = I F /I 0 can be defined to characterize the gain of the feedback current, while the phase can be represented by φ F .In the case of high-Q, the detuning angle φ H can be figured out to be about 90°, and the passive HHC voltage can be calculated from V H = I B rp Qp f hrf ∆f [7], where f hrf is n times of the RF frequency, ∆f is the detuning frequency.The total cavity voltage can be determined by V T and θ T .
The detuning angle of the main cavity can be obtained by phasor diagram, which is equal to The Pedersen model of the passive harmonic double cavity system can be deduced from the expression of the vector relationship and the impedance of cavity, as shown in Fig. 2.
Due to the slow response of tuner loop, only the ALC and PLL are considered in the simulation [8], Note that this work only includes static beam loading effects.The transfer function that relates the modulation of current excitation to the modulation of cavity voltage is as follows: Where σ=ω rf /(2Q L ) is the cavity damping factor, the voltages on the main cavity are excited by different signals.Therefore, it is necessary to obtain the transfer functions of each excitation signal for the cavity voltage through the vector relationships in Fig. 1, as shown in Eq.4.The voltage on the passive HHC is only excited by the beam, by simply changing σ and φ L to σ H and φ H in Eq.3, G BH pa and G BH pp can be obtained.
By the same token, we can get transfer functions such as is the transfer function from the equivalent phase modulation of the total cavity voltage to the phase modulation of the beam current, where Ω s is the longitudinal oscillation frequency [9].Main cavity and harmonic cavity can both affect the equivalent phase of the total cavity voltage [10], and the weight of each component is In the DRFB loop, the amplifier convert voltage modulation signal into current modulation signal using G f = X/R L , where R L equals the main cavity's load shunt impedance.The ALC and PLL controller functions as a low pass filter that removes the DC component and excludes the carrier frequency portion [11].Additionally, K Ca and K Cp denote gain, while C a and C p represent bandwidth:

Influence of loop parameters on system performance
The Robinson instability calculates the maximum current that a beam can hold within a cavity, which happens when the vectors ṼG and ĨB in the diagram are in opposite phases.However, with additional loops, it becomes challenging to portray the instability analysis in the vector diagram due to interactions between the loops.In this case, the new model can compute the open-loop transfer function and plot the Nyquist curve.If the proper controller parameters are in place, the system's poles will not fall in the right half-plane.According to the Nyquist stability criterion, if the Nyquist plot of positive frequencies doesn't cross the left-hand side of the (-1, 0j) point on the real axis, then the closed-loop system is stable with no poles in the right half-plane.The loop delay time T is around 1-2 µs [12] since the klystron's control function has a minor impact on this model's beam dynamics.Since the delay function is approximately e −sT ≈ 1 − sT ≈ 1 and the zero-mode oscillation frequency of SSRF is around 4.8 kHz, the model omits delay for simplicity.The shunt impedance of main cavity is 28.5MΩ , the designed voltage of the main cavity is 5.4 MV.The HHC voltage is approximately 1.8MV under optimal stretching conditions, the detuning frequency can be calculated as 22kHz.The stability can be determined by the gain margin, represented by SC for single cavity and DC for double cavity, as seen in Fig. 3 Nyquist plot.
Figure 3.The beam current is 300mA.DRFB is adjusted to achieve the critical stable state, where the curve passes through (-1, 0j), and this state is extended to double cavity system with different detunings, where the system remains in the critical stable state.
Based on Figs. 3 and 4, it can be concluded that adding HHC or changing the detuning of HHC does not significantly affect system stability.This implies that the system's maximum beam current intensity achievable at the critical stable state is not affected.However, increasing HHC within the stable region results in a reduction of the system's stability margin.The analysis of the DRFB in Fig. 4 indicates that setting the phase shift angle within the range of -180°to -300°can improve the system's stability.
Figure 5. System gain margin versus pre-detuning angle, that is calculated with HHC detuning frequency 18-26 kHz.
Fig. 5 shows that the system is highly unstable when the pre-detuning angle falls within the range of 0-30°.In practice, deviations in the pre-detuning angle are common due to the system's poor loop control capability.To prevent the system from reaching the highly unstable region, a small negative value can be preset for the pre-detuning angle.
After considering ALC and PLL loops, Assume that the initial controller gain is 6 and bandwidth is 1 kHz.The effects of their gain and bandwidth on system stability are discussed separately [14].
By analyzing the Nyquist plot in Fig. 6, it can be concluded that the stability of various curves can be compared based on the phase margin.An increase in the ALC gain leads to a decrease in the phase margin.However, simulation results have confirmed that variations in PLL gain and controller bandwidth within a certain range do not significantly affect the stability margin.
Upon conversion from passive to active HHC, the optimum stretching state can be achieved at various beam intensities, as given by the following equation [15]: Figure 6.Nyquist plot with gradually increasing amplitude loop gain, system from stable to unstable.
U 0 in Eq.7 refers to radiation loss.Adjusting the HHC transmitter coupling coefficient can meet the optimal coupling, satisfying β op = 1 + P B /P H [16], and its ALC and PLL controllers are consistent with the main cavity.However, it has been observed that the system can easily enter an unstable state, as shown in Fig. 7.This is one of the reasons why most facilities do not currently use active HHC, after adding an excitation source to the HHC, the system can become unstable and quickly lose the beam.Three solutions were proposed to successfully transform the system from an unstable to a stable state, which were verified through simulations, operations 1-3 are as follows: • Reducing the gain and bandwidth of each controller, even if it may result in slower feedback control; • Using DRFB, but a high feedback gain may result in a decrease in the precision of cavity voltage control or even produce self-excited oscillation in the loop; • Decreasing the coupling coefficient of the transmitter of the HHC.

Conclusion
The article proposes a novel mathematical method based on the Pedersen model to analyze, for the first time, the stability of a harmonic double-cavity system.The model employs control theory to provide a clear description of how each variable parameter affects the system's stability.The article conducts a case study using the SSRF to examine the influence of passive HHC and its degree of detuning on system stability.Strategies for optimizing system stability are presented by adjusting the parameters of the pre-detuning angle, DRFB, ALC, and PLL.Furthermore, the model is extended to an active HHC system, and it is found that this system is prone to unstable states.Three upgrade proposals for future active harmonic systems are proposed.

Figure 1 .
Figure 1.Phasor diagram for the steady-state case, depicting the amplitude and phase of each voltage and current of the transmitter, cavity and beam.

14thFigure 4 .
Figure 4. System gain margin versus phase shift angle, that is calculated with single cavity and double cavity, X=0-1.