# MFC/IMC Control Algorithm for Reduction of Load Torque Disturbance in PMSM Servo Drive Systems
## 3 PMSM Model Linearization  
Examining the PMSM dynamical model, it is seen that there are several terms that have nonlinear expressions: bilinear functions \(\omega(t)i_{q}(t),\omega(t)i_{d}(t),i_{d}(t)i_{q}(t)\), as well as _signum_ and _absolute value_ functions. It is necessary to obtain linear approximations of these terms in order to conduct the linearization process.  
The bilinear terms can be approximated at the operating points \((\omega_{0},i_{d0},i_{q0})\) using first-order Taylor series expansion:  
\[\begin{array}{l}\omega(t)i_{q}(t)\approx\omega_{0}i_{q0}+\omega_{0}\big{(} i_{q}(t)-i_{q0}\big{)}+i_{q0}(\omega(t)-\omega_{0})\\ \omega(t)i_{d}(t)\approx\omega_{0}i_{d0}+\omega_{0}\big{(}i_{d}(t)-i_{d0})+i_ {d0}(\omega(t)-\omega_{0})\\ i_{d}(t)i_{q}(t)\approx i_{d0}i_{q0}+i_{d0}\big{(}i_{q}(t)-i_{q0}\big{)}+i_ {q0}(i_{d}(t)-i_{d0})\end{array} \tag{2}\]  
The _signum_ and _absolute value_ functions can be approximated using:  
\[\text{sgn}(x)\approx\frac{1-e^{-\alpha x}}{1+e^{-\alpha x}};x\in\langle-1;1\rangle \tag{3}\]  
\[|x|\approx x\frac{1-e^{-\alpha x}}{1+e^{-\alpha x}};x\in\langle-10;10\rangle \tag{4}\]  
where \(\alpha\) is an empirically chosen parameter.  
By substituting approximations Equation (2)-(4) into (1), a linear state-space model of PMSM can be derived:  
\[\begin{array}{l}\frac{d\mathbf{x}(t)}{dt}=\mathbf{A}\mathbf{x}(t)+\mathbf{ B}\mathbf{u}(t)+\mathbf{\eta_{0}}\\ \mathbf{y}(t)=\mathbf{C}\mathbf{x}(t)\end{array} \tag{5}\]  
where vectors \(\mathbf{x}(t)=\big{[}i_{d\_act}(t)\), \(i_{q\_act}(t)\), \(\omega_{act}(t)\big{]}^{T}\), \(\mathbf{u}(t)=\big{[}u_{d}(t)\), \(u_{q}(t)\), \(\tau_{load}(t)\big{]}^{T}\) and \(\mathbf{y}(t)=\mathbf{x}(t)\) matrices \(\mathbf{A}\), \(\mathbf{B}\), \(\mathbf{C}\) are defined as Equation (6):\[\mathbf{A} =\left[\begin{array}{ccc}-\frac{R_{i}}{L_{d}}&\frac{L_{d}p}{L_{d}} \omega_{0}&\frac{L_{d}p}{L_{d}}i_{q0}\\ -\frac{L_{d}p}{L_{d}}\omega_{0}&-\frac{R_{i}}{L_{d}}&-\frac{L_{d}p}{L_{d}}i_{q0} -\frac{\Psi_{f}p}{L_{q}}\\ \frac{3p(L_{d}-L_{d})}{2}i_{q0}&\frac{3p(\psi_{f}+(L_{d}-L_{d})i_{q0})}{2}- \frac{\pi T_{f}}{I}\\ \end{array}\right];\quad\mathbf{B}=\left[\begin{array}{ccc}\frac{1}{L_{d}}&0 &0\\ 0&\frac{1}{L_{d}}&0\\ 0&0&-\frac{1}{I}\\ \end{array}\right] \tag{6}\] \[\mathbf{C} =\left[\begin{array}{ccc}1&0&0\\ 0&1&0\\ 0&0&1\end{array}\right];\quad\mathbf{n}_{0}=\left[\begin{array}{ccc}\frac{ 1}{L_{d}}&0&0\\ 0&\frac{1}{L_{d}}&0\\ 0&0&-\frac{1}{I}\\ \end{array}\right]\] \[\ast T_{F} =\frac{\left[\begin{array}{ccc}T_{p}-\frac{T_{p}\,act-\omega_{ 0}}{\epsilon^{-4\omega_{0}}+1}-\frac{(T_{c}-T_{s})\omega^{-\omega_{0}-\omega_{ 0}}+1}{\epsilon^{-4\omega_{0}}+1}\,\epsilon^{-\omega_{0}}}-\frac{T_{act}- \omega_{0}\left(\epsilon^{-\omega_{0}}-1\right)}{\left(\epsilon^{-4\omega_{0} }+1\right)^{2}}+\\ \left(\frac{3\omega_{0}\epsilon^{-4\omega_{0}}-1}{\epsilon^{-4\omega_{0}}+1} \left(T_{c}-T_{s}\right)(e^{-\omega_{0}}-1)\left(\frac{3\left(\epsilon^{- \omega_{0}}-1\right)}{\omega_{0}\epsilon^{-4\omega_{0}}+1}-\frac{3\alpha \omega_{0}\epsilon^{-4\omega_{0}}+1}{\left(\epsilon^{-4\omega_{0}}-1\right)^{2 }}\right)\right)\\ \frac{(T_{c}-T_{s})\omega^{-4\omega_{0}-1}}{\left(\epsilon^{-4\omega_{0}}+1 \right)^{2}}\end{array}\right]}+\]  
where \(\mathbf{\eta}_{0}\) is a constant vector containing the steady-state parameters. This is a special case as the vector of outputs \(\mathbf{y}(t)\) is identical to the state vector \(\mathbf{x}(t)\), thus the underlying output matrix \(\mathbf{C}\) is an identity matrix. Normally, the state and output vectors of a full model would also include the angular position; the latter vector would also incorporate the torque generated on the motor shaft. Thus, they would be respectively described as \(\mathbf{x}(t)=\left[i_{d\_act}(t),i_{q\_act}(t),\varphi_{act}(t),\omega_{act}( t)\right]^{T}\) and \(\mathbf{y}(t)=\left[i_{d\_act}(t),i_{q\_act}(t),\varphi_{act}(t),\omega_{act}( t),\tau_{act}(t)\right]^{T}\).