Enhanced Randomized Harris Hawk Optimization of PI
Enhanced Randomized Harris Hawk Optimization of PI
Decarbonizing Energy Systems: Smart Grid and Renewable Technologies Available online at:
stet-review.org
Fang Rui-ming and Qiangqiang Liao (Guest Editors)
REGULAR ARTICLE
School of Electrical and Electronics, Department of Electrical and Electronics Engineering, Sathyabama Institute of Science
and Technology, Chennai 600119, India
Abstract. Microgrids, characterized by their ability to work individually or in combination with the main
power system, play a pivotal role in addressing the growing demand for reliable and sustainable energy
solutions. This work concentrates on the integration of sustainable energy sources, specifically photovoltaic
(PV), and wind generation and a battery storage system within a microgrid framework. Additionally, a power
flow control strategy is implemented to enhance the dynamic behaviour and stability of the microgrid. The
proportional-integral (PI) controller is a fundamental component in regulating the microgrid’s power flow,
ensuring optimal performance under varying operating conditions. However, tuning the PI controller parame-
ters is a difficult task because of the dynamic and nonlinear nature of renewable energy sources. In this work,
the application of the Enhanced Randomized Harris Hawk Optimization (ERHHO) to fine-tune the PI con-
troller is proposed, using the algorithm’s ability to mimic the hunting behaviour of hawks in finding optimal
solutions. The PV-Wind-Battery microgrid system is modelled, and the proposed algorithm is employed to
optimize the PI controller parameters for efficient energy management. The ERHHO algorithm’s
exploration-exploitation balance is harnessed to navigate the complex solution space and converge to optimal
PI controller settings, thereby enhancing the microgrid’s stability and performance. The study evaluates the
effectiveness of the proposed ERHHO-based PI controller tuning through comprehensive simulations. Perfor-
mance metrics such as transient response, overshoot, settling time, and steady-state error are analysed to
validate the robustness and efficiency of the proposed method. Compared to its nearest optimization algorithm,
with the proposed algorithm rise time is reduced by 50%, overshoot is reduced by 75%, settling time is reduced
by 66%, and finally, a percentage of reduction of steady-state error is 45%. The outcomes of this research
contribute to the advancement of microgrid control strategies, offering a novel approach to PI controller tuning
in the context of diverse renewable energy sources. The integration of the Harris Hawk Optimization algorithm
provides a promising avenue for enhancing the operational efficiency and reliability of microgrids, paving the
way for sustainable and resilient energy systems in the aspect of growing energy landscapes.
Keywords: Microgrid, Renewable energy, Photovoltaic (PV), Wind generation, Proportional-integral (PI)
controller, Harris Hawk Optimization (HHO) algorithm, Microgrid stability, Simulation analysis.
manages the system by regulating loads to optimize solar exploration advantages of the SCA with the capability of
output. Furthermore, it facilitates bidirectional power flow, a steady-state genetic algorithm to avoid premature conver-
enabling the utilization of power from residential homes, gence. The results illustrate that the SSGA method signifi-
hostels, and academic departments [5, 6]. cantly enhances the operation of complex design problems
Power flow control in microgrids can operate in either in comparison to similar optimisation methods.
centralized or decentralized modes [7]. In centralized modes, In [20], a novel approach was introduced that integrates
the microgrid’s power exchange primarily depends on the Sine–Cosine Algorithm (SCA) for learning and initializ-
market prices, whereas decentralized modes allow for ing individuals to solve diverse optimization problems. This
autonomous power exchange without being constrained method is enhanced by incorporating nearly contradictory
by market prices [8, 9]. Microgrids confront significant chal- learning approaches and methods incorporating contrasting
lenges related to stability, efficiency, and energy protection. principles, thereby improving the effectiveness and speed of
These challenges arise from factors such as reverse power overall exploration. The efficacy of the proposed method
flow from power sources voltage instability, transient states was assessed by standard functions, and the results under-
within the microgrid, notable frequency changes in stan- scored its superiority over alternative approaches, showcas-
dalone operating modes, and uncertainties in availability ing significant performance improvements.
management dynamics. Ensuring appropriate load alloca- In [21], an innovative approach was employed by
tion, specifically during system vulnerability, often requires combining the gravitational search method with the firefly
microgrids to employ high levels of angle droop. Power flow optimizing technique. This combined methodology aimed
control also suffers from various challenges like increasing to improve the adjustment of controller settings and was
penetration of renewable energy sources, dynamic load vari- applied within a 2 area hydrothermal power system. In
ations and voltage and frequency regulation. To tackle [22], researchers adopted the arithmetic optimization
these issues, a comprehensive tuning of controller gains is approach (AOA) to meticulously fine-tune a fuzzy-PID
required to improve the performance of microgrids [10, 11]. controller. This fine-tuning process is adopted in the impact
In recent times, researchers have introduced resilient of the high voltage direct current (HVDC) link, strategi-
and innovative strategies inspired by nature to effectively cally addressing the limitations associated with alternating
tackle complex challenges like Proportional Integral con- current (AC) transmission.
troller (PI) tuning across diverse domains. Famous method- In [23], researchers implemented a flower pollination
ologies include Genetic Algorithm (GA) [12], Particle optimization algorithm (FPOA) within Multi-Agent Power
Swarm Optimization (PSO) [13], and various others [14]. Systems (MAPSs) to develop a Proportional-Integral-
In [15], a novel technique called Chaos Cultural Sine– Derivative (PID) controller utilizing spontaneous flower
Cosine Algorithm (CCSCA) was introduced to address pollination techniques. To address Load Frequency Control
premature convergence issues in the Sine–Cosine Algorithm (LFC) in interconnected MAPSs, a bacterial foraging
(SCA). This approach incorporates a social algorithm as approach was incorporated, subject to Particle Swarm
the population structure and utilizes disordered methods Optimization (PSO), with a focus on the Proportional-
for particle search. Performance evaluation on benchmark- Integral (PI) controller. This was applied under various
ing functions demonstrated that the CCSCA surpassed the fitness functions, encompassing both standard and
basic SCA algorithm in global search capability, producing customized criteria, and considered two segments within
superior results. In [16], a binary Sine–Cosine Algorithm non-reheat thermal systems [24].
(SCA) approach was suggested to direct the unit commit- In [25], an advanced technique called the Hybrid Sine–
ment problem. The binary SCA approach utilized enhanced Cosine Algorithm (HSCA) was formulated, using SCA to
sigmoidal features to effectively represent the continuous address optimization problems. The results demonstrated
search space. Results showcased the efficiency of the binary that the proposed HSCA consistently outperforms other
SCA method related to alternative approaches. In [17], relevant approaches, yielding superior scheduling outcomes
introduced a discrete version of the Sine–Cosine Algorithm across multiple cases. Its capacity to produce higher-quality
(SCA) designed for optimizing complicated problems. The results establishes its effectiveness in addressing optimiza-
effectiveness of the proposed discrete SCA was demon- tion challenges.
strated through multiple benchmark functions, emphasizing The increasing integration of renewable energy sources,
its efficiency. within microgrids has spurred the need for effective control
In [18], a hybrid optimization depending on the Sine– strategies to optimize energy management. Proportional-
Cosine Algorithm (SCA) was developed to effectively tackle Integral (PI) controllers play a crucial role in regulating
optimization problems. This hybrid approach integrates system dynamics and ensuring stability. Microgrids serve
concepts and operators from various algorithms, fostering diverse loads with varying power consumption patterns.
a robust interchange of exploration and exploitation The dynamic nature of these load profiles introduces
capabilities. To evaluate its effectiveness, seven benchmark challenges in PI controller tuning, as controllers must be
functions were employed. The outcomes revealed that able to adapt to changes in load demand quickly and
the proposed hybrid method surpassed other similar efficiently to maintain grid stability and ensure reliable
approaches, providing a highly competitive solution. In power supply. Microgrids are designed to operate both
[19], a novel hybrid algorithm named Steady State Genetic connected to the main grid and in islanded mode, where
Algorithm (SSGA) was introduced for tackling they function independently during grid outages. PI con-
complex problems. This hybrid method amalgamates the trollers must be tuned to facilitate a smooth transition
The Author(s): Science and Technology for Energy Transition 79, 45 (2024) 3
between grid-connected and islanded modes while main- power measured at the output of the respective DC/DC
taining voltage and frequency stability within acceptable converters. P dc available DC power at DC bus.
limits. The dynamics of microgrid components, such as The total power generated by renewable sources is
inverters and energy storage systems, can exhibit nonlinear determined using equation (1), which incorporates the total
behaviour under certain operating conditions. Tuning PI power flow model. The power balance is computed by
controllers to effectively regulate these nonlinear dynamics considering the output of the hybrid sources and the load
while ensuring stability and performance is a complex task demand at the AC bus.
that requires careful consideration of system dynamics and
control strategies. P g ðt Þ ¼ ½P l ðt Þ P hres ðt Þ ð2Þ
The focus of this study revolves around utilizing the
Enhanced Randomized Harris Hawk Optimization (HHO) P l ðt Þ ¼ P hres ðt Þ þ P g ðt Þ ð3Þ
algorithm for tuning PI controllers within the power flow
control of a microgrid featuring PV, and wind generation. Q g ðt Þ ¼ ½Q l ðt Þ Q hres ðt Þ ð4Þ
The complex relationship of these diverse energy sources
necessitates an intelligent optimization approach to fine-tune
the PI controllers, thereby enhancing the overall perfor- Q l ðt Þ ¼ Q hres ðt Þ þ Q g ðt Þ : ð5Þ
mance and efficiency of the microgrid. This research explores
the application of ERHHO in the PI controller tuning, P g is active power provided by the grid, Q g reactive power
aiming to attain an optimal balance among energy genera- by the grid, P l load active power, Q l load reactive power,
tion, utilization, and system stability in a microgrid incorpo- P hres active power generated by HDGS and Q hres reactive
rating a mix of renewable and conventional energy sources. power by HDGS.
The battery power of the storage unit is influenced by
the duration of discharge, where it acts as an energy source,
and the duration of charging, where it functions as a load.
2 Hybrid DG system (HDGS) However, ensuring a consistent power balance proves chal-
lenging due to the nonlinear fluctuations on the consumer
The schematic of the hybrid system is presented in Figure 1. side and the unpredictable nature of sustainable energy
The PV-wind-battery system contains a wind turbine, PV [27]. To tackle this challenge, the system unit requires a
system and battery, working in hybrid to facilitate energy high-performance operation mode that enables efficient
transfer from the DC bus to the grid. The PV generation power regulation. The active and reactive power calculated
system is connected to the DC bus through an MPPT- by direct and quadrature axis voltages and currents are
operated DC-DC converter. The wind generation system given as shown in equations (6) and (7).
is connected to the DC bus through a rectifier and
MPPT-operated DC-DC converter. The battery storage 3
P I ðt Þ ¼ ½v d i d þ v q iq ð6Þ
system is connected to the DC bus through a bidirectional 2
DC-DC converter. The design of power flow control and
management modules for the PV-wind-battery system unit 3
is derived from the operational modes of the load and grid. Q I ðt Þ ¼ ½ v q i d þ v d i q : ð7Þ
2
During the grid-connected mode, the active and reactive
output powers of the PV-wind-battery system unit are v d and v q are direct and quadrature axis load voltages,
adjusted to align with their corresponding reference values. i d and iq are direct and quadrature axis load currents.
Therefore, the voltage source inverter (VSI)-based control
system must select the suitable power control mode to
ensure optimal performance. A sinusoidal pulse width 3 Modelling of sources
modulation (SPWM) is adopted to control the VSC. To
accommodate varying load requirements, the power pro- 3.1 Mathematical formulation of solar PV module
vided by the main grid and PV-wind-battery system needs
to be flexibly adjusted. Maintaining a consistent supply of The simplified circuit representation of a solar panel is
active and reactive power necessitates the efficient control depicted in Figure 2.
of power flow among the PV-wind-battery system and the The PV cell can be defined as an ideal current source
grid and load. Additionally, a reliable connection between denoted as I ph with a series of parallel resistances as shown
the power obtained from the main grid and the DG system in Figure 2. The output current of an ideal solar cell is
is essential for meeting the load demand [26]. described in equation (8)
The power balance equation must be fulfilled by the I ¼ I ph I d : ð8Þ
DC-link and point of common coupling (PCC). Total DC
Power available at DC bus by energy sources in a microgrid I is PV output current, I d is diode current, I ph photon
is defined as current.
P dc ð t Þ ¼ P WT ðt Þ þ P PV ðt Þ þ P Bat ðt Þ : ð1Þ In the realm of semiconductor theory, the primary
mathematical equation that interprets the I-V characteris-
P WT power generated by wind generation system, P PV tics of the PV cell is known as Shockley’s diode current
power generated by solar generation system, P bat battery equation, as depicted in equation (9)
4 The Author(s): Science and Technology for Energy Transition 79, 45 (2024)
kopt V w
xoptm ¼ : ð17Þ
R
kopt optimal tip speed ratio,
xopt m is directly related to wind speed expressed in
equation (18)
tw
xopt mp ¼ xbase m : ð18Þ
tbase
tbase refers to the reference wind speed, xbase m represents
the rotor speed at the reference wind speed, xopt mp indi-
cates the current optimal generator speed, and tw repre-
sents the current wind speed.
The control system will make significant corrections to
the rotor speed when it changes from the required optimal
speed. If the rotor speed gets closer to the required level the
adaptive ratio Radp ; will decrease until the optimal speed is
achieved and maintained as shown in equation (19)
xopt mp xm
Radp ¼ K per : ð19Þ
xopt mp
Figure 7. Turbine speed VSs output power.
The perturbation constant K per determines the degree of
accuracy in achieving maximum power output. Figure 7
presents the variation in output power of wind turbines rotor at its optimal speed (sopt m ). Following this, the input
with respect to turbine speed. current reference (I wref ) for the DC-DC converter can be
The flowchart presented in Figure 6 defines the adaptive evaluated from the torque reference as in equation (20).
step P&O MPPT algorithm. After the algorithm determi-
xm
nes the ideal rotor speed, a PI controller comes into play I wref ¼ sopt m : ð20Þ
to produce a reference torque aimed at keeping the PMSG V dcw
8 The Author(s): Science and Technology for Energy Transition 79, 45 (2024)
ð21Þ
Here, BLcaps represents the battery’s initial nominal capac- 4 Current control strategy of DC–AC
ity, while SOC min and SOC max denote the upper and lower converter
bounds of the battery’s SoC, respectively. These limits are
established to minimize the impact of battery ageing and, The active and reactive power controller introduces four PI
consequently, to prolong the battery’s lifespan. Figure 9 controllers to enable regulated active and reactive power
depicts the utilization of a DC-DC converter and a VSI delivery to the load. These controllers manage the power
for connecting the battery to the AC bus. flow between the grid and the utility.
The PI controller generates the duty cycle of the Equations (27) and (28) showcase the reference current
two switches, within the bidirectional DC-DC converter. utilized for achieving the control objective. The two PI
According to Figure 9, the output of the PI 3 controller controllers within the power controller establish communi-
is reference battery current I batref which is given as in cation with the external control loop to generate the refer-
equation (25), ence current vectors i dref and i qref .
The Author(s): Science and Technology for Energy Transition 79, 45 (2024) 9
Z
used in control systems to regulate a process variable.
idref ¼ K p5 P ref ðt Þ P ðt Þ þ K i5 P ref ðt Þ P ðt Þ dt
Heuristic optimization algorithms can be employed to auto-
ð27Þ mate the tuning process of a PI controller. These algorithms
explore the parameter space, searching for optimal con-
Z troller settings that minimize a performance metric such
i qref ¼ K p6 Q ref ðt Þ Q ðt Þ þ K i6 Q ref ðt Þ Q ðt Þ dt : as integral of time-weighted absolute error (ITAE), over-
shoot, or settling time. When applying heuristic optimiza-
ð28Þ tion algorithms to PI controller tuning, it’s essential to
define the objective function based on the specific control
K p5 and K i5 are PI controller gains, P ref reference active system’s performance criteria. Additionally, the algorithm
power, Q ref reference reactive power, P actual active power parameters (e.g., population size, and mutation rate)
and Q actual reactive power. should be carefully selected and tuned for the application.
The controller’s output is crucial to ensure precise track- It’s often beneficial to run multiple optimization trials
ing and minimize inverter ripple. This objective is accom- and analyse the results to ensure robustness and reliability
plished by employing two PI controllers to eliminate in achieving optimal controller settings.
current errors, along with an inverter current feedback The objective of design optimization is to identify the
and grid voltage feedforward loop, which enhances both optimal design by minimizing an objective function, adjust-
steady-state and dynamic performance. The controller ing design variables, and adhering to specified design con-
employs a PWM system to generate voltage vectors with straints. When undertaking design optimization, it is
reduced harmonic distortion. Besides the PWM system, common to encounter scenarios where multiple design crite-
the controller incorporates a current feedback loop and a ria or objective functions must be considered simultane-
grid voltage feedforward loop to improve steady-state and ously. In such instances, the design problem transforms
dynamic performance. These loops are used to remove cur- into a multi-objective optimization challenge.
rent errors, achieve precise tracking, and minimize inverter In contrast to conventional optimization methods tai-
drift as can be seen in equations (29) and (30). lored for scalar objective functions, the approach to multi-
Z objective optimization differs significantly. Traditional
v dref ¼ K p7 i dref ðt Þ id ðt Þ þ K i7 i dref ðt Þ i d ðt Þ dt methods that focus on a single objective function are inad-
equate for handling the complexity and nuances associated
ð29Þ with optimizing multiple, potentially conflicting objectives
simultaneously. Therefore, specialized multi-objective opti-
Z
mization techniques become essential in addressing the
v qref ¼ K p8 iqref ðt Þ i q ðt Þ þ K i8 iqref ðt Þ i q ðt Þ dt : intricacies of these multifaceted design problems.
Multi-objective optimization can be defined as shown in
ð30Þ equations (31)–(34)
K p7 and K i7 are PI controller gains, i dref reference direct min F ðx; k Þ ¼ ½F 1 F 2 . . . F n
T
ð31Þ
axis current, i qref reference quadrature axis current, i d
actual direct axis current and iq actual quadrature axis u ðx; k Þ 0 ð32Þ
current.
During grid-connected mode, the HDGS unit controls
both the magnitude and phase angle of the inverter current v ðx; k Þ ¼ 0 ð33Þ
to deliver the predetermined active and reactive power val-
ues to the grid. The control strategy for active and reactive x i;lb x i x i;ub ði ¼ 1; 2 . . . d Þ : ð34Þ
power in the HDGS unit relies on frequency and voltage
regulation. Evaluating the performance of the HDGS unit Consider the objective function vector F, which is a func-
involves considering the outputs of the PV irradiance, wind tion of the design vector x and a constant parameter vector
turbine, and battery. p. The inequality and equality constraints are denoted by
Tuning PI controller gains is essential to ensure effective u and v respectively. Additionally, x i;lb and x i;ub represent
and stable control of a system. PI controllers are commonly the lower and upper bounds for the ith design variable.
10 The Author(s): Science and Technology for Energy Transition 79, 45 (2024)
The HHO algorithm draws inspiration from the various X ðt Þ ¼ X rabbit ðt Þ X ðt Þ : ð42Þ
hunting strategies employed by hawks when searching for
and capturing their hunt. HHO is a particle-based optimiza- Here, DX(t) indicates the difference between the positions
tion technique composed of 3 distinct steps: exploration, of the hawks at iteration t and the present location of the
transformation, and exploitation. prey. Additionally, X rabbit ðt Þ denotes the leap strength,
The Author(s): Science and Technology for Energy Transition 79, 45 (2024) 11
which undergoes random variation with each iteration. hunting capabilities of particle-based algorithms. Typically,
When r is greater than or equal to 0.5, and the absolute chaotic maps are incorporated into one or more phases
value of the escaping energy (|E|) is less than 0.5 then, of these algorithms, including the initial population
X ðt Þ is given as in equation (43). generation, exploration, or exploitation stages. The way
locations are initialized has a significant impact on both
X ðt Þ ¼ X rabbit ðt Þ E jX ðt Þj : ð43Þ the population’s diversity and the algorithm’s stability.
While the ERHHO algorithm can ensure the randomness
When the escape potential (r) is less than 0.5, and the abso- of the s particles position during initialization. Chaotic
lute value of escaping energy (|E|) is equal to or greater sequences possess unpredictability and randomness.
than 0.5, hawks employ a more calculated, gentle encir- Chaotic mappings can initialize random numbers that
clement strategy known as “hard besiege” with gradually follow in the range of 0 and 1. The features and random-
intensifying swift dives. This behaviour is detailed as shown ness of this map can enhance performance by altering
in equations (44) and (45). the starting positions of hawks which is given in equation
Y ¼ X rabbit OV E jJX rabbit ðt Þ X ðt Þj ð44Þ (52)
8
> Xi
>
< a if X i < a
Z ¼ Y þ S LF ðDÞ : ð45Þ
X iþ1 ¼ : ð52Þ
>
Here, “D” represents the dimension of the problem, “S” rep- : 1 X i if X a
>
i
resents a random matrix with an order of 1 D, “LF” 1a
stands for the Levy flight relation, as given in equations
(46) and (47). In this equation, X iþ1 is the new location of the hawks after
applying chaotic mapping, X i denotes the hawks’ position,
ur and “a” is set to 0.8.
LF ðd Þ ¼ 0:01 1=b ð46Þ
jv j
!b1 6.2 Exploration factor
sð1 þ bÞ sinpb=2
r¼ : ð47Þ During the exploration step, the ERHHO primarily calcu-
s 1 þ b2 b 2b2
1
lates position updates using equations (37) and (38), where
r1 and r3 represent random values within the limits of 0 and
The process of updating the positions of the hawks can be 1. While these locations introduce randomness into every
represented through the following equation (48), wherein iteration of the overall exploration, they may lack the
“u” and “v” are vectors with an order of 1 d, “b” is a con- desired adaptability. The conventional HHO models a
stant in the range of 0 to 1.5, and s represents the Gamma scenario where hawks may effectively chase and identify
function. their prey. However, there are occasions when the prey is
8 not easily visible, and hawks might take several hours to
< Y if F ðZ Þ < F ðX ðt ÞÞ detect their target.
X ðt þ 1Þ ¼ : ð48Þ
: Z if F ðZ Þ < F ðX ðt ÞÞ The parameters r1 and r3 can be regarded as the
step length, where larger values make hawks move more
quickly, and conversely, smaller values result in slower
In cases where the prey’s energy is completely consumed, a movement. There are two distinct scenarios for hawks
robust besiege is initiated, indicated by the conditions when finding their prey: immediate detection and long-term
“r” is less than 0.5 and the absolute value of “E” is less than search. In the first scenario, it’s essential to consider
0.5. The computation of “Y”, “Z” is illustrated in equations randomness in the length of iteration. In contrast, in the
(49) and (50), next situation, the step length should decrease. Since the
Y ¼ X rabbit ðt Þ E jJX rabbit ðt Þ X ðt Þj ð49Þ probability of a hawk spotting prey rises over time, hawks
must initially search in a widespread limit with larger
steps, and then transition to a more precise search in the
Z ¼ Y þ S LF ðDÞ ð50Þ later iterations. Exploration factor (ef ) is given as in
8 equation (53)
< Y if F ðZ Þ < F ðX ðt ÞÞ 2 !
X ðt þ 1Þ ¼ : ð51Þ b p t
: Z if F ðZ Þ < F ðX ðt ÞÞ ef ¼ b rand cos : ð53Þ
2 2 T
Then equation (37) is simplified as in equation (54) is retained and carried forward into the next iteration,
a greedy strategy is employed, which is detailed in
X ð t þ 1Þ equation (56)
( 8
X rand ðt Þ ef jX rand ðt Þ 2r 2 X ðt Þj; q 0:5 < X m ðt þ 1Þ; f ðX m ðt þ 1Þ < f ðX Þðt þ 1Þ
¼ : X ð t þ 1Þ ¼ :
X rabbit ðt Þ X m ðt Þ ef ðLB þ r 4 ðUB LB Þ; q < 0:5 : X ðt þ 1Þ f ðX ðt þ 1Þ < f ðX Þðt þ 1Þ
m
ð54Þ
ð56Þ
Enhancing Exploration in Optimization Algorithms: The
Role of the Exploration Factor. 6.4 The details of ERHHO
In optimization algorithms, the exploration factor plays
a critical role in determining the search behaviour during The ERHHO algorithm focuses on refining certain aspects
the iterative process. At the outset of the optimization pro- of HHO [36]. While HHO is effective in local exploitation,
cess, the exploration factor widens the permissible range of it tends to lack in total exploration. ERHHO addresses this
step lengths. Initially, the step lengths are confined to the by linking the transition from exploration to exploitation to
interval (0, 1). However, the exploration factor introduces the prey’s energy. In the initial iterations representing the
a shift, expanding the limits to (b/2, b/2). This adjust- exploration phase, the range of particles is typically inade-
ment allows for more extensive exploration during the early quate, leading to a slower convergence rate. As iterations
iterations. As the optimization algorithm progresses, the progress, the energy of the prey decreases, and the algo-
exploration process evolves. Initially, the broader explo- rithm enters a phase of local exploitation.
ration range allows the algorithm to explore a wide variety To adapt to these changing conditions, ERHHO
of solutions. As the number of iterations increases, the employs four distinct hunting techniques depending on
exploration factor gradually narrows the step length limits. the energy of the prey and the probability of escaping.
Consequently, the algorithm transitions from broad explo- Hence, the tent chaotic map is added to augment the par-
ration to finer exploration. Fine exploration focuses on ticle’s diversity. The fine-tuned crucial parameters during
smaller regions of the optimization space, aiming for preci- the exploration phase using the exploration factor. As part
sion and convergence toward optimal solutions. Despite the of the exploitation step, incorporated a random walk strat-
narrowing of step length limits, the exploration factor egy to improve the capability to escape local optima. These
ensures that randomness is preserved. Randomness is essen- combined approaches enhance both the convergence speed
tial for escaping local optima and discovering global optima. and accuracy, effectively elevating the overall optimization
By maintaining some degree of randomness in step lengths, performance of the program. ERHHO comprises three
the algorithm avoids getting stuck in suboptimal regions. fundamental components: initialization, location updating,
and fitness estimation. The generation of locations involves
an algorithmic complexity of O(N*D), with N represent-
6.3 Random walk strategy
ing the particle size and D representing the problem’s
During the exploitation stage of the HHO algorithm, hawks dimensions. Fitness solution evaluation takes O(N) compu-
update their positions using four search strategies. While tational effort. To safeguard against local optima, incorpo-
this boosts exploration, proceeding to the next iteration rated a random walk strategy, increasing the mathematical
without interference can lead the algorithm to be stuck in complexity to O (2 N D T), where T represents the
local optima. To mitigate this, common strategies like the number of iterations. Consequently, the total computa-
Gaussian random walk, Levy flight, and Brownian motion tional complexity of the proposed ERHHO algorithm is
[29] are applied. These strategies tend to stabilize within O (2 N D T). A detailed flowchart for the ERHHO
certain value ranges with high probability but can experi- optimization is shown in Figure 11.
ence substantial changes with low probability, introducing Steps involved in optimization.
a level of deviation to the methods.
When the fitness value is the same as in the previous Defining the objective function that quantifies the
iteration, this step can be initiated which induces a performance of the microgrid.
deviation in the location of a hawk based on a chang- Initialize a population of potential solutions (candidate
ing parameter calculated as ðc rand ðiÞ c=2Þ sets of PI controller gains) using the ERHHO algo-
cos ðp=2 ðt=T Þ and declines as reiterations progress. rithm. This typically involves randomly generating a
This can be defined as in equation (55) set of potential gain values within the specified bounds.
Evaluate the fitness of each candidate solution by
c
X m ði Þ ¼ X ði Þ þ c rand applying the corresponding PI controller gains to the
2 microgrid model and simulating its performance under
2 ! ! various operating conditions and scenarios. The fit-
p t ness function assesses how well the controller achieves
cos ðX ðiÞ X rabbit : ð55Þ
2 T the desired control objectives.
The ERHHO algorithm iteratively explores the solu-
X m ðiÞ represents the latest location after implementing the tion space, updating the candidate solutions based
random walk strategy. To ensure that the effective result on their fitness values. It employs a combination of
The Author(s): Science and Technology for Energy Transition 79, 45 (2024) 13
exploration (random search) and exploitation (local The optimization process continues for a predefined
search) strategies to converge towards optimal or number of iterations or until a termination criterion
near-optimal solutions. At each iteration, the algo- is met, such as reaching a specified level of conver-
rithm perturbs the solutions, evaluates their fitness, gence or exceeding a maximum number of function
and updates them accordingly. evaluations.
14 The Author(s): Science and Technology for Energy Transition 79, 45 (2024)
Once the optimization process is complete, extract the Table 1. Parameters of the Hybrid DG system.
best solutions found by the ERHHO algorithm, corre-
sponding to the optimal PI controller gains for the Parameter Value
microgrid. PV array
Manufacturer and model Sharp NU-SC350,
349.965 W
7 Simulation results Open circuit voltage ðV oc Þ 46.9 V
This section is dedicated to presenting simulation results Short circuit current ðI sc Þ 9.6 A
that aim to establish the credibility and efficacy of the Maximum power point 38.5 V
proposed control method ERHHO. A key performance voltage ðV mpp Þ
metric involves assessing the method’s ability is to maintain Maximum power point 9.09 A
the DC bus voltage, as well as active and reactive powers current ðI mpp Þ
within specified ranges across various Microgrid (MG) oper- Series-connected modules per 10
ational modes. The efficacy of the proposed control is illus- string
trated through simulation results conducted within the Parallel strings 43
MATLAB/SIMULINK environment. Table 1 presents the
specifications of the system adopted for simulation results. PMSG
To establish the superiority of the developed methodology Stator resistance 0.9585 X
based on Enhanced Randomized Harris Hawk Optimization Stator inductance 0.835 lH
(ERHHO), a comparative analysis is performed against Torque constant 4.29 Nm/A
outcomes obtained using Monte Carlo Artificial Bee Colony Inertia 0.0027 kg.m2
Optimization (MCABC) [30], Hybrid Teaching Learn-
Wind turbine
ing Based Optimization and Equilibrium Optimizer
(TLBO-EO) [31], Enhanced Slime Mold Optimization Algo- Mechanical output power 150 kW
rithm (SMO) [32], Artificial Rabbits Algorithm (ARA) [33], Base wind speed 10 m/s
Coot Bird Metaheuristic Optimizer (CB) [34], and Ziegler- Rotor diameter 24.6 m
Nichols (ZN) [35]. The control strategy outlined in Section 3 Swept rotor area 475 m2
is implemented for the system presented in Figure 1. The Battery
simulation involves the utilization of PI gains that have been
optimized through the proposed algorithm. Optimized gains Nominal voltage 500 V
by the proposed algorithm and various algorithms from the Rated capacity 1000 Ah
literature are presented in Table 2. Three cases are consid- Grid 11 kV, 50 Hz
ered to check the efficacy of the optimized PI gains by the
proposed algorithm: reference active and reactive power
change, irradiance and wind speed variation, and isolation
of PV and wind generation systems. and reactive power supplied to the load by the PV-wind-
Case 1: Reference Active and Reactive Power change. battery system. Figure 17 specifics the active and reactive
In this case, dynamic changes in active and reactive power powers provided by the grid. Notably, between 8 and
references (P ref and Q ref ) are examined over specific time 12 s, any excess power generated by the PV-wind-battery
intervals. These references are adjusted as follows: from system, beyond what is needed by the load, is absorbed
0 to 4 s, P ref is set to 300 kW and Q ref to 250 kVAR; from by the grid. The generated power by the PV and wind
4 to 8 s, then increased to 400 kW and 350 kVAR; sources is presented in Figure 18. With an irradiance of
from 8 to 12 s, a further increase is observed to 600 kW 1000 w/m2 generated power from PV is 143.6 kW and with
and 550 kVAR; from 12 to 16 s, a reduction to 350 kW a wind speed of 12 m/s generated power from the wind gen-
and 300 kVAR occurs, and from 16 to 20 s, stabilize at eration system is 145.25 kW. Simultaneously, Figure 19
300 kW and 200 kVAR. The connected load remains con- illustrates the DC link voltage of the DC bus before the
stant at 500 kW and 400 kVAR. Additionally, the environ- DC–AC converter. The efficiency of DC link voltage track-
mental inputs for the PV system include an irradiance of ing is compared between the proposed algorithm and previ-
1000 W/m2 and a temperature of 35 °C, while the wind ous algorithms in Figures 20 and 21, specifically during the
speed input for the wind generation system is set at time intervals 0–1 s and 3–6 s. To numerically quantify the
12 m/s. The comparison in tracking efficiency of the micro- comparison, Table 3 provides metrics such as rise time,
grid, employing optimized Proportional-Integral (PI) con- peak overshoot, settling time, and steady-state error for
troller gains through Enhanced Randomized Harris Hawk DC bus voltage, active power, and reactive power. Table 4
Optimization (ERHHO) and other algorithms (MCABC, presents performance indices, including Integral Absolute
TLBO-EO, SMO, ARA, CB, and ZN), is depicted in Error (IAE), Integral Square Error (ISE), Integral Time
Figure 12. For a more detailed examination, Figures 13 Absolute Error (ITAE), and Integral Time Squared Error
and 14 offer better visualization of the injected active and (ITSE). IAE is the cumulative absolute error over time,
reactive powers by the microgrid between 0 to 1 s and and it signifies the response speed and oscillations during
11.6 to 13 s, respectively. Figure 16 provides the active stability conditions. IAE is 0.0204, 0.0176 and 0.0179 for
The Author(s): Science and Technology for Energy Transition 79, 45 (2024) 15
Figure 12. Active and reactive power provided by PV-WIND and battery system.
DC voltage regulation, active and reactive power respec- aim to offer a comprehensive understanding of the micro-
tively. Compared to its nearest optimization algorithm, grid’s performance under varying conditions and the effi-
the proposed algorithm achieved 40–60% of less IAE indi- cacy of the ERHHO algorithm in optimizing PI controller
cating improved performance. ISE quantifies the cumula- gains (Figure 15).
tive squared error over time, and it provides a balance Figures 13 and 14 provide clearer visualizations of
between overshoot and settling time. ISE is 0.0109, 0.0113 injected active and reactive powers during critical time
and 0.0111 for DC voltage regulation, active and reactive intervals. ERHHO ensures more precise and stable power
power respectively. ITSE integrates the absolute error mul- injection, contributing to enhanced overall microgrid
tiplied by time over time and this value defines the Balance performance. In Figure 16, ERHHO optimally manages
between response speed and error magnitude. ITSE is the active and reactive power supplied to the load by the
0.0042, 0.002, and 0.0024 for DC voltage regulation, active PV-wind-battery system, as well as the interaction with
and reactive power respectively. ITAE integrates the abso- the grid. Notably, between 8 and 12 s, ERHHO effectively
lute error multiplied by time and it emphasizes minimizing regulates excess power, demonstrating improved control
error during transient response. ITAE is 0.000092, 0.00008 over power flow and grid interaction compared to other
and 0.000081 for DC voltage regulation, active and reactive algorithms. Figures 19, 20, and 21 showcase the superior
power respectively. This detailed analysis and comparison performance of ERHHO in maintaining stable DC link
16 The Author(s): Science and Technology for Energy Transition 79, 45 (2024)
Figure 13. Active and reactive power provided by PV-WIND and battery system from 0 to 1 s.
Figure 14. Active and reactive power provided by PV-WIND and battery system from 11.6 to 13 s.
voltage. Particularly during critical time intervals (0–1 s existing optimization algorithms. It provides enhanced
and 3–6 s), ERHHO ensures precise tracking, minimizing tracking efficiency, more stable power injection, improved
deviations and outperforming alternative algorithms. regulation of load power supply and grid interaction, and
Table 3 provides numerical metrics, including rise time, superior stability in DC link voltage. The quantitative
peak overshoot, settling time, and steady-state error for comparisons further validate ERHHO’s effectiveness in
DC bus voltage, active power, and reactive power. ERHHO optimizing the microgrid’s control system for various
consistently yields better results across these metrics operational scenarios.
compared to the other optimization algorithms. Table 4 Case 2: In this case, the effectiveness of optimized
highlights the performance indices, including Integral Proportional-Integral (PI) gains in ensuring continuous
Absolute Error (IAE), Integral Square Error (ISE), Integral power supply to the load is investigated by considering
Time Absolute Error (ITAE), and Integral Time Squared alterations in irradiance and wind speed. The changes in
Error (ITSE). ERHHO excels in minimizing these perfor- irradiance are detailed as follows: from 0 to 3.5 s, it is
mance indices, indicating superior optimization in terms 400 W/m2; from 3.5–7 s, it increases to 600 W/m2; from
of system response and stability. The proposed ERHHO 7 to 10.5 s, it further rises to 800 W/m2; from 10.5 to
algorithm demonstrates notable advancements in optimiz- 14 s, it peaks at 1000 W/m2; from 14 to 17.5 s, it decreases
ing PI controller gains for the microgrid compared to to 750 W/m2, and from 17.5 s onward, it stabilizes at
The Author(s): Science and Technology for Energy Transition 79, 45 (2024) 17
Figure 15. Active and reactive power provided by PV-WIND and battery system with proposed ERHHO.
Figure 16. Load active and reactive power. Figure 17. Grid active and reactive power.
550 W/m2. Simultaneously, the wind speed experiences 600 W/m2, again increased to 120.3 kW when irradiance is
variations: from 0 to 3 s, it is 9 m/s; from 3 to 8 s, it 800 W/m2, and 143.6 kW when irradiance is 1000 W/m2.
increases to 11 m/s; from 8 to 12 s, it further rises to The wind generation system generates the powers of
12 m/s; from 12 to 17 s, it peaks at 13 m/s, and from 109.1 kW, 133.3 kW, 145.4 kW and 157.52 kW when wind
17 s onward, it decreases back to 9 m/s. this variation of speed is 9 m/s, 11 m/s, 12 m/s and 13 m/s respectively.
irradiance and wind speed is presented in Figure 22. Figure 24 provides a comprehensive overview of the refer-
Figure 23 illustrates the corresponding changes in generated ence and actual active and reactive powers injected by
power from the Photovoltaic (PV) and wind sources. For the PV-wind-battery system. Reference active and reactive
irradiance of 400 W/m2 generated power from PV is powers are reduced to 100 kW and 50 kVAR between
59.84 kW, it increased to 90.27 kW when irradiance is 12 and 16 s. Consequently, the injected powers by the
18 The Author(s): Science and Technology for Energy Transition 79, 45 (2024)
The Author(s): Science and Technology for Energy Transition 79, 45 (2024)
MCABC 0.0406 5.0580 0.1197 0.6778 0.0406 4.7707 0.1174 0.1679 0.0381 4.0156 0.1066 0.0401
TLBO-EO 0.0425 5.9083 0.1311 0.7117 0.0363 3.0116 0.0942 0.1687 0.0291 7.9938 0.0932 0.0452
SMO 0.0355 11.4332 0.1235 0.6947 0.0638 0.8024 0.1024 0.1696 0.0417 2.1603 0.0964 0.0413
ARA 0.0423 4.7517 0.1277 0.7625 0.0294 8.0050 0.0941 0.1669 0.0281 9.6522 0.0928 0.0479
CB 0.0456 8.7447 0.1482 0.8133 0.0373 4.7931 0.1075 0.1770 0.0334 8.5389 0.1068 0.0485
Ziegler 0.0607 39.9643 0.7925 0.8756 0.1147 31.1323 0.9171 0.1801 0.1148 31.1441 0.9193 0.0623
Nicholas
Table 4. Comparison of performance indices between proposed algorithm and previous algorithms from literature.
Algorithm DC bus voltage Active power Reactive power
IAE ISE ITAE ITSE IAE ISE ITAE ITSE IAE ISE ITAE ITSE
Proposed ERHHO 0.0204 0.0109 0.0042 0.000092 0.0176 0.0113 0.002 0.00008 0.0179 0.0111 0.0024 0.000081
MCABC 0.0363 0.0181 0.0086 0.00028 0.0347 0.0224 0.0026 0.00032 0.0326 0.0209 0.0028 0.00028
TLBO-EO 0.0387 0.0192 0.0092 0.00032 0.03 0.0195 0.0024 0.00024 0.0286 0.0178 0.0027 0.00020
SMO 0.0386 0.0183 0.0091 0.0003 0.0452 0.0296 0.0031 0.00057 0.0332 0.0215 0.0029 0.00029
ARA 0.0381 0.0188 0.0097 0.0003 0.0285 0.0179 0.0024 0.00020 0.0287 0.0176 0.0028 0.00020
CB 0.0450 0.0219 0.0107 0.00042 0.0321 0.0208 0.0025 0.00027 0.0324 0.0202 0.0029 0.00026
Ziegler Nicholas 0.1174 0.0479 0.0259 0.0036 0.1771 0.0903 0.0385 0.0080 0.1771 0.0903 0.0386 0.0085
19
20 The Author(s): Science and Technology for Energy Transition 79, 45 (2024)
References
Figure 30. Battery terminal power and SOC.
1 Sen S., Kumar V. (2018) Microgrid control: A comprehensive
survey, Annu. Rev. Control 45, 118–151.
8 Conclusion 2 Chaudhary G., et al. (2021) Review of energy storage and
energy management system control strategies in microgrids,
This paper presents a novel and effective approach to Energies 14, 16, 4929.
enhance the control strategies of microgrids, specifically 3 Muqeet H.A., et al. (2022) Sustainable solutions for
focusing on the integration of renewable energy sources advanced energy management system of campus microgrids:
22 The Author(s): Science and Technology for Energy Transition 79, 45 (2024)
Model opportunities and future challenges, Sensors 22, 6, 20 Chun Y., Hua X. (2023) Improved sine cosine algorithm for
2345. optimization problems based on self-adaptive weight and
4 Hossain Md.A., et al. (2019) Evolution of microgrids with social strategy, IEEE Access.
converter-interfaced generations: Challenges and opportuni- 21 Alsoul M., et al. (2023) A new efficient hybrid approach for
ties, Int. J. Electr. Power Energy Syst. 109, 160–186. machine learning-based firefly optimization, Iraqi J. Sci.
5 Haseeb J., et al. (2021) Optimal energy management of a 4600–4612.
campus microgrid considering financial and economic anal- 22 Patel C., Malakar T., Sreejith S. (2023) Assessment of
ysis with demand response strategies, Energies 2021, 14, converter performance in hybrid AC–DC power system
8501. under optimal power flow with minimum number of DC
6 Bin L., et al. (2022) Scheduling and sizing of campus link control variables, Energies 16, 15, 5800.
microgrid considering demand response and economic anal- 23 Thiruvenkadam S., Kim H.-J., Ra I.-H. (2020) Hybrid fuzzy
ysis, Sensors 22, 16, 6150. and flower pollination optimization algorithm for optimal
7 Elnady A., et al. (2022) A comprehensive review of centralized dispatch of generating units in the existence of electric
current/power control schemes for parallel inverters and AC vehicles, in2020 6th International Conference on Advanced
microgrids, IEEE Access 10, 125061–125085. Computing and Communication Systems (ICACCS), IEEE.
8 Kim H., et al. (2019) Direct energy trading of microgrids in 24 Alweshah M., et al. (2020) Flower pollination algorithm for
distribution energy market, IEEE Trans. Power Syst. 35, 1, solving classification problems, Int. J. Adv. Soft Comput.
639–651. Appl. 12, 1, 15–34.
9 Farzin H., et al. (2017) A market mechanism to quantify 25 Singh N., Kaur J. (2021) Hybridizing sine–cosine algorithm
emergency energy transactions value in a multi-microgrid with harmony search strategy for optimization design
system, IEEE Trans. Sustain. Energy 10, 1, 426–437. problems, Soft Comput. 25, 16, 11053–11075.
10 Jumani T.A., et al. (2019) Optimal power flow controller for 26 Dashtaki A.A., et al. (2023) Optimal management algorithm
grid-connected microgrids using grasshopper optimization of microgrid connected to the distribution network consid-
algorithm, Electronics 8, 1, 111. ering renewable energy system uncertainties, Int. J. Electr.
11 Jumani T.A., et al. (2020) Swarm intelligence-based optimiza- Power Energy Syst. 145, 108633.
tion techniques for dynamic response and power quality 27 Fahim K.E., et al. (2023) A state-of-the-art review on
enhancement of AC microgrids: A comprehensive review, optimization methods and techniques for economic load
IEEE Access 8, 75986–76001. dispatch with photovoltaic systems: Progress, challenges,
12 Vishal V., et al. (2014) Online PI controller tuning for a and recommendations, Sustainability 15, 15, 11837.
nonlinear plant using genetic algorithm. In: 2014 Innovative 28 Wang Y., et al. (2023) Adaptive chimp optimization
Applications of Computational Intelligence on Power, Energy algorithm with chaotic map for global numerical optimiza-
and Controls with their impact on Humanity (CIPECH), tion problems, J. Supercomput. 79, 6, 6507–6537.
IEEE. 29 Lawley S.D. (2023) Extreme statistics of superdiffusive Lévy
13 Abdolrasol Maher G.M., et al. (2022) Optimal PI controller flights and every other Lévy subordinate Brownian motion,
based PSO optimization for PV inverter using SPWM J. Nonlinear Sci. 33, 4, 53.
techniques, Energy Rep. 8, 1003–1011. 30 Zamee M.A., Han D., Won D. (2023) Integrated grid
14 Ramasamy V., et al. (2023) A comprehensive review on forming-grid following inverter fractional order controller
Advanced Process Control of cement kiln process with the based on Monte Carlo artificial Bee Colony optimization,
focus on MPC tuning strategies, J. Process Control 121, 85– Energy Rep. 9, 57–72.
102. 31 Sayed E.A., et al. (2023) Enhancement of PV performance
15 Jia L.Y., et al. (2023) A weighted-sum chaotic sparrow by using hybrid TLBO-EO optimization, Ain Shams Eng. J.
search algorithm for interdisciplinary feature selection and 14, 3, 101892.
data classification, Sci. Rep. 13, 1, 14061. 32 Abid S., et al. (2023) Development of slime mold optimizer
16 Al-Betar M.A., et al. (2023) Economic load dispatch using with application for tuning cascaded PD-PI controller to
memetic sine cosine algorithm, J. Ambient Intell. Human. enhance frequency stability in power systems, Mathematics
Comput. 14, 9, 11685–11713. 11, 8, 1796.
17 Gupta S., Rong S. (2023) Diversity-enhanced modified sine 33 El-Sehiemy R., et al. (2023) Proportional-integral-derivative
cosine algorithm and its application in solving engineering controller based-artificial rabbits algorithm for load frequency
design problems, J. Comput. Sci. 72, 102105. control in multi-area power systems, Fractal Fract. 7, 1, 97.
18 Pham V.H.S., Nguyen Dang N.T., Nguyen V.N. (2023) 34 Hussien A.M., et al. (2022) Coot bird algorithms-based
Hybrid sine cosine algorithm with integrated roulette wheel tuning PI controller for optimal microgrid autonomous
selection and opposition-based learning for engineering operation, IEEE Access 10, 6442–6458.
optimization problems, Int. J. Comput. Intell. Syst. 16, 1, 35 Huba M., et al. (2021) Making the PI and PID controller
171. tuning inspired by Ziegler and Nichols precise and reliable,
19 Mousa A.A., El-Shorbagy M.A., Farag M.A. (2020) Steady- Sensors 21, 18, 6157.
state sine cosine genetic algorithm based chaotic search for 36 Song M., et al. (2022) Modified harris hawks optimization
nonlinear programming and engineering applications, IEEE algorithm with exploration factor and random walk strategy,
Access 8, 212036–212054. Comput. Intell. Neurosci.