1. Introduction
During recent decades, the transition in electricity generation from centralized to decentralized (distributed) generation has made microgrids a rich research area, especially with the integration of renewable energy sources (RESs). For solving the energy crisis and environmental problems, the infrastructure of microgrids (µGs) has proven to be a substitutional strategy as they include decentralized generators, RESs, energy storage systems (ESSs), and distributed loads [
1,
2,
3,
4,
5]. In conventional interconnected power systems, due to their high inertia, the stabilization of system voltage and/or frequency is maintained by synchronous generators [
6]. However, one of the major problems of integrating RESs into the µGs is that RES systems suffer from a deficiency of inertia and damping properties, leading to larger frequency deviation and system collapse [
1]. The main reason for this issue is the usage of converters and inverters for interfacing RESs; however, these electronic devices do not possess any inertia or damping properties [
7]. In addition, the lack of system inertia leads to an increase in the rate of change of frequency (RoCoF), resulting in fast and severe variation in system frequency, even under soft disturbance. These problems negatively impact µG stability and cause system collapse [
8]. According to the previously stated problems, dynamic stability (e.g., frequency/voltage control) and control techniques should be provided with high concern [
9,
10].
Many researchers have addressed this issue from the viewpoint of control, for example, by enhancing the traditional controller design using various algorithms and optimization methodologies [
11,
12,
13] and employing intelligent techniques [
14,
15,
16,
17]. The authors of [
17] introduced a load frequency control depending on model predictive control design for the studied µG, which depends on the coordination of wind turbines and plug-in hybrid electric vehicles. Sedghi, in [
18], used a combination of robust control and fuzzy logic control strategies to regulate the frequency of the system. One of the recent solutions that can overcome the previously mentioned problems in the power system, i.e., organizing the participation of the µG distributed energy sources without causing any stability or feasibility problems, was provided using power electronic devices through which the behavior of the synchronous generator is virtually emulated. The virtual inertia was obtained utilizing ESSs with advanced control methodology of the inverter [
9,
19,
20]. In [
9], the introduced variable coefficient virtual inertia control (VIC) methodology provided an additional inertia feature to the total inertia of the hybrid µG resulting in rapid RoCoF response and minimization of the dynamic frequency deviation. This led to the prevention of transient frequency instability. However, in [
19], a new technique of virtual inertia emulation was implemented for two-area interconnected systems with automatic generation control. The sensitivity of control parameters was analyzed to clarify the effectiveness of adding virtual inertia on the system behavior, which can be noted as a significant enhancement for both the damping characteristics of high-voltage DC links and the first overshoot responses. The authors of [
20] presented a virtual synchronous machine to regulate both the active and reactive power via regulating the virtual torque and virtual excitation. The inertia of the grid can be improved via addition of virtual inertia; accordingly, the transient frequency stability was promoted. In addition, the virtual damping of the virtual synchronous machine minimized the oscillation of the grid frequency and power. Moreover, numerous studies were conducted for improving µGs’ frequency stability via designing an advanced VIC which depends on derivative methodology [
21,
22,
23,
24,
25,
26,
27,
28]. In this technique, to emulate the inertia, RoCoF should be used for generating a modified active power from the ESS. The researchers of [
21] used this approach for controlling ESS-stored energy even for AC or DC interconnected automatic generation control systems. Furthermore, for enhancing the system performance, not only the dynamic properties of the synchronous generators were emulated but also the static properties, while the effect of frequency measurement was taken into consideration. In [
22], to improve the frequency stability of an isolated µG with consideration of high-penetrated RESs, the authors designed a robust VIC that depends on the
technique. In [
23], to minimize the frequency variation in the case of high-voltage AC µGs with a high penetration level of RESs, the authors built a small-signal model for testing the transient responses of µG frequency with the proposed control scheme. The authors introduced virtual synchronous generator control methodology for controlling ESS shared energy and supporting the system inertia, resulting in improvement in the frequency stability. A stability assessment technique was investigated concerning multiple VIC units in [
24]. The concept of a synchronverter was discussed in [
25] to simulate the behavior of synchronous generators for controlling the inertia. Researchers of [
26] investigated the effectiveness of derivative-approach-based inertia control for enhancing the frequency stability. Recently, Fang et al., in [
27], discussed the improvement of µG inertia properties relying on frequency derivatives by paying attention to the effect of frequency measurement.
Practically, frequency measurement systems, e.g., a phase-locked loop (PLL), have a significant effect when implementing power electronics devices (converters and/or inverters) in power system control. As implementing VIC strategies requires a PLL for frequency determination, the ability of VIC to deal with fast oscillated frequency depends on how the frequency is measured [
28,
29]. It is stated in the literature that, due to its dynamics, the PLL has remarkable deficiencies, such as harmonics and noise, so that higher frequency/voltage oscillation may result, as in [
30]. Moreover, with a high level of penetrated RESs, the effect of utilizing a PLL for frequency measuring is more drastic as it may cause system instability and may even lead to failure of the power system. The impacts of using the PLL on power system stability were discussed in [
31], affirming that PLL dynamics are among the critical issues that have major effects on the system’s stability.
On the other hand, the µG becomes more nonlinear with the existence of system disturbances and high fluctuated uncertainties such as high variation in inertia and damping properties, high-interrupted generation from the RESs, and high variation in the PLL output frequency [
9,
29,
30,
31,
32]. In [
29], the controlling of power systems with uncertainties using robust control strategies was performed based on uncertainty representation in the simulated control system. The implementation of robust control approaches for VIC design was studied in a small amount of research. In reference [
9], a robust VIC was designed that considers the variation in the inertia and damping of the power system as uncertainties. The authors of [
32] ignored the effects of utilizing the PLL during VIC design; however, in [
29], the authors considered these dynamics in the design, leading to achieving better results.
One of the effective solutions for dealing with the PLL measurement delay and other uncertainty issues in the power system is the implementation of optimization techniques for tuning the controllers of the virtual inertia control loop. The whale optimization algorithm (WOA) is a new swarm intelligence optimization algorithm which is sufficiently flexible for considering significant uncertainties such as system inertia, damping, and the dynamics of the PLL during the control installation process. The WOA simulates the intelligent hunting behavior of humpback whales. This foraging behavior is called a bubble-net feeding method, and is only observed in humpback whales [
33]. The WOA has a massive ability to solve complex real-word optimization problems [
34]. Due to its features, e.g., simplicity, flexibility, fast convergence speed, and stochastic nature, the WOA technique is applicable in multiple disciplines, such as electrical power systems, data mining, and machine learning. Moreover, WOA is comparable to different nature-inspired optimization techniques as it is characterized by easy implementation and robustness in addition to fewer control parameters that are required to be tuned [
35].
To summarize, this paper addresses one of the major problems of integrating RESs into the µGs, that is, that RES systems suffer from a deficiency of inertia and damping properties. One of the recent solutions is emulating the behavior of synchronous generator inertia virtually through utilizing an ESS with advanced control of the inverter to provide an additional inertia feature to the total inertia of the µG. The main contribution of this work is providing a new control strategy that depends on the WOA for tuning the most popular existing controller used in the virtual inertia control loop, namely the proportional-integral (PI) controller, for regulating the frequency of the µG at a specified nominal value (i.e., 50 or 60 Hz) during a variety of operating conditions and the existence of frequency measurement systems. In addition, reduction of ESS sharing is targeted in this study. The main idea behind applying the WOA is to solve the targeted problem by imitating the whale’s predatory behavior in order that the inertia of the µG can be enhanced, and system stability can be maintained even with the existence of system disturbances and uncertainties and/or the undesirable effects of using a PLL for frequency measurement. In addition, a comparative study of different control strategies was carried out to validate the effectiveness of the proposed approach considering the settling time, the peak undershoots, and peak overshoots.
This paper has been organized as follows: In
Section 2, the system modeling and the structure of the studied µG are introduced. Dynamic modeling of the understudy system is described in
Section 3. The whale optimization algorithm is explained in
Section 4. The simulation results and discussion are presented in
Section 5. Finally, the conclusions are illustrated in
Section 6.
4. Modeling of Whale Optimization Algorithm (WOA)
In [
32], Hof et.al. mentioned that whales’ brains include spindle-shaped cells which are similar to those of humans that allow humans to judge, suffer emotionally, and behave socially, i.e., those cells are the main causes of human distinction. It was discovered that whales own a number of these cells that is double the number adult humans have, meaning that whales, like humans, have intelligence, but at a much lower level. In addition, the authors of [
36] noticed that humpback whales have the ability to enhance their dialect.
During hunting, individual humpbacks’ positions (locations) can be considered as decision variables, whereas the distance between each hunter and the targeted prey can be decided based on the cost of the objective function [
37]. Goldbogen et al. [
36] investigated humpback whale behavior utilizing tag sensors. Hunting behavior was classified into two proceedings called upward spirals maneuver and double loops maneuver, both of which are based on bubble-net strategy that is used by the hunter whales. In the former maneuver, humpback individuals (search agents) dive to the level of 12.0 m below the ocean surface, and afterwards begin to generate spiral-shaped bubbles around their prey (best solution), then swim up to the water surface. However, the hunter whales complete the latter maneuver in three steps: the coral loop, the lobtail, and the capture loop. In this study, upward spirals maneuver has been selected to be emulated for problem optimization.
In this study, WOA depends on modeling the first maneuver of hunting, i.e., upward spirals maneuver, as follows: Whale individuals’ positions are considered time-dependent variables and can be determined through three stages: The first stage is searching for prey; this can be described as exploration phase. The second stage is prey encircling. The third stage is attacking the prey; this can be described as exploitation phase. These stages are addressed in the following subsections.
4.1. A. Exploration Phase: Modeling of Searching
In humpback whale hunting strategy, the exploration phase (search for prey) is considered the main stage, in which the search agents look for prey; afterward, they take their locations randomly around the prey, i.e., each whale of the hunting group takes a random position with respect to the prey. For modeling this process mathematically, the expected whole position can be formulated by (9):
where
is the whale location which is selected randomly by individual hunting whales in the current iteration,
is a vector whose elements represent the distances between the hunters and the prey, and
&
are coefficient vectors.
is the absolute value function.
4.2. B. Modeling of Encircling
In this hunting stage, humpback whales encircle prey school after realizing its location in the previous stage. Each search agent updates its location with respect to the prey optimally instead of randomly in the exploration phase. At this point, the hunters consider the current best candidate position among their current positions as best solution in the current iteration and nearest to the optimal location. Accordingly, the positions of the other hunters are updated towards the best search agent. The mathematical model behind the encircling strategy can be expressed as follows [
37]:
Moreover,
and
which are applied to obtain the optimal position of the search agents, are expressed by Equations (13) and (14):
where
is the local best position,
represents whale position at iteration
, and
is the expected whale position at the iteration
.
and
are two control parameters whose values depend on
and
, where
has a value that decreases linearly from 2 to 0 during the iterations, and
is a random vector in the range of [0, 1].
4.3. C. Exploitation Phase: Modeling of Bubble-Net Strategy
The bubble-net strategy is the feeding behavior of humpback whales. This strategy is a combination of two mechanisms, the shrinking encircling mechanism and the spiral updating position mechanism. In the former mechanism, the new position of a hunter whale (search agent) is selected to be between the current best position of that hunter and its original position as shown in
Figure 4. In the latter mechanism, calculation of the distance between the whale position (
) and the prey position (
) is performed.
The model of the bubble-net feeding behavior can be obtained by applying a spiral formula behind the helix-shaped movement of humpback whales to define the position between each hunter and the prey. This movement can be represented as shrinking circle and following a spiral-shaped path [
38]:
where
is the probability of choosing one of the two Equations of (15) to update the hunters’ positions,
is a constant for defining the shape of the logarithmic spiral which is set to 1, and
is the distance between the current position of the whale and the best solution.
is a random number whose value lies in the range [−1, 1].
According with the above strategies, the flowchart of whale optimization algorithm is given in
Figure 5. Due to its flexibility, high avoidance of local optima, and being a gradient-free mechanism, the WOA algorithm have a wide variety of applications including solving practical engineering problems. This motivated our attempts to employ WOA to optimize PI controller,
for virtual inertia emulation of an islanded µG application. The optimization process was performed offline; however, the effectiveness of the optimized controller was approved and tested under different disturbance and uncertainty scenarios as discussed in the following section.
5. Results and Discussion
In this study, the analysis, simulations, and optimization program were implemented utilizing MATLAB software to investigate the effectiveness of the proposed control scheme.
In order to check the robustness of the suggested virtual inertia controller against high RES penetration and the utilization of a PLL in µGs, different scenarios of disturbances and inertia uncertainty were implemented. In addition, the µG performance that is achieved when applying the proposed approach for tuning the PI controller of the VIC loop was compared with those of the µG when applying the conventional virtual inertia control,
-based virtual inertia control, and tuned PI based on the MATLAB Internal-Model Control (IMC) for virtual inertia control which is an applicable technique in real practice and industry [
39] The optimum parameters of the IMC-based PI controller, i.e.,
and
were properly obtained as 18.015 and 5.473, respectively. However, the transfer function of the
controller is formulated in [
8] as
where
Moreover, the implicit nonlinearities of the thermal power plant, i.e., speed governor backlash and GRC, were considered in the simulation. The GRC is given as 12% Pu MW/min for non-reheat turbines, and where the turbine unit includes a gate valve with
closing and opening rate limits. The proposed optimization scheme is conducted using the WOA options that are shown in
Table 2. Furthermore, as an additional challenge for the proposed controller, the sharing of the energy storage system is reduced from 30% in previous works to 25%. In addition, from a power-quality viewpoint, the µG frequency and time deviation should be maintained within acceptable ranges, i.e., the frequency of the µG should be within 49 to 51 Hz and 49.5 to 50.5 Hz during the generation/load event and no contingency event, respectively. The target of WOA is to obtain optimal values of
controller parameters (PI controller) through minimizing the following
objective function:
where
is the frequency at the sampling time
. Minimization of
is obtained in an offline manner. The objective function is converged to its best value within 20 iterations and the best tuning of the PI controller is achieved. The optimized parameters of the PI controller are provided in
Table 3.
In order to examine the µG frequency stability under the effects of various parameters’ uncertainties and load disturbances and the effectiveness of the proposed control strategy, four scenarios were considered (scenarios 1, 2, 3, and 4). The first scenario was given to test the µG frequency stability with different controllers. The behavior of the proposed WOA-based PI controller was tested against various loads and RES step changes (±0.1 p.u.) and under 100% system inertia. However, the under study µG was tested in the other three scenarios (scenarios 2, 3, and 4) under various operating conditions such as high penetration of wind farms and solar power plants, which are shown in
Figure 6. In addition, for more realistic operating conditions (low load damping and high-frequency deviation), the residential and industrial loads, shown in
Figure 7, were applied. To investigate the robustness of the proposed controller against the high penetration of RESs and loads and with different system inertia, the previous operating conditions were applied according to
Table 4.
5.1. Scenario 1
Figure 8 shows the µG frequency response, i.e., frequency stability under sudden load/RESs changes, system frequency drop, RoCoF, and overshoot. It is clear from the figure that the proposed optimal control achieves a respectable enhancement in frequency drop, overshoot, and RoCoF. In addition, it effectively minimizes the PLL effect on µG stability; however, a large frequency drop/overshoot exists in the case of applying the conventional virtual inertia control (±0.29 Hz). Compared to the other controllers, the proposed WOA-based PI controller provides better frequency performance, i.e., the frequency deviation is maintained within ±0.02 Hz.
5.2. Scenario 2
In this scenario, to test the islanded µG for expected real operation, in addition to applying realistic generated power from RESs and loads pattern, changes in µG operating conditions (medium system inertia, i.e., H = 50% of its nominal value) were considered simultaneously.
Figure 9 shows the µG performance with virtual inertia control when applying a WOA-based PI controller, IMC-based PI controller, and
-based controller. From the figure, it is notable that the proposed controller using WOA regulates the system frequency more effectively than the other compared controllers.
The maximum overshoot and maximum undershoot of frequency deviation in the studied µG with the proposed coordination are about 0.07605 Hz and 0.07227 Hz, respectively. In the case of conventional virtual inertia control, optimal PI-based IMC and -based virtual inertia control are 1.273 Hz and 1.014 Hz, 0.5694 Hz and 0.4718 Hz, and 0.1015 Hz and 0.0886 Hz, respectively.
5.3. Scenario 3
To perform a more drastic simulation, this scenario investigated the frequency response of the studied µG with the proposed controller under more reduction in the µG inertia (low system inertia), i.e., 70% reduction in the system’s inertia, which can be expressed as H = 30% of its nominal value. The performance of the µG is illustrated in
Figure 10.
It can be noted from the results that with the proposed controller, the µG has rapid dynamic performance and low steady-state error and has more stability with high RESs integration. The maximum overshoot and maximum undershoot of the frequency deviation are 0.09539 Hz and 0.08582 Hz, respectively. It is observed that the system frequency is maintained within the permissible limits; accordingly, the robustness of the µG was achieved in case of operation at low system inertia.
5.4. Scenario 4
In reality, µGs’ parameters may be degraded with time. In addition, the µGs may have invalid estimated parameters; for example, for maintenance purposes some of the system parts such as the turbine and governor may be replaced with new parts, resulting in system performance deterioration which may lead to system instability. Thus, it is necessary to evaluate the µG stability and performance under these conditions. To confirm the effectiveness of the proposed control technique against µG parameter uncertainty, this scenario was carried out. The studied µG in this scenario operates at the same conditions as those applied in Scenario 2; however, the thermal generation governor time constant was increased by 50% of its nominal value (
= 0.15 s), and the turbine time constant was increased by 90% of its nominal value (
= 0.7 s). In addition, the droop characteristic was decreased by 25% (
= 1.8 s) [
3,
6].
From
Figure 11 it can be concluded that, in the case of conventional virtual inertia control, the microgrid frequency is completely unstable (the maximum overshoot and maximum undershoot are 1.1784 Hz and 2.789 Hz, respectively), causing system failure. The optimal IMC-based PI controller also fails to stabilize the µG (the maximum overshoot and maximum undershoot are 0.8274 Hz and 0.7698 Hz, respectively). When applying the proposed WOA-based PI controller for the VIC loop, a significant performance was noticed, i.e., the frequency fluctuations were minimized (the maximum overshoot and maximum undershoot are 0.09581 Hz and 0.09281 Hz, respectively), indicating that µG security and robustness when operating in the unstable mode were maintained. Thus, the effectiveness of the proposed controller was approved under the effect of uncontrollable disturbances, i.e., the variation in RESs power and loads, and uncertainties of the µG parameter.