Get 20M+ Full-Text Papers For Less Than $1.50/day. Start a 14-Day Trial for You or Your Team.

Learn More →

Hybrid Models for Indoor Temperature Prediction Using Long Short Term Memory Networks—Case Study Energy Center

Hybrid Models for Indoor Temperature Prediction Using Long Short Term Memory Networks—Case... buildings Article Hybrid Models for Indoor Temperature Prediction Using Long Short Term Memory Networks—Case Study Energy Center 1 2 , 3 , Silvia Di Già and Davide Papurello * Department of Management and Production Engineering (DIGEP), Politecnico di Torino, Corso Duca degli Abruzzi, 24, 10129 Turin, Italy; silvia.digia@studenti.polito.it Department of Energy (DENERG), Politecnico di Torino, Corso Duca degli Abruzzi, 24, 10129 Turin, Italy Energy Center, Politecnico di Torino, Via Paolo Borsellino, 38/16, 10138 Turin, Italy * Correspondence: davide.papurello@polito.it; Tel.: +39-3402351692 Abstract: In the European Union States, household energy usage accounts on average for 40% of overall energy consumption and is responsible for a considerable amount of carbon dioxide emissions. The urgent need to take concrete action to identify solutions that can ensure more effective usage of energy in households, both because of environmental and political reasons, has been repeatedly stated by the European Parliament. White box, grey box and black box predictive models were demonstrated to be a feasible approach to predict the indoor temperature to implement an effective energy management strategy. This study has the purpose of illustrating the potentiality of an LSTM Artificial Neural Network in a short and long-term prediction of the indoor temperature in 15 offices distributed on three storeys of an existing building (Energy Center of Turin (Italy)). The indoor temperature was predicted two hours, five hours and one entire day ahead. The performance of these algorithms has been evaluated not only based on two main criteria (i.e., Root Mean Squared Error and Mean Absolute error) but also by considering the adaptability of the model between the three floors and in terms of different years. Moreover, the proposed work explains how parameters Citation: Di Già, S.; Papurello, D. affect performances, aiming to properly identify the optimal model structure. Current results indicate Hybrid Models for Indoor that these models can provide accurate predictions for all the proposed time scales and could all Temperature Prediction Using Long potentially be used for predictive control purposes to optimise the energy demand. The novelty of Short Term Memory Networks—Case this study is to show that these models can only be trained on data for a limited period and a specific Study Energy Center. Buildings 2022, plane, and then be reliable in predicting indoor temperature, both for different planes and for random 12, 933. https://doi.org/10.3390/ periods, taking into account temperature and relative humidity. Furthermore, input parameters are buildings12070933 limited to indoor HVAC variables, to ensure acceptable predictions regardless of outdoor parameters Academic Editor: Karim Ghazi availability. The only exception is the outdoor temperature, because of its undeniable and proven Wakili importance, it was retained as the only exogenous input variable. Based on current literature and Received: 21 December 2021 temperature perception capabilities, the results were considered acceptable if the RMSE was less than Accepted: 21 June 2022 0.15 or better yet 0.10, which is equivalent to an inaccuracy between the predicted and actual indoor Published: 1 July 2022 temperature of 0.15 C/0.10 C. On average, the models trained on the Energy Center database achieved an error of 0.1 C in terms of RMSE. Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in Keywords: prediction model; indoor temperature forecasting; LSTM; artificial neural networks; published maps and institutional affil- iations. energy savings Copyright: © 2022 by the authors. 1. Introduction Licensee MDPI, Basel, Switzerland. The EU has repeatedly stressed the need for efficient building energy management [1] This article is an open access article since they account for 40% of total energy consumption and 36% of total CO emissions distributed under the terms and within the EU [2,3]. As HVAC systems are responsible for the most energy consumed in conditions of the Creative Commons buildings [4], automation of residential as well as commercial buildings and their “smart” Attribution (CC BY) license (https:// breakthrough is a key target to reduce energy waste. This amount is constantly increasing creativecommons.org/licenses/by/ due to population growth, rising temperatures and higher comfort standards. All the 4.0/). Buildings 2022, 12, 933. https://doi.org/10.3390/buildings12070933 https://www.mdpi.com/journal/buildings Buildings 2022, 12, 933 2 of 26 trends mentioned suggest that HVAC will be increasingly used soon. Predictive models are one of the emerging technologies of recent times and are applied to different sectors. In the context of buildings, predictive models are an essential resource for achieving a reduction in energy consumption. The prediction of indoor temperature from certain input variables allows, for example, the prediction of short- and long-term energy demand and peak load, and, consequently, a more rational and optimised energy production that brings with it significant benefits. It also opens the door to pre-heating and pre-cooling solutions based on weather forecasts, and to better equipment management strategies that aim to reduce internal fluctuations as much as possible. Predictive technologies play an important role in laying the foundations for the implementation of intelligent buildings, where automatic control strategies are implemented to anticipate both user behaviour and the effects of external conditions to maximise indoor comfort. A plethora of different models [5] was employed, including building energy simulation software (the so-called white models) such as EnergyPlus and TRNSYS, that allows to explore even not yet existing buildings behaviours and remain unaffected by database quality. Nevertheless, the mathematics model realised to describe the building requires a lot of parameters and computational times are prohibitively high. On the other hand, black models make their predictions out of historical data thanks to statistical models instead of physical principles, with lower computational times and less required expertise, even if they are significant data- hungry, therefore huge volumes of data are needed to get accurate predictions. Finally, grey models are intermediate approaches: they are less affected than black models by data availability and quality, they require fewer input parameters than white models, with intermediate computation times, and in most cases, have proven to be the most effective models for managing the energy consumption of buildings [6]. This hybrid category includes simplified RC models that offer much more simple building descriptions by performing an electrical analogy, among them, Fraisse et al. [7] and its second-order version [8] international standards (EN) ISO 13790:2008 that was recently replaced by (EN) ISO 52016-1 [9], which empowered the hourly method of its predecessor to better handle dynamic interactions between building components and system elements, and VDI 6007-1 [10]. As more capacitance parameters are taken into consideration, accuracy increases at the cost of greater computational times, leading to a trade-off. However, hybrid models’ parameters detection relies on a wide range of methods, such as Genetic Algorithms [11], regression algorithms [12], ODE-based [13] and physics-guided neural networks [14], or even Unscented Kalman Filter that provides a different set of equations (i.e., a filter) depending on the building zone [15]. Black models are also greatly used in most of their variants, from linear regression, as well as nonlinear regression [16,17], to various types of artificial neural networks. The well-known study by Lu and Viljanen [18] showed the suitability of NNARX models in the predicting indoor temperature task and their quickness and handiness in comparison to physical models, achieving a coefficient of determination of 0.996. Overall, in the literature, ANN was employed in a plethora of climate zones, including extreme humid regions as Mba et al. [19] did by using ANN to forecast indoor temperature 24 h up to one month ahead. More recently, also Shi et al. [20] proposed a BP neural network to forecast indoor temperature 6 h, 24 h and 72 h in advance. Data were collected in a tobacco factory warehouse in a high humidity area in China and included outdoor and indoor temperature and relative humidity. Black models are also massively exploited in non-industrial contexts, such as offices and commercial buildings, where the indoor temperature is a significant comfort indicator. Soleimani-Mohseni [17] developed a simple feed-forward neural network with one hidden layer based on the Levenberg–Marquardts training algorithm and selected as input features just easily measured parameters such as wall temperatures, indoor and outdoor temperatures, electrical power, ventilation flow rate and time of the day to forecast a single office indoor temperature. The results showed that even without past data, a non-linear artificial neural network gave a better estimation of the operative indoor temperature than linear ARX models. Attoue et al. [21] as well proposed Buildings 2022, 12, 933 3 of 26 a three-layer ANN to forecast indoor temperature, considering a prediction horizon from 0.5 h to 4 h. This work has some points of similarity with the present study, for example, there is a dataset consisting of several offices in the same building and a comparable outdoor temperature range. Specifically, LSTM was used by Xu et al. [22] to forecast very-short term (i.e., 5 min and 30 min-ahead) indoor temperature in a public building with measured data collected for nearly 2 months. In these circumstances, an LSTM model modified by an error correction model was compared with other machine learning models (i.e., DT, SVM and BPNN) and showed evident advantages in directional prediction accuracy. ANN potentialities were further explored in modelling multi-zone buildings by Huang et al. [23] whose final purpose was to establish an effective driver for a predictive control system in a commercial building located in Australia. The study illustrates that RMSE was reduced by about 0.1 C by choosing a multi-zone model instead of a single-zone model. Therefore, the proposed model was able to take into consideration the thermal interaction between the adjacent zones. The training was led by Bayesian regularisation exactly to improve generalisation. Recently, Fang et al. [24] proposed also a multi-zone model that adopts a cross-series learning strategy, providing predictions up to 2–3 days ahead. Among the tested seq2seq models, the LSTM-dense model turned out to be the most useful for short- term forecasting, while LSTM-dense-LSTM or LSTM-LSTM performed better for longer prediction horizons. This study underlined the potentialities of LSTM models when a large dataset of training data is available (i.e., three years). The training consisted not only of historical variables but also of future variables, including forecasted outdoor temperatures. Depending on the specific seq2seq architecture, variables were concatenated to form a total input matrix to be passed directly or separately to encoder and decoder components. Other machine learning techniques such as SVM [25] and ARMA [26] were also employed in this scope. The autoregressive approach turns out to be effective, particularly if applied to neural networks (e.g., NARX) rather than ARX, as illustrated in several studies [27–29]. On the other hand, Gustin et al. [30] developed an AutoRegressive time series model using eXogenous input using data collected during the 2015 heatwave and claimed that ARX, whose predictor variables were selected by minimising the Akaike Information Criterion, was suitable for temperature prediction from 1 up to 72 h in advance and even simpler to derive than ARMAX. Alawadi et al. [31] carried out a test of several machine learning models under the same conditions and regressors with good performances turned out to be extraTrees, less sensitive to noise and outliers and to wider time frames than ANN, along with random forests, various ANN declination, cubist, ELM [32] and gradient boosting of regression trees. In this work, ANN is used for a short and long-term prediction of the internal temperature in fifteen offices distributed on three floors of the Energy Center in Turin. The prediction horizon varies from 2 h to one entire day. The performance of these algorithms has been evaluated using: Root Mean Squared Error and Mean Absolute error. Moreover, the proposed work explains how parameters affect performances, aiming to justify the identification of the optimal model structure. In addition, this study illustrates the flexibility of ANN techniques, which can predict both short- and long-term target variables and can identify robust patterns between input and target characteristics, to the extent that neural networks trained on single-plane data that do not cover the whole year are also employable on other plans and at different times of the year without deteriorating their performance. 2. Materials and Methods 2.1. The Target Building The dataset is composed of surveys taken from a three-storey building located in Turin, Northern Italy. The target building, called Energy Center, is a research centre of the Politecnico di Torino, in particular in the field of renewable and green energies (Figure 1). The building comprises several areas that can be classified according to their air-conditioning system: areas supplied by radiant floor panels and primary air (e.g., basement), areas supplied by radiant ceiling panels and primary air (e.g., offices), areas Buildings 2022, 12, x FOR PEER REVIEW 4 of 27 conditioning system: areas supplied by radiant floor panels and primary air (e.g., base- ment), areas supplied by radiant ceiling panels and primary air (e.g., offices), areas sup- plied by aerothermal heating (e.g., laboratory), areas supplied by an ‘all-air’ system, with- out recirculation of the internal air (e.g., auditorium). The study is focused on the north- east side of the building that includes five separated offices for each floor, whose layout is shown in Figure 2. Each office, coded accordingly to its relative position as reported in Figure 2, is climate-controlled by ceiling radiant panels, supplied by the same circuit, and air-conditioned, through the same air system. Sensible heat is therefore managed by radi- Buildings 2022, 12, 933 4 of 26 ant panels, while the air handling unit controls relative humidity and air supply, the latter in proportion to current occupancy. A technological control unit is in charge of maintain- ing the thermal conditions and includes: connection to groundwater, connection to district supplied by aerothermal heating (e.g., laboratory), areas supplied by an ‘all-air ’ system, without recirculation of the internal air (e.g., auditorium). The study is focused on the heating, a multi-purpose geothermal heat pump, an absorption unit for the production of northeast side of the building that includes five separated offices for each floor, whose layout thermal energy for air conditioning fed by district heating and cooling from groundwater, is shown in Figure 2. Each office, coded accordingly to its relative position as reported in st Figur orag e e ta 2, is climate-contr nks, a seri olled es of e by ceiling lectriradiant c pumps and panels, supplied circu by lat the orsame s, dicir ver cuit, ter and mixing valves, tem- and air-conditioned, through the same air system. Sensible heat is therefore managed perature and pressure probes, flow and thermal energy meters, and a regulation system by radiant panels, while the air handling unit controls relative humidity and air supply, controlled by the supervisory system. The building is also equipped with a solar system the latter in proportion to current occupancy. A technological control unit is in charge of maintaining the thermal conditions and includes: connection to groundwater, connection used for domestic hot water production, but it does not actually play any role in the air to district heating, a multi-purpose geothermal heat pump, an absorption unit for the conditioning system. The acceptable indoor temperature range is approximately +20 °C in production of thermal energy for air conditioning fed by district heating and cooling from groundwater, storage tanks, a series of electric pumps and circulators, diverter and mixing winter and +26 °C in summer, with a tolerance of ±2 °C. These comfort conditions were valves, temperature and pressure probes, flow and thermal energy meters, and a regulation not met for a couple of offices (those highlighted in red in Figure 2). The measurements of system controlled by the supervisory system. The building is also equipped with a solar system used for domestic hot water production, but it does not actually play any role in the the sensors located in all fifteen offices were carried out four times per hour for a period air conditioning system. The acceptable indoor temperature range is approximately +20 C of one and a half years, from May 2019 to October 2020. The mentioned sensors are inte- in winter and +26 C in summer, with a tolerance of 2 C. These comfort conditions were grated into Siemens system operator units for KNX S-Mode and KNX LTE-Mode. The not met for a couple of offices (those highlighted in red in Figure 2). The measurements of the sensors located in all fifteen offices were carried out four times per hour for a period of sensors mounted inside the Siemens panel are a thermistor NTC and they are wall- one and a half years, from May 2019 to October 2020. The mentioned sensors are integrated mounted close to the door entrance. The recorded data refer not only to the indoor and into Siemens system operator units for KNX S-Mode and KNX LTE-Mode. The sensors mounted inside the Siemens panel are a thermistor NTC and they are wall-mounted close to outdoor temperatures but also to various system-related variables. Each survey refers to the door entrance. The recorded data refer not only to the indoor and outdoor temperatures a specific office, making it possible to consider each room as a separate area. Some values, but also to various system-related variables. Each survey refers to a specific office, making itfor possible example, the flow to consider each room and as r a e separate turn temper area. Some ature values, s ofor f the example, floor AHU the flow, are common to the whole and return temperatures of the floor AHU, are common to the whole floor, while others, for floor, while others, for example, the flow temperature of the AHU for all building areas example, the flow temperature of the AHU for all building areas considered, are common considered, are common to the whole building. to the whole building. Figure 1. Energy Center, the target building. Photo source: https://mattioda.it/en/cantieri/energy- Figure 1. Energy Center, the target building. Photo source: https://mattioda.it/en/cantieri/energy- center-torino-to/ (accessed on 1 June 2022). center-torino-to/ (accessed on 1 June 2022). Buildings 2022, 12, x FOR PEER REVIEW 5 of 27 Buildings 2022, 12, 933 5 of 26 Figure 2. Figure E 2. nergy Center layout. Energy Center layout. The layout is The layout shared is shar byed all t by he consi all thedconsider ered floors. Green ed floors. bo Gr xes ind een boxes i- cate that the room set-point has been reached, red indicates a thermal discomfort situation with indicate that the room set-point has been reached, red indicates a thermal discomfort situation with respect to the room set-point. respect to the room set-point. 2.2. The Dataset 2.2. The Dataset As stated above, the dataset covers a period longer than a year, but, since an operation As stated above, the dataset covers a period longer than a year, but, since an opera- of data integration was necessary, the final dataset made by joining the various data sources tion of data integration was necessary, the final dataset made by joining the various data turns out to be around 31,000 records long, including around 11 months of measurements. sources turns out to be around 31,000 records long, including around 11 months of meas- Following other data cleaning steps, like removal of the unnecessary duplicates (a negligible urements. Following other data cleaning steps, like removal of the unnecessary duplicates percentage of total) and missing values (2.7% of total), which originated from anomalies (a negligible percentage of total) and missing values (2.7% of total), which originated from attributable to sensor malfunctions, the number of records slightly decreases. anomalies attributable to sensor malfunctions, the number of records slightly decreases. Outlier detection was achieved by setting ranges of validity for some features. For Outlier detection was achieved by setting ranges of validity for some features. For example, records associated with an external temperature much below 0 C or much above example, records associated with an external temperature much below 0 °C or much 30 C were considered noisy and then excluded because those values are not consistent above 30 °C were considered noisy and then excluded because those values are not con- with the climatic zone trends. A similar process was applied taking into consideration sistent with the climatic zone trends. A similar process was applied taking into consider- other features (i.e., temperatures and humidity recorded inside the heating system) and ation other features (i.e., temperatures and humidity recorded inside the heating system) unrealistic records have been deleted from the dataset. The filtering operation was not and unrealistic records have been deleted from the dataset. The filtering operation was intended to be restrictive, to not lose information from data. not intended to be restrictive, to not lose information from data. The dataset was also reduced in the number of its features, trying to keep only the The dataset was also reduced in the number of its features, trying to keep only the variables that impact the target variable (i.e., indoor temperature). Even if a lot of fea- variables that impact the target variable (i.e., indoor temperature). Even if a lot of features tures resulted to be linked to each other by a strong correlation, as shown in Figure 3, the resulted to be linked to each other by a strong correlation, as shown in Figure 3, the cor- correlation was not used as a driver in the choice of relevant features. The features were relation was not used as a driver in the choice of relevant features. The features were orig- originally 63 and were selected through the expert judgement method. With the exception inally 63 and were selected through the expert judgement method. With the exception of of the outside temperature, the selected characteristics concern the air-conditioning sys- the outside temperature, the selected characteristics concern the air-conditioning system tem related to the radiant ceiling panels located in the offices and the air-handling units related to the radiant ceiling panels located in the offices and the air-handling units con- connected to them; therefore, many of the original characteristics concerning the solar nected to them; therefore, many of the original characteristics concerning the solar system system or other parts of the air-conditioning system were discarded. Even if other variables or other parts of the air-conditioning system were discarded. Even if other variables (i.e., (i.e., solar radiation) may have an impact on predicted variables, we chose not to further solar radiation) may have an impact on predicted variables, we chose not to further collect collect them, to enhance the model capability to provide accurate predictions using as them, to enhance the model capability to provide accurate predictions using as less infor- less information as possible. Moreover, Attoue et al. [21] illustrated that the neglect of mation as possible. Moreover, Attoue et al. [21] illustrated that the neglect of some exter- some external variables (i.e., solar radiation, humidity and even the historical outdoor nal variables (i.e., solar radiation, humidity and even the historical outdoor temperature) temperature) did not significantly deteriorate the performance of their ANN model, as the did not significantly deteriorate the performance of their ANN model, as the MSE in- MSE increased from 0.0277 to 0.0365 while R decreased from 0.9967 to 0.9959. However, creased from 0.0277 to 0.0365 while R decreased from 0.9967 to 0.9959. However, they Buildings 2022, 12, 933 6 of 26 they reported that among cited external features, the outdoor temperature had the highest importance (i.e., importance factor of 42%). A similar finding was confirmed by Fang et al. [24] whose correlation analysis outlined the future outdoor temperature as the most important exogenous variable, so we decided to keep it as an input. The main criterion adopted was selecting among available features only the ones that were related to the heating system which involved the target offices. Hence, these were considered valuable as input features variables associated with air-handling units and cold and hot collectors belonging to ceiling conditioning panels. In the end, it results in 49 features, which include outdoor temperature, indoor temperature for each office, set-point temperature for each office, ceiling panel supply temperature, supply and return temperatures of cold and warm Buildings 2022, 12, x FOR PEER REVIEW 7 of 27 collectors, supply and return air temperature for each floor, overall supply air temperature for the whole building area, supply and return a degree of humidity for each floor. Figure 3. Correlation matrix between available features. Figure 3. Correlation matrix between available features. In addition, another feature was created (i.e., the hour of the day), resulting in 50 final The data pre-processing steps are summarised in Figure 4. features listed in Table 1. In fact, in several studies, such as that by Soleimani-Mohseni et al. [17], it is shown that the hour of the day affects the air ’s indoor and operative temperature in a non-linear way and its use as an input feature improves significantly the estimations. Figure 4. Adopted data pre-processing scheme. 2.3. Possible Approaches Broadly speaking, MISO and MISO terms refer to systems provided with multiple outputs and inputs. Similarly, a model can be provided with multiple variables as inputs, while resulting in only an output, otherwise in multiple ones. If the MISO approach is applied to the case study under consideration, the model will process all the available input variables and will provide a single output, which can be identified as the internal temperature of a single zone (i.e., a single room). Otherwise, a MIMO model can provide Buildings 2022, 12, x FOR PEER REVIEW 7 of 27 Buildings 2022, 12, 933 7 of 26 Table 1. Recap of the selected feature. Note that setpoint temperatures and indoor temperatures can be found five times per floor because they are repeated for each office on each floor. Note also that AHU temperatures and humidity degrees are repeated for each floor. Description Unit of Measurement Ceiling conditioning panel supply temperature C Return temperature of cold collector supplying ceiling conditioning panels C Supply temperature of cold collector supplying ceiling conditioning panels C AHU supply temperature for the whole considered building area C Return temperature of hot collector supplying ceiling conditioning panels C Supply temperature of hot collector supplying ceiling conditioning panels C Target floor AHU supply humidity degree Int Target floor AHU return humidity degree Int Target floor AHU supply temperature C Target floor AHU return temperature C Outdoor temperature C Target office setpoint temperature C Target office indoor temperature C Hour Figure 3. of the Correlation matrix b day etween available features. Int The data pre-processing steps are summarised in Figure 4. The data pre-processing steps are summarised in Figure 4. Figure 4. Adopted data pre-processing scheme. Figure 4. Adopted data pre-processing scheme. 2.3. Possible Approaches 2.3. Possible Approaches Broadly speaking, MISO and MISO terms refer to systems provided with multiple outputs Broad and lyinputs. speaking, MI Similarly SO , a and MISO model can ter bem pr s re ovided fer towith system multiple s provvariables ided withas multipl inputs, e while outpur ts esul and ting inputs in only . Simil an arly, output, a model c otherwise an be provide in multiple d with mu ones. If ltip the le var MISO iables appr as inpu oach ts, is applied to the case study under consideration, the model will process all the available while resulting in only an output, otherwise in multiple ones. If the MISO approach is input variables and will provide a single output, which can be identified as the internal applied to the case study under consideration, the model will process all the available temperature of a single zone (i.e., a single room). Otherwise, a MIMO model can provide input variables and will provide a single output, which can be identified as the internal predictions even the indoor temperatures related to each room on each building floor, but temperature of a single zone (i.e., a single room). Otherwise, a MIMO model can provide it will have to deal with major complexity. In this case study, the building was broken down into three zones, each one represented by a single floor, to handle the complexity due to the need to predict separately the internal temperature of each office. As a result, the maximum number of outputs provided by Buildings 2022, 12, x FOR PEER REVIEW 8 of 27 predictions even the indoor temperatures related to each room on each building floor, but it will have to deal with major complexity. In this case study, the building was broken down into three zones, each one repre- Buildings 2022, 12, 933 8 of 26 sented by a single floor, to handle the complexity due to the need to predict separately the internal temperature of each office. As a result, the maximum number of outputs provided by MIMO models developed in this case study will be five (i.e., the number of offices for MIMO models developed in this case study will be five (i.e., the number of offices for each floor). each floor). 2.4. The Model 2.4. The Model The indoor temperature prediction was achieved through a black-box model, more The indoor temperature prediction was achieved through a black-box model, more specifically, an LSTM neural network. According to several studies, such as by Huang et specifically, an LSTM neural network. According to several studies, such as by Huang al. [23], LSTM is likely to outperform other machine learning methods in terms of predict- et al. [23], LSTM is likely to outperform other machine learning methods in terms of ing a variable variation trend. They proved to be particularly suitable for time series pre- predicting a variable variation trend. They proved to be particularly suitable for time diction thanks to their ability to process the entire data sequences and not only single data series prediction thanks to their ability to process the entire data sequences and not only points. The network is made of three separate layers; the activation function chosen for single data points. The network is made of three separate layers; the activation function the input layer and the hidden layer is ReLU, thanks to its versatility, while the output chosen for the input layer and the hidden layer is ReLU, thanks to its versatility, while the layer is associated with a linear activation function. Moreover, the output layer contains output layer is associated with a linear activation function. Moreover, the output layer several neurons equal to the number of the features that have to be predicted (i.e., one contains several neurons equal to the number of the features that have to be predicted (i.e., temperature for one office in the MISO approach and five temperatures, associated with one temperature for one office in the MISO approach and five temperatures, associated each office on the whole floor in the MIMO approach). The batch size is set to 64. A sim- with each office on the whole floor in the MIMO approach). The batch size is set to 64. plified representation of the network architecture is reported below in Figure 5. A simplified representation of the network architecture is reported below in Figure 5. Figure 5. Artificial Neural Network architecture simplified scheme. Figure 5. Artificial Neural Network architecture simplified scheme. Neural networks were chosen over linear models thanks to their capability to manage Neural networks were chosen over linear models thanks to their capability to manage heat transfer dynamics through buildings that are typically not linear phenomena. As heat transfer dynamics through buildings that are typically not linear phenomena. As shown in Figure 6, the error using a linear predictor is much higher, with the same training shown in Figure 6, the error using a linear predictor is much higher, with the same training dataset size and input features listed in Table 1. dataset size and input features listed in Table 1. The linear regression was further studied in terms of time-lagging the external tem- perature against the internal temperature. Due to the thermal inertia of building materials, some input variables (e.g., outdoor temperature) may not have an immediate effect on in- door temperature; otherwise, their impact may last and involve subsequent measurements. Consequently, the correlation may be more pronounced between the previously measured outdoor temperature rather than the simultaneous correlation with the indoor temperature. This lag effect has previously been defined as a non-linear phenomenon that may not be captured by traditional linear regression. The lag due to thermal inertia was roughly estimated according to ENI ISO 13786, depending on the main component of the wall (e.g., concrete), in a range between 0.5 and several hours, also depending on the insulation, plaster and wall thickness; this means that, as each measurement is approximately 15 min away from the previous one, the external temperatures must be shifted relative to the other input characteristics by several times between 3 and 10 or more. The area of the dataset that includes the outdoor temperature was shifted forward 3, 10, 20, and 30 times to assess Buildings 2022, 12, x FOR PEER REVIEW 9 of 27 Buildings 2022, 12, 933 9 of 26 Figure 6. Comparison or RMSE achieved using linear regressor or LSTM neural networks by the office. The error is computed on the validation set only, for a 2 h time horizon. whether a delayed impact on indoor temperature occurs and when it is most likely to occur. As illustrated in the figure below (Figure 7), a local minimum is reached by the Buildings 2022, 12, x FOR PEER REVIEW The linear regression was further studied in terms of time-lagging the external tem- 9 of 27 RMSE between 3 and 10 shifts, but the results provided, although slightly better than with perature against the internal temperature. Due to the thermal inertia of building materials, traditional linear regression, are still not comparable to those obtained with the LSTM. some input variables (e.g., outdoor temperature) may not have an immediate effect on indoor temperature; otherwise, their impact may last and involve subsequent measure- ments. Consequently, the correlation may be more pronounced between the previously measured outdoor temperature rather than the simultaneous correlation with the indoor temperature. This lag effect has previously been defined as a non-linear phenomenon that may not be captured by traditional linear regression. The lag due to thermal inertia was roughly estimated according to ENI ISO 13786, depending on the main component of the wall (e.g., concrete), in a range between 0.5 and several hours, also depending on the in- sulation, plaster and wall thickness; this means that, as each measurement is approxi- mately 15 min away from the previous one, the external temperatures must be shifted relative to the other input characteristics by several times between 3 and 10 or more. The area of the dataset that includes the outdoor temperature was shifted forward 3, 10, 20, and 30 times to assess whether a delayed impact on indoor temperature occurs and when it is most likely to occur. As illustrated in the figure below (Figure 7), a local minimum is reached by the RMSE between 3 and 10 shifts, but the results provided, although slightly better than with traditional linear regression, are still not comparable to those obtained Figure 6. Comparison or RMSE achieved using linear regressor or LSTM neural networks by the Figure 6. Comparison or RMSE achieved using linear regressor or LSTM neural networks by the with the LSTM. office. The error is computed on the validation set only, for a 2 h time horizon. office. The error is computed on the validation set only, for a 2 h time horizon. The linear regression was further studied in terms of time-lagging the external tem- perature against the internal temperature. Due to the thermal inertia of building materials, some input variables (e.g., outdoor temperature) may not have an immediate effect on indoor temperature; otherwise, their impact may last and involve subsequent measure- ments. Consequently, the correlation may be more pronounced between the previously measured outdoor temperature rather than the simultaneous correlation with the indoor temperature. This lag effect has previously been defined as a non-linear phenomenon that may not be captured by traditional linear regression. The lag due to thermal inertia was roughly estimated according to ENI ISO 13786, depending on the main component of the wall (e.g., concrete), in a range between 0.5 and several hours, also depending on the in- sulation, plaster and wall thickness; this means that, as each measurement is approxi- mately 15 min away from the previous one, the external temperatures must be shifted relative to the other input characteristics by several times between 3 and 10 or more. The area of the dataset that includes the outdoor temperature was shifted forward 3, 10, 20, Figure 7. Average and maximum RMSE trend concerning the number of neurons in each layer–1 Figure 7. Average and maximum RMSE trend concerning the number of neurons in each layer–1 layer. and 30 times to assess whether a delayed impact on indoor temperature occurs and when layer. it is most likely to occur. As illustrated in the figure below (Figure 7), a local minimum is The models were developed using the Keras library (https://keras.io (accessed on reached by the RMSE between 3 and 10 shifts, but the results provided, although slightly 1 June 2022)). Instead, the linear prediction was implemented thanks to scikit-learn library better than with traditional linear regression, are still not comparable to those obtained and statsmodels library, whose documentation is also reported (https://www.statsmodels. with the LSTM. org/dev/generated/statsmodels.regression.linear_model.OLS.html (accessed on 1 June 2022), https://scikit-learn.org/stable/index.html (accessed on 6 June 2022)). The models were tuned in terms of several performance-affecting parameters: number of neurons for input and hidden layers, number of layers, learning rate, loss functions, regularisation techniques (i.e., dropout probability), chosen optimiser, model structure (i.e., bidirectional or traditional). Performance is evaluated concerning the selected floor, time horizon length, and adopted approach (i.e., MISO or MIMO). Since every floor can be considered an independent zone, the peculiarity of this circum- stance raises an interesting question. The problem may be broken into more manageable sub-problems; hence every floor may be paired with three models, one for each proposed prediction time step (i.e., 2 h, 5 h, 24 h). Otherwise, the building may be treated as a whole and only three models, one for each proposed prediction time step (i.e., 2 h, 5 h, 24 h), trained on aggregated data. In the latter case, accuracy may take a backseat, while the Figure 7. Average and maximum RMSE trend concerning the number of neurons in each layer–1 layer. Buildings 2022, 12, 933 10 of 26 capability to predict as uniformly as possible future indoor temperatures across the whole building may hold more importance. Since exploiting the generalisation capability of neural networks is one of their most interesting features, in this case, the developed models trained on the data of the whole building as well as the models trained on the data of individual floors, assuming that the generalised model should only be considered if it manages the well-known trade-off between accuracy and versatility, showing acceptable results in terms of human perception of temperature. Models trained on single plane data were kept as benchmarks to evaluate the performance of other models. For these models, many tests were performed to find the best match for each plane, resulting in three slightly different model variants for each approach adopted (i.e., MISO and MIMO). This methodology allowed us to achieve better performance. During each test, the training phase lasts 100 epochs. 2.5. The Dataset Split Performances were evaluated with the RMSE and MAE metrics. They are two of the most commonly used metrics used to measure accuracy for continuous variables. MAE is the average over the test sample of the absolute differences between prediction and actual observation. Since the average is purely arithmetic, all individual differences have equal weight. RMSE rule also measures the average magnitude of the error and, just like MAE, expresses it in units of the variable of interest, is insensitive to errors direction and has to be minimised to achieve a good model performance. The main difference between the two performance metrics is that, since RMSE squares errors before they are averaged, it gives a high weight to large errors and it is a better indicator of undesirable large errors. RMSE would significantly increase in the case with the variance of the frequency distribution of error magnitudes. Since in this application field error peaks are better to be detected and penalised, RMSE was used to tune models and to identify the most suitable ones. The metrics definitions are described by the following equations. RMSE = (y y ) (1) å j j j=1 MAE = jy y ˆ j (2) å j j j=1 Performance metrics are calculated on both the validation set and the test set to provide an unbiased evaluation of the fitted model, previously trained on another part of the dataset. The high complexity of the building requires as much training data as possible, so the training set consists of the first 9 months’ forecasts from the first floor. The remaining data from the first floor are used to validate the model, tune, and set parameters. Importantly, the original sequence of measurements over time is maintained to test the ability of the models to handle forecasts for different periods of years. The models are therefore tested on data recorded on the second and third floors throughout the year. Splitting the chosen dataset allows us to test whether the model can identify sufficient patterns in the training data to handle each floor heat transfer dynamic and whether it can predict indoor temperatures at different times of the year for each of them. The adopted split rule is summarised in the table below Table 2. Buildings 2022, 12, 933 11 of 26 Table 2. Database split recap for generalised model. Dataset Percentage Records Training set Around 70% Around 23,000 (i.e., 9 months of observations from first floor) Validation set Around 30% Around 4000 (i.e., 2 months of observations from first floor) First Test Set 100% Around 23,000 (i.e., 11 months of observations from second floor) Second Test Set 100% Around 23,000 (i.e., 11 months of observations from third floor) Each plan dataset is divided into a training set, a validation set and a test set using the following rule of thumb Table 3. In this case, tuning will be aimed at increasing accuracy and at the same time avoiding the risk of overfitting, which is considerably high when developing a model only on single plan data. In this case, the tuning will be aimed to increase accuracy while at the same time avoiding the risk of overfitting, which is considerably high when developing a model on single floor data only. Table 3. Database split recap (one floor only) for models tailored on one floor. Dataset Percentage Records Training set Around 70% Around 23,000 (i.e., 8 months of observations) Validation set Around 15% Around 4000 (i.e., 1–5 months of observations) Test set Around 15% Around 4000 (i.e., 1–5 months of observations) 3. Results 3.1. Model Tuning The tuning of the models trained on data from all three floors of the building is detailed. The parameter space chosen for the grid search ranges from 32 up to 256 neurons for the first layer and the hidden layer, including some arbitrarily chosen intermediate values. Tuning was performed using a model that includes a single hidden layer, together with the input and output layers. In fact, as Huang et al. [23] also stated, an accurate ANN model does not necessarily have to be large, to the extent that oversized networks can lead to large prediction errors with high-frequency noise. Looking at the figures below (Figure 8), it becomes clear that the more complex is the model, the more it is likely to overfit instead of staying adaptable to differing datasets. The increase in the number of neurons in model layers worsens performances on unknown datasets, to the point that the 256 neurons model completely fails with the validation set. It follows that it is convenient to choose 128 as the best suitable number of neurons, as the error hits a local minimum in that area. The average RMSE in this instance results to be around 0.1, which was considered acceptable for two reasons: it is similar to several results achieved in literature studies that leverage comparable approaches or models. Moreover, this misprediction would go unnoticed by building occupants since the human body is not sensitive to change in terms of C decimal. The learning rate, a very significant parameter, is set to 0.00001. The parameter was decreased until the training loss and validation loss on the training epochs became stable, as shown in Figure 9. It is only below this threshold that the learning curves stop fluctuating and the detection of the minimum loss function is successful. Two kinds of loss functions were taken into consideration: MAE and MSE. As shown in Figure 10, the second one manages to reduce the average RMSE for the validation set. Among the optimisers tested, Adam systematically provides the best performance for shorter forecast horizons. However, this may no longer be true when it comes to longer time horizons because, unlike Adagrad and SGD, Adam’s performance deteriorates with longer periods, as shown in Figure 11. When it comes to the time parameter, it becomes immediately clear that it is one of the most performance-impacting variables. This is confirmed also by Attoue et al. [21] that reported the same pattern, obtaining for the prediction horizon of 4 h an R = 0.8370 and MSE = 1.23783 versus an R = 0.9109 and MSE = 0.89078 for the 2 h forecasting. Fang et al. [24], chose the Adam optimiser for Buildings 2022, 12, x FOR PEER REVIEW 12 of 27 Buildings 2022, 12, 933 12 of 26 their model because of its excellent performance in handling LSTM training dynamics and its rapid convergence speed, and tried to predict internal temperatures up to 7 days in advance, they observed a similar deterioration in prediction quality as time passed, especially after the first 48 h. Figure 11 shows that the Adam average RMSE continues to grow while enlarging the prediction time step so that a sort of turning point is reached and a change of optimiser is required to keep the average error around the reference value of 0.1 Celsius degrees. As mentioned before, in fact, Adagrad and especially SGD prove Buildings 2022, 12, x FOR PEER REVIEW 12 of 27 to better handle wider prediction time ranges. Therefore, for the longer forecast horizon, Adagrad is preferable. Figure 8. Average RMSE concerning shifts applied to outdoor temperature in predicting indoor temperature for validation set and 2 h prediction horizon. The learning rate, a very significant parameter, is set to 0.00001. The parameter was decreased until the training loss and validation loss on the training epochs became stable, as shown in Figure 9. It is only below this threshold that the learning curves stop fluctu- Figure 8. Average RMSE concerning shifts applied to outdoor temperature in predicting indoor ating and the Figure detec 8. tion Average of th RMSE e minim concerning um shifts loss f applied unctito on outdoor is succe temperatur ssful.e in predicting indoor temperature for validation set and 2 h prediction horizon. temperature for validation set and 2 h prediction horizon. The learning rate, a very significant parameter, is set to 0.00001. The parameter was decreased until the training loss and validation loss on the training epochs became stable, as shown in Figure 9. It is only below this threshold that the learning curves stop fluctu- ating and the detection of the minimum loss function is successful. Figure 9. Loss function over training epochs. Figure 9. Loss function over training epochs. Figure 9. Loss function over training epochs. Two kinds of loss functions were taken into consideration: MAE and MSE. As shown Two kinds of loss functions were taken into consideration: MAE and MSE. As shown in Figure 10, the second one manages to reduce the average RMSE for the validation set. in Figure 10, the second one manages to reduce the average RMSE for the validation set. Buildings 2022, 12, x FOR PEER REVIEW 13 of 27 Buildings 2022, 12, x FOR PEER REVIEW 13 of 27 Figure 10. Average RMSE concerning loss function for the validation set on 2 h prediction horizon Buildings 2022, 12, 933 13 of 26 and 128 neurons per layer. Among the optimisers tested, Adam systematically provides the best performance for shorter forecast horizons. However, this may no longer be true when it comes to longer time horizons because, unlike Adagrad and SGD, Adam’s performance deteriorates with longer periods, as shown in Figure 11. When it comes to the time parameter, it becomes immediately clear that it is one of the most performance-impacting variables. This is con- firmed also by Attoue et al. [21] that reported the same pattern, obtaining for the predic- tion horizon of 4 h an R = 0.8370 and MSE = 1.23783 versus an R = 0.9109 and MSE = 0.89078 for the 2 h forecasting. Fang et al. [24], chose the Adam optimiser for their model because of its excellent performance in handling LSTM training dynamics and its rapid conver- gence speed, and tried to predict internal temperatures up to 7 days in advance, they ob- served a similar deterioration in prediction quality as time passed, especially after the first 48 h. Figure 11 shows that the Adam average RMSE continues to grow while enlarging the prediction time step so that a sort of turning point is reached and a change of optimiser is required to keep the average error around the reference value of 0.1 Celsius degrees. As mentioned before, in fact, Adagrad and especially SGD prove to better handle wider pre- Figure 10. Average RMSE concerning loss function for the validation set on 2 h prediction horizon Figure 10. Average RMSE concerning loss function for the validation set on 2 h prediction horizon diction time ranges. Therefore, for the longer forecast horizon, Adagrad is preferable. and 128 neurons per layer. and 128 neurons per layer. Among the optimisers tested, Adam systematically provides the best performance for shorter forecast horizons. However, this may no longer be true when it comes to longer time horizons because, unlike Adagrad and SGD, Adam’s performance deteriorates with longer periods, as shown in Figure 11. When it comes to the time parameter, it becomes immediately clear that it is one of the most performance-impacting variables. This is con- firmed also by Attoue et al. [21] that reported the same pattern, obtaining for the predic- tion horizon of 4 h an R = 0.8370 and MSE = 1.23783 versus an R = 0.9109 and MSE = 0.89078 for the 2 h forecasting. Fang et al. [24], chose the Adam optimiser for their model because of its excellent performance in handling LSTM training dynamics and its rapid conver- gence speed, and tried to predict internal temperatures up to 7 days in advance, they ob- served a similar deterioration in prediction quality as time passed, especially after the first 48 h. Figure 11 shows that the Adam average RMSE continues to grow while enlarging the prediction time step so that a sort of turning point is reached and a change of optimiser is required to keep the average error around the reference value of 0.1 Celsius degrees. As Figure 11. Average RMSE trend for bidirectional structure horizon prediction by the optimiser for Figure 11. Average RMSE trend for bidirectional structure horizon prediction by the optimiser for mentioned before, in fact, Adagrad and especially SGD prove to better handle wider pre- the validation set. the validation set. diction time ranges. Therefore, for the longer forecast horizon, Adagrad is preferable. Buildings 2022, 12, x FOR PEER REVIEW 14 of 27 The bidirectional model structure was tested along with the traditional one, both The bidirectional model structure was tested along with the traditional one, both paired with MSE function loss that resulted in the best one in the tuning so far. As paired with MSE function loss that resulted in the best one in the tuning so far. As shown shown in Figure 12, bidirectional structure performance is comparable with traditional in Figure 12, bidirectional structure performance is comparable with traditional structure structure ones, but it seems to be less affected by prediction horizon length. On the other ones, but it seems to be less affected by prediction horizon length. On the other hand, the hand, the bidirectional structure turns out to be less effective for the shortest prediction bidirectional structure turns out to be less effective for the shortest prediction horizon horizon consider consider ed. ed. Figure 11. Average RMSE trend for bidirectional structure horizon prediction by the optimiser for the validation set. The bidirectional model structure was tested along with the traditional one, both paired with MSE function loss that resulted in the best one in the tuning so far. As shown Figure 12. Average RMSE trend concerning prediction horizon by model structure for the validation set. Figure 12. Average RMSE trend concerning prediction horizon by model structure for the validation set. As mentioned in Section Materials and Methods, many input features are correlated with the predicted variable. The temperature of the return air from inside the building is the most correlated variable. An additional test was carried out on the model to explore if it can predict the return air temperature as input. Figure 13 confirms that the considered feature plays a significant role in the prediction since while it is missing the model perfor- mance slightly worsens, but that it is not essential, as errors are still under the acceptability threshold –0.15 °C. Figure 13. Average RMSE concerning the presence of the most correlated feature with the predicted variable calculated on 2 h prediction horizon for the validation set. 3.2. Test The models defined for each time horizon were tested on second- and third-floor data over all the available periods. The outcomes are reported in Figure 14. Buildings 2022, 12, x FOR PEER REVIEW 14 of 27 in Figure 12, bidirectional structure performance is comparable with traditional structure ones, but it seems to be less affected by prediction horizon length. On the other hand, the bidirectional structure turns out to be less effective for the shortest prediction horizon considered. Figure 12. Average RMSE trend concerning prediction horizon by model structure for the validation Buildings 2022, 12, 933 14 of 26 set. As mentioned in Section Materials and Methods, many input features are correlated As mentioned in Section Materials and Methods, many input features are correlated with the predicted variable. The temperature of the return air from inside the building is with the predicted variable. The temperature of the return air from inside the building is the the most correlated variable. An additional test was carried out on the model to explore if most correlated variable. An additional test was carried out on the model to explore if it can it can predict the return air temperature as input. Figure 13 confirms that the considered predict the return air temperature as input. Figure 13 confirms that the considered feature feature plays a significant role in the prediction since while it is missing the model perfor- plays a significant role in the prediction since while it is missing the model performance mance slightly worsens, but that it is not essential, as errors are still under the acceptability slightly worsens, but that it is not essential, as errors are still under the acceptability threshold –0.15 °C. threshold –0.15 C. Figure 13. Average RMSE concerning the presence of the most correlated feature with the predicted Figure 13. Average RMSE concerning the presence of the most correlated feature with the predicted variable calculated on 2 h prediction horizon for the validation set. variable calculated on 2 h prediction horizon for the validation set. 3.2. Test 3.2. Test Buildings 2022, 12, x FOR PEER REVIEW 15 of 27 The models defined for each time horizon were tested on second- and third-floor data The models defined for each time horizon were tested on second- and third-floor data over all the available periods. The outcomes are reported in Figure 14. over all the available periods. The outcomes are reported in Figure 14. Figure 14. Average RMSE concerning time horizon by floor. Figure 14. Average RMSE concerning time horizon by floor. Although the temperatures of the third floor may be more unpredictable, probably due Although the temperatures of the third floor may be more unpredictable, probably to its peculiarities, for example, the roof being made of other materials than the remaining due to its peculiarities, for example, the roof being made of other materials than the re- parts of the building, the performance seems to be homogeneous between the floors. With maining parts of the building, the performance seems to be homogeneous between the the optimiser adjusted for a 24 h forecast horizon, homogeneous performance can be floors. With the optimiser adjusted for a 24 h forecast horizon, homogeneous performance achieved. This is verified by the average RMSE of each floor, which is around the target of can be achieved. This is verified by the average RMSE of each floor, which is around the 0.1 degrees Celsius. The tests were repeated by changing the type of approach. The MISO target of 0.1 degrees Celsius. The tests were repeated by changing the type of approach. approach makes it possible to predict the internal temperature of office R40 alone on all The MISO approach makes it possible to predict the internal temperature of office R40 three floors. Comparing the MISO result with the R40 office temperatures provided by the alone on all three floors. Comparing the MISO result with the R40 office temperatures MIMO model for the validation and test sets, as shown in Figure 15, it can be observed that provided by the MIMO model for the validation and test sets, as shown in Figure 15, it the MISO approach is not necessarily more accurate: actually, it provides less precise results can be observed that the MISO approach is not necessarily more accurate: actually, it pro- vides less precise results for two of the three available floors. Similar evidence was re- ported by Huang et al. [23] who concluded that the multi-zone approach was able to pro- vide predictions closer to the actual values. Figure 15. Average RMSE concerning approach calculated for the validation set on 2 h prediction horizon. The single-office predicted temperatures using chosen models for each time horizon are summarised in the table below (Table 4). Buildings 2022, 12, x FOR PEER REVIEW 15 of 27 Figure 14. Average RMSE concerning time horizon by floor. Although the temperatures of the third floor may be more unpredictable, probably due to its peculiarities, for example, the roof being made of other materials than the re- maining parts of the building, the performance seems to be homogeneous between the floors. With the optimiser adjusted for a 24 h forecast horizon, homogeneous performance can be achieved. This is verified by the average RMSE of each floor, which is around the target of 0.1 degrees Celsius. The tests were repeated by changing the type of approach. The MISO approach makes it possible to predict the internal temperature of office R40 Buildings 2022, 12, 933 15 of 26 alone on all three floors. Comparing the MISO result with the R40 office temperatures provided by the MIMO model for the validation and test sets, as shown in Figure 15, it can be observed that the MISO approach is not necessarily more accurate: actually, it pro- for vides two leof ss p the recise three res available ults for two floors. of th Similar e threevidence e available floor was reported s. Similar ev by Huang idence was r et al. [23e]- who ported b concluded y Huang e thatt a the l. [multi-zone 23] who conclud approach ed th was at the m ableu to ltipr -zone ovide ap pr pr edictions oach was ab closer le to p to the ro- actual vide pred values. ictions closer to the actual values. Figure 15. Average RMSE concerning approach calculated for the validation set on 2 h prediction horizon. Figure 15. Average RMSE concerning approach calculated for the validation set on 2 h prediction horizon. The single-office predicted temperatures using chosen models for each time horizon are summarised in the table below (Table 4). The single-office predicted temperatures using chosen models for each time horizon are summarised in the table below (Table 4). Table 4. RMSE for each office and time horizon using a generalised model. Office and Prediction Horizon 2 h 5 h 24 h P1-R40 0.0879 0.0878 0.0771 P1-R38 0.1070 0.0942 0.0945 P1-R39 0.1220 0.1086 0.1011 P1-R42 0.1182 0.1108 0.1120 P1-R45 0.1248 0.1071 0.1177 P2-R40 0.0926 0.0920 0.0900 P2-R38 0.0875 0.0801 0.0836 P2-R39 0.0902 0.0817 0.0914 P2-R42 0.0846 0.0717 0.0721 P2-R45 0.0945 0.0886 0.0807 P3-R40 0.1315 0.1291 0.1245 P3-R38 0.0768 0.0789 0.0806 P3-R39 0.1594 0.1571 0.1650 P3-R42 0.0785 0.0689 0.0726 P3-R45 0.0892 0.0836 0.0751 Predictions for office R-40 over the three storeys and the three prediction horizons are plotted in comparison with actual values in the figures below (Figures 16–23). Buildings 2022, 12, x FOR PEER REVIEW 16 of 27 Table 4. RMSE for each office and time horizon using a generalised model. Office and Prediction Horizon 2 h 5 h 24 h P1-R40 0.0879 0.0878 0.0771 P1-R38 0.1070 0.0942 0.0945 P1-R39 0.1220 0.1086 0.1011 P1-R42 0.1182 0.1108 0.1120 P1-R45 0.1248 0.1071 0.1177 P2-R40 0.0926 0.0920 0.0900 P2-R38 0.0875 0.0801 0.0836 P2-R39 0.0902 0.0817 0.0914 P2-R42 0.0846 0.0717 0.0721 P2-R45 0.0945 0.0886 0.0807 P3-R40 0.1315 0.1291 0.1245 P3-R38 0.0768 0.0789 0.0806 P3-R39 0.1594 0.1571 0.1650 P3-R42 0.0785 0.0689 0.0726 P3-R45 0.0892 0.0836 0.0751 Buildings 2022, 12, 933 16 of 26 Predictions for office R-40 over the three storeys and the three prediction horizons are plotted in comparison with actual values in the figures below (Figures 16–23). Buildings 2022, 12, x FOR PEER REVIEW 17 of 27 Figure 16. Plot of actual and predicted temperatures 2 h ahead for office 40 on the first floor. Figure 16. Plot of actual and predicted temperatures 2 h ahead for office 40 on the first floor. Figure 17. Plot of actual and predicted temperatures 2 h ahead for office 40 on the second floor. Figure 17. Plot of actual and predicted temperatures 2 h ahead for office 40 on the second floor. Figure 18. Plot of actual and predicted temperatures 2 h ahead for office 40 on the third floor. Buildings 2022, 12, x FOR PEER REVIEW 17 of 27 Buildings 2022, 12, 933 17 of 26 Figure 17. Plot of actual and predicted temperatures 2 h ahead for office 40 on the second floor. Buildings 2022, 12, x FOR PEER REVIEW 18 of 27 Figure 18. Plot of actual and predicted temperatures 2 h ahead for office 40 on the third floor. Figure 18. Plot of actual and predicted temperatures 2 h ahead for office 40 on the third floor. Figure 19. Plot of actual and predicted temperatures 5 h ahead for office 40 on the first floor. Figure 19. Plot of actual and predicted temperatures 5 h ahead for office 40 on the first floor. Figure 20. Plot of actual and predicted temperatures 5 h ahead for office 40 on the third floor. Buildings 2022, 12, x FOR PEER REVIEW 18 of 27 Buildings 2022, 12, 933 18 of 26 Figure 19. Plot of actual and predicted temperatures 5 h ahead for office 40 on the first floor. Buildings 2022, 12, x FOR PEER REVIEW 19 of 27 Figure 20. Plot of actual and predicted temperatures 5 h ahead for office 40 on the third floor. Figure 20. Plot of actual and predicted temperatures 5 h ahead for office 40 on the third floor. Figure 21. Plot of actual and predicted temperatures 24 h ahead for office 40 on the first floor. Figure 21. Plot of actual and predicted temperatures 24 h ahead for office 40 on the first floor. Figure 22. Plot of actual and predicted temperatures 24 h ahead for office 40 on the second floor. Buildings 2022, 12, x FOR PEER REVIEW 19 of 27 Buildings 2022, 12, 933 19 of 26 Figure 21. Plot of actual and predicted temperatures 24 h ahead for office 40 on the first floor. Buildings 2022, 12, x FOR PEER REVIEW 20 of 27 Figure 22. Plot of actual and predicted temperatures 24 h ahead for office 40 on the second floor. Figure 22. Plot of actual and predicted temperatures 24 h ahead for office 40 on the second floor. Figure 23. Plot of actual and predicted temperatures 24 h ahead for office 40 on the third floor. Figure 23. Plot of actual and predicted temperatures 24 h ahead for office 40 on the third floor. 3.3. Tailored Models 3.3. Tailored Models The plans w The plans wer ere consid e consider ered ed separ separately ately to to explore wh explore what at the min the minimum imum achiev achievable able er err ror or iis s a and nd whether whetherattempts attemptsat at generalisation generalisation justify justifthe y th impr e im ecision precisiof on of the t dif he fer dence. ifferenc The e. fine- The tuning, in this case, was performed considering a validation set on all planes. The number fine-tuning, in this case, was performed considering a validation set on all planes. The of neurons in the input layer and the hidden layer was set to 256, due to the performance number of neurons in the input layer and the hidden layer was set to 256, due to the per- improvement obtained by increasing the complexity of the model, as shown in the following formance improvement obtained by increasing the complexity of the model, as shown in figure (Figure 24). However, the higher the number of neurons, the longer the calculation the following figure (Figure 24). However, the higher the number of neurons, the longer time, so it is convenient to stop at the number 256, where the RMSE no longer decreases the calculation time, so it is convenient to stop at the number 256, where the RMSE no linearly, so any further increase in model complexity would not provide a proportional longer decreases linearly, so any further increase in model complexity would not provide benefit in terms of accuracy. In this way, we can achieve the highest possible accuracy a proportional benefit in terms of accuracy. In this way, we can achieve the highest possi- without risking overfitting and without significantly increasing the calculation time. ble accuracy without risking overfitting and without significantly increasing the calcula- tion time. Figure 24. Average RMSE trend concerning the number of neurons in each layer for the validation set on 2 h prediction horizon. The learning rate is a significant parameter and is set at 0.00001. It is only below this threshold that the learning curves stop fluctuating and the detection of the minimum of the loss function is successful, as indicated in the previous subsection. Abandonment Buildings 2022, 12, x FOR PEER REVIEW 20 of 27 Figure 23. Plot of actual and predicted temperatures 24 h ahead for office 40 on the third floor. 3.3. Tailored Models The plans were considered separately to explore what the minimum achievable error is and whether attempts at generalisation justify the imprecision of the difference. The fine-tuning, in this case, was performed considering a validation set on all planes. The number of neurons in the input layer and the hidden layer was set to 256, due to the per- formance improvement obtained by increasing the complexity of the model, as shown in the following figure (Figure 24). However, the higher the number of neurons, the longer the calculation time, so it is convenient to stop at the number 256, where the RMSE no longer decreases linearly, so any further increase in model complexity would not provide a proportional benefit in terms of accuracy. In this way, we can achieve the highest possi- Buildings 2022, 12, 933 ble accuracy without risking overfitting and without significantly increasing the calcu 20 of la- 26 tion time. Figure 24. Average RMSE trend concerning the number of neurons in each layer for the validation Figure 24. Average RMSE trend concerning the number of neurons in each layer for the validation set on 2 h prediction horizon. Buildings 2022, 12, x FOR PEER REVIEW 21 of 27 set on 2 h prediction horizon. Buildings 2022, 12, x FOR PEER REVIEW 21 of 27 The le The learning arning rat rate e isis a s aigni significant ficant paparameter rameter anand d is set is set at 0.000 at 0.00001. 01. It is only bel It is only ow below this thresho this thrleshold d that the thatle the arnin learning g curvcurves es stopstop fluctu fluctuating ating and the and de thetec detection tion of the of m the ini minimum mum of regularisation is not exploited here, because each tested abandonment rate causes the of the loss function is successful, as indicated in the previous subsection. Abandonment the loss function is successful, as indicated in the previous subsection. Abandonment model to fail to predict correctly and gradually increases the loss since the critical thresh- regularisation is not exploited here, because each tested abandonment rate causes the regularisation is not exploited here, because each tested abandonment rate causes the old is exceeded in each case (Figure 25). model to fail to predict correctly and gradually increases the loss since the critical thresh- model to fail to predict correctly and gradually increases the loss since the critical threshold old is exceeded in each case (Figure 25). is exceeded in each case (Figure 25). Figure 25. Average RMSE trend concerning dropout probability for the validation set on 2 h predic- tion horizon. Figure 25. Average RMSE trend concerning dropout probability for the validation set on 2 h predic- Figure 25. Average RMSE trend concerning dropout probability for the validation set on 2 h predic- tion horizon. tion horizon. The bi-directional LSTM structure is preferred over the traditional one for the second and third floors because it offers a slight performance improvement. In addition, the bidi- The bi-directional LSTM structure is preferred over the traditional one for the second The bi-directional LSTM structure is preferred over the traditional one for the second and rect thir iona dl s floors tructur because e benefit itsof from fers a a sho slight rter performance computation t impr ime, ovement. about 2/3 compared t In addition, o the the and third floors because it offers a slight performance improvement. In addition, the bidi- bidir trad ectional itional o strnuctur e. How e benefits ever, afr s men om atshorter ioned in computation the previous time, suabout bsection, 2/3 the compar bi-di ed rect to ithe onal rectional structure benefits from a shorter computation time, about 2/3 compared to the traditional structure is more one. However sensitiv , as e mentioned to the enlar in gement the previous of the time horizo subsection, the n, making bi-directional it convenient struc- traditional one. However, as mentioned in the previous subsection, the bi-directional tur to e swit is mor ch t e sensitive o the trad to itithe onaenlar l stru gement cture foof r tthe he la time rger horizon, time interv making al con it s convenient idered (i.e., 24 to switch h, Fig- structure is more sensitive to the enlargement of the time horizon, making it convenient to the traditional structure for the larger time interval considered (i.e., 24 h, Figure 26). ure 26). to switch to the traditional structure for the larger time interval considered (i.e., 24 h, Fig- ure 26). Figure 26. Average RMSE trend concerning time horizon by structure for the validation set. Figure 26. Average RMSE trend concerning time horizon by structure for the validation set. Figure 26. Average RMSE trend concerning time horizon by structure for the validation set. By contrast, there is no such clear trend in the loss function. Overall, performance is comparable (Figure 27). By contrast, there is no such clear trend in the loss function. Overall, performance is comparable (Figure 27). Figure 27. Average RMSE concerning loss function by floor for the validation set on 2 h prediction horizon. Figure 27. Average RMSE concerning loss function by floor for the validation set on 2 h prediction horizon. Buildings 2022, 12, x FOR PEER REVIEW 21 of 27 regularisation is not exploited here, because each tested abandonment rate causes the model to fail to predict correctly and gradually increases the loss since the critical thresh- old is exceeded in each case (Figure 25). Figure 25. Average RMSE trend concerning dropout probability for the validation set on 2 h predic- tion horizon. The bi-directional LSTM structure is preferred over the traditional one for the second and third floors because it offers a slight performance improvement. In addition, the bidi- rectional structure benefits from a shorter computation time, about 2/3 compared to the traditional one. However, as mentioned in the previous subsection, the bi-directional structure is more sensitive to the enlargement of the time horizon, making it convenient to switch to the traditional structure for the larger time interval considered (i.e., 24 h, Fig- ure 26). Buildings 2022, 12, 933 21 of 26 Figure 26. Average RMSE trend concerning time horizon by structure for the validation set. By contrast, there is no such clear trend in the loss function. Overall, performance is By contrast, there is no such clear trend in the loss function. Overall, performance is comparable (Figure 27). comparable (Figure 27). Buildings 2022, 12, x FOR PEER REVIEW 22 of 27 Figure 27. Average RMSE concerning loss function by floor for the validation set on 2 h prediction Figure 27. Average RMSE concerning loss function by floor for the validation set on 2 h predic- horizon. tion horizon. Similar to the previous observation, considering that the prediction performance of Similar to the previous observation, considering that the prediction performance of the the Adam optimiser deteriorates with the length of the prediction horizon (Figure 28). Adam optimiser deteriorates with the length of the prediction horizon (Figure 28). However, unlike However, un the generalised like the g model, eneralise Adam d mode continues l, Adam to con outperform tinues to ou the tpother erform optimisers, the other op butti- by mi br sers, b oadening ut bythe broa for deni ecast ng horizon the foreca we stmay horiz be on we may be faced with a fa tipping ced with a ti point ppi after ng p which oint aft it is er convenient which it is to cochange nvenient optimisers, to change as opt was imisers, the case as wwith as the c the ase development with the deve oflthe opm pr ent of evious the generalised model. previous generalised model. Figure 28. Average RMSE trend concerning prediction horizon by the optimiser for the validation Figure 28. Average RMSE trend concerning prediction horizon by the optimiser for the validation set. set. The alternative approach attempted (MISO) appears to systematically present more The alternative approach attempted (MISO) appears to systematically present more accurate predictions, but on the other hand, is not as comprehensive as MIMO. It is evident accurate predictions, but on the other hand, is not as comprehensive as MIMO. It is evident that these models, due to their limited capacity for generalisation, perform slightly better that these models, due to their limited capacity for generalisation, perform slightly better when applying the MISO approach, probably due to its lower complexity (Figure 29). when applying the MISO approach, probably due to its lower complexity (Figure 29). While the relative position of each office does not seem to influence the corresponding forecasts, the errors are significantly higher for the second and third floors than for the first, in agreement with the results reported in the previous subsection (Figure 30). Figure 29. Average RMSE WRT approach for validation set and 2 h prediction horizon. While the relative position of each office does not seem to influence the correspond- ing forecasts, the errors are significantly higher for the second and third floors than for the first, in agreement with the results reported in the previous subsection (Figure 30). Buildings 2022, 12, x FOR PEER REVIEW 22 of 27 Similar to the previous observation, considering that the prediction performance of the Adam optimiser deteriorates with the length of the prediction horizon (Figure 28). However, unlike the generalised model, Adam continues to outperform the other opti- misers, but by broadening the forecast horizon we may be faced with a tipping point after which it is convenient to change optimisers, as was the case with the development of the previous generalised model. Figure 28. Average RMSE trend concerning prediction horizon by the optimiser for the validation set. The alternative approach attempted (MISO) appears to systematically present more accurate predictions, but on the other hand, is not as comprehensive as MIMO. It is evident Buildings 2022, 12, 933 22 of 26 that these models, due to their limited capacity for generalisation, perform slightly better when applying the MISO approach, probably due to its lower complexity (Figure 29). Buildings 2022, 12, x FOR PEER REVIEW 23 of 27 Figure 29. Average RMSE WRT approach for validation set and 2 h prediction horizon. Figure 29. Average RMSE WRT approach for validation set and 2 h prediction horizon. While the relative position of each office does not seem to influence the correspond- ing forecasts, the errors are significantly higher for the second and third floors than for the first, in agreement with the results reported in the previous subsection (Figure 30). Figure 30. Average RMSE concerning floor for the validation set. Figure 30. Average RMSE concerning floor for the validation set. 4. Discussion 4. Discussion To summarise, the errors of the model are approximately between 0.11 C and 0.1 C, To summarise, the errors of the model are approximately between 0.11 °C and 0.1 °C, whereas by creating a different model for each plane, we obtain an RMSE between 0.08 and whereas by creating a different model for each plane, we obtain an RMSE between 0.08 0.06 C, as shown in Figure 31. The performance gap is negligible enough to validate the and 0.06 °C, as shown in Figure 31. The performance gap is negligible enough to validate models. Users could take advantage of the models’ ability to adapt to each plane, without the models. Users could take advantage of the models’ ability to adapt to each plane, with- losing too much accuracy compared to what could have been achieved by developing out losing too much accuracy compared to what could have been achieved by developing a single model for each circumstance. a single model for each circumstance. On the other hand, the tests showed some results: Increasing the size of the time horizon has a worse impact on the performance of the model if the optimiser is of the type indicated by Adam; the ability to predict variables well in advance would be vital in cases such as prolonged sensor failure, but this type of prediction would be less reliable if the performance of the optimiser is not monitored. The MISO scenario does not necessarily guarantee smaller errors in predictions, be- cause it explores a simplified scenario. On the other hand, the MIMO approach ensures completeness in representing the future state of the building. A model that can generalise sufficiently, however, can also achieve better results by running MIMO scenarios, as demonstrated in the Model Tuning subsection and also reported in other similar studies. It must be considered that each floor has different levels of complexity because it is defined by different dynamics. The third floor, for example, has the particularity of the roof, while the second is influenced by the proximity of the other two floors, whose influences are not considered by the input variables. When treating each floor as Figure 31. Model average RMSE concerning floor by prediction horizon versus floor-tailored models. On the other hand, the tests showed some results: • Increasing the size of the time horizon has a worse impact on the performance of the model if the optimiser is of the type indicated by Adam; the ability to predict varia- bles well in advance would be vital in cases such as prolonged sensor failure, but this type of prediction would be less reliable if the performance of the optimiser is not monitored. Buildings 2022, 12, x FOR PEER REVIEW 23 of 27 Buildings 2022, 12, 933 23 of 26 a single thermal zone, the model’s predictions for the first floor are the most accurate compared to those for the second and third floors, whereas when the model is trained to generalise more, it does not seem to be influenced much by the floor considered. The traditional structure works well for short-term forecasts, but performance may deteriorate as the forecast horizon is extended, to the point that for a longer period the two-way structure is preferable; this is the case both considering the plans as separate Figure 30. Average RMSE concerning floor for the validation set. areas. Thus, the length of the horizon appears to be a parameter that affects performance. The chosen learning rate ensures error constancy during the training phase and is 4. Discussion very low (i.e., 0.000001); at the same time, since the preferred optimiser is often of the Adam type, known to have the fastest convergence rate, calculation times are not To summarise, the errors of the model are approximately between 0.11 °C and 0.1 °C, unacceptable, and similarly when the chosen optimiser is of the Adagrad or SGD type. whereas by creating a different model for each plane, we obtain an RMSE between 0.08 The highest tested numerosity (i.e., 256 neurons) is the one that guarantees the best and 0.06 °C, as shown in Figure 31. The performance gap is negligible enough to validate performance when the model is perfectly adapted to the reference area as far as possi- the models. Users could take advantage of the models’ ability to adapt to each plane, with- ble. Otherwise, a model that must remain versatile may become too complex and the out losing too much accuracy compared to what could have been achieved by developing ideal number of neurons is much lower, around 128, resulting in a simpler structure. a single model for each circumstance. Figure 31. Model average RMSE concerning floor by prediction horizon versus floor-tailored models. Figure 31. Model average RMSE concerning floor by prediction horizon versus floor-tailored models. Comparison with Similar Studies On the other hand, the tests showed some results: The proposed solution is twofold: specific models seem to be a good solution for • Increasing the size of the time horizon has a worse impact on the performance of the stakeholders interested in managing air-conditioning systems only on a single floor while model if the optimiser is of the type indicated by Adam; the ability to predict varia- minimising the margin of error, while a generalised model is the most suitable when the bles well in advance would be vital in cases such as prolonged sensor failure, but this need is to act on the control system in a centralised manner and may also prove reliable type of prediction would be less reliable if the performance of the optimiser is not when tested on other buildings. The proposed solution is validated by comparing it with monitored. some previous studies existing in the literature, already listed in this study as references. Among them, a couple of ANN models can be compared because they deal with similar buildings, climate zones and forecast horizons. Soleimani-Mohseni et al. [17] predicted the operating temperature using a feed-forward ANN. The structure of the network (3-10-1) included only one hidden layer, just like the model proposed in this study. This network provided a value of MAEE = 0.1543 for the training data and a MAEE = 0.1770 for the test data. Attoue et al. [21], starting from a dataset consisting of parameters recorded every five minutes for two summer months, were able to obtain reliable estimates up to two hours in advance, although the forecast horizons tested varied from 0.5, 1, 2 and 4 h. The MSE increased with time, from a value of 0.0701 to 1.053, which was considered unsatisfactory. In Buildings 2022, 12, 933 24 of 26 the latter case, about 68% of the forecast errors were less than 1 C. Huang et al. [23] based the training process of their ANN model on the MSE loss function (and in the meantime relied on Bayesian regularisation as a training method) and developed an effective multi- zone predictor over a time range of 1 to 4/5 h, to the extent that even six-day simulations were found to maintain an RMSE of 0.2–0.4 C for most of the zones tested. Xu et al. [22] exploited the potential of LSTM for forecasting purposes and obtained an RMSE between 0.3 C and 0.5 C with two months of collected data and forecast horizons from 5 to 30 min. The results listed are generally in the same range in terms of error, bearing in mind that a fair comparison is rendered impossible by significant differences, for example, in the availability of training data, the forecast horizons chosen and the building areas. In conclusion, this result suggests that the proposed model provides satisfactory forecast accuracy for the periods considered. Consequently, optimised management of the controlled variables based on the forecasts obtained could support a valuable service and represent an advantage in terms of energy savings. 5. Conclusions This study allowed us to exploit one of the most popular models in time series prediction (i.e., an LSTM neural network) on a huge dataset consisting of measurements taken from summer 2019 to summer 2020 inside a real three-story building located in Turin (Italy). Our aim is to predict the indoor temperature for each office included in the considered area of the building. The significant size of the dataset allowed us to unlock the potential of LSTM and we decided to train and validate the model on the first-floor data only, to verify its ability to adapt to different floors and, in general, to different building scenarios. In addition, the dataset was divided according to its original chronological sequence, so the model was only trained on certain months of the year, to assess the model’s ability to recognise patterns regardless of the period of the year considered. The results were obtained through two different scenarios. The MISO approach provides only the indoor temperature from office R-40, while the MIMO approach outputs the indoor temperatures of all offices in the area considered. The latter not only provides more comprehensive results but also performs better in most cases. The main success criterion adopted is the RMSE metric. The architecture and parameters of the neural network were identified after a large number of tests, aimed at identifying the most suitable parameters for short-term (2 and 5 h in advance) and long-term (24 h in advance) forecasting. The established models shared a small structure (i.e., only one hidden layer), similar to some previous examples in the literature, and a number of 128 neurons in the input and hidden layers, while in the output layer the number of neurons was set equal to the predicted variables. The performance was finally validated against that obtained from similar models trained on each plane, finding that the differences in terms of errors recorded could be considered negligible. It can therefore be concluded that the models developed can generalise and handle new data satisfactorily for both short-term and long-term forecasts. Models trained and tested on only one floor are more accurate, but may not be easily reusable, either between floors or between offices, as MIMO models show a systematic decrease in accuracy compared to MISO models. The current results were compared with those obtained in other studies. Although an equal comparison is not possible because the models were developed under different conditions, overall the results, ranging between 0.1 and 0.15 in terms of RMSE considering all the prediction horizons tested, proved to be comparable to the proposed options. The prediction error in terms of degrees Celsius is far removed from the values perceptible on the human body. As future work, this study can be extended by adapting current models to predict the building’s internal temperature over longer time horizons to manage energy demand. Similar to other studies, such as that of Fang et al. [24] and Attoue et al. [21] this work could be extended by exploring the role of other characteristics, for example, occupancy, planned indoor activities or user behaviour, which could be measured, for example, through the presence of carbon dioxide in the air or the energy use of appliances. Furthermore, further Buildings 2022, 12, 933 25 of 26 studies could consist of producing models with controlled variables, such as radiant panel flow temperatures, based on predictions of observed variables (e.g., indoor temperatures) and driven by setpoint temperatures. An MPC system based on the developed model could be created and eventually tested, as reported by Huang et al. [23]. Author Contributions: Conceptualization, D.P.; data curation, S.D.G.; investigation, S.D.G.; supervi- sion, D.P.; validation, S.D.G.; writing—review & editing, D.P. and S.D.G. All authors have read and agreed to the published version of the manuscript. Funding: This research received no external funding. Institutional Review Board Statement: Not applicable. Informed Consent Statement: Informed consent was obtained from all subjects involved in the study. Data Availability Statement: Not applicable. Acknowledgments: The authors want to thank Eurix Srl (TO–Italy) for supporting our work. Conflicts of Interest: The authors declare no conflict of interest. Nomenclature C Celsius degree AHU Air Handling Unit ANN Artificial Neural Networks ARMA AutoRegressive Moving Average ARMAX AutoRegressive Moving Average with eXogenous inputs ARX AutoRegressive time series with eXogenous inputs avg average BP Back Propagation ELM Extreme Learning Machine EU European Union h hour(s) HVAC Heating Ventilation Air Conditioning LSTM Long Short-Term Memory MAE Mean Absolute Error MAEE Mean Absolute Error Estimation MIMO Multi Input Multi Output MISO Multi Input Single Output MSE Mean Squared Error NARX Nonlinear AutoRegressive with eXternal input ODE Ordinary Differential Equation R correlation index RC Resistance-Capacitance ReLU Rectified Linear Unit RMSE Root Mean Squared Error SVM Support Vector Machine WRT With Respect To References 1. Directive 2010/31/EU Energy Performance Building Directive; European Parliament: Strasbourg, France, 2010. 2. Aliberti, A.; Bottaccioli, L.; Macii, E.; Di Cataldo, S.; Acquaviva, A.; Patti, E. A non-linear autoregressive model for indoor air-temperature predictions in smart buildings. Electronics 2019, 8, 979. [CrossRef] 3. Zhao, H.X.; Magoulès, F. A review on the prediction of building energy consumption. Renew. Sustain. Energy Rev. 2012, 16, 3586–3592. [CrossRef] 4. Fong, K.F.; Hanby, V.I.; Chow, T.T. HVAC system optimization for energy management by evolutionary programming. Energy Build. 2006, 38, 220–231. [CrossRef] 5. Foucquier, A.; Robert, S.; Suard, F.; Stéphan, L.; Jay, A. State of the art in building modeling and energy performance prediction: A review. Renew. Sustain. Energy Rev. 2013, 23, 272–288. [CrossRef] Buildings 2022, 12, 933 26 of 26 6. Amara, F.; Agbossou, K.; Cardenas, A.; Dubé, Y.; Kelouwani, S. Comparison and simulation of building thermal models for effective energy management. Smart Grid Renew. Energy 2015, 6, 95–112. [CrossRef] 7. Fraisse, G.; Viardot, C.; Lafabrie, O.; Achard, G. Development of a simplified and accurate building model based on electrical analogy. Energy Build. 2002, 34, 1017–1031. [CrossRef] 8. Ramallo-González, A.P.; Eames, M.E.; Coley, D. Lumped parameter models for building thermal modelling: An analytic approach to simplifying complex multi-layered constructions. Energy Build. 2013, 60, 174–184. [CrossRef] 9. Van Dijk, D. EN ISO 52016 1: The new International Standard to calculate building energy needs for heating and cooling, internal temperature and heating and cooling loads. In Proceedings of the Building Simulation, Rome, Italy, 2–4 September 2019. 10. Vivian, J.; Zarrella, A.; Emmi, G.; De Carli, M. An evaluation of the suitability of lumped-capacitance models in calculating energy needs and thermal behaviour of buildings. Energy Build. 2017, 150, 447–467. [CrossRef] 11. Wang, S.; Xu, X. Simplified building model for transient thermal performance estimation using GA-based parameter identification. Int. J. Therm. Sci. 2006, 45, 419–432. [CrossRef] 12. Braun, J.E.; Chaturvedi, N. An inverse gray-box model for transient building load prediction. HVAC Res. 2002, 8, 73–99. [CrossRef] 13. Chen, R.T.; Rubanova, Y.; Bettencourt, J.; Duvenaud, D.K. Neural ordinary differential equations. NeurIPS 2018, 31, 6572–6583. 14. Daw, A.; Karpatne, A.; Watkins, W.; Read, J.; Kumar, V. Physics-guided neural networks (PGNN): An application in lake temperature modeling. arXiv 2017, arXiv:1710.11431. 15. Massano, M.; Patti, E.; Macii, E.; Acquaviva, A.; Bottaccioli, L. An online gray-box model based on unscented Kalman filter to predict temperature profiles in smart buildings. Energies 2020, 13, 2097. [CrossRef] 16. Hermawan, P.E. Indoor temperature prediction of the houses with exposed stones in tropical mountain regions during four periods of different seasons. Int. J. Civ. Eng. Technol. 2019, 10, 604–612. 17. Soleimani-Mohseni, M.; Thomas, B.; Fahlén, P. Estimation of operative temperature in buildings using artificial neural networks. Energy Build. 2006, 18, 635–640. [CrossRef] 18. Lu, T.; Viljanen, M. Prediction of indoor temperature and relative humidity using neural network models: Model comparison. Neural Comput. Appl. 2009, 18, 345. [CrossRef] 19. Mba, L.; Meukam, P.; Kemajou, A. Application of artificial neural network for predicting hourly indoor air temperature and relative humidity in modern building in humid region. Energy Build. 2016, 121, 32–42. [CrossRef] 20. Shi, X.; Lu, W.; Zhao, Y.; Qin, P. Prediction of indoor temperature and relative humidity based on cloud database by using an improved BP neural network in Chongqing. IEE Access 2018, 6, 30559–30566. [CrossRef] 21. Attoue, N.; Shahrour, I.; Younes, R. Smart building: Use of the artificial neural network approach for indoor temperature forecasting. Energies 2018, 11, 395. [CrossRef] 22. Xu, C.; Chen, H.; Wang, J.; Guo, Y.; Yuan, Y. Improving prediction performance for indoor temperature in public buildings based on a novel deep learning method. Build. Environ. 2019, 148, 128–135. [CrossRef] 23. Huang, H.; Chen, L.; Hu, E. A neural network-based multi-zone modelling approach for predictive control system design in commercial buildings. Energy Build. 2015, 97, 86–97. [CrossRef] 24. Fang, Z.; Crimier, N.; Scanu, L.; Midelet, A.; Alyafi, A.; Delinchant, B. Multi-zone indoor temperature prediction with LSTM-based sequence to sequence model. Energy Build. 2021, 245, 111053. [CrossRef] 25. Li, Q.; Meng, Q.; Cai, J.; Yoshino, H.; Mochida, A. Applying support vector machine to predict hourly cooling load in the building. Appl. Energy 2009, 86, 2249–2256. [CrossRef] 26. Noorazizi, M.S.; Zaki, S.A.; Abdullah, S.S. Black box modelling and simulating the dynamic indoor air temperature of a laboratory using ARMA model. Indones. J. Electr. Eng. Comput. Sci. 2020, 21, 791–800. 27. Afroz, Z.; Shafiullah, G.; Urmee, T.; Higgins, G. Prediction of Indoor Temperature in an Institutional Building. Energy Procedia 2017, 142, 1860–1866. [CrossRef] 28. Mateo, F.; Carrasco, J.J.; Sellami, A.; Millán-Giraldo, M.; Domínguez, M.; Olivas, E.S. Machine learning methods to forecast temperature in buildings. Expert Syst. Appl. 2013, 40, 1061–1068. [CrossRef] 29. Mustafaraj, G.; Lowry, G.; Chen, J. Prediction of room temperature and relative humidity by autoregressive linear and non-linear neural network models for an open office. Energy Build. 2011, 43, 1452–1460. [CrossRef] 30. Gustin, M.; McLeod, R.S.; Lomas, K.J. Forecasting indoor temperatures during heatwaves using time series models. Build. Environ. 2018, 143, 727–739. [CrossRef] 31. Alawadi, S.; Mera, D.; Fernández-Delgado, M.; Alkhabbas, F.; Olsson, C.M.; Davidsson, P. A comparison of machine learning algorithms for forecasting indoor temperature in smart buildings. Energy Syst. 2020, 1–17. [CrossRef] 32. Dabas, N.; Singh, R.P. ELM-Kernel and reduced kernel ELM based watermarking scheme. J. Inf. Secur. Appl. 2019, 46, 173–192. [CrossRef] http://www.deepdyve.com/assets/images/DeepDyve-Logo-lg.png Buildings Multidisciplinary Digital Publishing Institute

Hybrid Models for Indoor Temperature Prediction Using Long Short Term Memory Networks—Case Study Energy Center

Buildings , Volume 12 (7) – Jul 1, 2022

Loading next page...
 
/lp/multidisciplinary-digital-publishing-institute/hybrid-models-for-indoor-temperature-prediction-using-long-short-term-mXdh8aekvo

References (29)

Publisher
Multidisciplinary Digital Publishing Institute
Copyright
© 1996-2022 MDPI (Basel, Switzerland) unless otherwise stated Disclaimer The statements, opinions and data contained in the journals are solely those of the individual authors and contributors and not of the publisher and the editor(s). MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. Terms and Conditions Privacy Policy
ISSN
2075-5309
DOI
10.3390/buildings12070933
Publisher site
See Article on Publisher Site

Abstract

buildings Article Hybrid Models for Indoor Temperature Prediction Using Long Short Term Memory Networks—Case Study Energy Center 1 2 , 3 , Silvia Di Già and Davide Papurello * Department of Management and Production Engineering (DIGEP), Politecnico di Torino, Corso Duca degli Abruzzi, 24, 10129 Turin, Italy; silvia.digia@studenti.polito.it Department of Energy (DENERG), Politecnico di Torino, Corso Duca degli Abruzzi, 24, 10129 Turin, Italy Energy Center, Politecnico di Torino, Via Paolo Borsellino, 38/16, 10138 Turin, Italy * Correspondence: davide.papurello@polito.it; Tel.: +39-3402351692 Abstract: In the European Union States, household energy usage accounts on average for 40% of overall energy consumption and is responsible for a considerable amount of carbon dioxide emissions. The urgent need to take concrete action to identify solutions that can ensure more effective usage of energy in households, both because of environmental and political reasons, has been repeatedly stated by the European Parliament. White box, grey box and black box predictive models were demonstrated to be a feasible approach to predict the indoor temperature to implement an effective energy management strategy. This study has the purpose of illustrating the potentiality of an LSTM Artificial Neural Network in a short and long-term prediction of the indoor temperature in 15 offices distributed on three storeys of an existing building (Energy Center of Turin (Italy)). The indoor temperature was predicted two hours, five hours and one entire day ahead. The performance of these algorithms has been evaluated not only based on two main criteria (i.e., Root Mean Squared Error and Mean Absolute error) but also by considering the adaptability of the model between the three floors and in terms of different years. Moreover, the proposed work explains how parameters Citation: Di Già, S.; Papurello, D. affect performances, aiming to properly identify the optimal model structure. Current results indicate Hybrid Models for Indoor that these models can provide accurate predictions for all the proposed time scales and could all Temperature Prediction Using Long potentially be used for predictive control purposes to optimise the energy demand. The novelty of Short Term Memory Networks—Case this study is to show that these models can only be trained on data for a limited period and a specific Study Energy Center. Buildings 2022, plane, and then be reliable in predicting indoor temperature, both for different planes and for random 12, 933. https://doi.org/10.3390/ periods, taking into account temperature and relative humidity. Furthermore, input parameters are buildings12070933 limited to indoor HVAC variables, to ensure acceptable predictions regardless of outdoor parameters Academic Editor: Karim Ghazi availability. The only exception is the outdoor temperature, because of its undeniable and proven Wakili importance, it was retained as the only exogenous input variable. Based on current literature and Received: 21 December 2021 temperature perception capabilities, the results were considered acceptable if the RMSE was less than Accepted: 21 June 2022 0.15 or better yet 0.10, which is equivalent to an inaccuracy between the predicted and actual indoor Published: 1 July 2022 temperature of 0.15 C/0.10 C. On average, the models trained on the Energy Center database achieved an error of 0.1 C in terms of RMSE. Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in Keywords: prediction model; indoor temperature forecasting; LSTM; artificial neural networks; published maps and institutional affil- iations. energy savings Copyright: © 2022 by the authors. 1. Introduction Licensee MDPI, Basel, Switzerland. The EU has repeatedly stressed the need for efficient building energy management [1] This article is an open access article since they account for 40% of total energy consumption and 36% of total CO emissions distributed under the terms and within the EU [2,3]. As HVAC systems are responsible for the most energy consumed in conditions of the Creative Commons buildings [4], automation of residential as well as commercial buildings and their “smart” Attribution (CC BY) license (https:// breakthrough is a key target to reduce energy waste. This amount is constantly increasing creativecommons.org/licenses/by/ due to population growth, rising temperatures and higher comfort standards. All the 4.0/). Buildings 2022, 12, 933. https://doi.org/10.3390/buildings12070933 https://www.mdpi.com/journal/buildings Buildings 2022, 12, 933 2 of 26 trends mentioned suggest that HVAC will be increasingly used soon. Predictive models are one of the emerging technologies of recent times and are applied to different sectors. In the context of buildings, predictive models are an essential resource for achieving a reduction in energy consumption. The prediction of indoor temperature from certain input variables allows, for example, the prediction of short- and long-term energy demand and peak load, and, consequently, a more rational and optimised energy production that brings with it significant benefits. It also opens the door to pre-heating and pre-cooling solutions based on weather forecasts, and to better equipment management strategies that aim to reduce internal fluctuations as much as possible. Predictive technologies play an important role in laying the foundations for the implementation of intelligent buildings, where automatic control strategies are implemented to anticipate both user behaviour and the effects of external conditions to maximise indoor comfort. A plethora of different models [5] was employed, including building energy simulation software (the so-called white models) such as EnergyPlus and TRNSYS, that allows to explore even not yet existing buildings behaviours and remain unaffected by database quality. Nevertheless, the mathematics model realised to describe the building requires a lot of parameters and computational times are prohibitively high. On the other hand, black models make their predictions out of historical data thanks to statistical models instead of physical principles, with lower computational times and less required expertise, even if they are significant data- hungry, therefore huge volumes of data are needed to get accurate predictions. Finally, grey models are intermediate approaches: they are less affected than black models by data availability and quality, they require fewer input parameters than white models, with intermediate computation times, and in most cases, have proven to be the most effective models for managing the energy consumption of buildings [6]. This hybrid category includes simplified RC models that offer much more simple building descriptions by performing an electrical analogy, among them, Fraisse et al. [7] and its second-order version [8] international standards (EN) ISO 13790:2008 that was recently replaced by (EN) ISO 52016-1 [9], which empowered the hourly method of its predecessor to better handle dynamic interactions between building components and system elements, and VDI 6007-1 [10]. As more capacitance parameters are taken into consideration, accuracy increases at the cost of greater computational times, leading to a trade-off. However, hybrid models’ parameters detection relies on a wide range of methods, such as Genetic Algorithms [11], regression algorithms [12], ODE-based [13] and physics-guided neural networks [14], or even Unscented Kalman Filter that provides a different set of equations (i.e., a filter) depending on the building zone [15]. Black models are also greatly used in most of their variants, from linear regression, as well as nonlinear regression [16,17], to various types of artificial neural networks. The well-known study by Lu and Viljanen [18] showed the suitability of NNARX models in the predicting indoor temperature task and their quickness and handiness in comparison to physical models, achieving a coefficient of determination of 0.996. Overall, in the literature, ANN was employed in a plethora of climate zones, including extreme humid regions as Mba et al. [19] did by using ANN to forecast indoor temperature 24 h up to one month ahead. More recently, also Shi et al. [20] proposed a BP neural network to forecast indoor temperature 6 h, 24 h and 72 h in advance. Data were collected in a tobacco factory warehouse in a high humidity area in China and included outdoor and indoor temperature and relative humidity. Black models are also massively exploited in non-industrial contexts, such as offices and commercial buildings, where the indoor temperature is a significant comfort indicator. Soleimani-Mohseni [17] developed a simple feed-forward neural network with one hidden layer based on the Levenberg–Marquardts training algorithm and selected as input features just easily measured parameters such as wall temperatures, indoor and outdoor temperatures, electrical power, ventilation flow rate and time of the day to forecast a single office indoor temperature. The results showed that even without past data, a non-linear artificial neural network gave a better estimation of the operative indoor temperature than linear ARX models. Attoue et al. [21] as well proposed Buildings 2022, 12, 933 3 of 26 a three-layer ANN to forecast indoor temperature, considering a prediction horizon from 0.5 h to 4 h. This work has some points of similarity with the present study, for example, there is a dataset consisting of several offices in the same building and a comparable outdoor temperature range. Specifically, LSTM was used by Xu et al. [22] to forecast very-short term (i.e., 5 min and 30 min-ahead) indoor temperature in a public building with measured data collected for nearly 2 months. In these circumstances, an LSTM model modified by an error correction model was compared with other machine learning models (i.e., DT, SVM and BPNN) and showed evident advantages in directional prediction accuracy. ANN potentialities were further explored in modelling multi-zone buildings by Huang et al. [23] whose final purpose was to establish an effective driver for a predictive control system in a commercial building located in Australia. The study illustrates that RMSE was reduced by about 0.1 C by choosing a multi-zone model instead of a single-zone model. Therefore, the proposed model was able to take into consideration the thermal interaction between the adjacent zones. The training was led by Bayesian regularisation exactly to improve generalisation. Recently, Fang et al. [24] proposed also a multi-zone model that adopts a cross-series learning strategy, providing predictions up to 2–3 days ahead. Among the tested seq2seq models, the LSTM-dense model turned out to be the most useful for short- term forecasting, while LSTM-dense-LSTM or LSTM-LSTM performed better for longer prediction horizons. This study underlined the potentialities of LSTM models when a large dataset of training data is available (i.e., three years). The training consisted not only of historical variables but also of future variables, including forecasted outdoor temperatures. Depending on the specific seq2seq architecture, variables were concatenated to form a total input matrix to be passed directly or separately to encoder and decoder components. Other machine learning techniques such as SVM [25] and ARMA [26] were also employed in this scope. The autoregressive approach turns out to be effective, particularly if applied to neural networks (e.g., NARX) rather than ARX, as illustrated in several studies [27–29]. On the other hand, Gustin et al. [30] developed an AutoRegressive time series model using eXogenous input using data collected during the 2015 heatwave and claimed that ARX, whose predictor variables were selected by minimising the Akaike Information Criterion, was suitable for temperature prediction from 1 up to 72 h in advance and even simpler to derive than ARMAX. Alawadi et al. [31] carried out a test of several machine learning models under the same conditions and regressors with good performances turned out to be extraTrees, less sensitive to noise and outliers and to wider time frames than ANN, along with random forests, various ANN declination, cubist, ELM [32] and gradient boosting of regression trees. In this work, ANN is used for a short and long-term prediction of the internal temperature in fifteen offices distributed on three floors of the Energy Center in Turin. The prediction horizon varies from 2 h to one entire day. The performance of these algorithms has been evaluated using: Root Mean Squared Error and Mean Absolute error. Moreover, the proposed work explains how parameters affect performances, aiming to justify the identification of the optimal model structure. In addition, this study illustrates the flexibility of ANN techniques, which can predict both short- and long-term target variables and can identify robust patterns between input and target characteristics, to the extent that neural networks trained on single-plane data that do not cover the whole year are also employable on other plans and at different times of the year without deteriorating their performance. 2. Materials and Methods 2.1. The Target Building The dataset is composed of surveys taken from a three-storey building located in Turin, Northern Italy. The target building, called Energy Center, is a research centre of the Politecnico di Torino, in particular in the field of renewable and green energies (Figure 1). The building comprises several areas that can be classified according to their air-conditioning system: areas supplied by radiant floor panels and primary air (e.g., basement), areas supplied by radiant ceiling panels and primary air (e.g., offices), areas Buildings 2022, 12, x FOR PEER REVIEW 4 of 27 conditioning system: areas supplied by radiant floor panels and primary air (e.g., base- ment), areas supplied by radiant ceiling panels and primary air (e.g., offices), areas sup- plied by aerothermal heating (e.g., laboratory), areas supplied by an ‘all-air’ system, with- out recirculation of the internal air (e.g., auditorium). The study is focused on the north- east side of the building that includes five separated offices for each floor, whose layout is shown in Figure 2. Each office, coded accordingly to its relative position as reported in Figure 2, is climate-controlled by ceiling radiant panels, supplied by the same circuit, and air-conditioned, through the same air system. Sensible heat is therefore managed by radi- Buildings 2022, 12, 933 4 of 26 ant panels, while the air handling unit controls relative humidity and air supply, the latter in proportion to current occupancy. A technological control unit is in charge of maintain- ing the thermal conditions and includes: connection to groundwater, connection to district supplied by aerothermal heating (e.g., laboratory), areas supplied by an ‘all-air ’ system, without recirculation of the internal air (e.g., auditorium). The study is focused on the heating, a multi-purpose geothermal heat pump, an absorption unit for the production of northeast side of the building that includes five separated offices for each floor, whose layout thermal energy for air conditioning fed by district heating and cooling from groundwater, is shown in Figure 2. Each office, coded accordingly to its relative position as reported in st Figur orag e e ta 2, is climate-contr nks, a seri olled es of e by ceiling lectriradiant c pumps and panels, supplied circu by lat the orsame s, dicir ver cuit, ter and mixing valves, tem- and air-conditioned, through the same air system. Sensible heat is therefore managed perature and pressure probes, flow and thermal energy meters, and a regulation system by radiant panels, while the air handling unit controls relative humidity and air supply, controlled by the supervisory system. The building is also equipped with a solar system the latter in proportion to current occupancy. A technological control unit is in charge of maintaining the thermal conditions and includes: connection to groundwater, connection used for domestic hot water production, but it does not actually play any role in the air to district heating, a multi-purpose geothermal heat pump, an absorption unit for the conditioning system. The acceptable indoor temperature range is approximately +20 °C in production of thermal energy for air conditioning fed by district heating and cooling from groundwater, storage tanks, a series of electric pumps and circulators, diverter and mixing winter and +26 °C in summer, with a tolerance of ±2 °C. These comfort conditions were valves, temperature and pressure probes, flow and thermal energy meters, and a regulation not met for a couple of offices (those highlighted in red in Figure 2). The measurements of system controlled by the supervisory system. The building is also equipped with a solar system used for domestic hot water production, but it does not actually play any role in the the sensors located in all fifteen offices were carried out four times per hour for a period air conditioning system. The acceptable indoor temperature range is approximately +20 C of one and a half years, from May 2019 to October 2020. The mentioned sensors are inte- in winter and +26 C in summer, with a tolerance of 2 C. These comfort conditions were grated into Siemens system operator units for KNX S-Mode and KNX LTE-Mode. The not met for a couple of offices (those highlighted in red in Figure 2). The measurements of the sensors located in all fifteen offices were carried out four times per hour for a period of sensors mounted inside the Siemens panel are a thermistor NTC and they are wall- one and a half years, from May 2019 to October 2020. The mentioned sensors are integrated mounted close to the door entrance. The recorded data refer not only to the indoor and into Siemens system operator units for KNX S-Mode and KNX LTE-Mode. The sensors mounted inside the Siemens panel are a thermistor NTC and they are wall-mounted close to outdoor temperatures but also to various system-related variables. Each survey refers to the door entrance. The recorded data refer not only to the indoor and outdoor temperatures a specific office, making it possible to consider each room as a separate area. Some values, but also to various system-related variables. Each survey refers to a specific office, making itfor possible example, the flow to consider each room and as r a e separate turn temper area. Some ature values, s ofor f the example, floor AHU the flow, are common to the whole and return temperatures of the floor AHU, are common to the whole floor, while others, for floor, while others, for example, the flow temperature of the AHU for all building areas example, the flow temperature of the AHU for all building areas considered, are common considered, are common to the whole building. to the whole building. Figure 1. Energy Center, the target building. Photo source: https://mattioda.it/en/cantieri/energy- Figure 1. Energy Center, the target building. Photo source: https://mattioda.it/en/cantieri/energy- center-torino-to/ (accessed on 1 June 2022). center-torino-to/ (accessed on 1 June 2022). Buildings 2022, 12, x FOR PEER REVIEW 5 of 27 Buildings 2022, 12, 933 5 of 26 Figure 2. Figure E 2. nergy Center layout. Energy Center layout. The layout is The layout shared is shar byed all t by he consi all thedconsider ered floors. Green ed floors. bo Gr xes ind een boxes i- cate that the room set-point has been reached, red indicates a thermal discomfort situation with indicate that the room set-point has been reached, red indicates a thermal discomfort situation with respect to the room set-point. respect to the room set-point. 2.2. The Dataset 2.2. The Dataset As stated above, the dataset covers a period longer than a year, but, since an operation As stated above, the dataset covers a period longer than a year, but, since an opera- of data integration was necessary, the final dataset made by joining the various data sources tion of data integration was necessary, the final dataset made by joining the various data turns out to be around 31,000 records long, including around 11 months of measurements. sources turns out to be around 31,000 records long, including around 11 months of meas- Following other data cleaning steps, like removal of the unnecessary duplicates (a negligible urements. Following other data cleaning steps, like removal of the unnecessary duplicates percentage of total) and missing values (2.7% of total), which originated from anomalies (a negligible percentage of total) and missing values (2.7% of total), which originated from attributable to sensor malfunctions, the number of records slightly decreases. anomalies attributable to sensor malfunctions, the number of records slightly decreases. Outlier detection was achieved by setting ranges of validity for some features. For Outlier detection was achieved by setting ranges of validity for some features. For example, records associated with an external temperature much below 0 C or much above example, records associated with an external temperature much below 0 °C or much 30 C were considered noisy and then excluded because those values are not consistent above 30 °C were considered noisy and then excluded because those values are not con- with the climatic zone trends. A similar process was applied taking into consideration sistent with the climatic zone trends. A similar process was applied taking into consider- other features (i.e., temperatures and humidity recorded inside the heating system) and ation other features (i.e., temperatures and humidity recorded inside the heating system) unrealistic records have been deleted from the dataset. The filtering operation was not and unrealistic records have been deleted from the dataset. The filtering operation was intended to be restrictive, to not lose information from data. not intended to be restrictive, to not lose information from data. The dataset was also reduced in the number of its features, trying to keep only the The dataset was also reduced in the number of its features, trying to keep only the variables that impact the target variable (i.e., indoor temperature). Even if a lot of fea- variables that impact the target variable (i.e., indoor temperature). Even if a lot of features tures resulted to be linked to each other by a strong correlation, as shown in Figure 3, the resulted to be linked to each other by a strong correlation, as shown in Figure 3, the cor- correlation was not used as a driver in the choice of relevant features. The features were relation was not used as a driver in the choice of relevant features. The features were orig- originally 63 and were selected through the expert judgement method. With the exception inally 63 and were selected through the expert judgement method. With the exception of of the outside temperature, the selected characteristics concern the air-conditioning sys- the outside temperature, the selected characteristics concern the air-conditioning system tem related to the radiant ceiling panels located in the offices and the air-handling units related to the radiant ceiling panels located in the offices and the air-handling units con- connected to them; therefore, many of the original characteristics concerning the solar nected to them; therefore, many of the original characteristics concerning the solar system system or other parts of the air-conditioning system were discarded. Even if other variables or other parts of the air-conditioning system were discarded. Even if other variables (i.e., (i.e., solar radiation) may have an impact on predicted variables, we chose not to further solar radiation) may have an impact on predicted variables, we chose not to further collect collect them, to enhance the model capability to provide accurate predictions using as them, to enhance the model capability to provide accurate predictions using as less infor- less information as possible. Moreover, Attoue et al. [21] illustrated that the neglect of mation as possible. Moreover, Attoue et al. [21] illustrated that the neglect of some exter- some external variables (i.e., solar radiation, humidity and even the historical outdoor nal variables (i.e., solar radiation, humidity and even the historical outdoor temperature) temperature) did not significantly deteriorate the performance of their ANN model, as the did not significantly deteriorate the performance of their ANN model, as the MSE in- MSE increased from 0.0277 to 0.0365 while R decreased from 0.9967 to 0.9959. However, creased from 0.0277 to 0.0365 while R decreased from 0.9967 to 0.9959. However, they Buildings 2022, 12, 933 6 of 26 they reported that among cited external features, the outdoor temperature had the highest importance (i.e., importance factor of 42%). A similar finding was confirmed by Fang et al. [24] whose correlation analysis outlined the future outdoor temperature as the most important exogenous variable, so we decided to keep it as an input. The main criterion adopted was selecting among available features only the ones that were related to the heating system which involved the target offices. Hence, these were considered valuable as input features variables associated with air-handling units and cold and hot collectors belonging to ceiling conditioning panels. In the end, it results in 49 features, which include outdoor temperature, indoor temperature for each office, set-point temperature for each office, ceiling panel supply temperature, supply and return temperatures of cold and warm Buildings 2022, 12, x FOR PEER REVIEW 7 of 27 collectors, supply and return air temperature for each floor, overall supply air temperature for the whole building area, supply and return a degree of humidity for each floor. Figure 3. Correlation matrix between available features. Figure 3. Correlation matrix between available features. In addition, another feature was created (i.e., the hour of the day), resulting in 50 final The data pre-processing steps are summarised in Figure 4. features listed in Table 1. In fact, in several studies, such as that by Soleimani-Mohseni et al. [17], it is shown that the hour of the day affects the air ’s indoor and operative temperature in a non-linear way and its use as an input feature improves significantly the estimations. Figure 4. Adopted data pre-processing scheme. 2.3. Possible Approaches Broadly speaking, MISO and MISO terms refer to systems provided with multiple outputs and inputs. Similarly, a model can be provided with multiple variables as inputs, while resulting in only an output, otherwise in multiple ones. If the MISO approach is applied to the case study under consideration, the model will process all the available input variables and will provide a single output, which can be identified as the internal temperature of a single zone (i.e., a single room). Otherwise, a MIMO model can provide Buildings 2022, 12, x FOR PEER REVIEW 7 of 27 Buildings 2022, 12, 933 7 of 26 Table 1. Recap of the selected feature. Note that setpoint temperatures and indoor temperatures can be found five times per floor because they are repeated for each office on each floor. Note also that AHU temperatures and humidity degrees are repeated for each floor. Description Unit of Measurement Ceiling conditioning panel supply temperature C Return temperature of cold collector supplying ceiling conditioning panels C Supply temperature of cold collector supplying ceiling conditioning panels C AHU supply temperature for the whole considered building area C Return temperature of hot collector supplying ceiling conditioning panels C Supply temperature of hot collector supplying ceiling conditioning panels C Target floor AHU supply humidity degree Int Target floor AHU return humidity degree Int Target floor AHU supply temperature C Target floor AHU return temperature C Outdoor temperature C Target office setpoint temperature C Target office indoor temperature C Hour Figure 3. of the Correlation matrix b day etween available features. Int The data pre-processing steps are summarised in Figure 4. The data pre-processing steps are summarised in Figure 4. Figure 4. Adopted data pre-processing scheme. Figure 4. Adopted data pre-processing scheme. 2.3. Possible Approaches 2.3. Possible Approaches Broadly speaking, MISO and MISO terms refer to systems provided with multiple outputs Broad and lyinputs. speaking, MI Similarly SO , a and MISO model can ter bem pr s re ovided fer towith system multiple s provvariables ided withas multipl inputs, e while outpur ts esul and ting inputs in only . Simil an arly, output, a model c otherwise an be provide in multiple d with mu ones. If ltip the le var MISO iables appr as inpu oach ts, is applied to the case study under consideration, the model will process all the available while resulting in only an output, otherwise in multiple ones. If the MISO approach is input variables and will provide a single output, which can be identified as the internal applied to the case study under consideration, the model will process all the available temperature of a single zone (i.e., a single room). Otherwise, a MIMO model can provide input variables and will provide a single output, which can be identified as the internal predictions even the indoor temperatures related to each room on each building floor, but temperature of a single zone (i.e., a single room). Otherwise, a MIMO model can provide it will have to deal with major complexity. In this case study, the building was broken down into three zones, each one represented by a single floor, to handle the complexity due to the need to predict separately the internal temperature of each office. As a result, the maximum number of outputs provided by Buildings 2022, 12, x FOR PEER REVIEW 8 of 27 predictions even the indoor temperatures related to each room on each building floor, but it will have to deal with major complexity. In this case study, the building was broken down into three zones, each one repre- Buildings 2022, 12, 933 8 of 26 sented by a single floor, to handle the complexity due to the need to predict separately the internal temperature of each office. As a result, the maximum number of outputs provided by MIMO models developed in this case study will be five (i.e., the number of offices for MIMO models developed in this case study will be five (i.e., the number of offices for each floor). each floor). 2.4. The Model 2.4. The Model The indoor temperature prediction was achieved through a black-box model, more The indoor temperature prediction was achieved through a black-box model, more specifically, an LSTM neural network. According to several studies, such as by Huang et specifically, an LSTM neural network. According to several studies, such as by Huang al. [23], LSTM is likely to outperform other machine learning methods in terms of predict- et al. [23], LSTM is likely to outperform other machine learning methods in terms of ing a variable variation trend. They proved to be particularly suitable for time series pre- predicting a variable variation trend. They proved to be particularly suitable for time diction thanks to their ability to process the entire data sequences and not only single data series prediction thanks to their ability to process the entire data sequences and not only points. The network is made of three separate layers; the activation function chosen for single data points. The network is made of three separate layers; the activation function the input layer and the hidden layer is ReLU, thanks to its versatility, while the output chosen for the input layer and the hidden layer is ReLU, thanks to its versatility, while the layer is associated with a linear activation function. Moreover, the output layer contains output layer is associated with a linear activation function. Moreover, the output layer several neurons equal to the number of the features that have to be predicted (i.e., one contains several neurons equal to the number of the features that have to be predicted (i.e., temperature for one office in the MISO approach and five temperatures, associated with one temperature for one office in the MISO approach and five temperatures, associated each office on the whole floor in the MIMO approach). The batch size is set to 64. A sim- with each office on the whole floor in the MIMO approach). The batch size is set to 64. plified representation of the network architecture is reported below in Figure 5. A simplified representation of the network architecture is reported below in Figure 5. Figure 5. Artificial Neural Network architecture simplified scheme. Figure 5. Artificial Neural Network architecture simplified scheme. Neural networks were chosen over linear models thanks to their capability to manage Neural networks were chosen over linear models thanks to their capability to manage heat transfer dynamics through buildings that are typically not linear phenomena. As heat transfer dynamics through buildings that are typically not linear phenomena. As shown in Figure 6, the error using a linear predictor is much higher, with the same training shown in Figure 6, the error using a linear predictor is much higher, with the same training dataset size and input features listed in Table 1. dataset size and input features listed in Table 1. The linear regression was further studied in terms of time-lagging the external tem- perature against the internal temperature. Due to the thermal inertia of building materials, some input variables (e.g., outdoor temperature) may not have an immediate effect on in- door temperature; otherwise, their impact may last and involve subsequent measurements. Consequently, the correlation may be more pronounced between the previously measured outdoor temperature rather than the simultaneous correlation with the indoor temperature. This lag effect has previously been defined as a non-linear phenomenon that may not be captured by traditional linear regression. The lag due to thermal inertia was roughly estimated according to ENI ISO 13786, depending on the main component of the wall (e.g., concrete), in a range between 0.5 and several hours, also depending on the insulation, plaster and wall thickness; this means that, as each measurement is approximately 15 min away from the previous one, the external temperatures must be shifted relative to the other input characteristics by several times between 3 and 10 or more. The area of the dataset that includes the outdoor temperature was shifted forward 3, 10, 20, and 30 times to assess Buildings 2022, 12, x FOR PEER REVIEW 9 of 27 Buildings 2022, 12, 933 9 of 26 Figure 6. Comparison or RMSE achieved using linear regressor or LSTM neural networks by the office. The error is computed on the validation set only, for a 2 h time horizon. whether a delayed impact on indoor temperature occurs and when it is most likely to occur. As illustrated in the figure below (Figure 7), a local minimum is reached by the Buildings 2022, 12, x FOR PEER REVIEW The linear regression was further studied in terms of time-lagging the external tem- 9 of 27 RMSE between 3 and 10 shifts, but the results provided, although slightly better than with perature against the internal temperature. Due to the thermal inertia of building materials, traditional linear regression, are still not comparable to those obtained with the LSTM. some input variables (e.g., outdoor temperature) may not have an immediate effect on indoor temperature; otherwise, their impact may last and involve subsequent measure- ments. Consequently, the correlation may be more pronounced between the previously measured outdoor temperature rather than the simultaneous correlation with the indoor temperature. This lag effect has previously been defined as a non-linear phenomenon that may not be captured by traditional linear regression. The lag due to thermal inertia was roughly estimated according to ENI ISO 13786, depending on the main component of the wall (e.g., concrete), in a range between 0.5 and several hours, also depending on the in- sulation, plaster and wall thickness; this means that, as each measurement is approxi- mately 15 min away from the previous one, the external temperatures must be shifted relative to the other input characteristics by several times between 3 and 10 or more. The area of the dataset that includes the outdoor temperature was shifted forward 3, 10, 20, and 30 times to assess whether a delayed impact on indoor temperature occurs and when it is most likely to occur. As illustrated in the figure below (Figure 7), a local minimum is reached by the RMSE between 3 and 10 shifts, but the results provided, although slightly better than with traditional linear regression, are still not comparable to those obtained Figure 6. Comparison or RMSE achieved using linear regressor or LSTM neural networks by the Figure 6. Comparison or RMSE achieved using linear regressor or LSTM neural networks by the with the LSTM. office. The error is computed on the validation set only, for a 2 h time horizon. office. The error is computed on the validation set only, for a 2 h time horizon. The linear regression was further studied in terms of time-lagging the external tem- perature against the internal temperature. Due to the thermal inertia of building materials, some input variables (e.g., outdoor temperature) may not have an immediate effect on indoor temperature; otherwise, their impact may last and involve subsequent measure- ments. Consequently, the correlation may be more pronounced between the previously measured outdoor temperature rather than the simultaneous correlation with the indoor temperature. This lag effect has previously been defined as a non-linear phenomenon that may not be captured by traditional linear regression. The lag due to thermal inertia was roughly estimated according to ENI ISO 13786, depending on the main component of the wall (e.g., concrete), in a range between 0.5 and several hours, also depending on the in- sulation, plaster and wall thickness; this means that, as each measurement is approxi- mately 15 min away from the previous one, the external temperatures must be shifted relative to the other input characteristics by several times between 3 and 10 or more. The area of the dataset that includes the outdoor temperature was shifted forward 3, 10, 20, Figure 7. Average and maximum RMSE trend concerning the number of neurons in each layer–1 Figure 7. Average and maximum RMSE trend concerning the number of neurons in each layer–1 layer. and 30 times to assess whether a delayed impact on indoor temperature occurs and when layer. it is most likely to occur. As illustrated in the figure below (Figure 7), a local minimum is The models were developed using the Keras library (https://keras.io (accessed on reached by the RMSE between 3 and 10 shifts, but the results provided, although slightly 1 June 2022)). Instead, the linear prediction was implemented thanks to scikit-learn library better than with traditional linear regression, are still not comparable to those obtained and statsmodels library, whose documentation is also reported (https://www.statsmodels. with the LSTM. org/dev/generated/statsmodels.regression.linear_model.OLS.html (accessed on 1 June 2022), https://scikit-learn.org/stable/index.html (accessed on 6 June 2022)). The models were tuned in terms of several performance-affecting parameters: number of neurons for input and hidden layers, number of layers, learning rate, loss functions, regularisation techniques (i.e., dropout probability), chosen optimiser, model structure (i.e., bidirectional or traditional). Performance is evaluated concerning the selected floor, time horizon length, and adopted approach (i.e., MISO or MIMO). Since every floor can be considered an independent zone, the peculiarity of this circum- stance raises an interesting question. The problem may be broken into more manageable sub-problems; hence every floor may be paired with three models, one for each proposed prediction time step (i.e., 2 h, 5 h, 24 h). Otherwise, the building may be treated as a whole and only three models, one for each proposed prediction time step (i.e., 2 h, 5 h, 24 h), trained on aggregated data. In the latter case, accuracy may take a backseat, while the Figure 7. Average and maximum RMSE trend concerning the number of neurons in each layer–1 layer. Buildings 2022, 12, 933 10 of 26 capability to predict as uniformly as possible future indoor temperatures across the whole building may hold more importance. Since exploiting the generalisation capability of neural networks is one of their most interesting features, in this case, the developed models trained on the data of the whole building as well as the models trained on the data of individual floors, assuming that the generalised model should only be considered if it manages the well-known trade-off between accuracy and versatility, showing acceptable results in terms of human perception of temperature. Models trained on single plane data were kept as benchmarks to evaluate the performance of other models. For these models, many tests were performed to find the best match for each plane, resulting in three slightly different model variants for each approach adopted (i.e., MISO and MIMO). This methodology allowed us to achieve better performance. During each test, the training phase lasts 100 epochs. 2.5. The Dataset Split Performances were evaluated with the RMSE and MAE metrics. They are two of the most commonly used metrics used to measure accuracy for continuous variables. MAE is the average over the test sample of the absolute differences between prediction and actual observation. Since the average is purely arithmetic, all individual differences have equal weight. RMSE rule also measures the average magnitude of the error and, just like MAE, expresses it in units of the variable of interest, is insensitive to errors direction and has to be minimised to achieve a good model performance. The main difference between the two performance metrics is that, since RMSE squares errors before they are averaged, it gives a high weight to large errors and it is a better indicator of undesirable large errors. RMSE would significantly increase in the case with the variance of the frequency distribution of error magnitudes. Since in this application field error peaks are better to be detected and penalised, RMSE was used to tune models and to identify the most suitable ones. The metrics definitions are described by the following equations. RMSE = (y y ) (1) å j j j=1 MAE = jy y ˆ j (2) å j j j=1 Performance metrics are calculated on both the validation set and the test set to provide an unbiased evaluation of the fitted model, previously trained on another part of the dataset. The high complexity of the building requires as much training data as possible, so the training set consists of the first 9 months’ forecasts from the first floor. The remaining data from the first floor are used to validate the model, tune, and set parameters. Importantly, the original sequence of measurements over time is maintained to test the ability of the models to handle forecasts for different periods of years. The models are therefore tested on data recorded on the second and third floors throughout the year. Splitting the chosen dataset allows us to test whether the model can identify sufficient patterns in the training data to handle each floor heat transfer dynamic and whether it can predict indoor temperatures at different times of the year for each of them. The adopted split rule is summarised in the table below Table 2. Buildings 2022, 12, 933 11 of 26 Table 2. Database split recap for generalised model. Dataset Percentage Records Training set Around 70% Around 23,000 (i.e., 9 months of observations from first floor) Validation set Around 30% Around 4000 (i.e., 2 months of observations from first floor) First Test Set 100% Around 23,000 (i.e., 11 months of observations from second floor) Second Test Set 100% Around 23,000 (i.e., 11 months of observations from third floor) Each plan dataset is divided into a training set, a validation set and a test set using the following rule of thumb Table 3. In this case, tuning will be aimed at increasing accuracy and at the same time avoiding the risk of overfitting, which is considerably high when developing a model only on single plan data. In this case, the tuning will be aimed to increase accuracy while at the same time avoiding the risk of overfitting, which is considerably high when developing a model on single floor data only. Table 3. Database split recap (one floor only) for models tailored on one floor. Dataset Percentage Records Training set Around 70% Around 23,000 (i.e., 8 months of observations) Validation set Around 15% Around 4000 (i.e., 1–5 months of observations) Test set Around 15% Around 4000 (i.e., 1–5 months of observations) 3. Results 3.1. Model Tuning The tuning of the models trained on data from all three floors of the building is detailed. The parameter space chosen for the grid search ranges from 32 up to 256 neurons for the first layer and the hidden layer, including some arbitrarily chosen intermediate values. Tuning was performed using a model that includes a single hidden layer, together with the input and output layers. In fact, as Huang et al. [23] also stated, an accurate ANN model does not necessarily have to be large, to the extent that oversized networks can lead to large prediction errors with high-frequency noise. Looking at the figures below (Figure 8), it becomes clear that the more complex is the model, the more it is likely to overfit instead of staying adaptable to differing datasets. The increase in the number of neurons in model layers worsens performances on unknown datasets, to the point that the 256 neurons model completely fails with the validation set. It follows that it is convenient to choose 128 as the best suitable number of neurons, as the error hits a local minimum in that area. The average RMSE in this instance results to be around 0.1, which was considered acceptable for two reasons: it is similar to several results achieved in literature studies that leverage comparable approaches or models. Moreover, this misprediction would go unnoticed by building occupants since the human body is not sensitive to change in terms of C decimal. The learning rate, a very significant parameter, is set to 0.00001. The parameter was decreased until the training loss and validation loss on the training epochs became stable, as shown in Figure 9. It is only below this threshold that the learning curves stop fluctuating and the detection of the minimum loss function is successful. Two kinds of loss functions were taken into consideration: MAE and MSE. As shown in Figure 10, the second one manages to reduce the average RMSE for the validation set. Among the optimisers tested, Adam systematically provides the best performance for shorter forecast horizons. However, this may no longer be true when it comes to longer time horizons because, unlike Adagrad and SGD, Adam’s performance deteriorates with longer periods, as shown in Figure 11. When it comes to the time parameter, it becomes immediately clear that it is one of the most performance-impacting variables. This is confirmed also by Attoue et al. [21] that reported the same pattern, obtaining for the prediction horizon of 4 h an R = 0.8370 and MSE = 1.23783 versus an R = 0.9109 and MSE = 0.89078 for the 2 h forecasting. Fang et al. [24], chose the Adam optimiser for Buildings 2022, 12, x FOR PEER REVIEW 12 of 27 Buildings 2022, 12, 933 12 of 26 their model because of its excellent performance in handling LSTM training dynamics and its rapid convergence speed, and tried to predict internal temperatures up to 7 days in advance, they observed a similar deterioration in prediction quality as time passed, especially after the first 48 h. Figure 11 shows that the Adam average RMSE continues to grow while enlarging the prediction time step so that a sort of turning point is reached and a change of optimiser is required to keep the average error around the reference value of 0.1 Celsius degrees. As mentioned before, in fact, Adagrad and especially SGD prove Buildings 2022, 12, x FOR PEER REVIEW 12 of 27 to better handle wider prediction time ranges. Therefore, for the longer forecast horizon, Adagrad is preferable. Figure 8. Average RMSE concerning shifts applied to outdoor temperature in predicting indoor temperature for validation set and 2 h prediction horizon. The learning rate, a very significant parameter, is set to 0.00001. The parameter was decreased until the training loss and validation loss on the training epochs became stable, as shown in Figure 9. It is only below this threshold that the learning curves stop fluctu- Figure 8. Average RMSE concerning shifts applied to outdoor temperature in predicting indoor ating and the Figure detec 8. tion Average of th RMSE e minim concerning um shifts loss f applied unctito on outdoor is succe temperatur ssful.e in predicting indoor temperature for validation set and 2 h prediction horizon. temperature for validation set and 2 h prediction horizon. The learning rate, a very significant parameter, is set to 0.00001. The parameter was decreased until the training loss and validation loss on the training epochs became stable, as shown in Figure 9. It is only below this threshold that the learning curves stop fluctu- ating and the detection of the minimum loss function is successful. Figure 9. Loss function over training epochs. Figure 9. Loss function over training epochs. Figure 9. Loss function over training epochs. Two kinds of loss functions were taken into consideration: MAE and MSE. As shown Two kinds of loss functions were taken into consideration: MAE and MSE. As shown in Figure 10, the second one manages to reduce the average RMSE for the validation set. in Figure 10, the second one manages to reduce the average RMSE for the validation set. Buildings 2022, 12, x FOR PEER REVIEW 13 of 27 Buildings 2022, 12, x FOR PEER REVIEW 13 of 27 Figure 10. Average RMSE concerning loss function for the validation set on 2 h prediction horizon Buildings 2022, 12, 933 13 of 26 and 128 neurons per layer. Among the optimisers tested, Adam systematically provides the best performance for shorter forecast horizons. However, this may no longer be true when it comes to longer time horizons because, unlike Adagrad and SGD, Adam’s performance deteriorates with longer periods, as shown in Figure 11. When it comes to the time parameter, it becomes immediately clear that it is one of the most performance-impacting variables. This is con- firmed also by Attoue et al. [21] that reported the same pattern, obtaining for the predic- tion horizon of 4 h an R = 0.8370 and MSE = 1.23783 versus an R = 0.9109 and MSE = 0.89078 for the 2 h forecasting. Fang et al. [24], chose the Adam optimiser for their model because of its excellent performance in handling LSTM training dynamics and its rapid conver- gence speed, and tried to predict internal temperatures up to 7 days in advance, they ob- served a similar deterioration in prediction quality as time passed, especially after the first 48 h. Figure 11 shows that the Adam average RMSE continues to grow while enlarging the prediction time step so that a sort of turning point is reached and a change of optimiser is required to keep the average error around the reference value of 0.1 Celsius degrees. As mentioned before, in fact, Adagrad and especially SGD prove to better handle wider pre- Figure 10. Average RMSE concerning loss function for the validation set on 2 h prediction horizon Figure 10. Average RMSE concerning loss function for the validation set on 2 h prediction horizon diction time ranges. Therefore, for the longer forecast horizon, Adagrad is preferable. and 128 neurons per layer. and 128 neurons per layer. Among the optimisers tested, Adam systematically provides the best performance for shorter forecast horizons. However, this may no longer be true when it comes to longer time horizons because, unlike Adagrad and SGD, Adam’s performance deteriorates with longer periods, as shown in Figure 11. When it comes to the time parameter, it becomes immediately clear that it is one of the most performance-impacting variables. This is con- firmed also by Attoue et al. [21] that reported the same pattern, obtaining for the predic- tion horizon of 4 h an R = 0.8370 and MSE = 1.23783 versus an R = 0.9109 and MSE = 0.89078 for the 2 h forecasting. Fang et al. [24], chose the Adam optimiser for their model because of its excellent performance in handling LSTM training dynamics and its rapid conver- gence speed, and tried to predict internal temperatures up to 7 days in advance, they ob- served a similar deterioration in prediction quality as time passed, especially after the first 48 h. Figure 11 shows that the Adam average RMSE continues to grow while enlarging the prediction time step so that a sort of turning point is reached and a change of optimiser is required to keep the average error around the reference value of 0.1 Celsius degrees. As Figure 11. Average RMSE trend for bidirectional structure horizon prediction by the optimiser for Figure 11. Average RMSE trend for bidirectional structure horizon prediction by the optimiser for mentioned before, in fact, Adagrad and especially SGD prove to better handle wider pre- the validation set. the validation set. diction time ranges. Therefore, for the longer forecast horizon, Adagrad is preferable. Buildings 2022, 12, x FOR PEER REVIEW 14 of 27 The bidirectional model structure was tested along with the traditional one, both The bidirectional model structure was tested along with the traditional one, both paired with MSE function loss that resulted in the best one in the tuning so far. As paired with MSE function loss that resulted in the best one in the tuning so far. As shown shown in Figure 12, bidirectional structure performance is comparable with traditional in Figure 12, bidirectional structure performance is comparable with traditional structure structure ones, but it seems to be less affected by prediction horizon length. On the other ones, but it seems to be less affected by prediction horizon length. On the other hand, the hand, the bidirectional structure turns out to be less effective for the shortest prediction bidirectional structure turns out to be less effective for the shortest prediction horizon horizon consider consider ed. ed. Figure 11. Average RMSE trend for bidirectional structure horizon prediction by the optimiser for the validation set. The bidirectional model structure was tested along with the traditional one, both paired with MSE function loss that resulted in the best one in the tuning so far. As shown Figure 12. Average RMSE trend concerning prediction horizon by model structure for the validation set. Figure 12. Average RMSE trend concerning prediction horizon by model structure for the validation set. As mentioned in Section Materials and Methods, many input features are correlated with the predicted variable. The temperature of the return air from inside the building is the most correlated variable. An additional test was carried out on the model to explore if it can predict the return air temperature as input. Figure 13 confirms that the considered feature plays a significant role in the prediction since while it is missing the model perfor- mance slightly worsens, but that it is not essential, as errors are still under the acceptability threshold –0.15 °C. Figure 13. Average RMSE concerning the presence of the most correlated feature with the predicted variable calculated on 2 h prediction horizon for the validation set. 3.2. Test The models defined for each time horizon were tested on second- and third-floor data over all the available periods. The outcomes are reported in Figure 14. Buildings 2022, 12, x FOR PEER REVIEW 14 of 27 in Figure 12, bidirectional structure performance is comparable with traditional structure ones, but it seems to be less affected by prediction horizon length. On the other hand, the bidirectional structure turns out to be less effective for the shortest prediction horizon considered. Figure 12. Average RMSE trend concerning prediction horizon by model structure for the validation Buildings 2022, 12, 933 14 of 26 set. As mentioned in Section Materials and Methods, many input features are correlated As mentioned in Section Materials and Methods, many input features are correlated with the predicted variable. The temperature of the return air from inside the building is with the predicted variable. The temperature of the return air from inside the building is the the most correlated variable. An additional test was carried out on the model to explore if most correlated variable. An additional test was carried out on the model to explore if it can it can predict the return air temperature as input. Figure 13 confirms that the considered predict the return air temperature as input. Figure 13 confirms that the considered feature feature plays a significant role in the prediction since while it is missing the model perfor- plays a significant role in the prediction since while it is missing the model performance mance slightly worsens, but that it is not essential, as errors are still under the acceptability slightly worsens, but that it is not essential, as errors are still under the acceptability threshold –0.15 °C. threshold –0.15 C. Figure 13. Average RMSE concerning the presence of the most correlated feature with the predicted Figure 13. Average RMSE concerning the presence of the most correlated feature with the predicted variable calculated on 2 h prediction horizon for the validation set. variable calculated on 2 h prediction horizon for the validation set. 3.2. Test 3.2. Test Buildings 2022, 12, x FOR PEER REVIEW 15 of 27 The models defined for each time horizon were tested on second- and third-floor data The models defined for each time horizon were tested on second- and third-floor data over all the available periods. The outcomes are reported in Figure 14. over all the available periods. The outcomes are reported in Figure 14. Figure 14. Average RMSE concerning time horizon by floor. Figure 14. Average RMSE concerning time horizon by floor. Although the temperatures of the third floor may be more unpredictable, probably due Although the temperatures of the third floor may be more unpredictable, probably to its peculiarities, for example, the roof being made of other materials than the remaining due to its peculiarities, for example, the roof being made of other materials than the re- parts of the building, the performance seems to be homogeneous between the floors. With maining parts of the building, the performance seems to be homogeneous between the the optimiser adjusted for a 24 h forecast horizon, homogeneous performance can be floors. With the optimiser adjusted for a 24 h forecast horizon, homogeneous performance achieved. This is verified by the average RMSE of each floor, which is around the target of can be achieved. This is verified by the average RMSE of each floor, which is around the 0.1 degrees Celsius. The tests were repeated by changing the type of approach. The MISO target of 0.1 degrees Celsius. The tests were repeated by changing the type of approach. approach makes it possible to predict the internal temperature of office R40 alone on all The MISO approach makes it possible to predict the internal temperature of office R40 three floors. Comparing the MISO result with the R40 office temperatures provided by the alone on all three floors. Comparing the MISO result with the R40 office temperatures MIMO model for the validation and test sets, as shown in Figure 15, it can be observed that provided by the MIMO model for the validation and test sets, as shown in Figure 15, it the MISO approach is not necessarily more accurate: actually, it provides less precise results can be observed that the MISO approach is not necessarily more accurate: actually, it pro- vides less precise results for two of the three available floors. Similar evidence was re- ported by Huang et al. [23] who concluded that the multi-zone approach was able to pro- vide predictions closer to the actual values. Figure 15. Average RMSE concerning approach calculated for the validation set on 2 h prediction horizon. The single-office predicted temperatures using chosen models for each time horizon are summarised in the table below (Table 4). Buildings 2022, 12, x FOR PEER REVIEW 15 of 27 Figure 14. Average RMSE concerning time horizon by floor. Although the temperatures of the third floor may be more unpredictable, probably due to its peculiarities, for example, the roof being made of other materials than the re- maining parts of the building, the performance seems to be homogeneous between the floors. With the optimiser adjusted for a 24 h forecast horizon, homogeneous performance can be achieved. This is verified by the average RMSE of each floor, which is around the target of 0.1 degrees Celsius. The tests were repeated by changing the type of approach. The MISO approach makes it possible to predict the internal temperature of office R40 Buildings 2022, 12, 933 15 of 26 alone on all three floors. Comparing the MISO result with the R40 office temperatures provided by the MIMO model for the validation and test sets, as shown in Figure 15, it can be observed that the MISO approach is not necessarily more accurate: actually, it pro- for vides two leof ss p the recise three res available ults for two floors. of th Similar e threevidence e available floor was reported s. Similar ev by Huang idence was r et al. [23e]- who ported b concluded y Huang e thatt a the l. [multi-zone 23] who conclud approach ed th was at the m ableu to ltipr -zone ovide ap pr pr edictions oach was ab closer le to p to the ro- actual vide pred values. ictions closer to the actual values. Figure 15. Average RMSE concerning approach calculated for the validation set on 2 h prediction horizon. Figure 15. Average RMSE concerning approach calculated for the validation set on 2 h prediction horizon. The single-office predicted temperatures using chosen models for each time horizon are summarised in the table below (Table 4). The single-office predicted temperatures using chosen models for each time horizon are summarised in the table below (Table 4). Table 4. RMSE for each office and time horizon using a generalised model. Office and Prediction Horizon 2 h 5 h 24 h P1-R40 0.0879 0.0878 0.0771 P1-R38 0.1070 0.0942 0.0945 P1-R39 0.1220 0.1086 0.1011 P1-R42 0.1182 0.1108 0.1120 P1-R45 0.1248 0.1071 0.1177 P2-R40 0.0926 0.0920 0.0900 P2-R38 0.0875 0.0801 0.0836 P2-R39 0.0902 0.0817 0.0914 P2-R42 0.0846 0.0717 0.0721 P2-R45 0.0945 0.0886 0.0807 P3-R40 0.1315 0.1291 0.1245 P3-R38 0.0768 0.0789 0.0806 P3-R39 0.1594 0.1571 0.1650 P3-R42 0.0785 0.0689 0.0726 P3-R45 0.0892 0.0836 0.0751 Predictions for office R-40 over the three storeys and the three prediction horizons are plotted in comparison with actual values in the figures below (Figures 16–23). Buildings 2022, 12, x FOR PEER REVIEW 16 of 27 Table 4. RMSE for each office and time horizon using a generalised model. Office and Prediction Horizon 2 h 5 h 24 h P1-R40 0.0879 0.0878 0.0771 P1-R38 0.1070 0.0942 0.0945 P1-R39 0.1220 0.1086 0.1011 P1-R42 0.1182 0.1108 0.1120 P1-R45 0.1248 0.1071 0.1177 P2-R40 0.0926 0.0920 0.0900 P2-R38 0.0875 0.0801 0.0836 P2-R39 0.0902 0.0817 0.0914 P2-R42 0.0846 0.0717 0.0721 P2-R45 0.0945 0.0886 0.0807 P3-R40 0.1315 0.1291 0.1245 P3-R38 0.0768 0.0789 0.0806 P3-R39 0.1594 0.1571 0.1650 P3-R42 0.0785 0.0689 0.0726 P3-R45 0.0892 0.0836 0.0751 Buildings 2022, 12, 933 16 of 26 Predictions for office R-40 over the three storeys and the three prediction horizons are plotted in comparison with actual values in the figures below (Figures 16–23). Buildings 2022, 12, x FOR PEER REVIEW 17 of 27 Figure 16. Plot of actual and predicted temperatures 2 h ahead for office 40 on the first floor. Figure 16. Plot of actual and predicted temperatures 2 h ahead for office 40 on the first floor. Figure 17. Plot of actual and predicted temperatures 2 h ahead for office 40 on the second floor. Figure 17. Plot of actual and predicted temperatures 2 h ahead for office 40 on the second floor. Figure 18. Plot of actual and predicted temperatures 2 h ahead for office 40 on the third floor. Buildings 2022, 12, x FOR PEER REVIEW 17 of 27 Buildings 2022, 12, 933 17 of 26 Figure 17. Plot of actual and predicted temperatures 2 h ahead for office 40 on the second floor. Buildings 2022, 12, x FOR PEER REVIEW 18 of 27 Figure 18. Plot of actual and predicted temperatures 2 h ahead for office 40 on the third floor. Figure 18. Plot of actual and predicted temperatures 2 h ahead for office 40 on the third floor. Figure 19. Plot of actual and predicted temperatures 5 h ahead for office 40 on the first floor. Figure 19. Plot of actual and predicted temperatures 5 h ahead for office 40 on the first floor. Figure 20. Plot of actual and predicted temperatures 5 h ahead for office 40 on the third floor. Buildings 2022, 12, x FOR PEER REVIEW 18 of 27 Buildings 2022, 12, 933 18 of 26 Figure 19. Plot of actual and predicted temperatures 5 h ahead for office 40 on the first floor. Buildings 2022, 12, x FOR PEER REVIEW 19 of 27 Figure 20. Plot of actual and predicted temperatures 5 h ahead for office 40 on the third floor. Figure 20. Plot of actual and predicted temperatures 5 h ahead for office 40 on the third floor. Figure 21. Plot of actual and predicted temperatures 24 h ahead for office 40 on the first floor. Figure 21. Plot of actual and predicted temperatures 24 h ahead for office 40 on the first floor. Figure 22. Plot of actual and predicted temperatures 24 h ahead for office 40 on the second floor. Buildings 2022, 12, x FOR PEER REVIEW 19 of 27 Buildings 2022, 12, 933 19 of 26 Figure 21. Plot of actual and predicted temperatures 24 h ahead for office 40 on the first floor. Buildings 2022, 12, x FOR PEER REVIEW 20 of 27 Figure 22. Plot of actual and predicted temperatures 24 h ahead for office 40 on the second floor. Figure 22. Plot of actual and predicted temperatures 24 h ahead for office 40 on the second floor. Figure 23. Plot of actual and predicted temperatures 24 h ahead for office 40 on the third floor. Figure 23. Plot of actual and predicted temperatures 24 h ahead for office 40 on the third floor. 3.3. Tailored Models 3.3. Tailored Models The plans w The plans wer ere consid e consider ered ed separ separately ately to to explore wh explore what at the min the minimum imum achiev achievable able er err ror or iis s a and nd whether whetherattempts attemptsat at generalisation generalisation justify justifthe y th impr e im ecision precisiof on of the t dif he fer dence. ifferenc The e. fine- The tuning, in this case, was performed considering a validation set on all planes. The number fine-tuning, in this case, was performed considering a validation set on all planes. The of neurons in the input layer and the hidden layer was set to 256, due to the performance number of neurons in the input layer and the hidden layer was set to 256, due to the per- improvement obtained by increasing the complexity of the model, as shown in the following formance improvement obtained by increasing the complexity of the model, as shown in figure (Figure 24). However, the higher the number of neurons, the longer the calculation the following figure (Figure 24). However, the higher the number of neurons, the longer time, so it is convenient to stop at the number 256, where the RMSE no longer decreases the calculation time, so it is convenient to stop at the number 256, where the RMSE no linearly, so any further increase in model complexity would not provide a proportional longer decreases linearly, so any further increase in model complexity would not provide benefit in terms of accuracy. In this way, we can achieve the highest possible accuracy a proportional benefit in terms of accuracy. In this way, we can achieve the highest possi- without risking overfitting and without significantly increasing the calculation time. ble accuracy without risking overfitting and without significantly increasing the calcula- tion time. Figure 24. Average RMSE trend concerning the number of neurons in each layer for the validation set on 2 h prediction horizon. The learning rate is a significant parameter and is set at 0.00001. It is only below this threshold that the learning curves stop fluctuating and the detection of the minimum of the loss function is successful, as indicated in the previous subsection. Abandonment Buildings 2022, 12, x FOR PEER REVIEW 20 of 27 Figure 23. Plot of actual and predicted temperatures 24 h ahead for office 40 on the third floor. 3.3. Tailored Models The plans were considered separately to explore what the minimum achievable error is and whether attempts at generalisation justify the imprecision of the difference. The fine-tuning, in this case, was performed considering a validation set on all planes. The number of neurons in the input layer and the hidden layer was set to 256, due to the per- formance improvement obtained by increasing the complexity of the model, as shown in the following figure (Figure 24). However, the higher the number of neurons, the longer the calculation time, so it is convenient to stop at the number 256, where the RMSE no longer decreases linearly, so any further increase in model complexity would not provide a proportional benefit in terms of accuracy. In this way, we can achieve the highest possi- Buildings 2022, 12, 933 ble accuracy without risking overfitting and without significantly increasing the calcu 20 of la- 26 tion time. Figure 24. Average RMSE trend concerning the number of neurons in each layer for the validation Figure 24. Average RMSE trend concerning the number of neurons in each layer for the validation set on 2 h prediction horizon. Buildings 2022, 12, x FOR PEER REVIEW 21 of 27 set on 2 h prediction horizon. Buildings 2022, 12, x FOR PEER REVIEW 21 of 27 The le The learning arning rat rate e isis a s aigni significant ficant paparameter rameter anand d is set is set at 0.000 at 0.00001. 01. It is only bel It is only ow below this thresho this thrleshold d that the thatle the arnin learning g curvcurves es stopstop fluctu fluctuating ating and the and de thetec detection tion of the of m the ini minimum mum of regularisation is not exploited here, because each tested abandonment rate causes the of the loss function is successful, as indicated in the previous subsection. Abandonment the loss function is successful, as indicated in the previous subsection. Abandonment model to fail to predict correctly and gradually increases the loss since the critical thresh- regularisation is not exploited here, because each tested abandonment rate causes the regularisation is not exploited here, because each tested abandonment rate causes the old is exceeded in each case (Figure 25). model to fail to predict correctly and gradually increases the loss since the critical thresh- model to fail to predict correctly and gradually increases the loss since the critical threshold old is exceeded in each case (Figure 25). is exceeded in each case (Figure 25). Figure 25. Average RMSE trend concerning dropout probability for the validation set on 2 h predic- tion horizon. Figure 25. Average RMSE trend concerning dropout probability for the validation set on 2 h predic- Figure 25. Average RMSE trend concerning dropout probability for the validation set on 2 h predic- tion horizon. tion horizon. The bi-directional LSTM structure is preferred over the traditional one for the second and third floors because it offers a slight performance improvement. In addition, the bidi- The bi-directional LSTM structure is preferred over the traditional one for the second The bi-directional LSTM structure is preferred over the traditional one for the second and rect thir iona dl s floors tructur because e benefit itsof from fers a a sho slight rter performance computation t impr ime, ovement. about 2/3 compared t In addition, o the the and third floors because it offers a slight performance improvement. In addition, the bidi- bidir trad ectional itional o strnuctur e. How e benefits ever, afr s men om atshorter ioned in computation the previous time, suabout bsection, 2/3 the compar bi-di ed rect to ithe onal rectional structure benefits from a shorter computation time, about 2/3 compared to the traditional structure is more one. However sensitiv , as e mentioned to the enlar in gement the previous of the time horizo subsection, the n, making bi-directional it convenient struc- traditional one. However, as mentioned in the previous subsection, the bi-directional tur to e swit is mor ch t e sensitive o the trad to itithe onaenlar l stru gement cture foof r tthe he la time rger horizon, time interv making al con it s convenient idered (i.e., 24 to switch h, Fig- structure is more sensitive to the enlargement of the time horizon, making it convenient to the traditional structure for the larger time interval considered (i.e., 24 h, Figure 26). ure 26). to switch to the traditional structure for the larger time interval considered (i.e., 24 h, Fig- ure 26). Figure 26. Average RMSE trend concerning time horizon by structure for the validation set. Figure 26. Average RMSE trend concerning time horizon by structure for the validation set. Figure 26. Average RMSE trend concerning time horizon by structure for the validation set. By contrast, there is no such clear trend in the loss function. Overall, performance is comparable (Figure 27). By contrast, there is no such clear trend in the loss function. Overall, performance is comparable (Figure 27). Figure 27. Average RMSE concerning loss function by floor for the validation set on 2 h prediction horizon. Figure 27. Average RMSE concerning loss function by floor for the validation set on 2 h prediction horizon. Buildings 2022, 12, x FOR PEER REVIEW 21 of 27 regularisation is not exploited here, because each tested abandonment rate causes the model to fail to predict correctly and gradually increases the loss since the critical thresh- old is exceeded in each case (Figure 25). Figure 25. Average RMSE trend concerning dropout probability for the validation set on 2 h predic- tion horizon. The bi-directional LSTM structure is preferred over the traditional one for the second and third floors because it offers a slight performance improvement. In addition, the bidi- rectional structure benefits from a shorter computation time, about 2/3 compared to the traditional one. However, as mentioned in the previous subsection, the bi-directional structure is more sensitive to the enlargement of the time horizon, making it convenient to switch to the traditional structure for the larger time interval considered (i.e., 24 h, Fig- ure 26). Buildings 2022, 12, 933 21 of 26 Figure 26. Average RMSE trend concerning time horizon by structure for the validation set. By contrast, there is no such clear trend in the loss function. Overall, performance is By contrast, there is no such clear trend in the loss function. Overall, performance is comparable (Figure 27). comparable (Figure 27). Buildings 2022, 12, x FOR PEER REVIEW 22 of 27 Figure 27. Average RMSE concerning loss function by floor for the validation set on 2 h prediction Figure 27. Average RMSE concerning loss function by floor for the validation set on 2 h predic- horizon. tion horizon. Similar to the previous observation, considering that the prediction performance of Similar to the previous observation, considering that the prediction performance of the the Adam optimiser deteriorates with the length of the prediction horizon (Figure 28). Adam optimiser deteriorates with the length of the prediction horizon (Figure 28). However, unlike However, un the generalised like the g model, eneralise Adam d mode continues l, Adam to con outperform tinues to ou the tpother erform optimisers, the other op butti- by mi br sers, b oadening ut bythe broa for deni ecast ng horizon the foreca we stmay horiz be on we may be faced with a fa tipping ced with a ti point ppi after ng p which oint aft it is er convenient which it is to cochange nvenient optimisers, to change as opt was imisers, the case as wwith as the c the ase development with the deve oflthe opm pr ent of evious the generalised model. previous generalised model. Figure 28. Average RMSE trend concerning prediction horizon by the optimiser for the validation Figure 28. Average RMSE trend concerning prediction horizon by the optimiser for the validation set. set. The alternative approach attempted (MISO) appears to systematically present more The alternative approach attempted (MISO) appears to systematically present more accurate predictions, but on the other hand, is not as comprehensive as MIMO. It is evident accurate predictions, but on the other hand, is not as comprehensive as MIMO. It is evident that these models, due to their limited capacity for generalisation, perform slightly better that these models, due to their limited capacity for generalisation, perform slightly better when applying the MISO approach, probably due to its lower complexity (Figure 29). when applying the MISO approach, probably due to its lower complexity (Figure 29). While the relative position of each office does not seem to influence the corresponding forecasts, the errors are significantly higher for the second and third floors than for the first, in agreement with the results reported in the previous subsection (Figure 30). Figure 29. Average RMSE WRT approach for validation set and 2 h prediction horizon. While the relative position of each office does not seem to influence the correspond- ing forecasts, the errors are significantly higher for the second and third floors than for the first, in agreement with the results reported in the previous subsection (Figure 30). Buildings 2022, 12, x FOR PEER REVIEW 22 of 27 Similar to the previous observation, considering that the prediction performance of the Adam optimiser deteriorates with the length of the prediction horizon (Figure 28). However, unlike the generalised model, Adam continues to outperform the other opti- misers, but by broadening the forecast horizon we may be faced with a tipping point after which it is convenient to change optimisers, as was the case with the development of the previous generalised model. Figure 28. Average RMSE trend concerning prediction horizon by the optimiser for the validation set. The alternative approach attempted (MISO) appears to systematically present more accurate predictions, but on the other hand, is not as comprehensive as MIMO. It is evident Buildings 2022, 12, 933 22 of 26 that these models, due to their limited capacity for generalisation, perform slightly better when applying the MISO approach, probably due to its lower complexity (Figure 29). Buildings 2022, 12, x FOR PEER REVIEW 23 of 27 Figure 29. Average RMSE WRT approach for validation set and 2 h prediction horizon. Figure 29. Average RMSE WRT approach for validation set and 2 h prediction horizon. While the relative position of each office does not seem to influence the correspond- ing forecasts, the errors are significantly higher for the second and third floors than for the first, in agreement with the results reported in the previous subsection (Figure 30). Figure 30. Average RMSE concerning floor for the validation set. Figure 30. Average RMSE concerning floor for the validation set. 4. Discussion 4. Discussion To summarise, the errors of the model are approximately between 0.11 C and 0.1 C, To summarise, the errors of the model are approximately between 0.11 °C and 0.1 °C, whereas by creating a different model for each plane, we obtain an RMSE between 0.08 and whereas by creating a different model for each plane, we obtain an RMSE between 0.08 0.06 C, as shown in Figure 31. The performance gap is negligible enough to validate the and 0.06 °C, as shown in Figure 31. The performance gap is negligible enough to validate models. Users could take advantage of the models’ ability to adapt to each plane, without the models. Users could take advantage of the models’ ability to adapt to each plane, with- losing too much accuracy compared to what could have been achieved by developing out losing too much accuracy compared to what could have been achieved by developing a single model for each circumstance. a single model for each circumstance. On the other hand, the tests showed some results: Increasing the size of the time horizon has a worse impact on the performance of the model if the optimiser is of the type indicated by Adam; the ability to predict variables well in advance would be vital in cases such as prolonged sensor failure, but this type of prediction would be less reliable if the performance of the optimiser is not monitored. The MISO scenario does not necessarily guarantee smaller errors in predictions, be- cause it explores a simplified scenario. On the other hand, the MIMO approach ensures completeness in representing the future state of the building. A model that can generalise sufficiently, however, can also achieve better results by running MIMO scenarios, as demonstrated in the Model Tuning subsection and also reported in other similar studies. It must be considered that each floor has different levels of complexity because it is defined by different dynamics. The third floor, for example, has the particularity of the roof, while the second is influenced by the proximity of the other two floors, whose influences are not considered by the input variables. When treating each floor as Figure 31. Model average RMSE concerning floor by prediction horizon versus floor-tailored models. On the other hand, the tests showed some results: • Increasing the size of the time horizon has a worse impact on the performance of the model if the optimiser is of the type indicated by Adam; the ability to predict varia- bles well in advance would be vital in cases such as prolonged sensor failure, but this type of prediction would be less reliable if the performance of the optimiser is not monitored. Buildings 2022, 12, x FOR PEER REVIEW 23 of 27 Buildings 2022, 12, 933 23 of 26 a single thermal zone, the model’s predictions for the first floor are the most accurate compared to those for the second and third floors, whereas when the model is trained to generalise more, it does not seem to be influenced much by the floor considered. The traditional structure works well for short-term forecasts, but performance may deteriorate as the forecast horizon is extended, to the point that for a longer period the two-way structure is preferable; this is the case both considering the plans as separate Figure 30. Average RMSE concerning floor for the validation set. areas. Thus, the length of the horizon appears to be a parameter that affects performance. The chosen learning rate ensures error constancy during the training phase and is 4. Discussion very low (i.e., 0.000001); at the same time, since the preferred optimiser is often of the Adam type, known to have the fastest convergence rate, calculation times are not To summarise, the errors of the model are approximately between 0.11 °C and 0.1 °C, unacceptable, and similarly when the chosen optimiser is of the Adagrad or SGD type. whereas by creating a different model for each plane, we obtain an RMSE between 0.08 The highest tested numerosity (i.e., 256 neurons) is the one that guarantees the best and 0.06 °C, as shown in Figure 31. The performance gap is negligible enough to validate performance when the model is perfectly adapted to the reference area as far as possi- the models. Users could take advantage of the models’ ability to adapt to each plane, with- ble. Otherwise, a model that must remain versatile may become too complex and the out losing too much accuracy compared to what could have been achieved by developing ideal number of neurons is much lower, around 128, resulting in a simpler structure. a single model for each circumstance. Figure 31. Model average RMSE concerning floor by prediction horizon versus floor-tailored models. Figure 31. Model average RMSE concerning floor by prediction horizon versus floor-tailored models. Comparison with Similar Studies On the other hand, the tests showed some results: The proposed solution is twofold: specific models seem to be a good solution for • Increasing the size of the time horizon has a worse impact on the performance of the stakeholders interested in managing air-conditioning systems only on a single floor while model if the optimiser is of the type indicated by Adam; the ability to predict varia- minimising the margin of error, while a generalised model is the most suitable when the bles well in advance would be vital in cases such as prolonged sensor failure, but this need is to act on the control system in a centralised manner and may also prove reliable type of prediction would be less reliable if the performance of the optimiser is not when tested on other buildings. The proposed solution is validated by comparing it with monitored. some previous studies existing in the literature, already listed in this study as references. Among them, a couple of ANN models can be compared because they deal with similar buildings, climate zones and forecast horizons. Soleimani-Mohseni et al. [17] predicted the operating temperature using a feed-forward ANN. The structure of the network (3-10-1) included only one hidden layer, just like the model proposed in this study. This network provided a value of MAEE = 0.1543 for the training data and a MAEE = 0.1770 for the test data. Attoue et al. [21], starting from a dataset consisting of parameters recorded every five minutes for two summer months, were able to obtain reliable estimates up to two hours in advance, although the forecast horizons tested varied from 0.5, 1, 2 and 4 h. The MSE increased with time, from a value of 0.0701 to 1.053, which was considered unsatisfactory. In Buildings 2022, 12, 933 24 of 26 the latter case, about 68% of the forecast errors were less than 1 C. Huang et al. [23] based the training process of their ANN model on the MSE loss function (and in the meantime relied on Bayesian regularisation as a training method) and developed an effective multi- zone predictor over a time range of 1 to 4/5 h, to the extent that even six-day simulations were found to maintain an RMSE of 0.2–0.4 C for most of the zones tested. Xu et al. [22] exploited the potential of LSTM for forecasting purposes and obtained an RMSE between 0.3 C and 0.5 C with two months of collected data and forecast horizons from 5 to 30 min. The results listed are generally in the same range in terms of error, bearing in mind that a fair comparison is rendered impossible by significant differences, for example, in the availability of training data, the forecast horizons chosen and the building areas. In conclusion, this result suggests that the proposed model provides satisfactory forecast accuracy for the periods considered. Consequently, optimised management of the controlled variables based on the forecasts obtained could support a valuable service and represent an advantage in terms of energy savings. 5. Conclusions This study allowed us to exploit one of the most popular models in time series prediction (i.e., an LSTM neural network) on a huge dataset consisting of measurements taken from summer 2019 to summer 2020 inside a real three-story building located in Turin (Italy). Our aim is to predict the indoor temperature for each office included in the considered area of the building. The significant size of the dataset allowed us to unlock the potential of LSTM and we decided to train and validate the model on the first-floor data only, to verify its ability to adapt to different floors and, in general, to different building scenarios. In addition, the dataset was divided according to its original chronological sequence, so the model was only trained on certain months of the year, to assess the model’s ability to recognise patterns regardless of the period of the year considered. The results were obtained through two different scenarios. The MISO approach provides only the indoor temperature from office R-40, while the MIMO approach outputs the indoor temperatures of all offices in the area considered. The latter not only provides more comprehensive results but also performs better in most cases. The main success criterion adopted is the RMSE metric. The architecture and parameters of the neural network were identified after a large number of tests, aimed at identifying the most suitable parameters for short-term (2 and 5 h in advance) and long-term (24 h in advance) forecasting. The established models shared a small structure (i.e., only one hidden layer), similar to some previous examples in the literature, and a number of 128 neurons in the input and hidden layers, while in the output layer the number of neurons was set equal to the predicted variables. The performance was finally validated against that obtained from similar models trained on each plane, finding that the differences in terms of errors recorded could be considered negligible. It can therefore be concluded that the models developed can generalise and handle new data satisfactorily for both short-term and long-term forecasts. Models trained and tested on only one floor are more accurate, but may not be easily reusable, either between floors or between offices, as MIMO models show a systematic decrease in accuracy compared to MISO models. The current results were compared with those obtained in other studies. Although an equal comparison is not possible because the models were developed under different conditions, overall the results, ranging between 0.1 and 0.15 in terms of RMSE considering all the prediction horizons tested, proved to be comparable to the proposed options. The prediction error in terms of degrees Celsius is far removed from the values perceptible on the human body. As future work, this study can be extended by adapting current models to predict the building’s internal temperature over longer time horizons to manage energy demand. Similar to other studies, such as that of Fang et al. [24] and Attoue et al. [21] this work could be extended by exploring the role of other characteristics, for example, occupancy, planned indoor activities or user behaviour, which could be measured, for example, through the presence of carbon dioxide in the air or the energy use of appliances. Furthermore, further Buildings 2022, 12, 933 25 of 26 studies could consist of producing models with controlled variables, such as radiant panel flow temperatures, based on predictions of observed variables (e.g., indoor temperatures) and driven by setpoint temperatures. An MPC system based on the developed model could be created and eventually tested, as reported by Huang et al. [23]. Author Contributions: Conceptualization, D.P.; data curation, S.D.G.; investigation, S.D.G.; supervi- sion, D.P.; validation, S.D.G.; writing—review & editing, D.P. and S.D.G. All authors have read and agreed to the published version of the manuscript. Funding: This research received no external funding. Institutional Review Board Statement: Not applicable. Informed Consent Statement: Informed consent was obtained from all subjects involved in the study. Data Availability Statement: Not applicable. Acknowledgments: The authors want to thank Eurix Srl (TO–Italy) for supporting our work. Conflicts of Interest: The authors declare no conflict of interest. Nomenclature C Celsius degree AHU Air Handling Unit ANN Artificial Neural Networks ARMA AutoRegressive Moving Average ARMAX AutoRegressive Moving Average with eXogenous inputs ARX AutoRegressive time series with eXogenous inputs avg average BP Back Propagation ELM Extreme Learning Machine EU European Union h hour(s) HVAC Heating Ventilation Air Conditioning LSTM Long Short-Term Memory MAE Mean Absolute Error MAEE Mean Absolute Error Estimation MIMO Multi Input Multi Output MISO Multi Input Single Output MSE Mean Squared Error NARX Nonlinear AutoRegressive with eXternal input ODE Ordinary Differential Equation R correlation index RC Resistance-Capacitance ReLU Rectified Linear Unit RMSE Root Mean Squared Error SVM Support Vector Machine WRT With Respect To References 1. Directive 2010/31/EU Energy Performance Building Directive; European Parliament: Strasbourg, France, 2010. 2. Aliberti, A.; Bottaccioli, L.; Macii, E.; Di Cataldo, S.; Acquaviva, A.; Patti, E. A non-linear autoregressive model for indoor air-temperature predictions in smart buildings. Electronics 2019, 8, 979. [CrossRef] 3. Zhao, H.X.; Magoulès, F. A review on the prediction of building energy consumption. Renew. Sustain. Energy Rev. 2012, 16, 3586–3592. [CrossRef] 4. Fong, K.F.; Hanby, V.I.; Chow, T.T. HVAC system optimization for energy management by evolutionary programming. Energy Build. 2006, 38, 220–231. [CrossRef] 5. Foucquier, A.; Robert, S.; Suard, F.; Stéphan, L.; Jay, A. State of the art in building modeling and energy performance prediction: A review. Renew. Sustain. Energy Rev. 2013, 23, 272–288. [CrossRef] Buildings 2022, 12, 933 26 of 26 6. Amara, F.; Agbossou, K.; Cardenas, A.; Dubé, Y.; Kelouwani, S. Comparison and simulation of building thermal models for effective energy management. Smart Grid Renew. Energy 2015, 6, 95–112. [CrossRef] 7. Fraisse, G.; Viardot, C.; Lafabrie, O.; Achard, G. Development of a simplified and accurate building model based on electrical analogy. Energy Build. 2002, 34, 1017–1031. [CrossRef] 8. Ramallo-González, A.P.; Eames, M.E.; Coley, D. Lumped parameter models for building thermal modelling: An analytic approach to simplifying complex multi-layered constructions. Energy Build. 2013, 60, 174–184. [CrossRef] 9. Van Dijk, D. EN ISO 52016 1: The new International Standard to calculate building energy needs for heating and cooling, internal temperature and heating and cooling loads. In Proceedings of the Building Simulation, Rome, Italy, 2–4 September 2019. 10. Vivian, J.; Zarrella, A.; Emmi, G.; De Carli, M. An evaluation of the suitability of lumped-capacitance models in calculating energy needs and thermal behaviour of buildings. Energy Build. 2017, 150, 447–467. [CrossRef] 11. Wang, S.; Xu, X. Simplified building model for transient thermal performance estimation using GA-based parameter identification. Int. J. Therm. Sci. 2006, 45, 419–432. [CrossRef] 12. Braun, J.E.; Chaturvedi, N. An inverse gray-box model for transient building load prediction. HVAC Res. 2002, 8, 73–99. [CrossRef] 13. Chen, R.T.; Rubanova, Y.; Bettencourt, J.; Duvenaud, D.K. Neural ordinary differential equations. NeurIPS 2018, 31, 6572–6583. 14. Daw, A.; Karpatne, A.; Watkins, W.; Read, J.; Kumar, V. Physics-guided neural networks (PGNN): An application in lake temperature modeling. arXiv 2017, arXiv:1710.11431. 15. Massano, M.; Patti, E.; Macii, E.; Acquaviva, A.; Bottaccioli, L. An online gray-box model based on unscented Kalman filter to predict temperature profiles in smart buildings. Energies 2020, 13, 2097. [CrossRef] 16. Hermawan, P.E. Indoor temperature prediction of the houses with exposed stones in tropical mountain regions during four periods of different seasons. Int. J. Civ. Eng. Technol. 2019, 10, 604–612. 17. Soleimani-Mohseni, M.; Thomas, B.; Fahlén, P. Estimation of operative temperature in buildings using artificial neural networks. Energy Build. 2006, 18, 635–640. [CrossRef] 18. Lu, T.; Viljanen, M. Prediction of indoor temperature and relative humidity using neural network models: Model comparison. Neural Comput. Appl. 2009, 18, 345. [CrossRef] 19. Mba, L.; Meukam, P.; Kemajou, A. Application of artificial neural network for predicting hourly indoor air temperature and relative humidity in modern building in humid region. Energy Build. 2016, 121, 32–42. [CrossRef] 20. Shi, X.; Lu, W.; Zhao, Y.; Qin, P. Prediction of indoor temperature and relative humidity based on cloud database by using an improved BP neural network in Chongqing. IEE Access 2018, 6, 30559–30566. [CrossRef] 21. Attoue, N.; Shahrour, I.; Younes, R. Smart building: Use of the artificial neural network approach for indoor temperature forecasting. Energies 2018, 11, 395. [CrossRef] 22. Xu, C.; Chen, H.; Wang, J.; Guo, Y.; Yuan, Y. Improving prediction performance for indoor temperature in public buildings based on a novel deep learning method. Build. Environ. 2019, 148, 128–135. [CrossRef] 23. Huang, H.; Chen, L.; Hu, E. A neural network-based multi-zone modelling approach for predictive control system design in commercial buildings. Energy Build. 2015, 97, 86–97. [CrossRef] 24. Fang, Z.; Crimier, N.; Scanu, L.; Midelet, A.; Alyafi, A.; Delinchant, B. Multi-zone indoor temperature prediction with LSTM-based sequence to sequence model. Energy Build. 2021, 245, 111053. [CrossRef] 25. Li, Q.; Meng, Q.; Cai, J.; Yoshino, H.; Mochida, A. Applying support vector machine to predict hourly cooling load in the building. Appl. Energy 2009, 86, 2249–2256. [CrossRef] 26. Noorazizi, M.S.; Zaki, S.A.; Abdullah, S.S. Black box modelling and simulating the dynamic indoor air temperature of a laboratory using ARMA model. Indones. J. Electr. Eng. Comput. Sci. 2020, 21, 791–800. 27. Afroz, Z.; Shafiullah, G.; Urmee, T.; Higgins, G. Prediction of Indoor Temperature in an Institutional Building. Energy Procedia 2017, 142, 1860–1866. [CrossRef] 28. Mateo, F.; Carrasco, J.J.; Sellami, A.; Millán-Giraldo, M.; Domínguez, M.; Olivas, E.S. Machine learning methods to forecast temperature in buildings. Expert Syst. Appl. 2013, 40, 1061–1068. [CrossRef] 29. Mustafaraj, G.; Lowry, G.; Chen, J. Prediction of room temperature and relative humidity by autoregressive linear and non-linear neural network models for an open office. Energy Build. 2011, 43, 1452–1460. [CrossRef] 30. Gustin, M.; McLeod, R.S.; Lomas, K.J. Forecasting indoor temperatures during heatwaves using time series models. Build. Environ. 2018, 143, 727–739. [CrossRef] 31. Alawadi, S.; Mera, D.; Fernández-Delgado, M.; Alkhabbas, F.; Olsson, C.M.; Davidsson, P. A comparison of machine learning algorithms for forecasting indoor temperature in smart buildings. Energy Syst. 2020, 1–17. [CrossRef] 32. Dabas, N.; Singh, R.P. ELM-Kernel and reduced kernel ELM based watermarking scheme. J. Inf. Secur. Appl. 2019, 46, 173–192. [CrossRef]

Journal

BuildingsMultidisciplinary Digital Publishing Institute

Published: Jul 1, 2022

Keywords: prediction model; indoor temperature forecasting; LSTM; artificial neural networks; energy savings

There are no references for this article.