Economic and Ecological Design of Hybrid Renewable Energy Systems Based on a Developed IWO/BSA Algorithm

: In this paper, an optimal design of a microgrid including four houses in Dakhla city (Morocco) is proposed. To make this study comprehensive and applicable to any hybrid system, each house has a different conﬁguration of renewable energies. The conﬁgurations of these four houses are PV /wind turbine ( WT )/biomass/battery, PV /biomass, PV /diesel/battery, and WT /diesel/battery systems. The comparison factor among these conﬁgurations is the cost of energy (COE), comparative index, where the load is different in the four houses. Otherwise, the main objective function is the minimization of the net present cost ( NPC ), subject to several operating constraints, the power loss, the power generated by the renewable sources (renewable fraction), and the availability. This objective function is achieved using a developed optimization algorithm. The main contribution of this paper is to propose and apply a new optimization technique for the optimal design of a microgrid considering different economic and ecological aspects. The developed optimization algorithm is based on the hybridization of two metaheuristic algorithms, the invasive weed optimization (IWO) and backtracking search algorithm (BSA), with the aim of collecting the advantages of both. The proposed hybrid optimization algorithm (IWO/BSA) is compared with the original two optimization methods (IWO and BSA) as well as other well-known optimization methods. The results indicate that PV /biomass and PV /diesel/battery systems have the best energy cost using the proposed IWO/BSA algorithm with 0.1184 $/kWh and 0.1354 $/kWh, respectively. The best system based on its LCOE factor is the PV /biomass which represents an NPC of 124,689 $, the size of this system is 349.55 m 2 of PV area and the capacity of the biomass is 18.99 ton/year. The PV /diesel/battery option has also good results, with a system NPC of 142,233 $, the size of this system is about 391.39 m 2 of PV area, rated power of diesel generator about 0.55 kW, and a battery capacity of 12.97 kWh. Otherwise, the proposed IWO/BSA has the best convergence in all cases. It is observed that the wind turbine generates more dumped power, and the PV system is highly suitable for the studied area.


Introduction
Increasing power demand is a logical result of the significant increase in the world population and their energy consumption and industrialization growth. Distributed systems-based-renewable energy resources appear as a practical solution compared with the traditional energy resources due to the advantages of using such renewable sources. A microgrid is a distribution system consisting of hybrid energy sources dedicated to meet a particular need for electrical energy. A microgrid can be isolated from the utility in most cases; otherwise, it can be connected to the network when the microgrid owner needs more power flexibility. The authors of [1] presented the major issues regarding the motivations and benefits of adopting hybrid renewable energy systems (HRES), mainly in sub-Sahara Africa. Different renewable energy systems that can be adopted for HRES applications for both on-grid and off-grid consumers were proposed and discussed. Detailed design and modeling of an isolated HRES have been presented in [2], including traditional and renewable energy resources using meta-heuristic algorithms. Additionally, the technical and ecological factors have been considered. Other pertinent review research, such as microgrid transactive energy [3], optimal smart energy coordination in the microgrid applications [4], multi-agent microgrid management system for single-board computers [5], and peer-to-peer energy trading in micro/mini-grids for local energy communities [6], statistical analysis of PV/wind HRES have been presented in [7].
Investing in renewable energy systems is not an easy issue as it has several aspects, including the economic aspect, which have emerged as a result of the global economic crises and the technical aspects related to the stability and continuity of energy supply from renewable sources, especially the sources which depend on variable environmental conditions (wind, sunlight).
The first and vital obstacle that must be avoided is to find the best design of the system. The optimal design of microgrid means that the project owner should evaluate the whole region and all sources available. Consequently, the design should be economical and follow many technical aspects and environmental criteria.
In the literature, many studies were presented for several locations, each promoting its appropriate system. In [8], the authors implemented different recent algorithmswhale optimization algorithm (WOA), water cycle algorithm (WCA), moth-flame optimizer (MFO), and hybrid particle swarm-gravitational search algorithm (PSOGSA)-to design a PV/wind/diesel/battery microgrid system through minimizing the cost of energy and increasing the reliability and efficiency of the system. In [9], the authors focused on wind/biomass/diesel/battery stand-alone microgrids and discussed the system operation, energy management, and dispatch issues in detail. In [10], the authors designed a microgrid system with the same load in two different countries to assess the effect of the metrological conditions and compare the cost of energy for both systems. An optimization algorithm to reduce the operational cost of a hybrid residential microgrid consisting of a diesel generator, WT and PV array, and battery energy storage system has been presented in [11]. In [12], the authors applied a grasshopper optimization algorithm to design an autonomous microgrid system containing PV/WT/battery/diesel generator. The reliability is studied using the deficiency of power supply probability (DPSP) factor, while the GOA has been compared with PSO and cuckoo search. The firefly algorithm has been used to find the optimal hybrid system configuration to feed three un-electrified remote villages [13]. The optimization method presented for minimizing the cost of energy considering the loss of load probability (LOLP) reliability index for a hybrid PV/WT/battery system. In [14], the optimal sizing of the hybrid renewable energy system (HRESs) in a remote area composed of PV/WT/battery/diesel has been developed using the social spider optimizer algorithm. The social spider optimizer (SSO) algorithm has been compared with many algorithms including Harris Hawks optimizer (HHO), grey wolf optimizer (GWO), multi-verse optimizer, antlion optimizer (ALO), and whale optimization algorithm. The IWO and BSA have been used to solve many problems, such as the unit commitment (UC) [15] and the economic environmental power dispatch problems [16]. Likewise, the IWO and BSA have been hybridized many times with other algorithms to get better performance. The IWO has been hybridized with IPSO for mobile robot's navigation in a dynamic environment [17]. Also, it has been hybridized with the WDO algorithm for nulling pattern synthesis of uniformly spaced linear and non-uniform circular array antenna [18]. Otherwise, the BSA has been hybridized for permutation flow-shop scheduling problem [19].
Despite the development and continuous improvement in the optimization techniques, there are still continuous attempts to achieve better results by updating the existing optimization algorithms, proposing new optimization algorithms, inspired by biological or social behaviors, or hybridizing more than one algorithm advantages of all of them. In [20], a hybrid algorithm of Jaya and teaching-learning-based optimization (JLBO) named the JLBO algorithm has been proposed for the optimal unit sizing of the hybrid PV/WT/battery system to feed electricity to a remote area. In [21], a modified bonobo optimizer (BO) algorithm has been proposed to have more ability in exploitation and exploration phases. The developed version is called the quasi-oppositional BO (QOBO). The developed algorithm has been introduced to design several scenarios for the HRESs. In [22], a modified crow search algorithm (CSA) has been proposed for optimizing a hybrid PV/diesel/PHS system, considering the fuel consumption as an objective function. The proposed approach has been compared with the particle swarm optimization, genetic algorithm, and the original CSA. A multi-objective-based optimization algorithm called BOACA has been proposed in [23], to reduce cost, emissions and find the best configuration of HRESs. The results obtained by BOACA have been compared with GA, PSO, and HOMER. In [24,25], the multiobjective evolutionary algorithm has been applied for the optimal design and the optimal allocation of the HRES, respectively. In [26], the optimal design and operating schedule has been presented to meet the energy demand of Pantelleria island. In [27], a modified particle swarm optimisation algorithm has been proposed for energy management of microgrid under uncertain environments. In [28], a mathematical approach has been developed to assess the potential of electricity production, exploiting from the available sources such as solar, wind speed, and sea wave in the Balearic and Fiji islands. In [29], HOMER has been used to investigate the techno-economic feasibility analysis of several HRES in Pratas Island (Taiwan). In [30], HOMER has been used to design an optimal HRES in Muhavoor, India. Several configurations have been considered based on PV, WT, diesel and battery. In [31], HOMER has been used to design a HRES of PV, WT, diesel and battery to avoid the diesel emission problems in Malaysia. In [32], a novel energy-economic-environmental multi-criteria decision framework has been developed for a HRES optimization. In [33], a mathematical model has been proposed to get the optimal energy mix in Lampedusa, Italy. In [34], a cost-efficient optimization algorithm has been proposed to maximize the RE penetration and find the optimal sizing of the HRES. Table 1 summarizes the usage of hybrid optimization techniques in RESs. This paper aims at optimal economic and ecological design of a microgrid using a proposed hybrid optimization technique, IWO/BSA. The proposed microgrid consists of four houses in the city of Morocco. This microgrid includes different combinations of energy resources, namely PV, wind, biomass, diesel, and battery energy storage. Besides the optimal design presented in this paper, the penetration level of HRESs, the power supply availably and continuity are considered. To assess the effectiveness and performance of the proposed optimization technique, a comparison with different optimization algorithms is presented. However, the main contribution of this paper can be summarized in the following points:

•
We propose a hybrid algorithm called IWO/BSA, with the aim of improving the performance of the original IWO and BSA algorithms by combining their advantages into an algorithm.

•
The proposed algorithm is applied to the optimal economic design of a stand-alone hybrid microgrid system in Dakhla (Morocco).

•
Four configurations consisting of RES (PV, WT and biomass) with diesel generators and battery storage systems are suggested. The study is only based on commercial software application. Other meta-heuristic algorithms could be included and examined.
Heydari and Askarzadeh [35] 2016 PV/biomass HSA NPC Proving the disadvantage of the HOMER software compared to the meta-heuristic algorithms.
Algorithm comparison is required to confirm that the best results could be found from HS algorithm. Adding the uncertainty will bonus and improve this study. Comparison with another multi-objective algorithm is necessary. Otherwise, the knee point should be used to define a compromise solution.

Movahediyan and
Askarzadeh [39] 2018 Considering the operating reserve impact in the sizing problem.
Other systems need to be included in the study.
Ghiasi [40] 2018 PV/wind/battery grid connected MOPSO, MOGA -Availability -Cost The use of the availability factor in the inter-connected system.
The reliability could be considered for extending this method.
The rest of the paper is organized as follows: Sections 2 and 3 provide the modeling of the systems used in the whole scenarios and the optimization problem formulation, respectively. Section 4 discusses the proposed algorithm. Section 5 describes the case study. Section 6 presents the results and discussions. Finally, the conclusions of the paper are presented in Section 7.

Mathematical Description of the Proposed Hybrid System Components
The schematic diagram of the suggested HRES is shown in Figure 1. In this system, four scenarios, including the PV power plant, WT power plant, diesel generator, biomass, and BESS are considered. This microgrid is an AC system as all RESs are linked to the same AC bus. In this study, the DC sources, such as the PV, WT and BESS are linked to the AC bus through DC/AC inverters. The WTs also need a controlled inverter to regulate the output power in terms of the specified voltage and frequency. Two strategies are adopted in this paper; in the first strategy, the combination of biomass/PV is considered, as shown in Figure 2. In the second strategy, PV or wind or both of them are considered as shown in Figure 3. For either strategy, the proposed operation of the microgrid resources is as:

•
The PV and WT are used firstly as the main power sources to feed the load needs.

•
The BESS operates when the PV and WT cannot feed the full load. • The biomass system starts working when the battery depletes to a minimum permissible power and the load power exceeds 30% of its nominal power.

PV System
The output power of the PV system depends on many parameters as [35]: where, I represents the solar irradiation, A pv represents the PV area and η pv is the efficiency of the PV, which can be calculated as: where, NOCT is the nominal operating cell temperature ( • C), η r is the reference efficiency, η t is the efficiency of the MPPT equipment, β is the temperature coefficient of the efficiency, T a is the ambient temperature ( • C), and T r is the photovoltaic cell reference temperature ( • C).

Wind System
The output power of any WT depends mainly on the wind speed as [36]: where, V represents the wind velocity, P r is the rated power, V ci , V co and V r are the cut-in, cut-out and rated wind speeds, respectively, a, b are two constants expressed as: The wind rated power is expressed as: where, ρ represents the air density, A wind is the swept area of the wind turbine, and C p is the maximum power coefficient ranging from 0.25 to 0.45.

Biomass System
Biomass is a renewable energy system that produces power given by the expression [37]: where, T BM is the total organic material of biomass (Ton/year), C V_BM is the calorific value of the organic material, which equals 20 MJ/kg, η BM is the biomass efficiency of 24% and O t presents the operating hours each day.

Diesel System
The diesel generator is used as a back-up source of energy, and it only works when needed. The output power of the diesel generator is calculated as [38]: where, F dg is the fuel consumption, P dg,out is the output power of diesel generator, A g and B g are constants of the linear consumption of the fuel.

BESS System
The BESS is a mandatory element for the isolated hybrid systems. The battery is charged when there is extra power and it is discharged when the load needs power more than the available from other sources. The capacity of BESS is expressed as follows [38]: where, E l is the load demand, AD represents the autonomy daily of the battery, DOD is the depth of discharge of the battery, η inv and η b are the battery and inverter efficiency, respectively.

Net Present Cost
The NPC is the primary factor to be considered for any project design. It is counted as a sum of all components costs, including the capital, operation & maintenance, and replacement costs, taking into account the interest rate (i r ), inflation rate (δ), and escalation rate (µ). NPC modeling is expressed as follows [39]:

PV and WT Costs
The cost modeling of PV and WT are similar. The capital cost of PV or WT (C PV,WT ) is expressed based on the initial cost (λ PV,WT ) and area (A PV,WT ) as follows [40]: The operation & maintenance costs (OM PV,WT ) are expressed as: where, θ PV,WT is the annual operation & maintenance cost for any component, N is the project lifetime. The replacement costs are considered null because the project lifetime and the PV or WT lifetime are the same.

Diesel Costs
The costs of the diesel generator are modeled as follows [39]: where, C dg is the diesel investement cost, λ dg is the initial diesel cost, OM dg represents the operation and replacement cost, θ dg is the annual O&M cost of diesel, N run is the number of diesel-run in the year, R diesel is the diesel replacement cost, R dg represents the annual replacement cost of diesel, p f is the cost of the fuel, F dg is the consumed quantity of fuel and FC dg is the total fuel cost.

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

Biomass Costs
The biomass cost is represented as [35]: where, λ bg is the initial biomass cost, θ 1 is the annual fixed cost of O&M, θ 2 is the variable cost of O&M of biomass and P w is the annual working of the system (kWh/Year).

Inverter Costs
The inverter investment and O&M costs are represented as [39]: where, λ inv is the inverter initial cost and θ Inv is the annual O&M cost of the inverter.

Levelized Cost of Energy
Levelized cost of energy (LCOE) is a critical factor, in fact, the consumers don't care about the project cost or its lifetime, but their interest is how much they would pay for each kilowatt-hour of energy. Therefore, the LCOE is a measure of the average NPC over its lifetime, and it is expressed as follows [38]: where, CRF is the capital recovery factor used to convert the initial cost to an annual capital cost, and it is expressed as:

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 [38]:

Renewable Energy Fraction
The transfer from the classical electricity production to the renewable energy project is not easy. The majority of previous work introduced renewable energies partially, while the objective here is to use 100% renewable energy. Therefore, the renewable energy factor is used to determine the percent of the renewable energy used. The renewable energy fraction (RF) is expressed as follows [38]: where, P re represents the total renewable energy power.

Availability Index Fraction
The availability index (A) predicts customer satisfaction, and it measures the energy converted to the load while confirming the ability of the project's designed system. It index is calculated as [40]: where, P bmin is the battery min state, P b is the battery power at instance t, u is 1 when the load is not satisfied and 0 otherwise.

Constraints
In the suggested microgrid system, the operating constraints are:

Invasive Weed Optimization Algorithm
The IWO is a metaheuristic algorithm that has been proposed in [41]. In IWO, the social, reproductive, and competitive behaviors of the invasive weed have been modeled based on four strategies; adapting to any environment, enduring occupation of the fields, high reproduction of seeds, raise the invasive population and exclusion of the lower plant's fitness. These strategies are subjected to the conditions of the invasive weeds and the field occupied. The mathematical modeling of IWO algorithm is presented in the following subsections.

Population Initialization
An invasive weed is a parasite that can be created anywhere, but it is not native to this location. In the IWO algorithm, to mimic the invasive weed, a population of weeds that stochastically spread in a search space with a random position is considered.

Reproduction
The reproduction of weeds is an asexual form where a seed is formed without fertilization, after that, the somatic cells in the mother plant develop into an embryo. The number of seeds produced depends on the weed density. At low densities, there may not be enough pollen to produce more seeds. After the reproduction step, the search space becomes more genetically diverse, which can involve more competition.
Each member of the weed's population can produce seeds depending on its limits and capability. The population grows linearly with each iteration until they subject to a competitive selection if they exceed the maximum allowed plants in the colony. The number of seeds that a weed can produce S i is expressed as follows: where, S max , S min denote the maximum and minimum number of seeds, respectively, f max and f min present maximum and minimum fitness values of the plants in the colony, respectively, f i is the fitness of the plant i.

Spatial Dispersal
The spread of the seeds in the search space is randomly and distributed near the parent plant. However, the standard deviation σ of the random function will be reduced from a previously defined initial value, σ initial , to a final value, σ f inal , in every generation, the decrease of standard deviation will allow controlling the search space. The nonlinear alteration of the standard deviation σ iter is given as follows: where, iter max is the maximum number of iterations, iter is the current iteration, and n is the nonlinear modulation index.

Competitive Exclusion
As explained before, the seeds result from asexual reproduction, and the plant invasive is very strong, which doesn't give up easily. As a result, reproduction increases, and the search space becomes more overcrowded. In the IWO, the search space has a maximum allowed of plants. When reproduction becomes unsupported, a competitive exclusion operation is implemented. The competition between plants is introduced in the IWO algorithm to exclude the exceeds of the maximum allowed number from the plants included weeds and seeds in a colony. The exclusion is applied through a mechanism that eliminates the plants with low fitness in the colony based on a ranked list contains both weeds and seeds. The idea is to let just the strong weeds because they have the most chance of survival and reproduction contrariwise of the poor fitness plants.
The overall steps of IWO algorithm are shown in Algorithm 1.

Backtracking Search Algorithm
BSA is a new optimization algorithm that has been proposed for solving real-valued numerical optimization problems [42]. In BSA, unlike the other evolutionary algorithms, it's mitigating several problems as excessive sensitivity to control parameters, premature convergence, and slow computation. As a result, BSA has only one parameter. Moreover, BSA's performance is not overly sensitive to the initial value of this parameter. BSA's population is generated based on the genetic operators presented in the selection, mutation, and crossover. Moreover, the search-direction matrix and search-space boundaries' amplitude control gives it potent exploration and exploitation capabilities. BSA has a particularity to use a memory containing a random population, which can share its experience for the next generation to guide the search-direction in the best way.

Population Initialization
The population is a sum of individuals which are spread uniformly in the search space. It can be expressed as: where, i and j denote the population size and problem dimension, respectively, low and up denote the lower and upper values of each individual, U expresses the uniform distribution in each individual.

Selection-I
BSA's Selection-I step is dedicated to the memory data used to get a better direction. The memory is called the historical population oldP. The initial historical population is determined randomly as: In BSA, the oldP is redefining at the beginning of each iteration through the 'if-then' expressed in (34): i f a < b then oldP := P|a, b ∼ (0 , 1) where := is the update operation, Equation (34) ensures that BSA designates a population belonging (historical population) and remembers those until it changed. After that, the order of individuals in oldP is randomly changed using a shuffling function as in Equation (35):

Mutation
The mutation is a genetic operator used to maintain the genetic diversity of chromosomes, and it is analogous to biological mutation. The mutation alters one or more gene values in the chromosome. BSA's mutation process is expressed as follows: where, F controls the amplitude of the search-direction matrix, oldP-P.

Crossover
The crossover, also called recombination, is a genetic operator used to combine two parents' genetic information to generate new offspring T. In BSA's, the crossover is the last step to generate the trial offspring, it has two steps. The first step calculates the binary integer-valued matrix (map) that indicates the individuals of T to be manipulated using the relevant individuals of P, for the second one when the map equals to 1, then T update the p-value. The overall steps of BSA algorithm are shown in Algorithm 2.

Hybrid IWO/BSA Algorithm
As with any population-based algorithm, IWO has some problems concerning the competitive capability where the seeds are not taken care of their capacities. As a result, IWO has not good results in the convergence compared with the other algorithms. This proposed IWO/BSA algorithm aims to help the seeds take good fitness, which involves the competitivity in the colony of weeds. The proposed strategy is adapted to subject the seeds to the backtracking search method operators based on the genetic operators denoted in the selection, mutation, and crossover. The BSA algorithm allows involving the global exploration while IWO is giving the best exploitation.
He proposed IWO-BSA algorithm is based on the following steps, initialization, reproduction, then, the generated seeds are treated using the BSA operators as, Selection I (to select the current and historical populations), mutation, crossover, Selection II (to select the optimal population), spatial dispersal and competitive exclusion.

Initialization
The IWO/BSA algorithm population is a set of invasive plants (weeds); the population is randomly spread in the search space.

Reproduction
As like in the IWO algorithm, the reproduction of weeds is an operation based on an asexual generation of seeds without fertilization. The seeds number generated of each weed is calculated using Equation (30).

Algorithm 2: BSA
Initialize a set of random population P i = (X 1 , X 2 , . . . , X N ) and historical population oldP i = (X 1 , X 2 , . . . , X N ) within the limits X i min ≤ X ≤ X i max . Initialize set the only BSA parameter called the mix rate and take the best fitness at the inf value. Evaluate the objective function for the P i . While (iter < iter max ) Selection-I look at equations 24,25 and 26 Mutation calculates mutant using: Mutant = P + F.(oldP − P) where F = 0.6 randn Crossover calculates the trial population T: map j i = zeros if (c < d |c, d ∼ U(0 , 1)) then for i from 1 to N do map(i, u(1 : mixrate.rand.dim)) = 0 | u = permuting ((1, 2 . . . D)) end else for i from 1 to N do, map(i, randi(D)) = 0 end Generate the Trial population, T := mutant for i from 1 to N do for i from 1 to N do if map i,j = 1 then T i,j := P i,j end end Appling the Boundary Control Mechanism Selection-II evaluate the objective function of T i for i from 1 to N do if f itness T i < f itness P i then f itness P i = f itness T i P i = T i end end Comparison between the actual best solution P best and P i end while Return the final best solution P best

Selection I
The selection-I in IWO/BSA is dedicated to select the historical population and the current population, as presented in Equation (33). To strengthen the plants, they are modeled as chromosomes. The somatic cells of the seed each contain 24 chromosomes (12 maternal and 12 paternal).

Mutation and Crossover
Mutation and crossover is a genetic operator used to maintain the genetic diversity of chromosomes and it is analogous to biological mutation. The mutation alters one or more gene values in the chromosome. It is implemented like in BSA.

Spatial Dispersal
The dispersion of the new seeds is coming after submitting them to the BSA operators. The dispersion is randomly in the search space and distributed as an IWO algorithm. However, the standard deviation σ of the random function is also calculated using Equation (31).

Competitive Exclusion
After the dispersion in the search space, this later becomes more overcrowded. It has a maximum allowed of weeds, which should implement a strategy called competitive exclusion to decrease the colony's number of elements. However, in this stage, a competitivity between weeds appears. The weeds are classed based on their own fitness, and then, the low fitness will be excluded. This strategy is used in IWO algorithm which used a mechanism to eliminate the low weeds fitness.

Selection II
In the Selection-II stage, a weed with a better fitness value than the others is selected as the best global solution. Also, in this stage, we upload the best local solution. The summarized process is shown in Figure 4, while Figure 5 shows the proposed IWO/BSA algorithm's main flowchart.

Case Study
To validate the robustness of the proposed IWO/BSA algorithm, it is utilized for determining the optimal sizing of the proposed hybrid renewable system, which consists of different configurations. These proposed configurations are the PV/wind turbine/biomass/battery, PV/biomass, PV/diesel generator/battery, and wind turbine/diesel generator/battery systems. The proposed hybrid systems have been introduced in the isolated mode to satisfy the proposed site's load requirements. The project is applied in Dakhla (Morocco), as shown in Figure 6. The annual load curve for one hour is shown in Figure 7. Figure 8a-d present the solar irradiation, temperature, wind speed, and pressure, respectively. Four standalone system scenarios will be evaluated for covering the load demand in that site, wherein each kind, four different configurations of the hybrid system are studied. These configurations are: (1) PV/wind/biomass/battery, (2) PV/biomass, (3) PV/diesel/battery and (4) wind/diesel/battery systems. The proposed IWO/BSA is validated on optimal sizing of these four hybrid systems, and the optimization results are comprehensively compared with the corresponding ones obtained from AEFA, GWO, BSA, and IWO algorithms. The dumped power is used in an electrical heater with the aim of heating the water for house use.

Results and Discussion
In this section, the optimal design of a proposed hybrid renewable system is achieved using the developed IWO/BSA algorithm. The effectiveness of the proposed algorithm on the suggested system is validated via different scenarios and cases. The optimal sizing is based on minimizing the NPC as an objective function, while the parameters of optimization are: (i) the PV area, (ii) the swept area of the wind turbine, (iii) the rated power of diesel generator, (iv) the nominal capacity of the battery, and (V) the biomass capacity. To confirm the suitability of the proposed IWO/BSA in addressing the studied optimization problem, IWO/BSA, AEFA, GWO, BSA, and IWO are launched 100 times for each configuration and a statistical study is conducted based on a set of measures like the best minimum value of the fitness function. For an in-depth analysis of the obtained results and to ensure the analysis study, four indices are calculated, the NPC, LCOE, LPSP, and the availability. In the next subsections, the optimization results are provided for the standalone system with multiple scenarios. Modeling and simulation of the optimization problem have been accomplished using MATLAB 2015a program, while the adjusted parameters are the same for all studied configurations and the input data are presented in Table A1 in  the Appendix A, likewise the algorithms parameters are presented in Table A2, i.e., the number of maximum iterations is taken as 100 iterations and the search agents' number is 10. The results of the statistical measurements for the proposed IWO/BSA and the other algorithms, AEFA, GWO, BSA and IWO are listed in Tables 2 and 3. From these tables, the reader can conclude that the IWO/BSA technique generates the best minimum value of the fitness function in all cases. The convergence curves of the 100 iterations for all the studied configurations using IWO/BSA, AEFA, GWO, BSA, and IWO are shown in Figure 9. From this figure, it can be observed that the convergence characteristics of developed IWO/BSA are better than those obtained by the other optimization algorithms.    The results of the statistical measurements for the proposed IWO/BSA, compared with the AEFA, GWO, IWO and BSA algorithms, are listed in Tables 2 and 3. From Table 2, the reader can conclude that the proposed IWO/BSA algorithm gives the best results for all scenarios. It can also be observed that the hybrid PV/WT/Biomass/Battery system shows a high competitivity using IWO/BSA algorithm. The NPC of the obtained optimized system is 111929 USD, with an LCOE of 0.2574 USD; likewise, the constraints are satisfied, and the project is 100% with renewable sources. Tables 2 and 3 present the results obtained by the developed algorithm, the net present cost function, the optimized parameters results, i.e., (A pv , A wind , P dgn , P Cap_bat , P BM ) for all suggested configurations. From Figure 9, the reader can notice that using IWO/BSA, AEFA, GWO, BSA and IWO algorithms, the best minimum values of the objective function (NPC) is obtained for the first configuration, i.e., hybrid PV/WT/Biomass/Battery. From Table 3, it can be observed that IWO/BSA gives the minimum value of NPC in all cases. The datasheet of technologies is presented in Table A3 in the Appendix A. Figure 10 shows the output power of the studied systems through annual power management. Figure 10a, shows the output power of the PV/WT/Biomass/Battery, where the power from the wind turbine represents the important contribution which reaches 90% as shown in Figure 11a. Otherwise, the PV represents only 9% of power contribution, and the biomass is not considered in the optimized system. Figure 10b shows the output power of the PV/biomass system, where it can be observed that the biomass is considered a back-up and presents only 1% of total power production percent Figure 11b. Figure 10c, shows the annual output power of the PV/diesel/battery system, it is observed that the main unit is the PV system with 97% as shown in the Figure 11c, while the diesel generator contributes to 1% power production. Figure 10d, shows the annual generated power of the WT/diesel/battery system, where the wind system generates 98% of the power, while the battery and diesel systems used as a back-up, and they don't pass more than 1% of the power generation as shown in Figure 11d.    Figure 12a, shows the time response of the PV, wind, biomass, battery, and load powers. It is observed that the power from the wind is dumped, while the power from the PV feeds the load. Figure 12b, shows the time response of the PV, biomass, and load powers, where the dumped power is null. Figure 12c, shows the time response of the PV, diesel, battery and load powers. It is observed that the PV is the pillar of the system, while the diesel is considered as a back-up. Figure 12d, shows the time response of the wind, battery, diesel, and load powers, where it is observed a significant dumped power generated by the wind turbine.   Figure 13 shows the state of charge (SOC) in the three cases when the battery is used. In Figure 13a,c, the SOC is mostly charged because the systems have the wind turbine system. In Figure 13b, the SOC is a square signal, because the battery is charged in the sunniest time and discharge in the inverse. This frequency in each day presents a square signal form. Otherwise, Figure 14 shows the battery's charge and discharge for the studied configurations.  The proposed IWO/BSA algorithm is extensively examined with different case studies and scenarios. The IWO/BSA algorithm gives the best results compared with alternatives for all studied scenarios. The main results can be summarized as follows; the best HMGs in the Dakhla region is the PV/biomass with an LCOE of 0.1184 $. The best algorithm in all case studies is the proposed IWO/BSA algorithm compared with AEFA, GWO, IWO, and BSA.

Conclusions
This paper has proposed a hybrid optimization algorithm, called IWO/BSA, with the aim of improving the performance of the original IWO and BSA algorithms by combining their advantages into an algorithm. The proposed algorithm has been applied for the optimal economic design of a stand-alone hybrid microgrid system in Dakhla (Morocco). Four configurations consist of RES (PV, WT and biomass) with diesel generators and battery storage systems have been suggested. The obtained results showed that the PV/Biomass scenario is the most cost-effective system with an LCOE of 0.1184 $/kWh; otherwise, the best configuration of the microgrid system contained 349.55 m 2 of PV and 18.9940 ton/year consumed by the biomass system; the PV/diesel/BESS scenario is also cost-effective with LCOE of 0.1354 $/kWh. On the other side, the LPSP and availability index are satisfied without the need for traditional resources. Additionally, the results showed the proposed IWO/BSA algorithm's ability to reach the optimal solution compared with the original IWO and BSA, and other recent algorithms in all studied cases. The obtained results from this study would be useful material for decision-makers working on developing the renewable energy sector in the Moroccan Sahara region in south Morocco. In the current paper, the parameter tuning of studied optimization algorithms has not been taken into account. In the future work, the parameter tuning of each algorithm could be carried out using Taguchi technique. In addition, it is suggested to apply the proposed IWO/BSA for solving other complex optimization problems.   Inverter efficiency 97% Table A2. Used parameters of Algorithms.