TerraSwarm Distributed Control of a Swarm of Buildings Connected to a Smart Grid http://terraswarm.org/ Baris Aksanli, Alper S. Akyurek, Madhur Behl, Meghan Clark, Alexandre Donze, Prabal Dutta, Patrick Lazik, Mehdi Maasoumy, Rahul Mangharam, Richard Murray, Truong X. Nghiem, George Pappas, Vasumathi Raman, Anthony Rowe, Alberto Sangiovanni-Vincetelli, Sanjit Seshia, Tajana Rosing, Jagannathan Venkatesh October 29-30, 2014 Goal: Provide an interface to test large scale distributed sense and control systems with application to smart buildings and grid MPC-based HVAC Controller Smart Grid Swarm Simulator (S2Sim) • Enables evaluation of the quality of distributed control of smart buildings • Provides a price signal to each client to adjust the overall power consumption to ensure grid stability • Can emulate neighborhoods • Replicated and connected to S2Sim STL-based HVAC Controller Node: Central Ba:ery -­‐ AC/DC -­‐ Max Capacity … -­‐ Dependent Nodes Node: U1lity Source -­‐ AC/DC -­‐ Power Profile -­‐ Conversion ra'o Scheduler -­‐ Fallback source -­‐ Associated nodes Node: Solar-­‐Electric Source -­‐ AC/DC -­‐ Power Profile -­‐ Conversion ra'o Node: Washer -­‐ AC/DC -­‐ Interval -­‐ Power Profile … Node -­‐ iden'fier Node: Washer Ba:ery -­‐ AC/DC -­‐ Max Capacity … • Pricing feedback from S2Sim based on consumption, which affects appliance rescheduling, battery charge/discharge periods, matching solar energy with demand UCSD Real-time Building Actuation Lutron Quantum Lighting HVAC Control with MLE+ Controller Inscope Enfuse Breaker Monitor (10) Router Wistat Thermostats (60) 40,000 sq ft, 5 story, 140 room, built in 1962 with classrooms, auditorium, offices and labs • Sensing and control from 6 building automation systems 802.15.4 -> ModbusRTU Automatrix PLC (5) • Live data streaming into S2Sim Electric Metering Gateway HVAC Gateway Firefly Gateway Voltage Deviation (pu) Lighting Gateway Restful Interface Fan Control / Misc Plug Load (30) 802.15.4 Environmental Sensors • Load shedding based on S2Sim pricing signals Automatrix Thermostats (30) Chilled Water and Steam Monitoring Smart Distributed Coordination Voltage Deviation (pu) UCSD • Residential energy simulation platform Price updated parameters such as new measurements and disturUPS Statuses Controlsand real-world 2Sim BBB bance predictions, sets up theloads new MPC algorithm for S Energy of1,S. .2.Sim Controller the timeas stepakfunction = H c, H c + , H c + H m − 1, and solves Demand c signal changes the new price MPC for this time frame and uses only the first H • Flexibility of commercial buildings values of baseline power consumption and flexibility, i.e. for HVAC system is a significant k = H c , . . . , 2H c − 1, and this process repeats. regulation resource Fig. 2 shows the schematic of the entire system archiControl UPS Bank • Defined and quantified flexibility tecture. The solid line power flow arrows correspond to the Signals (Loads not shown) baseline system and contract. The ancillary power flow via of building HVAC systems the flexibility contract is shown with dashed line arrow. Real-time state of the system such as occupancy, internal ACme++ heat, outside weather condition, building temperature, state Controllable Outlets and input constraints are passed as input to the algorithm. • Designed an MPC framework to guarantee building climate control and grid Outlet The utility also communicates information such as per-unit Gateway Fig. 2. Schematic of the proposed architecture for contractual framework. flexibility requirements energy and upward and downward flexibility prices to the UMich • Implemented contractual framework for costs/benefits to building and grid UCB BEMS (or effectively to the algorithm). The output of the algorithm includes baseline power consumption, downward zones, are defined by: flexibility and upward flexibility values, and cost. Within the Xk := {x | T k ≤ x ≤ T k } (19) flexibility contract framework, this information is communicated to the utility. Consequently, a flexibility signal st is (20) Uk := {u | U k ≤ u ≤ U k } sent from the utility to the building to be tracked by the CALTECH2 CALTECH1 CMU2 CMU1 where T k , and T k are the upper and lower temperature limits HVAC fan. Essentially, the utility has control of the building • Resistor-capacitor network to and U k , and U k are the upper and lower feasible air mass consumption for the next Hc time slots. The control strategy model heat transfer flow at time t. Therefore, the feasible set of (18) is closed is actuated by sending flexibility signals (similar to frequency Current circuit can support up to AC UPENN2 UPENN1 UMICH2 UMICH1 and convex. The objective function is also convex on w, as regulation signals). These signals can be sent as frequently • MPC to satisfy formal 12MW, corresponding to a as every few seconds. In fact, we show through experiments the max is over variable w. In fact, w does not appear in specifications in Signal Temporal the cost function. The objective function is a linear function on a real building in Section V, that buildings with HVAC typical small US town with Logic on w and hence it is concave. We also consider a linearized systems equipped with variable frequency drive (VFD) fans approx. 10000 residents UCB1 UCSD2 UCSD1 UCB2 are capable of tracking such signals very fast (e.g. within a state update equation as follows: few seconds). • Maintains a minimum comfortable xt+1 = Axt + But + Edt (21) Time of Use Pricing − Greedy Distributed Control: Unstable temperature when the room is 0.14 IV. C OMPUTATIONAL R ESULTS occupied while minimizing the the nonlinear system dynamics has been linearized with the UNSTABLE!!! 0.12 The algorithm presented in Section III-C was implemented forward Euler integration formula with time-step τ = 1 hr. cost of heating based on on a building model developed and validated against histor0.1 Greedy individual control with Hence, the min-max problem (18) is equivalent to: observed prices in [4], [6]. We used Yalmip [8], an interface to Caltech ical data time-of-use pricing may lead to 0.08 Minimization Problem optimization solvers available as a MATLAB toolbox, for instability 0.06 m rapid prototyping of optimal control problems. The nonH! −1 linear optimization problem solver Ipopt [9], was used to min Chvac (ut+k , πt+k ) − R(Φt+k+1 , Bt+k+1 ) 0.04 ⃗ t+1 u t ,Φ ⃗ k=0 solve the resulting nonlinear optimization problem arising (22a) Use price signals for demand 20:00 2:00 We use sampling 8:00 from the0.02 MPC approach. time of 14:00 τ = 1 hr. 20:00 Time of Day response , dt+k ) (22b) s. t.: xt+k+1 = f(xt+k , ut+k + ϕt+k E+ We assess the performance of the algorithm for the following ∀k = 0, ..., H m − 1 scenarios. Smart Price Feedback − Greedy Distributed Control: Stable Matlab toolbox for integrated Scenario I: Different reward rates have been considered xt+k+1 = f(xt+k , ut+k + ϕt+k , dt+k ) (22c) Smart Pricing guides to stability modeling and controls for energym 0.1 for upward and downward flexibility at each time step. Smart distributed coordination ∀k = 0, ..., H −1 efficient buildings. In particular, downward flexibility is rewarded more than ϕt+k ≥ 0, ∀ k = 1, ...H m − 1 (22d) restores stability 0.08 upward flexibility (β > β), for most of the time. Since Co-simulate with realistic ϕt+k ≤ 0, ∀ k = 1, ...H m − 1 (22e) • Pricing feedback MPC maintains the comfort level using the least possible EnergyPlus buildings 0.06 xt+k ∈ Xt+k ∀ k = 1, ..., H m (22f) • Stability feedback amount of energy, buildings that are operated under nominal xt+k ∈ Xt+k ∀ k = 1, ..., H m (22g) 0.04 MPC such as (1) have no down flexibility (for extended m ut+k + ϕt+k ∈ Ut+k ∀ k = 0, ..., H − 1 (22h) period of time, i.e. 1 hr or more). However we show that via 20:00 2:00solving (22), 8:00 ut+k + ϕt+k ∈ Ut+k ∀ k = 0, ..., H m − 1 (22i) proper 0.02 incentives and by it is possible 14:00 to provide 20:00 Time fo Day downward flexibility when most needed. The results of this B. Aksanli, A.S. Akyurek, M. Behl, M. Clark, A. Donze, P. Dutta, Patrick Lazik, M. Maasoumy, R. Mangharam, T.X. Nghiem, are shown in A. Fig. 3 for the case when ancillary The argmin of the optimization problem (22) is the nom- scenario V.Raman, A. Rowe, Sangiovanni-Vincentelli, S. A. Seshia, T. S. Rosing, J. Venkatesh. Distributed Control of a Swarm of ∗ are received from the utility system Conference on Embedded Systems For Energy-Efficient inal power consumption, ut+k , and the maximum available signalsBuildings Connected to a Smartevery Grid,minute: 1st ACMno International Buildings 2014 (e.g.(BuildSys), temperature being within the comfort zone) flexibility, Φ∗t+k , ∀ k = 0, ..., H m − 1. The building declares UPenn constraint u∗t+k , and Φ∗t+1+k for the time slots: ∀ k = 0, ..., H c − 1 will be violated when the fan speed enforcement is performed to the utility. After H c time slots, the BEMS collects the for arbitrary values of fan speed as long as fan power … • Currently six clients, from UCSD, UCB, Caltech, UMich, UPenn, CMU • How independent building control tools affect each other as well as the grid HomeSim Beyster Battery Bank Control CMU Sponsored by the TerraSwarm Research Center, one of six centers administered by the STARnet phase of the Focus Center Research Program (FCRP) a Semiconductor Research Corporation program sponsored by MARCO and DARPA.