## 4 Optimization of Tunable Parameters with HWOA
### Hybrid Wolf Optimization Algorithm  
With the development of the hybrid optimization algorithm, the HWOA combining GWOA and COA is utilized to deal with complex optimization problems. It can be seen that the advantages and drawbacks of the two algorithms compensate for each other. To make up for their respective shortcomings, GWOA and COA are fused together to obtain an HWOA with superior performance and high efficiency. The flow chart of HWOA is shown in Figure 5.  
The selection of two optimization algorithms depends on the definition of probability \(P\). Due to the faster convergence speed of GWOA and the strong ability for the local exploration of COA, GWOA, and COA are utilized more frequently in the early part and latter part of iterations, respectively. Hence, their advantages can be fully exploited throughout the entire process of iterative optimization, acquiring better comprehensive performance of optimization algorithm. The \(P\) can be designed according to different application requirements, which are set as follows:  
\[P=\begin{cases}0.55,\ T<iteration_{\text{max}}/2\\ 0.45,\ T>iteration_{\text{max}}/2\end{cases} \tag{30}\]  
Considering the computation time and effect of optimization simultaneously, the parameters related to optimization, such as \(N_{p}\) and \(N_{c}\), are both set as 10. The range of tunable parameters of the designed controller is listed in Table 1, which has been discussed based on the stability of the controller. The optimization objectives mainly include the dynamic performance of speed and torque ripple in this paper. Thus, the objective function is described as follows:  
\[F=\sum_{n=0}^{N}\left[(|\Delta e_{\omega}(n)|+|\Delta e_{t}(n)|)nT_{s}\right] \tag{31}\]  
where \(\Delta e_{\omega}(n)=\omega^{*}(n)-\omega(n)\); \(\Delta e_{t}(n)={T_{e}}^{*}(n)-{T_{e}}(n)\); \(n\), \(T_{s}\), \(\Delta e_{\omega}\), and \(\Delta e_{t}\) are the sampling number, period, angular speed error, and torque error, respectively.  
Figure 6 shows the optimization evolution of HWOA, and it can be seen that the fitness value decreases gradually with the increase in iteration numbers. The best fitness values of HWOA are 3.1 \(\times\) 10\({}^{6}\) and 2.9 \(\times\) 10\({}^{6}\) under 75 iterations for the PI and proposed control scheme. The fitness value changes greatly before the number of iterations reaches 30, and change comes slowly after 30 iterations. The convergence of PI is faster due to fewer tunable parameters.  
Figure 5: Flow chart of HWOA.  
To prove the superiority of the proposed scheme regarding speed dynamic response, torque ripple reduction and anti-disturbance ability, speed controllers with PI and conventional SMC are selected for comparison. The HWOA is employed to adjust all of the tunable parameters of the three control methods for equitable execution. After simulation optimization, the optimal two parameters of PI are 0.021 and 0.54, respectively. As for proposed TSMC, \(\lambda\), \(\eta\), \(\beta\), \(\mu\), \(\alpha\), \(m\), and \(n\) are 42.6, 35.7, 3, 51, 0.2, 13, and 15, respectively. Moreover, the values of switching gain \(\varepsilon\) and linear gain \(k\) in SMC are consistent with those of \(\lambda\) and \(\eta\) for comparability. The adjustable parameters optimized by the simulation are applied in the experiments.