## 4 Description of Search Algorithms
### Overview of Moth-Flame Optimization Algorithm
\begin{table}
\begin{tabular}{l c c c c c c c c c c} \hline \hline
**Algorithm** & **MSE** & **JISE** & **JIAE** & **JITSE** & **JITAE** & **Rise Time** & **Overshoot** & **Settling Time** & \(\epsilon_{ss}\) & **Overall Error Rate** \\ \hline MFA & 1.23729 & 0.24747 & 0.05894 & 0.00134 & 0.00044 & 0.00558 & 0.32295 & **0.01114** & **0.0002** & 2.66301 \\ FPA & 0.8914 & 0.17829 & 0.04805 & 0.00096 & 0.00035 & **0.00561** & 0.15897 & 0.01122 & 0.0005 & 1.19979 \\ WOA & 2.72607 & 0.54524 & 0.08411 & 0.00297 & 0.00062 & 0.00557 & 0.28417 & 0.0112 & 0.00015 & 5.29016 \\ DF & 1.22334 & 0.24468 & 0.05736 & 0.00133 & 0.00043 & 0.00564 & 0.23535 & 0.0119 & 0.00019 & 2.56649 \\ CSA & 1.0413 & 0.20827 & 0.03599 & 0.00113 & 0.0004 & 0.00599 & 0.25751 & 0.01117 & 0.00015 & 2.2548 \\ MOD-FPA & **0.40039** & **0.08008** & **0.03323** & **0.00043** & **0.00025** & 0.00562 & **0.15739** & 0.0119 & 0.00008 & **1.0014** \\ \hline \hline \end{tabular}

* The best results of each study and comparative analysis are highlighted in bold in the corresponding table.

\end{table} 
Table 6: Performance analysis for speed tracking task with constant load and nominal parameters condition. Figure 5: Simulation result for varying load and nominal parameters condition. nominal values. In this case, the load torque is varied suddenly three times during the simulation: (a) from 2.0 Nm to 0 Nm at 0.04 s, (b) from 0 Nm to 2.0 Nm at 0.11 s and (c) from 2.0 Nm to 0 Nm at 0.145 s The velocity reference trajectory planned for the motor operation was specified to efficiently track the smooth motion profile given by (17). The reference trajectory is taken from 950 rpm at t = 0.065 s. to 1450 rpm in a period of 0.3 s, following a Bezier polynomial trajectory. Finally, the reference trajectory is taken from 1450 rpm at t = 0.17 s to 0 rpm in 0.025 s, following a Bezier trajectory, too. The simulation results of the optimized PI controllers for speed tracking under different operating conditions are shown in Figure 6. The corresponding performance parameters are shown in Table 8. In this case, all considered parameters such as steady state error, overall error rate, MSE, JISE, JIAE, JITAE are favoring to MOD-FPA algorithm. Figure 6 exhibits that the overshoot due to external variations (load torque) is between \(\pm\)3 rpm for the MOD-FPA algorithm and between \(\pm\)6.4 rpm for WOA algorithm. 1.5 Simulation Result for Random Load Torque, Varying Set Rotor Speed and Nominal Parameters Condition

To investigate the robustness of the PI controllers, the PMSM is subjected to a random load torque, it is simulated by a the Lorenz system, described by the next first-order differential equations system [46]. \begin{table}
\begin{tabular}{l c c c c c c} \hline \hline
**Algorithm** & **MSE** & **JISE** & **JIAE** & **JITSE** & **JITAE** & \(\mathbf{\epsilon_{ss}}\) & **Overall Error Rate** \\ \hline MFA & 4.27836 & 0.85571 & 0.26784 & 0.09793 & 0.0272 & 0.66563 & 6.19267 \\ FPA & 3.22526 & 0.64509 & 0.24272 & 0.07169 & 0.0244 & 0.79300 & 5.00217 \\ WOA & 9.85985 & 1.97207 & 0.42451 & 0.21935 & 0.04269 & 1.39249 & 13.91096 \\ DF & 4.36026 & 0.8721 & 0.27866 & 0.09798 & 0.02811 & 0.85499 & 6.49211 \\ CSA & 3.65564 & 0.73117 & 0.25146 & 0.08294 & 0.02545 & 0.70312 & 5.44978 \\ MOD-FPA & **1.40489** & **0.28099** & **0.15569** & **0.03186** & **0.01576** & **0.43126** & **2.32046** \\ \hline \hline \end{tabular}

* The best results of each study and comparative analysis are highlighted in bold in the corresponding table.

\end{table} 
Table 8: Performance analysis for varying set rotor speed and load torque, at nominal parameters condition. Figure 6: Speed Tracking Task for Varying Set Rotor Speed and Load Torque, at Nominal Parameters Condition. \[ \begin{split}\frac{dx}{dt}&=a(y-x)\\ \frac{dy}{dt}&=x(b-z)-y\\ \frac{dy}{dt}&=xy-cz\end{split}  \tag{32}\]

where \(T_{l}\) = 0.04z, where a = 5, b = 12 y c = 25; with initial conditions: x(0) = 0.1, y(0) = 0.1 and z(0) = 0.5. Figure 7 depicts the random perturbation load torque applied to the PMSM.