1 Introduction

Recently, the dynamic behavior of the interconnected power grid has been substantially modified due to the increased deployment of renewable sources. Nowadays, wind energy has evolved and become one of the leading renewable energy sources that are widely used in India [1] and across the globe. Moreover, with the advent of mono and polycrystalline technology, the participation of solar power has been significantly increased in the overall renewable power input to the grid. Solar farms with a capacity of more than 500 MW are increasingly connected day by day. This includes Kamuthi solar power project of 648 MW in Sengappadai Tamil Nadu, India [2], Rancho Cielo PV farm of 600 MW in the USA, solar star I and II PV power plant of 579 MW near Rosamond, California, USA, TOPAZ solar photovoltaic power plant of 550 MW in San Luis Obispo County, California.

The increasing renewable power incursion in the system leads to several instabilities that result in a weak grid [3]. The impact of low inertia power injection through PV farms on grid stability is discussed in [4,5,6]. An overview of several power system stability issues pertaining to large-scale PV integration into low voltage and medium voltage networks is discussed in [4]. In [5], the impact of large-scale PV integration considering both rooftops as well utility-scale PV on the small-signal stability of the large interconnected power systems is investigated. The effect of large-scale PV generators on the Ontario power system stability at various levels of penetration is investigated in [6]. The findings reveal that dispersed PV significantly improves the system's static voltage stability.

Power transfer capabilities through the overhead transmission lines are also restricted because of low-frequency electromechanical oscillations (0.1 to 2 Hz) [7]. A power system stabilizer (PSS) is a convenient means to alleviate these oscillations [8]. Damping of such oscillations using PSS results in the chances of over voltage because of the quick response of AVR (Automatic voltage regulator). With recent technological advancements in the power electronics field, the FACTS (Flexible AC transmission system) devices have proven their effectiveness in enhancing the power transfer capabilities and the stability of power systems [9,10,11]. In [11], the impact of various FACTS devices for the enhancement of available transfer capability (ATC) has been assessed. Performance of different FACT controllers with associated control units is discussed in the literature, like UIPC (Unified interphase power controller) [12], SVC (Static VAR compensator) [13], STATCOM (Static synchronous compensator) [7] and, TCSC (Thyristor controlled series capacitor) [14].

Mitigating SSR with a novel coordinated control of PV-solar farm as PV-STATCOM is discussed in [15] and portrayed in Fig. 1 for a 24-h duration. SSR alleviation using TLBO (Teaching–learning optimization)-based large scale PV plant is discussed in [16]. In [17, 18], A unique control strategy to use the inverting capabilities of PV-plants as a STATCOM (PV-STATCOM) has been demonstrated for improving the ATC (Available transfer capacity) of existing lines and alleviating the power oscillations. In [17], power oscillations are controlled and alleviated by controlling solar-PV farms as PV-STATCOM. Novel control of solar-PV farm as PV-STATCOM for ATC enhancement of interconnected lines have been discussed in [18]. A model predictive controller optimally tuned by a novel Salp swarm algorithm for frequency control in unequal two-area STPP (Solar thermal power plant) is proposed and implemented in [19]. In [20], A novel smart PV-STATCOM controls the steady-state voltage rise and mitigates the temporary overvoltages due to the rising solar PV penetrations. An eighth-order POD (power oscillations damping) control technique for large PV-plants is discussed and implemented in [21]. Whereas [22] presents a damping controller based on an energy function. Nighttime control of PV-Farms as PV-STATCOM to regulate the grid voltage is discussed in [23]. All the POD controllers discussed in [18, 21,22,23] are based on the leftover inverting capabilities of PV-farm in either day or night time only. Hence the inverting capacities of PV-plant as POD are restricted to only a small-time duration, and it becomes zero in full sun. During the daytime, the entire inverting capability is deployed for active power generation and grid integration. So PV-Farm inverter is available either in nighttime, dusk or, during bad weather conditions during the day when sunlight is not available for the active power production. To overcome this difficulty, in [17], a patent-pending technology [24] has been exploited to design a novel PV-STATCOM control for power oscillations damping. In this POD scheme, when perturbations are detected, the PV-farm immediately stops the real power production and deploys its overall inverting capacity in alleviating the oscillatory swings and, works in full PV-STATCOM mode [17].

Fig. 1
figure 1

PV-STATCOM modes for a 24-h duration

Once the disturbances are alleviated or reduced to a threshold value as prescribed by the grid codes [25], the PV-farm resumes generating at the same level in a ramped manner, still utilizing the leftover inverting capabilities to operate as POD during the escalation of power, thus ensures to prevent any reoccurrence of oscillation and allows faster growth of power. Hence the suggested control scheme [17] enables the PV-farm to use its full inverting capabilities to operate as PV-STATCOM for suppressing oscillations both in the day-night time on a 24 × 7 basis. Implementing an innovative small-signal residue analysis technique (SSRAT) for tracking the optimal location of PV-STATCOM for power oscillation dampings is discussed in [26].

2 Recent advancements and the role of modern intelligent techniques in the domain

With the recent developments in artificial intelligence, different soft computing techniques are broadly employed in the entire engineering spectrum for optimal tuning of various controllers. In [7], an Ant colony optimization (ACO) tuned STATCOM nullifies the low-frequency oscillations in an interconnected two-area power system. In [27], SSR oscillations are alleviated in a series compensated power system with Whale optimization algorithm (WOA)-based Type-2 wind turbine. Alleviation and control of the low-frequency power oscillations employing an adaptive compensation technique with large-scale PV-plants are presented in [28]. Active power control of smart PV inverters for mitigating the voltage and frequency deviations is discussed [29]. In [30], an improved GWOA (gray wolf optimization algorithm) is deployed to optimally place the electrical energy storage systems in a microgrid. In [31], BFOA-based STATCOM is used for improving the stability of IG-based series compensated WPPs by mitigation and control of SSR. In [32], electromechanical oscillations are damped using the dynamic response of the PV-integrated Single machine infinite bus (SMIB) power system. An intelligent combined FFR (fast frequency response) and power oscillations damping using PV-plants operated as PV-STATCOM is proposed and discussed in [33]. A novel step-down modulation (SDM) technique allowing a large-scale PV solar farm to operate as PV-STATCOM for mitigating the electromechanical oscillations is presented in [34]. In [35], an enhanced coyote optimizer is deployed to optimally adjust cascade load frequency controller parameters for the frequency regulation of the multi-machine power system comprising of photovoltaics and thermal power plant. In [36], the capabilities of different heuristic optimizers have been compared and tested for integrating several renewable generating units in distribution grids. In [37], a CSO (Chicken swarm optimizer)-based Adaptive controller is proposed and implemented for stabilizing the frequency in the electric grid, integrated with renewable sources. Stability enhancement of Hybrid Wind-PV-integrated multimachine power system using PSO-BFO optimizer is discussed in [38]. In [39], the authors proposed a novel control technique for power quality enrichment in a PV-integrated electric grid. Frequency stability and damping control of inverter interfaced distributed generation (IIDG) using BFO-based VIE (Virtual inertia-emulation) has been discussed and presented in [40].

A comparison of the present work with existing techniques is shown in Table 1.

Table 1 Comparison of the present work with existing techniques

3 Research gap and motivation behind the research work

The data presented in Table 1 explicitly reveals.

  • Most of the controllers are Hit-and-Trial-based traditional controllers.

  • The stability mode addressed is confined to either Electrical, Electromechanical or Torsional modes, but not all.

  • The optimal compensation level is approximately 70%.

  • In the case of intelligent control; the performance of the two intelligent techniques has not ever been compared with their hybrid while stabilizing the overall oscillatory swings of the power system using PV-STATCOM.

4 The major contributions are as follows:

  • An intelligent PV-STATCOM is proposed for mitigating power oscillations incorporating the rigid body mode (Mode 0) and torsional modes simultaneously.

  • The system is optimally compensated to a value of 85%.

  • An innovative control strategy using two PI controllers is utilized to distinctly control the DC and AC currents of the PV-STATCOM.

  • The potential benefits of the two swarm-based optimization approaches and their Hybrid for optimal tuning have been analyzed and presented.

  • The strength of the Hybrid PSO-BFOA algorithm in mitigating oscillatory swings and improving the system stability is demonstrated.

  • The present study is the first-ever attempt to the best of knowledge of authors when the performance of the two soft computing-based optimization techniques and their Hybrid has been mutually compared and demonstrated for the optimal tunning of the inverting capabilities of PV-STATCOM for stabilizing the power system.

The remaining of the manuscript is outlined as: the study system is discussed and presented in Sect. 2; Sect. 3 demonstrates the PV-STATCOM model. Section 4 describes the Intelligent PV-STATCOM incorporating the Hybrid PSO-BFO optimization technique. The comprehensive performance analysis of the two optimization techniques PSO, BFOA and, their hybrid is presented in Sect. 5. Section 6 concludes the work followed by justified references.

5 The study system

The study system presented in Fig. 2 comprises a modified Kundur’s 2-area, 4-generator, 11-bus test system [8] integrated with a 100 MW PV plant at bus 6. The entire system is simulated with MATLAB software for analyzing the stability of the multimachine system. The two areas comprising of four generators are interconnected by two intertie lines of 200 km in length. A PV plant of 100 MW active power is connected at bus 6 through a 25 km line. In this study, the generator G1 in area 1 is modeled as a multi-mass system called the IEEE-FBM (First Benchmark Model), specially designed by the IEEE working group to study low-frequency torsional oscillations (SSR). The specifications of various power system components including the generator as a multi-mass system, transformers and, interconnecting lines are identical to those mentioned [8, 41]. The system is optimally compensated to a value of 85%, by placing a variable series capacitor on the line interconnecting the buses 7–8, The model is intentionally modified to illustrate the stability analysis, incorporating the voltage stability, traditional zero-mode stability, and torsional modes of the generator subject to 3-φ, LLL-G fault, and, perturbations like variations in electromagnetic and the reference voltage.

Fig. 2
figure 2

Kundur’s two-area model aggregated with 100 MW PV-farm

The generator mathematical modelling in d-q frame is rewritten as [8, 42]:

Electrical part (d-q frame):

$$ \frac{{{\text{d}}E_{d}^{\prime } }}{{{\text{d}}t}} = \frac{1}{{T_{q0}^{\prime } }}\left( {\left( {x_{d}^{\prime } - x_{q} } \right).I_{q} - E_{d}^{\prime } } \right) $$
(1)
$$ \frac{{{\text{d}}E_{q}^{\prime } }}{{{\text{d}}t}} = \frac{1}{{T_{do}^{\prime } }}\left( {\left( {x_{d}^{\prime } - x_{d} } \right).I_{d} + E_{fd} - E_{q}^{\prime } } \right) $$
(2)
$$ V_{td} = - V\sin \delta + R_{e} I_{d} + x_{e} I_{q} $$
(3)
$$ V_{tq} = V\cos \delta + R_{e} I_{q} - x_{e} I_{d} $$
(4)
$$ V_{t} = \sqrt {V_{td}^{2} + V_{tq}^{2} } $$
(5)
$$ P_{e} = E_{d}^{\prime } I_{d} + E_{q}^{\prime } I_{q} $$
(6)

Mechanical model in d-q frame:

$$ \frac{{{\text{d}}\delta }}{{{\text{d}}t}} = \omega_{0} .(\omega - \omega_{r} ) $$
(7)
$$ \frac{{{\text{d}}\omega }}{{{\text{d}}t}} = \frac{1}{M}\left( {\left( {p_{m} - p_{e} } \right) - D.(\omega - \omega_{r} )} \right) $$
(8)

Speed governor in d-q frame:

$$ \frac{{{\text{d}}\Delta P_{m} }}{{{\text{d}}t}} = \frac{1}{{T_{RH} }}.\left( {K_{RH} T_{RH} .\frac{{{\text{d}}\Delta P_{c} }}{{{\text{d}}t}} - \Delta P_{m} } \right) $$
(9)
$$ \frac{{{\text{d}}\Delta P_{c} }}{{{\text{d}}t}} = \frac{1}{{T_{CH} }}.\left( {\Delta P_{h} - \Delta P_{m} } \right) $$
(10)
$$ \frac{{{\text{d}}\Delta P_{h} }}{{{\text{d}}t}} = \frac{1}{{T_{SM} }}.\left( {\Delta P_{r} - \Delta P_{h} } \right) $$
(11)
$$ \frac{{{\text{d}}\Delta P_{r} }}{{{\text{d}}t}} = \frac{1}{{T_{SR} }}.\left( {K_{G} \Delta \omega - \Delta P_{r} } \right) $$
(12)

The Exciter-AVR in d-q frame:

$$ \frac{{{\text{d}}E_{fd} }}{{{\text{d}}t}} = \frac{1}{{T_{E} }}\left( {K_{E} .(V_{tr} - V_{t} - V_{s} } \right) - E_{fd} $$
(13)
$$ \frac{{{\text{d}}V_{s} }}{{{\text{d}}t}} = \frac{1}{{T_{FE} }}\left( {K_{F} .\frac{{{\text{d}}E_{fd} }}{{{\text{d}}t}} - V_{s} } \right) $$
(14)

The acronyms are presented in Table 6 Appendix.

6 PV-STATCOM model

The PV-STATCOM's different operating modes are already discussed in [15]. The different elements of the PV-STATCOM considered in the present work are portrayed in Fig. 3a.

Fig. 3
figure 3

a The PV-STATCOM controller understudy. b A Typical PV-generating unit as unit VSC

In the present work, the PV panels are consisting of several PV cells that produce DC-current following the typical V-I curve of the PV-panel [43]. The PV-voltage source inverter comprises a total of six insulated-gate bipolar transistors (IGBT) as power-electronic switches and a capacitor as a stiff DC-source with V-I characteristics similar to the PV panels in the large-scale solar farm [18, 43]. The DC-source voltage VDC is maintained at the desired level using the MPPT (maximum power point tracking) technique [15]. The VSC is coupled to the grid via an LCL filter and a coupling transformer [44].

Figure 3b shows a typical PV-generating unit with control assembly [45]. Each PV-Farm consists of the several PV generating unit, which is typically composed of three components, viz. the PV array, the converter, and the controller. The PV arrays generate real power, however, the converter and the associated control assembly enable the PV unit to inject and absorb the lagging VAR.

The PV-panel output current derived from unit cell current equation [45] is expressed as:

$$ I_{PV} = I_{SCA} (G) - N_{p} *I_{0} \left[ {EXP\frac{{(V_{A} + I_{PV} R_{s} )q}}{{\eta N_{s} kT}} - 1} \right] $$
(15)

where, Ipv = Output of PV panel (A), IscA = Array current with output terminals shorted (A), I0 = Saturation current of the diode under reverse bias (A), Np = Combination of Series connected solar cells, Ns = Combination of Parallel connected series cells, Rs = Array series resistance (Ω), VA = Array voltage (V), G = Solar radiation (W/m2), n = Ideal factor, T = Ambient temperature (Kelvin), q = Charge on electron (C), k = Boltzmann constant (J/K).

7 Constraints of the solar cell current equation

For large-scale applications, the N-number of individual generating units is assembled together to develop the entire PV farm. While analyzing the power system stability involving such large-scale PV-Farms, we normally consider the entire solar farm as a single generator with an MVA rating equal to the individual sum of MVA ratings of unit PV-generators comprising the PV-farm. Hence to derive the output of large-scale solar farms, the individual outputs from N-individual PV-generating units need to be integrated properly to get the overall output of the solar PV farm. While summing the outputs of the N-number of generating units, a dedicated equivalencing method is required. In this paper, the NREL equivalencing method [45] is deployed to build the single generator equivalent of the large-scale solar farm consisting of several PV-generating units.

8 Intelligent PV-inverter control using PSO, BFOA, and hybrid PSO-BFO algorithm

In the present study, an intelligent control strategy employing the two PI controllers to separately regulate the AC-DC currents for controlling the gate signal in PV-STATCOM has been demonstrated. The swarm-based techniques PSO, BFOA, and their hybrid PSO-BFOA have been implemented in succession as an extra control loop for the optimal gain selection.

8.1 Intelligent inverter controller with the hybrid PSO-BFO optimizer

The VSC consists of an IGBT-based PWM inverter. Such inverters use PWM (Pulse width modulation) to construct the sinusoidal waveforms using a stiff DC-source with a chopping rate of several kHz. Harmonics are alleviated by LCL filters. The VSC integrates a stiff DC source Vdc for synthesizing the desired AC waveforms. The terminal voltage of the VSC-STATCOM is varied as per the system requirements by manipulating the modulation index.

Here to control the IGBT used in VSC, gate pulses are provided using the PWM generator. The controller uses PLL (Phase-locked loop) that utilizes the grid voltage Vac as an input and gives the d-q current components Id-Iq as an output. The reference voltages Vref and Vdcref are provided as inputs in the AC and DC control blocks. Based on the difference/error between (Vref and Vac) and (Vdcref and Vdc); the AC and DC voltage regulators of the AC and DC control blocks produces/generates the corresponding currents Iqref and Idref which acts as reference currents for the original source currents (line currents Id and Iq) produced by PLL. Further, to control the AC-DC errors [(difference between the references Iqref, Idref and d-q components of original source produced by PLL i.e., Iq, Id; mathematically (AC error Iqref - Iq, DC error Idref -Id)]; separate PI controllers for AC-DC control blocks are used. Next, a current regulator controls the gate pulses produced by the PWM modulator based on the AC-DC errors. Accordingly, the gate pulses regulate the PV-STATCOM terminal voltage following the grid requirements to mitigate the power system oscillations.

The controlling capabilities of the proposed PSO-BFOA-optimization algorithm are utilized to optimally adjust PI controller gain to minimize the errors and get the desired results. The intelligent VSC controller involving the PSO, BFO, and hybrid PSO-BFO algorithms are depicted in Fig. 4.

Fig. 4
figure 4

Hybrid PSO-BFOA-based intelligent VSI control of PV-STATCOM

8.2 Optimal parameter selection with PSO, BFOA, and Hybrid PSO-BFO algorithm

In this section, the PSO, BFOA, and hybrid PSO-BFO algorithms are discussed in detail.

8.2.1 The PSO algorithm

Kennedy and Eberhart introduced PSO in 1995. Since then, several types of research have been carried out to enhance the convergence rate and simultaneously reduce the probability that the search agent must not get trapped in local optima (maxima or minima). The PSO algorithm is inspired by the social behavior of bird flocks or fish schools.

The PSO algorithm is evolved on simple concepts. According to the PSO algorithm, a randomly generated population of birds are the trial agents or the search species and are considered as an individual solution in search space. In the algorithm, the birds are called “Particles.” All the particles in the search spaces have been assigned some fitness values, which is a function of their position. The fitness value is evaluated as per the objective function or the performance index designed for the optimization problem. The birds fly across the problem search space with some velocity and follow the neighboring bird with the highest fitness value in search space.

The velocity and position of every bird (trial agent) may be plotted on the X-Y plane. Hence both position and velocity have two components represented as Vx (x-direction component) and Vy (y-direction component). The credential update of any search agent is regulated as per its position and velocity information.

Every trial agent acknowledges their best value so far, known as (Pbest), along with their position in an X-Y plane. Additionally, they also know their principal value until now in the group (gbest) among the Pbests. Every search agent updates their position based on the information given below:

  1. (1)

    The present location (X, Y)

  2. (2)

    The present velocity (Vx, Vy)

  3. (3)

    Separation amidst the current position, Post, and gbest

The velocities and position of every trial agent can be updated for ith iteration as per the equation:

$${V}_{i}^{k+1} =W{V}_{i}^{k }+ {c}_{1}{rand}_{1}\left({P}_{besti}-{S}_{i}^{k}\right)+ {c}_{2}{rand}_{2}\left({g}_{best}- {S}_{i}^{k}\right)$$
(16)
$${S}_{i}^{k+1}= {S}_{i}^{k}+ {V}_{i}^{k+1}$$
(17)

The position update of the search agent is vectorially shown in Fig. 5.

Fig. 5
figure 5

Vector representation of position update in search space

Where, \({V}_{i}^{k}\)= current velocity, \({V}_{i}^{k+1}\) = updated velocity, \({S}^{k}\)= current search position, \({S}^{k+1}\)= modified search position, \({V}_{Pbest}\)= velocity as per Pbest, \({V}_{gbest}\)= velocity as per gbest.

The PSO algorithm is summarized as:

  • Initialize a randomly generated population with different positions and velocities to meet the inequality constraints.

  • Verify that the constraints are satisfied and, if necessary, update the solution.

  • Evaluate the fitness for each trial agent in search space, as per the performance index.

  • Compare each particle’s present fitness with its previously obtained best fitness (Pbest). If the present value is lower, then update the present coordinate as Pbestx.

  • Conclude the present global optimal fitness value (maximum or minimum) amidst the current positions.

  • Contrast the present global minimal value with that obtained earlier (gbest). If the present value is improved than gbest, then update the present value to gbest,.and update the present coordinate as gbestx.

  • Update the particle velocities and positions as per the Eqs. (16) and (17), respectively.

  • Re-evaluate if the constraints are satisfied? If not, repeat the above steps until the constraints are met or the number of iterations attains its largest possible value.

8.2.2 The BFOA algorithm

In the year 2002, Passino suggested a swarm-based optimization called BFOA. It is a swarm-based algorithm derived from the law of natural selection and has proven its effectiveness in solving many practical optimization problems. Passino derived an idea of foraging characteristics of the E-Coli bacteria and proposed an algorithm mimicking their steps for searching the food for their survival. The process in which bacteria move in search of their food by taking small steps, known as chemotaxis. The key concept of the BFOA algorithm is derived by mimicking the chemotactic steps of the virtual bacteria in the problem search space (A specified space where the bacteria search for their food). The chemotaxis is further categorized into two parts viz. swimming and tumbling; the predefined forward movement is called swimming, and any movement in the random or reverse direction is called tumbling. Swim and tumble both occur alternately. The nutrient stands for the solution.

A bacteria is nothing but a randomly selected trial solution in the problem search domain (it may be named as trial agent), moving in the search domain (objective function surface) to search the food (global maxima or minima). In this way, the bacteria that get sufficient food, i.e., the bacteria closer to the optimum value (Global maxima or minima), increase their population by increasing their dimension. In the presence of appropriate temperature, they split and replicates themself. This phenomenal incident motivated Passino to propose an idea of BFOA. When sudden environmental changes occur or because of sudden attack, the chemotactic movements may be obstructed, and some bacterium is displaced to a different place of the search space, or some additional bacteria may be added to the group. This is a part of the elimination-dispersal process, in which each bacterial of the swarm in a particular area are destroyed, or a group is displaced to the other location within the problem search space. The BFOA mimics four main steps, viz. Chemotaxis (Swim or tumble), Swarm, Reproduction, Elimination-Dispersal described in [46, 47].

The BFO algorithm consists of the following steps:

Step-1 Initializing the parameters.

  1. i.

    p: Search space dimensions.

  2. ii.

    S: Bacterial count.

  3. iii.

    Ns: The swim-length.

  4. iv.

    Nc: Number of chemotactic events.

  5. v.

    Nre: Number of reproductive events.

  6. vi.

    Ned: Elimination-Dispersion event count.

  7. vii.

    Ped: Elimination–Dispersal Probability.

  8. viiii.

    The bacterial position P ( j, k, l) = {ϴi ( j, k, l) for i = 1,2,…,S}.

  9. ix.

    C (i): Run-length.

C (i) is kept fixed for a simple design strategy.

Step-2 The iterative algorithm.

The detailed algorithm is discussed and presented in [46, 47].

8.2.3 The evolution and background of hybrid PSO-BFO algorithm

Because of constant chemotaxis steps (C), as shown in Fig. 6. The BFOA algorithm suffers in adaptation. If the value of (C) is kept fixed, the convergence rate gets slower, especially at the end of the convergence. To annihilate this bottleneck, chemotaxis steps (C) vary according to simple heuristic rules. This makes the convergence faster for both cases whether the swarm effect is taken into consideration or not. The reasoning is to increase the run-length (C) when the bacteria move in the right direction (the direction in which the objective function is optimized) with small fixed steps; instead, decrease the value by the same amount.

Fig. 6
figure 6

The bacterial chemotactic movements

In BFOA, chemotaxis forms the basis for local search, while convergence rate is aggravated by reproduction stages. Elimination and dispersal avoid being falling around the local optima and guide the search to the global optima. Still, only the chemotactic and reproduction steps are insufficient to attain the global values as the bacterium may undergo premature convergence or may be stuck in the local optima because the elimination-dispersion stage comes after many reproduction events. The discrepancy may be overcome by introducing a mutation operator in BFOA.

With the application of mutation in BFOA, the probability of being stuck in the local optima reduces to a large extent. The mutation brings a more diverse population to overcome the premature convergence and probability of being stuck in local optima. Virtual bacterium movement on the multimodal functional surface to reach the global optima within the search space is presented in Fig. 7.

Fig. 7
figure 7

An objective function with a multimodal surface for bacterial swarm

In BFOA, the step-length (C) mostly determines the accuracy and convergence to the global optima. BFOA with constant run-length experiences the two major drawbacks:

1. Smaller step-sizes will require several generations to get the global optima. i.e., it may not reach the optimal solution with fewer iterations and need more computational time.

2. Larger run-length leads to a fast convergence rate, but accuracy is compromised.

In this paper, a new methodology of bacterial position updated is proposed to achieve a faster, accurate, and precise convergence without being stuck in local optima. In the first stage, all the bacterium (trial-agent) fitness in the generation is evaluated as per their position in the search space. In the second step, a diversity in bacterial position update is achieved with fine-tuning using the mutation operator and PSO parameters. In the proposed approach, chemotaxis is used to trace the local optima, while reproduction and mutation help to reach the global optimum value.

8.2.4 The hybrid PSO-BFOA algorithm

In BFOA, chemotaxis performs a local search, while reproduction speeds up the convergence of the search process. Since chemotaxis and reproduction step itself is not enough to navigate the global solutions, so, reproduction steps are followed by elimination and dispersal events. Elimination-dispersion events in BFOA eliminate the probabilities of being gobbed into the local optima i.e., premature convergence, and hence increases the feasibility of global search. By introducing the mutation operator to Bacterial foraging optimization, the probability of being trapped in local optima can be eliminated to a large extent either gradually or suddenly. Incorporation of the mutation operators with BFOA leads to a more diverse population, thus preventing BFOA from being captured in local optima or premature convergence.

The accuracy and convergence of BFO are mostly determined by the bacterial step size. The BFOA with constant step size experiences the following drawbacks:

  1. (1)

    A trivial step size leads to an increase in iteration counts to achieve the optimal solution i.e., the global optima may not be achieved with a fewer number of iterations and may take a larger convergence time.

  2. (2)

    Larger step sizes lead to faster convergence, with compromised accuracy and precision. Moreover, the global solutions may be missed because of the considerably larger run lengths.

In this paper, an innovative strategy for a bacterium position update is implemented to improve the search process (i.e., to enhance the convergence rate while maintaining accuracy and precision). The process starts with the bacterial position update after estimating the relative fitness of all the bacterial in the generation. Later mutation with PSO parameters brings in diversity in bacterial position update. The mutation helps in fine tunning in bacterial positions that lead the search process to a steeper convergence and helps in getting the optimal solution at the earliest while maintaining the accuracy and precision. The PSO parameters like inertial weight, acceleration coefficients, number of particles, etc. are the independent parameters that are mainly used for fine-tuning to attain the global solution. In the hybrid PSO-BFO algorithm, the chemotaxis process performs the local search, whereas the global best solution is achieved with reproduction and mutation.

9 The mutation operator:

Once chemotaxis is over, the bacterial position is tuned with mutation to attain the optimal position. Mutation plays a key role in getting the optimal solutions by tunning with the PSO-BFO algorithm while maintaining precision and accuracy. In the beginning, the ratio \(\frac{{\theta }_{global}}{\theta \left(i,j,k\right)}\) is very small this leads to a larger step length, but later on, as \(\theta \left(i,j,k\right)\) approached the global θ, the run length is reduced. The bacteria advances to the optimal position with the rising number of generations. At this stage, \(\theta \left(i,j,k\right)\) is updated as:

$$\theta \left(i,j+1,k\right)=\left(1-\frac{{\theta }_{global}}{\theta \left(i,j,k\right)}\right)* {r}_{1}* {\theta }_{global}+\left(\frac{{\theta }_{global}}{\theta \left(i,j,k\right)}\right)* {r}_{2}* {\theta }_{pbest}\left(j,k\right)$$

where \(\theta \) indicates the bacterial location in a multidimensional space, i, j, and k denote the bacterial count, chemotactic steps, and reproduction steps, respectively.

\({\theta }_{pbest} \mathrm{is}\,the\) local optimal position, \({\theta }_{global}\) indicates the global best position and \({r}_{1}\), \({r}_{2}\) denotes the random numbers.

The PSO-BFO algorithm is already presented in [46, 47] and reproduced as follows:

Step 1. Initialize the variables: p, S, Sr, Nc, Ns, Nre, Ned, Ped, (i) (i = 1, 2,..., S), Delta, w, C1, C2, R1, and R2, where.

  1. i.

    p: Search space dimensions

  2. ii.

    S: Bacterial count

  3. iii.

    Sr: Bacterial count in reproduction steps,

  4. iv.

    Ns: The swim-length

  5. v.

    Nc: Number of chemotactic events

  6. vi.

    Nre: Number of reproductive events

  7. vii.

    Ned: Elimination-Dispersion event count

  8. viii.

    Ped: Probability of Elimination–Dispersal

  9. ix.

    C(i): Run-length

  10. x.

    Delta: Bacterial direction

  11. xi.

    w: Inertial weight

  12. xii.

    C1, C2: Local and Global information weights respectively

  13. xiii.

    R1, R2: are arbitrary numbers

Step 2. Elimination-dispersal loop: l = l + 1.

Step 3. Reproduction loop:\(k=k+1\).

Step 4. Chemotaxis loop: \(j=j+1\).

Substep 4.1. For i = 1, 2,..., S the bacterial chemotaxis is as follows:

  1. a.

    Evaluate the cost function, (i, j, k, l).

  2. b.

    Let Jlast = (i, j, k, l) to store the cost function's current value so that this can be compared with the one obtained in the next search, since a better cost through a run may be found in the subsequent swim.

  3. c.

    Let Jlocal(i, j) = Jlast; the better cost per bacterial is chosen as local best Jlocal.

  4. d.

    Update the position (i, j + 1, k, l) = (i, j, k, l) + (i) ∗ Delta(i).

  5. e.

    Compute the objective function, (i, j + 1, k, l).

  6. f.

    Swim

(i) Let m = 0 (counter for swim length).

(ii) While m < Ns (if not climbed prolong).

(1) Let m = m + 1.

(2) If (i, j + 1, k, l) < Jlast (if doing better),

let Jlast = J(i, j + 1, k, l).

and let,

P (i, j + 1, k, l) = P (i, j + 1, k, l) + (i) ∗ Delta (i).

use P(i, j + 1, k, l) to calculate the new J(i, j + 1, k, l).

(3) Compute for each bacterium the current position and local cost.

Pcurrent (i, j + 1) = P (i, j + 1, k, l),

Jlocal (i, j + 1) = J (i, j + 1, k, l).

(4) Else, let.

Pcurrent (i, j + 1) = P (i, j + 1, k, l),

Jlocal (i, j + 1) = J (i, j + 1, k, l),

m = Ns.

(5) While the statement ends.

(g) Jump to the next bacterial (i + 1) if i ≠ S (i.e., jump to (b) to process the next bacterial).

Substep 4.2. Compute the local best position (PLbest) and the global best position (PGbest) for each bacterial.

Substep 4.3. Compute the new direction for each bacteria as:

V = w ∗ V + C1 ∗ R1 (PLbestPcurrent) + C2 ∗ R2 (PGbestPcurrent),

Delta = V.

Step 5 (if j < Nc). Jump to step 4 and carry chemotactic movements, as the bacterial life is not yet completed.

Step 6 (reproduction).

Substep 6.1. For k, l and for each i = 1, 2,..., S, the ith bacterial health is given by.

\({J}_{health}^{i}\)=\(\sum_{j=1}^{{N}_{c}+1}j(i,j,k,l)\).

Sort each bacterium in ascending order cost Jhealth value (higher Jhealth implies lower health).

Substep 6.2. The highest Jhealth valued bacteria will die and the rest of them with minimum fitness value will be split.

Step 7 (if k < Nre, Jump to Step 3). At this stage, the maximum predefined reproduction steps are still not completed; hence the new generation in the chemotaxis loop is started.

Step 8 (Elimination-dispersal). For i = 1, 2,..., eliminate-disperse each bacterial which has probability value less than Ped. If l < Ned, then return to Step 2, else end.

Figure 8 presents the computational flow of the hybrid PSO-BFO algorithm.

Fig. 8
figure 8

Flowchart of the Proposed PSO-BFO Algorithm

10 Performance assessment and simulation outcomes

This work describes a comprehensive performance analysis of the two swarm-based intelligent optimization techniques and their hybrid for the stability enhancement of a multi-machine power system while implementing it with a unique controller capable to regulate the DC-AC currents separately. The compensation level and other physical conditions, including perturbations, are kept the same for both the techniques and their Hybrid to manifest a healthy comparison between the performance of both the algorithms and their Hybrid. The MATLAB software is used to model the modified Kundur’s system coupled with 100 MW PV-plant to demonstrate the performance comparison. A 3-φ LLL-G fault is applied at t = 3 s for six cycles on the line connecting the buses 8–9. The fault clearance time is 60 ms. The two areas are interconnected with each other with an 85% series compensated line. Zero mechanical damping with additional disturbances of 20% deviation in electromagnetic torque and reference voltage are considered to cast the worse conditions. This helps in demonstrating an extensive performance assessment of the two metaheuristic optimizers and their hybrid for stability enhancement of the power system under study in both rigid body mode (Zero mode) and Multi-mass mode (Torsional modes). The swarm-based techniques PSO, BFOA, and their hybrid PSO-BFOA are applied individually in succession as additional control loops to optimally tune the parameters of the PI-controller deployed in the PV-STATCOM control unit. The optimal tuning of the PV-STATCOM controller has been achieved through the proper selection of PSO-BFO parameters mentioned in Table 7, Appendix. The simulation responses obtained for various parameters such as PCC voltage variations, deviations in rotor dynamics, real power, PV-farm reactive power, and shaft torsional oscillations explicitly reveals the optimizing efficacy of the hybrid PSO-BFO algorithm concerning its constituent PSO and BFO optimizers. The simulation results are presented using a self-explanatory GUI (guided user interface) that is easy to view and helps in analyzing the performances of the two metaheuristic optimizers and their hybrid while stabilizing the power oscillations under different scenarios. The GUI displays the various system parameters and perturbations like the MVA-MW rating of the power system including PV-farm, compensation level, fault conditions (time and duration), damping, variations in electromagnetic torque, and reference voltages. The GUI display screen shows the parameters in numeric decimals instead of their percentage values. As an example, 0.85 corresponds to 85% compensation level, 0.2 corresponds to 20% variation in electromagnetic torque and the reference voltage. A zero input denotes that dampings are neglected on the other hand input 1 signifies that mechanical dampings are duly considered.

10.1 Transient study without damping

The study system is exposed to a 3-φ LLL-G fault at a line between the buses 8–9. The fault occurs at t = 3 s for 6 cycles and is cleared in 60 ms. Even though the alternators under consideration do have considerable inertia, still, their masses are ignored to flaunt the worse damping scenario. The system is optimally compensated up to 85% by inserting a series capacitor of a suitable rating between lines 7–8. In addition to this, additional perturbations of a 20% fluctuation in electromagnetic torque and the reference voltage help in modelling the worst scenarios. The GUI simulation outcomes viz. rotor angle deviation, speed deviation, fluctuations in the PCC voltage, generator real power variation, PV-farm reactive power deviation, and shaft torsional oscillations are illustrated in Figs. 9, 10, 11, 12, 13, 14. The turbogenerator rotor system is not a single mass unit, instead, it comprises six lumped masses, that includes a high-pressure (HP) turbine, an intermediate-pressure (IP) turbine, low-pressure turbines; several stages (LPA and LPB), the rotor itself, and exciter (EXC). All the masses are mechanically assembled on a common shaft in a manner that the shaft segments connecting the two masses act as a linear spring-mass system of finite torsional stiffness. Now the six-mass rotor-system poses five torsional modes and one system mode (Zero modes) of oscillations at different natural frequencies. Any external input to the masses leads to exciting the system in one of the natural modes of oscillations that may lead to high torsional pressure in the interconnecting shaft segments and ultimate breakage of the shaft. Table 2 demonstrates the eigenvalues for different modes.

Table 2 Transient Eigenvalues/Damping ratio of test system without damping
Fig. 9
figure 9

Alternator power angle deviation (Δδ)

Fig. 10
figure 10

Alternator speed deviation (Δω)

Fig. 11
figure 11

PCC voltage deviation (ΔV)

Fig. 12
figure 12

LPB-Generator Torque deviation (\({\Delta \tau }_{Gen-Turbine}\))

Fig. 13
figure 13

Alternator active power deviation (ΔP)

Fig. 14
figure 14

PV-Farm Reactive power deviation (ΔQ)

The complex eigenvalues presented in Table 2 reveals that without incorporating PV-STATCOM, the torsional mode (Mode 5) was initially unstable. Nevertheless, with the employment of PSO-based PV-STATCOM, Mode 5 became stable. The stability still continued to enhance by applying BFOA on the PV-STATCOM and is further considerably enhanced by implementing the hybrid PSO-BFOA approach. The remaining torsional modes (Mode 1–4), including the rigid body mode (Mode-0), were initially stable in the absence of the PV-STATCOM, yet the modes are further stabilized by deploying PSO-based PV-STATCOM, the stability continues to enhance with BFO-based PV-STATCOM. Ultimately the mode is optimally stabilized by employing the proposed hybrid optimizer over PV-STATCOM.

In a two-area system, since the dynamics of all the generators are identical when subjected to similar operating conditions and disturbances, thus, the rotor swings of any of the machines adequately describe the dynamic behavior of all four machines in the system. The GUI outcomes presented in Figs. 9, 10, 11, 12, 13, 14 indicates the deviation in the power angle (Δδ), generator speed (Δω) real power oscillations, PCC voltage deviation (ΔV), PV-farm reactive power deviation, and shaft torsional oscillations in the LPB-Generator section. The graphics show that the oscillations in all the parameters monotonically grow and are uncontrolled without the PV-STATCOM controller, still, oscillations are now controlled by deploying PSO-based PV-STATCOM. The oscillations are continued to be further suppressed with BFO-based PV-STATCOM, The mitigation continues and oscillations are progressively suppressed to almost zero value by implementing the Hybrid PSO-BFO-based PV-STATCOM.

The settling time of the rotor dynamic at zero mechanical dampings is presented in Table 3. As observed from Table 3, initially the settling time without the PV-STATCOM controller is not specified. Nonetheless, implementing PSO on PV-STATCOM, the oscillatory swings are stabilized which leads to a specified settling time, the oscillations are continued to settled with BFO-based PV-STATCOM. Deployment of the hybrid PSO-BFO algorithm results in an ultimate settling time of almost 1 s.

Table 3 Time domain result of rotor swing under Transient state

10.2 Steady-state study with mechanical dampings

Steady-state analysis with mechanical dampings is more closer to the practical scenario. Table 4 illustrates the steady-state eigenvalues with mechanical dampings. The eigenvalues illustrate that although the torsional Modes 1–5, including the system mode (Mode zero), are already stable without the PV-STATCOM, still modes are further stabilized by deploying PSO over PV-STATCOM. The modes still continued to be stabilized by applying the BFO-based PV-STATCOM. Eventually, the stability of all the modes attained the optimal value by implementing the proposed hybrid PSO-BFO algorithm over PV-STATCOM.

Table 4 Steady-state eigenvalues/damping ratio with mechanical dampings

The dynamic behavior of the rotor i.e., rotor speed deviations (Δω) and deviations in rotor angle (Δδ), generator real power variations, PCC voltage variations (ΔV), deviations in PV-Farm reactive power, incorporating the shaft torsional oscillations of LPB-Generator shaft section are portrayed in Fig. (15–20).

The graphics reveal that deploying PSO over PV-STATCOM leads to considerably settled oscillations. Still, the oscillations are further settled by tuning the PV-STATCOM controller using the BFO algorithm. The oscillations continue to be progressively settled and suppressed to almost zero value with the employment of the proposed PSO-BFO-based PV-STSTCOM.

The rotor angle oscillations with mechanical damping presented in Fig. 15 are numerically figured in Table 5. The graphics and numeric values again reveal that, with the deployment of the PSO algorithm over PV-STATCOM, the rotor oscillations are stabilized and the settling time is enhanced. The settling time is further considerably reduced once the PV-STATCOM gate signals are tuned by the BFO algorithm. The oscillations are further progressively settled and the settling time reaches an ultimate limit while tunning the PV-STATCOM controller with the proposed hybrid PSO-BFO algorithm.

Table 5 Time domain result of rotor swing under Steady-state

Figure 21 portrays a performance comparison of the two optimization techniques PSO, BFOA with their hybrid PSO-BFO algorithm in terms of “Error” on a scale of 0–100% during the course of iteration concerning time (Sec). The errors presented in Fig. 21 are rationalized for a 0–10 scale, where 1 indicates 10% and 10 indicates 100% error. The Error here reflects the performance of the constituent metaheuristic optimizers PSO, BFOA, and their hybrid PSO-BFO algorithm while attaining the absolute global optima of the search space. When the optimum result is achieved, the graph shows negligible error (close to zero). It is evident from Fig. 21 that the BFO algorithm exhibits less error concerning PSO and hence delivers better performance than PSO. The hybrid PSO-BFO algorithm with the least error is way ahead in performance than its constituent algorithms PSO and BFOA. This is also evident from the simulation results presented in Figs. 9, 10, 11, 12, 13, 14 and Tables 2, 3 for the transient analysis and Figs. 15, 16, 17, 18, 19, 20 and Tables 4, 5 for steady-state analysis. In the absence of any controller, the oscillations are uncontrolled and rising until the simulation lasts. By applying the PSO-based controller, the fluctuations are controlled and settled, which is further stabilized using the BFOA-based controller. The oscillations were further extensively nullified and suppressed to zero value by implementing the proposed hybrid PSO-BFOA based controller.

Fig. 15
figure 15

Alternator power angle deviation (Δδ)

Fig. 16
figure 16

Alternator speed variation (Δω)

Fig. 17
figure 17

Deviation in PCC voltage (ΔV)

Fig. 18
figure 18

LPB-Generator Torque deviation (\({\Delta \tau }_{Gen-Turbine}\))

Fig. 19
figure 19

Alternator active power deviation (ΔP)

Fig. 20
figure 20

PV-Farm Reactive power deviation (ΔQ)

Fig. 21
figure 21

Performance comparison in terms of Error

11 Conclusion

The current research assesses the performance of two swarm-based intelligent approaches and their hybrid in nullifying and suppressing the power oscillations in a multimachine system while controlling the gate pulses of the 3-φ inverter of a large-scale PV-farm working as PV-STATCOM. Kundur’s modified two-area model coupled with a large-scale solar-PV farm is modeled in the MATLAB while investigating the dynamic behavior of the rotor with associated active power, PCC voltage variations, and PV-STATCOM reactive power, incorporating the shaft torsional oscillations. The paper is best concluded as:

  • Both transient and steady-state analyses have been carried out for different conditions namely without the PV-STATCOM, with the deployment of PSO on PV-STATCOM, with BFOA realization on PV-STATCOM, and employing the proposed hybrid PSO-BFOA-based PV-STATCOM.

  • The steady-state analysis is carried with mechanical dampings whereas the dampings are neglected while analyzing the system under transient conditions. Perturbations like varying electromagnetic torque, reference voltage followed by a 3-φ fault, and zero mechanical dampings simulate the worse physical conditions and hence helps in critically examining the performances of the metaheuristic optimizers and their hybrid while enhancing the stability of the system.

  • The simulation results followed by the time-domain analysis for both transient and steady-states in various cases explicitly demonstrate the performances of the two metaheuristic optimizers and their hybrid in stability enhancement of the multimachine system while controlling the inverting capability of a large-scale solar farm integrated with the multimachine system and working as a PV-STATCOM.

  • The graphics supported by the exhaustive numeric analysis explicitly reveal that all the modes including the system mode (Zero-mode) are settled and stabilized with PSO tunning. The modes are further stabilized by parameter tunning with the BFO algorithm. The stability of all the modes is further considerably enhanced and attained the ultimate value by employing the hybrid PSO-BFO optimizer.

12 Limitations and future scope

The present work compared the performance of two metaheuristic optimizers and their hybrid while implementing them on a conventional controller for mitigating the power oscillations in a multimachine system. The study is performed on Kundur’s modified 2-area, 4-machine, 11-bus model, where the Generator1 of area 1 is considered as IEEE FBM for analyzing the zero-mode stability and torsional oscillations simultaneously. With the advent of different versions of Sliding mode control (SMC) techniques like Dynamic sliding mode control (DSMC), Fractional-order sliding mode control (FOSMC), Super twisting sliding mode control. The modern sliding mode control techniques may be deployed and tested to get the desired results in a reasonable time. Further applicability of the controllers may also be tested on larger systems like the New England 39-Bus system (IEEE 39-Bus 10-machine power system) or IEEE 118-bus system.