Evolutionary algorithms based tuning of PID controller for an AVR system

In this paper, an evolutionary algorithm based optimization algorithm is proposed with new objective function to design a PID controller for the automatic voltage regulator (AVR) system. The new objective function is proposed to improve the transient response of the AVR control system and to obtain the optimal values of controller gain. In this paper, particle swarm optimization (PSO) and cuckoo search (CS) algorithms are proposed to tune the parameters of a PID controller for the control of AVR system. Simulation results are capable and illustrate the effectiveness of the proposed method. Numerical and simulation results based on the proposed tuning approach on PID control of an AVR system for servo and regulatory control show the excellent performance of PSO and CS optimization algorithms.


INTRODUCTION
Automatic voltage regulator plays a crucial role in power system so as to regulate the output voltage at a nominally constant desired voltage level. In power generator, the function of AVR is to ensure the voltage from the power generators to be running smoothly and also to maintain the stability of the voltage from the generators. The stability of the AVR control system is an important issue since it can critically impinge on the security of the power system. The excitation system ought to responsible for the effective voltage control and improvement of the system stability [1]. The excitation system not only controls the output voltage of the generator and also controls the power factor and magnitude of the current. In most of the exciter system a thyristor-based system is employed to provide a controlled output voltage to the exciter. In most of the industrial applications the proportional-integral-derivative (PID) controller has been commonly used because of its simple configuration, trouble-free implementation and good performance in a large range of operating conditions. Nevertheless, effective and suitable tuning of the PID controller's parameters has been relatively difficult because many industrial processes are frequently affected by problems such as higher order, time delays and nonlinearities [2][3][4].
The tuning of PID controller had been done through conventional methods over the past decades. The conventional method for tuning of PID controllers such as Ziegler-Nichols (Z-N) and Cohen-Coon techniques are producing only stable tuned parameters with some oscillation and overshoot output response. In order to avoid the shortcomings of the conventional tuning methods, soft computing techniques like Artificial Neural Network and Fuzzy logic approaches have been proposed in the literature [5,6]. Evolutionary algorithms-based approaches are also proposed to tune the parameters of PID controller in many applications in literature. Petchinathan et al. has proposed a combination of PSO and bacterial foraging algorithm for optimal tuning of the PI controller [7]. Recently, Multidynamics Algorithm for Global Optimization  [8], Ant Colony Optimization (ACO) [9], Hybrid Biogeography based Optimization (BBO) [10], Simultaneous Perturbation Stochastic Approximation [11], African buffalo optimization algorithm (ABO) [12] Invasive weed optimization (IWO) [13,14] and PSO algorithm [15] has proposed for tuning of PID controller parameter in various control applications.
In recent literature many evolutionary optimization algorithms are proposed for tuning PID controller in the AVR system such as Anarchic Society Optimization [16], reinforcement learning automata optimization approach [17], real coded GA with fuzzy logic technique [18], Choatic ant swarm algorithm [19], Artificial Bee Colony algorithm [20], Hybrid GA-Bacterial Foraging (BF) algorithm [21] and local unimodal sampling algorithm [22]. GA and Ant Colony Optimization techniques are proposed to tune the parameters of FOPID controller in controlling of AVR system. In some of the research papers novel performance criteria has been proposed for optimal tuning of PID and FOPID controller in AVR control system. A novel performance criterion comprises of overshoot, settling time, steady state error and mean of time weighted integral absolute error has been proposed for optimal tuning of PID controller in AVR system using cuckoo search algorithm [23]. A. Sikander et. al, 2018 has proposed a cuckoo search algorithm based fractional order PID controller for AVR system with performance criterion which was proposed by Gaing et. al in 2004 [24]. In this research work, Cuckoo search (CS) and particle swarm optimization (PSO) algorithms are proposed to find the optimal parameters of PID controller in the control of automatic voltage regulator (AVR) system with new performance criterion comprises of Integral absolute error, rise time, settling time and peak overshoot. The performance of this new proposed performance criterion is compared with performance of other performance criterion such as ITAE, ITSE, ISE, MSE and IAE. The paper is mainly organized such that section two describes about the Automatic Voltage Regulator (AVR) system; section three examines the Cuckoo search (CS) algorithm and particle swarm optimization (PSO) algorithms; section four and five concentrate on the application of CS-PID, PSO-PID and conventional tuning method (Ziegler-Nichols) in optimal tuning PID controller for both servo and regulatory control of AVR system. Additionally, section six describes conclusions of the study.

AUTOMATIC VOLTAGE REGULATOR
The Automatic Voltage Regulator (AVR) is a very important module to maintain the terminal voltage of any power generators since it adjusts the exciter voltage of the power generators. The AVR system is to continuously observe the terminal voltage of power generator under various loading conditions at all times by ensuring that the generator's voltage operates within the predetermined limits. The AVR system consists of four main parts, namely amplifier, exciter, generator and sensor. The real model of AVR system [20] is illustrated in Figure 1. In order to model the four aforesaid components and determine their transfer functions, each component must be linearized by ignoring the saturation and other nonlinearities and also considering the major time constant. The estimated transfer functions of these components may be represented by mathematical as follows [12]: The transfer function model of the amplifier is represented by where T V denotes the generator terminal voltage. The constants g G and g  are load dependent, g G could vary from 0.7 to 1.0 and g  between 10 and 400. The time constant e  of an amplifier ranges from 1.0 to 2.0 s. (full load to no load). Finally, the transfer function model of the sensor can be represented by a simple first order transfer function, given by,  Table 1. Make use of the above models, the AVR block diagram is controlled by PID controller is shown in Figure 2.   Figure 2. Block diagram of the AVR system controlled by PID controller

EVOLUTIONARY ALGORITHMS
Many evolutionary algorithms are reported in literature for tuning of PID controller parameter in many applications. In this paper, particle swarm optimization (PSO) and cuckoo search (CS) algorithms are proposed for optimal tuning of PID controller in AVR system. The basics of these proposed algorithms are as follows:

Particle swarm optimization (PSO) algorithm
PSO algorithm was developed by Mr. James Kennedy and Russell C. Eberhart in 1995 [25,26]. PSO is implemented based on the biological behaviour of some animals to chase the alive habits through swarm intelligence. Some of the attractive features of PSO are easy to implement and also no gradient information is required. It can be used to solve a wide array of different optimization problems. It has the population of swarms that is allowed to move in the search space according to a framed formula. The movement of the swarm population results in the best-known position of the swarm's population. The process is repeated till the best satisfactory solution is obtained. The choice and selection of PSO parameters have a large impact on optimizing performance and yields the best result.
The PSO algorithm consists of a collection of particles that move in the region of the search space influenced by their own best past location and the best past location of the whole swarm or a close neighbour. Each iteration a particle's velocity is updated using: is the new velocity of the i th particle, C 1 and C 2 are the weight factor for the local best and global best positions respectively. P i (t) is the i th particle's position at time. best i P is the i th particle's best-known position and gbest P is the best position well-known to the swarm. The rand() function generates a uniform random value between 0 and 1. The variants in the (5) consider best positions within a particles local neighbourhood in time. A particle position is updated using:

Cuckoo search (CS) algorithm
The CS algorithm was developed by Mr. Xin -Shang and Susah Deb in 2009. It is implemented based on the unique behaviour of the bird cuckoo. The initial population taken is the number of cuckoos and its eggs. Cuckoo will search and lays its eggs in the nests of other host species. It will seek for the best nest from the accessible nests. It relies on three attitudes namely it lays one egg at a time, and the nest with best eggs can be agitated over next bearing for hatching, the accessible amount of host nests is fixed. Based on this cuckoo hatching address the optimized solution is acquired for the problem. The best exercise amount is called from the traversed solutions. Therefore, a situation, in which the greatest numbers of eggs are saved, is the parameter which the cuckoo search intends to optimize it. For simplicity in describing a Cuckoo Search algorithm, the following three idealized rules are used [27]:  Each cuckoo lay one egg at a time, and dump its egg in the randomly chosen nest;  The best nests with high quality of eggs will carry over to the next generations;  The number of available host nests is fixed, and the egg laid by a cuckoo is discovered by the host bird with a probability P a ∈ [0, 1]. Based on these three rules, the basic steps of the Cuckoo Search (CS) algorithms can be summarized as the pseudocode shown in Figure 3 [27].
When generating new solutions X(t+1) for, say, a cuckoo i, a Lévy flight is performed. Lévy flight is one of the well-known flights behaviour of many animals and insects.
where, α > 0 is the step size which must be related to the scales of the problem of interests. Mainly, we can use α = 1. In the (7) is basically a random walk stochastic equation. In most cases, a random walk is a markov chain whose next location only depends on the current location ) (t X i and the transition probability (the second term in the (7)). The product ⊕ means entry wise multiplications. The random walk via Lévy flight is more efficient in exploring the search space since its step length is much longer in the long run. Lévy flight will make sure the system will not be trapped in a local optimum. CS algorithm is a population-based algorithm and it is similar to GA and PSO, but in CS algorithm the number of parameters to be tuned is less than GA and PSO, and thus it is probably more common to adapt to a wider class of optimization problems.
Integral Absolute Error: where e(t) is the error signal in time domain. In process of tuning of PID controller, the controller parameters are adjusted to minimize the error signal or to minimize the value of above mentioned objective functions (8)(9)(10)(11)(12). In order to improve the time response analysis by reducing rise time, overshoot and settling time and to get better response of the controller, the combined objective function has been formulated by using IAE, time domain specifications such as rise time, settling time and peak overshoot and the weight factors. The weighing factors are bent by an agency of assuming iterations for altered amount of weights and accepting the weight agency with better performance. The performance of proposed combined objective function (in (13)) has been compared with other existing objective functions. The weighting factors for this research work are considered as w 1 =40 and w 2 =20 using trial and error procedure. The formulated equation for the combined objective function is as follows:  

IMPLEMENTATION OF TUNING OF PID CONTROLLERS--SETPOINT TRACKING
In this paper, tuning of PID Controllers has been implemented and simulated using Ziegler-Nichols (Z-N), Cuckoo Search and Particle Swarm Optimization algorithm for the control of AVR system.

Ziegler-nichols (Z-N) method of tuning
The Z-N method is a conventional closed loop method for tuning of PID controller. This technique is also called as an ultimate cycling method which is based on adjusting a closed loop time response until sustained oscillations occur. Then controller settings are computed based on the information from the closed loop response. The performance of AVR system has been analyzed by implementing Z-N tuning method for tuning the parameters of PID controller. The transfer function model of amplifier, exciter, generator and sensor has been derived. By using this derived transfer function, the Matlab-Simulink model of the closed loop AVR system with PID controller has been developed as shown in the Figure 4. The controller gain values and the derived time response specifications are given in Table 2. The response obtained using the Z-N method is represented in the Figure 5.

CS algorithm-based tuning
In this research work, the cuckoo search algorithm has been implemented for improving the performance of the PID controller. The parameters considered for CS algorithms are as follows: Number of nests (n) = 25, Discovery rate of alien eggs (Pa) = 0.25, Total number of iterations = 100. In this work, various objective functions are considered for optimal tuning of PID controller as mentioned in the (8) to (12). For each objective function, the cuckoo search algorithm is simulated for 10 numbers of times. The optimized PID controller parameters and time domain specifications are recorded for each run. After 10 number of runs, the average value of PID controller parameters and time domain specifications for each objective function are tabulated in Table 3. The step response of closed loop AVR control system for each objective function is shown in Figure 6. From the Table 3 and Figure 6, it has been concluded that, the performance of the CS algorithm based PID controller with IAE objective function is produced better response with less overshoot, rise time and settling time. Based on the comparative performance analysis and performance of various objective functions (8) to (12), the new combined objective function has been formulated as mentioned in (13). In order to improve the performance of PID controller, in this combined objective function time response specifications are also considered along with IAE and weight factor. The CS algorithm based PID controller with combined objective function is simulated for the 10 number of iterations. The performance of combined objective function is compared with the performance of IAE objective function. From the comparative analysis shown in Table 3 and Figure 6 it has been concluded that, the performance of combined objective function based PID controller has yielded a better response with improved peak overshoot, rise time and settling time.

PSO algorithm-based tuning
From the CS algorithm-based tuning it has been proved that, IAE and combined objective function-based tuning has produced better performance for the set point tracking problem. In order to ensure the effectiveness of the CS algorithm in tuning of PID controller, the performance of the CS algorithm is compared and analyzed with PSO algorithm in this work.The PSO parameters are selected as follows: dimension (d) = 3, population size = 25, maximum number of bird step = 100, cognitive factor (C 1 ) = 1.2, social acceleration factor (C 2 ) = 1.2, inertia weight factor (w) = 0.9.
The comparative performance analysis of CS and PSO based PID tuning with Z-N tuning is shown in Table 4. From the Table 4 and the Figure 7, it has been concluded that, the evolutionary algorithm has produced better performance than the Ziegler-Nichols method. Among the proposed evolutionary algorithms, the Cuckoo Search algorithm has yielded a better response than the PSO algorithm with better time response specifications in the set point tracking problem.

IMPLEMENTATION OF TUNING OF PID CONTROLLERS-DISTURBANCE REJECTION
The AVR system has been implemented so far in this paper for the set point tracking problem. In order to analyse the performance of evolutionary algorithm-based tuning of PID controller, the disturbance rejection problem also realized in this research work. The CS, PSO and Z-N methods based PID controllers have been implemented to solve the disturbance rejection problem. In this work, IAE and combined objective function has been considered as an objective function for CS and PSO based tuning of PID controller. Because these two objective functions were produced better performance in set point tracking problem. The Simulink model of the AVR system for the disturbance rejection problem is shown in Figure 8. In this simulation study, both positive and negative input disturbance has been introduced in the AVR system after reaching steady state in between 3 to 4 sec as shown in Figure 9. The output response of disturbance rejection problem using CS, PSO and Z-N method-based tuning of PID controllers for proposed objective functions is shown in Figure 9. From the Figure 9 it has been concluded that, the combined objective function-based CS algorithm tuning has produced better performance than PSO and Z-N based tuning. Figure 8. Matlab-simulink model of AVR system with PID controller for disturbance rejection problem Figure 9. The Closed loop response of sthe AVR system for disturbance rejection using ZN, CS and PSO based tuning

CONCLUSION
In this work, tuning of PID controller parameters using CS, PSO and Z-N methods present in the control of AVR System. The proposed method finds out the optimal parameters of PID controller by solving the optimization problem for minimizing the objective function comprising IAE, rise time, settling time and peak over shoot. From the numerous results of simulation, it has been concluded that, CS algorithm based tuning yields better controller performance than PSO algorithm-based tuning and it is far better than conventional Z-N method. From the Figure 7 and Table 4 it has been shown that, the percentage peak overshoot has been abundantly reduced to 0.0853 % in CS with combined objective function than 32.421% in the Z-N method. Similarly, the time domain specifications have been richly counterbalanced by the application of the CS algorithm and the performance of the AVR control system has also been abundantly improved.  ISSN: 2088-8708