Optimal Sizing of Hybrid Energy System Using Random Exploratory Search-Centred Harris Hawks Optimizer with Improved Exploitation Capability

Department of Electronics and Communication Engineering, Bhagat Phool Singh Mahila Vishwavidyalaya, Khanpur Kalan, Sonipat 131305, India School of Electronics and Electrical Engineering, Lovely Professional University, Phagwara, Punjab 144402, India Schulich School of Engineering, University of Calgary, Alberta, Canada Department of Electrical Engineering, College of Engineering, Qassim University, Buraydah 52571, Qassim, Saudi Arabia Department of Electrical Engineering, Delhi Technological University, Delhi 10042, India Department of Electrical and Power Engineering, College of Engineering and Technology, Mbeya University of Science and Technology (MUST), 131 Mbeya, Tanzania


Introduction
Reliable and sustainable power generation plays a vital role in the power sector and economy of any nation, particularly developing countries like India. Furthermore, the sustainable power sector is necessary for the survival of modern society in terms of improving socio-economic growth, increasing comfort levels, and essential services for humanity like health care and sanitation. It has been stated that the shortage of energy that is ubiquitous in many developing nations, particularly in India, is heavily indicative of poor socio-economic development. is is often prevalent in rural areas of the country. In this regard, renewable energy resources (RER) are becoming popular around the world for various reasons, like depleting conventional sources of energy, environmental concerns, etc. Furthermore, RER will provide versatility in the power sector [1][2][3].
RER offers several advantages, but they also have some drawbacks. e fundamental downside of these resources, particularly wind and solar, is that they are unpredictable and intermittent. e most viable response to this challenge is a hybrid energy system (HES), which is a system that combines multiple RER to improve system efficiency and energy balance in off-grid or grid-linked scenarios [4][5][6]. Because solar irradiation and wind speed are affected by weather conditions, off-grid solar or wind-based HES typically require a storage device like a battery as well as a backup supply. Despite the benefits of HES, the current cost of these systems limits their widespread implementation. As a result, significant attempts are being made to lower the cost of HES through optimal design, particularly optimal component sizing [7][8][9][10][11], and a few of them are outlined in the forthcoming paragraphs.
Sen and Bhattacharyya have proposed the best HES involving RER such as solar photovoltaic (SPV), bio-diesel, wind, and small-scale hydropower to serve Palari village's electricity needs in Chhattisgarh, India. A comparison of offgrid and grid extension was made by employing hybrid optimization of multiple energy resources (HOMER). In terms of cost-effectiveness and environmental sustainability, the off-grid HES was shown to be more acceptable [12]. Khan et al. used HOMER to investigate several configurations of the SPV/wind/diesel generator (DG)/battery HES for communication applications in Punjab, India. e SPV/ wind/DG/battery HES was found to be the most economical, with the lowest cost of energy (CoE) across several configurations [13]. Dhass and Harikrishnan examined the HES of SPV/wind/biomass for rural electrification in terms of life cycle cost [14]. Ho et al. used RER containing solar and biomass resources to create a self-sustaining tiny town. A mixed-integer linear programming-based approach has been created to design HESs [15]. Garrido et al. applied HOMER to analyse the performance of a SPV/biomass HES in Nampula, Mozambique, using cashew shell as a fuel source. It was revealed that the proposed system had a lower CoE than the SPV-DG and the traditional DG. e proposed system had a CoE of $0.33/kWh [16]. Sharafi and Mekkawy employed particle swarm optimization (PSO) for optimising HES, including the wind turbine, SPV panel, DG, fuel cell (FC), battery, electrolyser, and hydrogen tank. An approach based on e-constraint was used to reduce the total cost of the system, fuel emissions, and unmet load. A sensitivity analysis has been performed to assess the sensitivity of the outcomes to the input parameters. e total cost of the system is more affected by the amount of CO 2 that can be released than by other factors [17]. Optimal sizing of a grid-linked SPV/wind/DG/battery HES has been carried out by Ogunjuyigbe et al. using a genetic algorithm (GA) to meet the demand for electricity in a residential building. In this work, the multiobjective problem is addressed using two objectives: life cycle cost and emissions. Several configurations of system components were examined, and it was found that the configuration SPV/ wind/DG/battery is the most suitable for supplying the load [18]. Nadjemi et al. proposed an optimal design of gridconnected HES using SPV, wind and battery using the cuckoo search (CS) approach. e multiobjective problem is addressed according to the cost and environmental objectives. It is revealed that the price of electricity has a massive effect on reducing costs [19]. Eteiba et al. have explored the feasibility of renewable energy-based HES of SPV/biomass/ battery bank to generate a small village's needed electricity. Four specific metaheuristic methods have been used to achieve optimum sizing. It has been found that, among the other examined algorithms, the firefly algorithm (FA) achieved the minimum execution time with the greatest performance [20]. Sufyan et al. also proposed FA for optimising an isolated microgrid's economic scheduling and battery capacity. e proposed method was also compared with artificial bee colony (ABC), harmony search (HS), and PSO and observed to have a 50% decline in operating cost [21].
Khiareddine et al. performed the techno-economic analysis of an off-grid system consisting of SPV, wind, and hydrogen with battery. Achieved results show the significant role of integrating RER in minimising the cost of the system. It has also been revealed that the utilisation of hydrogen chain increases the life of the battery [22]. Jamshidi and Askarzadeh carried out the multiobjective design of HES using SPV, FC, and DG to electrify the off-grid community in the existence of load, operating reserve, and solar energy inconsistencies. e multiobjective crow search algorithm (MOCSA) was applied to minimise the system cost and loss of power supply probability (LPSP). e influence of various parameters, such as cost of FC system equipment, fuel price, and cost of emissions, on the sizing results was explored. It is observed that integrating hydrogen energy technology decreases the system cost [23]. Jiang et al. proposed a strategy for energy management and sizing of the system components for hybrid power systems using FC, battery, and supercapacitor. To achieve the goal, algorithms have been proposed for achieving it at a cost. It is observed that optimal strategies greatly minimise energy consumption along with battery and FC deterioration [24].
To optimise the size of an off-grid HES consisting of a collection of SPVs, FC, and DG, as well as electrolyzers and hydrogen tanks, Ghaffaria and Askarzadeh devised an upgraded crow search algorithm (CSA). Total net present cost (NPC) was considered as a prime function minimised by the constraints of renewable energy penetration and LPSP. It has been observed that the CSAadaptive-AP provides more accurate results than the original CSA, PSO, and GA [25]. Tong et al. applied the salp swarm algorithm (SSA) to optimise the size of grid-linked HES associated with a pumped-storage system. Various configurations of HES have been examined and found to be the optimal solution. e results revealed that the power exchange with the grid can be minimised by HES [26]. Sanjay et al. used the PSO and biogeography-based optimization (BBO) to optimise the size of HES both with and without the load shifting procedure.
e HES, which consists of SPV, microhydro (MHP), and storage batteries, is thought to meet the needs of distant populations in India's western Himalayas. e accuracy and utility of the proposed method were demonstrated by testing the outcomes of these algorithms with HOMER [27].
Alturki et al. were the first to use the supply-demandbased optimization (SDO) approach to tackle the challenge of designing an ideal HES with SPV, wind turbines, batteries, and DGs to meet the load requirements of an off-grid community in Saudi Arabia.
ree HES situations were investigated in this study, and the most effective option was discovered in terms of maximising HES reliability while lowering costs. In addition, the GA, PSO, grey wolf optimization (GWO), big-bang-big-crunch (BBBC) algorithm, flower pollination algorithm (FPA), and grasshopper optimization algorithm (GOA) were used to make a comparison in order to assess the performance of the SDO approach for the optimal design issue with the goal of optimising dependability while lowering costs. e optimization results show that the suggested SDO method outperforms other algorithms in terms of performance [28]. Alturki and Awwad built and optimised a stand-alone SPV/wind turbine/biomass/pump hydrostorage HES based on technoeconomic and environmental criteria to meet electrical load demand while minimising CoE. e whale optimization algorithm (WOA), PSO, and FA, are three distinct optimization techniques proposed in this work for sizing and decreasing the CoE. e results of these algorithms are compared to see which is the most efficient, and the one with the lowest CoE is picked using statistical analysis. According to the findings, the suggested SPV/wind turbine/biomass/ pump hydrostorage HES is both ecologically and economically feasible. Meanwhile, the findings showed that, when compared to other current systems, a pump-hydro energy storage system might enhance the use of RER [29].
A modified cuckoo search (MCS) optimization technique is proposed by Eltamaly and Alotaibi for sizing HES components in view of minimising the CoE and loss of load probability (LOLP). e suggested MCS is compared to ten benchmarking optimization approaches. According to the results of this study, the MCS is more accurate and takes less time to do than other systems [30]. Eltamaly et al. optimise a reverse osmosis desalination system powered by a RER to provide a source of pure water to Arar City, Saudi Arabia. Wind turbines, SPVs, batteries, and a water tank, as well as their control systems and power conditioners, are all included in the planned HES. For this problem, the bat algorithm (BA), PSO, and social mimic optimization (SMO) were employed as optimization strategies and compared. When compared to these optimization techniques, the results from the suggested system demonstrated the efficacy of using an RER for ingesting a reverse osmosis desalination power plant in Arar city, as well as the fact that the BA provides the most optimal results with the lowest execution time [31]. Eltamaly et al. use three distinct optimization strategies to size the HES depending on technological and economic goals using the unique demand response (DR) method. e results revealed that the BA is the quickest and also the most trustworthy way to find the lowest cost and best component size. It does this in just five iterations, whereas the PSO and SMO take eight and forty-five iterations, respectively [32].
According to the above listed literature, researchers applied either software tools or traditional optimization approaches for performance evaluation. However, as compared to other existing optimization methods, software tools have severe drawbacks, including single function minimization, inflexible, black box coding, and demand more computational effort. Several works in HESs, however, have been recognized, in which many researchers have offered various conventional and evolutionary strategies to achieve the optimal size of the components used in HESs. Many studies have been carried out by employing traditional methodologies like graphical construction, iterative, linear programming, and the trade off approach [33][34][35][36]. e dilemma with traditional methods is that they generally trap in local minima. Numerous metaheuristic evolutionary algorithms, such as the GA, PSO, HS, simulated annealing (SA), ant colony optimization (ACO), bacterial foraging algorithm (BFA), artificial bee swarm optimization (ABSO), mine blast algorithm (MBA), BBO, GWO, and others, have been deployed in various HESs to address these challenges. In recent years, a new trend has emerged in which investigators have begun to use metaheuristic evolutionary algorithms to determine the optimal sizing of HESs [37][38][39][40][41][42].
Optimization is a vast field of research and is progressing at a breakneck pace. Researchers are continuously working on a variety of problems, implementing various types of new optimization approaches on a lot of issues and are obtaining promising results. e work is lucrative because it allows you to see the most recent algorithms, as well as algorithms in hybrid form, to minimise any types of drawbacks in the present. Several innovative optimization approaches have been devised over the last few decades to increase system performance with multiple motives. e search strategy, which comprises intensification (exploitation stage) and diversification (exploration stage), is a common element of these metaheuristics algorithms. Local minima stagnation, on the other hand, is a key flaw in these heuristic methods, culminating in premature convergence.
A Harris hawk's optimizer (HHO) metaheuristics search method invented by Heidari et al. has the ability to seek the maxima as well as minima in a global region [43]. However, due to its weak exploitation capacity, the basic HHO algorithm's local search is slow and has a sluggish convergence rate. e exploitation stage of HHO has been improved in the present work by developing a hybrid version of the HHO using the random exploratory search (RES) algorithm, which is called the hybrid Harris hawk's random exploratory search algorithm (hHHO-RES).
HHO's key feature is that it uses four tactics to imitate collective hunting: encircling, surprise pouch, and soft and harsh besiege. HHO is a rapid, simple, and effective approach for solving complicated optimization problems such as continuous, discrete, and unconstrained and constraint issues. e main benefits of HHO are its ease of use, capacity to safely escape local minima stasis, better performance, operational flexibility, and ease of adaptation [44,45]. However, there are some limitations to HHO that go along with all of these benefits. e risk of being caught in local minima while tackling optimization-related problems in large multimodal as well as composition optimization issues, failure to maintain a healthy balance between local and global search, and feeble performance in multidimensional problems are the significant drawbacks.
is is in conformity with the results of Heidari et al. [43], who found that HHO performs poorly in a few multimodal as well as unimodal benchmark functions under certain conditions. Nonetheless, because no single strategy is enough to solve all types of optimization-related problems, the No Free Lunch theorem leads to additional refinement and improvements. Multiple HHO variants have been devised by researchers in a short period of time and have found wide applications in tackling optimization-related problems in a variety of disciplines, including engineering design, drug design, manufacturing problems, image segmentation, pattern recognition, networking, and power quality. Several new HHO optimizer variations have been developed recently. ese hybrid variations are used to handle a variety of optimization-related problems, including both global and numerical optimization. One of the hybrid forms of HHO is the intensified Harris hawk's optimizer (IHHO) [46], which is utilised to tackle many sorts of interdisciplinary engineering design challenges. e HHO-IGWO optimizer is a version of the HHO optimizer. It has been evaluated on CEC2005 benchmarks [47], and quasireflected HHO is used to solve optimization problems throughout the global search area [48]. In addition, the dynamic HHO in combination with the mutation mechanism [49] is taken into account to tackle optimization-related challenges in a variety of domains.
It has been revealed from the literature that the conventional HHO has poor exploration search capability and lacks exploration of local search space [43]. us, to step up the global search process of the current HHO and to keep the local search space, the devised algorithm in the present work aims to boost the exploitation process of the current optimizer. Taking into account the efficacy of metaheuristics algorithms and the limitations of conventional HHO, the hybrid version of the HHO is therefore developed using the random exploratory search (RES) algorithm and is called the hybrid Harris hawk's random exploratory search (hHHO-RES) algorithm. e aim of the present work is to provide a new approach based on a nature-inspired hybrid optimization technique, hHHO-RES.
e key idea of the proposed optimization approach is inspired by the cooperative natural behaviour of the brainiest birds, called Harris hawk's, who escape or resist the nature of their prey (rabbits). e proposed approach is validated for various well-known standard benchmarks, namely, unimodal, multimodal, and fixed dimensions, and also compared with existing optimization approaches. ereafter, it is used for the optimal sizing and development of HES, which would be able to provide rural areas with electricity where grid supply is rarely available. Depending on the availability of RERs, multiple models of grid-extension and off-grid modes have been chosen to electrify the selected areas. Consequently, the size of selected models of HES is obtained using the newly developed hHHO-RES algorithm, which finds the optimal one for the selected region. Moreover, the obtained results are compared with the PSO and HS approaches and found to be more accurate.

Study Area Description
In this paper, the study area includes 533 families from the community of villages located in Sonipat, Haryana, India, which is geographically situated at 77.02°E and 28.98°N coordinates [50]. Owing to temperature fluctuations throughout the year having an impact on energy consumption, three seasons of four months each have been considered in the present study. e summer season (SS) runs from April to July. e moderate season (MS) involves August to November, while December to March encompasses the winter season (WS). e study area's daily energy requirements during the SS, MS, and WS were estimated at 2997.58 kWh/day, 2357.98 kWh/day, and 1286.149 kWh/ day, respectively. e annual energy requirement for the selected site is computed as 809002.4 kWh/year. Furthermore, based on the data obtained, the potential of RER like solar irradiation, biogas, and biomass has been evaluated. e mean solar irradiation of this area has been measured to be 5.26 kWh/m 2 /day. e identified region has been calculated to have 820.24 m 3 /day of biogas through cattle dung and 470.19 of biomass in tons/year via crop residues.

Model of HES Components
e present work focuses on the optimum design of the HES that integrates the energies of a set of SPV panels, biomass, and biogas, as shown in Figure 1. In order to design and size HES, each component must be formulated mathematically. erefore, the mathematical expressions are outlined as follows.

SPV.
e actual power output of SPV (P SP (t)) is determined as [5] In the above equation, the rated capacity of the SPV panel under standard operating conditions (STC) is defined by S RP ; SPV panel loss factor is indicated by L P ; solar irradiation is defined by Q H (t); solar irradiation is represented by Q S under STC; SPV cell temperature is marked by T Cl ; SPV cell temperature is denoted by T TC under STC; and χ defines temperature coefficient.

Biomass Generator.
e biomass generator power output at hour t (P BMS (t)) is calculated as [51] where C BM denotes calorific value of biomass; A BM indicates biomass availability; η MS defines biomass system conversion efficiency; and H OM is the number of biomass generator operational hours per day.

Biogas.
e biogas generator power output (P BGS (t)) is evaluated using the following equation [5]: where C BG describes calorific value of biogas; A BG is biogas availability in a day; η GS defines overall efficiency of converting biogas to electricity generation; and H OG is biogas generator operational hours in a day.

Battery.
e battery runs in one of two states: charging or discharging, depending on the amount of energy produced and consumed. In the charging state, the amount of electricity generated by RER exceeds the amount of electricity required by the hourly load demand. During the discharging stage, on the other hand, the hourly load demand exceeds the amount of electricity generated by RER. e battery capacity at hour t has been calculated using (4)-(7) when the battery is in the charging and discharging states [51]: where E d Bt (t) signifies the amount of energy stored in the battery. In this equation, E d ESPS (t), E EBGS (t), and E EBMS (t) represent the excess energy generated by SPV, biogas, and biomass generator, respectively, after fulfilling the electrical load demand and η CH indicates the battery charging efficiency.
where c is the self-discharging rate in view of battery at hour t; E ND (t) defines total electrical energy demand; η DCH and η INV represents discharging efficiency of battery and inverter efficiency, respectively; E NTDM (t) denotes energy demand not met out by RER; and E DMD (t) is hourly load demand.
3.5. Grid. In grid-connected HES, the grid may operate in two modes. In the first mode, it can supply deficit electricity to HES in case RER, along with the battery, is not able to meet the demand. Mathematically, grid energy purchased can be modelled as [51] where E PG (t) denotes the energy purchased grid and E Btmin is minimum battery storage capacity.
where E SG (t) symbolizes the additional energy required, which must be sold to the grid. e term E Btmax refers to the maximum battery storage capability.

Optimization Framework
e framework for optimization leads to the formulation of the objective function with constraints. e objective Mathematical Problems in Engineering function has been perceived to be to minimise the total NPC of the HES. e formulated objective function is optimised for the design of HES underneath the constraints of battery storage capability limits, lower and upper boundaries, and unmet load.

Objective Function.
e total NPC has been used as an economic indicator for HES sizing. It consists of all expenditures that arise over the system's life span, including net present capital cost (C NV ), operation and maintenance (O&M) cost (OM NV ), replacement cost (RP NV ), fuel cost (F NV ), cost of electricity purchased through the utility grid (C PG ), and generated revenue in terms of salvage value (SV NV ) and selling electricity price to the power grid (C SG ) represented by the following equation: In the above (11), the number of SPV panel and battery are indicated by N SP and N Bt , respectively; e power of the individual SPV panel is symbolized by P pnl . e power output of biogas, biomass generator, and inverter are denoted by P BGS , P BMS, and P INV , respectively. e initial cost in view of SPV panel, biogas generator, biomass generator, inverter and battery is represented by Ψ SP, Ψ BG, Ψ BM, Ψ INV , and Ψ Bt , respectively.

OM NV .
OM NV of HES comprises the total O&M costs of each and every component over the course of the year and has been determined by (12) as [51] e yearly O&M costs of SPV panel, battery, and inverter are designated by ϖ SP , ϖ Bt , and ϖ INV , respectively. e biogas and biomass generators' annual fixed O&M costs are denoted by ϖ FBG and ϖ FBM , respectively, while the variable O&M costs of the same generators are indicated by ϖ VBG and ϖ VBM , respectively. e biomass and biogas generator yearly working power is represented by the symbols P W ABM and P W ABG in the above equation. An escalation rate of HES components is ζ. Interest rate and project lifespan are defined by R and μ, respectively.

RP NV .
is present research discusses the lifespan of SPV, biomass, and biogas, which are considered the project life (25 years). As a result, there is no requirement for replacing these components, and the cost to replace these components is not factored into the NPC calculation. However, the battery and inverter lifespans are chosen as five and ten years, respectively, which is lower than the project life (25 years). Hence, the battery and inverter need to be replaced four and two times, respectively, in the whole lifetime of the project, and extra investment because of replacement cost is required that can be evaluated as 10,15,20 4.1.4. F NV . In the considered system, fuels contain crop residues (biomass) and cattle dung (biogas) that have been utilised in the biomass and biogas generators, respectively. For this reason, F NV has been determined by considering the cost of biomass and cattle dung and is expressed by [51] In the above stated (14), the biomass and biogas fuel cost is denoted by ξ BM and ξ BG , respectively. e annual biomass and biogas demands are represented by F BMR and F BGR , respectively. 4.1.5. SV NV . SV NV includes the resale value of HES components after the project lifecycle and has been computed using the following equation: e resale price of each component of HES is denoted by ε SP, ε BM, ε BG, ε Bt , and ε INV , respectively. Inflation rate is symbolized by λ in the above equation.

C PG and C SG .
In the grid-connected mode, C PG and C SG have been calculated using the (16) and (17) as follows [51]: where θ S and θ P indicates the cost per unit of selling and buying power to and from the power grid. Finally, the cost of energy (CoE) is evaluated as e capital recovery factor is denoted by C RS in the above equation and can be calculated using the following equation:

Design Constraints.
In the present research, the selected objective function has been optimised under constraints described as follows.

HES Component Limits.
In the present research, the size of the SPV panel, battery, biomass, and biogas generator may vary to fulfil the demand of the load. Hence, the generator limits of system components can be defined as

Battery Storage Capacity Boundaries.
For running a battery in a safer mode, the lower and upper boundaries of the battery storage system are considered and described as 4.5. Unmet Load. Unmet load has been considered as being one of the constraints under this work. It is interpreted as the unserved load divided by the total load in one year and is estimated as [5] unmet load � t�8760 t�1 Unserved load in one year total load in one year .

Proposed Methodology: hHHO-RES Optimizer
e HHO is inspired by the Harris Hawk bird. e Harris Hawks are sophisticated raptors that can be seen in Mexico and the United States. Hawks used to hunt in groups to ensure their survival. e hunting procedure entails their natural capacity to communicate among group members in order to encircle and attack with a huge number of soft and hard besiegement. If the target manages to flee throughout this procedure, the hawks will regroup and launch another attack. In the meantime, each hawk may switch spots.
Finally, the tired victim runs out of energy and is attacked by the hawks. e seized prey is divided evenly among the members of the group. If there is any leftover food, the hawks carry it to their nest for the young hawks [52]. In this procedure, each matching approach has a probability based on the locations of the family associates and the prey, which is usually a rabbit. Despite a reasonable convergence rate, HHO struggles to locate the best optimal solution. us, to improve the exploitation phase and to avoid local optima, it needs to be upgraded with a RES optimizer. So, in the suggested research, the RES algorithm is used to make the hybrid variation of HHO, which is called the hybrid Harris hawks random exploratory search (hHHO-RES) algorithm.
In the present work, first, the HHO mechanism and its appliances are considered. Firstly, consider the normal strategy of hunting for Harris hawks, i.e., hawks identify the prey (rabbits) and then track the rabbit using their eyes. e hawks' eyes are dominant, through which the rabbit cannot easily realise the strategy. Furthermore, the behaviour of the Harris hawk bird in terms of four main strategies is described as follows [46].

Cooperative Behaviour and Chasing Style of Harris Hawks.
e first tactic refers to the Harris hawks' hunting style. Hawks use this method to find and follow their prey, and the victim is not aware of it.

Nature Inspired including Soft Encircle with Hard Encircle of Harris Hawks.
After spotting the victim, the hawks' natural instinct is to launch a surprise assault. After that, the prey tries to flee the situation. As a result, there are a variety of hunting and evasion strategies for the recognized target that can be used in real-life circumstances. e mathematical representations of these tactics are shown underneath. After locating the target in the first stage, Harris hawks use soft and hard encircles to attack the prey in any situation. A variety of soft and hard ways are used by the hawks to get close to their prey, depending on the animal's evasion skills and energy level.

Advanced Fast Dives: Soft Encircle of Harris Hawks.
is procedure employs the levy flight (here abbreviated as L F in (32)) concept. e movements of the leapfrog and the escape pattern of the prey are depicted mathematically using this approach. is method makes it simple to detect the prey's current activities and escape patterns. e main movements of the detected prey's escaping nature are zigzagged in this technique. Harris hawks make quick dives around the prey they have found and then try to move and change their positions to match the prey's directions and escape moves.

Advanced Fast Dives: Hard Encircle of Harris Hawks.
In this situation, the identified prey lacks adequate energy to flee, so the Harris hawks' hard encircle tactic is interpreted before attacking the detected prey. Hawks try to get closer to their prey at this point.
Based on the behaviour of Harris hawks, the mathematical equations are formulated. e equal coincidental chance for every strategy of balance is based upon the position of additional family members who are nearer to them. For the attacking time and here, the rabbit is considered as prey, which is shown by (23). As such, a consideration where a <0.5 for balancing strategy to maintain the random position is shown by (24), where a ≥0.5 and the average position of hawks can be calculated from (25).
where S 1 , S 2 , S 3 , and S 4 lie in the range of 0 and 1, which is improved for each iteration. HH (iteration +1) is signified as the rabbit's location and HH rand is denoted as random number of Harris hawks bird. N is taken as the entire number of the hawks. e escape performance reduces rabbit energy. us, the equation constructed based on the performance of the energy of the rabbit is as follows: where ER is the escaping energy of a rabbit, ER 0 is the preliminary state of the energy, and iteration max is denoted as the maximum number of iterations.
where J is taken as indication parameter.
From the above equations, the alteration between the number of iterations constructed upon the present locations and the vector constructed upon that location of the victim prey, i.e., rabbit, is defined. e levy strategy, L F (d) conception, is applied to HHO optimization, which helps us to comprehend the scientific model of the strategy for leapfrog arrangements as well as the patterns of escaping the rabbit or fleeing prey.
where d � dimension of the problem and Z S � random vector is by size 1xd. us, for superior performance in the phase of the soft encircle, the hawk bird can choose their subsequent movement, i.e., P. Here, P is based on a rule given in the (30). Based on the L F (d) pattern, it established to follow the specified rule in the where ϑ, σ are signified as such kinds of values are random in manner in between (0, 1) and β is denoted as default constant which is taken as 1.5.
In the hHHO-RES algorithm, the position vector HH(iteration + 1) is disturbed by Δ i and new position vector HH[(iteration + 1) + Δ i ] and HH[(iteration + 1) − Δ i ] has been obtained. e variation of the parameter Δ i is considered randomly within the local search space for exploiting the search space in a better way.
Fitness resolution f + ←f[HH(iteration + 1) + Δ i ] and f − ←f[HH(iteration + 1) − Δ i ] is considered with earlier fitness resolution f←f[HH(iteration + 1)], and ultimate fitness is estimated taking minimum values using equation erefore, counting all, real as well as the ultimate approach for upgrading the real position of hawks for soft encircle can be accomplished through (34) and (35) as P � HH rabit (iteration) − ER × abs J * HH rabit (iteration) − HH m (iteration),

Mathematical Problems in Engineering
where HH m (iteration) can take from (25).
To solve the optimization problem, some constants and parameters are needed. e required parameters are added in the proposed work are, such as scaling parameter and crossover probability will be within 0.5, inertia factor will be 0.2, teaching factor is 1,0, convergence constant is [0,0] and spiral factor is [-1,-1], loudness is 0.5, pulse rate is 0.5, and frequency parameter including minimum and maximum frequency is taken as 0 and 2, respectively; probability switch must be 0.8. Habitat modification probability is 1, immigration probability limit is [0.1], mutation probability is taken as 0.005, and step size is taken as 1.
Further, the algorithm steps for hHHO-RES optimizer are as follows: Step 1: initialize the inputs, size of the population is considered as N and max. Number of iterations is iteration max .
Step 2: need to find the best position of the prey, i.e., rabbit and the fitness value and initialization of random population HH i (i � 1, 2, 3, . . . , N).
Step 3: while (iteration < iteration max ), design of the fitness value for Harris hawks and the parameter set as HH rabbit the best location of the prey, i.e., rabbit.
Step 4: for each Harris hawks (HH i ).
Step 5: do update energy at the primary condition ER O .
Step 8: if (s ≥ 0.5) and |ER| ≥ 0.5 then soft encircle occurred Input: size of the population is considered as N and max. Number of iterations is iteration max Output: the position of prey, i.e. rabbit &fitness value Initialization of random population HH i (i � 1, 2, 3, . . . , N) While (iteration < iteration max ) Design of the fitness value used for hawks bird Parameter set as HH rabbit for the best location of rabbit (prey) for each hawks bird, i.e., (HH i ) Do update energy at primary condition ER O If |ER| ≥ 1, then Position vector updated using ER � 2 × ER 0 ×(1 − iteration/iteration max ), i.e., phase of exploration else if a ≥ 0.5 then HH(iteration + 1) � HH rand (iteration) − s 1 × abs(HH rand (iteration) − 2 × s 2 × HH(iteration)) else if a < 0.5 then HH(iteration
Step 12: end all loops.
Step 14: the variation of the parameter Δ i is considered randomly within the local search space for exploiting the search space in a better way.
Step 16: end the process. e flowchart along with the pseudocode for the proposed hHHO-RES is demonstrated in Figure 2 and algorithm 1, respectively.

Test Systems
A well-studied set of different variations of standard benchmarks [53,54] is considered to verify the effectiveness of the suggested hHHO-RES optimizer. e standard benchmarks are composed of three types of major functions, i.e., unimodal, multimodal, and fixed dimension functions. Each standard benchmark has its own mathematical expressions, which are mentioned in Table 1 e total number of iterations is taken as 500 for this research work. the suggested hHHO-RES optimizer has been developed, and it was tested upon Intel ® Core TM, i7-5600 cpu@2.60 GHz.

Result and Discussion
In this research work, firstly, hHHO-RES, a new hybrid metaheuristics optimization approach, is developed to handle the problem of sizing HES components while reducing cost and For statistical analysis, the me maximising reliability. To demonstrate the effectiveness of the proposed optimization approach, it is initially tested on standard benchmark functions. en, the performance of the suggested optimizer has also compared to that of other existing optimization approaches such as fast evolutionary programming (FEP), gravitational search algorithm (GSA), GA, GWO, CS, binary dragonfly algorithm (BDA), dragonfly algorithm (DA), FPA, ant lion optimizer (ALO), GOA, multiverse optimizer (MVO), WOA, binary gravitational search algorithm (BGSA), (SSA), Binary particle swarm optimization (BPSO), states of matter search (SMS), HHO, differential evolution (DE), sine-cosine  algorithm (SCA), moth flame optimization (MFO). ereafter, the hHHO-RES is used to optimise the sizing and design of HES, including various RER, in order to meet the energy demand of the chosen area. In this case, different models of off-grid and grid-connected HES were looked at, and the best one has been found. With a view to validate the findings, the HS and PSO algorithms have also been used to get optimization results for the selected HES models.

Testing of Benchmark Functions.
e proposed hHHO-RES is tested for standard benchmark functions such as unimodal F 1 to F 7 , multimodal F 8 to F 13 , and benchmark  Tables 4-6.
For statistical analysis, the mean value, SD, median value, and best and worst values have been taken into consideration. From Table 4, it reveals that the mean value of each unimodal function is near zero, which shows it matches the null hypothesis. Furthermore, it is found that the mean value for F 1 is 1.79672E − 95, which is better than F 2 to F 7 . Furthermore, Table 5 shows the statistical analysis of multimodal standard benchmarks. ese functions start from F 8 to F 13 . e dimensions and range of each benchmark are different as shown in Table 2. As for some functions, the ranges are between − ve and for some benchmarks, they are  [54] GSA [55] GA [56] GWO [57] CS [58] Differential evolution (DE) [69] Sine-cosine algorithm (SCA) [  between +ve values. So, the outputs of some benchmarks are negative, while few are positive in nature. For F 9 and F 11 , the proposed optimizer is performing perfectly as the output is 0, which accepts its null hypothesis. Furthermore, the statistical analysis of fixed-dimension functions is given in Table 6. e range of F 16 is in − ve, so the output of the benchmarks F 16 , F 20 , F 21 , F 22 , and F 23 is in − ve for mean value, best, worst value, and median value. e p value is one of the most important tests that approaches testing for hypothesis to calculate the probability of whether for that problem there is evidence to discard the null hypothesis. Also, the null hypothesis is identified as a conjecture that can initially claim a population as well as data-generating procedure. In the case of an alternative hypothesis, whether population parameters differ from the value of population parameters stated in that conjecture. In the case of practices, the significant levels are stated in advance to define the small number of p values that must be rejected as null hypothesis.
is is done because of the different researcher's usages of their different levels of significance when observing questions. Someone may sometimes face difficulties comparing the results or outcome from the groups of different kinds of tests. e p value helps to provide solutions to these types of problems. e null hypothesis and alternative hypothesis are the most commonly used hypothesis. From Tables 4-6, it is observed that the p value for unimodal and fixed dimension benchmarks is 1.7344E − 06 and for multimodal functions it is 1.7344E − 06 for F 8 , F 12 , and F 13 ; 1 for F 9 and F 11 ; and 4.32046E − 08 for F 10 , which successfully indicates its null hypothesis. Furthermore, in view of evaluating the performance, the proposed hHHO-RES is compared with the other existing optimizers in view of unimodal, multimodal, and fixed dimension functions and demonstrated in Tables 7-9. e mean value and the value of SD have been taken into consideration to make comparison with other optimization approaches.
While analysing the output of the proposed hHHO-RES optimizer in the case of unimodal functions, as shown in Table 7, it is clear that, in most cases, the proposed hHHO-RES optimizer outperforms the other existing optimizers. In the case of multimodal functions, as seen in Table 8, the output of hHHO-RES for standard functions F 9 , F 10 , F 11 , and F 12 surpasses the other optimizers since its output is 0, proving the null hypothesis. Furthermore, the parameter ranges for F 16 and F 20 to F 23 are all negative, resulting in the output also being negative, as illustrated in Table 9. In a nutshell, it is experimentally revealed that the output of the suggested hHHO-RES performs better than other existing       [72]. optimizers in most cases. Furthermore, the simulation time for standard benchmark functions using hHHO-RES is presented in Table 10.

Optimal Sizing and Designing of HES for the Selected
Area. After successfully testing the performance of the proposed hHHO-RES in the present research, the optimal sizing and designing of HES, including various RER, were obtained for fulfilling the energy demand for the selected area because of minimising NPC. First of all, three models of offgrid HES have been considered in the present study as follows: e proposed hHHO-RES algorithm has been applied to optimise the above-stated models. e optimization results for the same models of off-grid HES have also been obtained from HS and PSO algorithms to validate the results. Furthermore, the grid-linked SPV/biomass/biogas with battery model of HES has also been optimised using the same algorithms. Finally, the results obtained from the above-stated off-grid models were compared with the grid-linked model, and the most optimal solution was found. e optimization results have been obtained based on several techno-economic indices as listed in Table 11 [51]. Besides, the hourly electrical load demand, solar irradiation, and air temperature of the selected site have been shown in 72]. Also, biogenerators have been scheduled to operate at peak load hours during each season and are shown in Table 12. e annual real interest, escalation, and inflation rates are set at 0.11, 0.05, and 0.075, respectively. e hourly simulation for all the selected models has been performed in MATLAB for one year using hHHO-RES, HS, and PSO algorithms. e parameters of the hHHO-RES, HS, and PSO algorithms are set as follows: hHHO-RES: iteration (max) � 150, Run-30; HS: iteration (max) � 150; harmony memory size � 4; harmony memory consideration rate � 0.95; pitch adjustment rate � 0.1; maximum pitch adjustment rate � 1; minimum pitch adjustment rate � 0.1; PSO: m � 4, learning coefficient (L C1 , L C2 ) � 2, population size � 30, and iteration (max) � 150. e optimization results obtained after hourly    simulation for selected off-grid models along with their size are listed in Table 13. It is noticed from Table 13 that the proposed hHHO-RES algorithm gives the least NPC with the minimum CoE of model M 11. e hHHO-RES algorithm estimates 212.21 (903 no.s) kW SPV, 174 kW biomass, and 667.2 (278 no.) kWh of battery storage with an NPC of $7.81 * 10 5 that results from a CoE of 0.115 $/kWh. Furthermore, the optimization result obtained using the above-stated algorithms for grid-linked HES is illustrated in Table 14.
While comparing Tables 13 and 14, it is found that the grid-linked HES has the least NPC of $5.50 * 10 5 and a CoE of 0.076 $/kWh. Moreover, the grid-linked HES has the fewest batteries among the selected models of HES. Based on the acquired results, the grid-linked HES is proposed to be the most optimal solution for the selected area. e optimum size of the proposed system components is found as the biogas and biomass generators of 11 kW and 56 kW, respectively, the SPV system of 235 kW with a battery storage of 26.4 kWh, and the converter of 100 kW. It is also inferred that the performance of the proposed algorithm is better in     comparison with HS and PSO. Furthermore, in Table 15, several other parameters are also measured and compared, and it is apparent that hHHO-RES performs better. Likewise, the PSO, HS, and hHHO-RES convergence curve for NPC is graphed in Figure 6. While carefully examining the results of all algorithms, it is observed that the hHHO-RES converges completely and gives the optimal solution before 10 iterations. However, HS and PSO are given constant values after 140 iterations. Furthermore, the significant parameters related to the suggested grid-connected HES are analysed and demonstrated in the following paragraphs. e share of each RER in yearly electricity generation by the proposed HES is given in Figure 7. It reveals that the maximum share of electricity generation comes from SPV panels of 450500 kWh/year, followed by biomass and biogas of 127325 kWh/year and 15830 kWh/year, respectively. e costwise bifurcation of NPC in view of different types of costs and revenues is shown in Table 16.
It is revealed that the purchasing cost of electricity is the highest of all. Also, the bifurcation of NPC in view of system components is presented in Figure 8 and found that biomass has the maximum share of 55% compared to SPV, converter, biogas, and battery of 21%, 10%, 9%, and 5%, respectively. e input and output power of the battery are estimated as 78011 kWh/year and 334450 kWh/year, respectively, in a year. Furthermore, the yearly electricity purchased and sold to the utility grid in each season is presented in Table 17.
It has been witnessed that the major electricity has been purchased in the SS due to higher demand. On the contrary, the grid purchases and sales are less in the WS as compared to other seasons due to less energy demand.

Conclusion
In this research, optimum design and sizing of RER based on HES for remote locations in Haryana state (India) has been carried out using a newly devised hHHO-RES algorithm. Various developed models are analysed and compared using the hHHO-RES algorithm in off-grid and grid-linked scenarios. e grid-linked model composed of SPV/biomass/biogas with battery has been proven to be the most optimum for the area of study. e optimum size of the HES in the grid scenario for the research area is determined based on simulation on hourly basis as 235 kW SPV array, 11 kW biogas, 56 kW biomass, a 26.4 kWh battery bank, and a 100 kW converter. e estimated total NPC and CoE are $5.50 * 105 and $0.076/kWh, respectively.
Furthermore, the exploitation phase of the existing HHO is upgraded effectively using the RES algorithm, and the developed algorithm (hHHO-RES) is tested for standard benchmarks. It is observed that the proposed hybrid optimizer approves its efficacy in the field of nature-inspired and metaheuristic algorithms.

Data Availability
Hourly load demand, biogas, and biomass related data have been collected locally. e solar irradiance and ambient temperature data have been collected from an open-source platforms.

Conflicts of Interest
e authors declare that they have no conflicts of interest.