Flexibility Control in Autonomous Demand Response by Optimal Power Tracking

: In the regime of incentive-based autonomous demand response, time dependent prices are typically used to serve as signals from a system operator to consumers. However, this approach has been shown to be problematic from various perspectives. We clarify these shortcomings in a geometric way and thereby motivate the use of power signals instead of price signals. The main contribution of this paper consists of demonstrating in a standard setting that power tracking signals can control ﬂexibilities more efﬁciently than real-time price signals. For comparison by simulation, German renewable energy production and German standard load proﬁles are used for daily production and demand proﬁles, respectively. As for ﬂexibility, an energy storage system with realistic efﬁciencies is considered. Most critically, the new approach is able to induce consumptions on the demand side that real-time pricing is unable to induce. Moreover, the pricing approach is outperformed with regards to imbalance energy, peak consumption, storage variation, and storage losses without the need for additional communication or computation efforts. It is further shown that the advantages of the optimal power tracking approach compared to the pricing approach increase with the extent of the ﬂexibility. The results indicate that autonomous ﬂexibility control by optimal power tracking is able to integrate renewable energy production efﬁciently, has additional beneﬁts, and the potential for enhancements. The latter include data uncertainties, systems of ﬂexibilities, and economic implementation.


Introduction
The main goal of an electrical energy system is to maintain a productive and stable operation, i.e., to match production and consumption by controlling flexibilities efficiently. We define a flexibility as the feasibility to change the power profile over a certain time range. Historically, to a great extent, flexibilities were available on the production side. The growing share of renewable energy sources (RES) is leading to a reduction in those, putting the question of how to control flexibilities on the demand side into focus. Demand side flexibilities offer the possibility of changing consumption to deviate from demand, including time-shifting, peak-shaving, and load-leveling potentials. For an example of a current production side flexibility analysis, we refer to [1], who investigated the value of operating nuclear power plants more flexibly in view of system security after the loss of a production unit.
A possible way to control demand side flexibilities is to incentivize such changes via demand response (DR) programs. For recent comprehensive reviews of DR, we refer to [2][3][4]. Here, we give a short overview of DR approaches that relate to the method proposed here. the other level, optimizes the operational costs of participating in energy and frequency markets. Though this approach is eventually price-based, it does not lead to marginal load trajectories as regulation capacities are needed for participation in the frequency market.
In centralized DR frameworks like [30,31], a central intelligence system uses information about the current state of every consumer's devices and demand, computes an optimal matching, and finally operates the consumers' flexibilities according to the optimal plan. However, privacy and scalability problems emerge in centralized DR approaches.
Non-price-based DR approaches were also applied by Wang et al. [32], who formulated an electrical load tracking problem that includes power generation and consumption as flexibilities. Hindi et al. [33] propose a framework for reducing energy imbalances in the grid by jointly controlling the supply side and the demand side. They designed a model predictive controller for tracking a time-varying reference signal. The control scheme results in a quadratic program, uses knowledge of the plant model and feedback information from the demand side, and thus, is not autonomous. Logenthiran et al. [34] use a desired load curve to control shiftable loads in an RTP DR program. The desired load curve is chosen in a way to be inversely proportional to electricity market prices. Callaway [35] uses power tracking in a thermal control setting to mitigate RES power fluctuations. However, the control is used to produce short-time scale responses of one hour or less.
The difficulties of RTP in autonomous DR and the successful application of other signals and tracking in non-autonomous DR settings motivates the idea of also using different signals and tracking in the setting of autonomous DR. We consider an ESS as the consumer's flexibility and propose to use a production power signal to circumvent the non-linear bilevel optimization of autonomous RTP. Each consumer's ESS should track the production power signal as closely as possible in the L1-norm (sum of absolute values). We term this approach optimal power tracking (OPT) and reason it in the following way: A flexibility defines a set of power profiles that are made feasible by the flexibility. We call this set the flexibility region of the ESS. Cost optimization according to a given price signal is a linear program (LP) and thus results in a consumption profile that lies at the boundary of the flexibility region.The interior of the flexibility region is never occupied by cost optimal solutions. This fact is reflected by the observation that multiples of a price signal lead to the same optimal consumption. Thus, price signals cannot parameterize the complete feasibility region. RTP is therefore inefficient for matching consumption to a given production because it typically does not lead to a consumption that matches production best. By design, OPT overcomes the boundary restriction and uses the entire flexibility region. With OPT, consumption profiles are inducible, which are not inducible by means of RTP. In its L1-norm (sum of absolute values) formulation, OPT is a non-linear optimization problem. It can, however, be reformulated as an LP.
On the basis of this reasoning, we hypothesize that: OPT can control demand side flexibilities more efficiently than RTP.
In order to test this hypothesis, we compare the two algorithms over one year regarding the indicators imbalance energy (measured as L1-distance to production), peak consumption, storage variation and storage losses.
In summary, previous studies have already successfully applied the tracking of power signals in the realm of DR. However, they typically did not question prices as an incentive signal. To the best of the authors' knowledge, this paper is the first to investigate the use of power signals from a system operator to consumers in an autonomous DR setting. Furthermore, a quantitative comparison of OPT with RTP in the same DR setting regarding multiple indicators has been missing in the literature. Thus, the main objective of this study is to provide a fair comparison of OPT and RTP for the control of autonomous flexibilities concerning cost and stability indicators, computational effort and extensibility.
The rest of the paper is organized as follows: In Section 2, we formalize the consumer's optimization problems RTP and OPT using a simple electrical energy system model and illustrate the corresponding solution structures in a simplified 2D model. We specify the production, price and demand data, and give the parameter configuration for comparison. In Section 3, the resulting indicator values of RTP and OPT are given for different ESS capacities. Section 4 concludes the paper with a discussion of the findings and suggestions for next steps.

Materials and Methods
In this section, we model a simple but typical DR setting. Both optimization approaches, RTP and OPT, are presented in detail. They aim to control the consumer's flexibility in order to match consumption to a given production without changing the consumers known demand. Note that in this setting the consumer does not experience any discomfort as the demand side flexibility only consists of the ESS and no customer behavior, represented by the given demand profile, is changed. We illustrate the flexibility and the optimization approaches to gain an understanding of their (dis-)advantages. Finally, we state the simulation settings that were used for the quantitative comparisons of RTP with OPT.

Energy System Model
For the sake of simplicity and interpretability, we consider an electric utility with only one consumer whose data are known deterministically. Our electrical energy system model is depicted in Figure 1, and a list of the symbols and units used is given in Table 1 at the end of this section. Its main characteristics correspond to the model used by van de Ven et al. [36]. Time is measured in h, power in kW, energy in kWh, and costs in EUR. Without loss of generality, we use a unit time step ∆t = 1 h. Consumption is optimized over one day, i.e., over N = 24 periods. The initial and end time points of the periods are 0, ∆t, . . . , N∆t. Periods are indexed by their initial time points t ∈ T = {0, ∆t, . . . , (N − 1)∆t}. The initial state of charge (SOC) of the ESS for the time point t = 0 is given as S 0 . Power values are constant over each period. The utility has an ex ante known production profile p = (p t ) t∈T . Likewise, the consumer faces a known demand profile d = (d t ) t∈T over the same day. The ESS of the consumer has efficiency factors η in and η out for charging and discharging, respectively. Before the day starts, the utility sends a signal σ = (σ t ) t∈T to the consumer, which in turn is used by the consumer to determine the following optimal power profiles: Storage discharging power s out = (s out t ) t∈T . The efficiency factors, the initial SOC, and the charging and discharging powers determine the SOC S t at the period ends t = ∆t, . . . , N∆t. The consumption schedule of a day is given by the power profiles (c, c dir , s in , s out ). A consumption schedule is restricted by the following constraints: • Lower and upper bounds for c t , c dir t , s in t , and s out t for all periods t ∈ T: • Power conservation at the junctions for all periods t ∈ T: • Lower and upper bounds for the SOC for all periods t = ∆t, . . . , N∆t: • Fixed SOC S end at the end of the day: • In order to prevent charging and discharging at the same time, binary variables β in t and β out t are introduced to formulate the constraints: for each period t = ∆t, . . . , N∆t. Compared with the real situation, this model does not consider uncertainties in production, in the initial SOC, in the efficiency factors of the ESS, and in consumer demand. Nevertheless, the model is appropriate and sufficient for gaining a deeper understanding of the implications of flexibility control via price and power signals.
The symbols and units used for the energy system model are summarized in Table 1. production during period t kW σ t signal value during period t kW for OPT EUR/kWh for RTP π t price during period t EUR/kWh c t consumption during period t kW c min , c max minimum resp. maximum consumption kW c dir t direct consumption during period t kW c dir min , c dir max minimum resp. maximum direct consumption kW η in efficiency factor for charging η out efficiency factor for discharging s in t storage charging power during period t kW s out t storage discharging power during period t kW s in min , s in max min. resp. max. storage charging power kW s out min , s out max min. resp. max. storage discharging power kW

Real-Time Pricing
In the RTP regime, a price signal σ = π with units EUR/kWh is sent by the electric utility, as the system operator, to the consumer's controller. The controller solves: subject to all constraints (1) to (11). The decision variables of this LP are comprised of the consumer schedule (c, c dir , s in , s out ) and the auxiliary binary variables β in = (β in t ) t∈T and β out = (β out t ) t∈T . Typically, spot market prices are positively correlated with energy production. With such price signals, cost minimization leads to consumption profiles that correlate negatively with production. For peak shaving, this effect is desirable, as can be seen for example in the work of Widergren et al. [37]. In this paper, however, the objective is to match consumption with production. Therefore, we use pseudo-prices that perfectly anticorrelate with production. More precisely, our price signal π is derived from the production p by first standardizing p to zero mean and unit standard deviation, then multiplying it with −1, and finally subtracting its minimum value, such that π ≥ 0.
An LP can be visualized in the space of the decision variables by the price vector π and the feasibility region. The feasibility region of the cost minimization problem (12) determines the flexibility region that we introduced in Section 1. In the energy system model above, we consider various power profiles of production, demand and consumption over one day, which are constant during each time period. In this setting, a power profile is a vector in R n . As a depictable example for a flexibility region, we now consider only two hours together with a lossless ESS of a capacity of 5 kWh, an initial SOC of 0 kWh and a maximum charging power 5 kW. The final SOC S 2 is not fixed. In this setting, for the sake of illustrating it in two dimensions, direct consumption is made possible by enabling concurrent charging and discharging, i.e., by dropping the constraints (10) to (11). The complete consumption c = (c 0 , c 1 ) flows into the ESS, and the given demand d = (1, 3) is  Figure 2 shows the corresponding flexibility region as a convex set in R 2 .  More specifically, the LP solver always returns a vertex of the flexibility region. The interior of the flexibility region is unreachable by RTP. This leads to the question of how one can induce an inner point as the consumption resulting from autonomous optimization. Our approach to this problem consists of sending a power tracking signal to the household and is detailed in the next subsection.

Optimal Power Tracking
In the OPT regime, the system operator, e.g., the electric utility, estimates the daily aggregate demand energy of the household and runs a production profile p whose aggregate energy equals the estimated aggregate demand energy of the household and is otherwise beneficial for the utility. This power profile is sent as signal σ = p to the household whose device solves the L1-norm, non-linear optimization tracking problem: subject to all constraints (1) to (11). Again, the decision variables are comprised of the consumer schedule (c, c dir , s in , s out ) and the auxiliary binary variables β in and β out . Figure 3 shows that with OPT, interior points of the consumer's flexibility region can be induced as consumptions. If the tracking signal p lies outside the flexibility region, then the OPT solution lies at the boundary, but it need not be a vertex as in the RTP regime.
The optimization problem (13) corresponds to minimizing the L1-norm of the difference vector p − c and is thus non-linear. It can, however, be reformulated as the LP: with the additional constraints −a t ≤ p t − c t ≤ a t using the auxiliary variables a t ≥ 0 for all times t ∈ T.  The L1-norm of (p − c)∆t can be interpreted economically as the amount of energy and thus money needed to balance the daily mismatch between production and consumption. For this reason, we use the L1-norm. Alternative norms like the L2-norm (Euclidean norm) are, however, also capable of inducing interior points as consumption profiles and can be argued to have their advantages.
We used the following simulation settings to calculate four important indicators and thereby test the hypothesis stated in the introduction.

Simulation Settings
To simulate complete renewable energy production, the total solar and wind generation of 2018 in Germany [38] is scaled to the production profiles of our model. The 2018 standard load profiles of the Stromnetz Berlin [39] are rescaled to an aggregate yearly household demand of 1000 kWh before using them for the demand profiles. The energy of each daily production profile equals the corresponding aggregate demand energy. Both efficiency factors of the ESS are set to η in = η out = 0.95. Its capacity is varied to reflect different storage settings: S max = 0, 0.25, 0.5, 1, 2, 4, 6, 8, and 10 kWh. All lower bounds in the electrical consumption model are chosen to be zero: c min = c dir min = s in min = s out min = 0 kW. The following upper bounds are used: c max = c dir max = 35 kW, s in max = s out max = C · S max kW with a battery C-rate of C = 1 2h . The initial and final SOC values are both set to the respective mean capacity: S 0 = S end = 0.5 · S max , in order to have a continuous SOC-transition between days.

Results
The LPs were solved in Python using the Gurobi Optimizer [40]. To compare the effects of RTP and OPT over a complete year, the following indicators were computed for each day: • Defined as the sum of absolute differences between production and consumption, the distance to production (D2P) measures the amount of imbalance energy and is thereby relevant for the costs of the electric utility: • Defined as the maximum consumption, peak consumption (PC) is relevant for the stability of transmission and distribution networks: • Defined as the sum of absolute consumption changes, storage variation (SV) is relevant for the lifetime of the ESS, and thus, for the consumer's costs: • Defined as the energy loss of the ESS, storage loss (SL) is also relevant for the consumer's costs, and is an important indicator for energy efficiency: When the consumer does not operate an ESS, consumption coincides with demand. These consumption profiles served as benchmarks for D2P and PC. Figure 4 shows histograms of the indicator values for S max = 2.0.
To compare the effects of RTP and OPT over a complete year, the following indicators were computed for each day: • Defined as the sum of absolute differences between production and consumption, distance to production (D2P) measures the amount of imbalance energy and is thereby relevant for the costs of the electric utility: • Defined as the maximum consumption, peak consumption (PC) is relevant for the stability of transmission and distribution networks: • Defined as the sum of absolute consumption changes, storage variation (SV) is relevant for the lifetime of the ESS, and, thus, for the consumer's costs: • Defined as the energy loss of the ESS, storage loss (SL) is also relevant for the consumer's costs, and is an important indicator for energy efficiency: When the consumer does not operate an ESS, consumption coincides with demand. These consumption profiles served as benchmarks for D2P and PC. Figure 4 shows histograms of the indicator values for S max = 2.0.  The objective of OPT is the minimization of D2P. Therefore, it is not surprising that OPT can decrease D2P to almost zero kWh. The D2P values of RTP, however, are even higher than the benchmark of no flexibility. This is partly due to the non-optimal price signal used. But even with a bilevel-optimized price signal, RTP could have only induced boundary The objective of OPT is the minimization of D2P. Therefore, it is not surprising that OPT can decrease D2P to almost zero kWh. The D2P values of RTP, however, are even higher than the benchmark of no flexibility. This is partly due to the non-optimal price signal used. However, even with a bilevel-optimized price signal, RTP could have only induced boundary points of the consumer's flexibility region. Thus, in all cases where the given production lies inside this region, there exists no price signal that could induce this production, whereas OPT will always induce a perfectly matching consumption.
The results for SV and SL are related because higher storage usage leads to higher losses. Both results show significantly better values for OPT compared to RTP. This is because the production signals that OPT tries to follow have less variation than the RTP optimal consumption, which accumulate at times of low prices.
The PC values are not significantly altered by OPT compared to the benchmark. The PC values of RTP optimal consumption, on the other hand, are more than five times higher. This adverse effect of RTP occurs for the same reasons as described before for all kinds of prices, regardless of whether they are bilevel-optimized. Figure 5 gives the mean and standard deviation values of all indicators for different ESS capacities.
10 of 14 inside this region, there exists no price signal that could induce this production, whereas OPT will always induce a perfectly matching consumption.
The results for SV and SL are related because higher storage usage leads to higher losses. Both results show significantly better values for OPT compared to RTP. This is because the production signals that OPT tries to follow have less variation than the RTP optimal consumptions, which accumulate at times of low prices.
The PC values are not significantly altered by OPT compared to the benchmark. The PC values of RTP optimal consumptions, on the other hand, are more than 5 times higher. This adverse effect of RTP occurs for the same reasons as described before for all kinds of prices, no matter if they are bilevel-optimized or not. Figure 5 gives the mean and standard deviation values of all indicators for different ESS capacities. For all capacities greater than 1 kWh, RTP results in adverse indicator values compared to the benchmark and OPT. With increasing capacities, the discrepancies between RTP on the one hand and OPT and the benchmark on the other hand increase.
All RTP indicators increase with ESS capacity until they stop at some saturation values. The saturation of RTP is due to the finite aggregate demand. All OPT indicators saturate earlier and at lower, more favorable values. The saturation of OPT is due to the fact that a higher capacity corresponds to a larger flexibility region which is of no additional use if the production is already feasible, i.e., inside the flexibility region. This effect can be seen best in Figure 5a, where D2P starts to vanish from S max = 2 kWh on.
As mentioned in section 2, no uncertainties were considered, and all data was assumed to be known perfectly in advance. The results of the deterministic RTP and OPT optimizations are thus only approximatively realistic. However, it follows that consump- For all capacities greater than 1 kWh, RTP results in adverse indicator values compared to the benchmark and OPT. With increasing capacities, the discrepancies between RTP on the one hand and OPT and the benchmark on the other hand increase.
All RTP indicators increase with ESS capacity until they stop at some saturation values. The saturation of RTP is due to the finite aggregate demand. All OPT indicators saturate earlier and at lower more favorable values. The saturation of OPT is due to the fact that a higher capacity corresponds to a larger flexibility region which is of no additional use if the production is already feasible, i.e., inside the flexibility region. This effect can be seen best in Figure 5a, where D2P starts to vanish from S max = 2 kWh on.
As mentioned in Section 2, no uncertainties were considered, and all data were assumed to be perfectly known in advance. The results of the deterministic RTP and OPT optimizations are thus only approximately realistic. However, it follows that consumptions that are induced by OPT and lie inside the flexibility region are more robust against uncertainties in demand and initial SOC than the vertex solutions of RTP.
Although the L1-norm of the OPT approach can be interpreted as balancing energy, since it is cost-relevant for the electric utility, the OPT approach does not necessarily have a straightforward economic implication for the consumer. Instead of directly transferring balancing energy costs to the consumer, the consumer could be rewarded by a reduced tariff for allowing the system operator to control the ESS via OPT.

Conclusions
In this paper, we analyzed the shortcomings of price signals in autonomous DR and inferred dropping prices as a means to indirectly induce consumption changes. We suggest, instead, to directly use the desired power profile as a signal, which shall be tracked by the consumer's device. This new OPT approach is able to control the total flexibility. It can induce consumptions on the demand side that RTP cannot induce, and additionally, shows multiple system benefits.
For a comparison of OPT with RTP in a standard DR setting, German renewable energy production and German standard load profiles were used for daily production and demand profiles, respectively. The flexibility of the consumer consisted of an ESS with realistic efficiencies. Imbalance energy, peak consumption, storage variation and storage losses were analyzed for daily optimizations over a complete year under perfect information assumptions. The extent of flexibility, given by the ESS capacity, proved to be an important sensitivity parameter for the chosen indicators.
The main findings of this study are outlined below: • For the autonomous control of demand side flexibilities, OPT shows favorable characteristics for all indicators, which reflect the matching of production and consumption, the costs of the electric utility, stability of transmission and distribution networks, the consumer's costs and energy efficiency. • The RTP performance is counterproductive, even inferior compared to the benchmark case of no flexibility. Similar adverse effects of price-based DR were recently reported in [9][10][11][12]. • OPT overcomes these problems without the need for additional communication or computation efforts. The proposed approach can be implemented using the same hardware and software as for RTP. We refer to [7,8] as examples for RTP implementations using embedded systems. • The advantages of OPT compared to RTP increase with the extent of the flexibility. The maximal potential of OPT occurs at storage capacities where the flexibility region encompasses the production profile. The adverse characteristics of RTP keep increasing with storage capacity until the consumer specific constraints stop them.
This paper presents a proof of concept for the new OPT approach in autonomous DR. Some limitations should be noted, and several suggestions for enhancements and future studies can be stated: We did not use bilevel-optimized prices for the comparison of RTP to OPT because the optimistic assumption of bilevel optimization has recently been shown to be questionable [17]. Furthermore, even bilevel-optimized prices are not able to induce inner points of the consumer's flexibility region. Nevertheless, a quantitative comparison to bilevel-optimal prices would be interesting.
Although the results under deterministic assumptions show that OPT outperforms the RTP approach with regards to all indicators, this remains to be tested in a more realistic setting including uncertainties. In a setting with partly stochastic boundaries of the flexibility region, one could increase the robustness of the OPT-optimized consumption schedule by including penalty terms in the objective function that maximize the distance to uncertain boundaries.
Another enhancement of the OPT approach could be to use model predictive control strategies that take into account, e.g., weather forecasts and occupant behavior. Especially for specific applications or systems like buildings and electric vehicle fleets that comprise several components and flexibilities, this could improve performance.
With time-dependent penalty coefficients, the OPT algorithm could be extended to stress times where the matching between consumption and power signal is reinforced or attenuated.
When more than one flexibility is controlled with OPT and the aggregate consumption is matched to a given production, the OPT approach is scalable in different ways to full system sizes. We give two ideas in this regard: • The same signal is sent out to all consumers' controllers. Each controller rescales the received power signal to the total daily household demand. • If the flexibilities and demands of consumers can be estimated, individual tracking signals can be used, which can be better matched by the consumers' controllers.
The OPT approach can be readily generalized to settings that include other flexibilities like thermal storages, shiftable or scalable loads, occupant comfort ranges, and electric vehicles. Aggregations of these flexibilities, e.g., in buildings and distribution grids, can be handled by considering the Minkowski sum of the individual flexibilities, cf. [41,42].
This study did not compare RTP with OPT in monetary terms but used technical indicators only. In addition to savings in balancing energy, with OPT the system operator faces increased freedom in specifying the production profile. Cheaper purchases, power grid-friendly loads and increased integration of RES lead to competitive advantages, parts of which could be passed to the consumer via a cheaper tariff. The monetary quantification of these multiple benefits in specific settings should be considered in future studies.

Funding:
The financial support by the Austrian Federal Ministry for Digital and Economic Affairs and the National Foundation for Research, Technology and Development and the Christian Doppler Research Association is gratefully acknowledged. The project was also partly funded by the federal state of Vorarlberg (Austria) and the "European Regional Developement Fund". The financial support of the illwerke vkw Endowed Professorship for Energy Efficiency at FHV is greatly acknowledged.
Institutional Review Board Statement: Not applicable.

Informed Consent Statement: Not applicable.
Data Availability Statement: The used data sources are referenced in Section 2.4.

Conflicts of Interest:
The authors declare no conflict of interest.

Abbreviations
The following abbreviations are used in this manuscript: DR demand response RES renewable energy sources ESS energy storage system RTP real-time pricing LP linear program, linear optimization problem OPT optimal power tracking D2P distance to production PC peak consumption SV storage variation SL storage loss SOC state of charge L1-norm sum of absolute values, ∑ n i=1 |x i | for x ∈ R n L2-norm Euclidean norm, ∑ n i=1 |x i | 2 for x ∈ R n