Virtual Battery Aluminum Smelting
Virtual Battery Aluminum Smelting
Virtual Battery Aluminum Smelting
Abstract
Industrial electricity consumers with flexible demand can profit by ad-
justing their load to short-term prices and by providing balancing services
to the grid. Markets which support this kind of short-term position ad-
justment are the day-ahead market and balancing markets. We propose a
formulation for a combined optimization model that computes an optimal
distribution of flexibility between the balancing and day-ahead markets.
The optimal solution also includes the specific bids for the day-ahead and
balancing markets. Besides the expected profits of each market and their
individual bidding languages, our model also takes their different roles in
a continuous marketing of flexibility into account. To prevent overrat-
ing short-term profits we introduce a variable penalty term that adds a
cost to unfavorable load schedules. We evaluate the optimization model
in a rolling horizon case study based on the setting of a virtual battery
at TRIMET SE, which is derived from a flexible aluminum electrolysis
process. For such a battery we compute a daily optimal split of flexibility
and trading decisions based on data in the period 04/2021 - 03/2022. We
show that the optimal split is more profitable than using only one market
or a fixed split between the markets.
1 Introduction
Regenerative electricity production in Germany has increased considerably over
the last two decades. With this transformation away from schedulable fossil fuels
1
to mostly volatile regenerative power sources, electricity production becomes
more uncertain. As a consequence, the consumption of electricity is also bound
to change: it has to become more flexible in order to cope with the uncertainty
in renewable energy production. Electricity consumers should consume more if
there is an oversupply of (renewable) energy and less if energy is scarce. This
flexibility in energy consumption is referred to as a virtual battery, as instead of
physically storing energy, a similar effect is achieved by shifting the demand.
Since electricity prices are not constant, neither within a day nor over the course
of several days, a flexible consumer can arbitrage trade the difference between
times with higher prices against those with lower prices. Usually, these price
differences reflect the fluctuations in the availability of electricity. Thus, con-
sumers who schedule consumption based on prices can simultaneously reduce
their own costs and support the shift to renewable energy sources. The general
term for this approach of minimizing electricity costs is demand side manage-
ment (DSM). For a general introduction to DSM, we refer to the surveys by
Zhang and Grossmann (cf. [27]), Siano (cf. [24]), and Gelazanskas and Gamage
(cf. [15]). Applications of DSM can be found in several kind of industries, such
as steel production and aluminium electrolysis (cf. [23]).
The day-ahead market is of particular importance for marketing flexibility or
closing short-term positions (cf. [3]). Trading decisions for day-ahead markets
can either be specified by an amount for a given hour, e.g. as in [8, 17, 18], or
by exploiting a more complex bidding language, e.g. by using piece-wise linear
bidding functions (cf. [5, 12]). Next to the day-ahead market, balancing mar-
kets allow pre-qualified providers another profit opportunity (cf. [1]). Optimal
bidding on balancing markets requires an adaptation to specific market designs,
such as price limits or minimum bid quantities. These design parameters have
been changed several times since November 2020 for the German balancing
markets. A bidding model and evaluation on the period from January 2014 to
December 2016 can be found in [21]. For a more recent evaluation of a bidding
optimization model on the period from April 2021 to November 2021, see [14].
In this article, we focus on the period from April 2021 to March 2022. Note
that the price limit of 9.999,99 e/MWh was removed during this period, and
thus, we consider a period in which the market design changes. Information
concerning balancing markets is published at [2].
Due to this complexity, it is non-trivial for market participants to decide how to
optimally market flexibility on a particular energy market. Obviously, it is even
harder to decide how to spread flexibility across multiple markets, especially in
advance. An overview over several studies on profits obtained in different energy
markets with different market and price assumptions can be found in [16]. Note
that combining the bidding over more than one market typically results in higher
profits.
Optimization models for bidding across multiple markets are often formulated
as multi-stage optimization problems (cf. [6–8, 19, 22]). Thereby, different com-
binations of markets are studied, e.g. day-ahead market and intraday market
2
(e.g. [5,19]), day-ahead market and balancing markets (e.g. [8,23]) and all three
of these markets (e.g. [17, 20]). The intraday market is often modeled as if it
were a single auction and, thus, structurally identical to the day-ahead market.
Here, we neglect the intraday market and focus on the combined bidding on the
day-ahead market and the balancing markets, since these markets only need a
single trading decision. In contrast to the multi-stage approach, the trading on
multiple markets can also be modeled as simultaneous decision as in [17, 20]. In
this article, we are interested in a split of flexibility between markets, and thus,
follow the simultaneous approach for our optimization model.
When bidding on multiple energy markets, a key aspect is to avoid myopic
profit realizations that are less profitable in the long run. For this, we introduce
a rolling horizon framework which is based on price forecasts and additional
constraints in the optimization problem. In [18], different lookahead horizons
were tested for day-ahead trading, whereas Corinaldesi et al. (cf. [9]) evaluated
their trading decisions on the day-ahead and intraday market in a rolling horizon
setting. In this article, we present a mathematical optimization model for a
cross-market situation considering the day-ahead and the balancing market in a
rolling-horizon setting. The model returns the locally optimal split of flexibility
capacities for the different markets, together with the concrete bids to place on
the markets. Yet, the model design ensures that the solutions are also profitable
long-term. Note that in this approach, we execute only one optimization run
per day where we fix all decision variables and hence do not follow a multi-
stage approach that uses the realizations of one auction for the bidding in a
later auction (as e.g. in [22]). One particular advantage of this strategy is that
it allows to split the flexibility budgets among separate financial management
departments specialised in different markets.
Our setting is inspired by the situation at TRIMET Aluminium SE, where the
production processes have been redesigned such that the aluminium ovens can
act as a large virtual battery with positive and negative capacity. In general, our
approach can be transferred to common batteries. Note however that we implic-
itly assume a very large storage capacity with respect to the hourly flexibility
and that we do not take (un)charging cycles into account. Trading decisions on
single or multiple markets have already been discussed and described in various
contexts, for example for flexibility aggregators (e.g. [5, 22]), for energy storage
owners (e.g. [19]) and for energy intensive chemical plants (e.g. [26]). In [23], be-
sides a model for combined bidding strategies for the primary balancing market
and the day-ahead market, the authors provide a case study for energy intense
processes in the aluminium production at TRIMET Aluminium SE. While the
general idea is similar to our approach in principal, the authors focus on a dif-
ferent balancing market (primary instead of secondary balancing market) than
we do. Also, the market regulations have changed significantly in the last years.
Pure day-ahead trading decisions for this setting at TRIMET Aluminium SE
have also been discussed earlier by the authors of this work for single days in [13]
and in a rolling horizon context in [18].
Another purpose of our study is to assess the profit opportunities of demand
3
side management in general. We consider the problem of using flexibility prof-
itably on the day-ahead and balancing markets. We distinctly put our focus on
optimizing the profits of a single provider of flexibility. The flexibility we mar-
ket stems from a flexibilized industrial process. We therefore consider not only
forecasts that predict prices or profit opportunities in electricity markets, but
also technical constraints such as battery size and production efficiency losses.
Our key results are:
2 Decision framework
In the following, we describe our setting. First, we give an overview of the
electricity markets considered for trading and when the trading decisions are
made in the respective markets. We then briefly describe the rolling horizon,
which is an essential component for practical usage.
4
intraday
intraday
continuous
continuous
closure
opening
reserve reserve
day-ahead
capacity energy
results
results results
intraday
continuous energy
y
deliver
9:00 a.m. 12:00 p.m. 3:00 p.m. 11:55 a.m. 12:00 p.m.
11:00 a.m.
9:30 a.m. 12:57 p.m. 11:15 a.m.
Figure 1: Auctions and trading time horizons for the German short-term elec-
tricity markets.
six years before delivery of the electricity. Consequently, they are based on
predictions that cannot include any information about the situation close to
delivery. Therefore, in addition to this long-term market, there are markets for
short-term adjustment of existing positions, when more recent data is available.
These include: The day-ahead market (DA), where trading decisions can be
made one day before delivery, the intraday market (ID), which allows trading
from the previous day up to five minutes before delivery, and the balancing
energy market (secondary reserve or automatic Frequency Restoration Reserves
(aFRR)), which is used if a grid imbalance occurs despite the adjustment of po-
sitions beforehand. It consists of a reserve capacity and a reserve energy market
that are denoted by SRC market and SRE market, respectively. Obviously,
short-term markets play a crucial role in promoting flexibility. Therefore, we
concentrate on trading decisions on these markets in the following.
The time horizons of decisions on the short-term markets is shown in Figure
1, exemplary for a product with delivery starting at 12 p.m. Because the data
used in this article is from the years 2021 and 2022, all times are expressed in a
way they fit into the market description of that period. The first decision to be
made today, i.e. the day before delivery, is the one regarding volume and pricing
of offers on the SRC market; they must be submitted before 9 a.m. Results are
published half an hour later. Then, the next auction that takes place is the day-
ahead auction at 12 p.m. Here, results are published 57 minutes later. These
auction times are independent of the product that is considered. In contrast to
this, order books for SRE bids close one hour before delivery and their results
are published 15 minutes later. Consequently, this could take place today or on
the delivery day itself, depending on the considered product. Note that on the
SRE market, only six products are sold, each covering four hours of the day.
The corresponding auction is always conducted one hour before the delivery
period starts. Finally, the continuous intraday market starts at 3 p.m. and
5
remains open until 5 minutes prior to delivery of each product. In the figure,
this is depicted in grey, because we do not consider this market further in this
article. This is due to the fact that trading on the intraday market requires
either a person or an algorithm to monitor prices and to react to them. Not
every company that would have access to the intraday market in theory can use
it in practice due to these requirements. Therefore, we concentrate on a setting
in which flexibility is split between the day-ahead and aFRR markets, that is
relevant for smaller companies. As a result of both considered markets, traders
must decide the level of flexibility they want to provide across all three markets
before the end of the SRC bid collection period.
6
Execution / planning time points
..
.
t2 ...
t1
t0
t0 t1 t2 t3 . . .
Look-ahead horizon
7
transmitted to the transmission system operators. Then, a market participant
is allowed to offer electricity products on the aFRR market.
All aFRR products can provide either positive or negative reserve energy and
consist of 4h-blocks, during which the promised electricity needs to be available.
Furthermore, as mentioned above, it needs to be available within 30 seconds
after the demand request. After that, activating all balancing energy may take
up to 4.5 minutes; then, all demanded energy needs to be fully powered and
has to be available for 15 minutes in total. We denote the set of 4h block
products on the balancing markets as I. It consists of intervals Ik = [ak , bk )
spanning the time period of block Ik , whereas the corresponding index set is
given by K = {1, . . . , 6} and the products are indexed in their natural order, i.e.
I1 = [0, 4), ..., I6 = [20, 0). In the following, we reference product Ik by k if the
meaning is obvious through the context.
Regarding regulations in the aFRR market, the minimum bidding amount was
5 MW until July 2018; since then, this has been reduced to 1 MW. Nonetheless,
this change comes with the restriction that, when 1 MW to 4 MW are offered
on the market, then only one offer per product Ik ∈ I is allowed. All offers are
collected daily and consist of an electricity amount, whether positive or negative
reserve energy is offered, and two prices: One price belongs to the SRC market
and represents the remuneration for holding electricity available. The other
price belongs to the SRE market and is paid for actually activated electricity.
If a market participant’s SRC market price was too high and the offer is not
awarded, its SRE market price is nonetheless placed in the merit order curve of
the SRE market. Consequently, also those market participants are allowed to
offer electricity on the SRE market that did not make it in the SRC market.
8
SRC
on historical data. In order to obtain the probabilities qk,i that a bid pSRC
i
for product k is accepted on the SRC market, we use the time series of daily
marginal prices per product k. In the following, we describe how to obtain said
probabilities for a fixed day. Let the marginal accepted price for product k at
SRC
day d be denoted as πd,k . To get an estimate of the short-term distribution of
the marginal prices and to strip ourselves from the assumption of stationarity of
the time series, the calibration period is restricted to the time interval of 30 days
before the considered day. Consequently, we obtain an empirical distribution
function for each day d as
d−1
1 X
Fˆd (p) = 1πj,k
SRC < p , (1)
30
j=d−31
where the summation goes over the amount of times during the 30 day interval
that the marginal accepted price was lower than a threshold p. Consequently,
the qiSRC for a day d can be computed by
SRC
qk,0 = Fˆd (pSRC
1 ),
qk,1 = Fd (p2 ) − Fˆd (pSRC
SRC ˆ SRC
1 ),
SRC
qk,2 = Fˆd (pSRC
3 ) − Fˆd (pSRC
2 ),
..
.
q SRC
k,N = 1 − Fˆd (pN SRC ).
Following the same market design as the SRC market, the SRE market is also
based on the pay-as-bid system in combination with a merit order. The only
difference is that the offers’ SRE market prices are used instead of SRC market
prices. Furthermore, next to the aFRR bids, so-called free bids can be entered
or adapted for the SRE market until gate closure. Free bids are placed by
market participants that did not bid on the SRC market or whose bids were not
accepted, but who still want to participate in the SRE market.
9
Activation probabilities of different price levels
1.0
0.8
0
Activation probabilities
10
25
0.6 50
75
100
125
150
0.4 175
200
225
0.2
0.0
-01
-02
-03
-04
-05
-06
-07
-08
-09
-10
-11
-12
-04
-04
-04
-04
-04
-04
-04
-04
-04
-04
-04
-04
21
21
21
21
21
21
21
21
21
21
21
21
20
20
20
20
20
20
20
20
20
20
20
20
Date
Figure 3: Probabilities for different price levels over time, where each price level
is associated with one color.
On the SRC market, the price for holding energy available is determined for
every market participant through the procedure described above. In contrast
to this, the demanded quantity of an offer depends on the actual amount of
aFRR energy that is needed. This can change from second to second. Con-
sequently, the amount that is paid for is the aggregated time during which
electricity was actually activated times the price. This activation amount in
MW is denoted by Sk (t) for product Ik and for every second t of the product
time interval. Furthermore, we define Ψk (p) as the sum of offered capacity in
MW at the SRE market for product k, aggregated over all offers with an ask
price of at most p. This contains the amount of capacity available for product Ik
up to a threshold price p. With this, we are able to define the SRC activation
duration for a given product Ik and a price level p as
Z
Lk (p) = 1Sk (t)≥Ψk (p) dt. (2)
Ik
In Figure 4, an example for the activation duration and its computation is given.
Whenever the blue lines lies above the red line in that figure, the considered bid
is activated. Note that the considered price levels for the SRE market are not
necessarily the same as the price levels for the SRC market.
Now, the expected activation duration αk,i of SRE activation for a given price
offer pi and a product k is defined by
10
Volume [MW]
0 1 2 3 4
In order to calculate the expected activation duration αk,i , we first compute the
SRE activation duration Lk (pi ) as in (2) for the given price levels p1 , . . . , pN SRE
for every day in the data set and use then the seven-day average as the expected
value.
11
Day-Ahead Forecast
100
75
50
Price [ /MWh]
25
25
50
Figure 5: Realized day-ahead prices (red) and daily day-ahead forecasts (blue)
for a two week time period at the start of May 2021.
to forecast, with the above data as input and the day-ahead prices as output.
We obtain the data from the ENTSO-E transparency platform (cf. [1]). As
the data for wind and solar are only available for the next day, but we are
forecasting for two weeks, we make two separate forecasts. First, we forecast
the next 24 hours using the ENTSO-E renewables data. Then we forecast the
next 13 days without this data using a DNN model trained only on calendar
information. This results in a day-ahead price forecast for the next two weeks.
For an example of the forecasted prices see Figure 5. Note that every forecast
gets more opaque over time. So the solid blue line represents the first 24 hours
of each forecast.
12
period by T ∗ . This is done to allow a longer view of the day-ahead market and
a penalty term, which we will introduce later. Notation regarding products sets
was already introduced in Section 3.
Furthermore, the expected profit on each market is denoted by f SRC (or f SRE ,
f DA ). We introduce decision variables mi for i ∈ {DA, aFRR}, which denotes
the flexibility allocated to the respective market. For better readibility, we
introduce variables mi for i ∈ {SRC, SRE} as well and set
maFRR = mSRC = mSRE . (4)
Furthermore, we add a penalty term regarding battery usage, which we denote
by f PT .
13
Reserve energy market constraints In Section 3.1.2 we described how to
compute the expected activation duration αk,i for a given price level pi and
a product k. We consider N SRE different price levels. As said before, the
considered price levels of the SRE market do not need to be the same as the
considered price levels on the SRC market. Now, given these values, the expected
profit on the SRC market of product k is defined as
SRE
NX
fkSRE := pSRE
i · mSRE
k,i · αk,i , (10)
i=1
and the total expected profit of the SRC market is the sum of expected profits
over all products, i.e. we add the constraint
X
f SRE = fkSRE . (11)
k∈K
−mDA
k ≤ mDA
t ≤ mDA
k ∀Ik ∈ I, t ∈ Ik , (12)
DA
−m ≤ mDA
k ≤m DA
∀k ∈ K. (13)
where pt denotes the price for the hourly product at hour t. Note that we
downscale the profit made on the day-ahead market to the considered time
period for the cross-market trading in order to obtain profits that are comparable
to the balancing market profits. Recall Section 3.2 on how the forecasts are
computed.
14
the battery level has to lie in the interval [τmin , τmax ]. The initial battery level
is denoted by τ0 . In total, we obtain the following battery capacity constraints.
min{t,T } t
X X
τmin ≤ τ0 + mSRC
t0 + mDA
t0 ≤ τmax ∀t = 0, . . . , T ∗ , (15)
t0 =0 t0 =0
where T denotes the hours of the first day whereas T ∗ denotes the number of
hours of the whole considered period. Note that these constraints ensure that
the battery level remains in the total capacity interval at every hour and link
the flexibility given to each market in one constraint. Furthermore, it should
be noted that the distributed flexibility to the balancing markets is considered
in this constraint by mSRC
t . Again, the usage of mSRC
t represents a conservative
estimate, as this actually equals the maximum amount of energy that could
possibly be discharged from the battery through the SRE market.
For a short-term consideration, we could leave the objective function as max f SRC +
f SRE + f DA . However, in a medium or long term setting, this will often result
in a short-sighted exploitation of the battery capacity. This is especially un-
desirable if the production efficiency (as in our application use case) suffers
significantly from a deviation of the battery from its central position.
In order to prevent discharging strategies, the next two paragraphs introduce
constraints that counteract this, namely a penalty for high absolute battery
deviations and the constraint to obtain a balanced battery level at the end of the
look-ahead period. Note that we cannot control future battery levels precisely,
as the future state depends on the realisations of bids on the balancing markets
and is also being overturned by interim scheduling updates. Hence we can only
make assumptions about the expected battery states.
SRE
X NX t
X
τt := mSRE
k,i · αk,i
+ mDA
t0 (16)
Ik ∈I:ak ≤t i=1 t0 =0
Due to constraints (15) on the battery capacity, the expected battery level
always lies in the interval [τmin , τmax ]. We now define the technical cost penalty
term as
∗
T
PT T X
f = ∗ cp |τt |, (17)
T t=0
15
where cp denotes the penalty coefficient. We will later evaluate strategies with
respect to different penalty coefficients. Note that a higher penalty coefficient
yields strategies that balance the battery in shorter periods. Here, we considered
a linear formulation in order to obtain a linear program. However, one might
consider a quadratic penalty term in order to penalize higher (or lower) battery
levels more. Furthermore, note that we again use a scaled approach similar to
the day-ahead profit function.
τT ∗ = 0. (18)
where m denotes the total available flexibility that represents the maximum
charging or discharging amount of electricity.
This concludes our discussion of the constraints. A full formulation of the
problem can be found in Appendix A.
16
allows the company to take advantage of price spreads on different energy mar-
kets. A more detailed explanation of the virtual battery can be found in [10,11].
For the proposed model, the virtual battery has a capacity of 1000 MWh and
a total flexibility of 10 MW per hour, i.e. we could sell or buy energy for 100
consecutive hours. Note that the parameter choices of the virtual battery are
inspired by the setting at TRIMET Aluminium SE, but do not reflect their real
parameter values.
As described in constraints (16) and (17), we define different bidding strate-
gies by two parameters, the flexibility distribution (mDA , maFRR ) between day-
ahead market and balancing market and the penalty coefficient cp . If these two
parameters can be adjusted between different runs during the rolling horizon
computation, we simply denote this with free. For example, the strategy that
has a fixed distribution of 4 MW to the day-ahead market and 6 MW to the
balancing markets with a fixed penalty coefficient of 0 is denoted ((4,6) | 0),
whereas the strategy that can adjust both the flexibility distribution and the
penalty coefficient over time is denoted (free | free).
0.5
0.0
2021-05 2021-07 2021-09 2021-11 2022-01 2022-03
Date
A high penalty coefficient keeps the battery utilization within a narrower range,
i.e. by penalizing very large deviations from a balanced battery level. In the
following, we will not only examine strategies with a fixed coefficient, but also
a strategy that adjusts this coefficient on a daily basis according to the current
market situation. To do this, we clustered various price and volatility metrics on
the day-ahead and balancing markets and now choose the coefficient according
to the cluster it belongs to. Our strategy is to choose a low coefficient when
17
volatility tends to be low, in order to have the possibility of realising profits over
a longer period of time, corresponding to a higher utilization of the battery.
We observe very similar cumulative profits for all considered strategies as shown
in Figure 6. What is striking is that, depending on the obtained profit, the
period can be divided into two sub-periods. For the whole period, the (free
| free)–strategy (colored red) achieves the highest total profit of 3.551.222 e,
although it is only about 1% higher than the (free | 15)–strategy (colored
black). An overview over all profits obtained by the different bidding strategies
can be found in Table 1 in the Appendix. The (free | free)–strategy shows
minor differences from the (free | 15)–strategy, tending to keep the battery at
a slightly lower level. Around the turn of the year, we see a small drop in profit,
indicating that we are buying energy over several consecutive days. We can see
this more clearly in Figure 7, which shows battery levels over time. This effect is
more obvious at lower penalty coefficients. It is interesting to note the steeper
curve starting in October 2021, indicating increased profit opportunities. In
Figure 11, we see that the average allocation of flexibility in the first period
is similar, but not identical to that in the second period. The higher profits
in the second period go hand in hand with higher price-bids in the positive
SRE market. While the average bid in the first period is 130 e/MWh, it then
more than doubles to 287 e/MWh in the second period. In comparison to fixed
strategies, i.e. strategies that market the same flexibility distribution every day,
we see that all strategies that allow a daily adjusted split outperforms these
fixed strategies, as shown in Figure 13 and Table 1.
200
(Free | 0)
Battery level [MWh]
(Free | 2.5)
400 (Free | 5)
(Free | 7.5)
(Free | 10)
600 (Free | 12.5)
(Free | 15)
(Free | 17.5)
800 (Free | 20)
(Free | 22.5)
(Free | 25)
1000 (Free | Free)
2021-05 2021-07 2021-09 2021-11 2022-01 2022-03
Date
Figure 7: The battery level over time for different (free | ∗)–strategies. The
best (in terms of total cumulative profit) strategy with fixed penalty coefficient
is shown in black, whereas the (free | free)–strategy is shown in red. Overall,
we observe a trend to discharge the battery towards the end of 2021. The
high spike around new years eve is due to an unusual high demand of negative
SRE energy.
18
Figure 7 depicts the effects of the different penalty terms on the trading de-
cisions. Starting with an battery level of 0 MWh, the strategies with a low
penalty term instantly start to heavily discharge the battery. Although that
yields a high profit at first, being close to the minimum limits the possibilities
of trading. With an increasing penalty term, the discharging effect reduces. For
the highest penalties, the battery level stays close to zero - at least for the first
half. Thereafter, the electricity prices start to increase strongly and thus also
profit margins. None of the penalties suffices to prevent the battery from dis-
charging in all the strategies. At the end of 2021, even the (free | 25)–strategy
reaches a minimum of around -600 MWh. The rest of the figure depicts the
more volatile prices in the beginning of 2022. The prices in the first two months
of 2022 start to relax, accompanied with an overall increase of battery levels
for the strategies. At the end of February, the reverse is true and the battery
levels start to fall again. The jump around new years is due to an unusual high
demand on the negative SRE market, see e.g. Figure 12 in the appendix. The
best performing strategies – (free | free) and (free | 15) – are located neither
at the top nor at the bottom of the range of realized battery levels. This hints
at the conclusion that a well calibrated penalty term should be high enough so
that it does not allow for complete discharge, while being low enough such that
trading is not restricted too much.
30000
20000
Daily profit [ ]
10000
10000
Day-ahead market Pos. SRC market Pos. SRE market Neg. SRC market Neg. SRE market Total Profit
Market
19
were in between the 25% quantile and the 75% quantile for the corresponding
market. The black line in the middle of the blue box indicates the 50% quantile,
which represents the value that lies in the middle of all observed and ordered
daily profits. Consequently, each box contains 50% (which equals 75% - 25%) of
all observed profits over the considered time horizon for the respective market.
The vertical lines above and below each box mark the distance of the 25%
quantile (respectively the 75% quantile) to 1.5 times the distance between the
25% quantile and the 75% quantile. The so-called ‘whiskers’ at their end are
then either determined by this length or by the furthest data point available
in the corresponding direction. In Figure 8, it becomes clear that the day-
ahead market is mainly used to buy electricity, because most of its profits are
negative. In comparison to that, the positive SRE market is the market yielding
the highest profits and is per definition used to sell electricity, while the negative
SRC market is used to refill the battery. Both SRC markets, as well as the
negative SRE market, do not yield profits that are of much significance, nor
do they show much variability in the attained values. Consequently, the total
profit’s volatility is mainly influenced by day-ahead and positive SRE market
volatility. Furthermore, as the quantiles of the total daily profit are well above
zero, it must hold true that the overall usage of positive SRE is generally high,
as it is the only market contributing strongly to positive daily profits.
6000
4000
2000
Error [ ]
2000
4000
6000
Day-ahead market Pos. SRC market Pos. SRE market Neg. SRC market Neg. SRE market
Market
Figure 9: Difference of expected daily profit minus realized daily profit for
different markets. We see that the error is highest for the positive SRE market,
which is also the market with the highest share of the total profit.
When speaking of daily realized profits, one also has to consider the expected
daily profits as shown in Figure 9. Albeit being the market with the highest daily
profits, the positive SRE market is also the market with the highest difference
between expected and realized profit. We see that the median difference is
almost zero, which means the forecast for the SRE market is roughly equally
often too big as too small. Since the obtained profit of the other balancing
20
markets is significantly lower, the difference does not have too much impact. We
see that the day-ahead forecasts perform really well with a small shift towards
too optimistic expected profits. Overall, our trading strategy could be improved
by using better forecasts, in particular for the SRE markets.
6 6
4 4
2 2
0 0
01 02 03 04 05 06 07 08 04 08 12 16 20 24
1 - 09- 1-09- 1-09- 1-09- 1-09- 1-09- 1-09- 1-09- 00_ 04_ 08_ 12_ 16_ 20_
202 202 202 202 202 202 202 202 Product
Date
Figure 10: Flexibility distributed to the aFRR and day-ahead markets for the
(free | free)–strategy. The left panel shows the first seven days of 09/2021, the
right panel shows the mean distributed flexibility per product over the complete
evaluation period.
6 6
4 4
2 2
0 0
00_04 04_08 08_12 12_16 16_20 20_24 00_04 04_08 08_12 12_16 16_20 20_24
Product Product
Figure 11: Flexibility distributed to the reserve markets and day-ahead market
for the (free | free)–strategy split between the first, i.e. from 04/2021 to
11/2021, and second, i.e. from 12/2021 to 03/2021, of the evaluation period.
We observed a steeper cumulative profit curve during the second period which
indicates a structural change of market prices. The figure shows that this also
changes the bidding strategy.
21
whole period considered. It is striking, that the balancing markets are strongly
preferred over the day-ahead market. However, in the first four hours of the day,
the strategy allocates the available flexibility mostly to the day-ahead market.
From 4 a.m. to 8 a.m. a quarter of the flexibility is still offered on the day-ahead
market. This fits with the result that the day-ahead market is mainly used for
buying, as these hours usually exhibit the lowest prices. For all other 4h-blocks,
the balancing markets are strongly favored.
Overall, we see that all strategies that adjust the flexibility distributed to the
different markets outperform all strategies with a fixed flexibility split. By
also adjusting the penalty coefficient on a daily basis, the profit can be further
increased. However, our adjustment provides only a slight increase, but the
potential of a daily adjusted penalty coefficient becomes obvious.
6 Conclusion
In this article, we propose a solution to the optimization problem of distributing
flexibility between the day-ahead market and the aFRR market in the setting
of a virtual battery. We consider the case where a decision on the flexibility
distribution has to be made before the first market closes in order to guarantee
real-life applicability of our solution. In this setting, we only solve one optimiza-
tion problem only per day which takes both markets into account, in contrast
to other approaches that solve the problem in a multistage setting. The result-
ing flexibility distribution cannot be changed afterwards. We present different
trading strategies for these markets that are reached by optimizing over various
flexibility distributions between the markets plus a penalty coefficient.
A numerical study over the period from April 2021 to March 2022 shows that a
daily adjusted split of the available flexibility yields significantly higher profits
than a strategy that tries to market the same split of flexibility every day on the
day-ahead and the secondary balancing markets. Furthermore, we introduce a
penalty coefficient that determines how much deviations from the base battery
line are penalized. Our proposed (free | free)–strategy, which can adjust
both the flexibility and the penalty coefficient on a daily basis, outperforms all
other strategies considered in terms of total profits. By adjusting the penalty
coefficient between daily optimization runs, we obtain a desired property of
the resulting plan, i.e. maximum profit. While we have presented a penalty
approach that depends on the volatility measures of the considered markets, one
can extend this by considering, for example, the best choices of the coefficient
over the last few days, the current battery level, and other external factors such
as solar and wind forecasts. This is part of future research. Furthermore, finding
an appropriate adjustment of the penalty coefficient is a crucial task that also
allows further improvement.
Another market that offers flexibility is the continuous intraday market. There-
fore, a further possible extension of the model is the inclusion of this market.
22
The intraday market differs from the others in that buyers and sellers of electric-
ity meet directly. This means that they place bids which are collected in an order
book and when two orders for a product match, i.e. the selling price is lower
than or equal to the buying price, a trade is executed. Our proposed method of
incorporating the intraday market is through an algorithm that tracks the order
book and trades arbitrage between different products. The profit generated by
this algorithm is then used as a time series to forecast profits for cross-market
optimization. Difficulties arise in calibrating the algorithm to produce results
that reflect possible outcomes in a real-world scenario. In addition, the intraday
market is much more volatile for participants than the other markets, making
quality forecasting more difficult.
Acknowledgement
This work has partially been supported by the German Federal Ministry for
Economics and Climate Action in grant 01186724/1 (FlexEuro: Wirtschaftliche
Optimierung flexibler stromintensiver Industrieprozesse).
References
[1] ENTSO-E Transparency Platform. Available at: https://transparency.
entsoe.eu/. (Accessed: 27 February 2023).
[2] Regelleistung.net Internetplattform zur Vergabe von Regelleistung. Avail-
able at: https://www.regelleistung.net/ext/. (Accessed: 15 March
2023).
[3] EPEX Spot SE. Available at: https://www.epexspot.com/en, 2023. (Ac-
cessed: 27 February 2023).
[4] Mirjam Ambrosius, Veronika Grimm, Christian Sölch, and Gregor Zöttl.
Investment incentives for flexible demand options under different market
designs. Energy Policy, 118:372–389, 2018.
[5] Xiaolin Ayón, Marı́a Á. Moreno, and Julio Usaola. Aggregators’ optimal
bidding strategy in sequential day-ahead and intraday electricity spot mar-
kets. Energies, 10(4):450, 2017.
[6] Markus Bohlayer, Markus Fleschutz, Marco Braun, and Gregor Zöttl.
Demand side management and the participation in consecutive energy
markets-a multistage stochastic optimization approach. In 2018 15th In-
ternational Conference on the European Energy Market (EEM), pages 1–5.
IEEE, 2018.
23
[7] Markus Bohlayer, Markus Fleschutz, Marco Braun, and Gregor Zöttl.
Energy-intense production-inventory planning with participation in sequen-
tial energy markets. Applied Energy, 258:113954, 2020.
[8] Trine K. Boomsma, Nina Juul, and Stein-Erik Fleten. Bidding in sequential
electricity markets: The nordic case. European Journal of Operational
Research, 238(3):797–809, 2014.
[9] Carlo Corinaldesi, Daniel Schwabeneder, Georg Lettner, and Hans Auer. A
rolling horizon approach for real-time trading and portfolio optimization of
end-user flexibilities. Sustainable Energy, Grids and Networks, 24:100392,
2020.
[13] Elisabeth Finhold, Till Heller, Sven O. Krumke, and Neele Leithäuser. A
bicriteria almost equal minimum cost flow model for day-ahead trading. In
International Conference on Operations Research. Springer, 2023.
[14] Christoph Gärtner, Elias Röger, and Till Heller. An optimal bidding
model to market flexibility on the balancing electricity markets. Energy,
2004:2965, 2022.
[15] Linas Gelazanskas and Kelum A. A. Gamage. Demand side management in
smart grid: A review and proposals for future direction. Sustainable Cities
and Society, 11:22–30, 2014.
[16] Gro Klæboe and Olav B. Fosso. Optimal bidding in sequential physical
markets—a literature review and framework discussion. In 2013 IEEE
Grenoble Conference, pages 1–6. IEEE, 2013.
[17] Emil Kraft, Marianna Russo, Dogan Keles, and Valentin Bertsch. Stochas-
tic optimization of trading strategies in sequential electricity markets. Eu-
ropean Journal of Operational Research, 2022.
[18] Neele Leithäuser, Till Heller, Elisabeth Finhold, and Florian Schirra. Op-
timal trading of flexible power consumption on the day-ahead market. In
International Conference on Operations Research, pages 175–181. Springer,
2022.
24
[19] Nils Löhndorf and David Wozabal. The value of coordination in multimar-
ket bidding of grid energy storage. Operations Research, 2022.
[20] Niklas Nolzen, Alissa Ganter, Nils Baumgärtner, Ludger Leenders, and
André Bardow. Where to market flexibility? optimal participation of in-
dustrial energy systems in balancing-power, day-ahead, and continuous in-
traday electricity markets, 2022.
[21] Fabian Ocker, Karl-Martin Ehrhart, and Marion Ott. Bidding strategies
in austrian and german balancing power auctions. Wiley Interdisciplinary
Reviews: Energy and Environment, 7(6):e303, 2018.
[22] Stig Ø. Ottesen, Asgeir Tomasgard, and Stein-Erik Fleten. Multi mar-
ket bidding strategies for demand side flexibility aggregators in electricity
markets. Energy, 149:120–134, 2018.
[23] Pascal Schäfer, Hermann Graf Westerholt, Artur M Schweidtmann,
Svetlina Ilieva, and Alexander Mitsos. Model-based bidding strategies on
the primary balancing market for energy-intense processes. Computers &
Chemical Engineering, 120:4–14, 2019.
[24] Pierluigi Siano. Demand response and smart grids—a survey. Renewable
and sustainable energy reviews, 30:461–478, 2014.
[25] Andreas Wagner, Enislay Ramentol, Florian Schirra, and Hendrik Michaeli.
Short- and long-term forecasting of electricity prices using embedding of
calendar information in neural networks. Journal of Commodity Markets,
page 100246, 2022.
[26] Dionysios P. Xenos, Izzati Mohd Noor, Mitra Matloubi, Matteo Cicciotti,
Trond Haugen, and Nina F. Thornhill. Demand-side management and
optimal operation of industrial electricity consumers: An example of an
energy-intensive chemical plant. Applied Energy, 182:418–433, 2016.
[27] Qi Zhang and Ignacio E. Grossmann. Enterprise-wide optimization for
industrial demand side management: Fundamentals, advances, and per-
spectives. Chemical Engineering Research and Design, 116:114–131, 2016.
25
A Two market problem formulation
Here we give a full formulation of the two market optimization problem.
max f SRC + f SRE + f DA − f PT
N i
!
SRC
XX SRC
X
s.t. f = qk,i mSRC
k,j · pSRC
j
k∈K i=1 j=1
SRE
SRE
X NX
f = pSRE
i · mSRE
k,i · αk,i
k∈K i=1
∗
T
T X
f DA = pt · mDA
t
T ∗ t=0
∗
T
T X
f PT = cp |τt |
T ∗ t=0
min{t,T } t
X X
τmin ≤ τ0 + mSRC
t0 + mDA
t0 ≤ τmax ∀t0 = 0, . . . , T ∗
t0 =0 t0 =0
SRE
X NX t
X
τt = mSRE
k,i · αk,i
+ mDA
t0 ∀t = 0, . . . , T ∗
Ik ∈I:ak ≤t i=1 t0 =0
τT ∗ = 0
maFRR = mSRC = mSRE
mDA + maFRR ≤ m
− mDA
k ≤ mDA
t ≤ mDA
k ∀k ∈ K, t ∈ Ik
DA
−m ≤ mDA
k ≤m DA
∀k ∈ K
SRC
NX
mSRC,k
i ≤ mSRC ∀k ∈ K
i=1
mSRC
k ≤ mSRC ∀k ∈ K
26
B Retrieval times on the SRE markets
Figure 12: Retrieval times of the positive reserve energy market for price level
of 95 e/MWh. We observe an oscillating pattern of retrieval times in the
time period from Nov 2021 - Jan 2022, where a significantly low demand during
Christmas/New Year season in 2021 becomes apparent. Here the x-axis is based
on a 4h-scaling as the product structure of the market in that time period would
suggest.
27
C Total profits of different bidding strategies
Table 1: Overview over total obtained profits at the end of the considered period
for the different bidding strategies, ordered by the profit in ascending order.
28
D Evaluation of (fixed | 0)-strategies for differ-
ent flexibility splits
((4.0, 6.0) | 0)
((5.0, 5.0) | 0)
1.5 ((6.0, 4.0) | 0)
((7.0, 3.0) | 0)
((8.0, 2.0) | 0)
1.0 ((9.0, 1.0) | 0)
((10.0, 0.0) | 0)
0.5
0.0
2021-05 2021-07 2021-09 2021-11 2022-01 2022-03
200
0
Battery level [MWh]
200
400
600
800
1000
2021-05 2021-07 2021-09 2021-11 2022-01 2022-03
Date
Figure 13: Evaluation for different (fixed | 0)-strategies. In terms of total cumu-
lative profit, the fixed split of 4 MW on the day-ahead market and 6 MW on the
balancing markets outperforms all other strategies. Note that strategies with a
high distributed amount of flexibility to balancing markets do not perform that
well, since at one point in time, they simply have no opportunity to sell energy
due to the battery size constraints. Besides that, we see that the battery usages
of all strategies are similar to each other.
29