# Parameter Tuning of PI Control for Speed Regulation of a PMSM Using Bio-Inspired Algorithms
## 6 Results and Discussion

Table 4: Execution time of optimization algorithms. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Algorithm** & **Min** & **Max** & **Mean** & **Std** \\ \hline FPA & 1.7518 & 11.9437 & 5.93158 & 2.9066 \\ BBO & 10.1006 & 22.3857 & 13.0411 & 3.4514 \\ BA & 10.9315 & 32.5701 & 18.1538 & 6.3145 \\ CSA & 10.4840 & 15.2290 & 12.0131 & 1.2182 \\ SCA & 10.2420 & 14.0670 & 11.49813 & 1.3842 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Minimum function statistical data using different optimization algorithms. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Algorithm** & \(\mathbf{k_{p}}\)**, \(\mathbf{\omega}\)** & \(\mathbf{k_{i}}\)**, \(\mathbf{\omega}\)** & \(\mathbf{k_{p}}\)**, \(\mathbf{i_{q}}\)** & \(\mathbf{k_{i}}\)**, \(\mathbf{i_{q}}\)** & \(\mathbf{k_{p}}\)**, \(\mathbf{i_{d}}\)** & \(\mathbf{k_{i}}\)**, \(\mathbf{i_{d}}\)** \\ \hline FPA & 0.2252 & 9.7873 & 6.7903 & 12.1943 & 2.6506 & 8.5429 \\ BBO & 0.3274 & 18.4462 & 9.7514 & 19.2666 & 19.0868 & 10.9512 \\ BA & 0.3449 & 18.2279 & 9.1039 & 25.0000 & 31.3601 & 13.1409 \\ CSA & 0.3460 & 17.0000 & 9.0940 & 3.4042 & 6.9401 & 4.1019 \\ SCA & 0.3158 & 17.0000 & 9.6341 & 1.9076 & 0.1152 & 4.6480 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Optimal gains for PI controllers. Case 1 PMSM Response to a Speed Reference Characterized by Bezier Polynomials with Variable Load Torque  
The reference speed is given by a Bezier polynomial \(\psi\) for providing a sufficiently smooth transfer between the actual and desired speed reference values, within a specific time interval. Then, the reference trajectory is as follows [49]  
\[\omega^{*}= \begin{cases}\omega_{1}+(\omega_{2}-\omega_{1})\psi(t,T_{1},T_{2})& for\ T_{1}\leq t\leq T_{2}\\ \omega_{1}&for\ T_{2}\leq t\leq T_{3}\\ \omega_{1}+(\omega_{2}-\omega_{1})\psi(t,T_{3},T_{4})&for\ T_{3}\leq t\leq T_{4 }\\ \omega_{2}&for\ T_{4}\leq t\leq T_{5}\\ \omega_{1}+(\omega_{3}-\omega_{2})\psi(t,T_{5},T_{6})&for\ T_{5}\leq t\leq T_{6 }\\ \omega_{3}&for\ t>T_{6}\end{cases}  \tag{36}\]  
where \(\omega_{1}\) = 1000 rad/s, \(\omega_{2}\) = 600 rad/s, \(\omega_{3}\) = 300 rad/s, \(T_{1}\) = 0 s, \(T_{2}\) = 1 s, \(T_{3}\) = 3 s, \(T_{4}\) = 5 s, \(T_{5}\) = 6.5 s y \(T_{6}\) = 7.50 s, and \(\psi\) is a polynomial function with the form  
\[\psi=K^{5}\Big{[}r_{1}-r_{2}K+r_{3}K^{2}-r_{4}K^{3}+\ldots-r_{6}K^{5}\Big{]} \tag{37}\]  
\[K=\frac{t+T_{i}}{T_{f}-T_{i}},\ \text{for}\ i=1,2,3,4 \tag{38}\]  
The performance of the controllers is verified using performance indices such as ISE, IAE, ITSE and ITAE. The ISE penalizes the controller for steady state errors, while IAE penalizes the controller for transient errors, ITSE penalizes the controller for steady state errors over a prolonged time and ITAE penalizes the controller for transient state errors over a prolonged time. Table 5 shows these indicators for case 1. The smallest indicators are the result of the BBO algorithm, presenting the best performance in speed tracking, followed by the FPA, BA, SCA algorithms and with the largest amount of error for the CSA. Figure 8 show the speed tracking of all algorithms for case 1, where there is an error in steady state less than 0.001% of the nominal reference value, it can be observed that the different algorithms achieve the appropriate tracking of the desired speed profile. The absolute error is shown in Figure 9, being the maximum error of just 0.9 rad/s, being the BBO the algorithm that gives the least error and CSA the one that gives the greatest error. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Algorithm** & **ISE** & **IAE** & **ITSE** & **ITAE** \\ \hline FPA & 0.0692 & 0.4489 & 0.1122 & 1.6248 \\ BBO & 0.0681 & 0.4445 & 0.1095 & 1.6036 \\ BA & 0.0697 & 0.4494 & 0.1126 & 1.6251 \\ CSA & 0.0824 & 0.4925 & 0.1340 & 1.7851 \\ SCA & 0.0820 & 0.4886 & 0.1318 & 1.7697 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Performance indices of PI controllers tuned using BA, BBO, CSA, FPA and SCA in case 1.