A Decentralized Framework for RealTime Energy Trading in
Distribution Networks with Load and Generation Uncertainty
Abstract
The proliferation of smallscale renewable generators and priceresponsive loads makes it a challenge for distribution network operators (DNOs) to schedule the controllable loads of the load aggregators and the generation of the generators in realtime. Additionally, the high computational burden and violation of the entities’ (i.e., load aggregators’ and generators’) privacy make a centralized framework impractical. In this paper, we propose a decentralized energy trading algorithm that can be executed by the entities in a realtime fashion. To address the privacy issues, the DNO provides the entities with proper control signals using the Lagrange relaxation technique to motivate them towards an operating point with maximum profit for entities. To deal with uncertainty issues, we propose a probabilistic load model and robust framework for renewable generation. The performance of the proposed algorithm is evaluated on an IEEE 123node test feeder. When compared with a benchmark of not performing load management for the aggregators, the proposed algorithm benefits both the load aggregators and generators by increasing their profit by 17.8 and 10.3, respectively. When compared with a centralized approach, our algorithm converges to the solution of the DNO’s centralized problem with a significantly lower running time in iterations per time slot.
Keywords: priceresponsive load, generation uncertainty, distributed algorithm, trading market.
00000Sup
I Introduction
One goal of the emerging smart grid is to move distribution systems towards a smarter and more secure network through integrating twoway communication infrastructure. The information exchange provides distribution network operators (DNOs) with sophisticated management and monitoring systems to perform complex analyses and automated operations in near realtime. Furthermore, drivers such as distribution organizations have accelerated the expansion of applications for smart grid technologies, such as smart meters, and integration of renewable energy generators. Resulting benefits include a more efficient use of electric appliances in households to reduce the energy bill payment for the load aggregators and lower operation cost for the generators, as well as a higher flexibility for the DNO to enhance the system’s technical operation; thereby reaching a triplewin condition.
The DNO is responsible for optimal power flow (OPF) analysis. There are challenges in solving the OPF problem by the DNO. First, the OPF can be computationally difficult to be solved, especially when the number of decision variables increases by participation of the priceresponsive load aggregators in the energy market. Second, the DNO may violate the entities’ privacy, e.g., by revealing the load aggregators’ demand information and generators’ cost parameters to the DNO. Third, the DNO is uncertain about the load demand and renewable generation ahead of time.
There have been some efforts in the literature to tackle the abovementioned challenges. We divide the related works into three main threads. The first thread is concerned with decentralized energy management programs for a market with multiple suppliers and multiple users. Mechnisms such as the multilevel game methods [1], Stackelberg game [2], dual decomposition method [3], supply bidding framework [4], and hierarchical bidding [5] have been used. However, these approaches did not consider the constraints imposed by the topology and operation of the distribution network. The second thread is concerned with including the power flow equations in the decentralized energy management procedure. To achieve this goal, different techniques such as convex relaxation [6, 7, 8, 9], quadratic programming [10], alternating direction method of multipliers (ADMM) [11, 12, 13], and Lagrange relaxation method [14, 15] have been used. These studies, however, did not consider the uncertainties in the renewable generators and load demand. Furthermore, these studies mainly focused on offline algorithms, which are applicable in dayahead markets. The third thread concerned with the online operation of distribution systems using different mechanisms such as realtime closedloop control [16], differential evolution optimization [17], online gradient method [18], projected gradient descent [19], online mirror descent [20], and graph theorybased approach [21]. These works, however, did not mentioned how to consider the uncertainty in the load demand for users in smart distribution networks.
In this paper, we focus on designing a distributed algorithm for an electricity trading market with renewable energy generators and priceresponsive residential load aggregators. In each time slot (e.g., every hour), the load aggregators and generators use the communication infrastructure in the smart grid to exchange information with the DNO and jointly maximize their profit, while considering the uncertainty in the future demand and renewable generation. The privacy of each entity is protected in the proposed framework, as the generators and load aggregators solve their own profit maximization problem using the locally available information. The main challenges that we address are tackling the uncertainty in the load demand and renewable generation, as well as determining the proper control signals communicated between the DNO, generators, and load aggregators that enforce the proposed distributed algorithm to converge to the solution of the DNO’s centralized problem with the objective of maximizing the social welfare.
The main contributions of this paper are as follows:

Uncertainty Issues and Risk Evaluation: To address the uncertainty in the load demand, we propose a probabilistic load estimation for the electric appliances of the residential users served by each load aggregator. It enables each load aggregator to schedule the electric appliances of its users in realtime, while taking into account the impacts of its decision on the load profile in the upcoming time slots. We also consider an adaptive robust decision making framework for the renewable generators to optimize the risk of power shortage based on an adjustable confidence level. It enables the generators to limit their cost for compensating the generation shortage. It also enables the DNO to prevent high voltage drop caused by the shortage in the total renewable generation.

Distributed Algorithm Design: To protect the privacy of the load aggregators and generators, as well as to address the computational complexity of the DNO’s centralized problem, we propose a decentralized algorithm that can be executed by the entities in realtime. Each entity requires to share limited information to meet its local objective, while satisfying the physical constraints of the linearized ac power flow in the distribution network.

Performance Evaluation: Simulations are performed on an IEEE 123bus test feeder with generators and load aggregators. When compared with the benchmark of not performing load management, the proposed algorithm benefits the load aggregators and generators by increasing their profit by and on average, respectively. Furthermore, it helps generators to reduce the peaktoaverage generation ratio by . Our algorithm converges to the solution of the centralized problem with a significantly lower execution time.
The rest of this paper is organized as follows. Section II introduces the system model. Section III formulates the DNO’s centralized and decentralized problems. A decentralized algorithm is proposed. Section IV provides the simulation results, followed by Section V that concludes the paper. Appendices AF can be found in the supplementary document.
Ii System Model
Consider an electricity market with a set of load aggregators and a set of generators scattered in a distribution network. Each load aggregator is responsible for managing the load demand of its electricity users. Each generator sells electricity to the market. The load aggregators and generators use a twoway communication infrastructure to exchange information with the DNO. The entities are also connected to each other through the electric power distribution network. The DNO is a neutral entity responsible for monitoring the power flow in the network. For simplicity in the problem formulation, we assume that each bus in the network has exactly one load aggregator or one generator. If both load aggregator and generator are connected to the same bus, we divide that bus into two buses connected to each other through a line with zero impedance. If neither load aggregator nor generator is connected to a bus, we propose to add a virtual load aggeragtor with zero demand for that bus. It enables us to denote the set of buses by and refer a load aggregator or a generator by its bus index. We use notation to denote the set of branches.
The overall trading horizon is denoted by , where is the number of time slots with equal length (e.g., each time slot is one hour). Notice that the load management decision of a load aggregator in the current time slot affects its demand in the upcoming time slots. Meanwhile, the generators need to match their generation level with the changes in the load demand. Hence, generators also need to modify their generation for the current and upcoming time slots. To avoid an abuse of notations, hereafter, we use index for a time slot in general and use index specifically for the current time slot.
The general idea of this paper for implementing a realtime energy trading can be summarized as follows. At the beginning of the current time slot , the entities optimize the demand and generation profiles over the period , but apply only the obtained decision for the current time slot . The scheduling procedure is performed with uncertainty about the load demand and renewable generation in the upcoming time slots . Hence, the entities repeat the optimization procedure at the beginning of the next time slot to update their scheduling decision with the revealed demand/generation information. We aim to answer two key questions:
Q.1 How do the entities interact with the DNO to determine their optimal load an generation profiles in the current time slot with the locally available information?
Q.2 How do the entities address the lack of information about the demand and generation in the upcoming time slots?
Iia Load Aggregator’s Model
In this subsection, we address questions Q.1 and Q.2 for residential load aggregators by modeling the electric appliances and providing a probabilistic load estimation technique.
IiA1 Users’ Appliances Model
Load aggregator is responsible for scheduling its users’ electric appliances. An electric appliance is either asleep or awake in the current time slot . Let and denote the sets of asleep and awake appliances in the current time slot , respectively. An awake appliance is available to be scheduled for operation, i.e., the load aggregator schedules the power consumption profile .
The awake appliance provides the load aggregator with its scheduling horizon, utility function, and type using the smart meter inside the household. The scheduling horizon defines the time interval over the upcoming time slots, in which the appliance should be scheduled. The utility function is used to model the satisfaction of the customer in monetary units from using the appliance. It is generally an increasing and concave function of the consumption profile . The type of appliance depends on its specifications and the customer’s preferences. Inspired by the work in [22], we consider three types of appliances:
The appliance with type 1 should be operated within the scheduling horizon and turned off in other time slots. Examples include the electric vehicle (EV) and dish washer. Let denote the set of appliances with type 1 that are awake in the current time slot . We have
(1a)  
(1b)  
(1c) 
The utility obtained from using a type 1 appliance depends on the total power consumption. The utility can be expressed as , e.g., with a concave function and nonnegative constant .
The appliances of type 2 can be operated in time slots out of the scheduling horizon, but the customer attains a relatively low utility, e.g., TV and personal computer. Let denote the set of appliances of type 2 that are awake in the current time slot . We have
(2a)  
(2b)  
(2c) 
The utility function for type 2 appliances depends on both the amount of power consumption and the time of consuming the power, i.e., the customer would gain different benefits from consuming the same amount of power at different times, e.g., watching the favorite TV program. We have . As a concrete example, utility function with a concave function and time dependent nonnegative coefficients and , is a viable candidate.
The appliances of type 3 can be operated out of the scheduling horizon without any constraint on their total power consumption, such as lighting and refrigerator. Let denote the set of appliances of type 3 that are awake in the current time slot . We have
(3a)  
(3b) 
The utility attained by the customer from using the appliances with type 3 depends on the amount of power consumption within the scheduling horizon , but not the time of consumption. The customer attains a relatively low utility out of interval . Function with a concave function and nonnegative constants and , is a viable candidate.
The total utility of load aggregator in the current time slot with decision vector is
(4) 
IiA2 Load Estimation
The actual wakeup times of the appliances are not available to the load aggregator in advance. To address this lack of information, load aggregator can collect the sleepawake historical data record of each appliance and estimate the probability that each appliance becomes awake at each time slot . In appendix A, we show the conditional probability that the appliance becomes awake in an upcoming time slot , given that it has not become awake until the current time slot, , is
(5) 
A load aggregator has no information about the scheduling horizon, users’ utility, and type of the appliances ahead of time. For decision making at the current time slot , we consider the worstcase scenario, in which the electric appliances that become awake in the upcoming time slots should be operated once they become awake without any control on power consumption, i.e., and . The payment of the load aggregator in the worstcase scenario is an upperbound for its actual payment. Hence, minimizing the worstcase payment implies reducing the risk of high payment. For the current time slot , the worstcase expected electric demand of the currently sleeping appliances in an upcoming time slot is
(6) 
where parameter is the operation duration of the appliance that becomes awake in upcoming time slot . The value of is equal to the probability that a currently sleeping appliance is operating in the upcoming time slot .
For the given current time slot , we use the notation to denote the profile of active power consumption of the users during time interval . We have
(7) 
To model the reactive power consumption for a load aggregator , we consider a constant power factor . The reactive power for load aggregator in time is .
IiA3 Local Optimization Problem
Constraints (1a)(7) define the feasible set for decision vector of load aggregator in the current time slot . Load aggregator aims to maximize the profit , which includes the total utility in (4) minus the payment to the DNO over period . The DNO provides load aggregator with the price for a unit of active power in each time slot . We assume that load aggregators do not pay for the reactive power. We have
(8) 
Load aggregator solves the following optimization problem in time slot to determine decision vector :
(9a)  
(9b) 
IiB Generator’s Model
In this subsection, we address questions Q.1 and Q.2 for the generators by modeling the conventional and renewable units and providing a robust optimization technique for renewables.
IiB1 Conventional Unit
In general, the generation cost function of the conventional unit of generator in time slot is an increasing convex function of [23]. The class of quadratic functions is wellknown. For the given current time slot , generator offers the profiles of active and reactive powers and for the current and upcoming time slots.
IiB2 Renewable Unit
Without loss of generality, we assume that the renewable plants are operated at unity power factor. Given the current time slot , generator with renewable unit offers an active power profile for its renewable unit. To prevent noncredible high renewable generation offers, the DNO charges generator by the unit price ($/MW) for generation shortage in time slot . To cope with the uncertainty issues, we consider a robust decision making for generators with renewable units. Generator can uses the historical data record to forecast an uncertainty bound for its actual renewable generation in time slot . Generator considers the cost of the worstcase scenario for generation shortage as follows:
(10) 
The feasible set for the renewable generation profile can be defined based on all scenarios that satisfy . However, it is very conservative and possibly inefficient to take into account all possible scenarios. Inspired by the work in [24], we consider an adaptive robust model. In the current time slot , the uncertainty space for the generation profile in the time interval is defined as
(11) 
where is the confidence level parameter for generator in the current time slot . The space defined in (IIB2) is a singleton, corresponding to the leastconservative scenario when . As increases, the size of the uncertainty set enlarges, and the resulting robust solution is more conservative. The space includes all possible scenarios when . In [24], is known and fixed. Whereas, we consider parameter as a variable that should be optimized by generator .
IiB3 Local Optimization Problem
For a given current time slot , generator decides on the generation profile and the confidence level . The objective of generator is to maximize its profit , which is the revenue from selling active and reactive powers minus the generation cost and financial risk in (10). That is
(12) 
The problem for generator in the current time slot is
(13a)  
(13b)  
(13c)  
(13d) 
IiC DNO’s Model
We address Q.1 and Q.2 for the DNO in the following.
IiC1 Linearized ac Power flow
We consider balanced distribution networks. The model for unbalanced networks is a research for future work. The ac power flow equations are nonlinear and nonconvex. An alternative is to use a linearized ac power flow. Let and denote the vectors of injected active power and reactive power to all buses in time . Let and denote the voltage magnitude and phase angle of bus in time . We define the gridwide vectors and in time slot . Let and denote the real and reactive parts of the entry in bus admittance matrix . Let and denote the shunt susceptance and conductance at bus . In Appendix B, we show that the linearized ac power flow can be expressed as
(14) 
where the diagonal element of matrices and are and , respectively. The nondiagonal elements of both and are . The diagonal element of matrices and are and , respectively. The nondiagonal elements of both and are . In Appendix C, we show that, in time slot , the linearized active and reactive power flow through line with resistance and reactance can be calculated as:
(15a)  
(15b) 
The apparent power flow is upper bounded by , which implies that the feasible real and reactive powers are bounded by a circle. To linearize the constraint, a piecewise approximation of the boundary by a regular polygon with central angle can be used. In Appendix D, we obtain the following constraints
(16) 
where . For each bus , we also have
(17) 
IiC2 DNO’s Centralized Optimization Problem
The DNO considers the impact of renewable generation shortage on the technical operation of the network. As a concrete example, the risk of voltage drop at different buses is a viable choice for the DNO. The DNO considers function of the gridwide renewable generation for the voltage variations as
(18) 
where is voltage magnitude of bus in the worstcase scenario, when all renewable generators’ power are in time slot . The uncertainty space that the DNO considers for renewable generator is defined as (IIB2).
We consider the objective of maximizing the social welfare for the DNO. Considering the gridwide vectors and , and , the DNO’s objective function is
(19) 
where is a positive weighting coefficient. We formulate the DNO’s centralized problem as
(20a)  
(20b) 
Problem (20) has a concave objective function and linear constraints due to the concavity of the load aggregators’ utility function, the convexity of the generation cost function, and the linearity of the ac power flow model in (14). Hence, we have: Theorem 1 The optimal solution to the DNO’s centralized problem in (20) is unique.
To solve the centralized problem (20), the DNO needs the information about the load aggregators’ utilities, generators’ generation cost, and renewable units’ forecast data. However, these information may not be available to the DNO. Instead, we develop a decentralized algorithm by showing that the DNO can determine and , as well as the penalties for such that when the load aggregators solve (9) and generators solve (13), the resulting solution coincides with the unique solution of problem (20).
Iii Decentralized Algorithm Design
Given the current time slot , the decision vector of load aggregator is load profile of the awake appliances. Further, the decision vector of generator is the generation profile and the confidence level . The DNO influences the entities by using the nodal prices , , and penalties .
One wellknow technique to determine the proper values of the nodal prices , , and penalties is to formulate the partial Lagrangian relaxation of the DNO’s centralized problem (20) [14, 25, 15]. Let and denote the Lagrange multipliers associated with the equality constraints for the injected active power and reactive power in (14). We move these constraints with their Lagrange multipliers to the objective function of the centralized problem in (20). In equation (S12) of Appendix E, we obtain the objective function of the relaxed problem. Due to the convexity of problem (20) and linearity of the constraints, the strong duality gap condition (Slater’s condition) is satisfied if a feasible solution exist [26, Ch. 5]. Thus, the optimal solution to the relaxed problem is equal to the optimal solution to the primal problem (20). Using the relaxed problem enables us to determine the price signals , , and based on the Lagrangian decomposition technique, such that the market equilibrium among load aggregators and generators coincides with the optimal solution of the centralized problem (20).
Theorem 2 The equilibrium of the energy market coincides with the unique solution to the DNO’s centralized problem in (20) if and only if for the DNO sets
(21a)  
(21b)  
(21c)  
(21d) 
where is the entry of the inverse of matrix in (14).
The proof can be found in Appendix E. It suggests a decentralized algorithm to determine the solution to problem (20).
We propose Algorithm 1 that can be executed by the load aggregators, generators, and DNO in realtime. In Algorithm 1, when the current time slot begins, each load aggregator determines the power consumption profile of all awake appliances over time slots . Each generator obtains the profiles of active and reactive powers and of the conventional unit and generation profile . The entities use the obtained scheduling decision for upcoming time slots as an initial decision in the next time slot .
In each time slot , Algorithm 1 is executed in an iterative fashion. Let denote the iteration index. Our algorithm involves the initiation phase and market trading phase.
Initiation phase: Lines 1 to 9 describe the initiation phase.
Market trading phase: The loop involving Lines 10 to 18 describes this phase, which includes the following parts:
a) Information exchange: In Line 11, each load aggregator uses (7) to obtain its demand profile , and sends to the DNO. Each generator sends the profiles , , and to the DNO.
b) DNO’s update: In Line 12, the DNO receives the information from the entities, it obtains the updated vector as
(22) 
where is the gradient operator, and is the projection onto the feasible set defined by constraints in (20b). Recall that is the objective function of the DNO’s relaxed problem, which is given in equation (S12) in Appendix E. The DNO uses (21a)(21d) to compute the updated prices and and penalties for all buses.
c) Load aggregator’s update: When load aggregator receives the control signal from the DNO, in Line 9, it updates its controllable load profile by solving its local problem (9), which is convex and can be efficiently solved at each iteration. Note that the utility function in (8) is a concave function.
d) Generator’s update: When generator receives signals , and , it updates its generation profile and decision variable , by solving its local problem in (13). This problem is a linear problem and can be solved efficiently by the generator using its local information about its conventional and renewable units.
e) Step size update: We use a nonsummable diminishing step size. In Line 17, the step size is updated.
We emphasize that in Algorithm 1, the DNO needs to consider on bus (e.g., the substation bus) as the slack bus.
Iv Performance Evaluation
In this section, we evaluate the performance of our proposed decentralized algorithm on an IEEE 123node test feeder. The original test system is unbalanced. For all unbalanced case studies, we construct a balanced test system by ignoring the phasetophase admittance and replace all multiphase lines with a onephase line with average inductance and resistance of the phases. The data for the test system can be found in [27]. We consider the configuration, where all switched are open. The slack bus is the substation bus. The trading horizon is one day with time slots. We add generators at different buses and assume that each load aggregator serves between to . In Appendix F, we provide the simulation setup[28, 29]. For the benchmark scenario, we consider a system without demand response program for all load aggregators; thus, users operate their appliances right after they become awake. We perform simulations using Matlab R2016b in a PC with processor Intel(R) Core(TM) i73770K CPU@3.5 GHz.
Iv1 Load aggregators’ strategy
Each load aggregator executes Algorithm 1 to schedule the appliances of its users. Fig. 4 shows the load profile of the load aggregators in buses , , , and in the benchmark scenario and the scenario with load scheduling. Peak shaving can be observed in the load profiles. Since Algorithm 1 is executed in realtime, the load aggregators can only modify the demand for upcoming time slots using the revealed information about the awake appliances in the current time slot and the estimated load demand for future time slots. Results for all load aggregators verify that by executing Algorithm 1, the peak load demand is reduced by in average. Load scheduling is performed by each load aggregator with the goal of increasing the profit in (8). Fig. 4 shows that the profit of the load aggregators , , , and is increased. Specifically, results show that the profit for all load aggregators is increased by on average, since they can benefit from the price fluctuations by modifying the operation of their users’ appliances.
Iv2 Generators’ strategy
On the other hand, generators can benefit from the users’ load scheduling to reduce their peak generation, and thus their generation cost during peak hours. For example, Fig. 4 (a) shows the active output power profile from the conventional unit of the generator in bus . The peak generation level is reduced from MW to MW (i.e. reduction). Generator also has a PV panel with the historical generation record shown in Fig. 4 (b). The generator executes Algorithm 1 and responds to the penalties from the DNO in each time slot to set the leastrisk generation level for its PV unit. Fig. 4 (c) shows the offers for generation over the day. Note that the offers may not be equal to the actual PV panel’s generation in realtime, but the generation profile in Fig. 4 (c) results in the optimal risk of energy shortage for PV panel in bus . We also show the generation profile of the conventional unit of generator in Fig. 4 (a). The reduction in peak generation can be observed. This generator has wind turbine with the historical generation record shown in Fig. 4 (b). Fig. 4 (c) shows the offers for wind turbine in bus .
The offers for renewable units’ generation mainly depends on the conservativeness of the DNO. In particular, when the weight coefficient in (20a) is large, the DNO is riskaverse and forces the generators to prevent generation shortage in their renewable units. On the other hand, small coefficient means the DNO encourages the generators to offer higher amount of renewable generations. As an example, Figs. 6 (a) and (b) show the renewable generation profiles of generators and for different values of . When increases from to , the generation levels decrease, since the penalties in (21d) increase. Hence, the generators offer lower renewable generations to reduce their cost of generation shortage.
Iv3 Algorithm convergence
We study the required number of iterations for convergence, which can be interpreted as an indicator of the number of message exchanges among the load aggregators, generators and DNO. The angle and magnitude of the voltage of the buses depend on all generators’ and load aggregators’ decision variables. Thus, the convergence of the these variables is a viable indicator of the convergence of all decision variables in the system. Since the values of the voltage angles of all buses can be added by a constant, we illustrate the convergence of the phase angle difference between the voltages of the buses at the end nodes of the lines. As an example, we consider time slot and we provide the convergence of , , , and in Fig. 10 (). We also show the voltage magnitude of the buses , , , and in Fig. 10 (). We can observe that iterations are enough for convergence. The average running time of the algorithm for different initial conditions is seconds for random initial conditions. The low convergence rate and running time make the proposed algorithm implementable for realtime interactions among entities in an energy market.
We also evaluate the running time of Algorithm 1 for larger test systems to show its scalability. Meanwhile, we compare its running time with a centralized algorithm, where the DNO solves problem problem (20). We use MOSEK solver to solve the DNO’s centralized problem (20). The control signals in (21a)(21d) are determined in order to obtain the same solution for both the centralized and decentralized algorithms, and simulation results confirm this. We provide the average running time of Algorithm 1 and the centralized approach for six test systems (all can be found in[27] except the system with 1500 buses, which is a part of 8500bus test system) in Fig. 10. We can observe the the centralized algorithm suffer from a high running time due to a large number of decision variables and constraints. On the other hand, Algorithm 1 is executed by each entity to solve its own optimization problem with its locally available information in a distributed fashion. Hence, the number of decision variables for each entity becomes independent of the size of the test system. The overall running time of Algorithm 1 increases almost linearly with the number of buses due to the increase in the required number of iterations for convergence in larger test systems.
We also compare the performance of Algorithm 1 for the scenario with uncertainty in the load demand and renewable generations and the scenario with complete information. As an example, we consider the load profile of the load aggregator and the generation profile of generator with a PV panel in Figs. 10 and . The lack of information makes the load aggregators more conservative, since it considers the worstcase for the electric appliances in the upcoming time slots. Whereas, when the load aggregator has complete information, it can better manage the electric appliances especially during the peak hours. A lower peak demand for the load aggregators results in a lower peak in the generation level of the conventional units. The conventional unit may provide more power during the times when the PV panel has high generation (e.g. around 6 pm), as the PV generation is known and the generator does not take risk to offer a high renewable generation.
V Conclusion
In this paper, we proposed a realtime decentralized algorithm for energy trading among load aggregators and generators. Our proposed approach considers the uncertainty at both generation and demand sides. In our model, the DNO sends control signals to the entities to encourage them towards optimizing their objectives independently, while meeting the physical constraints of the power network. This study uses linearized ac optimal power flow formulation to increase the accuracy of the obtained solution. Further, we solve the problem in a realtime fashion to obtain the most recent optimal solution for each timestep. To evaluate the performance of the proposed decentralized algorithm, we used an IEEE 123bus test feeder connected to some renewable generators. Although we considered the stochastic nature of renewables as well as ac power flow formulation, our algorithm converges in 50 iterations. We evaluated the price responsive load profiles and generation values and showed that our method can benefit the load aggregators by increasing their profit by , and the generators by reducing the PAR by and increasing their profit by . Our algorithm benefit the DNO by maintaining the privacy issues and a lower computational time compared to the centralized approach.
References
 [1] B. Chai, J. Chen, Z. Yang, and Y. Zhang, “Demand response management with multiple utility companies: A twolevel game approach,” IEEE Trans. on Smart Grid, vol. 5, no. 2, pp. 722–731, Mar. 2014.
 [2] S. Maharjan, Q. Zhu, Y. Zhang, S. Gjessing, and T. Basar, “Dependable demand response management in the smart grid: A stackelberg game approach,” IEEE Trans. on Smart Grid, vol. 4, no. 1, pp. 120–132, Mar. 2013.
 [3] R. Deng, Z. Yang, F. Hou, M.Y. Chow, and J. Chen, “Distributed realtime demand response in multisellermultibuyer smart distribution grid,” IEEE Trans. on Power Systems, vol. PP, no. 99, pp. 1–11, Oct. 2014.
 [4] F. Kamyab et al., “Demand response program in smart grid using supply function bidding mechanism,” IEEE Trans. on Smart Grid, vol. 7, no. 3, pp. 1277 – 1284, 2016.
 [5] M. Parvania, M. FotuhiFiruzabad, and M. Shahidehpour, “ISO’s optimal strategies for scheduling the hourly demand response in dayahead markets,” IEEE Trans. on Power Systems, vol. 29, no. 6, pp. 2636–2645, 2014.
 [6] L. Gan, N. Li, U. Topcu, and S. H. Low, “Exact convex relaxation of optimal power flow in radial networks,” IEEE Trans. on Automatic Control, vol. 60, no. 1, pp. 72–87, 2015.
 [7] W. Shi, N. Li, X. Xie, C. Chu, and R. Gadh, “Optimal residential demand response in distribution networks,” IEEE Journal on Selected Areas in Comm., vol. 32, no. 7, pp. 1441–1450, Jun. 2014.
 [8] N. Li, L. Gan, L. Chen, and S. Low, “An optimizationbased demand response in radial distribution networks,” in Proc. of IEEE Globecom, Anaheim, CA, Anaheim, CA 2012.
 [9] E. Dall’Anese, H. Zhu, and G. B. Giannakis, “Distributed optimal power flow for smart microgrids,” IEEE Trans. on Smart Grid, vol. 4, no. 3, pp. 1464–1475, Sept. 2013.
 [10] A. G. Bakirtzis and P. N. Biskas, “A decentralized solution to the DCOPF of interconnected power systems,” IEEE Trans. on Power Systems, vol. 18, no. 3, pp. 1007–1013, Aug. 2003.
 [11] T. Erseghe, “Distributed optimal power flow using ADMM,” IEEE Trans. on Power Systems, vol. 29, no. 5, pp. 2370–2380, Sept. 2014.
 [12] Q. Peng and S. H. Low, “Distributed algorithm for optimal power flow on a radial network,” in Proc. of IEEE Conf. on Decision and Control, Dec. 2014, pp. 167–172.
 [13] S. Magnusson, P. C. Weeraddana, and C. Fischione, “A distributed approach for the optimal powerflow problem based on ADMM and sequential convex approximations,” IEEE Trans. on Control of Network Systems, vol. 2, no. 3, pp. 238–253, Sept. 2015.
 [14] J. M. Arroyo and F. D. Galiana, “Energy and reserve pricing in security and networkconstrained electricity markets,” IEEE Trans. on Power Systems, vol. 20, no. 2, pp. 634–643, May 2005.
 [15] S. Mhanna, A. C. Chapman, and G. Verbič, “A fast distributed algorithm for largescale demand response aggregation,” IEEE Trans. on Smart Grid, vol. 7, no. 4, pp. 2094–2107, 2016.
 [16] M. J. Dolan, E. M. Davidson, I. Kockar, G. W. Ault, and S. D. McArthur, “Distribution power flow management utilizing an online optimal power flow technique,” IEEE Trans. on Power Systems, vol. 27, no. 2, pp. 790–799, May 2012.
 [17] E. Belic, N. Lukac, K. Dezelak, B. Zalik, and G. Stumberger, “Gpubased online optimization of low voltage distribution network operation,” accepted for publication in IEEE Trans. on Smart Grid, 2017.
 [18] L. Gan and S. H. Low, “An online gradient algorithm for optimal power flow on radial networks,” IEEE J. on Selected Areas in Comm., vol. 34, no. 3, pp. 625–638, Mar. 2016.
 [19] A. Hauswirth, S. Bolognani, G. Hug, and F. Dörfler, “Projected gradient descent on Riemannian manifolds with applications to online power system optimization,” in Proc. of Allerton Conf. on Communications, Control and Computing, Sept. 2016, pp. 225–232.
 [20] S.J. Kim, G. B. Giannakis, and K. Y. Lee, “Online optimal power flow with renewables,” in Proc. of Asilomar Conf. on Signals, Systems and Computers, Nov. 2014, pp. 355–360.
 [21] D. Mehta, A. Ravindran, B. Joshi, and S. Kamalasadan, “Graph theory based online optimal power flow control of power grid with distributed flexible ac transmission systems (dfacts) devices,” in Proc. of North American Power Symposium (NAPS), Oct. 2015, pp. 1–6.
 [22] N. Li, L. Chen, and S. H. Low, “Optimal demand response based on utility maximization in power networks,” in IEEE Power and Energy Society General Meeting, Jul. 2011, pp. 1–8.
 [23] T. Li and M. Shahidehpour, “Pricebased unit commitment: a case of lagrangian relaxation versus mixed integer programming,” IEEE Trans. on Power Systems, vol. 20, no. 4, pp. 2015–2025, 2005.
 [24] D. Bertsimas, E. Litvinov, X. A. Sun, J. Zhao, and T. Zheng, “Adaptive robust optimization for the security constrained unit commitment problem,” IEEE Trans.s on Power Systems, vol. 28, pp. 52–63, Feb. 2013.
 [25] G. HugGlanzmann and G. Andersson, “Decentralized optimal power flow control for overlapping areas in power systems,” IEEE Trans. on Power Systems, vol. 24, no. 1, pp. 327–336, Feb. 2009.
 [26] S. Boyd and L. Vandenberghe, Convex Optimization. Cambridge University Press, 2004.
 [27] [Online]. Available: https://ewh.ieee.org/soc/pes/dsacom/testfeeders/
 [28] Independent Electricty System Operator (IESO). [Online]. Available: http://www.ieso.ca

[29]
[Online]. Available:
http://www.torontohydro.com/sites/electricsystem/
residential/yourbilloverview/Pages/ApplianceChart.aspx