Control-Oriented, Data-Driven Models of Thermal Dynamics

Energy savings from efficiency methods in individual residential buildings are measured in 10's of dollars, while the energy savings from such measures nationally would amount to 10's of billions of dollars, leading to the"tragedy of the commons"effect. The way out of this situation is via deployment of automated, integrated residential energy systems, that provide the user with a seamless, cost effective service leading to improvement of comfort and residential experience. Models are of critical importance in this context, as intelligent operating systems depend on them strongly. However, most of the currently used models of thermal behavior of buildings have high complexity leading to problems and implementation. The complexity also obscures the utilization of well know physical properties of buildings such as the thermal mass. In view of this, we investigate data-driven, simple-to-implement residential environmental models that can serve as the basis for energy saving algorithms in both retrofits and new designs of residential buildings. Despite the nonlinearity of the underlying dynamics, using Koopman operator theory framework in this study we show that a linear second order model embedding, that captures the physics that occur inside a single or multi-zone space does well when compared with data simulated using EnergyPlus. This class of models has low complexity. We show that their parameters have physical significance for the large-scale dynamics of a building and are correlated to concepts such as the thermal mass. We investigate consequences of changing the thermal mass on the energy behavior of a building system and provide best practice design suggestions.


Introduction
The "House as a System" approach is gaining traction as a framework of the future to gain deep energy efficiency in residential buildings [1]. In contrast, the current approach is focused on scheduling the order of retrofits (insulation first, replacement of furnace second, etc.) and thus high capital expenditure actions. In commercial buildings, the cost of such retrofits has led to development of strategies for optimizing operations of existing systems, focusing first on fault detection and returning the building operation to a "healthy" state [2]. Beyond the fault detection methodologies, modelbased approaches lead to optimization of existing systems and potential of deep energy savings for new commercial builds [3], and even US Army facilities [4]. However, these gains are not currently utilized in the context of residential buildings.
There are about 136.5 million residential buildings in the United States [5], creating a large opportunity for energy savings via retrofits and new designs, to create more efficient homes. Wireless communication protocols enables "smart" device operation with algorithms that can be deployed to e.g. reduce use during peak demand periods. With energy monitoring and cost savings, smart home technologies have potential to deliver benefits such as convenience, control, security and monitoring, environmental protection, and simply enjoyment from engaging with the technology itself [6]. In order for retrofits and newly designed systems to work properly, the underlying technological infrastructure must be developed. In particular, analogs of Building Management Systems technology that incorporates sensors, actuators and algorithms has to be developed for residential buildings.
Building energy management systems (BEMS) have become a standard in commercial buildings [7]. BEMs are software systems that help control and monitor the indoor climatic conditions while still maintaining optimal operational performance and safety comfort levels for occupants [8]. While there are current attempts to use modeling approaches for control in commercial buildings [9,10,11], they are typically based on detailed thermal models that are attempting to capture the details of all the thermal interactions in buildings [11]. This leads to high complexity of the models, making them less likely for implementation without cloud computation, as well as lack of insight into the global properties of the thermal dynamics. One such global property is the thermal mass, that is well known to designers to be lboskic@ucsb.edu (Ljuboslav Boskic) one of the key features for design and control of energy efficient buildings [12].
In this work we present a modeling approach that takes a global, physical point of view. Namely, based on model order reduction ideas emerging from Koopman operator theory [13], we introduce a class of linear second order thermal models. We show that the model coefficients reflect well-known physical properties such as the thermal mass, thermal damping, conduction and radiation. Despite the nonlinearity of the underlying dynamics, in this study we show that a linear second order model embedding, that captures the physics that occur inside a single or multi zone space does well when compared with data simulated using EnergyPlus. This class of models has low complexity. We show that their parameters have physical significance for the large-scale dynamics of a building and are correlated to concepts such as the thermal mass. We investigate consequences of changing the thermal mass on the energy behavior of a building system and provide best practice design suggestions.
The paper is organized as follows: In section (2) we introduce the Energy Plus model that we use to validate the reduced order model. In section (3) we derive the general form of a reduced order model using Koopman operator theory and discuss the physical meaning of its parameters. In section (4) we test the performance of the reduced order model against the Energy Plus simulation of a single-zone building. In section (5) we do the same for a multi-zone building.

Model Description
The residential building model used in the analysis was constructed in Sketchup (Computer-aided design (CAD) software) [14] and then applied using OpenStudio [15] and EnergyPlus software to run a year long simulation. The location used in this study is Santa Barbara, California. The outdoor temperature for Santa Barbara is obtained from the Department of Energy EnergyPlus website for the year 2009. The model zone of a building, as seen in figure 1 has dimensions of 7.72m × 7.72m × 3.046m with an approximate volume of 181.5m 3 . The building has 3 windows and one door. All the material used is based on ASHRAE 189.1 standard corresponding to the location of the test area.
In OpenStudio, a wide-variety of conditions such as setpoints, occupant schedules, HVAC equipment, loads, and more (see figure 2) can be specified. We first developed the nominal, no-actuation, no-load model, that enables us to parametrize important physical concepts such as the thermal mass by turning off all thermal loads. The model outputs were compared with a reduced order model the development of which we describe next.

Reduced Order Model
There are a number current attempts to use modeling approaches for control in commercial buildings [9,10,11]. These are typically based on thermal models that are attempting to capture the details of all the thermal interactions in buildings [11]. This leads to high complexity of the models, making them less likely for implementation without cloud computation, as well as lack of insight into the global properties of the thermal dynamics.
Moreover, to transfer such technology to residential building, the model underlying control has to be simple, computable "at the edge" instead on the cloud and amenable to exploit innovative control actuation such as active thermal mass control.
The model of building physics we develop here is simple, yet it captures the relevant large-scale physical effects. Our methodology is inspired by data-driven approach to control utilizing Koopman operator methods. Starting from papers [16,13] these methods gained widespread adoption in fields as diverse as fluid mechanics [17], power grid [18] and control theory [19]. The theory utilizes Koopman operator eigenfunctions to develop linear reduced order models of dynamical systems. Namely, an eigenfunction z of the Koopman operator satisfieṡ where λ is the associated eigenvalue. Then In viscously damped vibrations such equations are used, and special values of σ and ω are used to obtain the real solution, that follows from a second order equation that involves a real, velocity-dependent damping force. Namely, if we require ω 2 n = σ 2 + ω 2 , and σ = −ξω n , n , the classical viscous damping result. We can also observe σ = −c/2m, and ξ = −c/2k where c is the damping coefficient, k is the stiffness and m the mass of the vibrating system. Motivated by the above discussion, we make an assumption that the temperature dynamics of a building can be represented by its first Koopman mode, thus obtaining a second order linear differential equation with constant coefficients as our model for temperature inside a particular space/thermal zone. Labeling the state x as the temperature, the equation reads, where u is external input, or It is intuitive from the discussion above that c 1 should represent the "mass" parameter, in this thermal model being the thermal mass. We rewrite the equation in a state space representation: We now discuss what every term in equation (5) represents in terms of thermal physics of the space. The thermal mass influences the c1 term strongly. Thermal mass is a very important aspect in buildings due to it being the main source of absorption of outside and inside thermal and passive control of the living space inside. The thermal mass is influenced by the physical structure of the walls of the building, because of the varying ability of the material to absorb and store heat energy. For example, a lot of thermal energy is needed to change the heat inside a building that has been constructed out of brick, due to the fact that the density of the material is high. In fact, any material that has greater thermal mass can store more heat and therefore it will take longer to release the thermal energy after the heat source or the sun is gone.
Thermal insulation affects the "damping term" c2. It is used to reduce heat loss or gain by providing a barrier between areas that are significantly different in temperature. Insulation is commonly added between the outside walls and inside walls of the house, this is what provides that barrier of protection from the sun. Insulation and thermal mass both slow down the movement of heat between exterior and interior space. Insulation is used when a desired temperature differential is wanted between the indoor and outdoor space. Thermal mass is inertial, as it involves a substance that will slowly take on heat and then slowly release it over time [20].
Heat conduction affects the c3 term. Thermal conduction happens when internal energy or heat is transferred by collision of particles and movement of electrons. Material within the walls have different heat conduction properties. The coefficient c 3 affects is in a sense a "global" heat conduction coefficient. Changing the materials in the walls affects both the thermal mass, and the thermal conduction term.
Thermal radiation, the heat transferred by electromagnetic waves such as the visible light or transfer of heat within or through two bodies affects the term c4 in our equation. It was shown in [21] that radiation heat transfer results in an increase in the heat transfer rate reflecting significant radiation effects that contribute to less thermal resistance.
We note that the coefficients above are also affected by factors such as the orientation of the building. Thus, various physical and design considerations affect the coefficients in a heterogeneous way. Roughly, thermal mass affects c1, insulation affects c2, heat conduction coefficients c3, and thermal radiation c4. The above Reduced Order Model (ROM) (4) reduces computational complexity, from a computationally expensive EnergyPlus simulation to the simple model that can be implemented using embedded controllers and has all the essential physics encoded in its coefficients. Having ROM's it is also easier to understand the nature of systems due to its simplicity.

Results for Single Zone Model
In this section we report results obtained using a single-zone model. In order to illustrate some of the complexity of temperature changes, in figures 3 and 4 we provide the indoor and outdoor temperature plots for one case of 286 operational hours. There is a noticeable shift (delay) between the peaks of temperature between the outdoor and indoor temperatures. Control of the shift can be done e.g. by the old fashioned manual implementation of opening the window before the sun is out and closing it afterwords in order to cool the home. However, the complexity of the delay timing indicates an automatic controller would be better in determining the exact times for such action, especially if the actuation is done using non-standard means such as active thermal mass.
We implement system identification technique to get the optimal coefficients described in the previous section. The modeled indoor temperature compared to the "actual" indoor temperature from that particular zone from the EnergyPlus simulation is shown in figure 5. The percentage error found between the actual indoor temperature from simulation to our model

Results for Multi-Zone Model
In the previous section we tested the reduced order modeling approach using a single zone building. In this section we analyze performance for a multi-zone building whose features are shown in figures 6, 7 and 8. In EnergyPlus we had four separate thermal zones and then we added a single thermal zone for the whole house that in a sense computes a weighted average of the four thermal zone spaces. Note that zoning based on thermal properties of neighboring spaces based on Koopman operator methods was done in [3,22].
In Figure 9 we see that the model performance is similar, with a 4.1515% difference from the "true" indoor temperature obtained using EnergyPlus. Even with having one thermal zone but four different spaces in a house, we see that the model will hold. In this sense, the reduced order model recognizes the homogenized coefficients such as the thermal mass for the whole building, indicating that the modeling can be done using a systematic layered approach, where both single zone and multi zone reduced order models are constructed.

Dependence of Coefficients on Material Properties
Building materials can affect the reduced order model coefficients substantially, illuminatinng their role in performance and efficiency of the thermal design of a building. In the appendix we present results of reduced order model coefficients with a variety of building materials, showing their effect on physical coefficients. From the results, it is evident that the variation of the thermal mass coefficient c 1 can be substantial, almost an order of magnitude. The damping coefficient c 2 and the "thermal stiffness" c 3 are affected less. In all the cases, the optimal coefficients provided for a good match with the Energy Plus data.

Conclusions
In this paper we proposed a reduced order modeling methodology based on Koopman operator theory. The methodology leads to linear second order zone models featuring coefficients related to global physical properties of the space, such as the thermal mass. In fact, our effort can be seen as a way to define thermal mass for a zone as the coefficient c 1 in the reduced order model.
We tested the approach using simulated data from Energy Plus model for single and multi-zone buildings and found that optimized coefficients provide a good match of the reduced order model with the data. We also analyzed how different materials affect properties such as the thermal mass, finding that variation in the thermal mass can be very substantial depending on wall materials used.
The low complexity, high accuracy reduced order models developed here can be used in development of controllers with standard actuation, but also non-standard, such as the active thermal mass actuation. We created test models in OpenStudio with different structural materials (steel and brick) and different wall material. The size of the test building is 11.86m × 13.99m × 4.57m and will have three windows and one door. We used the total of 288 hourly data points. In the tables below we show Energy Plus model construction settings.

Name
Material External Wall Setting Standard Model