A Novel Battery Wear Model For Energy Management In Microgrids

This paper proposes a novel battery wear model for microgrid (MG) energy management applications. This model is based on a popular battery wear model originally proposed for vehicle-to-grid (V2G) applications. The presented model can be easily parameterized to fit the cycle life data of almost any battery and yields the wear cost of a charge/discharge event as function of the variation in the state of charge (SOC) of the battery. This wear model is incorporated into an energy management algorithm to optimize the operation of a grid-connected MG using a day-ahead planning strategy. To test the model, four simulated scenarios are considered in an MG composed of a diesel generator (DG), a photovoltaic (PV) system, a residential load and, naturally, a battery storage system (battery energy storage system (BESS)). The inclusion of the battery wear model leads the optimizer to be more selective about battery usage, cycling the battery at state of charge (SoC) levels that minimized battery wear, effectively prolonging its lifespan.


I. INTRODUCTION
E LECTRICITY has become an essential element for society in the last century. With growing energy consumption aggravating the rise in CO 2 emissions, achieving full sustainability is one of the greatest challenges of our modern society. As part of this effort, grid operators are continually deploying new renewable energy generators (REGs), such as in wind farms and PV power stations, supplying a record high of more than 11% of the world's electricity in 2020 [1].
In MGs, REGs play a vital role and, as such, energy storage systems (ESSs) are one of the main components in these environments. While traditional sources can store energy in fuels tanks, water reservoirs and kinetic energy, most renewable sources need external devices to store their output when it is abundant to later return it to the grid [2]. Additionally, with combined renewable generation and energy storage, an MG operator can coordinate resources to achieve increased system efficiency and reduce generationdemand mismatches using techniques such as time-shifting, peak shaving and valley filling [3]- [6].
There are many different technologies for storing energy, such as pumped hydros, fuel cells, flywheels, supercapacitors and others [7]. However, BESSs are commonly the preferred choice for energy management applications. They present good energy density, scalability, efficiency and technical maturity that makes them a good fit for energy storage in small-scale systems [8]- [10].
Among the available technologies, lithium-ion batteries (LIBs) and lead-acid are predominant in modern BESS applications [10], [11]. Historically, lead-acid batteries were preferred for their lower upfront cost, in spite of lithium cells having a greater overall performance and longevity [12], [13]. Recently, the growing interest in electric vehicles and the associated mass production have significantly reduced the cost of this technology, making it the most popular energy storage method in MGs [14]- [16].
Still, BESSs are costly, which becomes even more evident when its useful life is taken into account. Batteries have a limited number of achievable discharge and recharge cycles before they reach their end of life (EOL), at which point the cells no longer meet minimal criteria for power system applications [17], [18].
Usually the EOL is defined as a reduction of 20% to 30% of the battery's state of health (SoH) in general applications [19], [20]. In more sensitive environments where performance of the ESS is crucial, more specific criteria may apply [21], [22]. To determine the SoH, battery management systems (BMSs) employ various methods and, although there is no fixed definition for SoH, many references utilize the effective capacity to evaluate it and estimate the remaining useful life (RUL) of a battery [23]- [26].
SoH estimation models can be further divided into experiment-based and model-based approaches. Experimental models are attractive for being simpler in terms of computational complexity, however it requires a large number of experiments to assess how the variables change as cells age [27]. In [28], [29] machine learning and Big Data are modern approaches used to predict battery behavior based on experimental results, however the literature still lacks the necessary amount of data volume and diversity to correctly train models that work with batteries of different compositions, size and manufacturers [30].
In fact, the acquisition of experimental data for each specific BESS can be unrealistic in practical cases, such as large scale projects that seek to implant many MGs for multiple different clients in various locations. Usually the MG operator does not have the time, technical or financial resources to execute extensive tests. To overcome this, model-based methods can be applied.
An electrochemical model (EM) model can present a highly adaptive approach to achieve particularly accurate wear estimation, as demonstrated in [27]. These models can be applied in dedicated BMSs that need to provide an indication of remaining capacity, RUL and current SoH. In such scenarios, the processing power of the local controller can be dedicated entirely to data acquisition and online calculation of these performance indicators.
In contrast, a centralized energy management system (EMS) would usually require a more lightweight solution. In such cenarios, a equivalent circuit model (ECM) can offer a practical way to model both the static and dynamic behavior of cells for battery management in local controllers. This approach is useful since it can be parameterized and implemented to estimate multiple indicators such as SoC, SoH and power capability [31], [32]. However, it still demand a great knowledge of battery parameters and their relationship with each other and external conditions, such as temperature and operational history [33].
These approaches can certainly be made highly accurate with increased model complexity and data availability. However, in a centralized EMSs responsible for managing multiple microgrids across various locations the communication and hardware requirements for acquiring and processing all the necessary data can limit the applicability of these models [34].
As such, this paper seeks to provide a lightweight semiempirical model in which the precision can be adjusted according to available processing power. More specifically, it proposes a novel aging model that blends both model and experimental-based approaches that require only simple achievable cycle life (ACC) curves that can be obtained relatively easily from datasheets or manufacturers and resellers. The goal of this formulation is to provide a simple wear cost quantifier that can be used to orientate the EMS of an MG as to whether or not use the BESS in detriment of other strategies -such as dispatching DGs or purchasing power from the utility grid -rather then providing a highly accurate battery state predictor.
We base our modified wear cost model on [35] and add (i) a generic formulation, from which operators can derive their own customized models; (ii) a concrete implementation of that formulation that can be parameterized to fit lead-acid and LIB aging curves; (iii) a linearization of this implementation that can be directly applied into mixed integer linear programming (MILP) solvers.

II. BATTERY WEAR FORMULATION
In power applications the two main noticiable effects of battery aging are (i) effective storage capacity and (ii) maximum power output [36]- [38]. The underlying mechanisms that cause these symptoms are multiple and complex, involving chemical reactions that depend on battery composition, storage conditions and operation -mainly temperature, charge/discharge rate (C-rate), SoC and depth of discharge (DoD) [39]- [41].
While batteries used for automotive and frequency regulation purposes usually required high instant power, peakshaving and PV-BESS applications storage capacity is usually a bigger concern. Studies [42]- [44] indicate that for these applications, lower power-to-energy ratios are preferred and batteries are usually operated for a few hours under 1C rates. At this current level, other variables have a much higher impact on aging, namely the cut-off voltage, which directly correlates to the SoC; the amount of energy transferred (DoD) and the temperature [35].
For an EMS, the best way to quantify the wear of a battery is to correlate the energy transferred to or from it to a monetary cost, in $ per Wh preferrably. If a model is able to provide that, a grid operator can directly compare the cost of a charge/discharge cycle against the cost of dispatching a DG or any other source.
In fact, for an infinitesimal variation on SoC, ds, there will be an infinitesimal wear cost, dC b , in which the ratio of these two quantities yields a marginal wear cost, or a Wear Cost Density Function, w(s): Then, a recharge or discharge event starting at the initial SoC s 0 and ending at s f could have its associated wear cost C b evaluated through the following integral: where s l and s u are the lower and upper SoC boundaries of the charging/discharging event, formally: s l = min{s 0 , s f } and s u = max{s 0 , s f } so that the wear cost is always positive.
In this simple formulation, it can be observed that the event cost (C b ) is function of two variables (s 0 and s f ). This directly brings two of the main affecting variables into the model: SoC and DoD. The third factor, temperature, will be considered constant throughout a single event and shall be applied as a adjusting factor: where α is a coefficient that varies with battery temperature. The farther away from the optimal operational point (usually around 25°C), the greater this coefficient will be. Therefore, by solving this integral we will be able to find a closed-form expression to calculate the wear cost of a single charge or discharge event using only two variables: start and final SoC.

A. BATTERY CYCLE LIFE
Batteries usually do not suffer from "sudden-death" failure, but instead exhibit a gradual decrease in performance over their service life. The EOL might be defined as a reduction in capacity (typically 20 to 30%) or an increase in internal resistance. For example, in [19] it is characterized either by battery capacity falling under 70% of the original or when its internal resistance triples; in [20] the thresholds are 80% of the original capacity or 80% of the SoH.
Most manufacturers inform battery life in terms of ACC at a given DoD, that is, the number of full discharge-recharge events that a battery supports at a given depth of discharge before reaching its EOL. In this context, each cycle starts at 100% SoC followed by a discharge event of a certain depth and finishes with a recharge back to 100%. As illustrated in Fig. 1, the cycle life of a battery decays exponentially with higher DoD levels.  [45].
Note that DoD is defined as the positive difference between the initial and final SoC, both measured in decimal units, i.e. from 0 to 1. In this formulation it will be represented by dod: Since life cycle information is usually given at discrete DoD levels, it is useful to interpolate those data points. For that, we define a generic function ACC(dod) that may have any format in order to better fit different wear curves.
The form used for ACC(dod) in [35] is the reciprocal function: ACC(dod) = a 0 · dod −a1 , where a 0 and a 1 are coefficients obtained through curve fitting. This provides a good fit for the ACC curve of some wear curves but leaves room for improvement into a more universal form.
Other formats are able to produce good fits, such as the exponential ACC(dod) = a 0 e −a1d and logarithmic ACC(dod) = a 0 − a 1 ln(dod) forms. Although these elementary functions performed well on specific batteries, they alone fail to provide a universal model. In light of this, the authors propose a combination of the reciprocal and exponential functions: where a 0 , a 1 and a 2 are coefficients that can be obtained by methods such as the least squares fitting. Equation (2) proved to be a good empirical model to fit the cycle life curves of different commercial battery chemistries and manufacturers, as shown in Fig. 2. Therefore, this was the format chosen to be implemented in this study.

B. COST PER CYCLE -STARTING AT 100% SOC
Given that ACC(dod), independent of the chosen form, yields the number of times that a battery can be cycled, the ratio between the battery total replacement cost, B p and ACC(dod) corresponds to the cost of a full cycle of depth d: Where again, α is a modulating factor to account for temperature fluctuation. VOLUME 4, 2016 Then, to assess the cost of a single event (i.e. either the charging or discharging part of a cycle), this value should further be divided by two, thus: That is, if a half cycle either starts or ends at 100% SoC, the DoD could be plugged into (3) and the expression would yield the wear cost associated with that event. As such, by definition, equation (3) is a solution to the cost function C b (s 0 , s f ) with s 0 = 1 for discharing or s f = 1 for charing. However, for ranges that neither start nor end at 100% SoC, a more general expression must be derived.

C. COST PER CYCLE -ANY RANGE
For charging from s 0 to 100%, we replace dod = |s 0 − 1| in (3) and equate it to (1), resulting in: where W (s) is a primitive of w(s) and s 0 is the lower limit of integration because it will always be less or equal to 1 (there are no SoC levels greater than 100%).
A similar expression can be obtained for a discharging event, when dod = |1 − s f |, yielding: By subtracting the second expression from the first and rewriting in compact integral notation, we arrive at a partial solution to (1): This expression is only positive for s 0 ≤ s f , that is, for recharging. The process can be repeated for the case where s 0 > s f and the result would be the same expression with a flipped sign. Instead, a single closed-form equation can be summarized using the modulus operator. The result is the solution to the cost function C b (s 0 , s f ) defined in (1): where, since both s 0 and s f are always less or equal to one, the inner modulus operator was discarded. The model proposed in (4) is valid through the entire SoC range, from 0% to 100%, as long as 1/ACC(s) is continuous in that same range and, since it does not assume any particular format for ACC(dod), it also is fairly independent of battery model.
This result adds two levels of abstraction to [35] because it accepts almost any generic form of ACC(dod) without the need to derive a new model. It also uses only the initial and final SoC of each half cycle, therefore there's no need to know the power flow of the battery at each instant, only the amount of energy transferred. Again, this is possible due to our initial assumption of moderate C-rates being used in MGs. This simplification provides a much faster way to calculate costs in a centralized EMS, which was the goal set at the beginning of the formulation.

D. QUALITATIVE ANALYSIS: THE NORMALIZED WEAR DENSITY FUNCTION
Although the expression in (4) allows an optimization model to quantify the wear of cycling a battery, it fails to provide an easy insight on how cycling the battery at different SoC ranges affect its durability. For qualitative analysis, the Wear Cost Density Function, w(s) would provide a better tool to evaluate the performance of a battery.
For that, we can simply take the partial derivative of the cost function 4 with respect to s = s f and divide it by the capacity M of the battery, arriving at a Normalized Wear Density Function w n (s) in terms of monetary unit per unit of energy transferred (usually $/kWh): By substituting (2) into it and considering s ≤ 1, the normalized Wear Density Function becomes: This function is able to show where in the SoC range the most wear occur. Moreover, the average value of the Wear Density Function is also useful when evaluating the overall cost-benefit of different battery models, as it can differentiate batteries not only by price and capacity, but also by durability. The average value of (5) is calculated as: e a2 a 0 which could also be a useful expression for a linear cost function, such as C b (s 0 , s f ) = w n · M · |s f − s 0 |.

III. ENERGY MANAGEMENT MODEL
To test the battery wear model, we modified the optimization problem proposed by [46], which initially used a fixed cost per kilowatt-hour to evaluate the cost of using the BESS. The model implements a day-ahead planning strategy using MILP that aims to minimize the operational cost of an MG composed by a DG, a BESS, a PV system and a load, as illustrated by Fig. 3. The objective of the optimizer is to calculate setpoints that all DERs within the MG should follow in order to supply demand with the lowest operational cost. This may lead to strategies such as charging batteries in off-peak hours to minimize energy purchase during peak-hours, therefore the importance of having a model to quantify battery wear in the same manner that other sources have, such as fuel cost for DGs or energy purchase cost from utility grid.
The MG is modeled as a single-bus system and, as such, no distribution line losses are considered. The model also does not account for the dynamic behavior of the DERs, as this is an attribution of local controllers. The day-ahead planning is based on predictions of load profiles and solar generation profiles for the following 24 hours, this predictions can be obtained from external APIs that are not the focus of this work (AQUI PODERÍAMOS COLOCAR UMA REFERÊN-CIA AO ARTIGO DO PREDITOR DO GHT).
Two electricity tariff levels are considered, one for peak and one for off-peak hours, and also two contracted demand levels for those periods. Reverse power-flow is rewarded with a feed-in tariff that is a fraction of the energy purchase tariff.
The model uses a discrete-time approach with finer timesteps for the first hour and larger timesteps for the remaining 23 hours. The first half hour is quantized in 6 intervals of 5 minutes each; then there is a single 30 minute interval followed by 23 intervals of 60 minutes each. This ensures higher time-definition for the near-future while also minimizing the amount of equations of the resulting model. This is important for a centralized model in which forecasts are updated and setpoints recalculated every few minutes, a scenario that can be challeging to sustain in a system with a large number of MGs.

A. OBJECTIVE FUNCTION
The objective function that defines the optimization problem of this study is the sum of operational costs and energy purchase expenses at each discretization interval: where: • Z: total operational cost over the simulation period; • t: time-discretization index (1, 2, 3...); • T : discretization interval count; • Z IO : energy import cost (+) or export revenue (−); • Z D : operational cost of the DG; • Z B : battery wear cost; and • Z P : penalty for exceeding maximum contracted demand. Notice that there is no term associated with PV system power output because its operational cost is usually independent of energy delivery.
Energy import cost and export revenue -modeled with a feed-in tariff: where µ i [t] and µ e [t] are the purchase and feed-in tariffs parameters, respectively; P i [t] and P e [t] are the power import and export variables, respectively; and dt[t] is the size of the discretization interval parameter. Note that power imported at a rate under the contracted limit is calculated separately from the power imported above the contracted limit, that is, is always lower then the contracted demand. Diesel fuel cost -the cost of diesel fuel, modeled using a quadratic model and a startup cost: (8) where µ d is the cost per liter of diesel; a d , b d and c d are the consumption parameters of the DG; P d [t] is the power output variable of the DG; and S d [t] is the startup cost variable of the generator at each discretization interval, which is zero if the generator has been started at a previous interval or if the power output is zero. The power output of the DG is also subject to minimum and maximum limits.
Maximum demand penalty -modeled using a very high tariff for power import: where µ pi [t] is the parameter that defines the tariff for buying power at a rate above the contracted limit, usually several times higher then µ i [t]; and P pi [t] is the variable for importing power above the contracted limit, which is only greater then zero when P i [t] has reached the contracted demand limit.
Battery wear cost -obtained by substituting (2) in (4), where the initial and final SoC, s 0 and s f , become s[t − 1] and s[t], respectively: In order to realize the power balance of the MG, the power output of the battery is calculated by converting battery percentage to energy transfer rate, i.e.
, which is negative for battery recharge.
The mathematical modeling is described in detail [46], with the clear exception of the current battery wear model. For briefness, this work will continue to focus on the battery modeling and the interested reader can refer to the original paper for a detailed explanation of the entire model.

IV. METHODOLOGY & SIMULATIONS A. SOFTWARE ASSISTANT
To validate the proposed battery model, we tested it under various scenarios, with different MG topology, battery models and load profiles. To assist in this process, a software was developed, as illustrated by Figs. 4a and 4b. After the user selects which resources the MG will contain, the application dynamically generates and solves the optimization problem as described in subsection III-A. The underlying mathematical model is generated using MILP and the user has the option to export the generated code if they want to fine-tune parameters and the behavior of the simulation. The software also also includes an islanded operation mode which is not part of this particular study, but can be useful to test critical scenarios where storing energy is essential. It is free to use and open sourced, available at github.com/lucasrhode95/adams. All the results presented in this paper were generated using this tool.

B. COMPONENT PARAMETERS SELECTION
Parameters for the simulations were based on commercially available products with public data made available by the manufacturer of each product.
Energy Sources -the DG parameters are from a Caterpillar's DE22E3 22 kVA module and the PV generation is from a generic autumn profile scaled to deliver 100 kWh/day.
As for the utility grid, the average electricity rates in Brazil were used: off-peak prices were set at 0.1048 USD/kWh and peak prices at 0.2096 USD/kWh. Feed-in tariff was set at 0.035 USD/kWh for peak and off-peak hours. The contracted demand at was defined as 23 kW and 18.4 kW for off-peak and peak-hours, respectively. Above these limits, tariffs were defined as 10 USD/kWh for off-peak hours and 20 USD/kWh for peak-hours.
Load -the residential load profile used was obtained from the U.S. Department of Energy public database [47] and scaled to achieve a consumption of 300 kWh/day.
The net load profile (load consumption minus PV generation) is shown in Fig. 5, where it can be seen that the PV generation exceeds demand from 10 a.m. to 14 a.m., where the "net load" curve becomes negative. In this window it is expected that the EMS either chooses to recharge the battery or to export power back into the grid.
Storage -two BESS models were considered, with data acquired directly from the manufacturer's website: Neo- The wear density of both is shown in Fig. 7, where the lowest wear density points are highlighted: 0.088123 USD/kWh at 87% SoC for BESS A, and 0.18287 USD/kWh at 75% SoC for BESS B. It also can be observed that wear density increases at both ends of the SoC, an expected result given that both very low and very high SoC levels are known to reduce battery life [19], [48].
For the tests, both systems were considered to have an efficiency of 94% (yielding a round-trip efficiency of 88.36%), a self discharge rate of 0.2% per hour and charge/discharge rate was limited to 0.5C. In order to keep both systems with roughly the same capacity, we considered that BESS B is composed of two batteries, therefore doubling its cost and capacity to 13,000 USD and 14.24 kWh, respectively. In addition, the SoC of both systems were arbitrarily set to start at 50%.
Another restriction is that battery must also have 50% SoC at the end of the day so that all energy usage must be replenished before the end of the simulation, plus losses. Considering an error tolerance of 1%, scenarios 2 and 4 are equivalent in regard of operational cost. That is, the addition of BESS B to a system where there is already a DG produces no substantial benefit from the energy management perspective alone. However, there are indubitably many advantages of having both systems at disposal and, as such, this result should not be taken as definitive for all cases.
The detailed results of the day-ahead planning for scenarios 1 and 2 are shown in Fig. 8 to diminish energy purchase in scenario 1, supplying roughly 10.5 kWh to the system. In contrast, in scenario 2, the DG is started at 6 p.m. and stopped at 8 p.m., delivering exactly 32 kWh in two hours. This power output is more than enough to avoid excess demand and also to minimize peak-hour energy purchase -until the quadratic consumption model limits its benefits. In the following hour, from 8 p.m. until 9 p.m., BESS B is cycled from 65.4% to 50.3% to supply the system. • 9 p.m. -12 p.m. the load curve starts to fade to a minimum whilst BESS A is recharged in scenario 1 and BESS B is kept in stand-by until midnight on 2. The main difference between scenarios 1 and 2 is notably the much deeper DoD cycle that BESS A experiences. This is due to the lower marginal cost when compared to BESS B, as can be seen in Fig. 7.
Another interesting result is the choice of SoC range that the optimizer made for BESS A. The 10.5 kWh that it delivered represents 73% of its capacity, and could have been cycled in either 100%-27% or 73%-0% ranges, for example. However, the 99%-26% indicates that the optimizer avoided the steep wear density rise near 100% but also tried to avoid the slowly increasing wear cost near the lower end of the SoC. The same trend is observed in scenario 2 but, with a much more steep rise near 100% and overall higher wear cost, the battery is only cycled with a DoD little greater than 16%.

V. CONCLUSION
Although battery wear is sometimes neglected in MG applications, it is important to incorporate a wear quantification model to avoid careless use of the storage system. In this study we expanded the reach of an existing model by rederiving it using a more universal approach for fitting the data usually made available by manufacturers. We also provided a mathematical formula that enables MG planners to evaluate VOLUME 4, 2016 and compare batteries across the entire SoC range, taking into account not only price and capacity, but also the durability of storage devices, and that could be easily customized for various batteries. The model, although simple, proved to be very useful in the implementation of an energy management algorithm that considers and minimizes battery wear, as shown by the case studies presented here, which can effectively prolong the lifespan of these devices.