Proportional-Integral-Derivative Parametric Autotuning by Novel Stable Particle Swarm Optimization (NSPSO)

To improve the performance, robustness and stability of autotuning the proportional integral and derivative (PID) parameter, the novel stable particle swarm optimization (NSPSO) is proposed in this paper. The NSPSO is the combination of the particle swarm and optimization algorithm with the new stable rule to reconsider the survival of the remaining particle in the search space for handling the instability of the system. The new rule is proposed based on proving the stability according to the Lypunov stability theorem. Additionally, to show the method’s superiority in performance and robustness, the proposed method is compared with the results of simulations with the particle swarm optimization (PSO), the hybrid particle swarm optimization-grey wolf optimization (PSO-GWO), the whale optimization algorithm (WOA) and the social spider optimization algorithm (SSO) based on a direct current (DC) motor control system. In the comparative performance, the various ﬁtness functions are applied, while the comparative robustness and the changed operation point of the DC motor are applied. After comparing the methods, the proposed method obtains better results than the PSO, PSO-GWO, WOA and SSO in both performance and robustness.


I. INTRODUCTION
The proportional integral and derivative (PID) controller is commonly applied in many fields, such as in wind energy [1], robotics [2]- [5], optical networks [6], hydraulics and pneumatics [7]- [9], industrial processes [10], vehicles [11], and power systems [12] because its structure is simple as a result of its easy implementation, maintenance, and low cost [6], [13]. Nevertheless, its performance relies on the balancing of 3 parameters: proportional gain (K P ), integral gain (K I ) and derivation gain (K D ) [14]. There are parameter effects on the transient curve. For instance, K P affects the stability of the transient response, K I affects the steady-state error (E S ) and the maximum overshoot (OS) and K D affects the improvement for the future response. The conventional method, called Ziegler-Nichols (ZN), is manually tuned by fixing the operating point. In practice, the system is operated by the different operations, and thus, this method is an unsuitable system with The associate editor coordinating the review of this manuscript and approving it for publication was Ton Duc Do . different operations [15]- [18].However, many methods, such as Cohen-Coon and phase and gain margin methods have been proposed to overcome the limitations of the conventional methods, but they require experienced designers and more time for tuning [19].
PSO is widely applied to autotune the PID parameter because of its effectiveness and efficiency in handling nonlinear and easy implementation [35], [36]. However, it still has the limitation of falling to the local minima and converging [37], [38]. Many studies have improved the conventional PSO by combining it with the advantages of other algorithms, such as the particle swarm optimization algorithm and the linear-quadratic-regulator (PSO-LQR) [39], the hybrid particle swarm optimization-Grey wolf optimization (PSO-GWO) [38], the modified particle swarm optimization based on dynamic weight and crossover operator (MPSO-IPID) [40], and the improved PSO [36]. Nevertheless, its performance still depends on the setting of the initial particle, and thus, the risk of falling into the local minima still exists [37].
Therefore, this paper proposes the novel stable PSO (NSPSO) to improve the performance, convergence, robustness and stability of autotuning the PID parameter. The method is the improved PSO because it adds the process of determining the survival of the remaining particle in the search space based on sufficient conditions and re-generating the new particle corresponding to the survival particle. To verify the performance, convergence and robustness, the proposed method is compared with the results of simulations with the PSO [44], the PSO-GWO [38], the whale optimization algorithm (WOA) [45] and the social spider optimization algorithm (SSO) based on the direct current (DC) motor system. For comparative performance and convergence, a different fitness function is applied by fixing the operation point of the DC motor. In the comparative robustness part, the changed operation of the DC motor is applied, but the fitness function is fixed. Additionally, the sense of Lypunov stability is used to prove the closed-loop stability of the sufficient conditions. Hence, the contributions of this paper are as follows: 1. NSPSO is proposed to improve the performance, convergence, robustness and stability of the autotuning PID parameter. The proposed method is the improved PSO by reconsidering the remaining particle in the search space. 2. The theoretical sufficient condition to determine the survival particle is proven according to the sense of the Lypunov stability. 3. To verify the superiority of the performance and convergence, the comparative simulation between the proposed method, the PSO [44], the PSO-GWO [38], the WOA [45] and the SSO based on the DC motor are applied with varying fitness functions, but the operation of the DC motor is fixed. 4. To verify the superiority of the robustness, the comparative simulation between the proposed method, the PSO [44], the PSO-GWO [38], the WOA [45] and the SSO based on the DC motor are applied with the operation of the DC motor, but the fitness function is fixed. The organization of this paper is as follows: the PID controller and fitness function are described in section II, novel stable particle swarm and optimization is discussed in section III, a simulation and result analysis is presented in section VI and the conclusion and discussion are shared in section V.

II. THE PID CONTROLLER AND THE FITNESS FUNCTION
The proportional integral and derivative controller (PID) are designed based on the derivative of the difference between the reference input (R(t)) and the output of the system (Y (t)), which this paper applies to brushless DC motor; i.e., R(t) is the reference velocity and Y (t) is the output velocity.
where e(t) is an error which is calculated from the derivative of R(t) and Y (t). The parameter of the PID controller is denoted as the proportional gain (K P ), the integral gain (K I ) and the derivative gain (K D ). It is the fact that the controller gains are required to properly design according to the condition of the system since the behavior of the system depends on these controller parameters [15]. In this paper, the novel stable particle swarm optimization (NSPSO) algorithm is proposed to design the PID controller parameter by autotuning. During the process of autotuning, the fitness function is used to determine the quality. Normally, the fitness function is utilized by applying a performance index [19], such as the integral of the absolute error (IAE), the integral of the time multiplied squared error (ITSE), the integral of the time multiplied absolute error (ITAE), and the integral of the squared error (ISE). They are defined as follows [19]: where e(t) is the error in a time domain and t is the time. Additionally, [41] proposed the new fitness function as follows: where ω ie , ω iae , ω ise , ω td , ω r and ω s are the weights of the performance index, such as the integral error (IE), IAE, ISE, overshoot, rise time (t rt (t)) and settling time (t st (t)). OS(t) is the maximum overshoot.

III. NOVEL STABLE PARTICLE SWARM AND OPTIMIZATION
A novel stable particle swarm optimization (NSPSO) algorithm is proposed to improve the limitation of the particle swarm optimization (PSO) in the local minima by adding the process of regenerating the particle with a bad fitness function based on the remaining particle with a good fitness according to the Levy function. The bad and good fitness functions for each particle is classified by using the acceptance fitness, which is set by the designer to achieve the design requirements. If the fitness function of the particle is more than the acceptance fitness, the particle is interpreted as the good fitness function; otherwise, the particle is interpreted as the bad fitness function.
The PSO was proposed according to the behavior of bird swarming by Eberhart and Kennedy. In each iteration of the PSO, the best solution is found based on the vector of the velocity and the position of each particle, which evaluates the quality according to the fitness function by moving the particle in the searched space [39]. In the searched space with dimension D, the number of particles N in iteration i th with the term local best position or (pbest) is stored in the memory with format p i = (p i1 , p i2 , . . . , p ND ). The best position of the whole particle (gbest) is stored in the memory with format p g = (p g1 , p g , . . . , p gD ) [42]. The velocity is updated as follows: The position is updated as follows: where r 1 and r 2 are random numbers with the range [0,1], c 1 is the cognitive learning factor and c 2 is the social learning factor. For implementing the PSO, the flow chart is shown in Figure 2.
In Figure 3, the NSPSO is proposed by combining the PSO and the process of determining the survival of the remaining particle in the search space based on the fitness function to prevent the local minima in the PSO. The process of determining the survival of the remaining particle in the search space determines the weak particles and deletes them from the search space. Then, the new position particles are generated according to (9) and v(t + 1) is replaced with the Levy optimization function as follows [46]: where β is the constant that this paper set to be 1.5. Additionally, the process of checking the stability of the new particle is added by determination according to (12) as Theorem 1. Theorem 1: Each time t generates a new particle in the search space with dimension d as follows: each new particle is determined based on the equation as follows: where

e(t) is the error at time t, OS(t) is the maximum overshoot, t st (t) is the settling time and t rt (t) is the rise time.
Proof: To verify the stability of generating a new particle, the Lyapunov function is defined as follows based on (7): The difference in time between (t −1) and (t) of the Lyapunov function is written as follows: Therefore, (13) is as follows: We consider e(t), t rt (t), t st (t) and OS(t) according to (8) given that r 1 , r 2 = 1. The equation is as follows: Given that k(t) = 2(c 1 x(t) d i + c 2 x(t) d i ) as follows:  Hence the equation is as follows: We consider t rt (t) based on (8) as follows: (19) is written as follows: We consider t st (t) based on (8) as follows: From (19), the equation is as follows: We consider OS(t) based on (8) as follows: From (19), the equation is as follows: We replace (20), (22), (24) and (26) to (17) as follows: We consider the Lyapunov stability theorem in each sampling time t. In the case of V (t) ≤ 0, the new particle is generated according to (12), and thus, the stability of the closed-loop control system of the NSPSO is verified.

IV. AN ANALYSIS OF THE SIMULATION AND RESULTS
To verify the performance, robustness and convergence of the proposed method, the results of the simulation compared between the proposed method, the particle swarm optimization (PSO) [44], the hybrid particle swarm optimization-grey wolf optimization (PSO-GWO) [38], the whale optimization algorithm (WOA) [45] and the social spider optimization algorithm (SSO) are presented per the DC motor. For robustness, the minimized cost function according to (7) is applied. During the simulation, each algorithm for comparison is executed based on execution time with 2 seconds and 100 iterations.

A. DC MOTOR MODELING
The structure of the DC motor shown in Figure 4 is based on electrical and mechanical principles. In [43], the step of deriving the mathematics model of the DC motor as (28) is shown by the consideration of producing the torque under the armature current as follows: R a is the armature resistance, J m is the inertia torque of the motor, K is the torque of the motor, B is the motor friction constant and k b is the constant of the electromotive force. In this paper, J m is 0.0004 kg.m 2 , B is 0.0022 N .m.s/rad and K b is 0.05 V .s. R a and K are varied with 4 cases, as shown in table 1, to verify the robustness [43].

B. NUMERICAL SIMULATION
To verify the performance and convergence of the autotuning PID parameter, the comparative simulation between the proposed method, the PSO [44], the PSO-GWO [38], the WOA [45] and the SSO are performed according to fitness VOLUME 10, 2022    Table 2. The results obtained for the transient response analysis are shown in Table 3. Additionally, Table 4 shows the summary of the characteristic convergence which is the evaluated speed for each algorithm to approach the best fitness function with (29)-(30) according to [15].   where f (J i ) is the result of fitness function for each particle and N is the number of particle.
To verify the robustness based on the fitness function as (7), the comparative simulations of transient response analysis with 4 cases as shown in Table 1 by changing the operation point of DC motor for each algorithm are shown in Figures 13-16 and summarized in Table 5.   According to the comparative performance, the proposed method provides better performance than the PSO [44], the PSO-GWO [38], the WOA [45] and the SSO for all fitness functions except the fitness function in (7).  show the effectiveness of the proposed method compared   with others approaches. It is necessary to note that although the proposed method may provide the maximum overshoot greater than that of the PSO [44], the value of overshoot can be reduced by increasing the number of iteration of tuning. For the comparative convergence based on minimizing the fitness function, the proposed algorithm provides better results VOLUME 10, 2022   than the other algorithms. Regarding the comparative result of characteristic convergence as Table 4 caused by Figures 9-12, the proposed method has the shortest time approaching the optimal value compared with other algorithms such as the PSO [44], the PSO-GWO [38], the WOA [45] and the SSO for all fitness functions with the same initial value.
For comparative robustness by changing the operation point of motor, the proposed method provides better results  Figure 13, the proposed method obtains the better transient with no steady state error, less settling time and less rise time, while the transient response of the PSO [44] and the PSO-GWO [38] are slowly approaching the steady state. In addition, the WOA [45] and the SSO provide more settling time and rise time than the proposed method.
With respect to the comparative performance and robustness based on the DC motor control system, it is clear that the proposed NSPSO is effective in autotuning the PID parameter.

V. CONCLUSION AND DISCUSSION
The new method to autotune the PID parameter called the novel stable particle swarm optimization (NSPSO) algorithm is proposed in this paper to improve its performance, convergence, robustness, and stability. To check the performance and convergence, the comparison simulation based on DC motor is applied with different fitness functions such as IAE, ITSE, IST, OS, RT and ST. To test the superiority of robustness, the comparative simulation based on DC motor is applied with different operating points of DC motor, and finally the stability is tested according to the sense of Lyapunov stability. As seen in the comparative simulation based on the DC motor, the proposed method provides a grater result for performance, convergence and robustness than the PSO [44], the PSO-GWO [38], the WOA [45] and the SSO due to a reconsideration of the suitability of the remaining particle in the search space according to (12), which proves the stability according to the sense of Lypunov stability. This is included in the process of NSPSO for a newly generated new particle, while the other algorithms only try to modify the value of each particle in the search space. In other words, the performance of other algorithms depends on the initial value of each particle. Sometimes, in the unstable system, their value in the search space approaches the local minima. Therefore, the proposed method can handle unstable systems with respect to internal operation changes, and thus, the proposed theory can be claimed to perform in practical applications. The case of instability from external noise has not yet considered in this paper; however, this issue will be considered in our future research work by proposing the new algorithm of autotuning based on an unpredictable term.