1 Introduction

The principle focus of load frequency control (LFC) problems is to ensure the frequency and the inter-area tie-line power inside sensible range to manage the adjustment in demand and disturbance [1]. It also helps in maintaining the system frequency and the voltage within a prescribed limit while giving an acknowledged size of power quality [2]. To achieve this purpose, different algorithms such as hearty control [3], decentralized angle [4], straight quadratic [5], shaft moving [6] and variable structure [7] have been proposed in the literature. However, these algorithms have a few drawbacks which diminish their execution. Hence, many authors have applied artificial intelligence, for example fuzzy logic (FL) [8] and neural network (NN) [9]. In spite of the fact that these algorithms are proficient in managing the nonlinearities of the power system, they have different disadvantages.

Another answer for the LFC issue is to use an evolutionary algorithm (EA). The nonlinearity functions in LFC can be easily settled down by EA. Genetic algorithm (GA) [10], particle swarm optimization [11], bacteria foraging [12], firefly algorithm [13, 14], gravitational search [15, 16], bat algorithm [17] and cuckoo look calculation [18] are treated with LFC design. Despite the fact that these algorithms give a superior execution for the design issue, they have lots of disadvantages like significant time of usage, commonly caught into local optima, etc. Besides, the impact of PV on LFC design by means of optimization algorithm was not examined in the literature.

Whale optimization algorithm (WOA) is a newly suggested optimization approach which has been applied to a variety of optimization tasks because of its exciting features compared to other similar techniques [19]. It is simple, flexible, easy to programme and has a distinctive ability to maintain an appropriate balance among the exploration and exploitation phases in the search process which results in improved performance. Also, it is a derivative-free and has very few algorithm parameters [20]. Many attempts have been made to find the variant of WOA that performed better on optimization problems such as improved WOA [21], nature-inspired WOA [22] and enhanced WOA [23]. Although WOA provides some adequate results for optimizing a problem, it is often problematic. This causes a large timing in implementation of the algorithm and thus trapped in local optima [24]. In order to overcome the limitation of WOA, hybridization with another algorithm is implemented. This will lead to different hybrid algorithms such as neural network-based WOA [25], hWOA-SA [26], hWOA-PS [27]. The emphasis was to verify its adaptability to other optimization problems, and on the other hand, complexity was increased little more.

In original WOA algorithm, the current best candidate solution is the target prey and the other search agents will hence try to update their positions towards the best search agent. Since the position of the optimal design in the search space is not known from the earlier, this procedure of update may bring about getting caught in local optima. Consequently, in the present MWOA algorithm, some correction factors, i.e. CF1, CF2, are introduced which can overcome the above such problem. Thus, the proposed work defines the feasibility of the MWOA algorithm which can use to find the controller parameters in a two-area power system.

The novel contributions in this paper are briefly described as follows:

  • The impact of integration of PV grid with thermal system under intermittent climatic conditions in a two-area interconnected power system is investigated.

  • The impact of PV system for frequency regulation is studied under varying environmental conditions.

  • The Modified WOA algorithm is proposed, and its performance is validated for different benchmark functions.

  • The controller is designed with said MWOA algorithm and is demonstrated that frequency regulation is regulated by comparing it with other existing designed controllers.

2 System under study

From the literature, it is observed that most of the existing research works are focused on load frequency control of thermal, hydro and gas interconnected power system. Some of the works included the wind power system together, but very few researches focused on interconnected power system of either of these above-mentioned systems with PV system as shown in Fig. 1.

Fig. 1
figure 1

Two-area power system composing of PV grid and thermal generator

2.1 Modelling of PV-thermal power system

2.1.1 Modelling of thermal power system

The thermal power system consists of generator, governor, turbine and reheater. The transfer functions of the thermal power system are described as follows.

The governor’s transfer function is: [28, 29]:

$$ G_{\text{g}} (s) = \frac{{K_{\text{g}} }}{{1 + sT_{\text{g}} }} $$
(1)

The reheater’s transfer function is:

$$ G_{\text{r}} (s) = \frac{{1 + sK_{\text{r}} T_{\text{r}} }}{{1 + sT_{\text{r}} }} $$
(2)

The turbine’s transfer function is:

$$ G_{\text{t}} (s) = \frac{{K_{\text{t}} }}{{1 + sT_{\text{t}} }} $$
(3)

The thermal generator’s transfer function is

$$ G_{\text{P}} (s) = \frac{{K_{\text{P}} }}{{1 + sT_{\text{P}} }} $$
(4)

2.1.2 Modelling of photovoltaic system

The transfer function of the solar photovoltaic system including PV panel, maximum power point tracker, converter and filter is given by the equation.

$$ G_{\text{PV}} (s) = \frac{K - Ls}{{s^{2} + Ms + N}} $$
(5)

3 Structure of proposed PIDF controller

The principle steps for outlining PID controller with a derivative filter is alluded as PIDF controller. The filter used here is basically a low-pass filter and presents a further parameter which can diminish the high-frequency sensor noise and system oscillations. The derivative term of a PID controller amplifies the harmonic components [30]. The structure of the proposed PIDF controller is shown in Fig. 2. A traditional way to deal with the design of PIDF controllers is to pick the additional real pole in the derivative term. Let CPIDF(s) signifies the transfer function of an alleged PIDF controller, which can be defined as:

$$ C_{\text{PIDF}} (s) = K_{\text{p}} + \frac{{K_{\text{i}} }}{s} + \frac{{sK_{\text{d}} }}{{1 + s\varsigma_{\text{d}}^{'} }} $$
(6)

where Kp, Kd and Ki are the proportional, derivative and integral constants, respectively.

Fig. 2
figure 2

Structure of proportional integral derivative with derivative (PIDF) controller

4 Optimization problem

While formulating an optimization problem, objective function should be set first. It is set based on performance index. In this case, the objective is the minimization of frequency error. Integral time absolute error (ITAE) is chosen as performance index [31]. The ITAE objective function can be formulated as:

$$ J = {\text{ITAE}} = \int\limits_{0}^{{t_{\text{sim}} }} {\left( {\left| {\Delta F_{1} } \right| + \left| {\Delta F_{2} } \right| + \left| {\Delta P_{Tie} } \right|} \right)} \; \cdot t \cdot {\text{d}}t $$
(7)

where \( \Delta F_{1} \) and \( \Delta F_{2} \) represent the area 1 and area 2 frequency deviations, \( \Delta P_{\text{Tie}} \) shows the tie-line power deviation and tsim is the total simulation time.

To optimize the controller gains, the ranges of the controller parameters are considered as constraints. Therefore, the considered problem may be formulated as an optimization problem as described below;

$$ {\text{Minimize}}\quad J $$
(8)
$$ \begin{aligned} {\text{Subject}}\;{\text{to}}\quad & K_{P\hbox{min} } \le K_{P} \le K_{P\hbox{max} } \\ & K_{I\hbox{min} } \le K_{I} \le K_{I\hbox{max} } \\ & K_{D\hbox{min} } \le K_{D} \le K_{D\hbox{max} } \\ & NN_{\hbox{min} } \le NN \le NN_{\hbox{max} } , \\ \end{aligned} $$
(9)

where \( K_{X\hbox{min} } \) and \( K_{X\hbox{max} } \) represent the minimum and maximum limits of the controller parameters and J is the fitness function.

5 The modified whale optimization algorithm (MWOA)

5.1 Whale optimization algorithm

Recently, a new search algorithm known as WOA is developed which basically uses the concept of social behaviour of whales. Among every one of the types of whales, humpback whales are greater in size. Whales like to chase krill and little fishes. Hunting procedure of humpback whales depends on bubble-net feeding methodology. The twisting bubble-net nourishing plan is numerically demonstrated in WOA. Humpback whales show some essential practices during the process of hunting. The mathematical model and optimization algorithm for the proposed WOA calculation can be described as follows.

5.1.1 Encircling prey

The best ability associated with all the whales is that they have the ability to recognize the area of the prey and subsequently start surrounding it. As the initial position of prey is unknown previously, the said WOA algorithm considers present optimal solution near to the most possible solutions. The other search agents change their position towards the position of the current best search agent in the wake of getting the present best position. Mathematically, it can be represented as:

$$ \overrightarrow {X} = \left| {\overrightarrow {Y} \overrightarrow {{Z^{ * } }} \left( t \right) - \overrightarrow {Z} \left( t \right)} \right| $$
(10)
$$ \overrightarrow {Z} (t + 1) = \overrightarrow {{Z^{ * } }} \left( t \right) - \overrightarrow {D} .\overrightarrow {X} $$
(11)

where \( \overrightarrow {Z} \) is the position vector, \( \overrightarrow {D} \) and \( \overrightarrow {Y} \) are the coefficient vectors, t demonstrates the present iteration, | | is the absolute value, ‘.’ is a component-by-component augmentation and Z is the position vector of the best solution and in each iteration, the best solution will be updated. Now, the vectors \( \overrightarrow {D} \) and \( \overrightarrow {Y} \) can be expressed as:

$$ \overrightarrow {D} = 2\overrightarrow {b.} \overrightarrow {r} - \overrightarrow {b} $$
(12)
$$ \overrightarrow {Y} = 2\overrightarrow {s} $$
(13)

where the estimation of \( \overrightarrow {b} \) is diminished directly from 2 to 0 as the cycle advance and s is an irregular vector in the range [0, 1].

5.1.2 The mechanism of bubble-net attacking (exploitation phase)

The scientific demonstration of the bubble-net behaviour of humpback whales is explained in the following sections.

  1. 1

    Shrinking encircling mechanism:

    The primary aim of this mechanism is to lower down the estimated values of \( \overrightarrow {b} \) in Eq. (12). It is observed that the changing scope of \( \overrightarrow {D} \) is similarly lessened by \( \overrightarrow {b} \). All things considered \( \overrightarrow {D} \) will be irregular qualities in the range [− a, a] where ‘b’ is lessened from 2 to 0 all through cycles. Setting arbitrary qualities for a vector ‘a’ is in the middle of [− 1, 1] territory.

  2. 2.

    Spiral updating position:

    The primary aim of this mechanism is to estimate the of distance between the prey and the whale. Then after, a spiral condition is estimated between the position of whale and prey which can be formulated as:

$$ \overrightarrow {Z} \left( {t + 1} \right) = \overrightarrow {X'} .e^{ks} .\cos \left( {2\varPi s} \right) + \overrightarrow {{Z^{ * } \left( t \right)}} $$
(14)

where \( \overrightarrow {{X^{'} }} = \left| {\overrightarrow {{Y^{ * } }} \left( t \right) - \overrightarrow {Y} \left( t \right)} \right| \) and it likewise shows the distance of the ‘i’th whale to the prey, ‘.’ is a component-by-component multiplication and k is a constant which characterizes the condition of the logarithmic winding.

During the optimization process, a specific probability is accepted in picking the two techniques to refresh current position of a humpback whale. The expected probability of selecting spiral mode or the shrinking encircling mechanism is 50%. Mathematically, it can be represented as:

$$ \overrightarrow {Z} \left( {t + 1} \right) = \left\{ {\begin{array}{*{20}c} {\overrightarrow {{Z^{ * } }} \left( t \right) - \overrightarrow {D} \cdot \overrightarrow {X} } & {if\;Q \le 0.5} \\ {\overrightarrow {X'} \cdot e^{ks} \cdot \cos \left( {2\varPi s} \right) + \overrightarrow {{Z^{ * } }} \left( t \right)} & {if\;Q \ge 0.5} \\ \end{array} } \right. $$
(15)

where Q is a subjective number which is varied in the range [0, 1].

5.1.3 Search for prey (exploration phase)

This mechanism deals with exploration for prey by utilizing vector \( \overrightarrow {A} \), where vector \( \overrightarrow {A} \) utilizes the arbitrary qualities in the range of − 1 to 1 which searches the agents forcefully to move far from a reference whale. The mathematical representations of the above conditions are

$$ \overrightarrow {X} = \left| {\overrightarrow {Y} \cdot \overrightarrow {{Z_{rand} }} - \overrightarrow {Z} } \right| $$
(16)
$$ \overrightarrow {Z} \left( {t + 1} \right) = \overrightarrow {{Z_{rand} }} - \overrightarrow {D} .\overrightarrow {X} $$
(17)

where \( \overrightarrow {{Z_{rand} }} \) is an arbitrary position vector which represents the present population.

5.2 Modified whale optimization algorithm

According to WOA algorithm, the objective prey is the present best candidate solution. What is more, consequently the other agents will try to refresh their positions towards the best search agent according to Eqs. (10) and (11). Amid the initial phase of the search procedure, the most ideal searching agent in search space is not known. Hence, the procedure of the update may come about in moving the search agents past the optimal value which may bring about getting caught in local optima. To overcome this limitation, two correction factors such as CF1 and CF2 which modify the search agent during the search and their values are 2.5 and 1.5, respectively. The updated equations become:

$$ \overrightarrow {X} = \left( {\overrightarrow {Y} \overrightarrow {{Z^{ * } }} \left( t \right) - \overrightarrow {Z} \left( t \right)} \right)/C_{F1} $$
(18)
$$ \overrightarrow {Z} (t + 1) = \left( {\overrightarrow {{Z^{ * } }} \left( t \right) - \overrightarrow {D} \cdot \overrightarrow {X} } \right)/C_{F1} $$
(19)

Similarly, in the exploitation phase, a correction factor is introduced and in this case the spiral updating position, Eq. (11) is modified as:

$$ \overrightarrow {Z} \left( {t + 1} \right) = \left( {\overrightarrow {X'} \cdot e^{ks} \cdot \cos \left( {2\varPi s} \right) + \overrightarrow {{Z^{ * } \left( t \right)}} } \right)/C_{F2} $$
(20)

At long last, a correction factor is presented in the exploration phase of the prey. So in the WOA, the position of the search agents is refreshed in exploration stage as indicated by an arbitrarily picked search agent according to Eqs. (16) and (17). Thus, it might prompt arbitrary development of whales. Accordingly, in the present MWOA strategy, the positions of the search agents are refreshed by utilizing the correction factors as per Eqs. (21) and (22). The pseudocode for our proposed approach is explained in Fig. 3.

Fig. 3
figure 3

Flowchart for the proposed modified WOA algorithm

Equations (21) and (22) are considered as:

$$ \overrightarrow {X} = \left( {\overrightarrow {Y} \cdot \overrightarrow {{Z_{rand} }} - \overrightarrow {Z} } \right)/C_{F1} $$
(21)
$$ \overrightarrow {Z} \left( {t + 1} \right) = \left( {\overrightarrow {{Z_{rand} }} - \overrightarrow {D} \cdot \overrightarrow {X} } \right)/C_{F2} $$
(22)

6 Simulation results and discussion

6.1 Model verification

The proposed modified WOA algorithm is being tried on some standard benchmark functions. Table 1 shows the performance of different algorithms over the benchmark functions. This test shows the predominance of the modified approach.

Table 1 Different bench functions with their fitness (minimization) value by applying hGGSA-PS [28], WOA and the proposed MWOA algorithms

Table 1 speaks the fitness values (minimization) of the benchmark functions by considering the modified algorithm with the standard WOA and the published GGSA-PS [28] algorithm. For each case, the algorithm is kept running for 500 times and Table 1 also demonstrates the comparison of the best, the worst and the mean fitness value for each function. It can be concluded that the proposed modified algorithm provides better results compared to other algorithms. Thus, the proposed modified algorithm can be used to calculate the PIDF controller parameters for the said two-area system composing of PV grid and thermal generator.

Figure 4 indicates the convergence characteristic for all the algorithms on a Schwefel benchmark function. It can be seen that the performance of the proposed modified WOA algorithm is much superior that other algorithms.

Fig. 4
figure 4

Convergence plots for MWOA, WOA, GSA and GA algorithms

6.2 Implementation of proposed MWOA algorithm

In order to calculate the objective function of the above system, some disturbances are considered and the simulation continued. Here, Eq. (8) is used to find the parameters of the PIDF, PID and PI controllers. For comparison, MWOA-optimized PID and WOA-optimized PI parameters are given in Table 2. Table 2 shows that the WOA-based PI yields better result than the published firefly algorithm (FA)- and genetic algorithm (GA)-tuned PI controller. It can be further concluded from the Table 2 that when the modified WOA employs to tune the controller parameters, it provides better result as compared to the WOA-tuned PI controller. Finally, it is seen that when MWOA technique is employed to tune the PID controller, the objective function obtained is 1.56 reduces to 1.48 when proposed MWOA technique is employed to the PIDF controller. Hence, it can be concluded that for the engineering design problem also proposed MWOA technique provides better result as compared to original WOA technique. To evaluate the time-domain performance, the following disturbances are considered:

Table 2 Controller parameters for the two-area power system with HVDC line

6.3 Disturbance 1: a 10% step change in thermal system demand

A 10% step increment in demand of thermal system is used, and the system response is shown in Fig. 5a–c. It can be observed that there is appreciable difference between the PID and proposed MWOA-based PIDF controller performance as the system overshoots are less. To represent the simulation results, the following cases are considered:

Fig. 5
figure 5

ac Response of the system for Disturbance-1

  • Case-1: The system response using a PI controller with the genetic algorithm (GA) is represented with a legend ‘Published GA-Based PI [14] ’.

  • Case-2: The system response using a PI controller with the firefly algorithm (FA) is represented with a legend ‘Published FA-Based PI [14] ’.

  • Case-3: The system response using a PI controller with the whale optimization algorithm (WOA) is represented with a legend ‘WOA-Based PI’.

  • Case-4: The system response using a PID controller with the modified whale optimization algorithm (MWOA) is represented with a legend ‘MWOA-Based PID’.

  • Case-5: The system response using a PIDF controller with the proposed modified whale optimization algorithm is represented with a legend ‘Proposed MWOA-Based PIDF’.

6.4 Disturbance 2: a 10% step change in both areas

In this scenario, both the thermal system demand and the PV temperature are increased at a step of 10%. Figure 6a–c shows the system response of the power system. From the response curves, it is found that in case of modified WOA-based PIDF controller, the overshoots are less and the system response reached steady state rapidly as compared to MWOA-based PID and WOA-based PI controllers.

Fig. 6
figure 6

a–c) Response of the system for Disturbance-2

6.5 Parameter variation

A parameter variation test is connected to verify the effectiveness of the proposed MWOA-based two-area power system. Figure 7 demonstrates the frequency response curve of the first region with variety in governor time constant. It is observed that the system is consistent with the proposed controller. Finally, the variation in the turbine time constant test is performed to support the supremacy of the proposed controller. The response is shown in Fig. 8. A conclusion can be made from the above study that the composed controller is fit for giving adequate damping and the robustness.

Fig. 7
figure 7

Change in frequency of area 1 with uncertainty in governor time constant

Fig. 8
figure 8

Change in frequency of area 1 with uncertainty in turbine time constant

6.6 Performance indices and robustness

The adequacy of the outlined controllers is verified through different indices; for example, the integral absolute error (IAE), integral time absolute error (ITAE), the integral square error (ISE) and the integral time multiply square error (ITSE) are used as:

Integral absolute error (IAE)

$$ IAE = \int\limits_{0}^{{t_{sim} }} {\left( {\left| {\Delta F_{1} } \right| + \left| {\Delta F_{2} } \right| + \left| {\Delta P_{Tie} } \right|} \right)} \; \cdot dt $$
(23)

Integral time absolute error (ITAE)

$$ ITAE = \int\limits_{0}^{{t_{sim} }} {\left( {\left| {\Delta F_{1} } \right| + \left| {\Delta F_{2} } \right| + \left| {\Delta P_{Tie} } \right|} \right)} \cdot t \cdot dt $$
(24)

The integral squar error (ISE)

$$ ISE = \int\limits_{0}^{{t_{sim} }} {\left[ {\left( {\Delta F_{1} } \right)^{2} + \left( {\Delta F_{2} } \right)^{2} + \left( {\Delta P_{Tie} } \right)^{2} } \right].dt} $$
(25)

The integral time multiply square error (ITSE)

$$ ITSE = \int\limits_{0}^{{t_{sim} }} {\left[ {\left( {\Delta F_{1} } \right)^{2} + \left( {\Delta F_{2} } \right)^{2} + \left( {\Delta P_{Tie} } \right)^{2} } \right]t.dt} $$
(26)

Table 3 gives the estimations of different indices for every controller. It is obvious from the tables that the performance indices are less with proposed MWOA-based PIDF controllers as compared to other controllers. This confirms the time-domain characteristics are decreased by utilizing the proposed modified algorithm.

Table 3 Optimized lead–lag controller parameters for different objective functions

7 Conclusion

In this paper, a novel approach is made by proposing a modified whale optimization algorithm for a PID with derivative controller design for frequency regulation of a two-area PV grid and thermal generator power system. The superiority of the proposed MWOA algorithm over original WOA in terms of implementation time and solution quality is compared by taking several benchmark test functions. As a next step, the proposed MWOA technique is then applied to optimize a PIDF controller for frequency control of hybrid power systems. It is observed that MWOA-based PIDF controller is more effective for LFC problems compared to conventional PID controller.