Implementation of Particle Swarm Optimization (PSO) Algorithm for Tuning of Power System Stabilizers in Multimachine Electric Power Systems

: The application of artiﬁcial intelligence-based techniques has covered a wide range of applications related to electric power systems (EPS). Particularly, a metaheuristic technique known as Particle Swarm Optimization (PSO) has been chosen for the tuning of parameters for Power System Stabilizers (PSS) with success for relatively small systems. This article proposes a tuning methodology for PSSs based on the use of PSO that works for systems with ten or even more machines. Our new methodology was implemented using the source language of the commercial simulation software DigSilent PowerFactory. Therefore, it can be translated into current practice directly. Our methodology was applied to different test systems showing the effectiveness and potential of the proposed technique


Introduction
Electric power systems (EPS) are continuously evolving towards more complex systems considering the incorporation of non-conventional renewable energies (NCRE), flexible AC transmission systems (FACTS) and distributed generation. Thus, it is necessary to have appropriate control devices that allow to ensure a better dynamic response. In this context, one current and future challenge is the tuning of controller parameters that guarantee the best response of the system to perturbations and events that might represent a risk for the stability of the electric system.
In the specialized literature, there are a number of articles referring to the tuning of power stabilizers, where different tools are used as fitting methodology. In reference [1], a tuning of the PSS gain is carried out, using the root locus method. In [2], an optimal power system stabilizer (OPSS) is presented, based on a linear quadratic design which uses a conventional phase delay structure of the classic PSS. In [3], a new control design in the frequency domain is proposed by using a Nyquist diagram. In [4], the authors have presented a systemic tuning of the PSS for different input signals using a double-objective optimization function. In [5], a design method for the parameters of the PSS controllers is proposed, through a modified Heffron-Phillips model which allows the definition of the PSS structure and the tuning of the multi-machine electric power systems parameters.
Besides the methods previously mentioned, in the international literature, it is possible to find other methodologies that use some form of metaheuristics to determine the optimal values of the PSS parameters. Generic algorithms is one of the most commonly used techniques, of which it is possible to mention the following: In [6,7] the NSGA II, genetic algorithm has been used to obtain the optimal design of a multi-machine electric power system. In [8], a genetic local search (GLS) is presented for the tuning of the power stabilizers. Reference [9] proposes an adjustment to coordinate and adjust/regulate the flexible ac transmission systems (FACTS) and the PSS.
In [10], a NSGA-II genetic algorithm was used to achieve the optimal parameters of the PSS controllers for a determined point of operation with a renewable energy source so as to increase and guarantee the damping of the system. Certainly, genetic algorithms have been one the most used heuristics to solve the tuning of the PSS. However, there are diverse optimization techniques such as the Tabu search [11], the Firefly algorithm [12,13], the Seeker Optimization algorithm (SOA) [14], the Simulated Annealing algorithm (SA) [15], the Artificial Bee Colony (ABC) [16], the Genetic Programming algorithm [17], the Collective Decision Optimization algorithm (CDO) [18], the Cuckoo search algorithm [19], or the Gradual Hybrid Differential algorithm (GHDE) [20].
There is also research on fitting work based on the behavior described in nature and other tools that have been systematically developed over time. References [21,22], based on the bat echolocation behavior, use theBAT search algorithm for the optimal design of the PSS power system stabilizers of the multi-machine electric systems.
In reference [23], an optimization method known as the Hyper-Spherical Search (HSS) is proposed, and the results obtained from the HSS algorithm, genetic algorithms, and conventional PSS are compared. In [24], the Backtracking Search algorithm (BSA) is presented; it is an optimization technique to solve the designing problem of power stabilizers for multi-machine electric power systems. In [25], a Differential Evolution algorithm (DE) is employed to search for the optimal controller parameters. Reference [26] presents the Bacterial Foraging Optimization algorithm (BFOA) for the coordinating and simultaneous fitting of the PSS power systems stabilizers, and a Static Var Compensator (SVC) in multi-machine electric systems. In [27], the application of a Variable Neighborhood Search algorithm (VNS) is proposed for the synchronized fitting of the PSS controller parameters and a Thyristor Controlled Series Capacitor (TCSC) to improve the damping of the power oscillations. In reference [28], the Ant Lion (ALO) algorithm is represented to carry out a robust fitting of the PSS controllers and the power oscillation damping controller (POD) of the FACTS systems in presence of a remote control.
In [29], a metaheuristics based on the Mean Variance Mapping Optimization (MVMO) is used. The proposed objective function improves the damping coefficient.
The Particle Swarm Optimization or PSO is a technique inspired by the natural movement and intelligence of a flock of birds and a shoal of fish and was first introduced by Eberhart and Kennedy in 1995 to graphically simulate the movement of a swarm. According to [30], the main idea of this optimization technique is to move a predefined number of particles through the searching space to find the best solution. The movement pattern of the particles towards the best solution is defined by the social interaction between the individuals and the population. The PSO is also used as a heuristic technique to determine the optimal values of the PSS parameters; some of the publications associated to these concepts are presented below.
As shown in [31,32], the author uses as an optimization technique the PSO to find the optimal parameters of the PSS in the test system of three machines and nine bars, besides using two objective functions to optimize. In [33], the particle algorithm is used to design a lead-lag controller. In [34], PSO is chosen for tuning of a PID-based PSS. Another application of the PSO is presented in [35], where it is used to carry out the optimal location of a STATCOM and then a tuning of the PSS parameters. It is important to mention that in this last publication, both the location of the STATCOM and the PSS tuning have been treated as separated optimization problems.
Another interesting application of the PSO is given in [36], where a hybrid algorithm is designed that includes a particle warm optimization (PSO) and the Bacteria Foraging Optimization algorithm (BFOA) also called Bacterial Swarm Optimization (BSO) for the tuning of the PSS power system stabilizers of multi-machine electric systems. The hybrid algorithm proposed is compared to the BFO and PSO algorithms, and the corresponding results validated with the results obtained from BFOA and PSO. In the research presented in [37,38], a coordinated design of the PSS is presented, considering the test system of a machine connected to an infinite bus.
In [39], an optimal model reference adaptive system (MRAS) is shown, in which the parameters are fitted through the PSO technique. The MRAS model is compared to a conventional PSS controller to demonstrate its advantages. In [40], an optimal location and fitting of the PSS controllers is carried out for the Kundur two-area test system, through the PSO technique. The research previously mentioned has the particularity of being able to develop a communication between Matlab and DigSilent PowerFactory to fulfill the previous objective, and the results obtained are validated through the latter software. Most studies are focused on PSO of parameters of PSS controllers for systems with a relatively small number of machines. For instance, in [41], the authors work with a 4-machine system.
This study intends to propose a synchronization methodology for power stabilizers of multi-machine electric systems by using a PSO heuristic optimization technique. The element that differentiates this work from other studies reported in the international literature is that the search algorithm was designed in the commercial software DigSilent PowerFactory. This is particularly relevant for the system operators that require to perform modeling and fitting for large-scale multi-machines where the Matlab interface with DigSilent PowerFactory is not used for dynamic studies.
The present research is structured as follows: Section 2 presents the description of the problem and the corresponding strategy to solve it. Section 3 contains the methodology considered in the implemented numerical method. In Section 4 the case studies and results obtained are shown. Finally, Section 5 discusses the conclusions and suggests possible directions for future work.

Description of the Problem
An EPS as the one in Figure 1 can be described through a set of nonlinear differential and algebraic equations as described in Equations (1) and (2).
where x ∈ R n represents the state variables, y ∈ R m the algebraic variables, and p ∈ R d the parameters associated with the control systems of the dynamic systems. In general, one of the challenges of the EPS operation is to determine the optimal values the parameters forming the set of vectors belonging to p should have by using a given search criteria. In general, the typical structure of vector p i associated to i machine is of the form . Because of the numerical difficulty to directly analyze the system defined by Equations (1) and (2), the dynamic system will be linearized around a stable operating point defined by the power flow. Therefore, the following linear equivalent system is obtained: To represent the controllers parameter dependency in the stability study, Equation (3) must be represented as: According to the classic analysis of linear systems, the stability system (4) is defined by the matrix eigenvalues analysis Asys(p), which are obtained by solving: where I is the identity matrix and λ represents the eigenvalues vector of the system (3). From a classical study of stability in permanent regime [42], the system of Equation (4) will be stable, if and only if all the eigenvalue real parts obtained from Equation (5) have a negative real part. Therefore, the PSS play a fundamental role from a EPS stability point of view, since they allow to derive the real parts of the eigenvalue to a left complex half-plane. However, because of the large number of variables an equation system can have (4), it is not easy to find the best PSS parameter combination that ensures the system's stability by using an analytic approach. In this context, search algorithms based on heuristic methods allow to obtain parameter tuning which do not always find the optimal values; however, they allow to take full advantage of the potentiality of PPS controllers. For the present work a heuristic approach method is presented. It is known as PSO and programmed in DPL of the commercial software DigSilent Power Factory.

Optimization Problem
To find the correct tuning of the PSS, PSO was employed to solve a bound constrained optimization problem. There seems to be trade-off among the damping of the various oscillation modes. When trying to improve the damping in a particular mode, it may cause problems with other oscillation modes. The objective function of this optimization problem should penalize the eigenvalues with low damping factor or with a positive value for the real part. To solve this issue with a single-objective PSO, all the objectives in conflict were combined as a weighted average.
Preliminary tests were carried out demanding that all the eigenvalues move towards the left of the imaginary axis. This did not produce significative improvement. To have a relaxation of the problem, it was demanded that only the eigenvalues with worse real part or worse damping factor that the reference values, σ 0 , ξ 0 , were affected by a quadratic penalization. These reference values should amply satisfy the stability criteria. Therefore, solutions that get close to the reference values will be stable too. Thus the resulting optimization problem is as shown in Equation (6).

P)Min
where σ i , ξ i are the real part and damping factor of i-th eigenvalue; α is the factor that regulates the relative importance of the two terms of the objective function. A constant value has been set for parameter T ω = 10 s.

Algorithm Used for Fitting the PSS Parameters
In Figure 2, the algorithm that allows to fit the PSS parameters is presented by using a multi objective function previously indicated. The algorithm is capable of carrying out a combined tuning of all the parameters forming the PSS controller.
This study aims at implementing the PSO algorithm using the programming language of DigSilent PowerFactory. The algorithm designed in DPL contains the following steps

•
Step 1: Definition of parameters of the PSO algorithm, such as: N 0 of generations, N 0 of particles, N 0 of controllers, objective function constant, initial speed, limits of the controller parameters, etc.

•
Step 2: From the parameters entered in stage 1, the program creates the initial population; this is a set of vectors and matrices which will be updated during the iterative process.

•
Step 3: The iterative process starts where the charge flux and modal analysis for each particle is calculated. Moreover, it has to be validated that not only the adopted values do not foster the emergence of unstable oscillation modes but also that the proposed fittings meet the restrictions established in Stage 1.

•
Step 4: During this stage the optimization process starts. Firstly, the complex eigenvalues are filtered by oscillation frequency and damping factor. Once the fitting is obtained for every iteration, the proposed set in the objective function is evaluated, establishing the best solution for every particle and every generation.

•
Step 5: After completing the optimization process, the plant models of the system generators under study are loaded with the optimal controller parameters and the values of the objective function for each iteration are shown.
The main objective of the present work is to fit power stabilizers simultaneously so as to control and dampen the electromechanic oscillations that emerge in power systems. Therefore, a methodology considering different operation scenarios (light and heavy load) will be developed. This will be carried out considering that the system should respond to different events during daily operation.
The analysis of the case study operations, in normal conditions and facing different perturbations, will be carried out by using the modal analysis tool and the corresponding results validated by an analysis of transitory stability (dynamic simulation). For each case, the performance of the system is evaluated by the PSS parameter fitting synchronized through the proposed PSO algorithm.
The methodology defines and evaluates a multiobjective function by the PSO heuristic technique, to analyze a performance indicator, which will be in this case the damping factor. Those oscillations having a 5% damping (ξ > 5%) in normal conditions and a 3% (ξ > 3%) in case of perturbations will be satisfactorily damped. Calculate the objective function for each particle of the current population For all particles, the best local particle and the best global particle must be determined Step 1 Step 2 Step 3 Step 4 Step 5

Case Study
In this section the case studies in which the tuning methodology was applied to fit the power stabilizers are presented. Our methodology was implemented using the source language of the commercial simulation software DigSilent PowerFactory. It is important to mention that the tuning was carried out only under normal operation conditions.

•
System I: IEEE 3-machine, 9 bus system. In Figure 1 an unilinear diagram of the 3-machine, 9-bus system is presented.
In Figure 5 a unilinear diagram of the 16-machine, 68-bus system, is presented.
It is not intended by the present work to determine the optimal location of the PSS controllers; thus, it is considered to include stabilizers in all the machines in order to globally improve the system's stability.
Therefore, by using the proposed tuning methodology to test thesystems, the egenvalues of the system and the damping for each eigenvalue are obtained by using DigSilentFactory.
The following sections present the results obtained for the 4 study cases. The PSO variables, fitting and function of the objective functions during the iterative process are also shown.

Results Obtained for System I
For the 3-machine, 9-bus system, the variables shown in Table 1 were considered. Upper limit of inertial coefficient 0.7

W min
Lower limit of intertial coefficient 0.5

C1 max
Upper limit of C 1 parameter 0.8

C1 min
Lower limit of C 1 parameter 0.2 C2 C 2 parameter 0.3 The suggested values for each of the variables can be found in reference [40]. For this study it was considered a 80-generation, 150-particle system. The optimal parameters obtained under these conditions are shown in Table 2. In Figure 6 the objective function evolution for the 3-machine, 9-bus system, during the iterative process is presented.

Results obtained for System II
For system II, the variables shown in Table 3 were considered. Upper limit of inertial coefficient 0.7

W min
Lower limit of intertial coefficient 0.5

C1 max
Upper limit of C 1 parameter 0.8

C1 min
Lower limit of C 1 parameter 0.2 C2 C 2 parameter 0.3 The optimal parameters obtained under the previous conditions are shown in Table 4.  Figure 7 it is possible to observe the objective function behavior of the 4-machine during the iterative process.

Results Obtained for System III
For system III, the variables found in Table 5 were considered. Upper limit of inertial coefficient 0.7

W min
Lower limit of intertial coefficient 0.5

C1 max
Upper limit of C 1 parameter 0.8

C1 min
Lower limit of C 1 parameter 0.2 C2 C 2 parameter 0.3 In this system, the particle vector has a magnitude of 50, as it has 10PSS and 5 parameters to tune. The optimal PSS parameters for system 3 are shown in Table 6. In Figure 8, the objective function behavior for system III during the iterative process is shown.

Results obtained for System IV
For system IV, it were considered the PSO variables presented in Table 7. Upper limit of inertial coefficient 0.7 W min Lower limit of intertial coefficient 0.5

C1 max
Upper limit of C 1 parameter 0.8

C1 min
Lower limit of C 1 parameter 0.2 C2 C 2 parameter 0.3 In this system, the particle vector has a magnitude of 80, since it has 16 PSS controllers and 5 parameters to tone. The optimal parameters under the previously mentioned conditions are shown in Table 8.
With the fitting of the stabilizers presented in Table 8, the system reaches a minimum damping of 3%, which is not enough according to the tuning approach/methodology used. In Figure 9, it is possible to notice the objective function behavior in the 16-machine, 6-bus system during the iterative process.

Analysis and Validation of Results
The following section aims at validating the results obtained so as to verify that the proposed fitting improves system stability.
Because of the high non-linearity of the equations that describe the PES systems, evaluating the system from a linear perspective is not enough to fully study the response of the system to the PSS fitting. Because of this, it is necessary to carry out dynamic modelling based on time control to validate the results obtained from a non-linear point of view.
To validate the results of system I (3-machine) and III (10-machine) two case studies were compared, where case I was defined as the fitting proposed in references [5,11], respectively, while case II was defined as the tuning proposed for the present study.
In order to validate the results of system II, case I was defined as the no-controller system, whereas case II was defined as a two-area system with four active and tuned PSS. For the validation of the results of system IV, case I was considered as the system described in [40], which considers only one PSS controller in generator 9. On the other hand, for case II a 16-machine with a PSS controller and the fitting proposed for this research was considered.
From a small signal perspective, the damping for each of the systems will be analyzed, where the proper value will be calculated by using the modal analysis function of the DigSilent PowerFactory. To analyze the systems under study from a non-linear perspective, dynamic modelling will be carried out with three-phase faults in different locations of the PES to analyze the performance of the PSS controllers.
Finally, the eigenvalues in the complex plane for different operation conditions are presented, so as to analyze the fitting for other operation points and the real parts closer to the origin.

•
Eigenvalues of the linearized system Table 9 displays the eigenvalues of system I, with the respective oscillation frequencies and damping factor:  Table 9 it can be seen that in system 1 there are two pairs of high-frequency, low-damping oscillation modes (1-2 and 3-4) which do not belong to the electro mechanic mode classification and that are present in case 1 as well as in case II. Thus, this is explained as this oscillation modes are not affected by the damping actions of the power stabilizer and are related to other control action.
However, it is possible to notice that for case I, because of the inclusion of power stabilizers, two unstable oscillation modes appear, which are a product of the fitting proposed in case I. Nevertheless, after fitting the PSS controllers with the proposed case, the electro mechanic oscillation mode damping increases, moving the eigenvalues towards the left of the complex plane.
In Figure 10 the comparison among the eigenvalues of case I and case II can be appreciated. • Dynamic response of the system.
To validate the results obtained, three 3-phased faults were modeled in bus 4, bus 7, and bus 9, in order to analyze the dynamic response of the oscillation modes (see . Each fault has been applied in t = 1 [s] and cleared in 5 cycles, that is to say, t = 1.1 [s]. Henceforth, color blue will show case I and color red case II.

3.
Three phase fault at bus 9. • Heavy and light load conditions.
Thirdly, the eigenvalues of the system for heavy and light load are presented, where an increase and reduction of the 20% for each load was considered. Both cases are displayed in Figures 14  and 15, respectively.  From the above presented figures, it can be seen that the proposed tuning for case II provides a response in which the system is stable; however, it does not reach the 3% damping of the oscillation modes, similarly to the operational normal condition. However, it is possible to notice that for case I, the system has values with a positive real part for both heavy and light loads. Therefore, the fitting proposed for this study improves the stability of the system for the simple contingency conditions. Table 10 presents the eigenvalues of system II with the respective oscillation frequency and damping. It is possible to notice in Table 10 how the tuning of the power system stabilizers improves the damping of the eigenvalues, increasing the minimum damping to a 25.55% in the proposed case. Additionally, it can be seen that the eigenvalues from Table 10 correspond to the electro mechanic modes, thus the damping action by using PSS controllers is effective.

System II Análisis: 4-Machine System
The above mentioned situation can be visualized in Figure 16: • Dynamic response of the system.
For this system two three-phase faults were modeled in order to validate the results. The first one is a three-phase fault in 50% of circuit 1 of line 7-8 (see Figure 17), while the second one is a three-phase fault in 50% of circuit 1 of line 8-9 (see Figure 18). Both faults occur at t=1 [s] and are cleared off at t=1,1 [s] (5 cycles). The reference machine of the system was not analyzed in this study.
As a complement of the previous analysis, the eigenvalues obtained for system II under simple contingency conditions are presented; in particular, circuits 1 of line 7-8 and line 8-9, respectively, will be taken out of service, as can be seen in Figures 19 and 20.  From the above figures, the proposed fitting can be noticed, providing a good system response since the damping eigenvalues exceed the minimum 5% proposed in the methodology.

System III Validation
• Eigenvalues of the linearized system.
In Table 11, the eigenvalues of system III are presented with the respective oscillation frequency and damping.
In Table 11, it is possible to see how the proposed tuning considerably improves the damping of the system's eigenvalues. Similarly to system II, the oscillation modes showing low damping correspond to electro mechanic modes; hence, the damping action of the PSS controller is effective. Figure 21 displays the comparison between cases I and II.  • Dynamic response of the system.
In Figures 22-24 the dynamic responses of system III are presented. For this system, three 3-phased faults in buses 15, 29, and 39 were modeled. Each fault has been applied at t = 1.0 and cleared at t = 1.1 [s] (5 cycles). The dynamic response of generators 5, 7, and 9 will be analyzed as they are those in which the optimal location of the PSS is proposed, as seen in reference [11].

3.
Three phase fault at bus 39. It is possible to clearly visualize that for each system, the proposed tuning improves the non-linear system response, not only in the rotor angle but also in the active power of the synchronic machines to the three modeled contingencies considered in the present study.
• Heavy and light load conditions.
In Figures 25 and 26, the eigenvalues for the heavy and light load conditions are presented considering a 5% increase and reduction of each load for each case.

System Iv Validation
• Eigenvalues of system IV. Table 12 displays the eigenvalues for system IV with the respective oscillation frequency and damping.
From Table 12 it is possible to see that some of the eigenvalues of system IV for case I do not reach the minimum damping; therefore, it can be established that the proposed fitting significantly improves the stability of the system, although it does not reach the minimum 5% damping established in the methodology.
Similarly to the abovementioned cases, it is possible to notice that the eigenvalues presenting low damping correspond to electro-mechanic modes validating the damping action of the PSS controller.
The previous situation can be clearly seen in Figure 27.  • Dynamic response of the system.
For this system, and in order to validate the results, two 3-phase faults were modeled. The first one is a three phase fault in 50% of line 18-50 (see , whereas the second one is a three phase fault in 50% of line 60-61(see . Such locations were considered as these transmission lines transport large amounts of energy, and they respectively connect two areas of the system under study. Each fault has been applied at t = 1 [s] and cleared at t = 1.1 (5 cycles) [s] 1.
Three phase fault at Line 18-50

2.
Three phase fault at Line 60-61   • and heavy load operation conditions Finally, the eigenvalues of the system for heavy and light operation conditions are presented considering an increase and decrease of 5% for each load. The response of the system is shown in Figures 34 and 35.  From the above presented figures, it is possible to see that the suggested fitting improves the stability of the system for both heavy and light load conditions. However, it does not reach the minimum 5% damping.

Conclusions
The investigation carried out was developed because of the necessity power systems have in maintaining the synchronism among generators when facing contingencies and the inclusions of AVR with high gains in the plant model. Within this context, a correct synchronization of power stabilizers can contribute to minimize the oscillations produced by power systems.
In the present work, a tuning of power stabilizers was conducted, using a PSO algorithm designed in DPL and implemented in different study systems. In the three machine system-nine-bus, not good results were obtained since the system has two high-frequency controllers, which fall outside the search space of the algorithm, and also they move around the same complex plane area during the iterative process. An explanation of this is that these oscillation modes are associated to another control action or merely that the system has in fact a poor design. However, after including the power stabilizer, the PSO is able to find a stable parameter combination, taking to the left the unstable oscillatory mode, which appears when including the PSS.
In relation to the other two systems studied, a great stability improvement was reached with the proposed adjustment, in which all the oscillatory modes present a damping over 5% established as the minimum damping in the synchronization methodology.
In system 5, similarly to the above presented studies, the PSO algorithm finds a fitting which allows to notoriously improve the stability of the system in contrast to the base case. Nevertheless, the proposed fitting does no reach the minimum 5% damping ratio established in the synchronization methodology proposed in the paper.
This research intends to carry out, using the PSO technique, both a synchronization as optimum search of power stabilizers and to conduct a synchronization with other devices improving the stability in presence of small perturbations (FACTS, HVDC, SVC, etc). Besides, it is intended to carry out an adjustment of the PSS controllers for the Sistema Eléctrico Nacional de Chile, which has around 50 homologated PSS.