## 4 ANF Based Active Damping  
### Anf  
As a new active damping scheme, the ANF can suppress the resonance peak without additional sensors. It also has the ability to adjust its own coefficient using adaptive algorithms when the external environment changes. Accordingly, when the magnitude of harmonics and noise changes, the ANF can calculate the optimal filtering parameters in real-time and maintain a good filtering effect, which improves the stability of the system.  
The structure of ANF is shown in Figure 9, where \(x(t)\) represents the input signal, which can be divided into the original fundamental signal and the interference signal. \(s(t)\) is the fundamental signal; \(r(t)\) is the interference signal to be filtered by the ANF; \(r_{s}(t)\) and \(r_{c}(t)\) are the reference signals generated by the controller and have the same frequency as \(r(t)\), and \(A\) is their amplitude. \(\omega_{1}\) and \(\omega_{2}\) represent the accommodative coefficients; \(y(t)\) is the generated anti-resonant signal, and \(e(t)\) stands for the output of the ANF, which is obtained by subtracting the anti-resonant signal from the original signal. LMS is the chosen adaptive algorithm. On the basis of the target of minimizing the mean square error \(e^{2}(t)\), the LMS algorithm can regulate the accommodative coefficient \(\omega_{1}\) and \(\omega_{2}\) according to the error signal \(e(t)\) and the reference input signals \(r_{s}(t)\) and \(r_{c}(t)\). The specific algorithm of LMS can be sorted into the formula  
\[\left\{\begin{aligned} y(k)=\omega_{1}(k)r_{s}(k)+\omega_{2}(k)r_{c} (k)\\ e(k)=x(k)-y(k)\\ \omega_{1}(k{+}1)=\omega_{1}(k)+\mu e(k)r_{s}(k)\\ \omega_{2}(k{+}1)=\omega_{2}(k)+\mu e(k)r_{c}(k)\end{aligned}\right. \tag{27}\]  
where \(\mu\) represents the iterative step length; \(k\) represents the iterative order. Note that there is \(t=k\tau\), where \(\tau\) represents the sampling time.  
Figure 8: Bode diagram of the capacitor current proportional feedback method when \(H_{i}\) varies.  
Figure 7: Control diagram of LC type HPMSM with capacitance current proportional feedback.  
According to (27), the transfer function of the ANF is derived as  
\[\frac{e(s)}{x(s)}=\frac{s^{2}+{\omega_{o}}^{2}}{s^{2}+\frac{\mu A^{2}}{\tau}s{+ \omega_{o}}^{2}}, \tag{28}\]  
where \(\omega_{0}=2\pi f\). Based on (28), set different step sizes and draw the Bode diagram, as shown in Figure 10. Let \(\mu A^{2}/\tau=\omega_{0}/Q\), where \(Q\) represents the quality factor, and then the ANF can be equivalent to a band-stop filter with a center frequency of \(\omega_{0}\). The step size \(\mu\) is an important factor in the filtering capability. As shown in Figure 11, the original signal has a fundamental frequency of 500 Hz with a 4500 Hz harmonic superimposed. When \(\mu=0.01\), the filtered waveform still has significant harmonics, but when \(\mu=0.001\), harmonics are filtered out completely. However, the former takes only 0.05 s to converge, while the latter takes 0.2 s. Therefore, it is necessary to consider the filtering effect as well as the convergence time and choose a suitable step size. Generally, \(\mu\) is not less than 0.01.  
Figure 11: Comparison of filtering effects at different step sizes: (**a**) original signal with harmonics at 4500 Hz; (**b**) \(\mu=0.01\); (**c**) \(\mu=0.001\).  
Figure 9: Structural block diagram of ANF.  
The center frequency of the ANF only depends on the frequency of the reference input signal. As a result, the ANF can change the frequency of the reference signal when the external disturbance signal varies, thus achieving adaptability.