Optimal SSSC-based power damping inter-area oscillations using firefly and harmony search algorithms

The static synchronous series compensator (SSSC) can add a series reactance to the transmission line, and when it is fed using auxiliary signals, it can participate in damping inter-area oscillations by changing the series reactance. In this paper, the effect of the SSSC on small-signal stability is investigated. The design of a controller for damping oscillations is designed and discussed. Moreover, using the firefly and the harmony search algorithms, the optimal parameters controlling SSSC are addressed. The effectiveness of these two algorithms and the rate of SSSC participation in damping inter-area oscillation are also discussed. MATLAB software was used to analyse the models and to perform simulations in the time domain. The simulation results on the sample system, in two areas, indicated the optimal accuracy and precision of the proposed controller.

Inter-area oscillations are common phenomena in the interconnected power systems; therefore, damping of these oscillations have become one of the main difficulties in the power system. To date, this issue has been addressed by the power system stabiliser (PSS). However, the conventional PSS is based on local signals and cannot effectively dampen inter-area oscillations that occur within the power system; therefore, adaptive and robust methods for designing PSS are needed 1 . On the other hand, the use of flexible alternating current transmission systems (FACTS), which can control the impedance of the power flow on transmission lines and the bus voltage, is a novel solution 2 . Among different series power electronics-based FACTS controllers, the static synchronous series compensator (SSSC) is one of the best alternative means to improve power oscillation damping. It is based on a voltage source converter connected to a transmission line in series, and it adds the sinusoidal voltage along the q axis into the line current. Thus, the SSSC can use a series reactance with a transmission line, and this reactance can be inductive or capacitive. Using auxiliary signals in the SSSC controller can improve the damping of inter-area oscillations by altering the impedance of the transmission line. In Wang and Du 3 , an ideal controller is assumed, and the SSSC is used to damp small-signal oscillations based on the Phillips-Heffron model. In Darabian and Jalilvan 4 , the SSSC risk model was applied to use a conventional PSS power stabiliser to eliminate oscillations. In Norouzi and Sharaf 5 , two voltage regulation strategies were compared with the SSSC, and Kumar and Ghosh 6 proposed a controlling structure for SSSCs. In Bongiorno et al. (2008) 7 , the structure proposed in Kumar and Ghosh 6 was used, and instead of changing the rotor speed as a control signal, transmission line power variations were used to detect the presence of high influences in wind farms. In Shen et al. 8 , an adaptive neural controller was used to improve the control of damping small-signal oscillations with SSSC.
In Xia et al. 9 , suggested a damping control design for an interline power flow controller (IPFC) comprise two voltage sourced converters (VSCs) to maximize voltage-stability limited power transfer and damp power swings.
Scientific RepoRtS | (2020) 10:12176 | https://doi.org/10.1038/s41598-020-69123-7 www.nature.com/scientificreports/ In another major study, Xia et al. 10 , offered a new computation method to regulate the dispatchable control modes of the convertible static compensator (CSC) in a power system. Xia et al. 11 , proposed a stability improvement using VSCs based FACTS device. The paper shows that the FACTS devices have the ability to increase the transient power transfer capability of a transmission system under abnormal conditions. Xinghao et al. 12 , proposed two sensitivity approaches including an injected voltage source formulation and the equivalent impedance formulation in the dispatch and placement of FACTS devices. In Aranya 13 , to mitigate interarea oscillation in large power systems, wide-area damping control using dynamic clustering and TCSCbased redesigns is presented. The method involved coherent clustering using Synchrophasors and designing controllers to attain preferred damping between the clusters. The suggested controller contains three steps. Model reduction, aggregate control and control inversion are these three steps.
In this paper, the effect of SSSC on small-signal stability of a multi-machine power system is investigated, and a control structure is proposed for the SSSC compensator. Modal analysis and time-domain simulation are done on a two-area sample system. Finally, the system, which is located in two areas, is simulated with optimised stabilisers by harmony search and firefly algorithms, and the ability of these two optimisation methods to improve small-signal stability is evaluated.
The remainder of this article is arranged as follows: Part II is dedicated to the SSSC voltage regulator. The effects of the SSSC on the small-signal stability of the power system and the proposed controller are presented in "SSSC effect on small-signal stability" and "SSSC damping controller", respectively. In "Intelligent random optimisation algorithms", i.e., the firefly and harmony search algorithms 14 , are introduced. In "two-area system", optimisation of the proposed controller parameters is performed, and the simulation results on sample systems are shown in "Optimising SSSC parameters". The final section presents our conclusions. Fig. 1, a single-machine infinite bus system with SSSC is presented. The voltage generated by the SSSC is controlled by the pulse-width modulation (PWM) method to ensure that the voltage is always in line with the q axis relative to the line current 15 . Therefore, the SSSC can act as a capacitor or inductor in the system. The magnitude of the PWM controls the degree of compensation, and the phase angle determines the type of compensation: capacitive or inductive 16 .

SSSC modeling. In
The PWM voltage-generation diagram is shown in Fig. 2. The magnitude of the PWM signal is obtained from multiplying the SSSC-measured AC by the AC generated in the reference reactance. The X sdelta is calculated using the proposed controller in the fifth section. The phase angle of the PWM is obtained by the synchronous phase angle, and a proportional-integral (PI) controller keeps the DC voltage constant so that the active power exchange between the power system and the SSSC is zero. As a result, the phase angle generated by the diagram  www.nature.com/scientificreports/ in Fig. 2 ensures that the voltage phasor and flow phasor of the transmission line are perpendicular to each other and that the SSSC behaves like a reactance.
SSSC effect on small-signal stability. The ability of the power system to maintain the synchronism of synchronous generators during small disturbances is called small-signal stability 18 . The single-machine infinitebus system in Fig. 1 is considered for the analysis of small-signal stability in which the dynamics of the synchronous generator stator are ignored 8 . Moreover, to maintain the simplicity, the dampers and resistances of all synchronous generator rotors are ignored. As a result, only a differential equation for the excitation circuit voltage plus two differential equations for the rotational motion of the synchronous generator remain, as expressed in (1).
where p is the first-order derivation, �ω r is rotor speed variations, H is inertial constant, T m is mechanical torque, T e is electromagnetic torque, K D is mechanical damping coefficient, δ is rotor angle, ω 0 is rated turbine speed, fd is excitation circuit's flux linkage, R fd is excitation circuit's resistance, E fd is the excitation output voltage, L adu is non-saturation mutual inductance between the rotor and axis d of the stator and i fd is Excitation current.
For a full presentation of the state model, T e and i fd must be expressed in terms of the state variables. For electromagnetic torque: where ad and aq are the flux linkage components between the stator and the rotor on the d and q axes, respectively and i d and i q are stator currents. The equation for the flux linkage of the excitation circuit is: where L fd is the self-inductance of the excitation circuit. Mutual flux linkage relations are also expressed in Eq. (4) such that L ads is the interactive saturation inductance between the rotor and stator.
Stator voltage equations are also described in (5), where e d and e q are the voltage components of generator's terminal on the d and q axes, respectively. For the terminal voltage in the rotor synchronous reference frame: where L is the stator leakage inductance. Because of how the turbine is connected to the infinite bus, the following relations govern: The variable X E is the equivalent reactance of the transmission line, and e bd and e bq are infinite bus voltage components. To analyse the small signal, the state equations of the system must be linearised. According to the method presented in 16 and considering the effect of the SSSC on the small-signal stability, the variable X E , which represents the change in the transmission line reactance, is defined in the linearization of the system. After the linearization of relations (5) and (6); rewriting the relations (2), (3) and (4); and inserting the block of the small-signal stability into (6); the single-machine infinite-bus (SMIB) system is obtained as presented in Fig. 3.
In Fig. 3, the conversion function excitation system between G ex (s) and G(s) is the conversion function of the SSSC damper controller. The K constants are defined as k 1 to k 6 as in 8. If SSSC is responsive to rapid changes in X delta , then the red lines in the block diagram of the system indicate the impact of the SSSC. Coefficients K X1 , K X2 , and K X3 include: and the coefficients n 3 , n 4 , m 3 , and m 4 include: (1) K X1 = (n 3 + n 4 )(ψ ado + L aqs i do ) − (m 3 + m 4 )(L ads i qo + ψ aqo ) www.nature.com/scientificreports/ The participation of the controller of the SSSC compensator in increasing system damping occurs through the blocks K X1 , K X2 , and K X3 . As shown in Fig. 3, the participation of K X1 is direct, but that of K X2 and K X3 is indirect through the first-order post-phase blocks. Based on reference 2 , the effects of K X2 and K X3 are negligible relative to K X1 , and when the SSSC damper controller is designed, the G(s) function adds a zero-or 180-degree phase shift, depending on the sign of K X1 . For multimachine systems, relations (1) to (6) are transformed into matrix relationships and constants K are converted into a matrix or vector with the corresponding variables in different machines. The diagram in Fig. 3 remains valid, but for each block matrix, the variables between the turbines are coupled. Fig. 4. The low pass filter for removing high frequencies from variations in the signal uses the speed of the generator. The frequency range in smallsignal stability is from 0.1 to 2 Hz; therefore, the cutoff frequency of the low-pass filter is considered as 10 Hz.

SSSC damping controller. The SSSC damping controller is shown in
The washout filter also acts as a high-pass filter, which allows the high-frequency oscillations to pass through but eliminates the stable state and removes the damping blocks in the steady state. Therefore, these two filters ensure that the controller only responds to the frequencies in the studied range of small-signal stability.
Intelligent random optimisation algorithms. Optimisation, random search, and evolutionary algorithms are new and efficient methods to find optimal solutions to problems 19 . The randomness of these algorithms prevents them from being trapped in local optima. In practical optimisation problems, such as engineering design, organisational management, and economic systems, the focus is on obtaining optimal and general solutions. Many of these algorithms are inspired by biological systems; the firefly algorithm (FA) is one example.
Firefly algorithm. The FA was presented in 2005, and the theoretical bases for this algorithm were developed in 2006-2008 20 . This algorithm searches for an optimal solution to the problem by modelling the behaviour of a set of fireflies. FA allocates values related to the location fitness of each firefly as a model for firefly pigments and updates their location in successive repetitions of the algorithm 21 . The two main phases of the algorithm in each replication are updating the pigment and motion. Fireflies move to other fireflies in their vicinity that have more pigment. Accordingly, during successive iterations, the set tends to provide a better answer.
Mass intelligence, as it occurs in natural communities, is the result of actions that are carried out by individuals according to local information. Typically, the behaviour of the masses leads to more complex and massive targets. Examples of this phenomenon include ants, honeybees, birds, etc. The decentralised decision-making mechanisms in these and other natural species inspired the design of large-scale algorithms for solving complex (8)   www.nature.com/scientificreports/ problems such as optimisation, multi-criteria decision making, and robotics. In this section, an algorithm based on the firefly social behaviour has been investigated.
Initialising the fireflies. The FA is initiated by randomly placing an n-member population of fireflies at different points in the search space. Initially, all fireflies have the same amount of luciferin as member 1. Random values must first be selected for the independent variables of the problem. Each replication of the algorithm includes an update phase for luciferin and another for fireflies.
Updating luciferin. The amount of luciferin in each firefly is determined during each iteration, depending on the fitting of its location. Thus, during each iteration, a value is added to the current luciferin of each firefly according to the amount of fitness determined for that firefly. In addition, to model the gradual decrease of the residual value, the amount of current luciferin is reduced by a factor of less than 1. In this way, the relationship between luciferin updates is as follows: where li(t), li(t − 1) , and J(xi(t)) are the new luciferin value, the previous luciferin value, and location fitness of firefly i in repetition t of the algorithm, and ρ and γ are fixed numbers for modeling the gradual decline and the effect of fitness on luciferin, respectively. At this stage, the fitness of each member of the population must be calculated. Accordingly, the fitness of each member of the algorithm population is the value of the objective function defined for the problem with the values of the independent variables attributed to the fitted firefly.
Firefly motion. During the motion phase, each firefly moves toward one of its neighbours with higher luciferin probabilistically. For each firefly, i probabilities of moving to a brighter neighbour j are defined as follows: where N i (t) is the set of fireflies neighbouring firefly i at time t , d ij (t) is the Euclidean distance between the firefly i and j at time t , and r di (t) indicates the neighbouring range of the variable related to firefly i at time t . Assuming that firefly j is selected by firefly i (with probability p ), the discrete-time equation of the firefly can be written as follows: where xi(t) is the m dimension vector of firefly i location at time t, the �x i (t) − x i (t)� operator shows the Euclidean norm, and s is the hop size.
Updating the neighbourhood range. By assuming R o is the initial neighbourhood range for each firefly, the neighbourhood range of each firefly is updated during each iteration of the algorithm as follows: where β is a constant parameter and n t is a parameter for controlling the number of neighbours.
Stop criterion. If the stop criterion for the algorithm is not met, then the algorithm will perform another iteration. Of course, the stop criterion can be defined as a fixed number of iterations to reduce the speed and precision of the estimation of K variables. Each firefly with the highest fitness value is considered as the output of the algorithm.
It should be noted here that global optimization approaches have regularly shown improper slow convergence rates because of their random search, particularly near the area of the global optimum. The firefly algorithm may not find the actual optimal if it started from a different initial condition. Consequently, it is needed to investigate the effect of this uncertainty in the damping performance. In this regard, the hybrid algorithms can benefit from the advantages of both methodologies and alleviate their inherent disadvantages are of interest. Future studies on the current topic are therefore recommended. Using this approach, during the initial optimization stages, the hybrid algorithm starts with an algorithm to find a near-optimum solution and accelerate the convergence speed. The searching process is then switched to FA and the best solution found by another algorithm will be taken as the initial starting point for the FA and will be fine-tuned. In this way, the hybrid algorithm may find an optimum solution more quickly and accurately.
Harmony search algorithm. Over the past decade, to overcome the computational deficiencies of mathematical algorithms, evolutionary or metaheuristic algorithms, such as annealing and genetic algorithms, have been invented and simulated. However, searching for more powerful algorithms remains a challenge for engineers. The harmony search (HS) algorithm is a powerful search algorithm for finding the optimal answer 22 .
In composing music, several musicians collaborate with different instruments. Their goal is to produce beautiful music. During this collaborative process, each musician attempts to choose the best music performance each time to create better music. The beauty of music improves during collaboration. Typically, an attempt is made to evolve the music at each stage so that harmony is created between musicians. www.nature.com/scientificreports/ Over time, the musicians produce a musical piece by playing different harmonies. After playing several pieces, the musicians recall the pieces they have played (the harmonies of that piece). Suppose that there are K harmonies composed by n musicians, and it is assumed that the size of each musicians' memory (HMS) is equal to K harmony. Therefore, according to the following equation, a matrix with k rows (the number of memorised harmonies) and n + 1 columns, in which n is the number of musicians (the number of variables affecting the problem), and a column for the value of that harmony considering the fitness function is considered. The matrix is called the HM, or the harmony memory.
This algorithm consists of five steps: (1) Initialising the optimisation problem and initial parameters (2) Initialising harmony memory (3) Creating a new, improved harmony (4) Updating harmony memory (5) Repeating steps 3 and 4 until the final condition is satisfied or the desired number of iterations is completed (6) Optimising the control parameters of the SSSC damper.
To increase the damping of the studied system, two filters and a pre-phase/post-phase compensator block are located in the designed controller. The coefficients and time constants of the low-pass filter blocks and the washout filters are determined according to the studied frequency domain. Therefore, the cutoff frequency of the low-pass filter is considered as 10 Hz, and the test range in the small-signal stability is 0.2-2 Hz. The time constant of the phase compensator and compensator gain are considered as optimisation parameters. The optimal values of these parameters make it possible for the SSSC damper controller to have the maximum effect in eliminating the low-frequency oscillations of the power system. Thus, the optimisation vector is defined as follows: This vector is the input to the optimisation algorithm. A reasonable range for the search space is determined by the change in the variables of the algorithm. By maintaining the integrity of the problem, the following intervals are expressed for the input vector: To increase the damping of the system and reduce inter-area power oscillations, two control signals are considered. The first signal is the rotor angle variation of the generators, and the second signal is the power variation in the inter-area transmission line. Therefore, for each of these control signals, a proportional objective function is defined that ITAE criterion is considered in designing these functions.
where P 1,2 is the inter-area power oscillation in the transmission line 23 . The purpose of using intelligent algorithms is to minimise the defined objective functions according to the range of variation in the control variables 24 , and minimising each objective function equals the maximum damping of the system and the minimum number of small-signal oscillations.

Results and discussion
Two-area system. To investigate stability in the power system, a two-area power system with SSSC is considered. This system, shown in Fig. 5, is simulated in a Matlab-Simulink software environment. Synchronous generators are modelled as a sixth-order model and the SSSC converter.
The system consists of two similar areas connected by a weak transmission line. Each area consists of two interconnected synchronous generators rated at 900 MVA and 20 kV. The voltage of the transmission line system is rated at 230 kV, and in the normal state without the SSSC, 340 MW of active power is transferred from the first to the second area. Synchronous generator No. 3 is considered as the base. The amount of active power of each synchronous generator and the voltage of turbines are given in Table 1.
To check the stability of the power system, 3-Phase-to-earth short circuit fault is placed in the middle of the line, which is released after a period. Figure 6 shows the rotor angle of the turbines, mechanical speed of each turbine rotor, turbine connection bus voltage, and inter-area transitional power oscillation.
During a system failure, the system becomes subject to undamped oscillations. According to the oscillations in turbine velocity shown in the following Figure, the turbines in each area oscillate and divide the system into two areas. However, the unstable inter-area mode that is simulated and exists in the power system is visible in the transmission line power oscillations. These oscillations have 180 degrees of phase difference in the two areas, and their domain increases with time. The frequency of the inter-area oscillations in the two-area system is 0.7 Hz. In  www.nature.com/scientificreports/ the first scenario, a traditional PSS power stabiliser is added to Area 2, and the system is then re-examined. The signals used in the PSS are ∆ω3 and ∆ω4. The values of the KSTAB, TW, T1, and T2 parameters are 10, 2.8, 0.024, and 0.34, respectively. The 3-Phase-to-earth short circuit fault is applied as before. In Fig. 7, the oscillations in turbine velocity are shown. The first and the last of the line bus voltages and the transmission power oscillations from the first to the second area are shown. Accordingly, the system is divided into two areas; however, due to the use of a synchronous PSS, the two areas are retained. In Fig. 6h, the signal of PSS applied to the system and   www.nature.com/scientificreports/ the system excitation in the second area are illustrated. In the third scenario, an SSSC is added to the inter-area transmission line. The values of its parameters and the proposed parameters for the damper controller are listed in Tables 2 and 3, respectively. Firstly, to investigate the damping effect of different signals on inter-area oscillations, three signals; i.e., the transmission line oscillations, the velocity of the first area, and the velocity of the second area, were selected, and the simulation was performed using these three signals. The simulation was conducted using the dPline signal, which changes the inter-area transmission line power. The 3-Phase-to-earth short circuit fault is applied in the upper line. Figure 7a shows the transient power oscillation signal. In Fig. 7b, the signal generated by the proposed damper controller is shown. Figure 7c shows the flow injected into the line according to the signal given by the damper controller, and Fig. 7d shows the turbine velocity. The area signals are used by the damper controller to generate the signal that ∆ω 1 used in Fig. 7e and the signal that ∆ω 3 used in Fig. 7g, h. To choose the most effective signal to improve damping, the results of these three signals are compared. Figure 7k shows the power oscillation in the transmission line in all three modes. The use of the signal indicating a change in turbine velocity has a greater effect on damping oscillations than the signal from the transmission line. Moreover, the first area signal has higher stability than the second area signal. According to these results, ∆ω 1 use has been used continuously.   Table 4. The optimisation variables include gain, time constant T 1 , and time constant T2. For each of the optimisation variables, a range of values is considered to cover all possible modes. On the other hand, due to the nature of each algorithm, suitable replications and populations were selected. Table 5 shows the results of optimising the two algorithms. Figure 8a shows the inter-area power oscillations using the SSSC optimised by the HS algorithm or the nonoptimised SSSC. Figure 8b indicates the turbine rotor oscillations and Fig. 8c shows the inter-area bus voltages. Figure 8d shows the inter-area power oscillations using the SSSC optimised by the FA or the non-optimised SSSC. Figure 8e indicates turbine rotor oscillation and Fig. 8f shows the inter-area bus voltage. According to the results obtained from the two optimisation algorithms, the damping rate achieved by each one differs by 0.25%. The firefly algorithm outperformed the harmony search algorithm. Although the solutions produced with each algorithm differ little in performance, the calculation times for each algorithm differ significantly. Given the nature of the FA with the tested population and iterations, the time to obtain the optimal solution was 40 min. In contrast, the HS algorithm reached the optimal solution in significantly less time than FA. Table 6 shows the number of fitness function calls and the optimisation time for each algorithm.

conclusion
In this paper, the effect of SSSC on the small-signal stability of power system was investigated. The SSSC controller was designed and evaluated for damping power system oscillations. Firefly and harmony search algorithms were used to determine optimal parameters for the SSSC controller, and the capability of the optimised SSSC was evaluated. The effectiveness of two proposed algorithms and the degree of participation of SSSCs in damping inter-area oscillations was investigated. The phase constant of the phase compensator and its gain were considered as optimisation parameters. Determining the optimal compensator parameters will result in the minimum oscillation. To maximise system damping and minimise inter-area power oscillations, control signals from changes in the rotor angle of the turbines and changes in the power of the inter-area transmission line were  www.nature.com/scientificreports/ used. The simulation was performed on a power system in two areas. The system turbines were modelled as a 6-order model, and the SSSC converter was modelled as an average model. The two-area system was then studied using PSS and SSSC power system stabilisers. According to the results obtained, the damping rate achieved by the two optimisation algorithms differs by 0.25%. The firefly algorithm outperformed the harmony search algorithm by 0.25%.