1 Introduction

The increasing number of flexible loads in the power system, such as “smart” appliances and electric vehicles, will give customers the possibility to partially schedule their power consumption and have an active role in the management of the network. The impact and potential advantages of this development have been widely investigated [1, 27, 29], showing how private customers could reduce the cost of their electricity bill with a minimum impact on their comfort. At the same time, the power system would be able to achieve an improved reliability, lower energy prices and a more efficient utilization of the existing infrastructure.

The study of flexible demand integration in the electricity market considers real-time pricing tariffs, as described, for example, in [30]: a price signal is broadcast to the devices which independently determine their power consumption and operate during the hours of the day with lower electricity prices. Real-time pricing schemes are considered a promising solution to crucial issues emerging in power systems, such as increased variability and uncertainty from renewable generation and modified consumption patterns from electrification of transportation and heating. These elements have been discussed and brought to the attention of regulators by a substantial number of papers and reports, such as [3, 14, 15]. As a result, after several experimental testbeds, real-time pricing is starting to be implemented in areas with large penetration of renewables and electric vehicles [4] and further diffusion is expected in the near future. In this context, the presented analysis establishes whether real-time pricing can lead to stable market configurations or additional control actions are required to ensure safe and reliable system operation.

In the implementation of real-time pricing tariffs, it is necessary to consider the global effect of the appliances power scheduling on aggregate demand and electricity prices. For example, if all devices operate when energy is expected to be cheaper, demand will increase at those times, leading to higher prices and therefore suboptimality of their initial operation strategies. Centralized approaches tackle this problem by considering a global optimization which is solved by the market operator on the basis of the data provided by generators and consumers, as proposed in [25, 28]. Given the complexity of this problem for high number of appliances, privacy concerns and the traditional tendency of customers to have full control of their energy consumption, distributed mechanisms have also been analysed. The feasibility of this kind of strategies is investigated in [31] which considers the interactions between the system operator and the appliances as a closed-loop model and studies its stability. A wide array of different approaches have been proposed for the distributed management of flexible demand, including stochastic optimization [6] adaptive strategies [11] and Lagrangian relaxation [23].

Game theory has also been extensively applied to the problem of flexible demand deployment, as it naturally captures the conflicting interactions between the single devices that compete for power consumption at the cheapest hours of the day. For example, [19] characterizes the power consumption of the flexible loads as their best response to certain loads and tariffs. This concept is extended in [21], which proposes participation incentives, and in [26], which considers a larger time horizon in order to guarantee fairness for the devices and achieve better global results. Many iterative price-based schemes have been proposed for distributed coordination of price-responsive devices, in particular for large fleets of electric vehicles. For instance, [18] calculates, by taking into account the mean behaviour of the population, a charge profile of the vehicles which corresponds to a Nash equilibrium and is also globally optimal when the agents are identical. A similar approach is presented in [13], where an iterative procedure converges to a stable solution by penalizing variations of the vehicles’ strategies from the previous iterations.

This paper also adopts a game theory framework and extends the preliminary study in [8], presenting more rigorous theoretical proofs and additional results on equilibrium optimality and partial flexibility of the appliances. A fully distributed scheme is considered, modelling the appliances as competing players of a differential game. Each appliance independently schedules its power consumption in order to complete its assigned task at minimum cost, on the basis of a demand/price signal broadcast by some central entity. Efficient integration of the devices in the electricity market is characterized as a Nash equilibrium, with all appliances having no unilateral interest in changing their operation strategy, formulated on the basis of the broadcast signal, when the energy price of the resulting aggregate demand profile is considered. To simplify the equilibrium analysis and the design of the broadcast signal, the appliances population is described as a continuum, assuming that the impact of the single device on total demand and electricity price is negligible and only the global behaviour of the devices population needs to be considered in such sense. Similar approaches have been previously applied in power systems contexts, studying large-scale market interactions [16], frequency control provision by thermostatic loads [2], coordination of electric vehicles [7] and energy arbitrage with micro-storage devices [9]. The main novelty of the present work is that the dynamic behaviour of the appliances is implicitly modelled by exploiting intrinsic properties of the problem (monotonicity of electricity price and unidirectionality of power exchanges). Consequently, the equilibrium analysis does not involve partial differential equations and can be performed by focusing on the sublevel sets of the different demand profiles. This allows to derive necessary and sufficient equilibrium conditions, determining in which scenarios a fully distributed control strategy can successfully coordinate the appliances. Such conditions take into account the types of flexible devices, their penetration in the system and the impact of the other inflexible loads in the grid.

With respect to previous works on the subject [13, 18], the proposed coordination strategy does not require additional quadratic terms in the cost function of the appliances. Moreover, it achieves a stable configuration through the broadcast of a single demand/price signal, avoiding iterated broadcasts by the system operator and repeated power updates by the flexible loads.

To achieve these results, a power density of task durations is calculated from the distribution of the devices parameter (task time and required energy), describing the valley-filling capability of the population. Similarly, the inflexible demand profile is characterized by the negotiable valley capacity, a function that is related to the measure of its different sublevel sets and quantifies the amount of flexible demand that can be allocated while preserving an equilibrium. By comparing these two functions, it is possible to verify whether an equilibrium exists and show that, if this is the case, it can be achieved by simply broadcasting the price of inflexible demand. The analysis not only determines the scenarios in which a fully distributed control strategy can be successfully implemented, but it also provides the theoretical tools required to design additional control actions in the other cases. For instance, the presented theoretical study is extended in [10], showing that a stable solution can always be obtained by introducing a time-varying constraint on the power rate of the devices. In the second part of this paper, the properties of the Nash equilibrium are analysed, showing that it is always socially efficient and deriving conditions for its Pareto optimality. A preliminary analysis on devices with partial flexibility is also carried out, and the proposed distributed scheme is evaluated in simulations, considering a future scenario of the UK power grid with large penetration of flexible appliances.

The rest of the paper is structured as follows: Sect. 2 models the flexible appliances and the electricity market, while Sect. 3 describes the coordination problem as a differential game, introducing the distributed scheme proposed for appliances coordination. The theoretical analysis on the sublevel sets of the demand profiles is performed in Sect. 4, calculating the power scheduling of the devices as their best response to a broadcast demand/price signal. The necessary and sufficient conditions for equilibrium are derived in Sect. 5, evaluating its optimality properties in Sect. 6. After the qualitative discussions of Sect. 7 and a preliminary analysis of devices with partial time availability in Sect. 8, simulative results are presented in Sect. 9.

2 Modelling of Flexible Demand and Electricity Market

To describe the distributed control strategy proposed in the present work, we first analyse the involved components of the power system, clarifying the main assumptions and modelling choices required to incorporate them in a unified framework.

2.1 Flexible Price-Responsive Appliances

We consider electrical appliances that complete an assigned task by scheduling their power consumption over a certain time horizon [0, T].

Assumption 1

All flexible devices fulfil the following properties:

  • Total flexibility: they can operate and consume power at any time \(t\in [0,T]\).

  • Interruptibility: they can arbitrarily stop and resume their power consumption.

Under Assumption 1, each device can be fully described by two quantities: the total energy E required to complete its task and the minimum task time \(\tau \) (achieved operating at rated power \(P=E/\tau \)). The appliances are assumed to be price-responsive and to behave rationally. Each appliance, having received from the system operator a certain demand profile \(D(\cdot )\) (or the corresponding energy price \(\Pi (D(\cdot ))\), schedules its power consumption u in order to complete its task at minimum cost:

$$\begin{aligned} \begin{array}{rl} \displaystyle \min _{u(\cdot )} &{}\quad \displaystyle \int _{0}^{T}\Pi (D(t)) \cdot u(t) \, \mathrm{d}t \\ \text {s.t.} &{}\quad \displaystyle 0 \le u(t) \le \frac{E}{\tau } \\ &{}\quad \displaystyle \int _0^T u(t) \, \mathrm{d}t = E. \end{array} \end{aligned}$$
(1)

We denote by \(u(\cdot )=u_D^*(\cdot ,\tau ,E)\) the solution of (1) when the demand signal D is broadcast and the parameters \(\tau \) and E are considered. Existence and uniqueness of \(u_D^*\) will be discussed in subsequent sections.

For a global description of flexible demand, we preliminarily denote by \(\mathscr {T}\) and \(\mathscr {E}\) the sets of distinct values within the appliances population for the time and energy parameters \(\tau \) and E, respectively. The whole set of flexible appliances can be characterized by the unnormalized distribution \(m(\tau ,E)\), where \(\int _{\tau _1}^{\tau _2} \int _{E_1}^{E_2}m(\tau ,E) \,\mathrm{d}E \, d\tau \) denotes the number of devices for which \(E_1 \le E \le E_2\) and \({\tau _1 \le \tau \le \tau _2}\). The properties of the appliances population are abstracted by the associated energy density \(f:\mathscr {T}\rightarrow \mathbb {R}^+\):

$$\begin{aligned} f(\tau ):=\int _{\mathscr {E}} E \cdot m(\tau ,E) \,\mathrm{d}E \end{aligned}$$
(2)

where \(f(\tau )\) quantifies the total energy required by appliances with parameter \(\tau \) to complete their tasks. This means that its support corresponds to the set \(\mathscr {T}\) of distinct minimum task times \(\tau \) of the appliances population. An additional hypothesis, related to the number of devices and their parameters, is introduced:

Assumption 2

The energy density f is a well-defined and bounded function.

This means that in our study the number of flexible appliances is sufficiently high and their time parameters \(\tau \) are adequately diversified to be described as a continuum. For example, if all devices had equal \(\tau =\hat{\tau }\), the density f would correspond to a Dirac delta centred in \(\hat{\tau }\), thus violating Assumption 2. To simplify our analysis, without loss of generality, we consider the following expression for the support of f:

$$\begin{aligned} {{\mathrm{supp}}}(f)= \mathscr {T} = [q_{\text {min}},q_{\text {max}}] \subseteq (0,T]. \end{aligned}$$
(3)

It is now possible to calculate the total variation of power demand \(D_{f,D}\) which is introduced by the appliances. In this context, we remind that \(u_D^*(\cdot ,\tau ,E)\) represents the scheduled power consumption of a single device with parameters \(\tau \) and E when D is broadcast. To calculate \(D_{f,D}\), it is sufficient to take the weighted integral of \(u_D^*\) over the energy and time parameters:

$$\begin{aligned} D_{f,D}(t)= \int _{\mathscr {T}} \int _{\mathscr {E}} u_D^*(t,\tau ,E) m(\tau ,E) \, \mathrm{d}E \, \mathrm{d}\tau . \end{aligned}$$
(4)
Fig. 1
figure 1

Distributed control scheme for coordination of flexible appliances

2.2 Electricity Market and Inflexible Loads

The electricity market has been abstracted by the monotonically increasing function \(\Pi :[0,+\infty ) \rightarrow [0,+\infty )\) which associates, to a certain value of aggregate power demand \(D_a(t)\), the corresponding energy price \(p(t)=\Pi (D_a(t))\). The aggregate demand \(D_{a,D}(t)\) (resulting from the broadcast of the signal D) is given by two different components. These are the inflexible demand \(D_i\), caused by the other loads in the system, and the contribution \(D_{f,D}\) of the flexible appliances, defined in (4):

$$\begin{aligned} D_{a,D}(t)=D_i(t)+D_{f,D}(t) = D_i(t)+ \int _{\mathscr {T}} \int _{\mathscr {E}} u_D^*(t,\tau ,E) m(\tau ,E) \, \mathrm{d}E \, \mathrm{d}\tau . \end{aligned}$$
(5)

The inflexible demand \(D_i\) (assumed to be known a priori) is considered price-inelastic, i.e. the power consumption profile of each inflexible load is fixed and it is not impacted by electricity prices.

3 Distributed Control and Nash Equilibria

The proposed scheme for the management and coordination of the appliances consists of four distinct steps, associated in Fig. 1 with the corresponding interactions between the different entities:

  • Step 1 Ahead of the considered time interval, the system operator receives information on the flexible devices population (energy density f) and on the inflexible loads (inflexible demand \(D_i\)).

  • Step 2 Using the data collected at the previous step, the system operator broadcasts to the appliances a demand signal D (or the equivalent price \(\Pi (D)\)).

  • Step 3 On the basis of the received demand/price signal, the flexible appliances schedule their power consumption by solving (1), aiming at completing their tasks at minimum energy cost. Their resulting total power consumption is equal to \(D_{f,D}\).

  • Step 4 The actual electricity price paid by the flexible appliances, impacted by the flexible demand \(D_{f,D}\), is equal to \(\Pi (D_{a,D})\).

Note that the proposed control scheme is distributed, as the power consumption of the appliances is not determined by a central entity, but it is instead independently chosen by each device on the basis of a broadcast demand/price signal.

The problem of designing the broadcast signal D is approached in a game theory context, considering a differential game with the following elements:

  • Players The individual flexible appliances, whose state is described by the variable x(t). Such quantity corresponds to the total energy absorbed in the time interval [0, t]. If u(t) denotes the power consumed by a single device/player at time t, it holds:

    $$\begin{aligned} x(0)=0 \qquad \dot{x}(t)=u. \end{aligned}$$

    Since the total energy required for task completion by the individual device equals E, the following terminal state constraint needs to be considered:

    $$\begin{aligned} x(T)=E. \end{aligned}$$
  • Strategies Each appliance schedules a feasible power profile \(u:[0,T]\rightarrow \mathbb {R}^+\) which allows completion of its assigned task. For an appliance with parameters E and \(\tau \), it must hold:

    $$\begin{aligned} \int _{0}^{T} u(t)\,\mathrm{d}t= E \qquad 0\le u(t) \le \frac{E}{\tau }\quad \forall t\in [0,T]. \end{aligned}$$

    The power scheduling is performed before the considered time interval [0, T], and each device determines \(u(\cdot )\) by solving (1) on the basis of the broadcast profile D and its parameters \(\tau \) and E, setting \(u(\cdot )=u_D^*(\cdot ,\tau ,E)\).

  • Objective function Minimization of the energy cost C sustained by the individual device to complete its task:

    $$\begin{aligned} C=\int _{0}^T \Pi (D_{a,D}(t)) u(t) \,\mathrm{d}t. \end{aligned}$$

    The cost C is the integral over time of the scheduled power u(t) of the single device, multiplied by the electricity price \(\Pi (D_{a,D}(t))\). The latter term depends, through \(D_{f,D}\) in (5), on the aggregate strategies of the flexible appliances.

In the chosen modelling framework, with large populations of small agents, it is assumed that the impact of the single player on the global quantities of the system is negligible. Therefore, the strategy u of the individual player does not significantly impact the aggregate demand \(D_{a,D}\) and corresponding electricity price \(\Pi (D_{a,D})\), which are only affected by the global behaviour of the players population (through the flexible demand \(D_{f,D}\)). This is similar to mean field games [17], where the interactions between infinitesimal players are characterized by a unique global quantity, the so-called mean field.

Our main objective is to design the broadcast demand profile D in order to induce a Nash equilibrium for the game presented above.

Definition 1

For a certain broadcast profile D, a Nash equilibrium is achieved if each appliance has no unilateral interest in changing its scheduled power profile \(u(\cdot )=u_D^*(\cdot ,\tau ,E)\) when the resulting aggregate demand (and corresponding electricity price) is considered. Equivalently, the following must hold for all \(\tau \in \mathscr {T}\) and \(E\in \mathscr {E}\):

$$\begin{aligned} \begin{array}{rcl} \displaystyle \int _0^T \Pi (D_{a,D}(t)) u_D^*(t,\tau ,E) \mathrm{d}t =&{} \displaystyle \min _{u(\cdot )} &{}\quad \displaystyle \int _{0}^{T}\Pi (D_{a,D}(t))) u(t) \, \mathrm{d}t \\ &{}\text {s.t.} &{}\quad \displaystyle 0 \le u(t) \le \frac{E}{\tau } \\ &{} &{}\quad \displaystyle \int _0^T u(t) \, \mathrm{d}t = E. \end{array} \end{aligned}$$
(6)

As previously mentioned, the total demand \(D_{a,D}\) and corresponding price \(\Pi (D_{a,D})\) are only impacted by the global behaviour of the agents. Therefore, the Nash equilibrium can be expressed as a fixed point: from (6), the power scheduling \(u_D^*\) of the whole population is optimal for a certain profile of aggregate demand \(D_{a,D}\) and, at the same time, it induces that very same profile of demand (through (5)).

The Nash equilibrium is chosen as a control objective as it corresponds to an efficient operation of the power system. In fact, it ensures low energy costs for the appliances, avoids “rebound peaks” (described, for example, in [20]) and achieves consistent valley-filling, with lower generation costs and reduced stress on the grid infrastructure. These properties are formalized in Sect. 6, where it is shown that the presented notion of Nash equilibrium is always socially efficient.

4 Analysis on Sublevel Sets of Demand Profiles

In order to determine Nash equilibria conditions for the population of flexible appliances (provided in the next section), a compact representation of the power scheduling performed by the individual devices and by the whole population is preliminarily derived. Such analysis is conducted on the sublevel sets of the different demand profiles, considering the following quantity \(Q_D\):

Definition 2

For a demand signal \(D:[0,T] \rightarrow \mathbb {R}^+\), the corresponding cumulative distribution \(Q_D: [d_{\text {min}}, d_{\text {max}}] \rightarrow [0,T]\) is defined as:

$$\begin{aligned} Q_{D}(d):=\mu \left( \{t\in [0,T] : D(t) \le d \} \right) \end{aligned}$$
(7)

where \(\mu \) denotes the Lebesgue measure.

The function \(Q_D(d)\) returns, for a certain demand value d, the amount of time “spent” by the signal D at lower values of demand (equivalently price). In the context of our study, the following hypothesis is introduced:

Fig. 2
figure 2

Examples of broadcast profiles D(t) (Color figure online)

Fig. 3
figure 3

Cumulative distributions \(Q_D(D(t))\) for the broadcast demand profiles shown in Fig. 2 (Color figure online)

Assumption 3

The broadcast demand profile is a continuous function \(D:[0,T] \rightarrow [0,+\infty )\) with no level sets of positive measure. For any \(d\in {{\mathrm{Im}}}(D) = [d_{\text {min}},d_{\text {max}}]\), it must hold:

$$\begin{aligned} \mu \left( \left\{ t \in [0,T ]: D(t)=d \right\} \right) =0. \end{aligned}$$
(8)

Such assumption is not very restrictive and typically holds for real profiles of inflexible demand which will be considered in the next section to derive the equilibrium conditions. Having established in Assumption 3 that the considered broadcast profile D has no level sets of positive measure, we can infer from (7) that \(Q_{D}\) is continuous, strictly monotone increasing, has image equal to [0, T] and takes the following values at the endpoints of its domain:

$$\begin{aligned} Q_D(d_{\text {min}})=0\qquad Q_D(d_{\text {max}})=T. \end{aligned}$$
(9)

For a better understanding of the relationship between the time variable t and the corresponding measure \(Q_{D}(D(t))\), some comparisons are performed next. Examples of broadcast demand profiles are shown in Fig. 2, while Fig. 3 contains the corresponding \(Q_D (D(t))\). The blue curve \(D_1\) in Fig. 2 is a typical 24 h UK demand profile as recorded by [22], and the corresponding function \(Q_{D_1}\) in Fig. 3 shows the same monotonicity trends with values in the interval [0, 24]. The red curve \(D_2\) is an example of monotonically increasing profile to which, by definition, corresponds a linear function \(Q_{D_2}(D_2(t))=t\). The last considered curve \(D_3\) violates Assumption 3 and is constant over an interval of positive measure. This introduces discontinuities in the measure function \(Q_{D_3}\), as shown in Fig. 3.

4.1 Power Scheduling in the Measure Variable

To describe the behaviour of the flexible appliances in response to the broadcast demand signal D, it is useful to replace the time variable t with the measure \(q=Q_D(D(t))\). We denote the quantities in the new variable with a bar accent.

Definition 3

For a broadcast profile D fulfilling Assumption 3, the corresponding \(\bar{D}: [0,T] \rightarrow [0,+\infty )\) is defined as:

$$\begin{aligned} \bar{D}(q) := Q_D^{-1}(q). \end{aligned}$$
(10)

Note that \(\bar{D}(q)\) represents the demand value which determines a sublevel set of D with measure q or, alternatively, such that \(Q_D(\bar{D}(q))=q\). The correspondence with the equivalent function in time is straightforward to derive:

$$\begin{aligned} \bar{D}(Q_D(D(t)))=D(t). \end{aligned}$$

Given the definition of \(Q_D\) provided in (7), \(\bar{D}(q)\) can alternatively be interpreted as the unnormalized quantile function of the broadcast signal. It is straightforward to extend the same notation to a specific class of functions \(\rho \).

Definition 4

Consider a signal D fulfilling Assumption 3 and a function \(\rho :[0,T]\rightarrow \mathbb {R}\) verifying the following condition:

$$\begin{aligned} \rho (t_1)=\rho (t_2) \quad \forall t_1, t_2 \in [0,T]{:}~ D(t_1)=D(t_2). \end{aligned}$$
(11)

Define as \(\bar{\rho }: [0,T]\rightarrow \mathbb {R}\) the unique function which fulfils the following:

$$\begin{aligned} \bar{\rho }(Q_D(D(t))= \rho (t) \quad \forall t \in [0,T]. \end{aligned}$$

The function \(\bar{\rho }(q)\) corresponds to \(\rho (t)\) evaluated at any time t for which \(Q_{D}(D(t))=q\) and is always well defined from (11). As in the previous case, to better understand the proposed change of variable, we provide a graphical representation of the considered quantities as functions of the measure q. For each demand profile over time, shown in Fig. 2, the corresponding profile as a function of the measure q is presented in Fig. 4. For example, if one considers \(D_1(t)\), the resulting demand profile in the q variable is given by \(\bar{D}_{1}(q)= Q_{D_1}^{-1}(q)\). Analogous relationships hold between \(D_2(t)\) and \(\bar{D}_2(q)\) and between \(D_3(t)\) and \(\bar{D}_3(q)\). Note that \(\bar{D}_1(q)\) corresponds to an increasing “reordering” of the values of \(D_1(t)\), while \(\bar{D}_2(q)\) is equal to \(D_2(t)\) since the latter is increasing in time. For the profile \(D_3\), which violates Assumption 3, there exists a subset of [0, T] on which \(\bar{D}_3(q)\) is not defined. We now demonstrate a crucial relationship between functions in the time variable t and the corresponding quantities in the measure variable \(q=Q_D(D(t))\).

Fig. 4
figure 4

Representation of the broadcast signals as functions of the measure q (Color figure online)

Lemma 1

Under Assumption 3, for any integrable function \({\rho :[0,T] \rightarrow \mathbb {R}}\) fulfilling (11) and the corresponding \(\bar{\rho }\) introduced in Definition 4, the following equalities hold:

$$\begin{aligned} \int _{0}^{T} \bar{\rho }(q) \, \mathrm{d}q = \int _{0}^{T} \bar{\rho } \left( Q_{D}(D(t)) \right) \, \mathrm{d}t = \int _{0}^{T} \rho (t) \, \mathrm{d}t. \end{aligned}$$
(12)

Proof

See “Appendix A”. \(\square \)

Applying Lemma 1 with \(\rho (t)=\Pi (D(t))u(t)\), the cost minimization (1) solved by each device to schedule its power consumption can alternatively be considered in the variable q:

$$\begin{aligned} \begin{array}{cl} \displaystyle \min _{\bar{u}(\cdot )} &{}\quad \displaystyle \int _{0}^{T}\Pi (\bar{D}(q)) \cdot \bar{u}(q) \, \mathrm{d}q \\ \text {s.t. } &{}\quad \displaystyle 0 \le \bar{u}(q) \le \frac{E}{\tau } \\ &{}\quad \displaystyle \int _0^T \bar{u}(q) \, \mathrm{d}q = E. \end{array} \end{aligned}$$
(13)

Proposition 1

For a broadcast profile D that fulfils Assumption 3, the unique solution \(\bar{u}^*(q,\tau ,E)\) of the cost minimization problem (13), for a device with parameters \(\tau \) and E, has the following expression:

$$\begin{aligned} \bar{u}^*(q,\tau ,E)= \left\{ \begin{array}{lll} \displaystyle \frac{E}{\tau } &{} \text {if} &{} q \le \tau \\ 0 &{} \text {if} &{} q>\tau \end{array}\right. \end{aligned}$$
(14)

Proof

It is straightforward to verify the feasibility of \(\bar{u}^*\) for problem (13) as it fulfils both the integral and inequality constraints. To show that it is also the unique optimizer of (13) (up to congruence in the \(\ell _1\) norm), consider that the integral of a feasible \(\bar{u}\) is fixed and equal to E. Since \(\bar{u}^*\) is a bang–bang control and the price function \(\Pi \) is strictly monotone increasing, it is sufficient to note that, as a result of the monotonicity of \(Q_D\) from Assumption 3, it holds:

$$\begin{aligned} \bar{D}(q_1)< \bar{D}(q_2) \quad \forall q_1,q_2\in [0,T]{:}~q_1<q_2. \end{aligned}$$
(15)

\(\square \)

Notation-wise, it is not necessary to express with the subscript D the dependency of \(\bar{u}^*\) from the broadcast profile as such relationship is implicit through the change of variable \({q=Q_D(D(t))}\).

4.2 Characterization of Flexible and Aggregate Demand

Having calculated the scheduled power \(\bar{u}^*\), it is possible to derive the total demand variation \(\bar{D}_{f}\) introduced by the appliances population (as a function of the measure q) when D is broadcast. Taking the weighted integral of \(\bar{u}^*\) over the parameters \(\tau \in \mathscr {T}\) and \(E\in \mathscr {E}\) yields:

$$\begin{aligned} \bar{D}_{f}(q)= & {} \displaystyle \int _{\mathscr {T}} \int _{\mathscr {E}} \bar{u}^*(q,\tau ,E) m(\tau ,E) \, \mathrm{d}E \, \mathrm{d}\tau = \displaystyle \int _{q}^{T} \int _{\mathscr {E}} \frac{E}{\tau } m(\tau ,E) \, \mathrm{d}E \, \mathrm{d}\tau \nonumber \\= & {} \displaystyle \int _{q}^{T} \frac{1}{\tau } \int _{\mathscr {E}} E m(\tau ,E) \, \mathrm{d}E \, \mathrm{d}\tau = \displaystyle \int _{q}^{T} \frac{f(\tau )}{\tau }\, \mathrm{d}\tau . \end{aligned}$$
(16)

The equivalent expressions of the scheduled power profile \(u_D^*\) and resulting flexible demand \(D_{f,D}\) in the original time variable can be derived from Definition 4:

$$\begin{aligned} u_D^*(t,\tau ,E)= & {} \bar{u}^*(Q_{D}(D(t)),\tau ,E) \end{aligned}$$
(17a)
$$\begin{aligned} D_{f,D}(t)= & {} \bar{D}_f(Q_{D}(D(t))). \end{aligned}$$
(17b)

Given (14), the scheduled power consumption \(u_D^*\) can alternatively be expressed as:

$$\begin{aligned} u_D^*(t,\tau ,E)= \left\{ \begin{array}{lll} \displaystyle \frac{E}{\tau } &{}\text {if} &{} t \in \mathscr {S}_{D}(\tau ) \\ 0 &{} \text {if} &{} t \notin \mathscr {S}_{D}(\tau ) \end{array}\right. \end{aligned}$$
(18)

where the sublevel set \(\mathscr {S}_D(\tau )\) is defined as:

$$\begin{aligned} \mathscr {S}_D(\tau ):= \left\{ t \in [0,T]{:}~Q_D(D(t)) \le \tau \right\} . \end{aligned}$$
(19)

Note that, as a result of Proposition 1 and Lemma 1, the power profile \(u_D^*\) is optimal for the energy cost minimization problem (1) in the original time variable.

The corresponding aggregate demand profile \(D_{a,D}\) as a function of time t can also be calculated:

$$\begin{aligned} D_{a,D}(t)=D_i(t)+D_{f,D}(t)=D_i(t)+\bar{D}_f(Q_{D}(D(t))). \end{aligned}$$
(20)

In the particular case in which \(D=D_i\) (viz. inflexible demand is broadcast), the aggregate demand depends exclusively on the current broadcast value of demand \(d=D_i(t)\). Introducing the function K(d) and reminding that \({{\mathrm{supp}}}(f)=\mathscr {T}=[q_{\text {min}},q_{\text {max}}]\) from (3), we have:

$$\begin{aligned} D_{a,D_i}=K(d) = \left\{ \begin{array}{lll} d &{} \text {if} &{} Q_{D_i}(d)>q_{\text {max}} \\ \displaystyle d+\int _{q_{\text {min}}}^{q_{\text {max}}} \frac{f(\tau )}{\tau } \, \mathrm{d}\tau &{} \text {if} &{} Q_{D_i}(d)<q_{\text {min}} \\ \displaystyle d+\int _{Q_{D_i}(d)}^{q_{\text {max}}} \frac{f(\tau )}{\tau } \, \mathrm{d}\tau &{} \text {if} &{} Q_{D_i}(d)\in {{\mathrm{supp}}}(f) \end{array}\right. \end{aligned}$$
(21)

5 Necessary and Sufficient Conditions for Equilibrium

Having characterized the power demand of the single appliances and of the whole population in response to a broadcast profile D, we can now design such signal in order to achieve a Nash equilibrium in the electricity market, as specified in Definition 1. The equilibrium analysis will compare two different functions in the measure variable \(q=Q_D(D(t))\) which are related to the chosen broadcast profile D and the energy density f of the flexible appliances population. The first function, named negotiable valley capacity, quantifies the amount of flexible demand that can be greedily allocated by the appliances while preserving the existence of a Nash equilibrium and is defined as follows:

Definition 5

For a continuous demand profile \({D: [0,T] \rightarrow [0,+\infty )}\) fulfilling Assumption 3, the negotiable valley capacity is defined as the function \(\Lambda _D:[0,T] \rightarrow [0,+\infty )\) presented below:

$$\begin{aligned} \Lambda _D (q){:}~q \rightarrow \frac{\mathrm{d}}{\mathrm{d}q} Q_D^{-1} (q). \end{aligned}$$

This definition is independent of the price of energy \(\Pi \), and it will serve in the subsequent analysis as an indicator of flexible power density allowed in the valleys of the inflexible demand as a function of the measure q.

The second considered function is named power density of task durations and describes how a certain population of appliances will allocate their power consumption, based on the distribution m of their parameters \(\tau \) and E:

Definition 6

For a population of flexible appliances with parameter distribution m and energy density f, we define the power density of task durations as the function \(\Lambda _f: [q_{\text {min}}, q_{\text {max}}] \rightarrow [0,+\infty )\) given below:

$$\begin{aligned} \Lambda _f: q \rightarrow \frac{ f(q) }{q} = \frac{\int _{\mathscr {E}} E m(q, E ) \, \mathrm{d}E }{q}. \end{aligned}$$

Note that \(\Lambda _f (q)=\frac{f(q)}{q}\) is a density function quantifying the total rated power of the appliances with parameter \(\tau =q\). Therefore, given \({q_1,q_2 \in {{\mathrm{supp}}}(f)}=\mathscr {T}\), the integral \(\int _{q_1}^{q_2} \Lambda _f(\tau ) \, d \tau \) is equal to the total rated power of the appliances with \(\tau \in [q_1,q_2]\). It will be argued in the rest of this section that the existence of an equilibrium can be verified by comparing the values of \(\Lambda _f\) and \(\Lambda _{D_i}\) on the interval \({{\mathrm{supp}}}(f)=\mathscr {T}=[q_{\text {min}},q_{\text {max}}]\).

Theorem 1

Consider a continuous profile of inflexible demand \(D_i\) fulfilling Assumption 3. A Nash equilibrium is achieved in the system for \(D=D_i\) (as specified in Definition 1) if and only if:

$$\begin{aligned} \displaystyle \Lambda _f (q) \le \Lambda _{D_i}(q)\quad \forall q \in \mathscr {T}=[q_{\text {min}},q_{\text {max}}]. \end{aligned}$$
(22)

Proof

See “Appendix B”. \(\square \)

Theorem 1 states that, if the power density \(\Lambda _f\) is lesser or equal than the negotiable valley capacity \(\Lambda _{D_i}\) on the set \(\mathscr {T}\), a Nash equilibrium can be achieved through a single demand/price broadcast, communicating the signal \(D=D_i\) (or equivalently the associated price \(\Pi (D_i)\)) to the flexible loads. Each device will schedule its power consumption at constant maximum rate within the sublevel set of \(D_i\) of appropriate measure, viz. corresponding to its own minimum time parameter \(\tau \).

We want to understand next if alternative profiles D, different from \(D_i\), could be broadcast and induce an equilibrium when condition (22) is violated. To this end, let us regard two broadcast profiles as equivalent if they induce (for almost all times) the same scheduling of flexible demand. The equivalence class \(\mathscr {D}_i\) of the signal \(D_i\) can be characterized as in the definition below.

Definition 7

Let \(\mathscr {D}_i\) denote the set of broadcast signals \({D_b:[0,T]\rightarrow \mathbb {R}^+}\) for which the following conditions are satisfied for almost all \(t \in [0,T]\):

$$\begin{aligned} Q_{D_b}(D_b(t))&\le q_{\text {min}} \quad \text { if}~ Q_{D_i}(D_i(t)) \le q_{\text {min}} \end{aligned}$$
(23a)
$$\begin{aligned} Q_{D_b}(D_b(t))&\ge q_{\text {max}} \quad \text { if}~ Q_{D_i}(D_i(t)) \ge q_{\text {max}} \end{aligned}$$
(23b)
$$\begin{aligned} Q_{D_b}(D_b(t))&= Q_{D_i}(D_i(t)) \quad \text {if}~ q_{\text {min}} \le Q_{D_i}(D_i(t)) \le q_{\text {max}} \end{aligned}$$
(23c)

From expression (16) of the flexible demand \(\bar{D}_f\), reminding that \(q=Q_D(D(t))\) and \({{\mathrm{supp}}}(f)=[q_{\text {min}},q_{\text {max}}]\), condition (23a) is equivalent to impose that time intervals for which the flexible demand equals its maximum value \(\int _{q_{\text {min}}}^{q_{\text {max}}} \frac{f(\tau )}{\tau } \, d\tau \) when \(D_b\) and \(D_i\) are broadcast coincide up to sets of zero measure. Similarly, condition (23b) ensures that the intervals for which flexible demand is equal to zero when \(D_b\) and \(D_i\) are broadcast differ for sets of zero measure. Finally, condition (23c) imposes equality of the flexible demand at all other time instants. It is now possible to verify that an equilibrium can be achieved only with broadcast signals D that belong to \(\mathscr {D}_i\).

Theorem 2

The Nash equilibrium condition (6) is satisfied for a broadcast profile \(D=D_b\) fulfilling Assumption 3 if and only if \(D_b \in \mathscr {D}_i\) and inequality (22) holds.

Proof

See “Appendix C”. \(\square \)

Theorems 1 and 2 provide (respectively) sufficient and necessary conditions for the existence of a Nash equilibrium as specified in Definition 1. Any broadcast profile in the set \(\mathscr {D}_i\) will induce an equilibrium for the resulting aggregate demand if and only if the inequality (22) between negotiable valley capacity \(\Lambda _{D_i}\) and power density of task durations \(\Lambda _f\) holds. If this is not the case, a Nash equilibrium cannot be achieved with a broadcast profile D which fulfils Assumption 3.

6 Optimality Properties of Nash Equilibrium

This section derives fundamental properties of the Nash equilibrium, analytically proving its social efficiency and providing sufficient conditions for its Pareto optimality. To this end, it is necessary to adopt a different notation so as to accommodate the more general case in which the power \(u(\cdot )\) is not scheduled by each device as the best response \(u_D^*(\cdot ,\tau ,E)\) to a broadcast signal D. The power profile u cannot be defined as a function of \(\tau \) and E since, in general, appliances with equal parameters could have different power profiles. For an alternative notation, the set of devices is denoted by \(\mathscr {V}\), while \(\nu \in \mathscr {V}\) represents the single device with minimum task time \(\tau (\nu )\) and total energy \(E(\nu )\). Denoting by \(u(\cdot ,\nu )\) the scheduled power of the device \(\nu \), the set \(\mathscr {U}\) of feasible power profiles can be defined as follows:

$$\begin{aligned} \mathscr {U}=\left\{ u: [0,T]\times \mathscr {V} \rightarrow \mathbb {R}^+: \int _0^T u(t,\nu ) \, \mathrm{d}t = E(\nu ), \, 0 \le u(t,\nu ) \le \frac{E(\nu )}{\tau (\nu )} \quad \begin{array}{c} \forall t\in \mathscr {T}\\ \forall \nu \in \mathscr {V} \end{array}\right\} \end{aligned}$$
(24)

Under the current notation, the power scheduling \(u^*(t,\nu )\), obtained when \(D_i\) is broadcast to the devices and corresponding to a Nash equilibrium when (22) holds, is straightforward to derive from (18):

$$\begin{aligned} u^*(t,\nu ) = u_{D_i}^*(t,\tau (\nu ),E(\nu )). \end{aligned}$$
(25)

The flexible demand profiles obtained with the application of an arbitrary \(u\in \mathscr {U}\) and of the Nash equilibrium inducing \(u^*\) are denoted by \(D_f\) and \(D_f^*\), respectively, and have the following expression:

$$\begin{aligned} D_f(t)=\int _{\mathscr {V}} u(t,\nu )\,\mathrm{d}\nu \qquad D_f^*(t)=\int _{\mathscr {V}} u^*(t,\nu )\,\mathrm{d}\nu . \end{aligned}$$
(26)

To evaluate the optimality properties of the Nash equilibrium, the following functional J is considered:

$$\begin{aligned} J(d):= \int _{0}^{T} g(D_i(t),d(t))\,\mathrm{d}t \end{aligned}$$
(27)

where \(g(D_i,d)\) is strictly convex with respect to d. In order to perform the subsequent analysis in the measure variable q, the following hypothesis is introduced:

Assumption 4

Consider the following subset \(\bar{\mathscr {U}}\subset \mathscr {U}\) of feasible power schedules:

$$\begin{aligned} \displaystyle \bar{\mathscr {U}}:=\left\{ u \in \mathscr {U}: D_f(t_1)-D_f(t_2)=\int _{\mathscr {V}} u(t_1,\nu ) - u(t_2,\nu )\,\mathrm{d}\nu = 0\quad \forall (t_1,t_2) : D_i(t_1)=D_i(t_2) \right\} . \end{aligned}$$
(28)

For any functional J as defined in (27) and \(u_1\in \mathscr {U} \backslash \bar{\mathscr {U}}\) (with associated flexible demand \(D_{f,1}\)), there exists \(u_2 \in \bar{\mathscr {U}}\) (and flexible demand \(D_{f,2}\)) such that:

$$\begin{aligned} J(D_{f,2})\le J(D_{f,1}). \end{aligned}$$

In other words, if the functional J is evaluated over the feasible profiles of flexible demand, its minimizer \(d=D_f\) is a function that fulfils (11) for \(\rho =D_f\) and \(D=D_i\) and therefore is well defined in the variable \(q=Q_{D_i}(D_i(t))\). This assumption can be easily verified with standard optimal control techniques if one relaxes the constraints and directly minimizes J in (27) over the positive functions d with a given total integral. The following optimality result can now be provided:

Theorem 3

Consider an arbitrary power scheduling \(u\in \mathscr {U}\) and \(u^*\) as defined in (25). Let \(D_f\) and \(D_f^*\) in (26) denote the corresponding profiles of flexible demand and consider the following functional \(J_{C}\):

$$\begin{aligned} J_{C}(d)=\int _{0}^{T} g_C(D_i(t) + d(t))\,\mathrm{d}t. \end{aligned}$$
(29)

with \(g_C\) strictly convex. If (6) is fulfilled for \(D=D_i\) and \(u^*\) corresponds to a Nash equilibrium, it holds:

$$\begin{aligned} J_C(D_f^*) \le J_C(D_f). \end{aligned}$$
(30)

Proof

See “Appendix D”. \(\square \)

It follows from Theorem 3 that, if a Nash equilibrium exists, this is also optimal for a convex functional of aggregate demand. Note that this formulation is adopted in similar works to represent social welfare (a discrete-time version is presented in [13]) and can quantify, for example, the total generation costs or the flattening of the demand profile introduced by the flexible loads. We can therefore conclude that the proposed notion of Nash equilibrium is always socially efficient.

The Pareto optimality of the Nash equilibrium has also been analysed. In particular, we are interested in determining if there exists a feasible power schedule \(u\in \mathscr {U}\backslash \{ u^* \}\) which allows to reduce the cost sustained by at least one device, without increasing the costs of other appliances. The energy costs \(C(\nu )\) and \(C^*(\nu )\) sustained by the individual device \(\nu \) when u and \(u^*\) are applied are straightforward to derive:

$$\begin{aligned} C(\nu ) = \int _{0}^{T} \Pi (D_i(t)+D_f(t)) u(t,\nu )\,\mathrm{d}t \qquad C^*(\nu ) = \int _{0}^{T} \Pi (D_i(t)+D_f^*(t)) u^*(t,\nu )\,\mathrm{d}t. \end{aligned}$$
(31)

In this context, the following result is provided:

Theorem 4

Assume that \(u^*\) in (25) corresponds to a Nash equilibrium, denoting by \(\bar{D}_f^*\) the equivalent in the variable q of \(D_f^*\) in (26). If the price function \(\Pi \) is strictly convex and the following inequality is fulfilled for \(\bar{D}_a^*=\bar{D}_i+\bar{D}_f^*\):

$$\begin{aligned} \bar{D}_a^{*'}(q) \left[ \Pi ''\left( \bar{D}_a^*(q)\right) \bar{D}_f^*(q)+ \Pi '\left( \bar{D}_a^*(q)\right) \right] + \Pi '\left( \bar{D}_a^*(q)\right) \bar{D}_f^{*'}(q) \ge 0 \end{aligned}$$
(32)

then \(u^*\) is Pareto optimal and there exists no feasible \(u\in \mathscr {U}\) such that the following holds for the energy costs C in (31):

$$\begin{aligned}&C(\nu ) \le C^*(\nu ) \qquad \forall \nu \in \mathscr {V} \end{aligned}$$
(33a)
$$\begin{aligned}&\exists \tilde{\nu }\in \mathscr {V} : C(\tilde{\nu }) < C^*(\tilde{\nu }). \end{aligned}$$
(33b)

Proof

See “Appendix E”. \(\square \)

The application of Theorem 4 is particularly interesting when an affine price function \(\Pi (d)=a+b\cdot d\) is considered. In this case, condition (32) corresponds to the following inequality between the negotiable valley capacity \(\Lambda _{D_i}\) and the power density of task durations \(\Lambda _f\):

$$\begin{aligned} -\bar{D}_f^{*'}(q) = \Lambda _f^*(q) \le \frac{\Lambda _{D_i}^*(q)}{2} = \frac{\bar{D}_i^{'}(q)}{2}. \end{aligned}$$
(34)

7 Discussion

In this section we qualitatively discuss the equilibrium properties and the implementation of the proposed control strategy, highlighting its main novel elements and discussing its limitations and future developments.

7.1 Nash Equilibrium Properties

Necessary and sufficient conditions for equilibrium have been derived in Theorems 1 and 2, analytically characterizing the penetration levels of flexible demand and the devices parameters for which a Nash equilibrium can be obtained. Given the quantities \(\Lambda _{D_i}\) and \(\Lambda _{f}\), describing, respectively, the inflexible and flexible demand, an equilibrium can be induced if and only if the inequality (22) is fulfilled. Note that such condition can alternatively be expressed as monotonicity of the aggregate demand profile in the measure variable q. In fact, by comparing Definition 6 and (16), it can be seen that \(\Lambda _f\) in (22) is the derivative of the flexible demand in the variable q with changed sign. For \(D=D_i\), we have that \({\bar{D}_i(q)=Q_{D_i}^{-1}(q)}\) from (10) and the term \(\Lambda _{D_i}\), as specified in Definition 5, represents the derivative of the inflexible demand with respect to q. The equilibrium condition (22) can then be rewritten as:

$$\begin{aligned} \bar{D}'_i(q)+\bar{D}'_f(q) \ge 0\quad \forall q \in [q_{\text {min}},q_{\text {max}}]. \end{aligned}$$
(35)

As discussed in detail later, this formulation constitutes a key insight for the development of an extended analysis that relaxes some of the initial assumptions and provides more general results.

Following the derivation of the necessary and sufficient conditions for the existence of a Nash equilibrium, it has been shown in Sect. 6 that such equilibrium is always socially efficient, determining in Theorem 4 the conditions that also ensure Pareto optimality. In this context, it is worth mentioning that the Nash equilibrium, when it exists, is also unique. Its uniqueness under Assumption 3 follows from Theorem 2, since an equilibrium can only be achieved by broadcasting a demand profile \(D_b\in \mathscr {D}_i\) and all profiles in the signal class \(\mathscr {D}_i\) induce by definition the same power scheduling and flexible demand.

7.2 Distributed Implementation

Having discussed the properties of the Nash equilibrium, it is worth emphasizing some key aspects of the distributed control scheme that induces it:

  • Privacy The system operator, when choosing the broadcast signal D, only requires a general description of the flexible devices population through the function f in (2). The tasks of the individual agents can remain hidden, collecting the aggregate information through an intermediate entity or estimating it through market analysis.

  • Incentive compatibility The single appliance has no interest in providing untruthful information in order to reduce its energy cost. In fact, as we are considering large populations of flexible loads, the impact of the parameter values \(\tau \) and E communicated by the single device on the energy density f is comparable to the effect of the power scheduling \(u(\cdot )=u_D^*(\cdot ,\tau ,E)\) of the individual load on the resulting flexible demand \(D_{f,D}\) in (4). As for the latter case, the parameters value \(\tau \) and E of the individual load have negligible impact on the energy density f. Therefore, the individual appliances have no interest in providing false parameters values, as they would not be able to modify the energy density f, which is used by the system operator to determine the broadcast demand profile D. This property does not hold in general if a nonnegligible fraction of the total devices create a coalition, agreeing to purposefully collaborate in providing false information and distorting the density f for their own advantage.

  • One-step resolution There is no iterative exchange of information between the appliances and the system operator: a single demand profile D (or equivalent price \(\Pi (D)\)) is broadcast to the appliances, which independently perform their power scheduling. We wish to emphasize that such choice does not restrict the equilibrium results. As established in Theorem 2, if the inequality (22) is not fulfilled there exists no broadcast power profile \(D_b\) associated with a Nash equilibrium. Therefore, also alternative methods that consider an iterative power scheduling of the devices, on the basis of updated demand/price signals, would not ensure better results, as there is simply no stable configuration to which they could converge.

7.3 Theoretical Assumptions: Restrictions and Possible Solutions

Finally, we wish to discuss in more detail the assumptions adopted in our study, evaluating their impact and proposing possible approaches for a more comprehensive analysis. From Assumption 1, only noninterruptible appliances with complete time availability can be controlled. Such hypothesis, albeit restrictive, can nevertheless accommodate realistic scenarios (e.g. charge of electric vehicles during night-time) and has been considered in other works on the subject, such as [18, 24]. It is also worth mentioning that the power profile \(u(\cdot )=u_D^*(\cdot ,\tau ,E)\), scheduled by each device in response to the received demand signal D, is bang–bang. As a result, the proposed coordination strategy not only applies to devices that can continuously modulate their power consumption but it can also be extended to ON–OFF appliances. The possibility of considering devices with partial flexibility is preliminarily explored in Sect. 8, designing a distributed coordination of the flexible loads which parameterizes the broadcast signal as a “single valley”. The proposed technique could be extended, in future works, to consider a more general structure of the broadcast signals (for example composed by multiple valleys), ensuring appliances coordination and equilibrium under more general conditions. The inclusion of noninterruptible appliances in the current modelling framework is also being evaluated, through a two-step power scheduling. For example, one could first coordinate these additional loads (whose power consumption is more difficult to characterize in a compact manner) and then consider the resulting aggregate demand profile as \(D_i\) in a second power scheduling of the interruptible appliances, using the techniques presented in this work.

Regarding Assumption 2, it is assumed that the energy density f is a well-defined and bounded function. For this to be the case, the number of considered flexible appliances needs to be infinite. In practical contexts, a finite number of flexible loads can be described with an acceptable degree of approximation through a bounded function f if the considered population is extremely large. In this respect, we wish to emphasize that the proposed control strategy has been designed for future large-scale applications on national power systems, expecting millions of flexible loads. For a faithful description of flexible demand through a bounded function f, it is also necessary that the time parameter \(\tau \) is sufficiently diversified across the considered loads. Such property is generally verified by populations of heterogeneous loads or by homogeneous devices that need to perform different tasks. Note that Assumption 2 simplifies the analysis, allowing to introduce \(\Lambda _f\) in Definition 6 and derive the equilibrium condition (22). A more complex study should be able to obtain similar results without Assumption 2, using the differential equilibrium condition (35) as a starting point and demonstrating that, in the present case, an equilibrium can only be achieved if the profile of aggregate demand \(\bar{D}_{a}\) (discontinuous and nondifferentiable) is nondecreasing.

Finally, the results presented so far assume that the broadcast demand signal D fulfils Assumption 3 and does not have any level set of positive measure. If such assumption is removed, the best response of each appliance is, in general, not unique. For example, if the broadcast demand is constant with \(D(t)=d~\forall t\in [0,T]\), then all feasible power schedules are also optimal. Moreover, the definitions of \(\bar{u}^*\) and \(\bar{D}_f\) provided in the previous section are no longer valid and the presented equilibrium conditions do not apply. An ongoing work suggests that existence and shape of a Nash equilibrium can still be determined under this relaxed conditions. In order to achieve this result, though, it is necessary to centrally coordinate some appliances on time intervals characterized by constant broadcast signal D. Alternatively, we show in [10] that a Nash equilibrium can be obtained by introducing a proportional constraint on the power rate of the appliances, limiting the flexible demand at critical time instants.

8 Appliances with Partial Flexibility

As established in Assumption 1, so far we have considered appliances that can schedule their power consumption at any time instant within the considered interval [0, T]. Such formulation can be expanded to account for devices with stricter time constraints. In particular, we will consider the case of appliances that must perform their tasks at \(t\ge \kappa \) where \(\kappa \) is the availability parameter of the individual device. This corresponds to an additional constraint on the power scheduling u:

$$\begin{aligned} u(t)=0 \quad \forall t<\kappa . \end{aligned}$$
(36)

Remark 1

The analysis in this section can be extended to appliances that also specify a final availability time, obtaining similar results. For a more compact presentation, in this paper the simpler case with only the initial availability time \(\kappa \) is presented.

An additional variable must now be considered in the unnormalized distribution m of the appliances parameters: \(\int _{\tau _1}^{\tau _2} \int _{\kappa _1}^{\kappa _2} \int _{E_1}^{E_2} m(\tau ,\kappa ,E) \,\mathrm{d}E \,\mathrm{d}\kappa \,\mathrm{d}\tau \) denotes the number of devices for which \(E_{1} \le E \le E_2\), \(t_1\le \tau \le t_2\) and also \(\kappa _1\le \kappa \le \kappa _2\). Similarly, the function \(f(\tau ,\kappa )\) in this case quantifies the total amount of energy required by devices with time parameter \(\tau \) and availability parameter \(\kappa \):

$$\begin{aligned} f(\tau ,\kappa ):=\int _{\mathscr {E}} E \cdot m(\tau ,\kappa ,E)\,\mathrm{d}E. \end{aligned}$$
(37)

Assumption 5

The energy density f has compact support:

$$\begin{aligned} {{\mathrm{supp}}}(f) = [q_{\text {min}},q_{\text {max}}] \times [\kappa _{\text {min}},\kappa _{\text {max}}]. \end{aligned}$$

Assumption 6

The availability time-window of each appliance allows task completion. In other words, all appliances are able to complete their task by operating at rated power in their availability window \([\kappa ,T]\):

$$\begin{aligned} \tau +\kappa \le T \quad \forall (\tau ,\kappa )\in {{\mathrm{supp}}}(f). \end{aligned}$$

After a preliminary equilibrium analysis in Sect. 8.1, we describe the considered class of broadcast signals, providing expressions for the corresponding scheduled power consumption and flexible demand, in Sect. 8.2. The conditions for a Nash equilibrium are derived in Sect. 8.3, while Sect. 8.4 contains a design method for the broadcast profile.

8.1 Preliminary Equilibrium Analysis

The appliances schedule their power consumption in order to complete their task at minimum energy cost, on the basis of a broadcast demand profile D that fulfils Assumption 3. The additional availability constraint (36) is now included in the power scheduling problem through the indicator function, denoted by \(\mathbbm {1}_x\). The optimization problem solved by the single device with parameters \(\tau \), \(\kappa \) and E becomes:

$$\begin{aligned} \begin{array}{rl} \displaystyle \min _{u(\cdot )} &{} \quad \displaystyle \int _{0}^{T}\Pi (D(t)) \cdot u(t) \, \mathrm{d}t \\ \text {s.t.} &{} \quad \displaystyle 0 \le u(t) \le \frac{E}{\tau }\mathbbm {1}_{[\kappa ,T]}(t) \\ &{}\quad \displaystyle \int _{0}^T u(t) \, \mathrm{d}t = E. \end{array} \end{aligned}$$
(38)

In order to calculate the solution \(u_D^*\), it is useful to provide a preliminary result:

Proposition 2

Given the sublevel set \(\mathscr {S}_{D}\) defined in (19), for any \((\tau ,\kappa ) \in {{\mathrm{supp}}}(f)\) there exists \(\lambda \in [0,T]\), that we denote by \(\Lambda (\tau ,\kappa )\), such that the following holds:

$$\begin{aligned} \lambda =\inf _{y} \left\{ y \in [0,T]: \mu \left( [\kappa ,T] \cap \mathscr {S}_{D}(y)\right) = \tau \right\} . \end{aligned}$$
(39)

Proof

Under Assumption 3 for the broadcast D, the term \(\mu \left( \, [\kappa ,T] \cap \mathscr {S}_{D}(y) \, \right) \) in (39) is continuous and nondecreasing with respect to y. Furthermore, we have:

$$\begin{aligned} \mu \left( [\kappa ,T] \cap \mathscr {S}_{D}(T) \right)= & {} \mu \left( [\kappa ,T] \cap [0,T] \right) = T-\kappa \nonumber \\ \mu \left( [\kappa ,T] \cap \mathscr {S}_{D}(0) \right)= & {} 0. \end{aligned}$$
(40)

Since \(\tau \le T-\kappa \) for all \((\tau ,\kappa )\in {{\mathrm{supp}}}(f)\) from Assumption 6, we can conclude that \(\Lambda (\tau ,\kappa )\) exists as specified in the claim. \(\square \)

Note that \(\mathscr {S}_{D}(\Lambda (\tau ,\kappa ))\) returns the set of time instants t with the lowest values of broadcast demand D(t) (and lowest price \(\Pi (D(t))\)) whose intersection with \([\kappa ,T]\) has measure \(\tau \). Hence, the solution to (38) for a device with parameters \((\tau ,\kappa ,E)\) has the following expression:

$$\begin{aligned} u_D^*(t,\tau ,\kappa ,E)= \left\{ \begin{array}{lll} \displaystyle \frac{E}{\tau } &{} \text {if} &{} \displaystyle t\in \left( [\kappa ,T] \cap \mathscr {S}_{D}(\Lambda (\tau ,\kappa )) \right) \\ 0 &{} \text {if} &{} \displaystyle t \notin \left( [\kappa ,T] \cap \mathscr {S}_{D}(\Lambda (\tau ,\kappa )) \right) \end{array}\right. \end{aligned}$$
(41)

The resulting profile of aggregate demand is straightforward to derive:

$$\begin{aligned} D_{a,D}(t)=D_i(t)+ \int _{\mathscr {T}} \int _{\mathscr {K}} \int _{\mathscr {E}} u_D^*(t,\tau ,\kappa ,E) m(\tau ,\kappa ,E) \,\mathrm{d}E \,\mathrm{d}\kappa \,\mathrm{d}\tau . \end{aligned}$$
(42)

where \(\mathscr {T}\), \(\mathscr {K}\) and \(\mathscr {E}\) denote, respectively, the set of distinct parameters \(\tau \), \(\kappa \) and E in the appliances population. As in the previous analysis, a Nash equilibrium is achieved if the following holds for all \((\tau ,\kappa )\in {{\mathrm{supp}}}(f)\) and \(E\in \mathscr {E}\):

$$\begin{aligned} \begin{array}{rcl} \displaystyle \int _{0}^{T}\Pi (D_{a,D}(t)) u_D^*(t,\tau ,\kappa ,E) \, \mathrm{d}t = &{} \displaystyle \min _{u(\cdot )} &{} \displaystyle \int _{0}^{T}\Pi (D_{a,D} (t)) u(t) \, \mathrm{d}t \\ &{}\text {s.t.} &{} \displaystyle 0 \le u(t) \le \frac{E}{\tau }\mathbbm {1}_{[\kappa ,T]}(t) \\ &{} &{} \displaystyle \int _{0}^T u(t) \, \mathrm{d}t = E. \end{array} \end{aligned}$$
(43)

In the case of appliances with partial flexibility, the concepts of negotiable valley capacity and power density of task durations are no longer applicable. In fact, given the additional constraints on the initial time of power consumption, condition (11) does not hold in general for \(\rho =D_f\) and \(\rho =D_{a,D}\). This means that flexible and aggregate demand cannot be expressed as functions of the measure q. On the other hand, it is possible to provide the following result:

Proposition 3

Given a broadcast profile D, the induced aggregate demand \(D_{a,D}\) defined in (42) fulfils the Nash equilibrium condition (43) if the following holds:

$$\begin{aligned} Q_{D}(D(t)) = Q_{D_{a,D}}(D_{a,D}(t))\quad \forall t \in [0,T]. \end{aligned}$$
(44)

Proof

When (44) is fulfilled, the sublevel sets of D and \(D_{a,D}\) coincide:

$$\begin{aligned} \mathscr {S}_{D} (y) = \{ t : Q_D (D(t)) \le y \} = \{ t: Q_{D_{a,D}} ( D_{a,D} (t) ) \le y \} = \mathscr {S}_{D_{a,D}} ( y ). \end{aligned}$$
(45)

This in turn implies that there exists \(\Lambda (\tau ,\kappa )\) such that:

$$\begin{aligned} \mu \left( [\kappa ,T] \cap \mathscr {S}_{D}(\Lambda (\tau ,\kappa ))\right) = \tau =\mu \left( [\kappa ,T] \cap \mathscr {S}_{D_{a,D}}(\Lambda (\tau ,\kappa ))\right) . \end{aligned}$$

By the latter equality and Eq. (41), we see that:

$$\begin{aligned} u_D^*(t,\tau ,\kappa ,E) = u_{D_{a,D}}^*(t,\tau ,\kappa ,E). \end{aligned}$$

Hence:

$$\begin{aligned}&\displaystyle \int _{0}^{T}\Pi (D_{a,D}(t)) u_D^*(t,\tau ,\kappa ,E) \, \mathrm{d}t \nonumber \\&\quad \begin{array}{rcl} = \displaystyle \int _{0}^T \Pi (D_{a,D}(t)) u_{D_{a,D}}^* (t,\tau ,\kappa ,E) \, dt &{}= \displaystyle \min _{u(\cdot )} &{} \displaystyle \int _{0}^{T}\Pi (D_{a,D} (t)) u(t) \, \mathrm{d}t \\ &{}\quad \text {s.t.} &{} \displaystyle 0 \le u(t) \le \frac{E}{\tau }\mathbbm {1}_{[\kappa ,T]}(t) \\ &{} &{} \displaystyle \int _{0}^T u(t)\,\mathrm{d}t = E. \end{array} \end{aligned}$$

which proves condition (43) and concludes the proof. \(\square \)

8.2 Description of Broadcast Signal and Power Scheduling

We restrict our study to a specific class \(\mathscr {D}_m\) of broadcast signals \(D:[0,T]\rightarrow [0,T]\) that can be characterized as “single valleys”. This allows to provide compact expressions for the scheduled power consumption of the devices and ultimately derive sufficient conditions for a Nash equilibrium.

Remark 2

The choice of signals with codomain [0, T] considerably simplifies the subsequent analysis. In practical applications, the calculated D can always be rescaled so as to be dimensionally consistent with power demand or price. Since, in the chosen framework, the power scheduling of the devices only depends on the sublevel set \(\mathscr {S}_D\) (unaffected by multiplication by a constant term), all the presented results still hold.

To define \(\mathscr {D}_m\), we consider the functions \({\theta _L:[0,T] \rightarrow [0,T_0]}\) and \(\theta _R:[0,T] \rightarrow [T_0,T]\) which fulfil the following for all \(q\in [0,T]\):

$$\begin{aligned} \theta _R(q)-\theta _L(q)=q \quad \dot{\theta }_L(q) < 0 \quad \dot{\theta }_R(q) > 0. \end{aligned}$$
(46)

Furthermore, for some \(T_0\in [0,T]\), at \(q=0\) and \(q=T\) we have:

$$\begin{aligned} \theta _L(0)=\theta _R(0)=T_0 \quad \theta _L(T)=0 \quad \theta _R(T)=T. \end{aligned}$$
(47)

Definition 8

Any demand signal D which belongs to the class \(\mathscr {D}_m\) has the following expression:

$$\begin{aligned} D(t)= \left\{ \begin{array}{lll} \theta _L^{-1}(t) &{}\text {if} &{} t\in [0,T_0] \\ \theta _R^{-1}(t) &{}\text {if} &{} t\in [T_0,T] \end{array}\right. \end{aligned}$$
(48)

for some functions \(\theta _L\) and \(\theta _R\) that fulfil (46) and (47).

The profiles \(D\in \mathscr {D}_m\) can be visualized as valleys, with one decreasing profile \(\theta _L^{-1}\) in the interval \([0,T_0]\) and an increasing one (\(\theta _R^{-1}\)) on \([T_0,T]\). Note that \(D\in \mathscr {D}_m\) is properly defined by (48) since the functions \(\theta _L\) and \(\theta _R\) are invertible and the union of their images is equal to [0, T]. Moreover, it holds \(\text {Im}(\theta _L) \cap \text {Im} (\theta _R)= T_0\) with \(\theta _L^{-1}(T_0)=\theta _R^{-1}(T_0)=0\). Given (48), the following relationship holds for the broadcast profile \(D\in \mathscr {D}_m\) evaluated at \({\theta _L(q)\in [0,T_0]}\) and \(\theta _R(q)\in [T_0,T]\):

$$\begin{aligned} D(\theta _L(q))=\theta _L^{-1} \left( \theta _L(q)\right) = q = \theta _R^{-1} \left( \theta _R(q)\right) =D(\theta _R(q)). \end{aligned}$$
(49)

The power scheduling of the flexible appliances can now be characterized by the following result:

Proposition 4

Given \(D\in \mathscr {D}_m\) and the corresponding functions \(\theta _L\) and \(\theta _R\), the power consumption of the single device with parameters \((\tau ,\kappa ,E)\) is scheduled (at maximum feasible rate \(E/\tau \)) during a compact interval \(\tilde{\mathscr {S}}_D(\tau ,\kappa )\):

$$\begin{aligned} \tilde{\mathscr {S}}_D(\tau ,\kappa ):=\left\{ \begin{array}{lll} [\theta _L(\tau ),\theta _R(\tau )] &{} \text {if} &{} \kappa \le \theta _L(\tau ) \\ {[} \kappa , \kappa + \tau {]} &{} \text {if} &{} \kappa > \theta _L(\tau ) \end{array}\right. \end{aligned}$$
(50)

Proof

For the first case in (50), it holds \({[\theta _L(\tau ),\theta _R(\tau )] \subseteq [\kappa ,T]}\). Furthermore, considering (46) and (48), the following properties are satisfied:

$$\begin{aligned}&\mu \left( [\theta _L(\tau ),\theta _R(\tau )] \right) = \tau \nonumber \\&D(t_1)< D(t_2)\quad \forall t_1 \in [\theta _L(\tau ),\theta _R(\tau )], t_2 \notin [\theta _L(\tau ),\theta _R(\tau )]. \end{aligned}$$
(51)

For the second case in (50), since D is monotonic increasing for \(t>T_0\), it is sufficient to show the following:

$$\begin{aligned}&\kappa + \tau > T_0 \nonumber \\&D(t) \le D(\kappa +\tau )\quad \forall t \in [\kappa ,\kappa +\tau ]. \end{aligned}$$
(52)

Since \(\kappa > \theta _L(\tau )\), we have \({\kappa +\tau>\theta _L(\tau )+\tau =\theta _R(\tau )>T_0}\). For the second inequality in (52) two different cases have to be analysed: if \(t>T_0\) then \(D(t)=\theta _R^{-1}(t)\le \theta _R^{-1}(\kappa +\tau )=D(\kappa +\tau )\) from the monotonicity properties of \(\theta _R^{-1}\). If \(t\in [\kappa ,T_0]\), from \(\kappa >\theta _L(\tau )\) and (49), it follows:

$$\begin{aligned} D(t)\le D(\kappa )< D(\theta _L(\tau ))=D(\theta _R(\tau ))<\theta _R^{-1}(\kappa +\tau )=D(\kappa +\tau ) \end{aligned}$$
(53)

which proves (52) and concludes the proof. \(\square \)

From Proposition 4, the power profile \(\tilde{u}_D^*\) scheduled by appliances with parameters \((\tau ,\kappa ,E)\) can be written as:

$$\begin{aligned} \tilde{u}_D^*(t,\tau ,\kappa ,E)=\left\{ \begin{array}{lll} \displaystyle \frac{E}{\tau } &{}\text {if} &{} \displaystyle t \in \tilde{\mathscr {S}}_D(\tau ,\kappa ) \\ 0 &{} \text {if} &{} t \notin \tilde{\mathscr {S}}_D(\tau ,\kappa ) \end{array}\right. \end{aligned}$$
(54)

The resulting flexible demand \(D_{f,D}(t)\) is straightforward to derive:

$$\begin{aligned} D_{f,D}(t)= & {} \displaystyle \int _{\mathscr {T}} \int _{\mathscr {K}} \int _{\mathscr {E}} m(\tau ,\kappa ,E) \tilde{u}_D^*(t,\tau ,\kappa ,E) \, \mathrm{d}E \, \mathrm{d}\kappa \, \mathrm{d}\tau \nonumber \\= & {} \displaystyle \int _{\mathscr {T}} \int _{\mathscr {K}} \frac{f(\tau ,\kappa )}{\tau } \cdot \mathbbm {1}_{\tilde{\mathscr {S}}_D(\tau ,\kappa )}(t) \, \mathrm{d}\kappa \, \mathrm{d}\tau . \end{aligned}$$
(55)

Proposition 5

The following expressions of \(D_{f,D}\) as a function of \(\theta _L\) and \(\theta _R\) hold:

$$\begin{aligned} D_{f,D}(\theta _L(q))= & {} \displaystyle \int _{0}^{\theta _L(q)} \int _{q}^T \frac{f(\tau ,\kappa )}{\tau } \, \mathrm{d}\tau \, \mathrm{d}\kappa \end{aligned}$$
(56a)
$$\begin{aligned} D_{f,D}(\theta _R(q))= & {} D_{f,D}(\theta _L(q)) + \displaystyle \int _{\theta _L(q)}^{\theta _R(q)} \int _{\theta _R(q)-\kappa }^{T} \frac{f(\tau ,\kappa )}{\tau } \, \mathrm{d}\tau \, \mathrm{d}\kappa . \end{aligned}$$
(56b)

Proof

To prove (56a), consider definition (50) of \(\tilde{\mathscr {S}}_D\) and note that no appliance completes its task for \(t<T_0\). This means that at time \(\theta _L( q) \le T_0\) the flexible demand can be determined by taking into account only the starting time of power consumption. For any appliance with initial availability \(\kappa <\theta _L(q)\), two cases must be considered: if the task duration at rated power \({\tau \in (\theta _L^{-1}(\kappa ),T] \subset [q,T]}\), then it holds \(\kappa >\theta _L(\tau )\) and from (50) the starting time is equal to \(\kappa \le \theta _L(q)\). If instead \(\tau \in [0,\theta _L^{-1}(\kappa )]\), the starting time of power consumption is equal to \(\theta _L(\tau )\) and only devices with task time \(\tau \ge q\) must be accounted for in the computation of flexible demand. This proves expression (56a). To verify that also (56b) holds, note that the considered values of the parameter \(\kappa \) are lesser or equal than \(\theta _R(q)\) and, from (50), the same holds for the starting time. The integration bounds in \(\tau \) when \(\kappa \le \theta _L(q)\) can be determined similarly to the previous case, considering the final time of power consumption. If \(\theta _L(q)<\kappa \le \theta _R(q)\), the only possible case to analyse in (50) is \(\kappa >\theta _L(\tau )\), when the interval of power consumption scheduled by the devices equals \([\kappa ,\kappa +\tau ]\). To account for the appliances operating at \(t=\theta _R(q)\), it is sufficient to impose \(\kappa +\tau \ge \theta _R(q)\) and therefore \(\tau \ge \theta _R(q)-\kappa \). \(\square \)

Having calculated \(D_{f,D}\), the resulting aggregate demand \(D_{a,D}\) can be easily derived:

$$\begin{aligned} D_{a,D}(\theta _L(q))= & {} D_i(\theta _L(q)) + D_f(\theta _L(q)) \end{aligned}$$
(57a)
$$\begin{aligned} D_{a,D}(\theta _R(q))= & {} D_i(\theta _R(q)) + D_f(\theta _R(q)). \end{aligned}$$
(57b)

8.3 Sufficient Conditions for Nash Equilibrium

The main equilibrium result for appliances with partial flexibility is now presented:

Theorem 5

A Nash equilibrium is induced in the system and condition (43) is satisfied for \(D\in \mathscr {D}_m\) if, for the corresponding functions \(\theta _L\), \(\theta _R\) and profile of aggregate demand \(D_{a,D}\), it holds:

$$\begin{aligned} \begin{array}{l} \frac{\mathrm{d}}{\mathrm{d}q} D_{a,D}(\theta _L(q)) >0 \\ \frac{\mathrm{d}}{\mathrm{d}q} D_{a,D}(\theta _L(q))=\frac{\mathrm{d}}{\mathrm{d}q} D_{a,D}(\theta _R(q)) \end{array}\quad \forall q \in [0,T]. \end{aligned}$$
(58)

Proof

See “Appendix F”. \(\square \)

Proposition 3 and Theorem 5 determine whether an equilibrium exists by verifying that the optimal power profile of the devices, defined in (41), is identical when the broadcast D or the resulting aggregate demand \(D_{a,D}\) are considered. Such conditions are only sufficient since the optimal power profile is unique and equal to (41) only if the broadcast signal D satisfies Assumption 3. If the same holds for the resulting aggregate demand \(D_{a,D}\), the equilibrium conditions become also necessary.

8.4 Synthesis Technique

Following the results of Theorem 5, it is possible to provide a constructive technique which verifies, for a given \(D_i\) and f, if there exists a profile \(D\in \mathscr {D}_m\) which satisfies (58) and allows to calculate it numerically. To do so, it is useful to derive expressions for the derivatives with respect to the variable q of the different demand components:

$$\begin{aligned} \frac{\mathrm{d}}{\mathrm{d}q} D_i(\theta _L(q))= & {} \displaystyle \left. \frac{\mathrm{d}D_i(t)}{\mathrm{d}t} \right| _{t=\theta _L(q)} \dot{\theta }_L(q) \end{aligned}$$
(59a)
$$\begin{aligned} \frac{\mathrm{d}}{\mathrm{d}q} D_i(\theta _R(q))= & {} \displaystyle \left. \frac{\mathrm{d}D_i(t)}{\mathrm{d}t} \right| _{t=\theta _R(q)} \dot{\theta }_R(q) \end{aligned}$$
(59b)
$$\begin{aligned} \displaystyle \frac{\mathrm{d}}{\mathrm{d}q} D_{f,D}(\theta _L(q))= & {} \displaystyle \int _q^{T} \frac{f(\tau ,\theta _L(q))}{\tau } \, \mathrm{d}\tau \cdot \dot{\theta }_L(q) - \int _{0}^{\theta _L(q)} \frac{f(q,\kappa )}{q} \, \mathrm{d}\kappa \nonumber \\= & {} G_1(q) \cdot \dot{\theta }_L(q) - G_2(q) \end{aligned}$$
(59c)
$$\begin{aligned} \displaystyle \frac{\mathrm{d}}{\mathrm{d}q} D_{f,D}(\theta _R(q))= & {} \displaystyle \frac{\mathrm{d}}{\mathrm{d}q} D_{f,D}(\theta _L(q)) +\int _0^T \frac{f(\tau ,\theta _R(q))}{\tau } \, \mathrm{d}\tau \cdot \dot{\theta }_R(q) \nonumber \\&-\displaystyle \int _{\theta _R(q)-\theta _L(q)}^{T} \frac{f(\tau ,\theta _L(q))}{\tau } \, \mathrm{d}\tau \cdot \dot{\theta }_L(q)\nonumber \\&-\displaystyle \int _{\theta _L(q)}^{\theta _R(q)} \frac{f(\theta _R(q)-\kappa ,\kappa )}{\theta _R(q)-\kappa } \, \mathrm{d}\kappa \cdot \dot{\theta }_{R}(q)\nonumber \\= & {} G_1(q) \cdot \dot{\theta }_L(q) - G_2(q) + G_3(q) \cdot \dot{\theta }_{R}(q) \nonumber \\&- G_4(q) \cdot \dot{\theta }_{L}(q) -G_5(q) \cdot \dot{\theta }_{R}(q). \end{aligned}$$
(59d)

By replacing (59) in the equality of (58), it is possible to calculate \(\theta _L(q)\) and \(\theta _R(q)\) as the solution of the following dynamical system:

$$\begin{aligned} \displaystyle \dot{\theta }_L(q)= & {} \frac{\left. \frac{\mathrm{d}D_i(t)}{\mathrm{d}t} \right| _{t=\theta _R(q)} + G_3(q) -G_5(q)}{\left. \frac{\mathrm{d}D_i(t)}{\mathrm{d}t} \right| _{t=\theta _L(q)} - \left. \frac{\mathrm{d}D_i(t)}{\mathrm{d}t} \right| _{t=\theta _R(q)}-G_3(q)+G_4(q)+G_5(q)}\nonumber \\ \dot{\theta }_R(q)= & {} 1+\dot{\theta }_L(q)\quad \theta _L(0)=T_0 \quad \theta _R(0)=T_0 \end{aligned}$$
(60)

If the solution of (60) fulfils the inequalities in (46) and (58) for some \(T_0\in [0,T]\), the corresponding \(D\in \mathscr {D}_m\) defined according to (48) induces an equilibrium. To determine \(T_0\), it is useful to consider the equality in (58), evaluated at \(\theta _L(q)=\theta _R(q)=T_0\):

$$\begin{aligned} \dot{D}_{a,D}(T_0)-\dot{D}_{a,D}(T_0) = \left[ \left. \frac{\mathrm{d}D_i(t)}{\mathrm{d}t} \right| _{t=T_0}+ \int _0^T \frac{f(\tau ,T_0)}{\tau } \, \mathrm{d}\tau \right] =0. \end{aligned}$$
(61)

9 Simulation Results

The equilibrium conditions presented in the previous section are now tested in simulations. A typical 24 h UK demand profile, as recorded by [22], is considered for \(D_i\) (blue trace in Fig. 2), with a time discretization step \(\Delta t=0.01\) h. If one denotes by \(D_i^k\) the value of inflexible demand at \(t=k \cdot \Delta t\), the function \(Q_{D_i}\left( D_i^k\right) \) is approximated as \(\left| \mathscr {S}^k \right| \cdot \Delta t\) where \(\mathscr {S}^k\) is defined as follows:

$$\begin{aligned} \mathscr {S}^k= \left\{ j : D_i^j \le D_i^k \right\} . \end{aligned}$$
(62)

In the first case study we consider a population of flexible appliances for which the equilibrium condition (22) in Theorem 1 is satisfied for the given \(D_i\). The total energy required by the devices amounts to 55 GWh and the corresponding f is a truncated Gaussian with mean equal to 8.2 h. This choice can represent heterogeneous devices that have different power ratings, but it can also model scenarios with only one type of device (with equal \(P=E/\tau \)) where each appliance needs to perform tasks that require different amounts of energy to be completed. The distribution m introduced at the beginning of Sect. 2, in the latter case, would have the following expression:

$$\begin{aligned} m(\tau ,E)=\tilde{m}(E) \delta (E - P \cdot \tau ) \end{aligned}$$

where \(\delta \) denotes the Dirac delta and \(\tilde{m}\) is the unnormalized distribution of the parameter E (total required energy). We can derive from (2) the relationship between f and \(\tilde{m}\):

$$\begin{aligned} f(\tau ) = \int _{\mathscr {E}} E \cdot \tilde{m}(E) \delta (E -P\cdot \tau ) \, \mathrm{d}E = (P \cdot \tau ) \cdot \tilde{m}(P \cdot \tau ). \end{aligned}$$

The values of \(\Lambda _f(q)\) and \(\Lambda _{D_i}(q)\) in the considered scenario are shown in Fig. 5. From Theorem 1, since the power density of task durations \(\Lambda _f\) (red) is always lesser or equal than the negotiable valley capacity \(\Lambda _{D_i}\) (blue), an equilibrium is achieved by broadcasting to the appliances the profile of inflexible demand \(D_i\). The resulting demand components as functions of the measure q are shown in Fig. 6: given that \(\bar{D}_i(q)=Q_{D_i}^{-1}(q)\) when \(D=D_i\), we expect the inflexible demand to be monotone increasing in the variable q. Conversely, the flexible demand \(\bar{D}_f(q)\), defined in (16), is always decreasing since it is equal to the integral of a positive function over the interval [qT]. As discussed in Sect. 7.1, since (22) is satisfied, the sum \(\bar{D}_a(q)\) of the two demand components will be nondecreasing. The same quantities as functions of time are displayed in Fig. 7. The intervals of scheduled power consumption for appliances with \(\tau =5\text { h}, \, 7\text { h}, \,9\text { h}\) are represented by the shaded areas and correspond by definition to the lowest values of broadcast demand \(D=D_i\). Since such intervals are also characterized by the lowest values of aggregate demand \(D_{a,D_i}\), the considered devices have no interest in changing their scheduled power consumption, implying that a Nash equilibrium is achieved. A different case study is now simulated, considering a population of flexible devices whose task duration profile \(\Lambda _f\) does not satisfy the equilibrium condition presented in Theorem 1. In particular, the function f is defined as the sum of two truncated Gaussians with mean equal to \(4\text { h}\) and \(8\text { h}\). This choice could model, for example, two distinct types of appliances (with different rated power \(P=E/\tau \)), considering that all devices have similar values of the parameter E. The total energy required by the appliances, as in the previous scenario, amounts to 55 GWh. A graphical representation of the equilibrium condition in Theorem 1 is provided in Fig. 8: it is straightforward to verify that an equilibrium cannot be achieved in the present case since \(\Lambda _f(q)> \Lambda _{D_i}(q)\) in the interval which goes approximatively from \(q=2\text { h}\) to \(q=5\text { h}\). This can also be seen from the demand profiles shown in Fig. 9, obtained when \(D=D_i\) is broadcast to the devices. In this case the shaded areas, which represent the scheduled interval of power consumption of devices with \(\tau \) equal to \(2\text { h}\), \(4\text { h}\) and \(8\text { h}\), do not correspond to the lowest values of aggregate demand. For example, the appliances with \(\tau =2\text { h}\) could reduce their total cost by shifting part of their power consumption to the small valley of aggregate demand which appears around \(t=6\text { h}\). Therefore, the operation strategy formulated by the devices on the basis of the broadcast signal \(D=D_i\) is not optimal for the resulting price signal induced by the aggregate demand and an equilibrium is not achieved.

Fig. 5
figure 5

Graphical representation of the equilibrium condition (22). In this first case study, the power density of task durations \(\Lambda _f(q)\) is always lesser or equal than the negotiable valley capacity \(\Lambda _{D_i}(q)\) (Color figure online)

Fig. 6
figure 6

Profiles of inflexible, flexible and aggregate demand as functions of the measure \(q=Q_{D_i}(D_i(t))\) (Color figure online)

Fig. 7
figure 7

Profiles of inflexible, flexible and aggregate demand as functions of time. The shaded areas correspond to the scheduled intervals of power consumption of appliances with \(\tau \) equal to 5, 7 and 9 h (Color figure online)

Fig. 8
figure 8

Graphical representation of the equilibrium condition (22) for the second case study (Color figure online)

Fig. 9
figure 9

Profiles of inflexible, flexible and aggregate demand as functions of time for \(\Lambda _f\) shown in Fig. 8. The shaded areas correspond to the intervals of power consumptions for appliances with \(\tau \) equal to 2, 4 and 8 h (Color figure online)

Fig. 10
figure 10

Energy density f of the considered appliances population as a function of the minimum task time \(\tau \) and availability starting time \(\kappa \) (Color figure online)

Fig. 11
figure 11

Comparison of the cumulative distribution Q for the inflexible demand \(D_i\), broadcast signal D and resulting aggregate demand \(D_{a,D}\) (Color figure online)

Fig. 12
figure 12

Values of inflexible demand \(D_i\) and aggregate profile \(D_{a,D}\) obtained when the function D is broadcast (Color figure online)

9.1 Appliances with Partial Flexibility

Coordination of flexible appliances with partial time availability has also been simulated, applying the technique presented in Sect. 8.4. The proposed example considers a parabolic profile for the inflexible demand (with \(T=12\) h) and an appliances population that requires 10 GWh of total energy. The distribution of the parameter \(\kappa \) has been modelled with a truncated Gaussian with mean equal to \(5\text { h}\), while the values of minimum task time \(\tau \) are in the range \([2\text { h},5\text { h}]\). The resulting function \(f\left( \tau ,\kappa \right) \) is shown in Fig. 10. The initial condition \(T_0\) for \(\theta _L\) and \(\theta _R\) has been calculated using (61) and is equal to \(4.21\text { h}\). The equations in (60) have been integrated, and the broadcast profile D has been obtained with (48). The corresponding cumulative distribution \(Q_D\) is compared in Fig. 11 with the ones of the inflexible and aggregate demand. The comparison of the demand profiles is presented in Fig. 12. As expected, the measure \(Q_{D_{a,D}}\) of the aggregate demand is equal to the function D (and to the corresponding \(Q_D\)), and therefore, an equilibrium is achieved according to Proposition 3. Note also that D has a minimum at time \(T_0=4.21\text { h}\), while the minimum in \(D_i\) is achieved at \(t=6\text { h}\). This is due to the time constraint \(\kappa \): the earlier power scheduling of devices with lower values of \(\kappa \) (during a time interval which is not characterized by the lowest values of inflexible demand) is balanced by the other appliances which are constrained to operate at later times.

10 Conclusions

This paper proposes a novel fully distributed control scheme for coordination of flexible appliances and their efficient integration in the electricity market. The appliances population is approximated as a continuum, modelling the conflicting interactions between the individual devices through a differential game. An efficient deployment of flexible demand, which avoids rebound effects and loss of diversity, is characterized as a Nash equilibrium. Through the analysis of the sublevel sets of the different demand profiles, necessary and sufficient equilibrium conditions are derived, determining the penetration levels and types of price-responsive appliances for which a suitable coordination can be induced. The optimality properties of the Nash equilibrium are also studied, analytically proving its social efficiency and deriving sufficient conditions for its Pareto optimality. A preliminary analysis of devices with partial flexibility has also been conducted, providing equilibrium conditions and a design technique for the broadcast demand when an additional constraint is introduced on the initial time of power consumption. Finally, the performance of the proposed control scheme has been evaluated in simulations.