A Novel Adaptive Filtering-Based Tuning Loop for High-Q SRF Cavity
Mr. Yubing Shen, Prof. Gu Qiang, Zheng, Dr. Xiang, Huang, Dr. Xue-Fang
Submitted 2025-05-27 | ChinaXiv: chinaxiv-202506.00047

Abstract

The Shanghai High repetition rate XFEL and Extreme light facility (SHINE) utilizes high-Q 1.3 GHz superconducting radio-frequency (SRF) cavities for particle acceleration. These cavities, with an ultra-narrow bandwidth of approximately 32 Hz, are highly susceptible to Lorentz force detuning (LFD) and microphonics, which can destabilize the cavity resonance frequency and compromise system performance. This paper presents a novel detuning compensation scheme that combines an autoregressive least-mean-square (LMS) adaptive filter and active noise control (ANC) in a parallel configuration to mitigate microphonic-induced detuning. A real-time simulation model, incorporating the cavity's mechanical eigenmodes, was developed to evaluate the proposed approach. Simulation results demonstrate significant reductions in amplitude and phase errors by approximately 90% and 70%, respectively, compared to the open-loop tuning configuration, achieving the stringent operational requirements. This study introduces an innovative detuning compensation strategy for high-Q SRF cavities, providing a robust framework for optimizing RF system design and ensuring stability in complex noise environments.

Full Text

Preamble

A Novel Adaptive Filtering-Based Tuning Loop for High-Q SRF Cavity

Yubing Shen,1, 2 Qiang Gu,3 Xiang Zheng,3 and Xuefang Huang3
1Shanghai Institute of Applied Physics, Chinese Academy of Sciences, Shanghai 201800, China
2University of Chinese Academy of Sciences, Beijing 100049, China
3Shanghai Advanced Research Institute, Chinese Academy of Sciences, Shanghai 201210, China

The Shanghai HIgh repetitioN rate XFEL and Extreme light facility (SHINE) utilizes high-Q 1.3GHz superconducting radio-frequency (SRF) cavities for particle acceleration. These cavities, with an ultra-narrow bandwidth of approximately 32Hz, are highly susceptible to Lorentz force detuning (LFD) and microphonics, which can destabilize the cavity resonance frequency and compromise system performance. This paper presents a novel detuning compensation scheme that combines an autoregressive least-mean-square (LMS) adaptive filter and active noise control (ANC) in a parallel configuration to mitigate microphonic-induced detuning. A real-time simulation model, incorporating the cavity's mechanical eigenmodes, was developed to evaluate the proposed approach. Simulation results demonstrate significant reductions in amplitude and phase errors by approximately 90% and 70%, respectively, compared to the open-loop tuning configuration, achieving the stringent operational requirements. This study introduces an innovative detuning compensation strategy for high-Q SRF cavities, providing a robust framework for optimizing RF system design and ensuring stability in complex noise environments.

Keywords: Microphonics, RF cavity model, Tuning Loop

Introduction

Superconducting radio frequency (SRF) cavities are widely employed in modern particle accelerators [1][2][3]. Their high Q-factor design significantly reduces the operational costs of high-power systems but also introduces the risk of detuning due to their extremely narrow bandwidth [4][5]. Under high-load operating conditions, even minor frequency deviations in the cavity resonance caused by microphonics can severely affect the amplitude and phase stability within the cavity, leading to a significant increase in power demands [6][7][8]. In such scenarios, greater attention must be directed toward the tuning loop, requiring faster response times to compensate for detuning frequencies caused by external disturbances.

Cavity detuning primarily arises from two factors: Lorentz Force Detuning (LFD) and microphonics. LFD, caused by the interaction between the electromagnetic field and wall currents, deforms the cavity and excites mechanical modes. However, when operating in continuous-wave (CW) mode, LFD can be effectively mitigated by pre-setting cavity detuning compensation in advance [9][10]. Microphonics, on the other hand, which has a significant impact in CW mode [11], includes disturbances in specific frequency bands caused by equipment such as cryogenic systems and vacuum pumps. These can be compensated using Active Noise Control (ANC), a method validated in facilities like Linac Coherent Light Source II (LCLS-II) [12]. For stochastic factors such as ground vibrations, adaptive filters are currently the most viable compensation approach.

These detuning challenges demand fast response capabilities from the tuning loop. Taking Shanghai High repetition rate XFEL and Extreme light facility (SHINE) as an example, the target is to maintain the Root Mean Square (RMS) detuning frequency below 1.5Hz [13]. Of course, there are also other methods, such as Disturbance Observer-Based control (DOB) and Iterative Learning Control (ILC) [14][15], feedforward-based control [16], and Active Disturbance Rejection Control (ADRC) [17][18], among others.

To verify the effectiveness of various control measurements and algorithms in meeting the amplitude and phase stability requirements within the RF cavity, it is necessary to establish a real-time cavity simulation [19]. In addition to incorporating the cavity equivalent model and amplitude-phase feedback loops, it is crucial to develop a comprehensive and accurate tuning loop model. The tuning actuators responsible for compensating cavity detuning frequencies include stepper motor for slow tuning and piezo for fast tuning [20][21]. Both the piezo and the mechanical eigenmodes of the cavity are considered in the model. Using SHINE accelerating cavities as an example, control parameters are ultimately adjusted to achieve an RMS amplitude stability of less than 0.02% and an RMS phase stability of less than 0.02°.

The structure of this paper is as follows: It begins with a detailed discussion of the sources of detuning in high-Q SRF cavities, focusing on the characteristics of microphonics and its impact on cavity stability. Sec. II evaluates various tuning loop control strategies and selects the Least Mean Squares (LMS) algorithm as the core for detuning compensation, analyzing potential instabilities in combination with system characteristics. Sec. III establishes a real-time simulation model incorporating the mechanical eigenmodes of the cavity to verify the effectiveness of different control strategies, with an in-depth analysis of the combined effects of ANC and LMS on suppressing amplitude and phase errors. Sec. IV concludes the paper.

II. Control Strategy

A. Cavity Detuning Frequency and Changes in Control Strategies

In traditional normal conducting RF cavities or low-Q superconducting RF cavities, the half-bandwidth of the RF cavity is typically wide, and the tuning loop bandwidth is usually designed to be relatively low to avoid coupling with the amplitude-phase loop [22]. For example, the half-bandwidth of the 500 MHz superconducting cavity in the Shanghai Synchrotron Radiation Facility (SSRF) storage ring is approximately 1.25 kHz. In this case, a few Hertz of detuning has a minimal impact on the amplitude-phase stability of the accelerating field inside the cavity. Therefore, a slow tuning loop with a response frequency of approximately 1-10 Hz is sufficient, while the bandwidth of the amplitude-phase loop is generally 0.1-1.4 kHz [23].

In contrast, the SHINE main accelerating cavity has a resonance frequency of 1300 MHz and a loaded Q-factor as high as 4 × 10^7, resulting in a half-bandwidth of only about 16.25Hz [24]. Under these conditions, detuning of just a few Hz can significantly degrade the amplitude-phase stability of the accelerating field, necessitating real-time compensation via fast tuning loop. However, simply increasing the tuning loop bandwidth may result in coupling with the amplitude-phase loop, and when the bandwidth reaches the scale of hundreds of Hz, it can even lead to system instability [25][26].

We enabled the amplitude-phase loop with small gain in SHINE RF cavity test, when the RF cavity was operating roughly in the steady-state region, utilizing the widely adopted Schilcher cavity model based on state-space representation to inversely calculate the cavity detuning frequency [27][28][29]:

$$
\begin{bmatrix}
\dot{V}{C,r}(t) \
\dot{V}
(t)
\end{bmatrix}
=
\begin{bmatrix}
-\omega_{1/2} & -\Delta\omega \
\Delta\omega & -\omega_{1/2}
\end{bmatrix}
\begin{bmatrix}
V_{C,r}(t) \
V_{C,i}(t)
\end{bmatrix}
+
\frac{1}{\beta+1}
\begin{bmatrix}
V_{f,r}(t) \
V_{f,i}(t)
\end{bmatrix}
$$

$V_C$ and $V_f$ represent the RF voltage and input voltage, respectively. The subscripts $r$ and $i$ indicate the real and imaginary components. $\omega_{1/2}$ represents the cavity half-bandwidth, $\Delta\omega$ is the cavity detuning angular frequency, and $\beta$ is the coupling coefficient, which is typically much greater than 1 in high-Q loaded cavities. Under CW operation mode, the cavity detuning angular frequency at a steady state at time $n$ can be expressed as:

$$
\Delta\omega(n) = \frac{\beta+1}{V_{C,r}^2(n) + V_{C,i}^2(n)} \left( V_{C,i}(n)V_{f,r}(n) - V_{C,r}(n)V_{f,i}(n) \right)
$$

Under steady-state operating conditions, the time-domain and frequency-domain plots of cavity detuning frequency are shown in Fig. 1 [FIGURE:1]. Since the impact of LFD under steady-state CW operation is negligible [30], the detuning is primarily caused by microphonics. During the prolonged testing, it was observed that the frequency detuning remained relatively stable within the range of -3Hz to +3Hz. A 25-second sample was selected for analysis. Fig. 1(a) shows the time-domain spectrum of the frequency detuning. During this period, the detuning frequency may exhibit a slight increase, potentially due to the influence of external ground vibrations. This sudden change further highlights the generalization ability and adaptability of the tuning algorithm in responding to external disturbances. Fig. 1(b) presents the frequency-domain spectrum of the frequency detuning. By analyzing the spectral plot of the detuning frequency, its primary characteristics can be identified. Prominent spectral components are observed at DC and specific frequency points. After shutting off the vacuum pump, the 50Hz and nearby vibrational noise interference significantly decreased, indicating that the noise in certain frequency bands is caused by mechanical vibrations from components. When these devices are turned off, the corresponding noise levels are notably reduced. This suggests that optimizing noise sources to minimize mechanical vibrations is an effective mitigation strategy. Additionally, control algorithms targeting specific frequency points, such as ANC, can be employed to further suppress these noise components.

Second, the remaining spectral components are mainly distributed below 250Hz, where scattered random noise dominates. This frequency range also coincides with the mechanical eigenmodes of the cavity. The next section will focus on the use of real-time adaptive filters to suppress noise within this frequency band.

In summary, the proposed control logic block diagram is presented in Fig. 2 [FIGURE:2]. Here, $|a|$ denotes the magnitude, and $\angle a$ represents the phase angle. The amplitude-phase loop employs PID control, while the tuning loop adopts a real-time adaptive filter combined with the ANC for better suppression of cavity detuning. Regardless of the source of noise, the process ultimately applies forces to the cavity, causing deformation and resulting in changes to the cavity's resonant frequency. This process is modeled in the Cavity Mechanical Model block, which will be discussed in greater detail in Sec. III. The Lorentz force generated by RF fields is referred to as $F_{int}$, while the force caused by microphonics is denoted as $F_{ext}$. The feedback loop applies a force through the piezo, which is labeled as $F_{FB}$.

B. Control Algorithm

An adaptive filter is a dynamic filter capable of automatically adjusting its parameters based on changes in the input signal. Its core functionality lies in minimizing the error signal through iterative algorithms, enabling effective signal extraction and noise suppression. Unlike traditional fixed-parameter filters, adaptive filters do not require pre-defined filtering parameters. Instead, they utilize algorithmic optimization techniques to dynamically update filter coefficients in real-time, allowing them to adapt to time-varying signal environments [31].

If cavity frequency detuning is considered as interference noise, suppressing this noise typically requires a reference noise signal that is correlated with the target noise to be suppressed. In the RF cavity operating environment, the reference noise signal can be selected as the previously suppressed noise from the last time step, implementing an uncommon autoregressive strategy.

To evaluate the effectiveness of this control strategy, this study uses a single-frequency 20Hz signal with a signal-to-noise ratio (SNR) of 30 as the test signal. This type of test signal aligns with the characteristics of the microphonics described in Chapter II A. The signal is subjected to autoregressive suppression using three different adaptive filtering methods: LMS adaptive filter, Recursive Least Squares (RLS) filter, and Kalman adaptive filter.

The FIR filter structure is defined by:
$$
w_n = [w_0(n), w_1(n), \cdots, w_{N-1}(n)]^T
$$
$$
x_n = [x(n), x(n-1), \cdots, x(n-N+1)]^T
$$
$$
y(n) = \sum_{i=0}^{N-1} x(n-i) \cdot w(i) = x_n^T w_n
$$
$$
e(n) = d(n) - y(n)
$$
$$
x(n+1) = e(n)
$$

As shown in Fig. 3 [FIGURE:3], in this FIR filter, the filter coefficients $w_n$ are updated at each time step, representing the filter weights at the current time, the length of this weight vector is $N$. The reference noise signal $x_n$ is an input vector containing the current time step and the previous $N-1$ time steps, with a length of $N$. It represents the historical data used for noise suppression. The output of the filter, $y(n)$, is calculated by taking the dot product of the current filter coefficients $w_n$ and the reference noise signal $x_n$. The desired output $d(n)$ is the sum of the expected zero detuning target and the cavity detuning caused by factors such as microphonics. Meanwhile, the difference between $y(n)$ and $d(n)$ forms the error $e(n)$, which is also the reference signal $x(n+1)$ for the next time step. This error is used to adjust and update the filter coefficients $w_n$. By continuously updating these filter coefficients, the FIR filter is able to progressively suppress noise and optimize based on new input data, thus achieving effective noise suppression.

The parameter values of each algorithm are shown in Table 1 [TABLE:1].

TABLE 1 Adaptive Filter Parameters

Algorithm Parameters LMS $\mu = 1 \times 10^{-3}$ RLS $P = I_{N \times N}, \lambda = 0.999$ Kalman $P = 10^3 \times I_{N \times N}, Q = 0.1, R = 10$

The basic form of the LMS filter is represented by:
$$
w_{n+1} = w_n + \mu e(n)x_n
$$

where the only parameter requiring initial configuration is the learning rate $\mu$.

The RLS filter is represented by:
$$
K_n = \frac{P_n x_n}{x_n^T P_n x_n + 1}
$$
$$
w_{n+1} = w_n + K_n e(n)
$$
$$
P_{n+1} = \frac{1}{\lambda}(P_n - K_n x_n^T P_n)
$$

where $K_n$ is the RLS gain, which determines the step size for weight updates, thereby affecting the rate of adjustment of the filter coefficients. The covariance matrix $P_n$ describes the uncertainty of the model parameters at the $n$-th time step. When $P_n$ is large, it indicates higher uncertainty in the parameter estimates, resulting in a larger $K_n$ and a larger weight update step. This is typically applicable in the early stages of model development or when the data exhibits high variability. When $P_n$ is small, the current parameter estimates are more certain, leading to a smaller $K_n$ and a smaller weight update step. The forgetting factor $\lambda$ controls the influence of historical data on model updates. If $\lambda$ is large (close to 1), the algorithm places more weight on historical data, making it suitable for systems with slow changes. If $\lambda$ is small, the algorithm focuses more on the current data, making it suitable for systems with rapid changes.

The Kalman filter is represented by:
$$
P_{n|n-1} = P_{n-1|n-1} + Q
$$
$$
K_n = \frac{P_{n|n-1} x_n}{x_n^T P_{n|n-1} x_n + R}
$$
$$
w_{n+1} = w_n + K_n e(n)
$$
$$
P_{n|n} = (I - K_n x_n^T) P_{n|n-1}
$$

The Kalman gain $K_n$ is similar to the RLS gain, determining the step size for weight updates. The left and right sides of the subscript $|$ represent state estimates at different time points. Specifically, the left side refers to the current state estimate, while the right side indicates the estimate updated or predicted based on past information or observations. For instance, $P_{n|n-1}$ represents the covariance matrix at time $n$ based on the state estimate and prediction model from time $n-1$, reflecting the uncertainty of the predicted state estimate without the current observation data. In contrast, $P_{n|n}$ is the updated covariance matrix at time $n$, incorporating the current observation data, providing the most precise uncertainty of the state estimate. $Q$ is the process noise covariance matrix, indicating the uncertainty of process noise in the model. A larger $Q$ implies greater uncertainty in the system model, causing the filter to rely more on new observation data, leading to faster response to signal changes. $R$ is the observation noise covariance matrix, describing the noise level in the observation data. A larger $R$ makes the filter more sensitive to noise, resulting in smaller gains and fewer adjustments based on noisy observations.

The test signal is subjected to autoregressive suppression using the three adaptive filters with $N=8$ mentioned above. As shown in Fig. 4 [FIGURE:4], the LMS method reaches optimal suppression more slowly compared to RLS and Kalman filters. However, regardless of how the parameters of RLS and Kalman filters are adjusted, the final suppression effectiveness is nearly identical across all three methods. This conclusion is further supported by the FIR tap coefficients.

As shown in Fig. 5 [FIGURE:5], the tap coefficients of all three algorithms ultimately converge to the same values. Although the RLS and Kalman filters achieve faster convergence, they involve intensive matrix operations, including multiplications and inversions, which increase computational complexity. In contrast, the LMS algorithm offers a simpler structure and easier implementation. Despite its slower convergence and relatively poorer timing performance, LMS is selected in this study as the core algorithm for the adaptive filter, considering the balance between performance and practical implementation.

The above discussion focuses on using adaptive filters to suppress uncertain noise. In contrast, a 2019 solution proposed by Cornell University introduced an ANC approach for RF cavities [4], which effectively suppresses noise at fixed frequencies:

$$
\begin{cases}
u_{ANC}(t) = \sum_m \left[ I_m(t)\cos(\omega_m t) - Q_m(t)\sin(\omega_m t) \right] \
I_m(n+1) = I_m(n) - \gamma \cdot \delta f_{comp}(n) \cdot \cos(\omega_m t - \phi_m(n)) \
Q_m(n+1) = Q_m(n) + \gamma \cdot \delta f_{comp}(n) \cdot \sin(\omega_m t - \phi_m(n)) \
\phi_m(n+1) = \phi_m(n) - \eta \cdot \delta f_{comp}(n) \cdot \left[ I_m(n)\sin(\omega_m t - \phi_m(n)) + Q_m(n)\cos(\omega_m t - \phi_m(n)) \right]
\end{cases}
$$

The output of the ANC controller, denoted as $u_{ANC}$, is the input to the tuner. $u_m$ represents the ANC suppression at the $m$-th frequency point, which can be specifically decomposed into in-phase and quadrature components. $\gamma$ and $\eta$ are the learning rates of $I_m/Q_m$ and $\phi_m$, respectively. $\delta f_{comp}$ represents the frequency detuning of the cavity caused by the combined effects of Lorentz force, microphonics, and the tuner's frequency control. Here, the adaptation of $\phi_m$ is designed to compensate for the phase of the actuator at the corresponding frequency point. It is worth noting that when $\phi_m$ is nonzero, the closed-loop transfer function formed by ANC may exhibit loop gain greater than 1 nearby the set frequency. This results in the unintended amplification of noise at the surrounding frequencies, even though ANC significantly suppresses noise at the set frequency.

C. Potential Instabilities

Adaptive filters employing autoregressive strategies must pay particular attention to potential instability issues. These primarily arise due to the absence of an external reference signal, as filter coefficient adjustments rely on historical estimation data derived from the autoregressive process [35][36]. This makes the performance heavily dependent on the dynamic changes in noise and the rate of filter tap coefficients update. Specifically, if the loop delay is excessively large, the autoregressive non-standard reference signal may exhibit weak correlation with the current external noise signal, which consequently leads to a degradation in the filtering performance. Fortunately, the update period of the adaptive filter is on the order of milliseconds, whereas the loop delay is on the order of microseconds, suggesting that the loop delay has a negligible impact on the stability of the loop. Additionally, the rate of change of the filter tap coefficients must be carefully considered. If the rate is too small, the filter may struggle to accurately track and suppress noise. Conversely, if the rate is too large, it can result in self-excitation and instability.

The specific parameters that need to be configured include the order $N$ of the FIR filter, the LMS update frequency $f_{AF}$, and the LMS learning rate $\mu$. The cavity detuning data shown in Fig. 1 is used as the test noise. The following analysis only discusses the LMS single-loop configuration, meaning that other loops in the RF system are not considered, and only the loop shown in Fig. 3 is focused on.

As shown in Fig. 6 [FIGURE:6], when the filter order increases and the LMS update frequency decreases, the suppression of the main lobes in the filter remains relatively consistent. For example, at the frequency points of 50Hz and 100Hz, the closed-loop gain is almost identical. However, in the side lobe region, the gain is more refined, meaning the filter's resolution within the specified frequency range is improved, which in turn enhances noise suppression performance.

The NLMS (Normalized LMS) algorithm is proposed to address the issue of uneven coefficient update rates caused by the LMS algorithm. The update equation for NLMS is as follows:

$$
w_{n+1} = w_n + \frac{\mu}{|x_n|^2 + C} e(n)x_n
$$

In Eq. 8, the denominator of the update rate is the energy of the reference signal combined with a very small constant $C$ (to ensure the denominator is not zero). This allows for dynamically adjusting the learning rate based on the energy of the autoregressive signal, increasing the convergence speed when the signal energy is low and decreasing it when the energy is high, the step size for each update remains relatively uniform.

Similarly, the cavity detuning data mentioned in Fig. 1 is used as the test noise for simulation testing. As shown in Fig. 7 [FIGURE:7], compared to NLMS, LMS is more prone to instability and causing the tap coefficients to diverge, resulting in a narrower range of variability for its learning rate $\mu$. For example, when $\mu = 1 \times 10^{-2}$ and $\mu = 1 \times 10^{-1}$, the tap coefficients diverge at 16.5s and 1s, respectively, leading to system instability. In contrast, NLMS exhibits nearly linear convergence progress before reaching stability. At this stage, concerns about potential system instability caused by a large $\mu$ value can be disregarded. Once the system reaches a steady state, the optimal learning rate $\mu$ for the LMS algorithm can be derived accordingly.

It should be noted that the NLMS algorithm requires storing historical $N$ reference signals, which consumes a certain amount of computational resources. To address this issue, we recommend using the NLMS algorithm to determine the learning rate $\mu$ during the tuning loop testing phase. At this stage, concerns about potential system instability caused by a large $\mu$ value can be disregarded. Once the system reaches a steady state, the optimal learning rate $\mu$ for the LMS algorithm can be derived accordingly.

III. Simulation Model and Test Results

A. Mechanical Eigenmodes of the Cavity

The mechanical characteristics of the cavity determine the extent to which external forces can couple to the eigenmodes of structure, potentially exciting unwanted oscillations. In piezo-based detuning control, it is crucial to measure the transfer function between the piezo drive signal and the cavity detuning [32], specifically, this involves measuring the final cavity detuning frequency under piezo driving signals at different frequencies. The smoothed test results for the SHINE test cavity are shown below:

Fig. 8 [FIGURE:8] shows the cavity frequency detuning response to sine wave excitations of different frequencies on piezo. The response transfer function contains the following terms in the Laplace domain [33]:

$$
H(s) = \frac{1}{\tau s + 1} H_0(s) + \sum_i H_i(s) \cdot \frac{K_i \cdot \Omega_i^2}{s^2 + \Omega_i/Q_i s + \Omega_i^2} \cdot H_{delay}(s) \cdot e^{-\tau_{delay}s}
$$

In Eq. 9, to account for the influence of low-frequency and DC modes outside the measurement range, a first-order low-pass transfer function $H_0(s)$ is introduced, where $K_0$ is its gain and $\tau$ is its time constant. Each mechanical response mode of cavity corresponds to a second-order system $H_i(s)$, where $K_i$, $\Omega_i$ and $Q_i$ represent the gain, resonance frequency, and quality factor of the $i$-th mode, respectively. $H_{delay}(s)$ represents the phase shift caused by the group delay of the signal in the tuner medium. The SHINE test cavity fitting results are $K_0 = 40$, $\tau = 2.26 \times 10^{-4}$, $\tau_{delay} = 1.3 \times 10^{-6}$, and the second-order system parameters are shown in Table 2 [TABLE:2].

TABLE 2 Parameters of the mechanical modes

Mode $K_i$ (Hz/V) $\Omega_i$ (Hz) $Q_i$ 1 0.85 45.2 150 2 0.92 98.7 180 3 0.45 156.3 200 4 0.31 203.5 220

The final fitted transfer function results are shown in Fig. 8. The magnitude-frequency response is well-fitted within 400Hz, while the phase-frequency response is accurately fitted within 300Hz. Based on the noise influence analysis in Fig. 1(b), it can be concluded that the fitting range is sufficient to meet the requirements.

What is observed in the control loop is the process that starts with the piezo drive signal $\Delta V$, followed by the force $\Delta F_{FB}$ applied to the tuner, resulting in cavity deformation $\Delta L$, and ultimately causing a change $\Delta f$ in the cavity's resonant frequency. The process is illustrated in Fig. 9 [FIGURE:9].

In mechanical dynamics, cavity deformation can be decomposed into a set of mechanical modes. When a specific mode is excited, it produces the corresponding mode displacement. Since the applied forces remain within the cavity's linear elastic limit, these modes can be represented as a set of damped harmonic oscillators [37]:

$$
G_i(s) = k_i \cdot \frac{\Omega_i^2}{s^2 + \frac{\Omega_i}{Q_i}s + \Omega_i^2}
$$

Where $k_i$ is the gain for each modal, $\Omega_i$, and $Q_i$ as mentioned in Eq. 9, considering that the piezo response is relatively flat below 1kHz, meaning that the force applied under the same voltage is nearly constant across different frequencies. That is, the $\gamma$ in Fig. 9 is a constant, and assuming that cavity deformation is linearly related to cavity frequency detuning ($\varepsilon \approx 3.4 \times 10^8$ Hz/m), from the Eq. 11:

$$
H_i(s)|{s=0} = \gamma \cdot G_i(s)| \cdot \varepsilon \rightarrow K_i = \gamma \cdot \varepsilon/k_S
$$

Where the cavity stiffness $k_S = 3 \times 10^6$ N/m, we can derive the gain $\gamma$, and further obtain the transfer function $G$ with the modal gains $k_i$.

By using the least-squares method, it is possible to approximate the forces exerted on the cavity due to microphonics, as shown in Fig. 10 [FIGURE:10], which are the time-domain and frequency-domain plots of the forces.

In CW mode, although the effect of LFD on the cavity frequency shift is negligible, we still incorporate it into the overall cavity mechanical model. The force exerted by the LFD on the cavity can be expressed by Eq. 12.

$$
F_{int} = \sum_i F_{int,i} = k_{lfd} \frac{V_C^2}{k_i \varepsilon L^2}
$$

Where $k_{lfd}$ is the LFD constant [34], with units of Hz/(MV m$^{-1}$)$^2$, $V_C$ represents RF acceleration voltage, $L$ is effective cavity length.

B. Amplitude-Phase Loop and Tuning Loop in Closed-Loop Operation

During the steady-state operation of the RF system, the LLRF operates in GDR (Generator Driven Resonator) mode. The working frequency of the GDR mode is strictly determined by the MO (Master Oscillator) signal, so the cavity's resonant frequency must be close to the MO frequency range to ensure efficient coupling of RF power into the cavity. In this study, various operating states of the tuning loop were observed through simulation, including open-loop, closed-loop using only the LMS algorithm, closed-loop using only the ANC algorithm, and closed-loop with both LMS and ANC loops in parallel. The impact of different tuning loop configurations on cavity detuning compensation caused by factors such as microphonics was analyzed. Prior to this, Table 3 shows the cavity and LLRF parameters used for the simulation.

TABLE 3 Cavity and LLRF parameters

Parameter Value Cavity frequency $f_0$ 1.3 GHz Loaded quality factor $Q_L$ $4.1 \times 10^7$ Setpoint $V_C$ 12 MV Loop delay I/Q loop 0.2 µs I/Q loop $K_p$ 0.2 I/Q loop $K_i$ 0.2

The fitting speed of the cavity detuning by the tuning loop under different parameter configurations can be clearly observed from Fig. 11 [FIGURE:11]. First, using the parameter set $M = 50$, $\mu = 1 \times 10^{-10}$, and $f_{AF} = 1000$ Hz as the baseline (indicated by the yellow curve), the system almost becomes unstable at around 12 seconds. Then, when the learning rate $\mu$ is increased to $5 \times 10^{-10}$ (indicated by the red curve), although the fitting speed accelerates, the excessively large learning rate causes the cavity frequency to detune at 16 seconds, leading to divergence and eventually system instability. When the filter order is increased to 80 (indicated by the purple curve), it is evident that the system's fitting performance improves, and no abrupt changes appear during the fitting process. This suggests that increasing the filter order within a certain range helps improve the system's stability. Furthermore, when the LMS update frequency $f_{AF}$ is adjusted to 400 Hz (indicated by the green curve), although the fitting speed slows down, the final fitting performance is comparable to the baseline condition. This further confirms that the optimization conclusions regarding the learning rate, filter order, and LMS update frequency in the closed-loop control system are consistent with those derived from the analysis of the single-loop case in Sec. II C. By appropriately adjusting the LMS parameters, the system's stability and fitting performance can be effectively improved, and these adjustments are of significant guiding importance in closed-loop systems.

Incorporating the ANC algorithm to compare the fitting performance of the tuning loop on cavity detuning under three conditions: LMS only, ANC only, and the combined effect of ANC+LMS. The ANC is designed to suppress frequencies at 50Hz and 100Hz, while the LMS parameter set is chosen as $M = 80$, $\mu = 1 \times 10^{-10}$, and $f_{AF} = 1000$ Hz.

As shown in Fig. 12 [FIGURE:12], compared to the LMS algorithm, ANC exhibits significantly faster noise suppression at specific frequency points. The LMS algorithm gradually adjusts the closed-loop gain by modifying the learning rate, thereby implementing noise suppression across the entire frequency band. However, its suppression speed for specific noise frequencies is relatively slow and requires gradual increase to adapt to changes in other frequency bands. In contrast, ANC directly targets and suppresses specific frequency points quickly, addressing the slow suppression effect of LMS at certain frequencies. However, the main limitation of ANC when used alone is its inability to track the DC component, as evidenced by its loop fitting performance. When LMS and ANC are combined, they complement each other's weaknesses. The system is able to maintain a high noise suppression speed while ensuring effective suppression of low-frequency and DC components, thus improving overall performance.

Subsequently, this study compares the impact of open-loop and closed-loop tuning on the cavity amplitude and phase stability. As shown in Fig. 13 [FIGURE:13], the figure presents the amplitude error (a) and phase error (b) curves under steady-state conditions for both open-loop and closed-loop tuning (with LMS+ANC), with data recorded after the system reached steady state over a 10-second interval. The RMS values of amplitude error over this period for the two configurations are 0.0033% and 0.0002%, respectively, while the RMS values of phase error are 0.0498° and 0.0138°, respectively. It is worth noting that the results at this point are theoretical values based on simulation, which cannot be fully realized in practical applications due to hardware imperfections and ADC accuracy limitations, and are intended to illustrate that this tuning scheme can effectively reduce the amplitude-phase error. From the data, it is evident that even under the open-loop tuning condition, the amplitude error can reach the target only through the amplitude-phase loop; however, the phase stability requirements are far from being met. In contrast, under closed-loop tuning (LMS+ANC), both the amplitude and phase errors are significantly reduced, indicating that the closed-loop tuning system can better enhance the system's stability and meet stringent accuracy requirements. This confirms the important role of combining LMS and ANC in noise suppression and system optimization.

C. Hardware Implementation Evaluation

A brief evaluation of the hardware implementation of the proposed tuning scheme is provided. The SHINE low-level system uses the Xilinx Zynq 7100 series chip, which is equipped with 2020 DSP48E1 units. Each DSP unit contains a 25x18 multiplier. The currently available high-speed parallel ADC has a data bit width of 16 bits.

First, consider the implementation of the adaptive filtering algorithm. In the data output section shown in Eq. 3, the $N$th-order filter requires $N$ DSP units. For the tap coefficient iterative calculation shown in Eq. 8, the dot product operation in the denominator requires $N$ multiplications and $(N-1)$ additions, plus one additional addition with the constant $C$, requiring a total of $N$ DSP units. In the numerator section, multiplying three 16-bit signed numbers requires $3N$ DSP units. The division operation is implemented using pipelining, requiring 1 DSP unit. Therefore, the adaptive filtering algorithm requires approximately $(5N+1)$ DSP units.

Next, for the ANC algorithm, the calculation of the first output expression in Eq. 7 requires 2 DSP units. The trigonometric calculation part uses the CORDIC algorithm, which does not require additional DSP resources. In the IQ iteration section, the common term calculation requires multiplying two 16-bit signed numbers, resulting in a 31-bit signed number, requiring 1 DSP unit. This result is then multiplied by two 16-bit trigonometric terms, each of which requires 2 DSP units. The phase iteration section similarly requires 7 DSP units. In summary, the total DSP resources required for the ANC algorithm at each frequency point is 14 DSP units.

Assuming a filter order $N$ of 50, and the ANC algorithm processes 4 frequency points, the total DSP resource requirement for the system is approximately 307 DSP48 units, which accounts for about 15% of the total resources.

IV. Conclusion

This study addresses the high-demand operational requirements of the SHINE by proposing a detuning compensation scheme that significantly improves system amplitude and phase stability. Through an in-depth comparison of commonly used adaptive filtering algorithms, and considering both performance and hardware implementation costs, the autoregressive LMS algorithm was selected. Its parameter design and potential instabilities were analyzed, focusing on filter order, update frequency, and learning rate. Simulations demonstrated the algorithm's effectiveness in suppressing uncertain noise.

To accurately simulate the operating environment of RF cavities, a simulation model incorporating the cavity's mechanical eigenmodes was established. Combined with amplitude-phase feedback and tuning loops, the performance of various control algorithms was analyzed in detail. Experimental and simulation results showed that the parallel scheme of the autoregressive LMS and ANC algorithm effectively suppressed microphonic detuning. Compared to the open-loop tuning configuration, the amplitude error and phase error were reduced by approximately 90% and 70%, respectively, meeting SHINE's operational requirements. This study not only demonstrates the potential of adaptive filters in suppressing RF cavity detuning but also establishes a foundational framework for further tuning loop optimization through the construction of the cavity simulation model. However, the cavity frequency detuning tested so far, or in other words, the noise sources, have been relatively stable, meaning there have been no sudden changes in noise in specific frequency bands. In extreme cases, this tuning method may not achieve perfect compensation in a short period. Future work will focus on enhancing the robustness of the proposed scheme in dynamic environments, supporting the stable operation of the SHINE facility and providing insights for the design of high-demand particle accelerators.

References

[1] C. Xu, I. Ben-Zvi, HOM frequency control of SRF cavity in high current ERLs. Nucl. Instrum. Methods Phys. Res., Sect. A. 883, 136–142 (2018). doi: 10.1016/j.nima.2017.11.074

[2] Y.X. Zhang, J.F. Chen, D. Wang, RF design optimization for the SHINE 3.9 GHz cavity. Nucl. Sci. Tech. 31, 73 (2020). doi: 10.1007/s41365-020-00772-z

[3] J. Liu, H. Hou, D. Mao et al., Great progress in developing 500 MHz single cell superconducting cavity in China. Sci. China Phys. Mech. Astron. 54 (Suppl 2), 169–173 (2011). doi: 10.1007/s11433-011-4591-7

[4] N. Banerjee, G. Hoffstaetter, M. Liepe et al., Active Suppression of Microphonics Detuning in high QL Cavities. Phys. Rev. Accel. Beams. 22, 052002 (2019). doi: 10.1103/PhysRevAccelBeams.22.052002

[5] J.Y. Ma, F. Qiu, L.B. Shi et al., Precise calibration of cavity forward and reflected signals using low-level radio-frequency system. Nucl. Sci. Tech. 33, 4 (2022). doi: 10.1007/s41365-022-00985-4

[6] W. Schappert, Y. Pischalnikov, Recent progress at Fermilab controlling Lorentz force detuning and microphonics in superconducting cavities. Proc. 4th Int. Part. Accel. Conf. (IPAC). (2013).

[7] J.Y. Ma, C.Y. Xu, A.D. Wu et al., Measurement of the cavity-loaded quality factor in superconducting radio-frequency systems with mismatched source impedance. Nucl. Sci. Tech. 34, 123 (2023). doi: 10.1007/s41365-023-

[8] X.Y. Pu, H.T. Hou, Y. Wang et al., Frequency sensitivity of the passive third harmonic superconducting cavity for SSRF. Nucl. Sci. Tech. 31, 31 (2020). doi: 10.1007/s41365-020-0732-x

[9] M. Doleans, S.H. Kim, Insights in the physics of the dynamic detuning in SRF cavities and its active compensation. Conf. Proc. C 030512, 1599 (2003).

[10] A.D. Wu, S.H. Zhang, W.M. Yue et al., Design study on medium beta superconducting half-wave resonator at IMP. Nucl. Sci. Tech. 27, 80 (2016). doi: 10.1007/s41365-016-0081-y

[11] W. Cichalewski, J. Sekutowicz, A. Napieralski et al., Continuous wave operation of superconducting accelerating cavities with high loaded quality factor. IEEE Trans. Nucl. Sci. 67(9), 2119–2127 (2020). doi: 10.1109/TNS.2020.2993539

[12] A. Bellandi, J. Branlard, et al., Narrow bandwidth active noise control for microphonics rejection in superconducting cavities at LCLS-II. arXiv preprint 2209, 13896 (2022). doi: 10.48550/arXiv.2209.13896

[13] SHINE Engineering Design Report - LLRF (2022).

[14] D. Li, Q. Wang, P. Zhang et al., Active microphonics noise suppression based on DOB control 166.6-MHz superconducting cavities for HEPS. Radiat. Detect. Technol. Methods 5, 153–160 (2021). doi: 10.1007/s41605-020-00231-8

[15] F. Qiu, S. Michizono, T. Matsumoto et al., Combined disturbance-observer-based control and iterative learning control design for pulsed superconducting radio frequency cavities. Nucl. Sci. Tech. 32, 56 (2021). doi: 10.1007/s41365-021-00894-y

[16] G. Jiang, C. Xu, F. Qiu et al., Feedforward control strategies for rapid phase adjustment of superconducting cavities. IEEE Trans. Nucl. Sci. 70(2), 93-104 (2023). doi: 10.1109/TNS.2023.3237837

[17] J. Vincent, D. Morris, N. Usher et al., On active disturbance rejection based control design for superconducting RF cavities. Nucl. Instrum. Methods Phys. Res., Sect. A 643(1), 11–16 (2011). doi: 10.1016/j.nima.2011.04.033

[18] Z. Q. Geng, Superconducting cavity control and model identification based on active disturbance rejection control. IEEE Trans. Nucl. Sci. 64(3), 951-958 (2017). doi: 10.1109/TNS.2017.2663660

[19] F. Qiu, S. Michizono, T. Miura et al., Real-time cavity simulator-based low-level radio-frequency test bench and applications for accelerators. Phys. Rev. Accel. Beams 21(3), 032003 (2018). doi: 10.1103/PhysRevAccelBeams.21.032003

[20] M. Liu, Z.H. Mi, W.M. Pan et al., Design of 648 MHz superconducting cavity tuner for China Spallation Neutron Source phase II. High Power Laser Part. Beams 35, 124007 (2023). doi: 10.11884/HPLPB202335.230227

[21] X.Y. Zhang, P. Sha, W.M. Pan et al., The mechanical design, fabrication and tests of dressed 650 MHz 2-cell superconducting cavities for CEPC. Nucl. Instrum. Methods Phys. Res., Sect. A 1031, 166590 (2022). doi: 10.1016/j.nima.2022.166590

[22] X. Li, H. Sun, C.L. Zhang et al., Design of rapid tuning system for a ferrite-loaded cavity. Radiat. Detect. Technol. Methods 5, 324-331 (2021). doi: 10.1007/s41605-

[23] P.P. Gong, Y.B. Zhao, H.T. Hou et al., Tuning control system of a third harmonic superconducting cavity in the Shanghai Synchrotron Radiation Facility. Nucl. Sci. Tech. 30, 157 (2019). doi: 10.1007/s41365-019-0655-4

[24] Y. Zong, J.F. Chen, D. Wang et al., Accelerating gradient improvement in nitrogen-doped superconducting radio-frequency cavities for SHINE. Nucl. Instrum. Methods Phys. Res., Sect. A 1057, 168724 (2023). doi: 10.1016/j.nima.2023.168724

[25] J.R. Delahaye, Phase and amplitude stabilization of beam-loaded superconducting resonators. Proc. LINAC Conf. 1992, 16 (1992).

[26] Z.K. Liu, C. Wang, L.H. Chang et al., Modeling the interaction of a heavily beam loaded SRF cavity with its low-level RF feedback loops. Nucl. Instrum. Methods Phys. Res., Sect. A 894, 57-71 (2018). doi: 10.1016/j.nima.2018.03.046

[27] T. Schilcher, Vector sum control of pulsed accelerating fields in Lorentz force detuned superconducting cavities. PhD Thesis (1998).

[28] R.T. Keshwani, S. Mukhopadhyay, R.D. Gudi et al., Comparative investigations on detuning estimator for experimental RF cavity. IEEE Trans. Instrum. Meas. 72 (2023). doi: 10.1109/TIM.2023.3311075

[29] Z. Gao, Y. He, W. Chang et al., A new microphonics measurement method for superconducting RF cavities. Nucl. Instrum. Methods Phys. Res., Sect. A 767, 212-217 (2014). doi: 10.1016/j.nima.2014.08.030

[30] S.N. Simrock, Lorentz force compensation of pulsed SRF cavities. Proc. Int. LINAC Conf. 2002 (2002).

[31] C.T. Somefun, S.A. Daramola, T.E. Somefun, Advancements and applications of adaptive filters in signal processing. J. Eng. Sci. Appl. 2024, 1259-1272 (2024). doi: 10.18280/jesa.570502

[32] X.F. Huang, Y. Sun, G.W. Wang et al., Measurement of the transfer function for a spoke cavity of C-ADS Injector I. Chin. Phys. C 41(4), 047001 (2017). doi: 10.1088/1674-1137/41/4/047001

[33] A. Neumann, W. Anders, O. Kugeler et al., Analysis and active compensation of microphonics in continuous wave narrowband superconducting cavities. Phys. Rev. ST Accel. Beams 13, 082001 (2010).

[34] A. Bellandi, J. Branlard, A. Eichler et al., Integral resonance control in continuous wave superconducting particle accelerators. IFAC-PapersOnLine 53(2), 361–367 (2020). doi: 10.1016/j.ifacol.2020.12.186

[35] Q. Huang, J. Luo, H. Li et al., Analysis and implementation of adaptive filtered-X LMS algorithm based on reference signal self-extraction. Journal of Vibroengineering 16(5), 2341–2354 (2014).

[36] P. Wang, X. Zhang, L. Xu et al., Adaptive Noise Cancellation Based on Time Delay Estimation for Low Frequency Communication. Appl. Sci.8(5), 734 (2018).

[37] M. Luong, P. Bosland, G. Devanz et al., Analysis of microphonic disturbances and simulation for feedback compensation. Conf. Proc. C.060626, 3167–3169 (2006).

Submission history

A Novel Adaptive Filtering-Based Tuning Loop for High-Q SRF Cavity