Life Cycle Estimation of Battery Energy Storage Systems for Primary Frequency Regulation

: An increasing share of renewable energy sources in power systems requires ad-hoc tools to guarantee the closeness of the system’s frequency to its rated value. At present, the use of new technologies, such as battery energy storage systems, is widely debated for its participation in the service of frequency containment. Since battery installation costs are still high, the estimation of their lifetime appears crucial in both the planning and operations of power systems’ regulation service. As the frequency response of batteries is strongly dependent on the stochastic nature of the various contingencies which can occur on power systems, the estimation of the battery lifetime is a very complex issue. In the present paper, the stochastic process which better represents the power system frequency is analyzed ﬁrst; then the battery lifetime is properly estimated on the basis of realistic dynamic modeling including the state of the charge control strategy. The dynamic evolution of the state of charge is then used in combination with the celebrated rain-ﬂow procedure with the aim of evaluating the number of charging/discharging cycles whose knowledge allows estimating the battery damage. Numerical simulations are carried out in the last part of the paper, highlighting the resulting lifetime probabilistic expectation and the impact of the state of the charge control strategy on the battery lifetime. The main ﬁndings of the present work are the proposed autoregressive model, which allows creating accurate pseudo-samples of frequency patterns and the analysis of the incidence of the control law on the battery lifetime. The numerical applications clearly show the prominent importance of this last aspect since it has an opposing impact on the economic issue by inﬂuencing the battery lifetime and technical effects by modifying the availability of the frequency regulation service.


Introduction
In the last few decades, a large deployment of renewable energy sources (RESs) and the implementation of the deregulated energy market have led to larger frequency changes in power systems. Increased load demand has been satisfied by generation units based on wind and photovoltaic energy, thus limiting the presence of conventional power plants. In this scenario, the main issue to address is related to the massive adoption of power electronics needed to connect RESs to the power network [1,2]. As an example, wind generators typically imply the use of fully-fed induction or synchronous generators and doubly fed induction generators connected to the network through direct current (DC) to alternating current (AC) converters. In this case, power electronics decouple mechanical and electrical sections, thus implying a loss of rotational inertia and, in turn, more frequent and larger changes of system frequency. The analysis of the reduction of rotational inertia and frequency deviation • new control laws of the converters of the RES-based generation plants; • integration of grid-connected battery energy storage systems (BESSs).
As far as the adoption of control laws of converters is concerned, the aim is to study proper control laws that are able to mimic the inertial characteristics of the classical synchronous generators. The desired level of the power system inertia is related to the rate of change of frequency, and efforts have been devoted to compensating the loss of rotational inertia with virtual inertia, thus trying to realize the required power system inertia [9][10][11][12].
As far as the use of BESSs is concerned, the battery has proven to be competitive for the service of primary control reserve [13][14][15][16]. The noticeable reductions of frequency deviations obtained with BESSs are ensured provided that the battery state of charge (SOC) is controlled so that admissible limits are not violated. In order to allow BESSs to contribute in an effective way to the frequency regulation service, the energy capacity needs to be properly rated. In this regard, BESS sizing could be roughly performed by assigning the droop value and by taking into account that the primary frequency reserve must be linearly deployed within a specified time and frequency intervals. As an example, in the synchronous interconnected networks of the central European countries, the primary frequency regulation linearly deploys within 30 s, starting from the occurrence of an imbalance event of frequency, in correspondence to a frequency deviation of ±200 MHz [17]. The problem of the battery sizing, however, is complicated by the battery degradation mechanism which cannot be disregarded. This complexity is mainly due to the randomness related to the continuous power imbalance which is inherently a stochastic process.
The main contribution of this paper relies upon a rational procedure for deriving the lifetime probability distribution from the knowledge of a limited set of power system frequency samples. This is a fundamental step to take into account reliability aspects in the battery design procedure, which could be considered among the most critical ones. Some mild hypotheses are made in order to perform a consistent statistical analysis of the power system frequency samples, to generate pseudo samples that exhibit similar frequency time variations. Due to the time resolution of the frequency measures (typically a few seconds), in fact, the available historical data are not sufficient to create the required number of frequency patterns needed for an accurate statistical analysis. Our approach is based on the generation of these pseudo samples based on an autoregressive model that represents the time series of the available recorded data. This is consistent with the spreading exploitation of the RESs and preserves the fundamental characteristics of the correlation analysis of the base sample.
The cycle-based degradation of BESS depends on the charge/discharge sequence [18]. The capacity fading can be properly described in terms of the fatigue process since, as focused in [19], the mechanical stress plays a key role in the degradation of the battery performances [20,21]. The significance of the diffusion-induced stress leads to consider the classical approach for the aging of mechanical systems subject to fatigue cycle loading as the most appropriate model for describing the battery performance deterioration.
The lifetime distribution is evaluated through the knowledge of the dynamic evolution of the battery SOC. For this purpose, the implementation of the rain-flow counting algorithm for each dynamic simulation provides the needed information to calculate the life consumption according to the Palmgren-Miner linear damage accumulation rule.
The rest of the paper is organized as follows. In Section 2, a literature review on the BESS adopted for primary frequency regulation is proposed together with the detailed description of the main contributions of this paper. In Section 3, the background of the primary frequency regulation is discussed and some aspects related to the operation and sizing of the BESS is presented. The issue of the battery lifetime duration and the methods available for its estimation is discussed in Section 4. An autoregressive model able to create an effective set of frequency patterns is proposed in Section 5. The results of simulations are proposed in Section 6 and our conclusions are drawn in Section 7.

Literature Review and Contribution of the Paper
The application of BESSs for primary frequency regulation has been widely debated in the literature from different perspectives. The impact of the BESS model on the regulation service is discussed in [22] by considering the case of an islanded power system. Ref. [23] uses a model of BESS in an isolated power system which integrates the charging/discharging cycle's constraints with the generation rate constraint. Based on an area control error, in [24] the control of BESSs for frequency regulation purposes is used to study the performance of both power systems and BESS. In [25], layout and control algorithms are presented with reference to ultracapacitor-based distributed energy storage systems used to provide regulation service in islanded networks. Ref. [26] discusses the degrees of freedom in the regulation service and the effects of their inclusion in the SOC control of the BESS. Different operation strategies are analyzed in [27], with reference to their influence on BESS operational parameters, such as the SOC ranges and management levels. In [28], the effectiveness of battery storage devices is investigated by analyzing experimental and historical data. With reference to the Lithium-ion battery technology, in [29], an electrical-thermal model is developed and verified on experimental test data. The impact of the BESS used for frequency regulation on the system stability is examined in [30], where the effects of set-point adjustment strategies are studied. In order to investigate the effective methods to increase the potential of BESSs in regulation services, in Ref. [31], a model which aims to account for both technical provision of regulation service and economic revenues is proposed. In [32] an operation simulation model is proposed which includes three main parts: the grid frequency control module, the battery operation simulation module and the statistical evaluation module. Within the framework of the unit commitment, Ref. [33] deals with the optimal operation of batteries used as a support to the dynamic frequency of power systems affected by uncertain power production from wind turbines. In [34], by considering real frequency data, strategies for the restoration of the battery SOC are discussed and compared in view of the battery's lifetime estimation in case of provisions of the deterministic and stochastic ancillary services. Ref. [35] analyzes the suitability of control strategies from the lifetime perspective of Lithium-ion batteries used for primary frequency regulation. In [36], the battery is used to achieve both peak shaving and frequency regulation services while accounting for both battery degradation, operational constraints, and uncertainties in load and signals.
Focusing on the BESS sizing, in [37] hybrid energy storage systems-including battery and supercapacitor-are investigated with reference to their regulation support in an isolated grid and the impact in terms of lifetime and system capacity. Based on a simulation tool, the battery power and energy capacity are studied in [38], with the aim of optimizing the reserve capacity and the ramp rate of the control unit. In [39] an automatic generation control is analyzed with reference to a generator and BESS hybrid system: a model able to optimize the size of the capacity regulation of both battery and generator is proposed based on the total costs minimization. In [40] the capacity configuration of the battery storage system combined with a wind turbine generator is studied through battery control strategies based on a frequency regulation reserve. Several electrochemical technologies are considered in [41] for different types of aging tests by comparing different cycle test types for frequency regulation. The method in [14] allows determining the minimum capacity of the battery based on the SOC limits and on the historic frequency data. In [15] a sizing methodology is proposed, based on inertia constant and the power/frequency characteristic used to estimate the power and energy capacity of the storage. Based on the proper control of the SOC, in [42] a methodology for finding the optimal battery power/energy rated value and control parameters with respect to the historical data of frequency is proposed. In [43] a stochastic optimal power and energy sizing of a BESS is developed for isolated microgrids: uncertainty of solar radiation, wind speed, and power demand, as well as load leveling and reserve support, are taken into account. In [44] the optimal sizing of a storage system is considered with reference to the frequency regulation, taking into account the requirements of wind power integration. For the optimal sizing of BESSs providing frequency control in isolated microgrids, an algorithm is proposed in [45] which includes a control scheme based on the use of the overloading capacity of the battery. In [46], aimed at counteracting the impact of renewable energy on frequency nadir, the optimal placement and sizing of BESSs for primary frequency support in an isolated network is discussed. A theoretical framework for BESSs providing primary frequency control is discussed in [47], where the optimal planning and control strategy based on a stochastic dynamic program is analyzed.
The main items of each contribution are summarized in Table A1 reported in Appendix A. In the table, some relevant aspects related to the use of batteries for primary frequency services are highlighted. In particular, the main items and parameters of the papers are reported in the second column. In the third column, the most important contributions of each work are synthesized.
By the analysis of Table A1, it clearly emerges that the use of BESSs for frequency regulation service can be effective and feasible from both an economic and technical point of view. Additionally, it can be seen that the problem is complicated by several complex issues which have to be faced in real-world applications in order to have the correct size and operation of the BESS. Particularly, in the most recent literature, battery aging emerged as a crucial parameter, whose impact on the battery lifetime heavily affects the economic viability of the battery. The accurate evaluation of the battery lifetime is crucial in BESS sizing studies in order to balance the positive effect of the use of a battery and the economic implications of the requested heave working cycles. The need for accurate simulations tools which deal with the accurate control of the battery SOC is also clearly discussed in the literature. Moreover, proper data analysis of real frequency measurements is another critical point. This complexity is due to the enormous amount of data that have to be managed, according to the time scale of the signal (few seconds) and the large number of samples typically required by the statistical tools.
In this paper, a comprehensive approach is proposed to simulate the operation of a BESS used for primary frequency regulation in a real application which takes into account all the main issues related to the actual implementation of the service. The flowchart of the proposed approach is shown in Figure 1.
The background of frequency regulation is summarized to determine a suitable control strategy of the BESS. The BESS should be properly modeled with regard to both the provision of the primary frequency service and the control of the battery SOC. The proposed control strategy is then applied to a large number of frequency patterns obtained through an autoregressive model applied to a limited number of real data. The application of the proposed control allows for obtaining a large set of power and SOC patterns of the BESS. They are analyzed through the rain-flow method, which provides the data needed for a statistical analysis of the lifetime duration of the battery. Attention is also paid on some features of the SOC control related to the restoration of the stored energy levels. In particular, the effect of this factor on the expected lifetime duration is analyzed.
The main novelties of the paper can be summarized as follows: • all aspects related to the battery operation for primary frequency regulation are analyzed to highlight, in a feasible and effective way, the main issues affecting planning and operation; • a simulation setup implementing the main features of the BESS control for primary frequency regulation is proposed; • an autoregressive model based on actually measured data is tailored to accurately represent effective frequency patterns which are then used in statistical analyses; • by analyzing the real frequency measures, an efficient method is adopted to estimate the parameters of the autoregressive model based on a Logistic underlying distribution assumption;

Basic Concepts on the Primary Frequency Regulation
When perturbations occur, it is necessary to monitor the time evolution of the frequency in order to verify the dynamic security of the network. In particular, it is needed to control the frequency trends following load imbalances. In this case, the frequency exhibits a time evolution which depends on the degree of unbalance, on the features of the frequency regulation, and on the available system rotating reserve after the disturbance. This rotating reserve can be estimated as where R is the rotating reserve, n is the number of groups in service after the perturbation, P 0 j is the power delivered by the jth group at the time of the perturbation, and P nj is its the nominal active power.
The frequency behavior for any kind of load perturbation can be determined once the response to the step load perturbation ∆P L is known, provided that the hypothesis of linearity applies. In case of perturbations of the generated power, such as those corresponding to the disconnection of groups or large intermittences of renewable generation, the frequency behavior can also be derived in terms of variations of equivalent load ∆P L . Typically, the value of the rotating reserve is about five percent of the network nominal power, as a result of economic considerations.
Unbalances larger than the available rotating reserve clearly imply that the frequency keeps dropping. When the power imbalance is relevant, the frequency can reach the lowest limit that causes the protection devices to disconnect automatically from the mains of the large thermoelectric groups, thus causing an additional quality degradation of the operating conditions. To assure that the frequency of the transient does not reach inadmissible values, suitable control actions are then required, such as the automatic reduction of the load, which is typically controlled by frequency and its derivative.
With reference to a generation unit, the basic equation of the primary frequency regulation is the well-known transfer function of the regulator: where ∆ f re f is the variation of the frequency reference, ∆ f re f = f − f re f ; ∆P r is the regulating power, T 1 >T 2 ; and E P is the ratio, at steady-state conditions, of the variation of regulating power and the corresponding variation of frequency, with a sign changed. E P is referred to as permanent regulating energy (MW/Hz) due to the regulation of the unit. Still referring to the steady-state conditions, it is also defined as the permanent droop, σ P , due to the regulation of the unit which is the ratio between the relative variations of frequency and regulating power, with a sign changed. Once the permanent load droop, σ c , is introduced, the transfer function, G(s) of the frequency deviation where T a is the starting time of the unit, in seconds, linked to the inertia constant, H, from the simple relation T a = 2H.
where is the rotating reserve, is the number of groups in service after the perturbation, is 202 the power delivered by the jth group at the time of the perturbation, and is its the nominal active 203 power.

204
The frequency behavior for any kind of load perturbation can be determined once the response 205 to the step load perturbation ∆ is known, provided that the hypothesis of linearity applies. In case 206 of perturbations of the generated power, such as those corresponding to the disconnection of groups 207 or large intermittences of renewable generation, the frequency behavior can also be derived in terms

210
Unbalances larger than the available rotating reserve clearly imply that the frequency keeps 211 dropping. When the power imbalance is relevant, the frequency can reach the lowest limit that causes 212 the protection devices to disconnect automatically from the mains of the large thermoelectric groups,

217
With reference to a generation unit, the basic equation of the primary frequency regulation is the 218 well-known transfer function of the regulator: where ∆ is the variation of the frequency reference, ∆ = − ; ∆ is the regulating 220 power, > ; and is the ratio, at steady-state conditions, of the variation of regulating power and the corresponding variation of frequency, with a sign changed. is referred to as permanent 222 regulating energy (MW/Hz) due to the regulation of the unit.

223
Still referring to the steady-state conditions, it is also defined as the permanent droop, , due where is the starting time of the unit, in seconds, linked to the inertia constant, , from the simple 229 relation = 2 .  The characteristic equation for the transfer function (Equation (3)) is characterized by complex and conjugated poles. Thus, the frequency transients is characterized by oscillatory dynamics having pulsation ω 0 [48]. The frequency nadir corresponding to a step function of the load variation, ∆P L = d/s, is given by [48] f

Batteries for the Primary Frequency Regulation
The use of BESSs for the primary frequency regulation service implies the controlled charge and discharge of the battery in order to keep the frequency deviation within admissible ranges. With reference to the European case study [17], the action required to the storage device is summarized in Figure 3. The characteristic equation for the transfer function (Equation (3)) is characterized by complex 233 and conjugated poles. Thus, the frequency transients is characterized by oscillatory dynamics having 234 pulsation [48]. The frequency nadir corresponding to a step function of the load variation, ∆ = 235 / , is given by [48]

239
The use of BESSs for the primary frequency regulation service implies the controlled charge and 240 discharge of the battery in order to keep the frequency deviation within admissible ranges. With

241
reference to the European case study [17], the action required to the storage device is summarized in   Figure 3 shows that, when frequency falls within the dead-band, that is the frequency deviation is in the interval ±20 MHz, no actions from BESS are required. When frequency deviation falls in the interval [−200, −20] MHz the BESS injects power to the network. In this case, the discharged power linearly increases with increasing frequency deviation (up-regulation). The BESS absorbs power from the network when frequency deviation is included in the interval [20,200] MHz. In this case, the charged power linearly increases with increasing frequency deviation (down-regulation). Eventually, if the frequency deviation exceeds the interval [−200, 200] MHz, the BESS will charge or discharge at its rated power value. In Figure 3, the BESS power is assumed negative when BESS is charged and positive when BESS is discharged.
In order to size the battery, the reference values of the regulation energy required at the system level, ∆E re f , and potentially provided by the conventional generation groups, ∆E disp , have to be estimated. The required regulation energy can be estimated from the magnitude of the loss of the generation group and the frequency's target value to be achieved. The difference of the required regulation energy and that potentially available from the conventional generation groups allows determining the required BESS rated power through the following power balance: where P bess is the requested rated power of the BESS and σ batt is the BESS setting droop. The BESS energy capacity, E batt , required for the primary frequency regulation can be estimated considering that it should be large enough to support both upward and downward services for the duration of τ = 15 min. To verify the constraints on the SOC during battery operation, the charged and discharged energy has to be evaluated according to the BESS efficiency. The SOC value at a generic time t can be evaluated as with SOC 0 being the initial SOC value and P act accounting for the BESS efficiency as where P batt (ξ) is the power of the BESS at time ξ, η d is the BESS efficiency in discharge mode (i.e., when P batt (ξ) ≥ 0), and η c is the BESS efficiency in charge mode (i.e., when P batt (ξ) < 0).

Battery Control for the Primary Frequency Regulation
In order to simulate the SOC profile related to a specific frequency profile, it is necessary to define a control strategy which allows the battery to provide the primary frequency regulations according to either the requirements of the primary frequency regulations and the stored energy available for charging and discharging. At this aim, the control of the battery SOC is required to allow the battery to • provide the charging/discharging power according to the up-and down-regulation reported in Figure 3; • restore the SOC at a reference value, when frequency falls within the dead-band; the reference value is typically set at 0.5 p.u.; • keep the SOC within the range [0.1, 0.9] p.u., in order to preserve the battery lifetime.
In Figure 4, the block diagram of the simulation set up of the control strategy adopted for the primary frequency regulation is shown.  The upper part of Figure 4 refers to the down-regulation, which applies when the frequency deviation is greater than 20 MHz and SOC is lower than 0.9 p.u. In this case, the BESS is requested to absorb power according to a value which depends on the difference between the reference frequency and the actual one and on the BESS setting drop σ batt . The time constants of the transfer function of the BESS down-regulation are T 2d and T 1d .
The lower part of the diagram refers to the up-regulation, which applies when frequency deviation is lower than −20 MHz and SOC is greater than 0.1 p.u. In this case, the BESS is requested to inject power to the network according to a value which depends on the difference between the reference frequency and the actual one and on the BESS setting drop σ batt . The time constants of the transfer function of the BESS up-regulation are T 2u and T 1u .
The value of the BESS setting drop is related to the interval amplitude of the frequency for which the primary regulation applies, σ batt = 0.0036. In both down-and up-regulation the maximum value of the BESS power is limited by its rated value.
When the frequency falls within the dead-band, the BESS can be charged or discharged in order to restore the reference value of the SOC. The transfer function, whose time constants are T 1r and T 2r , acts on the difference between the actual SOC value and the reference one. In this phase, the restoration factor k 1 has a remarkable role, since the higher the factor k 1 , the smaller the deviation of SOC with respect to the reference value. Consequently, the lower the factor k 1 the higher the battery contribution to the power system frequency regulation. Hence, the proper choice of this factor must be a reasonable tradeoff between the regulation service availability of the BESS and the battery lifetime duration. It is worth noting that the tradeoff leading to the identification of the parameter k 1 can be modified according to technical and/or economic issues. The identification of the other parameters of the control architecture described in Figure 4 strictly depends on the service performance required by the grid operator. The effect of the value of the parameter k 1 on the lifetime duration will be extensively discussed in the numerical application of this paper.

Battery Lifetime Degradation Estimation
The most critical aspect in designing batteries is the trade-off between the ability in achieving the requested power and energy performances, and in guaranteeing designated lifetime duration with a certain degree of accuracy. It is easy to argue that this problem gets complicated by the inherently probabilistic nature of the interest variables. More specifically, both the requested powers for frequency regulation and the battery capacity fading are stochastic variables. It has to be highlighted that the SOC control strategy has heavy effects on the dynamic evolution of the system and, hence, on these interest variables.
Recent researches about Li-ion batteries evidenced that, during cycling, the capacity fade of the battery is related to mechanical stresses. More precisely, the mechanism of capacity loss is explained on the basis of the theory of the break and repair of the solid electrolyte interphase. This method, as discussed in [19][20][21], reproduces in an accurate way both the incidence of the discharge depth and the influence of the average value of the SOC on the capacity fade. In our opinion, this approach suggests retaining the cycle-counting algorithm, employed for the evaluation of fatigue damage consequent to mechanical vibrations, as a candidate for battery lifetime consumption estimation. Various cycle-countings have been proposed in the relevant literature, but the rain-flow algorithm, first proposed by Matsuishi and Endo [49], is among the most widely employed techniques for performing a fatigue analysis of structural components subject to random loads. Many different algorithms have been proposed in the relevant literature. However, to ascertain the superiority of a given algorithm on the other ones is beyond the scope of this paper. However, a common characteristic to all them is the fact that the output of the signal processing can be organized in a suitable data histogram, thus allowing the assessment of the fatigue life by applying Miner's rule [50]. This rule assumes that the effects of various different cycles, each characterized by a depth of discharge in the case of batteries, can be combined according to a linear damage accumulation relationship: where LC is the life consumption, K is the number of different depths of discharge, N f j is the number of cycles to the failure (e.g., the number of cycles needed to reach a capacity fading of 20%) corresponding to the jth depth of discharge, n j is the number of cycles performed at the jth depth of discharge. The number of cycles to failure corresponding to the jth cycle can be derived from [51] as where µ socj is the average value of the SOC level of the jth cycle, d j is the depth of discharge characterizing the jth cycle and C f ade is the capacity fade in percentage value, representing the end of the life.

Representation of the Frequency Patterns through an Autoregressive Model
Accurate frequency predictions based on power unbalance have a crucial importance for accurately characterizing the battery lifetime. Predictions are based on frequency historical data, that typically consist of sets of observations f (t) each one referred to a specified time t. The set T 0 of all the sample time t, is typically a discrete set, thus involving the concept of a discrete time series [52]. The accuracy of the prediction depends strongly on the amount of the historical data, that is, the length of the time series. Due to the time resolution of the frequency measures (typically a few seconds), the available historical data are usually not sufficient to create the required number of frequency patterns needed for accurate statistical analysis. As an example, in order to use Monte Carlo simulations, several thousands of frequency patterns are required. It is thus necessary to set up a time series model to catch the most important features of the available data and to generate patterns that preserve the frequencies of the measured spectrum. In this paper, we propose the use of an appropriate autoregressive model to represent the time series of available recorded data Y t for the frequency deviations with respect to the nominal value. The autoregressive model is used in a great number of engineering applications to infer data from time series [52][53][54]. Under the assumption of a Normal underlying distribution, the autoregressive model can be derived from the more general autoregressive moving average process: where B is the backward shift operator and the parameters φ = φ 1, . . . , φ p , θ = θ 1, . . . , θ q and variance σ 2 of the white noise need to be estimated starting from the available time series. At this stage, the polynomial orders p and q are assumed to be known. Clearly, p and q depend on the data that have been used to determine their values. Parameters and variance in (10) can be evaluated through several methods available in [54]. In this paper, we focus on pure autoregressive models, that is, when θ(z) ≡ 1. In this case, the process (10) can be rewritten as where φ 1 , . . . ,φ p andσ 2 are the estimators of the parameters φ 1, . . . , φ p and of the variance σ 2 , respectively. According to Equation (11), the successful estimate provided by different methods is based on the normally distributed white noise. The adoption of these approaches for the inference of frequency power systems data is supported by preliminary analyses that evidence the Gaussian nature of the static distribution of frequency data [55]. This is clearly shown in Figure 5, where the histogram of frequencies deviations of typical measurements from their reference value is reported [56].
where , … , and are the estimators of the parameters , … , and of the variance , 365 respectively.
power systems data is supported by preliminary analyses that evidence the Gaussian nature of the 369 static distribution of frequency data [55]. This is clearly shown in Figure 5, where the histogram of 370 frequencies deviations of typical measurements from their reference value is reported [56]. 371 372 Figure 5. The histogram of typical frequency deviation.

373
An accurate analysis of the actual frequency data can also imply a non-Normal underlying 374 distribution. The case of auto-regressive models dealing with non-Normal underlying distribution 375 has been treated in the literature, such as the work in [57], with reference to Student distribution and 376 that in [58], with reference to Logistic distribution. In this paper, we focus on the case of the Logistic 377 distribution, as suggested by the analysis shown in the numerical applications. In this case, in order 378 to infer the frequency modeling from the available data, we then propose an autoregressive model 379 based on the following first order polynomial approximation: with μ the estimation of the mean value of the frequency deviation and distributed according to 381 the symmetric Logistic distribution.

382
A fast estimation of the parameters and μ in (12)  An accurate analysis of the actual frequency data can also imply a non-Normal underlying distribution. The case of auto-regressive models dealing with non-Normal underlying distribution has been treated in the literature, such as the work in [57], with reference to Student distribution and that in [58], with reference to Logistic distribution. In this paper, we focus on the case of the Logistic distribution, as suggested by the analysis shown in the numerical applications. In this case, in order to infer the frequency modeling from the available data, we then propose an autoregressive model based on the following first order polynomial approximation: withμ the estimation of the mean value of the frequency deviation andâ t distributed according to the symmetric Logistic distribution. A fast estimation of the parametersφ andμ in (12) can be performed by solving the following system equations [58]: where n s is the number of samples. This primary and partial estimation can support a more rigorous and simultaneous estimation of the three parameters in (12) based on the classical statistics method, as the maximum likelihood estimators. The numerical solution can exhibit some convergence problems and, therefore, it can be rather useful to have a preliminary evaluation of the parameters. The likelihood function related to the model (Equation (12)) is given by: with By imposing the partial derivatives of the log-likelihood function with respect to the unknowns µ, φ, and σ equal to zero, the following system of equations is obtained [58]: whose solution provides the estimate of the parametersμ,φ, andσ.

Numerical Applications
In this section, the results of numerical applications of the proposed approach are reported and discussed. In particular, the results of the battery control for the provision of the primary frequency regulation service are presented first. Then the accurate analysis to represent frequency patterns through an autoregressive model is reported. A discussion on the lifetime duration and the implications of the control law on the battery aging is presented in the final part of the section.

Battery Control for the Primary Frequency Regulation
The simulation of the primary frequency control described in Section 3.3 has been implemented with reference to real frequency data [56]. According to the requirements defined in [17], the power and energy rating of the BESS were 98.5 MW and 49.5 MWh, respectively, as derived in [15]. Starting from these data and taking into account the requirements imposed by the frequency regulation service in Europe (as discussed in Section 3), the features of the control simulation tool depicted in Figure 4 are easily derived. Regarding the restoration factor, the value k 1 = 0.4 has been considered.
In Figure 6, some results over seven days of simulation were reported. In particular, the SOC profile is shown in Figure 6a, and the power requested to the BESS is reported in Figure 6b. The SOC profile in Figure 6a shows the use of the BESS for regulation purposes, thus highlighting the repeatedly charging and discharging cycles occurred while the upper and lower limit (0.9 p.u. and 0.1 p.u., respectively) are satisfied and the average SOC value is always close to the reference value (0.5 p.u.). Additionally, Figure 6a clearly shows how the BESS is stressed in terms of charging/discharging cycles. It is shown, in fact, that a full charging/discharging cycle happens every few days. During this period, however, a huge number of partial cycles apply whose depth vary within large ranges, depending on the velocity of the SOC restoration. Figure 6b shows that the upper and lower limits of the BESS' power are also satisfied (+1 p.u. and −1 p.u., respectively). 0.1 p.u., respectively) are satisfied and the average value is always close to the reference value within large ranges, depending on the velocity of the restoration. Figure 6b shows that the 417 upper and lower limits of the BESS' power are also satisfied (+1 p.u. and −1 p.u., respectively).

425
In this section, the frequency data actually measured in a European continental synchronous 426 network are analyzed [56]. They refer to the year 2016, with a sampling period of 10 s. As an example, 427 in Figure 7, the frequency pattern is reported with reference to one day.

Data analysis to Represent Frequency Patterns through an Autoregressive Model
In this section, the frequency data actually measured in a European continental synchronous network are analyzed [56]. They refer to the year 2016, with a sampling period of 10 s. As an example, in Figure 7, the frequency pattern is reported with reference to one day. 0.1 p.u., respectively) are satisfied and the average value is always close to the reference value 413 (0.5 p.u.). Additionally, Figure 6a clearly shows how the BESS is stressed in terms of 414 charging/discharging cycles. It is shown, in fact, that a full charging/discharging cycle happens every 415 few days. During this period, however, a huge number of partial cycles apply whose depth vary 416 within large ranges, depending on the velocity of the restoration. Figure 6b shows that the 417 upper and lower limits of the BESS' power are also satisfied (+1 p.u. and −1 p.u., respectively).

425
In this section, the frequency data actually measured in a European continental synchronous 426 network are analyzed [56]. They refer to the year 2016, with a sampling period of 10 s. As an example, 427 in Figure 7, the frequency pattern is reported with reference to one day.     Figure 5, but they are reported in a more detailed representation to show some statistical features more accurately. Moreover, in the figure, the results of two fitting distributions, i.e., Normal and Logistic distributions, are also depicted. In order to better compare the two fitting distributions, Table 1 reports the mean, variance, and Log likelihood of the Normal and Logistic distribution in the first and second row, respectively.   By observing Figure 8 and the data in Table 1

455
In order to obtain a large set of pseudo sample for statistical purposes, the autoregressive model 456 (Equation (12)) based on the underlying Logistic distribution can be then justified. The parameters of 457 the model can be deduced through Equation (17), starting from the measured frequency data 458 available in [56]. In order to show the accuracy of this method, a one-year frequency pattern has been 459 produced. As discussed in [55], for the purposes of the frequency regulation, a good measure for 460 comparing the frequency patterns is the evaluation of the mean crossing time, which represents the 461 mean time between consecutive events in which frequency deviation exceeds a specified barrier (i.e., 462 frequency deviation). In Figure 9, with reference to the barrier |∆ | = 100 MHz, the histograms of the  By observing Figure 8 and the data in Table 1, intuitively, one can infer that both Logistic and Normal distributions are accurate. Both distributions, in fact, have a mean value very close to zero, a small variance, and the Log Likelihood values are very similar and satisfying in both cases. The figure also shows that both distributions provide a good graphical representation of the density function of the real data. However, by analyzing the right and left tails of the fitting distributions, some discrepancies between the Normal distribution and the measured data clearly appear. Indeed, both tails of the Normally distributed data approach zero faster than the measured data. As clearly highlighted in the zooms of Figure 8, Normal distribution implies zero values before |∆f | reaches 100 MHz, while actual events of frequency deviations still occur. A more accurate representation of the actual distributions' tails is obtained through the Logistic distribution, as clearly depicted in the zooms of Figure 8. It is worth to note that the tails of the distributions have a crucial role in our application since their occurrences imply the most severe frequency deviations and, consequently, the most relevant battery wear.
In order to obtain a large set of pseudo sample for statistical purposes, the autoregressive model (Equation (12)) based on the underlying Logistic distribution can be then justified. The parameters of the model can be deduced through Equation (17), starting from the measured frequency data available in [56]. In order to show the accuracy of this method, a one-year frequency pattern has been produced. As discussed in [55], for the purposes of the frequency regulation, a good measure for comparing the frequency patterns is the evaluation of the mean crossing time, which represents the mean time between consecutive events in which frequency deviation exceeds a specified barrier (i.e., frequency deviation). In Figure 9, with reference to the barrier |∆ f | = 100 MHz, the histograms of the mean crossing time for the measured (Figure 9a) and inferred (Figure 9b) frequency data are reported. As clearly shown in the figures, the frequency of the occurrences are very similar in the two cases. Moreover, for both of them, the exponential distribution seems a good fitting of the related probability density functions. It is worth to note that time series with typical autoregressive methods based on an underlying Normal distribution have also been adopted. The corresponding results show that the event of crossing barriers is characterized by a negligible number of occurrences. This is consistent with the considerations made for Figure 8 on the validity of the underlying Normal distribution. The results of Figure 9, clearly show the goodness of the proposed auto-regressive model for the frequency profile based on the underlying Logistic distribution when used to study frequency regulation. The estimated data, in fact, show an excellent agreement to the real measured data based on the consideration that, due to the large number of data, the statistical features and graphical shapes of the related distributions can be used for a proper comparison.
based on an underlying Normal distribution have also been adopted. The corresponding results show 466 that the event of crossing barriers is characterized by a negligible number of occurrences. This is 467 consistent with the considerations made for Figure 8

Statistical Analysis of the Battery Lifetime Duration and Impact of the Control Law
According to the well-known Monte Carlo method, the simulation related to the frequency regulation provided by the BESS was iteratively performed for each of the 10,000 samples of one year-long frequency patterns. The frequency patterns were created with the autoregressive model (Equation (12)) with parameters given by the solution of Equation (17). For each simulation, the expected lifetime was recorded thus obtaining 10,000 samples for the lifetime, which statistically characterize the BESS lifetime. In these simulations, it is assumed that the battery's end of life occurs when the actual capacity reaches 20% of the nominal capacity. Figure 10 shows the histogram of the occurrences of the lifetime duration, which has been evaluated at each iteration of the Monte Carlo, still referring to the case k 1 = 0.4.
The histogram in Figure 10 clearly shows a typical heavy tail distribution, showing a large number of occurrences on the right side of the figure. The mean value of the lifetime duration is 8.20 years and the standard deviation is 1.20 years. This value is aligned with the results reported in the literature such as, for example, in [29], where experimental tests on batteries of the same technology used for primary frequency regulation showed a lifetime of eight years.
The shape of the histogram in Figure 10 can be explained by considering that large frequency deviations (right and left tails in Figure 8), either positive or negative, increase battery wear and, consequently, shorter lifetime duration. The number of times the BESS participates in the frequency regulation depends on the value of k 1 . Indeed, when k 1 decreases, a larger deviation between the available and reference SOC are allowed, thus implying a larger time availability and a larger energy range of the frequency regulation service. In this case, the BESS is able to participate in the regulation service for a greater number of occurrences of larger frequency deviations, which implies a reduction of the lifetime. As a consequence of that, the shape of the histogram radically changes with the value of k 1 . As an example, a histogram corresponding to a lower value of k 1 (k 1 = 0.05) is shown in Figure 11. In this case, as expected, a larger number of occurrences of large frequency deviations are caught by the BESS, and lifetime duration reduces. Additionally, a more regular shape of the distribution is obtained, with a mean value of 3.92 years and a standard deviation of 0.37 years.

488
The histogram in Figure 10

493
The shape of the histogram in Figure 10 can be explained by considering that large frequency

488
The histogram in Figure 10

493
The shape of the histogram in Figure 10 can be explained by considering that large frequency  In order to better exploit the effect on the lifetime duration, the Monte Carlo analysis was iteratively repeated for a larger range of values of the restoration parameter k 1 , to emphasize the impact of the control performance requested to the BESS on the battery lifetime. Particularly interesting are the results obtained in the range k 1 ∈ [0.01, 0.5], which are reported in Figure 12 in terms of the mean value of the lifetime durations.
increases as the parameter increases, in the considered interval, going from less than four years 516 for the lowest value of to almost nine years for = 0.5. As a counteraction to this remarkable 517 advantage, there is a disadvantage in terms of the frequency regulation service availability of the BESS.  The importance of analyzing the effect of the control law on the battery lifetime duration clearly emerges in Figure 12. As expected, in fact, the figure shows that the expected battery lifetime duration increases as the parameter k 1 increases, in the considered interval, going from less than four years for the lowest value of k 1 to almost nine years for k 1 = 0.5. As a counteraction to this remarkable advantage, there is a disadvantage in terms of the frequency regulation service availability of the BESS.

Conclusions
The paper aims to describe the dependence of the lifetime distribution characteristics on the parameters of the state of charge control law. A proper framework was tailored to take into account the stochastic nature of the power system frequency. Twofold original contributions can be observed: the first one refers to the ability to treat power system frequency historical data in terms of the autoregressive model. This modeling allows building stochastic patterns for the subsequent evaluation of the probabilistic features of the battery lifetime. The second original contribution lies in the rationale procedure that highlights the effects of the control law on the battery lifetime. Indeed, the battery lifetime is correctly estimated with a realistic dynamic modeling that includes a state of charge control strategy besides an active-power and frequency control. In particular, the effect of the control parameter on the restoration of the state of charge of the battery has been analyzed. From the reported results, the significant impact of this parameter on both economic and technical aspects clearly emerges. In fact, it has been found that a higher value of this parameter implies an increase in the expected battery lifetime duration-thus obtaining a beneficial effect from the economic point of view-while the availability of the frequency regulation service decreases, thus implying a technical degradation of the frequency quality. Conversely, lower value of the restoration parameter implies a shorter expected lifetime-thus implying a detrimental effect on the economic aspect-and an increased availability of the regulation service, thus improving the resulting frequency quality. In the Monte Carlo procedure, the various steps of the proposed approach are clearly explained, therefore it can be used as a tool for choosing the most convenient parameter values of the state of charge control law, for a given frequency profile and the specific battery technology, in order to optimize both the frequency response and the battery lifetime. Future works will be devoted to deduce analytical results which can be useful for the sensitivity and robustness analysis. The idea is based on the possibility of predicting the cycle number directly from the knowledge of the power system frequency spectral analysis, avoiding the huge complexity of the battery cycles' counting. This could allow time-consuming procedures, such as the Monte Carlo method, to be able to infer the relationship between battery fatigue and the spectral features of the power system frequency in a closed form. Funding: This research received no external funding.   [29]

Conflicts of
battery lifetime; -battery round trip efficiency; -battery C-rate.
electrical-thermal model of a Lithium-ion battery; -experimental test verification; -performances of the Lithium-ion battery.
effect of the set-point adjustment strategies on system stability; -sensitivity of battery on design parameters; [31] battery charging/discharging process; -SOC constraints; -primary frequency reserve availability; -regulation curve droop-control.
model which accounts for both technical provision of regulation service and economic revenues; -effective methods to increase the potential of batteries in regulation services.
[32] -battery aging model; -battery lifetime; -system price, electricity and primary reserve market data; -simulation model including: frequency control module, battery module and the statistical evaluation module; -costs and revenues analysis; -statistical analysis. the suitability of battery's control strategies used to provide primary frequency regulation; -impact of different parameters on the battery aging; -comparison of different strategies. [36] peak shaving; -battery degradation; -uncertainties in load and signals; -services' revenue; -real data of commercial users.
real-time battery control for providing peak shaving and frequency regulation; -study of the revenue obtained by the joint optimization of the peak shaving and frequency regulations services. [37] -SOC constraints; -load/generation balance; -real data of wind, irradiance and loads; model to size battery-supercapacitor hybrid storage system; -statistical simulation; -control strategies of battery/supercapacitor hybrid system; [38] load frequency control reserve; -load frequency control ramp rate; -SOC constraints; power and energy capacity of battery assisted load frequency control unit; -simulation model; [39] battery response performances; -generator and battery cost; -real load data; -sizing of energy and power capacity of battery system; -sizing of regulation capacity of generators; -total cost minimization; [40] battery capital and maintenance cost; -real data of wind power and load; -curtailed wind energy; -reserve capacity; capacity configuration of the battery storage system combined with a wind turbine generator; -control strategies of the battery storage system assisted wind turbine generator for frequency regulation reserve; [41] -SOC constraints; -battery module and temperature; -battery C-rate; -ageing of batteries due to the network frequency regulation services; [42] historic data of frequency; -demand/ generation forecasting errors; -battery degradation; -SOC set-point; optimal battery power/energy rated value; -battery control parameters; -real-time strategy to continuously maintain the SOC value within operative ranges; [43] load leveling and reserve support; -battery capacity degradation; -charging/discharging battery operation; optimal sizing of a BESS in isolated microgrids; -management of uncertain power of solar, wind and load; -optimal selection of the battery technology; -statistical analysis; [44] energy/freq. response market real data; -regulatory framework; -battery degradation costs; sizing of storage system integrated with wind power integration; -viability of the system in specific real scenarios; -wind turbines/battery control for frequency support; planning and control strategy of battery based on stochastic dynamic program; -control strategy for minimizing operating and degradation cost; -optimal SOC control;