Smart Building: Use of the Artiﬁcial Neural Network Approach for Indoor Temperature Forecasting

: The smart building concept aims to use smart technology to reduce energy consumption, as well as to improve comfort conditions and users’ satisfaction. It is based on the use of smart sensors and software to follow both outdoor and indoor conditions for the control of comfort, and security devices for the optimization of energy consumption. This paper presents a data-based model for indoor temperature forecasting, which could be used for the optimization of energy device use. The model is based on an artiﬁcial neural network (ANN), which is validated on data recorded in an old building. The novelty of this work consists of the methodology proposed for the development of a simpliﬁed model for indoor temperature forecasting. This methodology is based on the selection of pertinent input parameters after a relevance analysis of a large set of input parameters, including solar radiation outdoor temperature history, outdoor humidity, indoor facade temperature, and humidity. It shows that an ANN-based model using outdoor and facade temperature sensors provides good forecasting of indoor temperatures. This model can be easily used in the optimal regulation of buildings’ energy devices.


Introduction
The smart building concept aims to use smart technology to reduce energy consumption, as well as to improve comfort and users' satisfaction. Forecasting of the indoor temperature is necessary for the regulation of energy devices to ensure occupant comfort, as well as for energy optimization [1,2]. This forecasting constitutes a complex task, because it is governed by complex physical and behavioral phenomena. It is affected by a multitude of parameters, which could be classified into three groups: outdoor conditions, building characteristics, and occupants' behavior [3][4][5]. In addition, investigations showed that the indoor temperature does not have uniform distribution [6].
Indoor temperature forecasting could be carried out using physical or data-driven approaches [7]. The physical approach is based on the use of numerical modelling [8,9], which requires detailed information about a building's characteristics, appliances, and occupant behavior.
The data-driven approach is based on the use of collected data for developing relationships (models) between 'input' parameters and 'output' parameters. These relationships could be established by learning from collected data. The artificial neural network (ANN) approach was used to build data-driven models [10][11][12]. Soleimani-Mohseni et al. [13] showed that the operative temperature could be well estimated by the ANN approach using the indoor air temperature, electrical power, outdoor temperature, time of day, wall temperature, and ventilation flow rate. Lu and Viljanen [14] used the ANN approach to predict air temperature and relative humidity in a test room using indoor and outdoor temperature and humidity. Recently, Zabada and Shahrour [15] used the ANN approach for the analysis of the heating expenses in social housing. In these works, the ANN model was used as a prediction tool for specific cases. This paper proposes a methodology, which could be followed for the use of the ANN approach for the indoor temperature forecasting in any type of building. This methodology is based on the use of a relevance analysis for the determination of pertinent input parameters and the optimal ANN architecture. The methodology is presented through its application on data recorded in an old building.

Data Collection
Data were collected using a smart monitoring of an old building of Polytech'Lille Engineering School in the north of France. Monitoring concerned indoor and outdoor temperature and humidity, as well as solar radiation [16,17]. Parameters were recorded at five-minute intervals and then sent to a local server. Figure 1 illustrates an example of recorded data on a summer day. Data concerns the outdoor temperature, as well as the indoor temperature at three locations in the office: facade, center of the lateral wall, and office center. The external temperature varied between 17.5 • C and 34 • C, while the facade indoor temperature varied between 21 • C and 25.5 • C. The temperatures at the center of the office and the center of the lateral wall varied between 22 • C and 24.2 • C.
Data were collected for two summer months (June and July) in different offices of the building.

Artificial Neural Network Approach
The ANN approach is inspired from the ability of the human brain to predict patterns based on learning and recalling processes. It allows the construction of relationships between input parameters and output parameters using artificial neurons, which are arranged in an input layer, an output layer and one or more hidden layers [18]. Analyses were conducted using the multilayer back-propagation neural network. We used a three-layer ANN with n, m, and k as the number of input, hidden, and output nodes, respectively, based on the equation: where Y k stands for the output values and X i denotes the input values; W ij gives the weights of connection between the input layer and the hidden layer.
The ANN performances could be evaluated using the mean square error (MSE) and the coefficient of correlation (R) where e i is the error between the ANN output (Y i ) and the experimental input (X i ), X represents the mean of the input target. Different ANN architectures exist. The multilayer perception (MLP) structure is the most popular [19][20][21][22][23][24]. Its use with a single hidden layer and a sufficient number of neurons provided good accuracy for the approximated function [25,26]. This architecture is used in this work.
The use of ANN for temperature forecasting aims to predict the building indoor temperature for the optimal regulation of energy devices as well as for ensuring occupants' comfort. Indoor conditions of a building are highly affected by its age and thermal performance, which depends on its envelope and construction material. The input parameters concern the outdoor conditions, indoor conditions, as well as the occupants' behavior. The forecasting time depends on the building thermal inertia and energy regulation system. Each building is characterized by its time lag and the time of heat transmission delay [27][28][29][30]. The prediction time for ANN models ranged from 0.5 to 4 h to cover the phase of heating exchange through the facade and to investigate the effectiveness of this approach.
This paper proposes a methodology composed of two steps for the use of the ANN approach for indoor temperature forecasting. The first step concerns the indoor facade temperature forecasting considering outdoor and indoor conditions, while the second step concerns the prediction of the temperature at the room center considering the indoor facade temperature.
Analyses were conducted using MATLAB (Mathworks Inc., Natick, MA, USA-Group License) for ANN modeling and IBM SPSS statistics for input parameter ranking.

Analysis of the Input Parameters' Relevance
The input parameters used in the global analysis are summarized in Table 1. They concern the outdoor conditions (temperature, humidity, and solar radiation), outdoor temperature history (input matrix for the last 3-h values having 30 min lag between its different columns: if the actual outdoor temperature was recorded at time t, the history matrix corresponds to t-0.5 h, t-1 h, t-1.5 h, t-2 h, t-2.5 h, and t-3 h, the indoor facade temperature history (similar matrix history as the outdoor temperature), and time (cumulative minutes of the day). The time range of history inputs was chosen with respect to the prediction time to cover the phase shift that will occur at the facade level. The impact of a larger range (t-5 h, t-6 h, etc.) for the history inputs did not affect the results. A 30 min lag was chosen to detect any sudden variation at the facade level. The ANN optimal architecture ( Figure 2) was fixed after several comparative analyses. It includes one hidden layer with four neurons. Table 2 provides the weights of neurons' connections obtained from MATLAB software. We can observe that the weight could be negative or positive providing excitatory or inhibitory influence on each input.   Figure 3 shows comparison of 'predicted' and 'recorded' facade temperatures. We observe a good agreement between these values with R = 0.9967 and MSE = 0.0277. This result shows that the ANN model predicts well the facade indoor temperature. The determination of input parameters requires two temperature sensors (outdoor and indoor), an external humidity sensor, and a solar radiation sensor. In order to determine the most important input parameters in the ANN model, IBM SPSS statistical software was used to analyze the 'importance' of these parameters. This software is based on inferential statistics. It uses recorded data to perform a sensitivity analysis for the determination of the importance of each input parameter. Table 3 summarizes the obtained results. It shows that the solar radiation, time and humidity have a low role in the forecasting model, with an importance factor lower than 5.1%. The outdoor temperature has the highest importance (Importance Factor = 42%), followed by the historical facade temperature (Importance Factor = 31.9%). The historical outdoor temperature has an intermediate influence with an Importance Factor = 12.8%. Since the role of some input parameters in the ANN model is very weak (with reference to the SPSS classification), analyses were conducted by neglecting these parameters. Table 4 summarizes the results of these analyses. It shows clearly that the neglect of solar radiation, humidity, and historical outdoor temperature (Model 5) does not significantly deteriorate the quality of the ANN model: the mean square error (MSE) increases from 0.0277 to 0.0365, while the coefficient of correlation (R) decreases from 0.9967 to 0.9959. The additional neglect of the historical data of the facade temperature (Model 6) has a higher influence: MSE increases from 0.0277 to 0.4922, while R decreases from 0.9967 to 0.946. Figure 4 illustrates the results of Models 1, 5, and 6. As expected and according to the physics of the heat transfer in transient conditions, this result shows that the facade temperature could be effectively predicted in considering only the outdoor temperature and the historical data of the facade indoor temperature.  Considering the results of the previous section, the outdoor temperature is first used as the input parameter for forecasting the facade indoor temperature. The forecasting model provides the temperature at 0.5, 1, 2, and 4 h. Figures 5 and 6 show the forecasting results at 0.5 and 1.0 h. We observe that the ANN model reproduces well the recorded temperature. For 0.5-h forecasting, R is equal to 0.956 and MSE is equal to 0.4369; while for one-hour forecasting, R = 0.928 and MSE = 0.48454. Figure 7 shows the forecasting error distribution for 0.5 and one hour. It shows that about 90% of the forecasting error are less than 1 • C. Figures 8 and 9 shows the forecasting results at two and four hours. We observe a deterioration in the quality of forecasting regarding those obtained at 0.5 and one hour. For two-hour forecasting, R = 0.9109 and MSE = 0.89078, while for four-hour forecasting, R = 0.8370 and MSE = 1.23783. Figure 10 shows the forecasting error distribution for two and four hours. It shows that for the former, about 70% of the forecasting error are less than 1 • C, while for the latter about 64% of the forecasting error are less than 1 • C. Table 5 summarizes the forecasting results.       In this section, both outdoor temperature and three-hour facade temperature history are used as input parameters in the forecasting model. The forecasting model provides the temperature at 0.5, 1, 2, and 4 h. Table 6 summarizes the obtained results. The temperature forecasting is improved regarding the forecasting model using the outdoor temperature as input. This result is particularly interesting for the temperature foresting at two hours: R = 0.957 and MSE = 0.3299 to be compared with R = 0.9109 and MSE = 0.89078 obtained with the outdoor temperature as input parameter. Figure 11 shows the forecasting error distribution for two hours. It shows that about 88% of the forecasting error are less than 1 • C to be compared with 70% obtained with the previous model.
The four-hour foresting is still weak with R = 0.852; MSE = 1.0533. About 68% of the forecasting error are less than 1 • C ( Figure 11).

Indoor Temperature Forecasting (Room Center)
The ANN approach is used for forecasting the temperature at the room center considering only the facade temperature as input parameter. Figure 12 shows a comparison of 'predicted' and 'recorded' indoor temperatures. A good agreement is observed between recorded temperature and ANN prediction with R = 0.951; MSE = 0.1679. Only 1% of data has an error greater than 1 • C ( Figure 13).

Discussion of Results
Relevance analysis and ANN modeling using different sets of input parameters showed that the indoor temperature forecasting could be conducted with good precision considering only outdoor temperature and indoor facade temperature history. Indeed, the influence of solar radiation, humidity, and outdoor temperature history in the forecasting model could be neglected. The prediction of the facade temperature was conducted with different inputs parameters and for different forecasting times. In the example presented in this paper, predictions were good up to two hours. The four-hour prediction gave unsatisfactory results with R = 0.852; MSE = 1.0533.
Indoor temperature forecasting was successfully conducted using the facade temperature. Available data did not include indoor activities. The presence of significant indoor activities-such as meetings, use of energy consuming devices, as well as opening doors and windows-could significantly affect the energy balance in the room. If these activities are significant, they should be monitored and included in the forecasting model.

Conclusions
This paper proposed a methodology for the development of a simplified ANN-based model for forecasting indoor temperature. The methodology includes two steps. The first step concerns the forecasting of the indoor facade temperature considering outdoor and indoor conditions, while the second step concerns the prediction of the temperature at the room center considering only the indoor facade temperature. This paper shows that both relevance analysis and the use of different sets of input parameters could lead to a simplified forecasting model with restricted input parameters. This methodology was illustrated through its application to data collected in an old building. Data included outdoor and indoor temperature and humidity, as well as solar radiation. Analyses showed that two-hour facade temperature forecasting could be conducted with good precision using only the outdoor temperature and three-hour facade temperature history. This result could not be generalized. However, the proposed methodology could be used for other situations by using first only temperature sensors for measuring the outdoor and the indoor facade temperatures. Concerning the second step, the ANN model gave good forecasting of the temperature at the room center in considering only the facade temperature. Available data did not include indoor activities. The presence of significant indoor activities should be considered in the forecasting model.