# Optimization of Ship Permanent Magnet Synchronous Motor ADRC Based on Improved QPSO
## 2 Mathematical Model of the Permanent Magnet Synchronous Motor  
The Permanent Magnet Synchronous Motor (PMSM) is widely employed owing to its simple structure, rapid response, and high precision. Based on its construction, PMSMs are categorized into surface-mounted and interior permanent magnet types. This study focuses on the surface-mounted motor as the subject of research. Assuming the damping effect of the permanent magnet and hysteresis loss are negligible, the mathematical model of the PMSM in the d-q reference frame can be expressed as follows [20; 21]  
Stator Flux Linkage Equation:  
\[\left\{\begin{aligned} \psi_{d}&=L_{d}i_{d}+\psi_{f},\\ \psi_{q}&=L_{q}i_{q},\end{aligned}\right. \tag{1}\]Stator Voltage Equation in the \(d\)-\(q\) Reference Frame:  
\[\begin{cases}u_{d}=R_{s}i_{d}+\frac{d\eta_{d}}{dt}-\omega_{e}\psi_{q},\\ u_{q}=R_{s}i_{d}+\frac{d\psi_{q}}{dt}+\omega_{e}\psi_{d},\end{cases} \tag{2}\]  
Electromagnetic Torque Dynamic Equation:  
\[T_{e}=\frac{3}{2}p_{n}i_{q}\Big{[}i_{d}\big{(}L_{d}-L_{q}\big{)}+\psi_{f}\Big{]} \tag{3}\]  
where \(u_{d}\) and \(u_{q}\) represent the \(d\)-\(q\) axis components of the stator voltage; \(i_{d}\) and \(i_{q}\) are the \(d\)-\(q\) axis components of the stator current; \(R_{s}\) is the stator resistance; \(\psi_{q}\) and \(\psi_{d}\) are the \(d\)-\(q\) axis components of the stator flux linkage; \(\omega_{e}\) denotes the electrical angular velocity; \(L_{d}\) and \(L_{q}\) are the \(d\)-\(q\) axis inductance components; and \(\psi_{f}\) represents the permanent magnet flux linkage. For surface-mounted three-phase PMSMs, the stator inductance satisfies the condition \(L_{d}=L_{q}=L_{s}\), where \(L_{s}\) is the stator inductance.  
Equations of Motion:  
\[\frac{\int}{p_{n}}\frac{d\omega_{e}}{dt}=T_{e}-F\frac{\omega_{e}}{p_{n}}-T_{L} \tag{4}\]  
where \(T_{L}\) denotes the load torque of the motor; \(J\) is the motor's moment of inertia; and \(F\) represents the damping coefficient of the motor. When the vector control strategy with \(i_{d}^{*}=0\) is applied, \(i_{d}^{*}\) and \(i_{q}^{*}\) represents the reference current in the \(d\)-\(q\) axis directions.the control system structure of the permanent magnet synchronous motor is illustrated in Figure 1.  
As shown in Figure 1, the main components of the system include the Proportional-Integral (PI) controller, Park transform, Clarke transform, Space Vector Pulse Width Modulation (SVPWM), inverter, and speed detection module. The Park and Clarke transforms are used to convert the three-phase stationary current signals into the rotating frame, allowing the current signals to be represented in the \(d\)-\(q\) axis. This simplifies and enhances the precision of motor control. The SVPWM, employing space vector pulse width modulation, converts the control signals into the three-phase inverter's control signals, precisely regulating the motor's voltage.  
The key parameters of the permanent magnet synchronous motor are listed in Table 1.  
\begin{table}
\begin{tabular}{c c c} \hline
**Parameter** & **Unit** & **Value** \\ \hline Inductance & R/\(\Omega\) & 2.875 \\ Resistance & L/H & 0.0085 \\ Rotational Inertia & J/ (kg\(\cdot\)m\({}^{2}\)) & 0.001 \\ Pole Pair Number & P\({}_{n}\) & 4 \\ Magnetic Flux & \(\psi_{f}\)/Wb & 0.175 \\ \hline \end{tabular}
\end{table}
Table 1: Main parameters of permanent magnet synchronous motor.  
Figure 1: Structure of Permanent Magnet Synchronous Motor Control System.