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 longterm technoeconomic 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 metaheuristicbased 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.
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 systembased 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 offgrid 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 numericalbased 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 offgrid and ongrid rural remote regions. The HOMER PRO software application in [13–15] was used to conduct a technoeconomic analysis. In [13], the authors investigated, assessed, and designed a technical and economic viability of solar PVdieselbatteries for electrifying a town in Pakistan. Their approach makes use of the national grid’s timeconstrained availability. The HOMER PRO software tool was used to estimate the system optimal size and assess its technoeconomic viability. According to the findings of this study, gridintegrated systems have a lower Cost of Energy (COE) than offgrid 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 PVdieselbatteries was proven to be the most costeffective [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 singleobjective models, whereas others investigated multiobjective models [8] [23–25]. To lower the annual cost of a hybrid PVWTbattery 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 photovoltaicWTbattery 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 PVpump 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 windhydro system based on lower COE and CO_{2} emissions was developed. In order to reduce the total net present value, the authors implemented a model based on a mixedinteger 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 PVWTbattery 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 PVWTbatterysolar collector [30]. In [9], the authors modified a cuckoo search optimizer (CSO) for sizing PVbattery, WTbattery, and PVWTbattery systems with the purpose of lowering overall system costs. The results revealed that the CSO generates higherquality 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 CO_{2} life cycle emissions (LCE) for a WTPVdieselbattery system. The PVbiogaspump storagebattery system was designed using the Water Cycle Algorithm (WSA) and MothFlame 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 PVWTdieselhydrogenbattery 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 PVWTdieselbattery system with the lowest pollutant emission and TAC. The lineup competition algorithm was used in [35] to build an optimal PVWTdieselbattery system that minimized TAC and emissions of CO_{2}. In [36], the author used Grey Wolf Optimization (GWO) to determine the best size for a photovoltaicWTbiomass 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 PVWTbattery system, a hybrid Big Bang–Big Crunch (BBBC) was proposed in [37]. To identify the appropriate size for a PVWT 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 wellknown metaheuristics: SA and Tabu Search to attain the best size of a small selfcontained PVWTdieselbiodiesel generatorFCbattery 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 ecosystembased 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 stateofcharge 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 metaheuristicbased 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 Section 2. 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 PhotovoltaicWind Energy Microgrid
The proposed microgrid configuration is shown in Figure 1. 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 realworld data collected in an isolated community named AlSulaymaniyah (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).
The NPC can be estimated using the following formula: where is the interest rate per year and is the lifetime of the project.
The annualized cost of each unit is equivalent to the annualized costs of its capital investment (), as well as its annualized operating and maintenance cost () and annualized replacement costs () as shown in the following equation [48]:
The capital cost can be expressed as in the following form:
where is the renewable capital costs, is the battery capital costs, and 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]: where is the nominal photovoltaic power. is the global photovoltaic irradiance under STCs. is the global solar irradiance under normal conditions. is the PV temperature under STCs. is the PV temperature under normal conditions. is the derating coefficient. is the temperature coefficient of power.
The PV’s steadystate temperature is calculated using the following equation [48]: where is the PV ambient operating cell temperature. is the PV nominal operating cell temperature. is the PV ambient temperature under NOCT. is the solar irradiance under NOCT. is the MPP efficiency of PV under STCs. is the PVMPP efficiency.
2.2. Modeling of the Wind Generator
The WTs’ output power is determined by the following equation: where is WT rated power, is the starting speed, is the rated speed, and is the furling speed. The power generated by WT is dependent on four parameters: , , , and 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 or greater than . The WT generator starts to generate power once the wind speed becomes greater than 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 and less than .
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]: where is the rate of selfdischarging; is the overall output power; is the load demand; and and are the inverter efficiency and battery’s charge efficiency, respectively. The SOC limit cannot be smaller than the battery’s minimum permitted level (SOC_{min}). The SOC cannot exceed the maximum allowable level (SOC_{max}) during a charging process. These SOC constraints can be expressed as follows:
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 costeffective. 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: where and are the rated power and power generated of the diesel generator, respectively. The values of and 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 sufficient
Based on these conditions, Algorithm 1 presents the appropriate energy management technique.

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: where and 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 , , and , respectively. The capacity of the battery bank is (in kWh). The maximum rating of the PV, WTs, batteries, and diesel is represented by , , , and . 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:
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:
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]: where 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.
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 , or roost on tall trees at random within the range, as formulated in Equation (14) for [51]. where is the location of the hawks in the next iteration . is the location of the rabbit. is the current location of the hawks, . is random numbers between . LB and UB are upper and lower boundaries. is a random selection from the current population of hawks. 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 reallife 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 that is the probability of a prey successfully fleeing () or failing to flee () 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 parameter is used to model this strategy and allow the HHO to flip between soft and harsh besiege processes. When , the soft surround occurs, and when , 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/64bit/Windows 10 with 500 iterations and 50 runs for all eight metaheuristicbased techniques. In this investigation, the values of average hourly irradiance and wind speed have been used.
Table 1 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 metaheuristicbased techniques. This figure proved the HHO efficacy to attain the optimal solution followed by GOA, CSO, and coyote.
Figure 4 reveals that crow search and BBBC have the lowest performance among the other metaheuristicbased 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 fiveperformance 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 fiveperformance metrics, as shown in Figure 6. Furthermore, based on these fiveperformance metrics, it can be revealed that the four metaheuristicbased optimization techniques (HHO, GOA, CSO, and coyote) have an acceptable performance whereas the remaining four metaheuristicbased techniques (BBBC, crow search, genetic algorithm, and BOA) have poor performance. The BBBC has the worst performance compared to the other seven optimization techniques.
(a)
(b)
The convergence rate of all metaheuristic techniques: HHO, GOA, CSO, BBBC, coyote, crow search, genetic algorithm (GA), and BOA, is shown in Figure 7. As demonstrated in this figure, the four metaheuristicbased techniques (HHO, GOA, CSO, and coyote) have a higher rate of convergence than the other four metaheuristicbased 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.
The computational time required by each algorithm to obtain the optimum solution is depicted in Figure 8. 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 metaheuristicbased optimization approaches. The four metaheuristicbased 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 metaheuristicbased 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 steadystate oscillations.
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 metaheuristicbased 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, fiveperformance benchmarks (optimal and worst solution, STDEV, mean, and median) are utilized. The HHO surpassed the other seven metaheuristicbased 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 metaheuristicbased 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 metaheuristicbased 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 metaheuristicbased 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.
Data Availability
The data used to support the findings of this study are available from the corresponding author upon request.
Conflicts of Interest
The authors declare that they have no conflicts of interest.
Acknowledgments
The authors would like to acknowledge the Researchers Supporting Project number RSP2021/337, King Saud University, Riyadh, Saudi Arabia.