A modified whale optimization algorithm-based adaptive fuzzy logic PID controller for load frequency control of autonomous power generation systems

ABSTRACT An autonomous power generation system (APGS) contains units such as diesel energy generator, solar photovoltaic units, wind turbine generator and fuel cells along with energy-storing units such as the flywheel energy storage system and battery energy storage system. The components either run at lower/higher power output or may turn on/off at different instants of their operation. Due to this, the conventional controllers will not provide desired performance under varied load conditions. This paper proposes an adaptive fuzzy logic PID (AFPID) controller for load frequency control. In order to achieve an improved performance, a modified whale optimization algorithm (mWOA) was also proposed in this paper for tuning of the AFPID parameters. The proposed algorithm was first evaluated using standard test functions and compared with other recent algorithms to authenticate the competence of algorithm. The proposed mWOA algorithm outperforms PSO, GSA, DE and FEP algorithms in five out of seven unimodal test functions and four out of six multimodal test functions. The effectiveness of the AFPID compared with the conventional PID and the proposed AFPID provides better performance. Reduction of 39.13% in error criteria (objective function) compared with WOA-PID controller. The proposed approach was also compared with some recently proposed frequency control approaches in a widely used two-area test system.


Introduction
The increasing power demand, rising costs of electricity transmission and distribution, deregulation of the energy markets, depletion of fossil fuels are making a significant entrance of renewable energy resources into the energy sector [1][2][3][4]. The centralized power generation, transmission and distribution are now shifting to a decentralized one [1]. In this framework, a new power system model called autonomous power generating system (APGS) has evolved. It is a collection of distributed energy resources (DERs) such as diesel energy generator (DEG), fuel cell (FC), microturbine generator (MTG) with solar photovoltaic (PV) units and wind turbine generators (WTG) and cluster of loads [1,2]. The chaotic characteristics of the load and the sustainable energy generations, i.e. wind and solar sources, introduce fluctuations in the system frequency [1]. Energy-storing elements such as ultra capacitor (UC), flywheel energy storage system (FESS) and battery energy storage system (BESS) are coupled to the system to mitigate the unbalance due to generation and load mismatch. These energy-storing devices store the surplus power for a small interval of period from the renewable energy sources and later deliver the power to the grid when there is a more load demand [5,6]. A proper control strategy is required for coordinating these actions accurately [5]. This calls for the concept of load frequency control (LFC) for damping the frequency oscillation.
To enhance the LFC performance, several approaches such as the conventional PID controller [4,7], robust H ∞ controller [8][9][10][11], fractional order controller [1,5,6] have been used in similar types of system design. To preserve desirable performance and stability, either centralized controller [6] or decentralized controller [4,12] is used. The system parameters and the local loads of the hybrid power system controlled by a centralized control unit rather than multiple decentralized controllers make the overall system design simple as well as reduce cost [1]. Conventional PI-based controller has been adopted by the researcher for LFC on similar types of system [4,7]. Robust H ∞ controller approaches have been widely proposed in the literature for LFC problem [3,[9][10][11]. Few papers addressed fuzzy logic techniques for optimal tuning of the standard PID controller [13][14][15] and FOPID controller [5] for solving LFC problem. It is observed that adaptive control makes the system under control less affected by the unmodelled process dynamics and variation in system parameters. Therefore, in the proposed control strategy, an adaptive fuzzy-based PID controller is taken into consideration for LFC in the proposed hybrid power system.
Controlling APGS with various uncertain system parameters is mostly based on optimization [6]. Different types of hybrid algorithms were developed in many papers [1,5,7,8,11,13] to find the controller gains in order to enhance the system transient response as well as to ensure the robustness and stability of the system. Many researchers have suggested different optimization techniques such as fast evolutionary algorithm [16], Glowworm Swarm Optimization [17], multi-objective evolutionary algorithm [18], microgenetic algorithm [19], hybrid differential evolution and harmony search algorithm [20], clustered adaptive teaching learningbased optimization [21] in power system problems. Whale optimization algorithm (WOA) is a recently proposed technique inspired by hunting the behaviour of whales [22]. The major benefit of the WOA technique compared to other established techniques is that the WOA technique does not need specific algorithm parameters. Apart from this, WOA is easy to understand and program. The algorithm uses three operators: the hunt for prey, surrounding the prey and bubble-net searching behaviour of whales for optimization. The superiority of WOA over PSO, GSA, DE and FEP has been demonstrated [22]. However, in original WOA algorithm, the present best solution is the target prey and the others attempt to modify their positions towards the best agent. This process of update may result in being stuck in local optima. Therefore, in the present paper, a modified whale optimization algorithm (mWOA) is proposed where correction factors are introduced at various stages of the algorithm to get improved results. After this, the mWOA technique is used to tune AFPID (adaptive fuzzy logic PID) controller parameters; results are compared with WOA and mWOA optimized PID controller. Deviation in grid frequency, control signal and the output of different controlled sources of APGS system are analysed with standard PID and AFPID controllers and the superiority of the AFPID over PID is demonstrated.

Whale optimization algorithm
WOA is a recently proposed meta-heuristic algorithm based on social behaviour of whales [8]. Humpback whales are among the biggest whales whose favourite prey are krill and small fish herds. The hunting process of humpback whales is based on the bubble-net feeding approach method. The twisting bubble-net nourishing scheme is mathematically modelled in WOA. Here the scientific model of encircling prey, spiral bubble-net encouraging move and scan for prey is mathematically expressed.

Encircling prey
Humpback whale encircles the prey (small fishes); at that point. overhauls its position towards the optimum solution over the course of increasing number of iterations from start to a maximum number of iterations.
where t shows the current iteration, A and C are coefficient vectors, X is the position vector of the best arrangement acquired in this way, X * is the position vector, · is the element by element multiplication and | | is the absolute value. It merits saying here that X * should be upgraded in every cycle if there is a superior solution.
where a is linearly decreased from 2 to 0 over the course of iterations and r is a random vector in [0, 1].

Bubble-net attacking technique
Here two methodologies are planned as follows: 1. Shrinking encircling mechanism: This behaviour is accomplished by diminishing the estimation of a in Eq. (3). Take note of that the fluctuation range of A is likewise diminished by a. As such, A will be a random value in the interim [−a, a] where a is diminished from 2 to 0 throughout cycles. Random values for a vector A are set in the range between [−1, 1].
2. Spiral updating arrangement: Spiral condition for position update between humpback whale and prey that was helix-formed development given as takes after where D = | X * (t) − X(t)| and shows the separation of the ith whale to the prey (best arrangement got as such), b is a steady to define the state of the logarithmic spiral; dot (·) is a component by component augmentation and l is an arbitrary number in the range [−1, 1].
To model so, we are assuming that there is a likelihood of picking a half between either the contracting surrounding system or the spiral model to overhaul the position of whales during enhancement. The scientific model is as per the follows: where P is an arbitrary number in the range [0,1].

Search for prey (exploration phase)
The A vector can be utilized for exploration to search for prey; vector A additionally takes the qualities more noteworthy than one or not as much as −1. Exploration takes after the following two conditions: where −−→ X rand is an arbitrary position vector (an irregular whale) looked over the present population and calculated as when | A| > 1, authorized investigation to WOA calculation to find worldwide ideal avoids local optima and when | A| < 1, for overhauling the position of current search operator/best arrangement is chosen.

Modified whale optimization algorithm
In original WOA algorithm, the present best solution is the target for other search agents. Hence all prey attempt to modify their positions to proximate the best agent as per Equations (1) and (2). As the location of the best search, space is not known a priori, this process of update may result in being trapped in local optima. If the position of the vectors changes during the search, the process is governed by large steps, the algorithm may not be able to explore properly the search space. To minimize the magnitude of changes in the position of vectors, correction factors are introduced as CF 1 and CF 2 in the proposed mWOA technique. Now the equation becomes The correction factor makes the whales to move in small steps towards the prey to explore the search space efficiently.
Similarly, a correction factor is introduced in the exploitation phase where the spiral updating position is given by Equation (11) as By introducing the above correction factor, the humpback whales are made to swim around the prey within a reduced shrinking circle, thus enhancing the exploiting capability of the algorithm.
Finally, the correction factor is introduced in the exploration phase of search for prey. So in original WOA algorithm, the search agent position is updated in the exploration phase as per Equations (7) and (8). As a result, it may lead to random movement of whales. Thus in the proposed mWOA technique, the position of search agents is updated by using correction factors as given in Equations (12) and (13).
After a repeated series of trail runs, the correction factors are 2.5and 1.5, respectively.
It should be noted that by introducing the correction factors, the capability of whales to reach any position in the search space is enhanced. Therefore, it allows any search agent to update its position in the neighbourhood of the current best solution and simulates encircling the prey more efficiently.

Performance investigation of mWOA algorithm
The proposed mWOA algorithm performance is carried out by fitting to some standard benchmark functions. The details about these functions, their dimension, boundary of the search spaces and optimum values are available in the literature [22]. There are 13 functions, out of which functions f 1 tof 7 are unimodal functions. Unimodal functions are specifically taken for verifying the exploitation property of the algorithm [22]. Functions f 8 to f 13 are multimodal functions with more number of local optima. This number increases exponentially with the increase in dimensions. These functions are very challenging test beds for meta-heuristic algorithms as exploration and exploitation are tested simultaneously by these functions. As suggested in the original WOA algorithm, the mWOA algorithm is executed for 30 independent runs with randomly generated population for each benchmark functions with a population size of 30 and an

System investigated
The block diagram of the proposed system [1] is presented in Figure 1. The parameter of each component of system represents a real system and taken from reference [1]. The model under study was developed in MATLAB/SIMULINK environment and proposed mWOA program written (in .m file). The generation subsystem includes one PV, one DEG, one MTG, two FCs and three WTGs. The storage system includes one BESS and one FESS connected to the load side. Moreover, appropriate rate constraint nonlinearities   were considered such as |P FESS | < 0.9, |P BESS | < 0.2, |P DEG | < 0.01, |P MTG | < 0.01. These rate constraint nonlinearities incorporate various electromechanical constraints that these devices exhibit.

Modelling of different generation system
The PV, DEG, MTG, FC and WTG are represented in Equations (14)- (18) with their corresponding gains and time constants reported in Table 3 [1,3,4]. The parameter k represents the number of units considered.

Wind speed modelling
The wind turbine generator power (P WTG ) is a function of wind speed V W . The algebraic summation of base wind speed with noise component [1] is called as wind speed. V W can be represented by The base component of the wind speed is a constant which is present throughout the wind turbine operation and for the present case it is taken as 7.5 m/s. It is given as follows: where ϕ(t) is the Heaviside step function.
The wind speed noise is given as follows: where ω i = (i − 1/2) ω and ϕ i ≈ U(0, 2π). ω is the change in frequency to estimate spectral density. σ 2 is the variance due to noise and set to 200. The spectral density function where N = 50 and ω = 0.5 rad/s are considered to get an operative modelling precision. K N ( = 0.004), µ ( = 7.5) and F ( = 2000) denote the surface drag coefficient, the base wind speed and the turbulence scale, respectively.

Wind turbine characteristic
The power coefficient of wind turbine (C P ) [1] is characterized by non-dimensional curves which is a function of blade pitch angle (β) and tip speed ratio (λ). λ is given by where R blade ( = 23.5 m) and ω blade ( = 3.14 rad/s) are the blade radius and blade rotational speed, respectively. Considering β = 0.1745, C p is given by The wind turbine output [1] is given by where A r = 1735 m 2 is the blade swept area and ρ = 1.250 kg/m 2 is the density of air.

Characteristic of PV system output power
The PV system output power of [1] is given by where η is the efficiency of the PV cells (η = 10%). S is the area of the PV array (S = 4084 m 2 ), γ is the solar radiation on the PV cells in kw/m 2 and T is the ambient temperature (T = 25°C). φ is given by

Modelling of aqua electrolyser
A portion of output power developed by wind and photovoltaic is used by an aqua electrolyser (AE). It produces hydrogen which is used by FC to produce power. AE uses a fraction, i.e. (1 − k n ) of the total power generated from PV and WTG for the production of hydrogen which is fed to the two FCs to produce power. The transfer function of the AE can be sighted as k n is taken as 0.6 for the present study.

Modelling of energy-storing system
Energy-storing components effectively absorb/supply deficit/surplus energy from/to the hybrid power system within a fraction of period for a stable hybrid system [1,4]. FESS and BESS are two storage systems considered in the present study and are expressed as Each energy storage element is provided with an upper and lower saturation limit along with rate constraint nonlinearity to prevent the mechanical shock due to sudden frequency variation [6]. Their rate constraint nonlinearities are |P FESS | < 0.9, |P BESS | < 0.2 and 0 < P DEG < 0.45.

Power system model
The power system model is formulated as where D and M are equivalent damping constant (0.4) and inertia constant (0.03) of the hybrid power system, respectively. It is taken as 0.4 and 0.03 respectively for the present study.

Adaptive fuzzy logic control
A fuzzy logic controller has a predefined set of control rules, which depends on the researcher's knowledge and experience [23]. The input/output linguistic variables of the membership functions (MFs) are also generally predetermined. The design of FLCs largely depends on the choice of input/output scaling factors (SFs) and selection of controller parameters. Tuning of SFs is of highest importance because of their universal effect on the control action. For satisfactory control action, the membership functions should be a function of error (e) and change of error ( e) and FLC maps input to output by a limited number of IF-THEN rules. Sometimes, this is not adequate to provide necessary control actions. In such cases, static values of SFs and single MFs are insufficient to achieve the desired control action. To overcome this, various online and offline methods are proposed to fine-tune the input/output SFs to change the definition of MFs.
Adaptive control has been a topic of research for various LFC schemes. Adaptive control technique is categorized into two types, the self-tuning regulators and the model reference control systems [24]. Adaptive controller makes the system under control less sensitive to its parameter uncertainties under various environmental and operating conditions. Adaptive fuzzy-based PID controller design has now been considered as a topic of research and several methods are adopted in [14] and [24]. In the proposed method, an adaptive PID kind FLC (AFPID) is used to get the process optimally controlled based on the e and e. Figure 2 represents the schematic diagram of the proposed AFPID controller.     Table 6. The mWOA optimization algorithm is used for finetuning of the input and output scaling factors (k 11 to k 31 ) and PID controller parameters (k P , k I and k D ) of AFPID controller shown in Figure 2. ISE has taken into consideration in the present study for tuning of the controller gains where T max is the maximum simulation time and f and u are per unit frequency deviation and control signal output of controller. T max is taken as 300 s for the present case. The factor K f is chosen as 10 4 to give equal weightage on both parts of control objective.

Implementation of the proposed mWOA algorithm for frequency control
The APGS simulated by considering two different controllers, i.e. PID and AFPID controller separately and optimized with the mWOA technique. Figure 4(a-d) depicts the stochastic output characteristics of the solar photovoltaic power (P PV ), wind turbine generator (P WTG ), renewable sources total power (wind and PV) to the electric grid (P T ) and the load demand (P L ) which is used in the simulation study. Both the solar and wind power output have overlying variations about their steady state, which would of course affect the system frequency. These oscillations have to damp out as quickly as possible by the proper control action of the controller. In the present design framework, both the powers (P WTG and P PV ) drop to significantly different level after 25 and 200 s, respectively. This resembles the practical scenario as the generated powers of wind turbine and PV system fluctuate widely over time based on the varied environmental conditions. Simultaneously, the load demand also faces an identical kind of variation about its steady state and varies from 0.4 p.u to 0.9 p.u. The AFPID controller considers all these speculative variations while computing the controller gains. The optimized parameter of the PID and AFPID controller is given in Table 5. The corresponding values of objective function (J) are also given in Table 5. For the same controller structure (PID), minimum objective function value is obtained with the proposed mWOA technique (J = 3.1809) compared to the original WOA technique (J = 3.5827). The objective function value is further reduced (J = 2.1809) with the proposed mWOA optimized AFPID controller, i.e. there is a reduction of 39.13% in error criteria (objective function value) compared with the WOA optimized PID controller.
To compare the performance of designed controllers, various cases are assumed. For the first case, only the load variation as presented in Figure 4(d) is considered and wind and solar generations are kept constant. For the second case, solar generation, wind generation and load are variations that are considered as given in Figure 4.

Case 1: Load variation with constant wind and solar generation
In the first case, PV and wind powers are set constant (0.4 and 0.6 p.u., respectively), and the load demand is  varied as shown in Figure 4(d). The frequency deviation for the above case is shown in Figure 5 from which it is clear that the mWOA optimized PID controller provides better system compared to the WOA optimized PID controller. It can be seen from Figure 5 that the maximum overshoot and undershoot with the WOA optimized PID controller are 0.3221 and −0.3599 and the same with the mWOA optimized PID controller are 0.3079 and −0.3645, respectively. It is also clear from Figure 5 that the best system response is obtained with the proposed mWOA optimized FAPID controller. The maximum overshoot and undershoot reduce to 0.2697 and −0.1878 respectively with the mWOA optimized FAPID controller.

Case 2: Simultaneous variation of load demand, wind and solar power
In case 2, PV and wind powers varied as shown in Figure 4(a,b) along with the load variation. The system frequency response and control signal response are shown in Figure 6(a,b) respectively. For comparison, the responses with WOA optimized PID, mWOA optimized PID and mWOA optimized AFPID controllers are provided in Figure 6. From Figure 6(a) it is clear that the proposed mWOA optimized AFPID controller structure provides better system dynamic response compared to the WOA and mWOA optimized conventional PID control structure. It can be seen from Figure 6(a) that maximum overshoots with WOA    From the control characteristic as shown in Figure 6(b), the band of oscillations for the AFPID controller is not as much as that of the classical PID controller. From practical point of view, this is relevant as the control signal activates mechanical components such as DEG, BESS and FESS. Prolonged swinging in the actuator demand would deteriorate the mechanical parts, which degrade their lifetime as well as affect the performance of these components. The equivalent powers generated by the DEG, FESS, MTG, BESS, FC and AE are given in Figure 7(a-f). With the AFPID controller, the power fluctuation in these energy storage systems reduces significantly than that of the conventional PID controller. This may result in smaller  dimension of this energy storage and supply systems. There is also less requirement of storing and supplying power to suppress the grid frequency variation. In Figure 7, negative powers in energy storage elements indicated that they are absorbing power and conversely the positive powers signify that they are producing the extra power making the whole system stable. Thus the hybrid power system becomes more reliable and energy efficient.

Comparison with recent frequency control approaches
To demonstrate the superiority of the proposed mWOA optimized AFPID controller, a widely used two equal area non-reheat thermal power system [25][26][27][28][29] is considered. Identical AFPID controllers are assumed for each area and the proposed mWOA algorithm was employed to tune the controller parameters. For a fair comparison, identical power system and objective functions from the literature [25][26][27][28][29] are considered. The optimized AFPID controller parameters are: k P = 1.9698, k I = 1.7634, k D = 1.0609, k 11 = 0.8172, k 21 = 0.0777, k 31 = 1.8405.
A step increase in demand of 10% applied at t = 0 s; in area 1 and the performance of proposed controller is compared with approaches such as ZN: PI, GA: PI, BFOA: PI [25], DE: PI [26], hybrid BFOA-PSO: PI [27], NSGA-II: PI [28], NSGA-II: PIDF [28], PS: Fuzzy PI [29], PSO: Fuzzy PI [29] and hybrid PSO-PS: Fuzzy PI [29]. The results are provided in Table 6. It is clear from Table 6 that best system performance with minimum ITAE value and settling times in F 1 , F 2 and P tie are obtained with the proposed mWOA tuned AFPID controller compared to recently proposed AGC approaches. For completeness, the frequency response of area 1 for the above disturbance is shown in Figure 8. It is evident from Figure 8 that the proposed approach outperforms than recently proposed AGC approaches. The maximum overshoots and undershoots of frequency response are shown in Figure 8 and tabulated in Table 6. From Table 6, the lowest maximum overshoots and undershoots of frequency response are obtained with the proposed mWOA optimized AFPID compared to other approaches.

Conclusion
In practice, classical PID controller is commonly used for LFC problem. However, it is not able to provide desirable performance during severe disturbances. Owing to the practical difficulties faced in trying to achieve desired control criteria in LFC, an adaptive fuzzy logic PID control method is presented in this paper for hybrid power systems. For tuning the controller parameters, a modified WOA technique is proposed where the position of search agents is updated by using correction factors. It is found from the statistical results that the proposed mWOA algorithm outperforms original WOA, PSO, GSA, DE and FEP algorithms. In the next stage, frequency control of an APGS consisting of various energy sources such as DEG, FC, MTG with renewable energy sources such as PV units, WTG along with energy storage devices like BESS and FESS and cluster of loads is considered and the parameters of proposed AFPID controller are optimized employing the mWOA technique. It is observed that the mWOA tuned AFPID controller provides superior performance compared to the PID controller. Testing the results of mWOA in terms of statistical analysis like "Wilcoxon Signed Rank Test" is the focus of the future work. Also, frequency control in an APGSs in the presence of plug in electric vehicles is the focus of the future research work.

Disclosure statement
No potential conflict of interest was reported by the authors.