0% found this document useful (0 votes)
2 views

Physics-informed linear regression

This study compares physics-informed Autoregressive–Moving-Average with Exogenous Inputs (ARMAX) models to Machine Learning methods like Random Forests and Input Convex Neural Networks in the context of Model Predictive Control (MPC) for residential buildings. The results indicate that ARMAX models demonstrate lower computational burden, better sample efficiency, and superior prediction accuracy, achieving energy savings of 26% to 49% compared to baseline controllers. Overall, the findings suggest that simpler, physics-informed models can be as effective or more so than complex Machine Learning models in practical building applications.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Physics-informed linear regression

This study compares physics-informed Autoregressive–Moving-Average with Exogenous Inputs (ARMAX) models to Machine Learning methods like Random Forests and Input Convex Neural Networks in the context of Model Predictive Control (MPC) for residential buildings. The results indicate that ARMAX models demonstrate lower computational burden, better sample efficiency, and superior prediction accuracy, achieving energy savings of 26% to 49% compared to baseline controllers. Overall, the findings suggest that simpler, physics-informed models can be as effective or more so than complex Machine Learning models in practical building applications.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

Physics-informed linear regression is competitive with two Machine

Learning methods in residential building MPC


Felix Bünninga,b,∗ , Benjamin Hubera,b , Adrian Schalbettera,b , Ahmed Aboudoniab , Mathias Hudoba
de Badynb , Philipp Heera , Roy S. Smithb and John Lygerosb
a Empa, Urban Energy Systems Laboratory, Überlandstrasse 129, 8600 Dübendorf, Switzerland
b Automatic Control Laboratory, Department of Electrical Engineering and Information Technology, ETH Zürich, Switzerland

ARTICLE INFO ABSTRACT


Keywords: Because physics-based building models are difficult to obtain as each building is individual, there is an
Building energy management increasing interest in generating models suitable for building MPC directly from measurement data.
arXiv:2110.15911v2 [cs.LG] 26 Jan 2022

Data Predictive Control Machine learning methods have been widely applied to this problem and validated mostly in simula-
Model Predictive Control tion; there are, however, few studies on a direct comparison of different models or validation in real
Physics-informed Machine Learning buildings to be found in the literature. Methods that are indeed validated in application often lead to
Validation in experiment computationally complex non-convex optimization problems. Here we compare physics-informed
Autoregressive–Moving-Average with Exogenous Inputs (ARMAX) models to Machine Learning
models based on Random Forests and Input Convex Neural Networks and the resulting convex MPC
schemes in experiments on a practical building application with the goal of minimizing energy con-
sumption while maintaining occupant comfort, and in a numerical case study. The building has a
water-based emission system and is located in temperate climate. We demonstrate that Predictive
Control leads to savings between 26% and 49% of heating and cooling energy, compared to the build-
ing’s baseline hysteresis controller. Moreover, we show that all model types lead to satisfactory control
performance in terms of constraint satisfaction and energy reduction. However, we also see that the
physics-informed ARMAX models have a lower computational burden, and a superior sample effi-
ciency compared to the Machine Learning based models. Moreover, even if abundant training data is
available, the ARMAX models have a significantly lower prediction error than the Machine Learning
models, which indicates that the encoded physics-based prior of the former cannot independently be
found by the latter.

1. Introduction methods, which are sometimes referred to as Data Predictive


Control (DPC) [17], either use models built from measure-
1.1. Motivation and contribution ment data in an MPC framework [17] or compute optimal in-
Buildings are responsible for approximately 40% of the puts directly from past and currently measured data [18, 19].
global final energy consumption [1], of which a large frac- As the distinction between these methods and methods based
tion is caused by space heating and cooling [2]. Besides on excitation experiments is blurry, we will use the common
retrofitting heating and cooling equipment and the envelope term MPC in the following for all predictive methods. Many
of a building, which is expensive, advanced control methods Machine Learning (ML) methods, such as Artificial Neural
can be used to reduce energy consumption [3]. One of these Networks (ANN), Random Forests (RF) and Support Vec-
methods is Model Predictive Control (MPC) [4]. Here, a tor Machines (SVM) are universal function approximators
mathematical model of the system dynamics is used to opti- [20, 14], and have proven successful in various technical do-
mize control inputs with respect to a cost function and com- mains [21, 22, 23]. As they come with the tempting promise
fort constraints in a receding prediction horizon. to model any system well as long as the underlying data qual-
MPC in buildings has been applied successfully in sim- ity is good, they are also natural candidates for MPC in build-
ulation [5, 6, 7, 8] and real buildings [9, 10, 11, 12, 13, 14] ings.
many times with significant reduction of energy consump- In [24] we successfully applied a combination of RF and
tion compared to the baseline controllers. However, mod- linear regression, based on the work of [17] to the cooling of
els in building MPC are conventionally based on physics a real apartment in Switzerland. In [25] we have performed
[15, 16], which means that the model is built using princi- a similar study with models based on Input Convex Neural
ples of heat transfer and thermodynamics, or based on ex- Networks (ICNN), which were extended from [26] to ensure
pensive excitation experiments, or a combination of both. convexity in the face of recursive evaluation of the networks
Developing and maintaining such models is therefore often in an optimization framework. Under some assumptions on
considered too expensive to justify investment, an issue that the cost function and state constraints, both RF and ICNN
potentially hinders the commercial application of MPC in models lead to convex optimization problems that can be
buildings [9]. solved to global optimum in real time. In both studies, the
As a result, data-driven approaches that rely purely on controllers were able to reduce the energy consumption of
historical measurement data have emerged. Data-driven the apartment while keeping room temperatures within com-
∗ Corresponding author fort constraints during the vast majority of time. Other au-
ORCID (s):

F Bünning et al.: Preprint submitted to Elsevier Page 1 of 17


Linear regression is competitive with Machine Learning in building MPC

lower computational burden, better sample efficiency and


better prediction accuracy in the numerical evaluation. On
one hand, our results show that any reasonably predictive
model will be suitable for predictive control. On the other
hand, they demonstrate that overly complicated ML-based
models do not have any advantage over a physics-informed
ARMAX model, i.e. they do not identify potential non-
linearities such as time related solar gains or occupancy ef-
fects. On the contrary, the stronger physical prior of the AR-
MAX models, besides leading to higher sample efficiency,
is not achieved by the ML models, even if abundant training
Figure 1: NEST building with the UMAR apartment unit data is available for training. These findings and the lower
marked in white, © Zooey Braun, Stuttgart. computational requirements in terms of optimization time
and memory usage render the ARMAX approach superior
for practical implementation.
thors have conducted similar studies either in simulation or The remainder of the article is structured as follows. In
experiment, for an overview see Section 1.2. the second part of this Section, we discuss related work in
In the spirit of [27], it is, however, still unclear how more detail. In Section 2, we introduce the concept of MPC.
these models compare to simpler identification methods, In Section 3, we briefly outline the earlier models based on
such as Autoregressive–Moving-Average with Exogenous RF and ICNN, and introduce the physics-informed ARMAX
Inputs (ARMAX) models identified through linear regres- models. Section 4 describes the apartment that we use as a
sion. While ARMAX models are not universal function ap- test bed and its heating and cooling system. The results of
proximators, they do have the trait of being physically inter- the experiments of all models applied to the test case are
pretable, which is often not the case for ML methods. As we presented and discussed in Section 5, while in Section 6, we
point out in Section 1.2, besides grey-box modeling, there is investigate the sample efficiency of the models. Section 7
a significant gap in the literature for physics-informed data- summarises our findings and provides directions for future
driven models in the building domain. More identified gaps work.
are the comparison of the performance of different data-
driven models on real systems and a general evaluation of the 1.2. Related work
benefits of data-driven MPC in practical building applica- Several recent [29, 28, 2, 30, 31, 32, 33, 34] and less re-
tions (see [28] and Section 1.2). Methods that are applied to cent [35, 36, 37, 38] reviews provide an excellent overview
practical case studies often use data-driven modeling meth- on the issues related to the use of MPC in buildings, includ-
ods that lead to computationally complex non-convex opti- ing physics-based methods such as the Building Resistance-
mization problems. Capacitance Modeling (BRCM) toolbox [16] or Modelica-
In this work, we exploit the physical interpretability of based approaches [15]. Here, we focus on the most relevant
ARMAX models and their relation to the physical dynam- work related to our study, i.e. comparisons of different data-
ics of buildings to create physics-informed ARMAX mod- driven MPC models, practical applications of data-driven
els. We conduct a series of heating and cooling experiments MPC, and physics-informed data-driven models in the build-
on an occupied apartment (Figure 1), with the model embed- ing domain.
ded in a MPC framework with the goal of minimizing energy There are several studies on the comparison of data-
consumption while maintaining occupant comfort, and com- driven MPC methods in simulation, such as comparing MPC
pare it to experiments conducted with RF and ICNN models controllers based on resistor capacitor (RC) models and feed-
in terms of constraint satisfaction and exploitation, and in forward ANN in a simulation case study on a one-zone TRN-
terms of the computational burden, i.e the online optimiza- SYS model [39]. In the considered study, the RC models are
tion time and memory requirements. All presented model- based on knowledge of the thermal and geometrical build-
ing methods lead to convex MPC problems. Moreover, we ing features, while the ANN model is purely data-driven.
generally evaluate the energy savings achieved with MPC, Both models show similar performance in terms of open-
which amount to 26% to 49% compared to the baseline hys- loop prediction. The RC model outperforms the ANN in
teresis controller used in the apartment. In a numerical ex- closed-loop MPC in terms of comfort-constraint violation,
periment on the basis of historical measurement data from while both controllers use significantly less energy than the
the apartment, we also compare the models in terms of sam- baseline controller. However, both MPC controllers cause
ple efficiency, i.e. how much data a good model needs for comfort constraint violations in more than 24% of the oper-
training, and multi-step prediction accuracy. While all mod- ation time. There is no exact information on how the non-
els qualitatively perform well on the task of predictive con- convex ANN MPC problem is solved. In [40], a variety
trol in the application case study and outperform the base- of data-driven models based on Autoregressive with Exoge-
line hysteresis controller in terms of energy consumption, nous Input (ARX), SVM, ANN and an RC model, applied to
the physics-informed ARMAX models show a considerably three different MPC simulation case studies in EnergyPlus,

F Bünning et al.: Preprint submitted to Elsevier Page 2 of 17


Linear regression is competitive with Machine Learning in building MPC

are compared. The models are trained on the basis of a sin- informed ML (see e.g. [47, 48, 49, 50, 51, 52]), but very
gle week of training data, generated with sinusoidal inputs little work has been done so far in the domain of building
signals. In closed-loop application, all models perform sim- energy control. Physics-informed ML differs from grey-
ilarly well in the tasks of reference temperature tracking and box modeling [53, 54, 55] in the sense that ML methods
energy minimization while respecting comfort constraints. lead to input-output models, whereas in the building con-
In another study, an MPC controller with a white box model trol domain, grey-box models are usually state-based mod-
is compared to one with an RC model parametrized with els. Moreover, for grey-box models, the basic physical and
measurement data in a validated 12 zone simulation [41]. architectural structure of the considered building is modeled
While both models lead to efficient control behaviour as long by hand, which also requires a considerable amount of man-
as adequate data sets are available for system identification, ual work, and parameters are fitted to measurement data.
the MPC controller based on the white box model consumes In the field of physics-informed ML, the authors of [56]
50% less energy. The authors stress that the results should be introduce physics-constrained RNN to model the thermal
validated on a real system. The authors of [42] compare state dynamics of buildings and use information about the general
space models obtained through subspace identification with model structure of buildings to structure the neural dynam-
ARMAX models on a nine-day historical data set from a real ics models, constrain the eigenvalues of the model, and use
university building. They find that the subspace method out- penalty methods to impose physically meaningful boundary
performs the ARMAX model in terms of predictions on a conditions to the learned dynamics. The method is applied
validation data set. The models are not applied in closed- to an open-loop prediction on a data set of a real 20-zone
loop MPC. In [43], models based on Recurrent Input Convex building. The authors find that the prediction accuracy is
Neural Networks (RICNN), Recurrent (non-convex) Neural significantly improved compared to not-constrained RNN
Networks (RNN) and RC models are compared in a simula- models. The method is not tested in closed-loop MPC. In
tion case study of an EnergyPlus office building. The train- [57], a method for simultaneous plant and disturbance iden-
ing data length is ten months. Both Neural Network models tification to for buildings is presented. The authors use the
show a better performance than the RC model in open-loop Lasso method to promote sparsity and constrain coefficients
prediction. In closed-loop MPC, the RICNN consumes the to obtain linear time-invariant input–output stable models
least amount of energy, followed by RNN and RC respec- with positive DC gains. The presented method outperforms
tively. The complexity and training method for the RC model the grey-box method of [58] in open-loop room tempera-
is not discussed. ture predictions in two data sets, one of which is simulated
Other studies apply data-driven MPC for buildings in and the other one obtained from real building measurements.
practice but do not compare different modelling methods. In [59], the approach is validated in simulation in a closed-
For example, the authors of [44] use an ANN-based MPC loop experiment. To the best of our knowledge these are the
controller on a set of rooms in a real university building. only published studies on the topic of physics-informed data-
The controller saves up to 50% of energy compared to the driven models in the building control domain. There is, to
baseline controller. Other authors use switched linear input- the best of our knowledge, no study available on closed-loop
output models, which are trained based on excitation exper- implementation on a physical building.
iment data, to control a university building with an MPC In addition to the lack of physics-informed data-driven
framework [45]. In a eight day experiment, the controller models, the literature lacks comparisons of the performance
saves a significant amount of energy compared to the base- of different data-driven models in MPC for practical build-
line controller, while providing similar comfort levels. In ing applications [28]. Moreover, in cases where data-driven
[46], an ANN-based MPC controller is applied with vary- methods are indeed tested on real systems, the resulting
ing cost functions to a residential building. In multiple ex- MPC problem is often non-convex and has to be solved with
periments of durations between four hours and one day, the non-linear solvers. While this approach might be suitable for
authors show that the buildings’ demand flexibility is maxi- single building energy management, the resulting computa-
mized. We have applied models based on RF and ICNN re- tional complexity of solving the MPC problem online will
spectively with MPC in a real apartment building in Switzer- likely lead to intractable problems if more complex system
land [24, 25]. Both controllers are able to keep the room tem- architectures or applications are considered. An example of
perature between comfort bounds during the vast majority of such a problem is coordinated building control [60].
time while minimizing energy consumption. The RF-based
controller significantly reduces the cooling energy consump-
tion compared to the baseline hysteresis-controller [24]. To 2. Problem statement
the best of our knowledge, there is no comparison of different In this study, we apply MPC to buildings with the aim
data-driven MPC methods on physical systems available in of minimizing energy consumption while maintaining occu-
the literature. A review article [28] considers both aspects, pant comfort in terms of the room temperature. The build-
comparison on suitable data sets and practical validation of ings are equipped with water-based heating and cooling sys-
data-driven MPC controllers, as not appropriately addressed tems, which are present in most residential buildings and
in the literature so far. many legacy commercial buildings in central Europe. The
There is a general growth in research on physics- system is actuated by manipulating the supply valves of the

F Bünning et al.: Preprint submitted to Elsevier Page 3 of 17


Linear regression is competitive with Machine Learning in building MPC

heating/cooling emission system.1 The available sensors are art of MPC design is making design choices to master this
room temperature sensors and optionally measurements of trade-off between computation and control performance.
the heating/cooling energy consumption of the entire build-
ing, and of the supply temperature. Moreover, we assume
3. Methodology
that weather forecasts for the ambient temperature and global
solar irradiation are available. In this section, we briefly describe models developed in
MPC is a control scheme where a constrained optimiza- our earlier work, based on RF and ICNN, then introduce the
tion problem is solved repeatedly to find optimal control in- physics informed ARMAX models.
puts over a receding horizon. Besides state-space formula-
tions, the problem can be formulated with an input-output 3.1. Random Forests with linear regression leaves
model, where previous outputs, inputs and disturbances are In [24] we presented a model, extending the work of [17],
measured, and the optimization problem to describe the building dynamics in (1b) with a combination
of RF and linear regression. The model is an input-output
model 𝑦 = 𝑓 (𝑋𝑐 , 𝑋𝑑 ), where 𝑋𝑐 denotes the set of control-

𝑁−1 lable inputs (for example valve positions, supply tempera-
min 𝐽𝑘 (𝑦𝑘+1 , 𝑢𝑘 ) (1a) tures, etc.), and 𝑋𝑑 denotes the set of uncontrollable inputs,
𝑢,𝑦
𝑘=0 i.e. disturbances (for example ambient temperature, solar ir-
s.t. 𝑦𝑘+1 = 𝑓 (𝑦𝑘− , 𝑢𝑘− , 𝑑𝑘− ) (1b) radiation, time features, etc.) and previously measured room
(𝑦𝑘+1 , 𝑢𝑘 ) ∈ (𝑘+1 , 𝑘 ) (1c) temperatures.
∀𝑘 ∈ [0, ..., 𝑁 − 1], The model is built in two steps. First, a random forest
𝑔(𝑋𝑑 ) is built, which maps the uncontrollable inputs 𝑋𝑑 to a
is solved at discrete time instants. Here, the variables 𝑦, 𝑢 finite set of leaves 1, ..., 𝐿. Second, in each leaf of the forest,
and 𝑑 denote the system outputs, control inputs and distur- a linear regression ℎ𝑖 (𝑋𝑐 ) with 𝑖 ∈ 1, ..., 𝐿 is performed on
bances respectively. The variable 𝑘 denotes the time step in the basis of the controllable inputs, which maps 𝑋𝑐 to 𝑦. The
the horizon 𝑁, 𝐽𝑘 is the stage cost, and 𝑓 denotes the model resulting prediction function is 𝑓 (𝑋𝑐 , 𝑋𝑑 ) = ℎ𝑔(𝑋𝑑 ) (𝑋𝑐 ).
describing the system dynamics as a function of autoregres- When the model is applied in MPC as (1b), it is not ap-
sive terms of outputs, and moving average terms of inputs plied recursively. Instead, for each timestep 𝑘 in the hori-
and disturbances (or their forecasts), denoted by the sub- zon 𝑁, a separate model 𝑓𝑘 is built. Here, only previ-
script −. Output and input constraints are formulated with ously measured outputs, but not previously predicted out-
the sets 𝑘 and 𝑘 . puts are used as model inputs to keep the optimization
Problem (1) is solved every time a new measurement of problem
( convex. For example, we would ) define 𝑦1 =
the output is available; after each optimization, the first el- 𝑓1 𝑋𝑐 = (𝑢0 , 𝑢−1 ), 𝑋𝑑 = (𝑦0 , 𝑦−1 , 𝑑0 , 𝑑−1 ) for the first pre-
( )
ement of the optimal input sequence, 𝑢∗0 , is applied to the diction, but 𝑦2 = 𝑓2 𝑋𝑐 = (𝑢1 , 𝑢0 , 𝑢−1 ), 𝑋𝑑 = (𝑦0 , 𝑑1 , 𝑑0 )
system and the process is repeated. Input-output models are for the second prediction step; i.e. 𝑓2 is not a function of
suitable for building control, as there are usually no con- 𝑦1 , only of 𝑢1 . The optimization problem is solved by look-
straints on hidden system states (for example wall temper- ing up the leaves in the forest on the basis of measurements
atures). and forecasts of 𝑋𝑑 and collecting the appropriate functions
Problem (1) describes a basic MPC scheme, but many ℎ𝑖 (𝑋𝑐 ) first, and second by solving the resulting optimization
alternatives have been explored in the literature, for exam- problem. For a more detailed description of the approach,
ple applying multiple steps of the optimal sequence before we refer to the original sources [24, 17].
repeating the optimisation, treating uncertainty in the dis-
turbance forecast in a worst-case or stochastic way, using 3.2. Input convex neural networks
state space formulations for the system dynamics and state In [25], we extended the work of [26], to describe build-
estimators during controller application, etc. The interested ing dynamics with a Neural Network that allows a convex
reader is referred to [61] for information on many of these formulation of problem (1) in the absence of lower out-
alternatives. put constraints. The model is an input-output model 𝑦 =
The control performance generally improves with solv- 𝑓 (𝑋𝑐𝑣𝑥 , 𝑋𝑛𝑐𝑣𝑥 ). The neural network architecture developed
ing (1) more frequently (i.e. the controller has a smaller sam- in [26, 25] ensures that the output 𝑦 is convex with respect
pling time) and a larger prediction horizon 𝑁. This, how- to 𝑋𝑐𝑣𝑥 (for example decision variables such as room tem-
ever, implies that less time is available to solve a more com- peratures and control inputs), but not necessarily with re-
plex optimisation problem. As convex optimization prob- spect to 𝑋𝑛𝑐𝑣𝑥 (for example disturbances such as solar ir-
lems can usually be solved more efficiently, formulations radiation or ambient temperature). Furthermore, when the
where the cost and constraints in (1) are convex with respect network is applied recursively, i.e. 𝑦1 = 𝑓 (𝑋𝑐𝑣𝑥,1 , 𝑋𝑛𝑐𝑣𝑥,1 )
to the decision variables are often preferable. Indeed, the and 𝑦2 = 𝑓 (𝑋𝑐𝑣𝑥,2 = {𝑋̃ 𝑐𝑣𝑥,2 , 𝑦1 }, 𝑋𝑛𝑐𝑣𝑥,2 ), the output of
the second time step 𝑦2 is still convex with respect to the el-
1 The framework both supports continuous valves and on/off valves, as
ements of the convex input of the first time step 𝑋𝑐𝑣𝑥,1 . Here,
a continuous control signal can be translated to on/off commands through
pulse-width modulation on a lower control level.
𝑋̃ 𝑐𝑣𝑥,2 denotes the convex inputs that are not related to the
previous time step, i.e. the control input of step 2. If all

F Bünning et al.: Preprint submitted to Elsevier Page 4 of 17


Linear regression is competitive with Machine Learning in building MPC

model inputs are contained in 𝑋𝑐𝑣𝑥 , then there is no need to 3.3.2. Modeling solar gains 𝑄̇ 𝑠𝑜𝑙
include 𝑋𝑐𝑛𝑣𝑥 in the formulation, and the model is referred A simple physics-based model for solar gains through
to as a Fully Input Convex Neural Network (FICNN); oth- windows is given by
erwise, it is called a Partially Input Convex Neural Network
(PICNN). With reference to the dynamics in (1b), the outputs
cos(𝛽)
𝑦 and inputs 𝑢 are assigned to 𝑋𝑐𝑣𝑥 , and all disturbances 𝑑 𝑄̇ 𝑠𝑜𝑙 = 𝐴𝑤𝑖𝑛 sin(𝛼 − 𝛼0 ) 𝐼 , (3)
can be assigned to 𝑋𝑛𝑐𝑣𝑥 ; the model is therefore generally a sin(𝛽) ℎ𝑜𝑟
PICNN. where 𝐴𝑤𝑖𝑛 is the window surface area, and the angles 𝛼 and
Thanks to the structure imposed on the network, when 𝛽 denote the azimuth (i.e. the horizontal angle with respect
applied in the MPC problem (1), constraint (1b) is convex to north) and elevation (i.e. the vertical angle with respect
non-decreasing with respect to the decision variables. It can to earth’s surface) of the sun respectively. The offset 𝛼0 de-
then be shown that, if the input constraints in (1c) and the notes the orientation of the window and 𝐼ℎ𝑜𝑟 is the horizon-
cost function (1a) are convex, problem (1) is convex, as long tal global irradiation, which is an input commonly available
as the outputs are box-constrained and no lower bounds are from a weather forecast. Note that 𝑠𝑖𝑛(𝛼 − 𝛼0 ) can become
imposed. We note however, that in many practical cases, the negative, which means that the direction of the irradiation
problem could remain convex also in the presence of lower through the surface is negative. For the given case of a win-
output constraints due to the monotonicity of the dynamics. dow, we therefore take max(0, 𝑠𝑖𝑛(𝛼 − 𝛼0 )). Equation (3)
shows that the gains through solar irradiation are a non-linear
3.3. Physics-informed ARMAX models function of the window orientation and the angles 𝛼 and 𝛽,
The models presented in subsections 3.1 and 3.2 fall into which are themselves highly non-linear functions of time.
the family of Machine Learning methods. In the case of To embed 𝑄̇ 𝑠𝑜𝑙 in our model, we assume that the second
modelling building dynamics, it is tempting to use them to
term of (3), 𝐼𝑣𝑒𝑟𝑡(𝑡) = cos(𝛽) 𝐼 , which denotes the irradia-
learn the building’s behaviour, as some dynamics-related ef- sin(𝛽) ℎ𝑜𝑟
fects are difficult to model from first principles for individual tion on a vertical surface following the sun, is given as an in-
buildings. An example is the heating gain through windows put. This is a reasonable assumption as 𝐼ℎ𝑜𝑟 can be obtained
as a function of time, global solar irradiation, window size, from a weather forecast and 𝛽 is a function of time and loca-
and window orientation. However, the ML methods usually tion. We model the first term, 𝐴𝑤𝑖𝑛 sin(𝛼 − 𝛼0 ), with 𝜏 time
do not encode constraints coming from building physics, for varying coefficients [𝜃𝑠𝑜𝑙,1 ... 𝜃𝑠𝑜𝑙,𝜏 ], where 𝜏 represents one
example the law that heat flows from warm to cold, the first day:
law of thermodynamics, etc. In the following, we aim to con-
struct a physics-informed data-driven model, which happens
𝑄̇ 𝑠𝑜𝑙 = [𝜃𝑠𝑜𝑙,1 ... 𝜃𝑠𝑜𝑙,𝜏 ][𝐼𝑣𝑒𝑟𝑡,1 ... 𝐼𝑣𝑒𝑟𝑡,𝜏 ]𝑇 , (4)
to be linear, as most dynamic effects on the thermal mass of
a building are indeed linear. where [𝐼𝑣𝑒𝑟𝑡,1 ... 𝐼𝑣𝑒𝑟𝑡,𝜏 ] is a one-hot encoding [62] of 𝐼𝑣𝑒𝑟𝑡
with respect to discrete time-periods 1, ..., 𝜏:
3.3.1. Modelling thermal zones
The evolution of the temperature 𝑇 of a lumped mass in
{
a building, for example a thermal zone, can be described by 𝐼𝑣𝑒𝑟𝑡(𝑡) , if 𝑖 ≥ 𝑡 > 𝑖 + 1
𝐼𝑣𝑒𝑟𝑡,𝑖 = (5)
0, otherwise.
𝑑𝑇
𝑚𝑐𝑝 = 𝑄̇ 𝑎𝑚𝑏 + 𝑄̇ 𝑛 + 𝑄̇ 𝑠𝑜𝑙 + 𝑄̇ 𝑜𝑐𝑐 + 𝑄̇ 𝑎𝑐𝑡 , (2)
𝑑𝑡 This way of modelling the solar irradiation creates 𝜏 in-
put variables that are zero during most times of the day, but
where 𝑚 and 𝑐𝑝 denote the mass and specific heat capacity are equal to 𝐼𝑣𝑒𝑟𝑡(𝑡) for fixed periods. For example, in the case
of the mass respectively. The terms 𝑄̇ denote incoming and of 𝜏=4 with time periods of equivalent length, 𝐼𝑣𝑒𝑟𝑡,1 attains
outgoing energy flows, i.e heat flows from and to ambient 𝐼𝑣𝑒𝑟𝑡(𝑡) for the first six hours of the day, and is zero for all
𝑄̇ 𝑎𝑚𝑏 and neighboring zones 𝑄̇ 𝑛 , by solar irradiation 𝑄̇ 𝑠𝑜𝑙 , by other times, 𝐼𝑣𝑒𝑟𝑡,2 attains 𝐼𝑣𝑒𝑟𝑡(𝑡) for the period of 6 am to 12
occupancy 𝑄̇ 𝑜𝑐𝑐 and by actuators 𝑄̇ 𝑎𝑐𝑡 (such as radiators, air pm, and zero otherwise, etc. The solar gains 𝑄̇ 𝑠𝑜𝑙 are now a
conditioning, etc.) respectively. The terms 𝑄̇ 𝑎𝑚𝑏 and 𝑄̇ 𝑛 are linear function of the easy-to-obtain inputs 𝐼𝑣𝑒𝑟𝑡,𝑡1 ... 𝐼𝑣𝑒𝑟𝑡,𝜏 .
linear functions of 𝑇 , for example 𝑄̇ 𝑎𝑚𝑏 = 𝜃𝑎𝑚𝑏 (𝑇𝑎𝑚𝑏 − 𝑇 ), A validation of this modelling approach compared to the
where 𝜃𝑎𝑚𝑏 is a constant; 𝑄̇ 𝑛 is given by a sum of similar physical model of (3), on the data set later used in the case
linear functions with 𝑇𝑎𝑚𝑏 replaced by the temperatures of studies, is shown in Figure 9 in the Appendix for 𝜏 = 9. The
the neighbouring zones. The influence of occupancy 𝑄̇ 𝑜𝑐𝑐 coefficient of determination 𝑅2 is 0.96 for both the training
is part of ongoing research and is neglected for this particu- and the testing set. Note that the number of one-hot encoded
lar model, partly because occupancy forecasts were not be- inputs 𝜏 does not relate to the sampling time of the MPC; it
ing available in the case study. We will treat the remaining only needs to be sufficiently high to reach a reasonable fit of
terms, 𝑄̇ 𝑠𝑜𝑙 and 𝑄̇ 𝑎𝑐𝑡 , in the following. 𝑄̇ 𝑠𝑜𝑙 .

F Bünning et al.: Preprint submitted to Elsevier Page 5 of 17


Linear regression is competitive with Machine Learning in building MPC

3.3.3. Modeling actuator gains 𝑄̇ 𝑎𝑐𝑡 where we assume a single neighbouring zone to simplify the
For most relevant heating and cooling systems, such as notation; similar equations are obtained with the other op-
radiators, floor heating and (neglecting the water and vapour tions for modelling 𝑄̇ 𝑎𝑐𝑡 . To avoid the bilinearity in the valve
content) air conditioning units, the energy transferred from opening 𝑏 and the zone temperature 𝑇 , the zone temperature
an actuator to a thermal zone can be described by an equation is replaced by an approximation 𝑇̄ , which can be obtained
of the form from the last measured room temperature for example. Af-
ter performing Euler discretization, the discrete time thermal
zone dynamics can be written as
𝑄̇ 𝑎𝑐𝑡 = 𝑚̇ 𝑓 𝑐𝑝,𝑓 (𝑇𝑠𝑢𝑝 − 𝑇𝑟𝑒𝑡 ). (6)
( )
Here, 𝑚̇ 𝑓 and 𝑐𝑝,𝑓 denote respectively the mass flow and spe- Δ𝑡 𝜃𝑎𝑚𝑏 Δ𝑡 𝜃𝑛
𝑇𝑘+1 = 1 − − 𝑇𝑘
cific heat capacity of the fluid (usually water or air), and 𝑇𝑠𝑢𝑝 𝑚𝑐𝑝 𝑚𝑐𝑝
and 𝑇𝑟𝑒𝑡 denote supply and return temperatures. ( ) ( )
Δ𝑡 𝜃𝑎𝑚𝑏 Δ𝑡 𝜃𝑛
There are a variety of options to model 𝑄̇ 𝑎𝑐𝑡 . In an ideal + 𝑇𝑎𝑚𝑏,𝑘 + 𝑇𝑛,𝑘
case, it is directly accessible by measuring 𝑚, ̇ 𝑇𝑠𝑢𝑝 and 𝑇𝑟𝑒𝑡 𝑚𝑐𝑝 𝑚𝑐𝑝
( 𝜏 ( ) ) (10)
and can be used directly in (2). Unfortunately in many build- ∑ Δ𝑡 𝜃𝑠𝑜𝑙,𝑡𝑖
ings measurements at this level are not available. In such + 𝐼𝑣𝑒𝑟𝑡,𝑡𝑖
𝑚𝑐𝑝
cases, one has several options for inferring Q from the avail- (
𝑡𝑖 =𝑡1
)
able measurements. One option is by measuring the total Δ𝑡 𝜃𝑎𝑐𝑡
+ 𝑏(𝑇𝑠𝑢𝑝 − 𝑇̄ )𝑘 ,
energy consumption of a building and allocating portions of 𝑚𝑐𝑝
it based on design mass flows to individual rooms; this is
the approach we follow for 𝑄̃̇ 𝑎𝑐𝑡,𝑖 in Section 4. Another is to where the subscripts 𝑘 and 𝑘 + 1 denote the current and sub-
model 𝑄̇ 𝑎𝑐𝑡 as a linear function of the mass flow or a valve sequent time step respectively, and Δ𝑡 is the sampling time.
position 𝑏: By reducing all constants in (10) to coefficients 𝜃,
̃ the ex-
pression can be further simplified to

𝑄̇ 𝑎𝑐𝑡 = 𝜃̄ 𝑚̇ ≈ 𝜃𝑏. (7)


𝑇𝑘+1 =𝜃̃𝑎𝑢𝑡𝑜 𝑇𝑘 + 𝜃̃𝑎𝑚𝑏 𝑇𝑎𝑚𝑏,𝑘 + 𝜃̃𝑛 𝑇𝑛,𝑘
( 𝜏 )
This assumes that (𝑇𝑠𝑢𝑝 − 𝑇𝑟𝑒𝑡 ) is approximately constant, ∑ (11)
which is a reasonable assumption for example in the case of + 𝜃̃𝑠𝑜𝑙,𝑡𝑖 𝐼𝑣𝑒𝑟𝑡,𝑡𝑖 + 𝜃̃𝑎𝑐𝑡 𝑏(𝑇𝑠𝑢𝑝 − 𝑇̄ )𝑘 .
heating with a high supply temperature. In the case of using 𝑡𝑖 =𝑡1
the valve position 𝑏 and not directly the mass flow 𝑚, ̇ the
We note that for a sufficiently small time step Δ𝑡, all coeffi-
assumption that their relation is linear also has to be made.
cients 𝜃̃ are positive since the masses, specific heat capacities
A last option is suitable when both valve position 𝑏 and
and heat transfer coefficients are all positive.3
𝑇𝑠𝑢𝑝 are measured. The transferred energy then follows
The temperatures can be stacked in a state vector 𝑥, in-
puts (𝑏(𝑇𝑠𝑢𝑝 − 𝑇̄ )) and disturbances (𝑇𝑎𝑚𝑏 , 𝐼𝑣𝑒𝑟𝑡,𝑡𝑖 ) can be
𝑄̇ 𝑎𝑐𝑡 = 𝜃𝑏(𝑇𝑠𝑢𝑝 − 𝑇 ), (8) stacked in the input and disturbance vectors 𝑢 and 𝑑, and a
conventional linear state space system of the form 𝑥𝑘+1 =
where 𝑇 is the current temperature of the zone itself2 . For A𝑥𝑘 + B𝑢 𝑢𝑘 + B𝑑 𝑑𝑘 , 𝑦𝑘+1 = C𝑥𝑘 can be formulated, where
air-based systems, the assumption 𝑇𝑟𝑒𝑡 = 𝑇 is always reason- the output vector y collects all the entries of 𝑥 (zone tem-
able. For water-based systems, the assumption holds if the peratures) that can be measured. The influence of the hid-
heat transfer surfaces are large and the mass flows are low. den states can then be modelled implicitly by a convolution
Also, the assumption that 𝑚̇ and 𝑏 have a linear relation has of the previous outputs 𝑦 (i.e. the measured zone tempera-
to hold again. All options assume that 𝑐𝑝,𝑓 is constant. In tures), inputs and disturbances. This results in an ARMAX
the case studies in Sections 5 and 6, we will explore several model of the form
of these options for 𝑄̇ 𝑎𝑐𝑡 .

3.3.4. Positivity constraints for building dynamics 𝑦𝑘+1 = Θ [𝑦𝑘 ... 𝑦𝑘−𝛿 𝑢𝑘 ... 𝑢𝑘−𝛿 𝑑𝑘 ... 𝑑𝑘−𝛿 ]𝑇 , (12)
By substituting all 𝑄̇ terms in (2) using (8) for 𝑄̇ 𝑎𝑐𝑡 , and
neglecting occupancy, the dynamics can be rewritten as which can be used for the dynamics in (1b). Here Θ is the
vector of regression coefficients for each thermal zone and 𝛿
determines the number of autoregressive and moving aver-
𝑚𝑐𝑝
𝑑𝑇
=𝜃𝑎𝑚𝑏 (𝑇𝑎𝑚𝑏 − 𝑇 ) + 𝜃𝑛 (𝑇𝑛 − 𝑇 ) age steps.4 Similar to the state space system, the elements of
𝑑𝑡 ( 𝜏 ) Θ are positive and can be found through non-negative least
∑ (9) squares regression.
+ 𝜃𝑠𝑜𝑙,𝑡𝑖 𝐼𝑣𝑒𝑟𝑡,𝑡𝑖 + 𝜃𝑎𝑐𝑡 𝑏(𝑇𝑠𝑢𝑝 − 𝑇̄ ),
3 Here,conventional sampling times for building MPC, for example 15
𝑡𝑖 =𝑡1
or 30 minutes, are sufficient to keep 𝜃̃𝑎𝑢𝑡𝑜 positive.
2 The 4 Generally, 𝛿 can be different for 𝑦 and 𝑢, 𝑑.
input is therefore linear in the system state.

F Bünning et al.: Preprint submitted to Elsevier Page 6 of 17


Linear regression is competitive with Machine Learning in building MPC
Tsup

bi bR

QUMAR

Figure 3: Heating system of the UMAR unit in NEST. The


heating loop is connected to the central heating system via a
heat exchanger. The heating and cooling panels in each room
are controlled with individual on/off valves.
Figure 2: Rendering of the UMAR unit in NEST with both
bedrooms marked. © Werner Sobek.

ergy consumption of the unit, 𝑄̇ UMAR , is measured with


the help of an Energy Valve™[66]. Each room is equipped
3.4. Model properties
with at least one heating/cooling ceiling panel, which is con-
The presented models have different properties in terms
trolled by individual on/off valves 𝑏𝑖 . There is a central
of expressiveness and the complexity of the resulting MPC
pump that provides pressure, as long as one of the valves
problem. The ARMAX model is limited to (1b) being lin-
is open. The supply temperature 𝑇𝑠𝑢𝑝 is regulated by ad-
ear in all variables. RF are generally more expressive, as
justing the mass flow on the NEST heating grid side of the
they are piecewise constant in the disturbances and piece-
heat exchanger. The same system is used for cooling dur-
wise linear in the inputs. ICNN are also more expressive
ing warm days through a second heat exchanger connected
than ARMAX, being convex in the inputs, and even less re-
to the NEST cooling grid. As the pump delivers a constant
strictive for disturbances. Generally it could be expected that
pressure and the valves are either fully open or closed, the
more expressive models lead to a more accurate representa-
design mass flows5 for each heating/cooling panel 𝑚̇ 𝑖 can be
tion of the system dynamics as long as they can be trained
used to calculate the amount of energy transferred to each
to optimality and there is enough data to avoid overfitting.
This is studied in Section 6 below. room 𝑄̃̇ 𝑎𝑐𝑡,𝑖 through
Compared to ICNN, ARMAX and RF are generally more
lightweight in terms of online computation, when applied in 𝑚̇ 𝑏
𝑄̃̇ 𝑎𝑐𝑡,𝑖 = 𝑄̇ UMAR ∑ 𝑖 𝑖 , (13)
the MPC problem (1). For example, if (1a) is quadratic and 𝑗∈ 𝑚̇ 𝑗 𝑏𝑗
(1b) linear in the decision variables, the resulting problem
is a QP, for which very efficient solvers are available. By where  denotes the set of all rooms in the unit. All mea-
contrast, ICNN lead to a general convex optimisation prob- surements, including the individual room temperatures are
lem, that require more generic methods like interior point or stored in an SQL database with a sampling time of one
gradient decent. To get a convex problem, ICNN are limited minute. A weather forecast, sampled in one-hour periods,
to box constraints with only an upper bound when it comes for the ambient temperature and global solar irradiation is
to the output variables in (1c). The other two models allow available from the national weather service, Meteo Swiss.
general convex output constraints. All actuators can be controlled via OPC-UA software clients
[67]. During standard operation, the room temperature is
controlled by a hysteresis baseline controller that regulates
4. Testbed the room temperature between an occupant-decided set point
We use the Urban Mining and Recycling (UMAR) unit and 1 °C below. An example of a temperature trajectory
[63, 64] of the NEST building [65] at Empa, Dübendorf, of bedroom 2 and the corresponding control input with the
Switzerland as a test bed in our case studies. The unit, shown baseline controller is shown in Figure 10 in the Appendix.
in Figures 1 and 2, is an apartment built to demonstrate the
circular economy in the building construction industry and
5. Experiment case study
is constructed from recycled material or material that can be
recycled completely after dismantling the unit. It comprises Over the course of two years, we have implemented
two bedrooms and one living/kitchen area with large south- MPC, based on RF, ICNN and physics-informed ARMAX
east facing windows, two bathrooms, an entrance area and a models, for 156 full days of experiments in the two bedrooms
technical room. The two bedrooms have identical floor plans of the UMAR unit. In the following, we will discuss the
and furniture. The apartment is considered to be a “living model configuration and training, present example closed-
lab” and is occupied by two persons, who live there. loop trajectories of the controllers, and analyse the energy
The unit is equipped with a water-based heating and 5 We introduce this way of calculating the transferred energy in Section
cooling system (Figure 3). The system is connected to the 4 rather than 3, and mark the variable with a tilde, as the design mass flows
NEST heating grid via a heat exchanger and the total en- of each individual zone are commonly not known in a building and specific
to this case study. They are specified by the heating/cooling system installer.

F Bünning et al.: Preprint submitted to Elsevier Page 7 of 17


Linear regression is competitive with Machine Learning in building MPC

consumption compared to the base-line controller. For each the change of room temperatures instead of directly predict-
controller type a different model was trained for each bed- ing temperatures. For PICNN, as non-convex inputs, au-
room. toregressive terms of the solar irradiation, the temperature
difference with respect to neighboring rooms and the sine-
5.1. Model and controller configuration encoded time of day (but not time of year) were chosen. As
All models use the same training data set of 2018-05-23 convex inputs, autoregressive terms of the change of room
to 2019-05-28 (370 days), generated during normal opera- temperature, the temperature difference between room and
tion of the building with the baseline hysteresis controller. ambient, and the heating/cooling control input were chosen.
In this subsection, we define which inputs and outputs each In the case of FICNN, all the above features are convex in-
model uses, how the model hyperparameters were deter- puts. The sampling time was also decided on with cross val-
mined, and how many degrees of freedom each model has. idation and is 20 minutes for predictions up to one hour and
To configure the RF model, extensive feature engineer- 180 minutes beyond [70].
ing and hyperparameter tuning was conducted [24]. For The hyperparameters of an ICNN are the training
the feature engineering, domain knowledge was used to pre- method, the step-size of the training method, number of
select certain model inputs and disregard others. With these training epochs, nodes per layer, number of layers, and an
features, models were then trained on the first 70% of the offset in the ReLu activation functions. The hyperparame-
data and tested on the remaining data. As a result of feature ters were optimized with line searches applied to the k-fold
engineering, it was found that predicting room temperature cross validation. The resulting networks have approximately
differences Δ𝑥 (or Δ𝑇 ), i.e. the change of room temperature 1000 degrees of freedom (i.e. parameters to fit). The models
between two sampling steps, leads to better model accuracy are implemented with Keras [71] in Python 3.
than directly predicting room temperatures. This has no ef- The inputs for the ARMAX model directly follow from
fect on the convexity of the MPC problem (1). As model the physical structure described in Section 3. They comprise
inputs for the forests, autoregressive terms of Δ𝑥, of tem- autoregressive terms for the room temperature7 , moving av-
perature differences between rooms and neighboring rooms, erage terms for neighboring zones, the ambient temperature,
of window opening times, of the horizontal solar irradiation, the one-hot encoded global solar irradiation and for the con-
and of the ambient temperature were chosen. We also use the trol input. The only hyperparameters to be tuned are 𝜏, the
time of the day and month, encoded as cosine and sine func- number of one-hot inputs of the solar irradiation, and 𝛿, the
tions6 , to capture any time-related influences on the room number of autoregressive terms. These were chosen to be
temperatures (for example, occupants entering the rooms ev- 𝜏 = 9 and 𝛿 = 3 after preliminary experiments. Our AR-
ery day at the same time) and to identify relations between MAX models have (𝛿 + 1)(4 + 𝜏) degrees of freedom, i.e.
time and global solar irradiation (similar to (4)). For the lin- 52 for our configuration. The models are implemented with
ear regression in the forest leaves, moving average terms of Scikit-learn [69] in Python 3.
the control input 𝑄̃̇ 𝑎𝑐𝑡,𝑖 are used. The sampling time was set All models are applied as the model for the building dy-
to 30 minutes based on preliminary numerical studies. namics (1b) in the MPC optimization problem (1). After
The hyperparameters of a random forest are mainly the specifying the cost function and constraints, this leads to the
number of trees per forest and the minimum number of sam- optimization problem
ples per leaf. To find suitable hyperparameters, we applied
line searching, where each parameter is varied while keeping
the others constant. The procedure is not iterative, i.e. each ∑
𝑁−1
min (𝑢𝑘 𝑅𝑢𝑘 + 𝜆𝜖𝑘+1 ) (14a)
parameter is just updated once. The resulting model has 200 𝑢,𝑦,𝜖
𝑘=0
trees per forest and a minimum of 200 samples per leaf.
s.t. 𝑦𝑘+1 = 𝑓 (𝑦𝑘− , 𝑢𝑘− , 𝑑𝑘− ) (14b)
The degrees of freedom of a random forest with linear
regression grows with the number of training samples 𝑆, 𝑦𝑚𝑖𝑛 − 𝜖𝑘+1 ≤ 𝑦𝑘+1 ≤ 𝑦𝑚𝑎𝑥 + 𝜖𝑘+1 (14c)
due to the automatic scaling through the minimum number 𝜖𝑘+1 ≥ 0 (14d)
𝑆
of samples per leaf, and approximately follows 3 200 (with 𝑢𝑚𝑖𝑛 ≤ 𝑢𝑘 ≤ 𝑢𝑚𝑎𝑥 (14e)
200 being the number of samples per leaf). For a sampling
∀𝑘 ∈ [0, ..., 𝑁 − 1],
time of 30 minutes, this amounts to 270 for the full training
set. The models are implemented with Scikit-learn [69] in where 𝜖 is a slack variable introduced to ensure feasibility. A
Python 3. quadratic weight for the control input 𝑅 and a linear weight
The configuration of the ICNN models is described in 𝜆 for the comfort slack variable are used in the cost func-
[25] and in more detail in [70]. For feature engineering, a tion; the weights and prediction horizon are specified be-
k-fold cross validation with k=12 was performed on the en- low for each experiment. A quadratic cost function is cho-
tire data set, with 9 folds being used for training and 3 for sen because, based on preliminary experiments [70, 72], it
validation. After this, the networks were chosen to predict provides a good balance between minimizing energy con-
6 Both cosine and sine are used, to have distinct inputs for each time, sumption and avoiding peaks, and yields a smoother control
as sine and cosine functions have the same function value twice per period 7 For linear models, the choices of using absolute temperatures or tem-
[68]. We can also fit any phase offset with a linear parametrization.
perature differences both lead to the same model accuracy.

F Bünning et al.: Preprint submitted to Elsevier Page 8 of 17


Linear regression is competitive with Machine Learning in building MPC

Bounds ARMAX Bedroom 1 FICNN Bedroom 2


temperature 26
24 ③ ④
Room


in °C
(a)


22
1.0
control input
Relative

0.5
(b)

0.0
temperature

30
Ambient
in °C
(c)

20

1000
irradiation
in W/m2
Solar

500
(d)

0
2020-08-18 2020-08-19 2020-08-20 2020-08-21 2020-08-22 2020-08-23
Timestamp

Figure 4: Cooling experiment with ARMAX in bedroom 1 (blue) and FICNN in bedroom 2 (orange). (a): Temperature in the
two bedrooms. The comfort bounds are shown in dashed black. In 1 , 3 and 4 the connection between the controller and
actuators was lost for a short time. In 2 , the otherwise closed window blinds were automatically opened due to strong wind,
which lead to the system not being able to reject the solar gains, even at maximum cooling power. (b): Relative control input,
i.e. the fraction of time where the maximum control input is applied during one control step. (c): Measured ambient temperature
at the experiment site. (d): Global solar irradiation at the experiment site.

input trajectory compared to a linear cost function. The com- model is less conservative. It keeps the room temperature
fort constraints 𝑦𝑚𝑖𝑛 and 𝑦𝑚𝑎𝑥 are time varying and will also closer to the upper comfort constraint during the night, and
be reported with the results. The control input is applied meets the lowered comfort constraint at 22:00 just in time or
to the valves of the UMAR unit with pulse-width modula- violates it by a fraction of a degree for a short period of time.
tion (PWM). The limits for the control input are therefore Day 2020-08-19 is characteristic of the different behaviour
𝑢𝑚𝑖𝑛 = 0 and 𝑢𝑚𝑎𝑥 = 1. The resulting problem is a Quadratic of the two controllers. Here, the FICNN-controller applies
Program in the case of the ARMAX and RF models (see dis- control action during the second half of the day although
cussion in Sections 3.1 and 3.4), which we solve with the the temperature is already relatively low, (which even leads
QP solver of CVXOPT [73] in Python 3. For the ICNN, the to slight violations of the lower comfort constraints a few
problem results in a convex problem without direct access to hours later,) while the ARMAX-controller slightly violates
the function derivatives. We solve it with the COBYLA [74] the upper comfort constraint. Experiments with the PICNN
solver of SciPy [75] in Python 3. showed similar results to those conducted with the FICNN
(Data omitted in the interest of space).
5.2. Example closed-loop experiments To compare the behaviour of the RF controller in a sim-
To compare the closed-loop behaviour of the ARMAX ilar setting8 , we performed a cooling experiment with an
controller and an FICNN controller, we conducted a cooling RF controller applied to bedroom 1 (controller properties:
experiment on NEST with the ARMAX model (controller N=6h, R=1, 𝜆=100); to investigate the effect of the cost
properties: N=7h, R=1, 𝜆=100, 𝛿=7, Δ𝑡=30 min, actuation: weights we also applied the same controller to bedroom 2
valve opening) applied to bedroom 1 and a FICNN (con- with controller properties N=6h, R=100, 𝜆=100. Figure 5
troller properties: N=7h, R=1, 𝜆=100) applied to bedroom demonstrates that the behaviour is very similar to the one ob-
2. Note that the relatively short horizon for a building appli- served with the ARMAX model. The room temperature is
cation is sufficient in the given case because the considered kept close to the upper comfort constraint during the night,
apartment is light-weight and the heating/cooling emission the controller exploits the relaxed comfort constraints dur-
system is fast. The controller does not benefit from a longer ing the day to save energy, and starts cooling early enough
prediction horizon, as preliminary experiments have shown 8 In general, building MPC experiments are not reproducible due to
[72]. The results in Figure 4 show that both controllers keep changing (and uncontrollable) environmental conditions. Since bedrooms
the temperature within the comfort constraints most of the 1 and 2 are nearly identical architecturally, this experimental configuration
time and exploit the relaxed constraints during the day to represents the most feasible way to compare two controllers with similar
save energy. However, the controller using the ARMAX environmental conditions.

F Bünning et al.: Preprint submitted to Elsevier Page 9 of 17


Linear regression is competitive with Machine Learning in building MPC

Bounds RFR= 1 Bedroom 1 RFR = 100Bedroom 2


temperature 26
24
Room


in °C
(a)

22
1.0
control input
Relative

0.5
(b)

0.0
30
temperature
Ambient
in °C
(c)

20

1000
irradiation
in W/m2
Solar

500
(d)

0
2019-07-29 2019-07-30 2019-07-31 2019-08-01 2019-08-02
Timestamp

Figure 5: Cooling experiment with RF in bedroom 1 (blue) and bedroom 2 (orange) with different weights on the control input
cost. (a): Temperature in the two bedrooms. The comfort bounds are shown in dashed black. (b): Relative control input, i.e.
the fraction of time where the maximum control input is applied during one control step. (c): Measured ambient temperature at
the experiment site. (d): Global solar irradiation at the experiment site.

to meet the lowered comfort constraints at 22:00. The dif- the optimized control input could mitigate the issue.
ference in relative weighting between costs for control input Similar experiments in UMAR have been conducted for
and constraint violations does not seem to significantly in- the heating case with the RF and the ARMAX controller.
fluence behaviour. (We have not conducted heating experiments with the ICNN
In general, the experiments demonstrate that all con- models due to the MPC problem not being convex at the
trollers have reasonable behaviour, with the ICNN-based lower comfort constraint [25].) The general behaviour of
controllers being more conservative compared to the AR- the controllers in the heating experiments is similar to the
MAX and RF-based controller. This is possibly due to un- one observed in the cooling experiments. The results there-
derestimating the influence of the control input or overesti- fore do not add anything new to the discussion, other than
mating the thermal capacity of the system. Such effects are the observation that predictive control in general also works
discussed in detail in [76]. Although this issue is more pro- in the heating case with both model types. We therefore re-
nounced for the ICNN, it is also visible for RF and ARMAX fer the interested reader to the linked data repository for data
to a lesser extent during times where the comfort constraints on these experiments, see Section Data Availability.
are relaxed but the controller is aiming for the lowered up-
per comfort constraint at 22.00, for example at 1 in Figure 5.3. Energy consumption
5. Here, the controllers often apply a high control input in We compare the energy consumption of the MPC-based
one step, which cools down the room temperature more than controllers to the baseline controller on the basis of the con-
necessary, and then do not apply any control input in the cept of Heating Degree Solar Days (HDSD) and Cooling De-
consecutive time step, which lets the room temperature rise gree Solar Days (CDSD), explained in the following.
again. This is likely a result of the training data being cor-
related due to the underlying feedback controller, where the 5.3.1. HDSD and CDSD
effects of control input and disturbance on the room temper- Heating Degree Days (without Solar) are commonly
ature cancel out. For example in the heating case, cold ambi- used to quantify the energy consumption of a building as a
ent temperatures lead to high heating power, warm ambient function of the ambient conditions [78]. Here, a base tem-
temperatures lead to low heating power. For a well-regulated perature 𝑇𝑎𝑚𝑏,𝑏 is defined (usually assumed to be the ambient
system, the regression is ill-posed because the underlying temperature at which no heating is necessary), and it is as-
data is not persistently exciting [77]. Besides the obvious sumed that the daily heating energy consumption of a build-
solution of generating training data with an uncorrelated in- ing is proportional to the difference between the daily aver-
put signal, tracking the predicted temperature trajectory with
a lower-level feedback controller instead of directly applying

F Bünning et al.: Preprint submitted to Elsevier Page 10 of 17


Linear regression is competitive with Machine Learning in building MPC

age ambient temperature 𝑇̄𝑎𝑚𝑏 and the base temperature: performance in the individual experiments. As the exper-
imental data sets for the individual methods are small, we
refrain from distinguishing quantitatively between the mod-
𝑄ℎ𝑒𝑎 = 𝜃HDD (𝑇𝑎𝑚𝑏,𝑏 − 𝑇̄𝑎𝑚𝑏 ) = 𝜃HDD HDD. (15) eling methods. However, as we use a different marker for
each method, it can be seen that qualitatively, the methods
The difference between the base temperature and the daily
perform similarly. There is a clear trend visible confirming
average temperature is called Heating Degree Days (HDD).
that the MPC controllers consume less heating energy than
The coefficient 𝜃HDD can be found with linear regression.
the baseline controller. At 5 HDSD the reduction is approx-
Similarly a model with Cooling Degree Days (CDD) can be
imately 41% while at 15 HDSD it is 29%. Besides anticipat-
defined to quantify the cooling consumption of a building
ing “free of cost” heat gains from solar irradiation and other
based on a separate base temperature 𝑇𝑎𝑚𝑏,𝑏 . (Depending on
environmental factors, the MPC controllers of course save a
the selection of the different base temperatures, the same day
significant amount of energy by exploiting relaxed comfort
can have Heating Degree Days and Cooling Degree Days).
constraints. However, we note that the energy savings do not
While this expression might be a good assumption for most
stem from a generally substantially lower room temperature
common buildings, it might not be for buildings with large
set point, or the violation of constraints (as could be seen
windows, such as the UMAR apartment, where the solar ir-
in Section 5.2). As Figure 11 in the Appendix shows11 , the
radiation is a main driver of the dynamics. We therefore add
median daily room temperature difference between MPC and
the global solar irradiation 𝐼ℎ𝑜𝑟 with a new regression coef-
standard operation is 0.18 °C. The same trend of MPC con-
ficient 𝜃𝑠𝑜𝑙 to the equation,
suming significantly less energy compared to the baseline
controller is visible in the cooling experiments in bedroom
𝑄ℎ𝑒𝑎 = 𝜃HDD HDD + 𝜃𝑠𝑜𝑙 𝐼ℎ𝑜𝑟 + 𝑐, (16) 1, shown in Figure 6b. MPC consumes 33% less cooling
energy at 5 CDSD and 28% less at 15 CDSD.
and add a constant 𝑐 to omit the dependence on the base The trend is slightly less pronounced in the heating ex-
temperature 𝑇𝑎𝑚𝑏,𝑏 .9 Finally, we divide the regression co- periments in bedroom 2, which are shown in Figure 6c.
efficients by each other and define the Heating Degree Solar Here, the difference between the MPC controllers and the
Day (HDSD): baseline controller is smaller. This behaviour can be ex-
plained by the better insulation of bedroom 2. While bed-
room 1 has a window surface and a wall surface connected
𝜃𝑠𝑜𝑙 to the ambient, the wall surface of bedroom 2 is adjacent to
𝑄ℎ𝑒𝑎 = 𝜃HDD (HDD+ 𝐼 )+𝑐 = 𝜃HDD HDSD+𝑐. (17)
𝜃HDD ℎ𝑜𝑟 another unit. This results in less temperature loss during the
night, which means that the MPC controller can exploit the
The concept of Cooling Degree Solar Days (CDSD) works
relaxed comfort constraint less. The result indicates that the
accordingly, approximating the cooling demand 𝑄𝑐𝑜𝑜 of a
potential for energy savings through MPC depends on the
building.
level of insulation of the controlled building, which we are
5.3.2. Experiment results currently investigating in more detail in ongoing simulation-
We have evaluated measurement data spanning 2.5 years based research. For the cooling experiments in bedroom 2,
(2018-06-01 to 2021-02-14) for the analysis of the energy which are shown in Figure 6d, MPC again saves a significant
consumption with the MPC controllers compared to the amount of energy compared to the baseline controller. Here,
baseline controller (example in Figure 10 in the Appendix). the solar irradiation is the significant disturbance working
Figure 6a shows the heating energy consumption as a against the control input, and the window surface area is the
function of the HDSD for bedroom 1. Each blue dot repre- same for both bedrooms, which means that relaxed comfort
sents a day under standard operation with the baseline con- constraints can be exploited in both bedrooms.
troller and each orange dot represents a day with a MPC con- When the HDSD and CDSD input data of the entire 2.5
troller. Days where the average room temperature is outside years of measurement data is applied to the linear regression
the range of 21 °C to 27 °C are excluded from the analysis models12 in Figure 6, the MPC controllers on average save
for a fair comparison, as these conditions are often results 33% and 26% of heating energy in bedrooms 1 and 2 respec-
of the heating/cooling system not working correctly, leading tively, and 32% and 49% of cooling energy in bedrooms 1
to unrealistically low energy consumption. The lines rep- and 2 respectively compared to the baseline controller. Note
resent the HDSD regressions. Note, that we have lumped that, given the deviations from the regressions in Figure 6,
all different MPC models (ARMAX, RF and ICNN)10 here this is only a rough estimate. However, it demonstrates that
in orange, as all controllers have shown reasonable control MPC generally saves a significant amount of heating and
cooling energy in our experiments, without a significant dif-
9 If the regression chooses to set 𝑐 = −𝜃
𝐻𝐷𝐷 𝑇𝑎𝑚𝑏,𝑏 , the function ef- ference in room temperatures or constraint violations.
fectively is not dependent on 𝑇𝑎𝑚𝑏,𝑏 any more. We could also write (16)
directly in terms of 𝑇̄𝑎𝑚𝑏 , but choose not to, to maintain the relation to the 11 Data on the cooling case in bedroom 1 and both cases in bedroom 2 is

HDD concept. available in the linked data repository, see Section Data Availability. These
10 The ARX+window label denotes a model where eq. (3) is calculated data show a similar trend.
based on the window dimensions and orientations and directly used as a 12 This corresponds to a situation where either the baseline controller or

model input instead of eq. (4). the MPC would have been run for the entire duration of 2.5 years.

F Bünning et al.: Preprint submitted to Elsevier Page 11 of 17


Linear regression is competitive with Machine Learning in building MPC

Heating case bedroom 1 Cooling case bedroom 1


0.8 0.0
Normalized heating energy consumption

Normalized cooling energy consumption


Standard operation
0.7 RF 0.1
0.6
ARX
ARX+window
0.2
0.5
0.4 0.3
0.3
0.4
Standard operation
0.2 RF
0.5 ARX
0.1
ICNN
0.0 0.6
10 5 0 5 10 15 20 25 10 5 0 5 10 15 20 25
Heating Degree Solar Days Cooling Degree Solar Days

(a) Heating case bedroom 1. (b) Cooling case bedroom 1.


Heating case bedroom 2 Cooling case bedroom 2
0.8 0.0
Normalized heating energy consumption

Normalized cooling energy consumption


Standard operation
0.7 RF 0.1
0.6
ARX
ARX+window
0.2
0.5
0.4 0.3
0.3
0.4
Standard operation
0.2 RF
0.5 ARX
0.1
ICNN
0.0 0.6
10 5 0 5 10 15 20 25 10 5 0 5 10 15 20 25
Heating Degree Solar Days Cooling Degree Solar Days

(c) Heating case bedroom 2. (d) Cooling case bedroom 2.

Figure 6: Heating energy of MPC methods (orange) and baseline (blue) controller as a function of HDSD and CDSD. Each
sample represents one day of experiment, the solid lines show the HDSD and CDSD regressions of these samples. (a): Heating
case bedroom 1 with 41 samples for MPC, 258 samples for baseline controller. (b): Cooling case bedroom 1 with 39 samples
for MPC, 230 samples for baseline controller. (c): Heating case bedroom 2 with 41 samples for MPC, 184 samples for baseline
controller. (d): Cooling case bedroom 2 with 35 samples for MPC, 206 samples for baseline controller.

5.4. Computational performance Table 1


Table 1 summarises the computational requirements for Computational resources for MPC controllers with varying
the MPC controllers tested with the different models of this models.
study on a single optimization with fixed initial conditions Model Solving time Memory usage Software (Python 3)
and disturbance forecasts. The optimization problems were ARMAX
RF
0.2 s
1.5 s
36 MB
68 MB
Scikit-learn, CVXOPT
Scikit-learn, CVXOPT
solved on an Intel(R) Core(TM) i7-7500U CPU with 2.7 PICNN 3.0 s 158 MB Keras, SciPy
GHz, and 16 GB of memory. The analysis is done for N=6h,
Q=1, R=0, 𝜆=100.
It can be seen that the ARMAX controller outperforms to analytical gradients and the solver has to numerically ap-
the other two in terms of solving time and memory usage. proximate them. FICNN show similar results. The mem-
While the RF problem is also a QP, the solving time is longer ory requirements grow with the complexity of the models.
because the parameters for the optimization problem need to While all solving times are acceptable for the considered
be found from the forest on the basis of the non-controllable residential building case, it is to be expected that RF and
inputs 𝑋𝑑 first. The PICNN has a longer solving time as the ARMAX controllers scale better due to their linear dynam-
optimization problem is more difficult to solve. This is be- ics, which could be beneficial for larger scale buildings. We
cause, even though the problem is convex (without the pres- note that all models and solvers are based on open-source
ence of lower comfort constraints), we do not have access libraries, which are not optimized for our specific purpose.

F Bünning et al.: Preprint submitted to Elsevier Page 12 of 17


Linear regression is competitive with Machine Learning in building MPC

101 RF (both tuned for this particular bedroom), and an ARMAX


ICNN model with three lag terms13 using the positivity constraint
RF on the elements of Θ in (12). We do not show results of
ARMAX (best configuration)
FICNN as they are very similar to those of PICNN. All mod-
100 els use 𝑄̃̇ 𝑎𝑐𝑡,𝑖 (Equation (13)) as the control input.
It can be seen that the ICNN performs poorly for a single
MSE in K 2

week and two weeks of training data, and significantly im-


proves after four weeks. This is most likely due to the large
number of model parameters, which can lead to overfitting.
10 1
In contrast, the RF already performs relatively well for a sin-
gle week of training data but does not improve much when
more training data is available. The good performance for
12 4 8 16 37 a small training data set is due to the automatic scaling of
Training set in weeks RF through the minimum number of samples per leaf. The
median of the ARMAX model outperforms both the ICNN
Figure 7: Mean Squared Error for 1-hour open loop prediction and RF models for all sizes of training data. This could be
with ICNN (blue), RF (orange) and ARMAX (green) mod-
expected for small training data sets as the physical priors
els. The solid lines depict the median achieved MSE, and the
lead to strong regularization. However, it can also be seen
shaded areas depict the 16% and 84% percentiles.
that the ICNN and RF models converge to the same me-
dian MSE and similar variance, while the ARMAX model’s
median converges to a much lower MSE and less variance.
Qact = Qact This indicates that using physical model inputs gives the AR-
100 Qact = b MAX model domain knowledge that the ML models cannot
Qact = b(Tsup T) find by themselves (for example the solar irradiation through
Qact = b(Tsup T), positive windows as a function of time and global solar irradiation),
MSE in K 2

even if abundant training data is available.


As the number of parameters of the ARMAX model is
similar to the RF model for low-sized training sets, the higher
10 1
variance of the prediction error of the ARMAX model for
one and two weeks of training data, is most likely an effect
of the one-hot encoding of 𝐼𝑣𝑒𝑟𝑡(𝑡) (the vertical solar irra-
diation): for small training sets it can happen that the set
12 4 8 16 37 does not include samples from the summer, which means
Training set in weeks that 𝐼𝑣𝑒𝑟𝑡,1 and 𝐼𝑣𝑒𝑟𝑡,𝜏 are always zero in the training set be-
cause the sun rises late and sets early14 . Accurate coeffi-
Figure 8: Mean Squared Error for 1-hour open loop prediction cients can therefore not be found during training. If samples
with ARMAX model and varying inputs. The solid lines depict
from the summer are included in the validation set, this leads
the median achieved MSE, and the corresponding coloured
shadows depict the 16% and 84% percentiles.
to large prediction errors. For real applications, the issue is
likely less pronounced, if the models are updated regularly.
The issue could also be addressed through further regular-
ization, e.g. with the Lasso method [79].
6. Numerical case study For practical implementations of data-driven MPC, it is
Our experiments have shown that MPC with all the con- important to know which quantities need to be measured in
sidered models is generally suitable for building control in a building. We therefore compare ARMAX models with
practice. However, to minimize costs of commissioning, the various choices for the control input, as described in Sec-
amount of historical measurement data required to train the tion 3.3.3, in Figure 8. The first model (blue) uses the con-
model is a considerable factor for choosing a model for MPC. sidered true energy input 𝑄̃̇ 𝑎𝑐𝑡 (Equation (13)), the second
To address this point, we compare here the sample efficiency one (orange) only uses the valve opening 𝑏 (Equation (7)),
of the ARMAX, RF and ICNN models. and the third one (green) uses the approximation via valve
For this, the training data from 2018-05-23 to 2019-05- opening, supply temperature 𝑇𝑠𝑢𝑝 and a previously measured
28 for bedroom 1 is divided into weekly folds and a k-fold room temperature 𝑇̄ (Equation (8)). The last model (red) ad-
cross validation is performed, where a randomly selected 13 Our validation experiments suggest that including more than three lag
subset of the data is used for training and the rest is used for terms does not improve the accuracy of the predictions of the ARMAX
model validation in terms of the mean squared error (MSE) model in this case.
for a one-hour open loop prediction. The numerical experi- 14 In our implementation 𝐼
𝑣𝑒𝑟𝑡,0 covers the night-time, therefore 𝐼𝑣𝑒𝑟𝑡,𝜏
ment is repeated 100 times to account for different training (late evening) and 𝐼𝑣𝑒𝑟𝑡,1 (early morning) may or may not be non-zero de-
pending on the season.
and validation data. Figure 7 shows the result for a PICNN,

F Bünning et al.: Preprint submitted to Elsevier Page 13 of 17


Linear regression is competitive with Machine Learning in building MPC

ditionally constrains all regression coefficients Θ in (12) to mentation compared to the ML methods.
be non-negative. The first three models perform similarly The next logical step is to apply the physics-informed in-
well, which indicates that using just the valve opening to puts to the ML methods and to find ways to enforce physics-
model the control input could be sufficient in practical cases based constraints, such as non-negativity, with ANN and RF.
- an observation that is also supported by our experiments. Physics-informed ML methods could potentially be inter-
Measuring mass flows and supply temperatures gives no vis- esting as soon as non-linearities, for example heat pumps,
ible performance advantage, which simplifies practical im- are added directly to the control problem, instead of being
plementation. The red result in Figure 8 demonstrates that treated on a lower control level. Moreover, experiments with
the positivity constraint on Θ significantly benefits the sam- the physics-informed ARMAX models should be conducted
ple efficiency. This is especially important for practical im- on large-scale buildings. This is currently under investiga-
plementation, as it reduces controller commissioning time. tion with an industry partner.
The model variance and the median MSE are also reduced.
Although the constraints on Θ increase the prediction ac-
curacy, they do not guarantee BIBO stability. For the AR- Data Availability
MAX model, stability could be guaranteed by further con- The data presented in this work, and data from addi-
straining the coefficients of the auto-regressive inputs, which tional experiments is available under the DOI 10.3929/ethz-
is part of ongoing research. Ensuring stability for ML mod- b-000496285.
els such as the RF and ICNN models is much more com-
plex and not appropriately addressed in the literature so far. Acknowledgement
Here, methods such as presented by [56] for bounding the
dominant eigenvalues of a Recurrent Neural Network based We would like to thank Kristina Orehounig for her
building thermal model should be further explored. As also valuable help and support. We are also grateful to
supported by our experiment results in Section 5, in practice, Varsha Behrunani, Annika Eichler, Benjamin Flamm,
as buildings have very well-damped stable physics, models Marta Fochesato, Andrea Iannelli, Mohammad Khosravi,
identified from their data are also usually stable if the data Francesco Micheli, Anil Parsi and Joseph Warrington for
quality is reasonable. This can be confirmed, for example, fruitful discussions. We particularly would like to thank
by observing the coefficients of the autoregressive inputs of Reto Fricker, Ralf Knechtle and Sascha Stoller for sharing
the ARMAX models trained on different size training sets, their expertise and their help with the implementation, and
as done in this work, and different types of buildings (see Antoon Decoussemaeker for accompanying research.
also [60], where the ARMAX method is applied to a floor- This research project is financially supported by the
heating-based medium weight construction, in contrast to Swiss Innovation Agency Innosuisse and is part of the Swiss
the radiator-based light-weight construction modeled in this Competence Center for Energy Research SCCER FEEB&D.
paper). It is also financially supported by the SNSF under the NCCR
Automation.

7. Conclusion
Declaration of competing interest
In this paper, we have compared physics-informed AR-
The authors declare that they have no known competing
MAX models to Machine Learning based models in the do-
financial interests or personal relationships that could have
main of MPC for building climate control in experiments and
appeared to influence the work reported in this paper.
in numerical case studies.
The study has shown that MPC with all three models, RF,
ICNN and ARMAX, generally delivers good control perfor- CRediT authorship contribution statement
mance. Moreover, in all heating and cooling cases, MPC
Felix Bünning: Conceptualization, Methodology, Soft-
achieves significant energy savings compared to the base-
ware, Validation, Investigation, Visualization, Supervision,
line controllers. Our results also suggest that the physics-
Writing - Original Draft. Benjamin Huber: Methodol-
informed ARMAX models outperform the RF and ICNN
ogy, Software, Validation, Investigation, Writing - Review &
models in terms of online computational requirements and
Editing. Adrian Schalbetter: Methodology, Software, Val-
offline training sample efficiency, which means that good
idation, Investigation, Writing - Review & Editing. Ahmed
models can be extracted from less data. The latter find-
Aboudonia: Conceptualization, Supervision, Writing - Re-
ing suggests that the physics-based inputs and constraints
view & Editing. Mathias Hudoba de Badyn: Supervision,
give the model an information prior, which cannot be found
Writing - Review & Editing. Philipp Heer: Supervision,
by the ML methods themselves, even if abundant training
Funding acquisition, Writing - Review & Editing, Concep-
data is available. The increased expressiveness of ML-based
tualization. Roy S. Smith: Supervision, Funding acquisi-
models therefore does not seem to add any benefits in this
tion, Writing - Review & Editing, Conceptualization. John
case. Together with the lower computational requirements
Lygeros: Supervision, Funding acquisition, Writing - Re-
in terms of optimization time and memory usage, the results
view & Editing, Conceptualization.
render the ARMAX approach superior for practical imple-

F Bünning et al.: Preprint submitted to Elsevier Page 14 of 17


Linear regression is competitive with Machine Learning in building MPC

A. Appendix of MPC for an office building: Identification issues, Applied Energy


135 (2014) 53–62.
See Figures 9 - 11. [14] B. Hammer, K. Gersmann, A note on the universal approximation
capability of support vector machines, Neural Processing Letters 17
(2003) 43–53.
600 [15] D. Picard, F. Jorissen, L. Helsen, Methodology for Obtaining Linear
Qsol
Solar irradiation through

500 one-hot model State Space Building Energy Simulation Models, in: Proceedings
of the 11th International Modelica Conference, Versailles, France,
400
window in W

September 21-23, 2015, volume 118, Linköping University Elec-


300 tronic Press, 2015, pp. 51–58.
[16] D. Sturzenegger, D. Gyalistras, V. Semeraro, M. Morari, R. S. Smith,
200 BRCM Matlab Toolbox: Model generation for model predictive
100 building control, in: Proceedings of the American Control Confer-
ence, Institute of Electrical and Electronics Engineers Inc., 2014, pp.
0 1063–1069.
05-01 05-02 05-03 05-04 05-05 05-06 [17] F. Smarra, A. Jain, T. de Rubeis, D. Ambrosini, A. D’Innocenzo,
Timestamp R. Mangharam, Data-driven model predictive control using random
forests for building energy optimization and climate control, Applied
Figure 9: Example from the validation set of the one-hot solar Energy 226 (2018) 1252–1272.
model. The blue line denotes the true solar gains through a [18] J. Coulson, J. Lygeros, F. Dörfler, Data-enabled predictive control:
window. The orange line denotes the predicted gains by the In the shallows of the deepc, in: 2019 18th European Control Con-
model. ference, ECC 2019, Institute of Electrical and Electronics Engineers
Inc., 2019, pp. 307–312.
[19] I. Markovsky, J. C. Willems, S. Van Huffel, B. De Moor, Exact and
Approximate Modeling of Linear Systems, Exact and Approximate
Modeling of Linear Systems (2006).
References [20] K. Hornik, Approximation capabilities of multilayer feedforward net-
[1] IEA Building Energy Performance Metrics, Supporting Energy Effi- works, Neural Networks 4 (1991) 251–257.
ciency Progress in Major Economies, International Energy Agency: [21] D. Silver, J. Schrittwieser, K. Simonyan, I. Antonoglou, A. Huang,
Paris, France (2015). A. Guez, T. Hubert, L. Baker, M. Lai, A. Bolton, Y. Chen, T. Lilli-
[2] J. Drgoňa, J. Arroyo, I. Cupeiro Figueroa, D. Blum, K. Arendt, crap, F. Hui, L. Sifre, G. Van Den Driessche, T. Graepel, D. Hassabis,
D. Kim, E. P. Ollé, J. Oravec, M. Wetter, D. L. Vrabie, L. Helsen, Mastering the game of Go without human knowledge, Nature 550
All you need to know about model predictive control for buildings, (2017) 354–359.
Annual Reviews in Control 50 (2020) 190–232. [22] Y. Wu, M. Schuster, Z. Chen, Q. V. Le, M. Norouzi, W. Macherey,
[3] P. Hameed Shaikh, N. Bin Mohd Nor, P. Nallagownden, I. Elam- M. Krikun, Y. Cao, Q. Gao, K. Macherey, J. Klingner, A. Shah,
vazuthi, T. Ibrahim, A review on optimized control systems for build- M. Johnson, X. Liu, Ł. Kaiser, S. Gouws, Y. Kato, T. Kudo,
ing energy and comfort management of smart sustainable buildings, H. Kazawa, K. Stevens, G. Kurian, N. Patil, W. Wang, C. Young,
Renewable and Sustainable Energy Reviews 34 (2014) 409–429. J. Smith, J. Riesa, A. Rudnick, O. Vinyals, G. Corrado, M. Hughes,
[4] M. Morari, J. H. Lee, Model predictive control: Past, present and J. Dean, Google’s neural machine translation system: Bridging the
future, Computers and Chemical Engineering 23 (1999) 667–682. gap between human and machine translation, 2016.
[5] F. Oldewurtel, A. Parisio, C. N. Jones, D. Gyalistras, M. Gwerder, [23] S. Hershey, S. Chaudhuri, D. P. Ellis, J. F. Gemmeke, A. Jansen, R. C.
V. Stauch, B. Lehmann, M. Morari, Use of model predictive control Moore, M. Plakal, D. Platt, R. A. Saurous, B. Seybold, M. Slaney,
and weather forecasts for energy efficient building climate control, R. J. Weiss, K. Wilson, CNN architectures for large-scale audio clas-
Energy and Buildings 45 (2012) 15–27. sification, in: ICASSP, IEEE International Conference on Acoustics,
[6] C. R. Touretzky, M. Baldea, Integrating scheduling and control for Speech and Signal Processing - Proceedings, Institute of Electrical
economic MPC of buildings with energy storage, Journal of Process and Electronics Engineers Inc., 2017, pp. 131–135.
Control 24 (2014) 1292–1300. [24] F. Bünning, B. Huber, P. Heer, A. Aboudonia, J. Lygeros, Experimen-
[7] C. Chen, J. Wang, Y. Heo, S. Kishore, MPC-based appliance schedul- tal demonstration of data predictive control for energy optimization
ing for residential building energy management controller, IEEE and thermal comfort in buildings, Energy and Buildings 211 (2020)
Transactions on Smart Grid 4 (2013) 1401–1410. 109792.
[8] W. Mai, C. Y. Chung, Economic MPC of Aggregating Commercial [25] F. Bünning, A. Schalbetter, A. Aboudonia, M. Hudoba de Badyn,
Buildings for Providing Flexible Power Reserve, IEEE Transactions P. Heer, J. Lygeros, Input convex neural networks for building MPC,
on Power Systems 30 (2015) 2685–2694. in: Proceedings of the 3rd Conference on Learning for Dynamics and
[9] D. Sturzenegger, D. Gyalistras, M. Morari, R. S. Smith, Model Pre- Control, volume 144 of Proceedings of Machine Learning Research,
dictive Climate Control of a Swiss Office Building: Implementation, PMLR, 2021, pp. 251–262.
Results, and Cost–Benefit Analysis, IEEE Transactions on Control [26] B. Amos, L. Xu, J. Z. Kolter, Input Convex Neural Networks, in:
Systems Technology 24 (2016) 1–12. 34th International Conference on Machine Learning, ICML 2017,
[10] T. Hilliard, L. Swan, Z. Qin, Experimental implementation of whole volume 70 of Proceedings of Machine Learning Research, PMLR,
building MPC with zone based thermal comfort adjustments, Build- 2017, pp. 146–155.
ing and Environment 125 (2017) 326–338. [27] H. Mania, A. Guy, B. Recht, Simple random search of static linear
[11] M. Castilla, J. D. Álvarez, J. E. Normey-Rico, F. Rodríguez, Thermal policies is competitive for reinforcement learning, in: 32nd Confer-
comfort control using a non-linear MPC strategy: A real case of study ence on Neural Information Processing Systems (NIPS 2018), volume
in a bioclimatic building, Journal of Process Control 24 (2014) 703– 2018-Decem, pp. 1805–1814.
713. [28] A. Kathirgamanathan, M. De Rosa, E. Mangina, D. P. Finn, Data-
[12] J. Ma, S. J. Qin, T. Salsbury, Application of economic MPC to the driven predictive control for unlocking building energy flexibility:
energy and demand minimization of a commercial building, Journal A review, Renewable and Sustainable Energy Reviews 135 (2021)
of Process Control 24 (2014) 1282–1291. 110120.
[13] E. Žáčeková, Z. Váňa, J. Cigler, Towards the real-life implementation [29] E. T. Maddalena, Y. Lian, C. N. Jones, Data-driven methods for build-

F Bünning et al.: Preprint submitted to Elsevier Page 15 of 17


Linear regression is competitive with Machine Learning in building MPC

Bounds Baseline controller Bedroom 2


temperature 25
24
Room
in °C
(a)

23
22
1.0
control input
Relative

0.5
(b)

0.0
20
temperature
Ambient

10
in °C
(c)

500
irradiation
in W/m2
Solar
(d)

250
0
2021-03-01 2021-03-02 2021-03-03 2021-03-04 2021-03-05 2021-03-06
Timestamp

Figure 10: Baseline controller example for the heating case in bedroom 2. (a): Temperature in the bedroom. The limits of the
hysteresis controller are shown in dashed black. (b): Relative control input, i.e. the fraction of time where the maximum control
input is applied during one control step. (c): Measured ambient temperature at the experiment site. (d): Global solar irradiation
at the experiment site.

Heating case bedroom 1 [34] Y. Zong, W. Su, J. Wang, J. K. Rodek, C. Jiang, M. H. Christensen,
S. You, Y. Zhou, S. Mu, Model predictive control for smart build-
Standard operation ings to provide the demand side flexibility in the multi-carrier energy
MPC context: Current status, pros and cons, feasibility and barriers, in:
0.4
Energy Procedia, volume 158, Elsevier Ltd, 2019, pp. 3026–3031.
[35] P. Rockett, E. A. Hathway, Model-predictive control for non-domestic
0.3 buildings: a critical review and prospects, Building Research & In-
Frequency

formation 45 (2017) 556–571.


[36] G. P. Henze, Model predictive control for buildings: a quantum leap?,
0.2 2013.
[37] A. Afram, F. Janabi-Sharifi, Theory and applications of HVAC con-
0.1 trol systems - A review of model predictive control (MPC), 2014.
[38] G. Serale, M. Fiorentini, A. Capozzoli, D. Bernardini, A. Bemporad,
Model Predictive Control (MPC) for Enhancing Building and HVAC
0.0 System Energy Efficiency: Problem Formulation, Applications and
21 22 23 24 25 26 27 Opportunities, Energies 11 (2018) 631.
Daily average room temperature in °C [39] A. Mugnini, G. Coccia, F. Polonara, A. Arteconi, Performance as-
sessment of data-driven and physical-based models to predict build-
Figure 11: Temperature analysis MPC vs. baseline controller ing energy demand in model predictive controls, Energies 13 (2020)
for heating experiments in bedroom 1. 3125.
[40] J. Wang, S. Li, H. Chen, Y. Yuan, Y. Huang, Data-driven model
predictive control for building climate control: Three case studies on
different buildings, Building and Environment 160 (2019) 106204.
ing control — A review and promising future directions, Control En- [41] D. Picard, M. Sourbron, F. Jorissen, J. Cigler, Z. Váňa, Compari-
gineering Practice 95 (2020) 104211. son of Model Predictive Control Performance Using Grey-Box and
[30] T. Q. Péan, J. Salom, R. Costa-Castelló, Review of control strategies White-Box Controller Models of a Multi-zone Office Building, 4th
for improving the energy flexibility provided by heat pump systems International High Performance Buildings Conference (2016) 4.
in buildings, Journal of Process Control 74 (2019) 35–49. [42] L. Ferkl, Jan Široký, Ceiling radiant cooling: Comparison of AR-
[31] S. Lee, P. Karava, Towards smart buildings with self-tuned indoor MAX and subspace identification modelling methods, Building and
thermal environments – A critical review, 2020. Environment 45 (2010) 205–212.
[32] D. Mariano-Hernández, L. Hernández-Callejo, A. Zorita-Lamadrid, [43] Y. Chen, Y. Shi, B. Zhang, Optimal control via neural networks: A
O. Duque-Pérez, F. Santos García, A review of strategies for building convex approach, in: 7th International Conference on Learning Rep-
energy management system: Model predictive control, demand side resentations, ICLR 2019, pp. 1–21.
management, optimization, and fault detect & diagnosis, 2021. [44] P. Ferreira, A. Ruano, S. Silva, E. Conceição, Neural networks based
[33] M. Gholamzadehmir, C. Del Pero, S. Buffa, R. Fedrizzi, N. Aste, predictive control for thermal comfort and energy savings in public
Adaptive-predictive control strategy for HVAC systems in smart buildings, Energy and Buildings 55 (2012) 238–251.
buildings – A review, 2020.

F Bünning et al.: Preprint submitted to Elsevier Page 16 of 17


Linear regression is competitive with Machine Learning in building MPC

[45] A. Aswani, N. Master, J. Taneja, A. Krioukov, D. Culler, C. Tom- [68] P.-L. Bescond, Cyclical features encoding, it’s about time! - Towards
lin, Energy-efficient building HVAC control using hybrid sys- Data Science, 2020.
tem LBMPC, IFAC Proceedings Volumes (IFAC-PapersOnline) 45 [69] F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion,
(2012) 496–501. O. Grisel, M. Blondel, P. Prettenhofer, R. Weiss, V. Dubourg, J. Van-
[46] C. Finck, R. Li, W. Zeiler, Economic model predictive control for derplas, A. Passos, D. Cournapeau, M. Brucher, M. Perrot, É. Duch-
demand flexibility of a residential building, Energy 176 (2019) 365– esnay, Scikit-learn: Machine Learning in Python, Journal of Machine
379. Learning Research 12 (2011) 2825–2830.
[47] M. Raissi, P. Perdikaris, G. E. Karniadakis, Physics informed deep [70] A. Schalbetter, Input Convex Neural Networks for Energy Optimiza-
learning (Part II): Data-driven discovery of nonlinear partial differen- tion in an occupied Apartment, 2020. Master’s thesis, ETH Zürich
tial equations, 2017. Research Collection. doi: 10.3929/ethz-b-000517404.
[48] M. Raissi, P. Perdikaris, G. E. Karniadakis, Physics-informed neural [71] F. Chollet, Keras: The Python Deep Learning library, Astrophysics
networks: A deep learning framework for solving forward and inverse Source Code Library (2018).
problems involving nonlinear partial differential equations, Journal of [72] B. Huber, Energy optimization and climate control of a NEST unit
Computational Physics 378 (2019) 686–707. at empa Dübendorf: A data predictive control approach, 2019. Mas-
[49] R. Sharma, A. B. Farimani, J. Gomes, P. Eastman, V. Pande, Weakly- ter’s thesis, ETH Zürich Research Collection. doi: 10.3929/ethz-b-
Supervised Deep Learning of Heat Transport via Physics Informed 000487694.
Loss, arXiv (2018). [73] M. S. Andersen, J. Dahl, L. Vandenberghe, CVXOPT, 2004.
[50] G. Manek, J. Z. Kolter, Learning Stable Deep Dynamics Models, [74] M. J. D. Powell, A Direct Search Optimization Method That Models
arXiv (2020). the Objective and Constraint Functions by Linear Interpolation, in:
[51] M. Lutter, C. Ritter, J. Peters, Deep Lagrangian Networks: Using Advances in Optimization and Numerical Analysis, Springer Nether-
Physics as Model Prior for Deep Learning, arXiv (2019). lands, 1994, pp. 51–67.
[52] P. Márquez-Neila, M. Salzmann, P. Fua, Imposing hard constraints on [75] P. Virtanen, R. Gommers, T. E. Oliphant, M. Haberland, T. Reddy,
deep networks: Promises and limitations, 2017. SciPy 1.0: fundamental algorithms for scientific computing in
[53] V. Dimitriou, S. K. Firth, T. M. Hassan, T. Kane, M. Coleman, Data- Python, Nature Methods 17 (2020) 261–272.
driven simple thermal models: The importance of the parameter esti- [76] D. H. Blum, K. Arendt, L. Rivalin, M. A. Piette, M. Wetter, C. T. Veje,
mates, Energy Procedia 78 (2015) 2614–2619. Practical factors of envelope model setup and their effects on the per-
[54] R. De Coninck, F. Magnusson, J. Åkesson, L. Helsen, Toolbox for de- formance of model predictive control for building heating, ventilating,
velopment and validation of grey-box building models for forecasting and air conditioning systems, Applied Energy 236 (2019) 410–425.
and control, Journal of Building Performance Simulation 9 (2015) [77] L. Ljung, T. Glad, On global identifiability for arbitrary model
288–303. parametrizations, Automatica 30 (1994) 265–276.
[55] Y. Li, Z. O’Neill, L. Zhang, J. Chen, P. Im, J. DeGraw, Grey-box [78] ScienceDirect, Heating Degree Day - an overview | ScienceDirect
modeling and application for building energy simulations - A criti- Topics, 2021.
cal review, Renewable and Sustainable Energy Reviews 146 (2021) [79] R. Tibshirani, Regression Shrinkage and Selection Via the Lasso,
111174. Journal of the Royal Statistical Society: Series B (Methodological)
[56] J. Drgoňa, A. R. Tuor, V. Chandan, D. L. Vrabie, Physics-constrained 58 (1996) 267–288.
deep learning of multi-zone building thermal dynamics, 2020.
[57] T. Zeng, J. Brooks, P. Barooah, Simultaneous identification of lin-
ear building dynamic model and disturbance using sparsity-promoting
optimization, Automatica 129 (2021) 109631.
[58] D. Kim, J. Cai, K. B. Ariyur, J. E. Braun, System identification for
building thermal systems under the presence of unmeasured distur-
bances in closed loop operation: Lumped disturbance modeling ap-
proach, Building and Environment 107 (2016) 169–180.
[59] T. Zeng, P. Barooah, An Adaptive Model Predictive Control Scheme
for Energy-Efficient Control of Building HVAC Systems, ASME
Journal of Engineering for Sustainable Buildings and Cities 2 (2021)
031001.
[60] N. Lefebure, M. Khosravi, M. Hudoba de Badyn, F. Bünning,
J. Lygeros, C. Jones, R. S. Smith, Distributed model predictive con-
trol of buildings and energy hubs, Energy and Buildings (2022) In
press.
[61] B. Kouvaritakis, M. Cannon, Model Predictive Control - Classical,
Robust and Stochastic, 9783319248516, Springer International Pub-
lishing, 2016.
[62] J. Brownlee, Why One-Hot Encode Data in Machine Learning?, 2018.
[63] E. Kakkos, F. Heisel, D. E. Hebel, R. Hischier, Environmental assess-
ment of the Urban Mining and Recycling (UMAR) unit by applying
the LCA framework, IOP Conference Series: Earth and Environmen-
tal Science 225 (2019) 012043.
[64] F. Heisel, D. E. Hebel, W. Sobek, Resource-respectful construction –
the case of the Urban Mining and Recycling unit (UMAR), IOP Con-
ference Series: Earth and Environmental Science 225 (2019) 012049.
[65] P. Richner, P. Heer, R. Largo, E. Marchesi, M. Zimmermann, NEST
- A platform for the acceleration of innovation in buildings, Informes
de la Construccion 69 (2017) 1–8.
[66] Belimo, Belimo Energy Valve™ Technical Documentation, 2021.
[67] S.-H. Leitner, W. Mahnke, OPC UA-Service-oriented Architecture
for Industrial Applications, ABB Corporate Research Center (2006).

F Bünning et al.: Preprint submitted to Elsevier Page 17 of 17

You might also like