Load Shifting Versus Manual Frequency Reserve: Which One is More Appealing to Thermostatically Controlled Loads in Denmark?

This paper investigates demand-side flexibility provision in two distinct forms of manual Frequency Restoration Reserve (mFRR) services and load shifting, and explores which one is financially more appealing to Thermostatically Controlled Loads (TCLs) in Denmark. While mFRR is an ancillary service required for the system and being bought by the system operator, load shifting is an individual act of the TCL in response to the variation of hourly electricity prices. Without loss of generalization, we consider a supermarket freezer as a representative TCL, and develop a grey-box model describing its temperature dynamics using real data from a supermarket in Denmark. Taking into account price and activation uncertainties, a stochastic mixed-integer linear program is formulated to maximize the flexibility value from the freezer. Examined on an ex-post simulation based on Danish spot and balancing market prices in 2022, load shifting shows to be almost as profitable as mFRR provision, although it could be more consequential for temperature deviations in the freezer. This indicates the need for regulatory measures by the Danish system operator to make the attraction of ancillary service provision more obvious for TCLs in comparison to the load shifting alternative.


Introduction
Power consumers are looking to reduce costs by any means due to sky-rocketing energy and gas prices.In Denmark, supermarkets are especially exposed due to their high energy consumption, and they are actively looking into initiatives to reduce their electricity bill.One of these initiatives is the application of demand-side flexibility, whereby supermarket freezers as Thermostatically Controlled Loads (TCLs) can shift consumption in time when spot (day-ahead) prices are comparatively lower or when the power system needs up-regulation services.There are thousands of supermarkets in Denmark willing to provide flexibility, and their freezers are especially suited for this purpose as they constitute a big share of their energy consumption.
IBM is currently developing a software platform, called Flex Platform, aiming to harness flexibility from industrial and commercial consumers for bidding in ancillary service markets via a Balance Responsible Party (BRP).One large supermarket chain in Denmark has already signed up for the Flex Platform, and another supermarket chain is currently exploring the possibility of joining.While these supermarket chains are keen on the provision of flexibility, the estimation of their monetary benefit still remains an open question.We aim to address it by considering two potential ways for supermarkets to exploit their consumption flexibility: (i ) load shifting, and (ii ) the provision of manual Frequency Restoration Reserve (mFRR) services.We develop a stochastic optimization tool capturing the temperature dynamics and therefore consumption flexibility of supermarkets, and compute the monetary benefit of flexibility implemented via load shifting or mFRR service provision.We use two scenario generation strategies: one using a five-day lookback on spot and balancing market prices in Denmark, and the other one using those price data in 2021.We then systematically compare these two strategies ex-post via an out-of-sample simulation based on Danish price data in 2022.

Dilemma: Load Shifting Versus mFRR
For power consumers who are actively looking into cost saving solutions, it is important to estimate the monetary benefit of flexibility.In Nord Pool, spot prices are announced at 2pm for the next day, so supermarkets who purchase power through a retailer at spot prices, have a chance to shift their consumption plan for the next day, accordingly.From their perspective, it is natural to first look into load shifting as the most obvious and straightforward way to utilize flexibility.Here, load shifting simply refers to shifting consumption to another point in time, typically when spot prices are lower.
Nevertheless, load shifting, although might be attractive individually, is not necessarily in favor of the power system.If a significant number of consumers start to act similarly, it could be detrimental to the power system by moving the peak consumption to a different time of the day.In this case, spot prices are no longer reflecting supply-demand equilibrium, and the demand distribution over the day.Intriguingly, many industrial and residential consumers have already started shifting demand to some degree, as a response to the energy crisis.As a result, load shifting might provide short-term monetary benefit, but it is not necessarily helping the power system in the long run.
As an alternative option which is certainly in favor of the power system, consumers could choose to provide flexibility by offering ancillary services through an aggregator, for which they would be compensated.Here, we focus on frequency-supporting services, and in particular mFRR, and left a potential extension by considering more services for the future work.This service is a slow-responding reserve used to stabilize frequency in the power system after fast frequency reserves are depleted.The market for mFRR is usually operated by the national Transmission System Operator (TSO), which is Energinet in Denmark.Note that mFRR resembles load shifting in the sense that it is the largest energy reserve operated by the TSO, and can be provided by consumers via shifting their consumption in time.Likewise, generators provide mFRR by increasing their power generation.
In order for a supermarket freezer to deliver mFRR, it must be part of a larger portfolio with potentially many small assets to meet the minimum bid size requirement for entering the mFRR market.In Denmark, this minimum bid size is currently 5 MW, but it is expected to reduce to 1 MW in 2024.Furthermore, there might be additional synergy effects such as increased operational flexibility in the control response, rebound, and temperature deviations [1].
Without loss of generalization, we assume that one freezer delivering mFRR can be scaled to many freezers in the same way.Therefore, demand response for consumers participating in the mFRR market versus load shifting will look similar.From the perspective of consumers, it is of great interest to explore the monetary benefit of mFRR versus load shifting.Similarly, it is important for TSOs to understand the incentive of consumers to provide mFRR services opposed to simply shifting load in time.

Research questions and literature review
Using real data from Denmark, this work aims to investigate and answer the following three research questions: (i ) how can the flexibility of a supermarket freezer as a TCL be characterized?(ii ) how much monetary benefit can this TCL earn by the mFRR provision opposed to load shifting?and finally (iii ) what are the pros and cons of participating in the Danish mFRR market versus load shifting?Unlike the second and third questions, the first one has been addressed extensively in the literature.Therefore, the following literature review focuses on the first question, where we also differentiate our work from the current literature.To the best of our knowledge, there is no work in the existing literature addressing the second and third questions.
The approach taken in each study in the literature is very much dependent on the perspective from which flexibility is utilized.Often, full knowledge and control of all assets is assumed.A prevalent implicit assumption is that the aggregator and the trading entity are the same, with an exclusive business relationship to flexible consumers [2].The incentives and investments required for delivering flexibility for the flexible consumer are often overlooked as well.Many also assume an idealized market mechanism or simply propose a new mechanism for trading flexibility.
In [3] and [4], a complete white-box model of a supermarket refrigeration system is presented and validated against real-life data.It is also shown how such a system can provide demand response.These two works provide a benchmark for any grey-box model of a supermarket refrigeration system.However, such an approach is hard to scale and requires complete knowledge of every refrigeration system.In [5], a second-order model is used to model the food and air temperature in a freezer in an experimental setting.It is shown how food temperature has much slower dynamics than air temperature.In [6], a simple first-order virtual battery model for a TCL is presented.This model also constitutes the starting point for modeling temperature dynamics in this work, as it has an intuitive interpretation.A similar bucket model is introduced in [7].
In [8], a Mixed-Integer Linear Programming (MILP) problem is developed to address upand down-regulation hours from a baseline consumption.It is assumed that the energy for down-regulation is equal to the energy not consumed when up-regulating.A similar approach is taken in our work, except we will define the use of down-regulation until the temperature state is (approximately) back to its setpoint.
In [9,10,11], residential air condition units are modeled using up-and down-regulation blocks characterizing flexibility.The blocks are obtained from grey-box models of households [12].The authors show how such a block formulation can be solved using exact and stochastic dynamic programming in the context of peak shaving demand for a utility in the U.S. The demand-side flexibility then functions as a hedge towards extreme electricity prices.Although such a use case has not been relevant in Denmark yet, the estimation of flexibility blocks is a novel idea as it avoids having to explicitly integrate a physical model into an optimization problem.However, a trade-off is that the curse of dimensionality quickly makes dynamic programming computationally intractable for a large portfolio of heterogeneous demand-side assets.Furthermore, it might be difficult to assure the Markov property [13] when reformulating the problem even slightly.Flexibility blocks are also used in [14] for an offering strategy.Here, the flexibility blocks are derived from measurements of residential appliances in the Ecogrid 2.0 project [15].
In [16] and [17], it is described how pre-defined asset characteristics allow aggregators to utilize and contract their flexibility through an interface.This assumes that such characteristics are fully known beforehand.However, this type of information flexibility interface is still useful for aggregators when engaging with consumers with well-known assets at the point where aggregation and penetration of demand-side flexibility is a mature and prevalent business.
In [18], a portfolio of residential heat pumps is modeled using a linear first-order model.Individual units are lumped together as essentially one big, aggregated heat pump as described in [19].The first-order model is a grey-box model incorporating the physics, i.e., the temperature dynamics in a household.Such an approach will be used in this work as well.The authors also consider how the portfolio of heat pumps can be used for load shifting and real-time bidding in the balancing market, but do not consider the mFRR service provision.However, they assume that all the assets can be controlled continuously in a model predictive control setting.Temperature deviations are minimized directly in the objective function using the integrated error of total deviations.This introduces a trade-off parameter in the objective function that must be tuned to weigh the economic value versus the temperature deviation compared to the setpoint.
Similar studies exist in the literature albeit in different settings.For example, [20] uses a two-stage stochastic optimization for prosumers to bid into tertiary reserves, i.e., mFRR.A similar approach is taken in [21] although with a focus on scalability to thousands of assets and distribution of flexibility amongst prosumers.In [22], it is shown how batteries can be used to provide secondary reserves.TCLs have also been investigated for provision of primary reserves in the Nordics [23], in a microgrid [24], and in the Australian power grid [25].

Our contributions and outline
To the best of our knowledge, no work has thoroughly investigated and compared the monetary value and incentives for TCLs to provide mFRR services versus load shifting, although both have been studied extensively.This work aims to fill that gap by taking a holistic view on the incentives from a supermarket's perspective in Denmark.Furthermore, when stating the objective functions for mFRR, most studies have assumed a simplified market structure, and neglect the fact that the aggregator and the consumer are not necessarily the same entity.We discuss the consequences of this assumption in relation to the market structure in Denmark [2], and in the context of mFRR and load shifting.
We provide a realistic model formulation of the mFRR bidding, taking into account the sequence of decisions needed to be made.We propose two solution strategies for mFRR bidding: (i ) A simple one learned using the Alternating Direction Method of Multipliers (ADMM) on 2021 price data which can be applied for all of 2022, and (ii ) A dynamic one which computes a new policy every day by looking at spot prices for the past five days.Real data of a supermarket freezer in Denmark is used.
The rest of the paper is organized as follows.Section 2 describes modeling a supermarket freezer as a TCL.Thereafter, mFRR and load shifting are described in detail and their objective functions are stated.Section 3 presents the proposed stochastic optimization problem.Section 4 provides results for a case study.Section 5 concludes the paper.Appendix A presents the full model formulation.Finally, Appendix B provides a sensitivity analysis on the number of scenarios.

Describing flexibility of a TCL
There are several distinct ways to exploit and monetize flexibility from a TCL.In this section, we focus on mFRR and load shifting.First, we describe how to mathematically model a TCL as a flexible resource.Second, we describe how to monetize the flexibility from TCLs for mFRR and load shifting, and provide the objective functions in both cases.For mFRR, the objective function includes all costs and revenues for the BRP, while for load shifting, the objective function only includes the flexible demand's perspective.This approach explicitly shows the situation where flexible demand is activated without including the BRP, as this is more realistic.

Modeling TCL as a flexible resource
TCLs are characterized by being controlled such that the temperature is kept at a specified setpoint.Examples include heat pumps, freezers, air condition units, etc.They constitute an important part of demand-side flexibility due to inherent thermal inertia of such temperaturedriven systems [1,6].
We focus on freezers only, which are a very common type of TCLs.Specifically, we focus on a single freezer display in a Danish supermarket.Freezers are characterized by a large thermal inertia due to the frozen food, which makes them suitable for flexibility provision.On the other hand, there is a risk of food degradation when utilizing flexibility.Therefore, it is important to model the temperature dynamics in the freezer for a realistic and risk-aware estimation of its flexibility.
The rest of the section is organized as follows.First, we visualize the measurements from a real supermarket freezer.Second, we introduce a second-order grey-box model that characterizes the supermarket freezer.Third, we validate the second-order model and show how it can be used to simulate demand response from a freezer.

Supermarket freezer description
We use real data from a single freezer operating in a large Danish supermarket as a case study.In Fig. 1, the top plot shows the 15-minute average air temperature of the freezer, whereas the middle plot depicts the opening degree of the valve.Temperature fluctuates around its setpoint at -18 ˝C with the exception of hours 7 and 8, where defrosting is scheduled.While defrosting, a heating element is briefly turned on, and the expansion valve is closed, such that the flow of refrigerant stops.Afterwards, while recovering the temperature, the expansion valve is fully opened.The electric power of the variable-speed compressor rack, scaled to one freezer is shown in the bottom plot.Since temperature dynamics are similar for all freezers, homogeneity is assumed.Hence, an equal consumption level is assumed for all freezers.
Consumption is highest during opening hours, and it is lowest during closing hours.During opening hours, food is being replaced and customers open the display case constantly.Furthermore, most supermarkets put additional insulation on the display cases during closing hours which reduces thermal losses.For these reasons, there are effectively two regimes for a supermarket freezer plus a short defrosting regime.

Thermal modeling of freezer
In [6], it is described how a simple TCL model can be developed.We extend it to a second-order state-space model that accounts for the thermal mass of the food, which essentially provides the flexibility in freezers: where T c t is the measured air temperature in the freezer at time t P t1, . . ., Ju, and T f t is the food temperature which is a latent unobserved state.Parameters C f and C c are the thermal Figure 1: Top: temperature of a single freezer in a supermarket.Middle: opening degree (OD) of the freezer expansion valve.Bottom: electric power of the compressor rack feeding a single freezer.capacitance of the food and air in the freezer, respectively.In addition, R cf and R ci are the thermal resistance between food and air in the freezer, and air and indoor temperature, respectively.There is essentially a low-pass filter of the air temperature in the freezer with the time constant C f times R cf .Parameter ϵ represents the temperature change when defrosting, whereas 1 df t is the indicator function for when defrosting happens.Parameter R ci is either one of two values, R ci,day and R ci,night , to capture the differences between opening hours (6am to 10pm) and closing hours (10pm to 6am).The opening degree OD t , indoor air temperature T i t , and power P t are exogenous inputs as the opening degree is assumed to be fixed during a demand-response event, while only P t is controllable, and the indoor air temperature is unaffected by the freezers.Parameter η is the compressor efficiency.The model is discretized with a time step of 15 minutes, therefore dt " 0.25 and J " 96.

Model validation
Using the R library of CTSM-R [26], all parameters in (1) have been estimated as given in Table 1.Notice that the thermal capacitance of the air in the freezer is significantly smaller than the thermal capacitance of the food, indicating that the food temperature changes comparatively slower.The thermal resistance between the food and air inside the freezer, R cf , is also significantly smaller than the thermal resistance between the air in the freezer and the indoor temperature in the supermarket, R ci , both during the day and night.This makes sense as the lid acts as a physical barrier insulating the freezer.Furthermore, the thermal resistance to the indoor air temperature is higher during the night, which means that less power is needed, as observed in Fig. 1.The one-step residuals for the air temperature should ideally resemble white noise in order for a model to capture all dynamics observed in the data [27].Fig. 2 shows the auto-correlation and cumulative periodogram of the residuals.The autocorrelation shows two significant lags for lag two and seven, but looks satisfactory otherwise.Likewise, it seems the model is able to capture most dynamics at all frequencies.Since there are only J " 96 time steps, the defrosting period can result in relatively large residuals as it is difficult to capture such fast transient dynamics.Since up-regulation is not allowed during defrosting, the residuals are not too important during that period.To decrease their effect in the parameter estimation procedure, the term ϵ1 df t was added to (1).Furthermore, Fig. 3 (left) shows a 24-hour simulation of (1).It is observed that the simulation is reasonable and closely follows the measured air temperature, although a slight bias Figure 3: Left: Simulation of food and air temperatures using (1) with parameters in Table 1, and its comparison to the measured air temperature.Right: Simulation where power is turned off for two hours with a subsequent rebound at the nominal power until the food temperature is back to its normal value.is observed as the simulated temperature is a bit higher.Such a visual validation is important because the model will be embedded later in an optimization model in Section 3.
Ideally, the validation of (1) would also include real measurements from the air and food temperature in a freezer during demand-response events.However, by adhering to the fundamental physics governing the temperature dynamics as shown, the model is trusted to be accurate during demand-response events too.It brings an intuitive interpretation which can be used to understand the impact on temperature during a demand-response event.In Fig. 3 (right), such a simulated example of a demand-response event is shown.It can be observed how the air temperature increases when the power is turned off, and how it decreases when the power is turned back on.The food temperature is much more stable and only changes slightly, as expected.The rebound occurs until the food temperature is back to its normal value.

mFRR
The green boxes in Fig. 4 show the decision making timeline for the TCL to participate in the Danish mFRR market.The mFRR market in Denmark only trades up-regulation services.One should note that BRPs can choose not to bid in the reserve market and only bid in the real time for up-and down-regulation.We consider a case wherein the TCL delivers reservation through a BRP, since the payment is received for both reservation and activation.All prices considered are for the bidding zone DK2 (eastern Denmark).According to green boxes in Fig. 4, at 9:30am of day D-1, the BRP submits reserve capacity bids p r,Ò h @h to the mFRR market for the next day D. If accepted, she is paid at the reservation price λ r h .Therefore, she earns λ r h p r,Ò h .This happens before the day-ahead (spot) market clearing at noon for which the BRP buys energy for her expected demand P Base h at the spot price λ s h , (which is not a decision variable in our model).After that, until 5pm, a regulating power bid, λ bid h , must be submitted by the BRP for each hour of day D, where p r,Ò h ą 0 [28].In hour h of day D, the reserves are activated if the following three conditions hold: (i ) there is a reservation accepted, i.e., p r,Ò h ą 0, (ii ) the balancing price is higher than the spot price, i.e., λ b h ą λ s h , and the regulating power bid is lower than or equal to the balancing price minus the spot price, i.e., λ bid h ď λ b h ´λs h .If all these three conditions are met, the BRP is paid at the balancing price λ b h times her actual up-regulation p b,Ò h .The BRP may incur a cost due to any subsequent rebound p b,Ó h .Furthermore, the BRP should pay at the penalty price λ p for s h " maxt0, p r,Ò h ´pb,Ò h }, i.e., if she fails delivering her promised reserve.In reality, p b,Ò h is determined by the TSO, but for simplicity, we assume a bid is always activated in its entirety.Accordingly, the objective function of the BRP maximizing the flexibility value over a day (via mFRR provision) is Note that an additional term containing the energy cost ř 24 h"1 λ s h P Base h is removed from (2), since it is a fixed term in our setup.This term contains λ s h and P Base h , which are both parameters, and therefore, can be omitted from the objective function.However, we will consider it when numerically comparing cost savings associated with two alternatives of mFRR provision and load shifting.

Load shifting
Another option for utilizing flexibility is to shift the load to a different time according to the spot market prices which are known already 12-36 hours in advance.For this, the TCL makes a load shifting decision right after the day-ahead market as shown by the blue box in Fig. 4. Note that in Denmark and generally in Europe, day-ahead prices are directly exposed to consumers with no fixed time-of-use price in between as is often the practice in North America.For a TCL, there are additional constraints to how energy can be shifted due to the rebound effect.First, there can be temperature constraints which will result in less energy being shifted.Second, the rebound must happen immediately after reducing power consumption.Otherwise, the temperature deviation becomes too big for too long.The cost saving from load shifting is directly proportional to the volume and price difference between the baseline load and shifted load as given by where p h is the power profile when the load is shifted, whereas p Base h is the baseline in the day-ahead stage.
Since the load shifting action only occurs after the day-ahead market clearing (cf.Fig. 4), the BRP has already bought λ s h p Base h and any deviation results in an imbalance for the BRP.In this work, we look at the case where the flexible demand acts selfishly and excludes the BRP from her load shifting action.Therefore, the objective function for the underlying TCL simply reduces to ř 24 h"1 λ s h p h .

Optimization model and solution strategy
This section presents the optimization problem.The rest of this section is organized as follows.
First, the time sequence of decisions for participation in the mFRR market is presented.Second, we explain how scenarios for price data are generated.Third, we present the model formulation.Fourth, we discuss how the bidding policy is implemented.Lastly, we show how a scenario decomposition method with an ADMM strategy is used to solve the optimization model.

Time sequence for decision making
Fig. 4 shows the stages for making decisions in the mFRR market and for load shifting.In the first stage in day D-1, the BRP makes a reservation bid decision p r,Ò h for every hour h of day D, while being uncertain about input parameters in the next stages, including day-ahead market prices λ s h and balancing market prices λ b h .We assume the BRP is not uncertain about mFRR market prices λ r h .For simplicity and to avoid the need for developing a multi-stage stochastic program, we merge the second, third, and fourth stages in Fig. 4 as one, and call it the second stage.By this, p r,Ò h is the first-stage variable, whereas the second stage variables, indexed by scenario ω, include the regulating power bid λ bid h,ω and the set of real-time variables This set contains the real-time power activated, as well as auxiliary variables for identifying up-and down-regulation, temperature dynamics, and when to deliver up-regulation according to the bid and prices.See the Appendix for a detailed description.Note that down-regulation refers to the rebound effect of the freezer.

Scenario generation
To make decisions on reservation capacity p r,Ò h and regulating power bid λ bid h,ω , we generate a set of scenarios ω P Ω for spot and balancing price data., i.e., λ s h,ω and λ b h,ω .Each scenario contains spot and balancing price data for the entire day in question.The number of scenarios is |Ω|, and we assume all scenarios are equiprobable.We refer to them as in-sample scenarios.We use two different strategies for in-sample scenario generation: (i ) considering historical spot and balancing prices in DK2 in 2021.(ii ) considering prices of the most recent five days (lookback strategy).This first scenario generation strategy the case where an aggregator relies on a simple, fixed policy without the need to run a daily optimization as opposed to the second strategy, although it might exhibit a better performance in case the underlying uncertainty is non-stationary.The first strategy uses 50 scenarios.Using a sensitivity analysis, we found out that increasing the number of scenarios beyond 50 does not improve the performance remarkably as explained in Appendix B. We made a similar observation for choosing five days in the second solution strategy.In both scenario generation strategies, balancing prices λ b h,ω are sampled in the following way: First, an integer v is sampled uniformly from t0, . . ., 24u which represents the total number of up-regulation hours in a day.We then sample spot and balancing price differentials from a single day within the set of all days where up-regulation happened v times.This constitutes one scenario and is repeated |Ω| times.In this way, days where up-regulation happened are essentially up-sampled, and the model learns more when up-regulation happens than otherwise.The in-sample results are systematically compared against the same set of unseen Out-of-Sample (OOS) scenarios, which are DK2 prices for 2022.
For load shifting, the solution approach is simply to solve a deterministic optimization problem for the next day, since the day-ahead (spot) market clearing happens in advance, and thereby the spot market prices are known.

Model formulation
Recall that (2) gives the objective function of a BRP participating in the mFRR market, but in a deterministic setup.The optimization problem of such a BRP in a two-stage stochastic programming format is Maximize State-space model p1q, @ω (4c) where bold symbols represent vectors.For example, the vector p r,Ò includes p r,Ò h @h.Parameter π ω is the probability assigned to in-sample scenario ω.Here, we present optimization (4) in a compact form using functions f p.q, gp.q, and hp.q.The detailed formulation is given in the Appendix.Constraint (4b) includes all power and activation related limits, whereas (4c) models temperature dynamics in the freezer.Constraints (4d)-(4e) declare continuous and binary variables.Note that R and R `denote free and non-negative real numbers, respectively.The optimization model ( 4) is a MILP problem.
For optimal decision making for load shifting, ( 4) is simplified by removing scenarios as well as reservation and bid constraints, and replacing the objective function (4a) by minimizing the total power purchase cost λ s p.

Regulating power bidding implementation
Recall from Fig. 4 that we have merged three stages, by which the regulating power bidding decisions λ bid h,ω and real-time operational decisions Γ h,ω become second-stage variables.This is the reason both set of variables λ bid h,ω and Γ h,ω are similarly indexed by ω, while in reality, the decision λ bid h,ω should be made before Γ h,ω .This also challenges the ex-post OOS simulation.To resolve it, we use a learning policy, such that we replace the scenario-indexed variable λ bid h,ω in (4) by αqpλ s h,ω q `β, where qp.q is an arbitrarily selected function.In addition, α and β are first-stage variables (they are not indexed by ω).This replacement shrinks the degree of freedom for the BRP compared to ( 4), but makes it more practical to be used.The reason is that, by this trick, the regulating power bidding decision to be made at 5pm of day D-1 becomes a first-stage decision, dependent not only on policies α and β, but also on uncertain spot prices λ s h,ω .In other words, by using the in-sample scenarios ω, the BRP obtains optimal values for α and β at 9:30am of day D-1.Then, she waits to see the spot prices at noon of day D-1, and submits her regulating power bids at 5pm of day D-1.In our simulations, we found out that the selection of qpλ s h,ω q as the difference of spot prices in subsequent hours works comparatively more satisfactory ex-post, as it suits better to accommodate the rebound effect.By this, the BRP prefers to be activated when the spot price during rebound (down-regulation) is comparatively lower.Therefore, we replace λ bid h,ω in (4) by ´λs h,ω q `λs h,ω `β, @ω, @h P t1, . . ., 23u. ( Another implementation challenge is to enforce price conditions under which the mFRR reservation is activated.Recall from Section 2.2, for the activation at hour h under scenario ω, it is necessary to hold λ bid h,ω ď λ b h,ω ´λs h,ω and λ b h,ω ą λ s h,ω .These conditions can be equivalently enforced as where 1 p.q is 1 if conditions (.) are met, otherwise it is zero.If the non-negative slack variable s h,ω takes a non-zero value, it shows that the BRP fails in the activation stage, and therefore will be penalized.The challenge is that ( 6) makes a condition on variable λ bid h,ω , or equivalently on α and β as defined in (5).This makes ( 6) non-linear.To linearize it, we use the McCormick relaxation technique [29] and define auxiliary variables ϕ h,ω P R `and g h,ω P t0, 1u.By this, we replace (6) for every hour h and scenario ω by a set of mixed-integer linear constraints as ´gh,ω M ď ϕ h,ω ď g h,ω M, (7d) where M is a large enough positive constant.Constraint (7a) ensures that g h,ω " 1 when λ b h,ω ´λs h,ω ě λ bid h,ω .Otherwise, it sets g h,ω " 0. Constraints (7b)-(7c) set the up-regulation equal to ϕ h,ω (or incurs a penalty through s h,ω ) if there is an up-regulation event in the system, i.e., if 1 λ b h,ω ąλ s h,ω " 1. Constraint (7d) enforces ϕ h,ω " 0 when g h,ω " 0, implying the balancing price minus the spot price is smaller than the power regulating bid.Constraint (7e) ensures that ϕ h,ω is equal to the reservation capacity p r,Ò h whenever g h,ω " 1, i.e., if λ b h,ω ´λs h,ω ě λ bid h,ω .Note that in the final model, λ bid h,ω in (7) should be replaced as defined in (5).The resulting model formulation, which is a MILP, is given in the Appendix.

Scenario decomposition with ADMM
By increasing the number of scenarios, the proposed stochastic program quickly becomes computationally intractable due to the number of binary variables and intertemporal constraints.To resolve it, we apply a scenario decomposition approach built upon the ADMM algorithm [30].To do so, we relax non-anticipativity constraints by adding a scenario index to the first-stage variables, i.e., This decomposes the original problem to a set of deterministic sub-problems, one per scenario, to be solved in parallel.A quadratic regularizer is added to the objective function of every subproblem, making it a mixed-integer quadratic program.The ADMM algorithm is iterative.The convergence happens when we achieve a consensus over sub-problems on first-stage variables.Due to having binary variables in the original problem, this ADMM algorithm is eventually a heuristic [31], i.e., it may not converge to optimality.However, we have observed in a case with a limited number of scenarios for which we can also solve the original MILP problem directly, the proposed ADMM exhibits a satisfactory performance.

Numerical results and discussion
We consider five models to calculate the operational (energy) cost of a single freezer, including three models where the freezer provides mFRR services, one model where the freezer shifts the load in response to spot prices, and the last model, the so-called base cost, where the freezer neither shifts the load nor provides mFRR services.The data availability for these five models is summarized in Table 2.All source codes and relevant data are publicly shared in [32].

Load shifting vs mFRR: Which one is more appealing?
For all five models, Fig. 5 shows the out-of-sample cumulative operational cost of the single freezer during the first nine months of 2022.Recall that all these models have been compared fairly by an out-of-sample simulation against identical scenarios, i.e., real spot and balancing market prices from 2022.The base cost (solid black) has only access to spot price data, and leads to the highest cost in Fig. 5. Blue and red curves (mFRR cases), both below the base cost curve, correspond to the cases where the freezer provides mFRR services, and uses scenarios to model spot and balancing market price uncertainties.Their difference comes from in-sample scenarios used: while the red curve uses five equiprobable scenarios coming from the most recent historical data (lookback strategy), the blue curve uses 50 equiprobable scenarios coming from 2021.The yellow curve shows the reduced cost of the freezer due to load shifting.Finally, the dotted black curve (lowest in Fig. 5) provides an oracle (ideal benchmark), where the freezer perfectly knows the spot and balancing market prices.
An interesting observation is that, in comparison to the base cost, both load shifting (yellow curve) and mFRR (red curve) bring a 13.9% cost reduction, whereas the mFRR provision using 2021 data reduces the cost by 11.6% (blue curve).Note that the cost savings reported for red and blue curves are not far from the mFRR oracle, showing that the scenarios used are sufficiently adequate.While this observation might be appealing to the freezer as load shifting requires a comparatively simpler decision-making process than the mFRR provision, it is not necessarily a desirable outcome for the power system.The mFRR provision helps the system keep the supply-demand balance, while load shifting as a response to spot prices is not 5: Out-of-sample cumulative operational cost for the freezer during the first nine months of 2022.necessarily helping the system, and even in the worse case, the spot prices fixed before load shifting may no longer represent the supply-demand equilibrium.This calls system operators and regulators for potential changes, e.g., market redesign, to make the mFRR provision more attractable.
In the case of load shifting, it is worth mentioning that the settlement cost of the BRP is ignored -this reflects the self-interested TCLs.While the TCL reduces her cost by load shifting, the corresponding BRP may incur a settlement cost due to the resulting imbalance between the true consumption and the day-ahead schedule.In practice, the BRP would have to pay for such an imbalance or at least buy/sell energy in the intra-day market to adjust her day-ahead schedule and consider potential load shifting actions by TCLs.However, loads are not necessarily aware of those costs for the BRP.Hence, they may have a strong incentive to exploit their flexibility for load shifting.Some larger flexible consumers, such as industrial and commercial loads, might not be exposed fully to spot prices, and for those consumers, load shifting could be less profitable.However, they may still have an incentive to change their deal with the BRP to get a full exposure.
In the case of mFRR provision, it is assumed that the entire revenue from reservation and activation go to the TCL.This neglects the fact that, in practice, the BRP requires a share of the revenue.Furthermore, there might be an aggregator or a technology provider who facilitates the aggregation and communication of the flexibility.In such a case, they would also request a share of the revenue.This can potentially reduce the revenue of TCLs by the mFRR provision.

Technical results
Fig. 6 shows technical results for the case of load shifting in a representative day.For given spot prices (bottom plot), it is evident that the freezer shifts the load to low-price hours, especially in the later hours of the (top plot).However, this has a remarkable effect on the air and food temperatures with large deviations from the normal set-point (middle plot), which in turn can have an impact on food degradation.Fig. 7 presents technical results for the case of mFRR provision in a representative day, whose spot and balancing market prices are given in the lower plot.The top plot shows the baseline power profile P Base h and the mFRR reservation p r,Ò h sold.For a better illustration, we have plotted P Base h ´pr,Ò h , i.e., the power profile of the freezer if the full activation happens during the entire day.The third plot of Fig. 7 shows, for this specific day (as an in-sample scenario), the freezer is activated three times, i.e., in hours 6, 9, and 10.In these three hours, all conditions λ bid h,ω ď λ b h,ω ´λs h,ω , λ b h,ω ą λ s h,ω , and p r,Ò h ą 0 hold (see the bottom plot).The rebound happens in hours 11 to 19.The majority of rebound occurs in hour 19, as the balancing price is comparatively low.Finally, the second plot shows that the food and air temperature deviations in the freezer due to mFRR provision are smoother in comparison to load shifting.
Our second main observation is as follows: Although the cost saving is higher for load shifting in comparison to mFRR provision, it is directly proportional to the energy shifted, and therefore, the temperature deviation in the freezer.This is not the case for mFRR, as the reservation is not always activated.Bottom: Spot and balancing market price as well as regulating power bids in this specific scenario.17 balance the power grid and ensure its stability in the future, there is a need to integrate industrial and commercial flexible demands into existing ancillary services where mFRR is the most energy-intensive one.To that end, it is crucial to estimate and model flexibility from flexible demands, especially thermostatically controlled loads.
We investigated how a supermarket freezer can provide flexibility for mFRR and load shifting in Denmark, and explored which one provides a greater monetary incentive for a TCL.To this end, we used actual data from a Danish supermarket.This was done by developing a secondorder grey-box model of the temperature dynamics in the freezer with the food temperature as a latent state.In the state-space form, the model was directly incorporated as constraints into a two-stage stochastic MILP problem, whose objective is to maximize the monetary value from the freezer's flexibility.Two scenario generation strategies were implemented: one with a fiveday lookback strategy on the spot and balancing market prices in DK2, and the other one based on price data for those markets in 2021.For mFRR, we used a linear policy, and then linearized the conditions for activation via the McCormick relaxation method.For computational ease, we used an ADMM-based scenario decomposition technique.An out-of-sample evaluation was done on unseen 2022 price data.We observed that load shifting is more profitable, but has a greater impact on the air and food temperatures in the freezer as opposed to mFRR that depends on the system state and bid price for activation.
From a policy perspective, it is concerning if load shifting happens to be almost as profitable as mFRR provision.It might be of great interest for TSOs to ensure flexible demands have an incentive to deliver mFRR to ensure stability in the power grid and avoid new peaks and imbalances.Such incentives could manifest in green credits for providing emission free mFRR or an add-on to the mFRR reservation price.From the perspective of the flexible demand, periods of high volatility in spot prices can readily be used for load shifting although great care should be taken with respect to temperature deviations.Provision of mFRR is more attractive with respect to temperature deviations, but it is much more complicated to get started with mFRR whereas load shifting does not depend on other market participants, hence load shifting is a simple and profitable revenue stream for flexible demands.
We made a set of simplifications and assumptions, whose impacts need to be explored for the future work.The revenue share of BRP and aggregator was not considered.This may change our finding that load shifting is more financially appealing to a TCL.As mentioned earlier, a single freezer or supermarket must be part of a larger portfolio through an aggregator in order to participate in the mFRR market.Such an aggregated portfolio has some issues that are neglected here, such as the baseline estimation for verification of the demand response, allocation of profits within the portfolio, and an accurate capacity estimation of the whole portfolio that bids in the mFRR market.Furthermore, the European mFRR markets will change from a 60-minute resolution to a 15-minute market in the next few years [33].This makes it more feasible for TCLs to participate in the mFRR market, given their sensitivity to large temperature deviations, and the fact that TCLs can get a passive income when there is no up-regulation need in the power grid.

Credit author statement
Peter Gade conceived and designed study, developed the code, and write the initial draft of the manuscript.All authors contributed considerably to developing the idea, thoroughly discussed the model, scenarios, numerical results, and policy insights, and also revised the final manuscript.
p r,Ò h ď P Base h , @h (9i) P Min ď p h,ω ď P Nom , @h, ω `uÓ h,ω ď 1 @h, ω (9u) `yÓ h,ω ď 1 @h, ω (9v) T f J,ω ď T f,Base J , @ω (9x) The objective function (9a) maximizes the expected flexibility value of the freezer.Constraint (9b) contains (7), representing the McCormick relaxation of activation conditions.Recall that λ bid h,ω in (7) should be replaced as defined in (5).Constraint (9c) declares continuous and binary variables.Aligned with (1), constraints (9d)-(9e) are the state-space model for the food and air temperature dynamics.Similarly, (9f)-(9g) include the baseline air temperature T c,Base t and the baseline food temperature T f,Base t , and model temperature dynamics for the baseline power.Recall in case the hour index h runs from 1 to 24, index t runs from 1 to J " 96.Constraint (9h) sets the real-time power consumption p h,ω equal to the baseline power P Base h unless there is up-regulation p b,Ò h,ω or down-regulation p b,Ó h,ω .Constraint (9i) binds the mFRR reservation p r,Ò h to the baseline power.Constraint (9j) ensures that up-regulation is zero when there is no need for up-regulation, and at the same time binds it to the reservation power.Constraint (9k) includes the binary variable u Ò h,ω , indicating whether the freezer is up-regulated in hour h under scenario ω.This constraint ensures that up-regulation is zero whenever u Ò h,ω " 0, and otherwise restricted to the maximum up-regulation service P Base h ´P Min that can be provided.Note that P Min is the minimum consumption level of the freezer.Constraint (9l) works similarly for down-regulation.Note that the binary variable u Ó h,ω indicates whether down-regulation happens, whereas P Nom is the nominal (maximum) consumption level of the freezer.Constraint (9m) restricts the power consumption to lie within the minimum and nominal rates.Constraint (9n) binds the slack variable s h,ω , representing the service not delivered as promised.Constraint (9o) ensures that down-regulation is equal to at least 10% of the down-regulation capacity.Constraint (9p) prohibits any up-regulation when defrosting occurs.Constraints (9q)-(9w) define auxiliary binary variables y Ò h,ω , y Ó h,ω , z Ò h,ω , and z Ó h,ω , identifying transitions from/to up-regulation and down-regulation.During all hours with up-regulation, y Ò h,ω " 1.In the hour that up-regulation is stopped, z Ò h,ω is 1.There is a similar definition for y Ó h,ω and z Ó h,ω related to down-regulation.See Chapter 5 of [34] for complete details.Constraint (9x) restricts the food temperature for the last time period J. Constraints (9y)-(9aa) control the rebound behavior such that the rebound finishes when the temperature is below the baseline temperature.Note that M is a sufficiently big positive constant such that the food temperature is allowed to deviate from the baseline.Also, they ensure that the rebound happens right after up-regulation.Lastly, (9ab) ensures that up-regulation happens first.This makes sense since it impossible (or at least difficult) to anticipate potential up-regulation events in the power system.As such, it does not make sense to pre-cool (or pre-heat) a TCL in the context of mFRR.

Figure 2 :
Figure 2: Validation of the state-space model in (1).Left: auto-correlation function (acf) of the residuals.Right: cumulated periodogram of the residuals.

Figure 4 :
Figure 4: Decision-making timeline and variables for the TCL when providing flexibility either in the form of mFRR services (green boxes) or load shifting (blue box).

Figure 7 :
Figure 7: Example of provision in a representative day (an in-sample scenario).Top: Reservation capacities and baseline power of the freezer.Upper middle: Air and food temperature dynamics.Lower middle: mFRR activation in this specific scenario, i.e., when λ bid h ď λ b h ´λs h , λ b h ą λ s h , and p r,Ò h ą 0. Bottom: Spot and balancing market price as well as regulating power bids in this specific scenario.17

Figure 8 :
Figure 8: Total cost day for supermarket freezer using the mFRR model in (4) with 2021 data and the ADMM solution strategy described in Section 3.5 and for a different number of scenarios used from 2021.

Table 2 :
Data availability for each