The influence of unmeasured occupancy disturbances on the performance of black-box thermal building models

Previous studies have identified a significant potential in using economic model predictive control for space heating. This type of control requires a thermodynamic model of the controlled building that maps certain controllable inputs (heat power) and measured disturbances (ambient temperature and solar irradiation) to the controlled output variable (room temperature). Occupancy related disturbances, such as people heat gains and venting through windows, are often completely ignored or assumed to be fully known (measured) in these studies. However, this assumption is usually not fulfilled in practice and the current simulation study investigated the consequences thereof. The results indicate that the predictive performance (root mean square errors) of a black-box state-space model is not significantly affected by ignoring people heat gains. On the other hand, the predictive performance was significantly improved by including window opening status as a model input. The performance of black-box models for MPC of space heating could therefore benefit from having inputs from sensors that tracks window opening.


Introduction
The Danish Government has committed to meet the EU goal of reducing CO2 emissions by 40 % between 1990 and 2030 [1]. To fulfil this goal, fossil fuels are gradually outsourced from the Danish energy production, and replaced by renewable energies such as wind power, which already accounts for more than a third of the Danish electricity production [2]. Energy production from renewable energy sources are weather dependent, causing a fluctuating energy production and a mismatch in load and time between energy production and energy demand. Future Danish energy production and distribution requires interaction between the electricity grid and the district heating grid. Therefore, fluctuating production of electricity can also affect future district heating systems [3]. This constitutes a higher need for energy storage and flexibility in the energy demand of district heating.
The authors of [4][5][6] investigated the potential of using economic model predictive control (E-MPC) to facilitate load shifting of space heating in residential buildings. They used price signals and weather forecasts to minimize heating costs over a prediction horizon of 24-72 hours. The buildings were thus preheated when the price was low in order to reduce the heat demand when the price was high. This led to reduced energy costs and CO2 emissions and reduced critical peaks in the energy system.
A crucial and difficult part of implementing an MPC is to acquire a good mathematical model to represent the thermodynamic behaviour of the building. Most studies on E-MPC and system identification of buildings assume fully known (measured) disturbances related to occupancy behaviour or none at all [5][6][7][8]. However, this assumption is rarely met in practice and the current study examines the consequences thereof in terms of the predictive performance of a black-box building model. More specifically, the influence of unmeasured people heat gains and venting was investigated.

Method
The current study was based on a co-simulation of an EnergyPlus (EP) case building (Section 2.1) and a MATLAB script for generating venting schedules. The co-simulation was facilitated by the program BCVTB and was used to generate datasets (D1-D3) with different levels of occupancy related disturbances:

D1:
Data from a single simulation with no occupancy.

D2:
A set of data from 50 simulations with different people heat gains schedules (Section 2.2).

D3:
A set of data from 50 simulations with different people heat gains and venting schedules (Section 2.3).
These datasets were then used to build black-box models (Section 2.4) and examine the extent to which the predictive performance was influenced by not knowing the people heat gains and venting schedules.

EnergyPlus building model
A one bedroom terraced house was modelled as a single thermal zone in EnergyPlus with the geometry illustrated in Fig. 1  People heat gains corresponded to two adults (when present) with a constant activity level of 100 W/person. Section 2.2 describes how different schedules for people heat gains were generated based on a calculation of the probability of occupancy. Venting was assumed to only happen during occupancy through the west-facing window. It was modelled in EP using the ZoneVentilation:WindandStackOpenArea object. The air flow rate was a function of wind speed and thermal stack effect. There were no temperature restrictions but whenever the wind speed exceeded 8 m/s the window was closed (if open). Fig. 2 shows that the venting model works as intended. Section 2.3 describes how different venting schedules were generated based on a calculation of the probability of window operation.

Occupancy schedules
Several studies have proposed models for stochastic occupancy of residential buildings [10][11][12]. The authors of [10] extracted occupancy patterns from CO2 measurements in a range of Danish multi-family social housing buildings. Based on these occupancy patterns, a time-dependent Markov-Chain was used to generate transition probabilities for entering and leaving the building, as it was done in [13]. A time-dependent Markov chain calculates the transition probability of the current time step based on occupancy state of the previous time step. The transition probabilities are described as follows: Where i and j are the possible occupancy states (present/not present), X is the occupancy state, Pij is the transition probability from state i to j, nii is the count of no transitions, nij is the count of transitions from state i to j and k is the time index. Since occupancy patterns are different for workdays (Mon-Fri) and weekends (Sat-Sun), transition probabilities were calculated for 24 hours in workdays and weekends separately. Transition probabilities were generated each hour, i.e. occupancy state (present/not present) could only change once at the beginning of each hour. The occupancy profiles applied in this study were generated by comparing the transition probability to a random number between 0 and 1 drawn from a uniform distribution. If the random number was higher than the transition probability associated with the current hour, the occupancy state would change. Fig. 3 shows a week with two different occupancy profiles generated from these probability functions.

Window opening schedules
Different models have been developed to describe stochastic window opening behaviour [14][15][16], but this study used the logistic probability functions in [14]: Where p is the probability of opening (2) or closing (3) Fig. 4 shows two window opening schedules generated for the same week using these formulas. The average time of window opening for dataset D3 is 42.6 minutes with a standard deviation of 44.5 minutes.

Black-box models
A discrete second order state space model in innovation form was investigated in this study: Where k is the time index, A, B, C and K are system matrices, x is the state vector, e is the error (or innovation), u is the input vector and y is the output vector. In this study y was the indoor air temperature Ti [°C]. The unknown system matrices were estimated from the EP data using a subspace identification method (N4SID) in MATLAB and refined using prediction error minimization (PEM) as is also done in [8].
In order to get good training and cross-validation data a Pseudo Random Binary Sequence (PRBS) was used to generate a temperature set point that varied between 20 and 24 °C and was used by the PI controller in EP. The data from the simulation period was divided into a training period of 15.9 days and a validation period of 10.6 days that were used to cross-validate the models [17]. Fig. 3 shows the training data. Table 2 lists different scenarios (S1-S7) that was investigated in this study along with the corresponding dataset (D1-D3). The difference between scenarios are the level of occupancy related disturbances that were included in the EP model and the black-box models, respectively.
In S1 there were no occupancy related disturbances in the EP model and the corresponding data (D1). This data was used to train a single black-box model with the following input vector: Where Ta is outdoor air temperature [°C], )s is global solar irradiation [W/m 2 ] and )r is space heating [W].
In S2-S3, people heat gains was included in the EP model and hence the corresponding dataset D2 with 50 simulations using different people heat gains schedules. In S2, a black-box model structure without people heat gains was used (6), but in S3 the people heat gains )p [W] were added to the third entry of the input vector as follows: In S4-S7, both people heat gains and venting were included in the EP simulation and hence the corresponding dataset D3 with 50 simulations using different people heat gains and venting schedules. In S4, the black-box model did not include any of these in the input vector (3). In S5, the input vector included people heat gains (4). In S6, the input vector did not include any people heat gains, but it included an additional binary input w with the window opening status (0 for closed and 1 for open): In S7 the black-box model applied an input vector that included both people heat gains and window opening status:   Table 1 for details on scenarios.

Results
In each scenario, 50 different black-box models were estimated from the 50 different sets of training data except S1 where just a single model were estimated. Each of these models were cross-validated on the 50 different sets of validation data for the given scenario (i.e. 2500 crossvalidations for each scenario). The performance was then evaluated in terms of the root mean square error (RMSE): Where ‫ݕ‬ ොሾ݇ሿ is the predicted room air temperature and ‫ݕ‬ሾ݇ሿ is the actual temperature in time step k. N is the total number of data points. In this paper, the RMSE for 24hour ahead predictions are reported because this is of interest for many E-MPC applications. Fig. 6 shows one set of validation data from D3 and the black-box models of S5 and S7's ability to predict the indoor temperature 24 hours ahead. It can be seen that the S7 black-box model generally performs better than S5. Between the 23/3 and the 24/3 venting occurs, and the EP temperature drops; here it is clearly seen how black-box model S7 predicts the drop due to the venting input, whereas black-box model S5 overestimates the temperature significantly. Fig. 7 depicts the mean and standard deviation of the RMSE for each scenario. S1 without any occupancy related disturbances in EP had a RMSE of 0.74 °C and can be regarded as a baseline. S2 and S3 had very similar mean RMSE of 0.76 and 0.73 °C, respectively. This indicates that it has little effect to include people heat gains in the black-box model even though it was present in the EP model. S4  The results thus indicates that it makes no significant difference to the predictive performance of the black-box model whether or not people heat loads were included as an input. Contrary, the performance was significantly improved when window status was included. In practice, this imply that installing window opening sensors could provide valuable information when training a model for MPC.

Discussion
There are certain limitations in this study which call for further study. A future study should be carried out with different occupancy schedules and with higher loads from both occupancy and occupancy related equipment such as computers and television etc. Furthermore, the simulation was performed for an intermediate period with a heat demand as well as a high probability of venting. However, the influence of venting might be lower in colder months during the heating season due to lower probability of venting because of less solar heat gains and lower outdoor temperatures. Finally, this study focused solely on blackbox models, thus leaving a similar analysis including physics-based grey-box models as a topic of future research.

Conclusion
This study investigated the extent to which a black-box model of building thermal dynamics is influenced by including people heat loads and/or window opening status as input. The results indicate, that including people heat loads has a small effect while window opening status had a significant effect on the RMSE. These models could therefore benefit from having inputs from window sensors.