Optimal Power Cost Management Using Stored Energy in Data Centers



Similar documents
PROFIT TEST MODELLING IN LIFE ASSURANCE USING SPREADSHEETS PART ONE

Multiprocessor Systems-on-Chips

Single-machine Scheduling with Periodic Maintenance and both Preemptive and. Non-preemptive jobs in Remanufacturing System 1

Task is a schedulable entity, i.e., a thread

The Application of Multi Shifts and Break Windows in Employees Scheduling

Chapter 8: Regression with Lagged Explanatory Variables

Stochastic Optimal Control Problem for Life Insurance

ANALYSIS AND COMPARISONS OF SOME SOLUTION CONCEPTS FOR STOCHASTIC PROGRAMMING PROBLEMS

MTH6121 Introduction to Mathematical Finance Lesson 5

Duration and Convexity ( ) 20 = Bond B has a maturity of 5 years and also has a required rate of return of 10%. Its price is $613.

DYNAMIC MODELS FOR VALUATION OF WRONGFUL DEATH PAYMENTS

Chapter 2 Problems. 3600s = 25m / s d = s t = 25m / s 0.5s = 12.5m. Δx = x(4) x(0) =12m 0m =12m

Individual Health Insurance April 30, 2008 Pages

Optimal Investment and Consumption Decision of Family with Life Insurance

CHARGE AND DISCHARGE OF A CAPACITOR

PATHWISE PROPERTIES AND PERFORMANCE BOUNDS FOR A PERISHABLE INVENTORY SYSTEM

Constant Data Length Retrieval for Video Servers with Variable Bit Rate Streams

Journal Of Business & Economics Research September 2005 Volume 3, Number 9

Chapter 1.6 Financial Management

11/6/2013. Chapter 14: Dynamic AD-AS. Introduction. Introduction. Keeping track of time. The model s elements

Efficient Risk Sharing with Limited Commitment and Hidden Storage

Distributing Human Resources among Software Development Projects 1

Working Paper No Net Intergenerational Transfers from an Increase in Social Security Benefits

Analysis of Tailored Base-Surge Policies in Dual Sourcing Inventory Systems

Using Batteries to Reduce the Power Costs of Internet-scale Distributed Networks

Present Value Methodology

Hedging with Forwards and Futures

DETERMINISTIC INVENTORY MODEL FOR ITEMS WITH TIME VARYING DEMAND, WEIBULL DISTRIBUTION DETERIORATION AND SHORTAGES KUN-SHAN WU

A Real-Time Pricing Model for Electricity Consumption

Analogue and Digital Signal Processing. First Term Third Year CS Engineering By Dr Mukhtiar Ali Unar

The Grantor Retained Annuity Trust (GRAT)

Chapter 7. Response of First-Order RL and RC Circuits

Economics Honors Exam 2008 Solutions Question 5

ARCH Proceedings

The Transport Equation

A Production-Inventory System with Markovian Capacity and Outsourcing Option

Energy and Performance Management of Green Data Centers: A Profit Maximization Approach

Random Walk in 1-D. 3 possible paths x vs n. -5 For our random walk, we assume the probabilities p,q do not depend on time (n) - stationary

9. Capacitor and Resistor Circuits

UNDERSTANDING THE DEATH BENEFIT SWITCH OPTION IN UNIVERSAL LIFE POLICIES. Nadine Gatzert

Market Liquidity and the Impacts of the Computerized Trading System: Evidence from the Stock Exchange of Thailand

Inductance and Transient Circuits

Term Structure of Prices of Asian Options

TSG-RAN Working Group 1 (Radio Layer 1) meeting #3 Nynashamn, Sweden 22 nd 26 th March 1999

Why Did the Demand for Cash Decrease Recently in Korea?

TEMPORAL PATTERN IDENTIFICATION OF TIME SERIES DATA USING PATTERN WAVELETS AND GENETIC ALGORITHMS

USE OF EDUCATION TECHNOLOGY IN ENGLISH CLASSES

A Note on Using the Svensson procedure to estimate the risk free rate in corporate valuation

Option Put-Call Parity Relations When the Underlying Security Pays Dividends

Dynamic programming models and algorithms for the mutual fund cash balance problem

A Two-Account Life Insurance Model for Scenario-Based Valuation Including Event Risk Jensen, Ninna Reitzel; Schomacker, Kristian Juul

A Joint Optimization of Operational Cost and Performance Interference in Cloud Data Centers

Morningstar Investor Return

Appendix D Flexibility Factor/Margin of Choice Desktop Research

Making a Faster Cryptanalytic Time-Memory Trade-Off

Strategic Optimization of a Transportation Distribution Network

Measuring macroeconomic volatility Applications to export revenue data,

As widely accepted performance measures in supply chain management practice, frequency-based service

Stock Trading with Recurrent Reinforcement Learning (RRL) CS229 Application Project Gabriel Molina, SUID

Chapter 4: Exponential and Logarithmic Functions

Chapter Four: Methodology

INTEREST RATE FUTURES AND THEIR OPTIONS: SOME PRICING APPROACHES

Performance Center Overview. Performance Center Overview 1

THE FIRM'S INVESTMENT DECISION UNDER CERTAINTY: CAPITAL BUDGETING AND RANKING OF NEW INVESTMENT PROJECTS

MACROECONOMIC FORECASTS AT THE MOF A LOOK INTO THE REAR VIEW MIRROR

Forecasting and Information Sharing in Supply Chains Under Quasi-ARMA Demand

cooking trajectory boiling water B (t) microwave time t (mins)

Statistical Analysis with Little s Law. Supplementary Material: More on the Call Center Data. by Song-Hee Kim and Ward Whitt

I. Basic Concepts (Ch. 1-4)

Real-time Particle Filters

II.1. Debt reduction and fiscal multipliers. dbt da dpbal da dg. bal

Optimal Life Insurance Purchase and Consumption/Investment under Uncertain Lifetime

DOES TRADING VOLUME INFLUENCE GARCH EFFECTS? SOME EVIDENCE FROM THE GREEK MARKET WITH SPECIAL REFERENCE TO BANKING SECTOR

MODEL AND ALGORITHMS FOR THE REAL TIME MANAGEMENT OF RESIDENTIAL ELECTRICITY DEMAND. A. Barbato, G. Carpentieri

Spectrum-Aware Data Replication in Intermittently Connected Cognitive Radio Networks

Chapter 8 Student Lecture Notes 8-1

Appendix A: Area. 1 Find the radius of a circle that has circumference 12 inches.

Inventory Planning with Forecast Updates: Approximate Solutions and Cost Error Bounds

Mathematics in Pharmacokinetics What and Why (A second attempt to make it clearer)

Sampling Time-Based Sliding Windows in Bounded Space

Analysis of Pricing and Efficiency Control Strategy between Internet Retailer and Conventional Retailer

Network Effects, Pricing Strategies, and Optimal Upgrade Time in Software Provision.

The option pricing framework

policies are investigated through the entire product life cycle of a remanufacturable product. Benefiting from the MDP analysis, the optimal or

To Sponsor or Not to Sponsor: Sponsored Search Auctions with Organic Links and Firm Dependent Click-Through Rates

Working Paper On the timing option in a futures contract. SSE/EFI Working Paper Series in Economics and Finance, No. 619

Improvement of a TCP Incast Avoidance Method for Data Center Networks

Niche Market or Mass Market?

Optimal Stock Selling/Buying Strategy with reference to the Ultimate Average

A One-Sector Neoclassical Growth Model with Endogenous Retirement. By Kiminori Matsuyama. Final Manuscript. Abstract

The naive method discussed in Lecture 1 uses the most recent observations to forecast future values. That is, Y ˆ t + 1

Dependent Interest and Transition Rates in Life Insurance

Price Controls and Banking in Emissions Trading: An Experimental Evaluation

17 Laplace transform. Solving linear ODE with piecewise continuous right hand sides

We consider a decentralized assembly system in which a buyer purchases components from several first-tier

Life insurance cash flows with policyholder behaviour

INTRODUCTION TO FORECASTING

Relationships between Stock Prices and Accounting Information: A Review of the Residual Income and Ohlson Models. Scott Pirie* and Malcolm Smith**

Markov Chain Modeling of Policy Holder Behavior in Life Insurance and Pension

Dispatch-and-Search: Dynamic Multi-Ferry Control in Partitioned Mobile Networks

Transcription:

Opimal Power Cos Managemen Using Sored Energy in Daa Ceners Rahul Urgaonkar, Bhuvan Urgaonkar, Michael J. Neely, Anand Sivasubramanian Advanced Neworking Dep., Dep. of CSE, Dep. of EE Rayheon BBN Technologies, The Pennsylvania Sae Universiy, Universiy of Souhern California Cambridge MA, Universiy Park PA, Los Angeles CA rahul@bbn.com, {bhuvan,anand}@cse.psu.edu, mjneely@usc.edu ABSTRACT Since he elecriciy bill of a daa cener consiues a significan porion of is overall operaional coss, reducing his has become imporan. We invesigae cos reducion opporuniies ha arise by he use of uninerruped power supply (UPS) unis as energy sorage devices. This represens a deviaion from he usual use of hese devices as mere ransiional fail-over mechanisms beween uiliy and capive sources such as diesel generaors. We consider he problem of opporunisically using hese devices o reduce he ime average elecric uiliy bill in a daa cener. Using he echnique of Lyapunov opimizaion, we develop an online conrol algorihm ha can opimally exploi hese devices o minimize he ime average cos. This algorihm operaes wihou any knowledge of he saisics of he workload or elecriciy cos processes, making i aracive in he presence of workload and pricing uncerainies. An ineresing feaure of our algorihm is ha is deviaion from opimaliy reduces as he sorage capaciy is increased. Our work opens up a new area in daa cener power managemen. Caegories and Subjec Descripors C.4 [Performance of Sysems]: Modeling echniques; Design sudies General Terms Algorihms, Performance, Theory Keywords Power Managemen, Daa Ceners, Sochasic Opimizaion, Opimal Conrol 1. INTRODUCTION Daa ceners spend a significan porion of heir overall operaional coss owards heir elecriciy bills. As an example, one recen case sudy suggess ha a large 15MW Permission o make digial or hard copies of all or par of his work for personal or classroom use is graned wihou fee provided ha copies are no made or disribued for profi or commercial advanage and ha copies bear his noice and he full ciaion on he firs page. To copy oherwise, o republish, o pos on servers or o redisribue o liss, requires prior specific permission and/or a fee. SIGMETRICS 11, June 7 11, 2011, San Jose, California, USA. Copyrigh 2011 ACM 978-1-4503-0262-3/11/06...$10.00. Price ($/MW Hour) 150 100 50 0 0 20 40 60 80 100 120 140 160 Hour Figure 1: Avg. hourly spo marke price during he week of 01/01/2005-01/07/2005 for LA1 Zone [1]. daa cener (on he more energy-efficien end) migh spend abou $1M on is monhly elecriciy bill. In general, a daa cener spends beween 30-50% of is operaional expenses owards power [10]. A large body of research addresses hese expenses by reducing he energy consumpion of hese daa ceners. This includes designing/employing hardware wih beer power/performance rade-offs [9,17,20], sofware echniques for power-aware scheduling [12], workload migraion, resource consolidaion [6], among ohers. Power prices exhibi variaions along ime, space (geography), and even across uiliy providers. As an example, consider Fig. 1 ha shows he average hourly spo marke prices for he Los Angeles Zone LA1 obained from CAISO [1]. These correspond o he week of 01/01/2005-01/07/2005 and denoe he average price of 1 MW-Hour of elecriciy. Consequenly, minimizaion of energy consumpion need no coincide wih ha of he elecriciy bill. Given he diversiy wihin power price and availabiliy, aenion has recenly urned owards demand response (DR) wihin daa ceners. DR wihin a daa cener (or a se of relaed daa ceners) aemps o opimize he elecriciy bill by adaping is needs o he emporal, spaial, and cross-uiliy diversiy exhibied by power price. The key idea behind hese echniques is o preferenially shif power draw (i) o imes and places or (ii) from uiliies offering cheaper prices. Typically some consrains in he form of performance requiremens for he workload (e.g., response imes offered o he cliens of a Web-based applicaion) limi he cos reducion benefis ha can resul from such DR. Whereas exising DR echniques have relied on various forms of workload scheduling/shifing, a complemenary knob o faciliae such movemen of power needs is offered by energy sorage devices, ypically uninerruped power supply (UPS) unis, residing in daa ceners.

A daa cener deploys capive power sources, ypically diesel generaors (DG), ha i uses for keeping iself powered up when he uiliy experiences an ouage. The UPS unis serve as a bridging mechanism o faciliae his ransiion from uiliy o DG: upon a uiliy failure, he daa cener is kep powered by he UPS uni using energy sored wihin is baeries, before he DG can sar up and provide power. Whereas his ransiion akes only 10-20 seconds, UPS unis have enough baery capaciy o keep he enire daa cener powered a is maximum power needs for anywhere beween 5-30 minues. Tapping ino he energy reserves of he UPS uni can allow a daa cener o improve is elecriciy bill. Inuiively, he daa cener would sore energy wihin he UPS uni when prices are low and use his o augmen he draw from he uiliy when prices are high. In his paper, we consider he problem of developing an online conrol policy o exploi he UPS uni along wih he presence of delay-olerance wihin he workload o opimize he daa cener s elecriciy bill. This is a challenging problem because daa ceners experience ime-varying workloads and power prices wih possibly unknown saisics. Even when saisics can be approximaed (say by learning using pas observaions), radiional approaches o consruc opimal conrol policies involve he use of Markov Decision Theory and Dynamic Programming [5]. I is well known ha hese echniques suffer from he curse of dimensionaliy where he complexiy of compuing he opimal sraegy grows wih he sysem size. Furhermore, such soluions resul in hard-o-implemen sysems, where significan recompuaion migh be needed when saisics change. In his work, we make use of a differen approach ha can overcome he challenges associaed wih dynamic programming. This approach is based on he recenly developed echnique of Lyapunov opimizaion [8] [15] ha enables he design of online conrol algorihms for such ime-varying sysems. These algorihms operae wihou requiring any knowledge of he sysem saisics and are easy o implemen. We design such an algorihm for opimally exploiing he UPS uni and delay-olerance of workloads o minimize he ime average cos. We show ha our algorihm can ge wihin O(1/V ) of he opimal soluion where he maximum value of V is limied by baery capaciy. We noe ha, for he same parameers, a dynamic programming based approach (if i can be solved) will yield a beer resul han our algorihm. However, his gap reduces as he baery capaciy is increased. Our algorihm is hus mos useful when such scaling is pracical. 2. RELATED WORK One recen body of work proposes online algorihms for using UPS unis for cos reducion via shaving workload peaks ha correspond o higher energy prices [3, 4]. This work is highly complemenary o ours in ha i offers a wors-case compeiive raio analysis while our approach looks a he average case performance. Whereas a variey of work has looked a workload shifing for power cos reducion [20] or oher reasons such as performance and availabiliy [6], our work differs boh due o is usage of energy sorage as well as he cos opimaliy guaranees offered by our echnique. Some research has considered consumers wih access o muliple uiliy providers, each wih a differen carbon profile, power price and availabiliy and looked a opimizing cos subjec o performance and/or carbon emissions Grid P() - R() P() R() D() - Baery + W() Daa Cener Figure 2: Block diagram for he basic model. consrains [11]. Anoher line of work has looked a cos reducion opporuniies offered by geographical variaions wihin uiliy prices for daa ceners where porions of workloads could be serviced from one of several locaions [11,18]. Finally, [7] considers he use of rechargeable baeries for maximizing sysem uiliy in a wireless nework. While all of his research is highly complemenary o our work, here are hree key differences: (i) our invesigaion of energy sorage as an enabler of cos reducion, (ii) our use of he echnique of Lyapunov opimizaion which allows us o offer a provably cos opimal soluion, and (iii) combining energy sorage wih delay-olerance wihin workloads. 3. BASIC MODEL We consider a ime-sloed model. In he basic model, we assume ha in every slo, he oal power demand generaed by he daa cener in ha slo mus be me in he curren slo iself (using a combinaion of power drawn from he uiliy and he baery). Thus, any buffering of he workload generaed by he daa cener is no allowed. We will relax his consrain laer in Sec. 6 when we allow buffering of some of he workload while providing wors case delay guaranees. In he following, we use he erms UPS and baery inerchangeably. 3.1 Workload Model Le W () be oal workload (in unis of power) generaed in slo. LeP () be he oal power drawn from he grid in slo ou of which R() is used o recharge he baery. Also, le D() be he oal power discharged from he baery in slo. Then in he basic model, he following consrain mus be saisfied in every slo (Fig. 2): W () =P () R()+D() (1) Every slo, a conrol algorihm observes W () and makes decisions abou how much power o draw from he grid in ha slo, i.e., P (), and how much o recharge and discharge he baery, i.e., R() andd(). Noe ha by (1), having chosen P () and R() compleely deermines D(). Assumpions on he saisics of W (): The workload process W () is assumed o vary randomly aking values from a se W of non-negaive values and is no influenced by pas conrol decisions. The se W is assumed o be finie, wih poenially arbirarily large size. The underlying probabiliy disribuion or saisical characerizaion of W () isno necessarily known. We only assume ha is maximum value is finie, i.e., W () W max for all. For simpliciy, in he basic model we assume ha W () evolves according o an i.i.d. process noing ha he algorihm developed for his case can be applied wihou any modificaions o non-i.i.d. scenarios as well. The analysis and performance guaranees for he non-i.i.d. case can be

obained using he delayed Lyapunov drif and T slo drif echniques developed in [8] [15]. 3.2 Baery Model Ideally, we would like o incorporae he following idiosyncrasies of baery operaion ino our model. Firs, baeries become unreliable as hey are charged/discharged, wih higher deph-of-discharge (DoD) - percenage of maximum charge removed during a discharge cycle - causing faser degradaion in heir reliabiliy. This dependence beween he useful lifeime of a baery and how i is discharged/charged is expressed via baery lifeime chars [13]. For example, wih lead-acid baeries ha are commonly used in UPS unis, 20% DoD yields 1400 cycles [2]. Second, baeries have conversion loss whereby a porion of he energy sored in hem is los when discharging hem (e.g., abou 10-15% for lead-acid baeries). Furhermore, cerain regions of baery operaion (high rae of discharge) are more inefficien han ohers. Finally, he sorage iself maybe leaky, so ha he sored energy decreases over ime, even in he absence of any discharging. For simpliciy, in he basic model we will assume ha here is no power loss eiher in recharging or discharging he baeries, noing ha his can be easily generalized o he case where a fracion of R(),D() is los. We will also assume ha he baeries are no leaky, so ha he sored energy level decreases only when hey are discharged. This is a reasonable assumpion when he ime scale over which he loss akes place is much larger han ha of ineres o us. To model he effec of repeaed recharging and discharging on he baery s lifeime, we assume ha wih each recharge and discharge operaion, a fixed cos (in dollars) of C rc and C dc respecively is incurred. The choice of hese parameers would affec he rade-off beween he cos of he baery iself and he cos reducion benefis i offers. For example, suppose a new baery coss B dollars and i can susain N discharge/charge cycles (ignoring DoD for now). Then seing C rc = C dc = B/N would amoun o expecing he baery o pay for iself by augmening he uiliy N imes over is lifeime. In any slo, we assume ha one can eiher recharge or discharge he baery or do neiher, bu no boh. This means ha for all, wehave: R() > 0 = D() =0,D() > 0 = R() =0 (2) Le Y () denoe he baery energy level in slo. Then, he dynamics of Y () can be expressed as: Y ( +1)=Y () D()+R() (3) The baery is assumed o have a finie capaciy Y max so ha Y () Y max for all. Furher, for he purpose of reliabiliy, i may be required o ensure ha a minimum energy level Y min 0 is mainained a all imes. For example, his could represen he amoun of energy required o suppor he daa cener operaions unil a secondary power source (such as DG) is acivaed in he even of a grid ouage. Recall ha he UPS uni is inegral o he availabiliy of power supply o he daa cener upon uiliy ouage. Indiscriminae discharging of UPS can leave he daa cener in siuaions where i is unable o safely fail-over o DG upon a uiliy ouage. Therefore, discharging he UPS mus be done carefully so ha i sill possesses enough charge so reliably carry ou is role as a ransiion device beween uiliy and DG. Thus, he following condiion mus be me in every slo under any feasible conrol algorihm: Y min Y () Y max (4) The effeciveness of he online conrol algorihm we presen in Sec. 5 will depend on he magniude of he difference Y max Y min. In mos pracical scenarios of ineres, his value is expeced o be a leas moderaely large: recen work suggess ha soring energy Y min o las abou a minue is sufficien o offer reliable daa cener operaion [14], while Y max can vary beween 5-20 minues (or even higher) due o reasons such as UPS unis being available only in cerain sizes and he need o keep room for fuure IT growh. Furhermore, he UPS unis are sized based on he maximum provisioned capaciy of he daa cener, which is iself ofen subsanially (up o wice [10]) higher han he maximum acual power demand. The iniial charge level in he baery is given by Y ini and saisfies Y min Y ini Y max. Finally, we assume ha he maximum amouns by which we can recharge or discharge he baery in any slo are bounded. Thus, we have : 0 R() R max, 0 D() D max (5) We will assume ha Y max Y min >R max + D max while noing ha in pracice, Y max Y min is much larger han R max + D max. Noe ha any feasible conrol decision on R(),D() mus ensure ha boh of he consrains (4) and (5) are saisfied. This is equivalen o he following: 0 R() min[r max,y max Y ()] (6) 0 D() min[d max,y() Y min] (7) 3.3 Cos Model The cos per uni of power drawn from he grid in slo is denoed by C(). In general, i can depend on boh P (), he oal amoun of power drawn in slo, and an auxiliary sae variable S(), ha capures parameers such as ime of day, ideniy of he uiliy provider, ec. For example, he per uni cos may be higher during business hours, ec. Similarly, for any fixed S(), i may be he case ha C() increases wih P () sohaperunicosofelecriciyin- creases as more power is drawn. This may be because he uiliy provider wans o discourage heavier loading on he grid. Thus, we assume ha C() is a funcion of boh S() and P () and we denoe his as: C() =Ĉ(S(),P()) (8) For noaional convenience, we will use C() odenoehe per uni cos in he res of he paper noing ha he dependence of C() ons() andp () is implici. The auxiliary sae process S() is assumed o evolve independenly of he decisions aken by any conrol policy. For simpliciy, we assume ha every slo i akes values from a finie bu arbirarily large se S in an i.i.d. fashion according o a poenially unknown disribuion. This can again be generalized o non i.i.d. Markov modulaed scenarios using he echniques developed in [8] [15]. For each S(), he uni cos is assumed o be a non-decreasing funcion of P (). Noe ha i is no necessarily convex or sricly monoonic or coninuous. This is quie general and can be used o model a variey of scenarios. A special case is when C() is only a funcion of S(). The opimal conrol acion for his

case has a paricularly simple form and we will highligh his in Sec. 5.1.1. The uni cos is assumed o be non-negaive and finie for all S(),P(). We assume ha he maximum amoun of power ha can be drawn from he grid in any slo is upper bounded by P peak.thus,wehaveforall: 0 P () P peak (9) Noe ha if we consider he original scenario where baeries are no used, hen P peak mus be such ha all workload can be saisfied. Therefore, P peak W max. Finally, le C max and C min denoe he maximum and minimum per uni cos respecively over all S(),P(). Also le χ min > 0 be a consan such ha for any P 1,P 2 [0,P peak ] where P 1 P 2, he following holds for all χ χ min: P 1( χ + C(P 1,S)) P 2( χ + C(P 2,S)) S S (10) For example, when C() does no depend on P (), hen χ min = C max saisfies (10). This follows by noing ha ( C max + C()) 0 for all. Similarly, suppose C() does no depend on S(), bu is coninuous, convex, and increasing in P (). Then, i can be shown ha χ min = C(P peak )+P peak C (P peak ) saisfies (10) where C (P peak ) denoes he derivaive of C() evaluaed a P peak. In he following, we assume ha such a finie χ min exiss for he given cos model. We furher assume ha χ min >C min. Thecaseofχ min = C min corresponds o he degenerae case where he uni cos is fixed for all imes and we do no consider i in his paper. Wha is known in each slo?: We assume ha he value of S() and he form of he funcion C(P (),S()) for ha slo is known. For example, his may be obained beforehand using pre-adverised prices by he uiliy provider. We assume ha given an S() =s, C() is a deerminisic funcion of P () and his holds for all s. Similarly, he amoun of incoming workload W () is known a he beginning of each slo. Given his model, our goal is o design a conrol algorihm ha minimizes he ime average cos while meeing all he consrains. This is formalized in he nex secion. 4. CONTROL OBJECTIVE Le P (),R() and D() denoe he conrol decisions made in slo by any feasible policy under he basic model as discussed in Sec. 3. These mus saisfy he consrains (1), (2), (6), (7), and (9) every slo. We define he following indicaor variables ha are funcions of he conrol decisions regarding a recharge or discharge operaion in slo : j j 1 if R() > 0 1 if D() > 0 1 R() = 1 0 else D() = 0 else Noe ha by (2), a mos one of 1 R() and1 C() canake he value 1. Then he oal cos incurred in slo is given by P ()C()+1 R()C rc +1 D()C dc. The ime-average cos under his policy is given by: lim E {P (τ)c(τ)+1 R(τ)C rc +1 D(τ)C dc } (11) where he expecaion above is wih respec o he poenial randomness of he conrol policy. Assuming for he ime being ha his limi exiss, our goal is o design a conrol algorihm ha minimizes his ime average cos subjec o he consrains described in he basic model. Mahemaically, his can be saed as he following sochasic opimizaion problem: P1 : Minimize: lim E {P (τ)c(τ)+1 R(τ)C rc +1 D(τ)C dc } Subjec o: Consrains (1), (2), (6), (7), (9) The finie capaciy and underflow consrains (6), (7) make his a paricularly challenging problem o solve even if he saisical descripions of he workload and uni cos process are known. For example, he radiional approach based on Dynamic Programming [5] would have o compue he opimal conrol acion for all possible combinaions of he baery charge level and he sysem sae (S(),W()). Insead, we ake an alernae approach based on he echnique of Lyapunov opimizaion, aking he finie size queues consrain explicily ino accoun. Noe ha a soluion o he problem P1 is a conrol policy ha deermines he sequence of feasible conrol decisions P (), R(), D(), o be used. Le φ op denoe he value of he objecive in problem P1 under an opimal conrol policy. Define he ime-average rae of recharge and discharge under any policy as follows: R = lim E {R(τ)}, D = lim E {D(τ)} (12) Now consider he following problem: P2 : Minimize: lim E {P (τ)c(τ)+1 R(τ)C rc +1 D(τ)C dc } Subjec o: Consrains (1), (2), (5), (9) R = D (13) Le ˆφ denoe he value of he objecive in problem P2 under an opimal conrol policy. By comparing P1 and P2, ican be shown ha P2 is less consrained han P1. Specifically, any feasible soluion o P1 would also saisfy P2. Tosee his, consider any policy ha saisfies (6) and (7) for all. This ensures ha consrains (4) and (5) are always me by his policy. Then summing equaion (3) over all τ {0, 1, 2,..., 1} under his policy and aking expecaion of boh sides yields: X 1 E {Y ()} Y ini = E {R(τ) D(τ)} Since Y min Y () Y max for all, dividing boh sides by and aking limis as yields R = D. Thus, his policy saisfies consrain (13) of P2. Therefore, any feasible soluion o P1 also saisfies P2. This implies ha he opimal value of P2 canno exceed ha of P1, soha ˆφ φ op. Our approach o solving P1 will be based on his observaion. We firs noe ha i is easier o characerize he opimal soluion o P2. This is because he dependence on Y () has been removed. Specifically, i can be shown ha he opimal soluion o P2 can be achieved by a saion-

ary, randomized conrol policy ha chooses conrol acions P (),D(),R() every slo purely as a funcion (possibly randomized) of he curren sae (W (),S()) and independen of he baery charge level Y (). This fac is presened in he following lemma: Lemma 1. (Opimal Saionary, Randomized Policy): If he workload process W () and auxiliary process S() are i.i.d. over slos, hen here exiss a saionary, randomized policy ha akes conrol decisions P sa (),R sa (),D sa () every slo purely as a funcion (possibly randomized) of he curren sae (W (),S()) while saisfying he consrains (1), (2), (5), (9) and providing he following guaranees: E R () sa = E D () sa (14) E P sa ()C()+1 sa R ()C rc +1 sa D ()C dc = ˆφ (15) where he expecaions above are wih respec o he saionary disribuion of (W (),S()) and he randomized conrol decisions. Proof. This resul follows from he framework in [8, 15] and is omied for breviy. I should be noed ha while i is possible o characerize and poenially compue such a policy, i may no be feasible for he original problem P1 as i could violae he consrains (6) and (7). However, he exisence of such a policy can be used o consruc an approximaely opimal policy ha mees all he consrains of P1 using he echnique of Lyapunov opimizaion [8] [15]. This policy is dynamic and does no require knowledge of he saisical descripion of he workload and cos processes. We presen his policy and derive is performance guaranees in he nex secion. This dynamic policy is approximaely opimal where he approximaion facor improves as he baery capaciy increases. Also noe ha he disance from opimaliy for our policy is measured in erms of ˆφ. However, since ˆφ φ op, inpracice, he approximaion facor is beer han he analyical bounds. 5. OPTIMAL CONTROL ALGORITHM We now presen an online conrol algorihm ha approximaely solves P1. This algorihm uses a conrol parameer V > 0 ha affecs he disance from opimaliy as shown laer. This algorihm also makes use of a queueing sae variable X() o rack he baery charge level and is defined as follows: X() =Y () Vχ min D max Y min (16) Recall ha Y () denoes he acual baery charge level in slo and evolves according o (3). I can be seen ha X() is simply a shifed version of Y () and is dynamics is given by: X( +1) =X() D() +R() (17) Noe ha X() can be negaive. We will show ha his definiion enables our algorihm o ensure ha he consrain (4) is me. We are now ready o sae he dynamic conrol algorihm. Le (W (),S()) and X() denoe he sysem sae in slo. Then he dynamic algorihm chooses conrol acion P () as W high W mid W low Figure 3: Periodic W () process in he example. he soluion o he following opimizaion problem: P3 : i Minimize: X()P () +V hp ()C()+1 R()C rc +1 D()C dc Subjec o: Consrains (1), (2), (5), (9) The consrains above resul in he following consrain on P (): P low P () P high (18) where P low =max[0,w() D max] andp high =min[p peak,w()+ R max]. Le P (),R (), and D () denoe he opimal soluion o P3. Then, he dynamic algorihm chooses he recharge and discharge values as follows. j R P () W () if P () >W() () = 0 else j D W () P () if P () <W() () = 0 else Noe ha if P () =W (), hen boh R () =0andD () = 0 and all demand is me using power drawn from he grid. I can be seen from he above ha he conrol decisions saisfy he consrains 0 R () R max and 0 D () D max. Tha he finie baery consrains and he consrains (6), (7) are also me will be shown in Sec. 5.3. Afer compuing hese quaniies, he algorihm implemens hem and updaes he queueing variable X() according o (17). This process is repeaed every slo. Noe ha in solving P3, he conrol algorihm only makes use of he curren sysem sae values and does no require knowledge of he saisics of he workload or uni cos processes. Thus, i is myopic and greedy in naure. From P3, i is seen ha he algorihm ries o recharge he baery when X() is negaive and per uni cos is low. And i ries o discharge he baery when X() is posiive. Tha his is sufficien o achieve opimaliy will be shown in Theorem 1. The queueing variable X() plays a crucial role as making decisions purely based on prices is no necessarily opimal. To ge some inuiion behind he working of his algorihm, consider he following simple example. Suppose W () can ake hree possible values from he se {W low,w mid,w high } where W low <W mid <W high. Similarly, C() can ake hree possible values in {C low,c mid,c high } where C low <C mid < C high and does no depend on P (). We assume ha he workload process evolves in a frame-based periodic fashion. Specifically, in every odd numbered frame, W () =W mid for all excep he las slo of he frame when W () =W low. In every even numbered frame, W () =W mid for all excep he las slo of he frame when W () =W high. This is il-

Y max 20 30 40 50 75 100 V 0 1.25 2.5 3.75 6.875 10.0 Avg. Cos 94.0 92.5 91.1 88.5 88.0 87.0 Table 1: Average Cos vs. Y max lusraed in Fig. 3. The C() process evolves similarly, such ha C() =C low when W () =W low, C() =C mid when W () =W mid,andc() =C high when W () =W high. In he following, we assume a frame size of 5 slos wih W low = 10, W mid = 15, and W high = 20 unis. Also, C low = 2, C mid = 6, and C high = 10 dollars. Finally, R max = D max = 10, P peak = 20, C rc = C dc =5,Y ini = Y min = 0 and we vary Y max > R max + D max. In his example, inuiively, an opimal algorihm ha knows he workload and uni cos process beforehand would recharge he baery as much as possible when C() =C low and discharge i as much as possible when C() = C high. In fac, i can be shown ha he following sraegy is feasible and achieves minimum average cos: If C() =C low,w() =W low,henp () =W low + R max, R() =R max, D() =0. If C() = C mid,w() =W mid, hen P () = W mid, R() =0,D() =0. If C() =C high,w() =W high,henp () =W high D max, R() =0,D() =D max. The ime average cos resuling from his sraegy can be easily calculaed and is given by 87.0 dollars/slo for all Y max > 10. Also, we noe ha he cos resuling from an algorihm ha does no use he baery in his example is given by 94.0 dollars/slo. Now we simulae he dynamic algorihm for his example for differen values of Y max for 1000 slos (200 frames). The value of V is chosen o be Ymax Y min R max D max C high C low = Y max 20 (his choice will become clear in Sec. 5.2 when we 8 relae V o he baery capaciy). Noe ha he number of slos for which a fully charged baery can susain he daa cener a maximum load is Y max/w high. In Table 1, we show he ime average cos achieved for differen values of Y max. I can be seen ha as Y max increases, he ime average cos approaches he opimal value (his behavior will be formalized in Theorem 1). This is remarkable given ha he dynamic algorihm operaes wihou any knowledge of he fuure workload and cos processes. To examine he behavior of he dynamic algorihm in more deail, we fix Y max = 100 and look a he sample pahs of he conrol decisions aken by he opimal offline algorihm and he dynamic algorihm during he firs 200 slos. This is shown in Figs. 4 and 5. I can be seen ha iniially, he dynamic ends o perform subopimally. Bu evenually i learns o make close o opimal decisions. I migh be emping o conclude from his example ha an algorihm based on a price hreshold is opimal. Specifically, such an algorihm makes a recharge vs. discharge decision depending on wheher he curren price C() is smaller or larger han a hreshold. However, i is easy o consruc examples where he dynamic algorihm ouperforms such a hreshold based algorihm. Specifically, suppose ha he W () process akes values from he inerval [10, 90] uniformly a random every slo. Also, suppose P() 20 15 10 0 20 40 60 80 100 120 140 160 180 200 ime Figure 4: P () under he offline opimal soluion wih Y max = 100. P() 20 15 10 0 20 40 60 80 100 120 140 160 180 200 ime Figure 5: P () under he Dynamic Algorihm wih Y max = 100. C() akes values from he se {2, 6, 10} dollars uniformly a random every slo. We fix he oher parameers as follows: R max = D max = 10, P peak = 90, C rc = C dc =1, Y ini = Y min =0andY max = 100. We hen simulae a hreshold based algorihm for differen values of he hresholdinhese{2, 6, 10} and selec he one ha yields he smalles cos. This was found o be 280.7 dollars/slo. We hen simulae he dynamic algorihm for 10000 slos wih V = Ymax 20 =10.0 and i yields an average cos of 275.5 10 2 dollars/slo. We also noe ha he cos resuling from an algorihm ha does no use he baery in his example is given by 300.73 dollars/slo. We now esablish wo properies of he srucure of he opimal soluion o P3 ha will be useful in analyzing is performance laer. Lemma 2. The opimal soluion o P3 has he following properies: 1. If X() > VC min, hen he opimal soluion always chooses R () =0. 2. If X() < Vχ min, hen he opimal soluion always chooses D () =0. Proof. See [19]. 5.1 Solving P3 In general, he complexiy of solving P3 depends on he srucure of he uni cos funcion C(). For many cases of pracical ineres, P3 is easy o solve and admis closed form soluions ha can be implemened in real ime. We consider wo such cases here. Le θ() denoehevalueof he objecive in P3 when here is no recharge or discharge. Thus θ() = W ()(X()+ VC()). 5.1.1 C() does no depend on P () Suppose ha C() depends only on S() and no on P (). We can rewrie he expression in he objecive of P3 as

P ()(X() +VC()) + 1 R()VC rc +1 D()VC dc. Then, he opimal soluion has he following simple hreshold srucure. 1. If X() +VC() > 0, hen R () =0sohahereis no recharge and we have he following wo cases: (a) If P low (X() +VC()) + VC dc <θ(), hen discharge as much as possible, so ha we ge D () = min[w (),D max], P () =max[0,w() D max]. (b) Else, draw all power from he grid. This yields D () =0andP () =W (). 2. Else if X()+VC() 0, hen D () = 0 so ha here is no discharge and we have he following wo cases: (a) If P high (X()+VC())+VC rc <θ(), hen recharge as much as possible. This yields R () =min[p peak W (),R max]andp () =min[p peak,w()+r max]. (b) Else, draw all power from he grid. This yields R () =0andP () =W (). We will show ha his soluion is feasible and does no violae he finie baery consrain in Sec. 5.3. 5.1.2 C() convex, increasing in P () Nex suppose for each S(), C() is convex and increasing in P (). For example, Ĉ(S(),P()) may have he form α(s())p 2 () whereα(s()) > 0 for all S(). In his case, P3 becomes a sandard convex opimizaion problem in a single variable P () and can be solved efficienly. The full soluion is provided in [19]. 5.2 Performance Theorem We firs define an upper bound V max on he maximum value ha V can ake in our algorihm. V Ymax Ymin Rmax Dmax max = (19) χ min C min Then we have he following resul. Theorem 1. (Algorihm Performance) Suppose he iniial baery charge level Y ini saisfies Y min Y ini Y max. Then implemening he algorihm above wih any fixed parameer V such ha 0 <V V max for all {0, 1, 2,...} resuls in he following performance guaranees: 1. The queue X() is deerminisically upper and lower bounded for all as follows: Vχ min D max X() Y max Y min D max Vχ min (20) 2. The acual baery level Y () saisfies Y min Y () Y max for all. 3. All conrol decisions are feasible. 4. If W () and S() are i.i.d. over slos, hen he imeaverage cos under he dynamic algorihm is wihin B/V of he opimal value: lim E {P (τ)c(τ)+1 R(τ)C rc +1 D(τ)C dc } φ op + B/V (21) where B is a consan given by B = max[r2 max,d2 max ] 2 and φ op is he opimal soluion o P1 under any feasible conrol algorihm (possibly wih knowledge of fuure evens). Theorem 1 par 4 shows ha by choosing larger V,heimeaverage cos under he dynamic algorihm can be pushed closer o he minimum possible value φ op. However, V max limis how large V can be chosen. We prove Theorem 1 in he nex secion. 5.3 Proof of Theorem 1 Proof. (Theorem 1 par 1) We firs show ha (20) holds for =0. Wehaveha Y min Y (0) = Y ini Y max (22) Using he definiion (16), we have ha Y (0) = X(0) + Vχ min + D max + Y min. Using his in (22), we ge: Y min X(0) + Vχ min + D max + Y min Y max This yields Vχ min D max X(0) Y max Y min D max Vχ min Now suppose (20) holds for slo. We will show ha i also holds for slo + 1. Firs, suppose VC min <X() Y max Y min D max Vχ min. Then, from Lemma 2, we have ha R () = 0. Thus, using (17), we have ha X( + 1) X() Y max Y min D max Vχ min. Nex, suppose X() VC min. Then, he maximum possible increase is R max so ha X( +1) VC min + R max. Now for all V such ha 0 <V V max, wehaveha VC min + R max Y max Y min D max Vχ min. This follows from he definiion (19) and he fac ha χ min >C min. Thus, we have X( +1) Y max Y min D max Vχ min. Nex, suppose Vχ min D max X() < Vχ min. Then, from Lemma 2, we have ha D () = 0. Thus, using (17) we have ha X( +1) X() Vχ min D max. Nex, suppose Vχ min X(). Then he maximum possible decrease is D max so ha X( +1) Vχ min D max for his case as well. This shows ha X( +1) Vχ min D max. Combining hese wo bounds proves (20). Proof. (Theorem 1 pars 2 and 3) Par 2 direcly follows from (20) and (16). Using Y () =X()+Vχ min + D max + Y min in he lower bound in (20), we have: Vχ min D max Y () Vχ min D max Y min, i.e., Y min Y (). Similarly, using Y () =X() +Vχ min + D max + Y min in he upper bound in (20), we have: Y () Vχ min D max Y min Y max Y min D max Vχ min, i.e., Y () Y max. Par 3 now follows from par 2 and he consrain on P () in P3. Proof. (Theorem 1 par 4) We make use of he echnique of Lyapunov opimizaion o show (21). We sar by defining a Lyapunov funcion as a scalar measure of congesion in he sysem. Specifically, we define he following Lyapunov funcion: L(X()) = 1 2 X2 (). Define he condiional 1-slo Lyapunov drif as follows: Δ(X()) =E {L(X( +1)) L(X()) X()} (23) Using (17), Δ(X()) can be bounded as follows (see [19] for deails): Δ(X()) B X()E {D() R() X()} (24)

where B = max[r2 max,d2 max ]. Following he Lyapunov opimizaion framework of [8], we add o boh sides of (24) he 2 penaly erm V E {P ()C()+1 R()C rc +1 D()C dc X()} o ge he following: Δ(X()) + V E {P ()C()+1 R()C rc +1 D()C dc X()} B X()E {D() R() X()} + V E {P ()C()+1 R()C rc +1 D()C dc X()} (25) Using (1), we can rewrie he above as: Δ(X()) + V E {P ()C()+1 R()C rc +1 D()C dc X()} B X()E {W () X()} + X()E {P () X()} + V E {P ()C()+1 R()C rc +1 D()C dc X()} (26) Comparing his wih P3, i can be seen ha given any queue value X(), our conrol algorihm is designed o minimize he righ hand side of (26) over all possible feasible conrol policies. This includes he opimal, saionary, randomized policy given in Lemma 1. Then, plugging he conrol decisions corresponding o he saionary, randomized policy, he following holds for he dynamic algorihm: Δ(X()) + V E {P ()C()+1 R()C rc +1 D()C dc X()} B + V E P sa ()C sa ()+1 sa R ()C rc +1 sa D ()C dc X() = B + V ˆφ B + Vφ op Taking he expecaion of boh sides and using he law of ieraed expecaions and summing over {0, 1, 2,...,T 1}, wege: TX 1 V E {P ()C()+1 R()C rc +1 D()C dc } =0 BT + VTφ op E {L(X(T ))} + E {L(X(0))} Dividing boh sides by VT and aking limi as T yields: T 1 X 1 lim E {P ()C()+1 R()C rc +1 D()C dc } φ op + B/V T T =0 wherewehaveusedhefachae {L(X(0))} is finie and ha E {L(X(T ))} is non-negaive. 6. EXTENSIONS TO BASIC MODEL In his secion, we exend he basic model of Sec. 3 o he case where porions of he workload are delay-oleran in he sense hey can be posponed by a cerain amoun wihou affecing he uiliy he daa cener derives from execuing hem. We refer o such posponemen as buffering he workload. Specifically, we assume ha he oal workload consiss of boh delay oleran and delay inoleran componens. Similar o he workload in he basic model, he delay inoleran workload canno be buffered and mus be served immediaely. However, he delay oleran componen may be buffered and served laer. As an example, daa ceners run virus scanning programs on mos of heir servers rouinely (say once per day). As long as a virus scan is execued once a day, heir purpose is served - i does no maer wha ime of he day is chosen for his. The abiliy o delay some of he workload gives more opporuniies o reduce he average power cos in addiion o using he baery. We assume ha our daa cener has sysem mechanisms o implemen such buffering of specified workloads. In he following, we will denoe he oal workload generaed in slo by W (). This consiss of he delay oleran and inoleran componens denoed by W 1() andw 2() respecively, so ha W () =W 1()+W 2() for all. Similar o he basic model, we use P (),R(),D() o denoe he oal power drawn from he grid, he oal power used o recharge he baery and he oal power discharged from he baery in slo, respecively. Thus, he oal amoun available o serve he workload is given by P () R()+D(). Le γ() denoe he fracion of his ha is used o serve he delay oleran workload in slo. Then he amoun used o serve he delay inoleran workload is (1 γ())(p () R()+D()). Noe ha he following consrain mus be saisfied every slo: 0 γ() 1 (27) We nex define U() as he unfinished work for he delay oleran workload in slo. The dynamics for U() canbe expressed as: U( +1)=max[U() γ()(p () R()+D()), 0] + W 1() (28) We assume ha U() is served in FIFO order. For he delay inoleran workload, here are no such queues since all incoming workload mus be served in he same slo. This means: W 2() =(1 γ())(p () R()+D()) (29) The block diagram for his exended model is shown in Fig. 6. Similar o he basic model, we assume ha for i =1, 2, W i() varies randomly in an i.i.d. fashion, aking values from asew i of non-negaive values. We assume ha W 1() + W 2() W max for all. We also assume ha W 1() W 1,max <W max and W 2() W 2,max <W max for all. We furher assume ha P peak W max +max[r max,d max]. We use he same model for baery and uni cos as in Sec. 3. Our objecive is o minimize he ime-average cos subjec o meeing all he consrains (such as finie baery size and (29)) and ensuring finie average delay for he delay oleran workload. This can be saed as: P4 : Minimize: lim E {P (τ)c(τ)+1 R(τ)C rc +1 D(τ)C dc } Subjec o: Consrains (2), (5), (6), (7), (9), (27), (29) Finie average delay for W 1() Similar o he basic model, we consider he following relaxed problem: P5 : Minimize: lim E {P (τ)c(τ)+1 R(τ)C rc +1 D(τ)C dc } Subjec o: Consrains (2), (5), (9), (27), (29) R = D (30) U< (31) where U is he ime average expeced queue backlog for he

Grid P() - R() P() R() D() - Baery + W 1 () U() γ() W 2 () 1-γ() Daa Cener Figure 6: Block diagram for he exended model wih delay oleran and delay inoleran workloads. delay oleran workload and is defined as: U = lim sup E {U(τ)} (32) Le φ ex and ˆφ ex denoe he opimal value for problems P4 and P5 respecively. Since P5 is less consrained han P4, we have ha ˆφ ex φ ex. Similar o Lemma 1, he following holds: Lemma 3. (Opimal Saionary, Randomized Policy): If he workload process W 1(),W 2() and auxiliary process S() are i.i.d. over slos, hen here exiss a saionary, randomized policy ha akes conrol decisions ˆP (), ˆR(), ˆD(), ˆγ() every slo purely as a funcion (possibly randomized) of he curren sae (W 1(),W 2(),S()) while saisfying he consrains (29), (2), (5), (9), (27) and providing he following guaranees: n o n o E ˆR() = E ˆD() (33) n E ˆγ()( ˆP o () ˆR()+ ˆD()) E {W 1()} (34) n o E ˆP () Ĉ()+ˆ1 R()C rc + ˆ1 D()C dc = ˆφ ex (35) where he expecaions above are wih respec o he saionary disribuion of (W 1(),W 2(),S()) and he randomized conrol decisions. Proof. This resul follows from he framework in [8, 15] and is omied for breviy. The condiion (34) only guaranees queueing sabiliy, no bounded wors case delay. We will now design a dynamic conrol algorihm ha will yield bounded wors case delay while guaraneeing an average cos ha is wihin O(1/V )of ˆφ ex (and herefore φ ex). 6.1 Delay-Aware Queue In order o provide wors case delay guaranees o he delay oleran workload, we will make use of he echnique of ɛ-persisen queue [16]. Specifically, we define a virual queue Z() as follows: Z( +1)=[Z() γ()(p () R()+D()) + ɛ1 U() ] + (36) where ɛ>0isaparameerobespecifiedlaer,1 U() is an indicaor variable ha is 1 if U() > 0and0oherwise, and [x] + =max[x, 0]. The objecive of his virual queue is o enable he provision of wors-case delay guaranee on any buffered workload W 1(). Specifically, if any conrol algorihm ensures ha U() U max and Z() Z max for all, hen he wors case delay can be bounded. This is shown in he following: Lemma 4. (Wors Case Delay) Suppose a conrol algorihm ensures ha U() U max and Z() Z max for all, whereu max and Z max are some posiive consans. Then he wors case delay for any delay oleran workload is a mos δ max slos where: δ max = (U max + Z max)/ɛ (37) Proof. Consider a new arrival W 1() inanyslo. We will show ha his is served on or before ime + δ max. We argue by conradicion. Suppose his workload is no served by +δ max. Then for all slos τ {+1,+2,...,+δ max}, i mus be he case ha U(τ) > 0(elseW 1() wouldhave been served before τ). This implies ha 1 U(τ) =1andusing (36), we have: Z(τ +1) Z(τ) γ(τ)(p (τ) R(τ)+D(τ)) + ɛ Summing for all τ { +1,+2,...,+ δ max}, wege: Z( + δ max +1) Z( +1) δ maxɛ X +δ max τ=+1 [γ(τ)(p (τ) R(τ)+D(τ))] Using he fac ha Z(+δ max +1) Z max and Z(+1) 0, we ge: X +δ max τ=+1 [γ(τ)(p (τ) R(τ)+D(τ))] δ maxɛ Z max (38) Noe ha by (28), W 1() isparofhebacklogu( +1). Since U( +1) U max and since he service is FIFO, i will be served on or before ime + δ max whenever a leas U max unis of power is used o serve he delay oleran workload during he inerval ( +1,...,+ δ max). Since we have assumed ha W 1() isnoservedby + δ max, imusbe he case ha P +δ max τ=+1 [γ(τ)(p (τ) R(τ)+D(τ))] <Umax. Using his in (38), we have: U max >δ maxɛ Z max This implies ha δ max < (U max +Z max)/ɛ, ha conradics he definiion of δ max in (37). In Sec. 6.4, we will show ha under he dynamic conrol algorihm (o be presened nex), here are indeed consans U max,z max such ha U() U max,z() Z max for all. 6.2 Opimal Conrol Algorihm We now presen an online conrol algorihm ha approximaely solves P4. Similar o he algorihm for he basic model, his algorihm also makes use of he following queueing sae variable X() o rack he baery charge level and is defined as follows: X() =Y () Q max D max Y min (39) where Q max is a consan o be specified in (44). Recall ha Y () denoes he acual baery charge level in slo

and evolves according o (3). I can be seen ha X() is simply a shifed version of Y () andisdynamicsisgiven by: X( +1) =X() D() +R() (40) We will show ha his definiion enables our algorihm o ensure ha he consrain (4) is me. We are now ready o sae he dynamic conrol algorihm. Le (W 1(),W 2(),S()) be he sysem sae in slo. Define Q() =(U(),Z(),X()) as he queue sae ha includes he workload queue as well as auxiliary queues. Then he dynamic algorihm chooses conrol decisions P (),R(),D() and γ() as he soluion o he following problem: P6 : i Max:[U()+Z()]P () V hp ()C()+1 R()C rc +1 D()C dc +[X() +U() +Z()](D() R()) Subjec o: Consrains (27), (29), (2), (5), (9) where V > 0 is a conrol parameer ha affecs he disance from opimaliy. Le P (),R (),D () andγ () denoe he opimal soluion o P6. Then, he dynamic algorihm allocaes (1 γ ())(P () R ()+D ()) power o service he delay inoleran workload and he remaining is used for he delay oleran workload. Afer compuing hese quaniies, he algorihm implemens hem and updaes he queueing variable X() according o (40). This process is repeaed every slo. Noe ha in solving P6, he conrol algorihm only makes use of he curren sysem sae values and does no require knowledge of he saisics of he workload or uni cos processes. We now esablish wo properies of he srucure of he opimal soluion o P6 ha will be useful in analyzing is performance laer. Lemma 5. The opimal soluion o P6 has he following properies: 1. If X() > VC min, hen he opimal soluion always chooses R () =0. 2. If X() < Q max (where Q max is specified in (44)), hen he opimal soluion always chooses D () =0. Proof. See [19]. 6.3 Solving P6 Similar o P3, he complexiy of solving P6 depends on he srucure of he uni cos funcion C(). For many cases of pracical ineres, P6 is easy o solve and admis closed form soluions ha can be implemened in real ime. We consider one such case here. 6.3.1 C() does no depend on P () For noaional convenience, le Q 1() =[U() +Z() VC()] and Q 2() =[X()+U()+Z()]. Le θ 1() denoe he opimal value of he objecive in P6 when here is no recharge or discharge. When C() does no depend on P (), his can be calculaed as follows: If U()+Z() VC(), hen θ 1() =Q 1()P peak.else,θ 1() = Q 1()W 2(). Nex, le θ 2() denoe he opimal value of he objecive in P6 when he opion of recharge is chosen, so ha R() > 0,D() = 0. This can be calculaed as follows: 1. If Q 1() 0,Q 2() 0, hen θ 2() =Q 1()P peak VC rc. 2. If Q 1() 0,Q 2() < 0, hen θ 2() =Q 1()P peak Q 2()R max VC rc. 3. If Q 1() < 0,Q 2() 0, hen θ 2() =Q 1()W 2() VC rc. 4. If Q 1() < 0,Q 2() < 0, hen we have wo cases: (a) If Q 1() Q 2(), hen θ 2() = Q 1()(R max + W 2()) Q 2()R max VC rc. (b) If Q 1() <Q 2(), hen θ 2() =Q 1()W 2() VC rc. Finally, le θ 3() denoe he opimal value of he objecive in P6 when when he opion of discharge is chosen, so ha D() > 0,R() = 0. This can be calculaed as follows: 1. If Q 1() 0,Q 2() 0, hen θ 3() =Q 1()P peak + Q 2()D max VC dc. 2. If Q 1() 0,Q 2() < 0, hen θ 3() =Q 1()P peak VC dc. 3. If Q 1() < 0,Q 2() 0, hen θ 3() =Q 1()max[0,W 2() D max]+q 2()D max VC dc. 4. If Q 1() < 0,Q 2() < 0, hen we have wo cases: (a) If Q 1() Q 2(), hen θ 3() =Q 1()max[0,W 2() D max]+q 2()min[W 2(),D max] VC dc. (b) If Q 1() >Q 2(), hen θ 3() =Q 1()W 2() VC dc. Afer compuing θ 1(),θ 2(),θ 3(), we pick he mode ha yields he highes value of he objecive and implemen he corresponding soluion. 6.4 Performance Theorem We define an upper bound Vex max on he maximum value ha V can ake in our algorihm for he exended model. Vex max Ymax Ymin (Rmax + Dmax + W1,max + ɛ) = χ min C min (41) Then we have he following resul. Theorem 2. (Algorihm Performance) Suppose U(0) = 0, Z(0) = 0 and he iniial baery charge level Y ini saisfies Y min Y ini Y max. Then implemening he algorihm above wih any fixed parameer ɛ 0 such ha ɛ W max W 2,max and a parameer V such ha 0 <V Vex max for all {0, 1, 2,...} resuls in he following performance guaranees: 1. The queues U() and Z() are deerminisically upper bounded by U max and Z max respecively for all where: U max =Vχ min + W 1,max (42) Z max =Vχ min + ɛ (43) Furher, he sum U() +Z() is also deerminisically upper bounded by Q max where Q max =Vχ min + W 1,max + ɛ (44)

Price ($/MW Hour) 100 80 60 40 0 5 10 15 20 Hour Figure 7: One period of he uni cos process. Workload (MW) 1 0.8 0.6 0.4 0 5 10 15 20 Hour Figure 8: One period of he workload process. 2. The queue X() is deerminisically upper and lower bounded for all as follows: Q max D max X() Y max Y min Q max D max (45) 3. The acual baery level Y () saisfies Y min Y () Y max for all. 4. All conrol decisions are feasible. 5. The wors case delay experienced by any delay oleran reques is given by: l 2Vχmin + W 1,max + ɛ m ɛ (46) 6. If W 1(),W 2() and S() are i.i.d. over slos, hen he ime-average cos under he dynamic algorihm is wihin B ex/v of he opimal value: lim E {P (τ)c(τ)+1 R(τ)C rc +1 D(τ)C dc } ˆφ ex + B ex/v (47) where B ex is a consan given by B ex = (P peak + D max) 2 + (W 1,max) 2 +ɛ 2 +B and ˆφ 2 ex is he opimal soluion o P4 under any feasible conrol algorihm (possibly wih knowledge of fuure evens). Thus, by choosing larger V, he ime-average cos under he dynamic algorihm can be pushed closer o he minimum possible value φ op. However, his increases he wors case delay bound yielding a O(1/V, V ) uiliy-delay radeoff. Also noe ha Vex max limis how large V can be chosen. Proof. See [19]. 7. SIMULATION-BASED EVALUATION We evaluae he performance of our conrol algorihm using boh synheic and real pricing daa. To gain insighs ino he behavior of he algorihm and o compare wih he opimal offline soluion, we firs consider he basic model Average Cos ($/Hour) 41 40 39 38 37 36 35 34 33 32 Dynamic Conrol Algorihm Opimal Offline Cos Minimum Cos Cos wih No Baery 50 100 150 200 250 300 Y max (MW minue) Figure 9: Average Cos per Hour vs. Y max. and use a simple periodic uni cos and workload process as shown in Figs. 7 and 8. These values repea every 24 hours and he uni cos does no depend on P (). From Fig. 7, i can be seen ha C max = $100 and C min = $50. Furher, we have ha χ min = C max = 100. We assume a slo size of 1 minue so ha he conrol decisions on P (),R(),D() are aken once every minue. We fix he parameers R max =0.2 MW-slo, D max =1.0 MW-slo,C rc = C dc =0,Y min =0. We now simulae he basic conrol algorihm of Sec. 5.1.1 for differen values of Y max and wih V = V max. For each Y max, he simulaion is performed for a duraion of 4 weeks. In Fig. 9, we plo he average cos per hour under he dynamic algorihm for differen values of baery size Y max. I can be seen ha he average cos reduces as Y max is increased and converges o a fixed value for large Y max, as suggesed by Theorem 1. For his simple example, we can compue he minimum possible average cos per hour over all baery sizes (his corresponds o ˆφ of Sec. 4), and his is given by $33.23 which is also he value o which he dynamic algorihm converges as Y max is increased. Moreover, in his example, we can also compue he opimal offline cos for each value of Y max (corresponding o φ op). These are also ploed in Fig. 9. I can be seen ha, for each Y max, he dynamic algorihm performs quie close o he corresponding opimal value, even for smaller values of Y max. Noe ha Theorem 1 provides such guaranees only for sufficienly large values of Y max. Finally, he average cos per hour when no baery is used is given by $39.90. We nex consider a six-monh daa se of average hourly spo marke prices for he Los Angeles Zone LA1 obained from CAISO [1]. These prices correspond o he period 01/01/2005 06/30/2005 and each value denoes he average price of 1 MW-Hour of elecriciy. A porion of his daa corresponding o he firs week of January is ploed in Fig. 1. We fix he slo size o 5 minues. The uni cos C() obained from he daa se for each hour is assumed o be fixed for ha hour. Furhermore, we assume ha he uni cos does no depend on he oal power drawn P (). In our experimens, we assume ha he daa cener receives workload in an i.i.d fashion. Specifically, every slo, W () akes values from he se [0.1,1.5] MW uniformly a random. We fix he parameers D max and R max o 0.5 MW-slo, C dc = C rc =$0.1, and Y min =0. Also,P peak = W max + R max =2.0 MW. We now simulae four algorihms on his seup for differen values of Y max. The lengh of ime he baery can power he daa cener if he draw were

Y max 15 30 50 Baery, No WP 95% 92% 89% WP, No Baery 96% 92% 88% WP, Baery 92% 85% 79% Table 2: Raio of oal cos under schemes (B), (C), (D) o he oal cos under (A) for differen values of Y max wih i.i.d. W () over he 6 monh period. W max saring from fully charged baery is given by Ymax W max slos, each of lengh 5 minues. We consider he following four schemes: (A) No baery, No WP, which mees he demand in every slo using power from he grid and wihou posponing any workload, (B) Baery, No WP, which employs he algorihm in he basic model wihou posponing any workload, (C) No Baery, WP, which employs he exended model for WP bu wihou any baery, and (D) Complee, he complee algorihm of he exended model wih boh baery and WP. For (C) and (D), we assume ha during every slo, half of he oal workload is delay-oleran. We simulae hese algorihms o obain he oal cos over he 6 monh period for Y max {15, 30, 50} MW-slo. For (B), we use V = V max while for (C) and (D), we use V = Vex max wih ɛ = W max/2. Noe ha an increased baery capaciy does no have any effec on he performance under (C). In order o ge a fair comparison wih he oher schemes, we assume ha he wors case delay guaranee ha case (C) mus provide for he delay oleran raffic is he same as ha under (D). In Table 2, we show he raio of he oal cos under schemes (B), (C), (D) o he oal cos under (A) for hese values of Y max over he 6 monh period. The oal cos over he 6 monh period under (A) was found o be $143, 141.11. I can be seen ha (D) combines he benefis of boh (B) and (C) and provides he mos cos savings over he baseline case. For example, wih Y max = 50 MW-slo, he oal savings provided by (B), (C), and (D) are $15, 745, $17, 176 and $30, 000, respecively. 8. CONCLUSIONS AND FUTURE WORK In his paper, we sudied he problem of opporunisically using energy sorage devices o reduce he ime average elecriciy bill of a daa cener. Using he echnique of Lyapunov opimizaion, we designed an online conrol algorihm ha achieves close o opimal cos as he baery size is increased. We would like o exend our curren framework along several imporan direcions including: (i) muliple uiliies (or capive sources such as DG) wih differen price variaions and availabiliy properies (e.g., cerain renewable sources of energy are no available a all imes), (ii) ariffs where he uiliy bill depends on peak power draw in addiion o he energy consumpion, and (iii) devising online algorihms ha offer soluions whose proximiy o he opimal has a smaller dependence on baery capaciy han currenly. We also plan o explore implemenaion and feasibiliy relaed concerns such as: (i) wha are appropriae rade-offs beween invesmens in addiional baery capaciy and cos reducions ha his offers? (ii) wha is he exen of cos reducion benefis for realisic daa cener workloads? and (iii) does sored energy make sense as a cos opimizaion knob in oher domains besides daa ceners? Our echnique could be viewed as a design ool which, when parameerized well, can assis in deermining suiable configuraion parameers such as baery size, usage rules-of-humb, ime-scale a which decisions should be made, ec. Finally, we believe ha our work opens up a whole se of ineresing issues worh exploring in he area of consumer-end (no jus daa ceners) demand response mechanisms for power cos opimizaion. Acknowledgmens This work was suppored, in par, by he NSF grans CCF- 0811670, CNS-0720456, CNS-0615097, CAREER awards CCF- 0747525 and CNS-0953541, and a research award from HP. This work was performed while Rahul Urgaonkar was a suden a he Universiy of Souhern California. 9. REFERENCES [1] California ISO Open Access Same-ime Informaion Sysem (OASIS) Hourly Average Energy Prices. hp://oasisis.caiso.com. [2] Lead-acid baeries: Lifeime vs. Deph of discharge. hp://www.windsun.com/baeries/baery_faq.hm. [3] A. Bar-Noy, Y. Feng, M. P. Johnson, and O. Liu. When o reap and when o sow: Lowering peak usage wih realisic baeries. In Proc. 7h Inernaional Conference on Experimenal Algorihms, 2008. [4] A. Bar-Noy, M. P. Johnson, and O. Liu. Peak shaving hrough resource buffering. In Proc. WAOA, 2008. [5] D. P. Bersekas. Dynamic Programming and Opimal Conrol, vols. 1 and 2. Ahena Scienific, 2007. [6] J.S.Chase,D.C.Anderson,P.N.Thakar,A.M.Vahda,and R. P. Doyle. Managing energy and server resources in hosing ceners. SIGOPS Oper. Sys. Rev., 35:103 116, Oc. 2001. [7] M.Gazianas,L.Georgiadis,andL.Tassiulas.Conrolof wireless neworks wih rechargeable baeries. IEEE Trans. Wireless. Comm., 9:581 593, Feb. 2010. [8] L. Georgiadis, M. J. Neely, and L. Tassiulas. Resource allocaion and cross-layer conrol in wireless neworks. Found. and Trends in Neworking, 1:1 144, 2006. [9] S. Gurumurhi, A. Sivasubramaniam, M. Kandemir, and H. Franke. Drpm: Dynamic speed conrol for power managemen in server class disks. In Proc. ISCA 03, 2003. [10] U. Hoelzle and L. A. Barroso. The Daacener as a Compuer: An Inroducion o he Design of Warehouse-Scale Machines. Morgan & Claypool, 2009. [11] K. Le, R. Bianchini, M. Maronosi, and T. Nguyen. Cos- and energy-aware load disribuion across daa ceners. In Proc. HOTPOWER, 2009. [12] A. R. Lebeck, X. Fan, H. Zeng, and C. Ellis. Power aware page allocaion. SIGOPS Oper. Sys. Rev., 34:105 116, Nov. 2000. [13] D. Linden and T. B. Reddy. Handbook of Baeries. McGraw Hill Handbooks, 2002. [14] M. Marwah, P. Maciel, A. Shah, R. Sharma, T. Chrisian, V. Almeida, C. Araújo, E. Souza, G. Callou, B. Silva, S. Galdino, and J. Pires. Quanifying he susainabiliy impac of daa cener availabiliy. SIGMETRICS Perform. Eval. Rev., 37:64 68, March 2010. [15] M. J. Neely. Sochasic Nework Opimizaion wih Applicaion o Communicaion and Queueing Sysems. Morgan & Claypool, 2010. [16] M. J. Neely, A. S. Tehrani, and A. G. Dimakis. Efficien algorihms for renewable energy allocaion o delay oleran consumers. In Proc. IEEE SmarGridComm, 2010. [17] S. Park, W. Jiang, Y. Zhou, and S. Adve. Managing energy-performance radeoffs for mulihreaded applicaions on muliprocessor archiecures. In Proc. ACM SIGMETRICS, 2007. [18] A. Qureshi, R. Weber, H. Balakrishnan, J. Guag, and B. Maggs. Cuing he elecric bill for inerne-scale sysems. In Proc. SIGCOMM, 2009. [19] R. Urgaonkar, B. Urgaonkar, M. J. Neely, and A. Sivasubramaniam. Opimal power cos managemen using sored energy in daa ceners. arxiv Technical Repor: arxiv:1103.3099v2, March 2011. [20] Q. Zhu, F. David, C. Devaraj, Z. Li, Y. Zhou, and P. Cao. Reducing energy consumpion of disk sorage using power-aware cache managemen. In Proc. HPCA, 2004.