Reliability and Energy Costs Analysis of a Rural Hybrid Microgrid Using Measured Data and Battery Dynamics: A Case Study in the Coast of Per ú

: Hybrid microgrids constitute a promising solution for ﬁlling the electricity access gap that currently exists in rural areas; however, there is still relatively little information about their reliability and costs based on measured data in real working conditions. This article analyzes data obtained from the operation of a 9 kW hybrid microgrid in the ﬁshermen’s cove of Laguna Grande, Paracas, in the Ica region of Per ú , which has been running for 5 years. This microgrid has been equipped with data acquisition systems that measure and register wind speed, solar radiation, temperatures, and all the relevant electric parameters. Battery dynamics considerations are used to determine the depth of discharge in a real-time operative situation. The collected data are used to optimize the design using the specialized software HOMER, incorporating state-of-the-art technology and costs as a possible system upgrade. This work aims to contribute to better understanding the behavior of hybrid rural microgrids using data collected under ﬁeld conditions, analyzing their reliability, costs, and corresponding sensitivity to battery size as well as solar and wind installed power, as a complement to a majority of studies based on simulations.


Introduction
Electricity is still not available to an important fraction of the world population that lives in remote rural communities, seriously affecting their possibilities of development and integration [1]. This is particularly relevant in developing countries where electricity, communication, and other services are absent in many areas that consequently become depressed and often abandoned by migration and centralism. Grid extension can be considered as a solution for this problem, but in many cases, long distances and complex topography make this alternative expensive and not economically viable, as the return of investment is not favorable due to low energy consumption [2]. On the other hand, using diesel or gasoline generators to electrify small remote communities normally produce an intermittent and expensive service that depends on unreliable fuel and spare part supplies, besides the evident air and sound pollution issues [3]. Fortunately, this situation can be overcome thanks to the remarkable technical developments undergone during recent decades in the field of photovoltaics, batteries, power electronics, and other components that allow using local energy resources to supply electricity to remote locations. Particularly, solar-wind hybrid microgrids can offer reliable, sustainable, and competitive electricity using resources that are generally available on these sites [4,5].
Rural hybrid microgrids, which manage solar and wind resources, constitute a valuable alternative to generate and distribute electricity sustainably using local resources. In the literature, there is a relative abundance of papers related to simulations undertaken to optimize the technical and economic performance of microgrids. Some of them apply sophisticated computational algorithms, such as particle swarm optimization (PSO), genetic algorithms (GA), and teaching-learning-based optimization (TLBO), to name only a few [6,7]. Others apply the well-known commercial software HOMER [8][9][10]. These studies provide valuable insights into hybrid microgrids. However, there is still little information about their detailed behavior and dynamics based on measured data taken in real working conditions and its analysis [11][12][13]. One of the few works that reports and closely analyzes measured electrical data obtained from a real working hybrid microgrid is [11], but in this case, no attention is given to meteorological or economical parameters. More recent works study reliability and costs [14]. Other studies focus exclusively on PV systems' technical performance with measured data [15]. NREL's performance-monitoring initiative for microgrids in Africa [16] specifically refers to "a limited understanding of the actual performance of operating systems" as the main obstacle for these electrification solutions to thrive in the continent.
This work aims to contribute to that aspect by analyzing the results obtained in the Laguna Grande 9 kW hybrid microgrid that has operated since 2016 and has been instrumented with all the necessary devices to measure and register its electrical parameters in parallel with meteorological data (see Section 2). Furthermore, special attention is given to the battery system as the main cost driver component in both initial installation and daily operation. The statistical behavior of the depth of discharge (DOD) of the battery bank in the daily working cycles of the microgrid determines its life expectancy and, consequently, strongly influences the levelized cost of energy (LCOE) [17]. Obtaining the real DOD on a non-stationary working condition requires that battery dynamics concepts and equations must be applied to compensate for the complex effects of battery current and temperature [18]. Naturally, the statistical behavior of wind and solar resources is of great importance to the overall performance and reliability of the microgrid. Time series obtained from the installed anemometer and pyranometer are analyzed in Section 3 together with electrical behavior to obtain relevant patterns of DOD under working conditions. Microgrid performance and economics are discussed in Section 4. A parametric study is performed to understand the effect of varying the size of the battery bank, PV array, and the number of wind turbines on LCOE and loss-of-load probability (LLP). This is the main contribution of this work. Foreseeing the possibility of a system upgrade, HOMER software is used together with the collected data to optimize the microgrid; the results of this study are shown in Section 5. Section 6 is the conclusion of this study. Figure 1 illustrates the stages of the research undertaken in the Laguna Grande microgrid as an existing and working system. The first and second stages were described in [19] (depicted in grey). This paper focuses on the third and fourth stages (in black).

Microgrid Setup
Laguna Grande is a fishermen's cove located 35 km south of Paracas, Ica ( Figure 2). Established in 1973, its population is variable between 50 and 200 people and has scarcely developed with any available services such as electricity and drinking water. Thanks to a grant given by the Interamerican Development Bank (IDB) in 2015, a hybrid microgrid and electric distribution network was installed and commissioned, reaching most of the cove's houses and small businesses. Special attention was given to the social aspects and management of the microgrid to assure its sustainability. From the first day, the community participated in the process and written agreements, leading to the establishment of a managing committee, energy consumption fee, and service conditions [19]. The design stage was completed at the end of 2015 with a methodology described as "intuitive" in [14], taking into account the uncertainties of projected load estimations and technology available in Perú at that time. The microgrid consists of two 3 kWp photovoltaic arrays, one 3 kW wind turbine, power electronics, and an 800 Ah-48 V battery bank. The microgrid diagram and component specifications are shown in Figure 3 and Table 1, respectively.   In order to assess the microgrid's performance in relation to the meteorological conditions, several variables have to be taken into account and therefore measured and registered. Solar radiation is measured in W/m 2 by means of a pyranometer, which is of great importance to quantify the intensity and availability of this resource. Likewise, wind speed is measured in m/s using an anemometer installed near to the turbines but unaffected by them. Precise wind speed measurement is required, especially because wind power has a cubic dependence on it [20]. Wind direction measurements by means of a wind vane are of secondary interest but nevertheless provide information about the stability of the resource. Ambient temperature affects overall performance, particularly of the PV arrays [21] and the battery bank. The temperature of the battery bank is of great importance for its real-time performance and long-term durability [22]; therefore, the measuring layout includes a temperature sensor attached to the batteries. Simultaneously, relevant electric parameters of the microgrid are measured and registered. Battery voltage and current are of paramount importance to calculate DOD. AC voltage indicates if the microgrid is active or if it is down. AC current delivered to load and the corresponding power factor allows calculating power delivered; DC currents coming from the PV and wind turbine controllers allow the corresponding power from these sources to be calculated. Finally, DC current going to the dump loads of the wind turbine controllers indicate excess wind conditions and must be accounted in these events. The voltages and currents measured in the microgrid are shown in Figure 3. The specification of the measuring and registering equipment is given in Table 2 and their layout in Figure 4. An attempt was made to generate a single registering unit for both electrical and meteorological parameters; this proved too time-consuming and was abandoned. The two data loggers are carefully synchronized and operate with identical granularity. Telecom access would be desirable for remote monitoring, but Laguna Grande is far from any cellular network access.  The physical appearance and location of the microgrid's battery bank, electronics, and measuring devices are presented in Figure 5. It is important to note (a) the ample and well-ventilated space available for the microgrid equipment in the community building space, which helps to keep the temperature very stable. Laguna Grande is located in a very windy area of the Peruvian coastal desert (b), where frequent dust storms called "Paraca" blow with wind speeds reaching up to 18 m/s. This presents a particular challenge for the wind turbines and their maintenance, as well as for keeping the PV arrays and electronics clean. The loads that are served by the microgrid are mainly lighting installations, TVs, refrigerators, and some freezers. A distribution network of approximately 500 m was laid to reach all the 35 village houses that agreed to take part in the communitarian electrification project by signing a simple contract. This document basically establishes the service conditions and mutual responsibilities as well as the energy cost and a flat monthly membership fee. All service points are equipped with a meter and main switch to allow consumption to be registered and charged by the community administration. Funds collected are used for maintenance, spares, and battery replacements. It is important to notice that the microgrid was designed assuming a load profile according to an approximate model, resulting in an average of 0.7 kWh/day per service point. In the beginning, this consumption was not achieved; it is rewarding to notice consumption increase each year as a result of community development and a better standard of living, nowadays reaching 0.85 kWh/day. This growth contributes to the economic sustainability of the communal microgrid through an increase in annual revenue.

Data Treatment
Data were registered from October 2019 to June 2020 (see Figure 1) with the considerations described below.
Granularity: All parameters are sampled every second and registered as an average every 10 min.
Electric measurements: As specified in Figure 3, currents and voltages are measured and registered in several key points of the microgrid, including AC voltage delivered by the inverters, battery voltage, DC battery current, DC inverter current, DC currents coming from the 2 PV arrays, DC current coming from the wind turbine, and AC current delivered to the load. In all the measurements, the 25% quartile, median, and 75% quartile are shown to better characterize the variability of the corresponding parameter.
Temperature: Battery outside wall temperature was measured and registered. Solar irradiance: Irradiation profiles, total daily radiation, and derived percentiles are analyzed.
Wind data: Wind speed and wind azimuth are measured. Maximum speed or gust is also registered for that period. Data are processed to obtain the hourly wind speed distribution in percentiles. Wind speed daily profile is relevant to be able to support the load during evening and nocturnal peak hours. Similar statistical analysis to solar irradiance is performed.   Figure 6A shows the available global tilted irradiance (GTI) throughout the day. Solar resource is very consistent in Laguna Grande, as seen by the relatively close percentiles. Irradiance is frequently over 1000 W/m 2 at noon; however, there are some days with total cloud cover that can cause trouble for the microgrid's stability. Figure 6B shows the daily wind speed profile in m/s. As it can be seen, the wind resource in Laguna Grande is also consistent and is available at night, which is very valuable to supply power during the load's peak hours.

Temperature
The measurements taken are exhibited in Figure 6C, showing that battery temperature is considerably stable, ranging from 23 to 27 • C; this is due to the moderate battery currents and the large, ventilated space available in the control room. Consequently, no temperature effects are considered for battery performance and durability.

Load Characteristics
Power required by the total village loads is measured by the electrical data logger, together with the power factor and maximum power delivered in that period. Cumulative daily energy delivered is registered together with the availability of the system measured by means of the output voltage. Figure 6D shows the load profile corresponding to the daily electricity demand of the 35 fishermen's cove power supply points. The daily load profile is substantially consistent, and the presence of a typical peak hour from 6 p.m. to 8 p.m. is evident.

Potential and Measured Power Generation
Potential generated solar and wind power is compared with measured generated power. Finally, the power balance profile is determined, and, consequently, battery voltage daily profiles are shown in Figure 7. Below is a description of the results and a brief discussion about them. As mentioned above, the wind power available per unit area (P W ) is proportional to the cube of the wind speed (v w ) [20] In this manner, the available wind power per unit area in W/m 2 is calculated using an air density of 1.23 kg/m 3 , which corresponds to sea level and a temperature of 25 • C.
The available solar and wind resources can be applied to the corresponding areas of the PV arrays A PV and wind turbines A T of the Laguna Grande microgrid.
If the corresponding efficiencies and power losses shown in Table 3 are considered, the potential captured power in W can be evaluated [20,21]; thus, net input from the PV arrays and turbines can be written as: From (2) and (3), the potential solar and wind powers are obtained and shown in Figure 7A,B. This can be compared with the actual measured PV and wind turbine powers that are shown in Figure 7C,D, respectively.
Measured PV power differs substantially from the potential solar power that could be captured by the arrays mainly because of the absorption stage being reached in the batteries, which lowers the current as a constant voltage established by the MPPT controllers. The wind turbine taking a more dominant role in battery charging can also cause this effect [11]. Captured wind power is sometimes nearly 35% less than expected from the calculated potential power; this can be caused by several factors, including overestimation of the specified power coefficient (c P ) of the wind turbine and generator efficiency or dirty rotor blades but mainly because of competing power input with the PV array. This last cause is evidenced during sunlight hours, as can be seen by comparing Figure 7B,D. Better usage of the installed capacity could be reached by means of demand response by shifting as many loads as possible to midday, but this is not very applicable considering their nature in this case. Another route to enhance energy capture is to increase battery size. This implies higher initial investment and energy costs, as will be discussed in the next section.
From previous results, the measured net power into or out of the battery bank can be obtained by means of the balance between PV and wind turbine combined inputs and output to load consumption, as shown in Figure 7E. By integrating those curves, energy balance is obtained, which shows approximate equilibrium for the median, while the 25% percentile has a deficit of 7.2 kWh/day, and the 75% percentile has a surplus of 6.3 kWh/day. This shows that there is a risk that if two or more low resources days occur consecutively, the battery bank may reach its lower operating voltage, and service will be interrupted. Figure 7F shows the battery voltage daily profile. Typically, minimum voltages are reached between 4 and 6 a.m., after the battery has been supplying energy to the system during the night. In fact, the collected time series show that most service interruptions occur during that period. In turn, maximum voltages are observed between 10 a.m. and 4 p.m., when the power from the PV array and wind turbine has been captured.

Battery Status
Batteries are electrochemical devices that exhibit complex behavior due to several overlapping internal phenomena such as polarization, ion solvation and transport, double layer effects, and diffusion [23,24]. A system's approach to battery behavior considers battery electric current and ambient temperature as input signals, battery open-circuit voltage, battery temperature T bat , battery internal resistance, and battery state of charge (SOC) and state of health (SOH) as output signals [25]. It is important to note that voltage measurements are undertaken in a working condition where there are currents being drained or supplied to the battery, so these must be taken into account to obtain a better approximation to the real DOD. The statistics of the DOD are determinant to the life expectancy of the battery bank and, as mentioned above, to the microgrid economics and reliability as a whole [26]. The relation between measured voltage, battery capacity, working current, and temperature has been extensively studied for lead-acid batteries [27,28], obtaining the empirical Equations (4)-(6) for the discharge and charge stages of single 2V cells: In (4) and (5), V d is the battery voltage in the discharge stage; V c is the battery voltage in the charge stage, before overcharge; I is the battery current; C 10 is the 10 h rated capacity from the datasheet of the battery; and ∆T = T bat − 25 • C. In (4) and (5), the first term relates to the electrolyte concentration, while the second is to the internal resistance variation. Using this set of equations and accounting for the fact that in a 48V system, 24 units of 2V cells are used in series, the DOD is derived in Section 4 with a good approximation for real-time working conditions. This is particularly analyzed during critical early morning hours when the battery bank is in discharge, and the highest values of DOD are reached.

Microgrid Performance and Economic Analysis
This section presents the performance and economic analysis of the Laguna Grande microgrid. The reliability, investment, and energy costs reached by using measured data and battery dynamics are analyzed. This analysis is one of the main contributions of this study (see the third stage of Figure 1).

DOD Frequency Distribution
As mentioned above, the technical and economic performance of the microgrid depends heavily on the battery bank behavior, and this, in turn, depends strongly on the DOD to which it is subjected. According to the registered data, the highest DOD occurs early in the morning, and its frequency distribution determines the expected lifetime of the bank in terms of daily charge-discharge cycles. According to the manufacturer's specifications, battery duration is considered when a SOH of 60% is reached as a function of the number of charge-discharge cycles at a certain DOD. This is shown in Figure 8 for VRLA-GEL batteries installed in the microgrid. Additionally, VRLA-AGM (absorbent glass mat) and Lithium-Ion LiFePO4 (Lithium Iron Phosphate) technologies are included for comparison. To determine the approximate DOD in a working condition with a measured battery voltage in discharge V d , Equations (4) and (6) are used, considering the discharge current at that time on each of the eight groups of four batteries in strings composed of 24 2V cells. It is important to point out that the voltage vs. DOD behavior of a sample VRLA-GEL battery unit was validated in discharge tests under laboratory conditions. This is shown in Figure 9. Battery voltage time series are examined to determine the frequency distribution of the calculated DOD in percentile increments of 10% and translated into the corresponding expected duration in cycles. This is shown in Figure 10, resulting in an average estimated lifetime of 1230 cycles, equivalent to 3.37 years considering daily charge-discharge cycles. With this battery duration, five battery bank renewals will be required during the 20-year lifetime of the microgrid. This result follows reasonably well what has been verified as an average experience running the microgrid for 5 years, being aware of the complex behavior that batteries can show, failing prematurely or occasionally lasting more than expected.

Loss of Load Probability
This is an especially important performance indicator. In this paper, it is defined as: where t L is the time duration of instances where the load is not attended by the system, and t M is the total time of measurement [18].
LLP directly affects the quality of the microgrid's service to the community. Naturally, it also affects the cost of electricity, as there is no consumption during power outages, so delivered energy will be affected, and consequently, revenues will be lower. The availability of nocturnal wind power allows the loads to be supported during peak hours. If wind is absent and nocturnal demand is high, the battery voltage may drop below the allowed minimum of 43 V before dawn. At this point, the inverters will stop working, causing a power outage until the PV input is activated again.
Battery size is determinant with respect to LLP [29,30], with behavior as shown in Figure 11A. The time series shows that not all power outages are caused by a low battery condition; often, an overload or user mishandling can be the cause. In the case of the Laguna Grande microgrid, with its 38.4 kWh battery bank, approximately 7.2% of LLP is determined by low battery conditions.

Initial Investment and Levelized Cost of Energy
The economic aspects of a microgrid are of great importance to its success and competitive advantage with respect to other solutions for rural electrification, as diesel generator sets and grid extension. In this subsection, a sensitivity analysis is performed for LLP, investment, and LCOE with varying battery bank sizes [31]. A larger battery bank will be convenient to enhance the capture of the available solar and wind power, as shown in Figure 7A,B compared to the present performance in Figure 7C,D; it is also convenient to lower the LLP, as already referred. This is shown in Figure 11A. However, upsizing the battery bank naturally leads to an increase in initial investment and unit investment expressed in USD per installed generation power [32], as shown in Figure 11B,C.
LCOE expressed in USD/kWh is calculated for the system total lifetime of 20 years, for which all the relevant costs of commissioning, operation, and maintenance are accounted for and divided by the projected energy delivered to the loads in the same period as follows [33] where I 0 is the initial investment, M t is the operation and maintenance cost, F t is fuel costs (null in this case), E t is the dispatched energy, n is the years of the life cycle of the system, and r is the financial discount rate. The main cost driver is the battery bank's initial acquisition and periodic renewal according to its estimated duration in charge-discharge cycles. A larger battery is exposed to proportionately lower levels of DOD, leading to longer durability and fewer renewals in the microgrid's total lifetime. Another benefit of a larger battery bank is the lower LLP that, besides evidencing a better service, contributes to delivering more energy to the loads and reducing costs. However, these positive effects do not compensate for the larger initial cost and renewals of a bigger battery bank, even if these are less frequent. Thus, LCOE increases with battery size, as shown in Figure 11D.

Projected Behavior with Varying Installed Generation Power
As seen in the previous subsection, there is a strong dependence on performance and economic indicators with battery size. A compromise solution must be chosen between the opposing effects on LLP and costs. Adjusting installed PV and wind power capacity can also be considered. In this subsection, a sensitivity analysis is performed for LLP, investment, and LCOE with varying sizes of PV arrays and number of wind turbines, considering a fixed demand and VRLA-GEL battery bank size of 38.4 kWh. This is shown in Figure 12. The PV array is considered to vary from 80% to 220% of its present value (6 kWp) and installed 3 kW wind turbines, from none to three units. Increasing installed power leads to lower values of LLP with a diminishing effect, as shown in Figure 12A. In this case, it is interesting to note the marked contribution of a lower LLP from a single wind turbine that can supply power during peak hours, often in the most critical early morning period. Installing more wind turbines has a positive but diminishing effect. Naturally, investment increases with installed power, and unit investment decreases as battery size is considered fixed, as shown in Figure 12B,C, respectively. LCOE behaves as a result of the combined effects of increasing costs but also increasing delivered energy by means of a lower LLP, as shown in Figure 12D. This is clearly the case when no wind turbine is considered (red line), and LCOE increases dramatically as the PV array is reduced to 80% due to a very large LLP that substantially affects delivered energy. Thus, under a fixed demand and battery size scenario, installing wind turbines clearly improves reliability but, due to the fact that the unit cost of small wind power system is considerably higher than PV systems (in this case 3200 vs. 1950 USD/kW), LCOE increases. As PV technology develops and its costs continue to drop, small wind turbine systems become convenient only in very windy locations as Laguna Grande, with an annual wind speed average above 7 m/s. Considering the above-described behaviors can be valuable in designing new hybrid microgrids for rural electrification projects or upgrading existing ones.

Design Upgrade
This section explores a re-design of the Laguna Grande microgrid by upgrading its main components (see the last stage shown in Figure 1). Once this microgrid has been in operation for years, this re-design based on good practices and measured data is one of the main contributions of this study.
The measured wind and solar resources, together with the measured load hourly profile of the Laguna Grande microgrid, are used to feed the well-known HOMER optimization software. State-of the-art PV half-cell PERC (passivated emitter rear contact), LiFePO4 storage technology and corresponding costs are incorporated. The results are given as three possible microgrid configurations with their respective outcomes for LLP, LCOE, and investment, as shown in Table 4. It is remarkable that with LiFePO4 technology, better microgrid performance can be attained with a reduced battery bank size compared to VRLA; this is because HOMER software takes account of the larger currents and DOD that can be managed with this type of battery, as shown in Figure 8. This allows for additional savings in transportation and cabinets, partially compensating for the higher unit costs of LiFePO4. Figure 13 shows the annual profiles of these three cases regarding load and capacity shortage (loss of load) calculated by HOMER. Figure 14 shows the corresponding annual profiles for SOC. The critical winter months from June to August, with low irradiance and lighter winds, are evident in both sets of graphs. It is clear from these results that an eventual microgrid upgrade to Case 1 will bring substantial benefits: with a 12.2% increase in initial investment, only 5.2% in unit investment, LLP is now limited to 3%, and LCOE is lowered from 0.35 to 0.259 USD/kWh. Case 2 uses two wind turbines and considerably less PV, resulting in higher costs compared with Case 1 and LLP of 5%. Case 3, with one wind turbine and less PV, has lower costs, but LLP is inconveniently high at 7.5%. The specifications of this upgraded microgrid are listed in Table 5.

Conclusions and Future Work
The Laguna Grande microgrid and the knowledge gained in its design, commissioning, and maintenance are valuable for the consolidation and success of a sustainable solution to the still important fraction of rural communities in remote areas that do not have the benefit of electricity access. Establishing an effective communal management scheme has also been an important learning process. Designing a successful microgrid requires making proper resource assessment and load characterization to select and size all the components adequately, but particularly the main reliability and cost driver: the battery bank. This study reveals how a compromise was reached between reliability (low LLP), initial investment, and LCOE with a 38.4 kWh VRLA-GEL battery bank. In this microgrid, LLP reaches 7.2%, LCOE is 0.35 USD/kWh, and investment is USD 2687 per kW of installed power. A sensitivity analysis was performed to understand the expected behavior of the microgrid by varying the size of the battery bank, PV array size, and the number of installed wind turbines. The reported behavior can be useful for future designs or upgrading existing ones. Optimizing the present microgrid with HOMER software together with state-of-theart technology and costs shows that clear benefits can be obtained through substantially lower LLP and LCOE with a relatively minor increase in initial investment.
Taking this work as a starting point, future activities include validating the benefits of incorporating Lithium-Ion technology as the new electric energy storage horizon. This technology promises better performance and electricity costs, as it becomes progressively more competitive through research and massive production. Another initiative is to investigate the possibility of reaching higher reliability standards without substantially affecting the LCOE by incorporating low-load diesel technology into the microgrid [34]. Variable diesel generators can contribute to lower LLP without the high costs and maintenance problems that accompany standard backup diesel units in rural microgrids. Further research can be undertaken considering the analysis of parameter uncertainties and robust optimization techniques.

Data Availability Statement:
The data presented in this study are available on request from the corresponding author.