Comparison and Ranking of Metaheuristic Techniques for Optimization of PI Controllers in a Machine Drive System

: Proportional integral (PI) control is still the most widely deployed controller in the industrial drives due to its simplicity and the fact that it is easy to understand and implement. Nevertheless, they are successes applied to systems with a complex behavior with a nonlinear representation, but a disadvantage is the procedure to ﬁnd the optimal PI controller gains. The optimal values of PI parameters must be computed during the tuning process. However, traditional tuning techniques are based on model and do not provide optimal adjustment parameters for the PI controllers because the transient response could produce oscillations and a large overshoot. In this paper, six swarm intelligence-based algorithms (whale, moth-ﬂame, ﬂower pollination, dragonﬂy, cuckoo search, and modiﬁed ﬂower pollination), are correctly conditioned and delimited to tune the PI controllers, the results are probed in a typical industry actuator. Also, a rigorous study is developed to evaluate the quality and reliability of these algorithms by a statistical analysis based on non-parametric test and post-hoc test. Finally, with the obtained results, some time simulations are carried out to corroborate that the nonlinear system performance is improved for high precision industrial applications subjected to endogenous and exogenous uncertainties in a wide range of operating conditions. a permanent magnet synchronous motor, a ﬁeld oriented control, coordinate transformations abc to dq and vice versa, a sinusoidal pulse width modulation, a power source rectiﬁer based on semiconductor devices, a direct current voltage bus ( V CD ) an encoder used to detect speed and three PI controllers. The controllers apply a structure of cascade control loops, consisting of an external speed loop and two inners currents loops. The cascade control is used to attenuate the effect of disturbances. In this work, the three control loops are used to track desired speed reference proﬁles and provide robustness against exogenous disturbances (mechanical load torque) and parametric variations due to operating temperature.


Introduction
Alternating current (AC) motors are widely used in industrial applications such as electric vehicles, hybrid electric vehicle, wind generation systems, mining machinery, marine propulsion, industrial robots, air conditioners, cranes, among other applications, as well as particular demand in residential and commercial areas [1,2]. There are two main categories of AC motors: induction motors (IM) and synchronous motors (SM), the last one, are gaining great attention due to its self-excitation, high efficiency, low maintenance cost, high power density, fast dynamic response, high torque-to-inertia, and more economic maintenance compared to direct current and induction machines. [3,4].
During recent decades, the permanent magnet synchronous motor (PMSM) has been used more and more due to its advantages; but at the same time, too many control structures have been developed to enhance the performance due to the nonlinears, and endogenous and exogenous disturbances [5]. Some of them include classical controllers, intelligent control, vector control, backstepping technique, linear quadratic regulator, fuzzy logic controller, artificial neural networks, genetic algorithm, predictive control, and robust control [6]. Vector control with classical controllers, Figure 1, is the most widely used controller in industries due its easy design and implementation procedure. Moreover, in the literature, proportional integral derivative (PID) controllers have been extensively studied to prove stability of PMSM dynamic performance and improve its operation under critical scenarios [7,8]. In [9] shows that the PMSM is globally regulated around a desired equilibrium point, with a simple PI control around current errors, if the gains are suitably chosen. Therefore, a control scheme based on traditional PI controllers is a proper choice for velocity trajectory tracking.
The advantages of a PID controller are its feasibility, simplicity, ease to understand, and implementation stage. However, a disadvantage of the traditional PID controller is the procedure to find the optimal PID gains for a particular system that is very difficult and tedious to perform [10][11][12][13]. In the literature, there are several techniques to solve the problem of gains tuning of conventional PID and PI controllers when the system is non-linear, such as the PMSM. Traditional tuning techniques do not provide optimal adjustment parameters for the PID controllers because the transient response could produce oscillations and a large overshoot due to the system dynamics [14]. Therefore, new regulation strategies know as advanced and intelligent schemes have been applied to overcome the main drawbacks of PID controller in tuning stage, by the solution of an objective function to achieve optimal gains.
A crucial problem in nonlinear systems control design and PID scheme is the definition of a set of controller gains that provide a system performance near-optimal. This process, which is usually carried out at the design stage as a compensation regarding various adverse factors, often produces restricted results. Thus, algorithms inspired in nature and population seems like an important alternative to synergistically operate with PID controller for improving the system behavior [10].
In recent literature, various metaheuristic algorithms have been used to carry out an inclusive search for optimal solutions, which cannot be solved by classical techniques. That the metaheuristic algorithms try to emulate the natural behavior of different class of animals, outcomes to have a high level of efficiency, overcome limitations of classical methodologies. Besides, search results depend on the system complexity or the problem to solve; becouse a metaheuristic algorithm can be more efficient than other to solve a particular problem, while the same metaheuristic algorithm could present a poor performance for another system [15].
In [28] a WOA application is presented to optimally design PID controllers in the automatic generation control loops of interconnected power systems, including renewable energy sources. The effectiveness of the proposed controller to deal with the uncertainties in generation systems is an essential feature of this study.
An objective function to enhance transient response of terminal voltage in terms of maximum overshoot, rise time, settling time, and steady state error is solved by CSA algorithm [14]. A PID controller is used in automatic voltage regulator scheme. Also, in [10] the automatic control problem of synchronous generator is attended with MOA optimization procedure.
In [13] DA, is applied for design and implementation of a PID controller with three degrees of freedom. The control stabilizes the frequency and power fluctuations after some disturbance is presented in a hybrid topology of an electric distribution system.
In [29] a meta-heuristic optimization algorithm called chaotic whale optimization algorithm is used to regulate the performance of PMSM when it is affected by load disturbances and changes in system parameters. In [30] a control system for permanent magnet synchronous motors, together with an online self-tuning method is presented. In this work, a meta-heuristic bio-inspired approach has been implemented to find the voltage source converter parameter set which minimizes a specific objective function. In the last three cases, there is not a robustness analysis, sensitivity analysis, or statistical test to affirm robust performance of designed controller, analyze the effectiveness of the controller and verify the significance of the results, respectively.
The purpose of this paper is to compare different reactive, nature-inspired algorithms for tuning parameters of the PID controller in order to discover the most suitable algorithm for use in solving this class of problem. The six nature-inspired algorithms such as whale, moth-flame, flower pollination, dragonfly, cuckoo search, and modified flower pollination are compared in order to show which of them are the best to work with the same population sizes and generation numbers. This proposal uses six nature-inspired algorithms to search optimal values of a regulatory scheme for robust tracking tasks of desired velocity profiles of a PMSM [31]. This evolutionary technique is applied on one objective/fitness function to find an optimal solution that minimizes the overall error.
In another context, the contributions of a meta-heuristic must be objectively evaluated and reported; however, as described in [32], this is not always the case. This is due to the fact that the meta-heuristic procedures are not described in sufficient detail, the experimental adjustments are very generally described and this results in the impossibility of replicating an experiment exactly and an equitable comparison as mentioned in [33]. Statistical analysis [34] is used for the objective evaluation of the performance of metaheuristic algorithms. The statistical procedures developed to carry out statistical analyzes can be classified into two: parametric and non-parametric, according to the specific type of data used [35]. In many experimental studies, the lack of properties required for proper application of parametric procedures (independence, normality, and homoscedasticity) gives non-parametrics the task of rigorous comparison between algorithms. Due to the above, the use of non-parametric statistical analysis is widely used in the field of metaheuristics [34] to establish its performance.
Due to different current drawbacks in PMSM regulation, some objectives could be included in the controller design stage: (a) Search simultaneously optimum values of a regulation scheme for robust tracking tasks of desired velocity profiles of a PMSM using six nature-inspired algorithms. To explore optimum controller settings, an extensive comparative study is carried out with different performance index and time domain specification; (b) in order to investigate the effectiveness of the velocity trajectory tracking controller tuned with six nature-inspired algorithms, the comparison of the transient response of the PMSM subject to different operating conditions is made; (c) to examine the robustness of the velocity trajectory tracking controller tuned with six nature-inspired algorithms, a sensitivity analysis under parametric variation and different operating conditions of the PMSM is done; and (d) The presented results exhibit high quality behavior and is demonstrated by a statistical analysis based on non parametric test and post hoc test.
The remainder of the paper is organized as follows. Section 2 portrays the mathematical model of a nonlinear PMSM. The control structure is presented in Section 3. The objective function and constraints for the optimization of PI gains are described in Section 4. An overview of the six nature-inspired algorithms are presented in Section 5. In Section 6 presents optimization results, sensitivity analysis and robustness of controller. Section 6 shows the statistical analysis for comparing nature-inspired optimization algorithms. Finally, the conclusions of the paper are established.

Dynamic Model
The set of nonlinear differential equations that describe the dynamics of a three-phase PMSM drive in the dq reference frame oriented to the rotor flux axis can be written as [36]: where R s is the stator winding resistance per-phase; ω e is the electrical rotor angular speed; L d and L q are the stator winding self-inductances in the d and q axes, respectively; i q is the q-axis stator current; v q is the q-axis stator voltage; i d is the d-axis stator current; v d is the d-axis stator voltage; λ m is the magnetic flux linkage in the rotor due to the magnets; J and B are the inertia moment and the viscous friction coeffcient, respectively; T l is the disturbance signal; P is the number of pole pairs; θ r and ω r are position and the mechanical speed of the rotor (ω e = Pω r ), respectively.

Control Algorithm
The system depicted in (1)-(4) is a set of coupled nonlinear differential equations with two control inputs, v d and v q and one disturbance signal (T l ). The main task of the PMSM drive based on linear controllers is to design an asymptotically stable regulation scheme for robust tracking tasks against different operating conditions and desired speed reference profiles.
The PMSM used in this servo system demands a particular configuration of control scheme, Figure 1. The system contains a permanent magnet synchronous motor, a field oriented control, coordinate transformations abc to dq and vice versa, a sinusoidal pulse width modulation, a power source rectifier based on semiconductor devices, a direct current voltage bus (V CD ) an encoder used to detect speed and three PI controllers. The controllers apply a structure of cascade control loops, consisting of an external speed loop and two inners currents loops. The cascade control is used to attenuate the effect of disturbances. In this work, the three control loops are used to track desired speed reference profiles and provide robustness against exogenous disturbances (mechanical load torque) and parametric variations due to operating temperature. The external control loop with negative feedback is used for speed regulation and compensate variations of load torque. Figure 1 shows that the outer control loop computes the desired current signal (i * q ) in q axes, for the desired speed ω * with the rotor speed error signal e ω . The expression to compute the rotor speed error signal can be represented as, where ω * is the desired rotor speed and e ω is the rotor speed error. The external loop equation can be expressed as (ω * (τ) − ω r (τ))dτ (6) where k p,ω r and k i,ω r are the proportional gain of rotor speed and the integral gain of rotor speed, respectively. The two internal control loops are called the secondary control. The inner loops attenuate the effect due to the parametric variations of PMSM. The equations of the two internal control loops are given by where k p,i d and k i,i d are proportional and integral gains of the current on d-axis, respectively; i * d is the d-axis current reference value, k p,i q and k i,i q are proportional and integral gains of the current on q-axis, respectively; and where U d and U q are two new auxiliary control variables. The auxiliary variables are used to obtain the desired dynamics for the PMSM stator currents eliminating the nonlinearities and the coupling of the mechanical and electrical variables indicated in (1) and (2) [7,37]. Thus, k p,i q , k i,i q , k p,i d , k i,i d , k p,ω r and k i,ω r are computed simultaneously using six nature-inspired algorithms to ensure high speeds tracking performance and efficient disturbances rejection. The purpose of this analysis is to compare different reactive, nature-inspired algorithms for tuning parameters of the PID controller in order to discover the most suitable algorithm for the velocity trajectory tracking controller problem.

Objective Function for Parameters Tuning
The objective function to compute the gains of the controllers can be designed in different ways. In previous works, the objective function is constructed by one or more performance indices, such as: integral squared error (JISE), integral absolute error (JIAE), integral time and squared error (JITSE), mean squared error (MSE) and integral of time and absolute error (JITAE). Nevertheless, some researchers have been used different fitness functions based on time domain specifications response, such as: settling time (t s ), rise time (t r ), maximum overshoot (M p ) and steady state error (e ss ). In this paper, to design the objective function, both criteria of transient response and performance indices are used in order to minimize all the indices as mentioned earlier. [14,38,39]. Thus, the respective objective function is defined as [40], subject to the following constraints: where j = [i q , i d , ω r ]; k min p,j , k min i,j , k max p,j and k max i,j are the maximum and minimum values of the gains of the PI controllers, and γ is the weighting factor which could be changed according to the dynamics of the system, in this work γ = 0.5. The search space for proportional gains (k p,j ) are defined between 0.1 and 100; and that of the integral gains (k i,j ) are between 0.1 and 250.

Overview of Cuckoo Search Optimization
The CSA is an algorithm based on the aggressive strategy of reproduction of the cuckoo birds and the characteristics of flights called Lévy of some species of birds [41]. CSA starts when the mother cuckoo lays her eggs in alien nests. The host bird can discover that the eggs are not its own and either destroy the eggs or leave the nest with all the eggs inside. CSA starts with an initial population randomly distributed to search for a nest to lay the egg. The random position of the nest where the egg is placed is decided by carrying out Levy flights, defined as: where t is the current generation number and α > 0 is the step size. The product ⊗ means entry-wise multiplication. Basically, Lévy flights provide a random walk, while their random steps are extracted from a Lévy distribution, which for large steps has an infinite variance with an infinite average, with the form In the real world, if the egg of a cuckoo bird is very similar to the egg of the nest-owning bird, then the egg has less chance of being discovered so the suitability must be related to the difference in solutions. Following the rules defined above, the optimization algorithm can be summarized in Algorithm 1.

Algorithm 1: Cuckoo Search Optimization
begin Generate initial population of N host nests x i (i = 1, 2, . . . , N) while (t < Max Generation) or (stop criterion) Get a cuckoo randomly by Lévy flights Evaluate its fitness Choose a nest among N randomly Replace j by the new solution end if Abandon a fraction (p a ) of worse nests Keep the best solutions (or nests with quality solutions) Rank the solutions and find the current best end while Show results and visualization end

Overview of Dragonfly Algorith
The dragonfly, is one of the most interesting and fascinating insects of nature. Currently, more than 5500 different species of dragonflies are known. Dragonfly Algorithm mimicks the swarming behaviours of a dragonfly. The inspiration of the DA [42] is taken from the social behavior of the dragonflies to hunt their food (static swarm) and when they migrate (dynamic swarm). Considering these two behaviors, there are five factors involved in determining the individual dragonfly position: where d is the number of decision variables. The Lévy flight function is given by where r 1 and r 2 are two random numbers in [0, 1]; β is a constant and ρ is computed as where Γ (x) = (x − 1)!. Otherwise, the new position is calculated as follow: where ∆X t+1 is the step vector and can be obtained as where s shows the separation weight; a is the alignment weight; c is the cohesion weight; f is a food factor; e is the enemy factor; w is the inertia weight, S i indicates the separation of the i-th individual, A i is the alignment of i-th individual, C i is the cohesion of the i-th individual, F i is the food source of the i-th individual, E i is the position of enemy of the i-th individual and t is the iteration number. The optimization process of DA is further explained in Algorithm 2:

Overview of Flower Pollination Algorithm
FPA was developed by Xin-She Yang in 2012 [43] and is considered to be an excellent optimization method. The algorithm is based on copying or mimicking the process of pollination or reproduction of flowering plants. This process can occur through various forms and through different pollinators, manifesting a high degree of adaptation and specialization. There are two types of pollination according to how the pollen is sent or arrives at the plant: biotic pollination and abiotic pollination. Biotic pollination is done by pollinators such as insects (bees, wasps, ants, flies and butterflies) or some animals (mice, bats, and some birds, such as the hummingbird) in flowering plants. Abiotic pollination does not require the transfer of pollen by alive organisms; this is done by water, wind, or gravity. The biotic or cross-pollination is considered to be global pollination process with pollen carrying pollinators performing Lévy flights. Global pollination can be formulated as where x t i denotes pollen i or the solution vector x i at iteration t, g * is the current best solution among all current generation solutions, γ is a scalar factor that is used for controlling the step size and L(λ) is the Lévy flights based step size that corresponds to the strength of the pollination. Since insects can fly over a long distance with steps of different distance, where the length of each step or jump follows the levy probability distribution function.
where Γ (λ) is a standard gamma function, and this distribution valid for large steps s > 0. The strength of pollination is generally considered to be λ = 1.5. For the local pollination, may be represented as follow where x t j and x t k are pollen from different flowers of the same plant species. For a local random walk, x t j and x t k come from the same species and is drawn from a uniform distribution as [0, 1]. The FPA is summarized in the Algorithm 3:

Algorithm 3: Flower Pollination Algorithm
Find the best solution in the initial population

Overview of Whale Optimization Algorithm
The whale optimization algorithm (WOA) was recently implemented to solve various non-linear optimization problems [26]. The principle of how the WOA works is based on the way in which humpback whales trap their food. This special form of hunting is called the bubble net feeding method. The process consists of several whales coming together and forming a spiral around a school of fish making bubbles below them so that they do not escape and push them towards the surface. Humpback whales can recognize the location of the prey and surround it. This behavior is represented by the following equations: where t indicates the current iteration, A and C are coefficient vectors, X * is the position vector of the best solution obtained so far, X is the position vector, and · is an element-by-element multiplication. It is worth mentioning here that X * should be updated in each iteration if there is a better solution.
The vectors A and C are calculated in the following way: where a decreases linearly from 2 to 0 over the course of iterations and r is a random vector between [0, 1]. It is worth mentioning that humpback whales swim around their prey by closing a circle and along a spiral path simultaneously. To model this behavior simultaneously, it is assumed that there is a 50% probability of selecting if the circle mechanism is closed or the position of the whales. The mathematical model that describes the previous process is the following: where b is a constant for defining the shape of the logarithmic spiral, l is a random number in [−1, 1] and p is a random number in [0, 1]. In each iteration, search agents update their positions with respect to a randomly chosen search agent or the best solution obtained so far. The parameter a is reduced from 2 to 0 to provide exploration and exploitation. The basic steps of the WOA are summarized in the pseudocode as shown in Algorithm 4:

Overview of Moth-Flame Optimization Algorithm
The moth-flame optimization algorithm (MOA) was developed by Mirjalili [44] taking as inspiration the moth's way of traveling during the night. The way of moving from the month-flame is known as transverse orientation. The two most important elements in the MOA are moths and light sources (flame). However, in each iteration of the optimization algorithm moths and flames are part of different processes for its update. For this reason, they can fly in a 1-dimensional, 2-dimensional, 3-dimensional or hyperdimensional area by changing the position vectors.
In the MOA algorithm, each moth is assumed to have a position in a D-dimensional solution space. The set of search agents can be expressed as a matrix, just as follows: Flame matrix is in the same dimension as moth matrix. Flame also stores the fitness value accordingly as number of flames. Moth and flame are both solutions but moth is the search agent and flame is the best position of moth. Flames are the flag which dropped by moth during the search process and move around that position and update accordingly. Due to this, the moths never lose the best solution. Moths update its position with respect to flame according to the next equation where M i represents the i-th moth, F j represents the j-th flame and S is the spiral function. The logarithmic spiral function for the movement can be defined as: where b is a constant to define the shape of the logarithmic spiral, t is a random number between [−1, 1] and D i is the distance between the i-th moth and the j-th flame, which is defined as: To avoid the exploitation degradation of the best promising solutions, the following equation is expressed for the number of flames about this problem

Overview of MOD-FPA
In [31], the pollination process is replaced by the generation during each iteration of a set of complete random orientations under conditions similar to FPA [43]. The main objective of MOD-FPA is to improve the performance of FPA in terms of intensification, diversification, and speed of convergence properties.
Two variations were made in the FPA process: (a) The estimation of a set of global orientations for all members of the population towards global or local pollination; (b) The construction of a set of better solution vectors related to all generated global orientations. This set is compared with each iteration with a fixed number of real solution vectors to select the best one among them based on their fitness values. In MOD-FPA two matrices are calculated at each iteration t; one contain N or sets, where each set is represented by a column with a random number of orientations toward global pollination. The second matrix includes the same number of sets as the first, but has n f − rand Glog orientations toward local pollination. Please note that the filling of each set is computed using the switch FPA parameter p.
The computed solution vector x t+1 i , in t + 1 requires of (g * − x t i ) and (x t j − x t k ) according to (14) and (16), respectively. The MOD-FPA has been proposed to use a solution vector x t+1 i generated N p pairs of pollen lists extracted from different flowers of the same plants species, each iteration either using global or local pollination. This presents significant improvements to the FPA basic version in terms of found solutions quality [31]. The N p (x t j − x t k ) terms can be generated using successively N p pairs of pollen determined at each new iteration t. However, it is important to note that each generated complete orientation is associated with a pair of pollen gametes lists. More specifically, each set number n o is assorted to the pair number n p . This means that N or = 2N p . As a result, the global exploitation algorithm characteristic is significantly enhanced. It should be noted that MOD-FPA offers the possibility to have a unique best solution generated during one cycle, either through a local or global pollination. The flow chart of MOD-FPA algorithm is shown in Figure 2. A detailed description of these processes is presented in [31].

Controllers Tuning Methodology
In this section, six different reactive, nature-inspired algorithms with the proposed objective function (12) are employed to search optimum values of three PI controllers for the velocity trajectory tracking controller. The block diagram of the control scheme is given in Figure 1 and PMSM parameters are given in Table 1. Six parameters in velocity trajectory tracking controller can be tuned simultaneously to attain an improvement in motor performance. The control scheme, together with optimized PI are implemented using Matlab/Simulink 9.1 on Window 8.1 Professional Intel ® CoreTM i7-4712HQ CPU @ 2.3 GHz 16 GB RAM.
The parameter settings for each algorithm used in the experiment are shown in Table 2. The six algorithms use the same objective function (12) for the optimization of each algorithm. The performance of the optimized PI controller is evaluated with objective function (12) that considers rise time, settling time, steady state error, overshoot, RMSE, JISE, JIAE, JITSE, and JITAE. The search for optimal gains is done with nominal PMSM parameters and a nominal load torque of 2 Nm. For finding the optimum values of PI parameters through MOD-FPA, DA, WOA, FPA, MOA, and CSA, 25 independent runs of each algorithm were computed so that a statistical analysis could be performed on data, see Table 3. The optimal gains value for the velocity trajectory tracking controller are tuned with six different nature-inspired algorithms are tabulated in Table 4. Table 3 lists the statistical comparison between six search algorithms in terms of the best, mean, worst fitness values, and computational (CPU) time. The best results of each study and comparative analysis are highlighted in bold in the corresponding table. The best results of each study and comparative analysis are highlighted in bold in the corresponding table.
The results presented in Table 3 show that MOD-FPA offered the best fitness values (11.6044) compared to other nature-inspired algorithms. From these analyses, CSA has the best average computation (8.92225 s); on the other hand, WOA has the worst fitness value than MOD-FPA, MOA, DA, and FPA. The best results of each study and comparative analysis are highlighted in bold in the corresponding table.

Simulation Result for Speed Tracking Task without Load and Nominal Parameters Condition
The velocity reference trajectory planned for the PMSM operation was specified to efficiently track the smooth motion profile defined as [45]. Figure 3 shows the closed-loop tracking response of the velocity reference trajectory without load condition with set speed of 500 rpm of six algorithms. The performance parameter of the speed tracking task response is shown in Table 5. The performance of the optimized PI controller is evaluated for trajectory tracking control in terms of time domain specifications in speed response and performance indices ( MSE, JISE, JIAE, JITSE, JITAE, t s , t r , M p and e ss ). The main parameters, such as the overall error rate (0.46720) and overshoot (0.20369) are in favor of the MOD-FPA controller. The MOD-FPA controller has a better MSE, JISE, JIAE, JITSE, JITAE, and steady state error than other considered controllers, as shown in Table 5.  The best results of each study and comparative analysis are highlighted in bold in the corresponding table.

Simulation Result for Speed Tracking Task with Constant Load and Nominal Parameters Condition
The Figure 4 shows the closed-loop tracking response for full load (2 N.m) condition with set speed of 500 rpm. The performance parameter of the speed response is shown in Table 6.   The best results of each study and comparative analysis are highlighted in bold in the corresponding table.

Simulation Result for Varying Load at Constant Speed and Nominal Parameters Condition
To validate the effectiveness of controllers, PMSM is subjected to sudden load changes also, and the response is analyzed. The speed response characteristics for varying load conditions are observed for this case. The speed is set at 500 rpm, load torque is varied from no load to full load at 0.065 s, and 0.051 s, later load torque is varied from full load to zero load. Figure 5 shows the speed response for sudden load changes condition and performance parameters are shown in Table 7. The total performance indices are less for MOD-FPA controller than other considered controllers. Moreover, performance indices such as recovery time, overshoot, and steady state error are also in support of MOD-FPA controller.  The best results of each study and comparative analysis are highlighted in bold in the corresponding table.

Simulation Result for Varying Set Rotor Speed and Load Torque, at Nominal Parameters Condition
To make the comparative analysis of the dynamic performance of the algorithms under different operating conditions, the PMSM is subjected to varying set of conditions with parameters at their 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 Bézier 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 Bézier 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 ±3 rpm for the MOD-FPA algorithm and between ±6.4 rpm for WOA algorithm.   FPA 1.40489 0.28099 0.15569 0.03186 0.01576 0.43126

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

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].
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. 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.   Tracking error for random load torque, varying set rotor speed and nominal parameters condition. The best results of each study and comparative analysis are highlighted in bold in the corresponding table.
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.

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. The simulation results of the optimized PI controllers for closed-loop tracking response of the velocity under variations parameters (L d = 2.5L d , R s = 2R s ) and load torque of 0 to 2.0 Nm are shown in Figure 10. The performance parameter of the speed response is shown in Table 11. MOD-FPA controller has lower performance indices than the other considered controllers, as shown in Table 11. Nevertheless, the percentage increase in MSE for MOD-FPA is 45.487%, and for DF algorithm the increase is 33.27%. The percentage increase in JIAE for MOD-FPA is 28.78%, and for MOA the increase is 20.12%. The best results of each study and comparative analysis are highlighted in bold in the corresponding table. The simulation results of the optimized PI controllers for closed-loop tracking response of the velocity under the said parameter variations are shown in Figure 11 and Table 12. The percentage increase in the MSE for MOD-FPA is 159.592%, and for DF algorithm, the growth was 180.279%. The percentage increase in the JIAE for MOD-FPA is 167.304% and for MFA, the increase is 170.688%; in both cases, the time settling is less than 0.02507 s. These comparative results indicate that MOD-FPA exhibits better time response characteristics as compared to others. The best results of each study and comparative analysis are highlighted in bold in the corresponding table. The simulation results of the optimized PI controllers for closed-loop tracking response of the velocity under variations external (Load torque is varied from 0 to 2 Nm) and internal disturbances (3L d , 3R s , 3J, 3B and 0.75λ) are shown in Figure 12 and Table 13. The percentage increase in the MSE and JITSE for MOD-FPA algorithm is 273.739%, and 262.753% is lower as compared to DF algorithm 281.797% and 274.698%, respectively. Almost all considered parameters, such as MSE, JISE, JIAE, and JITAE, favor the MOD-FPA algorithm. Compared to MFA, FPA, WOA, DF and CSA in terms of maximum overshoot, rise time and settling time, the MOD-FPA algorithm is quick and has better in disturbance rejection as observed in Figure 12 and Table 13. The best results of each study and comparative analysis are highlighted in bold in the corresponding table. As a result, the PI controller tuned by MOD-FPA using the proposed objective function outperforms PI controllers tuned with WOA, CSA, MOA, DA, and FPA optimization techniques in angular velocity tracking of the PMSM under parameter uncertainty and external load disturbances.

Statistical Analysis
To statistically evaluate the results obtained by the algorithms used (MOD-FPA, WOA, CSA, MOA, DA, and FPA) for the estimation of the parameters of the PI controllers. When comparing pairs, through statistical tests, we seek to establish the performance of two algorithms when applied to a common set of problems [47]. Table 14 presents the critical number of wins with a ∝ = 0.05 level of significance. We established that MOD-FPA as the comparison algorithm and the table shows that this algorithm is significantly better compared to the others. In this work, we used a non-parametric analysis called Wilcoxon test to compare two sets of ordinal data subject to different conditions [47]. For this statistical analysis, MOD-FPA algorithm is compared separately with other strategies proposed in order to test whether there is a significant difference between the proposed algorithm and the others with which it is compared. For this test, we have two hypotheses.: 1. Null hypothesis (H 0 ), there is no difference between the results of the compared strategies, 2. Alternative hypothesis (H 1 ), there is a difference between the results of the differentiated strategies, in other word when the null hypothesis is false. Table 15 shows the R+, R−, and the p-values computed for all pairwise comparisons concerning MOD-FPA. As the table states, MOD-FPA exhibits a significant improvement over WOA, CSA, MOA and FPA on the other hand; DA algorithm shows a better performance than MOD-FPA on average with a level of significance ∝ = 0.05. Another non-parametric statistical test called Friendman's test was also performed [48]. In this test, a two-way analysis of the variations by ranges is performed. The statistical test is performed in the second step using the calculated ranges. In this test, a low range implies a better algorithm [34]. Table 16 shows the Friedman Ranks. The p-value is less than the level of significance 0.05, the null hypothesis is rejected, and it is concluded that at least 1 of the 6 algorithms has a different effect. The mean for DA and MOD-FPA are lowers and indicates that it could be more effective than other algorithms.
Finally, a post-hoc test was performed called Nemenyi test [49]. The results obtained show that there is a significant difference between the tests as shown in Table 17, except for DA and MOD-FPA, whose performance is similar. If we consider the sum of ranges, we conclude that the DA test is slightly better than the other algorithms. The best results of each study and comparative analysis are highlighted in bold in the corresponding table. After performing the nonparametric statistical analysis, we find than the DA and MOD-FPA algorithms have a statistically best performance result than other algorithms.

Conclusions
In this paper, the implementation of six nature-inspired heuristic techniques was used to tune the six gains of three PI controllers that regulate the speed of a PMSM. To find the optimal six gains, six particle swarm intelligence algorithms were taken into account: MOD-FPA, CSA, WOA, MOA, DA, and FPA. To verify the performance, 25 independent runs of each algorithm were done so that a statistical analysis could be performed on data. The performance of the optimized PI controller was evaluated for trajectory tracking control in terms of integral squared error (JISE), integral absolute error (JIAE), integral time absolute error (JITAE), and integral time squared error (JITSE). The effectiveness and performance of these algorithms were tested under nominal parameters with constant load torque and external load disturbances. The results of these algorithms were statistically analyzed in order to get the best algorithm. The analysis of the statistical results shows that MOD-FPA is better than CSA, WOA, MOA, FPA, DA in terms of the fitness value, JISE, JIAE, JITAE, and JITSE metrics. It should be mentioned that the six algorithms present with excellent performance, so there would be no preference or problem of using each of them indistinctly in the process of tuning the PI controllers.