# Optimal Sizing of a Hybrid Renewable Photovoltaic-Wind System-Based Microgrid Using Harris Hawk Optimizer

Authors: Abdullrahman A. Al-Shamma’a; Hassan M. Hussein Farh; Abdullah M. Noman; Abdullah M. Al-Shaalan; Abdulaziz Alkuhayli
Journal: International Journal of Photoenergy
 (2022)

---

## Abstract

Hybrid renewable energy microgrid has become an attractive solution to electrify urban areas. This research proposes a microgrid design problem including photovoltaic (PV) arrays, wind turbine, diesel, and batteries for which Harris hawk optimization (HHO), a metaheuristic technique, is applied. Based on a long-term techno-economic assessment, the HHO approach is used to determine the best hybrid microgrid size for a community in Saudi Arabia’s northern region. The efficacy of HHO is investigated, and its performance was compared with seven metaheuristic techniques, grasshopper optimization algorithm (GOA), cuckoo search optimizer (CSO), genetic algorithm (GA), Big Bang–Big Crunch (BBBC), coyote optimizer, crow search, and butterfly optimization algorithm (BOA), to attain the HRE microgrid optimal sizing based on annualized system cost (ASC) reduction. Some benchmarks (optimum and worst solutions, mean, median, standard deviation, and rate of convergence) are used to distinguish and analyze the performance of these eight metaheuristic-based approaches. The HHO surpassed the other seven metaheuristic techniques in achieving the best HRE microgrid solution with the lowest ASC (USD 149229.9) followed by GOA (USD 149380.5) and CSO (USD 149382.5). The findings revealed that the HHO, GOA, CSO, and coyote have acceptable performance in terms of capturing the global solution and the speed of convergence, with only minimal oscillations. The BBBC, crow search, GA, and BA, on the other hand, have unacceptably poor performance, trapping to the local solution, oscillations, and a long convergence time. In terms of optimal solution and convergence rate, the BBBC and GA both perform poorly when compared to the other metaheuristic techniques.


---

## Body

## 1. Introduction

Renewable energy is the energy generated from naturally renewed resources. Unlike conventional resources, renewable energy resources are nondepletable energy sources. Renewable and reliable energy supplies are required by the world since they are significantly cleaner and create energy without polluting the environment [1]. Wind turbine (WT) generators, solar photovoltaic (PV), geothermal, biomass, and other renewable energy sources exist. Aside from their benefits like environmental friendliness and sustainability, wind and solar PV became increasingly popular because of lower production costs and increased applications for both commercial and residential [2]. These sources of power can be used independently or in combination to supply the utility grid with electrical power. Furthermore, renewable energy system-based microgrid is utilized to electrify remote locations that are not serviced by the utility grid. Owing to the unreliability and large size of employing a single source to supply electricity to remote sites, hybrid energy technologies have been intended to address these difficulties [3]. PVs, WTs, batteries, diesel generators, and fuel cells (FCs) are examples of hybrid renewable energy resources (HRERs). However, when renewable energy resources are employed to supply the off-grid sites with electricity, a challenge can be increased due to their nonlinear and erratic behavior [4]. Diminished reliability, control complexity, design considerations, instability, and lower energy are only a few of the challenges [5]. These problems are nonlinear and complicated optimization problems. The action of making the best or most effective use of HRERs with the least cost is known as optimization [6, 7].On hybrid renewable energy systems, a variety of optimization strategies are applied, including classical techniques and artificial intelligence (AI) techniques [8–10], hybrid techniques [11, 12], and software programs [13–15]. Analytical techniques [16, 17], graphical techniques [18, 19], statistics techniques [20], and numerical-based techniques [21] are examples of classical techniques. Although classical methods are straightforward, they have some constraints for defining the optimization issue. Graphical techniques, for example, rely on solar irradiance and wind speed information to estimate system sizing, which can lead to size issues (oversizing or undersizing) [22]. Analytical techniques are incapable of dealing with a lot of energy sources, and they take longer to compute than AI algorithms. On the other hand, other optimization algorithms like AI, hybrid computing, and software programs do not have the same constraints as classical techniques and can effectively tackle the optimization problems. The researchers are motivated to learn more about technical and economic feasibility difficulties by promoting more use of HRERs to supply the off-grid and on-grid rural remote regions. The HOMER PRO software application in [13–15] was used to conduct a techno-economic analysis. In [13], the authors investigated, assessed, and designed a technical and economic viability of solar PV-diesel-batteries for electrifying a town in Pakistan. Their approach makes use of the national grid’s time-constrained availability. The HOMER PRO software tool was used to estimate the system optimal size and assess its techno-economic viability. According to the findings of this study, grid-integrated systems have a lower Cost of Energy (COE) than off-grid systems. The study in [14] used HOMER software program for remodeling and refinancing a rural microgrid on a Thai island. The system was designed to offer the lowest COE. In Benin, a research was conducted to look into the powering of rural villages; the hybrid PV-diesel-batteries was proven to be the most cost-effective [15].The appropriate HRER sizing is unavoidable since oversizing increases the initial cost while undersizing reduces the shared power from the HRERs and, as a result, reduces system reliability. The use of AI approaches to size HRERs optimally has recently piqued the interest of most experts across the world. Some research examined single-objective models, whereas others investigated multiobjective models [8] [23–25]. To lower the annual cost of a hybrid PV-WT-battery system, the authors utilized a model based on a fuzzy logic [23]. The sizing of storage energy systems in renewable energy networks was optimized using a genetic algorithm (GA) in [8], limiting expected energy not supplied and power losses (PL). In [24], this study proposed an effective sizing technique for the component of the hybrid photovoltaic-WT-battery system according to GA and combined with an energy management strategy. The economic model/predictive control technique [26] was used to develop an energy management technique. The authors in [25] proposed a quasisteady operating approach combined with GA to achieve the best size of a PV-pump storage hydroelectric system according to both the loss of power supply probability (LPSP) and investment cost. In [27], a MATLAB framework for optimal size of a wind-hydro system based on lower COE and CO2 emissions was developed. In order to reduce the total net present value, the authors implemented a model based on a mixed-integer linear programming modeling framework for attaining technical and economic optimum design of PV and energy storage systems [28]. The authors in [29] employed Particle Swarm Optimization (PSO) to design the best PV-WT-battery system according to reducing the total annual cost (TAC). Based on net present cost (NPC) minimization, GA was employed to address a multiobjective sizing issue for a PV-WT-battery-solar collector [30]. In [9], the authors modified a cuckoo search optimizer (CSO) for sizing PV-battery, WT-battery, and PV-WT-battery systems with the purpose of lowering overall system costs. The results revealed that the CSO generates higher-quality solutions and is faster to convergence than the PSO and GA approaches. The Pareto evolutionary algorithm was used by the authors in [31] to reduce the LCOE and CO2 life cycle emissions (LCE) for a WT-PV-diesel-battery system. The PV-biogas-pump storage-battery system was designed using the Water Cycle Algorithm (WSA) and Moth-Flame Optimization (MFO) in [32]. The MFO approach and the WSA are assessed and compared to the GA. The differential evolution (DE) was combined with a fuzzy control by the authors in [33] to optimize the design of a PV-WT-diesel-hydrogen-battery system according to the least cost, emission, and unmet load. The authors in [34] proposed an improved Fruit Fly Optimizer (FFO) for designing a hybrid PV-WT-diesel-battery system with the lowest pollutant emission and TAC. The line-up competition algorithm was used in [35] to build an optimal PV-WT-diesel-battery system that minimized TAC and emissions of CO2. In [36], the author used Grey Wolf Optimization (GWO) to determine the best size for a photovoltaic-WT-biomass system while reducing the TNPC and LPSP. The GWO method’s results were compared to those of the GA and Simulated Annealing (SA) methods, demonstrating that the GWO method is superior. For attaining optimal sizing of the PV-WT-battery system, a hybrid Big Bang–Big Crunch (BBBC) was proposed in [37]. To identify the appropriate size for a PV-WT system by reducing the TAC, the authors of [38] employed an Ant Colony Optimization (ACO) algorithm. The authors of [39] applied a hybrid optimizer technique using two well-known metaheuristics: SA and Tabu Search to attain the best size of a small self-contained PV-WT-diesel-biodiesel generator-FC-battery power system to minimize the system’s COE. The equilibrium optimizer performed well compared to bat optimizer, and Black Hole (BH) optimization was applied to size the energy systems a microgrid of a photovoltaic with FCs and battery storage energy systems to minimize the COE [40]. In [41], the best size of a PV/WT/battery/diesel microgrid has been attained using Bonobo optimization algorithm based on ASC reduction. The optimal sizing of a microgrid consisting of PV/WT/battery/diesel while satisfying the LPSP and REF reliability measures was achieved by using an artificial ecosystem-based optimization algorithm [42]. In [43], a modified African vulture optimizer (IAVO) is proposed to identify the optimal configuration for a HRERs. The structure is composed of fuel cell, WT, and PV and its auxiliaries that include the electrolyzer and the storage system. The main target is to find the optimal configuration to minimize the LPSP and TNPC. In [44], a new optimization algorithm called converged krill herd (CKH) has been proposed for optimal size of a HRERs including battery and fuel cell to supply the driving force of a locomotive. The main goal is to minimize the total cost of the system while dealing with various constraints such as the battery capacity constraint and the fuel cell state-of-charge limit.Based on the previous literature, this article was considered an early attempt to apply the Harris hawk optimization (HHO) technique to tackle the optimal design optimization problem in standalone microgrid. The HHO is applied to a highly constrained objective function that considers several important constraints, including power balancing, generation power capacities, LPSP, and renewable energy fraction (REF) restrictions. The effectiveness of applied HHO was investigated, and its performance was compared to that of seven metaheuristic techniques: grasshopper optimization algorithm (GOA), CSO [9], BBBC [37], coyote [45], crow search [46], GA [8], and butterfly optimization algorithm (BOA) [47] to achieve HRE microgrid optimal sizing with a quick convergence rate and the lowest annualized system cost (ASC). To empirically evaluate this, the following research questions were formulated: Does any algorithm perform significantly better than others for solving the optimal sizing problem? Is there any dependency between algorithm used and the initial population? Some benchmarks are used to distinguish and analyze the performance of these metaheuristic-based techniques. The HHO outperformed the other seven metaheuristic techniques in achieving the best HRE microgrid solution, with the lowest ASC (USD 149229.9) followed by GOA (USD 149380.5) and CSO (USD 149382.5), respectively. The proposed HHO technique could be useful for a wide range of optimization challenges in the power and energy industries. According to the findings, the HHO, GOA, CSO, and coyote have appropriate global solution capture and convergence rates with low oscillations. The BBBC, crow search, GA, and BA, on the other hand, perform poorly, with trapping to the local solution, oscillations, and a long convergence time. The BBBC and GA both perform poorly in terms of optimal solution and convergence rate when compared to other metaheuristic approaches.The remainder of the paper is organized as follows. The PV, WT, battery, and diesel generators are all mathematically modelled in Section2. The objective function and constraints of the problem formulation are presented in Section 3. The proposed HHO technique is discussed in Section 4. Section 5 includes the simulation results as well as discussions. The article is finally concluded in Section 6.


## 2. Proposed Hybrid Photovoltaic-Wind Energy Microgrid

The proposed microgrid configuration is shown in Figure1. WT and PV arrays are the system’s principal energy sources. The AC bus bar is connected to the WTs and diesel generator, while the DC bus bar is interconnected to the PV arrays and battery banks. The bidirectional DC/AC converter serves as both an inverter and a rectification bridge, converting DC to AC power and AC to DC power. When renewable generation sources cannot fully meet the load, the battery banks are used to provide backup power. Diesel generators serve as a backup power source when neither the WTs nor the PV arrays can generate output power, and the batteries are depleted. The load to be supplied is assessed using real-world data collected in an isolated community named Al-Sulaymaniyah (within Arar region in Saudi Arabia), where the load is currently served by diesel generator units. The optimization trend tries to reduce the planned proposed hybrid microgrid net present cost (NPC).Figure 1
Configuration of the proposed PV-WT-diesel-battery microgrid.The NPC can be estimated using the following formula:(1)NPC=ASC1+iYproj−1i1+iYproj,where i is the interest rate per year and Yproj is the lifetime of the project.The annualized cost of each unit is equivalent to the annualized costs of its capital investment (Cacap), as well as its annualized operating and maintenance cost (Camain) and annualized replacement costs (Carep) as shown in the following equation [48]:
(2)ASC=Cacap+Carep+Camain.The capital cost can be expressed as in the following form:(3)Cacap=Cren.+CBatt+CDGi1+iYproj1+iYproj−1,whereCren. is the renewable capital costs, CBatt is the battery capital costs, and CDG is the capital costs of the diesel generator.The mathematical modelling for each of the microgrid components used in this study is described in the subsections below.


### 2.1. Modeling of the PV Array

The PV array’s output power is determined by incident solar radiation, temperature, and the PV array’s manufacturer’s data as follows [48]:
(4)PPV=PrfPVGT¯GT,STC¯1+αPTc−Tc,STC,where Pr is the nominal photovoltaic power. GT,STC¯ is the global photovoltaic irradiance under STCs. GT¯ is the global solar irradiance under normal conditions. Tc,STC is the PV temperature under STCs. Tc is the PV temperature under normal conditions. fPV is the derating coefficient. αP is the temperature coefficient of power.The PV’s steady-state temperature is calculated using the following equation [48]:
(5)Tc=Ta+NOCT−Ta,NOCT1−1.11ηMPP1−αPTc,STCGT¯/GT,NOCT1+1.11αPηMPP,STCNOCT−Ta,NOCTGT¯/GT,NOCT,where Ta is the PV ambient operating cell temperature. NOCT is the PV nominal operating cell temperature. Ta,NOCT is the PV ambient temperature under NOCT. GT,NOCT is the solar irradiance under NOCT. ηMPP,STC is the MPP efficiency of PV under STCs. ηMPP is the PV-MPP efficiency.


### 2.2. Modeling of the Wind Generator

The WTs’ output power is determined by the following equation:(6)PWTu=Pr×0,u<ucoru>uf,u2−uc2ur2−uc2,uc≤u≤ur,1,ur≤u≤uf,where Pr is WT rated power, uc is the starting speed, ur is the rated speed, and uf is the furling speed. The power generated by WT is dependent on four parameters: Pr, uc, ur, and uf as shown in Equation (6). The WT power curve based on a nonlinear model is shown in Figure 2. There is no power generated when the wind speed is less than uc or greater than uc. The WT generator starts to generate power once the wind speed becomes greater than uc and reaches to the rated power at the rated speed. The power generated from the WT becomes fixed at the rated power when the wind speed is greater than ur and less than uf.Figure 2
Power characteristic curve of a WT.


### 2.3. Modeling of the Battery Bank

All hybrid microgrids require some form of energy storage. This is attributed to the reason that renewable energy resources’ output power is uncertain due to their erratic and intermittent climatic conditions. The total amount of energy supplied determines the state of charge (SOC), which can be calculated by the following formula [49, 50]:
(7)SOCt=SOCt−11−σ+EGAt−ELtηinvηbattery,where σ is the rate of self-discharging; Et is the overall output power; ELt is the load demand; and ηinv and η are the inverter efficiency and battery’s charge efficiency, respectively. The SOC limit cannot be smaller than the battery’s minimum permitted level (SOCmin). The SOC cannot exceed the maximum allowable level (SOCmax) during a charging process. These SOC constraints can be expressed as follows:
(8)SOCt=SOCmin,SOCt<SOCmin,SOCtSOCmin<SOCt<SOCmax,SOCmaxSOCt>SOCmax.


### 2.4. Modeling of the Diesel Generator

A diesel generator performs the role of the tertiary source in a hybrid microgrid, eliminating the necessity for storing energy. As a result, it is crucial for regional and remote load systems to keep running. It also helps make the system more reliable and cost-effective. The diesel generator is primarily used during periods of peak demand and battery depletion due to its low efficiency load rate. Therefore, when constructing a hybrid microgrid, it is important to keep in mind that the diesel generator should not run under low load or at all. The annual fuel cost and power generated can be estimated using the following equation:(9)CDG=CF∑t=18760APDGt+BPR,where PDG and PR are the rated power and power generated of the diesel generator, respectively. The values of A and B in this investigation are 0.246 and 0.08415, respectively.


### 2.5. Energy Management Strategy

The proposed hybrid microgrid is regulated by the following conditions:(a)
PV and WT are the microgrid’s principal sources of power(b)
When the power generated from PV and WT surpasses the capacity demands, the batteries are charged. The excess power is discharged after the battery is fully charged. If the demand is more than the generated power from the renewable energy resources, the load that is not provided is met by the battery if its available energy is more than its minimum capacity(c)
As a last choice, a diesel generator is used, if(i)
the load shortage is less than the diesel generator’s minimum permitted power, diesel generator will serve at its minimum permissible power, and the excess power will be dumped(ii)
the load not supplied is delivered by the diesel generator if it is higher than the minimum permissible level and less than its nominal power. If the remaining load is higher than the nominal power, diesel generator will function at that power level, and the load not delivered will come from the battery if the storage capacity is sufficientBased on these conditions, Algorithm1 presents the appropriate energy management technique.Algorithm 1: Pseudocode of the proposed energy management algorithm.
IF energy generated Et is enough to supply load ELt, THENSupply the load and charge the battery if possibleELSEIF battery is charged (SOC>SOCmin), THENUse battery banks to supply the loadIF battery is not enough (SOC<SOCmin), THENRun diesel generator along with batteryENDELSERun diesel generator only to supply the loadENDEND


## 2.1. Modeling of the PV Array

The PV array’s output power is determined by incident solar radiation, temperature, and the PV array’s manufacturer’s data as follows [48]:
(4)PPV=PrfPVGT¯GT,STC¯1+αPTc−Tc,STC,where Pr is the nominal photovoltaic power. GT,STC¯ is the global photovoltaic irradiance under STCs. GT¯ is the global solar irradiance under normal conditions. Tc,STC is the PV temperature under STCs. Tc is the PV temperature under normal conditions. fPV is the derating coefficient. αP is the temperature coefficient of power.The PV’s steady-state temperature is calculated using the following equation [48]:
(5)Tc=Ta+NOCT−Ta,NOCT1−1.11ηMPP1−αPTc,STCGT¯/GT,NOCT1+1.11αPηMPP,STCNOCT−Ta,NOCTGT¯/GT,NOCT,where Ta is the PV ambient operating cell temperature. NOCT is the PV nominal operating cell temperature. Ta,NOCT is the PV ambient temperature under NOCT. GT,NOCT is the solar irradiance under NOCT. ηMPP,STC is the MPP efficiency of PV under STCs. ηMPP is the PV-MPP efficiency.


## 2.2. Modeling of the Wind Generator

The WTs’ output power is determined by the following equation:(6)PWTu=Pr×0,u<ucoru>uf,u2−uc2ur2−uc2,uc≤u≤ur,1,ur≤u≤uf,where Pr is WT rated power, uc is the starting speed, ur is the rated speed, and uf is the furling speed. The power generated by WT is dependent on four parameters: Pr, uc, ur, and uf as shown in Equation (6). The WT power curve based on a nonlinear model is shown in Figure 2. There is no power generated when the wind speed is less than uc or greater than uc. The WT generator starts to generate power once the wind speed becomes greater than uc and reaches to the rated power at the rated speed. The power generated from the WT becomes fixed at the rated power when the wind speed is greater than ur and less than uf.Figure 2
Power characteristic curve of a WT.


## 2.3. Modeling of the Battery Bank

All hybrid microgrids require some form of energy storage. This is attributed to the reason that renewable energy resources’ output power is uncertain due to their erratic and intermittent climatic conditions. The total amount of energy supplied determines the state of charge (SOC), which can be calculated by the following formula [49, 50]:
(7)SOCt=SOCt−11−σ+EGAt−ELtηinvηbattery,where σ is the rate of self-discharging; Et is the overall output power; ELt is the load demand; and ηinv and η are the inverter efficiency and battery’s charge efficiency, respectively. The SOC limit cannot be smaller than the battery’s minimum permitted level (SOCmin). The SOC cannot exceed the maximum allowable level (SOCmax) during a charging process. These SOC constraints can be expressed as follows:
(8)SOCt=SOCmin,SOCt<SOCmin,SOCtSOCmin<SOCt<SOCmax,SOCmaxSOCt>SOCmax.


## 2.4. Modeling of the Diesel Generator

A diesel generator performs the role of the tertiary source in a hybrid microgrid, eliminating the necessity for storing energy. As a result, it is crucial for regional and remote load systems to keep running. It also helps make the system more reliable and cost-effective. The diesel generator is primarily used during periods of peak demand and battery depletion due to its low efficiency load rate. Therefore, when constructing a hybrid microgrid, it is important to keep in mind that the diesel generator should not run under low load or at all. The annual fuel cost and power generated can be estimated using the following equation:(9)CDG=CF∑t=18760APDGt+BPR,where PDG and PR are the rated power and power generated of the diesel generator, respectively. The values of A and B in this investigation are 0.246 and 0.08415, respectively.


## 2.5. Energy Management Strategy

The proposed hybrid microgrid is regulated by the following conditions:(a)
PV and WT are the microgrid’s principal sources of power(b)
When the power generated from PV and WT surpasses the capacity demands, the batteries are charged. The excess power is discharged after the battery is fully charged. If the demand is more than the generated power from the renewable energy resources, the load that is not provided is met by the battery if its available energy is more than its minimum capacity(c)
As a last choice, a diesel generator is used, if(i)
the load shortage is less than the diesel generator’s minimum permitted power, diesel generator will serve at its minimum permissible power, and the excess power will be dumped(ii)
the load not supplied is delivered by the diesel generator if it is higher than the minimum permissible level and less than its nominal power. If the remaining load is higher than the nominal power, diesel generator will function at that power level, and the load not delivered will come from the battery if the storage capacity is sufficientBased on these conditions, Algorithm1 presents the appropriate energy management technique.Algorithm 1: Pseudocode of the proposed energy management algorithm.
IF energy generated Et is enough to supply load ELt, THENSupply the load and charge the battery if possibleELSEIF battery is charged (SOC>SOCmin), THENUse battery banks to supply the loadIF battery is not enough (SOC<SOCmin), THENRun diesel generator along with batteryENDELSERun diesel generator only to supply the loadENDEND


## 3. Problem Formulation

The objective of the microgrid optimization problem is to lower the ASC while maintaining a specific level of reliability, in this case LPSP. In this study, the best microgrid design has been defined as a constrained objective function:(10)minASCsubjectto:LPSP≤LPSPdesiredREF≤REFdesired0≤PPV≤PPV,max0≤PWT≤PWTG,max0≤PBatt≤PBatt,max0≤PDsl≤PDsl,maxwhere LPSPdesired and REFdesired are the reliability and REF levels selected by the user. The rated power of the PV, WT, and diesel generator (in kW) is represented by PPV, PWTG, and PDsl, respectively. The capacity of the battery bank is PBat (in kWh). The maximum rating of the PV, WTs, batteries, and diesel is represented by PPV,max, PWT,max, PBat,max, and PDiesel,max. The optimal values of the PV, WT, and nominal power of the diesel generator, as well as battery storage capacity, are determined based on the minimum ASC value as follows:
(11)x=PPV,PWT,PDiesel,PBat.


### 3.1. Modeling of LPSP

The LPSP is a vital aspect in establishing the microgrid’s successful reliability. The risk that the microgrid’s available power will be insufficient to fulfill the total demand level is specified as the LPSP. The following equation is a representation of the LPSP:(12)LPSP=∑t=0TPoweroutageTimeT.A LPSP value of zero means the load has always been delivered, whereas a value of one means the load will not be supplied. The duration of time during which a load demand is not met is known as the power outage time (POT).


### 3.2. Renewable Energy Fraction

The renewable energy fraction (REF) is a terminology that refers to the total amount of renewable energy delivered to load demand, as seen in the following equation [48]:
(13)REF=1−EdieselEL,served×100,where Ediesel is the total amount of power generated by diesel. A classical diesel generator system is equal to 0% of a REF, while a clean system is equal to 100% of a REF. The hybrid energy system is represented by the values ranging from 0% to 100%.


## 3.1. Modeling of LPSP

The LPSP is a vital aspect in establishing the microgrid’s successful reliability. The risk that the microgrid’s available power will be insufficient to fulfill the total demand level is specified as the LPSP. The following equation is a representation of the LPSP:(12)LPSP=∑t=0TPoweroutageTimeT.A LPSP value of zero means the load has always been delivered, whereas a value of one means the load will not be supplied. The duration of time during which a load demand is not met is known as the power outage time (POT).


## 3.2. Renewable Energy Fraction

The renewable energy fraction (REF) is a terminology that refers to the total amount of renewable energy delivered to load demand, as seen in the following equation [48]:
(13)REF=1−EdieselEL,served×100,where Ediesel is the total amount of power generated by diesel. A classical diesel generator system is equal to 0% of a REF, while a clean system is equal to 100% of a REF. The hybrid energy system is represented by the values ranging from 0% to 100%.


## 4. Harris Hawk Optimization Technique

The algorithm of HHO’s exploitative and exploratory technique is used to solve the hybrid microgrid optimal design [51], which is inspired by the Harris hawk’s aggressive attitude. Depending on the appropriate formulation problem, the HHO approach can be utilized to tackle a range of optimization problems. The various phases of HHO are depicted in Figure 3 [51], which are covered in the following subsections.Figure 3
The Harris hawk optimization phases.


### 4.1. Exploratory Phase

Harris’ hawks use their strong eyes to follow and detect prey; the prey may not always be easy to spot. As a result, the hawks wait, watch, and monitor the desert for long times in order to track a prey. The Harris’ hawks are candidate solutions, and the best solution in each phase is regarded the intended prey or nearly so. Harris’ hawks sit at random spots and wait for prey using one of two tactics. They roost in accordance with the positions of other members of the family and the rabbit, as represented in Equation (14) for q<0.5, or roost on tall trees at random within the range, as formulated in Equation (14) for q≥0.5 [51].
(14)Xt+1=Xrandt−r1Xrandt−2r2Xt,q≥0.5,Xrabbitt−Xmt−r3LB+r4UB−LB,q<0.5,where Xt+1 is the location of the hawks in the next iteration t. Xrabbitt is the location of the rabbit. Xt is the current location of the hawks, r1,r2,r3,r4. q is random numbers between 0,1. LB and UB are upper and lower boundaries. Xrandt is a random selection from the current population of hawks. Xm is the average position of hawks in the present population.


### 4.2. Exploitative Phase

The Harris hawks attack the targeted prey spotted in the prior phase in this phase, which is known as the surprise pounce. Preys, on the other hand, frequently strive to flee perilous situations. As a result, different chasing styles emerge in real-life settings. To represent the tackling stage, the HHO proposes four alternative techniques based on prey escaping performances and Harris’ hawk pursuit tactics. Preys are continually trying to flee from hazardous situations. Assume thatr is the probability of a prey successfully fleeing (r<0.5) or failing to flee (r≥0.5) before a surprise pounce. Hawks will engage in a harsh or soft besiege to capture the prey, regardless of what the prey does. It means they will surround the prey in a variety of ways, softly or forcefully, depending on how much energy the prey has saved. In actual life, the hawks go nearer and nearer to their selected prey to enhance their chances of hunting the rabbit collectively by conducting a surprise pounce. Short time after, the fleeing prey will gradually lose its energy, and the hawks will strengthen the besiege to easily catch the weary prey. The E parameter is used to model this strategy and allow the HHO to flip between soft and harsh besiege processes. When E≥0.5, the soft surround occurs, and when E<0.5, the hard surround occurs [51].


## 4.1. Exploratory Phase

Harris’ hawks use their strong eyes to follow and detect prey; the prey may not always be easy to spot. As a result, the hawks wait, watch, and monitor the desert for long times in order to track a prey. The Harris’ hawks are candidate solutions, and the best solution in each phase is regarded the intended prey or nearly so. Harris’ hawks sit at random spots and wait for prey using one of two tactics. They roost in accordance with the positions of other members of the family and the rabbit, as represented in Equation (14) for q<0.5, or roost on tall trees at random within the range, as formulated in Equation (14) for q≥0.5 [51].
(14)Xt+1=Xrandt−r1Xrandt−2r2Xt,q≥0.5,Xrabbitt−Xmt−r3LB+r4UB−LB,q<0.5,where Xt+1 is the location of the hawks in the next iteration t. Xrabbitt is the location of the rabbit. Xt is the current location of the hawks, r1,r2,r3,r4. q is random numbers between 0,1. LB and UB are upper and lower boundaries. Xrandt is a random selection from the current population of hawks. Xm is the average position of hawks in the present population.


## 4.2. Exploitative Phase

The Harris hawks attack the targeted prey spotted in the prior phase in this phase, which is known as the surprise pounce. Preys, on the other hand, frequently strive to flee perilous situations. As a result, different chasing styles emerge in real-life settings. To represent the tackling stage, the HHO proposes four alternative techniques based on prey escaping performances and Harris’ hawk pursuit tactics. Preys are continually trying to flee from hazardous situations. Assume thatr is the probability of a prey successfully fleeing (r<0.5) or failing to flee (r≥0.5) before a surprise pounce. Hawks will engage in a harsh or soft besiege to capture the prey, regardless of what the prey does. It means they will surround the prey in a variety of ways, softly or forcefully, depending on how much energy the prey has saved. In actual life, the hawks go nearer and nearer to their selected prey to enhance their chances of hunting the rabbit collectively by conducting a surprise pounce. Short time after, the fleeing prey will gradually lose its energy, and the hawks will strengthen the besiege to easily catch the weary prey. The E parameter is used to model this strategy and allow the HHO to flip between soft and harsh besiege processes. When E≥0.5, the soft surround occurs, and when E<0.5, the hard surround occurs [51].


## 5. Simulation Results and Discussions

The proposed Harris hawk optimization (HHO) technique is utilized to attain the best size for a hybrid microgrid system that comprises PV, WT, diesel, and batteries to provide electricity for Al Sulaymaniyah hamlet in Arar, Saudi Arabia. The HHO is compared to seven metaheuristic techniques: GOA, CSO, BBBC, coyote, crow search optimizer, genetic algorithm, and BOA to validate its performance. The optimization issue was implemented using MATLAB R2019b/64-bit/Windows 10 with 500 iterations and 50 runs for all eight metaheuristic-based techniques. In this investigation, the values of average hourly irradiance and wind speed have been used.Table1 shows the simulation findings of the HHO with seven recent metaheuristics for tackling the best size of the proposed HES microgrid with a 0% of LPSP in terms of the best solution, worst, average, and standard deviation (STDEV). According to these results, the HHO performed better than any of the other seven metaheuristics tested: GOA, CSO, BBBC, coyote, crow search, genetic algorithm, and BOA in achieving the best size of the HES microgrid with the lowest cost. This is obvious by looking at Figure 4, which compares the optimal ASC calculated using the HHO to the results obtained by employing seven other metaheuristic-based techniques. This figure proved the HHO efficacy to attain the optimal solution followed by GOA, CSO, and coyote.Table 1
Results of the HHO compared with seven metaheuristic optimization algorithms.
AlgorithmPerformance indicatorsPPV (kW)PWT (kW)PBat (kW)PDiesel (kW)ASC (USD/year)REF (%)HHOOptimal358.24361.80992.88224.93149229.986.30694Worst406.5051339.3375562.0104209.5526151348.582.46066Mean356.4754345.0759829.1315216.8645150209.884.1395STDEV39.1845546.1519220.74279.658326442.01911.652636GOAOptimal358.90362.95994.97223.15149380.586.36665Worst308.8779383.4638835.64216.0318150243.884.52918Mean357.2016362.815975.8187222.7259149488.786.15532STDEV12.374475.52934480.770563.248609193.82460.810537CSOOptimal358.87362.64995.87222.9514938273.76322Worst351.4298375.2112882.0394232.8948150037.799.06436Mean359.7846363.0136985.4449225.0616149538.684.39674STDEV2.7055165.2191920.499943.396348151.268310.83353BBBCOptimal397.85348.4923.9229.1150883.564.55Worst293.95434.951436.3248.06158884.570.52Mean372.75364.27844.21239.71154138.586.67STDEV72.1469.41293.677.452007.9910.379CoyoteOptimal359.59360.951000.00223.24149476.786.42048Worst338.064396.3999919.5867230.7491150348.786.34566Mean359.1265363.0383990.8932224.8782149741.280.31711STDEV4.1735897.04637713.623863.152154157.342916.49967CROWOptimal34140449921615161982.7Worst359405.8498.86221.715183383.05Mean341.8405.499.1121615164082.77STDEV4.572.930.39250.88450.770.098Genetic algorithm (GA)Optimal370.2311.510282111507285.2Worst496.3260.51356204.21547788.3Mean375.6346.9940.6219.115194585.6STDEV45.952.92161.421.4927.51.627BOAOptimal361.28373.70950.01227.34150236.463.31917Worst352.0645331.3051657.5377228.0661151968.861.28074Mean343.8703353.6341850.2741214.0609151130.566.92574STDEV26.358627.9817161.531111.46092422.10616.236738Figure 4
The optimal ASC utilizing HHO when compared to the other seven metaheuristic techniques.Figure4 reveals that crow search and BBBC have the lowest performance among the other metaheuristic-based techniques. Figure 5 depicts the optimum combination of the WT, PV, batteries, and diesel generator for each of the eight metaheuristic algorithms. This figure proves that the renewable energy (PV and WT) participates higher than the diesel where the diesel sizing is minimized, and the renewable sizing is increased as the diesel price increases. Figures 6(a) and 6(b) also illustrate the five-performance metrics that are employed to assess the performance of the eight techniques. Compared to the other seven optimization strategies, HHO has the best performance, whereas the BBBC and genetic algorithm have the worst performance based on these five-performance metrics, as shown in Figure 6. Furthermore, based on these five-performance metrics, it can be revealed that the four metaheuristic-based optimization techniques (HHO, GOA, CSO, and coyote) have an acceptable performance whereas the remaining four metaheuristic-based techniques (BBBC, crow search, genetic algorithm, and BOA) have poor performance. The BBBC has the worst performance compared to the other seven optimization techniques.Figure 5
The optimal PV, WT, diesel, and battery sizing of the metaheuristic algorithms.Figure 6
The five-performance metrics: (a) optimal, worst, median, and mean and (b) STDEV.
(a)(b)The convergence rate of all metaheuristic techniques: HHO, GOA, CSO, BBBC, coyote, crow search, genetic algorithm (GA), and BOA, is shown in Figure7. As demonstrated in this figure, the four metaheuristic-based techniques (HHO, GOA, CSO, and coyote) have a higher rate of convergence than the other four metaheuristic-based methods while tracking the global solution. This graph also demonstrates that BBBC and GA have the slowest convergence rates, which implies they might become stuck in a local solution and take a long time to achieve a steady state. This is because BBBC and GA both have a high STDEV. As a result, the best solutions are broadly distributed, and both techniques could end up with a local solution.Figure 7
Convergence rate of the HHO compared with the other optimization algorithms.The computational time required by each algorithm to obtain the optimum solution is depicted in Figure8. Although the BBBC, GROW, and GA were the quickest to discover the best solution in almost all experiment runs, one must bear in mind that these algorithms provided the worst findings. As shown in Figure 8, the HHO, GOA, and BOA algorithms have been shown to be nondominant. Although the HHO can find the best optimal solution compared to the seven algorithms, it needs improvement related to the reduction of the computational time. Figure 9 illustrates the ASC versus the run number for the HHO method compared with the other seven metaheuristic-based optimization approaches. The four metaheuristic-based approaches (HHO, GOA, CSO, and coyote) can abide the global solution and attain the optimal design of the HES microgrid with the lowest ASC, less oscillation, and quick convergence, while the four metaheuristic-based optimization approaches (BBBC, crow search, BOA, and genetic algorithm) may be trapped to the local solution and have clear oscillations, as shown in Figure 9. Furthermore, this graph indicates that both BBBC and genetic algorithm are unable to capture the global solution, resulting in noticeable steady-state oscillations.Figure 8
The computational time of the eight metaheuristic algorithms under consideration.Figure 9
The ASC vs. run number for metaheuristic algorithms.


## 6. Conclusions

The Harris hawk optimization (HHO) technique has been used to find out the best design for a HRE microgrid, which includes PV, WT, diesel, and batteries to provide electricity for Al Sulaymaniyah hamlet in Arar, Saudi Arabia. The HHO is compared to seven metaheuristic-based techniques for validation: GOA, CSO, BBBC, coyote, crow search, genetic algorithm, and BOA to achieve the best size of the HES microgrid based on minimizing the annualized system cost. To discern and assess the performance of these eight metaheuristic algorithms, five-performance benchmarks (optimal and worst solution, STDEV, mean, and median) are utilized. The HHO surpassed the other seven metaheuristic-based techniques: GOA, CSO, BBBC, coyote, crow search, genetic algorithm, and BOA, in achieving the best size of the HES microgrid with the lowest ASC (USD 149229.9) and convergence rate. The four metaheuristic-based techniques (HHO, GOA, CSO, and coyote) exhibit an acceptable performance in terms of global solution capture with fewer oscillations and convergence rate, whereas the four metaheuristic-based techniques (BBBC, crow search, genetic algorithm, and BOA) have poor and unacceptable performance, resulting in local solution trapping instead of global solution, obvious oscillations to find solution, and a high convergence rate. In terms of optimal solution and convergence rate, the BBBC and GA have bad performance in comparison to other metaheuristic-based optimization approaches. The reason behind this is that both BBBC and GA have a high standard deviation. The high standard deviation indicates that the best solutions are widely dispersed, and both techniques could end up with a local solution. Future work necessitates the improvement of the HHO to increase population diversity in the search space while decreasing consumption time.



---

*Source: 4825411-2022-06-23.xml*