1. Introduction
As part of the European Green Deal, the Commission proposed in September 2020 to raise the 2030’s greenhouse gas emission reduction target, including removals, to at least 55% compared to 1990 [
1]. This will enable the EU to move towards a climate-neutral economy and implement its commitments under the Paris Agreement by updating its Nationally Determined Contribution. This climate and energy framework is subsequent to the package adopted in 2009 [
2], having the intent of setting energy and climate targets to be achieved by 2020. Despite that appreciable actions have been implemented, the European Commission assessed that EU was 50% toward the target in 2018, with reference to the buildings and appliances markets [
3]. It has to be underlined that buildings are among the main protagonists of the world’s growing energy consumption, employing between 40 and 45% of the total European energy expenditure [
4]. In addition, inhabitant’s requirements (in terms of thermal and visual comfort and indoor air quality) are supposed to augment with the need to preserve their health and productivity [
5]. Flanking this, people are progressively increasing the time spent inside buildings [
6]. Thus, this sector deserves and asks for major heed to try to address energy needs through an efficient use of electricity and gas, leading to optimized consumption and related costs. Attempting to support these actions, in the last decades energy and comfort management systems (ECMS) have been developed and used to actively control systems for thermal and air quality regulation of the buildings, that can be grouped as following:
heating, ventilation and air-conditioning (HVAC) system,
lighting system,
others, e.g., electrical appliances and devices.
The importance of ECMS has been highlighted by a survey made in the U.S. stating that HVAC systems are responsible for about 50% of the site energy consumption [
7]. Therefore, ECMS can strongly affect the overall energy consumption, justifying the efforts of building and proposing new automated control systems to optimize HVAC performances. Notwithstanding, the lack of real-time input of dynamic elements in the buildings (e.g., the number of the occupants in the room, etc.) are hard to be managed through control systems. Indeed, users can have some habits not easily structurable as data to be used during the development of ECMSs. Moreover, required comfort levels may change, being related to both the perceptions of the occupants and the type of activity they are addressing. Thus, ECMSs are called to solve extremely complex problems. The classical model-based approach [
8] consists of gathering all the data related to the buildings’ physical and geometric characteristics and of modeling the dynamic processes with a non-linear, input/output, time invariant model (and simulation software are frequently used to aid this). Instead, in the last decades, data-driven approaches are surging [
9,
10]. This paper proposes a data-driven multi-step approach for estimating the interior temperature of a building. To address this scope, single-step or multi-step models can be used. When models are integrated in ECMS to plan the control strategy of buildings’ equipment, multi-step models are preferred over single-step ones, being able to exploit the thermal inertia of the building. The multi-step approach can be applied using in a recursive way a single regression model, i.e., feeding the prediction back to the regression model. This method can result in a low long-term precision, because a model is not trained to manage its own output. Therefore, this research develops a multi-step approach training a different Machine Learning regression model for each considered future instant. The rationale behind the approach has been chosen based on two steps. First, an investigation of the extant literature on the methods to be considered for tests has been conducted, shrinking the field of investigation to non-recursive multi-step approaches. Second, the results obtained on a pilot case using the multi-step approach with various Machine Learning (ML) regression models have been assessed, leading to the choice of the Support Vector Regression (SVR) model.
The paper is structured as follows.
Section 2 starts presenting a literature review concerning data-driven ECMSs approaches and about data-driven modeling for the thermal building dynamics, leading to shrink the focus on multi-step ones. Moreover, the theory behind the SVR model is introduced. Then, the research methodology adopted is described, explaining its phases, the evolution of the model proposed and the case chosen as pilot for the model development.
Section 3 presents the main results of the research. First, the new SVR data-driven multi-step approach is proposed. Then, an application case is presented to assess and validate the developed model.
Section 4 discusses results, evaluating the performances of the model, its absolute error and analyzing the predicted temperature profile. Finally,
Section 5 concludes the paper, also unveiling its limitations and providing an overview of the future directions.
3. Results
This section presents the results obtained through the adoption of the research methodology presented above. Based on the research context proposed in
Section 2.1, the SVR data-driven approach characterized by a multi-step structure is presented, introducing its input and output variables in
Section 3.1, while in
Section 3.2 the results of the application conducted on the pilot case
The Bridge office are provided to give practical evidence to the benefits deriving from the model adoption.
3.1. The New Data-Driven Multi-Step Approach Based on the SVR Model
Based on the research context provided in
Section 2.1, the new approach is proposed.
The data-driven predictive model on which the approach is based uses the following input variables:
datetime variables: minute within the day, day within the year, if the day is a weekday or in the weekend;
status of the cooling system: for how many instants the cooling system has been consecutively active and not active, respectively, in the last 30, 60 and 120 min;
quantity of rain fell in the last 30 and 60 min;
cloud cover percentage in the last 30 and 60 min;
mean outer temperature in the last 30, 60 and 120 min;
difference between the current value of the outer temperature and the value, respectively, 15, 30 and 60 min ago;
difference between the inner and outer temperature, respectively, 15, 30 and 60 min ago;
difference between the current value of the outer temperature and its value in the prediction instant.
In order to capture the cyclic nature of the minute within the day and of the day within the year, the sine and cosine of their values are used.
Let be the current instant, let N be an integer and n a number between 1 and N. Assuming that the target is the estimation of the system dynamic for N future instants , the predictive model is the composition of N sub-regressors, denoted , …, : the n-th regressor takes as inputs the most recent observations of the input data collected by the sensors and, possibly, all the available information for the future instants from to , like the control strategy for the HVAC system and the weather forecast, and gives as output the system status at the instant . Hence, each is a function from to where is the dimension of the input data.
Following [
26], the model does not directly estimate the inner temperature dynamic, because this function is not easily learned if the effect of a certain action on a short interval is small. Instead, the model’s target variable is the difference between the current observation and the target future observation of the inner temperature, i.e., denoting
the current instant,
the inner temperature at time
t, the n-th regressor predicts the value:
Let us denote:
the current instant,
the inner temperature measured by the sensors at time ,
the data collected from the field described above for the instant ,
the sequence of control actions for the instants ,
the outer temperature forecast for the instants ,
the prediction of the temperature delta between time and .
For the application case, the control action values are 0 or 1 respectively for off and on.
For each instant
with
, there is a trained SVR model
which estimates the inner temperature delta for the instant
, taking in input the current datum
, the sequence of future actions
and the future outer temperatures
. Hence, the global model composed by the
N sub-regressors can be described by the equations:
and the estimate
of the inner temperature
for the instant
obtained at
is
The performance comparison metrics adopted to evaluate the predictive model are the mean absolute error (MAE) and the mean absolute percentage error (MAPE), defined respectively as:
and
where
is the actual value and
is the predicted value.
3.2. Application Case
The data-driven approach described in
Section 3.1 has been implemented and tested on the application pilot case introduced in
Section 2.4. In addition, the results coming from the application of the SVR model have been compared with the ones coming from other commonly used regression algorithms, i.e., Random Forest [
38], Extreme Gradient Boosting [
39] and Multilayer Perceptron neural network [
40]. The results of the algorithms’ application are shown in
Appendix A.
The SVR model implementation used in this work comes from the Python open-source library Scikit-Learn [
41]. The selection of the best parameters of the model is done splitting the available dataset in three disjoint and time consecutive sets: the first is used to train the algorithm, the second to select and validate the best set of hyper-parameters and the last to test the trained model. Each SVR sub-regressor is treated as a stand-alone model and the best parameters are chosen by minimizing the sum of the absolute errors made by each regressor on the validation set. The applied parameters selection technique explores a grid varying the parameters
and
C (see
Section 2.1.3).
For the training, testing and validation of the model, a dataset has been collected. The dataset refers to the summer period 2020. The 14 days from 18 August, to September 1st are used as test set (see
Section 2.4), and the 15 days from 3 August, to 17 August as validation set. The number of training days is one of the model parameters that are let vary during the parameters fine-tuning process: the last day is always 2 August and different sizes were tried from 15 to 210 days. To guarantee that the data are independent, the three sets do not overlap. Then, for the training process of the SVR model a grid search has been employed. The possible values are:
in 0.001, 0.01, 0.05, 0.1, 0.25 and 0.5;
C in 0.001, 0.01, 0.1, 0.5, 1 and 5.
The kernel function is the Gaussian kernel introduced in Equation (
7). The data are sampled every 15 min and a multi-step model composed by 32 sub-regressors is considered, so that the prediction horizon is 8 h (480 min).
Figure 7 and
Figure 8 show the surfaces of the MAE and MAPE values with respect to the prediction horizon and the length of the training set. The results refer to the test set. As one may reasonably expect, both metrics grow with the minutes offset. The MAE is almost equal to zero (0.1 ± 0.2 °C) when the minutes offset from the prediction instant is 15 min, for all the values of the number of training days. The best values are found for 45 training days. In this case the error starts from 0.1 ± 0.2 °C when the offset from the prediction instant is 15 min and reaches 0.3 ± 0.8 °C for a prediction horizon of 8 h. For less than 45 training days, the error is higher, probably because the regression model has less data for learning the system dynamics. Up to 120 training days, the values of the MAE and of the standard deviation of the absolute error are very similar to the ones observed for 45 training days, while for more than 120 training days the error grows. This situation can be explained by the fact that data referring to many months before the test set, not only do not add information to the regression algorithm, but they add noise in the training process resulting in a higher error. The same observations are valid for the absolute percentage error.
4. Discussion
In this section the absolute error is analyzed to fully discuss the results introduced in
Section 3.2.
Considering the average of the MAE and of the standard deviation of the absolute error on the test set with respect to the number of training days, the minimum is reached for 45 training days with a value of 0.23 ± 0.69 °C. The values for 30, 60, 90 and 120 training days are very similar. The MAPE of the test set has its minimum for 45 training days with a value of 0.81 ± 2.31. The time necessary to train the model depends on the processing computer characteristics and on the dimension of hyper-parameters grid used for the model fine-tuning. On a computer with CPU processor having 1.80 GHz frequency, the time grows with the number of training days, starting from 7 min for 15 days and up to 320 min for 210 training days. See
Table 2 for more details.
An exhaustive analysis on the output prediction needs to be catered. The predictive model used in the simulations is trained on 45 days. Overall, the model shows very good performances and satisfies the expectations, except when unpredictable events (e.g., windows opening) happen. These situations result in a higher prediction error; see also
Figure 9 which shows the results for the sub-regressors
,
,
,
and
. In
Figure 9a–e, in the upper plot the blue dashed line is the real value of the temperature measured by the sensors, the orange continuous line is the predicted temperature profile and the thin black dashed-dotted line is the status of the control variable—value is 1 for “on”, 0 for “off”; the lower plot shows the prediction error. In the prediction error plots the horizontal lines grid are one-degree steps. The plots refer to the test set.
The model makes the most significant errors during the first three days of the test set. On the first day of the considered period (18 August) the temperature inside the building decreases strongly even if the air conditioning system is off. In this situation, the absolute error increases together with the minutes offset, reaching a maximum of 4 °C when the prediction horizon is 6 h and 8 h (respectively
Figure 9d,e). This can be explained by the fact that the building windows were open. A similar situation can be seen on 20 August, where the inner temperature drops before the air conditioning system is turned on. In these two situations two different phenomena occur: on 18 August a horizontal shift between the real and the predicted temperature profiles is observed. This is caused by the fact that the predictive model expects that the inner temperature grows slowly during the day, because the air conditioning is off. Hence it “projects” the current temperature into the future. On the other hand, the temperature generally grows before the air conditioning is turned on, so that on 20 August the predictive model expects a similar behavior. This is the cause of the high difference between the predicted and the real profiles, especially for the furthest horizons. Finally, on 19 August, the inner temperature falls steeply from more than 31 °C to 28 °C. In this case, the air conditioning system was on, but the sudden and strong decrease in the temperature is due again to the open windows. In the rest of the dataset, where the thermal dynamic is controlled by the air conditioning system and the windows are closed, the prediction absolute error is generally below 1 °C even for the furthest prediction horizon.
5. Conclusions
In this research a data-driven multi-step approach for dynamically estimating the interior temperature of a building has been proposed. The predictive model can be integrated in an ECMS and is based on the SVR model. The input data are the weather conditions and the current inner temperature of the building. The novelty of the model proposed stands in its foundation on the multi-step approach to estimate the interior temperature of a building. Indeed, single-step or multi-step models can be used to address this scope. When models are integrated in ECMS to plan the control strategy of buildings’ equipment, multi-step models are preferred over single-step ones, being able to exploit the thermal inertia of the building. The multi-step approach can be applied using in a recursive way a single regression model, i.e., feeding the prediction back to the regression model. This method can result in a low long-term precision, because a model is not trained to manage its own output. Therefore, this research develops a multi-step approach training a different Machine Learning regression model for each considered future instant. The SVR regression model has been chosen based on two steps. First, an investigation of the extant literature on the methods to be considered for tests has been conducted, shrinking the field of investigation to non-recursive multi-step approaches. Second, the results obtained with the regression model on a pilot case have been assessed and compared with other ones using as well a multi-step approach. The model has been applied in Evogy’s headquarter, The Bridge office, and integrated in its ECMS. This building space represents the pilot case where the model has been applied to verify that it can effectively reproduce the thermal dynamic of a given building, even for a future horizon of 8 h from the prediction instant. The error analysis shows that the predictive model accuracy depends on the number of days that are used to train the SVR multi-step model. For the optimal hyper-parameters retrieved through a grid search method, the best results are found for 45 training days. In this case, the error starts from 0.1 ± 0.2 °C when the offset from the prediction instant is 15 min and reaches 0.3 ± 0.8 °C for a prediction horizon of 8 h. Moreover, the results highlight that the predictions are reliable, given that the thermal dynamic is not influenced by unpredictable variables like the windows opening by the building occupants.
As in most ML models, the main limitation of the approach derives from the fact that it is not robust to changing conditions and it requires periodical re-training or enrichment of the training dataset to perform well.
This work contributes to knowledge providing a new model that has been developed based on both the gaps raised by the extant literature and the data from the field of the pilot application case conducted. In addition, the model proposed contributes to practice providing an affordable tool to foster the energy management of buildings, either civil or tertiary. Indeed, the model can be applied to different types of buildings (with heterogeneous characteristics), provided that data collected from the field are available. Hence, the present solution has the practical advantage of being generalizable and scalable more easily than a standard model-based approach (typically proposed in literature as the referring one to support ECMS) requiring a deep knowledge of the building features. Indeed, the proposed approach is promising to be applicable to any type of building without needing as input specific geometrical/physical characteristics. Moreover, the data-driven predictive model proposed can be easily implemented with open source libraries, so that it can be integrated as part of larger software architectures.
From a managerial perspective, the model can help building managers to better plan and schedule the use of HVAC systems based on the temperature forecast provided. In addition, it would help to reduce energy consumption, its environmental impact and also the related costs, not neglecting the enhanced social impact (with a higher degree of users’ comfort level).
From a policymakers’ perspective, the model proposed can be a powerful tool to help governments in reducing energy consumption and its related environmental impact.
Finally, some limitations have to be reported, opening at the same time new rooms for further investigations. So far, the model has been tested on a single case,
The Bridge office, limiting its adoption to a single market (civil buildings) and using data coming from the summer period. The model can be further tested with more application cases and applied in an MPC problem. In addition, the model proposed is based on tests conducted with summer data. Further tests with data belonging to different seasons of the year will lead the authors to strengthen their new position in favor of the multi-step approach using the SVR model in place of other ML regression models and to choose the most reliable overarching approach. Supporting this, the adoption and use of Evogy’s ECMS [
14], flanked with the model proposed, would support its diffusion on different cases.