Enhancement The Dynamic Stability of The Iraq's Power Station Using PID Controller Optimized by FA and PSO Based on Different Objective Functions Ghassan Abdullah Salman, Husham Idan Hussein, Mohammed Saadi Hasan Department of Electrical Power and Machines Engineering, Diyala University, Diyala, Iraq. E-mail: hishamhussein40@gmail.com Abstract. The paper demonstrates how to improve the dynamic stability of a synchronous generator in combination with on excitation system by utilizing a Proportional Integral Derivate (PID) controller. It presents two methods of determining optimal the PID parameters to improve the power angle and terminal voltage of a synchronous generator: i.e. the Firefly Algorithm (FA) and Particle Swarm Optimization (PSO). These methods are used to determine the optimal PID controller parameters required to minimize various performance indices as objective functions. Two objective functions are considered for optimization: the Integral Absolute Error (IAE) and the Integral Error (ISE). The results obtained from conventional PID, FA-PID and PSO-PID, it shows that the FA-PID performed better than the conventional PID and PSO-PID. The result analysis demonstrates that FA-IAE better and more efficient by tune the PID parameters than FA-ISE, PSO-IAE and PSO-ISE. Keywords: dynamic stability; excitation system; Firefly Algorithm (FA); PID controller; Particle Swarm Optimization (PSO); objective functions Izboljšava dinamične stabilnosti sinhronskega generatorja z uporabo krmilnika PID in optimizacijskih metod FA in PSO V prispevku smo predstavili izboljšanje dinamične stabilnosti sinhronskega generatorja v kombinaciji z vzbujevalnim sistemom z uporabo krmilnika PID. Uporabili smo algoritem obnašanja kresnic (FA) in optimizacije rojev delcev (PSO) pri določitvi optimalnih parametrov krmilnika PID za izboljšanje kota moči in priključne napetosti sinhronskega generatorja. Z obema algoritmoma smo določili optimalne parametre PID za minimizacijo različnih indeksov zmogljivosti. Za optimizacijo smo uporabili dve kriterijski funkciji. Eksperimentalno smo potrdili, da z algoritmom FA-PID dobimo boljše rezultate kot z algoritmom FA-PSO in konvencionalnim krmilnikom PID. 1 INTRODUCTION The study of the dynamic stability of modern power systems is one of the most important challenges. The power system control is to maintain a reliable and quality supply power. The power system is stable when there is a balance between the power demand and the power generated [1, 2]. The constants needed to coordinate the operation between of synchronous generator connected to infinite bus bar and on excitation system were developed by [3] and then by [4]. Power system problems are still solved by utilizing the PID type controller. In optimal PID tuning gains is required, under different operating states, to get the desired level of robust performance. For on optimal PID tuning, a Particle Swarm Optimizer (PSO) is used in [5, 6]. In [7, 8] using the Firefly Algorithm (FA), the optimal PID tuning is implemented. In the paper we present results of our study of the dynamic stability of a synchronous generator combined with an excitation system and utilization of FA and PSO for tuning the PID parameters to minimize two different objective functions, i.e. the Integral Absolute Error (IAE) and the Integral Square Error (ISE). 2 MODELING OF A SYNCHRONOUS GENERATOR COMBINED WITH ON EXCITATION SYSTEM In [3] and [4], the coupling effects of the synchronous generator and the excitation system are described. The dynamic stability of the Iraqi Derbindikhan power plant combined with an AVR system is studied. Figure 1 shows the transfer function model of a synchronous generator coupled with an AVR system. The relevant parameters are presented in Table 1. According to [9, 10], the following equations are used for coupling: ATe = K1A5 + K2AEq AEq = K3, q 1 + K3TdoS AE K3K4 FD 1 + K3TdoS AS AVt = KSA5 + K6AEq (1) (2) (3) Figure 1. MATLAB/Simulink model of the Generator and AVR system. K6 = Table 1. Parameters of the synchronous generator and AVR system. Vt[Rg+(Xe+XqXXe+Xa)] Xe(Xe+Xq))] [VdXqRe + Vq (R2e + (9) Parameters of the Parameters of the AVR synchronous generator system Re = 0.00407 Ka = 50 Xe = 0.2037 Ta = 0.06 Xd = 1.2 Ke = 1 Xq = 0.69 Te = 0.46 Xd = 0.38 Kf = 0.1 Tdo = 5.14 II Tm = 1.059 SE1 = 0.0039 M = 9.4 SE2 = 1.555 D = 1 Vrgf = 1.0282 3 MODELING OF THE PID CONTROLLER Due to its uncomplicated and simple implementation, the PID controller is one of the most successful efficient and widely used control instrument in the industry. Based on [8, 11], Figure 2 shows a typical structure of the conventional PID controller. Constants Kx - K6 are calculated using the following equations: K = V^q(Xq-Xd) Re+(Xe+Xq)(Xe+Xa) [(X2 + Xq) sin 5 - R2 cos 5] + V^Id(Xq-Xa) Re + (Xe+Xq)(Xe+Xa) -- [(X2 + Xd) cos 5 + R2 sin 5] + Re + (Xe+Xq)(Xe+Xa) (4) k2 = [(X2 + Xd) cos 5 + R2 sin 5] Figure 2. Block diagram of the PID controller. Re+(Xe+Xq)(Xe+Xa) IdR2(Xq-Xd) + EqR2] _ Re+(Xe+Xq)(Xe+Xa) Re+(Xe+Xq)(Xe+Xa) v^(Xa-Xa) [iq (R2 + (X2 + Xq)2) + K (5) (6) The transfer function of the PID controller described with regard to the Laplace domain is: GpiD(s)=U(S) = kP+ir+kds (1°) K4 = 4 Re+(Xe+Xq)(Xe+Xa) [("2 Ks = V^VaXq 5 Vt[Re+(Xe+Xq)(Xe+Xa)] [("2 [(X2 + Xq) sin 5 - R2 cos 5] (7) [(X2 + Xd) cos 5 + R2 sin 5] — R2 cos 5] -2 VmVqXa-^ [(X2 + Xq) sin 5 — Vt[R| + (Xe+Xq)(Xe+Xa)] LV 2 where U(s) is the control signal and E(s) is the error signal. These are the difference between the input and feedback. kp is the proportional gain, k; is the integration gain and kd is the derivative gain. The output of the PID controller in terms of the time domain is: (8) u(t)=kpe(t)+ki/0te(t)dt+kddf) (11) i V„E where u(t) is the control error signal and e(t) is the tracking error signal; both are in the form of the time domain. The effect of the IAE and ISE objective functions on optimization parameter is studied. The IAE and ISE functions are defined as: IAE = /0t[|e1(t)| + |e2(t)|]dt ISE = JOtUei)2© + (e2)2(t)] dt (12) (13) The optimization functions IAE and ISE are minimized and subjected to: k™" < kp < k™* k;fin < kd < k;fax k" < kj < kmax and (14) intensity of light. The following equations describe implementation of FA: xn = x old + ß(xj -Xj) + a (rand-1) (15) The firefly movement is represented by equation (15). The first term is the firefly's current position. The second term represents the firefly's attraction to the light intensity. The third term describes the firefly's motion when there are no brighter fireflies. Coefficient a is a randomization parameter determined by the problem of interest while rand is a random number generator uniformly distributed in space [0, 1]. ß = ßoe- (m > 1) (16) 4 OPTIMIZATION TECHNIQUES Our main objective is to control the power angle and terminal voltage of the Derbindikhan power plant by using modern heuristic techniques which play an important role in controlling the power system performance. Conventional by the first step is to tune the controller parameters which is, unfortunately, not applicable in practical systems. As a result, powerful mathematical optimization methods are used for PID parameters tuning. The most reliable ones, i.e. PSO and FA, are population-based optimization techniques. 4.1. Firefly Algorithm (FA) where r is the distance between any two fireflies, y is an absorption coefficient that regulates the decrease of the light intensity p is the initial attractiveness at r = 0. rij = llxi X = Jük=i(xu xj,k) (17) Term Xik is the kth component of spatial coordinate Xi of the ith firefly; d is the number of dimensions. Figure 3 shows a flowchart of the FA-PID based on the IAE or ISE objective. 2 Developed by Xin She Yang in 2007, FA is based on the natural swarming behavior of animals such as schools of fish, swarms of insects and birds. Regarding the social light-flashing ability of fireflies (or lighting bugs) in the skies of tropical regions, FA is a meta-heuristic optimization algorithm inspired by nature [12, 13]. FA has three idealized rules based on some of the main flashing abilities of fireflies. They are: a. Being unisex, fireflies are drawn to more attractive, brighter, individuals regardless of their sex. b. The firefly's brightness is directly related to the degree of its attractiveness. The brighter it is the more attractive it is to other fireflies. As its distance from the fireflies increases, its brightness diminishes. This is because the air absorbs its light. If no firefly shines brighter than an individual firefly in the vicinity, it will move about at random. c. The value of the objective function of a given problem determines the brightness or the intensity of the light a firefly emits. For optimization problems, the value of the objective function is proportional to the 4.2. Particle Swarm Optimization (PSO) Kennedy and Eberhart developed PSO, a modern heuristic algorithm in 1995 [14]. It effectively solves in the PSO method, continuous and nonlinear optimization problems. A swarm made up of individuals called particles is defined by its velocity and position [5, 15]. Every particle in the swarm knows the global best (gbest), ie. the location with the best objective value in the swarm. Each particle at each point along its path, compares the objective value of its personal best (pbest) to that of (gbest). If a particle has a (pbest) that has a superior objective value than the current(gbest), the current (gbest) is replaced with that particle's (pbest). Its movement is halted when all particles approach a position in the swarm with the best objective function. By updating the positions and velocities of particles, the algorithm can search for an optimum solution in a specified search space. The following equation is what each particle utilizes to initialize its positions and velocities: xk+1 = xk + Vk+1 (18) V k+1 _ wVik + ciri(pbest i - Xk) + c2r2(gbest i - Xk) (19) w = ■ maxiter-iter (20) Where Xk is the position of a particle at a k iteration, Xk+1 is the position of a particle at a k+1 iteration, Vk is the velocity of a particle at a k iteration, Vk+1 is the velocity of a particle at a k+1 iteration, w is the inertia weight parameter, , r1 and r2 are a random number in the interval; c1 and c2 are the learning factors [0, 1]. Figure 3 shows a flowchart of PSO-PID based on AIE or ISE objective function. Figure 3. Flowchart of FA or PSO for the PID controller. 5 RESULTS AND DISCUSSION Figure 4 shows a synchronous generator model connected to an AVR system and implemented with a PID controller in a MATLAB/Simulink. Figure 5 shows the results of a power angle simulation first carried out with and with no PID controller. Figure 6 shows the terminal voltage with and with no PID controller. The values of the PID controller obtained with the conventional method are shown in Table 2. The graphs are shown only for the first 50 seconds for the power angle and for 10 seconds for the terminal voltage though the simulation took 60 seconds. Table 3 shows the maximum peak, setting time, minimum peak and final value fo r the po we r angle . Tab le 4 shows the maximum deviation, peak time, settling time and steady state error for the terminal voltage. Figure 4. MATLAB/Simulink model of the Generator and AVR system with a PID controller. Power Angle without and with PID i i i i -1- C'ELwilhouPO —"DELvrthPID ,f\ \ \ \ \ 1 \ / * \ / \ \ » \ \ \ \ \ » 1 \ J \ V , / / / V / /v / / / / _________\ , / / A / 5 10 15 20 25 30 40 45 50 Figure 5. Power angle with and with no PID controller. Terminal Voltage without and with PID r ^ -- wilrnul PID «V«