ROBUST RAPID PROTOTYPING SYSTEM FOR MODEL PREDICTIVE CONTROL OF SINGLE ZONE RESIDENTIAL BUILDINGS

by Maxwell Thomas Harris A thesis submitted to the Faculty and the Board of Trustees of the Colorado School of Mines in partial fulfillment of the requirements for the degree of Master of Science (Mechan- ical Engineering).

Golden, Colorado Date

Signed: Maxwell Thomas Harris

Signed: Dr. Paulo Cesar Tabares-Velasco Thesis Advisor

Golden, Colorado Date

Signed: Dr. Gregory Jackson Department Head Department of Mechanical Engineering

ii ABSTRACT

Buildings in the United States are responsible for around 75% of total electric energy usage. Advanced controls are one way to minimize the energy use and cost; however, they require co-simulation platforms to study the effects on buildings and occupants. This thesis develops a platform to simulate advanced air conditioning controllers using model predictive controls (MPCs). MPCs require the use of co-simulation software which includes building energy simulation (EnergyPlus), optimization (AMPL), and MATLAB software used for simulation and investigation. MPCs require fast energy models as MPCs might require thousands of iterations to find an optimal solution. Thus, the platform uses an autoregressive statistical reduced order model (ROM) that quickly predicts building cooling energy use. Nine case studies test the newly developed platform with a residential building in Austin, Texas, under three different variable electric rates, along with three baseline temperature controllers. Results show that the developed MPC can save upwards of 29% energy while, at the same time, reducing cost by upwards of 45%.

iii TABLE OF CONTENTS

ABSTRACT ...... iii

LISTOFFIGURES ...... vii

LISTOFTABLES...... xi

LISTOFABBREVIATIONS ...... xii

ACKNOWLEDGMENTS ...... xv

DEDICATION ...... xvi

CHAPTER1 INTRODUCTION ...... 1

1.1 ResearchObjectives...... 3

1.2 TechnicalApproachOverview ...... 4

1.3 ThesisContributions ...... 5

1.4 ThesisOrganization...... 6

CHAPTER2 LITERATUREREVIEW ...... 7

2.1 MPC...... 7

2.2 ROM...... 12

2.3 Co-SimulationSoftware...... 16

CHAPTER 3 REDUCED ORDER MODELS FOR RESIDENTIAL AND COMMERCIALBUILDINGS...... 18

3.1 Introduction...... 18

3.2 BlackBoxModelingMethodDevelopment ...... 21

3.3 SelectionofInputParameters ...... 29

iv 3.3.1 ROMDevelopmentandValidation ...... 30

3.4 Discussion...... 34

3.5 Conclusion...... 35

CHAPTER 4 MODELING PLATFORM FOR BUILDING OPTIMIZATION-BASEDCONTROL ...... 37

4.1 Introduction...... 37

4.2 PrototypingPlatformDevelopment ...... 40

4.3 CasestudyEnergyPlusModel ...... 42

4.4 ReducedOrderModel ...... 43

4.5 MPCOptimizationModel ...... 45

4.5.1 Mathematical Formulation of the MPC Model ...... 46

4.6 SimulationandResults...... 49

4.6.1 Prediction Horizon Parametric Analysis...... 49

4.6.2 MPCSimulation ...... 52

4.6.2.1 Day Ahead Market Price (DAMP) Simulation Results . . . . 52

4.6.2.2 Time-of-use (TOU) Simulation Results ...... 55

4.6.2.3 Time-of-use (EZ3) Simulation Results ...... 58

4.6.2.4 EnergyandCostSavingsResults ...... 58

4.7 Discussion...... 60

4.8 ConclusionandFutureWork...... 62

CHAPTER5 CONCLUSION...... 63

5.1 ResearchContributions...... 63

5.1.1 DevelopmentofaROM ...... 64

v 5.1.2 Development of a Rapid MPC Prototyping Platform ...... 65

5.2 BroaderImpact ...... 66

5.3 FutureWork...... 67

REFERENCESCITED ...... 68

APPENDIX A - PLOTS OF INDIVIDUAL ZONES ON MULTIPLE ZONE ARC FIT . 77

APPENDIX B - ROM WEIGHTING MATRIX VALUES ...... 87

APPENDIX - PLOTS NOT SHOWN FOR MPC SIMULATIONS ...... 93

vi LIST OF FIGURES

Figure 1.1 MPC Modeling Environment Control Loop...... 3

Figure 2.1 Represents the receding horizon for an MPC over two time-steps...... 8

Figure3.1 SystemIdentificationFlowchart...... 22

Figure3.2 Singlezoneresidentialbuilding...... 23

Figure3.3 Fivezonecommercialbuilding...... 23

Figure 3.4 System identification program used in Simulink...... 26

Figure 3.5 A zoomed version of system identification model building on addition oftheperturbationtosystem...... 27

Figure 3.6 ARMAX ROM vs EnergyPlus comparison of single zone building. . . . 31

Figure 3.7 ARMAX ROM vs EnergyPlus comparison of single zone building. . . . 31

Figure 3.8 ARX ROM vs EnergyPlus comparison of 5 zone building training data. Core zone is located on left and perimeter 4 zone located on right . . . . 32

Figure 3.9 ARX ROM vs EnergyPlus comparison of 5 zone building validation data. Core zone is located on left and perimeter 4 zone located on right . 32

Figure 4.1 Represents the receding horizon for MPC over two timesteps...... 39

Figure 4.2 MPC Modeling Environment Control Loop...... 41

Figure 4.3 Simulink interface with MLE+ and AMPL S-function for simulation of theMPC...... 42

Figure4.4 Singlezoneresidentialbuilding...... 43

Figure 4.5 Comparison plot indicating the price profile for either DAMP, TOU, or EZ3vs. occupancyusedwithintheMPCstudy ...... 50

Figure 4.6 Plot of the prediction horizon parametric analysis showing cost savings andenergysavingsvspredictionhorizon...... 51

vii Figure 4.7 Temperature comparison for the MPC and a baseline, constant temperature, controller. Both are based on DAMP pricing with Indoor Air Temperature (IAT), set-point temperature (TSP), Outdoor Air Temperature(OAT),andOccupancy...... 53

Figure 4.8 Temperature comparison for the MPC and a baseline, temperature setback, controller. Both are based on DAMP pricing with Indoor Air Temperature (IAT), set-point temperature (TSP), Outdoor Air Temperature(OAT),andOccupancy...... 54

Figure 4.9 Electrical consumption results from the temperature comparison plots for the MPC and a constant temperature control based on DAMP pricing ...... 54

Figure 4.10 Electrical consumption results from the temperature comparison plots for the MPC and a temperature setback control based on DAMP pricing ...... 55

Figure 4.11 Temperature comparison for the MPC and a baseline, constant temperature, controller. Both are based on TOU pricing with Indoor Air Temperature (IAT), set-point temperature (TSP), Outdoor Air Temperature(OAT),andOccupancy...... 56

Figure 4.12 Temperature comparison for the MPC and a baseline, temperature setback, controller. Both are based on TOU pricing with Indoor Air Temperature (IAT), set-point temperature (TSP), Outdoor Air Temperature(OAT),andOccupancy...... 56

Figure 4.13 Electrical consumption results from the temperature comparison plots for the MPC and a constant temperature control based on TOU pricing . 57

Figure 4.14 Electrical consumption results from the temperature comparison plots for the MPC and a temperature setback control based on TOU pricing . 57

Figure 4.15 Temperature comparison for the MPC and a baseline precool controller. Both are based on the EZ3 pricing with Indoor Air Temperature (IAT), set-point temperature (TSP), Outdoor Air Temperature(OAT),andOccupancy...... 58

Figure 4.16 Electrical consumption results from the temperature comparison plots for the MPC and the simple precool controller based on the EZ3 pricing . 59

Figure A.1 ARX ROM vs EnergyPlus comparison of 5 zone building, core zone shown...... 77

viii Figure A.2 ARX ROM vs EnergyPlus comparison of 5 zone building, perimeter 1 zoneshown...... 78

Figure A.3 ARX ROM vs EnergyPlus comparison of 5 zone building, perimeter 2 zoneshown...... 79

Figure A.4 ARX ROM vs EnergyPlus comparison of 5 zone building, perimeter 3 zoneshown...... 80

Figure A.5 ARX ROM vs EnergyPlus comparison of 5 zone building, perimeter 4 zoneshown...... 81

Figure A.6 ARX ROM vs EnergyPlus comparison of 5 zone building, core zone shown...... 82

Figure A.7 ARX ROM vs EnergyPlus comparison of 5 zone building, perimeter 1 zoneshown...... 83

Figure A.8 ARX ROM vs EnergyPlus comparison of 5 zone building, perimeter 2 zoneshown...... 84

Figure A.9 ARX ROM vs EnergyPlus comparison of 5 zone building, perimeter 3 zoneshown...... 85

Figure A.10 ARX ROM vs EnergyPlus comparison of 5 zone building, perimeter 4 zoneshown...... 86

Figure C.1 Temperature comparison for the MPC and a baseline, precool temperature, controller. Both are based on DAMP pricing with Indoor Air Temperature (IAT), set-point temperature (TSP), Outdoor Air Temperature(OAT),andOccupancy...... 93

Figure C.2 Electrical consumption results from the temperature comparison plots for the MPC and a precool temperature control based on DAMP pricing ...... 94

Figure C.3 Temperature comparison for the MPC and a baseline, precool temperature, controller. Both are based on TOU pricing with Indoor Air Temperature (IAT), set-point temperature (TSP), Outdoor Air Temperature(OAT),andOccupancy...... 94

Figure C.4 Electrical consumption results from the temperature comparison plots for the MPC and a precool temperature control based on TOU pricing . 95

ix Figure C.5 Temperature comparison for the MPC and a baseline, constant temperature, controller. Both are based on EZ3 pricing with Indoor Air Temperature (IAT), set-point temperature (TSP), Outdoor Air Temperature(OAT),andOccupancy...... 95

Figure C.6 Electrical consumption results from the temperature comparison plots for the MPC and a constant temperature control based on EZ3 pricing . 96

Figure C.7 Temperature comparison for the MPC and a baseline, setback temperature, controller. Both are based on EZ3 pricing with Indoor Air Temperature (IAT), set-point temperature (TSP), Outdoor Air Temperature(OAT),andOccupancy...... 96

Figure C.8 Electrical consumption results from the temperature comparison plots for the MPC and a setback temperature control based on EZ3 pricing . 97

x LIST OF TABLES

Table2.1 ComparisonofModels...... 16

Table3.1 1-zoneROMsolutionstatistics...... 33

Table 3.2 5-zone ROM solution statistics. (Note: all presented statistics meet the ASHRAEGuideline14.) ...... 34

Table 4.1 Table showing the effect of prediction horizon on optimal temperature set-points...... 51

Table 4.2 Energy and Cost Savings Generated using the model predictive controller whencomparedtothethreebaselinecases...... 59

Table B.1 Single zone building ARX weighting matrix values ...... 87

Table B.2 Core Zone of multiple zone building ARX weighting matrixvalues . . . . . 88

Table B.3 Perimeter Zone 1 of multiple zone building ARX weighting matrix values . 89

Table B.4 Perimeter Zone 2 of multiple zone building ARX weighting matrix values . 90

Table B.5 Perimeter Zone 3 of multiple zone building ARX weighting matrix values . 91

Table B.6 Perimeter Zone 4 of multiple zone building ARX weighting matrix values . 92

xi LIST OF ABBREVIATIONS

A for Mathematical Programming ...... AMPL

ArtificialNeuralNetwork ...... ANN

Applicationprograminterface ...... API

Auto Regressive outputs with Exogenous Inputs ...... ARX

Auto Regressive outputs with Moving Average Exogenous Inputs ...... ARMAX

American Society of Heating, Refrigerating, and Air-Conditioning Engineers . . ASHRAE

BuildingControlvirtualTestBed...... BCVTB

BuildingEnergyOptimization...... BEopt

BoxJenkins...... BJ

CoefficientofPerformance ...... COP

Co-varianceRootMeanSquared ...... CV-RSME

DayAheadMarketPricing ...... DAMP

DataAcquisitionSystem...... DAQ

DryBulb ...... DB

DeterministicModelPredictiveControl...... DMPC

DepartmentofEnergy ...... DOE

DirectExpansion...... DX

ElectricReliabilityCouncilofTexas ...... ERCOT

GoodnessofFit...... GOF

IndoorAirTemperature ...... IAT

xii InternationalEnergyConservationCode ...... IECC

HeatingVentilationandAirConditioning ...... HVAC

LocalControl...... LC

LinearTimeInvariant ...... LTI

LinearProgram...... LP

MatrixLaboratory ...... MATLAB

MixedIntegerProgram...... MIP

MixedIntegerLinearProgram...... MILP

MixedIntegerNon-LinearProgram ...... MINLP

MATLAB-EnergyPlus Co-simulation Interface ...... MLE+

ModelPredictiveControl ...... MPC

ManipulatedVariable ...... MV

Nonlinear Auto Regressive outputs with Exogenous Inputs ...... NLARX

Non-LinearProgram ...... NLP

NormalizedMeanBiasedError ...... NMBE

NationalRenewableEnergyLaboratory ...... NREL

OutdoorAirTemperature ...... OAT

OutputError ...... OE

PhotoVoltaic...... PV

ProportionalIntegralDerivative ...... PID

Rule-BasedController ...... RBC

ResistiveandCapacitive ...... RC

RelativeHumidity ...... RH

xiii ReducedOrderModel ...... ROM

RealTimePricing ...... RTP

SupervisoryControl ...... SC

StochasticModelPredictiveControl ...... SMPC

SetPoint ...... SP

StateSpaceModel ...... SS

SupportVectorMachine ...... SVR

TimeOfUse ...... TOU

TimeStep...... TS

TemperatureSetPoint...... TSP

VariableAirVolume ...... VAV

WindSpeed...... WS

xiv ACKNOWLEDGMENTS

I would like to thank Colorado School of Mines for granting me the ability to work on the following prestigious thesis. This project would never have succeeded without my friends Ryan Hemphill, and Kevyn Young keeping me sane. I would also like to acknowledge the help and support from my parents Doug Harris, and Mary Harris. Lastly I would like to thank my adviser, Paulo Tabares (Mechanical Engineering), as well as committee members Alexandra Newman (Mechanical Engineering), and Tyrone Vincent (Electrical Engineering) for their continual assistance. Without them this thesis never would have been possible.

xv I dedicate this thesis to my parents, family, and for those that shall follow after.

xvi CHAPTER 1 INTRODUCTION

Buildings in the United States are responsible for around 75% of total electric energy usage, with space conditioning using around 48% of the total building electric energy con- sumption [26]. There are many ways to reduce building energy consumption such as advanced controls, building retrofitting, and demand response controllers. Building controls often reg- ulate the operation of heating, ventilation, and air conditioning (HVAC) equipment. These requirements are typically met by controlling temperature but also by humidity, ventilation, and shading of solar radiation. Specifying the proper materials and HVAC equipment before a building is constructed will drastically help improve energy consumption. However, once a building is built, advanced controls offer the most cost effective reduction of energy usage by mitigating the amount of energy used in both residential and commercial buildings. In- corporating active and passive thermal storage helps mitigate peak load, therefore, creating less demand on the electrical system [79]. With changes in the climate and the smart grid, the controls need the ability to adapt to changes in the environment. These adaptations to environmental changes allow the controls to reduce energy demands on the grid, as well as improvement in the comfort of the occupants [43]. An increasing cooling demand affects the load on the HVAC equipment by decreasing the efficiency of the cooling systems as the ambient temperature increases. The increasing cooling load is directly related to the higher temperatures trapped within the urban environment known as an urban heat island. Ochoa et al. investigated ways to mitigate the increasing load demand on the electrical grid using renewable energy generation systems, such as the wind and solar. These independent systems help with increases in electrical flexibility of the grid, allowing buildings to operate more efficiently in respect to energy demand [60, 62].

1 The current generation of HVAC controls includes two levels of operation: the first is locally managed and the second is system-level. Local controls (LC) operate using pro- portional integration derivative (PID) feedback loops, feed forward systems, or finite state machines [59]. Examples include individually packaged units as well as specific devices such as chillers and heaters. Feedback controllers are the most common type of local controllers; however, feedback-feedforward systems can respond more accurately by quickly predicting the response of the system before acting. State machines can respond to different conditions by incorporating multiple control structures defined by operating types; these can include cooling, heating, and mixed modes [59]. The lower level controls only regulate individual devices and do not optimize overall efficiency. System-level controls are used to monitor and control multiple devices within the network. This operation of multiple device control types include rule-based, optimal, advanced neural networks, and fuzzy logic controllers [59]. The most common system control structure for buildings is a rule-based controller (RBC) [40]. They are comprised of If-Then rule sets. They respond in preprogrammed ways, causing only a limited set of responses. These limited responses can cause large inefficiencies due to unknown control inputs. In contrast, adaptive controllers can operate more efficiently with changes in the environment outside of normal operation [88]. Adaptive controllers use neural networks while sometimes using fuzzy logic variables to control the temperature in conjunction with reducing energy usage. Open-loop controllers such as a Model Predictive Controller (MPC) can optimize inputs by looking at the multiple possible outcomes of a system [30, 37, 53, 55, 67, 73, 94]. Model predictive controls operate by taking feedback from the environment, and op- timizes the inputs to predict the optimal outcome of the modeled system. A correctly optimized system needs a tractable and realistic numerical model to optimize because opti- mization solvers may need to iterate a problem thousands of times. Typical energy simulation programs, such as EnergyPlus, uses a white-box modeling approach which incorporates the full set of nonlinear equations and solves in approximately a minimum of 20 seconds per

2 simulation of the model for a single day. The solution time includes a warm-up period as well as potential sizing of equipment; therefore, the solution time quickly becomes infeasible when solving an optimization problem. Thus, most studies developed simpler numerical models known as reduced order models (ROMs) [22], which allow for improvement of the optimization problem tractability. Figure 1.1 shows the basic model predictive control cycle. The plant block simulates the response to the resulting MPC solution before being fed back into the MPC.

Start Terminate MPC Plant Control Control

Figure 1.1: MPC Modeling Environment Control Loop.

Building simulation programs like EnergyPlus, TRNSYS, , and DOE-2 are used for predictions of building energy usage, research of building materials, and controls. Ener- gyPlus is becoming one of the industry standard programs for simulation. It is even being included in other modeling platforms, such as BEopt and OpenStudio. BEopt and Open- Studio are capable of optimizing the components within the building, helping to improve efficiencies prior to construction. However, the optimization software is not conducive to controls because of the way it operates. With the advancements in research and energy prediction, this has necessitated co-simulation software to incorporate separate simulation programs into a single environment. These different platforms include BCVTB (building control virtual test bed), MLE+, Modelica, and other hard-coded environments.

1.1 Research Objectives

Model predictive controls have become a popular type of controller for improving the energy use of the building. To optimize and simulate the controller, this thesis creates a

3 robust optimization platform. The objective of this thesis is to:

• Develop a modeling platform allowing for easy creation of single and multiple zone ROMs using the black-box modeling method.

• Develop a second modeling platform to allow for constructing, simulating, and imple- menting MPCs. The applications incorporated include EnergyPlus and AMPL.

• Investigate the effects and differences of single zone ROMs within simple cost focused MPC.

This masters thesis discusses the creation of ROMs and MPCs, as well as the develop- ment of a modeling platform for simulation and implementation of the controller. ROM development investigates the effects of creating a single zone and multiple zone models using simulated data from EnergyPlus for residential and commercial buildings. The resulting data uses a 24-hour prediction horizon while being compared to EnergyPlus data. Two different models are used to compare how a black-box ROM can simulate building energy usage. The first model selected is a single zone residential building, while the second model is for a five zone commercial building. After developing the ROM, an MPC is constructed using the single-zone building and run on the rapid MPC prototyping platform. The rapid MPC prototyping platform allows for simulation of advanced building controls.

1.2 Technical Approach Overview

The following list describes the approach for the development and simulation of the MPC prototyping platform.

1. Develop and implement a black-box method to determine a ROM using E+ and MAT- LAB. MATLAB is used to run the EnergyPlus model, and then to incorporate the results of the model to develop the ROM. The comparison of the resulting ROM,

4 use the following statistics: NMBE and CV-RMSE. These statistics are declared in ASHRAE Guideline 14.

2. Develop a modeling platform to simulate the MPC. Develop an optimization formu- lation to minimize the electric cost while incorporating the ROM. The formulation is entered into a mathematical representation language called AMPL.

3. Develop a modeling platform to simulate the MPCs while allowing for physical ex- perimentation. To solve the MPC formulation, the AMPL API is incorporated into Simulink by developing a Simulink level 2 S-function. The S-function is used to opti- mize the MPC formulation within AMPL, while being able to use the resulting opti- mized temperature setpoint in EnergyPlus or a physical building.

4. Run the MPC rapid prototyping platform within Simulink and analyze the results to determine the effectiveness of the controller.

1.3 Thesis Contributions

The following chapters construct and derive reduced order model (ROM) as well as a prototyping platform for model predictive controls (MPC) or co-simulation program. The contributions from the ROM include investigations into the effects of applying an autore- gressive exogenous model to both single and multiple zone residential buildings. The study further investigates the effects of changing the number of inputs to the model. Correlations are drawn to determine the best model for the commercial and residential buildings from the derived models and findings. The co-simulation program allows for rapid development of optimization controllers that are capable of linear, nonlinear, or mixed integer formulations. The platform simulates a simple optimization model formulated for the single zone building using the ROM disclosed to predict building energy usage. The resulting simulation reduced the energy usage for the building by simply controlling indoor temperature setpoint.

5 1.4 Thesis Organization

The thesis is divided into six chapters. Chapter 1 serves to describe the background information the individual components to the controls, the research objectives, the technical approach taken, and the organization of the thesis. Chapter 2 provides an in-depth literature review of the controls and methods for modeling the MPC, ROM, and simulation of the two systems. Chapter 3 discusses the formulation of the model including the single-zone control, multiple zone, and development of the system. Chapter 4 discusses the formulation of the rapid prototyping system for development of the MPC and simulation of the model. Chapter 5 concludes the thesis; this includes research contributions, broader impact, and future work.

6 CHAPTER 2 LITERATURE REVIEW

Chapter 2 covers the literature review on model predictive controls, reduced-order models, and co-simulation (simulation) software. The first subsection discusses the state of model predictive controls (MPCs) and methods used to develop and implement these mechanisms. These controls describe the function and methods of MPCs. The next subsection discusses the methods of representing reduced-order models (ROMs) for increasing the computational speed of predicting the energy usage of buildings. The last section discusses the programs and co-simulation platforms used to model the system. The gaps presented here represent some of the sources of ongoing research within the field of advanced controls and modeling systems for buildings.

2.1 MPC

Model predictive controls (MPC) are frequently used in research and operation of HVAC systems, lighting, comfort, robotics, and chemical plant control. Chapter 1 discusses the op- eration of MPC in minor detail; this initial chapter introduces the operational structure of the MPCs and how they operate HVAC and other building control systems. MPCs operate by using numerical and reduced order models to determine the predicted result from the set of inputs and outputs over the control horizon. These models can be Reduced Order Models (ROMs), state space models, modeling programs such as EnergyPlus, TRNSYS, Modelica, or physics based equations to represent the response of the system. The ROM of the phys- ical system is used to increase computational tractability and speed for the optimization formulation of the system. Optimization formulations include the reduced order models and other numerical models representing the physical system. The resulting solution from the optimization program is an optimal input for the prediction horizon. The control operates

7 Δt{ Δt{

Solved at Time 0 24 hr

Solved at Time 1 24 hr + Δt

in an open-loop control sequence. Therefore, theSolved MPC at Time recalc 2ulates at every24 time-step.hr + 2* Δt Fig- ure 2.1 represents the first loop as t to t + c + k, in which t describes the global time, c the cycle time, and k the prediction horizon [11, 76]. Research into MPC controllers for building control uses either deterministic or stochastic optimization formulations for inputs, constraints, and objective functions [54, 95]. The inputs traditionally used on MPCs for building energy mitigation include weather, occupancy, indoor air temperature, ventilation rates, and lighting [72, 82].

Receding Horizon Control loop at t Receding Horizon Control loop at t+1 Past Future Past Future

Prediction Horizon Control Horizon { { Δt t+1 t+m t+k Δt t+2 t+1+m t+1+k t t+1

KEY

Known Input (u) Known State (x) Predicted Input (ū) Predicted State (x)

Figure 2.1: Represents the receding horizon for an MPC over two time-steps.

MPCs are an optimization-based control used to predict the conditions of the model while maximizing or minimizing an output from the system. The optimization controls have the ability to adapt to changes in the system not explicitly declared or taught to the controller, allowing for potentially higher savings over traditional RBC controllers [17, 31, 50, 53, 55, 63, 65] Figure 2.1 also shows the structure of an MPC receding horizon. MPC controllers operate on a finite receding prediction horizon, and an operation horizon called the control horizon. The control horizon is the amount of time that the variables are manipulated using optimization. To increase the tractability of large problems, the prediction horizon is usually

8 larger than the control horizon, which decreases the total number of input variables to the problem [11]. The finite receding prediction horizon is named due to the discretization of the running time horizon into a finite number of predictive time-steps and indexed forward in time. The MPC will predict the inputs for the control horizon, before fixing the inputs over the prediction horizon not encompassed by the control horizon. The prediction horizon can be equal to or larger than the control horizon [11]. For example, the control may predict the best manipulated variables (¯ut) for a 20-hour period at a time-step of one hour with the prediction horizon being 24 hours. The variables manipulated by the MPC, called MVs (manipulated variables), can include temperature setpoints, CO2 levels, active and/or passive thermal storage, and illumination. The ROM used by the MPC correlates the inputs and deterministic data to the output data (energy usage for this application). The optimization control could use other constraints: ROM, comfort index (Fanger, PMV, or other comfort models), building codes (ventilation, and other standards), flow balance, If-Then scheduling, variable constraints, and linking variables. The objective function for the optimization program can take the form of a linear program (LP), mixed integer program (MIP), or nonlinear program (NLP), depending on the variables and constraining equation sets. A deterministic MPC (DMPC) uses the assumption of little to no error on inputs as well as output states [95]. This assumption reduces the complexity of the system and, for this reason, have been used by many studies [17, 20, 21, 37, 53]. The DMPC solutions are able to achieve higher savings than stochastic MPCs due to the certainty of the future inputs. These DMPC controllers can generate a higher savings compared to a stochastic case because inputs are known. Other studies have applied the MPCs to deterministic systems using incorporated 24-72-hour prediction horizons [13, 17, 50]. This 24-72-hour prediction horizon allows for more accurate responses to perturbations from inputs leading to higher energy savings than simple RBC or other basic controllers when the input uncertainty is low. If the uncertainty is significant, the MPC can be outperformed by a simple controller [53].

9 However, Cole et al. found that the optimal prediction horizon was 12 hours [21]. Therefore, the MPC using the 12-hour predictionhorizon are able to accurately predict the energy usage for deterministic inputs. The inputs used on model predictive controls depend on the end use of the controller. Previous studies on deterministic and stochastic building MPCs have found that the following inputs have a greater effect on the results of the optimization routine:

• Weather: Oldewurtel et al. examined how weather predictions can improve the opti- mization model and, in turn, increase efficiency [66, 68]. The weather data selected for use within this study included outside air temperature, wetbulb temperature, and solar radiation. The resulting research showed that the inclusion of this environmen- tal information helps to increase prediction consistency. Weather predictions are very unreliable due to the inaccuracies in the methods that are employed today; therefore, because of these inaccuracies the MPC must be stochastic.

• Occupancy: Oldewurtel also looked into the effect of occupancy on the ROM for MPC building climate control [69]. The stochastic variable occupancy is the study of how people move from zone to zone within a building. Ongoing research on predicting occu- pancy schedules currently use Markov chains to decipher the location and probability of the people within the building [3, 90].

Previous model predictive controls that use weather and occupancy for inputs include chillers, distributed controls, and setpoint controls. Chillers optimizing active water cooling systems have cost and energy savings around 30% and 59% respectively [50]. Distributed controls can save upwards of 43% energy savings [15], while set-point controls save upwards of 68% cost and 83% energy use[22]. Distributed control MPC investigates the modeling of individual components of the HVAC system by investigating: fan, dampers, direct expansion unit (DX), and a model of the zone. These four devices make up eleven sub-formulations used to solve the distributed optimization program. The result from solving the distributed

10 model for a multiple zone building indicates that there is a 43% energy savings potential by using this method to run multiple components at once [15]. The chiller MPC investigates a method of modeling the physical system to predict the temperature and fill level with the intended purpose of minimizing the energy and water use. The results from the simulation regarding energy reduction are positive, resulting in cost savings of 59% and an energy savings of 30%. Cole et al. investigated simple models to quickly define the reduced order model formulation for residential buildings in the hopes of rapidly implementing residential MPCs [22]. The results indicate that the overall cooling energy costs were reduced by 68% with a peak cooling electric cost savings of 83%. These results are very similar in energy cost savings to each other; however, the studies cannot be directly compared due to the differences in location, costs, and even the building systems leading to difficulty in direct comparisons, but shows a trend of significant energy and cost savings. Many of the previously analyzed control systems use co-simulation [21, 50, 65]. Co- simulation is a program that accesses other software for modeling single components, such as simulating building controllers, buildings, and HVAC equipment. Oldewurtel et al. uses Modelica to model energy usage generated by the building as well as to simulate building response [67, 68]. Others use EnergyPlus to generate the building response [22, 23, 50]. The models that incorporate EnergyPlus usually are built around a linear optimization program (LP), meaning the Simulink Optimization and MPC toolboxes can converge on solutions quickly. However, not all systems controlled by MPCs are deterministic and linear time invariant (LTI). These programs are either Non-Linear (NLP), Mixed Integer Non-Linear (MINLP) or are Mixed Integer Linear programs (MILP), and take longer to solve. The resulting increase in solution time can create time constraint issues within the MPC. One method to reduce tractability difficulties associated with the time constraint is to use commercial solvers and optimization specific programming languages. These solvers and programming languages use heuristics to converge on a solution quicker: one such language is AMPL. AMPL has previously been employed in a custom-developed platform to combine

11 it with EnergyPlus for simulation of MPCs [97]. AMPL does not directly solve optimization problems but allows for mathematical representations of objective functions and constraints to be sent to commercial solvers, such as CPLEX, , SNOPT, BARON, MINOS, and KNITRO [7, 25, 39, 46, 58, 83, 86]. There are other optimization options for linking commercial solvers to MATLAB. These include: TOMLAB Optimization, APMonitor, and MIDACO [57, 87]. Because AMPL and GAMS allow for the formulations to be input in a high level algebraic form, the formulations become easier to code and solve. GENOPT is an optimization solver that externally runs EnergyPlus to solve an objective function, but it is limited to optimizing materials, other building components, and simple schedules for control within EnergyPlus [34]. Other optimization tools using EnergyPlus are BEopt and OpenStudio. Both use optimization routines similar to GENOPT to determine the best design criteria; these models are not intended for optimizing schedules. MPCs are used for more than just minimizing energy. Some of the controls look at manipulating the temperature while maintaining thermal comfort within the space [17]. Other controls manipulate scheduling of energy generating devices, such as PV to reduce the demand on the grid effectively creating a microgrid [52]. Most of the MPCs used on building controls are able to minimize the energy consumption within the building HVAC system.

2.2 ROM

MPCs require a simplified model to generate the anticipated energy usage for minimizing the energy consumption and associated costs. This simplified, or reduced-order, model might not be as accurate as white-box (physics-based) models, but it increases computational speed by simplifying the system equations. The reduced order model is also able to maintain an accurate prediction of the dynamic response. There are different methods to accomplish reduced order modeling, which include the following:

• Grey-box models are polynomial reduction methods.

• Black-box models are statistical based methods.

12 The statistical black-box methods make use of the inverse models that are derived from the observed behavior of the system. Inverse models rely heavily on data-based model- ing methods, such as auto-regressive with exogenous input (ARX), artificial neural network (ANN), and support vector machine for regression (SVR). Exogenous inputs are associated with change outside the model that cannot be explained within a standard model. Black-box models are data-driven techniques that require large amounts of data and are only valid for similar conditions from which the training data is derived. Problems can arise when deter- ministic systems implement stochastic inputs and noise [49]. Black-box techniques model the system response as a function of input to output association; this association ignores the physical interaction. Li et al. compare current ROM types for buildings, photovoltaic, and other nonlinear systems commonly used to supplement energy usage [47]. A forward modeling method such as white-box and grey-box models rely on the physical description of the system. A white-box model uses the physical information of the system to formulate the proper physics-based constraints for the system. EnergyPlus incorporates the use of white-box models to calculate results. Because of the complexity of the nonlinear equation sets used to compute the solution from white-box models, the equation sets used by EnergyPlus are computationally expensive. Due to the processing power required for a white-box model, some studies use grey-box models due to the simplification of the model. Grey-box modeling uses parameter optimization to remove complexity from the system by using a simplified surrogate model; therefore, increasing the tractability of the problem [96]. Both black-box and grey-box models have been thoroughly studied to determine the effectiveness for MPCs. Reynders et al. compared both approaches for an MPC and found that if tuned correctly both modeling types could be effective for representing the system response. This study found the black-box model to be slightly more accurate than the grey-box model [77]. A subsequent study used a grey-box model to apply and explore the effects of noise and stochastic inputs on a single zone and found that inclusion of random noise increased the uncertainty, however, small stochastic changes in inputs are able to be

13 accurately simulated using grey-box models [78]. Afram et al. compared an extensive set of models (approximately 10) black-box and grey-box models to determine a better choice. Nonetheless, the ARX, ANN, and grey-box methods showed a similar error for the analyzed system [1]. Thus, previous results indicate that there is not a clear preferred method based on error prediction, so the selection of the model might be based on ease of modeling the system, flexibility of the model to adapt to changing environmental variables, or speed of developing a model. Most MPC studies discuss single-zone MPCs and use grey-box or black-box modeling for ROM approaches. Most of the authors reviewed validated their grey-box ROM models using a white-box simulation software such as TRNSYS [13, 28, 44, 47, 65, 90, 94]. Among these reviews that incorporate grey-box models and TRNSYS, Braun et al. developed a grey- box approach to model building energy prediction of a single zone [14]. Grey-box modeling requires an initial low-order model of the system, usually represented as a two-resistor three- capacitor (2R3C) or similar simple thermal resistor and capacitor (RC) circuit to represent the thermal zone. Reynders et al. found that at a minimum, either a third or fourth order thermal circuit would best represent the system, resulting in the most accurate prediction [78]. A few authors have used the grey-box modeling approach for stochastic MPC models, such as the studies by Oldewurtel [63] and Reynders et al. [78], or for use in remote server- based controllers. The studies from Oldewurtel use a tractable approximation to reduce the complexity of the MPC when dealing with stochastic inputs [64]. Oldewurtel et al. then applied stochastic weather predictions to the model with a 72-hour prediction horizon for the MPC [64, 66, 68]. Corbin and Henze used the models developed by Braun and applied them to control a server-based MPC; the server-based controller could be responsible for defining the setpoints for multiple buildings [24]. These studies use grey-box and black-box modeling methods for simulating single zone buildings within advanced controls. A black-box modeling approach uses statistical methods to determine coefficients by matching the system to experimental data. Interestingly, most validated black-box models

14 use EnergyPlus [20, 22, 81], whereas grey-box models tend to use TRNSYS [14, 64]. Black- box modeling requires large amounts of experimental data; the resulting models are only valid for similar weather conditions. These models can use state-space-based equations that incorporate feedback from occupants, in addition to being validated using both EnergyPlus and lab experiments in a thermal chamber [17, 19, 48]. Others have constructed a black-box model for residential buildings to reduce the computational requirements for implementation of the MPC [22, 23]. Black-box models are also used to simplify building dynamics for health and prognostics management, more specifically fault detection. The components are modeled and compared to physical responses to determine if the system is deviating from normal operating conditions [70]. Multiple zone controllers either use grey-box or black-box approaches to simplify model complexity. Braun and Kim developed a grey-box modeling method for a single unit zone. The study then combined unit zones before using a balanced truncation method to reduce the external parameters in the model [44, 45]. Chinata constructed an automated method for building a multiple zone black-box model that examines the ARX, ARMAX, Box-Jenkins (BJ), and Output Error (OE) modeling equations. The author then automated the approach of repeating the process using high correlation equations for the remaining zones [20]. Li et al. compare different types of models including both grey-box and black-box while concluding that each modeling type has advantages for different environments [47]. These black-box models can simulate the building accurately if trained for the entire operating conditions; whereas, grey-box models are better at adjusting to changes in the environment. Both grey-box and black-box modeling are useful ways of reducing a white-box model to minimize the computational power. Table 2.1 compares both approaches. Black-box modeling is only as good as the training data used; therefore, the resulting model is only valid for similar conditions. Grey-box modeling, on the other hand, is able to respond to the surrounding environmental changes better, because the model is based on physical responses and less statistically driven. According to Afram, grey-box modeling methods do not tend

15 to fit the actual usage as well as the black-box modeling [1]. Methods to derive the two models use a similar approach. First, the grey-box model requires the modeler to have experience in optimizing parameters to fit the training data as well as in understanding how simple to make the basic model. Lastly, the black-box model, however, is easier to develop but requires the modeler to understand proper input and proper period selection helping to reduce overfitting. This selection can be the most difficult part of the black-box approach [74].

Table 2.1: Comparison of Models. Type Pros Cons White- Robust and accurate method Long run time Box Represents the physical system by Need to know all building and ma- using the full set of nonlinear equa- terial specifications tions Grey- Accurate representation using phys- Hard to define without prior experi- box ical system ence Flexible ROM Black- Rapid development of linear or non- Potentially need more data for sta- Box linear systems of equations tistical approximation Only good for the specific time of year to which the data was fit, e.g. Winter ROM not valid for summer.

2.3 Co-Simulation Software

Research into platforms for advanced building controls typically are designed for either pure simulation or experimental purposes. Programs that allow for both MPC controls and simulation software include either the building control virtual test bed (BCVTB) [91, 92] or Modelica [32]. MLE+ is able to incorporate BCVTB into Simulink by making it an add-on [8]. The use of Simulink allows for both physical experiments and simulations of the commer- cial or residential building system. The advancement proposed within this thesis includes the addition of AMPL, to allow for increasingly complex optimization problems. AMPL is a modeling language that allows for the incorporation of different solvers; these diverse solvers

16 are capable of determining the solution to linear programs, nonlinear programs, or mixed integer programs. The objective of this thesis is to construct a modeling environment that incorporates AMPL and MLE+ within Simulink to allow for simulation of advanced controls and physical experiments using an environmental test chamber. MPC development platforms include other simulation environments such as National Instruments LabVIEW, Modelica, and other agent-based systems. Simulink and LabVIEW are commonly used within the industry to program controls for implementation, making them a natural choice. Canale developed a platform for rapid MPC controller development and an application for physical experiments using LabVIEW [16]. However, they do not incorporate a building energy simulation environment such as DOE-2 or EnergyPlus. Simulink allows for the creation of a system to integrate MPC simulation and physical experiments within the same environment. An add-on called MLE+ is used to integrate EnergyPlus within Simulink. AMPL integration within the Simulink enviroment uses an API capable of being included in common coding languages such as MATLAB, C++, and Java. In conclusion, existing research is capable of modeling optimization-based controls within separate environments. However, there is a need to develop a standardized modeling platform for rapid development, simulation, and physical experimentation for optimization-based ad- vanced controls. This is accomplished using MLE+ to incorporate EnergyPlus and Simulink, along with a level 2 S-function to include AMPL within Simulink. In the following chapters, the platform will be developed and simulated using optimization-based controls for single zone residential buildings.

17 CHAPTER 3 REDUCED ORDER MODELS FOR RESIDENTIAL AND COMMERCIAL BUILDINGS

3 Buildings consume about 4 of electricity use in United States and residential buildings are a primary driver of electric peak demand. One approach to reduce energy consumption includes advanced supervisory controllers. These advanced systems can reduce energy us- age by predicting the building response and determining the optimal temperature setpoints. However, optimization problems solve iteratively and rely on model solution times. Typical building energy modeling software solves in seconds; therefore, development of reduced order models becomes critical where increases in computational speed are necessary. This study develops and compares two reduced-order models (ROMs) for use in advanced controllers that rely on the simulation solution speed. This paper uses a systematic approach to con- struct a system identification platform before determining the black-box ROM. The models are constructed by a platform combining EnergyPlus and MATLAB to generate the training data sets as well as determine the ROM coefficients. The study then compares the affects of the number of inputs as well as how single or multiple zones affect the accuracy. The result- ing models are able to accurately simulate the building energy with a drastic improvement in solution time using small amounts of data.

3.1 Introduction

Space conditioning makes up 35% of all energy usage, while residential and commer- cial buildings make use of 75% of all energy produced [26]. The space conditioning energy consumption in hot climates can affect the electric grid by increasing significant demands during peak times. To mitigate peak electric demand, the Department of Energy and utility companies have created more engaging roles for customers by using the following methods: time-of-use pricing, peak pricing, real-time pricing, and peak rebates [27]. To make use of these methods variable thermostats, precooling strategies, learning thermostats such as

18 NEST [61], and advanced controls are used to reduce the energy usage. Precooling investi- gates lowering the building temperature to store energy within the building prior to the peak load by passively storing energy within the zone [6, 10, 12, 35, 36, 89]. Advanced controls can optimize thermostat control allowing for more savings. Studies using advanced controls include artificial neural networks, model predictive controls, and fuzzy logic control [28]. Model predictive controls (MPC) is rapidly advancing the field of research for temperature control of buildings due to the potential of large improvements using existing equipment, and the possibility of energy savings from optimization. However, MPCs require large problem sets to be solved, thereby creating a potential for long solution times. Thus, MPCs typically use reduced order models (ROMs) to increase the tractability of the problem. These ROMs are selected instead of traditional building energy simulation programs, such as EnergyPlus, TRNSYS, or Modelica due to the long run time associated with these whole building energy programs. For example, EnergyPlus with a warm up period takes approximately 20 sec- onds per daily run of a single zone residential building, therefore, becoming infeasible when iterating thousands to tens of thousands of times to generate the optimal solution [22]. Whole building energy programs like EnergyPlus are classified as white-box models be- cause the models incorporate the full set of nonlinear equations to describe the system in great detail. The white-box models used in available energy solvers compute the heat transfer calculations due to convection, conduction, and radiation. Different solution methods for the heat equations depend on the software. These solution methods include radiant time series, heat balance method, and thermal circuits [59]. DOE-2 uses the radiant time series method, while EnergyPlus uses the heat balance method. Therefore, each simulation environment has its advantages. However, the solution time is too long for advanced controls that may iteratively solve the constraints and, therefore, modeling methods that can be solved quicker must be employed. There are two types of ROMs typically used to simplify the solution: grey-box models or black-box models. Grey-box models are simplified systems for each zone tuned to the

19 physical system. The increase in computational speed is due to the simplification of the model which decreases the variables and derivatives needed for the solution. The grey-box approach simplifies thermal resistance and capacitance (RC) with a combination of thermal resistances (R) and capacitors (C) (e.g. 3R2C, 4R3C). Input values for the simplified model are determined using either actual data or simulated data from a white-box model. Reynders looked at the effectiveness of modeling complexity and found that the simplest and most accurate model for analysis of a building was a fourth order RC circuit (4R3C) [78]. Other authors have used 3R2C models for each wall and ceiling to represent the system of the building [14] or applied the dual node model successfully to multiple zone buildings with a 3R2C circuit for the walls [45]. Afram used Simulink to generate a simplified grey-box model that was trained using results from a white-box model [2]. Liu generated a grey-box model for each part of the water chiller loop including the cooling tower [50]. The simplification produced shorter run times for the model, allowing for use in MPC controls. Black-box models use statistical approaches to link the inputs to the outputs, creating equations that are data driven. The black-box modeling method uses linear and nonlinear algebraic equations that are fit to the previous data. Typical algebraic models previously used for buildings include box-jenkins (BJ), auto-regressive with exogenous input (ARX), auto- regressive with moving average exogenous input (ARMAX), artificial neural network (ANN), state-space models (SS), and non-linear auto-regressive with exogenous input (NLARX). These models are chosen because of their simplicity and accuracy. Cole et al. used the ARX model for residential buildings within an MPC [22]. Chintala et al. used an ARX model to generate an automatic development of the black-box modeling method [20]. Chen generated an SS model using data-driven methods to incorporate occupant feedback about thermal comfort, while reducing the modeling complexity of the system [18]. Ansari et al. created simple regression models for multiple HVAC components to estimate the total cooling load of the system [5].

20 Three studies have compared the two ROM methods to determine if one method is more effective than another in predicting building energy use [1, 49, 77]. These studies construct and simulate multiple different building models in an attempt to prove the optimal approach by statistical means. However, these studies find no significant accuracy differences in predicted energy use between the grey-box and black-box models. Therefore, the selection of the modeling method for ROM is up to the modeler and are chosen on other factors, such as modeling simplicity or speed of development. This paper will focus on black-box modeling and development of an energy model for single and multiple zone buildings with comparisons on the number of inputs. These com- parisons allow for a better understanding of the limitations of black-box modeling methods. The black-box description in detail is presented in Section 2, while the methods to develop black-box models for multiple zone and single-zone buildings are provided in Section 3. We will investigate how the models respond to three inputs and six inputs. The analysis will be done using the ASHRAE Guideline 14 for the comparison of the models in Section 4. The conclusion and future work will be discussed in Section 5.

3.2 Black Box Modeling Method Development

To determine linear ARX, NLARX, and linear ARMAX models both Simulink, and MATLAB files are created to determine, and analyze the resulting equations using data generated from EnergyPlus simulations. Figure 3.1 shows the method used to produce the data and compare the models. The first process is to call and run a Simulink file that generates the training and validation datasets. Then the data is compiled and used in a MATLAB script that solves for the ARX, NLARX, and ARMAX models. They are then simulated at a 24-hour prediction horizon and compared using statistical evaluations. The building files included are a single zone residential building and a multiple zone com- mercial building. The building configuration for the single zone model is a 2500ft2 home located in Austin, Texas. The building represents a typical new construction and is based on the NREL house simulation protocols constructed from the 2009 International Energy

21 Start System End System Identification Identification

Simulate Training and Calculate Statistics Validation for ARX Models Data

Define Models Compile Data (ARX, NLARX, ARMAX)

Figure 3.1: System Identification Flowchart.

Conservation Code [42]. The benchmark applies a miscellaneous electric load, lighting char- acteristics, and federal appliance standards in effect in 2010 [93]. Figure 3.2 shows the BEopt generated residential building. The multiple zone building is a prototype building representing an existing building based on ANSI/ASHRAE/IESNA Standard 90.1-2004 [27, 85]. It is a one-story, small office with five thermal zones. These standards cause the reference buildings to have differences in construction based on climate zone. Because the simulations are taking place in Austin, Texas, which does not have a representative model, the selected models were developed for a similar climate zone of 2A, which is defined by the IECC 2009 climate zone rankings, meaning that it is hot and humid (A). The ROM is generated using a basic matrix form of Equation (3.1), because each zone is represented by different weighting factors. These weighting factors are 2-D matrices instead of the 1-D arrays generated from the single zone residential building. This second dimension is used to separate the individual zones for

22 Figure 3.2: Single zone residential building.

Figure 3.3: Five zone commercial building. simplification of the model. Figure 3.3 shows the commercial multiple zone building, while the zones are referenced as the following numbers:

• Core zone = zone one

• East perimeter zone = zone two

• North perimeter zone = zone three

• West perimeter zone = zone four

23 • South perimeter zone = zone five

August is chosen for the training period because it is one of the hottest months of the year, and modeling cooling energy use is the main interest of this study. This training data set uses a controller for the model that sets back the temperature. The commercial building temperatures range from 22◦C to 26◦C during the following times of 20:00 hr. to 07:00 hr. June is chosen as the validation month for simulation because of the similar cooling centric profile. However, the temperature setpoint of the controller is set at a constant 20◦C for the entire two weeks of simulation. To improve the quality of the resulting ARX model, random perturbations are added to better define a correlation factor. These perturbations are determined by running a random number generator from 0 to 7. The resulting number represents the number of days a specific controller type is run before changing to another controller type. The random number is regenerated after the number of days from the previous case is met. The resulting perturbations are applied to both training and validation data sets to improve the accuracy of the model by developing a high correlation between internal temperature and energy usage. This model was run for all four cases; however, one slight change was made for the multiple zone building model which included an additional perturbation to the setback time change. These cases included: three inputs, six inputs, single zone, and multiple zone buildings. The occupancy was held constant between these four simulation cases and was based on the NREL House Simulation Protocols for the occupancy profile of a residential building [93]. The fidelity of the model is set at a 15-minute-long time-step or four time-steps per hour. This fidelity was purely arbitrary; the values chosen can vary from one to 60 time- steps per hour as dictated from EnergyPlus. Because EnergyPlus can simulate from one to 60 time-steps per hour, some models may need higher fidelity to properly model the correct energy use. The same high fidelity within the model may also be required for the reduced order model.

24 EnergyPlus generates the data used to develop ARX, NLARX, and ARMAX models. This process is co-simulated in Simulink using MLE+ [8]. MLE+ is an add-in block for Simulink with the capability to integrate EnergyPlus into Simulink for simulation configura- tion, controller design, simulation-based optimization controls, data analysis, building man- agement system interface, or for interfacing with the Matlab environment [9]. The MLE+ block is intended for implementing a simple or advanced controller. Therefore, a constant temperature and a setback control are attached when simulating the data for training and validation. Therefore, the MLE+ block in Figure 3.4 is connected to a demand response controller which can be turned into a constant temperature controller. There are two identi- cal residential or commercial buildings simulated in the Simulink program: the first building uses a setback controller and is simulated in August; the second building uses a constant controller while being simulated in June. Both include the perturbations to improve the temperature correlation for energy use. The difference in months is used to validate the effectiveness of the ROM to simulate the energy usage. The first building generates the training data, while the second building generates the validation data for the ARX least squares problem. Figure 3.4 shows the full Simulink model used. While Figure 3.5 shows a close up on the perturbation added to the system to create a closer model fit. Once Simulink produces all the data, an additional program script is run that:

1. Processes and compiles the data for training and validation.

2. Develops coefficients for each ROM (ARX, NLARX, and ARMAX).

3. Simulates the response of the ROM by using a 24-hour prediction horizon to represent the maximum forecasting response of an MPC.

4. Uses ASHRAE Guideline 14 to compare and determine the most accurate resulting model.

The investigated models include ARX, NLARX, and ARMAX which use the same base formulation. ARX models are made up of three core variables: the input (U), exogenous

25 Z-1

Z-1

Z-1

RandPertibationBlock

7

Constant1 Level-2 MATLAB S-Function [Time] In1 Cooling Setpoint flag [term_flag_1] [CoolTempTrn] In2 Out1 flag [Building] building_1 [HeatTemp] In3 Heating Setpoint Subsystem EnergyPlus > 0 input time Cosimulation time [Building_val] building_Val In1 Switch In2 Out1 In3 output E+ Outputs Out [Building] Subsystem3 Setpoints Case620_school Office Building 1 Signals Building 1 [Building] Power Scope

Z-1

Z-1 Temp Scope Z-1

Building 1 [Building_val] Power Scope1 RandPertibationBlock

7 Constant2 Level-2 MATLAB Temp Scope1 S-Function1

[Time] In1 Cooling Setpoint flag [term_flag_2] [CoolTempVal] In2 Out1 flag [HeatTemp] In3 Heating Setpoint [term_flag_1] Subsystem2 EnergyPlus > 0 input time Cosimulation time STOP In1 Switch1 [term_flag_2] In2 Out1 Stop Simulation In3 output E+ Outputs Logical Subsystem4 Out [Building_val] Setpoints Operator Case620_school_val Office Building 1 Signals1 t Clock [Time]

15 [HeatTemp] 22 [CoolTempTrn] 18 [CoolTempVal]

Heat Heat1 Heat2

Figure 3.4: System identification program used in Simulink.

input (e), and output (Y). Exogenous inputs are variables independent of the states of other variables and are calculated using Gaussian noise. The variables (¯a), (¯b), (¯c) constitute the tunable parameters shown in Equation (3.1). The subscript (i) represents the polynomial order of the input which is the amount of previous data used to predict(Y), while the subscript (j) represents the amount of inputs used in ROM. Linear ARX and ARMAX differ by the polynomial order of weighting factors for exogenous inputs (¯c). Linear ARX uses one time-step of exogenous input (e), while ARMAX uses a moving average version and can look at large amounts of exogenous data. Description of sets, parameters, and variables for reduced order model:

26 Z-1

Z-1

Z-1

RandPertibationBlock

7

Constant1 Level-2 MATLAB S-Function [Time] In1 Cooling Setpoint flag [term_flag_1] [CoolTempTrn] In2 Out1 flag [Building] building_1 [HeatTemp] In3 Heating Setpoint Subsystem EnergyPlus > 0 input time Cosimulation time [Building_val] building_Val In1 Switch In2 Out1 In3 output E+ Outputs Out [Building] Subsystem3 Setpoints Case620_school Office Building 1 Signals Building 1 [Building] Power Scope

Z-1

Z-1 Temp Scope Z-1

Building 1 [Building_val] Power Scope1 RandPertibationBlock

7 Constant2 Level-2 MATLAB Temp Scope1 S-Function1

[Time] In1 Cooling Setpoint flag [term_flag_2] [CoolTempVal] In2 Out1 flag [HeatTemp] In3 Heating Setpoint [term_flag_1] Subsystem2 EnergyPlus > 0 input time Cosimulation time STOP In1 Switch1 [term_flag_2] In2 Out1 Stop Simulation In3 output E+ Outputs Logical Subsystem4 Out [Building_val] Setpoints Operator Case620_school_val Office Building 1 Signals1 Figure 3.5: A zoomed version of system identification model building on addition of the t perturbation to system. Clock [Time]

(Indices and Sets:) 15 [HeatTemp] 22 [CoolTempTrn] 18 [CoolTempVal] Heat Heat1 Heat2

t ∈T The set of global time steps j ∈J The polynomial order set of weighting matrixa ¯ for ROM i1 ∈I1 The polynomial order set of weighting matrixa ¯ for ROM i2 ∈I2 The polynomial order set of weighting matrix ¯b for ROM i3 ∈I3 The polynomial order set of weighting matrixc ¯ for ROM

(Parameters and Variables:)

a¯i1 Weighting matrix for output at time t

¯bi2,j Weighting matrix for input at time t and input j

c¯i3 Weighting matrix for exogenous input at time t

Yt Output data for all time t

Ut,j Input data for all time t and input j

et Exogenous input data for all time t

27 Description of a single prediction horizon reduced order model equation in general sum- mation form:

¯ Yt = −a¯i1 · Yt−i1 + bi2,j · Ut−i2,j + c¯i3 · et−i3 (3.1) 1∈I1 j∈J 2∈I2 3∈I3 iX X iX iX The weighting factors and the polynomial order (number of previous times steps used predict the next time-step, e.g. three hours or 12 previous time-steps) of the inputs and outputs for Equation (3.1) are determined as follows:

1. Perform a parametric analysis that gradually increases to determine when the system becomes overfit. This is achieved by examining the statistics while increasing the polynomial order size; the model is increased until it no longer enhances the accuracy. The size of the model is a trade-off: a large model accurately fits the system; however, it typically solves very slowly. A small model solves quickly; however, the solution can contain inaccuracies. These inaccuracies are due to two sources of bias error because of incorrect assumptions, and variance error caused by noise in the system [51]. The amount of training data used for the parametric analysis is given as two weeks of input and output data; this is enough data that the solved system represents the physical response of the building.

2. Use MATLABs model identification functions to estimate the coefficients using ARX, NLARX, and ARMAX specific functions. Matlab solves the matrix set using QR factorization if the least squares problem is overdetermined. Otherwise, the problem is solved using least squares linear estimation [71]. The conditions for using the ARX model are small input disturbance dynamics. Otherwise, the ARMAX model uses multiple exogenous inputs based on Gaussian distributions to model the disturbance dynamics [41]. These disturbance dynamics are generated by noise on the sensors or even generated by undeclared identified variables. Nonlinear ARX (NLARX) is similar to the linear ARX but includes one of the following functions: wavelet network, sigmoidnet network, neural network, binary tree partition, or linear function. These

28 nonlinear estimators are represented as g(u) to correlate the input to output values.

ASHRAE Guideline 14 uses root mean squared error based on covariance (CV-RMSE) and the normalized mean biased error (NMBE). The CV-RMSE (Equation 3.2) is used to determine the amount of error between the ARX model and the EnergyPlus simulation data. The NMBE (Equation 3.3) is the statistic that states the overall bias of the resulting models prediction. These statistics are compared using the requirements given from the ASHRAE Guideline 14 [38], the RMSE ≤ 10% and the NMBE ≤ 30%. Description of variables for model statistics:

Yˆ t: Predicted output data from ROM for all time t

Yt: EnergyPlus simulated output data for all time t

Y¯ t: Average of ouput data for all time t N: Number of inputs to the reduced order model

Description of model statistics equations: (CV-RMSE)

2 (Yˆ t − Yt) RMSE = t∈T (3.2) card(Y ) sP t (NMBE)

(Yˆ t − Yt) NMBE = t∈T (3.3) (card(Y ) − N) ∗ Y¯ P t t 3.3 Selection of Input Parameters

Another important factor in developing an ROM is the correct number of inputs for accu- rately predicting the model. Correctly choosing the number of inputs is not an insignificant task; too few would not work, too many might overfit the model by developing correlations to random exogenous noise called overfitting data [20, 96]. Both three input and six input models are implemented in the previously described residential and commercial buildings when deriving the ROM. The set of three inputs includes: dry bulb outdoor air tempera-

29 ture (OAT-DB), indoor air temperature set-point (IAT-SP), and occupancy number (Occ). Modeling the indoor air temperature based on changing the set-point increases the model complexity; therefore, to simplify the complex nature of the model, this study assumes IAT- SP is equal to the indoor air temperature for the current time-step [22]. The reasons for the choice of the three selected variables are as follows: (OAT-DB) dry bulb temperature and weather are commonly monitored and predicted. (IAT-SP) Set-Point temperature has been chosen to reduce the complexity of the ARX. The indoor air temperature was also assumed to be close to the setpoint at all time-steps. Occupancy is selected because people tend to be habitual in their schedules and, therefore, the occupant’s schedule can be used for building control. The six input model additionally includes: relative humidity (RH), direct solar radiation normal to the building (-DN), and wind speed (WS).

3.3.1 ROM Development and Validation

Each model is simulated using the Simulink program described in Section 3.2. The resulting simulation generates the training and validation information used to train and validate the models. Each data set is used within the system identification script that calculates the linear ARX, linear ARMAX, and sigmoidnet-based nonlinear ARX function. Figure 3.6 and Figure 3.7 show the EnergyPlus output and the resulting predicted ROM using a 24-hour prediction horizon for four days of the training and validation data of the residential single zone building. A polynomial order parametric analysis was run on each weighted coefficient matrix to increase accuracy for the resulting model. The results of this parametric analysis indicate that the ideal order is 12 time-steps or three hours of data for the residential buildings. Because the linear model is fit to a nonlinear system, the initial positive jump is duplicated below creating a negative energy usage. To remove this nonlinearity, the output from ARX models is limited to positive values only using a linear constraint and auxiliary variable. Figure 3.8 and Figure 3.9 show the EnergyPlus, ARX, and ARMAX models for the first three days of the commercial building, primarily focusing on the core zone and southernmost

30 Training Data Energy Use Comparison y1 0.7

EnergyPlus ARMAX 0.6

0.5

0.4

0.3 Energy Use (kWh) 0.2

0.1

0 1.5 2 2.5 3 3.5 4 4.5 Days (days)

Figure 3.6: ARMAX ROM vs EnergyPlus comparison of single zone building.

Validation Data Energy Use Comparison y1 0.8

EnergyPlus 0.7 ARMAX

0.6

0.5

0.4

0.3

0.2

Energy Use (kWh) 0.1

0

-0.1

-0.2 1.5 2 2.5 3 3.5 4 4.5 Days (days)

Figure 3.7: ARMAX ROM vs EnergyPlus comparison of single zone building. zone, simulation data. Both the ARX and ARMAX models tightly fit the system, this is possibly due to more previous data being incorporated into the system. In contrast with the residential building, the polynomial order parametric analysis for the commercial building shows that larger than six hours of previous data no longer improved the quality of the

31 model, therefore, six hours of previous data is used for the ROM. The figures show two of the five zones in the commercial building. These areas are the core zone (one) and the southernmost perimeter zone (five).

Training Data Energy Use Comparison Training Data Energy Use Comparison y1 y1 4 4

EnergyPlus EnergyPlus 3.5 Linear ARMAX 3.5 Linear ARMAX Linear ARX Linear ARX

3 3

2.5 2.5

2 2

1.5 1.5 Energy Use (kWh) Energy Use (kWh)

1 1

0.5 0.5

0 0 1.5 2 2.5 3 3.5 4 4.5 1.5 2 2.5 3 3.5 4 4.5 Days (days) Days (days) (a) (b) Figure 3.8: ARX ROM vs EnergyPlus comparison of 5 zone building training data. Core zone is located on left and perimeter 4 zone located on right

Validation Data Energy Use Comparison Validation Data Energy Use Comparison y1 y1 4.5 4

EnergyPlus EnergyPlus 4 Linear ARMAX 3.5 Linear ARMAX Linear ARX Linear ARX 3.5 3

3 2.5

2.5 2

2 1.5

1.5 1

Energy Use (kWh) 1 Energy Use (kWh) 0.5

0.5 0

0 -0.5

-0.5 -1 1.5 2 2.5 3 3.5 4 4.5 1.5 2 2.5 3 3.5 4 4.5 Days (days) Days (days) (a) (b) Figure 3.9: ARX ROM vs EnergyPlus comparison of 5 zone building validation data. Core zone is located on left and perimeter 4 zone located on right

The resulting ROM models are compared using the ASHRAE guideline 14 statistical Equations 3.2 and 3.3. Table 3.1 and Table 3.2 show the results of the ARX models using the training and validation datasets for the residential and commercial buildings respectively. The green highlighted models meet the ASHRAE Guideline 14 for the validation data set.

32 For the single zone residential building, only some of the linear ARMAX models meet the requirements stated for building accuracy in the ASHRAE Guideline 14, while the linear ARX and nonlinear ARX models are very close to meeting the requirements. The commercial building, on the other hand, meets the standard for the validation data on all tested models including both three and six input trials. Therefore, the linear ARMAX model is the only model investigated able to meet the guideline standard for both single and multiple zone building types. The resulting ROMs solve quicker than the initial EnergyPlus models. The difference in solution time is such that the EnergyPlus model solves in approximately 20 seconds, where the ROM solves in around seven milliseconds. This increase in speed allows for faster optimization using the ROM than using EnergyPlus.

Table 3.1: 1-zone ROM solution statistics. 3 Inputs 3 Hours of Data Training Validation Zone Model Type CV-RMSE NMBE CV-RMSE NMBE 1 Linear ARX 12.88% -0.20% 10.21% 1.71% 1 NonLinear ARX 12.88% -0.08% 10.21% 9.18% 1 Linear ARMAX (2 Ts Delay) 12.81% 0.05% 10.15% -0.60% 1 Linear ARMAX (7 Ts Delay) 12.31% 0.01% 9.76% -1.34% 1 Linear ARMAX (12 Ts Delay) 12.26% 0.04% 9.72% 0.59% 6 Inputs 3 Hours of Data Training Validation Zone Model Type CV-RMSE NMBE CV-RMSE NMBE 1 Linear ARX 12.58% -0.15% 10.05% 1.71% 1 NonLinear ARX 12.58% -0.10% 10.05% 4.38% 1 Linear ARMAX (2 Ts Delay) 12.58% -0.13% 10.05% 0.85% 1 Linear ARMAX (7 Ts Delay) 11.94% -0.14% 9.53% 5.61% 1 Linear ARMAX (12 Ts Delay) 12.14% -0.05% 9.70% -1.98%

33 Table 3.2: 5-zone ROM solution statistics. (Note: all presented statistics meet the ASHRAE Guideline 14.)

3.4 Discussion

The simulation results shown in Table 3.1 and Table 3.2 for both the residential and commercial buildings show that ROM using ARX, NLARX, and ARMAX meet the ASHRAE Guideline 14 for the training data. As expected, the validation results did not fit as close as the training case. The residential building average statistics were around 1.71% for NMBE and 10.21% for CV-RMSE. However, the commercial building resulted in an average NMBE

34 of -7.23% and a CV-RMSE of 4.95%. Therefore, the chosen ARMAX models are able to generate predicted energy usage for weather and thermostat schedules. For the single-zone residential building, the ARMAX model (seven-time-step or larger exogenous input polynomial order) meet the requirements defined by ASHRAE. When com- paring the three input and six input single zone models, there was very little improvement gained from the addition of the three inputs. The results from the parametric analysis also indicate that solar radiation input within the residential building can be neglected. This is because the highest weighting factor for the 12 data points is in the order of magnitude of 1 ∗ 10−5. The other two additional inputs generated high correlation weighting factors and, therefore, cannot be ignored if higher accuracy is needed. In contrast with the residential building, all the black-box models met the accuracy requirements for the commercial building. With the inclusion of dual perturbations for each zone, a tighter fitting model is developed than with the addition of a single perturbation. This dual perturbation on the training set allows for a more accurate validation model than that generated via the training model. To compare the commercial and residential buildings, both the NMBE and CV-RMSE are analyzed. For the average statistics, the commercial validation NMBE is approximately 7% compared to the single zone ARX result of approximately 1%. The commercial CV-RMSE is approximately 5% as compared to the single zone result of 10%. The larger value resulting from NMBE is due to a higher complexity presented within the model, while the lower CV-RMSE indicates a smaller correlation concluded from random perturbations. These results agreed with a previous study [77] that looks in to residential buildings for understanding the robustness of ROMs.

3.5 Conclusion

This paper presents a system identification method for creating low input ROMs for single and multiple zone buildings. This study uses ASHRAE Guideline 14 to compare the ability of several black-box models with three and six inputs to predict energy use of a single zone residential building and multiple zone commercial building. The results showed that using

35 six inputs (indoor temperature setpoint, outdoor dry bulb temperature, occupancy, normal solar radiance, wind speed, and relative humidity) rather than three resulted in minor ac- curacy improvement, therefore three inputs (indoor temperature setpoint, outdoor dry bulb temperature, and occupancy) are used in this study. When comparing both models the sin- gle zone and multiple zone buildings the linear ARMAX model was the best overall modeling type. This linear ARMAX model is simple to design and implement in optimization-based controllers, making it an excellent choice for the MPC. The resulting ARX models can pro- duce the energy usage curve for both single and multiple zone buildings during the summer months. The ROMs reduce the solution time from approximately 20 seconds in EnergyPlus to approximately milliseconds. The speed improvements generated from ROMs allow for so- lutions within a time-step. This can be important in advanced optimization-based controls, such as the MPC that relies on a fast simulation speed.

36 CHAPTER 4 MODELING PLATFORM FOR BUILDING OPTIMIZATION-BASED CONTROL

Space conditioning for both residential and commercial buildings consumes approximately 35% of total energy generated, and drives summer peak demand in the United States. Model predictive controls (MPC) are one method of minimizing energy usage. MPCs operate by solving a set of optimization equations to minimize peak demand, total energy usage, or cost. However, MPCs require running hundreds to thousands of simulations, and require interac- tion between optimization and building energy simulation software. This paper develops a platform to rapidly model and simulate advanced building controllers for cooling setpoint control. The modeling platform is constructed using commercially available software for optimization (AMPL), and building energy simulations (EnergyPlus); the software is inte- grated within a commonly used coding language (Simulink). The designed co-simulation platform is able to successfully minimize cooling energy cost by 38% and energy use by 22% over constant temperature controllers for the scenarios we examine.

4.1 Introduction

Space conditioning makes up 35% of all electric energy usage while residential and com- mercial buildings use 75% of all electric energy produced [26]. As the population continues to grow, energy usage causes increased peak consumption; to counteract this increased con- sumption, buildings must reduce overall energy usage. Different ways of reducing the energy usage include the following: retrofit the buildings to a LEED or equivalent net zero standard, use of demand response controllers which reduce demand by delaying internal devices until off-peak times, and use of advanced building controls. One of the most cost effective ways to reduce the energy usage is by constructing advanced building controls, capable of using existing equipment along with active or passive energy storage [56].

37 These control strategies include learning thermostats, such as NEST [61], programmable thermostats, precooling, and advanced building controls. Precooling investigates lowering the building temperature to store thermal energy within the building prior to on-peak times, to passively store energy within the zone [6, 10, 12, 35, 36, 89]. Advanced building controls consist of various controls including: artificial neural networks (ANN), fuzzy logic controllers, model predictive controllers (MPC), as well as feedback and feed-forward controllers [28]. Each controller has its advantage; however, optimization controls or MPCs are especially suitable for complex systems with changing predictions due to the adaptability of the con- troller. These controllers operate by taking feedback signals from the environment, and then optimizing an objective function to determine the optimal response of the system to meet all of the constraining requirements. These constraining requirements can be weather predictions, thermal comfort, maximum peak energy usage, or other conditions [17, 21, 69]. Model predictive controllers optimize inputs to the building by solving a model of the system to predict the response. The controller operates on a discrete time horizon. The system predicts the response at every time-step. This result is based on two finite horizons: the control horizon and prediction horizon. The control horizon is the time the controller can optimize the inputs; the prediction horizon, however, is the total amount of time predicted for the controller. Figure 4.1 shows the overall receding horizon control including the control and prediction horizons. The inputs to the optimization controller can be either deterministic or stochastic. The deterministic controllers have the assumption of zero error on input signals, while stochastic controllers assume that there is an error on the inputs prediction. Deterministic model pre- dictive controllers (DMPCs) are the simplest MPC controllers; they can generate the highest possible results due to the accuracy of the inputs. Stochastic model predictive controllers (SMPCs) use statistical functions on the inputs to produce the most likely predictions allow- ing for better results than the original data. SMPCs respond better to actual data because the assumption of zero error is not valid in experimental data. However, DMPCs are better

38 Δt{ Δt{

Solved at Time 0 24 hr

Solved at Time 1 24 hr + Δt

Solved at Time 2 24 hr + 2* Δt

Receding Horizon Control loop at t Receding Horizon Control loop at t+1 Past Future Past Future

Prediction Horizon Control Horizon { { Δt t+1 t+m t+k Δt t+2 t+1+m t+1+k t t+1

KEY

Known Input (u) Known State (x) Predicted Input (ū) Predicted State (x)

Figure 4.1: Represents the receding horizon for MPC over two timesteps. at rapid development and gathering concepts. This paper discusses the development of a DMPC for single zone residential buildings, referenced purely as MPC within this article. To model MPCs and other advanced controls, researchers have developed co-simulation environments to allow for simulation of both the control and response of the virtual building [9, 80, 91, 92, 97]. Wetter created a co-simulation environment that links EnergyPlus to other programs via a Java interface called building control virtual test bed (BCVTB). The Java interface is based on the Ptolemy II software framework [75]. Sagerschnig used BCVTB to couple TRNSYS with MATLAB for building control design and simulation within the Ptolemy interface [80]. Bernal created a program called MATLAB EnergyPlus interface (MLE+) [9]; MLE+ is a similar program to BCVTB; however, instead of the Java interface, it reduces the number of programs needed by using Simulink as the interface software. Others have created text-based co-simulation environments for the integration of AMPL and EnergyPlus to simulate model predictive controls [97]. AMPL is a mathematical-based language for optimization that uses commercial grade solvers. All of these co-simulation programs can simulate a building energy program and advanced controllers. However, the

39 optimization solvers built into Matlab are limited. Therefore, nonlinear or mixed integer MPC problems are difficult to define and run. To reduce this difficulty, the AMPL API is used to integrate AMPL to the Simulink environment [4]. This paper describes the development of a co-simulation environment using AMPL, Simulink, a black-box reduce order model, and EnergyPlus to increase the speed at which MPCs and other optimization problems can be solved. The paper also discusses nine case studies for a residential home under different electric rates to test the simulation environment.

4.2 Prototyping Platform Development

To build and test MPCs using EnergyPlus, a co-simulation platform needs to be con- structed in a commonly-used programming language. MATLAB and Simulink are commonly utilized in the engineering field for controller design. MATLAB has basic MPC and opti- mization solving capability. However, problems for the MPC and optimization solution are limited to linear programs due to long solution times for complex problems. Commercial optimization solvers can be used to overcome the solution time issue because they apply heuristics, increasing the tractability of the problem. TOMLAB Optimization is a program that allows for commercial solvers to be employed in MATLAB. However, the optimization program must be entered in standard optimization form and can be overly complex [87]. AMPL and GAMS use commercial solvers and also allow for problems to be programmed in high-level algebraic form making formulation and solutions quicker [4, 33]. These algebraic- based optimization programs are commonly used to solve large problems. AMPL has created an API that integrates the language into C++, Java, Python, and MATLAB. This integra- tion allows for many more possibilities than the standard text-based interface. Figure 4.2 shows the prototyping platforms control loop. To use AMPL, the MPC model, objective function, and constraints need to be defined in a high-level algebraic form. AMPL uses this algebraic form and compiles the program into the standard optimization form for solving. Because the program handles the conversion, it does not have to be done by hand allowing for faster development of the optimization model.

40 Current and Past Conditions

MV Start Terminate Control Control MPC: AMPL PLANT: Day Ahead Information EnergyPlus via MLE+

Weather Real Time Data Priceing

Figure 4.2: MPC Modeling Environment Control Loop.

The AMPL optimization language can use a few different solvers, such as CPLEX, Gurobi, BARON, KNITRO, SNOPT, and MINOS [7, 25, 39, 46, 57, 58, 83]. Each solver is designed to handle a different type of optimization problem. For example, Gurobi and CPLEX can solve linear and mixed integer problems, while BARON and KNITRO are nonlinear solvers. Because solvers are specific to problem type, they can solve faster than the standard global search algorithms used by the MATLAB nonlinear solvers. The use of AMPL in MATLAB requires a MATLAB level 2 S-function and the AMPL API. Figure 4.3 shows S-function implementation in MATLAB, the S-function performs the following operations:

• Opens an AMPL class, and closes it after successful completion to reduce use of licenses.

• Loads the latest values of the parameters into the model.

• Solves the optimization problem.

41 • Sends the resulting output into MLE+ to simulate the response of the plant for next time-step.

22 [CoolingTemp] Building1_MPC 24 [CoolingTempinit] Building 1 -1 [Building1_Mux] Z CoolSP CoolSPinit Power Scope1 Delay PredHor [PredictionHorizon_Var] -1 [HeatingTemp]

[Time] > 21600 PredHor HeatSP [term_flag_1_MPC] STOP Switch [CoolingTempinit] Stop Simulation flag [term_flag_1_MPC] flag [HeatingTemp] Building1_MPC building_1_mpc [PredictionHorizon_Var] EnergyPlus input time Cosimulation time Home DR Settings 4.329e+05 t [Time] Time output E+ Outputs Building1_MPC > 9 Out Setpoints Clock [Time] [CoolingTemp] CoolingTemp Tempreture_Array Switch1 Build_MPC Office Building 1 Signals1 [HeatingTemp] HeatingTemp building_1_SP_Use DR Control Subsystem

Run MPC

[PredictionHorizon_Var] PH Out

Building1_MPC AmplSFun

[Time] building_1_SP_mux Ampl S function [Building1_Mux] [HeatingTemp]

Figure 4.3: Simulink interface with MLE+ and AMPL S-function for simulation of the MPC.

4.3 Case study EnergyPlus Model

The following case study tests the developed MPC framework using a single-zone res- idential building. The residential building represents a newly constructed 2500ft2 home located in Austin, Texas. Figure 4.4 shows the building structure. The specifications for the new construction are set by the NREL house simulation protocols which follow the 2009 International Energy Conservation Code (IECC) and federal appliance standards [93]. The building uses an occupancy profile defined in the NREL house simulation protocols with a slight modification: it reduces the mid-day occupancy from a small fraction to zero. The change allows the controller to determine when the building is occupied or empty. The first week of the month of July is the simulation period for the building. July is a high demand cooling month for Austin, Texas. The building location is a suburban setting with identical buildings located ten feet to the north and south sides. The weather data file used in the

42 simulation is the Austin municipal airport TMY3 data file. The programs used within the prototyping platform include EnergyPlus, MLE+, and AMPL API. The program versions were selected based on compatibility. These versions include the following: MLE+ version 0.2.1 which works with EnergyPlus versions up to 8.1, and AMPL API 1.2.2 which is the latest version at this time of writing. The ROM and MPC models were constructed using a 15-minute time-step or four time-steps per hour. This time-step was arbitrarily chosen from the acceptable EnergyPlus time-steps of one to 60 per hour.

Figure 4.4: Single zone residential building.

4.4 Reduced Order Model

Model predictive controls solve optimization problems, including objective functions and constraints, to determine optimal inputs; these formulations can take thousands of iterations to solve. If a model were to rely on a building energy simulation program such as EnergyPlus or TRNSYS the optimization solution time would become infeasible. This infeasibility is due

43 to the warmup period, and the solution of a single day model taking approximately 20 or more seconds [22]. To quickly solve the optimization model, either grey-box or black-box reduced order models (ROMs) are used on MPCs for calculating cooling energy usage. A previously conducted study compared several black-box models for single and multiple zone buildings, and found that ARMAX models with a two or more time-step delay on exogenous inputs meets the ASHRAE Guideline 14 for all cases. Equation (4.1) shows basic formulation of an ARX or ARMAX model used in the development of the ROM in Chapter 3. The models include weighting factors on inputs, outputs, and exogenous inputs for simulation of the building energy usage. Description of sets, parameters, and variables for reduced order model: (Indices and Sets:)

t ∈T The set of global time-steps j ∈J The polynomial order set of weighting matrixa ¯ for ROM i1 ∈I1 The polynomial order set of weighting matrixa ¯ for ROM i2 ∈I2 The polynomial order set of weighting matrix ¯b for ROM i3 ∈I3 The polynomial order set of weighting matrixc ¯ for ROM

(Parameters and Variables:)

a¯i1 Weighting matrix for output at time t

¯bi2,j Weighting matrix for input at time t

c¯i3 Weighting matrix for exogenous input at time t

Yt Output data for all time t

Ut Input data for all time t

et Exogenous input data for all time t

Description of a single prediction horizon reduced order model equation in general sum- mation form:

¯ Yt = −a¯i1 · Yt−i1 + bi2,j · Ut−i2,j + c¯i3 · et−i3 (4.1) 1∈I1 j∈J 2∈I2 3∈I3 iX X iX iX

44 4.5 MPC Optimization Model

The purpose of advanced controls on buildings is to maintain the thermal comfort of the zones while reducing the cost and energy consumption of the building. The developed MPC is structured around minimizing the cost of energy usage by optimizing the temper- ature set-point to maintain thermal comfort. The MPC includes parameters for weather, electric rate, prediction horizon, occupancy, temperature bounds, desired temperature, and weighting factors for ROMs. The parameters are assumed to be deterministic. The actual data for day ahead market pricing (DAMP) is pulled from the Electric Reliability Council of Texas (ERCOT), while both time-of-use data sets (TOU, EZ3) data are taken from the Phoenix Salt River Project (SRP); these make up the energy cost profiles [29, 84]. The energy cost data sets are assumed to be constant for multiple days. The model includes only continuous variables. These include the set-point temperature, energy usage, and four auxiliary variables. The auxiliary variables are used for the linearization of equations that create nonlinear functions. A binary parameter determines the zone occupancy by looking at the habitation schedule. If the zone is occupied, a deviation from the desired temperature is penalized. This penalty will only allow deviations from the desired room temperature when the energy savings is more cost effective. The objective of the model is to minimize the cost generated from building air condition- ing. The total cost used in the objective function includes the operational electric energy prediction for DAMP, TOU, and EZ3 energy costs, a cost to change temperature due to thermal discomfort, and a cost for deviation from the customers desired temperature. The model constraints include:

• The ROM (Equation 4.3)

• The linearization of the nonlinear variables (Equation 4.4, 4.5, 4.6)

• The occupancy constraint on auxiliary variable Xt (Equation 4.7)

• The thermal comfort tightening constraints (Equation 4.8)

45 • The maximum and minimum amount of energy per time-step (Equation 4.9)

• The non-negativity constraints for the auxiliary variables (Equation 4.10, 4.11, 4.12, 4.13)

The zone temperature set-point is constrained by limiting upper and lower bounds when the zone is occupied, causing the temperatures to be within the thermal comfort range. The occupancy constraint is preprocessed from anticipated occupancy measurements, creating a binary parameter. The binary parameter is used to preprocess the upper and lower bounds, as shown in the parameters subsection of the formulation, for each optimization run. For example, when the building is unoccupied the upper bound is set at 30◦C; however, when the zone becomes occupied, the temperature drops 5◦C to 25◦C.

4.5.1 Mathematical Formulation of the MPC Model

The mathematical formulation presented below will be referred to as the control function

(Zt). The problem will use lowercase letters and uppercase letters to describe the determin- istic parameters; bold upper case letters are for variables. Subscripts are used to identify indices or changes in a set, and the subscripts are used for further description of parameters and variables. The subscripts should be read such that Yt+k is the predicted energy usage at

time t + k predicted from time-step t where the current output is represented as Yt = Y(t). Indices and Sets:

t ∈T The set of global time-steps k ∈K The set of time-steps encompassing the prediction horizon ia ∈Ia The polynomial order set of weighting matrixa ¯ for ROM b1 b1 i ∈I The polynomial order set of weighting matrix ¯b1 for ROM b2 b2 i ∈I The polynomial order set of weighting matrix ¯b2 for ROM b3 b3 i ∈I The polynomial order set of weighting matrix ¯b3 for ROM ic ∈Ic The polynomial order set of weighting matrixc ¯ for ROM

Parameters: (ROM)

46 a¯ Weighting matrix for output at time-step ia ∈Ia (-) b1 b1 ◦ ¯b1 Weighting matrix for input 1 at time-step i ∈I (kWh/ C) b2 b2 ◦ ¯b2 Weighting matrix for input 2 at time-step i ∈I (kWh/ C) b3 b3 ¯b3 Weighting matrix for input 3 at time-step i ∈I (kWh/people) c¯ Weighting matrix for filter at time-step ic ∈Ic (-) e White gaussian noise defined by variance with a mean of 0 (kWh)

(Temperature Constraint)

lbt+k Indoor air temperature set point lower bound for time-step t to time-step t + k (◦C) lbU Indoor air temperature set point lower bound when unoccupied (◦C) lbO Indoor air temperature set point lower bound shift when occupied (◦C)

ubt+k Indoor air temperature set point upper bound for time-step t to time-step t + k (◦C) ubU Indoor air temperature set point upper bound when unoccupied (◦C) ubO Indoor air temperature set point upper bound shift when occupied (◦C)

(General)

pt+k Preprocessed parameter of 1 if zone is occupied, 0 otherwise for time-step t to time-step t + k (Binary) p′ Penalty value for occupancy scaling ($/◦C) p′′ Penalty based on change in temperature ($/◦C) rt+k Charge rate for energy for time-step t to time-step t + k ($/kWh) ′ ◦ Tt+k Outdoor dry bulb air temperature for time-step t to time-step t + k ( C) ′′ ◦ Tt+k Desired indoor air temperature for time-step t to time-step t + k ( C)

Ct+k Number of people located in a zone for time-step t to time-step t + k (People)

Below are formulations to describe the upper and lower bounds for temperature. (Thermal Comfort Tightening Formulations)

47 U O ubt+k = ub + ub · pt+k ∀t ∈T ,k ∈K U O lbt+k = lb + lb · pt+k ∀t ∈T ,k ∈K

Variables:

◦ Tt+k Set point temperature for time-step t to time-step t + k ( C)

Yt+k Energy usage for time-step t to time-step t + k (kWh) ′ Yt+k Auxiliary variable for removing negative values from energy usage for time-step t to time-step t + k (kWh)

Zt+k Auxiliary variable deviation of temperature for time-step t time-step t + k (◦C)

Wt+k Auxiliary variable desired temperature for time-step t time-step t + k (◦C)

Xt+k Auxiliary variable used to generate peacewise deviation from desired temperature for time-step t to time-step t + k (-)

Optimization Function:

′ ′ ′′ Zt = min[ rt+k · Yt+k + p · Xt+k + p · Zt+k] (4.2) k∈K X Subject To: (ROM)

′ a a ¯ ¯ Yt+k = −a¯i · Yt+k−i + b1,ib1 · Tt+k−ib1 + b2,ib2 · Tt+k−ib2 ia∈Ia ib1∈Ib1 ib2∈Ib2 X X X (4.3) ¯ c c + b3,ib3 · Ct+k−ib3 + c¯i · et+k−i ∀t ∈T ,k ∈K b3∈Ib3 ic∈Ic i X X (Linearity)

Yt+k ≤ Yt+k ∀t ∈T ,k ∈K (4.4) ′′ − Wt+k ≤ Tt+k − Tt+k ≤ Wt+k ∀t ∈T ,k ∈K (4.5)

− Zt+k ≤ Tt+k+1 − Tt+k ≤ Zt+k ∀t ∈T ,k ∈K (4.6)

(Occupancy)

Xt+k = pt+k · Wt+k ∀t ∈T ,k ∈K (4.7)

48 (Non-negativity, Upper and Lower Bounds)

lbt+k ≤ Tt+k ≤ ubt+k ∀t ∈T ,k ∈K (4.8) min max Y ≤ Yt+k ≤ Y ∀t ∈T ,k ∈K (4.9) ′ 0 ≤ Yt+k ∀t ∈T ,k ∈K (4.10)

0 ≤ Zt+k ∀t ∈T ,k ∈K (4.11)

0 ≤ Wt+k ∀t ∈T ,k ∈K (4.12)

0 ≤ Xt+k ∀t ∈T ,k ∈K (4.13)

4.6 Simulation and Results

To determine the MPC the following tests are conducted: a prediction horizon parametric analysis and a simulation of the MPC with two different cost profiles. For these simulations, the chosen solver is CPLEX 12.6 within the AMPL environment. The solver is capable of evaluating linear and quadratic optimization problems for both continuous (LP) and mixed integer programs (MILP). IBMs CPLEX is the most commonly used solver for large-scale problems with up to millions of variables and constraints able to be solved, because it is able to maintain numerical stability while using heuristics [25]. The following two tests are conducted using three pricing schemes. These include day ahead market price or DAMP from Austin, Texas, as well as time-of-use data including an 13:00-20:00 hr. on-peak time defined as TOU, and a 15:00-18:00 hr. on-peak time defined as EZ3. Figure 4.5 shows occupancy and the three electricity cost profiles used in this study for a 24-hour period. The energy cost is assumed the same for each day the MPC simulation is ran.

4.6.1 Prediction Horizon Parametric Analysis

To determine the prediction horizon, an initial parametric analysis is conducted using the DAMP electrical pricing structure. This study solves the MPC by using a 2-hour prediction horizon while slowly increasing it one hour at a time to 24-hours; the 24-hour prediction horizon is the largest time that the ROM has been validated for. To calculate the cost savings, the generated solutions for all prediction horizons are compared to the baseline constant temperature controller. The resulting cost savings is used to determine the optimal

49 Occupancy vs Hourly Energy Costs 10 0.35 DAMP TOU 9 EZ3 0.3 Occupancy 8

7 0.25 6 0.2 5

0.15

Cost($/kWH) 4 Occupancy (#) Occupancy

3 0.1 2 0.05 1

0 0 0 2 4 6 8 10 12 14 16 18 20 22 0 Simulation Time (h)

Figure 4.5: Comparison plot indicating the price profile for either DAMP, TOU, or EZ3 vs. occupancy used within the MPC study prediction horizon. Table 4.1 shows the temperature setpoint results from the parametric analysis study. These values are compiled by taking the results for each time-step and averaging the values within each hour. The values represented in Table 4.1 are color-coded, such that cooler times are represented as green and red represents hotter temperature set- points. Figure 4.6 summarizes the results by plotting cost and energy savings vs. prediction horizon. The prediction horizon parametric analysis compares the cost savings generated from the MPC solution with the length of the prediction horizon used in the optimization forecast. Both the prediction horizon and control horizon are assumed to be the same length. Fig- ure 4.6 shows nine hours of prediction to be optimal, as larger prediction horizons no longer improve the cost savings from the initial decrease. The decrease in cost savings are due to the MPC determining when the occupants desired temperature is obtainable with minimal loss of savings; shorter time-steps produce higher savings because the MPC maintains the maximum temperature (25◦C or 30◦C) for a longer time. These results agree with a similar

50 Table 4.1: Table showing the effect of prediction horizon on optimal temperature set-points. Prediction Horizon 2 3 4 5 6 7 8 9 10 11 12 13 1 25.0 25.0 25.0 24.3 22.0 22.0 22.0 22.0 22.0 22.0 22.0 22.0 2 25.0 25.0 25.0 23.2 23.5 23.3 23.3 23.3 23.3 23.3 23.3 23.3 3 25.0 25.0 22.0 22.3 22.5 22.7 22.7 22.7 22.7 22.7 22.7 22.7 4 25.0 25.0 22.0 24.1 24.4 24.0 24.0 24.0 24.0 24.0 24.0 24.0 5 25.0 25.0 24.9 24.8 25.0 24.7 24.7 24.7 24.7 24.7 24.7 24.7 6 25.0 25.0 25.0 24.9 24.9 24.8 24.8 24.8 24.8 24.8 24.8 24.8 7 25.0 25.0 24.9 24.8 24.8 24.7 24.7 24.7 24.7 24.7 24.7 24.7 8 24.9 24.9 24.8 24.7 24.8 24.7 24.7 24.7 24.7 24.7 24.7 24.7 9 25.0 25.0 24.9 24.9 24.9 24.9 24.9 24.8 24.2 24.2 24.2 24.2 10 25.1 25.1 25.0 25.0 25.0 25.0 25.0 24.8 24.4 24.4 24.4 24.4 11 25.5 25.5 25.0 25.0 24.9 24.9 24.9 24.9 24.7 24.7 24.7 24.7 12 26.0 26.0 25.4 25.5 25.4 25.3 25.3 25.4 25.1 25.1 25.1 25.1

Time 13 26.4 26.4 25.9 25.9 25.8 25.8 25.8 25.8 25.6 25.6 25.6 25.6 14 27.0 27.0 26.6 26.6 26.5 26.5 26.5 26.5 26.3 26.3 26.3 26.3 15 27.9 27.9 27.5 27.5 27.4 27.3 27.3 27.4 27.2 27.2 27.2 27.2 16 27.4 27.4 27.2 27.2 27.1 27.1 27.1 27.1 27.0 27.0 27.0 27.0 17 25.0 25.0 25.0 25.0 25.0 25.0 25.0 25.0 25.0 25.0 25.0 25.0 18 25.0 25.0 25.0 25.0 25.0 25.0 25.0 25.0 25.0 25.0 25.0 25.0 19 25.0 25.0 25.0 25.0 25.0 25.0 25.0 25.0 25.0 25.0 25.0 25.0 20 25.0 25.0 25.0 25.0 25.0 25.0 25.0 25.0 25.0 25.0 25.0 25.0 21 25.0 25.0 25.0 25.0 25.0 25.0 25.0 25.0 25.0 25.0 25.0 25.0 22 25.0 25.0 25.0 25.0 25.0 22.0 22.0 22.0 22.0 22.0 22.0 22.0 23 25.0 25.0 25.0 25.0 25.0 25.0 25.0 25.0 25.0 25.0 25.0 25.0 24 25.0 25.0 25.0 22.0 22.0 22.0 22.0 22.0 22.0 22.0 22.0 22.0

Percent Savings vs Prediction Horizon 50 Cost Savings Energy Savings 45

40

35

30

Percent Savings (%) Savings Percent 25

20

15 0 5 10 15 20 25 Prediction Horizon (h)

Figure 4.6: Plot of the prediction horizon parametric analysis showing cost savings and energy savings vs prediction horizon.

51 study conducted by Cole [21].

4.6.2 MPC Simulation

Three different energy cost profile studies are conducted to show the capability of the MPC co-simulation environment:

1. The first test simulates the MPC using the DAMP energy cost profile from the ERCOT utility company. This test shows the results for a complex energy pricing system.

2. The second test simulates the MPC using a TOU profile as defined from the SRP utility company. This test shows the results for a simple energy pricing system.

3. The third test simulates the MPC using a EZ3 profile as defined from the SRP utility company. This test shows the results for a common simple energy pricing profile.

The MPC is run for four days of simulation, while the results are only shown for 48 hours and the statistics are calculated for only 24 hours. With the optimal prediction horizon defined, MPC results were compared to three different controller types. The first type is a constant controller that maintains a 22◦C indoor air temperature (IAT). The second type is a setback controller that maintains a 22◦C from 1:00-9:00 hr., and 17:00-24:00 hr. while, the IAT is setback to 27◦C from 9:00-17:00 hr. While the last is a precool controller that reduces the normal operating temperature of 22◦C to 19◦C for 8:00-13:00 hr. to precool the zone, before increasing the temperature to 24◦C from 13:00-20:00 hr. allowing for the use of the stored energy to be consumed, last the IAT is returned to the standard operating temperature. The precool control is defined as a simple controller, determined and optimized using BEopt.

4.6.2.1 Day Ahead Market Price (DAMP) Simulation Results

Figure 4.7 and Figure 4.8 show Indoor Air Temperature (solid line), Temperature set- point (dashed line) for the ERCOT data. Figure 4.7 shows the MPC results compared to a

52 constant temperature baseline controller. Figure 4.8 shows the MPC resulting temperature compared to the baseline setback control. These figures also show the occupancy profile for the 48 hours of control using the DAMP cost profile to better understand how the temperature profile changes when the building becomes unoccupied.

Temperature (Comparison) 40 20 Baseline IAT Baseline TSP MPC IAT MPC TSP OAT Occupancy 18

35 16

14

30 12 10

Temp(C) 8

25 Occupancy (#) Occupancy 6

4 20 2

0 15 0 4 8 12 16 20 0 4 8 12 16 20 0 Simulation Time (h)

Figure 4.7: Temperature comparison for the MPC and a baseline, constant temperature, controller. Both are based on DAMP pricing with Indoor Air Temperature (IAT), set-point temperature (TSP), Outdoor Air Temperature (OAT), and Occupancy.

Figure 4.9 and Figure 4.10 show the energy usage profile for the 48-hour time period along with the DAMP electricity cost at each time-step for the two baseline cases, constant control and setback control, as well as for the MPC controller. Figure 4.9 shows the energy consumption resulting from the temperature profile in Figure 4.7; the same goes for Fig- ure 4.10 with Figure 4.8. The energy profile spikes when the temperature is decreased and reduces to zero when increased. If the temperature is held constant, then the profile trails the outdoor air temperature by approximately one half hour.

53 Temperature (Comparison) 40 20 Baseline IAT Baseline TSP MPC IAT MPC TSP OAT Occupancy 18

35 16

14

30 12 10

Temp(C) 8

25 Occupancy (#) Occupancy 6

4 20 2

0 15 0 4 8 12 16 20 0 4 8 12 16 20 0 Simulation Time (h)

Figure 4.8: Temperature comparison for the MPC and a baseline, temperature setback, controller. Both are based on DAMP pricing with Indoor Air Temperature (IAT), set-point temperature (TSP), Outdoor Air Temperature (OAT), and Occupancy.

Electricity Consumption (Comparison) 0.45 Baseline Control MPC Electricty Cost 1 0.4 0.9 0.35 0.8

0.7 0.3

0.6 0.25

0.5 0.2 0.4

0.15 Electricty Cost ($/kWH) Cost Electricty

Electrical Demand (kWH) Demand Electrical 0.3 0.1 0.2

0.1 0.05

0 0 0 4 8 12 16 20 0 4 8 12 16 20 0 Simulation Time (h)

Figure 4.9: Electrical consumption results from the temperature comparison plots for the MPC and a constant temperature control based on DAMP pricing

54 Electricity Consumption (Comparison) 0.45 Baseline Control MPC Electricty Cost 0.4 1 0.35

0.8 0.3

0.25 0.6 0.2

0.4 0.15

Electricty Cost ($/kWH) Cost Electricty Electrical Demand (kWH) Demand Electrical 0.1 0.2 0.05

0 0 0 4 8 12 16 20 0 4 8 12 16 20 0 Simulation Time (h)

Figure 4.10: Electrical consumption results from the temperature comparison plots for the MPC and a temperature setback control based on DAMP pricing

4.6.2.2 Time-of-use (TOU) Simulation Results

Figure 4.11 and Figure 4.12 show Indoor Air Temperature (solid line) and temperature set-point (dashed line). These figures show the results for the simulation of the MPC using a TOU electricity pricing scheme. The plots in Figure 4.11 and Figure 4.12 show the sys- tem response to the same weather file, occupancy data and temperature constraints as the previous study. Figure 4.11 compares the MPC results to a constant baseline temperature, while Figure 4.12 compares the same results to a setback controller. Figure 4.13 and Figure 4.14 show the energy usage for the MPC and baseline cases when applying a TOU price profile. The figures show the MPC profile energy use which almost completely removes energy usage when the cost is increased during on-peak times. The setback control (Figure 4.14) helped to remove energy earlier in the day; however, on-peak prices extend beyond the time the building becomes reoccupied.

55 Temperature (Comparison) 40 20 Baseline IAT Baseline TSP MPC IAT MPC TSP OAT Occupancy 18

35 16

14

30 12 10

Temp(C) 8

25 Occupancy (#) Occupancy 6

4 20 2

0 15 0 4 8 12 16 20 0 4 8 12 16 20 0 Simulation Time (h)

Figure 4.11: Temperature comparison for the MPC and a baseline, constant temperature, controller. Both are based on TOU pricing with Indoor Air Temperature (IAT), set-point temperature (TSP), Outdoor Air Temperature (OAT), and Occupancy.

Temperature (Comparison) 40 20 Baseline IAT Baseline TSP MPC IAT MPC TSP OAT Occupancy 18

35 16

14

30 12 10

Temp(C) 8

25 Occupancy (#) Occupancy 6

4 20 2

0 15 0 4 8 12 16 20 0 4 8 12 16 20 0 Simulation Time (h)

Figure 4.12: Temperature comparison for the MPC and a baseline, temperature setback, controller. Both are based on TOU pricing with Indoor Air Temperature (IAT), set-point temperature (TSP), Outdoor Air Temperature (OAT), and Occupancy.

56 Electricity Consumption (Comparison) 0.45 1.2 Baseline Control MPC Electricty Cost

0.4 1 0.35

0.8 0.3

0.25 0.6 0.2

0.4 0.15

Electricty Cost ($/kWH) Cost Electricty Electrical Demand (kWH) Demand Electrical 0.1 0.2 0.05

0 0 0 4 8 12 16 20 0 4 8 12 16 20 0 Simulation Time (h)

Figure 4.13: Electrical consumption results from the temperature comparison plots for the MPC and a constant temperature control based on TOU pricing

Electricity Consumption (Comparison)

Baseline Control MPC Electricty Cost 0.45 1.2 0.4

1 0.35

0.3 0.8

0.25 0.6 0.2

0.4 0.15

Electricty Cost ($/kWH) Cost Electricty Electrical Demand (kWH) Demand Electrical 0.1 0.2 0.05

0 0 0 4 8 12 16 20 0 4 8 12 16 20 0 Simulation Time (h)

Figure 4.14: Electrical consumption results from the temperature comparison plots for the MPC and a temperature setback control based on TOU pricing

57 4.6.2.3 Time-of-use (EZ3) Simulation Results

Figure 4.15 is the last figure shown depicting the MPC temperature output, the figure also shows the precool strategy that it is compared against. Figure 4.16 shows the resulting energy usage for the precool controller and MPC applied for the precool controller strategy. The resulting figure shows that the MPC still only precools for four hours shifting the load directly before and after the on peak time.

Temperature (Comparison) 40 20 Baseline IAT Baseline TSP MPC IAT MPC TSP OAT Occupancy 18

35 16

14

30 12 10

Temp(C) 8

25 Occupancy (#) Occupancy 6

4 20 2

0 15 0 4 8 12 16 20 0 4 8 12 16 20 0 Simulation Time (h)

Figure 4.15: Temperature comparison for the MPC and a baseline precool controller. Both are based on the EZ3 pricing with Indoor Air Temperature (IAT), set-point temperature (TSP), Outdoor Air Temperature (OAT), and Occupancy.

4.6.2.4 Energy and Cost Savings Results

Table 4.2 lists the theoretical energy, costs, and savings generated for one day from the MPC when compared to the baseline controller cases. The table is separated into energy usage calculated from the co-simulation platform, and the cost generated from the energy usage for each controller type and energy cost profile (DAMP, TOU, and EZ3). The setback, constant temperature, and precool controllers generate the same energy usage for both cost

58 Electricity Consumption (Comparison) 0.6 Baseline Control MPC Electricty Cost 1.2

0.5 1

0.4 0.8

0.3 0.6

0.2

0.4

Electricty Cost ($/kWH) Cost Electricty Electrical Demand (kWH) Demand Electrical

0.2 0.1

0 0 0 4 8 12 16 20 0 4 8 12 16 20 0 Simulation Time (h)

Figure 4.16: Electrical consumption results from the temperature comparison plots for the MPC and the simple precool controller based on the EZ3 pricing profiles, however, not the same cost. Not all experimental runs shown in Table 4.2 have included figures.

Table 4.2: Energy and Cost Savings Generated using the model predictive controller when compared to the three baseline cases.

59 4.7 Discussion

Using a prediction horizon of nine hours, the MPC results for the DAMP indicate that the controller is capable of reducing the energy consumption and cost, while maintaining temperatures within the comfort range. Figure 4.7 to Figure 4.15 show the baseline controller temperature profiles (blue lines), along with the MPC temperature responses (red lines). The MPC temperature profile indicates that it precools the zone to the desired temperature between 2:00 hr. and 8:00 hr. The precooling then allows for passive thermal energy to be stored within the zone, the temperature is then raised at 8:00 hr. reducing the energy usage to zero during the highest cost or peak demand times. However, for the baseline, constant temperature, controller the energy usage profile follows the outdoor air temperature. Therefore, the outdoor air temperature causes the maximum energy peak during the most expensive parts of the day. This peak allows for the highest energy cost savings to occur during these mid-day hours. Because of this, when comparing the MPC to the constant temperature controller and the setback controller, the savings are larger in the constant temperature profile. The savings disparity is due to a shift in energy usage caused by the residential building becoming unoccupied; however, when the owner gets home, the setback controller decreases the temperature to 22◦C and the energy usage increases during an on- peak time. The MPC based on TOU electrical rates effectively reduced the energy usage and cost for the constant temperature controller; whereas the energy cost was reduced for the setback controller, but energy usage was higher. The energy cost savings for the comparison against constant controls is similar to the predicted energy usage from other studies [15, 22, 50]. The system generates a precooling strategy for the TOU pricing scheme that minimizes the energy usage during peak hours; the temperature is decreased in a method to minimize the energy spikes, while obtaining the minimum temperature allowed. The temperature increases until a few hours before the electrical cost increase when the temperature is reduced to store thermal energy in the zone. Then the temperature is raised when the electrical price

60 increases, thereby, reducing the energy consumption to zero for most of the on-peak time. Lastly the MPC response generated from the EZ3 data set resulted in lower energy savings for the precool and constant controllers but generated an increase over the setback controller. The resulting temperature profile is similar to the response generated from the TOU data, however, it used a later shifted precooling strategy. The precooling strategy generated by the controller use the same four-hour reduction time used within the TOU pricing data set. This generated control response allowed for cost savings to occur only when compared to the constant controller, however, for both the setback and precooling comparisons there was minimal savings to higher costs generated. The temperature profile and energy profile are inversely related when increasing and decreasing temperatures; whereas, a constant temperature value generates an energy profile susceptible to environmental input factors, such as outdoor air temperature. The profiles for the MPC are focused around minimizing the on-peak times, with two on-peak times existing for the DAMP, and only one large on-peak time existing for TOU. These times create high cost points that are critical for reducing energy costs; however, energy spikes are increased. The cost savings for the controllers are as follows: 7.3% to 41.9% for the DAMP-based MPC, 21.7% to 45.5% for the TOU-based MPC, and -41.8% to 35.9% for the EZ3-based MPC. These savings values are lower than other studies which had results of approximately 60% cost savings [15, 22, 50]. The reduction in savings our due to the addition of a desired temperature constraint, therefore, increasing the thermal comfort only when profitable to do so. When comparing the results to the precooling strategy from Brandt et al. the MPC controller is able to generate large cost and energy savings, as well as generate larger costs [12]. The costs are due to the controller using the assumption of temperature setpoint equaling the indoor air temperature. This assumption does not allow for enough control, in turn eliminating the high costs and subsequent energy spikes. These results are within the range (27-47%) of precooling cost savings found in previous studies [6, 35].

61 4.8 Conclusion and Future Work

This study develops a model predictive control (MPC) rapid prototyping platform for a single zone building; the platform uses commercially available software for optimization (AMPL), building energy simulations (EnergyPlus); the software is integrated within a com- monly used coding language (Simulink). The prototyping platform develops an optimization controller to determine optimal cost savings using the manipulated variable (MV) of the indoor air temperature set-point. Energy profiles used during building simulation include day ahead market price (DAMP) data from ERCOT in Austin, Texas, as well as time-of-use (TOU), and EZ3 data from SRP in Phoenix, Arizona. The MPC using DAMP data can gen- erate an energy savings as large as 29.1%. However, because the controller minimizes based on cost, the cost savings are generally higher at 41.9%. The MPC using the TOU data is also able to generate positive energy usage savings the largest being 15.0%, with the largest cost savings of 45.5%. Lastly the MPC using the EZ3 data only works when compared to the constant and precooling temperature strategies. The resulting energy usage savings can be as large as 7.6%, however, this only generated a 3.7% loss in revenue over the precooling strategy. The MPC is however capable of cost savings as high as 35.9%. Overall when comparing the savings and losses from all nine cases the MPC is able to perform well, more specifically the platform allowed for rapid development of the equation sets and simulation. The MPC modeling platform developed in this article can simulate MPCs that include nonlinear, mixed integer, and linear programs. The ability to solve complex optimization programs allows for the development of advanced controls for complex passive components, such as phase change materials (PCMs). To better understand the capability of the modeling platform, future work will include experimental tests using a thermal test chamber as well as a multiple zone building simulation.

62 CHAPTER 5 CONCLUSION

This thesis developed a platform to design, simulate, and experiment model predictive controls. It also investigated the effects of changing the number of zones and inputs on black-box models to increase the accuracy of simple ROMs. The current gaps in research for model predictive controls (MPCs) include a platform for rapidly developing complex linear, nonlinear, and integer optimization controls. An MPC uses models to solve the optimization problems reliant on computational tractability. Therefore, current research into model predictive controls relies on the development of accurate reduced order models to predict energy or temperature of zones within buildings. These ROMs have been created using black-box statistical methods. Simulink and MATLAB are investigated to increase the speed of developing black-box modeling methods using a small number of inputs. The resulting single zone building model was validated and implemented in a model predictive control. A rapid prototyping platform is developed to improve the speed of prototyping an MPC, as well as simulating the MPC response.

5.1 Research Contributions

Meeting the research objectives requires constructing the MPC and ROM development platforms for the advancement of control research. The ROM platform constructs the ARX- type models for a single zone residential building and multiple zone commercial building. The platform then develops some correlations to adding more external inputs, while also investigating the effect of single and multiple zone buildings on accuracy. The ASHRAE Guideline 14 evaluates the ROMs generated to determine the optimal black-box modeling type from the chosen ARX, ARMAX, and -ARX for the analyzed residential and small commercial cases. The rapid MPC prototyping platform is used to simulate and develop the controls to minimize the building energy cost in a residential building under two different

63 electric rates: day ahead market pricing (DAMP) from ERCOT in Austin, Texas, and both time of use (TOU, EZ3) from SPR in Phoenix, Arizona. The MPC platform uses AMPL to solve the developed MPC, which uses a linear or mixed method. The MPC platform generates energy savings and cost savings for the three time-based electricity pricing methods (DAMP, TOU, and EZ3) and compares them to baseline cases (constant temperature, setback temperature, and precooling temperature profile).

5.1.1 Development of a ROM

Methods to develop a tractable MPC model include developing an ROM for predicting energy usage in buildings. This need for an ROM is due to the computational time required for the traditional simulation software, such as EnergyPlus or TRNSYS. These reduced order models could take the form of a black-box or grey-box. The research conducted in this thesis indicates that black-box models, over traditional simulation software, can be quickly developed and implemented with little accuracy loss. Initial tests show that black-box models trained during the summer can simulate the energy use for the building zones, within the stated accuracies taken from ASHRAE Guideline 14. Therefore, the main contribution within reduced order model (ROM) chapter is the development of multiple black-box models for residential and commercial buildings, along with statistical analysis to select the best model based on ASHRAE Guideline 14. Statistical-based ROMs incorporate months of data representing all conditions for the trained resulting model. To rework the data into an ROM, a Simulink program and a MATLAB script create the ROM identification platform; MATLAB is used to solve the QR factorization to determine the weighting coefficients of the ARX-based models. This platform uses data from EnergyPlus for the ROM development. This study uses a residential and commercial building located in Austin, Texas to develop and validate the ROMs. The residential building represents a typical new construction, whereas the commercial building is a typical small five zone office. The black-box ROMs compared are defined as linear ARX, linear ARMAX, or nonlinear ARX. The resulting

64 models are simulated using a 24-hour prediction horizon which is assumed as the maximum prediction horizon needed. Among the analyzed models, the ARMAX model is the only resulting model for both single and multiple zone buildings that meets the ASHRAE guideline 14 of RMSE ≤ 10% and the NMBE ≤ 30%. The developed black-box models are not as accurate as an EnergyPlus simulation. However, they are capable of quicker solution times, which is ideal for optimization problems reliant on computational speed. The ROM solves the energy usage in a matter of milliseconds, where EnergyPlus solves it in approximately 20 seconds for a single day [21].

5.1.2 Development of a Rapid MPC Prototyping Platform

A co-simulation platform allows for simulation and development of model predictive con- trols. This co-simulation platform incorporates EnergyPlus, MLE+, AMPL, and Simulink. AMPL allows for programming the optimization equations in mathematical form, simplify- ing the process of formulating optimization equations. AMPL also can connect to solvers for linear (LP), nonlinear (NLP), or mixed integer programs (MIP). The programs are integrated into the Simulink with EnergyPlus using MLE+, while AMPL uses an S-function wrapped over the API. This wrapper is created to allow the simulation full control over AMPL solu- tions, while printing the information needed to understand better the solution method. The solution from AMPL feeds back into EnergyPlus to generate the building response for the optimized input. The co-simulation platform created in Simulink is tested on a single zone residential building located in Austin, Texas, using three different energy cost profiles. The first profile is operated by Electrical Reliability Council of Texas (ERCOT). The energy pricing scheme is called a day ahead market pricing (DAMP); the price is defined by determining the power demand load on the system the day before, and adjusting prices to reflect total demand. This scheme intends on increasing the cost of electricity based on demand. The second and third profiles used are from the Salt River Project (SPR) utility company in Phoenix, Arizona. The pricing schemes for Arizona are time of use profiles referenced as TOU and

65 EZ3. These schemes have increases in cost during peak times, while off-peak times are lower to incentivize decreases in peak demands. A parametric analysis is conducted to determine the effects of changing the prediction horizon on the MPC. The results from this analysis on the DAMP electrical rate show more energy reduction happens for a smaller prediction horizon. This result is due to the MPC not being able to predict the effects of decreasing the zone temperature to the desired temperature, therefore, causing the desired temperature demand to be ignored. Because the model is only looking at the next time-step, the MPC produces the highest energy and cost savings. These savings are a direct result of the temperature set-point being at the highest possible temperature. Increasing the controller prediction horizon decreases the amount of energy conserved, because the controller can then determine when it is feasible to run the occupants desired temperature. As the prediction horizon approaches nine hours, the cost savings levels off to a converging solution. Based on a parametric analysis for the prediction horizon, this study develops an MPC using a nine-hour prediction horizon to reduce the cost of space conditioning during the summer months. The controls implemented on the residential building, using both energy pricing schemes, generated the reductions in cost and usage. The reductions in electricity cost for cooling the buildings generate upwards of 45.5% savings. These savings and cost average 18.7% for all nine case studies, while energy usage savings generated up to 29.1% with an average of 6.8% for the case studies. Because the controller optimizes based off of cost these savings are larger than the energy savings generated for the case studies which include the three pricing schemes and three baseline controllers. These reductions in energy usage help to mitigate the electrical demand spikes on the system and can lead to less electrical grid failure.

5.2 Broader Impact

The design platforms for MPC and ROM presented within this thesis will allow engineers and control designers the ability of rapidly designing and implementing advanced controls

66 to the simulation of buildings. These simulations allow for better understanding of energy savings caused by advanced controllers. The MPC prototyping platform is capable of simu- lating complex modeling programs to allow engineers the ability to develop innovations for energy reduction of building systems. These platforms will allow for innovation and techno- logical growth for advanced controls by allowing designs to be implemented quickly, thereby, increasing modeling development and implementation speed.

5.3 Future Work

The next natural step is to further develop this platform to simulate the control of a multiple zone building for a better understanding of the computational speed and interaction of multiple zones. This further development of the platform will allow for use in campus- wide controls, understanding phase change material methods, and intricacies in the implementation of MPCs in physical buildings. The models produced for the MPC platform can be developed for stochastic inputs to allow for the expansion to non-ideal inputs. Another potential path includes developing the interaction with a Data Acquisition Sys- tem (DAQ) and the MPC. An external DAQ can make use of stochastic MPC formulations. The modeling platform with stochastic formulation allows for physical experimentation with the hope of implementation in net zero homes and businesses in the future. In closing, the modeling platform developed in this thesis provides a method of rapidly developing and implementing advanced controls. These controls start with the development of reduced order models. After the ROMs are developed, the models are implemented in optimization-based controls, such as an MPC. The models are simulated to develop an understanding of the response of the control, while improving the system. The platform is also capable of improving the understanding of how to manage complex systems by allowing for quick investigations into control responses.

67 REFERENCES CITED

[1] A. Afram and F. Janabi-Sharifi. Black-box modeling of residential HVAC system and comparison of gray-box and black-box modeling methods. Energy and Buildings, 94: 121–149, 2015.

[2] A. Afram and F. Janabi-Sharifi. Gray-box modeling and validation of residential HVAC system for control system design. Applied Energy, 137:134–150, 2015.

[3] M. J. Akhlaghinia, A. Lotfi, C. Langensiepen, and N. Sherkat. Occupancy simulator for a single-occupant ambient intelligent environment. In Cybernetic Intelligent Systems, 2008. CIS 2008. 7th IEEE International Conference on, pages 1–6. IEEE, 2008. ISBN 1424429145.

[4] AMPL. AMPL — STREAMLINED MODELING FOR REAL OPTIMIZATION, 2016. URL http://ampl.com/.

[5] F. Ansari, A. Mokhtar, K. Abbas, and N. Adam. A simple approach for building cooling load estimation. American Journal of Environmental Sciences, 1(3):209–212, 2005.

[6] R. Arababadi and K. Parrish. Modeling and Testing Multiple Precooling Strategies in Three Residential Building Types in the Phoenix Climate. 122(2), 2016.

[7] BARON. BARON Software — Sahinidis. URL http://archimedes.cheme.cmu.edu/ ?q=baron.

[8] M. Behl. MLE+, 2016. URL http://www.seas.upenn.edu/{~}mbehl/mleplus.html.

[9] W. Bernal, M. Behl, T. Nghiem, and R. Mangharam. MLE+: a tool for integrated design and deployment of energy efficient building controls. SIGBED Rev., 10(2):34, 2013.

[10] C. Booten and P. C. Tabares-Velasco. Using EnergyPlus to Simulate the Dynamic Response of a Residential Building to Advanced Cooling Strategies. pages 1–10, Boulder, Colorado, aug 2012. National Renewable Energy Laboratory (NREL).

[11] F. Borrelli, A. Bemporad, and M. Morari. Predictive control for linear and hybrid systems. Online, 2015.

68 [12] M. Brandt, S. Wijesuriya, and P. C. Tabares-Velasco. Optimization of PCM-Enhanced Drywall Installed in Walls and Ceilings for Light-Weight Residential Buildings. Golden, CO, 2015.

[13] J. Braun, D. Kim, M. Baric, P. Li, S. Narayanan, S. Yuan, E. Cliff, J. Burns, and B. Henshaw. Whole building control system design and evaluation: Simulation-based assessment. Technical report, 2012.

[14] J. E. Braun. An inverse gray-box model for transient building load prediction. Science and Technology for the Built Environment, 8(1):73, 2002.

[15] J. Cai, D. Kim, V. K. Putta, J. E. Braun, and J. Hu. Multi-agent control for centralized air conditioning systems serving multi-zone buildings. In American Control Conference (ACC), 2015, pages 986–993. IEEE, 2015. ISBN 1479986852.

[16] M. Canale, V. Cerone, V. Razza, and D. Regruto. Rapid prototyping of predictive controllers through an industrial platform. In American Control Conference (ACC), 2012, pages 4715–4720, 2012. ISBN 0743-1619.

[17] X. Chen, Q. Wang, and J. Srebric. Model Predictive Control for Indoor Ther- mal Comfort and Energy Optimization Using Occupant Feedback. Energy and Buildings, (0), 2015. URL http://www.sciencedirect.com/science/article/pii/ S0378778815300311.

[18] X. Chen, Q. Wang, and J. Srebric. A data-driven state-space model of indoor ther- mal sensation using occupant feedback for low-energy buildings. Energy and Build- ings, 91:187–198, 2015. URL http://www.sciencedirect.com/science/article/ pii/S0378778815000456.

[19] X. Chen, Q. Wang, and J. Srebric. Occupant feedback based model predictive control for thermal comfort and energy optimization: A chamber experimental evaluation. Applied Energy, 164:341–351, 2016. URL http://www.sciencedirect.com/science/article/ pii/S0306261915015159.

[20] R. H. Chintala and B. P. Rasmussen. Automated Multi-Zone Linear Parametric Black Box Modeling Approach for Building HVAC Systems. In ASME 2015 Dynamic Sys- tems and Control Conference, pages V002T29A004–V002T29A004. American Society of Mechanical Engineers, 2015.

[21] W. J. Cole. Dynamic modeling, optimization, and control of integrated energy systems in a smart grid environment. PhD thesis, 2014.

69 [22] W. J. Cole, K. M. Powell, E. T. Hale, and T. F. Edgar. Reduced-order residential home modeling for model predictive control. Energy and Buildings, 74:69–77, 2014. URL http://www.sciencedirect.com/science/article/pii/S0378778814000711.

[23] W. J. Cole, J. D. Rhodes, W. Gorman, K. X. Perez, M. E. Webber, and T. F. Edgar. Community-scale residential air conditioning control for effective grid management. Ap- plied Energy, 130:428–436, 2014.

[24] C. D. Corbin, G. P. Henze, and P. May-Ostendorp. A model predictive control opti- mization environment for real-time commercial building application. Journal of Building Performance Simulation, 6(3):159–174, 2013.

[25] CPLEX. IBM CPLEX Optimizer - United States. URL https://www-01.ibm.com/ software/commerce/optimization/cplex-optimizer/.

[26] DOE. 1.1.9 Buildings Share of U.S. Electricity Consumption (Percent), 2012. URL http://www.eia.gov/totalenergy/data/annual/pdf/sec2{_}21.pdf.

[27] DOE. Demand Response — Department of Energy, 2016. URL http://energy.gov/ oe/technology-development/smart-grid/demand-response.

[28] A. I. Dounis and C. Caraiscos. Advanced control systems engineering for energy and comfort management in a building environment: A review. Renewable and Sustain- able Energy Reviews, 13(67):1246–1261, 2009. URL http://www.sciencedirect.com/ science/article/pii/S1364032108001457.

[29] ERCOT. DAY-AHEAD MARKET, 2016. URL http://www.ercot.com/mktinfo/dam.

[30] J. Feng, F. Chuang, F. Borrelli, and F. Bauman. Model predictive control of radiant slab systems with evaporative cooling sources. Energy and Buildings, 87:199–210, 2015. URL http://www.sciencedirect.com/science/article/pii/S0378778814009682.

[31] R. Z. Freire, G. H. C. Oliveira, and N. Mendes. Predictive controllers for thermal comfort optimization and energy savings. Energy and Buildings, 40(7):1353–1365, 2008. URL http://www.sciencedirect.com/science/article/pii/S0378778808000029.

[32] P. Fritzson. Introduction to modeling and simulation of technical and physical systems with Modelica. John Wiley & Sons, 2011. ISBN 1118094247.

[33] GAMS. GAMS Home Page, 2016. URL https://www.gams.com/.

[34] GENOPT. GENOPT. URL https://simulationresearch.lbl.gov/GO/.

70 [35] A. German, M. Hoeschele, and Alliance for Residential Building Innovation. Residen- tial Mechanical Precooling. Technical report, NREL and U.S. Department of Energy’s Building America Program, Davis, CA, dec 2014. URL http://purl.fdlp.gov/GPO/ gpo55116.

[36] A. German, M. Hoeschele, D. Springer, and Davis Energy Group. Maximizing the Benefits of Residential Pre-Cooling. volume 1, pages 72–83. American Council for an Energy-Efficient Economy, 2014.

[37] J. K. Gruber and M. Prodanovic. Two-stage Optimization for Building Energy Man- agement. Energy Procedia, 62(0):346–354, 2014. URL http://www.sciencedirect. com/science/article/pii/S1876610214034274.

[38] A. Guideline. Guideline 14-2002, Measurement of Energy and Demand Savings. Amer- ican Society of Heating, Ventilating, and Air Conditioning Engineers, Atlanta, Georgia, 2002.

[39] Gurobi. Gurobi optimization - the best mathematical programming solver, 2016. URL http://www.gurobi.com/.

[40] F. Hayes-Roth. Rule-based systems. Communications of the ACM, 28(9):921–932, 1985.

[41] N. Instruments. Selecting a Model Structure in the System Identification Process, 2010. URL http://www.ni.com/white-paper/4028/en/.

[42] International Energy Conservation Code. International Energy Conservation Code. 2009. ISBN 9781580017428. URL https://law.resource.org/pub/us/code/ibr/ icc.iecc.2009.pdf.

[43] K. Kalvelage, U. Passe, S. Rabideau, and E. S. Takle. Changing climate: The effects on energy demand and human comfort. Energy and Buildings, 76(0):373–380, 2014. URL http://www.sciencedirect.com/science/article/pii/S037877881400228X.

[44] D. Kim and J. E. Braun. Reduced-order building modeling for application to modelbased predictive control. Purdue University, 2012. SimBuild.

[45] D. Kim and J. E. Braun. A general approach for generating reduced-order models for large multi-zone buildings. Journal of Building Performance Simulation, 8(6):435–448, 2015.

[46] KNITRO. - Nonlinear optimization solver. URL https://www.artelys. com/en/optimization-tools/knitro.

71 [47] X. Li and J. Wen. Review of building energy modeling for control and opera- tion. Renewable and Sustainable Energy Reviews, 37:517–537, 2014. URL http: //www.sciencedirect.com/science/article/pii/S1364032114003815.

[48] X. Li and J. Wen. Building energy consumption on-line forecasting using physics based system identification. Energy and Buildings, 82:1–12, 2014. URL http://www. sciencedirect.com/science/article/pii/S0378778814005581.

[49] X. Li, J. Wen, and T. Wu. Comparison of On-line Building Energy Forecasting Model Using System Identification Method and Other Methods. ASHRAE Transactions, 121: 1W, 2015.

[50] C. Liu. Model Predictive Optimal Control for Active and Passive Cold Thermal Energy Storage of Multi-zone Buildings. PhD thesis, 2012.

[51] L. Ljung. Black-box models from input-output measurements. In Instrumentation and Measurement Technology Conference, 2001. IMTC 2001. Proceedings of the 18th IEEE, volume 1, pages 138–146. IEEE, 2001. ISBN 0780366468.

[52] Y. Lu, S. Wang, Y. Sun, and C. Yan. Optimal scheduling of buildings with energy generation and thermal energy storage under dynamic electricity pricing using mixed- integer . Applied Energy, 147:49–58, 2015. URL http://www. sciencedirect.com/science/article/pii/S0306261915002378.

[53] Y. Ma. Model Predictive Control for Energy Efficient Buildings. PhD thesis, 2012. URL http://www.escholarship.org/uc/item/1dj908bs.

[54] Y. Ma and F. Borrelli. Fast stochastic predictive control for building temperature regulation. In 2012 American Control Conference (ACC), pages 3075–3080, 2012. ISBN 0743-1619.

[55] Y. Ma, F. Borrelli, B. Hencey, A. Packard, and S. Bortoff. Model predictive control of thermal energy storage in building cooling systems. In Decision and Control, 2009 held jointly with the 2009 28th Chinese Control Conference. CDC/CCC 2009. Proceedings of the 48th IEEE Conference on, pages 392–397. IEEE, 2009. ISBN 1424438713.

[56] MGE. Top energy-saving tips for better business, 2016.

[57] MIDACO. MIDACO-SOLVER. URL http://www.midaco-solver.com/index.php/ download/matlab.

[58] MINOS. MINOS 5.5. URL http://www.sbsi-sol-optimize.com/asp/ sol{_}product{_}minos.htm.

72 [59] J. W. Mitchell and J. E. Braun. HVAC Control Principals. In L. Ratts, editor, Principals of Heating Ventilation and Air Conditioning in Buildings, chapter 19,20, pages 497–553. John Wiley and Sons, USA, 2013.

[60] F. Mwasilu, J. J. Justo, E.-K. Kim, T. D. Do, and J.-W. Jung. Electric vehicles and smart grid interaction: A review on vehicle to grid and renewable energy sources integration. Renewable and Sustainable Energy Reviews, 34:501–516, 2014. URL http://www.sciencedirect.com/science/article/pii/S1364032114001920.

[61] NEST. Meet the Nest Learning Thermostat, 2016. URL https://nest.com/ thermostat/meet-nest-thermostat/.

[62] L. F. Ochoa and G. P. Harrison. Minimizing Energy Losses: Optimal Accommodation and Smart Operation of Renewable Distributed Generation. IEEE Transactions on Power Systems, 26(1):198–205, 2011.

[63] F. Oldewurtel, C. N. Jones, and M. Morari. A tractable approximation of chance constrained stochastic MPC based on affine disturbance feedback. In Decision and Control, 2008. CDC 2008. 47th IEEE Conference on, pages 4731–4736, 2008. ISBN 0191-2216.

[64] F. Oldewurtel, R. Gondhalekar, C. N. Jones, and M. Morari. Blocking parameteriza- tions for improving the computational tractability of affine disturbance feedback MPC problems. In Decision and Control, 2009 held jointly with the 2009 28th Chinese Con- trol Conference. CDC/CCC 2009. Proceedings of the 48th IEEE Conference on, pages 7381–7386, 2009. ISBN 0191-2216.

[65] F. Oldewurtel, D. Gyalistras, M. Gwerder, C. Jones, A. Parisio, V. Stauch, B. Lehmann, and M. Morari. Increasing energy efficiency in building climate control using weather forecasts and model predictive control. In Clima-RHEVA World Congress, number EPFL-CONF-169735, 2010.

[66] F. Oldewurtel, A. Parisio, C. N. Jones, M. Morari, D. Gyalistras, M. Gwerder, V. Stauch, B. Lehmann, and K. Wirth. Energy efficient building climate control using Stochastic Model Predictive Control and weather predictions. In American Control Conference (ACC), 2010, pages 5100–5105, 2010. ISBN 0743-1619.

[67] F. Oldewurtel, A. Ulbig, M. Morari, and G. Andersson. Building control and storage management with dynamic tariffs for shaping demand response. In Innovative Smart Grid Technologies (ISGT Europe), 2011 2nd IEEE PES International Conference and Exhibition on, pages 1–8. IEEE, 2011. ISBN 1457714221.

73 [68] F. Oldewurtel, A. Parisio, C. N. Jones, D. Gyalistras, M. Gwerder, V. Stauch, B. Lehmann, and M. Morari. Use of model predictive control and weather forecasts for energy efficient building climate control. Energy and Buildings, 45(0):15–27, 2012. URL http://www.sciencedirect.com/science/article/pii/S0378778811004105.

[69] F. Oldewurtel, D. Sturzenegger, and M. Morari. Importance of occupancy information for building climate control. Applied Energy, 101(0):521–532, 2013. URL http://www. sciencedirect.com/science/article/pii/S0306261912004564.

[70] H. C. Peitsman and V. E. Bakker. Application of black-box models to HVAC systems for fault detection. Technical report, 1996.

[71] K. Pelckmans. Lecture Notes for a course on System Identification.

[72] S. Pr´ıvara, J. Sirok´y,ˇ L. Ferkl, and J. Cigler. Model predictive control of a building heating system: The first experience. Energy and Buildings, 43(23):564–572, 2011. URL http://www.sciencedirect.com/science/article/pii/S0378778810003749.

[73] S. Pr´ıvara, Z. V´ana, J. Cigler, F. Oldewurtel, and J. Kom´arek. Role of MPC in building climate control. European Symposium on Computer Aided Process Engineering (ES- CAPE 21), 2011.

[74] S. Pr´ıvara, Z. V´aa, E. Z´aˇcekov´a,ˇ and J. Cigler. Building modeling: Selection of the most appropriate model for predictive control. Energy and Buildings, 55:341–350, 2012. URL http://www.sciencedirect.com/science/article/pii/S0378778812004446.

[75] Ptolemy. Ptolemy II Home Page, 2016. URL http://ptolemy.eecs.berkeley.edu/ ptolemyII/.

[76] J. B. Rawlings and D. Q. Mayne. Model predictive control. Nob Hill Publishing, LLC, 1st edition, 2009. ISBN 978-0-9759377-0-9.

[77] G. Reynders, T. Nuytten, and D. Saelens. Robustness of reduced-order models for prediction and simulation of the thermal behavior of dwellings. 2013.

[78] G. Reynders, J. Diriken, and D. Saelens. Quality of grey-box models and identified pa- rameters as function of the accuracy of input and observation signals. Energy and Build- ings, 82:263–274, 2014. URL http://www.sciencedirect.com/science/article/ pii/S0378778814005623.

[79] K. W. Roth, D. Westphalen, M. Y. Feng, P. Llana, and L. Quartararo. Energy impact of commercial building controls and performance diagnostics: market characterization, energy impact of building faults and energy savings potential. Prepared by TAIX LLC for the US Department of Energy. November. 412pp (Table 21), 2005.

74 [80] C. Sagerschnig, D. Gyalistras, A. Seerig, S. Pr´ıvara, J. Cigler, and Z. Vana. Co- simulation for building controller development: The case study of a modern office build- ing. In Proc. CISBAT, pages 14–16, 2011.

[81] A. S. Silva and E. Ghisi. Uncertainty analysis of the computer model in building performance simulation. Energy and Buildings, 76(0):258–269, 2014. URL http:// www.sciencedirect.com/science/article/pii/S0378778814002060.

[82] J. Sirok´y,ˇ F. Oldewurtel, J. Cigler, and S. Pr´ıvara. Experimental analysis of model predictive control for an energy efficient building heating system. Applied Energy, 88 (9):3079–3087, 2011. URL http://www.sciencedirect.com/science/article/pii/ S0306261911001668.

[83] SNOPT. SNOPT. URL http://www.sbsi-sol-optimize.com/asp/ sol{_}product{_}snopt.htm.

[84] SPR. Time-of-Day Price Plans for SRP residential electric customers, 2016. URL http://www.srpnet.com/prices/home/tod.aspx.

[85] A. Standard. Energy standard for buildings except low-rise residential buildings. ASHRAE/IESNA Standard, 90(1), 2004.

[86] S. Takriti, R. Fourer, M. G. Gay, and B. W. Kernighan. AMPL: A Modeling Language for Mathematical Programming. Number Second Edition. JSTOR, THOMSON, 1994. ISBN 0092-2102.

[87] TOMLAB. TOMLAB Optimization for MATLAB R — TOMLAB Optimization. URL http://tomopt.com/tomlab/.

[88] S. Treado and P. Delgoshaei. Agent-Based Approaches for Adaptive Building HVAC System Control. In P. E-Pubs, editor, International High Performance Buildings, page electronic, Purdue, 2010. Purdue e-Pubs.

[89] W. J. N. Turner, I. S. Walker, and J. Roux. Peak load reductions: Electric load shifting with mechanical pre-cooling of residential buildings with low thermal mass. Energy, 82:1057–1067, mar 2015. ISSN 0360-5442. URL http://www.sciencedirect.com/ science/article/pii/S0360544215001620.

[90] C. Wang, D. Yan, and Y. Jiang. A novel approach for building occupancy simulation. In Building Simulation, volume 4, pages 149–167. Springer, 2011. ISBN 1996-3599.

[91] M. Wetter. Co-simulation of building energy and control systems with the Building Controls Virtual Test Bed. Journal of Building Performance Simulation, 4(3):185–203, 2010.

75 [92] M. Wetter and P. Haves. A modular Building Controls Virtual Test Bed for the inte- gration of heterogeneous systems., 2008.

[93] E. Wilson, C. E. Metzger, S. Horowitz, and R. Hendron. 2014 Building America House Simulation Protocols. National Renewable Energy Laboratory, 2014.

[94] M. Yudong, J. Matusko, and F. Borrelli. Stochastic Model Predictive Control for Build- ing HVAC Systems: Complexity and Conservatism. Control Systems Technology, IEEE Transactions on, 23(1):101–116, 2015.

[95] X. Zhang, G. Schildbach, D. Sturzenegger, and M. Morari. Scenario-based MPC for energy-efficient building climate control under weather and occupancy uncertainty. In Control Conference (ECC), 2013 European, pages 1029–1034, 2013.

[96] H.-x. Zhao and F. Magoul`es. A review on the prediction of building energy consumption. Renewable and Sustainable Energy Reviews, 16(6):3586–3592, 2012.

[97] P. Zhao, S. Suryanarayanan, and M. G. Simoes. An energy management system for building structures using a multi-agent decision-making control methodology. Industry Applications, IEEE Transactions on, 49(1):322–330, 2013.

76 APPENDIX A - PLOTS OF INDIVIDUAL ZONES ON MULTIPLE ZONE ARC FIT

Appendix A shows the figures for each zone of the multiple zone building. They are more in depth representations of the accuracy for each zone of Chapter 3. Figure A.1, Figure A.2, Figure A.3, Figure A.4, and Figure A.5 show the training data for each individual zone using the ARX function generated. While Figure A.6, Figure A.7, Figure A.8, Figure A.9, and Figure A.10 show the validation data responses using the ARX for each individual zone.

Training Data Energy Use Comparison y1 4

EnergyPlus 3.5 Linear ARMAX Linear ARX

3

2.5

2

1.5 Energy Use (kWh)

1

0.5

0 1.5 2 2.5 3 3.5 4 4.5 Days (days)

Figure A.1: ARX ROM vs EnergyPlus comparison of 5 zone building, core zone shown.

77 Training Data Energy Use Comparison y1 5

EnergyPlus 4.5 Linear ARMAX Linear ARX 4

3.5

3

2.5

2

Energy Use (kWh) 1.5

1

0.5

0 1.5 2 2.5 3 3.5 4 4.5 Days (days)

Figure A.2: ARX ROM vs EnergyPlus comparison of 5 zone building, perimeter 1 zone shown.

78 Training Data Energy Use Comparison y1 4

EnergyPlus 3.5 Linear ARMAX Linear ARX 3

2.5

2

1.5

1

Energy Use (kWh) 0.5

0

-0.5

-1 1.5 2 2.5 3 3.5 4 4.5 Days (days)

Figure A.3: ARX ROM vs EnergyPlus comparison of 5 zone building, perimeter 2 zone shown.

79 Training Data Energy Use Comparison y1 5

EnergyPlus Linear ARMAX 4 Linear ARX

3

2

1 Energy Use (kWh)

0

-1 1.5 2 2.5 3 3.5 4 4.5 Days (days)

Figure A.4: ARX ROM vs EnergyPlus comparison of 5 zone building, perimeter 3 zone shown.

80 Training Data Energy Use Comparison y1 4

EnergyPlus 3.5 Linear ARMAX Linear ARX

3

2.5

2

1.5 Energy Use (kWh)

1

0.5

0 1.5 2 2.5 3 3.5 4 4.5 Days (days)

Figure A.5: ARX ROM vs EnergyPlus comparison of 5 zone building, perimeter 4 zone shown.

81 Validation Data Energy Use Comparison y1 4.5

EnergyPlus 4 Linear ARMAX Linear ARX 3.5

3

2.5

2

1.5

Energy Use (kWh) 1

0.5

0

-0.5 1.5 2 2.5 3 3.5 4 4.5 Days (days)

Figure A.6: ARX ROM vs EnergyPlus comparison of 5 zone building, core zone shown.

82 Validation Data Energy Use Comparison y1 5

EnergyPlus Linear ARMAX 4 Linear ARX

3

2

1 Energy Use (kWh)

0

-1 1.5 2 2.5 3 3.5 4 4.5 Days (days)

Figure A.7: ARX ROM vs EnergyPlus comparison of 5 zone building, perimeter 1 zone shown.

83 Validation Data Energy Use Comparison y1 4

EnergyPlus 3.5 Linear ARMAX Linear ARX 3

2.5

2

1.5

1

Energy Use (kWh) 0.5

0

-0.5

-1 1.5 2 2.5 3 3.5 4 4.5 Days (days)

Figure A.8: ARX ROM vs EnergyPlus comparison of 5 zone building, perimeter 2 zone shown.

84 Validation Data Energy Use Comparison y1 5

EnergyPlus Linear ARMAX 4 Linear ARX

3

2

1 Energy Use (kWh)

0

-1 1.5 2 2.5 3 3.5 4 4.5 Days (days)

Figure A.9: ARX ROM vs EnergyPlus comparison of 5 zone building, perimeter 3 zone shown.

85 Validation Data Energy Use Comparison y1 4

EnergyPlus 3.5 Linear ARMAX Linear ARX 3

2.5

2

1.5

1

Energy Use (kWh) 0.5

0

-0.5

-1 1.5 2 2.5 3 3.5 4 4.5 Days (days)

Figure A.10: ARX ROM vs EnergyPlus comparison of 5 zone building, perimeter 4 zone shown.

86 APPENDIX B - ROM WEIGHTING MATRIX VALUES

Appendix B shows the individual polynomial values for the weighting matrices of the ARX functions. Table B.1 shows the values for the single zone residential building. While Table B.2, Table B.3, Table B.4, Table B.5, and Table B.6 show the values for the multiple zone commercial building. These values are derived in Chapter 3.

Table B.1: Single zone building ARX weighting matrix values

Zone 1 Coefficients a b1 b2 b3 c 1 -0.9755 0.1154 0.0375 -1.3771 1 2 0.0949 -0.0687 -1.7659 1.6423 3 0.1126 -0.0867 1.7926 -0.3248 4 -0.0161 0.0595 -0.1466 0.0462 5 -0.044 0.2264 -0.1413 0.3961 6 -0.005 -0.5384 0.0762 -0.5247 7 0.0108 0.4766 0.0233 0.0857 8 0.0382 -0.2108 0.0195 -0.0081

Polynomial Order Polynomial 9 -0.0678 0.3362 -0.0338 0.1466 10 -0.0019 -0.6402 -0.0263 -0.2198 11 -0.0029 0.5132 0.0835 0.0734 12 0.0084 -0.1174 0.0301 -0.0071

87 Table B.2: Core Zone of multiple zone building ARX weighting matrix values

Zone 1 Coefficients a b1 b2 b3 c 1 -0.9860 0.0281 0.0114 0.1021 1.0000 2 0.0907 -0.1029 -0.6990 -0.0860 3 0.0075 0.1207 0.6859 -0.0021 4 0.0571 -0.0432 -0.0457 0.0079 5 -0.0538 0.1284 -0.0020 0.0205 6 -0.0070 -0.2962 -0.0458 -0.0285 7 -0.0433 0.2084 0.0218 0.0161 8 0.0570 -0.0419 0.0194 -0.0094 9 -0.0082 0.1409 0.0380 -0.0004 10 -0.0259 -0.3101 -0.0442 -0.0123 11 -0.0145 0.2129 0.0013 0.0116 12 0.0600 -0.0478 0.0230 0.0009 13 -0.0749 0.1077 0.0181 0.0000 14 0.0252 -0.2447 -0.0804 -0.0022

Polynomial Order 15 -0.0078 0.1946 0.0833 -0.0036 16 -0.0253 -0.0534 -0.0179 0.0037 17 0.0218 0.0667 0.0078 -0.0054 18 -0.0023 -0.1445 0.0139 0.0031 19 -0.0217 0.1073 -0.0143 -0.0029 20 0.0071 -0.0282 0.0010 0.0026 21 0.0176 0.0484 0.0288 -0.0038 22 -0.0223 -0.1056 -0.0051 -0.0089 23 -0.0100 0.0732 -0.0174 0.0134 24 0.0063 -0.0146 0.0156 -0.0080

88 Table B.3: Perimeter Zone 1 of multiple zone building ARX weighting matrix values Zone 2 Coefficients a b1 b2 b3 c 1 -0.9513 0.0242 -0.0085 0.0619 1.0000 2 0.0644 -0.0226 -0.6866 -0.0459 3 -0.0060 0.0020 0.6750 0.0044 4 0.1966 0.0190 -0.0119 -0.0021 5 -0.2450 0.0275 -0.0120 0.0585 6 0.0010 -0.1185 -0.1276 -0.0374 7 -0.0144 0.0850 0.1622 0.0119 8 0.1060 0.0087 0.0009 -0.0119 9 -0.1354 0.0586 0.0455 0.0164 10 0.0374 -0.1972 -0.1131 -0.0082 11 -0.0283 0.1436 0.0934 -0.0196 12 0.0619 0.0035 -0.0249 0.0120 13 -0.0574 0.0132 -0.0076 -0.0037 14 -0.0031 -0.1759 -0.0490 -0.0051

Polynomial Order 15 0.0102 0.2071 0.0649 -0.0077 16 -0.0274 -0.0530 -0.0017 -0.0097 17 0.0844 0.0298 -0.0078 0.0646 18 -0.0236 -0.1548 0.0061 -0.0663 19 0.0044 0.1545 -0.0519 0.0045 20 -0.1079 -0.0443 0.0165 0.0012 21 0.1241 0.0409 0.0068 -0.0661 22 -0.0414 -0.1124 0.0874 0.0680 23 -0.0117 0.0889 -0.0979 -0.0031 24 0.0081 -0.0223 0.0375 -0.0033

89 Table B.4: Perimeter Zone 2 of multiple zone building ARX weighting matrix values Zone 3 Coefficients a b1 b2 b3 c 1 -1.1930 0.0455 0.0105 0.1341 1.0000 2 0.2506 -0.0744 -0.4578 -0.1358 3 -0.0598 0.0233 0.4980 0.0298 4 -0.0068 0.0320 -0.0536 -0.0013 5 0.0295 0.0172 0.0077 0.0215 6 0.0110 -0.0793 0.0046 0.0008 7 0.0172 -0.0004 -0.0187 -0.0268 8 0.0219 0.0761 -0.0009 -0.0024 9 -0.0114 -0.0042 0.0053 -0.0153 10 -0.0203 -0.0680 -0.0122 0.0035 11 -0.0129 0.0021 0.0067 -0.0236 12 0.0204 0.0681 0.0110 0.0246 13 0.0248 -0.0132 0.0119 -0.0045 14 -0.0571 -0.0843 -0.0210 0.0103

Polynomial Order 15 0.0466 0.0821 -0.0032 -0.0121 16 -0.0450 -0.0027 0.0159 0.0065 17 0.0460 -0.0140 -0.0198 0.0049 18 -0.0154 -0.0257 0.0193 0.0097 19 0.0394 0.0317 -0.0234 0.0023 20 0.0161 -0.0003 0.0101 0.0075 21 -0.0088 -0.0007 -0.0172 -0.0044 22 -0.0469 -0.0358 -0.0032 0.0084 23 -0.0164 0.0452 0.0060 -0.0212 24 0.0015 -0.0180 0.0226 -0.0090

90 Table B.5: Perimeter Zone 3 of multiple zone building ARX weighting matrix values Zone 4 Coefficients a b1 b2 b3 c 1 -0.9716 0.0160 0.0194 0.1056 1.0000 2 0.1175 -0.0218 -0.7072 -0.0921 3 -0.0269 0.0135 0.6753 0.0113 4 0.1026 0.0145 -0.0564 0.0094 5 -0.2181 0.0326 0.0075 0.0398 6 0.0644 -0.1445 -0.0743 -0.0432 7 -0.0166 0.1172 0.1525 0.0091 8 0.0307 -0.0131 -0.0386 -0.0136 9 -0.0868 0.0783 0.0109 -0.0084 10 0.0317 -0.2266 -0.0276 -0.0021 11 0.0012 0.1767 0.0591 -0.0054 12 -0.0207 -0.0307 -0.0193 0.0055 13 0.0114 0.0511 0.0047 -0.0124 14 -0.0020 -0.2057 -0.0089 0.0093

Polynomial Order 15 0.0152 0.2257 0.0053 -0.0036 16 -0.0155 -0.0741 -0.0053 0.0059 17 0.0351 0.0477 -0.0054 -0.0157 18 0.0122 -0.1578 0.0012 0.0174 19 0.0062 0.1559 -0.0212 -0.0050 20 0.0159 -0.0473 -0.0093 0.0114 21 -0.0008 0.0287 -0.0008 0.0043 22 -0.0472 -0.0907 0.0000 -0.0058 23 -0.0146 0.0807 -0.0043 -0.0019 24 0.0065 -0.0221 0.0392 -0.0131

91 Table B.6: Perimeter Zone 4 of multiple zone building ARX weighting matrix values Zone 5 Coefficients a b1 b2 b3 c 1 -0.8387 0.0349 0.0037 0.1157 1.0000 2 -0.2356 0.0265 -0.5448 -0.1358 3 -0.0738 -0.1455 0.4921 0.0250 4 0.1815 0.1115 0.1505 -0.0106 5 -0.1128 -0.0006 0.0153 -0.0022 6 0.0930 0.0021 -0.0973 0.0971 7 0.0328 -0.1031 0.0656 -0.0793 8 0.0350 0.1083 -0.0757 -0.0040 9 -0.0437 0.0191 -0.0196 0.0016 10 0.0161 -0.0648 -0.0244 0.0748 11 -0.0450 -0.0262 0.0317 -0.0802 12 0.0687 0.0551 -0.0118 0.0105 13 -0.0363 0.0317 0.0197 -0.0024 14 0.0204 -0.1157 -0.0308 0.0149

Polynomial Order 15 0.0025 0.1035 0.0180 -0.0179 16 -0.0143 -0.0099 -0.0069 -0.0071 17 0.0396 0.0240 -0.0036 -0.0030 18 -0.0083 -0.1043 0.0146 -0.0044 19 0.0103 0.0797 -0.0350 0.0160 20 0.0283 -0.0155 0.0154 0.0036 21 -0.0088 0.0207 0.0040 -0.0159 22 -0.0543 -0.0680 -0.0215 0.0767 23 -0.0248 0.0722 0.0093 -0.0649 24 0.0100 -0.0315 0.0280 0.0055

92 APPENDIX C - PLOTS NOT SHOWN FOR MPC SIMULATIONS

Appendix C shows the plots for the other tests not shown in Chapter 4. These plots include precool temperature comparisons for DAMP (Figure C.1, Figure C.2) and TOU (Figure C.3, Figure C.4). There are also the constant and setback comparison plots for the EZ3 pricing structure (Figure C.5, Figure C.6, Figure C.7, Figure C.8).

Temperature (Comparison) 40 20 Baseline IAT Baseline TSP MPC IAT MPC TSP OAT Occupancy 18

35 16

14

30 12 10

Temp(C) 8

25 Occupancy (#) Occupancy 6

4 20 2

0 15 0 4 8 12 16 20 0 4 8 12 16 20 0 Simulation Time (h)

Figure C.1: Temperature comparison for the MPC and a baseline, precool temperature, controller. Both are based on DAMP pricing with Indoor Air Temperature (IAT), set-point temperature (TSP), Outdoor Air Temperature (OAT), and Occupancy.

93 Electricity Consumption (Comparison) 0.45 Baseline Control MPC Electricty Cost 1 0.4

0.35 0.8 0.3

0.25 0.6

0.2

0.4 0.15

Electricty Cost ($/kWH) Cost Electricty Electrical Demand (kWH) Demand Electrical 0.1 0.2 0.05

0 0 0 4 8 12 16 20 0 4 8 12 16 20 0 Simulation Time (h)

Figure C.2: Electrical consumption results from the temperature comparison plots for the MPC and a precool temperature control based on DAMP pricing

Temperature (Comparison) 40 20 Baseline IAT Baseline TSP MPC IAT MPC TSP OAT Occupancy 18

35 16

14

30 12 10

Temp(C) 8

25 Occupancy (#) Occupancy 6

4 20 2

0 15 0 4 8 12 16 20 0 4 8 12 16 20 0 Simulation Time (h)

Figure C.3: Temperature comparison for the MPC and a baseline, precool temperature, controller. Both are based on TOU pricing with Indoor Air Temperature (IAT), set-point temperature (TSP), Outdoor Air Temperature (OAT), and Occupancy.

94 Electricity Consumption (Comparison) 0.45 1.2 Baseline Control MPC Electricty Cost

0.4 1 0.35

0.8 0.3

0.25 0.6 0.2

0.4 0.15

Electricty Cost ($/kWH) Cost Electricty Electrical Demand (kWH) Demand Electrical 0.1 0.2 0.05

0 0 0 4 8 12 16 20 0 4 8 12 16 20 0 Simulation Time (h)

Figure C.4: Electrical consumption results from the temperature comparison plots for the MPC and a precool temperature control based on TOU pricing

Temperature (Comparison) 40 20 Baseline IAT Baseline TSP MPC IAT MPC TSP OAT Occupancy 18

35 16

14

30 12 10

Temp(C) 8

25 Occupancy (#) Occupancy 6

4 20 2

0 15 0 4 8 12 16 20 0 4 8 12 16 20 0 Simulation Time (h)

Figure C.5: Temperature comparison for the MPC and a baseline, constant temperature, controller. Both are based on EZ3 pricing with Indoor Air Temperature (IAT), set-point temperature (TSP), Outdoor Air Temperature (OAT), and Occupancy.

95 Electricity Consumption (Comparison) 0.6 Baseline Control MPC Electricty Cost 1.2

0.5 1

0.4 0.8

0.3 0.6

0.2

0.4

Electricty Cost ($/kWH) Cost Electricty Electrical Demand (kWH) Demand Electrical

0.2 0.1

0 0 0 4 8 12 16 20 0 4 8 12 16 20 0 Simulation Time (h)

Figure C.6: Electrical consumption results from the temperature comparison plots for the MPC and a constant temperature control based on EZ3 pricing

Temperature (Comparison) 40 20 Baseline IAT Baseline TSP MPC IAT MPC TSP OAT Occupancy 18

35 16

14

30 12 10

Temp(C) 8

25 Occupancy (#) Occupancy 6

4 20 2

0 15 0 4 8 12 16 20 0 4 8 12 16 20 0 Simulation Time (h)

Figure C.7: Temperature comparison for the MPC and a baseline, setback temperature, controller. Both are based on EZ3 pricing with Indoor Air Temperature (IAT), set-point temperature (TSP), Outdoor Air Temperature (OAT), and Occupancy.

96 Electricity Consumption (Comparison) 0.6 Baseline Control MPC Electricty Cost 1.2

0.5 1

0.4 0.8

0.3 0.6

0.2

0.4

Electricty Cost ($/kWH) Cost Electricty Electrical Demand (kWH) Demand Electrical

0.2 0.1

0 0 0 4 8 12 16 20 0 4 8 12 16 20 0 Simulation Time (h)

Figure C.8: Electrical consumption results from the temperature comparison plots for the MPC and a setback temperature control based on EZ3 pricing

97