1. Introduction
During the last decade, there has been a clear interest growth in using advanced control techniques for heating, ventilation, and air conditioning (HVAC) systems in buildings. This increased interest is motivated by the large amount of energy needed for building acclimatization, accounting for 15% of the world’s final energy use [
1], and by the recent introduction of demand response techniques in the building sector [
2]. Buildings with a large thermal mass like those equipped with thermally activated building structures (TABS) can notably benefit from advanced control thanks to the large flexibility potential offered by their high thermal mass. Moreover, typical control strategies can difficultly handle the wide variety of time constants involved in these building systems.
Advanced controllers are often predictive, as in model predictive control (MPC), and require a building system model to anticipate future behavior and optimize the controls at supervisory or local-loop levels. The model is a core element of the controller, which relies on the model predictions to decide actions. Therefore, the choice of the modeling approach is fundamental for setting up a predictive controller and heavily influences the implementation [
3]. Many practical factors influence the development of models for MPC [
4], and the choice of the model technique and complexity directly determines the optimization or the state estimation methods that can be used.
Three paradigms are used when modeling the building envelope, emission, and production systems, namely white-, grey-, and black-box modeling. These paradigms range from a purely physics-based approach to an entirely data-driven approach, respectively. Although there are fuzzy boundaries among these paradigms, this terminology has always helped the community in defining the approaches followed by each case study. Authors usually master only one of these approaches and advocate their paradigm by highlighting its advantages and stressing the weaknesses of the other paradigms. Nevertheless, it remains unclear if there is a best approach or if particular contexts ask for a certain modeling paradigm.
The models can be evaluated in both prediction and control performance. A model is evaluated in prediction performance when historical data is used to study how the model maps inputs to outputs. The historical inputs are introduced into the model to investigate how accurately the model outputs fit the measured outputs. The fitness is assessed based on metrics like the Root Mean Square Error (RMSE) or the n-step-ahead prediction error. A model is evaluated in control performance when implemented into a predictive controller to decide actions that are applied to the actual building. In this case, the performance is evaluated based on the metrics optimized by the controller, like thermal discomfort or operational cost.
Previous studies have evaluated and compared different modeling approaches for optimal control, although usually the models are assessed in prediction performance only, and a correlation is assumed between this metric and the control performance. However, factors other than the model prediction accuracy influence the control performance, namely the suitability of a controller model for optimization, the extrapolation capabilities of the model, and the robustness of the controller to forecasting errors. Hence, the acid test for these models is their implementation in a predictive controller of an actual building to evaluate how the controller can accomplish its predefined objective when using a particular model type.
The main goal of this paper is to share practical aspects of implementing the three main modeling paradigms for optimal predictive control in a real case. To this end, a direct comparison of a representative model of each approach is performed in an actual building test case. First, one model representative of each modeling paradigm is selected, configured, and calibrated. Second, the prediction and control performances of the three models are assessed when implemented into the same MPC framework and test case building. Finally, guidelines for building modeling in optimal control are provided. While simple and unoccupied, the envisaged test case is prone to real weather disturbances that may not be captured by simulations, such as actual forecast uncertainty, measurement errors, or hidden infiltration losses.
Therefore, the main contribution of this paper is the comparison of the three main modeling paradigms for predictive control in a real test building. A thorough analysis is performed for different aspects of the models, and special care is taken to ensure a fair assessment. Moreover, the authors of this work assemble a mix of physics- and data-driven backgrounds, which is imperative to avoid any bias or prejudice concerning the evaluated modeling techniques.
The outline of the paper is as follows:
Section 2 summarizes other studies that have addressed a similar research topic;
Section 3 elaborates on the building test case and the experimental setup used to gather data and perform the experiments;
Section 4 explains the modeling approach followed for each modeling paradigm and makes the first comparison in prediction performance;
Section 5 describes the control task and how each of the obtained models has been implemented into the same MPC framework to evaluate their control performance. The correlation between simulation and control performance is also investigated in this section;
Section 6 discusses the main insights obtained when developing and implementing each of the modeling paradigms into the same MPC in a real building. Finally,
Section 7 draws the main conclusions.
2. Related Work
The benefits of optimal predictive control based on weather forecast data have already been proven several times [
3,
5,
6,
7,
8,
9]. These studies highlight that the main bottleneck for the widespread adoption of MPC in the building sector is the need for methods to obtain building models that are reliable and suitable for optimization. An extensive review on control-oriented thermal modeling, in general, can be found in [
10]. The advantages and disadvantages of each modeling approach are listed, and a decision tree is provided to aid in deciding a modeling method for control-oriented modeling of multi-zone buildings. This study is mainly theoretical and leans on previous scientific literature, but it does not directly compare modeling paradigms. Contrarily, Blum et al. [
4] directly compared the controller model complexity, among other elements, in optimal predictive control. They identified seven practical factors that influence the development of MPC in buildings and systematically analyzed each factor’s influence in simulations. The controller model complexity was studied by implementing three grey-box models, gradually increasing their order from one thermal capacitance up to four. They showed that higher-order models can improve the performance of a given MPC up to 20%, although they acknowledged that better initial guesses are required in the parameter estimation process as the number of parameters increase.
Similarly, Picard et al. [
11] compared controller model complexities using simulations of six-zones residential buildings with different insulation levels. It was indicated that a low prediction accuracy of the controller model can heavily influence the MPC performance and that low order models may not suffice to capture all the building system dynamics. They systematically reduced the order of controller models derived from a linearized plant model used as an emulator to assess performance. Although they did not compare different modeling paradigms, they clearly indicated the relevance of utilizing a suitable model complexity. Arroyo et al. [
12] evaluated different grey-box modeling complexities in control performance. Their focus was the comparison of single-zone to multi-zone RC model structures. Centralized and decentralized multi-zone grey-box model architectures were compared to each other and to a single-zone grey-box model architecture. It was found that modeling inter-zonal effects was beneficial when using multi-zone grey-box models for optimal control. However, their comparison did not involve different modeling paradigms either.
Picard et al. [
13] compared a grey-box model to a purely white-box model for an existing 12-zones office building. The models were validated with real data, and their control performance was evaluated in simulation. They showed that both approaches can lead to an efficient MPC as long as accurate identification data sets are available. In the considered simulation case, the white-box MPC led to better thermal comfort while using 50% less energy than the best grey-box model. However, it should be noted that the white-box controller model was derived from the plant model used for the simulations, something that would not be possible in practice. Moreover, the authors stated that further research was still needed to confirm the strength of the white-box approach in the presence of all uncertainties.
A white-box model was compared to a black-box model in [
14]. In this case, the white-box model was a lumped RC representation of the plant, and the black-box model used an artificial neural network architecture. Again, the physics-based model was better than the data-driven approach, although the RC parameter values were obtained assuming perfect knowledge of the thermal and geometrical building characteristics. A direct comparison across the three main modeling paradigms was performed by Arendt et al. [
15]. They implemented the white-, grey-, and black-box paradigms by selecting representative models for each approach, similar to what is done in this paper. However, they only analyzed the fitting accuracy to indoor temperature on historical monitoring data of a building. The differences in control performance were not explicitly investigated.
The studies above indicate a common understanding of the importance of polishing the modeling techniques to adopt advanced control. However, despite using simulations, the test cases were always different, and each work followed a different approach for the analysis. To solve this issue, the recently developed building optimization testing (BOPTEST) framework [
16] enables the direct comparison of different controllers for the same building and boundary conditions by using simulations. The aim is to derive guidelines for optimal control by benchmarking controllers in the same test cases.
While simulations offer a clear, practical advantage for assessment purposes, they do not allow coping with real model mismatch and forecasting uncertainty, which is only possible in actual implementations. Nevertheless, access to real buildings for testing and research purposes is more difficult and expensive. Hence, there are fewer efforts that implement MPC in operational buildings. In this context, the work of Širokỳ et al. [
5] excels in achieving energy savings between 15% and 28% in a two months experiment performed on an actual building in Prague, Czech Republic. The setup of this study was unique because two identical building blocks enabled the cross-comparison of two different controllers by switching the control strategies between the blocks to compensate for the changing boundary conditions. However, their focus was on showing the energy savings potential of implementing MPC compared to a heating curve based control strategy. A novel modeling approach for the same building based on partial least squares was introduced in [
17]. Other demonstrations of MPC in actual buildings are described in [
6,
18,
19,
20]. White- [
18], grey- [
6], and black-box [
19] models have been used in practical implementations of MPC in real buildings separately. However, none of them performed a comparison of any kind between different models for the same predictive controller.
3. Experimental Setup
The test building of this study is called the Vliet building and is located on the Arenberg campus of the KU Leuven University in Heverlee, Belgium. A detailed overview of the building materials, properties, and geometry can be found in [
21], and a brief description of the building is provided here for completeness. The building was constructed in 1996, and is equipped with a local weather station. It comprises separate testing modules to conduct research about different aspects of building physics and HVAC systems. The module under consideration in this paper was constructed in 2011 and is a small unoccupied room with an elementary rectangular geometry of
m long,
m wide, and
m high. Two walls connect to an adjacent room that is always conditioned at a constant temperature of 21 °C. The other two walls connect to the outer space, and one of them has a window of
m wide and
m high. The window is integrated into the southwest oriented façade. The building exterior, the control setup, the heat production system, the heat distribution system, and the interior of the test room are shown in
Figure 1.
The test room is conditioned using hydronic heat production, distribution, and emission systems. The heat production system is an electric boiler that always maintains water at 60 °C ready for delivery. The water is distributed to the TABS emission system with embedded pipes in the concrete floor and ceiling (two circuits), although only the floor TABS are used in the experiments. Each circuit uses a pump for distributing the hot water and has a three-way valve to mix the water coming from the heat production system with the water returning from the TABS, which enables control of the water supply temperature to the concrete.
A LabView software interface has been developed as described in [
22], which allows automatic data acquisition and control at a higher configuration level. The field and automation layers of the infrastructure are interfaced through modules of National Instruments. The interface controls the primary actuators of the system, namely the circulation pumps and the circuit valves. Most of these actuators are relays with a simple on/off control. For the three-way valves of each distribution circuit (floor and ceiling), a continuous signal is used between 0 and 10 V to prescribe a state between a fully closed or opened valve position. When the valve is fully closed, there is no water coming from the heat production system, and the water through the TABS is recirculated. When the valve is fully opened, there is no recirculation, meaning that all water going to the TABS is delivered directly by the heat production system at 60 °C, without mixing with the return water. Any signal in between specifies partial recirculation as an intermediate case between the two scenarios described above.
The measurements available are the supply and return temperatures to and from the TABS, the water flow rate through each circuit, and four air temperatures at different heights in the test room. The water temperatures are measured with PT-1000 sensors inside the pipes, and flow-meters provide the water flow rate through each circuit. The electric power use profile is needed to calculate the operational cost when subject to a dynamic electricity price profile, but there is no electric power measurement available in the setup. Therefore, it is assumed that there is a direct electric water heater that instantaneously converts electricity to heat with a constant electric-to-thermal power efficiency of
. The instantaneous heat can be directly calculated from the supply and return water temperatures and the mass-flow rate of the water through the TABS circuit as defined in Equation (
1). All these variables are measured in the setup.
In Equation (
1)
is the mass flow rate of the water through the floor TABS, and
is the specific heat capacity of the water. The electric power of the circulation pump is neglected.
Figure 2 shows the main components with
P the electric power from the grid,
u the valve opening signal,
the mass flow rate through the floor TABS,
and
the water supply and return temperatures to and from the TABS, respectively,
the average zone air temperature, referred to as the zone air temperature hereafter. The latter temperature is obtained as the simple average of the four temperature sensors located at different heights. Finally,
is the thermal heat delivered by the floor TABS. The green-coloured element indicates the controllable signal, which is the valve opening in this case since the circulation pump is automatically switched on in a post-processing step when
. The grey-coloured elements indicate measured signals. Finally, the non-coloured circles indicate variables that are derived from measurements.
4. Modeling
This section explains the steps taken to identify and calibrate the models that are later implemented as system equations in the MPC in
Section 5. First, the modeling task is described. Second, the data gathering process is explained. Third, the selection of a representative model of each modeling paradigm is justified. The identification and calibration processes of each model are also described. Finally, the models are compared in prediction performance using auto- and cross-validation data sets from the obtained operational data.
4.1. Modeling Task
The controlled variable of the optimal control problem is the zone air temperature, and the controllable variable is the opening of the three-way valve that determines the water supply temperature to the floor TABS and as a consequence the heat delivered to the room. The two most important system disturbances are the ambient temperature
and the solar irradiation
(Note that the room is unoccupied, thus disturbances associated to occupancy are not considered.). The predictive controller thus needs to know the effect of the valve opening, ambient temperature, and solar irradiation on the zone air temperature. The controller also needs to estimate the electric power used to compute the operational cost. Hence, a multi-input multi-output model is required to represent the system, and the modeling task is to find a function
F that estimates
and
P from
u,
, and
, as indicated by Equation (
2). Notice that the estimated variables may depend not only on the inputs and disturbances, but also on previous outputs and system states. The models may use a vector of hidden internal states
to capture those regressive effects. Finally, a set of parameters
characterize the model. These parameters are considered constant in this study. The control toolbox used in this work does not require the models to be linear nor convex for optimization.
4.2. Data Gathering
Data are needed to identify, train and calibrate the models and test the models’ performance. Historical data obtained from 24 January until 21 February 2018 is used for these tasks. That is, a total of four weeks of historical data are gathered for system identification and model calibration. During this period, the heating of the test room is alternated between heating and free-floating periods, i.e., periods with hot water circulating through the TABS and periods with no water circulation, respectively. The first heating period lasts for three days and tests and tunes the software interface and the whole experimental setup. During this period, large excitations are introduced, leading to a zone air temperature up to °C. After these excitations, the building is left to free-float. By studying the evolution of the zone air temperature during this period, a settling time of six days is observed, from where it is deduced that the system’s time constant is approximately two days. Notice that this time constant is only an approximation because an actual building system never fully settles because of the effect of the disturbances.
A PID controller is implemented for the second heating period to deliver heat to the floor TABS following a pseudo-random binary sequence (PRBS) of 1 kW amplitude. This signal type is suggested by [
23] and has been used by other authors to gather data for building modeling, e.g., in [
24]. This input sequence is beneficial for system identification because it ensures that there is no correlation between the controllable inputs and the disturbances. The PRBS is designed to put the heating power input signal in the range relevant for control. Finally, the building is left to free-float for the remaining days. The evolution of the variables of interest during these periods is plotted in
Figure 3.
Measurement data from the weather station of the Vliet building was also obtained during this period to compare with the data provided by the DarkSky web-service, the weather forecast provider used by the MPC. The objective is to assess the reliability of the weather forecast service. DarkSky is not limited to climate forecast but also provides current weather condition information for any location which is what is shown by the dashed lines in
Figure 3. Even though DarkSky can mostly follow the disturbances’ evolution, it is observed that it occasionally shows significant deviations. These deviations go up to
°C for ambient temperature and up to
W for solar irradiation. Forecasting is an even more challenging task than estimating current weather for a given location. Hence, errors are expected to be more frequent and larger when forecasting these variables. Forecasting errors are unavoidable, so the MPC will have to deal with these inaccuracies.
4.3. General Considerations
A general-purpose modeling, simulation, and optimization framework is required to model all three paradigms. The toolchain should be powerful to support simulation, optimization, and data handling, and at the same time, it should be flexible to prototype the different modeling approaches. This work uses the JModelica toolbox [
25] since it meets all requirements listed above. This toolbox uses Modelica [
26], a general-purpose modeling language for configuring the models. Additionally, it provides solvers for Optimica [
27], an extension of Modelica for the definition of optimization problems. This choice is also motivated by the development of several open-source Modelica libraries for building energy simulations like
Buildings [
28],
IDEAS [
29],
AixLib [
30],
BuildingSystems [
31], and
FastBuildings [
32]. These libraries facilitate the implementation of white-, grey-, and black-box modeling techniques and continue their development within IBPSA Project 1 [
33].
4.4. White-Box Modeling
White-box modeling uses
only physical insights obtained from the meta-data of the building to represent its thermal behavior. Information like the building orientation, construction components, dimensions, and thermal properties of the materials must be known. The correctness of these data is essential to obtain an accurate model since all parameters are derived from this meta-data. The
IDEAS [
29] library is used for representing the main components of the Vliet building. The main components used from the
IDEAS library to model the building are listed in
Table 1. For the sake of conciseness, we refer to [
29] for a detailed description of the main equations and assumptions used in these component models.
An overview of the heating system and the building envelope model is provided in
Appendix A (
Figure A1a,b). The building envelope and the heating system models are connected through the heating port that interfaces both models. Since the model relies on physical principles, it explicitly represents the water mass-flow rate and the supply and return water temperatures to and from the TABS. Hence, it is possible to directly estimate the heat to the TABS and the electric power from these variables.
It is important to note that the white-box model uses some additional weather inputs for the building envelope, namely the dew point temperature, the atmospheric pressure, the relative humidity, and the wind direction and speed. All these variables are obtained from the DarkSky web service. The solar irradiation is also split into direct normal irradiation and diffuse horizontal irradiation based on a preprocessing step [
34]. Additionally, some simplifications are required from the original
IDEAS library components to allow the introduction of this model into the MPC optimization problem. The introduced changes are the following: (1) The window glazing absorption and transmission properties are set constant, (2) the
ReaderTMY3 class from
IDEAS is transformed to bypass the external solar irradiation data from DarkSky, and (3) the air properties are represented using the air model obtained from [
35]. This air model reduces the number of algebraic loops when compared to the air model used in the
IDEAS library. The resulting system of differential-algebraic equations (DAE) has a total of 4420 unknowns and equations. After translation, the system has 94 continuous-time states and 636 time-varying variables, that is variables calculated from the states.
The parameters are derived from information about the building’s geometry and materials, and the historical data-set described in
Section 4.2 is only used for testing. The calibration of the parameters is performed by an iterative process of changing individual parameters manually and testing to evaluate the simulation accuracy in the historical data. This manual calibration of the white-box model to achieve a proper fit has been the most cumbersome task of implementing the three modeling paradigms. The reason is that a simulation needs to be performed to evaluate every new combination of parameter values, many of them having counteracting effects on the outputs. Automatic parameter estimation is avoided here to respect the white-box model nature strictly. However, a systematic process to identify the parameters that primarily influence the outputs of a complex physics-based model and to train these parameters from monitoring data would be highly beneficial.
The blue dashed lines in
Figure 3 show the evolution of the zone air temperature and electric power over the period for which data was gathered for model calibration. Note that these are the outputs with the implemented simplifications and after the calibration process. The solid black lines indicate the measured variables for the same period.
4.5. Grey-Box Modeling
A grey-box model uses some physical insights with lumped parameters trained by monitoring data to learn the system’s thermal behavior. In this case, the accuracy of the meta-data of the building is not critical since the model also utilizes monitoring data to train its parameters. Contrarily, the richness of the gathered monitoring data is crucial because it is used to train the model parameters through prediction error methods. In this paper, the parameters are estimated through standard least squares. The Grey-Box Toolbox [
32] is used for this task and has been chosen for compatibility with the Modelica language through the
FastBuildings library. A forward selection procedure is employed to decide on the model structure. This process increases the model complexity step-wise by adding more thermal resistances and capacitances. Additionally, the optimized values of the previous more simple models are introduced as initial guesses for the new, more complex models. A 5R3C model architecture is selected for the building envelope. An overview of this model is provided in
Appendix B. Notice that there is an additional thermal resistor in an outer layer of the model not shown in
Figure A2. This thermal resistor connects the test room with a constant temperature source that represents the adjacent room.
The RC model does not explicitly represent the water mass-flow rate nor the supply and return water temperatures to and from the TABS. Because of this, the heat to the TABS needs to be estimated in another way, by using a quadratic polynomial from the three-way-valve opening
u as represented in Equation (
3).
The polynomial parameters (
,
, and
) are trained together with the thermal resistances and capacitances of the model, although they lack any physical interpretation. Only the thermal capacitance representing the zone air temperature (
) is given an initial guess value computed from system knowledge. All other parameters are provided with reasonable initial guesses according to what they represent and are allowed a wider search space because of the larger uncertainty on their value. These are the wall capacitance
, the TABS embedded capacitance
, the wall internal and external thermal resistors
,
, the embedded internal and external thermal resistors
,
, and the window transmittance
. For every model structure considered, a latin hypercube sample is generated on the parameter space to aid in the search for a good local minimum. Additionally, the target variables, i.e.,
and
P, are normalized with their maximum and minimum values along the training data-set to facilitate the parameter estimation process. This process has proven extremely helpful when training a model with outputs of different orders of magnitude. The main components used from the
FastBuildings library to prototype the grey-box model are listed in
Table 2. We refer to [
32] for a complete description of the main equations and assumptions used in these type of models.
Three weeks of measured data are used for training and the last week for cross-validation. The parameter estimation process successfully finds a satisfactory set of model parameters for a model of three states. A substantial reduction of DAE complexity is observed when compared to the white-box model. In this case, the DAE has a total of 88 unknowns and equations. After translation, the system has 3 continuous-time states and 18 time-varying variables. The red dashed lines in
Figure 3 show the outputs of the selected grey-box model in auto- (left of the vertical dashed line) and cross-validation (right of the vertical dashed line).
4.6. Black-Box Modeling
Finally, a purely data-driven model is identified as representative of the black-box paradigm. From the many existing black-box modeling approaches it is decided to use a state-space representation to follow the same mathematical architecture as the one used for the grey-box models. In contrast to grey-box models, the parameters of a black-box state-space model directly coincide with the elements of the state-space matrices of the model. Because it lacks any physical interpretability, a schematic presentation has no added value, one block relates the outputs with the inputs.
Analogously to grey-box modeling, the first three weeks of monitoring data are used for training, and the last week is used for cross-validation. Again, the least-squares method is used to maximize the fitting on training data, and a forward selection procedure is implemented that increases the order of the state-space model one by one. A model of order three is found to provide a good fitting on training data. Coincidentally, this order matches the number of thermal capacitances of the grey-box model. This is convenient since both present the same structure and dimension, which elucidates further their comparison. The DAE complexity is further reduced to 17 unknowns and equations. After translation, the model has three continuous-time states and 13 time-varying variables. The green dashed lines in
Figure 3 show the outputs of the selected black-box model in auto- and cross-validation.
4.7. Prediction Performance Assessment
Three models have been identified, trained and calibrated in the previous sections. Each of them represents one modeling paradigm. A summary of the model structures and their fitting to historical data can be found in
Table 3. In this table,
is the number of equations of the original model;
and
are the number of states and variables after symbolic manipulation, respectively. The RMSE is used for the evaluation of goodness of fit because that is the target metric to be minimized during the parameter estimation process. The RMSE is calculated as defined in Equation (
4).
where:
In Equation (
4),
are the residuals and
is the number of measurements. In Equation (
5),
indicates the model output,
the measurement at time index
k.
Particularly, RMSE is the RMSE in the auto-validation period, and RMSE is the RMSE in the cross-validation period. Notice that this separation is made for the training of the data-driven models only, but it is maintained for the evaluation of the white-box model for clarity. The number of equations refers to the original model size. The translated model is the model after symbolic manipulation i.e., after eliminating aliases and performing index reduction.
What stands out in
Table 3 is the strong contrast between the white-box and the data-driven model sizes. The white-box model is 50 times larger than the grey-box model and 260 times larger than the black-box model when comparing the number of equations in the original models to represent the same building system. After translation, the physics-based model has 31 times more states than both data-driven models. The white-box model is thus the most computationally demanding for both simulation and optimization. While the computational complexity may not be critical for simulation, it plays an important role in optimization, as shown in the following section.
The notable model size difference stems from the amount of detail that the white-box model needs in order to describe the main building physics, e.g., the heat-flow through each of the layers of the walls, roof, and window; the thermal properties of the fluid media like the zone air or the water through the pipes of the heating system; or the air infiltration and the pressure differences. Interestingly, most of the model details come from the building envelope, which is the part of the system mostly exposed to the forecast uncertainties. The model of the building envelope has 91 states and 566 variables after translation, whereas the model of the heating system has only 3 states and 217 variables after translation.
The data-driven models present a simpler structure and rely on the parameters trained by historical data to capture the building dynamics. The selected data-driven models are very similar in their mathematical architecture. Basically, the two main differences between the grey- and the black-box models are that: (1) the black-box model lacks any physical insight, and that (2) its parameters are allowed a much wider search space in the parameter estimation process. Their simpler model structure does not hamper their prediction performance. Contrarily, these models show better accuracy in auto-validation when compared to the very complex white-box model. This indicates that an increased model complexity does not necessarily lead to increased accuracy. Moreover, calibrating a complex physics-based model is found to be a cumbersome and very time-consuming task. Most of the parameters of the white-box model are located in the building envelope, with most of them having a weak influence on the model outputs compared to the heating system parameters. The higher accuracy of the data-driven models may be related with their more flexible structure which facilitates to learn the correlations between the inputs and outputs of the data-set. However, the white-box model is expected to better explain the dynamic coupling of the building system.
Figure 3 and
Table 3 reveal that the black-box model only poorly extrapolates beyond the training conditions.
5. Implementation and Control
The acid test of a controller model is the assessment of its performance when implemented in a predictive controller. This section implements all models described in the previous section one by one in the same MPC formulation for the Vliet building. Three different experiments are designed to challenge the controllers in different ways. In this section first, the control task is introduced. Second, the model predictive control and the solution method of the optimization are explained. Third, the experiments are described. Finally, the control performance of the controllers using each paradigm is analyzed.
5.1. Control Task
The objective of the MPC is to maintain indoor thermal comfort at the lowest possible operational cost. The comfort assessment is based on zone air temperature since it is the main factor influencing the thermal comfort perceived by the occupants in a building [
36]. Note that zone air temperature is used in this work instead of zone operative temperature because it is the only measured temperature in the zone. Most standards are based on the zone operative temperature, but the air temperature can be a good proxy for buildings with TABS systems where the radiant temperature is frequently not too different [
37]. The comfort range is inspired by ISO 7730 Class A, which establishes a comfort band of 22 ± 1 °C. However, this range is shifted two degrees upwards to increase the heat demand intentionally. The motivation is that the space adjacent to the test room is maintained at 21 °C which stabilizes the indoor temperature. A higher heat demand increases the degrees of freedom to test control. Hence, thermal discomfort is defined as the cumulative deviation of the zone air temperature out of the temperature range 24 ± 1 °C, and it has the units Kelvin-hour (Kh). A highly dynamic pricing tariff is contemplated by fictitiously exposing the controller to the 2019 Belpex prices, i.e., the day-ahead prices of the year before the experiments start. No additional taxes or transportation fees are considered in the price signal, to exploit the highly dynamic profile.
Therefore, the control task consists of deciding every step a valve opening value that minimizes the overall discomfort and operational cost. To this end, the controller is provided at the beginning of every control step with only one measurement: the zone air temperature. Also the price signal and the weather forecast along the prediction horizon are provided. It is worth mentioning that the experimental setup does not have any auxiliary fast-reacting system, making control complicated because of the lack of controllability. Since no cooling system is available, the only way for the controller to deal with overheating that can be induced by solar irradiation is by heating less, which might lead to too low temperatures, something that the controller should carefully balance. Still, an MPC with a proper system model should be able to minimize discomfort while aiming for the lowest operational cost.
5.2. Model Predictive Control Formulation
All controller models explained in
Section 4 are implemented in the same MPC. The objective function
l of the MPC is defined according to the control task explained in
Section 5.1 as a multi-objective function with two counteracting terms: discomfort and operational cost. The formulation of this objective function is specified in
Section 5.3 because it varies with each experiment carried out. The set of Equation (
6a–e) defines the optimal control problem that is general to all experiments.
where
is the initial time of the current control step,
are the deviations of the indoor temperature out of the comfort range,
, and
are the technical constraints (lower and upper values) of the input signal, respectively, and
and
are the lower and upper bounds of the comfort range, respectively. The prediction horizon
is set of two days based on the estimated time constant of the test room. A control step of 15 min is chosen as a reasonable trade-off between controllability and granularity of the prediction horizon.
One of the main advantages of using the JModelica toolchain is that the MPC optimization problem can be easily constructed by extending the models with the Optimica language to formulate the objective and constraints of the optimization problem. JModelica utilizes the direct collocation discretization scheme with CasADi [
38] for defining the nonlinear program and for algorithmic differentiation. More efficient discretization methods exist for the mostly linear mathematical structures of building envelopes [
39]. However, direct collocation is known for its versatility and robustness. Moreover, symbolic elimination as implemented in [
40] is used to eliminate many of the algebraic variables in a preprocessing step and to improve the numerical efficiency.
The MPC module described in [
41] is used to effectively reuse the fixed discretization scheme of the receding horizon controller every time step. The module has been extended to allow mutable external data, which was not implemented but is required to expose the optimization to the continuously changing boundary condition data. Additionally, the MPC uses the result from the solution obtained in the previous step to warm-start every new optimization problem. An unscented Kalman filter is implemented as described in [
42] to estimate the initial value of the hidden states of the models every control step after measuring the zone air temperature. The sigma points are chosen according to [
43], and the covariance matrices are constructed according to the fitting information obtained during training and calibration as summarized in
Table 3.
5.3. Description of the Experiments
Three experiments are designed with slightly different formulations of the MPC objective function and constraints. The goal is to challenge the controllers, and thus the controller models, in different ways. All three modeling approaches are tested by implementing their representative model into the MPC formulation of each experiment. The three models are alternated such that the MPC runs for at least two weeks with each model in every experiment. The two-week period is decided as a reasonable period length to trade-off between shuffling the models and enabling a representative behavior of each. Note that shuffling is beneficial because it minimizes the influence of seasonal boundary condition changes.
The experiments always use the same comfort bounds:
°C and
°C, and the same lower limit on the valve opening:
. Moreover, only the zone air temperature measurement is available to the controllers in all experiments and the valve opening is the control variable. The DarkSky web-service is used to retrieve and update the expected weather forecast every control step. More specifically, all weather variables required by each model as described in
Section 4 are obtained from this forecast provider. That is, the ambient temperature and solar irradiation for the data-driven models, and the additional weather variables required by the white-box model. The variations introduced for each experiment on the objective function and the valve opening upper limit are explained below.
Experiment 1 uses the objective function defined in Equation (
7a), where
is the dynamic Belpex electricity price, and
w is a weight that has been carefully tuned to account for the different orders of magnitude between the operational cost and the thermal discomfort. This experiment also sets the upper constraint of the valve opening to its maximum technical allowed value: 10 V. This experiment is interesting from a control point of view because it exploits the full technical range allowed by the only controllable variable: the three-way valve opening. However, it is not representative of an actual TABS building where the typical water supply temperature is never higher than 30 °C. A fully opened valve leads to water supply temperatures that can be high as 50 °C and beyond. This motivates the definition of the second experiment.
Experiment 2 uses the same objective as
Experiment 1, which has been reintroduced in Equation (
8a) for clarity. However, the opening of the three-way valve is limited to 3 V to avoid very high water supply temperatures. This limit leads to water supply temperatures that never surpass 30 °C, which reflect real TABS conditions much better.
Experiment 3 maintains the same limit of the valve opening as
Experiment 2 but squares the operational cost in the objective function aiming to steer more flexibility from the test room during operation. Squaring the operational cost reduces the peaks of energy use when prices are higher. The experiment formulation is summarized in the set of Equation (
9a,b).
Two key performance indicators (KPIs) are defined to benchmark and compare the performance of the MPC in all experiments while using each of the controller models. Since the duration of the implementation of each model into the MPC does not last for exactly the same time period, all KPIs are normalized per day. Additionally, three days of initialization are used every time a new modeling approach is implemented into the MPC. These three days are not included in the KPI calculation. The aim is to avoid that the outcome of one experiment influences the results of the next one.
The first performance indicator is the cumulative discomfort
D as defined in Equation (
10).
where
and
indicate the initial and final time of the evaluation period, respectively.
The second performance indicator relates to the cumulative operational cost. In order to fairly compare the operational cost of different controllers in a real testbed, it is required to normalize the incurred cost by a proxy of the energy needs of the building. The reason is that each controller is implemented in different periods with different energy demands, which might bias the cross-comparison in performance among the controllers. A typical approach (e.g., Široký et al. [
5]) is to normalize the cost with the heating degree days as a measure for the building energy demand. The heating degree days are computed as the difference between the indoor temperature setpoint and the ambient temperature. Inspired by this, the normalized cumulative operational cost is defined by Equation (
11).
Both the thermal discomfort and the normalized operational cost are direct indicators of the MPC performance because they represent what is being minimized in the objective function.
5.4. Control Performance Assessment
5.4.1. General Evaluation
This section analyzes the MPC results in a real test building when using the different controller models.
Figure 4 provides a complete overview of the period when the MPC was actively controlling the test room heating system. The first graph shows the evolution of the zone air temperature and the price signal; the second graph shows the evolution of the three-way valve opening as decided by the predictive controller; the last graph shows the evolution of the main weather disturbances, i.e., ambient temperature and solar irradiation. The duration of each experiment is shown at the top of the figure, and the background colors indicate the periods when each model was implemented into the MPC in the following order: grey-, black-, and white-box model.
An overview of the obtained thermal discomfort and normalized operational cost for each experiment and controller model is shown in the left column of
Figure 5. The results of this figure should be interpreted cautiously because the comparison of control performance over changing boundary conditions is always subject to uncertainty (in this case, mainly related to the weather forecast). It is observed that no controller model always outperforms the others for all three experiments. In fact, it is the MPC formulation that primarily influences the results. This is observed the significant cost reductions obtained when limiting the heat input in
Experiment 2 and when squaring the cost term of the objective function in
Experiment 3, an effect common to all controller models.
The data-driven models show a substantial increase in discomfort during Experiments 2 and 3. This is explained by the different operational conditions of these experiments compared to the training data that do not include information of opening the valve within the range . The detrimental effect of changing operating conditions might have been prevented by exciting the system using the constraint input range when generating the training data-set. This stresses the importance of having high-quality, i.e., rich in information, training data for data-driven approaches. Contrarily, the white-box model does not substantially increase its thermal discomfort when tested out of the conditions used for its calibration since it relies on first-principle physical equations and does not lean on the limited information of the calibration data. Note that, although the grey-box model uses simplified physics to represent the building envelope, its heating system is modeled using a polynomial without physical interpretability. This likely damages the performance of the grey-box model in Experiments 2 and 3 and highlights the importance of modeling the heating system based on physical insights. A way to amend this effect can be to base the polynomial on a full performance map. On the other hand, only the white-box model presents algebraic loops after symbolic elimination. These are sets of variables that depend on each other, increasing the computational complexity of the optimization problem. The three largest blocks have sizes of 12, 9, and 8 variables.
5.4.2. Analyzing the Correlation between Prediction and Control Performance
A preliminary inspection of the correlation between prediction and control performance can be made based on comparing the results from
Table 3 and
Figure 5. It is observed that only for
Experiment 1, where the operational conditions are similar to the training conditions, there is a correlation between the RMSE in auto-validation and control performance. However, the analysis based on the results of
Section 4 is limited because there is no heating during the available cross-validation period. The RMSE in auto-validation represents only the one-step-ahead prediction accuracy. In order to investigate the correlation between prediction and control performance, it is useful to analyze the prediction accuracy for longer horizons and using test data obtained in conditions that differ from the training data. Such analysis can throw light on the robustness of the models to make predictions beyond the training conditions. Hence, the data from the control experiments are used offline to evaluate the prediction error of the zone air temperature as a function of the prediction horizon.
The same state estimator of the MPC is utilized to implement the
a priori estimates of the zone air temperature for different prediction horizons. Every step, the estimate is cached, and the model state is updated with the historical measurement to perform a new prediction estimate. The process is repeated for every model and experiment, and the results are shown in the boxplots in the right column of
Figure 5. The centered line gives the mean, the box gives the first and third quartiles, and the whiskers mark the range of the non-outlier data defined as 1st/3rd quartile ±1.5 times the interquartile range (IQR). Using the data obtained from the experiments allows to conveniently display the prediction errors together with the control performance obtained during each experiment.
Overall, the predictions are centered and not skewed. Only from horizons longer than 24 h, predictions start showing some bias, most notably for the black-box model. The black-box model also shows the most scattered error distribution, which is more noticeable as the prediction horizon increases. The white-box model generally shows the most precise predictions closely followed by its grey-box counterpart. Despite using the same data for prediction evaluation as the data obtained from the control experiments, it is still impossible to make a strong conclusion on any significant correlation between prediction and control performance.
5.4.3. Analyzing the n-Step ahead Control Deviation
To further assess the control strategies, the variability of the optimization results obtained with each model is investigated. The goal is to assess how effectively the MPC implements its devised strategy. At every control step, the complete optimization result trajectories are stored to compare each prediction with the eventual value observed at the prediction time. We call this metric the
n-step ahead control deviation. Notice that it differs from the classical
n-step ahead prediction error in the sense that the predictions are not obtained as the outcome of simulations carried out offline, but as the full trajectory results of the MPC optimizations performed every control step. Therefore, this metric does not only evaluate the controller model, but the combination of all elements that interact within the MPC, namely the model, the weather forecast and the state estimator. Hence, the complete MPC machinery is being evaluated when using a particular model. A small control deviation might suggest a good control behavior because it indicates that the strategy devised by the MPC is effectively implemented. However, it is important to note that small control deviations do not guarantee improved performance.
Figure 6 illustrates the process to compute the control deviations for a variable
V along a horizon with
h optimization steps. In this figure, the subscript
indicates a value that is estimated for time
p based on the prediction of time
q. The red lines illustrate the control deviation for each step of the prediction horizon and an example for the one-step ahead control deviation calculation. Further steps are not shown for clarity.
The distributions of the obtained control deviations are determined for all prediction horizons and shown in
Figure 7. Specifically,
Figure 7 shows the mean and standard deviation of the control deviations as a function of the prediction horizon for each controller model and experiment. In general, the control deviations are centered and remain at reasonable bounds. It can be seen that the deviations of the MPC using the white-box model are the largest, especially for the zone air temperature. These deviations are enhanced during Experiments 2 and 3 where solar irradiation is substantially increased during the periods that the white-box model is implemented into the MPC. The black-box model is also exposed to increased solar irradiation in
Experiment 3, but it does not lead to enhanced deviations. Solar irradiation is also large during the period that the black-box model is implemented in
Experiment 3. However, this model does not lead to enhanced deviations The daily pattern of the control deviations of the zone air temperature evidences the stronger influence of the weather forecast uncertainty in the white-box approach. This effect is not observed for the valve opening control deviations that are not significantly biased and do not show a daily pattern for any model.
The stronger influence of the weather conditions uncertainty on the white-box model predictions can be explained by the increased number of disturbances that this model needs to handle. Interestingly, the white-box model leads to the most accurate predictions of the zone air temperature when using historical data while showing the largest control deviations for the same variable. This lack of correlation reveals the larger sensitivity of this model to the weather forecast uncertainty, which can be considerable, as indicated by
Figure 3. In
Experiment 3 the white-box model shows the most significant control deviations in the zone-air temperature. However, it also leads to the least thermal discomfort of all models. The detrimental effect of a higher uncertainty influence is effectively amended by the MPC machinery that undergoes forecast and state updates every control step. Also, the more reliable representation of the heating system aids in balancing this effect.
6. Discussion
There are strong reasons to believe that Modelica will constitute the future of building modeling and optimization, namely the support of IBPSA and several tools, the active development of multiple building component libraries, the language flexibility, and the possibility of extending the models for gradient-based optimization algorithms. An essential choice in the study has been the selection of the representative models. The white-box model is prototyped with the IDEAS library. The grey-box model architecture is decided from a forward-selection procedure. Finally, the black-box model is chosen to have the same representation as the grey-box model but not being constrained by any physical insight. Despite the scope of this study being limited to one model per paradigm, the selected models constitute a good representation of the main characteristics of each modeling paradigm.
This paper has highlighted practical aspects that are relevant for the implementation of each modeling approach into MPC. The most notable aspect is the significant size difference between the physics-based and the data-driven models. Even though there has been considerable progress with the development of numerous Modelica libraries that ease the development of white-box models, there is still a substantial engineering effort required to prototype and calibrate them. One of the main advantages of the white-box modeling approach is that it theoretically does not require monitoring data to be assembled. However, we experienced here that historical data is still needed to validate and calibrate the model. In fact, despite having complete access to all geometry and material properties, we observe that the calibration process is
essential to achieve a good prediction performance. There exist efforts to alleviate this issue by generating the models directly from building information models [
44], from geographic information systems [
45], or from building floor plans and meta data [
46].
Even if historical data is still required, the physics-based approach brings other relevant advantages. First, the richness of the data used for calibration and validation is not critical because the model is reinforced with physical insights. Second, constraining the model with physical principles increases its robustness and reliability so that the model may be well suited to make predictions for the full range of operating conditions. Although this notion may not be new, we experience that not modeling the heating system can seriously hamper the control performance of the data-driven models when working out of the operating conditions captured by the training data-set. Finally, the physics-based approach brings other implicit advantages like the possibility to interpret its results or its increased suitability for fault detection and diagnosis.
Another relevant aspect that has been investigated is the correlation between prediction and control performance. It is found that a better prediction performance does not necessarily indicate an improved control performance. Contrarily, increasing the amount of physical detail in the model increases the robustness in prediction and control performance. This was confirmed by Blum et al. [
4] who evaluated the prediction performance using the RMSE in cross-validation. We come to the same conclusion by also analyzing the n-step-ahead prediction errors for horizons up to two days. In fact, the white-box model shows the worst accuracy of all models in training data, while generalizing better and outperforming in control. Increasing the amount of physical detail is, however, a double-edged sword: the model size is substantially increased, which is particularly critical for the solution method of the optimization problem. Two approaches can be followed: either the model complexity is reduced or the optimization solver is improved. The transcription method used is particularly critical in this regard since it can easily magnify the optimization complexity. Another disturbing matter when increasing the model size of the building envelope is its increased sensitivity to weather forecast uncertainty. The increased sensitivity to weather forecast uncertainty is revealed by the daily pattern of the control deviations evaluated for the zone air temperature, common to the three experiments and magnified by the high solar irradiation.
Overall, we observe that including physical insights in a model is beneficial, but the increased complexity should be carefully handled. On the one hand, the analysis of the models’ architecture in
Section 4 shows that most of the complexity of a white-box model comes from the building envelope: only 3 out of the 94 model states belong to the heating system. On the other hand, the control performance assessment of
Section 5 highlights the importance of modeling the heating system in detail. Moreover, it is suggested that a more detailed building envelope model can be more sensitive to weather forecast uncertainty. Consequently, we advocate a modeling approach that synergizes the physics- and data-driven paradigms. Primarily the heating system should be modeled in detail and based on first principles, which is motivated by three main aspects that are treated in this paper: (1) the relevance of the heating system in control performance, (2) its low complexity overhead, and (3) its low sensitivity to uncertainty during operation. On the other hand, the building envelope can substantially benefit from using operational data for training and making some simplifications, motivated by: (1) the benefits of utilizing a systematic approach to calibrate the parameters, (2) the high complexity overhead of the building envelope, and (3) its high sensitivity to uncertainty during operation. Still, physical insights may be used as much as possible to derive good initial guesses of the parameters and obtain an intelligible model.
7. Conclusions
This paper investigates the strengths and weaknesses of the three main modeling paradigms for optimal building predictive control. A representative model of each paradigm is selected, and the three models are configured using the same optimal control framework for a thermally activated building located in Leuven, Belgium. The models are analyzed and evaluated in prediction and control performance. The main difference between the physics- and data-driven models is the disparity in model size, which stems from the number of equations and states that the white-box model needs to describe the main building physics completely.
The physics-based model has 94 states for the envisaged case, while the data-driven models use only 3 states. It is shown that most of the states of the white-box model belong to the building envelope, with only three states belonging to the heating system. Despite its increased level of detail, the white-box model has the highest RMSE in historical monitoring data, and its calibration process is a very cumbersome task. However, the results suggest that increasing the amount of physical detail is beneficial for prediction and control. Specifically, it is shown that not modeling the heating system based on first principles can seriously hamper the control performance. Prediction and control performance are also compared, but a correlation between both metrics cannot be found, even when using the same data for prediction assessment as those obtained from the control experiments. Finally, the n-step ahead control deviation is proposed to assess if the strategies devised by the MPC are effectively implemented. The analysis of this metric and the prediction performance indicates that the very detailed building envelope model may be more sensitive to forecast uncertainty.
To conclude, we suggest a modeling approach that synergizes the physics- and data-driven approaches. On the one hand, the heating system may be mainly modeled based on physical principles because of its lower complexity overhead and less exposure to uncertainty. On the other hand, the building envelope may introduce some simplifications while using physics to derive a good initial guess and monitoring data to train its parameters.