Optimal sizing of Battery and Hydrogen Energy Storage Systems configurations in a Hybrid Renewable Microgrid

. Considering the increasing penetration of variable and non-dispatchable renewable energy in worldwide electricity mixes, an increasing requirement for energy storage capacity is foreseen in order to decouple production and demand. Electrochemical battery systems and/or hydrogen systems (electrolysers and fuel cells) provide a suitable alternative to be implemented in local small-to-medium scale microgrid environments. The research aims to address the optimal sizing of an Energy Storage System composed of lead acid batteries and a hydrogen loop (electrolyser, compressed storage tank and fuel cell) within an actual hybrid renewable microgrid located in Huelva, Spain. The energy storage systems must couple the variable production of 15 kW p of solar PV systems and a 3 kW nom horizontal axis wind turbine to a real monitored residential load, which present a time-shifted power demand. By making use of previously developed and validated component models, three storage configurations (battery-only, hydrogen-only and hybrid battery-hydrogen) are assessed via parametrical variation in yearly simulations in hourly timestep, analysing the Loss of Load (LL) and Over Production (OP) output values. The results provide quantitative information regarding the optimal storage system capacity in each configuration providing valuable insight in terms of sizing of the energy storage systems in the long-term.


Introduction
Increasing shares of Renewable Energy Sources "RES" worldwide have caused an increasing need to address the criticalities related to their variable and nondispatchable nature [1]. Energy Storage Systems "ESS" are required to decouple power generation and demand -which can be significantly shifted in time [2] -to allow the mass grid integration of RES which is required to achieve decarbonization and climate change mitigation targets [3]. Indeed, distributed electro-chemical ESS have experienced an exponential installed capacity growth in the last decade, reaching 1.6 GW worldwide in 2016, with a 9-to 38-fold increase foreseen in various 2030 projection scenarios [4].
Microgrid environments are a representative and economically feasible test bench to analyse at system level the balance between large RES shares and different ESS configurations at smaller scale in order to understand their impact on energy supply reliability and cost [5,6], resulting a crucial aspect for upscaled project development.
In particular, by applying a parametric variation approach, the optimal ESS capacity can be determined [7][8][9][10][11][12][13][14][15][16]. Each ESS configuration is evaluated according to a set of target output parameters for reliability, efficiency or cost which quantify the performance of a microgrid [7,11,13] according to the desired requirements or operational criteria and objectives of the energy supply.
The main methodologies and tools used for hybrid storage sizing optimization in microgrid environments are comprehensively reported in Hosseinalizadeh et al. [16] and Abdin et al. [5]. However, most of the analysed studies either implement only one ESS [7][8][9], or are based on simple constant efficiency energy conversion (HOMER) which provides unrealistic operational results [10][11][12][13]. There are fewer examples of fully integrated, model-based studies for hybrid batteryhydrogen ESS sizing optimization [13][14][15][16] although none addressing the parametric variation of the two ESS parameters over the full variability domain. Similar efforts have been reported by Bruni et al. [6] and Cau et al. [17], although the parametrical variation is reported only for one ESS at a time.

Huelva microgridconfiguration
The storage evaluation is tailored for the case study of the hybrid renewable microgrid located in Huelva, which is illustrated in Figure 1. The hybrid AC/DC microgrid is located in Huelva, Spain, and represents a suitable test bench for energy management and optimization analyses, presenting several renewable energy systems at kW-scale and a hybrid battery-hydrogen ESS. The summary of the installed components can be found in Table 1. For the presented study, power is assessed to be exchanged on the DC bus, considering the losses of the electrical conversion systems accordingly.

Meteorological data
The meteorological input data is obtained from a Geographical Information System "PV-GIS" database [18] which provides TMY P-50 (Typical Meteorological Year with P50 uncertainty rate [19]) datasets in hourly resolution for given coordinates. In particular, Global Horizontal Irradiance "GHI", ambient temperature Tamb and W10 (wind speed at 10 m height) data is extracted for the coordinates of Huelva, Spain (Figures 2-4). The GHI data is corrected according to the tilt angle of the installed solar panels via the geometrical relationships presented in [20], while the W10 data is corrected at the actual hub height of the WT (25 m), using a shear factor α equal to 0.3 for "small town with some trees and shrubs" terrains [21] (Figures 2-3).

Load data & analysis
The microgrid is simulated as connected to a real residential load whose data is obtained by the monitoring of a 100 m 2 residential dwelling of a 12apartment building, located in Huelva, Spain [22] - Fig.  5. The dwelling consists in a single-family house with an occupancy of 4-5 people with a preferential use during the morning and evening and during winter season. The contracted capacity is equal to 4.4 kW.
The dwelling under study is divided into several monitored electrical circuits whose aggregate monthly energy consumption is represented in Fig. 6. The thermal demand of the dwelling is partly met by supporting electrical components (Air Conditioning "AC", Heater, Domestic Hot Water "DHW" boiler). All the circuits are continuously monitored by voltage and current sensors which send the measured data every 5 s to the data acquisition system specifically developed by the University of Huelva [22].  The load was resampled to an hourly resolution, in accordance with the modelling timestep (see Section 2.3). The monthly average energy consumption of 466.7 kWh/month and a specific energy consumption of around 55 kWh/m 2 year, within the classification of MEB (Minimum Energy Building) [23], with a yearly cumulate equal to 5.66 MWh/year. The most energyconsuming end circuits result to be the electric boiler for DHW with 34% of the total yearly demand, followed by the general appliances (each around 11-13%) and the electrical heater (12%). The temporal analysis of the monthly consumption shows a decreasing trend ( Figure 6) during summer (up to -35% in August and September respect to the average) respect to the winter period (with the peak consumption in February with +25% respect to the average), mainly due to the electrical heating components (heater and DHW support boiler, accounting together for 46% of the yearly electricity consumption), which is not counterbalanced by the cooling equipment in summer which is seldom used (AC, accounting for only 1% of the yearly electricity consumption) due to the advantageous subtropical climate [22]. The reduction in energy consumption in summer is also due to the reduced use of the dwelling by the inhabitants. The trend of the monthly consumptions of the general-purpose loads are rather stable throughout the year.

Microgrid modelling
The component modelling has been taken from Monforti Ferrario et al. [24] which present a full component model analysis based on custom MATLAB environment and validation for each component. The presented component modelling approach is a trade-off between accuracy and computational effort in order to focus on the system analysis from an energy standpoint by means of yearly simulations in hourly timestep. However, the component performance is always assessed at the specific operating conditions (considering dynamic part-load operation and internal process variables) by implementing correction models or analytical/empirical characteristic curves. The system modelling, developed in Simulink environment, calculates the power balance balance in hourly timestep between the generation and the demand (according to the hourly meteorological data and load data) and assigns net power setpoints to the ESS according to the implemented Power Management Strategy "PMS" logic [24][25][26]. The component models elaborate the provided setpoints, determining the new state of the components' internal variables for each timestep and so on. On top, power threshold and ESS restoration via hysteresis loop control is implemented [24]. The simulations are run in Simulink, setting the standard solver (ode3) for discrete timestep (1 h). The initial values of the ESS must be initialized.

Renewable Energy Generation models
The PV output power has been simulated as a 2variable (radiation and panel temperature) correction model respect to Standard Testing Conditions "STC" as done by Camps et al. [27]. The radiation is elaborated considering the specific inclination of the panels, while the panel temperature is obtained from the ambient temperature via a global heat transfer coefficient k equal to 0.034 °Cm 2 /W for "not so well cooled" PV array type [28]. Each PV panel array is characterised by its datasheet values of Voc (V), Isc (A), Vmp (V), Imp (A), Pn (W) and temperature correction coefficients α and β (%/°C) as well as DC efficiency factors as reported in Monforti Ferrario et al [24].
The WT modelling is done by implementing the power curve provided by the manufacturer as a piecewise function in relation to the wind speed evaluated at hub height, as done by [29]. The output power is zero for wind speeds below cut-in speed (2 m/s) due to the mechanical inertia of the rotor, follows a cubic trend between cut-in wind speed (2 m/s) and nominal wind speed (12 m/s) from which is kept constant equal to the nominal power (3000 W) until cut-off wind speed (15 m/s); for wind speeds beyond the cut-off wind speed (15 m/s) the power is zero to preserve the rotor integrity. The global electrical, mechanical and aerodynamic DC efficiency factor is applied assumed constant and equal to 76% according to the manufacturer's indication [24].

Energy Storage Systems models
The electrolyser (10 kWe; 28 cells) has been modelled from the empirical I-V curves. The near-constant behaviour of the electrolyser voltage with current density justifies the first approximation of constantvoltage operation to obtain the operating current, a new voltage value is successively obtained by spline interpolation from the empirical I-V curves which determines a new value for the current and so on [24]. The polarization and power curves expressed in specific units are represented in Figure 7, respect to the experimental values. The specific results are in line with Ulleberg [30]. Typically, alkaline systems are usually operated at lower current density, in the range of 0.1-0.4 A/cm 2 as shown by Carmo et al. [31] leading to power densities around 0.2-0.8 W/cm 2 in nominal conditions. Also the PEMFC (3.44 kWe; 80 cells) is modelled empirically, based on datasheet values for polarization and power curve reported by the manufacturer. The modelling exploits the fact that, since the PEMFC is operated in the ohmic region (without reaching the concentration loss knee [32]), the current can be extrapolated with a linear expression from the power with reasonable approximation. From the current, the calculation of the voltage can be done applying the empirical expression of the I-V curve (Fig. 8) provided by the manufacturer. The obtained I-V and I-P curves are in line with Fan et al. [32], and Carmo et al. [31].
The produced/consumed hydrogen quantity is directly determined from the stack current by the Faraday law, calibrated in function of temperature and current density based on Ulleberg [30], and is set as input/output to the hydrogen tank. The tank modelling considers hydrogen as an ideal gas [24], leading to a linear variation of pressure respect to the mass input/output. Temperature effects are neglected due to the hourly timestep.
The battery modelling is based on the dynamic battery model proposed by Tremblay [33], adapted by Valverde et. al [34] with decoupled relationships for charge & discharge voltage in function of current and State of Charge "SOC" for a single battery unit. The model was calibrated and validated based on charge/discharge cycling data obtained from the installed batteries (SOC calculated by Coulomb counting and corrected for the Peukert effect) [24]. The voltage curves for a single battery unit are reported in Figure 9.

Energy storage scenarios
The microgrid energy storage is simulated in three configurations: (i) battery-only, (ii) hydrogen-only and (iii) hybrid battery-hydrogen.
The capacity of the hydrogen tank is varied by the geometrical volume (m 3 ) of the tank while the battery capacity is varied by the battery nominal capacity (Ah) in order to maintain the voltage of the DC bus fixed to 400 Vdc. In fact, the battery bank total voltage directly defines the DC bus voltage since the batteries are directly connected to the busbar (Fig. 1). The ESS capacity variation envelope has been selected in order to assess a comparable range of 0-350 kWh in terms of useful stored energy (considering the DC bus nominal voltage of 400 V, standard H2 density of 0.0898 kg/Nm 3 and LHVH2 equal to 33.33 kWh/kg), net of the return trip of the components at nominal conditions, assessed as 85% for the battery (round-trip), 75% for the electrolyser and 50% for the fuel cell [24]. The parametric variation of the ESS characteristics is evaluated by the Loss of Load (LL) and Over Production (OP) parameters and their percentages as defined in Equation 1 and 2.
Where Ei is the cumulative yearly energy (kWh)integration of the instantaneous power in time -related to each analysed component. The LL parameter represents the sum of the load energy that the microgrid system is not able to supply and is supplied by the grid or shed in island mode. On the other hand, the OP parameter represents the amount of energy produced from the RES systems (PV and WT), which is not used in the system and is injected back into the grid, or wasted RES energy in island mode. Both parameters are of paramount importance for the ESS sizing due to the effects of both the resource temporal availability and the time-shift of the load respect to the production [2]. The general objective of the ESS is the operation of the microgrid in island mode, therefore minimizing LL and OP. Each energy storage scenario is assessed by running parallel simulations in each ESS configuration with parametric variation of one ESS parameter (Qbatt and Vtank) at a time within the range reported in Table 2, with a variation step of 10 Ah and 0.33 m 3 , respectively. Figure 10 shows the overall power and energy balance between the generation and the load. In Fig. 10-a, it can be observed that the PV production is predominant (producing between 50% to 95% of the monthly energy in winter and summer respectively) respect to the WT given the high radiation conditions in Southern Spain; resulting strongly oversized respect to the load. The overproduction during spring/summer (March to September) is 2-5 times the monthly energy demand. However, the typical daily resampling (0-24h) by month ( Fig. 10-b) shows a significant time-shift between the load (especially in the morning and night-time) and the generation (predominantly PV in solar hours) as shown in Fig. 10-b, especially in winter periods (November-March) due to electrical heating, requiring an ESS to manage the net power [2].   [6]. Instead, the H2 storage capacity increase leads to a less steep reduction of the LL with an almost linear tendency at medium capacity ranges between 1-8 m 3 (i.e. 50-275 kWh stored) after a sharp decrease at lower volumes (<1 m 3 ). The minimum LL is around 0.17 MWh/year (LL% 3%). The changes of slope represent the points where specific deficit periods are absorbed (mostly in autumn/winter), sharply reducing the LL and LL%. The different behaviour can be explained by the H2 system presenting an increased "inertia" to store/discharge energy, the PEMFC at nominal operating conditions consumes approximately 3 times the hydrogen produced by the electrolyser in the same period, leading to an inconsistent management of the tank. Furthermore, the limited maximum pressure of the tank (30 bar) does not allow sufficient flexibility without quickly reaching saturation. On the other hand, the battery system can be operated at highly variable C-rates (up to 5C) and the net energy can be immediately stored or withdrawn [24]. For OP, the opposite happens: an increase in H2 capacity induces a more relevant decrease of the OP respect to an increase battery capacity. Both trends show a sharp drop in OP at low capacity (<25 kWh stored) then follow a linear trend. The slope of the H2-only configuration is steeper than the battery-only one due to the capacity of the H2 ESS to absorb larger amount of energy due to the lower round-trip efficiency. However, this is counterbalanced by increased losses [17]. For the hybrid battery-H2 scenario the LL and LL%, (Fig.  12), are slightly more affected by the increase of battery capacity rather than tank volume, however their variability range is limited in absolute value. With moderate ESS scales the LL% can be limited well below 5%, reaching zero for the upper half of the analysed ESS variability envelope. Instead the OP and OP% values ( Figure 13) show higher overall values (between 8.8-10.2 MWh/year; 54-63%) and a more marked dependency on the H2 tank volume increase respect to the battery capacity for the reasons previously described. OP% is reduced from 63% for low ESS capacity to a minimum of 54% for the maximum tank capacity (10 m 3 ) and half of the maximum battery capacity (500 Ah). A further reduction of OP is hard to obtain due to the summer overproduction unbalance shown in Fig. 10-a, which is very hard to absorb even by increasing both ESS to their maximum analysed capacities. This means that -according to the implemented technology -different driving parameters should be taken into account. For island operation without load shedding it is most suitable to size the H2 system at its maximum value (10 m 3 ), while the battery should be sized exactly at the minimum value required to obtain zero LL (around 100 Ah), although greater capacities could be installed to reduce the OP. Different operation modes should be addressed more in detail by explicitly defining a priority scale between the parameters LL and OP which define the ESS sizing requirements accordingly (e.g. some curtailment of non-critical load could be allowable, taking advantage of ESS sizing reduction) which is object of future work.

Conclusions
Hybrid storage sizing should take carefully into account the actual requirements in terms of energy supply which significantly impact the components' capacity. Three ESS configurations (battery, H2 and hybrid battery-H2) have been simulated and analysed in a range of 0-350 kWh in a hybrid renewable microgrid environment operating under a real residential load. Results show that the LL is more affected by the load itself while the OP is more dependent on resource availability. LL is more sensible to the increase of battery capacity, with more suitable charge/discharge dynamics for load following, while OP is more sensible to an increase of H2 capacity, at the expense of storage round-trip efficiency. Therefore, in islanded mode, OP requirements define the H2 systems sizing, while the battery capacity is sized consequently in order to obtain zero LL. Different operation modes should foresee the definition of specific priority scales for LL, OP and other parameters, which lead to different ESS sizing criteria.