# MFC/IMC Control Algorithm for Reduction of Load Torque Disturbance in PMSM Servo Drive Systems
## 4 Theoretical Analysis
### Models of Classical and MFC/IMC Cascade Control System
Upholding the previously adopted convention, \(W_{M\_\omega\_i\_q\_ref}(s)\) and \(W_{M\_\omega\_\tau\_load}(s)\) denote PMSM plant transfer functions obtained as a relation between the signal pairs: \(\omega_{act}(s)\), \(i_{q\_ref}(s)\), and \(\omega_{act}(s)\), \(\tau_{load}(s)\) respectively. The velocity controller \(R_{\omega}(s)\) generates input signal \(i_{q\_ref}(s)\) for current controller in \(q\)-axis \(R_{iq}(s)\) as a difference between the reference \(\omega_{ref}(s)\) and actual \(\omega_{act}(s)\) velocity of the PMSM shaft. Based on the structure presented in Figure 2 the following equation can be derived (11):  
\[\omega_{act\_cas}(s)=\frac{R_{\omega}(s)W_{M\_\omega\_i\_q\_ref}(s)}{R_{ \omega}(s)W_{M\_\omega\_i\_q\_ref}(s)+1}\omega_{ref}(s)+\frac{W_{M\_\omega\_ \tau\_load}(s)}{R_{\omega}(s)W_{M\_\omega\_i\_q\_ref}(s)+1}\tau_{load}(s), \tag{11}\]  
Hence \(S_{z\_cas}(s)\) is the sensitivity function at the plant input of the classical cascade control system:  
\[S_{z\_cas}(s)=\frac{W_{M\_\omega\_\tau\_load}(s)}{R_{\omega}(s)W_{M\_\omega\_ i\_q\_ref}(s)+1} \tag{12}\]  
Implementation of the MFC/IMC algorithm in the velocity control loop of PMSM servo drive system is presented in Figure 3; \(\widehat{W}_{M\_\omega\_i\_q\_z\_ad}(s)\) denotes the PMSM nominal model transfer function obtained from \(\omega_{act}(s)\) to \(i_{q\_ref}(s)\); \(\widehat{\omega}_{act}(s)\) is the actual velocity computed by the PMSM model; \(R_{\Delta}(s)\) is the controller which generates an additional control signal \(i_{q\_add}(s)\) for the current control loop in \(q\)-axis. This additional control signal is based upon the difference between the model's actual velocity \(\widehat{\omega}_{act}(s)\) and actual velocity of the PMSM shaft \(\omega_{act}(s)\). The structure presented in Figure 3 leads to the following equation:  
\[ \begin{split}\omega_{act\_mfcimc}(s)=\frac{R_{\omega}(s)W_{M\_ \omega\_i\_q\_z\_ad}(s)\big{(}R_{\Delta}(s)\widehat{W}_{M\_\omega\_i\_q\_z\_ad}( s)+1\big{)}}{W_{M\_\omega\_i\_q\_z\_ad}(s)\big{(}R_{\Delta}(s)+R_{\Delta}(s)R_{ \Delta}(s)\widehat{W}_{M\_\omega\_i\_q\_z\_ad}(s)\big{)}+1}\omega_{ref}(s)+\\ \frac{W_{M\_\omega\_i\_q\_ref}}{W_{M\_\omega\_i\_q\_z\_ad}(s) \big{(}R_{\Delta}(s)+R_{\omega}(s)+R_{\Delta}(s)R_{\Delta}(s)\widehat{W}_{M \_\omega\_i\_q\_z\_ad}(s)\big{)}+1}\tau_{load}(s)\end{split}  \tag{13}\]  
Figure 3: Velocity control loop in cascade MFC/IMC system. Figure 2: Velocity control loop in classical cascade system. Due to the code generation functionality available in Matlab/Simulink software it was possible to develop a control-measurement application for the servo drive control system. The vendor of industrial servo drive system (Bernecker&Rainer) provides a toolbox (Automation Studio Target for Simulink) which allows for the direct conversion of developed Simulink models into the PLC code. The classical cascade and MFC/IMC cascade velocity control loops were developed in the Matlab/Simulink environment, both of these solutions implemented PI controllers. The current control loop remained unchanged, i.e., the current controller originally provided by the manufacturer was not modified. The reference velocity signal was generated in Automation Studio (PLC programming IDE) and passed to the PLC-code converted Matlab/Simulink model whose task was to calculate the appropriate current values for \(q\)-axis current controller (i.e., \(i_{q}\) signal). The actual velocity signal required in the control loop was acquired directly from the servo drive. Because of the hardware limitations, the simulation and communication process period was set to 400 \(\upmu\)s. The software integration between Automation Studio and Matlab/Simulink was described in details in [15].