# Research and Design of the RF Cavity for an 11 MeV Superconducting Cyclotron
## 5 Calculation and Verification of the RF Cavity for 11 MeV Superconducting Cyclotrons
### Analysis of the RF Cavity Based on Multiple Linear Regression Models  
The 11 MeV superconducting cyclotron adopts a modular design, and according to the foregoing, it is known that the only parameters available for extensive changes after the preliminary design is completed are the structural parameters of the round coaxial resonant cavity, including the inner conductor radius \(r_{\rm ic}\), the outer conductor inner radius \(r_{\rm oc}\), and the cavity length \(L\). The effect of each of these three parameters on the resonant frequency of the RF cavity is shown in Figure 10. In order to determine the relationship between these three structural parameters and the cavity resonance frequency, and to obtain the importance of the influence of these three variables on the cavity resonance frequency, a multiple linear regression model can be introduced. In multiple regression, the main goal is to relate the dependent variable \(y\) to more than one independent or predictor variable. Multiple linear regression analysis provides a good fit and prediction of the relationship between multiple sets of independent variables and the corresponding dependent variables. It also reduces the possibility of overfitting that occurs in simple linear regression analysis. The general multiple linear regression model equation is [26]:  
\[\hat{Y}=\hat{\beta}_{0}+\hat{\beta}_{1}X_{1}+\hat{\beta}_{2}X_{2}+\cdots\hat{ \beta}_{k}X_{k}+\varepsilon \tag{13}\]  
where \(\hat{Y}\) is the estimated value of observation \(Y\); \(\hat{\beta}_{1}\), \(\hat{\beta}_{2}\),... \(\hat{\beta}_{k}\) denote \(k\) regression coefficients; \(X_{1}\), \(X_{2}\),..., \(X_{k}\) represent \(k\) explanatory variables; and \(\varepsilon\) is a random error term that explains the variation in the observation \(Y\) caused by the random variable, where \(E(\varepsilon)=0\) and \(V(\varepsilon)=\sigma^{2}\) and \(\varepsilon\)-N(0, \(\sigma^{2}\)). In this paper, there are three main structural parameter variables (\(k=3\)), where \(Y\) is the RF cavity resonance frequency \(f\), \(X_{1}\) corresponds to \(r_{\rm ic}\), \(X_{2}\) corresponds to \(r_{\rm oc}\), and \(X_{3}\) corresponds to \(L\). In order to assess the effectiveness of the regression model in predicting the observation \(Y\), the Root Mean Square Error (RMSE) and the Goodness of Fit, R\({}^{2}\), were chosen to test and assess the effectiveness and accuracy of the model. Where RMSE is used to assess the deviation between actual and predicted values and R\({}^{2}\) is used to measure the degree of fit of the regression model, the respective expressions are [27]:  
\[RMSE=\sqrt{\frac{1}{m}{\sum_{i=1}^{m}(y_{i}-\hat{y}_{i})^{2}}} \tag{14}\]  
\[R^{2}=1-\frac{\sum_{i=1}^{m}(y_{i}-\hat{y}_{i})^{2}}{\sum_{i=1}^{m}(y_{i}-\overline {y}_{i})^{2}} \tag{15}\]  
where \(y_{i}\) is the true value, \(\hat{y}_{i}\) is the predicted value, and \(\overline{y}_{i}\) is the sample mean. Table 2 shows the results after fitting the data obtained by numerical calculation and equivalent circuit calculation using the multiple linear regression analysis method, including RMSE, R\({}^{2}\), and regression equations, where the smaller the \(RMSE\) and the closer the R\({}^{2}\) is to 1, the better the model's predictive accuracy. The regression equation shows that \(r_{\rm ic}\) and \(L\) have a significant impact on the resonance frequency. Conversely, \(r_{\rm oc}\)'s effect is less pronounced. If \(r_{\rm ic}\) increases significantly, widening the magnet yoke opening becomes necessary. Thus, changes to \(r_{\rm ic}\) are kept within the rectangular cavity's height limits. By adjusting \(r_{\rm ic}\) and \(L\), the resonant frequency of the RF cavity can vary widely. Altering \(r_{\rm oc}\) leads to a narrower frequency adjustment. Therefore, in further cavity design and optimization, the cavity resonant frequency can be roughly adjusted by adjusting the length of the round coaxial cavity \(L\).