Distributed Framework for Optimal Demand Distribution in Self-Balancing Microgrid

Distributed Framework for Optimal Demand Distribution in Self-Balancing Microgrid

Meenakshi Chatterjee
Department of Electrical Engineering
Yale University, New Haven, CT 06511, USA
Email: meenakshi.chatterjee@yale.edu

This study focusses on self-balancing microgrids to smartly utilize and prevent overdrawing of available power capacity of the grid. A distributed framework for automated distribution of optimal power demand is proposed, where all building in a microgrid dynamically and simultaneously adjusts their own power consumption to reach their individual optimal power demands while cooperatively striving to maintain the overall grid stable. Emphasis has been given to aspects of algorithm that yields lower time of convergence and is demonstrated through quantitative and qualitative analysis of simulation results.




demand response, dynamic optimization, self-balancing, smart grids.

I Introduction

Generally, during peak time utility companies may request the buildings to cut down their power in exchange of some incentives. This would require building managers to first receive messages or phone calls from the utility company and respond with an appropriate strategy. To facilitate automation of the entire process, each building will need to quantitatively adjust its own strategy while cooperatively trying to make the grid more stable. In a self-balancing electrical grid, the total consumption of all the buildings in the grid should not exceed the total power consumption of the grid, i.e.,


If the total demand exceeds all buildings must adjust their individual demand cooperatively such that the total remains below the grid maximum. Buildings will be able to consume power as per the final adjusted demand from the next time window. A building will not know what the other’s demand is. We assume a distributed model, where each building can communicate with its neighbors. Each building declares a price per unit time which it is willing to pay for the demand. Whoever is willing to pay more will get more. There is a utility function associated with each building, which is dependent on the willingness to pay parameter. Based on the price, each building tries to adjust their demand, so that their utility is maximized to reach their optimal demands under the constraint that the grid is maintained stable. In short, the goal should be to keep the total power consumption of all the buildings as close as possible to but strictly below it.

In [1], Kelly et al. have proposed a pricing scheme based on which a group of users shares the capacity of a network. In this scheme, end users are informed whether their packets are marked or not and accordingly they adjust their transmission rates. They have shown that this is Proportionally Fair Pricing scheme and can decentralize the global optimum allocation of congestible resources. Ganesh et al. proposed a modification of this in [2] wherein the switch assigns each packet a price instead of the mark. The mechanism of congestion prices has been used to provide both feedback and incentives to the end-systems. A market-based mechanism has been proposed in [3] that allows the Smart Micro-Grid Operator (SMO) to control the behavior of internal loads through price signals and to provide feedback to the Independent System Operator (ISO). Reference [4] proposed a method for building mangers to efficiently account for energy consumption and manage plug-loads in enterprise buildings during demand response events.

The rest of the paper is organized as follows. Section II presents the models for static and dynamic adjustments of power demand. In Section III, we numerically evaluate the performance of the models that we proposed in the previous section. Finally we conclude the paper in Section IV.

Ii Model of Optimal Demand Distribution

We follow the principles of demand response model proposed by Fan et al. in [5]. Consider a discrete time slot system with time window T. Let the demand of the building in time slot be. The constraint is that at convergence when optimal demands are reached, then


The unit price of demand at any time slot is a function of aggregate demand, i.e.


Based on the price information, each building will update its demand for the next time slot. A price function can be represented as [2],


where  is the capacity of the network. The constant denotes the basic price of power and controls how the price is influenced by the variation of aggregate demand with respect to the capacity. Each building has utility  associated with it in time slot. A typical utility function is chosen as the logarithmic one [1],


where  is the willingness to pay (WTP) parameter for the  building. A building  will choose its demand to maximize [2],


Each building will adjust its demand for the next time slot as per the equation given by [5],


where is a parameter controlling the convergence rate. is the price per unit given by,


where  is a sigmoid and  is a unit step function. In the above pricing scheme, depending on the willingness to pay, a building is free to choose how it should respond to price information which is motivated by the assumption that each is trying to maximize equation 6 and the constraint that overall demand is less than . The sigmoid function in the price has been included to incorporate the extra steepness of an extra amount of penalty in the price. The unit step function ensures that this extra penalty is applied only when the demand exceeds the grid maximum. For a building the convergence of equation 7 to optimal demand implies that equation 6 has been maximized.

Ii-a Static Adjustment of Power Demand

The solution to the problem consists of the following parts:

  • Each building need to know the total demand at any time slot so that it can estimate the price and hence adjust its demand under the constraint. The buildings will compute the global average of the demand using distributed averaging. The distributed averaging is done using the Best Constant [6] method. From the global average, it now can determine the total demand at that time.

  • After knowing the total demand, each building will compute the estimate of the price. Based on the price information and its willingness to pay, it will adjust its demand at the next time slot as per equation 7, where  is given by equation 8.

  • Go to step 1, until equilibrium is attained.

The system will reach equilibrium when the demand of each building will converge to individual optimal demand subject to the constraint of the problem. The optimal demand of each building depends on its initial demand, price information and its willingness to pay. This optimal demand will then be distributed to each building which it will consume.

Ii-B Dynamic Adjustment of Power Demand

In the above approach, each time all buildings come to a consensus to know the total demand, adjusts it, and then again checks the total demand. This continues until the system reaches equilibrium, every building gets its optimal demand and the grid stays stable. Thus, the overall time taken to reach the optimal demand and the system to come to equilibrium may be high. An approach to reduce the overall time would be to allow each building to simultaneously estimate the global average of the demand and adjust their individual demand accordingly in one-time slot. In the next time slot, each building will update its own estimate as the weighted summation of the estimate received from its neighbors and the change in its demand [7, 8]. This approach can be summarized in the following steps:

  • Allow each building a time slot  to communicate its current demand  to its neighbor and form an estimate of the global average  at that time slot.

  • Based on the estimated global average of each building, it estimates the price per unit demand at that time slot as in equation 8. Now based on the price and WTP parameter, each building will update its demand following equation 7. Let the change in demand for building  be denoted by  where,

  • At the next time slot , the demand of some of the buildings have changed as the initial measurements that we have started with has changed for the next iteration. So, each building updates its own demand estimate as a weighted sum of demand estimate it receives from its neighbours and the change in its value. This is expressed as


    Equivalently, in vector notation,


    where  is the weight matrix obtained by the “Best Constant” Algorithm [6].

  • Go to step 1 until equilibrium is attained.

Iii Simulation Results

The above model has been simulated with a network of  buildings. The weight matrix has been generated using the best constant method, where the optimal constant is found out to be . In the demand updating equation, . In the price equation, and . For a time window, the initial demand for the  buildings has been chosen from a uniform distribution fro  to  as:

Sum of the initial demand is . Corresponding . The willingness to pay parameter  has been randomly chosen as

The following argument guides the above choice of : the value of  is taken as 1, so we expect that in equilibrium, the price will also settle for a value close to but less than 1 as per equation 8, because the total demand at that time would be less than 700. Let this optimal price be . Maximizing equation 6 would then give the optimal demand,


As in our case , the optimal demand should almost be equal to the WTP parameter . Since the total initial demand is well above the grid maximum, all buildings will need to adjust their individual demands, so that when the system finally converges to equilibrium, each will reach its individual optimal demand and at the same time the total should be close to but less than 700.

Iii-a Static Adjustment of Power Demand

Fig. 1: Demand adaptation of 10 buildings with time.
Fig. 2: Evolution of price with time.

Fig. 1 And Fig. 2 shows demand adaptation for each building and the evolution of price per unit demand as a function of time slots respectively. Fig. 3 shows the variation of the total demand with time slot. Initially, the overall demand which is equal to , is higher than . So, the price is also high, with penalty being imposed depending on how much the total demand exceeded the maximum. Now, each building will adjust to lower its demand in the next time slot (time slot 2), after which the total demand in this slot, is nearly equal to 715 but above 700. So, the price is still high, but the penalty is less than what it was in time slot 1, as the amount by which the total demand exceeded 700 in this case is less than the previous case. All buildings will again adjust their demand for time slot 3, and check if the total demand is above 700 or not. In slot 3, the total demand falls below 700, and the price goes below 1 (as per equation 8). So now that the grid is stable, some buildings might want to increase their demand depending on their willingness to pay parameter. The total demand would again start to increase and the overall price would then change accordingly. In this way, demand of each building will converge to a stable value, and the system will reach equilibrium. In slot 7 when the system is in equilibrium, the price is slightly below 1 and the total demand is slightly below the maximum of 700. Final values of the price and the total demand, when the system reached equilibrium, are 0.9804 and 696.0809 respectively. Thus, the demand is kept as close as possible to 700 at equilibrium, while not exceeding it and hence avoiding under-utilization of the grid capacity. The optimal demand is then finally available for consumption. Fig. 4 shows the demand cut down by each building to reach the optimal subjected to the constraint of the problem.

Fig. 3: Variation of total demand with time.
Fig. 4: Demand cut down by the 10 buildings.

Iii-B Dynamic Adjustment of Power Demand

The static approach assumes that each building predicts its initial demand (for the next hour or minute, depending on the time granularity) at the beginning of a time window, which will be available for consumption at the end of that time window. Unlike the static approach, if the predicted demand of a building changes during a time window, it will be accommodated in the next time window in the dynamic approach. Simulation results of this approach, where the length of the time window is smaller than the static case, using the same parameters as in sub-section III-A, is shown in Fig. 5 to Fig. 8. The results obtained are similar to that in the static approach, but with the potential adapt to dynamic changes in the predicted demand or grid maximum.

Fig. 5: Demand adaptation of 10 buildings with time.
Fig. 6: Evolution of price with time.
Fig. 7: Variation of total demand with time.
Fig. 8: Demand cut down by the 10 buildings.

Iv Conclusions

This work proposed a distributed model to continuously maintain a stable grid by co-operative action of all the buildings in the grid. Subject to the constraint that the total power consumption of all the buildings at any time is always less than the grid maximum, a pricing scheme has been formulated that will allow individual buildings to adapt to price estimates and adjust their demands to maximize their own benefit. Simulation results have demonstrated the convergence of the algorithm. From the results, we saw that when the system reaches equilibrium, the demands of the individual buildings reaches its optimal demand and the final aggregate demand is close to but less than grid maximum. Maintaining the aggregate demand just close to the grid maximum prevents under-utilization of the grid capacity.


  • [1] F. P. Kelly, A. K. Maulloo, and D. K. Tan, “Rate control for communication networks: shadow prices, proportional fairness and stability,” Journal of the Operational Research society, vol. 49, no. 3, pp. 237–252, 1998.
  • [2] A. Ganesh, K. Laevens, and R. Steinberg, “Congestion pricing and user adaptation,” in INFOCOM 2001. Twentieth Annual Joint Conference of the IEEE Computer and Communications Societies. Proceedings. IEEE, vol. 2.   IEEE, 2001, pp. 959–965.
  • [3] I. C. Paschalidis, B. Li, and M. C. Caramanis, “A market-based mechanism for providing demand-side regulation service reserves,” in 2011 50th IEEE Conference on Decision and Control and European Control Conference.   Ieee, 2011, pp. 21–26.
  • [4] T. Weng, B. Balaji, S. Dutta, R. Gupta, and Y. Agarwal, “Managing plug-loads for demand response within buildings,” in Proceedings of the Third ACM Workshop on Embedded Sensing Systems for Energy-Efficiency in Buildings.   ACM, 2011, pp. 13–18.
  • [5] Z. Fan, “Distributed demand response and user adaptation in smart grids,” in 12th IFIP/IEEE International Symposium on Integrated Network Management (IM 2011) and Workshops.   IEEE, 2011, pp. 726–729.
  • [6] L. Xiao and S. Boyd, “Fast linear iterations for distributed averaging,” Systems & Control Letters, vol. 53, no. 1, pp. 65–78, 2004.
  • [7] S. Rajagopalan and D. Shah, “Distributed averaging in dynamic networks,” IEEE Journal of Selected Topics in Signal Processing, vol. 5, no. 4, pp. 845–854, 2011.
  • [8] A. Nedic, A. Olshevsky, A. Ozdaglar, and J. N. Tsitsiklis, “On distributed averaging algorithms and quantization effects,” IEEE Transactions on Automatic Control, vol. 54, no. 11, pp. 2506–2517, 2009.
Comments 0
Request Comment
You are adding the first comment!
How to quickly get a good reply:
  • Give credit where it’s due by listing out the positive aspects of a paper before getting into which changes should be made.
  • Be specific in your critique, and provide supporting evidence with appropriate references to substantiate general statements.
  • Your comment should inspire ideas to flow and help the author improves the paper.

The better we are at sharing our knowledge with each other, the faster we move forward.
The feedback must be of minimum 40 characters and the title a minimum of 5 characters
Add comment
Loading ...
This is a comment super asjknd jkasnjk adsnkj
The feedback must be of minumum 40 characters
The feedback must be of minumum 40 characters

You are asking your first question!
How to quickly get a good answer:
  • Keep your question short and to the point
  • Check for grammar or spelling errors.
  • Phrase it like a question
Test description