1. Introduction
Nowadays, power systems depend on utility. Heavy power loss often occurs at peak hours. In order to avoid such power loss, ensuring the stability of power generation stations is crucial [
1,
2]. The demand side management of smart grids allows the customer to control their power consumption depending on their load conditions and services [
3]. Microgrids (MGs) are constantly connected to the primary electrical grid under normal conditions, and when a shortage of power occurs, they disconnect to an isolate mode. One of the most important features and advantages of using a microgrid is its ability to be islanded and operate independently. The advantage of island mode lies in its abillity to improve the reliability and power quality of real customers in the MG [
4]. It consists of renewable and non-renewable energy resources. The loads in the distribution system, are able to operate both as grid-connected and islanded modes [
5]. The voltage and frequency of the system are controlled by the power grid in the grid-connected mode operation. Distributed generators (DGs) inject almost fixed power to the grid [
6], which contributes to the economic and secure operation of the power system [
6,
7]. Generally, voltage and frequency instability is attributed to the large deviation between generated electrical energy and utilized power [
8]. Some control strategies with efficient algorithms have been developed for the stability of voltage and frequency to ensure the durability of services [
9]. In both modes, the acceptable levels of main parameters can be achieved with respect to the power excellence of the MG [
10]. In a conventional power system, the voltage and frequency control can be achieved easily because mostly the power consumption side produces the uncertainties. By contrast, in MGs, due to the difference in power generation and load, functional complexity, structural variation, and changing the nature of renewable energy sources (RES), controlling the voltage and frequency is a complex task [
11,
12]. Conventional regulators cannot deliver acceptable achievements in some serious functioning situations given the rapidly changing operating conditions of MG. Therefore, voltage and frequency control require a powerful and intelligent controller in an islanded MG [
13].
Because the voltage and frequency variations of MG occur mostly in the islanded mode rather than the grid-connected mode, an effective control scheme should be able to sustain the reliability and quality of power supply to the load throughout. The main objective is to preserve, within the acceptable limit, the voltage and frequency of the MG in the islanded mode. There are two power control strategies in the DGs: the voltage–frequency control strategy in the islanded mode, or the active–reactive power control strategy in the grid-connected mode. Several control schemes using different algorithms have been proposed to regulate the frequency and voltage of the MG [
14]. But the frequency and voltage of the MG in islanded vary and need autonomous control [
5]. In [
15], the control loop of power was achieved by the control of the first loop. In [
16], a control loop of voltage was used for controlling the main parameters of the MG islanded mode. The reference voltage and reference frequency were received from the voltage controller to the current control loop by reducing the voltage variation using proportional integral (PI) controllers. However, a major drawback of PI controllers is their partial execution because they depend on the precise tuning of their gain coefficients (
and
), which are either established as static during the procedure or calculated to obtain dynamic values. When the static PI gains controller is employed for a voltage control loop, the adaptive or “trial and error” technique [
9,
17,
18] and the Ziegler–Nichols technique [
19,
20,
21] can be used to determine the gain parameters. However, the use of these methods adds to the total time spent in control activities, which might result in considerable delays in unstable operating areas. Hence, the suitable tuning of PI gains is extremely important to improve system efficiency. Nowadays, artificial intelligence (AI) has been adapted into an advanced method to improve the changeable response of MG systems [
22,
23]. AI-based controllers employed on MG systems confirm better combination and separation of DGs in present electrical grid systems, improve the voltage and frequency of transient response throughout changing the loads, enhance end-user electrical energy control, and ensure transient stability of the MG system. Furthermore, intelligent research methods obtaining optimal solutions yield better problem-solving results than traditional mathematical techniques [
24]. Various AI-based techniques have been developed to control the voltage and frequency of MG systems. Further, these techniques did not utilize time-intensive and insufficient conventional PI tuning techniques; for example, fuzzy logic (FL) [
25], genetic algorithms (GAs), [
24,
26], particle swarm optimization (PSO) [
13,
24], and gravitational search algorithms (GSAs) [
14,
27,
28].
However, AI-based algorithms such as GA, PSO, and FL have a few disadvantages. For instance, GA solves the local convergence rather than solving the global, which requires the translation of groups of dynamic data in the modern MG controls into conventional optimization techniques [
15]. PSO also results in a small amount of convergence in the reiterative procedure, limited by a local minimum in a large space [
29] and the ambiguity in the choice of its parameters [
30]. Although it works relatively well during the initial iterations, optimal results cannot be obtained within limited reference functions [
31,
32]. Great improvement in heuristic algorithms has inspired researchers to apply them in different fields of power system optimization. Grey wolf optimization (GWO) is the latest successful meta-heuristic algorithm that emulates the gray wolf societal pecking order demeanor. A pack of gray wolves, of an average pack size of five to twelve, are categorized as top predators, who fully trust the leadership chain and hunting demeanors [
33]. Enhanced gray wolf optimization (EGWO) uses parameter
α, a random number having a value within 0–1, and an alpha search agent. However, the alpha is not suitable for the higher order of the gray wolves’ performance and will lead to inactivity in certain local solutions [
34]. Modified GWO (mGWO) is a balanced exchange of the exploration and exploitation in original GWO algorithm. However, its suitability for power systems is questionable [
35]. Augmented gray wolf optimization (AGWO) is an improved GWO algorithm with regard to exploration and exploitation. To avoid stagnation, exploration is enhanced by making nonlinear reducing parameters from 2–1. The exploitation is expanded by updating search agent rankings with the average positions of the alpha (first best ranking) and the betas (second best ranking) [
36]. However, this algorithm is very slow and can be implemented only on the grid-connected mode.
This study proposes a novel modified GWO algorithm called square root gray wolf optimization (SRGWO), which shows improved performance without compromising its interpretability and robustness. The SRGWO algorithm is an efficient meta-heuristic algorithm that emulates the gray wolf societal hierarchy demeanor. Firstly, the proposed algorithm was verified with twenty-three benchmark functions and achieved better results than other algorithms. The proposed algorithm solves the problem of determining optimal parameters of PI controllers to control the voltage and frequency of the MG in an islanded mode under the conditions of inserting the DG and changing the load. To confirm the efficiency of this method, its performance for voltage–frequency regulation was compared with the performance of the regulators of GWO, AGWO, and EGWO under similar working conditions.
Further, the combination of SRGWO and the PI controller was used to design the islanded MG system using the voltage and frequency regulate technique. To the best of our knowledge, this is the first time the tuning of the PI controller with SRGWO has been attempted. To achieve the basic advantage of both controllers, SRGWO was used to tune the control parameters of the PI controller in this work. Herein, as a replacement for gain arrangement, the gains of the controller were tuned according to the operating situations. The effective strategy of using a PI controller for advance power systems meets the following stipulations:
Efficacious against load disturbances
Resilient against RES uncertainties
Least sensitive to MG uncertainties
Adjustable and flexible in tuning the parameters according to system operating situations.
To ensure that the proposed system meets these specifications, the performance of the proposed controller for the MG system under various operating scenarios was analyzed. Furthermore, the accomplishment of the proposed controller was compared to the numerous powerful methods in the literature.
The main contributions of this paper are as follows:
GWO was modified and analyzed with respect to the standard benchmark functions, comparing with the main GWO algorithm and additional modified GWO, PSO, and GSA algorithms.
The parameters of PI controller were optimized using the proposed SRGWO algorithm.
The PI controller parameters tuned with SRGWO were implemented for the voltage and frequency control of an islanded MG system, and its performance was compared with original GWO, AGWO, and EGWO.
The robustness of the proposed controller against RES uncertainties and MG uncertainties with diverse operating scenarios in a single framework was tested.
The paper is ordered as follows. The original GWO is described in
Section 2. The novel GWO algorithm and tested benchmark functions are described in
Section 3. The MG and mathematical modeling of the three-phase islanded technique, along with its control architecture, are explained in
Section 4. In
Section 5, the problem formulation is described. In
Section 6, the results and discussion are presented. Finally, conclusions are presented in
Section 7.
2. Grey Wolf Optimization Algorithm
A modern meta-heuristic algorithm is known as the GWO algorithm, and mimics behavior of the gray wolves, which live in packs with an average of five to twelve members. In the gray wolf pack, a rigorous pecking order is exercised, wherein the pack has a captain named the alpha (α), accompanied by inferior wolves named betas (β) that help the alpha (α) in decisions, along with
δ and
ω, as illustrated in
Figure 1 [
33,
37].
The method of chasing a quarry using grey wolves is conducted in four parts: probing for the quarry, encompassing the quarry, then chasing and attacking it. The exact model of encompassing quarry is articulated as follows:
where the position vector of the gray wolf is denoted by
the position vector of the quarry is denoted by
and t represents the current iteration. The
coefficient vector and the
coefficient vector are calculated as follows:
where,
and
are uniformly and randomly distributed vectors ranging from 0–1. The convergence factor
represents a value that gradually reduces from 2-0 through iteration (
t), and iterates until it reaches maximum iteration (Max: iter). The probing of the quarry position could be attained using the discrepancy of exploration agents, which could be attained while
. The exploitation of the quarry could be obtained from the converging exploration agents that is studied when
. The hunting is controlled through agent α, and with complete assistance from agents
β and
δ, as follows:
where,
represents the position vector of the α wolf,
represents the position vector of the β wolf, and
is the position vector of the δ wolf.
represents the updated position of the gray wolves.
3. Square Root Grey Wolf Optimization Algorithm
The massive power system applications, such as islanded-mode PV solar plants, are nonlinear models, and it is therefore hard to catch the transfer function for optimum performance. Thus, the online optimization of electrical power systems is the best other solution in place of the transfer function. Thus, similar to many proposed algorithms such as PSO, the GWO algorithm can be enhanced and adapted for better performance in exploration and exploitation in various technical field applications. Moreover, concerning the optimization methods based on population, the most appropriate way to converge towards the global minimum may have a two-phase division, fundamentally. During the initial optimization stages, the individuals can be stimulated to scatter through the entire search space.
During the later phase, the individuals should utilize information collected to converge on the global minimum. The current study proposes a novel modification in order to enhance the probing capability of the GWO algorithm, which is called square root gray wolf optimization (SRGWO). With the help of fine adjustment of the parameters and , the two phases can be balanced to discover the global minima with fast convergence. Though various adjustments of individual-based algorithms encourage local optima avoidance, in the proposed algorithm, the adaptive values of and generate the transition between exploration and exploitation, where half of the iterations are attached to exploration while the rest are meant for exploitation .
Normally, higher exploration of search space produces lower probabilities in order to improve the exploration rate in which exponential functions are employed in place of linear function for decreasing the value of
over the course of iterations. It is likely that over-exploration may produce excessive randomness and fail to submit ideal optimization results. Similarly, excessive exploitation has been found to produce insufficient randomness and fails to yield effective optimization results. Hence, for the sake of ideal optimization results, a balance between exploration and exploitation appears to be fundamental. The proposed algorithm uses the function of square root for the decay of
over the course of iterations. In SRGWO, all parameters must measure for exploration and exploitation in parameter
which mostly relies on parameter
as is the case in (4). In the proposed algorithm, the parameter varies nonlinearly and randomly from 2-1 as in (9). Hence, the possibilities of exploration state and exploitation state are balanced.
Hunting and decision-making rely on the modernizing of alpha (
α), beta (
β) and delta (
δ) in GWO algorithms as in 6-8. However, the hunting will depend only on the two top members
α and
β in the proposed SRGWO algorithm, as follows:
Benchmark Functions
The 23 standard benchmark functions were tested using the proposed SRGWO algorithm. In [
33], all 23 benchmark functions were given in tabular form. The GWO, PSO, AGWO, EGWO, and GSA algorithms were compared with the proposed algorithm for all benchmark functions. In every simulation, the search agents and maximum iterations were 30 and 500, respectively, and the executions number is thirty times to calculate average and standard deviation of all algorithms, which are given in
Table 1,
Table 2 and
Table 3. Simulation results are shown in
Table 1, where the proposed SRGWO algorithm achieved the five best results of seven. Hence, the obtained results verified the exploitability of the proposed algorithm over other nominated algorithms. The obtained results presented in the other two tables illustrate that the proposed algorithm is enhanced in exploration mode compared with the five other algorithms. The convergence characteristics of the SRGWO algorithm was compared with other algorithms, as illustrated in
Figure 2. Furthermore, the SRGWO algorithm achieved the best results for 12 out of 23 benchmark functions, while the PSO and GSA algorithms achieved the best results for 4 out of 23, and the GWO algorithm achieved the best results for 3 out of 23. Lastly, the AGWO and EGWO algorithms achieved the best result for 1 out of 23 functions, as shown in
Table 1,
Table 2 and
Table 3. The high-dimensional nature of the benchmark functions were mostly verified, and the proposed algorithm obtained results that were better than the other algorithms, as shown in
Table 1. Further,
Table 1 and
Table 2 shows unimodal and multimodal functions. The gray color boxes indicate the best results. Moreover,
Table 3 shows the evolution of functions F14-F23 for fixed dimensions of multimodal functions.
A statistical test based on the non-parametric sign test [
37] was used to evaluate the proposed SRGWO algorithm against GWO, PSO, AGWO, EGWO, and GSA. The non-parametric symbols “-“, “+”, and “≈” demonstrate whether the presentation of SRGWO is statistically inferior to, superior to, or similar to the second optimizer, respectively, in
Table 4. Hence, as
Table 4 shows, the results’ difference verified the superiority of the proposed algorithm compared with the others. The total non-parametric sign test result was 115. The number of results for “+” was 60/115, for “-“ was 46/115, and for “≈” was 9/115.
4. Microgrid Modelling
An MG is essentially a group of loads that are delivered from small sources of energy, e.g., wind turbines, microturbines, solar photovoltaics, and fuel cells, working as the only controlled system that is able to deliver heat and energy to the definite part [
38]. In addition, for the grid-connected mode with MG running the main grid, the voltage and frequency of the system is regulated using a huge electrical system. In addition to keeping the load balanced, regulating frequency and voltage is very important for MG operation in islanded mode [
39]. This is due to the fact that in MG systems with huge infiltrations of DGs, high voltage and frequency fluctuations can occur throughout the insertion of DGs or load changes. Furthermore, the control system of MG confirms, as a prerequisite, the absence of huge circulating reactive currents from small energy sources. The minor errors at fixed points of voltage and frequency due to circulating currents exceed the level of small energy sources [
40]. High-switching frequency pulses and problems of power quality are issues owing to the application of power electronic converters [
41]. Therefore, MG faces serious problems related to power quality, especially when assimilating a large number of DGs [
42,
43]. It is relevant to indicate the nonexistence of instability and ambiguity in the sample of optimal PI parameters. Further, these parameters are utilized to gain control amplifications due to huge deviations in power, voltage, and frequency level in the islanded mode. Hence, in this research, we discuss these issues as well as improve MG’s achievements in the islanded operating approach.
This section may be divided by subheadings. It should provide a concise and precise description of the experimental results, their interpretation, as well as the experimental conclusions that can be drawn.
The active and reactive power delivered by DGs are determined based on systematic values of voltage and current. The droop controller only generates the reference voltage and frequency for the voltage controller, which produces the reference current for the current controller [
44]. Lastly, space vector pulse width modulation (SVPWM) creates controlled signals to deliver the power as either active or reactive to the load within nominal frequency. Further, SVPWM also control the supply voltage to the three-phase voltage source inverter (VSI).
Figure 3 illustrates a block diagram of the MG islanding mode.
According to
Figure 3,
are output voltages;
are output currents in the direct-quadrature (d-q) form; DC capacitance is denoted by C;
is the resistance per-phase;
is the capacitance per-phase; and
is the inductance per-phase of the output filter. The three-phase MG voltage and current are represented by
and
, respectively; angular frequency is denoted by
and at the grid output voltage, it is denoted by
; the active power and reactive power are denoted by
p and
q, respectively; the nominal voltage and nominal frequency are denoted by
and
, respectively; reference voltage and frequency are denoted by
and
, respectively;
,
are the reference currents and
are the reference voltages in the d-q form; the equivalent voltage signals are denoted by
and
in the αβ form.
The power circuit dynamics of the MG system under study was mathematically modeled with the help of the Park’s transformation, which is determined by the equations of state space as follows [
34]:
where,
represent the per-phase voltage and current, respectively.
represent the output voltage of the filter.
represent the output current of the filter.
4.1. Voltage and Frequency Control Model
In the islanded mode of an MG, the main grid is not connected to the MG throughout course of its operation. The controlled pulses produced by the control circuit are provided to the VSI. Then, a smooth sinusoidal waveform of voltage is created, which supply the produced energy from DG to load. The PI controllers have two gains: one is proportional gain (Kp) and other is integral gain (Ki). Both gains are tuned by the SRGWO algorithm to improve the dynamic response of the MG system. The block diagram of the strategy of control is shown in
Figure 4.
In
Figure 4,
is measured voltage and
is measured frequency; the voltage error and frequency error are denoted by
and
respectively; the nominal voltage and nominal frequency are denoted by
and
respectively. ITAE is the abbreviation of integral time absolute error, while LPF is the abbreviation of low pass filter.
Initially, the DGs have to generate the voltage and current signals measured in the main grid. Afterwards, these signals are changed to the reference d-q form through Park’s transformation using the equation as follows:
The generated active power and reactive power of DGs is already converted to d-q form. Hence, the consumed power in the form of d-q, is determined as follows [
24]:
where the active power is denoted by
P, and the reactive power is denoted by
Q before LPF.
The LPF is utilized in this paper as given in Equations (21) and (22). This would help to obtain the basic elements of
p (the active power),
q (the reactive power), and decrease effect of current as well as the power regulator.
where the cut-off frequency of the filter is denoted by
and Laplace transform operator is denoted by
S.
4.2. Voltage and Frequency Controller
The droop controller created the reference voltage and reference frequency for the voltage controller in this study. The purpose of the regulator was to obtain the required frequency and voltage values by eliminating the error due to load changes or DG insertion. Two PI controllers were used in this controller, whose four gains were tuned using an intelligent meta-heuristic method called the SRGWO algorithm. Mathematically, the dynamic of the PI controller can be shown as follows:
It produced a signal of mention current ( and ) for the current controller. The output mention currents ( and ) could be controlled with the help of reducing the signal of voltage error , according to control loop of voltage, as in (23) and (24). Therefore, both power flows were optimized by the DG converter by controlling the output mention currents of the voltage control loop.
4.3. Current Controller
The current controller used traditional PI controllers to monitor the output of PWM at mention points
and
. In order to increase the stability of the current controller based on PI, the decoupling operation was accepted by means of current feed-forward reimbursement. It was attained through regarding inverter set currents (
) in its place of output measured currents
[
45]. In addition, according to the control composition illustrated in
Figure 4, the output voltage signal equation of current loop is written as follows:
Since PI tuning based on the SRGWO algorithm was used to reduce error in the voltage regulator, it was not necessary to optimize the parameters for the current regulator. Therefore, two fixed gains for the PI regulators were used to minimize the current error. Space pulse width modulation (SVPWM) is received from the output of the current regulator in the αβ form of the mention. It generates the controlled pulses that are used to disable the VSI so as to supply a power controller to the load with the best power quality. A flowchart of the proposed algorithm execution in the MG controller is illustrated in
Figure 5.
6. Results and Discussions
The SRGWO algorithm was used in this paper to select the best values for the PI coefficient gain of the MG in an islanded mode system through minimizing specified objective function. The outcomes were also later compared with controllers based on GWO, AGWO, and EGWO for the same working situations. For comparison, the particle counts and 50 iterations were defined for each algorithm.
6.1. Frequency and Voltage Control at the time of DG Insertion and Load Change
Due to frequency dives and reduced voltage, to achieve the rated frequency and voltage of the investigated MG network during DG insertion and load changes, a controller based on the SRGWO algorithm must select the better gain value for PI controllers. This was obtained using four various intelligence meta-heuristic algorithms (SRGWO, GWO, AGWO, and EGWO) to minimize FF. The main objective was to minimize FF, and therefore, the minimum values were considered to be best value. The convergence behavior of the four investigated methods under the same working situations. is illustrated in
Figure 6.
In
Figure 6, the AGWO provides a much better optimum solution than GWO, but with less flexibility than GWO. Meanwhile, it has been established that controllers based on the SRGWO algorithm achieve faster and better optimal solutions than controllers based on the GWO, AGWO, and EGWO algorithms.
Table 5 shows the optimized final value and iteration numbers where the minimum FF was achieved.
When the simulation was performed, this search process ended once the optimal value of objective function was obtained, or after the indicated number of iterations had been executed. In the proposed algorithm, the value of maximum iterations has been set to 50.
The optimized parameters achieved the final value, i.e., the two gains are K
pv and K
iv for the PI voltage controller, and K
pf and K
if for the PI frequency controller, for the controllers based on each algorithm in this study. These figures are presented in
Table 6.
In addition, at the beginning of the simulation, an evaluation of the performance of the control system was implemented, when a load of 50 kW (20 kVAR) was connected with DG. The DG unit employed a voltage-frequency power control model dependent on the SRGWO algorithm to maintain voltage and prevent serious frequency variation due to the rapid insertion of the DG. After that, another 30 kW (20 kVAR) load was injected into system in 0.4 s.
Figure 7a,b shows, under the same working circumstances, the comparison of active power (kW) and reactive power (kVAR) variations among the four various regulators.
It may be noted that when another load of 30 kW, 20 kVAR was injected in 0.4 s into the system, the voltage reduced quickly. This has happened because of more voltage drop across the filter components, and more load resistance. The controller was running to instantly recover the rated voltage and frequency of the system, as shown in
Figure 8a,b.
It is quite tough, but possible, to achieve online optimization in real-time, in practical applications and under various working situations, due to the process of long search, random load switching, and simulation time. Consequently, the parameters optimized for operating conditions were selected using SRGWO, GWO, AGWO, and EGWO, i.e., load changes and DG insertion during the simulation worked. The main advantages of this technique include the smooth adjustment of optimized parameters. Furthermore, the achieved parameters were good in all working situations. As the MATLAB editor ran optimization algorithm code, the application algorithm began to search for optimal parameters of PI by reducing the cost function.
6.2. Steady-State and Dynamic Response
One of the key parameters that must be eliminated during the islanded mode of operation is the sinusoidal nature of the output voltage and current of the inverter. The optimal parameters of the PI controller provide a smooth, and sinusoidal waveform, which minimizes the total harmonic distortion (THD). The controller based on the SRGWO algorithm given a very small percentage value of THD by a fast Fourier transform analysis of the waveform of output current. which demonstrates its performance in controlling the frequency and voltage of the investigated MG system, along with the high quality of its power. In
Table 6, the algorithms compare the proposed SRGWO-based controllers with GWO-, AGWO-, and EGWO-based controllers. It shows the current waveform THD level of the output of 15 cycles on 50 Hz of fundamental frequency. According to IEEE standard 1547–2003 [
46], the percentage of THD allowed in an electrical supplier must be always less than 5%. The THD in percentage achieved by controllers based on the proposed algorithm, GWO, AGWO, and EGWO, due to the insert of DG and load changes, are shown in
Table 7.
7. Conclusions
A novel optimal voltage and frequency control for DG units in a microgrid is proposed as a simple and an efficient algorithm. Twenty-three benchmark functions have been tested using the SRGWO method. The results have proved that the implementation of the proposed algorithm showed better performance in real power systems as compared to other GWO, PSO, AGWO, EGWO, and GSA algorithms. To enhance the capability of the proposed algorithm, the PI controller parameters were optimized by minimizing the error, which increased its efficacy. Additionally, the proposed algorithm-based control architecture provides a superior and optimal response compared to traditional GWO-, adaptive GWO- and enhanced GWO-based controllers, which makes it applicable to modern power systems, with high-speed response to disturbances. It also achieves a better minimum final optimized value of the FF as compared to GWO, AGWO, and EGWO, which ensures a high-quality solution for the stated optimization problem. A power quality analysis established that the SRGWO-based controller provides the least THD (%) as compared to GWO-, AGWO-, and EGWO-based controllers, and thus meets the IEEE standard 1547–2003.
The voltage and frequency magnitudes obtained by SRGWO offer minimum overshoot and settling time for the DG insertion condition, as well as the load variation condition. This leads to high-speed recovery of stability in a real-time power system. Furthermore, the proposed method has achieved an optimal fitness function and better power quality, which will ensure the economic and secure operation of power systems. In the future, real-time voltage and frequency control using machine learning will be performed using systems with a high penetration of renewable energy. The implementation of the proposed algorithm to a more complex power system network, such as hybrid renewable energy resources, as well as a real-time power networks, such as experimental prototypes, is suggested for future work.