Particle Swarm Optimization, Genetic Algorithm and Grey Wolf Optimizer Algorithms Performance Comparative for a DC-DC Boost Converter PID Controller

Power converters are electronic devices widely applied in industry, and in recent years, for renewable energy electronic systems, they can regulate voltage levels and actuate as interfaces, however, to do so, is needed a controller. Proportional-Integral-Derivative (PID) are applied to power converters comparing output voltage versus a reference voltage to reduce and anticipate error. Using PID controllers may be complicated since must be previously tuned prior to their use. Many methods for PID controllers tunning have been proposed, from classical to metaheuristic approaches. Between the metaheuristic approaches, bio-inspired algorithms are a feasible solution; Particle Swarm Optimization (PSO) and Genetic Algorithms (GA) are often used; however, they need many initial parameters to be specified, this can lead to local solutions, and not necessarily the global optimum. In recent years, new generation metaheuristic algorithms with fewer initial parameters had been proposed. The Grey Wolf Optimizer (GWO) algorithm is based on wolves’ herds chasing habits. In this work, a comparison between PID controllers tunning using GWO, PSO, and GA algorithms for a Boost Converter is made. The converter is modeled by state-space equations, and then the optimization of the related PID controller is made using MATLAB/Simulink software. The algorithm's performance is evaluated using the Root Mean Squared Error (RMSE). Results show that the proposed GWO algorithm is a feasible solution for the PID controller tunning problem for power converters since its overall performance is better than the obtained by the PSO and GA.


Introduction
Power converters have an important role in Industry applications; their main purpose is to regulate power in electronic appliances and adjusting current and voltage signals to desired levels by a high frequency switching control device [1,2]. One of the most significant modern applications for power converters is related to Renewable Energy Sources (RES), since the power generated for these sources highly depends on environmental conditions power converters are a reliable solution to stabilize output voltage and current of RES. A Boost Converter is an electronic device whose main purpose is to raise an input voltage and stabilize it to a desired highest level [3,4]. Since voltage regulation on power converters, and therefore, boost converters, depends on a switching signal, is needed a controller to generate a proper pulse width modulation (PWM) to modify the duty cycle of the switching signal. PID controllers are commonly used for this kind of applications, however, PID controllers need to be tunned prior its use [5]. The PID controller tunning can be a challenging task, many methods had been proposed for this purpose, from classical modeling and analysis based on system response [6] to modern techniques based on metaheuristic algorithms [7]. Nature had been an inspiration for modern metaheuristic algorithms, most of them based on animal behavior, for system design and control optimal parameters finding [8]. Bio-inspired algorithms imitate animal collective intelligence to explore, find, and exploit food and resources. Collective intelligence is the sum of individual behavior based on simple rules, and these behaviors and strategies can be translated into computational optimization algorithms. The most common bio-inspired algorithms are Genetic Algorithms (GA) and

ASTESJ ISSN: 2415-6698
Particle Swarm Optimization (PSO) algorithms. Among these bioinspired optimization algorithms applications are control of load frequency [9], systems optimal sizing and design [10], power flow applications [11], predictive control for microgrids based on renewable energies [12], power converters optimal design [13] and regulation for voltage [14]. In [15], an evolutionary approach using Symbiotic Organisms Search (SOS) algorithm, which is based on PSO algorithms and the trophic chain of the ecosystems, and a two-round fuzzy inference engine were presented for energy management in microgrids. Since PSO is general modeling for animal behavior, there had been developed and studied variants of PSO based on particular animal species [16,17]. Authors in [18] applied a Whale Optimization Algorithm for an optimal design of a PID controller for a DC-DC converter using a transfer function and step response approach to analise the system performance; they found beter transciente response in comparison to a compared GA algorithm, however, they did not considered fluctutanting input voltages or load changes. In 2014, the author presented the Grey Wolf Optimizer (GWO), based on hunting strategies of wolves herds [19]. The GWO had been studied in comparison to other optimization algorithms as well as some engineering applications. Authors in [20] applied GWO to a PID controller to optimize the system response of a steam pressure system, they found an improvement in system stability and response. In [21] the GWO was applied to a modeled levitation system, improving time domain response and reducing the system error in comparison to the PID tunning MATLAB tool. Also, GWO had been applied to power systems.
In this paper, an optimal tunning for a PID controller using the GWO algorithm applied to a boost converter is presented. The boost converter is modeled unsung state-space equations and then simulated in MATLAB/Simulink. The proposed GWO-PID tunned algorithm performance is compared with PSO and GA algorithms in terms of the RMSE and the system response for variable load and variable input voltage. The paper is organized as follows: Section 2 depicts the boost converter model and description. Section 3 presents the GWO, PSO, and GA optimization algorithm basis. Section 4 shows the optimization methodology for the boost converter. Section 5 summarizes the results and, finally, Section 6 are the conclusions of this study.

Mathematical model of the Boost Converter
The boost converter is an electronic device that rises input voltage to the desired highest output voltage. Voltage regulation is made by a PWM signal, applied to an inductor (L) and capacitor (C) arrangement, carried out by a fast-switching transistor that according to the control signal. Changes in the PWM signal modifies the L-C charge and discharge cycles and change the output signal [22]. The boost converter configuration is shown in Figure 1. Modeling of the boost converter was carried out using statespace equations, then MATLAB/Simulink software was used for simulation.
State-space equations were obtained employing Kirchhoff's voltage and current laws analysis for each system switching state determined by the u control signal value. Since u the signal can only adopt a 1 o 0 value, there are two possible Boost converter electric configurations, that correspond to charge and discharge cycles for the L and C elements. The two possible circuit configurations are condensed in a single matrix form of state-space equations as showed in (1).

Optimization Algorithms
A performance comparison between three optimization algorithms: PSO, GA, and GWO is presented in this paper, the main objective of this research is to get insights on the best optimization algorithm for PID controllers tunning applied to a power converter. A brief description of each of the optimization algorithms is presented in the following subsections.

Grey Wolf Optimizer
Wolves had a strong hierarchy inside their herds, they are organized in a group of 5 to 12 wolves. Each herd had a leading wolf, called alpha  wolf; secondary wolves called beta  wolves; wolves subordinated to  and  wolves are delta wolves  ; and finally, follower wolves are omega  wolves.
The optimization using the GWO is carried out in three main stages that mimic the hunting process of grey wolves' herds in nature: encircling, hunting, and attacking.

Encircling stage
In this stage, each wolf updates its position in the search space according to the relative best position to prey, dictated for  wolf. The encircling and corral behavior of the prey is modeled mathematically by (2)(3)(4)(5).
where A and C are vectors of coefficients, pos X vector is the position of the prey, X vector is the position of the wolf, t is current iteration, 1 r and 2 r values randomly generated between zero and one, and, vector a value decreases linearly according to iterations.

Hunting stage
The position of wolves is rearranged according to their proximity to the prey. The wolf with the closest distance to the prey is assigned to be the alpha  wolf, β and δ wolves are assigned according to their position to prey. Equations (6-8) describe the wolve position updating.

( )
where ( 1) i Xt + is the wolf that has the best position to the prey and i is the current iteration number of the GWO algorithm.

Attack stage
Attack to prey occurs when the heard is upon the prey, before this, it is necessary to minimize the distance between wolves and the prey. The prey is the optimization problem's best global solution. Must be defined as a vector A , shown in (3), to make a decreasing coefficient dependent on the iteration number. The vector A value is reduced as the value index a value is reduced according to (9).
The GWO pseudo code is as follows,

Particle Swarm Optimization
PSO algorithms are based upon the swarm behavior that some animal species show when they search for resources in their environment. Since PSO is based on collectiveness, each search agent must be modeled. For this purpose, agents are modeled as particles of a swarm, having their position relative to exploration space, velocity, and acceleration rates. At the beginning of the PSO algorithm, several particles are set up in a search space where somewhere in is the global solution for the optimization problem. Finding a global solution depends on the evaluation and minimization of the defined objective function. Iteration by iteration positions, velocities, and acceleration of particles are updated to converge to the global solution. For each particle, a fitness function is numerically evaluated. The best value obtained for all the particle's fitness function is called to be the best global best g . During the iteration process, each best particle fitness function value is called to be the personal best best p . During iterations, the speeds of the particles are accelerated toward the best global solution and the best personal according to (10).
Where n v is the speed update of particles, w is a factor of inertia whose value is decreased from 0.9 to 0.4 over time, 1 c and 2 c are coefficients of acceleration pointing to the best global and the best personal.

Genetic Algorithm
Genetic Algorithms are based on the genetic evolution process, imitating the genes mutation and crossover to create the bestadapted organisms to the environment. Mathematical modeling of these mechanisms allows the algorithm to refine solutions carrying out artificial genes crossover, while the mutation mechanism adds uncertainty to experiment with not expected genes, this makes the algorithm avoid local solutions where it could be trapped. During iterations, the best set of artificial genes is obtained, and therefore, a best-adapted species to the environment. The best group of genes for i generations are said to be the found best solution for the optimization problem.
GA can be expressed as a four-step algorithm, Step 1. An initial population is created. Crossover rate and mutation rate are randomly generated; generation number is setup.
Step 2. Is evaluated the defined fitness function for each set of artificial genes.
Step 3. Starts the crossover process and mutation process to set the next generation of artificial genes.
Step 4. Return to Step 2 until the stop criterion is reached.

Tunning of a PID controller for a Boost converter using optimization algorithms
PID controllers allow the system to operate near desired output values, ensuring good response in the face to possible disturbances. The proposed Boost Converter includes a PID controller for voltage regulation for load changes. The PID controller carries out proportional, integrative, and derivative actions to reduce and prevent error () et between output and reference signals of the system. The controller signal () ut is mathematically modeled according to (11).
In (11) p K , i T and d T are the proportional, integration time and derivation time constants, respectively. By adjusting the values of these constants, the error in the system can be reduced. The integration and derivative time can be expressed in terms of p K according to (12)(13)(14)(15).  (15). To minimize the Error () et the Root Mean Squared Error (RMSE) is defined to be the objective function for the optimization problem according to (16).
Where sim T is simulation time, () out v t is the output voltage of the power converter, and () reference v t is the reference voltage signal. The Figure 2 illustrates the overall flowchart for the optimization to find the values for the PID controller constant gains using the GWO, PSO, and GA, the first step of all three algorithms evaluated is to generate a random search agent population, that according to the algorithm is the number of wolves, particles, or gene population, then for each agent, the objective function is evaluated in an iterative loop until the best solution is found.

Simulation, results, and discussion
The optimization algorithms of GWO, PSO, and GA were implemented using MATLAB and Simulink software. Several simulations run for each of these algorithms were performed to find the best PID controller gains values. The difference between each run is the variation of the limits of the search space for the optimization variables, that is, different minimum and maximum values for each gain constant of the controller. A scan was made with different values to determine the search space with the best possible solution for the algorithms evaluated for this particular application. The Boost Converter configuration parameters are shown in Table 1. Since optimization algorithms require some constant parameters these values must be specified at the beginning of each test. One of the most significant benefits of using GWO is that fewer initial parameters are required in comparison to PSO and GA. The parameters initial values for each algorithm used in this work are shown in Table 2. For all three optimization algorithms, the search space limits for p K , i K and d K were varied from 0 to 100 for each PID controller gain. Factor of inertia 0.4-0.9 Weight of selfadjustment 3 Weight of social adjustment 1

Size of populations 50
Rate of crossover 0.9 Rate of mutation 0.6

Maximum generations 120
The Table 3 summarizes the PID controller constant gains obtained after the simulation process for each algorithm. The performance is evaluated using RMSE. As observed in Table 3, the obtained PID controller gains for all the three algorithms had no significant value for de d K constant, in this sense, the proposed controller built by the metaheuristic algorithms is a PI controller. Using (13) and (14) it is possible to calculate i T and d T for each PID controller tunned by the three algorithms, as shown in Table 3. For a greater i T than p K value a significative integrative action of the controller is observed according to (11) and (13); and when p K value is much smaller than d T the PID controller will have a small derivative action over the plant, according to (11) and (14). The controller performance evaluated by the RMSE shows that the GWO has the lowest error since its RMSE is about 50.89% lower than the one obtained by the PSO and 44.70% lower than the one obtained using the GA. Since the three evaluated algorithms differ in their search mechanisms, different convergence curves to the best solution found by GWO, PSO and GA algorithms were found. The Figure  3 shows the convergence curve for each of the evaluated algorithms for the Boost converter PID controller tunning optimization problem. As can be observed in Figure 3, the GWO algorithm is faster to get closer to the best solution set of p K , i K and d K in comparison to PSO and GA whose convergence curves are slower to decrease the resulting RMSE value.
Once the GWO was chosen as the best algorithm for this application, more simulation runs were made varying the search space limits for the optimization variables and with a different number of wolves to ensure a more refined PID gains constants optimal solution for the Boost Converter. The main results of this second round of tests made with the GWO are shown in Table 4.  Figure 4, response for each run, it is found that the system response of the fifth run, with an RMSE of 1.0683, has a faster response to achieve the reference voltage depicts the higher oscillation rates obtained. Best PID controller gains values must be selected according to the needs: a faster response with oscillations, or a slower response with fewer oscillations. The fifth run is chosen as the best solution since a faster response is desirable for this application. Once the best solutions for the three evaluated algorithms were chosen, a test of the performance to varying load conditions was carried out to evaluate the system response for the GWO, PSO, and GA tunned PID controller. In Figure 5 the system response for variable load and variable input voltage condition comparison is shown for each algorithm best solution.
As observed in Figure 5, the PID controllers tuned by PSO and GA have similar system responses, presenting important oscillations for load R=15 Ohm. The input voltage to the converter is a signal that varies over time between 11.7 and 12.3 V for the time scale used. The PID controller tunned using the GWO has a better performance to stabilize system response under load and voltage changes in comparison to GA and PSO, despite having a slightly slower response than the other algorithms.

Conclusion
In this paper, the tunning of a PID controller for a boost converter was presented. Three algorithms were implemented and compared for this purpose using MATLAB/Simulink: PSO, GA, and GWO. The power converter is modeled using state-space equations. Several simulations are performed to find optimal values. Results are evaluated using the RMSE and the system response for variable conditions of input voltage and load at the output of the power converter. The GWO-PID tunned controller had the best performance with an RMSE about 50.89% lower than PSO and 44.70% lower than GA. The differences between the obtained RMSE using the three algorithms showed in Table 3, gives insights on the greater susceptibility of PSO and GA to be trapped in local optimum solutions, while the lower RMSE value obtained using the GWO algorithm for the same search space limits indicates that this algorithm manages in a better way to circumvent a greater number of local optimum solutions to find a better optimal solution than the PSO and GA algorithms for this application. After the controller was tunned using each algorithm and the best gain constants were found, the system response was evaluated under input voltage and load changes. The system response for variable load also showed a better performance for the GWO with fewer oscillations for load changes in comparison to PSO and GA. Also, the GWO algorithm had the advantage over the PSO and GA that GWO requires fewer configuration parameters for the optimization process. However, the PID tuned through the GWO was a little slower to reach the reference voltage than the other algorithms. This work gives insights into the GWO algorithm for controller design and control applied to power converters