## 3 Adaptive Inversion Control
### Design of Adaptive Inversion Controller
Through the mathematical model of PMSM given by Equation (1), we know that  
\[\tau_{L}=n_{p}\phi\dot{i}_{q}-J\dot{\omega} \tag{34}\]  
Bring Equation (34) into (33) and rearrange it to obtain:  
\[\hat{\tau}_{L}=-\gamma_{1}k_{2}J\dot{\omega}+\gamma_{1}\left[\frac{1}{J} \epsilon_{\omega}+k_{2}\big{(}n_{p}\phi\dot{i}_{q}-\hat{\tau}_{L}\big{)}\right] \tag{35}\]  
Integrating both sides of (35) gives:  
\[\hat{\tau}_{L}=-\gamma_{1}k_{2}J\int_{\omega(0)}^{\omega(t)}\dot{\omega}+ \gamma_{1}\int_{0}^{t}\left[\frac{1}{J}e_{\omega}+k_{2}\big{(}n_{p}\phi\dot{i }_{q}-\hat{\tau}_{L}\big{)}\right]dt \tag{36}\]  
Arranged to obtain:  
\[ \begin{split}\hat{\tau}_{L}=-\gamma_{1}k_{2}J\int_{\omega(0)}^{ \omega(t)}\dot{\omega}+\tau_{L}\\ \dot{\tau}_{L0}=\gamma_{1}\left[\frac{1}{J}\epsilon_{\omega}+k_{ 2}\big{(}n_{p}\phi\dot{i}_{q}-\hat{\tau}_{L}\big{)}\right]\end{split}  \tag{37}\]  
Among them, the feedback gain only exists in the adaptive law, which makes the adjustment simpler. The load torque adaptive law is similar to the nonlinear reduced-order disturbance observer, which can realize fast and accurate load disturbance estimation. Substituting Equation (31) into Equation (29), we can obtain the current expression for the q-axis:  
\[i_{qr}=\frac{J}{n_{p}\phi}\left[-k_{1}(\omega-\omega_{d}^{*})+\frac{1}{J} \hat{\tau}_{L}+\dot{\omega}_{d}^{*}\right] \tag{38}\]  
Taking the derivative of both sides gives:  
\[\dot{i}_{qr}=\frac{J}{n_{p}\phi}\left[-k_{1}\left(\frac{1}{J}n_{p}\phi\dot{i} _{q}-\frac{1}{J}\tau_{L}\right)+k_{1}\dot{\omega}_{d}^{*}+\frac{1}{J}\left( \gamma_{1}k_{2}\widetilde{\tau}_{L}-\frac{\gamma_{1}}{J}e_{\omega}\right)+ \ddot{\omega}_{d}^{*}\right] \tag{39}\]  
Next, we need to choose the appropriate voltage so that \(e_{iq}\to 0\). Define the Lyapunov function \(V_{2}\) as:  
\[V_{2}=V_{1}+\frac{1}{2}\epsilon_{iq}^{2} \tag{40}\]According to Equations (1), (29), (33) and (39), we can obtain the derivative of \(V_{2}\) as:  
\[\dot{V}_{2}=-{k_{1}}{e_{\omega}}^{2}-{k_{2}}{\widetilde{\tau}_{L}}^{2}-\frac{1}{n _{p}\phi}({k_{1}}+\gamma_{1}{k_{2}}){e_{i}}_{q} \tag{41}\]  
In the formula, the last term is changed to \(-{k_{3}}{e_{i}}_{q}\), and \({k_{3}}\) is the positive feedback gain. According to Formula (41), we can obtain the vacancy rate \(u_{q}\) as:  
\[u_{q}=L\bigg{[}-{k_{3}}{e_{i}}_{q}-\bigg{(}\frac{n_{p}\phi}{J}+\frac{\gamma_{1 }}{Jn_{p}\phi}\bigg{)}{e_{\omega}}+\bigg{(}\frac{R_{s}}{L_{q}}-{k_{1}}\bigg{)} {i_{q}}+n_{p}\omega{i_{d}}+\frac{n_{p}\phi}{L_{q}}\omega+\frac{k_{1}}{n_{p} \phi}\bigg{(}{\hat{\tau}_{L}}+J\omega_{d}^{*}\bigg{)}+\frac{J}{n_{p}\phi}{ \tilde{\omega}_{d}}\bigg{]} \tag{42}\]  
Bringing Equation (42) into (41), we can obtain:  
\[\dot{V}_{2}=-{k_{1}}{e_{\omega}}^{2}-\bigg{(}\sqrt{\frac{k_{2}}{2}}{\widetilde {\tau}_{L}}+\frac{n}{\sqrt{2k_{2}}}{e_{i}}_{q}\bigg{)}^{2}-\bigg{(}\sqrt{\frac {k_{2}}{2}}{\widetilde{\tau}_{L}}+\frac{m}{\sqrt{2k_{2}}}{e_{i}}_{q}\bigg{)}^{ 2}-\bigg{(}k3-\frac{m^{2}+n^{2}}{2k_{2}}\bigg{)}{e_{i}}_{q}^{2} \tag{43}\]  
where \(m={k_{1}}/{n_{p}\phi}\), \(n={\gamma_{1}}{k_{2}}/{n_{p}\phi}\). When \({k_{3}}\geq\big{(}{m^{2}+n^{2}}\big{)}/{2k_{2}}\), \(\dot{V}_{2}\) is negative definite. Define the d-axis current error \({e_{i}}_{d}\) as:  
\[{e_{i}}_{d}={i_{d}}-{i_{dr}} \tag{44}\]  
where \({i_{dr}}=0\).