## 4 Description of Search Algorithms
### Overview of Moth-Flame Optimization Algorithm
The velocity reference trajectory planned for the motor operation is the same as the previous cases. The simulation results of the optimized PI controllers for speed tracking under nominal parameters and at chaotic load torque pattern are shown in Figure 8. The tracking error and the performance indices for PI controller tuned with six heuristic algorithms are shown in Figure 9 and Table 9 respectively. The JISE (0.00283), JIAE (0.05939), and the steady state error (0.00519) of MOD-FPA are lower than MOA, WOA, FPA, DA, and CSA algorithms as shown in Table 9. Table 9 shows clearly that the performance of the MOD-FPA is least affected by the random load torque variations as compared to MOA, WOA, FPA, DA, and CSA algorithms. It can be inferred that the PI controllers optimized by MFA, WOA, FPA, DF, CSA, and MOD-FPA exhibit sufficient robustness despite different operating conditions. ### Sensitivity Study

The sensitivity analysis is performed to determine, quantify, and analyze the transient response and performance of the PMSM when the machine is subjected under parameter uncertainty and external load disturbances. Some internal parameters (electrical and mechanical) of PMSM are changed in the range of +300% and \(-\)50% from the nominal parameters. The external load torque increases its initial value from 0 to 2 Nm, which represents its full load at t = 0.075 s; this value is maintained until t = 0.14 s, where it reaches a value of 0 Nm; finally, it increases its value from 0 to 2 Nm at t = 0.325 s; this value is maintained until t = 0.45 s. To investigate the sensitivity analysis of the implemented PI controllers, the following four cases are considered. #### 5.2.1 Case 1, Load Torque Is Varied from 0 to 2 Nm and Nominal Parameters

To have a point of comparison between the transient response and performance of the PMSM with nominal parameters and under parameter uncertainty, the speed response characteristics six different reactive, nature-inspired algorithms are investigated. The performance parameter of the speed response with nominal parameters and external load disturbances is shown in Table 10. Table 10 shows that all performance indices (MSE, JISE, JIAE, JITSE, and JITAE) and the overall error rate are lower for the MOD-FPA (17.71227). In this case, the MOD-FPA has the overshoot (3.08115) higher than the other controllers, but steady state error lower, as shown in Table 10. The time domain specification of the transient response is calculated at 0.05 s. \begin{table}
\begin{tabular}{l c c c c c c c} \hline
**Algorithm** & **MSE** & **JISE** & **JIAE** & **JITSE** & **JITAE** & \(\mathbf{e_{ss}}\) & **Overall Error Rate** \\ \hline MFA & 5.51743 & 1.10354 & 0.32558 & 0.09823 & 0.03218 & 0.31769 & 7.39465 \\ WOA & 3.91025 & 0.78209 & 0.2685 & 0.06973 & 0.0265 & 0.11209 & 5.16916 \\ FPA & 11.97204 & 2.39453 & 0.46988 & 0.21359 & 0.04639 & 0.20831 & 15.30475 \\ DF & 5.40697 & 1.08145 & 0.31817 & 0.09649 & 0.03142 & **0.00153** & 6.93602 \\ CSA & 4.62539 & 0.92512 & 0.29627 & 0.08248 & 0.02927 & 0.14116 & 6.09969 \\ MOD-FPA & **1.77692** & **0.3554** & **0.18368** & **0.03167** & **0.01814** & 0.09578 & **2.46159** \\ \hline \end{tabular} The best results of each study and comparative analysis are highlighted in bold in the corresponding table.

\end{table} 
Table 9: Performance analysis for speed tracking task for random load torque, varying set rotor speed and nominal parameters condition. Figure 9: Tracking error for random load torque, varying set rotor speed and nominal parameters condition.