Realtime enforcement of local energy market transactions respecting distribution grid constraints
Abstract
Future electricity distribution grids will host a considerable share of the renewable energy sources needed for enforcing the energy transition. Demand side management mechanisms play a key role in the integration of such renewable energy resources by exploiting the flexibility of elastic loads, generation or electricity storage technologies. In particular, local energy markets enable households to exchange energy with each other while increasing the amount of renewable energy that is consumed locally. Nevertheless, as most exante mechanisms, local market schedules rely on hourahead forecasts whose accuracy may be low. In this paper we cope with forecast errors by proposing a game theory approach to model the interactions among prosumers and distribution system operators for the control of electricity flows in realtime. The presented game has an aggregative equilibrium which can be attained in a semidistributed manner, driving prosumers towards a final exchange of energy with the grid that benefits both households and operators, favoring the enforcement of prosumers’ local market commitments while respecting the constraints defined by the operator. The proposed mechanism requires only onetoall broadcast of price signals, which do not depend either on the amount of players or their local objective function and constraints, making the approach highly scalable. Its impact on distribution grid quality of supply was evaluated through load flow analysis and realistic load profiles, demonstrating the capacity of the mechanism ensure that voltage deviation and thermal limit constraints are respected.
I Introduction
We consider future distribution grids in a context of massive deployment of Renewable Energy Sources (RES) and storage technologies. Maintaining quality of supply in such a context will require infrastructure reinforcements as usual, but also an active participation of Distribution System Operators (DSO) into the energy management of flexible Distributed Energy Resources^{1}^{1}1Flexible loads, controllable generation and storage resources. (DER). This can be achieved through Demand Side Management, in particular, by gaining access to flexibility from residential prosumers. A myriad of demand side management mechanisms have been proposed and applied for the scheduling of such flexible resources, from which the most relevant ones are those that provide incentives to prosumers for their active participation in distribution grid energy management as selfish agents [1, 2, 3, 4, 5]. In particular, we will consider local renewable energy markets that enable households to agree with each other one hourahead of time on the exchange of renewable energy. Such markets, as well as all energy management mechanisms that rely on exante agreements (dayahead, hourahead, etc.), imply agents subscribing commitments on future energy flows, as a result of market transactions. Nevertheless, such flows cannot be forecasted with high precision due to their dependency on human behavior and on exogenous variables controlled by nature (temperature, sunshine and wind). Thus, in order to cope with the uncertainty of demand and local renewable production, a realtime control of energy resources must provide the means to drive households towards a final exchange with the grid that benefits both prosumers and DSOs.
In this work we address the control of electricity flows on a residential low voltage distribution grid in realtime. We propose a game theory model that enables households to decide which electricity flows to exchange with the distribution grid in order to minimize their costs. Such costs depend on the average strategy of all households and also on a penalty signal associated to a coupling constraint. This aggregative game enables households to optimize their own costs while reducing voltage rises/drops and current flows on the lines.
The main contributions of this work are the following:

We rely on game theory to model the interactions between a DSO and prosumers for the control of their electricity flows in realtime.

The proposed game has a competitive aggregative equilibrium that can be attained through dynamics that only require onetoall broadcast of price signals that do not depend on the amount of players.

To the best of our knowledge our work is the first to propose a realtime mechanism for the control of residential electricity flows in a context of massive deployment of renewable energy sources and storage, capable of enforcing both voltage deviations and thermal limit constraints.
The article is structured as follows. We start by presenting related work in Section II. Then we introduce the system under study in Section III. The model and the aggregative game are described in Sections IV and V respectively. In Section VI we present the simulations and results. Finally, in Section VII we conclude the article and provide some perspectives.
Ii Related Work
We focus on the literature related to realtime control of electricity flows on distribution grids. Several centralized approaches have been proposed for realtime energy management in distribution grid systems [6, 7, 8]. The difficulty in such approaches is that flexible DER are owned and controlled by households, which hold the local information needed for a centralized control and will release part of this information only if adequate incentives are provided. In [9] and [10] authors propose decentralized mechanisms with the objective to flatten the aggregated demand of a large set of households. In [4] they consider the goal of the electricity supplier is to maximize social welfare, which is achieved in a distributed fashion by households optimizing their own benefits.
Game theory has been applied mainly to dayahead energy scheduling rather than to realtime control, and particularly to modeling the interactions between the electricity supplier and its clients, with the goal of minimizing energy costs rather than enforcing DSO constraints [11, 3, 12, 4, 13]. In [3] they propose a Stackelberg game model that allows electricity suppliers to define prices leading to an equilibrium that minimizes Peak to Average Ratio. In [12] they follow the same approach from [3], but with a strictly convex cost function. In [13], an online version of a scheduling mechanism for flexible appliances is proposed, which copes with price prediction errors. The literature related to realtime control of electricity flows on distribution grids does not consider RES and storage resources or does not take particular care of voltage deviations or thermal constraints.
Iii System Description
The low voltage distribution grid under study has one or more threephase fourconductors feeders to which households (with different distributions of resources: PV, batteries and flexible loads) are connected, all equipped with smart meters and with the possibility of controlling the flows they exchange with the electricity grid thanks to smart inverters [14]. Households agree on the exchange of energy with each other through a local energy market described in Section IIIA. Then, a RealTime Control mechanism (RTC) described in Section IIIB copes with forecast errors by driving households towards a final exchange with the grid that benefits the prosumer and respects the DSO’s quality of supply requirements. The RTC mechanism is combined with Dynamic Phase Switching (DPS) as described in Section IIIC for balancing load across phases.
Iiia Local renewable energy market
We consider the scheduling mechanism proposed in [5], where houses agree one hourahead of time, through a local market implemented over a blockchainbased transactive platform, on the amount of energy they exchange with each other on a 10 minutes basis. In addition to the exchange with neighbors, any remaining energy flow is contracted with the supplier. One hour ahead of every time slot, each house fixes the schedule of battery usage until the end of the day (moving window), imposing cycling and depth of discharge constraints aimed to extend the battery lifespan. The DSO provides agents with rewards for locally trading renewable energy when is best for the grid, which are attributed ex post to incentive agents to enforce their contracted quantities in realtime by absorbing all or part of their forecast errors with their flexibility budget^{2}^{2}2Flexibility from batteries/loads reserved for absorbing forecast errors..
IiiB Realtime control mechanism
Just before each time slot begins, prosumers update their forecast for the next 10 minutes and decide up to which point the error will be absorbed by their flexibility budget or by the electricity supplier. Deviating from the optimal flexibility schedule has an associated cost due to battery (or comfort) degradation, while deviating from the hourahead market committed quantities implies loosing part of the reward as well as the beneficial price. The costs of relying on extra flexibility, the final electricity price and the allocation of hourahead market rewards are described in Sections IVC, IVD and IVE respectively. In addition, during the time slots of high excess of production or demand, households will be charged a penalty fixed by the DSO through the transactive platform, associated to a constraint on the average flow that neighbors exchange with the grid. Such a price signal allows the DSO to influence the decision of households towards a final exchange with the grid that reduces voltage rises/drops and current flows.
IiiC Dynamic phase allocation
We need to ensure the flows across phases are as evenly distributed as possible in order to improve RTC mechanism performance, which is not aimed at balancing load across phases. We assume the operator is capable of deploying solid state switches in a subset of households and of controlling dynamically their allocation to phases as described in [15]. This functionality is complementary to the RTC mechanism.
Iv Model
We consider a set of competitive agents representing prosumers and a set of logical nodes on the feeder where the connections of several households are aggregated^{3}^{3}3e.g.: start of a branch or where points of measurement are deployed., referred to as points of common coupling (PCC). A household is connected to only one PCC. Households control the amount of energy exchanged with the grid by adapting the demand from batteries or flexible loads^{4}^{4}4We model the flexibility of loads as a small battery. A comprehensive model of demand elasticity is out of the scope of this work.. The goal of the operator is to influence households’ decisions in order to reduce voltage deviations and current flows.
Iva State of agents
The state of agents is composed by demand and production forecasts, by the quantities committed on the hourahead local market, and by the state of the battery at the beginning of the current time slot, determined by the State of Charge (SoC) and by the accumulated charge/discharge quantities. For each agent , the exante mechanism scheduled the usage of the battery for the current time slot to be , in order to exchange with the grid, where and are the amounts traded with neighbors and with the supplier, at prices and ( in the case of an injection) respectively, under a forecasted gap between production and consumption according to the following balance equation
(1) 
A closer to realtime forecast or a Very Short Term Load Forecast [16] enables each house to update its gap between consumption and production as , where is the error on hourahead production and load forecasts.
IvB Agents’ strategies
The realtime control of each household aims to decide at which extent the error will be absorbed by the grid or by demand flexibility. Thus, each agent decides on a strategy , where represents the amount of energy charged (negative) or discharged (positive) to/from the batteries and is the total amount of energy to be exchanged with the grid on the current time slot^{5}^{5}5All but one of the vector components are equal to zero. In future work this will not be the case, due to electric vehicles that can connect to any PCC. (includes the energy exchanged with neighbors and with the electricity supplier). The relationship between the battery flow and the grid flow is , the same as in (1).
IvC Batteries
The amount of energy stored in the battery of household at the end of current time slot is represented by . Its evolution in time is given by , where represents the energy on the battery at the beginning of current time slot.
Flexibility operations must respect the following constraint:
(2) 
bounding battery usage to the intersection of three segments:
Energy capacity
the battery cannot be discharged or charged beyond its minimum or maximum energy levels, and , which usually correspond to a SoC around 1020% and 8090% respectively, in order to preserve its lifetime. The scheduling mechanism limits the energy capacity available for hourahead trading to a range of SoC between 25% and 75%, reserving a share of the capacity for the RTC mechanism, which can use a depth of discharge between 10% and 90%.
Power capacity
maximum energy that can be discharged/charged on a single time slot, and respectively.
Cycling capacity
and are the charging and discharging cycling constraints. For instance, the hourahead scheduling mechanism limits battery usage to one daily cycle, while up to an extra cycle per day can be exploited by the RTC mechanism. This extra capacity is allocated to individual time slots in proportion to the corresponding dayahead forecasted production, in order to adapt the flexibility available during sun hours when forecast error variability is higher.
For batteries being operated myopically in realtime under such constraints, the degradation costs can be expressed as
(3) 
where and represent the use of demand flexibility and its corresponding costs, regardless of the source of flexibility being the battery or the elasticity of demand. In the case of batteries, and are parameters that must be chosen adequately to ensure that the costs for an extra use of the battery are compensated by the economic incentives, depending on battery characteristics [17] and on the flexibility budget reserved for the RTC mechanism. For the case of flexible loads, and represent a purely quadratic disutility function as was already proposed in [18, 19].
IvD Final electricity prices
With respect to prices, we need to take into account the two components of the hourahead commitment , which are the quantity traded with neighbors at price and the quantity contracted with the supplier at price (or at FeedIn Tariff (FIT) if the prosumer is selling). The price to pay for the effectively exchanged flow will be the following:
(4)  
where  
Such a price allocation models the fact that a household that consumes or injects more than what was agreed on the market is considered to have enforced the market transaction; the excess of consumption or injection will be charged or payed at the price or respectively. Otherwise, a house that consumes^{6}^{6}6The logic is similar if an agent agrees to inject energy for their neighbors. less than agreed on the market will pay , as if she had consumed the committed quantity, but will receive , which corresponds to automatically selling the difference to the supplier at a lower price ().
IvE Reward allocation
The reward attribution depends on the deviation from the hourahead committed quantities as follows:
(5) 
where the value is defined one hourahead by the DSO, for instance as a percentage of the transacted quantity. The reward gets reduced quadratically as the agent deviates from its hourahead committed quantity . Note that if the deviation is too big the reward becomes a penalty.
IvF Aggregative Constraint
The strategies of households are coupled by an aggregative constraint that enables DSO to indirectly enforce voltage deviations and thermal constraints. The constraint over the average strategy is as follows:
(6) 
where and are the maximum permitted aggregated flows on each PCC in order to conservatively enforce voltage deviations and thermal constraints. We denote as , the set of such that (6) is satisfied.
The constraints are obtained by the DSO through load flow sensibility analysis [8]. For instance, for a period of high injection we progressively increase the aggregate injection and we allocate the increase to individual household in proportion to their injection on the previous time slot. When a constraint is detected, the injections on the previous iteration are considered as the maximum power transit supported by the grid for the time slot. This procedure requires specific knowledge about the grid infrastructure (nodes, lines, impedances, etc.), which is not necessarily available for distribution grids. Such information can be estimated by using different measurements of power injection, voltage and/or current variations [20, 21, 22, 23, 24]. This would require short measurement campaigns after which a model of the grid can be obtained. Machine learning techniques can be applied to detect when a new measurement campaign for a model update is necessary.
IvG Problem definition
Each agent ’s goal is to find a strategy such that
(7)  
s.t.  
(8) 
where, is the local cost function that depends on the individual flow and on , a control (price^{7}^{7}7negative in case of peak of production and positive in a peak of demand.) signal broadcasted (on the transactive platform) by the DSO, which depends on the average strategy flow of houses and on , a penalty associated to the coupling constraint in (6). The parameter in constraint (8) corresponds to the maximum power capacity contracted with the supplier by household . We denote with the set of feasible values of .
The cost function is defined as:
(9) 
where the function reflects the costs that depend only on the individual strategy flow, which are the sum of battery/comfort degradation costs, reward allocation and final electricity pricing^{8}^{8}8Note that are convex piecewise linear functions, while functions are strictly convex and lstrongly convex for any ..
V Competitive aggregative game
The problem described above forms a competitive aggregative game, as the optimal response of an agent depends on the aggregate response of the rest of players and they all share a common penalty associated to a coupling constraint. Grammatico proved in [25] that such a game has an aggregative equilibrium under assumptions on functions being lstrongly convex and on compactness, convexity and Slater’s qualification [26] of the sets and . Note that we need to avoid the operator fixing constraints that are not attainable with the feasible responses of households. For this we assume that the DSO can estimate the set or that, for instance, households could be asked to communicate their flexibility budget for every time slot in which the realtime control mechanism is activated. Aggregative equilibrium is defined as follows.
Definition 1:
Aggregative equilibrium. A tuple is an Aggregative equilibrium, for the game described in (7) with the coupling constraint in (6) if , and for all ,
(10) 
Va Iterative Process
Such an equilibrium can be attained by following the semidistributed approach proposed by Grammatico [25, Section III]. The mechanism relies on households responding optimally to the incentive signal . The iterative process to attain an aggregative equilibrium starts at the beginning of the 10 minutes time slot with a period of around 10 seconds^{9}^{9}9While the time between blocks on the blockchainbased transactive platform described in [5] is of around 5 seconds., which should enable households to adapt to penalty changes, while providing enough iterations for the semidistributed algorithm to converge to the equilibrium. At the beginning of th iteration, the operator will estimate the aggregated optimal response on the previous iteration by measuring the flows on each PCC of the corresponding feeder. Then it will update the signal , using the dynamic control law proposed in [25, Section III]. The signal will then reach the prosumers through the next published block on the transactive platform. At the detection of a change in signal , each agent will proceed to update its optimal response , by updating its battery optimal flow from (1).
In each iteration, prosumers decide on the energy flow to exchange with the grid on the whole 10 minutes, while relying on forecast done at the beginning of the time slot and on measurements of energy flows and battery usage up to the current iteration. The relationships on the optimal flows for the entire time slot and the flows up to iteration are as follows
(11a)  
(11b) 
where corresponds to the flow exchanged with the grid up to the th iteration and to the future energy flow up to the end of the time slot. The notation is the same for battery flows. Note that we assume households have access to the cumulated energy exchanged with the grid , through the smart meter, and to the corresponding battery usage , through the smart inverter/battery controller.
The model we apply is deterministic, as it does not consider that the state of agents can change during the negotiation process towards the equilibrium. It relies then on the forecast done by households at the beginning of each time slot to be perfect. An analysis of the sensibility to very short term forecast errors and the possibility of applying stochastic game theory are subjects of future research.
Under such a deterministic scenario, each household will define the battery setting for the rest of the time slot as follows
(12) 
where (1) and (11b) were used. Here we assume that households set their batteries to the value so that if the flows are maintained up to the end of the time slot the total flow exchanged with the grid during the time slot would be .
The iteration procedure towards an aggregative equilibrium is summarized as follows
Vi Simulations and Results
Via Procedure and system scenario
The simulation of the realtime control mechanism relies on local energy market results and on an allocation of households to phases updated by a DPS mechanism. Those two additional mechanisms are simulated following the procedures described in [5] and [15] respectively.
We consider the forecast used by households for the hourahead market to be a dayahead persistence forecast, and the updated forecast just before the time slot to be perfect, which allows us to apply a deterministic model.
With respect to the monitoring period, the RTC mechanism is only launched if during the previous time slot we detected a voltage deviation of 9% or a current flow above 70% of the thermal limit. To simulate such monitoring we realize load flow studies for every time slot in high sun hours (from 10 am to 2 pm), and when a risk of constraint is detected the RTC mechanism is launched.
We consider a distribution grid composed of one feeder with 50 households, 60% of which are equipped with a battery and 80% with a PV panel. All households participate on the market and are eligible for dynamic phase switching. With respect to the level of aggregation of households on each logical PCC, we consider one PCC per phase of the feeder. This means that all the houses on the same phase are considered to share the same logical PCC. This keeps the model simple and independent of the physical structure of the feeder and the distribution of households. Furthermore, the measurements needed by the DSO to implement the realtime control mechanism are currently available at this level of aggregation without the need of deploying further measurement devices.
ViB Simulation tools and parameters
To implement the mechanism described in Algorithm 1, we use MATLAB [27] together with the Gurobi [28] optimization suite. For the power flow analysis, we rely on the Distribution Network Simulation Platform (DisNetSimPl) developed by EDF R&D. We rely on an electricity network model conformed by a 20 kV/410 V transformer of 160 kVA rated power and a feeders with 70 aluminum power lines.
The parameters used for the simulations were the following:
Load profiles 
We use realistic synthetic consumption data obtained from the Multiagent Simulator of Human Behavior SMACH [29] as input for the household optimization problem. The load curves correspond to 7 winter days of consumption on a 1minute basis from 50 households of mixed profiles.
Production profiles 
We consider the same synthetic production curve for all the PV panels (all located on the same area), but the profile varies on a daily basis.
Batteries 
We consider ideal batteries of 9 kWh total capacity. Up to 6 kWh (10% to 77%) are allowed to be used for local market exchanges in order to preserve the battery lifespan while reserving a share (1.2 kWh) of the capacity to the RTC mechanism, which can use up to 7.2 kWh (10% to 90%) of the capacity and perform an additional cycle^{10}^{10}10This would be similar to allowing batteries to cycle up to two times in a day. Nevertheless, we preallocate the flexibility budget to individual time slots proportionally to the forecasted energy production, without the possibility of accumulating the budget that is not used. for absorbing forecast errors. For the case of flexible appliances, whose elasticity is entirely reserved for the RTC mechanism, we consider up to 1 kWh of energy is available for coping with forecast errors^{11}^{11}11A higher amount could be considered taking into account that only a water heater can consume more than 5 kWh a day.
Electricity prices 
We consider a common supplier offering a Time Of Use pricing with two levels: 15 câ¬/kWh from 12 am to 4 pm and 20 câ¬/kWh from 5 pm to 11 pm. While the FIT is considered to be 10 câ¬/kWh.
ViC Results and discussion
We analyze the performance of the RTC mechanism during the time slots with high renewable energy production (between 10 am and 2 pm). In particular, we are interested in cases where we observe that thermal or voltage limits are breached, or close to the limits, for the scenario without RTC. From the 7 days analyzed on the simulations we focus only on the most critical one. First, we analyze voltage deviations with respect to the nominal value and then the reduction of current intensity over the lines. We compare three cases, one without any control from the DSO in realtime, one with DPS only and one applying the RTC mechanism coupled with DPS. For the first two cases households optimize their electricity bill with the signal being for all time slots.
ViC1 Reduction of Voltage deviations
We start by analyzing the impact of the RTC mechanism in voltage deviations along the feeder. In Figure 1, we see four surfaces, the red (planar) surface shows the voltage limit during the period in which RTC was active (from time slot 64 up to 74), the dark blue one shows the voltage deviations observed without any DSO control, the light blue one with only DPS being applied and the green one applying the RTC mechanism coupled with DPS. While for the cases without RTC we can observe the voltage limits being violated (when the corresponding surfaces go above the limit), the application of RTC combined with DPS achieves consistent reductions of (maximum) voltage deviations. This can be observed as the green surface (RTC + DPS) goes below the others starting from time slot 64 and up to time slot 74. These results demonstrate the capacity of RTC combined with DPS for avoiding voltage limit breaches.
ViC2 Reduction of current flows through the lines
With respect to the current flows through the lines, in Figure 2 we show the current intensity along the Feeder during the monitoring period. The red (planar) surface shows the thermal limit during the period in which RTC was active. During this period we can clearly appreciate considerable reductions of current intensity all along the feeder avoiding the violation of thermal constraints that are observed for the two cases without RTC^{12}^{12}12The rebound effect after the end of the RTC period, as in most demand response applications, happens when current and voltage levels are safer.. Such reductions are enough to avoid or postpone the replacement of entire line segments, which directly translates into a considerable reduction of infrastructure investment.
ViC3 Dynamic control mechanism performance
With respect to the performance of the dynamic control mechanism to attain the aggregate equilibrium, we observed an improvement of the convergence when combining RTC with DPS. Without the DPS mechanism the mean amount of iterations was over 60 (10 minutes), which would not be applicable to our setting without further tuning. The DPS mechanism brought the mean convergence time to 5 minutes, with a maximum of 39 iterations, which is adequate for our setting. This is probably due to the fact that our level of logical PCC aggregation is the phase, and if the loads and their DER are better distributed among phases the mechanism converges faster. For instance, if one of the phases has little or no flexibility budget, then the convergence will be slower. After convergence, each household just needs to put the battery to track the optimal flow to exchange with the grid during the rest of the time slot.
Vii Conclusions and perspectives
Local energy markets enable households to exchange energy with each other while increasing the amount of renewable energy that is consumed locally. Such markets increase the capacity of distribution grids for hosting renewable energies, but, as all exante mechanisms, local market schedules rely on hourahead forecasts whose accuracy may be low. We propose a gamebased realtime control mechanism to cope with forecast errors by driving households to a final exchange with the grid that benefits both the prosumer and the DSO. The proposed game has an aggregative equilibrium which can be attained in a semidistributed manner with a number of iterations independent of the amount of households.
The performance of the mechanism is evaluated through load flow analysis and realistic load curves for a scenario with 50 households, where 80% of them are equipped with PV panels and 60% with storage. The simulations show that without the control mechanism the grid would not be capable of hosting such level of penetration of renewable energies. However, when the realtime control mechanism is applied in combination with dynamic phase allocation, maximum voltage deviations and current intensities are considerably reduced, avoiding the violations of voltage deviation and thermal constraints. We show that the proposed realtime mechanism is capable of adjusting the flows issued from local market commitments towards an equilibrium that optimizes the prosumers’ electricity bill while increasing the capability of the distribution grid to support the energy transition.
The performance of the proposed realtime market mechanism can be further improved by better selecting the parameters of the dynamic control scheme and of the local cost functions. The economic performance for the DSO and the performance of the equilibrium with respect to social welfare require further analysis. With respect to the combination with the dynamic phase switching approach, the selection of households and the switching mechanism could be specifically adapted to further reduce voltage deviations. We are currently working on a sensibility analysis to very short term load/production forecast errors that could provide valuable insights for the development of stochastic game models.
References
 [1] A. Molderink, V. Bakker, M. G. C. Bosman, J. L. Hurink, and G. J. M. Smit, “Management and control of domestic smart grid technology,” IEEE Transactions on Smart Grid, vol. 1, no. 2, pp. 109–119, Sept 2010.
 [2] P. Samadi, H. MohsenianRad, R. Schober, and V. W. S. Wong, “Advanced demand side management for the future smart grid using mechanism design,” IEEE Transactions on Smart Grid, vol. 3, no. 3, pp. 1170–1180, Sept 2012.
 [3] A. H. MohsenianRad, V. W. S. Wong, J. Jatskevich, R. Schober, and A. LeonGarcia, “Autonomous demandside management based on gametheoretic energy consumption scheduling for the future smart grid,” IEEE Transactions on Smart Grid, vol. 1, no. 3, pp. 320–331, Dec 2010.
 [4] N. Li, L. Chen, and S. H. Low, “Optimal demand response based on utility maximization in power networks,” in 2011 IEEE Power and Energy Society General Meeting, July 2011, pp. 1–8.
 [5] J. Horta, D. Kofman, D. Menga, and A. Silva, “Novel market approach for locally balancing renewable energy production and flexible demand,” in 2017 IEEE International Conference on Smart Grid Communications (SmartGridComm), Oct 2017, pp. 533–539.
 [6] C. Cecati, C. Citro, and P. Siano, “Combined operations of renewable energy systems and responsive demand in a smart grid,” IEEE Transactions on Sustainable Energy, vol. 2, no. 4, pp. 468–476, Oct 2011.
 [7] W. Shi, N. Li, C. C. Chu, and R. Gadh, “Realtime energy management in microgrids,” IEEE Transactions on Smart Grid, vol. 8, no. 1, pp. 228–238, Jan 2017.
 [8] A. Borghetti, M. Bosetti, S. Grillo, S. Massucco, C. A. Nucci, M. Paolone, and F. Silvestro, “Shortterm scheduling and control of active distribution systems with high penetration of renewable resources,” IEEE Systems Journal, vol. 4, no. 3, pp. 313–322, Sept 2010.
 [9] P. Vytelingum, T. D. Voice, S. D. Ramchurn, A. Rogers, and N. R. Jennings, “Agentbased microstorage management for the smart grid,” in Proceedings of the 9th International Conference on Autonomous Agents and Multiagent Systems: Volume 1  Volume 1, ser. AAMAS ’10. Richland, SC: International Foundation for Autonomous Agents and Multiagent Systems, 2010, pp. 39–46. [Online]. Available: http://dl.acm.org/citation.cfm?id=1838206.1838212
 [10] S. D. Ramchurn, P. Vytelingum, A. Rogers, and N. Jennings, “Agentbased control for decentralised demand side management in the smart grid,” in The 10th International Conference on Autonomous Agents and Multiagent Systems  Volume 1, ser. AAMAS ’11. Richland, SC: International Foundation for Autonomous Agents and Multiagent Systems, 2011, pp. 5–12. [Online]. Available: http://dl.acm.org/citation.cfm?id=2030470.2030472
 [11] P. Samadi, H. MohsenianRad, R. Schober, and V. W. S. Wong, “Advanced demand side management for the future smart grid using mechanism design,” IEEE Transactions on Smart Grid, vol. 3, no. 3, pp. 1170–1180, Sept 2012.
 [12] H. M. Soliman and A. LeonGarcia, “Gametheoretic demandside management with storage devices for the future smart grid,” IEEE Transactions on Smart Grid, vol. 5, no. 3, pp. 1475–1485, May 2014.
 [13] R. Deng, Z. Yang, J. Chen, N. R. Asr, and M. Y. Chow, “Residential energy consumption scheduling: A coupledconstraint game approach,” IEEE Transactions on Smart Grid, vol. 5, no. 3, pp. 1340–1350, May 2014.
 [14] D. Pignier and D. Menga, “Energy management device and its associated method,” Mar. 19 2013, uS Patent App. 14/778,455.
 [15] J. Horta, D. Kofman, D. Menga, and M. Caujolle, “Augmenting DER hosting capacity of distribution grids through local energy markets and dynamic phase switching,” New York, NY, USA, 2018, to be published.
 [16] Y. H. Hsiao, “Household electricity demand forecast based on context information and user daily schedule analysis from meter data,” IEEE Transactions on Industrial Informatics, vol. 11, no. 1, pp. 33–43, Feb 2015.
 [17] Z. Ma, S. Zou, and X. Liu, “A distributed charging coordination for largescale plugin electric vehicles considering battery degradation cost,” IEEE Transactions on Control Systems Technology, vol. 23, no. 5, pp. 2044–2052, 2015.
 [18] P. Samadi, A. H. MohsenianRad, R. Schober, V. W. S. Wong, and J. Jatskevich, “Optimal realtime pricing algorithm based on utility maximization for smart grid,” in 2010 First IEEE International Conference on Smart Grid Communications, Oct 2010, pp. 415–420.
 [19] L. Gkatzikis, I. Koutsopoulos, and T. Salonidis, “The role of aggregators in smart grid demand response markets,” IEEE Journal on Selected Areas in Communications, vol. 31, no. 7, pp. 1247–1257, 2013.
 [20] Q. Zhou and J. Bialek, “Simplified calculation of voltage and loss sensitivity factors in distribution networks,” in Proc. 16th Power Syst. Comput. Conf.(PSCC2008), 2008.
 [21] K. Christakou, J. Y. LeBoudec, M. Paolone, and D. C. Tomozei, “Efficient computation of sensitivity coefficients of node voltages and line currents in unbalanced radial electrical distribution networks,” IEEE Transactions on Smart Grid, vol. 4, no. 2, pp. 741–750, June 2013.
 [22] D. Deka, S. Backhaus, and M. Chertkov, “Estimating distribution grid topologies: A graphical learning based approach,” in 2016 Power Systems Computation Conference (PSCC), June 2016, pp. 1–7.
 [23] ——, “Learning topology of distribution grids using only terminal node measurements,” in 2016 IEEE International Conference on Smart Grid Communications (SmartGridComm), Nov 2016, pp. 205–211.
 [24] ——, “Learning topology of the power distribution grid with and without missing data,” in 2016 European Control Conference (ECC), June 2016, pp. 313–320.
 [25] S. Grammatico, “Dynamic control of agents playing aggregative games with coupling constraints,” IEEE Transactions on Automatic Control, 2017.
 [26] S. Boyd and L. Vandenberghe, Convex optimization. Cambridge university press, 2009.
 [27] MATLAB, version 8.6.0 (R2015b). Natick, Massachusetts: The MathWorks Inc., 2015.
 [28] I. Gurobi Optimization, “Gurobi optimizer reference manual,” http://www.gurobi.com, 2016, accessed: 20180220.
 [29] E. Amouroux, T. Huraux, F. Sempé, N. Sabouret, and Y. Haradji, “Simulating human activities to investigate household energy consumption.” in ICAART (2), 2013, pp. 71–80.