Aggregation model for curtailable generation and sheddable loads

: This study shows modelling developed during the first year of the SmartNet project. In particular, it presents a mathematical model for aggregation of curtailable generation and sheddable loads. The model determines the quantity and the cost of the flexibility provided by the flexible resources based on their physical and dynamic behaviours. The model also proposes a bidding strategy in order to translate the aggregated behaviour into market bids. developed in the ﬁ phase of the Horizon 2020 project SmartNet (http://smartnet-project.eu/) which investigates different architectures for optimised interaction between Transmission and Distribution System Operators (TSO/DSO) in man-aging the exchange of information for monitoring and for the acquisition of ancillary services (reserve and balancing, voltage regulation, congestion management), both at a national level and in a cross-border context. Market-based acquisition of resources for provision of ancil- lary services from the distribution level requires new and ef ﬁ cient techniques for aggregation of ﬂ exible loads and generation. This allows combining ﬂ exible resources from multiple sources and rapid


Introduction
Setting the 2020 climate and energy targets in 2007 was an important milestone, indicating a paradigm shift for the European power industry. Massive efforts were made to promote an accelerated integration of renewable energy sources (RES) in Europe. RESs, i.e. wind and solar power, have become a significant part of the European energy mix. However, the variable nature of these has created a growing necessity for ancillary services in order to maintain security of the power supply.
This paper outlines modelling developed in the first phase of the Horizon 2020 project SmartNet (http://smartnet-project.eu/) which investigates different architectures for optimised interaction between Transmission and Distribution System Operators (TSO/DSO) in managing the exchange of information for monitoring and for the acquisition of ancillary services (reserve and balancing, voltage regulation, congestion management), both at a national level and in a cross-border context. Market-based acquisition of resources for provision of ancillary services from the distribution level requires new and efficient techniques for aggregation of flexible loads and generation. This allows combining flexible resources from multiple sources and rapid generation of bids tradable on the market. An overview of the SmartNet project and the achieved results is presented in [1]. This paper addresses aggregation algorithms for flexible loads and generation, specifically focusing on the combination of sheddable loads and curtailable generation into a unified flexibility model. A piecewise constant bid function is constructed for a single unified device, which is then aggregated using horizontal summation, and submitted to the SmartNet market, for which it is assumed that day-ahead (and also intra-day) markets have already been traded.

Curtailable generation
In this model, curtailment can be defined as an instance, when a generation unit produces less than it could. Curtailment can be voluntary or involuntary, as for example enforced by a TSO/DSO, and common reasons for curtailment include network constraints, operational security, excess generation with respect to the grid load, and strategic bidding related to the potential price manipulations [2].
The availability of wind does not only influence when power can be generated, but also the ability to adjust the generated output [3]. The same can be applied to solar photovoltaic (PV) generation. PV generation provides possibilities to full or partial down-regulation by reducing the volume of injected electricity. Down-regulation is also used for wind power. By controlling the pitch of the wind turbine blades, the power output can be curtailed partially. In addition, there are test projects [4] studying the possibility for using wind power for upward-regulation. The market design considered in the SmartNet project is for nearly real-time operation, and therefore it is reasonable to assume that wind power can be used for both upand down-regulation. The flexibility levels submitted by wind and PV generation should correspond to the available generation potential at a given time.
Due to the absence of fuel costs, generation costs for PV and wind power consist of the variable Operation and Maintenance (O&M) costs. These can vary from close to zero (PV systems without tracking) to higher values. In addition, in order to increase the share of RES, several subsidies have been introduced. The most common form of subsidies in Europe today are fixed feed-in tariffs, while some other countries practice Green Certificates as another form of subsidies. Detailed description and evaluation of different support schemes for RES are explained in [5].
Ramping constraints limit the rate at which the generation output can be changed, and are due to technical limitations of the particular technology. Typically, the provision of ancillary services stipulates technical requirements that may include ramping rates, and therefore impose limitations on what type of resources can bid for participating in their provision. The ramping constraints can also vary according to the type and scale of the generator.

Sheddable loads
In this paper, only loads that can shed without rebound effects are considered. This means that the energy that has been shed does not have to be considered as an increase of demand at some time later. An example of a load with a rebound effect is the heating of a swimming pool. Once power has been cut, the pool gradually dissipates heat, and more power than usual is needed to get the pool back to normal temperature after reconnection. An example of a load without rebound effect is electric lighting. Even if the light is reduced or switched off, there is no need for increasing the light level above nominal in the future when the standard power supply returns. generators to keep in mind in this section. In the following, 1 ≤ g ≤ n G .
The inflow power of generator g at time step t, denoted as P in g,t , is converted by the generator to the actual power output P out g,t , which can never exceed the maximum power output P max g or P in g,t . The operational interval O g,t is defined as the interval that P out g,t must be within, because of physical constraints. Although it is expected that the baseline power P base g,t , obtained from the previous (day-ahead, intraday) market clearing, would normally be inside O g,t , instances when this is not true may arise, e.g. if the wind speed is much lower than what was predicted when submitting offers in the previous market. Fig. 1 shows the three different situations that could arise for a curtailable generator: (a) The case in which the inflow is larger than the maximum output of the generator. The operational interval is then O g,t = [0, P max g ] and the baseline lies inside it. (b) The case in which the baseline is lower than the inflow, and both inflow and the baseline are lower than the maximum output. Then, the operational interval is O g,t = [0, P in g,t ] with the baseline inside the interval. (c) The case in which the inflow power is lower than the baseline, Here, the baseline is outside the operational interval.
The operational interval of the device needs to be defined in order to incorporate all three cases, namely (1) It is also necessary to take into account that the power output of the generator may not be able to change arbitrarily from one time step to the next, and therefore ramping constraints need to be defined where P ramp,− g ≤ 0 and P ramp,+ g ≥ 0. By incorporating the ramping constraints, the operational interval becomes If generators wish to participate in the provision of flexibility via curtailment, the operational interval needs to take into consideration the baseline generation P base g,t from the previous market. Therefore, the flexibility interval, i.e. the operational interval relative to P base g,t , can be defined as min P max g , P in g,t , P out g,t−1 + P ramp,+ g − P base g,t . (4) To distinguish between flexibility provided via increased and decreased generation levels, upward and downward flexibility intervals F + g,t and F − g,t are defined as the closed subintervals of F g,t that lie above and below zero, respectively. Zero corresponds to the baseline power. This means that the upward and downward flexibility intervals consist of all the physically realisable power output values relative to the baseline. Note that one of the intervals will become empty if the baseline is not physically realisable.
If 0 ∈ F g,t , i.e. if the baseline is physically attainable, the upward and downward flexibilities can be defined as the maximum possible deviation from the baseline in each direction The upward flexibility is positive, and the downward flexibility is negative. Conversely, if 0 ∉ F g,t , i.e. if the baseline is not physically attainable, P flex,+ g,t and P flex,− g,t will both become either positive or negative, which does not make sense when talking about upward and downward flexibilities. Thus, in this case, upward and downward flexibilities are not defined, and are excluded from the possible solution. The upward and downward flexibility intervals are still valid, though.

Sheddable loads:
The loads are numbered in the same way as for the generators, 1 ≤ d ≤ n D , where n D is the total number of loads.
Two different viewpoints are presented in this section. The first one, called the external viewpoint, is the most natural one when considering the input data and is denoted by hatted variables. For example, the maximum power consumption of a load is a positive number denoted by P max d . The second viewpoint, called the internal viewpoint, has a different sign convention, and is employed internally in calculations. Here, the maximum power consumption of a load is a negative number denoted by P min Similarly, the minimum power consumption is denoted by P max d = − P min d . The internal viewpoint is necessary in order to construct a unified device model that combines generation and consumption, as in the next section.
For loads, the key power variable is the power consumption P con d,t , which is defined as the amount of power that the load draws from the grid. In the internal viewpoint, loads are treated in the same way as generators, so they also have a power output P out d,t , but since loads consume power from the grid instead of supplying it, this number is negative, P out d,t = − P con d,t . This mean that for load d at time step t, both power output P out d,t and baseline P base d,t = − P base d,t become non-positive.
Operational and flexibility intervals are defined for loads only for the internal viewpoint. The external viewpoint is considered as a translation layer between the input data and the internal variables.
A single sheddable load with baseline P base d,t , 0, maximum power consumption P min d , and minimum power consumption P max d is considered. Being in line with the notation used in the previous section used for generation, the operational interval for load d and time t becomes Note that downward and upward ramping constraints represent the maximum load pick-up and drop-off rates, respectively. For loads, the baseline is always inside the operational interval, so the upward and downward flexibilities, i.e. de-creased and increased consumption, can be defined as 2.1.3 Unified model: Curtailable generators and sheddable loads can be combined into a single unified power device model, by using negative values for power output when electricity is consumed by the device, and positive values when it is supplied by the device.
In the same way as in the previous two sections, the operational interval can be defined, which for a device r, and time t becomes O r,t = max P min r , P out r,t−1 + P ramp,− r , min P max r , P in r,t , P out r,t−1 + P ramp,+ r .
This covers both generators and loads by simply setting either P min r or P in r to zero. The flexibility interval becomes If P base r,t [ O r,t , the upward and downward flexibilities can be calculated as P flex,+ r,t = min P max r , P in r,t , P out r,t−1 + P ramp,+ r − P base r,t , P flex,− r,t = max P min r , P out r,t−1 + P ramp,− r − P base r,t .
Fig. 2 shows an example based on a unified model device and shows all possible operational intervals for several time steps simultaneously. The intervals are combined into a single operational envelope shown as a blue shaded area. Any path for P out r,t , which respects the ramping constraints and is inside the operational envelope, can be offered on the market. The operational envelope does not always extend all the way out to P min r and min P max r , P in r,t . This is because the ramping constraints restrict the minimum and maximum slopes of the envelope edges. There is also a situation where the upward flexibility interval becomes the empty set, when P in r,t passes below P base r,t , and in the first step, when the upper ramping constraint excludes P base r,t from the operational interval. In time step 5, the upward and downward flexibilities for an arbitrarily chosen value for P out r,4 are illustrated. Here, the ramping constraints (a green triangle) restrict the possible values for P out r,5 .

Flexibility of aggregated devices
It is assumed that all the devices that are aggregated can be described using the unified model defined in the previous section. Consider n R such devices, i.e. r = 1,…, n R , at time interval t, and each of them having operational interval O r,t = P lo r,t , P hi r,t . The aggregated operational interval O agg,t combines the operational intervals of all the devices and can be considered as the total range of power output that the devices can deliver/absorb together An aggregated operational envelope can be constructed just as in the previous section. The aggregated baseline P base agg,t = n R r=1 P base r,t can be either inside or outside the aggregated operational interval. For the case where P base agg,t [ O agg,t, , the upward and downward aggregated flexibilities can be calculated P flex,+ agg,t = P hi agg,t − P base agg.t , P flex,− agg,t = P lo agg,t − P base agg,t .
3 Flexibility cost

Flexibility cost of curtailable generation
A curtailable generator's flexibility cost equals the cost of adjusting the output from the level decided in the previous market, P base g,t , to the output of the current market, P out g,t . The difference between these output levels is the activated flexibility P flex g,t = P out g,t − P base g,t , i.e. P flex g,t is in the flexibility interval F g,t [see (4)].
The flexibility cost consists of two components, namely the costs and the income for the generator. In this phase of the modelling, it is assumed that the income is defined by the subsidies, while the costs are given by the O&M costs. In addition, there is a cost attached to additional aging, i.e. wear and tear of generators caused by rapid changes in the output. While values that measure these might not be widely available now, there are investigations regarding the wind turbine fatigue life assessment due to various operational strategies [6].
The value per unit of energy is denoted by l, with different subscripts according to which cost or income it signifies.
When changing the planned production from P base g,t to P out g,t , of generator g at time step t (which lasts for a period of Δt), the extra O&M cost is c O&M g,t = l O&M g P flex g,t Dt, and the extra subsidy income is i sub g,t = l sub g,t P flex g,t Dt. Thus, the generator must pay for the extra expense c O&M The generator potentially also has to endure extra wear and tear because of rapid changes in output. The cost per unit of power is called flexibility aging, denoted by l age g . It is assumed that the previous market had a coarser granularity, which smooths out rapid changes, so that flexibility aging cost only applies to the current market. The flexibility aging cost for time step t is l age g |P out g,t − P out g,t−1 |. This formula is problematic, because it depends on two different time steps, and constructing a bid incorporating this is difficult. To avoid this problem, P out g,t−1 will be approximated by a value that is known from beforehand. It is reasonable to assume that the most likely value for the output is that no curtailment is active, so P out g,t−1 can be approximated as P out g,t−1 ≈ P hi g,t−1 = min P max g , P in g,t−1 . This is an open access article published by the IET under the Creative Commons Attribution License (http://creativecommons.org/licenses/by/3.0/) P max g is known, and P in g,t−1 is estimated from weather data, resulting in the approximate flexibility aging cost c age g,t = l age g P out g,t − P hi In total, the flexibility cost c flex g,t of generator g at time step t is equal to the costs minus the income The marginal flexibility cost then becomes Dt . (20)

Flexibility cost of load shedding
Recall that a load is represented with a negative power output, P out d,t , 0. When the output changes from P base d,t to P out d,t , i.e. a flexibility of P flex d,t = P out d,t − P base d,t is activated, the change in revenue of production, services, customers etc. is i rev d,t = −l rev d,t P flex d,t Dt, and the change in discomfort cost, which depends on the difference between the demand P d d,t and the actual planned power output P out d,t , is Dt.
In total, the flexibility cost c flex d,t of load d at time step t is equal to the total additional costs for the load Dt.
The marginal flexibility cost then becomes

Flexibility cost of unified model
Curtailable generators and sheddable loads can be combined into a single power device model, by using negative values for power output when electricity is consumed by the device, and positive values when it is supplied by the device. The flexibility cost can be combined into downward and upward flexibility costs of the unified model. Let the number of unified devices be n R . Then each unified device can be assigned a number r ∈ R = {1, 2, …, n R }. Two disjoint subsets of R are defined, namely the set of curtailable generators G ⊆ R, and the set of sheddable loads D ⊆ R. There may be unified devices which fall outside G and D, but which are nevertheless captured by the unified model. After combining marginal flexibility costs of curtailable generation and load shedding, i.e. (20) and (23), the marginal flexibility cost of the unified device, r, is l flex r,t = l O&M r − l sub r,t + l dis r,t + l rev r,t + l age r sign P flex r,t + P base r,t − P hi For a curtailable generator r ∈ G, it is natural to set l rev r, t = l dis r, t = 0. Conversely, for a sheddable load, it is natural to set l sub r,t = l O&M r = l age r = 0. With these choices, curtailable generators and sheddable loads are obtained as special cases for the unified model. If l age r = 0, then l flex r,t takes two different values, depending on the sign of P flex r,t .

Bidding strategy
From (24), there are two possible values for the marginal flexibility cost. Which of the two levels is selected depends on the sign of P flex r,t + P base r,t − P hi r,t−1 = P out r,t − P hi r,t−1 . If the output at time t is higher than the maximum possible output at time t − 1, the upper marginal flexibility cost is chosen, and otherwise, the lower cost is chosen Let the largest of these be denoted by l + r,t , and the smallest by l − r,t . Of course, if l age r = 0, then l + r,t = l − r,t . Three cases are shown in Fig. 3; either P hi g,t−1 is inside the operational interval O r,t = P lo r,t , P hi r,t , it is above or below. Horizontal summation [7] of the bid functions (shifted, so that P base r,t corresponds to zero, giving P flex r,t on the horizontal axis) is used to generate an aggregated bid function. After the market algorithm has determined prices and power levels, disaggregation is applied to obtain P flex r, t for each device.

Example
In this example, two devices are aggregated, and the aggregated bid function is calculated for a single time step t. Then a price level is decided by the market, and disaggregation is performed. The bid func-  tions of a generator (1) and a load (2) are shown in Fig. 4. By horizontal summation, where the left-hand and right-hand sides are aggregated separately, the aggregated bid function (3) becomes as shown. As an example of disaggregation, consider the situation where the market decides on a price l that satisfies l − 1, t , l , l + 1,t . From the two bid functions (1) and (2), it can be seen that at this price level, both activated flexibilities are negative.

Conclusion
This paper presents the aggregation/disaggregation process for curtailable generation and sheddable loads via a unified device model. It also defines the bidding strategy in order to generate the provision of the flexibility of active power through market bids. Application of the new aggregation algorithms is expected to involve broader groups of flexible loads into market-based trade of resources for the ancillary services, which in turn will contribute to accommodation of renewable energy sources into the power system and thus meeting the overall European environmental goals.

Acknowledgments
The project SmartNet was received funding from the European Union's Horizon 2020 research and innovation programme under grant agreement no. 691405.