Electronics 11 03886
Electronics 11 03886
Article
Efficient PID Control Design for Frequency Regulation in an
Independent Microgrid Based on the Hybrid PSO-GSA Algorithm
Farhad Zishan 1, * , Ehsan Akbari 2 , Oscar Danilo Montoya 3,4, * , Diego Armando Giral-Ramírez 5
and Alexander Molina-Cabrera 6
Abstract: Microgrids are a part of the power system that consists of one or more units of distributed
generation and are expected to remain in operation after being disconnected from the system. Since
they rely on overlying networks, frequency control is very important for network-independent
operation. Some of the most common problems in independently operating microgrids are frequency
sustainability and its fluctuations. The main purpose of this study is to control the frequency of a
microgrid in island mode in different scenarios. The objective function is defined based on time and
Citation: Zishan, F.; Akbari, E.; changes in the system frequency. Thus, the variable parameters of the PID controller are transformed
Montoya, O.D.; Giral-Ramírez, D.A.; into an optimization problem and are solved through the hybrid PSO-GSA algorithm. The study
Molina-Cabrera, A. Efficient PID
considers four scenarios: (a) a microgrid dynamic model and optimal PID controller coefficients;
Control Design for Frequency
(b) variable velocity disturbance applied to the studied system in order to observe power changes
Regulation in an Independent
and the microgrid frequency; (c) stepped load changes applied to the studied system; and (d) the
Microgrid Based on the Hybrid
proposed methods on the standard test function. Simulations under different operating conditions
PSO-GSA Algorithm. Electronics 2022,
11, 3886. https://doi.org/10.3390/
are performed, indicating improvements in the stability of microgrid frequency fluctuations by means
electronics11233886 of the proposed control method.
the other hand, DG causes the power flow in distribution networks to change. Therefore, a
main network with the presence of DG is not optimal for reducing losses; there needs to
be a proper control in the network, so that the distribution network operates at optimal
cost and with increased reliability [11]. In other words, with the advent of DG resources,
several problems have appeared, such as maintaining and protecting resources [12], the
way in which these resources are involved in setting the basic parameters of the network
(such as frequency and voltage [13,14]), and the method for power exchange between the
global network and distributed generation sources [15]. In 1998, to solve these problems
and consider these resources and local loads as integrated, the concept of micro-grid
was introduced in modern power systems [16]. Accordingly, microgrids are small power
networks composed of several distributed generation sources and local loads. They are
usually connected to the global network, and they are isolated from the main network in
the event of heavy disturbances. They can also feed sensitive loads [17].
Real power systems face a variety of uncertainties, which are caused by changes
in load [18], system modeling errors, and structural changes [19]. Therefore, classical
controllers with constant interest are not suitable for solving the Load Frequency Control
(LFC) problem [20–22]. In order to cover these limitations, a flexible controller is required.
So far, various controllers for LFC have been presented. Among these controllers, the PID
controller has generally attracted more attention than the others [23,24]. The controller’s
interests are determined at the nominal working points. The controller’s interests are
determined through the classical method [25]. In other words, increasing the number of
microgrids changes the fundamental rules of power systems and causes the production
resources to be distributed throughout them [26]. This leads to an increase in the complexity
and nonlinearity of power networks, so the proper response of classical controllers can no
longer be observed. PD-PI controllers are widely used in power systems because they have
a simple and cost-effective structure, and, in power systems, they are more reliable than any
other controller. However, the problem with these controllers is that their control coefficients
are set up for a single time and placed in the system according to the linear conditions and
operating points of the system. If the nominal working conditions or the system’s linear
conditions change due to turbulence, the values considered for these controllers are not
optimal, and they do not have the same response. A possible solution is to update and
optimize the control coefficients according to the incident changes in the system [27]. The
development of power networks due to increased energy demand and technical issues has
caused today’s power systems to activate within their own boundaries. This has led to more
sustainability in said systems. In order to increase stability and overcome the problems
with classical controllers in different working conditions, fuzzy controllers have been used
as resistant stabilizers to modulate small signal fluctuations [28–30]. Ref. [31] used a new
method for controlling the microgrid frequency with a drop control in a photovoltaic
converter and battery, in which a low-voltage microgrid is considered to be multiple virtual
microgrids. This strategy has improved the finetuning of the microgrid frequency. In [32],
the torque and frequency power drop control are applied to the converter of a wind turbine’s
doubly fed induction generator. In [33], the optimal self-healing strategy for microgrid
islanding is formulated as an optimization problem. A reconstruction framework and
solutions for power outages in microgrids are provided in [34]. A regulatory management
of renewable resources based on controllers is discussed in [35]. In [36], the optimization
method is used by planning to maximize profit and minimize operation cost. In [37],
a microgrid strategy is proposed using a self-healing agent that operates based on a
centralized or decentralized approach. Small-signal stability analysis is performed to
evaluate the stability of microgrids to avoid any instability problems. Ref. [38] employed
the Frequency Containment Reserves (FCR) technique with the goal of improving the
economic profitability of microgrids. The primary loop control of the frequency (drop
control) was established in order to control the microgrid frequency and reduce pollution
and the cost of power generation. Drop control cannot properly control the microgrid
frequency under heavy load variations, and it is not properly efficient in island mode. To
Electronics 2022, 11, 3886 3 of 21
control the frequency of an islanded microgrid, a secondary control loop is generally used
for reducing frequency fluctuations under severe load variations [39]. LFC is one of the
most important issues in microgrids. LFC has been investigated due to the relatively low
inertia of these systems [40]. In [41], a multivariate unconstrained pattern search method
for the optimization of digital PID controllers applied in an isolated forward converter
is studied. Conventional digital PID controllers are considered to be designed based on
digital redesign and direct digitalization, adjusted by one of the multivariate name search
pattern search methods called the Hooke–Jeeves (H-J) search method; with an excellent
performance, output voltage regulation can be ensured. Droop control techniques are
currently used to coordinate DG units in a microgrid. However, this method has its own
advantage. It is used for a nonlinear analysis to predict the qualitative behavior of the
system with the aim of reducing the differential equations [42,43]. In [44], an isolated
non-DC–DC boost converter is designed. This converter is designed by adding to networks
and VMCs. In [45], frequency control in hybrid distributed power systems via a type-2
fuzzy PID controller studied. A new Internet of Things-based optimization scheme of
a residential demand side management system was tested [46]. In addition, in [47], the
Optimized Robust Controller Design based on the CPSOGSA Optimization Algorithm
and H2/H∞ Weights Distribution Method for Load Frequency Control of Microgrids
was investigated.
This paper investigates the communication aspects of multiple markets with primary
control (centralized and decentralized) loops. Designing a controller usually consists
of three steps: first, choosing a control rule that contains changeable parameters; second,
choosing a method to set these parameters; third, analysis of system convergence properties.
The PID controller and coordination algorithm and parameter optimization are used due
to the advantages of robustness against system parameter uncertainties, faster convergence
speed when approaching the reference point, adaptability to system uncertainties, and
the ability to prove stability. However, so far there have been few research results that
use the combination method to design a controller for different coordinations. This still
remains an open and challenging issue and has motivated us to write this paper. Therefore,
one of the most important goals of reducing the effect of disturbances on the system and
maintaining the quality of power and frequency is to improve the dynamic performance of
the system in microgrids and the accuracy of power distribution between units in a limited
time. In addition, an optimization method based on the PSO-GSA optimization algorithm
is presented to achieve better and more accurate results. The rest of the article is as follows:
Section 2 studies an example of independent microgrid modeling. In Section 3, the proposed
PSO-GSA algorithm and its hybrid are discussed. In Section 4, the intelligent PID controller
is designed to optimally adjust the parameters. Section 5 introduces a new method for
damping and sustainability frequency fluctuations in the microgrid (while separated from
the main grid) based on the PID controller and a hybrid PSO-GSA algorithm. The following
aspects are studied: (a) the microgrid dynamic model and PID controller; (b) Calculation
of optimal controller coefficients; (c) PID and hybrid PSO-GSA coordination; (d) Variable
velocity disturbance; (e) Power and frequency changes; (f) Stepped load changes applied to
the system; and (g) Effect of the proposed methods on the standard test function. Finally,
Section 6 presents the conclusions. The results show the appropriate efficiency of the
proposed controller in quenching fluctuations in a shorter period of time.
2. Microgrid Modeling
Nowadays, the expansion of transmission and distribution networks can pose chal-
lenges to power systems, even though they have advantages such as increased network
reliability and improved stability. Among these challenges are the non-economic transmis-
sion of electrical energy from power plants to remote and impenetrable areas, the increase
in transmission and distribution losses, and the increased complexity of the network’s
protection system due to its widespread use. All of these have led to the widespread use of
DG resources in recent years, whose main principle is the production of electrical energy at
Nowadays, the expansion of transmission and distribution networks can pose cha
lenges to power systems, even though they have advantages such as increased networ
reliability and improved stability. Among these challenges are the non-economic tran
mission of electrical energy from power plants to remote and impenetrable areas, the in
crease in transmission and distribution losses, and the increased complexity of the ne
Electronics 2022, 11, 3886 work’s protection system due to its widespread use. All of these have led 4 of to
21 the wide
spread use of DG resources in recent years, whose main principle is the production o
electrical energy at the place of consumption. The concept of the microgrid is a result o
several DG The
the place of consumption. resources placed
concept of thetogether [48].isMicrogrids
microgrid include DG
a result of several DG resources
resources and loca
loads that can feed the loads both disconnected from and connected
placed together [48]. Microgrids include DG resources and local loads that can feed to the
theglobal ne
work. The overall structure of a microgrid is shown in Figure 1.
loads both disconnected from and connected to the global network. The overall structure
of a microgrid is shown in Figure 1.
where Maj is the active gravitational mass of j, and M pi is the inactive gravitational mass of
j, both of which are considered the same and equal to M in the mentioned algorithm; G(t) is
the gravitational constant at time t; and Rij is the distance between the two masses i and j,
which is also a very small number. The gravitational constant is an appropriate parameter
for controlling the search and productivity capabilities, which is expressed by Equation (3):
− at
G (t) = G0 e T (3)
where α and G0 are the control coefficients of the algorithm, and T indicates the system’s
lifetime. The force on mass i in the direction of dimension t at time t is equal to the sum of
all the forces that the other masses of the system exert on this mass. In this equation, rand j
is a random number with uniform distribution in the interval (1.0), which is considered for
the sake of randomness [51]:
N
Fid (t) = ∑ j=1,j6=i rand j Fijd (t) (4)
Furthermore, each of the masses has a specific speed and acceleration, each of which
is shown in Equations (5) and (6), respectively. According to Newton’s second law, each
mass is accelerated in the direction of dimension d, which is proportional to the force on
the mass in that dimension, divided by its inertia mass, as stated in Equation (4). On the
other hand, the velocity of each factor at time t is equal to the sum of the coefficients of the
current velocity and the acceleration of the factor, as expressed in Equations (5) and (6):
vid (t + 1) = rand × vid (t) + aid (t) (5)
Fid (t)
aid (t) = (6)
Mi ( t )
When the acceleration and velocity of each mass are calculated, the new position of
agent i in the dimension d is calculated according to Equation (7):
xid (t + 1) = xi d (t) + vid (t + 1) (7)
New situations are considered as the locations of new masses within the search space,
where the weight of new masses is normalized via Equations (8) and (9):
f i ti
mi ( t ) = (8)
best(t) − worst(t)
mi ( t )
Mi ( t ) = N
(9)
∑ j =1 m j ( t )
where f i ti (t) represents the degree of maturity of the mass of agent i at time t, and worst(t)
and best(t), respectively, indicate the suitability of the worst and the best factors of popula-
tion in time, whose size can be calculated using Equations (10) and (11):
worst(t) = max { f i ti (t)} (10)
x ( t + 1) = x ( t ) + v ( t + 1) (13)
Electronics 2022, 11, 3886 6 of 21
In Equation (12), ω is the inertia coefficient of the particle, and c1 and c2 are Hook
spring coefficients or acceleration coefficients, which are usually set to 2. To randomize the
nature of the velocity, the coefficients c1 and c2 are multiplied by the random numbers rand1
and rand2 . Usually, in the implementation of the PSO, the value of ω decreases linearly
from one to values close to zero. The inertia coefficient ω is generally determined according
to Equation (14):
ωmax − ωmin
ω = ωmax − × iter (14)
itermax
where iter max is the maximum repetition number, iter is the current repetition number,
and ωmax and ωmin are the maximum and minimum values of the inertial coefficients,
→
which are set at 0.9 and 0.3, respectively. vi is the magnitude of the velocity of particle
i in each dimension of the D-dimensional search space, which is limited to the interval
[−vmax , +vmax ], so that the particle’s possibility of leaving the search space is reduced.
The value of vmax is usually chosen so that vmaxx = kvmax , where 0.1 < k < 1, so that xmax
specifies the length of the search.
Nt
(∆u DEG )(k) = (∆u DEG )(k − 1) + ∑i=0 δi (∆F )(k − i ) (16)
∆umin ≤ (∆u DEG )(k) − (∆u DEG )(k − 1) ≤ ∆umax (17)
V jmin ≤ V j ≤ V jmax (18)
U = [∆u DEG , ∆u BESS , ∆u FESS ] (19)
W = [∆PFC + ∆PWTG + ∆PPV + ∆PFC − ∆PL ] (20)
Electronics
Electronics 2022, 11,2022,
388611, x FOR PEER REVIEW 7 of 22 7 of 21
Figure
Figure 2. Hybrid
2. Hybrid PSO-GSA method.
PSO-GSA method.
In the proposed controller (according to Figure 3), in the first stage, the changes in
power sources, load, and frequency of the microgrid are evaluated and measured. Then,
in the next step, the output of the system (frequency changes) and the appropriate con-
troller signals are applied according to the law. The relationships governing the behavior
of the controller are described using relationships (15) to (21).
min 𝐽 = ∑ 𝑊 (∆𝐹)(𝑘 + 𝑗) + ∑ 𝑉𝑖 (∆𝑢 )(𝑘 + 𝑗) − (∆𝑢 )(𝑘 + 𝑗 − 1) (15)
(∆𝑢 )(𝑘) = (∆𝑢 )(𝑘 − 1) + ∑ 𝛿𝑖 (∆𝐹)(𝑘 − 𝑖) (16)
∆𝑢 ≤ (∆𝑢 )(𝑘) − (∆𝑢 )(𝑘 − 1) ≤ ∆𝑢 (17)
𝑉𝑗 ≤ 𝑉𝑗 ≤ 𝑉𝑗 (18)
𝑈 = [∆𝑢 , ∆𝑢 , ∆𝑢 ] (19)
𝑊 = [∆𝑃 + ∆𝑃 + ∆𝑃 + ∆𝑃 − ∆𝑃 ] (20)
Function: 𝐽 = 𝑁1, 𝑁2 … which should be minimized; N1: Lower limit; N2: Upper
limit; 𝑁𝑢 : Control limit; 𝛿𝑖 is the numerical coefficients resulting from solving the
problem (by minimizing J). The index introduced in relation (21) is used to compare
control methods in the simulation section.
Figure
Figure 3. Studiedsystem.
3. Studied system.
5. Case Study
The studied system is shown in Figure 3, i.e., the main grid system containing con-
ventional DEG, solar panels, wind turbines, fuel cells, and battery energy storage sys-
tems. The hierarchical control structure of the microgrid includes WTG, FC, BESS, PV,
DEG, FESS, and AE.
Electronics 2022, 11, 3886 8 of 21
Function: J = N1, N2 . . . which should be minimized; N1: Lower limit; N2: Upper
limit; Nu: Control limit; δi is the numerical coefficients resulting from solving the problem
(by minimizing J). The index introduced in relation (21) is used to compare control methods
in the simulation section. Z t=tsimolation
findex = ∆ f (dt) (21)
t =0
5. Case Study
The studied system is shown in Figure 3, i.e., the main grid system containing conven-
tional DEG, solar panels, wind turbines, fuel cells, and battery energy storage systems. The
hierarchical control structure of the microgrid includes WTG, FC, BESS, PV, DEG, FESS,
and AE.
The dynamic model of a wind turbine for the analysis of a small signal is expressed by
relation, and its characteristic function is expressed as follows:
Ka kWTG ∆PWTG ∆PWTG
∆PWTG = − (22)
TWTG TWTG
Ka kWTG ∆PWTG
GWTG (s) = = (23)
1 + sTWTG ∆PW
where kWTG and TWTG are the gain coefficient and the time constant, Ka is a numerical
coefficient that expresses the wind turbine power percentage, ∆PWTG represents the changes
in the electrical output of the wind turbine, and ∆PW expresses changes in the power
obtained from the wind.
The following is the dynamic PV model:
k pv ∆ ϕ ∆Ppv
∆PPV = − (24)
Tpv Tpv
k pv
G pv (s) = (25)
1 + sTpv
where k pv and Tpv are the PV gain coefficient and the time constant, ∆Ppv are the changes
in the PV electrical output, and ∆ ϕ are changes are in solar radiation intensity.
Diesel generators play a major role in hybrid microgrids; as the load increases, they are
responsible for providing part of the capacity needed to reach equilibrium. The dynamic
model of a diesel generator is expressed via small-signal analysis as follows:
k DEG ∆PC k ∆F ∆PDEG
∆PDEG = − DEG − (26)
TDEG RTDEG TDEG
k pv
GDEG (s) = (27)
1 + sTpv
where k DEG and TDEG are the gain coefficient and the time constant of the diesel generator,
R is the speed drop coefficient, and ∆PDEG represents changes in the DEG power.
The dynamic model of the fuel cell, electrolyzer, battery, and flywheel is described below:
k ∆P ∆PFC
∆PFC = FC AE − (28)
TFC TFC
k FC
GFC (s) = (29)
1 + sTFC
k AE (1 − k a )∆PWTG ∆PAE
∆PAE = − (30)
TAE TAE
k AE
G AE (s) = (31)
1 + sTAE
k BESS
GBEES (s) = (32)
1 + sTBESS
Electronics 2022, 11, 3886 9 of 21
k FESS
GFEES (s) = (33)
1 + sTFESS
where k FC , TFC , k AE , TAE , k BESS , TBESS , k FESS , and TFESS are the interest rate and time
constant of the diesel generator, electrolyzer, battery, and flywheel, respectively; R is the
speed drop coefficient, ∆PFC represents changes in the fuel cell power, and ∆PAE expresses
changes in the electrolyzer power.
The parameters of the microgrid’s power sources are shown in Table 1, and the nominal
power of the microgrid is shown in Table 2. The proposed algorithm is applied to the
studied system and used to optimize the controller parameters. Table 3 shows the initial
parameters for the PSO-GSA. The results for the studied system are shown in Table 4, and
Figure 4 depicts the proposed algorithm in the sample system.
Parameter Value
D 0.012
H 0.1667/2
TFESS 0.1
TBESS 0.1
TFC 4
KFC 1.1
KAE 1.5
KBESS −1.3
TDEG 2
TWTG 1.5
TAE 0.5
KWTG 1.0
R 3
Ka 0.6
KDEG 1.3
KFESS −1.1
TPV 1.5
KPV 1
Figure 5 shows the convergence of the algorithm. As shown in the figure, the proposed
hybrid algorithm is optimized at a significant speed to the final value, which indicates its
high speed and proper accuracy.
Electronics 2022, 11, x FOR PEER REVIEW 10 of 22
∆k i = k2 k∗i ci
k2 > 0
ki = k∗i + ∆k i , (35)
k2 < 0 ∆k i = k2 k∗i 1+cic
i
(
k3 > 0 ∗
∆k d = k3 k d cd
k d = k∗d + ∆k d , (36)
k3 < 0 ∆k d = k3 k∗d 1+cdc
d
Table 4. Optimized PID parameter results (PSO and PSO-GSA).
Variable velocity
Figure6.6. Variable
Figure disturbances
velocity applied to
disturbances the studied
applied to system.
the studied system.
8. Frequency
Figurechanges
Figure 8. Frequency changes
with PSOwith
andPSO and PSO-GSA.
PSO-GSA.
Figure 9. Wind
Figure 9. Wind turbine powerturbine power
(pre- and(pre- and post-disturbance).
post-disturbance).
Figure 9. Wind turbine power (pre- and post-disturbance).
Electronics 2022, 11, 3886 14 of 21
12. Battery
Figure 12.
Figure Battery power (pre- (pre-
power and post-disturbance).
and post-disturbance).
Figure 13.Flywheel
Figure 13. Flywheelpower (pre- and
power post-disturbance).
(pre- and post-disturbance).
Electronics 2022, 11, 3886 Figure 13. Flywheel power (pre- and post-disturbance). 16 of 21
Figure14.
Figure Diesel generator
14. Diesel generatorpower (pre-(pre-
power and post-disturbance).
and post-disturbance).
Electronics 2022, 11, x FOR PEER REVIEW 1
In this section, the stepped load was first applied to the system (Figure 15), and the
In this
standard PSOsection, the stepped
and PSO-GSA load
algorithms was
were first
then applied
executed. Thetoresults
the system (Figure 15), an
of the frequency
standard PSO and PSO-GSA algorithms were then executed. The results ofofthe freq
variations are shown in Figure 16. The figure shows that, with the stepped variations
load, the combined
variations are shownalgorithm yields16.
in Figure lessThe
overshot andshows
figure undershot.
that, with the stepped variati
load, the combined algorithm yields less overshot and undershot.
15. Stepped
Figure 15.
Figure Stepped load changes
load applied
changes to the studied
applied system. system.
to the studied
0.015
PSO-GSA
PSO
0.01
Electronics 2022, 11, 3886 17 of 21
Figure 15. Stepped load changes applied to the studied system.
0.015
PSO-GSA
PSO
0.01
0.005
f [Hz]
-0.005
-0.01
-0.015
0 5 10 15 20 25 30 35 40 45 50
Time (sec)
Figure 16. Frequency changes of the studied system per stepped load.
Figure 16. Frequency changes of the studied system per stepped load.
The performance of the algorithm on the standard test function was evaluated in order
The performance
to determine its standard of the algorithm
deviation. on assessment
For a better the standard of thetest functionofwas
effectiveness the evalua
proposed method, a larger range in comparison with other methods was
order to determine its standard deviation. For a better assessment of the effectiven selected. This
function is defined as follows:
the proposed method, a larger range in comparison ! 2mwith other methods was se
2
This function is defined as follows: n i ∗ xi
f ( x ) = − ∑i=1 sin ( xi ) sin ( ) (37)
π 2𝑚
𝑖∗𝑥𝑖2
𝑓 (𝑥 ) = − ∑𝑛𝑖=1 sin (𝑥𝑖 ) (sin ( ))
𝜋 other papers, albeit
For a better comparison, the best coefficients were extracted from
lectronics 2022, 11, x FOR PEER REVIEW 18
considering the same initial population. Figure 17 shows the distribution of the results
For a better comparison, the best coefficients were extracted from other pap
obtained from 30 different implementations with the proposed methods. The proximity of
beit considering
the solutions theby
obtained same initial population.
the algorithm Figure 17and
indicates its robustness shows the distribution
high performance. It of
sults obtained
also shows from
that the 30 different
proposed method hasimplementations with the proposed method
a smaller standard deviation.
proximity of the solutions obtained by the algorithm indicates its robustness an
performance. It also shows that the proposed method has a smaller standard devia
Figure
Figure 17.17. Bestvalue
Best value obtained
obtainedfrom 30 different
from implementations
30 different for the standard
implementations for thetest function.test functio
standard
Regarding the accuracy of the algorithm with the Sphere function, in this section
Sphere function is used for the accuracy of the proposed algorithm. The Sphere func
Figure 17. Best value obtained from 30 different implementations for the standard test function.
Electronics 2022, 11, 3886 18 of 21
Regarding the accuracy of the algorithm with the Sphere function, in this section, the
Sphere function is used for the accuracy of the proposed algorithm. The Sphere function
Regarding
acts like the accuracy
a closed circle and theofspecified
the algorithm
valuewith
tendsthe
toSphere function,
be zero. in this section,
The formulation of thethe
Sphere
desired functionfunction
objective is used for
is inthe
theaccuracy of the proposed
form of Equation (38). algorithm. The Sphere function
acts like a closed circle and the specified value tends to be zero. The formulation of the
desired objective function is in 𝑓(𝑥)the=form(𝑥 of Equation
) (38).
(−30,30) (38)
n
f ( x ) = ∑ xi2 (−30, 30) (38)
The function in the algorithm is determined
i =1 instead of the desired objective func-
tion, and its goal is to minimize the desired parameter. The results of this function in
Figure The function
18 show that in
thethe algorithm is
convergence determined
reaches a zeroinstead
value. of the desired objective function,
and its goal is to minimize the desired parameter. The results of this function in Figure 18
show that the convergence reaches a zero value.
Figure
Figure 18.18. Algorithm
Algorithm convergence
convergence with
with Sphere
Sphere objective
objective function.
function.
7. Conclusions
In this paper, a sample microgrid with a PID controller was modeled while using
a hybrid PSO-GSA. To better investigate and analyze the proposed controller, various
errors were used. The results indicate that the proposed algorithm is more efficient in
comparison with particle swarm-based controllers. The optimization algorithm proposed
in this paper is novel and has a higher convergence speed compared to PSO algorithms. The
proposed method was tested on a case study, and the results show that setting the controller
parameters leads to a better frequency response. Therefore, the proposed controller has an
optimal performance at adjusting the frequency of the microgrid and achieving the final
response after a short transition time with low harmonic distortion.
Author Contributions: Conceptualization, F.Z. and E.A.; methodology, F.Z., E.A. and O.D.M.; soft-
ware, F.Z. and E.A.; validation, F.Z., E.A., O.D.M., D.A.G.-R. and A.M.-C.; formal analysis, F.Z. and
E.A.; investigation, F.Z., E.A. and O.D.M.; resources O.D.M., D.A.G.-R. and A.M.-C.; data curation,
D.A.G.-R. and A.M.-C.; writing—original draft preparation, F.Z. and E.A.; writing—review and
editing, O.D.M., D.A.G.-R. and A.M.-C.; visualization, F.Z. and E.A.; supervision, O.D.M., D.A.G.-R.
and A.M.-C.; project administration, O.D.M.; funding acquisition, O.D.M., D.A.G.-R. and A.M.-C. All
authors have read and agreed to the published version of the manuscript.
Funding: This research received no external funding.
Institutional Review Board Statement: Not applicable.
Informed Consent Statement: Not applicable.
In this paper, a sample microgrid with a PID controller was modeled while us
hybrid PSO-GSA. To better investigate and analyze the proposed controller, va
errors were used. The results indicate that the proposed algorithm is more efficie
comparison with particle swarm-based controllers. The optimization algorithm prop
Electronics 2022, 11, 3886 in this paper is novel and has a higher convergence speed compared 19 toofPSO
21 algorit
The proposed method was tested on a case study, and the results show that settin
controller parameters leads to a better frequency response. Therefore, the prop
controller has an optimal performance at adjusting the frequency of the microgrid
Data Availability Statement: No new data were created or analyzed in this study. Data sharing is
achieving the final response after a short transition time with low harmonic distortio
not applicable to this article.
Conflicts of Interest: The authors
Appendix A. (a): declare no conflict
Flowchart of PSO of algorithm,
interest. (b): Flowchart of PSO–GSA algorith
Appendix A
(a) (b)
Figure A1. Flow diagram of the proposed intelligent tunning algorithm for adjusting the
PID gains using combinatorial optimization: (a) Flowchart of PSO algorithm, (b) Flowchart of
PSO–GSA algorithm.
Figure A1. Flow diagram of the proposed intelligent tunning algorithm for adjustin
References PID gains using combinatorial optimization: (a): Flowchart of PSO algorithm
Flowchart of PSO–GSA algorithm).
1. Shin, D.-U.; Jeong, C.-H. Energy Savings of Simultaneous Heating and Cooling System According to Indoor Set Temperature
Changes in the Comfort Range. Energies 2021, 14, 7691. [CrossRef]
2. Sandelic, M.; Peyghami, S.; Sangwongwanich, Author Contributions:
A.; Blaabjerg, Conceptualization,
F. Reliability F.Z.design
aspects in microgrid and and
E.A.;planning:
methodology, F.Z.; E.A.
Status and
power electronics-induced challenges. Renew. O.D.M.; software,
Sustain. F.Z.
Energy Rev. and159,
2022, E.A.; validation,
112127. [CrossRef]F.Z.; E.A.; O.D.M.; D.A.G.-R., and A.M
3. Hamedi, K.; Sadeghi, S.; Esfandi, S.; Azimian,formal analysis, F.Z.
M.; Golmohamadi, H. and E.A.; investigation,
Eco-Emission F.Z.; E.A. Microgrid
Analysis of Multi-Carrier and O.D.M.; resources O.D
Integrated
with Compressed Air and Power-to-Gas Energy D.A.G.-R.,
Storageand A.M.-C.; Sustainability
Technologies. data curation, D.A.G.-R.,
2021, and A.M.-C.; writing—original
13, 4681. [CrossRef]
4. Yuvaraja, S.; Salam, M.S.A.; Vijayaraja, L.; Kesavan, R.; Dhanasekar, R. A novel PWM scheme for grid-tied inverter in micro-grid
with enhanced power quality using silicon cells. Mater. Today Proc. 2021, 46, 4298–4304. [CrossRef]
5. Wu, M.; Niu, X.; Gao, S.; Wu, J. Power Quality Assessment for AC/DC Hybrid Micro Grid Based on On-Site Measurements.
Energy Procedia 2019, 156, 396–400. [CrossRef]
6. Kiran, P.; Vijaya Chandrakala, K.R.M. New interactive agent based reinforcement learning approach towards smart generator
bidding in electricity market with micro grid integration. Appl. Soft Comput. 2020, 97, 106762. [CrossRef]
7. Ishaq, S.; Khan, I.; Rahman, S.; Hussain, T.; Iqbal, A.; Elavarasan, R.M. A review on recent developments in control and
optimization of micro grids. Energy Rep. 2022, 8, 4085–4103. [CrossRef]
Electronics 2022, 11, 3886 20 of 21
8. Nguyen, H.K.; Khodaei, A.; Han, Z. Incentive Mechanism Design for Integrated Microgrids in Peak Ramp Minimization Problem.
IEEE Trans. Smart Grid 2017, 9, 5774–5785. [CrossRef]
9. Sun, Y.; Wu, X.; Wang, J.; Hou, D.; Wang, S. Power Compensation of Network Losses in a Microgrid With BESS by Distributed
Consensus Algorithm. IEEE Trans. Syst. Man Cybern. Syst. 2020, 51, 2091–2100. [CrossRef]
10. Khalghani, M.R.; Khooban, M.H.; Mahboubi-Moghaddam, E.; Vafamand, N.; Goodarzi, M. A self-tuning load frequency control
strategy for microgrids: Human brain emotional learning. Int. J. Electr. Power Energy Syst. 2016, 75, 311–319. [CrossRef]
11. Montoya, O.D.; Zishan, F.; Giral-Ramírez, D.A. Recursive Convex Model for Optimal Power Flow Solution in Monopolar DC
Networks. Mathematics 2022, 10, 3649. [CrossRef]
12. Abdel-Salam, M.M.; El-Mohandes, M.T.; Osman, A.H. PSO-based Protection Coordination and Power loss Minimization in
Distribution Systems with DG Sources using Optimal Fault Current Limiters. In Proceedings of the International Middle East
Power Systems Conference (MEPCON), Cairo, Egypt, 17–19 December 2019. [CrossRef]
13. Sepehrzad, R.; Rahimi, M.K.; Al-Durra, A.; Allahbakhshi, M.; Moridi, A. Optimal energy management of distributed generation
in micro-grid to control the voltage and frequency based on PSO-adaptive virtual impedance method. Electr. Power Syst. Res.
2022, 208, 107881. [CrossRef]
14. Sadeghi, B.; Shafaghatian, N.; Alayi, R.; Assad, M.E.H.; Zishan, F.; Hosseinzadeh, H. Optimization of synchronized frequency
and voltage control for a distributed generation system using the Black Widow Optimization algorithm. Clean Energy 2021, 6,
105–118. [CrossRef]
15. Mariam, L.; Basu, M.; Conlon, M.F. A Review of Existing Microgrid Architectures. J. Eng. 2013, 2013, 937614. [CrossRef]
16. Palizban, O.; Kauhaniemi, K.; Guerrero, J. Microgrids in active network management—Part I: Hierarchical control, energy storage,
virtual power plants, and market participation. Renew. Sustain. Energy Rev. 2014, 36, 428–439. [CrossRef]
17. Schiffer, J.; Ortega, R.; Astolfi, A.; Raisch, J.; Sezi, T. Conditions for stability of droop-controlled inverter-based microgrids.
Automatica 2014, 50, 2457–2469. [CrossRef]
18. Shete, P.S.; Maurya, N.S.; Moharil, R.M. Analysis of Micro-grid under different loading conditions. In Proceedings of the
IEEE, International Conference on Industrial Instrumentation and Control (ICIC), Pune, India, 28–30 May 2015; pp. 1120–1124.
[CrossRef]
19. Jia, Y.; Wu, Z.; Zhang, J.; Yang, P.; Zhang, Z. Control Strategy of Flywheel Energy Storage System Based on Primary Frequency
Modulation of Wind Power. Energies 2022, 15, 1850. [CrossRef]
20. Alayi, R.; Zishan, F.; Seyednouri, S.R.; Kumar, R.; Ahmadi, M.H.; Sharifpur, M. Optimal Load Frequency Control of Island
Microgrids via a PID Controller in the Presence of Wind Turbine and PV. Sustainability 2021, 13, 10728. [CrossRef]
21. Zhu, F.; Zhou, X.; Zhang, Y.; Xu, D.; Fu, J. A load frequency control strategy based on disturbance reconstruction for multi-area
interconnected power system with hybrid energy storage system. Energy Rep. 2021, 7, 8849–8857. [CrossRef]
22. Saxena, A.; Shankar, R. Improved load frequency control considering dynamic demand regulated power system integrating
renewable sources and hybrid energy storage system. Sustain. Energy Technol. Assess. 2022, 52, 102245. [CrossRef]
23. Veerendar, T.; Kumar, D. CBO-based PID-F controller for Load frequency control of SPV integrated thermal power system. Mater.
Today Proc. 2022, 58, 593–599. [CrossRef]
24. Jalali, N.; Razmi, H.; Doagou-Mojarrad, H. Optimized fuzzy self-tuning PID controller design based on Tribe-DE optimization
algorithm and rule weight adjustment method for load frequency control of interconnected multi-area power systems. Appl. Soft
Comput. 2020, 93, 106424. [CrossRef]
25. Rai, A.; Das, D.K. The development of a fuzzy tilt integral derivative controller based on the sailfish optimizer to solve load
frequency control in a microgrid, incorporating energy storage systems. J. Energy Storage 2022, 48, 103887. [CrossRef]
26. Li, J.M.; Li, P. Research on Microgrid Frequency Control With Droop Characteristic Based on Lagrange Interpolation. Appl. Mech.
Mater. 2014, 556–562, 1814–1817. [CrossRef]
27. Xing, W.; Wang, H.; Lu, L.; Han, X.; Sun, K.; Ouyang, M. An adaptive virtual inertia control strategy for distributed battery energy
storage system in microgrids. Energy 2021, 233, 121155. [CrossRef]
28. Zishan, F.; Akbari, E.; Montoya, O.D.; Giral-Ramírez, D.A.; Nivia-Vargas, A.M. Electricity retail market and ac-countability-based
strategic bidding model with short-term energy storage considering the uncertainty of consumer de-mand response. Results Eng.
2022, 16, 100679. [CrossRef]
29. Arani, M.F.M.; Mohamed, Y.A.-R.I. Analysis and Impacts of Implementing Droop Control in DFIG-Based Wind Turbines on
Microgrid/Weak-Grid Stability. IEEE Trans. Power Syst. 2014, 30, 385–396. [CrossRef]
30. Packiasudha, M.; Suja, S.; Jerome, J. A new Cumulative Gravitational Search algorithm for optimal placement of FACT device to
minimize system loss in the deregulated electrical power environment. Int. J. Electr. Power Energy Syst. 2017, 84, 34–46. [CrossRef]
31. Rabelo, M.; Zahid, M.A.; Agrawal, K.; Kim, K.; Cho, E.-C.; Yi, J. Analysis of solder joint degradation and output power drop in
silicon photovoltaic modules for reliability improvement. Microelectron. Reliab. 2021, 127, 114399. [CrossRef]
32. Kaloi, G.S.; Wang, J.; Baloch, M.H. Active and reactive power control of the doubly fed induction generator based on wind energy
conversion system. Energy Rep. 2016, 2, 194–200. [CrossRef]
33. Ahmadi, S.E.; Rezaei, N.; Khayyam, H. Energy management system of networked microgrids through optimal reliability-oriented
day-ahead self-healing scheduling. Sustain. Energy Grids Netw. 2020, 23, 100387. [CrossRef]
34. Chen, B.; Chen, C.; Wang, J.; Butler-Purry, K.L. Sequential Service Restoration for Unbalanced Distribution Systems and
Microgrids. IEEE Trans. Power Syst. 2017, 33, 1507–1520. [CrossRef]
Electronics 2022, 11, 3886 21 of 21
35. Xu, W.; Li, J.; Dehghani, M.; Ghasemi Garpachi, M. Blockchain-based secure energy policy and management of renewable-based
smart microgrids. Sustain. Cities Soc. 2021, 72, 103010. [CrossRef]
36. Lipu, M.H.; Ansari, S.; Miah, S.; Hasan, K.; Meraj, S.T.; Faisal, M.; Jamal, T.; Ali, S.H.; Hussain, A.; Muttaqi, K.M.; et al. A
review of controllers and optimizations based scheduling operation for battery energy storage system towards decarbonization
in microgrid: Challenges and future directions. J. Clean. Prod. 2022, 360, 132188. [CrossRef]
37. Pashajavid, E.; Shahnia, F.; Ghosh, A. Development of a Self-Healing Strategy to Enhance the Overloading Resilience of Islanded
Microgrids. IEEE Trans. Smart Grid 2015, 8, 868–880. [CrossRef]
38. Obradović, D.; Ghandhari, M.; Eriksson, R. Assessment and design of frequency containment reserves with HVDC interconnec-
tions. In Proceedings of the 2018 North American Power Symposium (NAPS), Fargo, ND, USA, 9–11 September 2018; pp. 1–6.
[CrossRef]
39. Akbari, E.; Shafaghatian, N.; Zishan, F.; Montoya, O.D.; Giral-Ramirez, D.A. Optimized Two-Level Control of Islanded Microgrids
to Reduce Fluctuations. IEEE Access 2022, 10, 95824–95838. [CrossRef]
40. Heidary, J.; Gheisarnejad, M.; Rastegar, H.; Khooban, M.H. Survey on microgrids frequency regulation: Modeling and control
systems. Electr. Power Syst. Res. 2022, 213, 108719. [CrossRef]
41. Abbas, G.; Asad, M.; Gu, J.; Alelyani, S.; Balas, V.; Hussain, M.R.; Farooq, U.; Awan, A.; Raza, A.; Chang, C. Multivariable
Unconstrained Pattern Search Method for Optimizing Digital PID Controllers Applied to Isolated Forward Converter. Energies
2020, 14, 77. [CrossRef]
42. Gomes, A.C.; de Campos, A.S.C.; Lopes, L.A.C.; de Morais, A.S.; Tofoli, F.L.; da Silva, F.V.R. Analysis of a static model for DC
microgrids based on droop and MPPT control. Int. Trans. Electr. Energy Syst. 2018, 29, e2778. [CrossRef]
43. Tayab, U.B.; Bin Roslan, M.A.; Hwai, L.J.; Kashif, M. A review of droop control techniques for microgrid. Renew. Sustain. Energy
Rev. 2017, 76, 717–727. [CrossRef]
44. Freitas, A.A.A.; de Araújo, F.C.; Aragão, F.A.P.; de Souza, K.C.A.; Tofoli, F.L.; Sá, E.M.; Antunes, F.L.M. Non-isolated high step-up
DC–DC converter based on coupled inductors, diode-capacitor networks, and voltage multiplier cells. Int. J. Circuit Theory Appl.
2021, 50, 944–963. [CrossRef]
45. Khadanga, R.K.; Kumar, A.; Panda, S. Frequency control in hybrid distributed power systems via type-2 fuzzy PID controller. IET
Renew. Power Gener. 2021, 15, 1706–1723. [CrossRef]
46. Alhasnawi, B.N.; Jasim, B.H.; Mansoor, R.; Alhasnawi, A.N.; A Rahman, Z.S.; Alhelou, H.H.; Guerrero, J.M.; Dakhil, A.M.; Siano,
P. A new Internet of Things based optimization scheme of residential demand side management system. IET Renew. Power Gener.
2022, 16, 1992–2006. [CrossRef]
47. Zou, Y.; Qian, J.; Zeng, Y.; Ismail, S.; Dao, F.; Feng, Z.; Nie, C.; Mei, H. Optimized Robust Controller Design Based on CPSOGSA
Optimization Algorithm and H2 /H ∞ Weights Distribution Method for Load Frequency Control of Micro-Grid. IEEE Access 2021,
9, 162093–162107. [CrossRef]
48. Ganjei, N.; Zishan, F.; Alayi, R.; Samadi, H.; Jahangiri, M.; Kumar, R.; Mohammadian, A. Designing and Sensitivity Analysis of
an Off-Grid Hybrid Wind-Solar Power Plant with Diesel Generator and Battery Backup for the Rural Area in Iran. J. Eng. 2022,
2022, 4966761. [CrossRef]
49. Alayi, R.; Zishan, F.; Mohkam, M.; Hoseinzadeh, S.; Memon, S.; Garcia, D. A Sustainable Energy Distribution Configuration for
Microgrids Integrated to the National Grid Using Back-to-Back Converters in a Renewable Power System. Electronics 2021, 10, 1826.
[CrossRef]
50. Shankar, R.; Ganesh, N.; Čep, R.; Narayanan, R.C.; Pal, S.; Kalita, K. Hybridized Particle Swarm—Gravitational Search Algorithm
for Process Optimization. Processes 2022, 10, 616. [CrossRef]
51. Garg, H. A hybrid GSA-GA algorithm for constrained optimization problems. Inf. Sci. 2018, 478, 499–523. [CrossRef]
52. Lin, A.; Li, S.; Liu, R. Mutual learning differential particle swarm optimization. Egypt. Inform. J. 2022, 23, 469–481. [CrossRef]
53. Punyakum, V.; Sethanan, K.; Nitisiri, K.; Pitakaso, R.; Gen, M. Hybrid differential evolution and particle swarm optimization for
Multi-visit and Multi-period workforce scheduling and routing problems. Comput. Electron. Agric. 2022, 197, 106929. [CrossRef]
54. Shankar, G.E. Hybrid PSO-GSA for energy efficient spectrum sensing in cognitive radio network. Phys. Commun. 2020, 40, 101091.
[CrossRef]
55. Pan, I.; Das, S. Fractional Order AGC for Distributed Energy Resources Using Robust Optimization. IEEE Trans. Smart Grid 2015,
7, 2175–2186. [CrossRef]
56. Bevrani, H.; Habibi, F.; Babahajyani, P.; Watanabe, M.; Mitani, Y. Intelligent Frequency Control in an AC Microgrid: Online
PSO-Based Fuzzy Tuning Approach. IEEE Trans. Smart Grid 2012, 3, 1935–1944. [CrossRef]