## 5 Implementation of the Proposed Control Algorithm
### Parameter Settings for PI  
After the SAKF is properly configured, a rotational speed of high quality can be estimated, and the torque disturbance can be effectively compensated. Therefore, the dynamics of the OES with the SAKFis close to the ideal linear model (4). In this case, the tuning steps of \(K_{P}\) and \(K_{I}\) can be based on the linear model (4).  
As the forward transfer function \(G_{\rm o}(s)=G_{\rm uv}(s)C_{\rm\gamma}(s)\), where \(C_{\rm\gamma}(s)=\frac{K_{\rm P}s+K_{I}}{s}\) and \(G_{\rm uv}(s)=\frac{K}{s+p}\), so  
\[G_{\rm o}(s)=\frac{K(K_{\rm P}s+K_{I})}{s(s+p)}. \tag{20}\]  
Then, let \(\left|G_{\rm o}({\rm j}\omega)\right|\)\(\approx 1\), so one can have  
\[{K_{\rm P}}^{2}+\left(\frac{K_{\rm I}}{\omega_{\rm c}}\right)^{2}=\left(\frac{ p^{2}+{\omega_{\rm c}}^{2}}{K}\right)^{2}, \tag{21}\]  
and the open-loop phase angle can be simultaneously obtained as  
\[\arg(G_{\rm o}({\rm j}\omega_{\rm c}))=\arctan\left(\frac{K_{\rm P}}{K_{\rm I} }\omega_{\rm c}\right)-\arctan\left(-\frac{p}{\omega_{\rm c}}\right). \tag{22}\]  
Thus the phase margin  
\[\theta_{p}=\pi+\arg(G_{\rm o}(j\omega_{\rm c}))\)\(=\pi+\arctan\left(\frac{K_{\rm P}}{K_{\rm I}}\omega_{\rm c}\right)+\arctan \left(\frac{p}{\omega_{\rm c}}\right). \tag{23}\]  
If \(\lambda=\lambda(\theta_{p})=\left|\frac{1}{\omega_{\rm c}}\tan\left(\theta_{ p}-\pi-\arctan(\frac{p}{\omega_{\rm c}})\right)\right|\) and \(\omega_{\rm c}=2\pi f_{\rm c}\), then the relationship between \(K_{\rm P}\), \(K_{\rm I}\), \(\omega_{\rm c}\) and \(\theta_{p}\) can be obtained according to (20) and (22) as \[\left\{\begin{array}{c}K_{\rm P}=\frac{\lambda\omega_{\rm c}}{K}\sqrt{\frac {p^{2}+\omega_{\rm c}^{2}}{1+\lambda^{2}\omega_{\rm c}^{2}}}\\ K_{\rm I}=\frac{\omega_{\rm c}}{K}\sqrt{\frac{p^{2}+\omega_{\rm c}^{2}}{1+ \lambda^{2}\omega_{\rm c}^{2}}}\end{array}\right..\] (24)  
Denote the resonant frequency of the OES as \(f_{\rm R}\), and the damping coefficient at the resonant frequency as \(\xi_{\rm R}\), then the closed-loop bandwidth \(f_{\rm B}\leq 2f_{\rm R}\xi_{\rm R}\)[16]. As \(\xi_{\rm R}\) ranges between 0.1 to 0.35, it is reasonable to set \(\xi_{\rm R}=0.25\), and therefore:  
\[f_{\rm B}\leq 0.5f_{\rm R} \tag{25}\]  
Considering that there is a relationship between the closed-loop bandwidth \(f_{\rm B}\) and the open-loop cut-off frequency \(f_{\rm C}\) as:  
\[f_{\rm B}=2f_{\rm C}. \tag{26}\]  
Then a relationship between \(f_{\rm C}\) and \(f_{\rm R}\) can be obtained as:  
\[f_{\rm C}\leq 0.25f_{\rm R}. \tag{27}\]  
Here, let \(f_{\rm C}=0.25f_{\rm R}\), then the relationship between \(K_{\rm P}\), \(K_{\rm I}\), and \(f_{\rm R}\) can be obtained by Equation (24) as:  
\[\left\{\begin{array}{c}K_{\rm P}=\frac{\lambda\pi f_{\rm B}}{2K}\sqrt{\frac {4p^{2}+\pi^{2}f_{\rm R}^{2}}{4+\lambda^{2}\pi^{2}f_{\rm R}^{2}}}\\ K_{\rm I}=\frac{\pi f_{\rm B}}{2K}\sqrt{\frac{4p^{2}+\pi^{2}f_{\rm R}^{2}}{4+ \lambda^{2}\pi^{2}f_{\rm R}^{2}}}\end{array}\right.. \tag{28}\]  
Therefore, after determining the resonance frequency \(f_{\rm R}\) and the phase margin \(\theta_{p}\) of the OES, the satisfactory PI controller parameters can be obtained according to Equation (28).  
According to Equations (20) and (28), the open-loop transfer function of the system, \(G_{\rm o}(s)\), can be derived as:  
\[G_{\rm o}(s)=\frac{\lambda\pi f_{\rm R}}{2}\sqrt{\frac{4p^{2}+\pi^{2}{f_{\rm R}} ^{2}}{4+\lambda^{2}\pi^{2}{f_{\rm R}}^{2}}}\cdot\frac{1}{s({\rm s}+{\rm p})} \cdot({\rm s}+\frac{1}{\lambda}). \tag{29}\]  
Thus the pole of \(G_{\rm o}(s)\) is \(-p\). As \(p=\frac{B}{7}\in(0,+\infty)\), so the pole of \(G_{\rm o}(s)\) keeps staying in the left half plane of the zero-pole diagram. Meanwhile, as a feedforward controller, the SAKF module does not play a role in the system stability. So the system remains stable.