Development and Implementation of a Novel Optimization Algorithm for Reliable and Economic Grid-Independent Hybrid Power System

: Recently, fast uptake of renewable energy sources (RES) in the world has introduced new di ﬃ culties and challenges; one of the most important challenges is providing economic energy with high e ﬃ ciency and good quality. To reach this goal, many traditional and smart algorithms have been proposed and demonstrated their feasibility in obtaining the optimal solution. Therefore, this paper introduces an improved version of Bonobo Optimizer (BO) based on a quasi-oppositional method to solve the problem of designing a hybrid microgrid system including RES (photovoltaic (PV) panels, wind turbines (WT), and batteries) with diesel generators. A comparison between traditional BO, the Quasi-Oppositional BO (QOBO), and other optimization techniques called Harris Hawks Optimization (HHO), Artiﬁcial Electric Field Algorithm (AEFA) and Invasive Weed Optimization (IWO) is carried out to check the e ﬃ ciency of the proposed QOBO. The QOBO is applied to a stand-alone hybrid microgrid system located in Aswan, Egypt. The results show the e ﬀ ectiveness of the QOBO algorithm to solve the optimal economic design problem for hybrid microgrid power systems.


Introduction
Despite the steady increase in electric power production, it is still below the required level, due to the increase in load demand caused by the population increase as well as the increased use of technology in the residential, industrial and agricultural fields. According to the International Energy Agency (IEA), the global electricity demand will grow at an annual rate of 2.1% until 2040. This increases electricity's share in the total energy consumption to 24% in 2040. It is expected that renewable energy sources (RES) will face a significant increase in global investment in the coming years, to cover more than half of the energy consumption in the world by 2040. These energies will make up for the shortfall in electrical energy production and contribute to a reduction in carbon dioxide emissions in the atmosphere, thereby reducing pollution significantly [1][2][3].
In order to invest in RES to optimize electrical energy production and raise the efficiency of the systems, many studies in the world recommend combining different technologies to form hybrid renewable energy systems (HRES) [4,5]. Consequently, these sources complement each other, support the national grid, and reduce the use of traditional power plants depending on fossil fuels that release greenhouse gases and pollute the environment [6]. However, the design of these hybrid systems needs sophisticated programs and smart algorithms capable of reaching the optimal solution taking into consideration all the conditions and constraints such as reliability aspects, economic cost, sensitivity factors, availability of RES, etc. [1,2,7,8].
Several studies have been conducted on the technical and economic feasibility of hybrid systems in past years to determine their viability. Many of these studies have used different modeling of HRES, and they have applied different algorithms and various software tools to achieve their goals. According to the literature, these challenges still exist and are the focus of a lot of research, especially on finding the best algorithms and modern techniques in reaching the optimal solutions of the optimization problem of finding the optimal sizing of the installed capacities of the components of HRES [9][10][11][12][13][14][15].
In [16], the pre-feasibility analysis of a stand-alone energy system using HRES including renewable and conventional energy sources was applied using HOMER software in Newfoundland, Canada. In one of the earlier studies [17], the authors conducted a feasibility study of generating electricity using RES for a hybrid system in a stand-alone village in Chhattisgarh, India. In [18], the authors introduce a realistic solution for energy demand from a hybrid power system consists of wind turbines (WT), photovoltaics (PV), and battery energy storage systems (BESS). Through a real measurement of meteorological data in 2017, concerning especially the wind speed, solar radiation and temperature, the output power of the proposed hybrid system is calculated. Load satisfaction is considered to evaluate the feasibility of the system. The optimum solution is found using the linear TORSCHE optimization technique, while a comparative study between PV/WT/battery and PV/WT has been accomplished and an economic analysis was presented. As a result, the hybrid PV/WT/battery is proved more economical than using each system individually.
Xiao Xu et al. [19] designed and investigated a hybrid PV/WT/hydropower/pump storage as a case of study. The optimal configuration of the HRES is found using a techno-economic index that respects the maximum Loss of Power Supply Probability (LPSP) and minimum investment cost. The Multi-Objective Particle Swarm Optimization (MOPSO) is used to trade off analysis between two objectives. Besides, the curtailment rate (CR) of the WT and PV are taken into consideration due to policy requirements. The authors in [20] proposed an optimized design of an energy system featuring the highest penetration of renewable energy. This system is composed of WT, PV, geothermal, diesel, and BESS; otherwise, the system is obtained respecting the technological and financial feasibility constraints. The model developed is based on weather and electric demand data measured to reach the optimal sizing of the hybrid system. Three objective functions are conflicting, which are the Net Present Cost (NPC), renewable energy fraction and the energy index of reliability.
In [21], the authors implemented and compared three algorithms to find the optimal design of a hybrid WT/PV/Biomass/BESS energy system. Based on the obtained results, the Harmony Search Algorithm (HSA) was faster and efficient in the convergence, compared to Jaya and PSO optimization algorithms. The techno-economic study has been implemented to have the optimal unit sizing of the HRES, which guaranteed a cost-effective, efficient, and reliable power supply for the customers of electric energy. The constraints are chosen to enhance the reliability and efficiency of the hybrid system, using the LPSP and the energy fraction factors.
In this paper, a new smart algorithm named Bonobo Optimizer [22] was employed and improved using a quasi-oppositional method, and the modified Quasi Oppositional BO (QOBO) was utilized for optimal economic designing of a stand-alone microgrid hybrid system in Aswan, Egypt, where the hybrid system consists of RES (PV panels, WT and BESS) with diesel generators. Then, the results were compared between the traditional and improved BO. This proved the ability of the QOBO algorithm to reach the optimal solution in a shorter time and with better efficiency compared to the traditional BO algorithm. Other algorithms, namely Harris Hawks Optimization, Artificial Electric Field Algorithm and Invasive Weed Optimization are applied, and the results are compared where the efficiency of the QOBO algorithm has been proved. Additionally, a sensitivity analysis of the proposed systems scenarios was performed to obtain the optimal solution.

Mathematical Description of the Proposed Hybrid System Components
The schematic diagram of the suggested HRES is shown in Figure 1. Four scenarios are applied, which include the PV power plant, WT power plant, diesel generator, Biomass, BESS and inverter.
Appl. Sci. 2020, 10, x FOR PEER REVIEW 3 of 29 QOBO algorithm to reach the optimal solution in a shorter time and with better efficiency compared to the traditional BO algorithm. Other algorithms, namely Harris Hawks Optimization, Artificial Electric Field Algorithm and Invasive Weed Optimization are applied, and the results are compared where the efficiency of the QOBO algorithm has been proved. Additionally, a sensitivity analysis of the proposed systems scenarios was performed to obtain the optimal solution.

Mathematical Description of the Proposed Hybrid System Components
The schematic diagram of the suggested HRES is shown in Figure 1. Four scenarios are applied, which include the PV power plant, WT power plant, diesel generator, Biomass, BESS and inverter. Two strategies are adopted in this paper; the first is the biomass/PV as shown in Figure 2 and the second uses the PV or WT or both as in Figure 3. The main strategy steps for the operation of the proposed system can be explained as follows: • The PV and WT are used first as a principal power source and served the load needs.

•
The battery is used when the PV and WT cannot serve it. • The diesel system is working when the battery storage system is empty and starts when the need is higher than 30% of its nominal power.

PV System
The PV system is considered as a number of cells connected in series. The output power of the PV system is presented based on many parameters as introduced in Equation (1) [23]: where represents the solar irradiation, represents the area covered with PV modules and is the efficiency of the PV system that can be calculated as follows: where is the nominal operating cell temperature (°C), is the reference efficiency, is the efficiency of the maximum power point tracking (MPPT) equipment, is the temperature coefficient, is the ambient temperature (°C), is the solar cell reference temperature (°C). Two strategies are adopted in this paper; the first is the biomass/PV as shown in Figure 2 and the second uses the PV or WT or both as in Figure 3. The main strategy steps for the operation of the proposed system can be explained as follows: • The PV and WT are used first as a principal power source and served the load needs.

•
The battery is used when the PV and WT cannot serve it. • The diesel system is working when the battery storage system is empty and starts when the need is higher than 30% of its nominal power.

PV System
The PV system is considered as a number of cells connected in series. The output power of the PV system is presented based on many parameters as introduced in Equation (1) [23]: where I represents the solar irradiation, A pv represents the area covered with PV modules and η pv is the efficiency of the PV system that can be calculated as follows: where NOCT is the nominal operating cell temperature ( • C), η r is the reference efficiency, η t is the efficiency of the maximum power point tracking (MPPT) equipment, β is the temperature coefficient, T a is the ambient temperature ( • C), T r is the solar cell reference temperature ( • C).

Wind Energy System
Based on the basics of aerodynamics, wind power can be presented as [24]: where represents wind speed, is the rated power of wind, , and are the cut-in, cutout, and rated wind speed, respectively. a and b are two constants, which can be expressed as:

Wind Energy System
Based on the basics of aerodynamics, wind power can be presented as [24]: where V represents wind speed, P r is the rated power of wind, V ci , V co and V r are the cut-in, cut-out, and rated wind speed, respectively. a and b are two constants, which can be expressed as: The rated power of wind is calculated as given in the following equation: where ρ represents the air density, A wind is the swept area of the wind turbine, C p is the maximum power coefficient ranging from 0.25% to 0.45%.

Biomass System
The biomass system is a renewable energy system, which produces power as given in Equation (6) [23].
where Total bio is the total organic material of biomass, CV bio is the calorific value of the organic material (20 MJ/kg), η bio is the biomass efficiency, which is taken as 24% and O time presents the operating hours each day.

Diesel System
The diesel generator is used as a back-up, working just in case there is a need, is connected directly with the load, and starts when the battery is fully discharged and the load is more than 30% of its rated capacity. The model of the diesel generator regarding its output power is presented by the following Equation [25]: where F dg is fuel consumption, P dg,out is the output power of diesel generator, A g and B g are the constants of the linear consumption of the fuel.

BESS System
The battery energy storage system (BESS) is a mandatory element for the isolated hybrid systems. BESS is charged in the periods of power excess and discharged when the load increases. The capacity of the BESS is expressed as follows [25]: where E l is the load demand, AD represents the autonomy daily of the battery, DOD is the depth of discharge of the battery system, η inv and η b are the battery and inverter efficiency, respectively.

Net Present Cost
The objective function in the optimization model is the minimization for the Net Present Cost (NPC) which is the pillar factor considered for any project design; it is counted as a sum of all components costs including the capital (C), operation and maintenance (OM) and replacement costs (R), considering also the fuel cost of the diesel FC dg , taking into account the interest rate (i r ), inflation rate (δ), and escalation rate (µ) and the predefined project lifetime (N). The NPC modeling is expressed as follows [23,24]: 3.1.

PV and WT Costs
The costs of PV and WT are presented in a similar concept, their capital cost is expressed based on its initial cost (λ PV,WT ) and its area (A PV,WT ), the capital cost is as follows [26]: The operation and maintenance costs are expressed as [26]: where θ PV,WT is the annual operation and maintenance costs for any components. The replacement costs are considered null because the project lifetime and the PV or WT lifetime are the same.

Diesel Generator Costs
The costs of the diesel generator are presented as follows [27]: where C dg is the capital cost, λ dg is the initial cost of the diesel generator for each KW, OM dg represent the actual O&M cost, θ dg is the annual O&M cost of diesel, N run is the number of operating hours of diesel generator per year, R diesel is the diesel generator replacement cost, R dg represents the annual replacement cost of diesel generator, p f is the fuel cost, F dg is the annual consumption of fuel and FC dg is the total fuel cost.

BESS Costs
The capital and O&M (containing the replacement) costs of the BESS are expressed as follows [26]: where λ bat is the BESS initial cost and θ bat is the annual O&M cost of BESS.

Biomass Costs
The biomass costs are presented as follows [28]: where λ bg is the biomass initial cost, θ 1 is the annual fixed O&M cost and θ 2 is the variable O&M cost of the biomass system, and P w is the annual energy generated by the Biomass system (kWh/Year).

Inverter Costs
The inverter capital and O&M costs are presented as follows [27]: where λ inv is the inverter initial cost and θ Inv is the annual O&M cost of the inverter.

Levelized Cost of Energy
The Levelized Cost of Energy (LCOE) is a critical factor. The consumers do not care about project cost or its lifetime, but their interest is to know how much to pay for each kilowatt-hour of consumption. Therefore, the LCOE is a measure of the average NPC over its lifetime, its equation is expressed as follows [25]: where P load is the load demand; CRF is the capital recovery factor used to convert the initial cost to an annual capital cost, and is expressed as follow: where R denotes the lifetime of the hybrid system.

Loss of Power Supply Probability
The loss of power supply probability (LPSP) is a technical factor used to express the reliability of the system. The LPSP is expressed as follows [25]:

Renewable Energy Fraction
The transfer from classical electricity production to renewable energy projects was not easy. The majority introduced RES partially, while the objective is to use all projects with 100% renewable energy. Therefore, the renewable energy factor is dedicated to calculating the percentage of the renewable energy used. The renewable energy fraction (RF) is expressed as follows [25]: where P re represents the total power from RES.

Availability Index
The availability index (A) is calculated to predict customer satisfaction. The availability index measures the energy converted to the load while confirming the ability of the designing system of the project. The availability index is calculated as follows [23]: while, u will be equal to 1 when the load is not satisfied, and 0 when the load is satisfied.

Constraints
The constraints are presented to achieve the desired system design. In this microgrid system, the constraints are shown as follows:

Algorithms
In this section, the conventional BO and proposed QOBO are illustrated. In addition, both algorithms are compared with well-known optimization techniques (HHO, AEFA and IWO) which are briefly described in Appendix A.

Bonobo Optimizer
Bonobo optimizer is a new optimization algorithm that was proposed in [22]. In BO, the social reproductive behavior of the bonobo is modeled based on four mating strategies: promiscuous, restrictive, consortship, and extra-group mating. These mating strategies are subjected to the living condition of the bonobo, hence two terms named positive phase (PP) and negative phase (NP) have been used to present the situations of this life. In this framework, PP describes the peaceful living in which the mating can be done. On the contrary, NP expresses a hard life. In the BO, each solution is called X B and the best solution is X α B . The mathematical modeling of the BO algorithm is presented in the following subsections.

Bonobo Selection Using Fission-Fusion Strategy
The solutions update of the BO algorithm depends on the mating strategies subjected to the current phase. However, a bonobo should be selected before each mating based on the fission-fusion social group strategy. As noted, the bonobo community lives in small groups with different sizes (random and unpredictable) for a few days and the communities rejoined again to the main community. Hence, based on this behavior, a bonobo for mating can be selected. The mathematical formulation for the maximum number of these temporary subgroups N sub can be expressed as follows: where N is the total number of the population and ε sub denotes the sub-group size factor. To find the selected bonobo X P B for mating with X i B to create a new bonobo X new B , if the best bonobo in the subgroup in terms of the fitness function is better than the X i B , then it is selected as X P B , else a random one should be selected form the subgroup.

Creation of New Bonobo
After achieving the selected bonobo X P B , four mating strategies are used in the BO algorithm to create a new bonobo X new B based on the current phase (PP or NP). For the PP case, promiscuous and restrictive mating have higher probabilities ρ ph for occurrence. On the contrary, in NP, the probabilities ρ ph of consortship mating and extra-group mating are higher.
Promiscuous and Restrictive Mating In this mating strategy, the new bonobo can be created using the following equation: where r 1 is a random number between [0, 1]. S α coe f and S P coe f are the sharing coefficients for the alpha bonobo X α B and the selected bonobo X P B , respectively. C f lag is a flag value that equals −1 or 1 for restrictive and promiscuous mating, respectively. A controlling parameter in terms of the phase probability ρ ph is used to adopt the mating strategy. Initially, ρ ph is set to 0.5. Hence, if a random number r is found to be less than or equal to ρ ph , a new bonobo is created based on promiscuous and restrictive mating, otherwise, consortship mating and extra-group mating can be used.
Consortship and Extra-Group Mating If r is greater than ρ ph , consortship and extra-group mating can occur. However, a new random number r 2 between [0, 1] is used with a probability of extra-group mating ρ xg to represent the occurrence of extra-group mating when r 2 is less than or equal to ρ xg as follows [22,29]: where r 3 and r 4 are random numbers between [0, 1] and r 4 0. ρ d is a directional probability with initial value which equals 0.5. β 1 and β 2 are intermediate parameters between [0, 1]. X i min and X i min are the values of the upper and lower boundary.
If r 2 is greater than ρ xg , a new bonobo can be created using the consortship mating strategy as follows: where r 5 and r 6 are two random numbers.

Parameter Updating
The BO's parameters are updated during the iterative process based on the best solution X α B at each iteration, where if there is an improvement in the final solution compared to the previous iteration, the BO's parameters can be updated in the following way.
The negative phase count is set to zero (NP cont = 0) and the positive phase count grows by increments of one (PP cont = PP cont + 1). In addition, ρ xg = ρ xg_initial and ρ ph = 0.5 + Cp where Cp is the amount of the change in the phase, and can be calculated as Cp = min(0.5, PP cont × rcp) where rcp is the rate of the change in the phase. Moreover ρ d = ρ ph and where ε sub initial = 0.5 * ε sub_max .
On the other hand, if there is no improvement, the BO's parameters are updated as follows: The overall steps of the BO algorithm are presented in Algorithm 1.

Improved Quasi-Oppositional BO (QOBO) Algorithm
As with any population-based algorithm, BO has some problems such as falling in the local optima. However, in this work, an improved BO based on three leaders' selection and quasi-opposition-based learning is developed.

Three Leaders
In this method, instead of using the best solution (alpha bonobo X α B ) for updating the new bonobo X new B and ignoring the other best solutions, three leaders can be used to increase the diversity of the solutions as follows where w 1 = r 7 r 7 + r 8 + r 9 , w 2 = r 8 r 7 + r 8 + r 9 , and w 1 = r 9 r 7 + r 8 + r 9 r 7 , r 8 , and r 9 are random values between [0, 1].

Quasi-Oppositional
Opposition-based learning (OBL) [30] has been widely used to improve many optimization techniques such as quasi-oppositional teaching-learning (QOTLBO) [31,32], Quasi-oppositional swine influenza model-based optimization with quarantine (QOSIMBO-Q) [33] and Oppositional Jaya Algorithm [34]. In the OBL, improvements can be achieved by using the candidate solution and its opposite at the same time. Hence, in this work, the opposite solution of the BO algorithm X i B can be expressed as presented in [35]: where r 10 is a random number between [0, 1], and C is a middle point between X i min and X i max which can be calculated as follows: Additionally, X new B is the opposite solution which can be calculated as The overall steps of the improved BO based on three leaders and the quasi-oppositional method are presented in Algorithm 2.

Case Study
To validate the robustness of the QOBO algorithm, it has been applied for addressing the studied problem of optimal configuration of the proposed multiple scenarios HRES, i.e., the PV/WT/diesel generator/BESS, PV/biomass, PV/diesel generator/BESS and WT/diesel generator/BESS. The proposed hybrid systems have been introduced in the isolated mode for satisfying the load requirements in the proposed site.
The project is applied in Aswan, Egypt as shown in Figure 4. The annual load curve over a time interval of one hour is shown in Figure 5. Figures 6-9 present solar irradiation, temperature, wind speed and atmospheric pressure in the studied region. Four standalone scenarios of the hybrid system will be evaluated for covering the load demand in that site. These configurations are: (1) PV/WT/diesel/BESS,

Results
The main object of this research paper is to find the optimal design of the proposed hybrid system and to validate the accuracy of the proposed QOBO optimization method. The optimal sizing is based on the objective functions introduced in (9) and the parameters of optimization are: (i) the area of PV system, (ii) the area swept by the WT, (iii) the rated power of diesel generator, (iv) the nominal capacity of the battery, (v) the consumption of the biomass fuel. To confirm the suitability of the QOBO in addressing such optimization problem, QOBO, BO, HHO, AEFA and IWO were launched 100 times for each configuration and statistical study was conducted based on the best minimum value of the fitness function. For a deep analysis of the obtained results and to ensure the sensitivity analysis, four indices were chosen, namely, NPC, LCOE, LPSP and the availability index. In the next subsections, the optimization results are provided for the standalone system with multiple scenarios. Modelling and simulation of the optimization problem were accomplished using MATLAB 2015a program, while the adjusting parameters for the three algorithms are the same, i.e., the number of maximum iterations is taken as 100 iterations and the search agents' number is 30 agents. The input technical and economic data for the system components are presented in Table 1. The results of the statistical measurements for the modified QOBO and the conventional BO with HHO, AEFA and IWO algorithms are listed in Tables 2 and 3. From the previously mentioned tables, the reader can conclude that the QOBO technique generates the best minimum value of the fitness function in all cases. The convergence curves of the 100 iterations implemented for all the studied configurations using QOBO, BO, HHO, AEFA and IWO are presented in Figure 10a-d.

Validation of QOBO Algorithm
The results of the statistical measurements for the modified QOBO, the conventional BO, HHO, AEFA and IWO algorithms are listed in Tables 2 and 3. From Table 2, the reader can find the results of the optimal sizing for the multiple scenarios studied, as well as the convergence time of each simulation, and conclude that the QOBO algorithm finds the best results with a short time compared with the other algorithms. From Table 3, the reader can compare between algorithms and the different scenarios of the proposed hybrid system using multiple factors. Briefly, it is noticed that the hybrid PV/biomass system is highly competitive, mainly using the developed QOBO algorithm, the optimized system is calculated with $110,807, which means an LCOE of 0.1053 $/kWh, the constraints are satisfied and the project is 100% supplied by renewable energy sources. In this scenario, the performances of the QOBO and the BO are almost equal, while in other scenarios, the difference is clearly noticed.

Combinations of the Studied System Components
In this section, the results obtained in the convergence simulation of the NPC as a fitness function using the QOBO are presented. The optimized parameter results (i.e., A pv , A wind , P dgn , P Cap_bat , P BM ) for all suggested combinations are listed in Table 3 with the rating of the inverter that takes the value of the peak load demand. From Figure 10, the reader can notice that using QOBO, BO, HHO, AEFA and IWO algorithms, the best minimum values of fitness function (NPC) is obtained for the second configuration, i.e., hybrid PV/biomass energy system. From the table, it is obvious that QOBO generates the minimum value of LCOE in all cases.
The reliability of the proposed scenarios of the proposed HRES are respected and the availability of power is highly assured, the penetration RES is considered in this paper, while different results are obtained. The minimum penetration of 70% is obtained for the WT/Diesel/Battery scenario while the maximum penetration of 99.75% is obtained for the PV/WT/Diesel/BESS scenario. The daily battery autonomy is also influenced by the configuration of the HRES, the best autonomy is achieved for the WT/Diesel/BESS scenario taking nearly 4 days, while the minimum autonomy is obtained in PV/WT/Diesel/BESS case with only 6 h. The last system is composed of the different energy resource which explains the independence for a specific resource. Table 4 presents a detailed overview of all costs needed, for all scenarios presented and for all proposed algorithms.

Sensitivity Analysis
RES is intermittent which can be affected by any variation of sizing, meteorological or economic data. The sensitivity analysis is a method that helps to select and/or to expect the optimal configuration of the hybrid system. The sensitivity analysis in this paper is implemented on the best scenario of the proposed, i.e., the PV/Biomass in the Aswan region. The selection of the sensitivity variables is based on the sizing of components in order to analyze the effect of sizing variation on four factors which are NPC, LCOE, LPSP and the Availability index. Figure 11 shows the effect of variation in the sizing of PV and biomass units on the NPC. The PV sizing is highly impacted by the total cost of the hybrid PV/Biomass system, which means that in the case of reducing the area of PV units the NPC is reduced too. On the other hand, if the area covered by PV modules is increased, the NPC increases too. The variation in the sizing of biomass unit is increased throughout the interval −20 to 20 slowly and it has no noticeable impact on the NPC anyway. Figure 12 shows the effect of variation of PV and biomass sizing on the LCOE. The NPC and the LCOE are linked with a linear equation which means that they have the same shape. The LCOE reached 0.08 $/kWh when the area of the PV system is reduced by 20%. Figure 13 shows the impact of variation in the sizing of PV and biomass systems on the LPSP. The impact of PV size is very important for the LPSP, because when the size of the PV system is increased the LPSP is enhanced, mainly in the −20% to 0% interval. When the PV size is changed in the interval of 0% to +20%, the LPSP is increased to 2% while when the PV size is changed to −20%, the change in LPSP equals 16.4% which is a very bad sign for system building. The Biomass system does not affect the value of the LPSP and the transition between −4% to 0% is explained as the obtained sizing of the system is optimum. Figure 14 shows the impact of the variation of PV and Biomass sizing on the availability index. The availability index enhanced exponentially with the increase in the PV sizing. In the interval between −20% and 0, availability progresses quickly, while after zero, the availability begins to be stabilized and it is clearly shown in the interval between +12% and +20%.

Sensitivity Analysis
RES is intermittent which can be affected by any variation of sizing, meteorological or economic data. The sensitivity analysis is a method that helps to select and/or to expect the optimal configuration of the hybrid system. The sensitivity analysis in this paper is implemented on the best scenario of the proposed, i.e., the PV/Biomass in the Aswan region. The selection of the sensitivity variables is based on the sizing of components in order to analyze the effect of sizing variation on four factors which are NPC, LCOE, LPSP and the Availability index. Figure 11 shows the effect of variation in the sizing of PV and biomass units on the NPC. The PV sizing is highly impacted by the total cost of the hybrid PV/Biomass system, which means that in the case of reducing the area of PV units the NPC is reduced too. On the other hand, if the area covered by PV modules is increased, the NPC increases too. The variation in the sizing of biomass unit is increased throughout the interval −20 to 20 slowly and it has no noticeable impact on the NPC anyway. Figure 12 shows the effect of variation of PV and biomass sizing on the LCOE. The NPC and the LCOE are linked with a linear equation which means that they have the same shape. The LCOE reached 0.08 $/kWh when the area of the PV system is reduced by 20%. Figure 13 shows the impact of variation in the sizing of PV and biomass systems on the LPSP. The impact of PV size is very important for the LPSP, because when the size of the PV system is increased the LPSP is enhanced, mainly in the −20% to 0% interval. When the PV size is changed in the interval of 0% to +20%, the LPSP is increased to 2% while when the PV size is changed to −20%, the change in LPSP equals 16.4% which is a very bad sign for system building. The Biomass system does not affect the value of the LPSP and the transition between −4% to 0% is explained as the obtained sizing of the system is optimum. Figure 14 shows the impact of the variation of PV and Biomass sizing on the availability index. The availability index enhanced exponentially with the increase in the PV sizing. In the interval between −20% and 0, availability progresses quickly, while after zero, the availability begins to be stabilized and it is clearly shown in the interval between +12% and +20%.
The PV system through this analysis is demonstrated as a very important element for having a high hybrid systems criterion. However, the Biomass system helps the PV to satisfy the constraints and its variation does not have a serious impact on the performance of the hybrid system.

Conclusions
With the increased penetration level of RES into electrical energy production in the microgrid systems, new challenges have emerged on the international scene. These challenges are represented in finding ways to optimize the design of the hybrid system by using smart algorithms and software. Among these dilemmas, the economic cost and feasibility of installing systems in different locations in the world is considered the most important challenge. Therefore, this research proposes a developed algorithm called Quasi-Oppositional Bonobo Optimizer (QOBO) for the optimal economic design of a stand-alone hybrid microgrid system in Aswan, Egypt. Four configurations of the hybrid system have been implemented, which consist of RES (PV panels, WT and biomass) with diesel generators and battery storage systems. The obtained results showed that the PV/Biomass scenario is the most cost-effective system with an NPC of $110,807 and LCOE of 0.1053 $/kWh; otherwise, the best configuration of the microgrid system contained 293.971 m² of PV and 1020.18 ton/year consumed by the biomass system; the PV/Diesel/BESS scenario is also cost-effective with NPC of $153,401 and LCOE of 0.1457 $/kWh. On the other side, the LPSP and availability index are satisfied and without the need for traditional resources. Additionally, the results showed the ability of the QOBO algorithm to reach the optimal solution in a shorter time and with better efficiency compared to the traditional BO, HHO, AEFA and IWO algorithms in all cases studies. Furthermore, a sensitivity analysis of the proposed systems scenarios was performed to obtain the impact of unit size on the performance of the hybrid system, where it has been emphasized that PV system sizing is very important and has a great impact on the overall performance of the system. The obtained results from this study would be useful material for decision makers working on the development of the renewable energy sector in Egypt. In future studies, it is suggested to apply the proposed QOBO in other engineering problems.  The PV system through this analysis is demonstrated as a very important element for having a high hybrid systems criterion. However, the Biomass system helps the PV to satisfy the constraints and its variation does not have a serious impact on the performance of the hybrid system.

Conclusions
With the increased penetration level of RES into electrical energy production in the microgrid systems, new challenges have emerged on the international scene. These challenges are represented in finding ways to optimize the design of the hybrid system by using smart algorithms and software. Among these dilemmas, the economic cost and feasibility of installing systems in different locations in the world is considered the most important challenge. Therefore, this research proposes a developed algorithm called Quasi-Oppositional Bonobo Optimizer (QOBO) for the optimal economic design of a stand-alone hybrid microgrid system in Aswan, Egypt. Four configurations of the hybrid system have been implemented, which consist of RES (PV panels, WT and biomass) with diesel generators and battery storage systems. The obtained results showed that the PV/Biomass scenario is the most cost-effective system with an NPC of $110,807 and LCOE of 0.1053 $/kWh; otherwise, the best configuration of the microgrid system contained 293.971 m 2 of PV and 1020.18 ton/year consumed by the biomass system; the PV/Diesel/BESS scenario is also cost-effective with NPC of $153,401 and LCOE of 0.1457 $/kWh. On the other side, the LPSP and availability index are satisfied and without the need for traditional resources. Additionally, the results showed the ability of the QOBO algorithm to reach the optimal solution in a shorter time and with better efficiency compared to the traditional BO, HHO, AEFA and IWO algorithms in all cases studies. Furthermore, a sensitivity analysis of the proposed systems scenarios was performed to obtain the impact of unit size on the performance of the hybrid system, where it has been emphasized that PV system sizing is very important and has a great impact on the overall performance of the system. The obtained results from this study would be useful material for decision makers working on the development of the renewable energy sector in Egypt. In future studies, it is suggested to apply the proposed QOBO in other engineering problems.  Algorithm A1: Pseudo code of HHO Initialize the population size and max iteration (K max ) Initialize a set random rabbit location, within the limits X i min ≤ X i rabbit ≤ X i max . Evaluate the objective function for all rabbits While (k < K max ) Calculate the fitness of hawks Set x rabbit in the best location for each hawk do Update the initial energy E 0 , energy E and jump strength J; E 0 = 2rand () − 1, E = 2E 0 1 − t T , J = 2(1 − rand ()) if (|E| ≥ 1) then Exploration phase if (|E| < 1) then Exploitation phase if (r ≥ 0.5 and |E| ≥ 0.5) then Soft besiege else if (r ≥ 0.5 and |E| < 0.5) then Hard besiege else if (r < 0.5 and |E| ≥ 0.5) then Soft besiege with progressive rapid dives else if (r < 0.5 and |E| < 0.5) then Hard besiege with progressive rapid dives Return x rabbit Appendix A.2. Artificial Electric Field Algorithm Anita and Yadav [37] were inspired by Coulomb's law of electrostatic force to create a novel artificial electric field algorithm. The concepts of electric field and charged particles provide us a strong theory for the working force of attraction or repulsion between two charged particles. The pseudo code of the AEFA algorithm is proposed in Algorithm A2.

Conflicts of
Algorithm A2: Pseudo code of AEFA Initialize a set of random population X i B = X 1 B , X 2 B , . . . , X N B of N size, within the limits X i min ≤ X i B ≤ X i max . Initialize the velocity to a random value Evaluate the fitness of whole population Set the iteration to zero Reproduction and Updating While criteria not satisfied do Calculate K (t), best (t) and worst (t) for i = 1: N do Evaluate the fitness values Calculate the total force in each direction Calculate the acceleration V i (t + 1) = rand () × V i (t) + a i (t) X i (t + 1) = X i (t) + V i (t + 1) end for end while Appendix A.2.1. Invasive Weed Optimization Algorithm Invasive weed optimization is a numerical stochastic optimization algorithm inspired by colonizing weeds, which was introduced in 2006 by Mehrabian and Lucas [38]. In IWO, a certain number of weeds make up the whole population, and each weed comprises a set of decision variables. Weeds are a serious threat to desirable plants because they are plants that are invasive and hardy.
Weeds are plants which are vigorous and invasive; they pose a serious threat to desirable, cultivated plants in agriculture. Weeds have shown to be very robust and adaptive to change in the environment. The IWO optimization algorithm has been modeled based on four steps: initialization, reproduction, spatial dispersal and competitive exclusion. •

Initialization and Production
Firstly, the population is spread over the research space randomly; afterwards, each plant is allowed to produce seeds depending on its own fitness; the production of seeds is not only allowed for the better plants' fitness as in the other evolutionary algorithms, but the reproduction step of IWO is also proposed to give a chance to infeasible individuals to survive and reproduce similar to the mechanism which occurs in nature. The weeds producing seeds can be formulated as follows: where in each iteration, f is the current weed's fitness. f max and f min represent the max and min fitness values, respectively. s max and s min represent the max and min values of the weeds, respectively. •

Spatial Dispersal
The generated seeds are being randomly distributed over the search space such that they abode near the parent plant. However, the standard deviation (σ) of the random function will be reduced in every iteration, the nonlinear alteration equation of the standard deviation at each iteration is presented as follows: where iter max is the maximum iteration, n is the nonlinear modulation index, σ initial and σ f inal are the initial and final values of standard deviation, respectively. •

Competitive Exclusion
In a colony, the maximum number allowed of plants is limited; for that, competitive exclusion is applied. The plant that leave no offspring would go extinct; otherwise, they can survive. After some iterations, the number of plants in a colony will reach its maximum through the reproduction step, the seeds and their parents are ranked together, and all plants in the research space are considered as weeds; afterwards, weeds with lower fitness are eliminated.
The overall steps of the IWO algorithm are presented in Algorithm A3.
Algorithm A3: Pseudo code of IWO Initialize a set of random weeds, weed i B = weed 1 B , weed 2 B , . . . , weed N B within the limits weed i min ≤ weed i B ≤ weed i max . Set the IWO's parameters Evaluate the objective function for all weeds While (iter < iter max ) Calculate the best and worst fitness in the colony Calculate the σ for each weed in the colony Calculate the number of seeds following the fitness of each weed Add the seeds to their parents in the colony if Size max ≤ Nb population Sort the new population according to their fitness Eliminate the worst fitness in order to achieve the Size max allowed end if end for Update iteration iter = iter + 1 end while Return the final best solution