## 2 SMO-Based PMSM Simulation Modeling
### Setting Up the PI Controller with Parameters  
To facilitate parameter tuning, the motion equation of the PMSM can be reformulated as follows:  
\[J\frac{d\omega_{m}}{dt}=T_{e}-T_{L}-\xi\omega_{m} \tag{6}\]  
where \(\omega_{m}\) denotes the motor's mechanical angular velocity; \(J\) is the rotational inertia; \(\xi\) is the damping coefficient; and \(T_{L}\) is the load torque. According to the \"active damping\", the parameters of the speed loop PI controller are designed, and active damping is defined as:  
\[i_{q}=i^{\prime}{}_{q}-\xi_{a}\omega_{m} \tag{7}\]  
Assuming the motor starts without any load, we can derive Equations (6) and (7) and combine them with Equation (3) due to the implementation of the control method \(i_{d}=0\):  
\[\frac{d\omega_{m}}{dt}=\frac{1.5p_{n}\varphi_{f}}{J}i^{\prime}{}_{q}-\frac{1.5 p_{n}\varphi_{f}}{J}\xi_{a}\omega_{m}-\frac{\xi}{J}\omega_{m} \tag{8}\]  
Figure 1: Block diagram of motor control structure based on SMO. Shifting the poles of Equation (6) is necessary in order to achieve the desired closed-loop bandwidth:  
\[\omega_{m}(s)=\frac{1.5p_{n}\varphi_{f}}{J(s+\beta)}i^{\prime}_{q}(s) \tag{9}\]  
By applying the Rasch transform to Equation (8) and contrasting the results with Equation (9), one can determine the active damping coefficient \(\xi_{a}\):  
\[\xi_{a}=\frac{J\beta-\xi}{1.5p_{n}\varphi_{f}} \tag{10}\]  
The velocity loop controller in this paper is a conventional PI regulator, and its expression is given as follows:  
\[i_{q}{}^{*}=(K_{pw}+\frac{K_{iw}}{s})(\omega_{m}{}^{*}-\omega_{m})-\xi_{a} \omega_{m} \tag{11}\]  
So far, the relevant control parameter \(K_{pw},K_{iw}\) can be adjusted according to Equation (12):  
\[\left\{ \begin{array}{l}K_{pw}=\frac{J\beta}{15p_{n}\varphi_{f}}\\ K_{iw}=\beta K_{pw}\end{array} \right. \tag{12}\]  
After conducting experimental debugging and replacing the motor parameters, it was found that using the simplest deviation PI adjustment can achieve the desired outcome, where \(\beta\) takes a value of 500, \(\zeta_{a}\) takes a value of 0, \(K_{pw}=0.004\), and \(K_{iw}=2\). After the [PERSON] and [PERSON] transformations, the current equation of PMSM can be expressed as follows:  
\[\left\{ \begin{array}{l}\frac{d{i_{d}}}{dt}=\frac{1}{L_{d}}(-Ri_{d}+L_{q} \omega_{c}i_{q}+u_{d})\\ \frac{d{i_{q}}}{dt}=-\frac{1}{L_{d}}[Ri_{d}+\omega_{c}(L_{d}i_{d}+\varphi_{f} )-u_{q}]\end{array} \right. \tag{13}\]  
However, it is clear from Equation (13) that the cross-coupled electromotive force generated by the stator current \(i_{d},i_{q}\) in the d- and q-axes, respectively, must be removed:  
\[\left\{ \begin{array}{l}u_{d0}=u_{d}+\omega_{c}L_{q}i_{q}=Ri_{d}+L_{d}\frac{ d{i_{d}}}{dt}\\ u_{q0}=u_{q}-\omega_{c}(L_{d}i_{d}+\varphi_{f})=Ri_{q}+L_{q}\frac{d{i_{q}}}{dt} \end{array} \right. \tag{14}\]  
where \(u_{d0},u_{q0}\) represents the voltage applied to the magnetic flux of the PMSM rotor after decoupling the current. We then performed the Raschel transformation of Equation (14):  
\[I(s)=G(s)U(s) \tag{15}\]  
Among them: \(I(s)=\left[ \begin{array}{c}i_{d}(s)\\ i_{q}(s)\end{array} \right]\), \(G(s)=\left[ \begin{array}{cc}R+sL_{d}&0\\ 0&R+sL_{q}\end{array} \right]^{-1}\), \(U(s)=\left[ \begin{array}{c}u_{d0}(s)\\ u_{q0}(s)\end{array} \right]\). In this paper, a conventional PI regulator is used in conjunction with a feed-forward decoupling control strategy to obtain the \(d\)-\(q\) axis voltage:  
\[\left\{ \begin{array}{l}u_{d}^{*}=(K_{pd}+\frac{K_{id}}{s})(i_{d}^{*}-i_{d}) -\omega_{e}L_{q}i_{q}\\ u_{q}^{*}=(K_{pq}+\frac{K_{iq}}{s})(i_{q}^{*}-i_{q})-\omega_{e}(L_{d}i_{d}+ \varphi_{f})\end{array} \right. \tag{16}\]  
where \(K_{pd},K_{pq}\) and \(K_{id},K_{iq}\) are the PI controller's proportional and integral gains, respectively. Due to the advantages of a single parameter and convenient adjustment, the IMC is chosen to replace the feedforward decoupling control strategy for parameter tuning design.