Green Scheduling for Energy-Efficient Building Controls" Prof. Rahul Mangharam Director, Real-Time & Embedded Systems Lab Dept. Electrical & Systems Engineering Dept. Computer & Information Science University of Pennsylvania rahulm@seas.upenn.edu 1 Green Scheduling for Energy-Efficient Building Controls" With Truong X. Nghiem, Madhur Behl and Willy Bernal Published in: Green Computing’11, CDC’11, ACC’12, CDC’12, BuildSys’12, RTSS’12, ACC’13,2 ICCPS’14 Example The Peak Power Minimization Problem supply = demand 111 million viewers watch the SuperBowl During a commercial, millions of refrigerators and microwaves trigger simultaneously, causing massive spikes in the energy demand Human behavior and environmental conditions are responsible for high temporal correlation of energy demand. 3 Madhur Behl (Univ of Penn) Green Scheduling February 24, 2012 10 / 4 5 days electric bill è $1.5 Million 5 Penn’s Electricity Demand in 2011 2011 Hourly Power Consumption for UPenn depicted with 95 percentile "Shoulder Days" 120 12 days highest demand cost $1.9 million (6.76% total bill) Power Consumption (in MW) 100 80 60 40 20 0 01 Total bill: $28.3 million 02 03 04 05 06 07 08 09 Green Scheduling 10 11 12 6 Peak Electricity Demand is Expensive! 2011 Hourly Real Time Mkt prices based on Locational Marginal Pricing (LMP) for PECO by PJM Peak $817/MWh 800 700 600 27 x $/MW-h 500 400 300 200 Normally $30/MWh 100 0 01 02 03 04 05 06 Green Scheduling 07 08 09 10 11 7 12 Time of Day Green Scheduling Peak Hours 8 12am 11pm 10pm 9pm 8pm 7pm 6pm 5pm 4pm 3pm 2pm 1pm 11am 12pm 10am 9am 8am 7am 6am 5am 4am 3am 2am 1am 12am Electricity demand (MW) Peak Electricity Demand is Expensive! Time of Day Green Scheduling Peak Hours 9 12am 11pm 10pm 9pm 8pm 7pm 6pm 5pm 4pm 3pm 2pm 1pm 11am 12pm 10am 9am 8am 7am 6am 5am 4am 3am 2am 1am 12am Electricity demand (MW) Peak Demand Reduction Economic incentive to reduce peak demand Time of Day Green Scheduling Peak Hours 10 12am 11pm 10pm 9pm 8pm 7pm 6pm 5pm 4pm 3pm 2pm 1pm 11am 12pm 10am 9am 8am 7am 6am 5am 4am 3am 2am 1am 12am Electricity demand (MW) How to Reduce Peak Demand? Electricity demand (MW) Peak Demand Reduction Approaches • Operate on coarse grainedloads Scheduling Turn off devices time scales (demand/load Dim lights • Do not guarantee a quality of shifting) Adjust thermostat performance Time of Day Peak Hours Green Scheduling 11 12am 11pm 10pm 9pm 8pm 7pm 6pm 5pm 4pm 3pm 2pm 1pm 11am 12pm 10am 9am 8am 7am 6am 5am 4am 3am 2am 1am 12am ... Motivation Un-coordinated Control Systems HVAC (Heating,Ventilation and Air Conditioning) systems, chiller systems and lighting systems operate independently of each other frequently result in temporally correlated energy demand surges (peaks) Madhur Behl (Univ of Penn) 12 Green Scheduling 12 November 29, 2011 4 / 61 GREEN SCHEDULING APPROACH Green Scheduling 13 Demand Green Scheduling (GS) Approach Load • Dynamics • Constraints Disturbances Load • Dynamics • Constraints Disturbances Green Scheduling Load • Dynamics • Constraints Disturbances 14 Green Scheduling (GS) Approach Demand Peak constraint Load • Dynamics • Constraints Disturbances Load • Dynamics • Constraints Disturbances Green Scheduling Set a peak constraint Load • Dynamics • Constraints Disturbances 15 Green Scheduling (GS) Approach Coordinate dynamical loads 1. Under peak envelope 2. Satisfy safety constraints Load • Dynamics • Constraints Disturbances Demand Peak constraint Load • Dynamics • Constraints Disturbances Green Scheduling Load • Dynamics • Constraints Disturbances 16 From Control to Scheduling • Control loops are abstracted as tasks • Extract temporal parameters across multiple control loops • Compute a global schedule, reduce peak power by de-correlating systems Green Scheduling 17 GS: Analysis & Synthesis Demand Peak constraint Schedulability analysis Is a peak constraint feasible? (how to choose a peak constraint?) Coordinate dynamical loads 1. Under peak envelope 2. Satisfy safety constraints How to schedule the loads safely under a feasible peak constraint? Schedule/Control Synthesis Green Scheduling 18 GS Control/Scheduling Structure weather occupancy ... Schedulability analysis Feasible Peak Minimization Peak constraint Scheduling Controller Zone i xi on/o↵ Scheduling synthesis Green Scheduling 19 for the systems. Scheduling controller: operates the systems to satisfy the peak GS Control/Scheduling Structure constraint (set by peak minimization) while maintaining climate conditions. weather occupancy ... Feasible Peak Minimization Peak constraint Scheduling Controller on/off Demand Zone i xi re-compute peak constraint t Green Scheduling 20 From Control to Scheduling In Energy Control Systems Execution time is dependent on Plant Dynamics: dimensions of the room, ingress and egress airflow Environmental Conditions: outside weather, human occupancy, air quality Initial State Tasks have elastic execution times where a task may have to perform more work, the longer its response time. Aim: keep the state of a system within a deadband Both are resource contrained problems Here the resource is electricity/energy as opposed to a processor PSU (power supply unit) scheduling instead of CPU scheduling. 21 Madhur Behl (Univ of Penn) Green Scheduling February 24, 2012 17 / 66 22 22 First Order Task Model x b1 a1 h l b0 a0 ON OFF ON OFF ON t Simplified heat balance equation to model each zone dxi Ci = Ki (Ta dt x i ) + Qi (1) Zone temperature is governed by the following affine di↵erential equation: ✓ ◆ dxi Ki Ki Qi = xi + Ta + = a i xi + b i (2) dt Ci Ci Ci Madhur Behl (Univ of Penn) 23 Green Scheduling 23 November 29, 2011 12 / 61 Geometric Interpretation Intuitive and simple framework for scheduling a system of linear tasks. Two linear tasks T1 and T2 , normalized so that their bounds are both [0, 1] Define a 2-dimensional state vector x = [x1 , x2 ]T 2 R2 There are three scheduling modes: Mode 0: T1 and T2 are OFF (vector v0 ) Mode 1: T1 is ON and T2 is OFF (v1 ) Mode 2: T1 is OFF and T2 is ON (v2 ) Scheduling Policy Keeps x(t) within bounds (invariant set) using mode vectors v0 , v1 and v2 24 Madhur Behl (Univ of Penn) Green Scheduling 24 November 29, 2011 15 / 61 Scheduling Policy as Hybrid Automaton States Edges correspondto ! scheduling modes ! switching between modes correspondto gij is the guard associated for each edge, for the transition from mode i to mode j. Scheduling policy ⇡ for the task set is simply a set of guards {gij } 25 Madhur Behl (Univ of Penn) Green Scheduling 25 November 29, 2011 16 / 61 Lazy Scheduling Policy: Hybrid Automaton Lazy Policy : All tasks stay in their current modes as long as they are safe g01 and g21 are both (x1 l1 ); g02 and g12 are both (x2 l2 ); g10 is (x1 g20 is (x2 26 Madhur Behl (Univ of Penn) Green Scheduling h1 ^ x2 > l2 ); h2 ^ x1 > l1 ). 26 November 29, 2011 17 / 61 27 27 Simulation: Two-Task System Feasibility constraint: Keep temperature centered around mean 70 F Heating system operates with a power of 12000 BTU/h or 3.517 kW Cooling occurs through heat loss and does not consume any extra power Each time step of the algorithm is of 15 minute duration 75 Task1 Task2 74 Temperature (in ° F) 73 72 71 70 69 68 67 66 65 0 10 20 30 40 Time 50 60 70 80 Figure: Peaks occur when 28 tasks run independently 28 Madhur Behl (Univ of Penn) Green Scheduling November 29, 2011 29 / 61 Simulation: Peak Reduction Peak Reduction of 50% 2 2 1.8 1.6 1.6 Power Consumed in kW Power Consumed in kW 1.8 1.4 1.2 1 0.8 0.6 0.4 1.2 1 0.8 0.6 0.4 0.2 0 0 1.4 0.2 10 20 30 40 Time 50 60 70 80 0 0 Figure: Power Consumption: Independent Tasks 20 30 40 Time 50 60 70 80 Figure: Power Consumption: Lazy Scheduling Peak Power = 1.758 kW Total Energy = 50.11 kWh Madhur Behl (Univ of Penn) 10 Peak Power = 0.879 kW Total Energy = 45.72 kWh 29 Green Scheduling 29 November 29, 2011 30 / 61 Simulation: Lazy Scheduling 1 0.8 x2 0.6 0.4 0.2 0 0 0.2 0.4 0.6 0.8 1 x1 Figure: State-Space Trajectory Tasks remain within thresholds Modes only change in a lazy manner (near thresholds) 30 Madhur Behl (Univ of Penn) Green Scheduling 30 November 29, 2011 31 / 61 31 31 Feedback Event-triggered • Hierarchical, ACC’13 distributed control • Pricing signal & financial cost Simple Feedback Feed- forward Control Strategy Green Scheduling – So far… • More realistic RTSS’12 IGCC’11 CDC’11 ACC’12 applications CDC’12 with & without load interaction with & without disturbances Model complexity 32 APPLICATION: ENERGY-EFFICIENT OPERATION OF MULTIPLE CHILLER PLANTS Green Scheduling 33 Peak Power Minimization Peak Demand Reduction Madhur Behl (mbehl@seas.upenn.edu) Green Scheduling Green Scheduling RTSS 2012 34 5 / 73 Chiller Plant Operation at Penn Chilled water distribution system at the University of Pennsylvania Chiller Plant A • Over 4M gallons of chilled water (42 F) pumped into the campus. • Plant A consumes 26 MW at full capacity • Plant A and Plant B account for > 30% of total peak power consumption (108 MW) Green Scheduling 35 COP vs. PLR • Approximate COP by quadratic function of PLR COP = a0 + a1 PLR + a2 PLR2 Example: If cooling load = 1000 RT1, chiller capacity = 1250 RT, then PLR = 1000/1250 = 0.8, and COP obtained from COP-PLR curve. Refrigeration Ton is the amount of heat that must be removed to melt 1 Ton of ice in 24h. 1 RT = 3517W 1 Green Scheduling 36 Thermal Energy Storage (TES) Thermal Energy Storage is used for demand shifting and off loading chillers. • Long term: > 10 hours • Short term: < 2 hours TES at Cornell University Short-term Thermal Energy Storage can improve the COP of the chiller plant. Green Scheduling 37 How TES Improves the COP? Green Scheduling 38 No Thermal Energy Storage Inefficient Green Scheduling 39 TES Discharging Efficient! Green Scheduling 40 TES Charging Efficient! Green Scheduling 41 Multiple chiller plants with TES Uncoordinated operation among multiple chiller plants can cause large spikes in total electricity consumption. Our goal is to coordinate multiple chiller plants to reduce their aggregate peak power consumption. Green Scheduling 42 GS for Chiller Plants • Consider m > 1 chiller plants. • Each plant has a short term TES system. • Compute modes for each hour h, h = 0,1,...,H, based on load forecasting. • Charging mode: water level increases with rate ai,h > 0; • Discharging mode: water level decreases with rate bi,h < 0. Behl, M.; Nghiem, T. X.; Mangharam, R., Green Scheduling for Energy-Efficient Operation of Multiple Chiller Plants, RTSS 2012. Green Scheduling 43 Single chiller plant with TES • Say PLR = 0.34 i.e., in region B • Plant can operate in optimal regions 1 and 2 if a TES is available. Green Scheduling 44 GS for Chiller Plants Schedule the operating modes ui(t), t ≥ 0, of all plants such that: Green Scheduling Reduce peak demand • Safety Constraint: li ≤ xi(t) ≤ hi ∀t, i • Peak Constraint: n X i=1 ui (t) k(t) 8t x1 , a1 , b1 xm , am , bm u1 um Optimize COP Optimize COP ··· Chiller Plant 1 Green Scheduling Chiller Plant m 45 Simulation Setup Three chiller plants, each containing 3 chillers. • Lower safety threshold: 3m • Upper safety threshold: 13.5m • Time step = 15 mins Chiller plant configuration in the simulation Plant 1 3 chillers rated at 1250 RT, 1200 hp Plant 2 3 chillers rated at 1250 RT, 1200 hp Plant 3 3 chillers rated at 1000 RT, 900 hp Tchws 5.5°C (42°F) Tcwr 20°C (68°F) ∆T 10°C Green Scheduling 46 Average Hourly Load Profile Green Scheduling 47 Simulation Scenarios 1. Case 1: No Thermal Energy Storage present 2. Case 2: Thermal Energy Storage with uncoordinated operation 3. Case 3: Thermal Energy Storage with (discrete-time) Green Scheduling Green Scheduling 48 Simulation Result: Power Demand Green Scheduling 49 Simulation Result: Power Demand Green Scheduling 50 Cumulative Power Consumption (MWh) Cumulative Energy Consumption 80 No TES TES without GS TES with GS 60 40 20 0 6a 7a 8a 9a 10a 11a 12p 1p 2p 3p 4p 5p 6p 7p Hour of day (6am – 8pm) Green Scheduling 51 8p Electricity Pricing Policy PECO’s demand pricing rate structure: Block kWh’s in Block Charges (cents per kWh) First Block 80 × peak 24.94 Second Block 80 × peak 12.67 Third Block Remaining 8.64 Green Scheduling 52 Simulation Result Summary Green Scheduling leads to the lowest electricity bill. Peak (MW) Energy Consumption (MWh) single day Expected Monthly Bill ($) % savings No TES 6.40 80.9 292,801 - On-Off with TES 7.38 66.1 274,266 6.33 GS with TES 6.48 61.4 243,461 16.85 Green Scheduling 53 SCHEDULING SYNTHESIS: DISCRETE-TIME FEEDBACK SCHEDULING Green Scheduling 54 Discrete-time Green Scheduling • Consider discrete-time dynamics x(t + 1) = Ax(t) + B0 + Bu(t) + W d(t), 8t 2 N for a finite time horizon [0, T]. • Safety constraint: x(t) ∈ S ⊂ Rn ∀t • Initial state x(0) ∈ S • Xf ⊆ S: set of desired final states at time T: x(T) ∈ Xf Discrete-time • Define theGreen set of Scheduling admissible discrete-time schedules Define U(k(·), S, x0 , Xf ) as the set of all discrete-time schedules u : {0, 1, . . . , T 1} ⌅ {0, 1}m such that: 1 2 3 m i=1 ui ( ) ⇥ k( ) for all ; ⇤ Peak constraint x( ) ⇧ S for all ; ⇤ Safety constraint x(T ) ⇧ Xf . ⇤ Terminal state is reached TES dynamics: Green Scheduling xi ( + 1) = fi (xi ( ), ui ( ), ) 55 Robust Backward Reachable Sets Robust backward reachable set operator: Given any X ⊆ S at time step t, define operator 1 Rt (X) = {x ⇥ S : ⌅u : X i ui k(t) ⇧ f (x, u, d) ⇥ X ⇤d ⇥ D} which is the set of safe states that can reach X with some admissible control u, regardless of the constrained disturbance d. Rt 1 (X) maps to via some admissible u for all d in D Green Scheduling X 56 Pre-compute Backward in Time • Using robust backward reachable set operator, compute a sequence of sets {Xt : t = 0,1,...,T} backward in time from XT = Xf : Xt = R−1t(Xt+1) X0 X1 … XT = Xf • Each Xt is the set of safe states from which and from time step t, the system state can reach the final set Xf safely under the time-varying peak constraint k(·). Green Scheduling 57 MLE+: Matlab Toolbox for Integrated Modeling and Controls for Energy-­‐Efficient Buildings 1 EnergyPlus Building Model 2 System Identification 3 Control Design in Matlab Willy Bernal, Madhur Behl, Truong Nghiem and Rahul Mangharam 5 Control Deployment 4 Simulation Results 58 MLE+: Design and Deployment IntegraAon of Energy-­‐ Efficient Building Controls Willy Bernal, Madhur Behl, Truong Nghiem and Rahul Mangharam Test-­‐Bed Dashboard MLE+ BACnet 59 Integrated Modeling: HVAC System CentralHVAC Occupancy Setpoints HVAC System • Temperature Setpoints according to Schedule • Central HVAC Model • VAV Boxes VAV Boxes NREL: Campus-­‐Wide SimulaFon Courtesy of NREL Campus Simulation: Two Building Example Return Supply Chiller Plant Office B1 Office B2 Overview ü Air-cooled Electric Chiller. o 10kW ü 2 Small Office Buildings. o 50 people o 5 zone o 400m2 ü Shared Chilled Water Loop. MLE+ Cloud Analytics: Overview MLE+ Coordinator (Local) EnergyPlus Template File Control Knobs/ Parameters Master Cloud Coordinator Model EC2 Define Variable Range Define Optimization Method Analyze Results Mod Mod Mod EC2 els els Extract Model els Mod Mod Mod EC2 els els Model els Parameter Mod Mod Mod els Extract els Model els Simulate Parameter Extract Parameter Simulate Simulate Cyber-Physical Systems • Intersection of Computation, Controls & Communication – Safety-critical and Life-critical systems • Tightly coupled with (Messy) Physical Plants – Interesting Domains: Medical, Energy, Automotive… • New Interesting Problems involving: – Scheduling and Control – From Verified Models to Verified Code of Closed-loop Systems 64 Research Focus Networked Cyber-Physical Systems Medical Device Network CPS Automotive CPS Software & Systems Industrial Control Nets Automotive Plug-n-Play Real-Time Parallel Computing Distributed Real-Time Systems and Real-Time Network Protocols Modeling & Tools for Virtualization and Deployment Domain-specific Platforms Energy-efficient Building Automation Industrial Control & Actuation Networks Feedback-based Medical Device Networks