## 4 ANF Based Active Damping
### Design of ANF with Frequency Adaption  
The control system structure is shown in Figure 12. The FOC control method is adopted with a double closed-loop structure of speed and current, and the \(i_{d}=0\) control mode is used. The PI controllers are used for both loops. The parameters of the PI controller should be chosen carefully because they have a significant impact on the performance of the control system. The design of traditional double closed-loop PI controllers has been studied in [32; 33]. For the speed loop PI controller, the parameter design is as follows:  
\[\left\{ \begin{aligned} K_{p\omega}=\frac{\beta I}{1.5\mathrm{P_{n} }\psi_{f}}\,,\\ K_{i\omega}=\beta K_{p\omega}\end{aligned} \right. \tag{29}\]  
where \(\beta\) is the bandwidth of the speed loop; \(J\) is the rotational inertia; \(\mathrm{P_{n}}\) is the pole pairs; and \(K_{p\omega}\), \(K_{i\omega}\), represent the proportional link and integration link coefficient, respectively. For the current loop PI controller, there are:  
\[\left\{ \begin{aligned} K_{pd}=\alpha L_{d}\\ K_{id}=\alpha R\\ K_{pq}=\alpha L_{q}\\ K_{iq}=\alpha R\end{aligned} \right. \tag{30}\]  
where \(\alpha\) is the bandwidth of the current loop; \(K_{pd}\), \(K_{id}\) represent the \(d\)-axis proportional link and integration link coefficient, respectively, and \(K_{pq}\), \(K_{iq}\) represent the \(q\)-axis proportional link and integration link coefficient, respectively. For optimal results, the parameters can be fine-tuned based on the calculated results. In Figure 12, a three-phase LC filter is connected in series at the output end of the inverter to suppress the high-frequency harmonics, and the three-phase capacitor adopts the star connection. To counteract the resonance peaks introduced by the LC filter, it is necessary to compensate for the voltage reference signal \(u_{dqrf}\) given by the current loop. According to the characteristics of the ANF, the specific harmonic components of the current error signal \(i_{dq}\) can be extracted. Therefore, the \(d\)-\(q\) axis ANF is set after the current loop, and its output \(u_{dqcom}\) is used as voltage compensation signals so that the resonant peak can be eliminated. Figure 12: Structure of HPMSM harmonic suppression control system based on LC filter and ANF. The internal structure of \(q\)-axis ANF is illustrated in Figure 13, and the \(d\)-axis one is similar. In the stable state, \(y(t)\) represents the harmonic component of \(\tilde{i}_{dq}(t)\) at the resonant frequency, generating voltage compensation signal \(u_{qcom}\) after a PI controller. The transfer function of the ANF can be written as  
\[\frac{y(s)}{x(s)}=\frac{\frac{\mu A^{2}}{\tau}s}{s^{2}+\frac{\mu A^{2}}{\tau}s +\omega_{o}{}^{2}}. \tag{31}\]  
The first step in setting up the notch filter is to determine the resonant frequency. From (23), it is easy to calculate the resonant frequency of the control system in the three-phase coordinate system. However, the input signals of proposed ANF are the currents in the \(d\)-\(q\) coordinate system, and the resonant frequency will be changed by the coordinate system transformation. In the design of HPMSM, the star connection method is generally used in the three-phase winding. According to the characteristics of three-phase symmetry and half-wave symmetry, even harmonics and odd harmonics with an integer multiple of three do not exist in the HPMSM. Therefore, the three-phase current considering harmonics can be written as  
\[\left\{