A Novel Numerical Algorithm for Optimal Sizing of a Photovoltaic / Wind / Diesel Generator / Battery Microgrid Using Loss of Load Probability Index

This paper presents amethod for determining optimal sizes of PV array, wind turbine, diesel generator, and storage battery installed in a building integrated system. The objective of the proposed optimization is to design the system that can supply a building load demand atminimumcost andmaximumavailability.Themathematicalmodels for the system components aswell asmeteorological variables such as solar energy, temperature, and wind speed are employed for this purpose. Moreover, the results showed that the optimum sizing ratios (the daily energy generated by the source to the daily energy demand) for the PV array, wind turbine, diesel generator, and battery for a system located in Sohar, Oman, are 0.737, 0.46, 0.22, and 0.17, respectively. A case study represented by a system consisting of 30 kWp PV array (36%), 18 kWp wind farm (55%), and 5 kVA diesel generator (9%) is presented.This system is supposed to power a 200 kWh/day load demand. It is found that the generated energy share of the PV array, wind farm, and diesel generator is 36%, 55%, and 9%, respectively, while the cost of energy is 0.17USD/kWh.


Introduction
Hybrid photovoltaic (PV)/wind/diesel power generating system installation has played an important role due to the fact that the system is clean, environment friendly, and a secure energy source.Currently, some research works are carried out focusing on optimization of hybrid PV/wind/diesel power generating system so that the capacity of PV array, wind turbine, diesel generator, and storage battery capacity can be optimally selected [1][2][3][4][5][6].The hybrid PV/wind/diesel power generating system size and performance strongly depend on metrological variables such as solar energy, ambient temperature, and wind speed, and therefore, to optimize the system, extensive studies related to metrological variables have to be done [1].Optimization works related to hybrid PV/wind/diesel system can be found in the literature [1][2][3][4][5][6].In [2,3], hourly meteorological variables such as wind speed, solar energy, and ambient temperature for specific locations in Saudi Arabia are used to design a PV/wind/ diesel generator system.Intuitive mathematical relations have been developed to design the hybrid system but without any optimization.
The application of advanced optimization techniques for designing hybrid PV/wind/diesel systems can be found in [4][5][6].In [4,5], the Strength Pareto evolutionary algorithm is used to optimize a PV/wind/diesel generator system by formulating a two objective optimization problem.The objectives are to minimize system cost and pollutant emissions.The mathematical models of the energy sources included in the hybrid PV/wind/diesel system and the hourly meteorological data are used in designing the system.In [6], an iterative method and evolutionary algorithm are applied to optimize a hybrid PV/wind/diesel generating system.Here, a possible design space for the assumed load demand is first configured, and then an iterative method as well as evolutionary algorithm is used to determine the optimum configuration among the design space configurations.The generated design space contains over 6 million possible configurations.It is found that the evolutionary algorithm is faster than the iterative method in finding the optimum design space configuration [6].However, in this optimization method, the availability of the hybrid system configuration which has availability values in the range of 0-100% is not considered, and this results in a large size of the design space.If a specific availability level is considered, the size of the design space would have been significantly reduced.In addition, actual values of equipment have been used thus making the results limited to the assumed load demand.By using a defined sizing ratio, the method is not case specific and applicable for any load demand.Finally, in [7][8][9], the HOMER software has been used to optimally size hybrid PV/wind/diesel generating systems by considering the weather profile of Malaysia.
In this paper, a novel optimization method taking into consideration the maximum availability and the minimum system capital cost has been developed for optimal sizing of a building integrated PV/wind/diesel generating system.To evaluate the effectiveness and accuracy of the proposed optimization method, it is compared with the method employed in the HOMER software.The meteorological data for Sohar provided by Sohar University has been used in this work.

Modeling of Energy Sources in the Hybrid PV/Wind/Diesel Generating System
The proposed building integrated multigenerator system consisting of PV array, wind turbine, battery storage, and diesel generator as the main energy sources is shown in Figure 1.
The system is designed to supply a building load while the excess energy will be injected to the grid.The building load is mainly supplied by the PV array and the wind turbine.
When the energy produced by the PV array and the wind turbine, is not sufficient to fulfill the load demand, the battery will cover the energy deficit.However, in case that the energy produced by the PV array, wind turbine, and the battery is not able to meet the load demand, the diesel generator will cover the remaining load and charge the battery until reaching its maximum state of charge.
The energy produced by a PV module can be calculated in terms of solar energy and ambient temperature, and it can be expressed as where  PV ,  sun ,  PV ,  INV , and  WIRE are the area of PV array, solar energy, PV module conversion efficiency, inverter conversion efficiency, and wire efficiency, respectively.However, the effect of temperature on the conversion efficiency of a PV module can be expressed as where  PV ref , ,   , and   ref , are the reference PV module conversion efficiency, temperature coefficient for the efficiency, cell temperature, and reference cell temperature, respectively.
The cell temperature is calculated using the ambient temperature as follows: where  ambient ,  Test , and  are the ambient temperature, temperature during testing the PV module, and solar radiation, respectively.
As for the wind generator, its output power is a function of wind speed as illustrated in Figure 2.
From Figure 2, the wind turbine characteristic can be described as follows: The coefficients  1 - 4 can be calculated by using a curve fitting tool such as the MATLAB fitting tool.However, this model is not suitable to be used in an iterative loop with a small step, and therefore, in this research work, the output energy of a wind turbine is done using the wind kinetic energy.The wind turbine output energy depends on the amount of wind power which hits the blades of a wind turbine.As wind is made up of moving molecules which have mass, wind energy is in terms of its kinetic energy, and it is given by where  is the mass of wind molecules (kg) and  is the wind speed (m/s).
Considering that air has a known density of about 1.23 kg/m 3 , the mass which hits a wind turbine with a swept area at each second is given by where   is wind turbine swept area.
Substituting ( 5) into (6), the power of the wind hitting a wind turbine with a certain swept area is given by where  is wind turbine rotor radius.The output energy of wind turbine (  ) is then calculated as follows: where   is the conversion efficiency of a wind turbine.
As for the diesel generator, the output energy can be calculated as follows: Here, it is assumed that the diesel generator reaches its rated power shortly after it starts operating.

Proposed Optimization Algorithm
The proposed optimization algorithm used for optimal sizing of the hybrid PV/wind/diesel generating system is divided into three phases.In the first phase, a design space for the system is generated as shown in Figure 3.The phase starts by defining specification of the energy sources such as the energy conversion efficiencies, PV module area, and temperature coefficient for PV module conversion efficiency, unit costs, load demand, availability level, and metrological data such as solar energy, wind speed, and ambient temperature.The initial values of the sizes for the PV array, wind turbine, and diesel generator are set.The output energy for each size of these energy sources is calculated using the models described in the previous section.Then, the main energy difference which is the difference in energy at the front end of the system and energy at the load side is given by where   and   are the total energy produced and the load energy demand, respectively.The result of (10) is that it may be either positive (  >   ) or negative (  <   ).If the energy difference is positive then there is excess in energy, while if it is negative then there will be energy deficit.The excess energy is stored in batteries in order to be used in case of energy deficit.Meanwhile, energy deficit can be defined as the disability of the energy sources to provide power to the load at a specific time.Therefore, the energy flow across the battery can be expressed as International Journal of Photoenergy  The battery size (  ) is estimated using the excess energy, and it is expressed as where   and   are the charging efficiency and the battery voltage, respectively.To generalize the optimization results, the following parameters are defined: where the numerator term in (13) implies the daily energy produced by the energy source and the denominator is the daily energy of the load.
In the second phase of the optimization algorithm as illustrated in Figure 4, the generated design space is used to perform a simulation of the system in order to calculate the availability level of the system.In this phase, the total output power which is generated by the PV array and the wind turbine is calculated.Then the energy balance is examined by subtracting the load demand from the generated power.At this point, if the energy balance is negative (the generated power is not able to cover the load demand), the battery state of charge (SOC) is checked to find out whether the battery is able to supply energy or not.If the battery SOC is higher than its minimum value, then the battery is supposed to supply the remaining load demand subject to not reaching the allowable minimum SOC.On the other hand, if the battery is not able to supply the load (SOC = Min), the diesel generator is operated to cover the remaining load and to charge the battery.However, if both the battery and diesel generator are not able to cover the remaining load demand, this energy is classified as energy deficit.This procedure is done for each hourly load demand for a duration of one year, and at the end of the year, the total energy generated by PV, wind turbine, and diesel generator is calculated.In addition, the total energy deficit is calculated in order to calculate the loss of load probability.This loop is repeated till reaching the maximum length of the design space array.Finally, all the system configurations that investigate the desired availability level are stored in an array called as the possible configuration area (Figure 4).
In designing the proposed system, it is important to know the power supply availability.100% availability of power supply means that the power supply is able to cover load demand in a year without any interruption.On the other hand, 0% availability of power supply means that the power supply is not able to cover load demand in a year at all.This means that high system availability leads to high reliability and vice versa.However, high reliability systems incur high initial cost, and therefore, it is not feasible to design systems with very high availability rates.The availability of a proposed system is expressed in a statistical value which is the loss of load probability (LLP).LLP is the ratio of annual energy deficits to annual load demand, and it is given by LLP = ∑ 366 =1 Energy deficits  ∑ 366 =1 Energy demand  .
In the third phase of the optimization, the unit costs are defined for each component in the systems, and the system cost is calculated.The system cost includes the capital, running, and replacement costs.Finally, the system with minimum cost is considered as the optimum system.

Test Results
Optimization of the building integrated hybrid PV/wind/ diesel generating system for Sohar, Oman, has been conducted by considering the average hourly solar energy and wind speed which are in the range of 4.5-5.2kWh/m 2 and 1.3-5.1 m/s, respectively.For feasibility of installing the hybrid PV/wind/diesel generating system, the sites must have acceptable average daily wind speed.Figure 5 shows the monthly averages of solar energy and wind speed for Sohar.From the figure, the annual daily average of solar energy is 5.12 kWh/m 2 with the highest value in April and the lowest value in December.Meanwhile, February and March have the highest wind speed, while June has the lowest wind speed.The average wind speed is 4.9 m/s.In this research, the proposed system is supposed to supply a 200 kWh/day (16 kW peak) to a building located in Sohar subject to 1% LLP. Figure 6 shows the design space for the proposed system in which all the configurations are able to supply the load with 1% of LLP.Among these configurations, the optimum configuration is the one which has the minimum cost.The optimization results showed that the optimum sizing ratios (  ,   ,   , and   ) for the proposed system located in Sohar are 0.737, 0.46, 0.22, and 0.17, respectively.From these values, the system consisting of 30 kWp PV array, 18 kWp wind farm, 5 kVA diesel generator at 0.85 power factor, and 2.8 kAh/12 V battery is recommended to supply the load demand.
Figure 7 shows the energy generation shares in the proposed system.The PV array produces 29366 kWh per annum; meanwhile, the wind energy production is 44479 kWh per annum.In addition, the diesel generator produces 6822 kWh per annum.As for the battery, it is used in almost 25% of the year time.Figure 8 shows the energy that is to be sold to the grid and the energy deficit cases as well.From the figure, 7358 kWh per annum is supposed to be sold  turbine unit cost, battery unit cost, diesel cost, scrap costs, and other factors such as assumed life time of the system components.However, the most important reason for the difference in energy source sizes is due the nature of the used meteorological data.The HOMER software uses the monthly average of solar energy and wind speed, and this converts it to hourly values using statistical models which may have a specific error.Meanwhile the proposed optimization method uses the daily solar energy and wind speed.From [11][12][13][14][15][16], the use of monthly meteorological data may cause over sizing or under sizing of the designed system.The advantage of the proposed optimization method is that it provides a daily simulation of the designed system performance to define the availability of the system accurately while the HOMER software does not have this capability.In addition, the proposed optimization method provides useful information about energy generation, excess energy, and exact energy deficit times of the designed system.

Conclusion
Optimization of a building-integrated PV/wind/diesel generator and battery system has been implemented using the proposed optimization method based on iterative simulation.The objective of the optimization problem is determine the optimal sizes of the PV/wind/diesel generators and battery to supply a building load demand at minimum cost and maximum availability.The mathematical models of the various system components have been developed, and the meteorological variables such as solar energy, temperature, and wind speed are used.The results showed that the optimum sizing ratio for the PV array, wind farm, diesel generator, and battery for a system located in Sohar, Oman, is 0.737, 0.46, 0.22, and 0.17, respectively.The cost of the energy produced by the proposed system is 0.17 USD/kWh while the feed in tariff of the system is 810 USD/year.The proposed optimization method is found to give more accurate results compared to the method used in the HOMER software.The proposed optimization method can be applied for determining optimal sizes of renewable energy systems for housing electrification in Oman.

Figure 3 :
Figure 3: The first phase of the proposed optimization algorithm.

Figure 4 :
Figure 4: The second phase of the proposed optimization algorithm.

Figure 5 :Figure 6 :
Figure 5: Average monthly solar energy and wind speed for Sohar.

Figure 9 :
Figure 9: Proposed system by HOMER for the assumed load demand.

Table 1 :
Costs of the proposed system.