1 Introduction

Automatic generation control (AGC) schemes are often operated from a central location where the system’s data are gathered. Control signals are produced in a digital computer and then sent to the generation units. To operate an AGC system, the following data would be needed at the control center.

  1. (a)

    The output of every committed unit.

  2. (b)

    Power flow over to neighboring systems.

  3. (c)

    Frequency of power system.

The “raise” or “lower” control signals are produced in an AGC program and transmitted to the generating unit to regulate the unit set points accordingly. The main control loop for a unit consists of an integrator with a gain of K as shown in Fig. 1. The control system details are depicted in Fig. 2. From Figs. 1 and 2, the control signal is a function of system frequency deviation, net inter-change error, and each units deviation from its scheduled economic output.

Fig. 1
figure 1

Basic generation control loop

Fig. 2
figure 2

Basic generation control loop via telemetry

The difference between the actual generation and the desired generation is called ACE, which is the starting point in developing a control scheme. Figure 3 shows the process of ACE calculation.

Fig. 3
figure 3

ACE calculation procedure

For running the economic dispatch orders, the ACE control logic should be operated according to ACE errors in unit outputs. The control system has been driven with a hybrid error signal consist of ACE and sum of unit output errors. In Fig. 4, the control system is built using a combination of ACE signal, generation allocation result, and the unit control loop output. As shown in Fig. 4, the goal of a control system is to drive the ACE to zero and to operate each unit in its economic value. In an AGC presentation, the objective of a PID controller is to manage the load frequency control (LFC) to minimise the ACE position to variation in rated load and provide the dynamic stability of power plants. A PID controller increases the “type” of the system and ensures that the steady state error will be zero for the application of step changes in the load demand. The PID controller calculates the average error of the plant and generates an output to minimize the plant error. It should be mentioned that the controller gains should not be too high, otherwise, instability may occur (Wood and Wollenberg 2012). The control signal \(\left( u\left( s \right) \right) \), i.e., amount of control action, may be expressed by

$$\begin{aligned} u(s)={{G}_{{ PID}}}(s)\times { ACE}\ \end{aligned}$$
(1)

where \({{G}_{ PID}}(s)\) may be stated by (2)

$$\begin{aligned} {{G}_{ PID}}(s)={{K}_{P}}+\frac{{{K}_{I}}}{s}+s{{K}_{D}}\ \end{aligned}$$
(2)

In (2), \({{K}_{P}},{{K}_{I}}\) and \({{K}_{D}}\) are the proportional, integral and derivative gains of PID controller, respectively. These parameters require optimal tuning (Khodabakhshian and Hooshmand 2010).

Fig. 4
figure 4

Overview of AGC logic

The most important criteria in the process of an AGC design are as follows:

  1. (a)

    The ACE signal is straightly effected by load variation.

  2. (b)

    ACE should not allowed to drift. This means that the integral component of ACE must be small.

  3. (c)

    The control actions that are used for AGC must be small. Many of the errors in ACE are basically random load deviations that are not necessary to trigger control action. The unit speed will wear out if the control system tries to follow these load deviations.

A multi-area interconnection is consists of areas that are connected by tie-lines. The trend of frequency measured in any area is a sign of the mismatch power in the interconnection and not in the area only. Any area of a multi area system needs to adjust its generation according of the load and restore the frequency. For satisfying this purpose, AGC is needed to control the generation for responding to the variations of power in the interconnection.

The error between generation and the power demanded by loads and losses is the sum of power flows. Constant net interchange control is the scheme of matching a generation trend in the other area that has an acceptable match with the sum of areas own load and losses. For a two area system, the area control error can be obtained as Jaleeli et al. (1992).

$$\begin{aligned} { ACE}=\left( {{T}_{a}}-{{T}_{s}} \right) -10\beta \left( {{f}_{a}}-{{f}_{s}} \right) \ \end{aligned}$$
(3)

where \(\beta \) is a coefficient that traditionally is given in MW Hz\(^{0.1}\), and relates the combination of load and governor sensitivity to frequency (Cohn 1971). The area control error for a multi-area system can be obtained as below.

$$\begin{aligned}&\begin{array}{l} {\textit{ACE}_{1}}=\left( {{P}_{01}}-{{P}_{1}} \right) -10{{\beta }_{1}}\left( f-{{f}_{01}} \right) \\ {\textit{ACE}_{2}}=\left( {{P}_{02}}-{{P}_{2}} \right) -10{{\beta }_{2}}\left( f-{{f}_{02}} \right) \\ \vdots \\ {\textit{ACE}_{n}}=\left( {{P}_{0n}}-{{P}_{n}} \right) -10{{\beta }_{n}}\left( f-{{f}_{0n}} \right) \\ \end{array} \end{aligned}$$
(4)
$$\begin{aligned}&0={\text {P}}_{1}+{\text {P}}_{2}+\cdots +{\text {P}}_{n} \end{aligned}$$
(5)

where \({{P}_{01}}\) is the scheduled interchange power, \({{\beta }_{1}}\) is the frequency bias coefficient, \({{f}_{01}}\) is the scheduled frequency, \({\textit{ACE}_{1}}\) is the area control error and n is the number of areas in a multi-area system.

The most important feature of using AGC for a multi-area system is the control algorithm. The proportional scheme is used in the USA and a proportional integral (PI) algorithm is used in Europe. The PI algorithm is formulated as

$$\begin{aligned} Y={{C}_{P}}\cdot { ACE}+\frac{1}{{{T}_{N}}}\cdot \int {{ ACE}\cdot dt}\ \end{aligned}$$
(6)

where \({{C}_{P}}\) is the proportional gain, \({{T}_{N}}\) is the time constant and Y is the output of the controller, with typical values, \({{C}_{P}}= 0.1{-}0.3\) and \({{T}_{N}}= 30{-}100\) s.

Because the gain of the integral term is relatively small, a high proportional term increases the controller gain and improves the dynamic response (Glavitsch and Stoffel 1980). Different perspectives of automatic generation control by considering various models of power systems (linear or non-linear), classical or optimal control and multi-level control are discussed in Kumar and Kothari (2005). This study contains different AGC strategies included digital based, adaptive and self-tuning. Also, AGC systems including wind turbines, FACTS devices, and PV systems has been analyzed (Kumar and Kothari 2005). In some cases, the controller that is used is a PID controller. Formulation of PID controller that used for AGC is expressed as

$$\begin{aligned} {{G}_{c}}(s)={{K}_{P}}\left( 1+\frac{1}{{{T}_{i}}s}+{{T}_{d}}s \right) \ \end{aligned}$$
(7)

where \({{K}_{P}}\) is proportional gain, and \({{T}_{i}}\) and \({{T}_{d}}\) are integral and derivative time constants respectively (Singh and Sen 2004).

The fractional order PIDs (FOPID) have advantages such as castrating steady-state error, robustness gain deviation, good disturbance rejection and the ability to improve handling parameters uncertainty. Formulation of an FOPID may be written as

$$\begin{aligned} C(s)={{k}_{P}}+\frac{{{k}_{I}}}{{{S}^{\lambda }}}+{{k}_{D}}{{S}^{\mu }}\ \end{aligned}$$
(8)

where \(\lambda \text { and }\mu \) can accept any value in the range (0, 2) (Sondhi and Hote 2014).

Fuzzy logic controller (FLC) can be implemented by fivedifferent functional blocks: rated fuzzification, rule-base, data-base, inference engine, and defuzzification (Damarla et al. 1994). For matching the sensors and the actuators requirements, fuzzification of input variables and defuzzification of output variables are required, as the inputs and outputs of the fuzzy controller should be real numbers. The purpose of fuzzification is to change the real sensor data into fuzzy linguistic terms so that further fuzzy inferences can be changed according to the rule-base. Figure 5 shows the sets of fuzzy terms commonly used.

Fig. 5
figure 5

Membership functions of fuzzy terms

Fig. 6
figure 6

Normalized linguistic terms

  1. (a)

    Scaling Factor Tuning

    In order to simplify the membership function, the fuzzy linguistic terms in the rule-base style are defined (Abbasy and Ismail 2009). As a result, the actual alternation of the inputs are normalized into the interval of (0, 1). The input scaling factors are calculated by the experts or designers. Normalized linguistic terms are shown in Fig. 6.

  2. (b)

    Membership Function Width Tuning

    The performance of the fuzzy logic controller based on a designed membership functions and fuzzy control rules are defined in Damarla et al. (1994). Membership functions form the fuzzy variables and fuzzy sub sets. By considering the fuzzy variables with fuzzy sub sets like (NL, ZE, PL), once the shape and width and the center position of the membership functions are selected, they cannot be varied in the control process. Figure 7 shows the centers of the membership functions remain unaltered but the widths are varied and thus the membership function width is determined as one of the tunable parameters (Patel et al. 2008; Hyun-Joon et al. 1997).

Fig. 7
figure 7

Membership function width variation

2 Nature-inspired algorithms applied to AGC controller tuning

2.1 Genetic algorithm (GA)

Genetic algorithms (GAs) are intelligent search methods based on the operations observed in natural selection and genetics (Karnavas and Papadopoulos 2002). They act on a population of current estimations (the individuals) produced randomly to seek improvements. The individuals are converted to codes such as strings (chromosomes) built over some special alphabet, e.g. the binary code. The chromosomes are uniquely mapped onto the decision variable phenotypic. Once the decision variable phenotypic of the current population is calculated, individual performance are computed from the objective function, which characterizes the problem to be solved. It is also common to use the variable parameters directly to represent the chromosomes in the GA solution. At the reproduction step, the amount of the fitness, evaluated through the objective function and associated with each individual will be a measure for selection. Highly fit individuals will have better chances to appear in successive generations. In this way, the genetic algorithms look for many points in the search space at once so that the accuracy of the search within the areas of the observed best solutions is improved. The selected individuals are then adjusted through the usage of genetic operators in order to obtain the next generation. Genetic operators can be separated into three main parts, reproduction, crossover, and mutation.

  1. (a)

    Reproduction Fittest individuals are selected in the current population to be formed in generating the next population.

  2. (b)

    Crossover Pairs, or larger groups of individuals to exchange genetic information with one another.

  3. (c)

    Mutation Some probabilistic rule makes individual genetic representations to be used in the next generation.

Genetic algorithms rely on a population of points, and are based on probabilistic transition laws. Typical optimization methods are formed on deterministic hill-climbing techniques, which, by definition, will only find local optima. Genetic algorithms can also alter irregularity and noisy function calculations.

For the AGC problem, the performance index can be defined by adding the sum of squares of all errors in ACE, i.e.,

$$\begin{aligned} J=\int _{0}^{\infty }{\sum \limits _{i=1}^{k}{{{\left( {\textit{ACE}_{i}} \right) }^{2}}dt}}\ \end{aligned}$$
(9)

Minimizing the performance index J can be stated as:

figure a

where i, j are the area numbers and \({{K}_{P,j}}\), \({{T}_{i,j}}\) and \({{T}_{d,j}}\) are PID controller parameters of the \({{j}_{th}}\) area (Singh and Sen 2004; Hyun-Joon et al. 1997; Demiroren and Zeynelgil 2007; Pingkang et al. 2002; Abdel-Magid and Dawoud 1995a, b, 1996; Bhatt et al. 2010).

The control variables of \({{K}_{P,j}}\), \({{T}_{d,j}}\) and \({{T}_{d,j}}\) (i and j \(=\) 1 to k) in the GA algorithm can be obtained simultaneously by solving the constrained optimization problem. Flowchart of the GA process for AGC controller is depicted in Fig. 8.

Fig. 8
figure 8

Flowchart of genetic algorithm process

2.2 Particle swarm optimization (PSO)

Particle swarm optimization (PSO) is a nature-inspired algorithm that uses initial population like other meta heuristic algorithms. In the next step, the particles move towards the better solution area which has, which has the best response for an objective function. In this algorithm, each particle remembers its best solution (local best) and the group best solution (global best). In PSO, each particle moves in a multi-dimensional area to search the space according to its flying experience. In this space after choosing a point to each individual, The particle which has better objective function becomes a good solution for the next iteration. The search continues until convergence. The velocity and location of the particles are updated using the following equations.

$$\begin{aligned} {{V}_{id}}= & {} {{V}_{id}}+{{c}_{1}}{{r}_{1}}({{P}_{ld}}-{{X}_{id}}) +{{c}_{2}}{{r}_{2}}({{P}_{gd}}-{{X}_{id}}) \end{aligned}$$
(11a)
$$\begin{aligned} {{X}_{id}}= & {} {{X}_{id}}+{{V}_{id}}\ \end{aligned}$$
(11b)

where \({{X}_{id}}\) represents the location of i-th particle and \({{V}_{id}}\) represents the velocity (rate of position change) of particle i. The parameters \({{P}_{ld}},{{P}_{gd}}\) represent local and global best particles. Also, \({{\text {c}}_{1}}, {{c}_{2}}\) are constant acceleration coefficients and \({{\text {r}}_{1}},{{r}_{2}}\) are uniformly distributed random variables.

There are several methods for load frequency control in multi-area systems. In Jadhav and Vadirajacharya (2012) two areaes with thermal power systems was studied. The most important issues in designing a PID controller for this problem are efficiency and a quality response. The PID Parameters are obtained by optimizing the objective function in (9).

Some constraints on the PID parameters are

$$\begin{aligned} {{K}_{Pj}}^{\min }\le & {} {{K}_{Pj}}\le {{K}_{Pj}}^{\max } \nonumber \\ {{K}_{Ij}}^{\min }\le & {} {{K}_{Ij}}\le {{K}_{Ij}}^{\max } \nonumber \\ {{K}_{Dj}}^{\min }\le & {} {{K}_{Dj}}\le {{K}_{Dj}}^{\max } \end{aligned}$$
(12)

Application of particle swarm optimization (PSO) in AGC is discussed in Abdel-Magid et al. (2003). In this paper, a two area reheat thermal system and a PI controller are studied. The PSO algorithm is implemented to obtain the parameters of the controller in each area. The objective functions are considered to be

$$\begin{aligned} {{J}_{1}}= & {} \int \limits _{0}^{\infty }{\left( \Delta P_{tie}^{2}+\Delta f_{1}^{2}\right) dt}\ \end{aligned}$$
(13a)
$$\begin{aligned} {{J}_{2}}= & {} \int \limits _{0}^{\infty }{t\left( \left| \Delta {{P}_{tie}} \right| +\left| \Delta {{f}_{1}} \right| \right) dt}\ \end{aligned}$$
(13b)

For calculating optimal gains of the controller, a unit load change is assumed in area 1.

In Haddin et al. (2011), the PSO algorithm has been used to improve the dynamic stability of the power system. Dynamic stability is characterized by Comprehensive Damping Index (CDI), which is used in the objective function to be optimized using the PSO algorithm. The objective function that incorporates the CDI is

$$\begin{aligned} \min \hbox {f(z)}= & {} \hbox {CDI}=\sum \limits _{i=1}^{n}{(1-{{\xi }_{i}})} \end{aligned}$$
(14a)
$$\begin{aligned} {{\lambda }_{i}}= & {} {{\sigma }_{i}}+j{{\omega }_{i}} \end{aligned}$$
(14b)
$$\begin{aligned} {{\xi }_{i}}= & {} \frac{-{{\sigma }_{i}}}{\sqrt{{{\sigma }_{i}}^{2}+{{\omega }_{i}}^{2}}} \end{aligned}$$
(14c)

where \({{\lambda }_{i}},{{\sigma }_{i}},{{\omega }_{i}}\) are the i-th eigenvalue and its real and imaginary parts, respectively. Also, \({{\xi }_{i}}\) is the damping ratio of i-th eigenvalue.

The CDI is a function based on za row matrix, which contains the performance of AVR, PSS and AGC. In the particle swarm optimization (PSO), z is called the position of the particle with d-dimensional problem space.

In Patel et al. (2008), a robust controller has been designed for automatic generation control in hydro-thermal and thermal–thermal power systems using the combination of particle swarm optimization and genetic algorithms. In this case, a secondary Fuzzy controller has also been implemented. This optimization technique produces a better dynamic performance in various conditions.

A combination of particle swarm optimization and pattern search (PS) are used for tuning fuzzy PI controller in Sahu et al. (2015a). In this case, a two-area with non-reheat thermal systems were considered. A PI Fuzzy controller was used for AGC and the objective function for this problem was considered to be Integral of Time Multiplied Absolute Error (ITAE). Constraints were the maximum and minimum value of controllers parameters (\({{K}_{P}},{{K}_{I}}\)). These two algorithms together can perform a better search in such a high dimensional space. The PSO algorithm explores the global optimum and finding a suitable search area. Then, the PS is used for local search and finding the best solution in the area that obtained by the PSO. The results are the controller gains. The flowchart given in Fig. 9 explains the particle swarm optimization.

Fig. 9
figure 9

Flowchart of particle swarm optimization

2.3 Imperialist competitive algorithm (ICA)

The imperialist competitive algorithm is an evolutionary algorithm inspired by imperialistic competition. It begins with an initial population named colonies. The colony is sorted based on performance and divided into two groups; the imperialists for best solutions and the colonies for rest of the solutions. The imperialists attempt to take in more colonies to their empire space. The colonies will change according to the policies of imperialists (Mohammadi-Ivatloo et al. 2012; Rabiee et al. 2011). For the load frequency control, which aims to design a robust controller for the power system, the initial country is defined as

$$\begin{aligned}&{{{\textit{country}}}_{i,k}}=[{{K}_{{{P}_{i,k}}}},{{K}_{{{I}_{i,k}}}},{{K}_{{{D}_{i,k}}}}] \end{aligned}$$
(15a)
$$\begin{aligned}&{\textit{objective function}} = f({\textit{country}}) \end{aligned}$$
(15b)

To search various points throughout the countries, a random value is added to the direction of movement. At the first step, selected colonies of every imperialist are changed randomly. If there is a colony in an empire that performs is better than that of the imperialist, the positions of that imperialist and the colony are exchanged. The weakest imperialist among others loses its weakest colony, and one of the strongest imperialists capture that. An imperialist without colonies will collapse and captured by other imperialist. These steps are carried out until the stoping conditions are satisfied.

In Shabani et al. (2013), tuning of a PID controller for intense differential control against load disturbance is studied. Parameters of the controller are obtained by the imperialist competitive algorithm. This algorithm minimizes the following objective function.

figure b

where \({\textit{ACE}_{i}}\) is control error of area i, \(D{{W}_{i}}\) is Frequency deviation of area i, \(D{{P}_{Ti{{e}_{i-j}}}}\) is Active power flow between area i and j.

By minimizing (16), \({{K}_{P}},\,{{K}_{I}}\,and\,{{K}_{D}}\) of the PID controller are obtained.

In Rakhshani et al. (2012), this algorithm was implemented on a test system used for LFC system. In the practical systems, access to some of the state variables in LFC system is very difficult. However, the ICA method achieved the optimal performance.

For a three area AGC control with thermal, hydro and diesel units, PID tuning has been studied in Hosseini and Tusi (2012). The objective function for this case was considered to be

$$\begin{aligned} J= \sum _{i=1}^3 \Delta {{f}_{i}}^{2}+ \sum _{i=1}^3\sum _{j=1}^3 \Delta {{P}_{ij}}^{2} \end{aligned}$$
(17)

\(\Delta {\!{f}_{i}}\): frequency fluctuation in area i

\(\Delta {\!{P}_{ij}}\): power fluctuation between area i and area j

Minimizing (17) using ICA yields the controller parameters. Flowchart of ICA algorithm is presented in Fig. 10.

Fig. 10
figure 10

Flowchart diagram of ICA algorithm

2.4 Firefly algorithm (FA)

Firefly algorithm is a nature-inspired algorithm that uses the behaviour of fireflies in hot temperature regions in summer (Debbarma et al. 2014a). Characteristics of fireflies summarized as below

  1. (a)

    All fireflies are unisex. Thus, one firefly is attracted to other fireflies inattentive of their sex;

  2. (b)

    Attractiveness is dependent upon the brightness.

  3. (c)

    The light of a firefly is affected by the scenery of the objective function that should be optimized.

$$\begin{aligned} {{\beta }_{r}}={{\beta }_{0}}*\exp (-\gamma {{r}^{m}}),\text { with m}\ge \text {1} \end{aligned}$$
(18)

where r is the distance between any two fireflies, \({{\beta }_{{\begin{matrix} 0\end{matrix}}}}\) is the initial attractiveness and \(\gamma \) is an absorption coefficient.

$$\begin{aligned} {{r}_{ij}}=\left\| {{x}_{i}}-{{x}_{j}} \right\| =\sqrt{\sum \limits _{k=1}^{d}{{{({{x}_{i,k}}-{{x}_{j,k}})}^{2}}}} \end{aligned}$$
(19)

Here, \({{x}_{i,k}}\) is the k-th component of the coordinate \({{x}_{i}}\) of i-th firefly and d is the dimensions.

$$\begin{aligned} {{x}_{i}}={{x}_{i}}+{{\beta }_{0}}*{{e}^{-\gamma {{r}_{ij}}^{2}}}({{x}_{j}}-{{x}_{i}})+\alpha \left( rand-\frac{1}{2}\right) \end{aligned}$$
(20)

where the first term is the current position and the second term is an attraction term and the third term is a randomization with coefficient \(\alpha \).

Automatic generation control of a three unequal areaes with thermal systems that have reheat turbines are studied in Debbarma et al. (2014a). The controller is of fractional order (FO) named \({{I}^{\lambda }}{{D}^{\mu }}\) based on crone approximation to solve the multi-area AGC problem in power systems. The parameters of the controller for multi-area system are computed by optimizing the objective function, which is an integral square error (ISE).

$$\begin{aligned} J=\int \limits _{0}^{T}{\left\{ {{(\Delta {{f}_{i}})}^{2}}+{{(\Delta {{P}_{tie\text { i}-\text {j}}})}^{2}} \right\} dt} \end{aligned}$$
(21)

\(\Delta {{f}_{i}}\) is incremental change in frequency of area i, and \(\Delta {{P}_{tie\text { i}-\text {j}}}\) is incremental change in tie line power connecting between area i and j.

In Saikia and Sahu (2013) AGC for combined cycle gas turbine was studied by considering small step of load perturbation. The PID parameters are determined by optimizing the objective function (21).

Two Degrees of Freedom Fractional Order PID (2-DOF-FOPID) controller is proposed for AGC in Debbarma et al. (2014b). This method considers three unequal areas with thermal systems and reheat turbines.

Using the firefly algorithm, several parameters of the controller and speed regulation parameter of the governors are tuned. Integral Squared Error (ISE), Integral of Time Multiplied Absolute Error (ITAE) and Figure of Demerits (FD) were minimized in this case. ITAE and FD are formulated as follows.

$$\begin{aligned} {{ ITAE}}= & {} \int \limits _{0}^{T}{\left\{ {{\left| \Delta {{f}_{i}} \right| }^{2}}+{{\left| \Delta {{P}_{tie\text { i}-\text {j}}} \right| }^{2}} \right\} t.dt} \end{aligned}$$
(22a)
$$\begin{aligned} {{ FD}}= & {} {{({ PO})}^{2}}+{{({ US})}^{2}}+{{({ ST})}^{2}} \end{aligned}$$
(22b)

To tune of multi variable PID controllers in AGC, the firefly algorithm based on chaotic Tinkerbell map was proposed in Santos Coelho and Mariani (2012). The idea of using chaotic systems instead of randomly process was applied in the optimization problem. Evolutionary optimization paradigms can enhance convergence speed to avoid premature convergence by coupling chaotic sequences during the evolutionary cycle of the algorithms. Thus, chaotic sequences have been used instead of random ones. The two dimensional quadratic map of the Tinkerbell map is presented as

$$\begin{aligned} {{x}_{t+1}}= & {} x_{t}^{2}-y_{t}^{2}+a{{x}_{t}}+b{{y}_{t}} \end{aligned}$$
(23a)
$$\begin{aligned} {{y}_{t+1}}= & {} 2{{x}_{t}}{{y}_{t}}+c{{x}_{t}}+d{{y}_{t}} \end{aligned}$$
(23b)

where abcd are non-zero parameters and t is the number of iteration.

Better results can be obtained using this approach. The objective function for this problem is formulated as

$$\begin{aligned} F=\sum \limits _{k=1}^{N}{k.\left| {{e}_{1}}(k) \right| +k.\left| {{e}_{2}}(k) \right| }\ \end{aligned}$$
(24)

where k is the number of samples in the time domain. N is the total number of sampling and e(k) is the error signal. Minimizing this cost function produces the parameters of a multivariable PID controller. The flowchart of firefly algorithm is depicted in Fig. 11.

Fig. 11
figure 11

Flowchart diagram of firefly algorithm

2.5 Pattern search

Pattern search (PS) is a meta heuristic algorithm used for optimization problems. This algorithm computes a sequence of points that may or may not suitable to the optimal point. PS starts with a set of points called mesh around the initial points. The mesh is produced by summing the current point with a scalar multiple of a set of vectors called a pattern. If one point in the mesh has a better objective function value, it becomes the current point at the next iteration. Pattern search was starts at the initial value of \({{x}_{0}}\) and the pattern vectors or direction vectors act according to the directions presented in Fig. 12.

Fig. 12
figure 12

Flowchart diagram of pattern search algorithm

The algorithm computes the objective function at the mesh points in the same order and when convergence criteria satisfied, this process will stop.

A hybrid firefly algorithm and pattern search (hFA–PS) for designing PID controller for automatic generation control of a multi-area systems were proposed in Mahapatra et al. (2014). In this case, two area non-reheat thermal systems were considered. The firefly algorithm was applied to the integral time multiple absolute error objective function, and pattern search was then employed to find the best tuning of the PID controller parameters that provided by FA.

2.6 Bat algorithm (BA)

This algorithm is a nature-inspired algorithm that was initially developed by Yang (Dash et al. 2015). Bats use echolocation to distinguish their path in the dark environment without any obstacle. They emit loud sound and hear back the echo that comes from nearby objects. Some features of echolocation are chosen in optimization problems and they can be linked with the objective function. All bats use echolocation to sense distance and they also know the difference between food and prey. Bats fly randomly with velocity \({{v}_{i}}\) at position \({{x}_{i}}\) with the fixed frequency, varying wavelength and loudness.

Bats motion may be expressed as

$$\begin{aligned} {{f}_{i}}= & {} {{f}_{\min }}+({{f}_{\max }}-{{f}_{\min }})\times \beta \end{aligned}$$
(25a)
$$\begin{aligned} {{v}^{t}}_{i}= & {} \left( x_{i}^{t}-{{x}_{0}}\right) \times {{f}_{i}} \end{aligned}$$
(25b)
$$\begin{aligned} x_{i}^{t}= & {} x_{i}^{t-1}+v_{i}^{t} \end{aligned}$$
(25c)

where \(\beta \in (0,1)\) is a random vector from a uniform distribution, t is a number of iteration and \({{x}_{0}}\) is the current global best solution among all bats.

$$\begin{aligned} {{x}_{new}}={{x}_{old}}+\varepsilon {{A}^{t}} \end{aligned}$$
(26)

where \(\varepsilon \in \,[-1\,\,1]\) is a random number while \({{A}^{t}}=\langle {{A}_{i}}^{t}\rangle \) is the average loudness of all the bats at this time step.

$$\begin{aligned} {{A}_{i}}^{t+1}=r_{i}^{0}(1-{{e}^{-\gamma t}}) \end{aligned}$$
(27)

where \(\gamma \) is a constant.

In Dash et al. (2015), AGC of an interconnected multi-area thermal system was studied. The system has three areas with a single reheat turbine and generation rate constraints (GRC) of 3%. A cascade PI-PID controller was used in this problem. The objective function is an integral squared error and the bat algorithm is implemented for minimizing it.

$$\begin{aligned} J=\int _{0}^{T}{\left\{ {{(\Delta {{f}_{i}})}^{2}}+{{(\Delta {{P}_{tie\,lj-k}})}^{2}} \right\} }dt \end{aligned}$$
(28)

where j is the area number (1, 2). The results demonstrated that BA performs much better than GA.

Gain scheduling is a technique commonly used in designing a controller for non-linear systems. In Sathya and Ansari (2015), dual mode bat algorithm is used for scheduling PI controllers for interconnected power systems with emphasis on load frequency control. The dual mode approach controls the switching between proportional controller mode and integral controller mode depending on the magnitude of the output signal. The flowchart diagram of bat algorithm is shown in Fig. 13.

Fig. 13
figure 13

Flowchart diagram of Bat algorithm

2.7 Cuckoo search (CS)

Cuckoo search (CS) is a nature-inspired algorithm that based on the obligate brood parasitic behaviour of some cuckoo species in combination with the Le’vy flight behaviour of some birds (Mehdinejad et al. 2017). These birds can make a beautiful sound and they can make aggressive reproduction strategies. Some kind of these birds lay their eggs in communal nests. These species may remove others eggs to increase the incubate probability of their own eggs. According to typical features of Le’vy flights, behaviour optimization and optimal search have been designed. Preliminary results show its promising capability. Flowchart of the cuckoo search algorithm is shown in Fig. 14. In this algorithm, the following steps are taken.

  1. (a)

    Each cuckoo lays on the egg at a time and put in the randomly chosen nest.

  2. (b)

    The best nest which has many eggs will carry to the next generation.

  3. (c)

    The number of available nests is fixed and a host can discover an alien egg with a probability \({{P}_{a}}\).

Fig. 14
figure 14

Flowchart of cuckoo search algorithm for solving AGC problem

Automatic generation control of three unequal areas with hydro-thermal systems in each area is presented in Saikia et al. (2015). In this case, each area is interconnected with AC/DC transmission links with the electric governor in the hydro area. For the first time, battery energy storage (BES) system is employed in the multi-area systems. The controller that used for the secondary controller is a PID controller and the controller parameters are obtained by optimizing an integral square error (ISE) objective function using the cuckoo search algorithm. A methodology for designing an optimal superconducting magnetic energy storage for automatic generation control of multi-area systems with thermal units is presented in Chaine and Tripathy (2015). The parameters of the controller (\({{K}_{I}},{{K}_{SMES}},{{K}_{ID}}\)) are designed through minimizing the objective functions such as ISE, Integral Absolute Error (IAT) and Performance Indices (PFIs). These objective functions were calculated and evaluated for each set of optimized controllers to determine optimal gains is determined. Another controller that used for AGC problem in multi-area systems is 2-degree of freedom controllers. This controller called 2DOF-integral plus double derivative (2DOF-IDD) was proposed for secondary controller in AGC of multi-area systems. The cuckoo search algorithm has been used for optimizing an ISE cost function (Dash et al. 2014).

2.8 Teaching learning based optimization (TLBO)

Teaching learning based optimization (TLBO) is a recent algorithm in modern heuristic optimization techniques developed by Rao et al. (2012). The mechanism of the algorithm is on the basis of teaching and learning in a class between the teacher and the students. This method is based on the teaching effectiveness of a teacher. The teacher is the most respected and highly educated person in a society who gives high quality education to their students in a class. The result is not only the quality of teaching of the teacher but also the all of the knowledge of his/her own and sharing the knowledge of his/her classmates. On the students side, the results are on the basis of their outcomes in the class. TLBO is a nature-inspired, parameter free algorithm, which uses a population of solutions to reach the optimal solution. For TLBO, students are the population in a class and the control variables are the subjects offered to them (Barisal 2015). This algorithm is divided into two parts, namely teaching phase and learning phase, witch are described in the following. The flowchart of the TLBO method is depicted in Fig. 15.

Fig. 15
figure 15

Flowchart of the TLBO algorithm

  1. (a)

    Teaching phase This is the first part of the algorithm in which the teacher tries to improve the performance of his/her students according to his/her potential in a class. The average result of the classroom is improved by the influence of the teacher to some extent i.e. \(\mu _{j}^{k}\). If the new average grade of j-th subject at k-th iteration is \(\mu _{ne{{w}_{j}}}^{k}\), the difference between the existing mean and new mean of the j-th subject at the k-th iteration may be given as below.

    $$\begin{aligned} \mu _{dif{{f}_{j}}}^{k}=rand\left( \mu _{ne{{w}_{j}}}^{k}-\left( {{T}_{F}} \right) \mu _{j}^{k} \right) \end{aligned}$$
    (29)

    where \({{T}_{F}}\) is the teaching factor, which is evaluated randomly by the following equation.

    $$\begin{aligned} {{T}_{F}}=round\left( 1+rand\left( 0,1 \right) \right) \end{aligned}$$
    (30)

    The grade of the j-th subject of the i-th student at \(k+1\)-th iteration is updated by the following equation.

    $$\begin{aligned} x_{i,j}^{k+1}=x_{i,j}^{k}+\mu _{dif{{f}_{j}}}^{k} \end{aligned}$$
    (31)
  2. (b)

    Learning phase This is the last part of the algorithm where students upgrade their results by mutual interactions among themselves. Any two students such as \({{x}_{i}}\) and \({{x}_{j}}\) are randomly selected from the class and their grades are updated based on the better student. The learning process may be expressed mathematically as

    $$\begin{aligned} x_{i,j}^{k+1}=x_{i,j}^{k}+rand\times \left( x_{i,j}^{k}-x_{l,j}^{k} \right) \quad \text {if f}\left( {{x}_{i}} \right) \le \text {f}\left( {{x}_{l}} \right) \end{aligned}$$
    (32)

    Otherwise,

    $$\begin{aligned} x_{i,j}^{k+1}=x_{i,j}^{k}+rand\times \left( x_{l,j}^{k}-x_{i,j}^{k} \right) \quad \text {if f}\left( {{x}_{i}} \right) \ge \text {f}\left( {{x}_{l}} \right) \end{aligned}$$
    (33)

    where \(x_{i,j}^{k+1},x_{i,j}^{k}\) are the grade points of the j-th subject of i-th student at the k-th and \(k+1\)-th iteration; \(x_{l,j}^{k}\) is the grade point of j-th subject of l-th student (randomly selected) at k-th iteration. \(x_{l,j}^{k}\) is the overall grade point of i-th student:

    $$\begin{aligned} {{X}_{i}}=\left[ {{x}_{i1}}\,{{x}_{i2}}\,\ldots \text {, }{{x}_{ij}}\ldots ,\,{{x}_{iND}} \right] \end{aligned}$$
    (34)

There are four types of performance criteria considered in the control design. These are the integral of absolute error, integral of squared error, integral of time-weighted squared error and integral of time multiplied absolute error. However, ITAE and ISE criteria are mostly used in AGC studies due to their better performance as compared to ISTE and IAE criteria. Systems with ITAE objective functions settle more quickly than ISE method (Sahu et al. (2015b); Dixit and Roy 2015). Therefore, ITAE is a better objective function among all. The objective function for the multi-source power system is defined as

$$\begin{aligned} J={ITAE}=\int _{0}^{{{t}_{sim}}}{\left( \sum \limits _{i=1}^{k}{{\textit{ACE}_{i}}} \right) }.t.dt \end{aligned}$$
(35)

The objective function should be minimized subject to PID controller gains such as

$$\begin{aligned} K_{ij}^{\min }\le {{K}_{ij}}\le K_{ij}^{\max } \end{aligned}$$
(36)

where i = P ,I ,D and j = generation units.

The differential equation of PID controller of each unit can be obtained using the following equations.

$$\begin{aligned} {{U}_{j}}= & {} {{K}_{Pj}}{\textit{ACE}_{1}}+{{K}_{Ij}}\int {{\textit{ACE}_{1}} +{{K}_{Dj}}\frac{d{\textit{ACE}_{1}}}{dt}} \end{aligned}$$
(37a)
$$\begin{aligned} {{U}_{j}}= & {} {{K}_{Pj}}{\textit{ACE}_{2}}+{{K}_{Ij}}\int {{\textit{ACE}_{2}} +{{K}_{Dj}}\frac{d{\textit{ACE}_{2}}}{dt}} \end{aligned}$$
(37b)

The ACE signal is the area control error, which includes the data of the frequency error and the tie line power error for the related control area. For area-1 and area-2, the ACE signal can be written as a function of frequency variation and tie line power variation,i.e.,

$$\begin{aligned} {\textit{ACE}_{1}}={{B}_{1}}\Delta {{F}_{1}}+\Delta {{P}_{Tie}} \end{aligned}$$
(38a)
$$\begin{aligned} {\textit{ACE}_{2}}={{B}_{2}}\Delta {{F}_{2}}+\Delta {{P}_{Tie}} \end{aligned}$$
(38b)

The controller gains are tuned by TLBO algorithm according to the ITAE objective function (Barisal 2015).

2.9 Artificial bee colony (ABC)

The usage of ABC algorithm as a new artificial intelligence based optimization technique in order to optimize the AGC system and the comprehensive analysis of its tuning performance is studied in Gozde et al. (2012).

Artificial bee colony algorithm is one of the population based optimization algorithms used for solving the multidimensional optimization problems. An intelligent behaviour of honey bee colony that search new food sources around the colony has been considered to build the algorithm. This colony of artificial bees consists of three groups of bees called employed bees, onlookers and scouts. If one half of the colony contains the employed artificial bees, the other half includes the on-lookers. There is only one employed bee for every food source. It means that the number of employed bees is equal to the number the food sources around the hive. Each cycle of the bee search consists of three steps: moving the employed and onlooker bees onto the food sources, calculating their nectar amounts and determining the scout bees and directing them onto possible food sources. Each food source position stands for a possible solution of the problem. The amount of nectar of a food source depends on the quality of the solution stand for that food source. Onlookers are located on the food sources by using a probability based choice process. When the nectar amount of a food source increases, the probability value with which the food source is favored by onlookers increases. Every bee colony has scouts that are the colony’s researcher. The researchers do not have any direction while looking for food. They are primarily concerned with finding any kind of food source. For results of these acts, the scouts are characterized by low search costs and a low average in food source quality. Occasionally, the scouts can accidentally find rich, entirely new food sources. The group of feasible solutions could be discovery fast in the case of artificial bee’s colony. The ABC algorithm has triple search capability for search. While the local search is realized by employed and onlooker bee phases, the global search is realized by scout bee phase in ABC algorithm consecutively and separately. The flowchart of the ABC algorithm is shown in Fig. 16.

Fig. 16
figure 16

Flowchart of the ABC algorithm

In Gozde et al. (2012), the ABC algorithm has been applied to the AGC process to optimize the gains of a PI and a PID controller using the standard cost functions such as ITAE, IAE, ISE, ITSE.

2.10 Ant lion optimizer (ALO)

Ant lion optimizer (ALO) algorithm is a nature-inspired algorithm which uses the hunting behaviour of ant lions (Mirjalili 2015). Ant lions have two main cycles in their life named larvae phase and adult phase. Larvae period is the revelation of ALO algorithm. ALO algorithm has five main steps which made by operation of ant lions. These steps are accidental movement, making traps, trapping the ants, getting victims and rebuilding traps.

Fig. 17
figure 17

Flowchart of the ALO algorithm

The first position of ants are saved in the \({{P}_{ant}}\) and also the value of fitness function for each ant is stored in \({{F}_{of}}\). The process of searching food named random movement of ants and formulated as below:

$$\begin{aligned} X\left( t \right) =\left[ 0,csum\left( 2r\left( {{t}_{1}} \right) -1 \right) ,csum\left( 2r\left( {{t}_{2}} \right) -1 \right) ,\ldots ,csum\left( 2r\left( {{t}_{n}} \right) -1 \right) \right] \end{aligned}$$
(39)
Table 1 Classification of controller type and used test systems in a solution of AGC problem using nature inspired algorithms

where csum indicate cumulative sum, n is a maximum number of ants and t is an iteration. The normalized form is used to keep under control the random movement. So the position of each ant can be defined as:

$$\begin{aligned} X_{m}^{t}=\frac{\left( X_{m}^{t}-{{a}_{m}} \right) \left( {{b}_{m}}-c_{m}^{t} \right) }{\left( d_{m}^{t}-{{a}_{m}} \right) }+{{c}_{t}} \end{aligned}$$
(40)

where \({{a}_{m}}\), \({{b}_{m}}\)represents maximum and minimum of ran-dom steps of ants and \(c_{m}^{t}\), \(d_{m}^{t}\)are minimum and maximum of m-th ant at iteration t. After obtaining the new position for each ant, the trapping process of ants is started. The formulation of trapping ants by ant-lion can be expressed as

$$\begin{aligned} c_{m}^{t}= & {} ant-lion_{n}^{t}+{{c}^{t}} \end{aligned}$$
(41a)
$$\begin{aligned} d_{m}^{t}= & {} ant-lion_{n}^{t}+{{d}^{t}} \end{aligned}$$
(41b)

Also for trapping the ants by ant-lion, the sliding of ants into the traps should be considered. After that when the ants arrive at the bottom of the trap, the ant-lions catches them and update the position to hunt new preys. The flowchart of the ALO algorithm is depicted in Fig. 17.

Table 2 Different objective functions used in the optimal design of AGC controller using nature-inspired algorithms
Table 3 Objective function values for different algorithms
Table 4 Controller parameters for different algorithms in a single area test system
Table 5 Controller parameters for different algorithms in a two area test system

Ant lion optimizer algorithm is used for tuning controller of automatic generation control of three unequal thermal systems (Raju et al. 2016). Also, controllers like Integral (I), Proportional–Integral (PI), Proportional–Integral–Derivative (PID) and Proportional–Integral–Derivative plus second order Derivative (PID-DD) are considered as secondary controllers. The objective function of this study is introduced as

$$\begin{aligned} J=\int \limits _{0}^{T}{\left\{ {{\left( \Delta {{f}_{i}} \right) }^{2}}+\left. \,{{\left( \Delta {{P}_{tie}} \right) }^{2}} \right\} \right. }dt \end{aligned}$$
(42)

3 Comparison of nature-inspired algorithms applied to AGC

In this section, nature-inspired algorithms applied to the AGC problem are categorized with a different criteria. Table 1 summarizes the type of the controller and properties of the test system used in solving AGC problem using nature-inspired algorithms. For example, the GA algorithm is used for optimal design of I, PI, PID and PID-fuzzy controllers for AGC problem and the results are illustrated using single area, two-area and three-area test systems. The corresponding reference number of each controller and each test system are indicated in Table 1.

Table 2 shows the different objective functions used in the optimal design of AGC controller using nature-inspired algorithms. For example, IAE of ACE is used as an objective function of AGC controller design using GA and PSO.

Table 3 provides a numerical comparison between the values of objective functions for different algorithms, and Tables 4, 5 and 6 show a numerical comparison of the PID coefficient according to the test systems of a single area, two area and three areacases used in literature.

Table 6 Controller parameters for different algorithms in a three area test system

4 Conclusion

The key issue with using PID controllers is how to tune their parameters accurately and efficiently. The classical technique based on trial and error is time consuming and often yields suboptimal results. Nature-inspired algorithms, alternatively, can achieve a better dynamic performance, overshoot and settling time compared to conventional techniques. On the other hand, generally, most industrial processes are multi variable systems. For processes with minimal interactions, a diagonal PID controller structure will be suitable. Otherwise, cross coupling of the process channels makes it difficult to design a controller for each loop independently. In other words, adjusting controller parameters in one loop affects the performance of another loop, sometimes to the extent of destabilizing the whole system. This is where nature-inspired methods with a global overview of the whole system can come in. In this paper, applications of different nature-inspired algorithms in the optimal design of AGC controllers were studied. Such algorithms were classified based on the type of controller, objective function and the test cases used for performance evaluation.