## 4 Optimization of Adaptive Control Parameters for Permanent Magnet Synchronous Motors
### Parameter Optimization System
Moreover, it aids in preventing unnecessary energy waste, particularly during frequent starts, stops, and speed transitions, which is essential for enhancing vehicle range. The reduction in motor speed overshoot presents substantial advantages in terms of technical performance. In the context of robotic arm motors, the minimization of speed overshoot allows the robot to achieve designated positions with enhanced accuracy, consequently diminishing deviations resulting from overshoot. Such precision is especially critical during tasks that involve intricate assemblies or complex operations. Furthermore, a smoother speed response facilitates the robot's more sensitive reaction to variations in the external environment, thereby enhancing its responsiveness to commands, particularly during rapid movements and complex tasks. In this paper, the chosen form of constraint is based on the original control parameters, adjusted up and down by twenty percent to adjust the control according to the rules of the permanent magnet synchronous motor control. Using the original parameter settings, we set the parameter ranges as follows: \(K_{\text{i}}\) ranges from 0.04-0.06, \(K_{\text{P}}\) ranges from 4-6, \(K_{1}\) ranges from 40-60, and \(K_{2}\) ranges from 8-12. The peak rotational speed and peak torque of an electric motor are two key indicators reflecting the motor's performance. Their expressions are shown as follows:  
\[\mathbf{T}_{e}=\text{max}\bigg{\{}\frac{3}{2}P\Big{(}\psi_{f}I_{q}+\big{(}\mathbf{L}_{ d}-\mathbf{L}_{q}\big{)}\mathbf{I}_{d}I_{q}\Big{)}\bigg{\}} \tag{38}\]  
\[\omega_{n}=\text{max}\bigg{\{}\frac{\mathbf{V}_{q}-\mathbf{R}_{s}\mathbf{I}_{q}-\psi_{f}}{ \mathbf{L}_{q}\mathbf{I}_{q}}\bigg{\}} \tag{39}\]  
where P is the number of pole pairs of the motor, \(\psi_{f}\) represents the magnetic flux, \(\text{I}_{\text{d}}\) and \(\text{I}_{\text{q}}\) denote the d-axis and q-axis current components, \(\text{L}_{\text{d}}\) and \(\text{L}_{\text{q}}\) represent the d-axis and q-axis inductance components, \(\text{V}_{\text{q}}\) is the q-axis voltage, and \(\text{R}_{\text{s}}\) is the stator resistance. The value function for the peak torque is as follows:  
\[\mathbf{T}_{\text{emax}}=\text{min}\{\mathbf{T}_{ei}i=1,2\ldots\mathbf{Iter}\} \tag{40}\]Here, \(i\) is the iteration count, _Iter_ represents the maximum number of iterations, and T\({}_{\text{ei}}\) denotes the peak torque obtained at each iteration. The value function for the peak rotational speed is as follows:  
\[\omega_{\text{max}}=\min\{\omega_{ni},\mathbf{i}=1,2\dots\mathbf{Iter}\} \tag{41}\]  
Here, \(\omega_{\text{nmax}}\) represents the peak rotational speed obtained at each iteration. The total cost function is shown below:  
\[\mathbf{C}=\alpha\mathbf{T}_{\text{cmax}}+\beta\omega_{\text{nmax}} \tag{42}\]  
where \(\alpha\) and \(\beta\) are weighting factors. This study employs the Non-dominated Sorting Genetic Algorithm II (NSGA-II) and the Multi-objective Particle Swarm Optimization (MOPSO) to optimize the control parameters of the permanent magnet synchronous motor (PMSM) in line with its specific control requirements. Adaptive control parameters are independently derived from both algorithms, and their performance is evaluated to determine the most effective control parameters. NSGA-II is an improved version of the non-dominated genetic algorithm, which aims to find a set of solutions that can optimize multiple objective functions at the same time. The principle of NSGA-II is shown in Figure 5. Compared with traditional optimization algorithms, NSGA-II introduces the concepts of non-dominated ordering and congestion distance, which maintains a more homogeneous distribution of Pareto fronts. Therefore, we chose NSGA-II as the first optimization algorithm to minimize peak torque T\({}_{\text{e}}\) and peak speed \(\omega_{\text{n}}\) of the PMSM. The initial parameters of NSGA-II are defined as fixed values within the optimization algorithm, with their settings being judiciously adjusted to align with the complexity of specific problems.