1 Introduction

Hybrid generation systems (HGSs) are often used in a centralized form. However, a centralized HGS delivers a continuous power source, and has various disadvantages, such as high losses because of transmission systems, low effectiveness, increased emission, insufficient power supply reliability, high changing and maintenance costs, unstable peaking power, low resilience, and low sustainability [1]. Therefore, it is an urgent requirement to transfer to a distributed HGS, which has many merits because of the utilization of renewable energy sources (RESs). Advantages are such as high effectiveness, low emission, generation and delivery of electricity being more reliable and having high quality, low changing and maintenance costs, high resilience, and sustainability [1]. However, the unpredictable changes in the weather, such as wind speed and irradiance, lead to intermittent generation from RESs (e.g. PV and wind systems) [2]. Thus, the uncertain characteristics of PV and wind systems, and the probabilistic behavior of the loads, lead to fluctuations in system frequency [3].

In order to overcome these challenges, load frequency control (LFC) is mandatory for distributed HGS. In the literature, several methods are proposed to mitigate system frequency fluctuations. A black hole optimization algorithm is applied to fine-tune the cascaded proportional derivative-proportional integral derivative (PD-PID) controller parameters for the frequency regulation of a distributed HGS [4], while an adaptive differential evolution technique based on PD with filter plus (1 + PI) is proposed in [5]. Reference [6] presents a modified equilibrium optimizer process that relies on an interval type-2 fuzzy-PID controller for LFC of a distributed HGS. A modified moth swarm algorithm (mMSA) with a hybrid fuzzy PD-PI controller to achieve the frequency stability of a distributed HGS is described in [7]. In addition, a feedforward fractional-order PID strategy based on a harmony search algorithm is applied in [8] to regulate system frequency considering the integral of time multiplied squared error (ITSE), while the chaotic crow search algorithm is used to optimize the hybrid fuzzy proportional derivative–tilt integral derivative controller parameters to control the frequency of a standalone microgrid [9].

A bacterial foraging optimization algorithm-based PID controller with a derivative filter is used for frequency control of a distributed HGS [10], while the researchers in [11] propose a compound control strategy based on model predictive control and a distributed leader-following consensus control strategy. In these control algorithms, the distributed energy resources and energy storage technologies are used to support the power system frequency [12, 13]. In [14], the PI + clegg integrator (CI) reset control technique is proposed for the secondary frequency control in an islanded microgrid, considering RESs/load changes. A cascaded PI-PD controller is tuned by the salp swarm optimization technique for LFC of a standalone microgrid integrated with electric vehicles (EVs) [15].

In [16], a comparison is presented between the proposed fractional-order (FO)-fuzzy-PID controller method and different types of control techniques such as optimized FO-Fuzzy-PID, PID, FO-PID, and Fuzzy-PID. The droop controller and PID controller are used with superconducting magnetic energy storage (SMES) to inject power to the microgrid during sudden load changes, thus achieving the frequency stability aim [17]. The proposed control strategy in [18] depends on two main control actions. The first is injecting active power from the battery to reach a constant power between the load and generation where the generated power from RESs is intermittent. The second control action is related to the frequency deviation, in which the proposed method is used to damp the frequency fluctuation and to compensate for the low-inertia of the system. The issue of reducing the lifetime of a battery energy storage system (BESS) (which helps in damping frequency deviation through a large amount of charging and discharging) is addressed in [19], where an adaptive droop control method is proposed between the BESS and FC through the controlling of the power-sharing between FC and battery.

One of the newest optimization algorithms is the grey wolf optimization (GWO) algorithm based on the meta-heuristic optimization technique [20]. The GWO algorithm is used in many applications of electrical power systems because of its simplicity and easy applicability [21]. Moreover, the GWO has several advantages such as flexibility, fewer algorithm parameters, comprehensiveness, and fast programmability features. The PID controller gains are used with the integral time absolute error (ITAE) as inputs to the control process that depends on the GWO to optimize the value of the PID gains, in order to achieve the secondary frequency control of an isolated multi-microgrid [22]. The particle swarm optimization (PSO) and GWO techniques are applied with adaptive fuzzy logic control based on the PI controller to obtain the optimal values of membership functions (MFs) in the regulation and control of microgrid frequency [23].

The coordination control strategy between RESs and FC-based energy storage systems (ESS) is presented in [24], where an adaptive fuzzy PID controller is proposed based on a simplified GWO algorithm for the LFC of a distributed power generation system considering generation rate constraints and time delays to include nonlinearity features. It also presents a comparison between several optimization algorithms including the simplified GWO algorithm to show its superiority over other methods. One of the most important applications of a hydrogen production unit is presented in [25] to overcome the large-scale power curtailment resulting from the connection between RESs and large-scale power systems. The hydrogen production unit is suitable for such an application, since it can have large-capacity and long-term absorption of electric energy.

The presented coordination control strategy has the following levels. The first derives energy conversion efficiency from electrical to hydrogen energy by a hydrogen production unit. The second takes into account the storage state of charge and the instantaneous power in the control process. The maximum power point tracking of a PV system is designed and included in the control process. The Bahr AL-Najaf area is used as a case study that utilizes a PV and wind system with fuel cells [26]. The chaotic PSO is used in [27] to optimize the parameters of FO fuzzy control. The proposed method is compared with PID and the integer-order fuzzy PID controller, considering the linear and nonlinear operating systems, to show its effectiveness over the mentioned control methods. The management strategy is to merge with the DC grid in [28] to optimize the bus voltage and coordinate the power-sharing between the energy sources during different loading conditions with variable solar irradiance, considering the state of FC. The presented method is based on DC bus regulation through supercapacitor energy, and a PI controller is used to reduce the fluctuations in the DC bus voltage. The energy management strategy relies on the optimal control for a battery–supercapacitor in HGS, and is targeted to define the adaptive gains to state the reference power for the battery and the supercapacitor by using the slap swarm algorithm and load following control technique [29].

The high penetration of integrated RES with EVs is aggregated as a virtual power plant to reduce the cost of power balancing between the generation and demand sides, and the proposed control framework focuses on the control of complementary generation based on lifelong learning [30]. In this control strategy, lifelong learning represents the primary layer, while the secondary layer is set in line with the ascending order of the regulation costs of the available reserve resources. In addition, the tertiary layer is represented by the coordination control for RESs, and an online optimization is applied considering the EV charging demands. In [31], an optimal dispatch for automatic generation control is proposed to distribute the AGC command between generation units in a hybrid system with RESs and conventional resources. To do this, an adaptive distributed auction-based algorithm (ADAA) is used instead of the multiple fixed swap sizes of the auction-based algorithm, where ADAA has a fast convergence speed (i.e., low communication latency) and model-free features.

The rest of this paper is structured as follows: the relevant literature is reviewed in Sect. 2, to highlight how the proposed method differs from existing ones. Section 3 presents the model of the HGS, while Sect. 4 discusses the proposed adaptive coordination control strategy. The simulation results are presented in Sect. 5, and finally, Sect. 6 concludes the study.

2 Literature survey

In [32], a super-twisting algorithm (STA) technique is proposed to improve the fluctuation of bus voltage, the current circulation, and the power distribution rationality. However, the impact of the wind system and high load variations are not investigated, and the fraction factor of the power-sharing between RESs and FC is also not considered. A two-time scale energy management system is presented in [33] to deal with the FC and electrolysis specifications, but the high load variation and the fraction factor consideration are not presented with the proposed method. The P-f droop control strategy is used in [34] for an energy management system between the AC microgrid components, considering their electrical characteristics, although the fraction factor which is used to define the power-sharing between RESs and FC is not studied. In [35], a linear quadratic regulator with an integral controller is applied to control the frequency of a microgrid (MG). However, the effectiveness of the proposed method is validated under small load perturbation, and the fraction factor is not taken into consideration. References [25, 36] propose a decentralized coordination control strategy among generation, ESS, hydrogen production unit, and FC in island DC and AC microgrids, respectively. However, both studies fail to take the electrical characteristics of the FC and the fraction factor into consideration. A stochastic model is proposed for the coordinated scheduling of RESs in [37], but without including state-of-charge (SoC) protection and overpower protection studies. In addition, in the decentralization approach, the fraction factor is not considered. The most relevant studies are compared in Table 1.

Table 1 Summary of state-of-the-art solutions

Based on Table 1, several research gaps can be identified: (i) SoC protection and overpower protection; (ii) decentralization approach; (iii) electrical characteristics of the FC; (iv) high load variations; and (v) the fraction factor coordination to state the power-sharing between RESs and FC.

Based on the above discussion and the presented studies, all the studies have either used a constant value for the fraction of the total power of RESs (Kn) or not considered. Therefore, this study proposes an adaptive coordination control application to control the power used from the RESs for energizing the FC-based ESS. The control approach proposed here is based on controlling the value of Kn that depends on the GWO algorithm to obtain the optimal gains of the PI controller. These are used to define the value of Kn with different loading conditions and uncertainties of PV and wind power generation. Moreover, it defines the power extracted from the RESs injected into the FC to achieve the best benefits from the RESs and FC, while fulfilling the frequency control aim.

In order to clarify the disparities among the different studies, Table 2 provides a comparison among the investigated studies and the present work.

Table 2 Comparison between the investigated studies and the present work

The main contributions of this study are as follows:

  • Benefits from RESs and FC-based ESSs using an adaptive coordination control strategy are obtained.

  • The proposed adaptive coordination control method controls the value of Kn and consequently the power extracted from RESs to be used with FC-based ESSs.

  • The GWO algorithm is used with the proposed adaptive coordination control method to adjust the PI controller gains of fraction factor Kn with different loading conditions and uncertainties of RESs powers.

  • The advantages of the proposed coordination strategy are proved and established over existing studies that are based on the constant value of Kn.

  • A comparison between the proposed method and the existing methods is presented.

  • The effectiveness and robustness of the proposed method are proved using different loading conditions and uncertainties of RESs/loads power.

  • The frequency fluctuation is stabilized successfully by the newly proposed control method.

3 Hybrid generation system (HGS) model

The studied HGS is presented in Fig. 1. This shows different types of energy sources: wind generators (WGs), a photovoltaic (PV) system, an aqua electrolyzer (AE), fuel cells (FCs), a diesel generator (DG), electric vehicles (EVs), BESS, and a flywheel energy storage system (FESS) [38]. All these components are represented by transfer function (TF) models, where the values of the gain (K) and time constant (T) are listed in Table 3. The LFC-PID controller is designed using the mMSA, as discussed in [7].

Fig. 1
figure 1

The studied HGS with the proposed coordination control strategy

Table 3 Nominal parameters of the studied HGS

3.1 Wind generator

The studied wind generation system consists of three wind turbines, and the power produced by each is PWG. The well-known equation describing the mechanical power of a wind generator (Pm) is presented in (1), where Cp is the coefficient of performance and is related to β (blade pitch angle) and λ (tip speed ratio), ρ is air density, A is turbine swept area, and vwind is wind speed [38].

$$P_{m} = 0.5C_{P} \left( {\lambda ,\beta } \right)\rho Av_{wind}^{3}$$
(1)

The nonlinearities and uncertainties are considered to be the main features of the wind generator system, e.g., the pitch control system. The wind generator system is represented by the TF model as in (2), where \(K_{WG}\) and \(T_{WG}\) represent the gain and time constant, respectively, and \(P_{m}\) and \(P_{WG}\) stand for the input and output power of the wind generator system, respectively.

$$TF_{WG} \left( s \right) = \frac{{K_{WG} }}{{1 + sT_{WG} }} = \frac{{\Delta P_{WG} }}{{\Delta P_{m} }}$$
(2)

3.2 Photovoltaic model

A PV system is based on converting the sun’s radiation into electricity, and the PV power (PPV) can be calculated by (3), where \({A}_{PV}\) is the PV array area, \(\phi\) is the solar radiation,\(\eta\) is the PV cell conversion efficiency. The TF of the PV system is defined in (4) [38], where \({K}_{PV}\) is the gain and \({T}_{PV}\) is the time constant of the PV system, while \(\Delta \phi\) and \(\Delta P_{PV}\) are the input and output of the PV system, respectively.

$$P_{PV} = A_{PV} \left[ {1 - 0.005\left( {T_{a} + 25} \right)} \right]$$
(3)
$$TF_{PV} \left( s \right) = \frac{{K_{PV} }}{{1 + sT_{PV} }} = \frac{{\Delta P_{PV} }}{\Delta \phi }$$
(4)

3.3 Aqua electrolyzer (AE)

The power generated by the PV and wind generation systems is used by an AE to generate hydrogen, while the generated hydrogen can be injected into an FC-based ESS to produce power. The TF of the AE is specified in (5) [38], where \(K_{AE}\) and \(T_{AE}\) are its gain and time constant, respectively. The term \(\left[ {\left( {1 - K\_n } \right) \times P\_RESs} \right]\) represents the input of the AE and \(P_{AE}\) is its output.

$$TF_{AE} \left( s \right) = \frac{{K_{AE} }}{{1 + sT_{AE} }} = \frac{{\Delta P_{AE} }}{{\left( {1 - K_{n} } \right) \times P_{RESs} }}$$
(5)

3.4 Fuel cells

The studied system has two identical FCs to provide high efficiency by sharing the power, and to increase the system reliability in case one fails. As the FC here is the main energy storage that is integrated to make coordination with the RESs, it is important to always keep them in the system. The TF used in this study is based on the first-order presented in (6) [38], where \(K_{FC}\) and \(T_{FC}\) are the gain and time constant of the FC system-based ESS, respectively, while \(P_{AE}\) and \(P_{FC}\) are the input and output of the fuel cell system, respectively.

$$TF_{FC} \left( s \right) = \frac{{K_{FC} }}{{1 + sT_{FC} }} = \frac{{P_{FC} }}{{P_{AE} }}$$
(6)

3.5 Diesel generator

The diesel generator can be used as an independent power source to minimize the mismatch between generation and demand. The TF of the diesel generator is given in (7) [38], where \({K}_{DG}\) and \({T}_{DG}\) are the gain and time constant of the diesel generator, respectively, while \(\Delta {u}_{DG}\) and \(\Delta {P}_{DG}\) are its input and output, respectively.

$$TF_{DG} \left( s \right) = \frac{{K_{DG} }}{{1 + sT_{DG} }} = \frac{{\Delta P_{DG} }}{{\Delta u_{DG} }}$$
(7)

3.6 Electric vehicles

The EVs can operate as supply in the discharging mode and as load in the charging mode, so their performance helps to mitigate system fluctuations. The TF of EVs in the first-order is specified in (8) [38], where \({K}_{EV}\) and \({T}_{EV}\) are the gain and time constant of EVs, respectively.

$$TF_{EV} \left( s \right) = \frac{{K_{EV} }}{{1 + sT_{EV} }}$$
(8)

3.7 Battery energy storage system

The BESS plays an essential role in preserving system frequency stability, as it can operate either as a load or a power source. The TF of BESS is presented in (9) [38], where \({K}_{B}\) is the gain of BESS and \({T}_{B}\) is its time constant.

$$TF_{B} \left( s \right) = \frac{{K_{B} }}{{1 + sT_{B} }}$$
(9)

3.8 Flywheel energy storage system

The FESS aids in keeping the power system as stable as possible during different operating conditions. The TF of the FESS is specified in (10) [38] where \({K}_{F}\) is the gain of FESS and \({T}_{F}\) is its time constant.

$$TF_{F} \left( s \right) = \frac{{K_{F} }}{{1 + sT_{F} }}$$
(10)

3.9 Power system model

The dynamic power system model has one input and one output. The input is the change in the power (the difference between the load and generation), while the output changes the system frequency as presented in (11) [38], where \(D\) and \(J\) are the damping factor and the virtual inertia factor, respectively.

$$F_{PS} \left( s \right) = \frac{1}{D + sJ} = \frac{\Delta f}{{\Delta P}}$$
(11)

4 The proposed adaptive coordination control strategy

In this study, the algorithm of GWO is programmed using the MATLAB program. The PI controller of Kn is optimized, as shown in Fig. 2. The main role of the optimization is to achieve the adaptive control method of the RESs, the AE for hydrogen production and the FC-ESS, and enhance the frequency of the power system in different loading conditions in addition to the main frequency control. The different loading conditions will be presented in the results section. The objective function used in this study is the ITAE shown in Fig. 2. This integrates the multiplication of the absolute error (i.e., system frequency deviation (\(\Delta f\))) and the time as:

$$Fitness\,equation = {\text{ITAE}} = \mathop \smallint \limits_{0}^{{t_{sim} }} t\left| {\Delta f} \right|dt$$
(12)
Fig. 2
figure 2

The proposed control method of Kn

where \(t_{sim} \user2{ }\) is the simulation time.

Recently, one of the most recommended optimization techniques has been GWO, which is considered as a meta-heuristic technique [20]. Wolves have a hierarchy in strict dominance when they live in a group, which typically has 5 to 12 members. The leader of this group is called alpha (α), who has a strong aider called beta (β), which helps the main leader make the right decision. The omega (ω) is considered the lowest position wolf, which acts as the scapegoat. The rest of the wolves are called delta (δ), and all of the deltas follow alphas and betas. All of these roles are presented in Fig. 3. The GWO method has three main steps to reach a prey: (i) search for the prey and approach it, (ii) surround the prey and limit its motion, and (iii) attack and hunt down the prey.

Fig. 3
figure 3

The hierarchy of grey wolves

The surrounding of the prey can be presented in arithmetic form as in (13), where \(\vec{P}_{i}\) is the position of the GW, \(\vec{P}_{pi}\) is the position of prey, and \(\vec{S}\) is the distance between them. \(\vec{A}\) and \(\vec{C}\) are vectors that are computed from Eqs. (15)–(17).

$$\vec{S} = \left| {\vec{C}\vec{P}_{pi} - \vec{P}_{i} } \right|$$
(13)
$$\vec{P}_{i + 1} = \vec{P}_{pi} - \vec{A}\vec{S}$$
(14)
$$\vec{A} = 2\vec{a} \vec{n}_{1} - \vec{a}$$
(15)

where

$$\vec{a} = 2 - \frac{2t}{{Max\_iter}}$$
(16)
$$\vec{C} = 2\vec{n}_{2}$$
(17)

where \({\overrightarrow{n}}_{1}\) and \({\overrightarrow{n}}_{2}\) express the random numbers between zero and one.

Equation (15) presents the factor \(\vec{a}\) that reduces linearly from two to zero when increasing the number of iterations. The diverging technique is used for searching a prey location where \(\left| A \right| > 1\), while the convergence technique is used for getting a prey where \(\left| A \right| < 1\). The hunting process uses α which is then followed by β and δ as presented in (18)–(20). The \(A\) and \(C\) factors help the GWO method to keep away from the stagnation event.

$$\left\{ {\begin{array}{*{20}l} {\vec{S}_{\alpha } = \left| {\vec{C}_{1} \vec{P}_{\alpha i} - \vec{P}_{i} } \right|} \hfill \\ {\vec{S}_{\beta } = \left| {\vec{C}_{2} \vec{P}_{\beta i} - \vec{P}_{i} } \right|} \hfill \\ {\vec{S}_{\delta } = \left| {\vec{C}_{3} \vec{P}_{\delta i} - \vec{P}_{i} } \right|} \hfill \\ \end{array} } \right.$$
(18)
$$\left\{ {\begin{array}{*{20}l} {\vec{P}_{1} = \vec{P}_{\alpha i} - \vec{A}_{1} \vec{S}_{\alpha } } \hfill \\ {\vec{P}_{2} = \vec{P}_{\beta i} - \vec{A}_{2} \vec{S}_{\beta } } \hfill \\ {\vec{P}_{3} = \vec{P}_{\delta i} - \vec{A}_{3} \vec{S}_{\delta } } \hfill \\ \end{array} } \right.$$
(19)
$$\vec{P}_{i + 1} = \frac{1}{3}\left( {\vec{P}_{1} + \vec{P}_{2} + \vec{P}_{3} } \right)$$
(20)

The flowchart of the proposed adaptive coordination control strategy based on the GWO technique is shown in Fig. 4, to achieve the coordination between RESs, aqua electrolyzer for hydrogen production, and FC-ESS, thus enhancing the frequency stability of HGSs. The overall proposed adaptive coordination control strategy is organized as follows:

Fig. 4
figure 4

Flowchart of the complete proposed method

Step 1: Measure and collect the various signals, and feed them into the adaptive coordination control process. These parameters include the generation active power, load active power, and the parameters of the GWO algorithm.

Step 2: The computation of the frequency deviation is presented in this step from the known difference between the load active and generation active power. The power mismatch between the load and generation plays a vital role in power system frequency stability and defines the value of the frequency deviation. The frequency deviation must be within permissible limits based on the signal of an adaptive coordination control strategy that defines the fraction of total power generation of RESs (Kn) and the power fed into the AE for hydrogen production and FC. When the frequency deviation is out of limit, the absolute value of the frequency deviation is taken and used in Step 3.

Step 3: The GWO algorithm is described in this step, where the best value of the Kn can be obtained by applying the GWO to get the optimal value of the PI controller. The value of Kn is responsible for coordinating the RESs and the AE of hydrogen production and the FC.

Step 4: The best value of Kn is used in the equation presented in Step 4 and also shown in Fig. 1. The power extracted from RESs is adaptively used with an AE, and the remaining power is fed into the HGS. By using this adaptive coordination control strategy, the power of FC and RESs can be optimally distributed to help preserve the system frequency within limits.

The fitness value and gain factors of KP and KI are listed in Table 4.

Table 4 Controller parameters for the HGS

5 Results and discussion

The studied system shown in Fig. 1 is simulated using the MATLAB/Simulink software. The simulation results comprise four cases of different loading conditions to indicate the performance of the proposed method compared to the existing work in [7] that used a fixed value for the coordination gain of Kn. At the same time, the frequency regulation control is based on mMSA in both studies to make a fair comparison between the two systems. Therefore, a better coordination between the RESs and the ESS-based fuel cell can be achieved, where the PID controller based on mMSA damps the frequency regulation in both studies. The PI controller based on GWO is proposed to determine the value of Kn that defines the injected power into the AE to power the FC. This case is called “Proposed PI-GWO of Kn” and the existing case is referred to as “Constant value of Kn”. The power of the wind generator and PV systems used during all cases at different loading conditions is presented in Fig. 5. It is clear that the RESs profile has random output characteristics as a reflection of the change in environmental conditions which lead to fluctuation in system frequency. The fluctuations of output power from the wind and PV systems are overcome by a suitable control approach. Different cases are tested with variable load conditions to examine the proposed control method.

Fig. 5
figure 5

The power profile of a wind generator and b PV system

5.1 Case 1

In this case, the random load variation is a combination of two load types: one being an industrial load and the other a domestic load, as shown in Fig. 6, where the total load profile is the sum of the two. The total load changes from 0.045 pu to 0.307 pu, while the generated power from the wind varies between 0.025 pu to 0.225 pu (see Fig. 5a), and the PV between 0.001 pu to 0.1 pu (see Fig. 5b). The frequency deviation in this case study is presented in Fig. 7.

Fig. 6
figure 6

The load power fluctuation of Case 1

Fig. 7
figure 7

The frequency deviation of Case 1

It is evident that at 400 s, the proposed PI-GWO of Kn controller mitigates the frequency fluctuation better than that with the constant value of Kn. The improvement in the system frequency results from the impact of the Kn controller, where the power of the FC is changed, as presented in Fig. 8a. The power injected into the AE is controlled by following the value of Kn as shown in Fig. 8b. The response of the controller is evident in Kn as presented in Fig. 8c, where the proposed method varies the value of Kn according to the frequency state, whereas the existing work uses constant Kn regardless of the frequency deviation in the system. The variation of input power from different power sources of HGS is presented in Fig. 9, in which the proposed work provides smoother and lower fluctuations of the power from the different sources than the existing work during the variation in the power of RESs and load. This leads to reduced variations of the generated power from the BESS, FESS, EV, and DG, as is evident in Fig. 9. The above discussion proves that the proposed control method is suitable for making the HGS more stable and robust in the case of large system disturbances.

Fig. 8
figure 8

The response of a fuel cell power of case 1, b power fed into AE of Case 1, and c value of Kn of Case 1

Fig. 9
figure 9

The performance of HGS sources for Case 1: a battery power, b flywheel power, c EV power, and d DG power

5.2 Case 2

In this case, the load demand is varied as shown in Fig. 10, while the power profile of wind and PV systems is the same as in Fig. 5. The frequency deviation is given in Fig. 11. It is observed from the curve that the HGS frequency is damped using the proposed method despite the uncertainties of the power generated from RESs and the load variations. The responses of the FC power and the power injected to the AE, and the Kn response are shown in Fig. 12, which indicates the effect of the proposed control. The variations of power from the generation sources and ESSs are presented in Fig. 13. By applying the proposed control method, the power from the variable sources can be better smoothed than with the existing method.

Fig. 10
figure 10

The load power fluctuation of Case 2

Fig. 11
figure 11

The frequency deviation of Case 2

Fig. 12
figure 12

The Case 2 response of a fuel cell power, b power fed to AE, c value of Kn

Fig. 13
figure 13

The performance of HGS sources for Case 2: a battery power, b flywheel power, c EV power, and d DG power

5.3 Case 3

The proposed control method is examined with multi-sharp variation in the load demand curve, as shown in Fig. 14, considering the same profile of the wind and PV generation systems as in Fig. 5. The frequency fluctuation due to the variable load demand and intermittent RESs is minimized by applying the proposed coordination method using the adaptive gain Kn (Fig. 15). The proposed method has successfully minimized the overshoot, undershoot, and steady-state error of the system frequency during the overall simulation time. The impact of the proposed control technique on HGS is indicated through the performance of the FC power energized by the AE. This is controlled by the Kn value that is based on the PI-GOW technique, as displayed in Fig. 16. Also, the power variations from different generation sources are presented in Fig. 17 with the two control systems.

Fig. 14
figure 14

The load power fluctuation of Case 3

Fig. 15
figure 15

The frequency deviation of Case 3

Fig. 16
figure 16

The Case 3 response of a fuel cell power, b power fed to AE, c value of Kn

Fig. 17
figure 17

The performance of HGS sources for Case 3: a battery power b flywheel power c EV power d DG power

5.4 Case 4

In this case, the proposed control is tested by multi-changes in the load demand profile as displayed in Fig. 18 to inspect the quality of the control. In the presence of the proposed control method, the frequency deviation is kept approximately constant (around zero) during the variations of the load demand and power generated from the RESs. In contrast, in existing work with a constant value of Kn, the frequency deviation varies between 0.041 pu and -0.03 pu, as presented in Fig. 19. This improvement is achieved by using a suitable control of Kn, which affects the FC operation as shown in Fig. 20a through controlling the power required by the AE as shown in Fig. 20b. The values of Kn with the proposed method and existing work are compared in Fig. 20c. These values are responsible for stating the different power used from the RESs to energize the FC. The BESS, FESS, EV, and DG achieve the balance between generation units and loads in the HGS as displayed in Fig. 21. The smaller fluctuations in the generated power are the results of the proposed control method.

Fig. 18
figure 18

The load power fluctuation of Case 4

Fig. 19
figure 19

The frequency deviation of Case 4

Fig. 20
figure 20

The Case 4 response of a fuel cell power, b power fed to AE, and c value of Kn

Fig. 21
figure 21

The performance of HGS sources for Case 4 a battery power, b flywheel power, c EV power, and d DG power

The proposed control method and existing work in [7] are further compared in Fig. 22 using the statistical analysis of the frequency deviation presenting computational results of minimum (Min), maximum (Max), the difference between maximum and minimum (Max–Min), mean, and standard deviation (Std). The maximum and minimum values are employed to define the overshoot and undershoot of the frequency response during the different loading conditions, respectively. The difference between them is used to express the range of changes, and if this indicator is near zero, it means that the frequency deviation is a near-constant and stable value.

Fig. 22
figure 22

Statistical analysis for frequency deviation (Hz): a Case 1, b Case 2, c Case 3, and d Case 4

The mean value reflects the frequency response during the whole simulation time, while the standard deviation expresses how much the frequency response differs from the mean value of the frequency response curve. A comparison between the proposed work and the existing work for the frequency deviation response is presented to evaluate the effectiveness of the proposed method.

The proposed method in Case 1 reduces the undershoot by 82.2% compared to the existing work, and the overshoot by 32.4%. The proposed method has the lowest value of the difference between the maximum and minimum values, mean, and standard deviation. In Case 2, the improvements reach 93.4% and 87.8% in the undershoot and overshoot, respectively, compared to the existing work. The mean, standard deviation values, and the difference between the maximum and minimum validate the proposed control method. These indicators have smaller values than those in the existing work.

In addition, the importance of the proposed control technique compared to the existing work is observed in Case 3, where it improves the lowest minimum value by 78.6% and lowest maximum value by 72.1%. Also, the other indicators, including the difference between the maximum and minimum, mean, and standard deviation achieve enhancements of 76%, 100%, and 91%, respectively. The proposed PI-GWO of Kn control method in Case 4 makes the system more stable and reliable through the improvements of 91.7%, 85.7%, 89.2%, 98.4%, and 95.4% for minimum, maximum, the difference between the maximum and minimum, mean, and standard deviation, respectively.

6 Conclusion

This paper presents an adaptive coordination control method for optimal operation of the RESs and fuel cell system. The proposed method is based on the PI-GWO controller to set the power-sharing between RESs and FCs, and therefore to stabilize the power system frequency with different loading conditions. The studied system has multi-energy sources, including intermittent PV and wind generation systems, leading to more fluctuations in the power system frequency. The parameters of the PI controller are tuned using the GWO technique to obtain optimal controller values. The proposed control method is examined with four cases with different load profiles, and the effectiveness and robustness of the proposed method are validated by comparing it with existing work. The simulation results validate the effectiveness of the proposed method compared with the existing one. The key findings can be summarized as follows:

  • The proposed control approach for HGS constructively mitigates the frequency fluctuations and improves the power exchange between the generation and load sides under different generation and load conditions.

  • The variable Kn effectively maintains the load/frequency at an approximately constant level during the assessment tests.

  • With the proposed coordination control strategy based on PI-GWO of Kn, the variability of Kn shows a superior performance over the constant Kn in terms of minimum, maximum, the difference between the maximum and minimum, mean, and standard deviation of the frequency deviation.

  • The computational results of the frequency deviation are listed and discussed, and prove the superiority of the proposed coordination control method.

  • With the proposed coordination control strategy based on PI-GWO of Kn, the power-sharing from RESs to fuel cell through AE is optimized.

The proposed work can initiate a new research area using the proposed work with different control methods and optimization techniques.