Adaptive Electricity Scheduling in Microgrids Yingsong Huang Student Member, IEEE, Shiwen Mao, Senior Member, IEEE, and R. M. Nelms Fellow, IEEE Abstract—Microgrid (MG) is a promising component for Market Microgrid future smart grid (SG) deployment. The balance of supply Broker and demand of electric energy is one of the most important requirements of MG management. In this paper, we present a novel framework for smart energy management based on the Power flow concept of quality-of-service in electricity (QoSE). Specifically, w o the resident electricity demand is classified into basic usage and n fl 3 quality usage. The basic usage is always guaranteed by the MG, atio 1 m 0 wmhicirleogthriedqcuoanlittryoluscaegneteisrc(oMntGroCllCed) baiamsesdtoonmthieniMmGizesttahtee.MThGe Macrogrid MGCC Infor sEtnoerarggye 2 operation cost and maintain the outage probability of quality Power flow n usage, i.e., QoSE, below a target value, by scheduling electricity a among renewable energy resources, energy storage systems, and J macrogrid.Theproblemisformulatedasaconstrainedstochastic programming problem. TheLyapunov optimization techniqueis 3 then applied to derive an adaptive electricity scheduling algo- rithmbyintroducingtheQoSEvirtualqueuesandenergystorage Fig.1. Illustrate themicrogridarchitecture. ] Y virtual queues. The proposed algorithm is an online algorithm since it does not require any statistics and future knowledge of S the electricity supply, demand and price processes. We derive . s several “hard” performance boundsfor theproposed algorithm, renewable energy resources (DRERs), MG provides a local- c and evaluate its performance with trace-driven simulations. The ized cluster of renewable energy generation, storage, distri- [ simulation results demonstrate the efficacy of the proposed bution and local demand, to achieve reliable and effective electricity scheduling algorithm. 1 energy supply with simplified implementation of SG func- v Index Terms—Smart grid, Microgrids, distributed renewable tionalities [3], [4]. A typical MG architecture is illustrated 8 energy resource, Lyapunov optimization, stability. in Fig. 1, consisting of DRERs (such as wind turbines and 2 5 solar photovoltaic cells), energy storage systems (ESS), a 0 communication network (e.g., wireless or powerline commu- . I. INTRODUCTION nications) for information delivery, an MG central controller 1 0 Smart grid (SG) is a modern evolution of the utility elec- (MGCC), andlocalresidents.The MGhascentralizedcontrol 3 tricity delivery system. SG enhances the traditional power with the MGCC [4], which exchanges information with local 1 grid through computing, communications, networking, and residents, ESS’s, and DRERs via the information network. : v control technologies throughout the processes of electricity There is a single common coupling pointwith the macrogrid. Xi generation, transmission, distribution and consumption. The When disconnected, the MG works in the islanded mode and two-way flow of electricity and real-time information is a DRERsandESS’sprovideelectricitytolocalresidents.When r a characteristic feature of SG, which offers many technical connected, the MG may purchase extra electricity from the benefits and flexibilities to both utility providers and con- macrogrid or sell excess energy back to the market [5]. sumers, for balancing supply and demand in a timely fashion The balance of electricity demand and supply is one of and improvingenergy efficiency and grid stability. According the most importantrequirementsin MG management.Instead to the US 2009 Recovery Act [2], an SG will replace the of matching supply to demand, smart energy management traditional system and is expected to save consumer cost and matches the demand to the available supply using direct load reduce America’s dependence on foreign oil. These goals are control or off-peak pricing to achieve more efficient capacity to be achieved by improving efficiency and spurring the use utilization [3]. In this paper, we develop a novel control of renewable energy resources. framework for MG energy management, exploiting the two- Microgrid (MG) is a promising component for future SG way flows of electricity and information. In particular, we deployment. Due to the increasing deployment of distributed consider two types of electricity usage: (i) a pre-agreed basic usage that is “hard”-guaranteed, such as basic living usage, This work was presented in part at IEEE INFOCOM 2013, Turin, Italy, and (ii) extra elastic quality usage exceeding the pre-agreed Apr.2013[1]. level for more comfortable life, such as excessive use of air Y. Huang, S. Mao, and R.M. Nelms are with the Department of conditioners or entertainment devices. In practice, residents Electrical and Computer Engineering, Auburn University, Auburn, AL 36849-5201. Email: [email protected], [email protected], nelm- may set their load priority and preference to obtain the two [email protected]. typesofusage[6].Thebasicusageshouldbealwayssatisfied, Shiwen Mao is the corresponding author: [email protected], Tel: (334)844- while the quality usage is controlledby the MGCC according 1845,Fax:(334)844-1809. Copyright (cid:13)c2013byYingsongHuang,ShiwenMao,andR.M.Nelms. to the grid status, such as DRER generation, ESS storage 1 TABLEI levels and utility prices. The MGCC may block some quality NOTATION usage demand if necessary. This can be implemented by in- Symbol Description corporatingsmart meters, smart loads and appliancesthat can N totalnumberofresidents K totalnumberofbatteries adjust and control their service level through communication T totalnumberofslots flows [5]. To quantify residents’ satisfaction level, we define Ek(t) energylevelforbattery k attimeslott theoutagepercentageofthequalityusageasQualityofService Rk(t) recharging energyforbattery k attimeslott Dk(t) discharging energyforbattery k attimeslott in Electricity (QoSE), which is specified in the service con- Emax maximumbatteryenergylevel forbattery k k tracts[7]. The MGCC adaptivelyscheduleselectricityto keep Emin minimumbatteryenergylevel forbattery k the QoSE below a target level, and accordingly dynamically DRkmkmaaxx mmaaxxiimmuummssuuppppoorrtteedddreiscchhaargrgininggeenneergrgyyfoforrbbaattteterrky kiniansalostlot k balance the load demand to match the available supply. λn averagequality usagearrival rateforresident n In this paper, we investigate the problem of smart energy ρn averageoutage rateofquality usageforresidentninMG δn targetQoSEforresidentninMG scheduling by jointly considering renewable energy distri- αn(t) quality usageofresidents nintimeslott bution, ESS management, residential demand management, αmnax maximumqualityusageofresident ninasingleslot and utility market participation, aiming to minimize the MG αbn(t) basicelectricity usageofresidentnintimeslott P(t) available electricity fromDRERstosupplyqualityusagein operationcostandguaranteetheresidents’QoSE.TheMGCC timeslott mayservesomequalityusagewithsuppliesfromthe DRERs, U(t) electricity generated fromDRERsintimeslott Q(t) electricity purchasedfrommacrogridintimeslott ESS’sandmacrogrid.Ontheotherhand,theMGcanalsosell S(t) electricity soldonthemarketintimeslott excessive electricity back to the macrogrid to compensate for pn(t) electricity totheresident n the energy generation cost. The electricity generated from re- C(t) purchasing priceontheutility marketintimeslott W(t) sellingpriceobtheutility marketintimeslott newablesourcesis generallyrandom,dueto complexweather In(t) indicator function foroutageevents ofqualityusageof conditions, while the electricity demand is also random due residentnintimeslott Cmin minimumpurchasingpriceofutility frommacrogrid to the random consumer behavior, and so do the purchasing Cmax maximumpurchasingpriceofutility frommacrogrid and selling prices on the utility market. It is challenging to Wmin minimumsellingpriceofutility tomacrogrid Wmax maximumsellingpriceofutilitytomacrogrid model the random supply, demand, and price processes for Xk(t) battery virtualqueueforthebattery k MG management, and it may also be costly to have precise, Zn(t) QoSEvirtualqueuefortheresident n real-time monitoring of the random processes. Therefore, a Θ~(t) states ofthevirtualqueues Xk(t)andZn(t) L(·) Lyapunovfunction simple, low cost, and optimal electricity scheduling scheme ∆(t) Lyapunovonestepdrift that does notrely on any statistical informationof the supply, A(t) proposedscheduling policyincluding Q(t),S(t),Rk(t), demand, and price processes would be highly desirable. Dk(t)andpn(t) y∗ optimalobjective value ofproblem (9) We tackle the MG electricity scheduling problem with a Aˆ(t) relaxed scheduling policyforproblem25 Lyapunov optimization approach, which is a useful technique yˆ optimalobjective value ofproblem (25) tosolvestochasticoptimizationandstabilityproblems[8].We first introduce two virtual queues: QoSE virtual queues and battery virtual queues to transform the QoSE controlproblem and batterymanagementproblemto queuestability problems. MG is properlydesigned such that a portion of the electricity Second, we design an adaptive MG electricity scheduling demand related to basic living usage (e.g., lighting) from policybased on the Lyapunovoptimizationmethodand prove the residents, termed basic usage, can be guaranteed by the several deterministic (or, “hard”) performance bounds for the minimum capacity of the MG. There are randomness in both proposedalgorithm.Thealgorithmcanbeimplementedonline electricitysupply(e.g.,weatherchange)anddemand(e.g.,en- because it only relies on the current system status, without tertainmentusageinweekends).Tocopewiththerandomness, needing any future knowledge of the energy demand, supply the MG works in the grid-connected mode and is equipped and price processes. The proposed algorithm also converges with ESS’s, such as electrochemical battery, superconducting exponentially due to the nice property of Lyapunov stability magnetic energy storage, flywheel energy storage, etc. The design [9]. The algorithm is evaluated with trace-driven sim- ESS’s store excess electricity for future use. ulationsand is shown to achievesignificant efficiencyon MG The MGCC collects information about the resident de- operation cost while guaranteeing the residents’ QoSE. mands, DRER supplies, and ESS levels through the informa- The remainder of this paper is organized as follows. We tionnetwork.Whenaresidentdemandexceedsthepre-agreed present the system model and problem formulation in Sec- level,aqualityusagerequestwillbetriggeredandtransmitted tion II. An adaptive MG electricity scheduling algorithm is to the MGCC. The MGCC will then decide the amount of designed and analyzed in Section III. Simulation results are quality usage to be satisfied with energy from the DRERS, presented and discussed in Section IV. We discuss related the ESS’s, or by purchasing electricity from the macrogrid. work in Section V. Section VI concludes the paper. The MGCC may also decline some quality usage requests. The excess energy can be stored at the ESS’s or sold back to II. SYSTEMMODELAND PROBLEM FORMULATION the macrogrid for compensating the cost of MG operation. A. System Model Without loss of generality, we consider a time-slotted sys- 1) Overview: We consider the electricity supply and con- tem. The time slot duration is determined by the timescale of sumption in an MG as shown in Fig. 1. We assume that the the demand and supply processes. 2 Q(t) S(t) Resident 1's Let λn be the average quality usage arrival rate, and δn a quality usage prescribedoutagetolerance(i.e.,apercentage)forusern.The Control outage P(t) probability at δ1 average outage rate for the quality usage, ρn, should satisfy MGCC p1(t) Served quality ρ ≤δ ·λ . (5) usage n n n ESSs At each time t, the quality usage request from resident n is R1(Bt)atteryD 11(t) qRueasliidtye nuts Nag'se αn(t) ∈ [0,αmnax] units, which is an i.i.d random variable with a general distribution and mean λ . The average rate Control outage n probability at δN is λn = limt→∞(1/t) tτ−=10αn(τ) according to the Law of Large Numbers. pN(t) P Served quality The DRERs in the MG generate U(t) units of electricity usage Rk(t) Dk(t) in time slot t. U(t) can offer enough capacity to support the Battery K pre-agreed basic usage in the MG, which is guaranteed by Fig.2. Thesystemmodelconsidered inthis paper. islanded mode MG planning. The electricity is transmitted over power transmission lines. Without loss of generality, we assumethepowertransmissionlinesarenotsubjecttooutages 2) Energy Storage System Model: The system model is and the transmission loss is negligible. Let αb(t) be the pre- n shown in Fig. 2. Consider a battery farm with K independent agreedbasic usage for residentn in time slot t, which can be battery cells, which can be recharged and discharged. We fully satisfied by U(t), i.e., N αb(t)≤U(t), for all t. In n=1 n assumethatthebatteriesarenotleakyanddonotconsiderthe addition, some quality usage request α (t) may be satisfied n power loss in rechargingand discharging,since the amountis if P(t) = U(t)− N αb(Pt) ≥ 0. Let p (t) be the energy n=1 n n usually small. It is easy to relax this assumption by apply- allocated for the quality usage of resident n. We have ing a constant percentage on the recharging and discharging P processes. For brevity, we also ignore the aging effect of the 0≤pn(t)≤αn(t). (6) battery and the maintenance cost, since the cost on the utility We define a function I (t) ≥ 0 to indicate the amount n market dominates the operation cost of MGs. of quality usage outage for resident n, as I (t) = α (t)− n n Let Ek(t) denote the energy level of the the kth battery in p (t). Then the average outage rate can be evaluated as ρ = n n time slot t. The capacity of the battery is bounded as lim (1/t) t−1 I (τ). t→∞ τ=0 n The MGCC may purchase additional energy from the Ekmin ≤Ek(t)≤Ekmax,∀k,t, (1) macrogrid or sPell some excess energy back to the macrogrid. where Ekmax ≥0 is the maximum capacity, and Ekmin ≥0 is Let Q(t) ∈ [0,Qmax] denote the energy purchased from the the minimum energy level required for battery k, which may macrogridandS(t)∈[0,Smax]theenergysoldonthemarket be set by the battery deep discharge protection settings. The in time slot t, where Qmax and Smax are determined by the dynamics over time of E (t) can be described as capacity of the transformers and power transmission lines. k Since it is not reasonable to purchase and sell energy on the Ek(t+1)=Ek(t)−Dk(t)+Rk(t),∀k,t, (2) market at the same time, we have the following constraints where R (t) and D (t) are the recharging and discharging Q(t)>0⇒S(t)=0, ∀t k k (7) energy for battery k in time slot t, respectively. The charging S(t)>0⇒Q(t)=0, ∀t. (cid:26) and discharging energy in each time slot are bounded as To balance the supply and demand in the MG, we have 0≤Rk(t)≤Rkmax, ∀k,t (3) K K N (cid:26) 0≤Dk(t)≤Dkmax, ∀k,t. P(t)+Q(t)+ Dk(t)−S(t)− Rk(t)= pn(t),∀t. k=1 k=1 n=1 Ineach time slott, Rk(t) andDk(t) aredeterminedsuch that X X X (8) (1) is satisfied in the next time slot. 4) Utility Market Pricing Model: The price for purchasing Usually the recharging and discharging operations cannot electricity from the macrogrid in time slot t is C(t) per be performed simultaneously, which leads to unit. The purchasing price depends on the utility market state, such as peak/off time of the day. We assume finite R (t)>0⇒D (t)=0, ∀k,t k k (4) C(t) ∈ [C ,C ], which is announced by the utility D (t)>0⇒R (t)=0, ∀k,t. min max k k (cid:26) marketatthebeginningofeachtimeslotandremainsconstant 3) Energy Supply and Demand Model: Consider N resi- duringthe slot period[10]. Unlike priorwork[10], we do not dents in the MG; each generates basic and quality electricity require any statistic information of the C(t) process, except usage requests, and each can tolerate a prescribed outage thatitisindependenttotheamountofenergytobepurchased probabilityδ fortherequestedqualityusagepart.TheMGCC in that time slot. n adaptively serves quality usage requests at different levels to If the MGCC determines to sell electric energy on the maintain the QoSE as well as the stability of the grid. The utility market, the selling price from the market broker is serviceofqualityusagecanbedifferentfordifferentresidents, denoted by W(t) ∈ [W ,W ] in time slot t, which is min max depending on individual service agreements. also a stochastic process with a general distribution. We also 3 assume W(t) is knownat the beginningofeach time slotand Dividing both sides by t and letting t go to infinity, we have independenttotheamountofenergytobesoldonthemarket. t−1 t−1 Z (t)−Z (0) 1 We assume Cmax ≥Wmax, Cmin ≥Wmin and C(t)>S(t) lim n n ≥ lim −δn αn(τ)+ In(τ) . for all t. That is, the MG cannot make profit by greedily t→∞ t t→∞ t " # τ=0 τ=0 X X purchasing energy from the market and then sell it back to Note that Z (0) is finite. If Z (t) is rate stable by n n the market at a higher price simultaneously. a control policy I (t), it is finite for all t. We have n lim Zn(t)−Zn(0) = 0, which yields ρ ≤ δ · λ due t→∞ t n n n B. Problem Formulation to the definitions of λ and I (t). n n Given the above models, a control policy A(t) = 2) ProblemReformulation: WithTheorem1,wecantrans- {Q(t),S(t),R (t),D (t),p (t)} is designed to minimize the form the original problem (9) into a queue stability problem k k n operation cost of the MG and guarantee the QoSE of the with respect to the QoSE virtual queue and the battery residents. We formulate the electricity scheduling problem as virtual queues, which leads to a system stability design from the control theoretic point of view. We have a reformulated t−1 minimize: lim 1 E{Q(τ)C(τ)−S(τ)W(τ)} (9) stochastic programming problem as follows. t→∞ t s.t. (1), (3),τX=(40), (5), (6), (7), (8) minimize: lim 1 t−1E{Q(τ)C(τ)−S(τ)W(τ)} (15) t→∞ t battery queue stability constraints. Xτ=0 s.t. (3), (4), (6), (7), (8) Problem (9) is a stochastic programming problem, where Battery and QoSE virtual queue stability the utility prices, generation of DRERs, and consumption of constraints. residents are all random. The solution also depends on the evolution of battery states. It is challenging since the supply, Theorem 1 indicates that QoSE provisioning is equivalent to demand, and price are all general processes. stabilizing the QoSE virtual queue Z (t), while stabilizing n 1) Virtual Queues: We first adopt a battery virtual queue the virtual queues (11) ensures that the battery constraints (1) X (t) that tracks the charge level of each battery k: aresatisfied. We thenapplyLyapunovoptimizationtodevelop k an adaptive electricity scheduling policy for problem (15), in X (t)=E (t)−Dmax−Emin−VC , ∀k,t, (10) k k k k max whichthepolicygreedilyminimizetheLyapunovdriftinevery where 0 < V ≤ V = min Ekmax−Ekmin−Rmkax−Dkmax slot t to push the system toward stability. max k Cmax−Wmin is a constant for the trade-off between system performance n o and ensuring the battery constraints. This constant V C. Lyapunov Optimization max is carefully selected to ensure the evolution of the battery We define the Lyapunov function for system state Θ~(t) = levels always satisfy the batteryconstraints(1), which will be [X~(t),Z~(t)]T withdimension(N+K)×1asfollows,inwhich examined in Section III-C. The virtual queue can be deemed X~(t)=[X (t)···X (t)]T and Z~(t)=[Z (t)···Z (t)]T. 1 K 1 N as a shifted version of the battery dynamics in (2) as K N 1 1 Xk(t+1)=Xk(t)−Dk(t)+Rk(t), ∀k,t. (11) L(Θ~(t))= 2 [Xk(t)]2+ 2 [Zn(t)]2, (16) k=1 n=1 X X Thesequeuesare“virtual”becausetheyaremaintainedbythe which is positive definite, since L(Θ~(t))>0 when Θ~(t)6=~0 MGCC control algorithm. Unlike an actual queue, the virtual andL(Θ~(t))=0⇔Θ~(t)=~0.We thendefinetheconditional queue backlog X (t) may take negative values. k one slot Lyapunov drift as We next introduce a conceptualQoSE virtual queue Z (t), n whose dynamics are governed by the system equation as ∆(Θ~(t))=E{L(Θ~(t+1))−L(Θ~(t))|Θ~(t)}. (17) Zn(t+1)=[Zn(t)−δn·αn(t)]++In(t), ∀n,t. (12) With the drift defined as in (17), it can be shown that where [x]+ =max{0,x}. 1 K ∆(Θ~(t)) = E [(X (t+1))2−(X (t))2|X (t)]+ k k k Theorem 1. If an MGCC control policy stabilizes the QoSE 2 ( k=1 X virtual queue Zn(t), the outage quality usage of resident n N will be stabilized at the average QoSE rate ρn ≤δn·λn. [(Zn(t+1))2−(Zn(t))2|Zn(t)] ) Proof: According to the system equation (12), we have nX=1 N Z (1)≥Z (0)−δ ·α (0)+I (0) ≤ B+ E{Z (t)(1−δ )α (t)|Z (t)}+ n n n n n n n n n ··· (13) n=1 X Z (t)≥Z (t−1)−δ ·α (t−1)+I (t−1). K n n n n n E{X (t)(R (t)−D (t))|X (t)}− k k k k Summing up the inequalities in (13), we have k=1 X t−1 t−1 N Z (t)≥Z (0)−δ · α (τ)+ I (τ). (14) E{(Z (t)+α (t))p (t)|Z (t)}, (18) n n n n n n n n n τ=0 τ=0 n=1 X X X 4 where B = 1 K (max{Dmax,Rmax})2 + 1 N (2 + b) If Z (t) > VC(t)−α (t), the optimal solution 2 k=1 k k 2 n=1 n n δ2)(αmax)2 is a constant. The derivation of (18) is given in always selects p (t)≥(1−δ )α (t); if Z (t)< n n n n n n P P Appendix A. VC(t)−α (t),theoptimalsolutionalwaysselects n To minimize the operation cost of the MG, we adopt p (t)=0. n the drift-plus-penalty method [11]. Specifically, we select the 2) When Q(t)=0, we have S(t)>0, control policy A(t) = {Q(t),S(t),R (t),D (t),p (t)} to k k n a) If X (t) >−VW(t), the optimal solution always minimize the bound on the drift-plus-penalty as: k selects R (t) = 0; if X (t) < −VW(t), the k k ∆(Θ~(t))+VE{Q(t)C(t)−S(t)W(t)|Θ~(t)} optimal solution always selects D (t)=0. k ≤ right-hand-side of (18) + b) If Zn(t) > VW(t)−αn(t), the optimal solution VE{Q(t)C(t)−S(t)W(t)|Θ~(t)}, (19) always selects pn(t)≥(1−δn)αn(t); if Zn(t)< VW(t)−α (t),theoptimalsolutionalwaysselects n where 0 < V ≤ V is defined in Section II-B1 for the p (t)=0. max n trade-off between stability performance and operation cost The proof of Lemma 1 is given in Appendix B. minimization. Given the current virtual queue states X (t) k and Z (t), market prices S(t) and W(t), available DRERs n Lemma 2. The optimal solution to the battery management energyP(t), and the residentqualityusagerequestα (t), the n problem has the following properties: optimal policy is the solution to the following problem. 1) If X (t) > −VW , the optimal solution always k min N selects R (t)=0. minimize: B+ [Z (t)(1−δ )α (t)]+ k n n n 2) If X (t) < −VC , the optimal solution always k max n=1 X selects D (t)=0. V[Q(t)C(t)−S(t)W(t)]+ k K The proof of Lemma 2 is given in Appendix C. [X (t)(R (t)−D (t))]− k k k Lemma 3. The optimal solution to the QoSE provisioning k=1 X N problem has the following properties: [(Z (t)+α (t))p (t)] (20) n n n 1) If Z (t)>VC , the optimal solution always selects n max nX=1 p (t)≥(1−δ )α (t). s.t. (3), (4), (6), (7), (8) . n n n 2) IfZ (t)<VW −α ,theoptimalsolutionalways n min max SincethecontrolpolicyA(t)isonlyappliedtothelastthree selects p (t)=0. n terms of (20), we can further simplify problem (20) as The proof directly follows Lemma 1 and is similar to the K proof of Lemma 2. We omit the details for brevity. minimize: V[Q(t)C(t)−S(t)W(t)]+ [X (t)(R (t)− k k Lemma 1 provides useful insights for simplifying the al- k=1 X gorithm design, which will be discussed in Section III-B. N The intuition behind these lemmas is two-fold. On the ESS D (t))]− [(Z (t)+α (t))p (t)] (21) k n n n management side, if either the purchasing price C(t) or the n=1 s.t. (3), (4), (6X), (7), (8) , selling price W(t) is low, the MG prefers to recharge the ESS’s to store excess electricity for future use. On the other which can be solved based on observations of the current hand, if either C(t) or W(t) is high, the MG is more likely system state {Xk(t),Zn(t),C(t),W(t),P(t),αn(t)}. to discharge the ESS’s to reduce the amount of energy to purchase or sell more stored energy back to the macrogrid. III. OPTIMAL ELECTRICITY SCHEDULING OntheQoSEprovisioningside,ifeitherC(t)orW(t)ishigh A. Properties of Optimal Scheduling and the quality usage αn(t) is low, the MG is apt to decline the quality usage for lower operationcost. On the other hand, With the Lyapunovpenalty-and-driftmethod, we transform if either C(t) or W(t) is low and α (t) is high, the quality problem (15) to problem (21) to be solved for each time slot. n usagearemorelikelytobegrantedbypurchasingmoreenergy The solution only depends on the current system state; there or limiting the sell of energy. is no need for the statistics of the supply, demand and price processesandnoneedforanyfutureinformation.Thesolution algorithmtothisproblemisthusanonlinealgorithm.Wehave the following properties for the optimal scheduling. B. MG Optimal Scheduling Algorithm Lemma 1. The optimal solution to problem (21) has the In this section, we present the MG control policy A(t) following properties: to solve problem (21). Given the current virtual queue state 1) If Q(t)>0, we have S(t)=0, {X (t),Z (t)}, market prices C(t) and W(t), quality usage k n a) If X (t) > −VC(t), the optimal solution always α (t) andavailableenergyP(t) fromtheDRERS for serving k n selects R (t) = 0; if X (t) < −VC(t), the quality usage, problem (21) can be decomposed into the k k optimal solution always selects D (t)=0. following two linear programming (LP) sub-problems (since k 5 Algorithm 1: Adaptive Electricity Scheduling Algorithm for all k. Supposing the inequalities hold true for time t, we then show the inequalities still hold true for time t+1. 1 MGCC initializes the QoSE target to δn and the virtual First,weshowX (t+1)≤Emax−VC −Dmax−Emin. queues backlogs Zn(t) and Xk(t), for all n and k ; k k max k k If −VW < X (t) ≤ Emax −VC −Dmax −Emin, 2 while TRUE do min k k max k k then with X (t) > −VW ⇒ R (t) = 0 from Lemma 2, 3 Residents send usage request (with basic and quality k min k we have X (t+1) = X (t)−D (t) ≤ X (t) ≤ Emax − usage) to MGCC via the information network ; k k k k k VC − Dmax − Emin. If X (t) ≤ −VW , then the 4 MGCC solves LPs (22) and (23) ; max k k k min 5 MGCC selects the optimal solution A(t) comparing largest value is Xk(t + 1) = −VWmin + Rkmax. For any 0<V ≤V , we have the solutions to (22) and (23) ; max 6 MGCC updates the virtual queues Xk(t) and Zn(t) Emax−VC −Dmax−Emin according to (11) and (12), for all n and k ; k max k k Emax−Emin−Rmax−Dmax 7 end ≥Emax−min k k k k C k k (cid:26) Cmax−Wmin (cid:27) max −Dmax−Emin ≥Emin+Rmax ≥X (t+1). k k k k k one of S(t) and Q(t) must be zero, see (7)). ItfollowsthatX (t+1)≤Emax−VC −Dmax−Emin. k k max k k K Next, we show Xk(t+1)≥−VCmax−Dkmax. Assuming minimize:VQ(t)C(t)+ [Xk(t)(Rk(t)−Dk(t))]− −VCmax−Dkmax ≤Xk(t)≤−VCmax,thenfromLemma2, we have X (t)≤−VC ⇒D (t)=0. It follows that k=1 k max k X N ((Zn(t)+αn(t))pn(t)) (22) Xk(t+1)=Xk(t)+Rk(t)≥Xk(t)≥−VCmax−Dkmax. n=1 X If X (t)≥−VC , following (10), we have s.t.S(t)=0,(3), (4), (6), (8). k max X (t+1) = X (t)−D (t)+R (t) ≥ X (t)−Dmax k k k k k k K ≥ −VC −Dmax. minimize:−VS(t)W(t)+ [Xk(t)(Rk(t)−Dk(t))]− max k N Xk=1 Therefore,we have Xk(t+1)≥−VCmax−Dkmax. Thusthe inequalities also hold true for time t+1. ((Z (t)+α (t))p (t)) (23) n n n It follows that Emin ≤ E (t) ≤ Emax is satisfied under n=1 k k k X the optimal scheduling algorithm for all k, t. s.t. Q(t)=0,(3), (4), (6), (8). Theorem 3. The worst-case backlogs of the QoSE virtual Insub-problem(22),wesetR (t)=0ifX (t)>−VC(t), k k queue for each resident n is bounded by Z (t) ≤ Zmax = and D (t) = 0 if X (t) < −VC(t) according to Lemma 1. n n k k VC +αmax,foralln,t.Moreover,theworst-caseaverage Also, if Z (t) < VC(t) − α (t), we set p (t) = 0; max n n n n amount of outage of quality usage for resident n in a period otherwise,we reset constraint(6) to a smaller search space of T is upper bounded by Zmax+Tδ αmax. (1−δ )α (t)≤p (t)≤α (t).Wetakeasimilarapproachfor n n n n n n n solving sub-problem(23) by replacingC(t) with W(t). Then Proof:(i)WefirstprovetheupperboundZmax.Initially, n we comparethe objectivevaluesof the two sub-problemsand we have Z (0)= 0≤ VC +αmax. Assume that in time n max n selectthemorecompetitivesolutionastheMGcontrolpolicy. slot t the backlog of the QoSE virtual queue of resident n The complete algorithm is presented in Algorithm 1. satisfies Z (t) ≤ Zmax = VC +αmax. We then check n n max n the backlog at time t+1 and show the boundstill holds true. C. Performance Analysis If Zn(t) > VCmax, following Lemma 3, the optimal schedulingforthequalityusageofresidentnsatisfiesp (t)≥ The proposed scheduling algorithm dynamically balances n (1−δ )α (t).Fromthevirtualqueuedynamics(12),wehave cost minimization and QoSE provisioning. It only requires n n current system state information (i.e., as an online algorithm) Z (t+1)≤[Z (t)−δ α (t)]++δ α (t). n n n n n n andrequiresnostatistic informationaboutthe randomsupply, demand, and price processes. The algorithm is also robust to IfZ (t)≥δ α (t), we haveZ (t+1)≤Z (t)≤VC + n n n n n max non-i.i.d. and non-ergodic behaviors of the processes [11]. αmax; otherwise, it follows that Z (t + 1) ≤ δ α (t) < n n n n VC +αmax. Theorem 2. The constraint on the ESS battery level E (t), max n k If Z (t) ≤ VC , we have Z (t + 1) ≤ [Z (t) − Emin ≤E (t)≤Emax, is always satisfied for all k and t. n max n n k k k δ α (t)]++αmax. IfZ (t)≥δ α (t), we haveZ (t+1)≤ n n n n n n n Proof: From the battery virtualqueuedefinition (10), the Z (t)−δ α (t)+αmax ≤ VC +αmax; otherwise, we n n n n max n constraint Ekmin ≤Ek(t)≤Ekmax is equivalent to have Zn(t+1)≤αmnax ≤VCmax+αmnax. Thus we have Z (t+1)≤Zmax =VC +αmax. The −VC −Dmax≤X (t)≤Emax−VC −Dmax−Emin. n n max n max k k k max k k proofof the QoSE virtualqueue backlogboundis completed. We assume all the batteries satisfy the battery capacity con- (ii) Consider an interval [t ,t ] with length of T. Sum- 1 2 straint at the initial time t=0, i.e., Emin ≤E (0)≤Emax, ming (12) from t to t , we have Z (t +1) ≥ Z (t )− k k k 1 2 n 2 n 1 6 δ t2 α (τ)+ t2 [α (τ)−p (τ)]≥ t2 [α (τ)− expectation and sum up from 0 to T −1, we obtain n τ=t1 n τ=t1 n n τ=t1 n p (τ)]−Tδ αmax. It follows that nP n n P P T−1 t2 VE{Q(t)C(t)−S(t)W(t)} [αn(τ)−pn(τ)]≤Znmax+Tδnαmnax. Xt=0 τX=t1 ≤ T ·B∗+T ·V ·y∗−E{L(Θ~(T))}+E{L(Θ~(0))} ≤ T ·B∗+T ·V ·y∗+E{L(Θ~(0))}. Theorem 4. The average MG operation cost under the The second inequality is due to the nonnegative property of adaptive electricity scheduling algorithm in Algorithm1, yˆ, Lyapunovefunctions.Divide bothsidesby V ·T and letT go is bounded as y∗ ≤ yˆ ≤ y∗ +B∗/V, where y∗ is optimal toinfinity.SincetheinitialsystemstateΘ~(0)isfinite,wehave operating cost and B∗ =B+ Nn=1Znmax(1−δn)αmnax. limT→∞ T1 Tt=−01VE{Q(t)C(t)−S(t)W(t)}≤y∗+BV∗. ItisworthnotingthatthechoiceofV controlstheoptimal- Proof: From Theorem 2, tPhe battery capacity constraints P ityoftheproposedalgorithm.Specifically,alargerV leadstoa is met in each time slot with the adaptivecontrolpolicy.Take tighteroptimalitygap.However,fromtheproofofTheorem2, expectation on (2) and sum it over the period [0,t−1]: V is limited by V , which ensures the feasibility of the max t−1 battery constraints. This is actually a similar phenomenon to E{E (t)}−E{E (0)}= [E{R (τ)}−E{D (τ)}], ∀k. k k k k the so-called performance-congestion trade-off [12]. Through τX=0 the definition of Vmax (see Section II-B1), it can be seen that Since Ekmin ≤Ek(t)≤Ekmax, we divide both sides by t and if we invest more on the individual storage components for let t go to infinity, to obtain a larger ESS capacity, the proposed algorithm can achieve a better performance (i.e., a smaller optimality gap). t−1 t−1 1 1 lim E{R (τ)}= lim E{D (τ)}, ∀k. (24) It is also worth noting that all the performance bounds k k t→∞ t t→∞ t of the proposed algorithm are deterministic, which provide τ=0 τ=0 X X “hard” guarantees for the performance of the proposed adap- Consider the the following relaxed version of problem (9). tive scheduling policy in every time slot. Unlike probabilistic 1 t−1 approaches, the proposed method provides useful guidelines minimize: lim E{Q(τ)C(τ)−S(τ)W(τ)} (25) t→∞ t fortheMGdesign,whileguaranteeingtheMGoperationcost, τX=0 grid stability, and the usage quality of residents. s.t. (3), (4), (5), (6), (7), (8), and (24). Since the constraints in problem (25) are relaxed from that in IV. SIMULATION STUDY problem(9), the optimalsolution to problem(9) is also feasi- We demonstrate the performance of the proposed adaptive bleforproblem(25).Thesolutionof(25) doesnotdependon MG electricity scheduling algorithm through extensive simu- batteryenergylevels.Lettheoptimalsolutionforproblem(25) lations. We simulated an MG with 500 residents, where the be Aˆ(t) = {Qˆ(t),Sˆ(t),Rˆk(t),Dˆk(t),pˆn(t)} and the corre- electricity from DRERs is supplied by a wind turbine plant. sponding object value is yˆ≤ y∗. According to the properties We use the renewable energy supply data from the Western of optimality of stationary and randomized policies [12], the WindResourcesDatasetpublishedbytheNationalRenewable optimal solution Aˆ(t) satisfies E{Rˆk(t) − Dˆk(t)} = 0 and EnergyLaboratory[13]. TheESS’s consistsof100PHEVLi- yˆ=E{Qˆ(τ)C(τ)−Sˆ(τ)W(τ)}. ion battery packs, each of which has a maximum capacity of We substitute solution Aˆ(t) into the right-hand-side of the 16 kWh and the minimum energy level is 0. The battery can drift-and-penalty (19). Since our proposed policy minimizes be fully charged or discharged within 2 hours [14]. the right-hand-side of (19), we have The residents’ pre-agreed power demand is uniformly dis- ∆(Θ~(t))+VE{Q(t)C(t)−S(t)W(t)|Θ~(t)} tributed in [2 kW, 25 kW], and the quality usage power is uniformly distributed in [0, 10 kW]. The MG works in the N ≤ B+ E{Z (t)(1−δ )α (t)|Z (t)}+ grid-connectedmodeandmaypurchase/sellelectricityfrom/to n n n n themacrogrid.Theutilitypricesinthemacrogridareobtained n=1 X from [15] and are time-varying. We assume the sell price K X (t)E{Rˆ (t)−Dˆ (t)|X (t)}− by the broker is random and below the purchasing price in k k k k each time slot. The time slot duration is 15 minutes. The k=1 X N MGCC serves a certain level of quality usage according to (Z (t)+α (t))E{pˆ (t)|Z (t)}+ the adaptive electricity scheduling policy. The QoSE target is n n n n nX=1 set to δn = 0.07 for all residents. The control parameter is VE{Qˆ(t)C(t)−Sˆ(t)W(t)|Θ~(t)} V =Vmax, unless otherwise specified. N ≤ B+ Znmax(1−δn)αmnax+V ·y∗. A. Algorithm Performance nX=1 We first investigate the average QoSEs and total MG op- The second inequality is due to E{Rˆ (t)−Dˆ (t)} =0, 0 ≤ eration cost with default settings for a five-day period. We k k Z (t) ≤ Zmax, α (t) ≥ 0, p (t) ≥ 0, and yˆ ≤ y∗. Taking use MATLAB LP solver for solving the sub-problems (22) n n n n 7 and (23). For better illustration, we only show the QoSEs in Fig. 5 thatresident1’sQoSE convergesto 0.015,while the of three randomly chosen users in Fig. 3. It can be seen other two residents’ QoSEs remains around 0.063. that all the average QoSEs converge to the neighborhood of 0.08 within 200 slots, which is close to the MG requested B. Comparison with a Benchmark criteria δ = 0.07. In fact the proposed scheme converges n Wecomparetheperformanceoftheproposedschemewitha exponentially, due to the inherent exponential convergence heuristic MG electricity controlpolicy (MECP), which serves property in Lyapunov stability based design [9]. as a benchmark. In MECP, the MGCC blocks quality usage WealsoplottheMGoperationtracesfromthissimulationin requests simply by tossing a coin with the target probability. Fig. 6. The energy for serving quality usage from the DEREs We use δ = 0.03 in the following simulations. If there is areplottedinFig.6(A).ItcanbeseenthattheDRERsgenerate n sufficient electricity from the DRERs, all the quality usage excessive electricity from slot 150 to 200, which is more requests will be granted and the excess energy will be stored than enough for the residents. Thus, the MGCC sells more intheESS’s.Ifthereisstillanysurplusenergy,theMGCCwill electricity back to the macrogrid and obtains significant cost sell it to the macrogrid.If there is insufficientelectricity from compensation accordingly. In Fig. 6(B), we plot the traces of the DRERs, the ESS’s will be discharged to serve the quality electricitytrading,wherethepositivevaluesarethepurchased usage requests. The MGCC will purchase electricity from the electricity (marked as brown bars), and the negative values macrogrid if even more electricity is required. Finally, with represent the sold electricity (marked as dark blue bars). The a predefined probability,e.g., 0.5 in the following simulation, MG operation costs are plotted in Fig. 6(C). The curve rises the MG purchases as much energy as possible to charge the when the MG purchases electricity and falls when the MG ESS’s. sellselectricity.Fromslot150to200,theoperationcostdrops We run 100 simulations with different random seeds for a significantly due to profits of selling excess electricity from seven-dayperiod.We assumeinthefirstfivedaystheresident the DEREs. The operation cost is $418.10 by the end of the behavior is the same as previous default settings. In the last period, which means the net spending of the MG is $418.10 two days, we assume the residents are apt to request more on the utility market. electricity (e.g., more activities in weekends) We assume in WethenexaminetheenergylevelsofthebatteriesinFig.4. the last two days the resident pre-agreed basic usage power We only plot the levels of three batteries in the first 50 demand is uniformly distributed from 5 kW to 35 kW. The time slots for clarity. The proposed control policy charges qualityusagepowerisuniformlydistributedfrom0to20kW. and discharges the batteries in the range of 0 to 16 kWh, Wefindthattheproposedalgorithmearns$947.27fromthe which falls strictly within the battery capacity limit. It can be utilitymarket(with95%confidenceinterval[950.65,943.89]). seen that the amount of energy for charging or discharging The profit mainly comes from the abundant DRER gen- in one slot is limited by 2 kWh in the figure, due to the eration in the last two days, as shown in Fig. 7. MECP shorttimeslotscomparingtothe2-hourfullycharge/discharge only earns $379.74 from the market (with 95% confidence periods.Forlongertimeslotdurationsandbatterieswithfaster interval[387.96,371.52]),whichis60%lowerthanthatofthe charge/discharge speeds, the variation of the energy level in proposedcontrolpolicy.WealsofindthattheQoSEsunderthe Fig. 4 could be higher. However, Theorem 2 indicates that proposed control policy remains about 0.025, which is lower the feasibility of the battery managementconstraint is always thanthecriteriaδ =0.03.Thisisbecausetherearea sudden ensured, if the control parameter V satisfies 0<V ≤V . n max price jump from $27/MWh to $356/MWh in the afternoon of We nextevaluate the performanceof the proposedadaptive the last day.This sharpincrementincreasesC eighttimes control algorithm under different values of control parameter max and decreases the value of V . Due to the performance- V. For different values V = {V ,V /2,V /4}, the max max max max congestion trade-off, the QoSEs become smaller (lower than QoSEs are stabilized at 0.081,0.061,and 0.055,and the total MECP’s 0.03 level). operation cost are $418.10, $625.69, and $717.75, respec- tively.WefindtheQoSEdecreasesfrom0.081to0.055,while the totaloperationcost is increased from$418.10to $717.75, V. RELATEDWORK as V is decreased. This demonstrates the performance- SG is regardedas the nextgenerationpower gridwith two- max congestion trade-off as in Theorem 4: a larger V leads to a way flows of electricity and information. Several comprehen- smallerobjectivevalue(i.e.,theoperatingcost),butthesystem sive reviews of SG technologies can be found in [3], [5]. is also penalized by a larger virtual queue backlog, which Recently, SG research is attracting considerable interest from corresponds to a higher QoSE. On the contrary, a smaller the networking and communications communities [16]–[21]. V favors the resident quality usage, but increases the total For example, the design of wireless communication systems operation cost. In practice, we can select a proper value for in SG is studied in [17]. The authors of [18], [19] explore this parameter based on the MG design specifications. theimportantwirelesscommunicationsecurityissuesinsmart It would be interesting to examine the case where the grid. The energy management and power flow control in the residentsrequiredifferentQoSEs.Weassume5residentswith grid is investigated in [16] to reach system-wide reliability aservicecontractforlowerQoSEs.WeplottheaverageQoSEs under uncertainties. The frequency oscillation in power net- of three residents with V = V /2 in Fig. 5. Resident 1 worksis studiedin [20] by epidemicpropagationand a social max prefersan outageprobabilityδ =0.02,while residents2 and networkbasedapproach.Theelectricpowermanagementwith 1 3requireanoutageprobabilityδ =δ =0.07.Itcanbeseen PHEVs are examined in [21]. 2 3 8 1 16 0.2 Resident 1 Battery 1 Resident 1 0.9 RReessiiddeenntt 23 14 BBaatttteerryy 23 0.18 RReessiiddeenntt 23 0.8 0.16 12 Average QoSEs00000.....34567 Battery levels (kWh)1068 Average QoSE0000....00011.68241 4 0.2 0.04 0.1 2 0.02 00 100 200 300 400 00 10 20 30 40 50 00 100 200 300 400 Time slot Time slot Time slot Fig. 3. Average QoSEs of three residents Fig.4. EnergylevelsofthreeLi-ionbatteries Fig. 5. QoSEs for three residents with dif- (V =Vmax). (V =Vmax). ferent service contracts (V =Vmax/2). Wh)6000 Wh)6000 E (k E (k QoS4000 QoS4000 Ele. for 2000 Ele. for 2000 Rs Rs E E DR 00 50 100 150 200 250 300 350 400 450 DR 00 100 200 300 400 500 600 Time slot Time slot (A) DRERs electricity for QoSE request (A) DRERs electricity for QoSE request 2000 2000 Wh) Wh) Ele. (k 0 Ele. (k 0 Sold −2000 Sold −2000 Bought/−4000 Bought/−4000 −6000 −6000 0 50 100 150 200 250 300 350 400 450 0 100 200 300 400 500 600 Time slot Time slot (B) Bought/sold electricity (B) Bought/sold electricity 1500 3000 G operation cost ($) 15000000 G operation cost ($) 120000000 M M −5000 50 100 150 200 250 300 350 400 450 −10000 100 200 300 400 500 600 Time slot Time slot (C) MG operation cost (C) MG operation cost Fig.6. MGoperationtracesoftheproposedalgorithmforthe5-dayperiod. Fig.7. MGoperation traces ofproposedalgorithm forthe7-dayperiod. been widely used and extended in the communications and Microgrid is a new grid structure to group DRERs and networking areas [8], [11]. In two recent work [27], [28], the local residents loads, which providesa promisingway for the Lyapunov optimization method is applied to jointly optimize future SG. In [4], the authors review the MG structure with power procurement and dynamic pricing. In [27], the authors distributedenergyresources.In[22],theintegrationofrandom investigate the problem of profit maximization for delay tol- wind power generation into grids for cost effective operation erant consumers. In [28], the authors study electricity storage is investigated. In [23], the authors propose a useful online management for data centers, aiming to meet the workload method to discover all available DRERs within the islanded requirement.Both of the work are designedbased on a single mode mircogrid and compute a DRER access strategy. The energy consumption entity model. problemofoptimalresidentialdemandmanagementisstudied in[24],aimingtoadapttotime-varyingenergygenerationand prices,andmaximizeuserbenefit.In[25],the authorsinvesti- VI. CONCLUSION gateenergystoragemanagementwithadynamicprogramming In this paper, we developed an online adaptive electricity approach. The size of the ESS’s for MG energy storage is scheduling algorithm for smart energy management in MGs explored in [26]. by jointly considering renewable energy penertration, ESS Lyapunov optimization is a useful stochastic optimization management,residentialdemandmanagement,andutilitymar- method [8]. It integrates the Lyapunov stability concept of ket participation. We introduced a QoSE model by taking control theory with optimization and provides an efficient into account minimization of the MG operation cost, while framework for solving schedule and control problems. It has maintainingthe outage probabilitiesof residentquality usage. 9 We transformed the QoSE controlproblem and ESS manage- [19] M. A. Rahman, P. Bera, and E. Al-Shaer, “Smartanalyzer: A nonin- mentproblemintoqueuestabilityproblemsbyintroducingthe vasive security threat analyzer for AMI smart grid,” in Proc. IEEE INFOCOM’12,Orlando,FL,Mar.2012,pp.2255–2263. QoSEvirtualqueuesandbatteryvirtualqueues.TheLyapunov [20] H. Ma, H. Li, and Z. Han, “A framework of frequency oscillation in optimization method was applied to solve the problem with powergrid:Epidemicpropagationoversocialnetworks,”inProc.IEEE an efficient online electricity scheduling algorithm, which INFOCOM’12,Orlando,FL,Mar.2012,pp.67–72. has deterministic performance bounds. Our simulation study [21] H.Liang,B.J.Choi,W.Zhuang,andX.Shen,“Towardsoptimalenergy store-carry-and-deliver for PHEVs via V2G system,” in Proc. IEEE validated the superior performance of the proposed approach. INFOCOM’12,Orlando,FL,Mar.2012,pp.1674–1682. [22] X.Liu,“Economicloaddispatchconstrainedbywindpoweravailability: Await-and-seeapproach,”IEEESmartGrid,vol.1,no.3,pp.347–355, ACKNOWLEDGMENT Dec.2010. This work is supported in part by the US National Science [23] X.Fang,D.Yang, andG.Xue,“Online strategizing distributed renew- able energy resource access inislanded microgrids,” inIEEEGLOBE- Foundation(NSF)underGrantsCNS-0953513.Anyopinions, COM’11,Huston,TX,Dec.2011,pp.1931–1937. findings, and conclusions or recommendations expressed in [24] N. Li, L. Chen, and S. H. Low, “Optimal demand response based on this material are those of the author(s) and do not necessarily utility maximization in power networks,” in 2011 IEEE PES General Meeting, Detroit, MI,Jul.2011,pp.1–8. reflect the views of the foundation. [25] I. Koutsopoulos, V. Hatzi, and L. Tassiulas, “Optimal energy storage controlpoliciesforthesmartpowergrid,”inIEEESmartGridComm’11, Oct.2011,pp.475–480. REFERENCES [26] S.X.Chen,H.B.Gooi,andM.Q.Wang,“Sizingofenergystoragefor [1] Y. Huang, S. Mao, and R. M. Nelms, “Adaptive electricity scheduling microgrids,” IEEETrans.SmartGrid,vol.3,no.1,pp.142–151,Mar. in microgrids,” in Proc. IEEE INFOCOM’13, Turin, Italy, Apr. 2013, 2012. pp.1–9. [27] M. J. Neely, A. S. Tehrani, and A. G. Dimakis, “Efficient algorithms [2] Whitehouse.gov, “Battery and electric vehi- for renewable energy allocation to delay tolerant consumers,” in IEEE cle report,” Jul. 2010, [online] Available: SmartGridComm’10, Oct.2010,pp.549–554. http://www.whitehouse.gov/files/documents/Battery-and-Electric-Vehicle-Re[p2o8r]t-FRI.NUArLg.apodnfk.ar, B. Urgaonkar, M. J. Neely, and A. Sivasubramaniam, [3] X. Fang, S. Misra, G. Xue, and D. Yang, “Smart grid - the new and “Optimalpowercostmanagementusingstroedenergyindatacenters,” improved power grid: A survey,” IEEECommun. Surveys & Tutorials, inProc.ACMSIGMETRICS’11,SanJose,CA,Jun.2011,pp.221–232. vol.PP,no.99,pp.1–37,Dec.2011. [4] J.Huang,C.Jiang,andR.Xu,“Areviewondistributedenergyresources andmicrogrid,”ELSEVIERRenewableandSustainableEnergyReviews, vol.12,no.9,pp.2472–2483, Dec.2008. [5] H. Farhangi, “The path of the smart grid,” IEEEPower and Energy Magazine, vol.8,no.1,pp.18–28,Jan.-Feb.2010. APPENDIX A [6] S. Shao, M. Pipattanasomporn, and S. Rahman, “Demand response as DERIVATION OF EQUATION (18) a load shaping tool in an intelligent grid with electric vehicles,” IEEE Trans.SmartGrid,vol.2,no.4,pp.624–631,Dec.2011. [7] E. Fumagalli, J. W. Black, I. Vogelsang, and M. Ilic, “Quality of ser- With the drift defined as in (17), we have viceprovision inelectric powerdistribution systemsthroughreliability insurance,”IEEETrans.PowerSystems,vol.19,no.3,pp.1286–1293, Aug.2004. [8] L. Tassiulas and A. Ephremides, “Stability properties of constrained K 1 queueing systems and scheduling policies for maximum throughput in ∆(Θ~(t)) = E [(X (t+1))2−(X (t))2|X (t)]+ k k k multihopradionetworks,”IEEETrans.Autom.Control,vol.37,no.12, 2 ( pp.1936–1948, Dec.1992. Xk=1 [9] J.SlotineandW.Li,AppliedNonlinear Control. Prentice Hall,1991. N [10] T. T. Kim and H. Poor, “Scheduling power consumption with price [(Zn(t+1))2−(Zn(t))2|Zn(t)] uncertainty,” IEEETrans.SmartGrid,vol.2,no.3,pp.519–527,Sept. ) n=1 2011. X [11] M. Neely, E. Modiano, and C. Rohrs, “Dynamic power allocation and routing for time-varying wireless networks,” IEEE J. Sel. Areas Commun.,vol.23,no.1,pp.89–103,Jan.2005. [12] M. J. Neely and R. Urgaonkar, “Opportunism, backpressure, and K stochasticoptimizationwiththewirelessbroadcastadvantage,”inAsilo- 1 marConferenceonSignals,Systems,andComputers’08,PacificGrove, ≤ E (Dk(t))2+(Rk(t))2+2Xk(t)(Rk(t)− 2 CA,Oct.2008,pp.1–7. ( k=1 [13] The National Renewable Energy Laboratory, “Western wind resources X(cid:2) N dataset,” [online] Available: http://wind.nrel.gov/Web nrel/. 1 D (t))|X (t)]}+ E I (t)2+ [14] S. B. Peterson, J. F. Whitacre, and J. Apt, “The economics of using k k n 2 plug-inhybridelectricvehicle batterypacksforgridstorage,”J.Power (n=1 Sources,vol.195,no.8,pp.2377–2384, 2010. (δ α (t))2+2Z (t)(I (Xt)−(cid:2)δ α (t))|Z (t)} n n n n n n n [15] “The Electric Reliability Council of Texas,” [online] Available: http://www.ercot.com/. [16] M. He, S.Murugesan, and J.Zhang, “Multiple timescale dispatch and schedulingforstochasticreliability insmartgridswithwindgeneration integration,”inProc.IEEEINFOCOM’11,Shanghai,China,Apr.2011, pp.461–465. K 1 [17] B.KarimiandV.Namboodiri,“Capacityanalysisofawirelessbackhaul = E{[(D (t))2+(R (t))2]}+ k k formeteringinthesmartgrid,”inProc.IEEEINFOCOM’12,Orlando, 2 k=1 FL,Mar.2012,pp.61–66. X [18] Z. Lu, W. Wang, and C. Wang, “Hiding traffic with camouflage: K Minimizing messagedelay inthe smartgrid under jamming,” inProc. E{Xk(t)(Rk(t)−Dk(t))|Xk(t)}+ IEEEINFOCOM’12,Orlando, FL,Mar.2012,pp.3066–3070. k=1 X 10