An Analysis of a Storage System for a Wind Farm with Ramp-Rate Limitation

: This paper provides evidence on how the variability of the power produced by a wind farm and its revenue are affected by implementing a ramp-rate limitation strategy and by adding a storage device to the system. The wind farm receives penalties whenever the ramp-rate limitations are not respected and may be supported by batteries to avoid this scenario. In this paper, we model the battery usage as a discrete time homogeneous Markov chain with rewards thanks to which it is possible to simulate the state of the charge of the battery and to calculate the amount of penalties suffered by the wind farm during any period. An application is performed considering the power produced by a hypothetical wind turbine located in Sardinia (Italy) using real wind speed data and electricity prices from a period of 10 years. We applied the concept of ramp-rate limitation on our hourly dataset, studying several limitation scenarios and battery capacities.


Introduction
One of the main problems resulting from the increasing use of renewable energy is its variable and intermittent nature. Wind power is characterized by rapid changes that are difficult to predict and cause increasing uncertainty for the production of the electricity in a power grid [1][2][3]. This aspect makes the participation of a wind farm in an electricity market difficult to control because this kind of market needs to provide stable energy output [4]. A way to smooth this phenomenon is to bring electrical energy from different wind turbines geographically distributed across the territory, but the problem still persists as the production of electricity drops or suddenly increases depending on the wind speed [5].
A wind farm must be able to regulate its power output by means of different actions such as production curtailment, using ancillary services [6], disconnecting turbines or controlling them [7]. A solution proposed in several studies is to limit the ramp rate of the wind power. The ramp rate is the difference in power from a time-step to the ∆t time-step ahead divided by ∆t ([e(t + ∆t) − e(t)]/∆t, where e(t) is the power produced at time t). Usually, the time steps considered are in minutes and the unit of measure of the ramp rate is MW/minute. In our study the time-step considered is 1 h and the cumulated power produced in 1 h gives the energy. When the production of electrical power at the time ∆t + 1 is greater that the production at the time t we have a ramp-up event, vice versa we have a ramp-down event [5,[8][9][10].
Limiting a ramp-up event means that the wind turbine has to produce a lower quantity of energy than the quantity it would produce in that time step if there were no imposed limitations. On the contrary, limiting a ramp-down event means that the turbine has to produce a greater quantity of energy than the quantity it would produce in the same time step without any limitation. Usually, the wind farm can limit only the ramp-up events or both the ramp-up and ramp-down ones with a considerable cost [10]. To control the power fluctuations and to make the wind farm respect the ramp-rate limitation, it is possible to add a fast-ramping power storage to the system capable of absorbing power in the case of a ramp-up event and to provide power in the case of ramp-down event. In the literature most of the research studies how to combine and control the wind power generators with storage systems, taking into account different storage typologies and the costs that the wind farm has to face. Several energy storage technology options are available to mitigate wind power fluctuations, each of them characterized by different variables such as environmental impact, power capacity, energy density, operating temperature, life, cost, efficiency, response time and maintenance [11]. The main goal of the power storage is to decrease the uncertainty in the output of a wind farm and to reduce the fluctuation of the wind power, making the system a competitive energy source [12][13][14][15][16]. The main difficulties to overcome are its maintenance and operating costs [17]. In [5] the implementation of the ramp-rate limitation is coupled with the optimal storage operations that the wind farm has to carry out considering the wind power six-hour forecast using a Gaussian Process. The main variable to control is the state of charge (SOC) of the storage. To better face the variability of the wind power, the power storage can be flanked by a gas generator with the goal of smoothing the output power [18]. In [19] the Li-ion and flywheel storage systems are studied in terms of ramp-rate limitation and costs considering a wide range of storage powers and capacities. In this case the best technology is shown to be the flywheel for ramp-rate abatements up 80%. Moreover, the storage system can be studied as a way to decrease the use of the fuel reserve generation [20].
In spite of the relevance of the aforementioned contributions, a crucial aspect is missing in the literature and constitutes the core of our study. Indeed, our work is mainly motivated by concerns about the development of a general mathematical model to deal with random evolution of the penalties and revenue of wind power activity under a ramp-rate limitation scheme. In particular, once a storage system is selected, it is necessary to evaluate the economic implications of this choice in relation to wind resources available at the site and to the penalization rules in force. The response to this question is provided in terms of Markov reward processes, which are amenable to rigorous probabilistic analyses and thus furnish a complete understanding of the dynamic of the revenue and penalty processes over any horizon time. The final result is given by new equations for the moments of the accumulated penalties in a given time interval. To reach this goal, a specific methodology of application is advanced and applied to real data.
First, we analyze 10 years of wind speed and electricity price data on an hourly bases referred to the same period. We applied a ramp-rate limitation to the wind power produced, considering in total seven limitation scenarios. For simplicity, we assume that the wind farm is composed of only one wind turbine of maximum ramp rate of 2 MW/h. In general, it is possible to apply the same methodology to a wind park. We consider seven ramp-rate limitations which are indicated as a percentage of the maximum ramp rate of the wind turbine. These limitations range between 1% and 40%. For each ramprate limitation, we value the change in the power and revenue profiles. The obtained profiles are compared with the unmodified ones. Besides, we consider multiple scenarios by connecting our system to different combinations of batteries that make us take under consideration three different capacities. Thus, the overall considered cases cover a very wide range of possibilities described in terms of ramp-rate limitation, total capacity of the battery system and initial charge of the batteries. In each one of these scenarios, we study the revenue of the wind farm depending on the available capacity of the battery, taking into account the produced power, the cost of the battery, and the penalties received by the wind farm caused by the impossibility of respecting the imposed ramp-rate limitations.
Then, we propose a mathematical model based on a Markov chain in discrete time to reproduce the behavior of the battery which alternates its status among the three operations of charge, discharge or unchanged condition. The amount of the power discharged or charged is thought of as a random variable depending on the state of the Markov process. Therefore, the global model is a Markov chain with rewards. For each limitation we estimate the transition probability matrices and the cumulative distribution function of discharge and charge operations of the storage system. The wind farm receives a penalty when it cannot fully upload/download the power resulting from the modification of the power profile according to the ramp-rare limitation considered. We prove that higher order moments of the cumulated random penalties satisfy a system of recurrent equations. From a mathematical point of view, the equation provides moments of discounted Markov reward process where the state of charge of the battery acts as an index changing value according to the discharge/charge operations influenced by the ramp-rate scenario, the wind speed and the battery capacity. Finally, we compare the results obtained from the model with the ones based on real data. The findings obtained prove the suitability of our methodology.
The practical implications concern the understanding of how a ramp-rate limitation can be implemented, to estimate how the costs and the penalty the wind farm has to face change according the number and the capacity of the battery modules, and to have a usage model which describes and quantifies the trend and the variations of the charges and the discharges of the battery over a chosen period of time.
In summary, the purpose of this work is to provide a new methodology to control and forecast the revenues and the penalties coming from the application of a ramp-rate limitation regime. The method we propose is applied to data of power production, estimated from wind speed data, and hourly electricity prices recorded in Italy during a period of 10 years. It is relevant to note that such a mechanism does not exist on the Italian market and the results and the conclusions of this investigation should not be interpreted at the level of policy implications; Italian data are considered only as a matter of example to illustrate the general approach and its potentialities. The application of the methodology needs the addition of the concept of the up-and downregulation of prices, which is well developed in several countries. In this study, we consider ERCOT (Electric Reliability Council of Texas) rules to obtain these last two quantities. Thus, the main aim is to present a versatile methodology applicable, in principle, to all energy markets.
The revenue is calculated by multiplying the electricity hourly price by the hourly power produced (energy). We consider different time horizons to calculate it, such as hourly and yearly revenues.
The dataset used, its main statistics, the several scenarios in which we limit the ramp rate and the description of the model utilized to study the behavior of the battery are shown in Section 2. In Section 3 we illustrate the results obtained and in Section 4 we discuss what has been achieved.

Materials and Methods
In this section we present the main variables involved in the revenue generating process of a wind farm and how they concur to determine the revenue considering their interrelationships. The starting points are the wind speed and the electricity price. They are the natural determinants of the revenue but, as will be explained, many limitations can be considered to increase the complexity of the system and better mimic real systems. We describe several scenarios which are the result of imposing ramp-rate limitations by considering a system formed by the wind turbine and storage batteries. In case of noncompliance with the ramp-rate limits the farm may incur a system of penalties which may severely affect the total revenue.

Wind Speed Data
The wind speed is the main variable from which we start to describe our system. The data used in this study are hourly based and they refer to the period from 1 August 2008 to 1 August 2018. The dataset has been obtained from the Modern-Era Retrospective analysis for Research and Applications, Version 2 (MERRA-2, [21]) and refers to Geographical coordinates 39.5 N latitude and 8.75 E longitude (Sardinia, Italy).
Basic statistics about the wind speed are listed in Table 1 and in Figure 1. It is possible to notice the hourly trend of the wind speed, which presents higher values in the central hours of the day.

Electricity Price
We obtained the hourly electricity prices from the online database made available by the Italian joint stock company "Gestore dei Mercati Energetici" (GME, [22]). GME deals with many important tasks in the energy sector in Italy; one of them is the economic management of the electricity market, ensuring the availability of an adequate reserve capacity. The electrical system is divided into portions of transmission networks for which there are physical energy transit limits to guarantee the safety of the system itself. The price is set hourly as the equilibrium between supply and demand for each zone. The price data we used in this work refer to the zone of Sardinia, where the hypothetical wind turbine is located.
In Table 2 the statistics about the electricity prices referring to the studied period (from 1 August 2008 to 1 August 2018) are listed. A few years ago, the highest prices were formed during the daytime when the load peaks occurred, while in recent years the price peaks have occurred in the pre-eveningevening hours (from 5 to 10 p.m.) upon the decrease in wind production. This behavior is observed in [23] and it is evident in Figure 2. This fact is due to the growing penetration of the production of electric energy from renewable sources (in particular non-programmable ones such as wind and photovoltaic) which led to a variation in the price profile on the energy market.

Wind Turbine Production and Revenue
The turbine taken into consideration has the characteristics listed in Table 3. Table 3. Characteristics of the wind turbine [24].  The power depends on the wind speed x, which in turn is a stochastic process whose values change in time. Thus, if x(t) is the wind speed at time t we denote the corresponding power by e(x(t)). When no confusion may arise, we use the notation e(t) to denote the power at time t, implicitly assuming it depends on the level of wind speed, i.e., e(t) = e(x(t)).
In Table 4 the main power statistics are shown.

Up and Down Ramping Limitation
The power process inherits consistent variability from the wind speed. This is an undesirable property that put the grid stability to the test. The need to stabilize wind power production and avoid sharp fluctuations may be approached by assuming specific limitations on the power generation process which are expressed as a percentage of the wind turbine rated power [5,9,16]. Given a limitation denoted by lim, we observe a ramp-up event at time t whenever the power available is larger than maximum power allowed to be dispatched, i.e., e(t) > e(t − 1) + lim. Similarly, we observe a ramp-down event at time t whenever e(t) < e(t − 1) − lim, i.e., whenever the power available is less than the minimum power allowed to be dispatched. Thus, a policy of ramp-up and ramp-down limitation imposes a limit on the slope that the power profile should not exceed from one time step to the next. This means that we are limiting too high-power fluctuations and we are providing more constant power over the time. This limitation may greatly influence the revenue of the wind power plant and for this reason it is important to quantify the change in relation to the unmodified scenario and to the ramp-rate percentage imposed.
In order to modify the power profile, we apply the following formula: where ce(t) indicates the modified power according to the ramp-rate limit chosen, lim. The limit is the maximum allowed ramp rate which is a percentage of the maximum ramp rate of the turbine. We assume that the maximum ramp rate is 2 MW/h because the available database is hour-based. Thus, in Equation (1) we have the following three cases: • The first case refers to the upramping limitation and it establishes that if the power at the time step t exceeds the value obtained by adding the power at time step t − 1 with the imposed limitation, the power at time step t is modified and it is equal to the sum of the power at time step t − 1 and the imposed limitation; • The second case refers to the downramping limitation and it establishes that if the power at the time step t is less that the value obtained by subtracting the power at time step t − 1 with the imposed limitation, the power at time step t is modified and it is equal to the difference of the power at time step t − 1 and the imposed limitation; • The third case happens when the power profile respects the imposed limitation and then the modified profile has the same value as the original one.
It should be remarked that downramping limitations can only be implemented by using a hybrid cogeneration system that is able to supply the power required to not drop below the downramping limit. A viable solution is to use a power storage system that could provide the necessary power in the case of a downramping event and store power in the case of an upramping event. These operations should be executed according to the technical constraints of the specific power storage system.
At this point we study the cases in which we add an NaS battery to the system to analyze how the wind turbine revenue changes. The functionality of the battery is to store power when the upramping limit is exceeded and to provide power when the downramping limit is exceeded.
When the battery has a state of charge that make it unable to charge or discharge the amount of power needed, the wind farm receives a penalty. In particular, if the system cannot respect the upramping limit, the penalty is calculated by multiplying the amount of power exceeding the limit by the downregulation price, here denoted by the symbol x +1 . It refers to the downregulation price used in [8] and it derives from the separation of the frequency regulation market in ERCOT into upregulation prices and downregulation prices.
On the contrary, if the system cannot respect the downramping limit, the penalty is calculated by multiplying the amount of power below the limit and the upregulation price denoted by x −1 . The two penalties, used in this work, are obtained by considering the upand downregulation prices and the average electricity price in ERCOT during the dataset period; we use these quantities and the average electricity price in Italy during the same period to calculate the new up and downregulation prices.
The correct understanding of the revenue process needs to include costs and especially penalties in case of violation of power limits which should be adequately modelled. The latter is the scope of next subsection.

Stochastic Modelling of Battery Operations and Assessment of Penalty
In each time step, the battery can operate in the three different ways: charging, discharging and unchanged condition. We create the difference vector formed by all the power excesses and defects of the real profile {e(t)} t∈N with respect to the modified one {ce(t)} t∈N and from this we obtain the unitary vector which is formed by a series of states {B(t)} t∈N with B(t) ∈ {−1, 0, +1}. These three values indicate three possible states: • +1 when power variation is greater than upramping limitation: the excess power has to charge the battery; • −1 when power variation is lower than downramping limitation: the necessary power has to be provided by the battery; • 0 when power variation respects the up and downramping limitation and does not cause variation in the charge level of the battery.
We hypothesize (Hypothesis 1) that the series {B(t)} t∈N is a realization of a discrete time homogeneous Markov chain. Therefore, the transition probabilities of the battery usage satisfy the following relation: To each state visited in time by the Markov chain B(t) we associate a reward that in our model represents the power charged into the battery or discharged from the battery. Let R(t) be the stochastic process describing the theoretical variations of the power into the battery. Suppose that B(t) = +1, we associate with this state occupancy the random power R(t) = R +1 which is charged at time t. On the contrary, suppose that B(t) = −1, we associate with this state occupancy the random power We suppose (Hypothesis 2) that at any time t ∈ N the conditional distribution of R(t) only depends on the state B(t), i.e., Moreover, we assume, only for regularity reasons, that F +1 (·) and F −1 (·) are absolutely continuous. From this assumption it results that when B(t) = +1 the process R(t) has a distribution which depends only on the state B(t) = +1, and we indicate with R +1 a random variable which has the same cdf of R(t) conditional on B(t) = +1. This means that where the symbol D(x) denotes the probability distribution of the random variable X.
In the same way Thanks to the distribution D(R +1 ) and D(R −1 ) we can obtain the charge and discharge vectors. The charge vector is formed by repeated realizations of R +1 and it collects possible battery charges according to the probability distribution D(R +1 ). Similarity, repeated realizations from R −1 form the discharge vector.
We introduce a further random process {SOC(t)} t∈N = {S(t)} t∈N which indicates the state of charge of the battery at the time t. First of all, we can affirm that this process is subject to some technical constraints that imposed as upper and lower limits to the percentage of charge. Thus, where c and c are the minimum SOC level and the maximum SOC level of the battery, respectively. Given a value of the power level at time t − 1, S(t − 1) = l, it is possible to obtain the value at the following time-step t according to the following relation: where x ∧ y indicates the minimum between x and y, and x ∨ y indicates the maximum between x and y. At the time t − 1, S(t) is a random variable being dependent on the state of the Markov chain at next time, that is B(t), and on the charge-discharge random variables R +1 and R −1 .
Therefore, if B(t) = +1 we have the minimum between l + R +1 and c, if B(t) = −1 we have the maximum between l + R −1 and c. The battery charge remains unchanged if B(t) = 0.
At this point we introduce the last random process indicating the penalties {M(t)} t∈N . This process indicates the value of the penalty that the wind farm could receive at each time t ∈ N. It is important to notice that the wind farm receives a fine in two cases. One is when the variation R +1 at time t cannot be wholly or partially charged in the battery. In this case the excess of power that cannot be stored determines a penalty. The other case occurs when the variation R −1 cannot be wholly compensated by the dispatchable power stored in the battery and also in this case the wind power producer suffers a loss proportional to the excess of drop in power. Let therefore where x +1 and x −1 are the monetary value per unit of lost power during an upramping and downramping event, respectively. The overall methodology is summarized in the block diagram in Figure 4. In a time interval [0,t] we can characterize the value of the total penalties collected by the wind power producer by using reward process; see [25] for a general presentation and results. For this purpose, we define: where r is the force of interest and e −rs is the implied discount factor. The interest rate structure is considered to better compare the value of the penalties in time, which is an important aspect, especially when t is large and in economic periods characterized by high interest rates. The random process ζ(t) gives the monetary value at time zero of the cumulated discounted penalties until time t. The knowledge of the probabilistic properties of this process is crucial in determining the revenue generated by the wind farm in the considered power variability-mitigating scheme.
To this end, we consider the conditional higher order moments of the accumulated discounted penalty process. i,l (t) representing the n-th moment: Proof. See Appendix A.

Remark 1.
If in Proposition 1 we consider n = 1, we obtain the equation of the expected value V i,e (t) as follows: As a particular case of this Equation (13) we find that if we take t = 1 and r = 0 we obtain which expresses the expected value of the penalty at the first period. The final equation V i,l (t) gives us the expected value of the total cumulative penalty given any initial state i, any initial battery level l, the force of interest r, the distributions of F +1 and F −1 and the transition probability matrices.

Remark 2.
If the distribution functions F +1 and F −1 are not absolutely continuous, the Equation Obviously, the related integrals should be intended in the Riemann-Stieltjes sense.
Remark 3. From a mathematical point of view, it is worth noting that the results achieved in this paper are more general than those related to Markov reward processes presented in D'Amico (2010). The reason is that here we deal with a Markov reward process endowed with an indexing process (the state of charge S(t) of the battery) that acts as a censor on the random rewards limiting their realizations according to the value of the charge/discharge action R(t) as related to the previous state of charge S(t − 1), to the total capacity and to the ramp-rate limitations. This censoring mechanism acts as a perturbation of the stochastic system. Indeed, if the battery could furnish any required amount of power and have enough capacity to store any exceedance our result would coincide exactly with that contained in [26,27].

Applications
To apply the studied model, we have to specify which kind of battery we consider because we have to take into account all the battery's properties that characterize and limit its performance. The choice of a NaS battery is driven by the fact that it is more costeffective with respect to flywheels and supercapacitors for these types of applications [18]. The parameters that we take into consideration are the following:

•
The SOC of the battery which is the level of charge of the battery; • The available storage capacity. If we are in the case of ramping up, it is the difference between the maximum capacity and the actual SOC; if we are in the case of ramping down, it is the difference between the actual SOC and the minimum capacity (Frate et al., 2019).

•
It is also important to consider the minimum SOC level of a battery that we assume equal to 0.1 of the storage size, and the maximum SOC level that we assume equal to 0.9 of the storage size [5].
The NaS battery used in this model has a round-trip efficiency of 80% and a module energy capacity of 0.36 MWh. Regarding to the cost of this battery, we have a module capital cost of EUR 214,000 and an operating cost of EUR 7200/module-year. Furthermore, we consider a 20-year length of capital investment. The NaS battery has a continuous power rating of 0.05 MW and a pulse power capacity which can be four times the power rating for 15 min [8]. In this way it is possible to have a module power limit of 0.2 MW. Given that our time step is 1 h, the constraint imposed by the module power limit is implied by the module energy capacity, therefore it is not considered in this study.
Since the available dataset is hourly, we take into consideration the module energy capacity and the SOC level to determine how much power can be charged or discharged in each time step. In particular, we consider the following three different scenarios:

•
The turbine is connected with 1 battery with minimum SOC level 0.036 MWh and maximum SOC level 0.324 MWh; • The turbine is connected with 2 batteries with minimum SOC level 0.072 MWh and maximum SOC level 0.648 MWh; • The turbine is connected with 3 batteries with minimum SOC level 0.108 MWh and maximum SOC level 0.972 MWh; that are applied to six ramp-rate limitations equal to 1%, 2%, 5%, 7%, 10%, 20% and 40% of the wind turbine rated power. For each of the six limitations we create a transition probability matrix that describes the probabilities of transition from the present state at time t to the next one at time t + 1. Obviously, we expect the transition probability matrices to be different according to the considered percentage of limitation because diverse percentages generate different sequences of charge/discharge events that in turn imply specific probabilities of transition. We use these matrices to represent the behavior of the battery and to obtain the theoretical charge and discharge realizations for each limitation. After this we compare the amount of penalties obtained by the wind in reality with those obtained by the model through Proposition 1.
Regarding the penalty, we assign x +1 the value of 21.52 EUR/MWh which is the average downregulation price in [8] making it proportional to the average electricity price in Italy during the dataset period. Likewise, we assign x −1 the value of 26.50 EUR/MWh considering the average upregulation prices.
To have a better idea of how much the wind farm loses because of the penalty obtained in relation to how much it earns, we calculate the revenue of the wind farm as the multiplication between the price and the power at each time step and we subtract the obtained penalties and costs.

Results
This section is divided in three subsections in which the results of this study are shown. In the first subsection we present the results without considering a battery connected to the system. In the second subsection we consider the case in which the system is connected to battery. Finally, in the third subsection we show the results obtained by modeling the behavior of the battery.

Main Statistics and Revenue of Limited Power Production
In this case the power profile respects the limitation for the whole period. We limit both the upramping and the downramping considering the five percentage limitations (2%, 5%, 10%, 20% and 40%) according to study [8] and we add the percentage of 1% and 7%. Obviously, the study can be repeated for any percentage. In Figure 5 we can observe a power profile sample referred to the period from 2 August 2008 to 6 August 2008 in which the difference between the power profiles without limitation and with a percentage limitation of 1% is evident. In the case in which a battery can support perfectly the system, we can notice that the two power profiles are coincident only when the ramp-rate limitation is respected. When the power profile without limitation (red line) is higher than the limited power profile (blue line), the hypothetical battery is charging. On the contrary, when the power profile without limitation is lower than the limited power profile, the hypothetical battery is discharging power.  Table 5 shows the hourly means and standard deviation of the produced power with and without limitations. We can say that for severe ramp-rate limitations (1%, 2%, 5%, 7% and 10%) the standard deviation and, consequently, the variability of the power produced decreased, whereas for less strict ramp-rate limitations (20% and 40%) the standard deviation tends to be similar to the no-limitation value. Regarding the mean power, there is a decrease in the hourly average power produced for 1% and 2% limitations, then for higher percentages the value stabilizes around the limitless one. In particular, for the percentage limitations of 5% and 7% the hourly mean power is higher than the one produced without limitation and this is due to the fact that during a ramp-down event limitation a higher amount of power is produced with respect to the no-limitation case. This leads us to obtain an hourly mean power which exceeds the value of 411.28 kW. It is also possible to analyze the wind turbine revenue when these limitations are applied. The results are shown in Table 6. In general, it is noticeable that the 1% and 2% limitation hourly revenue is lower than the limitless revenue, while it tends to be higher with 5%, 7% and 10% limitations and then it stabilizes around the limitless value for higher limitation percentages (20% and 40%). This phenomenon could be due to the limitation of the downramping rate which causes a greater amount of power to be produced in the decreasing phase, and also to the time in which this limitation occurs (if it occurs during the evening when the energy price is higher on the average, the wind turbine revenue increases). Table 6. Statistics of wind turbine hourly mean revenue (HMR) in EUR with and without limitations. The value higher than the associated limitless one is in round brackets and the value lower that the associated limitless one is put in square brackets. Considering the average hourly revenue results, it is clear that for a ramp-rate limitation of 1%, the wind farm revenue decreases by 18% with respect to the no-limitation revenue, and by 6% with a ramp-rate limitation of 2%. The other studied limitations do not give considerable changes.

Main Statistics and Revenue of Limited Power Production with the Addition of the Battery to the System
We consider the cases in which one, two and three real batteries are connected to the wind turbine. Since the batteries have a limited capacity, they are not able to charge or discharge all the power that the system needs to respect the up-and downramping limitation at each time step. In Figure 6 there is a power profile sample referring to the period from 2 August 2008 to 6 August 2008 in which we can note the difference between the power profile without limitation and the power profile representing the power produced by a system composed of one wind turbine and three batteries with initial state of charge SOC(0) = C/2 that has to respect a percentage limitation of 1%. In Table 7 the total amount of the penalty, the number of times it occurs and its average for the no-limitation scenario and for up and downramping limitation scenarios are shown. The amount of the total penalty decreases with the increase in the limitation percentage because the higher is the percentage, the lower is the number of times the power profile does not respect the limitation. In addition, the amount of penalty decreases with the increase in the number of the utilized batteries; this is due to the fact that a higher number of batteries corresponds to a larger total capacity available and therefore to a larger amount of power that can be charged or discharged. The number of times the penalty occurs follows the same trend. The average penalty rises as the limitation percentage increases because the times in which the system cannot respect the limitation correspond to bigger quantity of power and consequentially to the greater amount of penalties.
In determining the economic performance of a wind farm, it is also important to consider the costs that the wind farm has to face due to the battery. This cost is given by the sum of the module capital cost which is about EUR 10,660 per year and the module fixed operating cost which is about EUR 7100 per year.
As it is possible to notice from Table 8, the yearly revenue increases as the ramp-rate limitation percentage increases. Indeed, a higher percentage implies a lower limitation and consequentially a higher revenue for the wind farm. The grid stakeholders have more benefits if the percentage is low because it means having a more constant power and grid stability. The variation of the number of the batteries does not greatly influence the revenue of the wind farm because the lower amount of penalty is coupled with the greater amount of the costs of the battery. It is possible to notice that an increasing number of batteries brings a small economic benefit for the limitation percentages from 1% to 10%, then for bigger limitation percentages the use of an increasing number of batteries gives an almost constant result.

Battery Behavioral Statistics and Model Result
For each ramp-rate limitation we build the series of states {B(t)} t∈N and the realization of the R +1 and R −1 random variables. In Figure 7 the histograms of the charge and discharge vectors referring to the 1% ramp-rate limitation percentages are reported as examples.  At this point, for each limitation we estimate the cumulative distributions functions of the realizations of R +1 and R −1 using both the empirical cdf (ecdf) and two of the most common parametric probability distributions, the Exponential cdf (exp cdf) and the Weibull cdf. In Figures 8 and 9 the graphical and the Q-Q plots comparisons, respectively, between the two parametric distributions (Weibull and Exponential) and the ecdf of the charge and discharge vectors referring to the 1% are shown.  In Tables 9-12 we report the main statistics referring to the distribution taken under consideration. The analyzed distributions fit well the empirical ones when the ramp-rate limitation percentage is strict (1%, 2%, 5% and 7%). In these cases, the p-values are smaller than 0.05. On the contrary, it presents higher values for the percentages of 10%, 20% and 40% because the amount of data is very small since the power profile does not respect these higher percentage limitations a small number of times.  By considering the series {B(t)} t∈N and assuming that it is a realization of a discrete time homogeneous Markov chain, we create the probability transition matrix for each ramp-rate limitation. The obtained matrixes are the following: The probabilities P ij are estimated by the maximum likelihood estimator (MLE) and P ij = N ij /N i where N ij is the number of transitions from the state i to the state j, and N i is the number of the total visits in i (that is, N i = ∑ j E N ij ). For example, if we are in the case of ramp-rate limitation of 1% and we are in the state B(t) = −1, the probability that the next state B(t + 1) is again equal to −1 is 88.9%, and there is a lower probability that the same case will happen if the ramp-rate limitation is 10% (in this case it is 67.8%).
Thanks to the obtained matrixes and to the charge and discharge distributions F +1 and F −1 of the random variables R +1 and R −1 for each ramp-rate limitation we can compute the moments of the accumulated penalty process by means of Proposition 1.
According to this procedure we can use the Markov chain model with random rewards R +1 and R −1 to predict the behavior of the charge of the battery and therefore also of the penalty that a wind farm receives at the following time-step t + 1, being in the actual state B(t) with a level of charge S(t) = l or related to any future time interval.
In Table 13 we show the statistics about the penalty computed both in the real case and using the Markov model in the cases of Exponential and Weibull distributions. The hourly mean penalty is calculated by considering the mean of all the 8760 values for each year and computing the mean of the 10 values obtained (one for each year). The initial SOC of each battery is fixed to be a half of its total capacity (S(0) = C/2) and the initial state is B(0) = 0. Considering the three combinations of batteries taken into consideration, the values both of the total amount of penalties and of the hourly mean penalty in one year are similar, and follow the same trend moving from a limitation percentage to another and from the one battery case to the two and three battery ones. Table 13. Total Amount of Penalty (TAP) and Hourly Mean Penalty (HMP) statistics in EUR referring to real case and theoretical ones: the real data penalty without brackets, the theoretical penalty with Exponential cdf within each round bracket and the theoretical penalty with Weibull cdf within each square bracket. The total amount of penalty decreases both when increasing the limitation percentage and increasing the number of the batteries.

1%
The initial SOC of the battery influences the total amount and the hourly mean penalty. It is possible to notice this if we consider a shorter time scale such as 10 days. In Table 14 we report the results of two statistics referred to the first 10-days data. It is evident that their values decrease with the increase in the percentage limitation, and they change according to the number of the batteries and the initial SOC. Changing the S(0) we obtain an hourly mean and an amount of penalty different depending on what happens during the examined period. For example, if we have the charge of the battery at the minimum level and we are in a period in which several downramping events occur, the turbine needs to be supported by the battery but it does not have the power required and the wind farm receives an amount of penalty greater than the one it would receive were the initial SOC at the maximum level. To notice more marked changes depending on S(0) a time frame smaller than an hour should be considered. As it is possible to notice from Table 14, we consider a 10-day period to put in evidence how the initial SOC influences the mean and the amount of penalty that a wind farm has to face. Changing the number of the batteries we modify the capacity available to charge and discharge power, and the effect is that we obtain a decrease in the amount of the penalty. On the other hand, having the initial SOC at the maximum level S(0) = c does not mean obtaining a lower penalty because it also depends on the trend of the wind profile at the next steps. The plant needs a SOC at the maximum level if downramping events are to happen at the next steps; in this way the battery will have more available power to compensate the system when the ramp-rate limitation percentage is not respected.
In Figure 10 it is possible to see the trend of the hourly average cumulative penalty in 1 day by analyzing the real data and considering the ramp-rate percentage limitation of 1% (on the left graph) and 20% (on the right graph), and three different combinations of batteries with an initial state of charge S(0) = C/2. A higher number of batteries corresponds to a lower penalty during a day. In Figures 11 and 12 we report the same graphs referring to the theoretical cases considering both the Exponential and Weibull distribution. It is evident that the model simulates well the mean penalty over the time since the theoretical trends follow the same behavior as the real-data ones for all the percentages considered. In Appendix B the same graphs for the limitation percentages of 1%, 5%, 10% and 20% and for 1-day period ( Figure A1) and 10-day period ( Figure A2) are reported.    Figure 13 reports the trends of the standard deviation for the real data and those from the model using Exponential and Weibull distributions for the percentage limitations of 20% and 40%. In these two cases the model gives similar results to the real ones. For smaller percentages it shows less accuracy.

Conclusions
In this paper, we presented a stochastic model based on the Markov reward processes that can be effectively applied to the management of a wind farm under a general ramp-rate limitation scheme with a battery storage system. The model allows the correct measurement of the revenue generated by the wind power production considering a penalty scheme that applies when the ramp-rate limitations are not satisfied. We provided an equation expressing the higher order moments of the accumulated discounted penalty process and the theoretical results are compared with those obtained from real data, showing a good agreement for the first-order moment for all the ramp-rate limitations studied, while the second-order moments give a more accurate result for lower ramp-rate limitations (20% and 40%). An extensive scenario analysis is presented by considering different scenarios modifying the number of batteries connected to the system and obtaining information on how the yearly average revenue varies according to the considered limitation and the additional costs due to the battery. It is evident that the capacity of the battery is relevant in a long-time scenario (days, months and years) while the initial state of charge is in a short-time scenario (minutes and hours).
This study could be extended by applying the same approach to a minute-base dataset. It would be interesting to combine different ramp-rate percentage limitations in upramping and downramping cases and to try to vary these limitations during short-time scale, i.e., during a day. What is more, it is also important to predict the evolution of the amount of power available in the battery as accurately as possible to minimize the amount of the penalty that a wind farm would receive by not respecting the imposed limitations. For this purpose, we think that the behavior of the battery could be simulated using other kinds of stochastic processes, such as the semi-Markov process. A further improvement could be obtained by taking care of the wind speed spatial resolution, which has been demonstrated to influence wind power peaks and ramps (see [28,29]). Expand the n-th power according to the binomial identity to obtain We begin by computing the first expected value of (A2). First, we split it into three cases according to the possible states of the random variable B(1), i.e., Second, we substitute to M(1) the corresponding expression given in the definition of the penalty function (9) depending on the value of B(1). Thus, Obviously, the third integral is zero. On the other hand, the valuation of the other two expectations requires the knowledge of the joint distribution of (B(1), R(1)) conditional on the previous operation of the battery, i.e., {B(0) = i}. To this end we observe that for sufficiently small db we have Similarly, we have Then, by using the integral representation of expectation we have The second expected value of (A2) can be obtained using the tower property of the conditional expectation: (A9) It is also true that where the first equality is due to the Markovian property of the triplet process (B(t), S(t), R(t)) while the second one is a consequence of the time homogeneity of the Markov chain B(t) and to the time independence of the cdf of the random variables R(t) advanced in hypothesis 2. Observe also that the random variable S(1) is dependent on the random variable R(1) through relation (8).
Furthermore, remark that the remaining two expectations can be seen as a general function of the random vector (B(1), R(1)) whose joint distribution conditional on {B(0) = i} has been already determined in Formulas (A5) and (A6). Hence, the application of the integral representation of expectation with the considered distribution gives E x +1 ·(R +1 − (c − l)) + e −r m ·V