# Optimization of Ship Permanent Magnet Synchronous Motor ADRC Based on Improved QPSO
## 5 Simulation Experiments and Results Comparison  
In an active disturbance rejection controller (ADRC), the choice of parameters has a significant impact on the control performance. The core components of the ADRC controller include the state observer (\(ESO\)) and the nonlinear error feedback component. This paper improves the performance of the controller by optimizing the following 16 key parameters: \(r,h,\beta_{1},\beta_{2},\beta_{3},\alpha_{ESO1},\alpha_{ESO2},\delta_{ESO1}, \delta_{ESO2},b_{0},\beta_{nlspf1},\beta_{nlspf2},\alpha_{1},\alpha_{2},\delta _{1},\delta_{2}\). Among these, \(r\) and \(h\) are used to adjust the response speeds of high- and low-frequency signals in the \(ESO\), thereby improving the system's disturbance rejection performance. \(\beta_{1}\), \(\beta_{2}\) and \(\beta_{3}\) determine the gains of the various components in the \(ESO\), which influence the accuracy of the motor state estimation. \(\alpha_{ESO1}\) and \(\alpha_{ESO2}\) adjust the filtering performance of the nonlinear part of the \(ESO\), affecting the system's ability to handle nonlinear disturbances. \(\delta_{ESO1}\) and \(\delta_{ESO2}\) are nonlinear tuning terms within the \(ESO\) that enhance the accuracy of state estimation, especially under complex disturbance conditions. \(b_{0}\), \(\beta_{nlspf1}\) and \(\beta_{nlspf2}\) primarily influence the nonlinear error feedback component of the ADRC, affecting the system's adaptability to the motor's nonlinear characteristics. \(\alpha_{1}\), \(\alpha_{2}\), \(\delta_{1}\) and \(\delta_{2}\) are the gains in the feedback loop of the controller, which primarily adjust the motor's speed and position response characteristics, thereby optimizing the system's dynamic performance. Algorithm 1 displays the pseudocode of the QPSO algorithm. In verifying the performance of the QPSO optimization algorithm in the active disturbance rejection controller (ADRC) for permanent magnet synchronous motors (PMSM), the simulation platform used is Matlab/Simulink (R2023b). The performance of four different control strategies, PSO-ADRC, Improved Particle Swarm Optimization (IPSO-ADRC) [27], Improved Chicken Flock Optimisation-ADRC (ICFO-ADRC) [28], and QPSO-ADRC, is compared under the same PMSM model. The IPSO algorithm enhances particle distribution in the search space by incorporating chaotic initialization, particularly logistic chaos mapping, into the traditional PSO algorithm. To prevent particles from becoming trapped in local optima, IPSO also integrates crossover and mutation operations from genetic algorithms. The ICFO algorithm is inspired by the foraging behavior of chicken flocks in nature, simulating the interactions between chickens while searching for food. Its objective is to find the optimal solution by mimicking the cooperation and competition relationships among individuals in a chicken flock. In this simulation, all four algorithms are run for 20 iterations, with the running time including both the model execution time and the algorithm execution time. The comparison of total running times is shown in the bar chart in Figure 11. The running time of the QPSO algorithm is reduced by 44.07% compared to the PSO algorithm, 15.7% compared to the IPSO algorithm, and 23.7% compared to the ICFO algorithm. Based on the time comparison, QPSO demonstrates a clear advantage in ADRC parameter optimization. **Input**: Population size (\(N\)), Dimension (\(d\)), Cognitive constants (\(c1,c2\)), Inertia weight (\(w\)),Crossover probability (\(pc\)), Mutation probability (\(pm\)), Quantum behavior constants (\(\alpha\), \(\beta\)),  
Gaussian distribution parameters, Cauchy distribution parameters. **Output**: The best solution, _gbest_(\(t\))  
1: Initialize particles and positions randomly using quantum behavior model. - Each particle represents a potential solution in the search space. - Assign initial positions and velocities to each particle.