Optimization of Isolated Hybrid Microgrids with Renewable Energy Based on Di ﬀ erent Battery Models and Technologies

: Energy supply in remote areas (mainly in developing countries such as Colombia) has become a challenge. Hybrid microgrids are local and reliable sources of energy for these areas where access to the power grid is generally limited or unavailable. These systems generally include a diesel generator, solar modules, wind turbines, and storage devices such as batteries. Battery life estimation is an essential factor in the optimization of a hybrid microgrid since it determines the system’s ﬁnal costs, including future battery replacements. This article presents a comparison of di ﬀ erent technologies and battery models in a hybrid microgrid. The optimization is achieved using the iHOGA software, based on data from a real microgrid in Colombia. The simulation results allowed the comparison of prediction models for lifespan calculation for both lead–acid and lithium batteries in a hybrid microgrid, showing that the most accurate models are more realistic in predicting battery life by closely estimating real lifespans that are shorter, unlike other simpliﬁed methods that obtain much longer and unrealistic lifetimes.


Introduction
Global warming and the increase of greenhouse gases caused by fossil-fuel-based energy generation have resulted in worldwide concern about future energy supply [1]. These inconveniences have become an opportunity for the use of renewable energy such as solar, wind, tidal, geothermal, and biomass, among others. In 2018, approximately 15% of the total energy consumed worldwide was of renewable origin, and it is estimated that by 2050 this percentage may reach 28% [2]. In terms of electrical energy generated, renewable sources generated 28% of the total worldwide energy in 2018, and it is estimated that they could produce 49% by 2050 [2], reducing fossil fuel dependence and mitigating the effects caused by climate change. However, one drawback of renewable sources is their unpredictable nature and intermittency. To overcome this drawback, an attractive solution is to combine two or more energy sources in a hybrid system and include energy storage [3]. For example, photovoltaic power generation can be used during the day and wind power generation (which usually generates more energy) can be used at night, so the two sources of energy complement each other [4,5]. Furthermore, the different energy sources can be managed as a microgrid, which can solve reliability problems and provide an environmentally friendly solution [6]. In addition, increasing renewable energies can cause problems for quality; therefore, it is necessary to have a flexible and intelligent electrical network. One of the fundamental aspects to increase the electrical grid's flexibility is the use of storage systems that allow compensation for the variability of renewable energy sources. Conversely, electricity grids are designed considering energy sources that do not present variability, which happens with renewables, so electricity grids must have enough back-up capacity. Storage capacity is essential, thus making it possible to increase renewable generation while avoiding the possible problems that could be caused by its variability [3].
Hybrid microgrids are a new solution in remote areas that are difficult to access or that do not have access to conventional power grids [7]. In hybrid microgrids based on renewable energy, one of the main elements that support the energy supply due to the variable intermittency such as radiation or wind, as mentioned above, is storage technologies, and batteries in particular are the most suitable and convenient.
Batteries are the most widely used storage devices in hybrid systems due to the maturity of technologies such as lead-acid and the emergence of technologies such as lithium-based batteries. The latter represents an attractive option due to their high energy density, longer life, and better environmental sustainability [8]. In addition, lithium batteries have seen a price reduction between 8-16% annually [9].
Batteries represent a high cost within a hybrid microgrid, and their performance and duration mainly depend on the microgrid's operation. Battery life estimation is crucial since it influences the replacement costs and, therefore, the total system cost [10]. The batteries' optimal operation within a hybrid microgrid is influenced by factors such as technology, the amount of charge and discharge cycles, the current, and the operating temperature, among others [11,12]. Parameters related to aging by degradation and corrosion have been represented by authors, such as the model by Schiffer et al. [13] that used weighted cycles and applied to lead-acid batteries. Based on this model, a comparison of lead-acid battery life prediction models was presented by Dufo-López et al. [14]. For battery life prediction, models based on equivalent cycles or "Rainflow" cycle counting models have traditionally been used [15]. As for lithium batteries, there are models (e.g., Wang et al. [16]) that include parameters such as the cycled charge (Ah) over time, charge and discharge currents, and temperature, applicable to LiFePO4/graphite (LFP) batteries. Other models for the same type of lithium batteries, such as that of Groot et al. [17], study their degradation when subjected to asymmetric charge cycles and at different temperatures. Conversely, Saxena et al. [18] considered an aging model based on state of charge (SOC) for lithium cobalt oxide LiCoO2/graphite batteries.
When batteries work in real conditions, the way they degrade and age differs from laboratory tests, so that the lifespan may be shorter than expected, as demonstrated in [19] for lead-acid batteries. When optimizing isolated hybrid systems, it is essential to consider battery aging and degradation models to estimate parameters such as net present cost (NPC) and levelized cost of energy (LCOE) [19]. In [20], the authors presented an optimization of microgrid-insulated diesel-solar-wind power charge states of lead-acid batteries. Other studies have compared aging models for lead-acid and lithium batteries used in isolated photovoltaic systems [21,22].
The optimization of isolated hybrid systems mainly depends on predicting battery life, since an erroneous or overly optimistic prediction can lead to a poor estimate of the system costs. The importance of these considerations has been highlighted in recent publications [23,24]. However, it is necessary to consider these factors in systems where the actual and climatic conditions of operation differ considerably from the datasheet and the expected life of the battery according to laboratory tests.
This article presents the optimization of an isolated hybrid microgrid considering different lead-acid and lithium battery technologies and models. The system integrates solar modules, a battery, a wind turbine, a diesel generator, an inverter, and a charge controller. In addition, this system is optimized considering different battery models and technologies. In the second section, the different battery aging models are presented. In the third section, the microgrid under consideration is shown, and the results are presented in the fourth section. Finally, the conclusions and future work are presented.

Materials and Methods
Battery aging models represent essential aspects such as anodic corrosion, active mass degradation, loss of adhesion to the grid, formation of lead sulfate in the active mass, loss of water, and electrolyte stratification [25]. Conversely, the models used for lithium batteries analyze capacity and power losses, impedance increase, and the effects caused by temperature [26]. The different lead-acid and lithium battery models considered in this study are described below.

Simplified Model of Equivalent Ah Cycles
This model is used by optimization programs such as HOMER [27]. In this model, battery life is supposed to be reached at the end of a finite number of charge and discharge cycles, and the number of cycles is usually shown in the battery datasheet. The IEC 60896-11: 2002 [28] establishes the number of cycles. However, this model does not consider the battery's operating status (e.g., SOC, temperature, acid stratification in the case of lead-acid batteries, current, and the amount of time the battery has not reached full charge). The number of complete cycles (Z n ) is calculated by Equation (1): where I dischbat (t) (A) is the absolute value of the discharge current. C n is the nominal capacity of the battery (Ah). If Z n (t) = Z IEC (when the number of cycles performed from the beginning of life until time t (h) is the same as the IEC number of cycles provided by the manufacturer), then the end of the battery life is reached.

Cycle Counting or Rainflow Model
The cycle-counting model, also known as "Rainflow," is based on the Dowing algorithm [29]. This model is based on the Z i cycle count, corresponding to each Depth of Discharge (DOD) range (%), which is divided into m intervals for 1 year (an average year or the whole life). For each interval, there are several cycles until failure (CF i ). The battery life is calculated by Equation (2): This model takes into consideration the depth of discharge of the cycles; however, it does not take into account the batteries' operating conditions, such as acid stratification, current, and temperature.

Schiffer et al.'s (2007) Model
The Schiffer model is a weighted charge model (Ah) proposed by Schiffer et al. [13] specifically for lead-acid batteries. The actual cycled charge in Ah is multiplied continuously by a weight factor that fully represents the battery's actual operating conditions, considering the SOC (e.g., temperature, acid stratification, current, and the time it takes without reaching full charge) during the battery lifetime. The end of the battery's lifetime is reached when its remaining capacity corresponds to 80% of the nominal capacity. Users can adapt this model to different battery types using the lifetime and flotation datasheet. Complex calculations to calculate the final loss of battery capacity due to continuous corrosion and degradation are made using Equation (3): where C corr is loss of corrosion capacity, C deg is degradation capacity losses, and C d (0) is initial normalized battery capacity.
This model allows us to model the charge controller and configure the protections against overloads and other parameters.

Wang et al.'s (2011) Model
Wang et al.'s (2011) model provides a life cycle model for LiFePO4/graphite lithium-ferrophosphate batteries considering parameters such as accelerated charge/discharge tests under different temperature conditions and discharges depths [30]. At low charge rates, the results indicate that the loss of capacity is significantly affected by time and temperature, whereas the effect is less important in the depth of discharge. This model underestimates the loss of capacity at 60 • C and overestimates it at 45 • C. The authors obtained a percentage of capacity loss given by Equation (4): where T is the absolute temperature in kelvins and A h is the amount of charge (Ah) involved in the charging process since the start of battery operation. This equation is valid for charge rates equivalent to C/2; that is, 2-h full charge and discharge times. Charging rates are evaluated from this value up to 10C; that is, the battery will be fully charged in one-tenth of an hour. In our paper, we use this equation during the average year or the whole life.

Groot et al.'s (2015) Model
Groot et al. [17] obtained an empirical equation for lithium batteries of 2.3 Ah. It is shown that the life cycle of LiFePO4/graphite lithium-ferrophosphate batteries not only depends on the rates of charge and discharge (current), temperature, and depth of discharge, but is also affected by the pauses between charge and discharge times and those dependencies are highly nonlinear. To model the above, they proposed an empirical relationship given by Equation (5): where Q EOL is the charge that the battery can deliver in its lifetime (kAh), I is the charge rate, T is the temperature in • C, and a, b, C, d, e, and f are adjustment constants. In our paper, we use this equation during the average year or the whole life.

Saxena et al.'s (2016) Model
Saxena et al.'s (2016) model [18] quantifies the life cycle for lithium oxide cobalt LiCoO2/graphite batteries subjected to charge states between 0-60%. It develops a model that estimates the batteries' loss of capacity and the influence of the SOC and the rate of charge. Percentage of capacity loss is modeled by Equation (6): where SOC mean is the average SOC (30-50%), ∆SOC is variation of the SOC (100-60%), EFC is equivalent full cycles, and K1, K2, K3 = 3.25, 3.25, and 2.25, respectively. In our paper, we use this equation during the average year or the whole life.

Aging by Calendar Model
This model considers two options for determining age, the first proposed by Petit et al. [30], which takes into account the loss of battery capacity due to two factors: current and temperature. Equation (7) describes this model: where B cyc is an exponential factor in Ah 1−Zcyc , which depends on the current, Ea cyc is the activation energy expressed in J mol −1 , γ is a coefficient to determine the acceleration in aging due to the current J mol −1 A −1 , |I| (A) is the absolute value of the current, R is the gas constant (8.314 J·mol −1 ·K −1 ), T is the absolute temperature (K), and Z cyc is a constant with a value close to 0.5. Swierczynski et al. [31] presented the other model that considers the storage temperature, the number of cycles, and depth described using Equation (8): where t m is the storage time in months, T is the temperature in • C, and SOC st is the SOC at which the battery is stored (%). The iHOGA (improved hybrid optimization by genetic algorithms) [15] software version 2.5 allows selecting any of the two models. The value of the current is limited in such a way that when the current is below C times , the nominal capacity of the batteries' (0.2 by default) calendar aging model is used, and when it is higher, a cyclic aging model is used. In our paper, we use these equations during the average year or the whole life.

Economic Calculations
iHOGA software performs the simulation of different combinations of components (photovoltaic (PV) generator, wind turbine/s, battery bank, diesel generator, etc.) during a whole year, in hourly steps, except for the cases where the Schiffer et al. [13] model for the battery is selected. In these cases, the simulation is also performed in hourly steps during the number of years of the battery lifetime (a priori it is not known, but it becomes known when the battery's remaining capacity has dropped to 80%).
For each combination of components and control strategies of the system, NPC and LCOE must be calculated so that the genetic algorithm [32] used by iHOGA can calculate the fitness of each combination and finally, after several generations, achieve the optimal system (the optimal combination of components and control strategy).
The NPC (€) of a combination of components i and control strategy k (NPC i,k ) is obtained considering the acquisition cost of all the components, the installation and replacement costs of the components, the operating and maintenance (O&M) cost, and the fuel cost during the system lifetime, Life system (years). All the cash flows are converted to the initial moment of the system (hour 0, year 1), considering inflation and interest rates [23]: where j is the different components, t y is one year of the system lifetime, Cost j is the acquisition cost of component j, NPC repj is the sum of the replacement costs of component j during the system lifetime minus the residual cost of component j at the end of the system lifetime, Cost O&Mj is the annual O&M cost of component j, Inf general is the general annual expected inflation, I is the annual interest rate, Cost fuel is the annual cost of the fuel used by the diesel generator, Inf fuel is the annual expected diesel fuel inflation, and Cost INST is the installation cost. The LCOE (€/kWh) of a combination of components i and control strategy k (LCOE i,k ) is calculated as follows: where E load (kWh/yr) is the annual expected load of the system.

Case Study
The microgrid considered for this study is located in the community of Nazareth (Department of La Guajira, Colombia), and its coordinates are latitude 12 • 20 52.14" N, longitude −71 • 16 8.80" W. This place belongs to Colombia's non-interconnected area (the Spanish acronym ZNI is used for these areas); however, it is located in a geographical place with a high potential for solar and wind resources, where proposals for microgrids have been made [33,34]. In addition, this area is characterized by not having 100% energy supply coverage. Figure 1 shows the microgrid. The load profile is obtained according to the Energy Solutions data for the non-interconnected areas of Colombia IPSE (the government branch that plans and promotes these energy systems) [36], with an average temperature of 27 °C [37]. Table 1 shows the irradiation and wind data of the system installation site obtained from [38]. It can be seen that variation in irradiation and wind throughout the year is not very high. This situation is typical at latitudes close to the equator [39,40]. This small variability in wind and photovoltaic resources throughout the year allows for better use of renewable sources than at other latitudes [6]. The average daily electricity consumption is 30 kWh/day. The consumption is for households and street lighting. As it is an isolated microgrid, not interconnected with an electricity system, consumers of the microgrid cannot participate in the Colombian electricity market as self-consumers. The high number of areas not connected to the electricity grid is one of the most significant obstacles for renewable energy sources to participate in the Colombian electricity market [41].  The load profile is obtained according to the Energy Solutions data for the non-interconnected areas of Colombia IPSE (the government branch that plans and promotes these energy systems) [36], with an average temperature of 27 • C [37]. Table 1 shows the irradiation and wind data of the system installation site obtained from [38]. It can be seen that variation in irradiation and wind throughout the year is not very high. This situation is typical at latitudes close to the equator [39,40]. This small variability in wind and photovoltaic resources throughout the year allows for better use of renewable sources than at other latitudes [6]. The average daily electricity consumption is 30 kWh/day. The consumption is for households and street lighting. As it is an isolated microgrid, not interconnected with an electricity system, consumers of the microgrid cannot participate in the Colombian electricity market as self-consumers. The high number of areas not connected to the electricity grid is one of the most significant obstacles for renewable energy sources to participate in the Colombian electricity market [41].  Figure 4 shows the load profile during a typical day.       The voltages in the microgrid are 48/220 V (CD/AC), the wind turbine power is 600 W, the inverter charger is 500 VA/48 V/70 A, the charge controller is PWM/48V/40A, and the diesel generator power is 1.6 kW. The other system data are summarized in Tables 2 and 3.  4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 Power (W) Time ( h) The voltages in the microgrid are 48/220 V (CD/AC), the wind turbine power is 600 W, the inverter charger is 500 VA/48 V/70 A, the charge controller is PWM/48V/40A, and the diesel generator power is 1.6 kW. The other system data are summarized in Tables 2 and 3.
The system's lifetime is considered the same as a PV generator's expected lifetime (the most common PV lifetime considered by researchers all around the world is 25 years). The economic data used to calculate the NPC of the actual system are shown in Table 4, obtaining the results of Section 3.1.  In this work, electricity supply optimization has been carried out for this case, considering various possibilities for the PV generator size, as well as for the wind turbine, diesel generator, and lead-acid batteries. In addition, various lithium battery sizes have been considered. Tables 5-9 show, in detail, the parameters used in the optimization for each of the system components.    Optimization means also looking for the optimal control strategy between the two preselected options by the iHOGA software [42]. The two global strategies are as follow: • Demand monitoring: Based on systems that include batteries and either diesel or gasoline generators, when the energy from renewable sources is not enough to meet the demand, the batteries will provide the rest of the energy. If the batteries cannot cover all of the demand, then the generator will work to meet the rest of the demand.

•
Cyclic charging: If the generator is required to provide power, then it will only work at its nominal power not only to meet the demand but also to charge the batteries only during that hour. This strategy may have a variation called a cyclic strategy up to the setpoint, which means that the diesel generator will continue to operate at its nominal power until the battery bank reaches a specific value of SOC charge status, which is at 95% by default. Table 10 shows the simulation results of the current system obtained from the data summarized in Section 2, considering different battery-aging models. It is observed that the battery life is shorter with the Schiffer model (the most realistic model), and therefore more replacements are necessary throughout the system's lifetime (25 years), so that NPC and LCOE are higher than using the other less realistic models.

System Optimization
Various optimizations have been made considering the different component options detailed in Section 2 (Tables 5-9). For each battery life model, two optimizations have been made, one for a hypothetical case of an average temperature of 20 • C and another for the real average temperature of the system's location, which is 27 • C. Table 11 shows the results for the microgrid optimization considering the three aging models for lead-acid batteries (equivalent cycle model, Rainflow, and Schiffer et al.). Classic models such as equivalent cycles and Rainflow present similar results, both in the expected lifetime as well as factors such as NPC and LCOE. These costs are higher when considering Schiffer's aging model, which is more realistic, since decreasing the batteries' lifetime would require more replacements during the project lifetime and therefore increase the total system cost.
It is also observed that using the equivalent cycle and Rainflow models, the battery lifetime is that of the floating lifetime since few cycles are performed per year. There is a reduction in the batteries' lifetimes due to a 39.2% temperature increase using the real average temperature (27 • at the installation site) compared to the case of 20 • C (the reduction is of the order of 50% for every 8.3 • C increase [43]). This reduction is much lower when using the Schiffer model since it considers many more parameters in addition to the temperature and cycles.
Considering the most realistic model (Schiffer) at the real average temperature (27 • C), the best system would be composed of the following: PV with 31.9 kWp capacity, diesel with 1.9 kVA capacity, wind with 660 W capacity, batteries with a 89.520 kWh energy storage capacity, inverter of 5 kVA capacity, with demand monitoring as the optimal control strategy, a battery life of 5.52 years, a NPC of €104,690, and an LCOE of €0.36/kWh. Compared to the result of the current system, considering the Schiffer model (Table 4), where the NPV is €119,458 and the LCOE is €0.49/kWh, it is observed that the current system is not optimal.
The results for one of the optimal cases obtained are shown in Figure 5 (with lead-acid batteries, Schiffer aging model, and at a temperature of 27 • C). The mono-objective optimization consists of obtaining the lowest NPC. The results show a minimum NPC of €104690 and an equivalent level of total CO 2 emissions during the year of 1824 kg/year.
In Figure 5, the horizontal axis shows the generations of the evolutionary algorithm used by the iHOGA optimization software. An evolutionary algorithm generation is similar to an iteration [32].  (Table 4), where the NPV is €119,458 and the LCOE is €0.49/kWh, it is observed that the current system is not optimal.
The results for one of the optimal cases obtained are shown in Figure 5 (with lead-acid batteries, Schiffer aging model, and at a temperature of 27 °C). The mono-objective optimization consists of obtaining the lowest NPC. The results show a minimum NPC of €104690 and an equivalent level of total CO2 emissions during the year of 1824 kg/year.
In Figure 5, the horizontal axis shows the generations of the evolutionary algorithm used by the iHOGA optimization software. An evolutionary algorithm generation is similar to an iteration [32]. Table 11. Results of the system optimizations in the case of lead-acid batteries, using the three battery life models and with two different values of average ambient temperature (20 °C or 27 °C).   Figure 6 shows the annual distribution of energy generated in this case by the system for a year. The percentage of energy generated by renewables is 96.81%. Of this, 9703 kWh/year is supplied by the photovoltaic generator and 6705 kWh/year by wind turbines, while a smaller contribution is made by the 541 kWh/year diesel generator. The excess energy is 3496 kWh/year, which could be used to charge electric vehicles or to generate hydrogen, which could later be used in fuel-cell-powered electric vehicles [44].

NPC (€)
Generations Figure 5. Results for NPC and CO 2 emissions for every generation. Figure 6 shows the annual distribution of energy generated in this case by the system for a year. The percentage of energy generated by renewables is 96.81%. Of this, 9703 kWh/year is supplied by the photovoltaic generator and 6705 kWh/year by wind turbines, while a smaller contribution is made by the 541 kWh/year diesel generator. The excess energy is 3496 kWh/year, which could be used to charge electric vehicles or to generate hydrogen, which could later be used in fuel-cell-powered electric vehicles [44]. The optimization results considering lithium batteries instead of lead-acid batteries are shown in Table 12. It is considered that the lithium batteries used can be LiFePO4/graphite or LiCoO2/graphite. Wang et al.'s model proved the most optimistic even when compared to the Groot model when the temperature rises, whereas Saxena's model showed similar results for different temperatures because it is based on the SOC. It is observed in the results of Table 7 that even with the most pessimistic model, the NPC and LCOE are much lower than those of lead-acid battery optimizations using the realistic Schiffer model (Table 6), leading to the conclusion that lithium batteries are suitable for this case. The optimization results considering lithium batteries instead of lead-acid batteries are shown in

Discussion
In this work, different models and battery technologies have been compared in the optimization of a hybrid microgrid. The classic lead-acid battery aging models used by various researchers, such as the equivalent cycle model and the Rainflow cycle counting model, generally tend to overestimate the battery's lifespan up to three times its actual duration. However, Schiffer et al.'s [13] weighted model has shown better results since their predictions are closer to the real ones. The results from the different optimizations show that lower net current costs (NPC) and lower LCOE are obtained for both lead-acid and lithium battery models; therefore, it is concluded that the current system is not optimized.
As  [18] model showed the same results despite the variation in temperature, since the model is based on the SOC. Finally, comparing the two technologies (lead-acid vs. lithium), the results show lower NPC and LCOE costs for the case of lithium (compared to the realistic Schiffer model for lead-acid), which allows more optimistic insight into the exploration of new aging models for emerging technologies such as lithium batteries, as they represent an alternative storage technology for hybrid microgrids.

Conclusions
The most relevant conclusions of this work are as follows: 1.
Optimal dimensioning and management of the elements that make up a microgrid give rise to significant energy and economic benefits.

2.
Classic models for estimating battery life provide results that are too optimistic, so it is advisable to use models that are more realistic.

3.
The effect of temperature in the estimation of battery life can be significant, so models that consider this parameter should be used.

4.
Lithium-ion batteries are suitable as storage systems in a microgrid since they give rise to a lower cost throughout the life of the installation due to a longer lifespan than lead-acid batteries and a lower maintenance cost.
These conclusions allow us to state that it is necessary optimize the designs of microgrids not connected to the electricity grid since the economic benefits can be significant. An adequate design will allow for better use of renewable generation, and even take advantage of the surplus energy that can be used in electric vehicles, or in the case of islands, for water desalination. Furthermore, it is necessary to be open-minded and use other storage technologies, in addition to lead-acid batteries, since a lower initial cost does not imply that the total cost, throughout the life of the installation, will be low. Therefore, the use of other generation technologies, such as lithium-ion batteries, should be considered in the design, although their initial cost may be higher.

Conflicts of Interest:
The authors declare no conflict of interest. constant with a value close to 0.5 Z i cycle count Z IEC number of cycles provided by the manufacturer to reach the end of the battery life. Z n (t) number of complete cycles γ coefficient to determine the acceleration in aging due to the current (J mol −1 A −1 ) α PV module temperature coefficient (%/ • C) ∆SOC variation of the SOC (100%-60%) I dischbat (t) absolute value of the discharge current (A)