Prediction of Cooling Energy Consumption in Hotel Building Using Machine Learning Techniques

: The diversiﬁcation of energy sources in buildings and the interdependence as well as communication between HVAC installations in the building have resulted in the growing interest in energy load prediction systems that enable proper management of energy resources. In addition, energy storage and the creation of energy bu ﬀ ers are also important in terms of proper resource management, for which it is necessary to correctly determine energy consumption over time. It is obvious that the consumption of cooling energy depends on meteorological conditions. Knowing the parameters of the outside air and the number of users, it is, therefore, possible to determine the hourly energy consumption of a cooling system in a building with some accuracy. The article presents models of cooling energy prediction in summer for a hotel building in southern Poland. The paper presents two methods that are often used for energy prediction: neural networks and support vector machines. Meteorological data, time data, and occupancy level were used as input parameters. Based on the collected input and output data, various conﬁgurations were tested to identify the model with the best accuracy. As the analysis showed, higher prediction accuracy was obtained thanks to the use of neural networks. The best of the proposed models was characterized by the WAPE and CV coe ﬃ cients of 19.93% and 27.03%, respectively.


Introduction
Nowadays, people spend the majority of time indoors, which leads to increased costs associated with maintaining comfort conditions in buildings. Internal installations such as heating, cooling, and ventilation systems therefore play a key role and thus constitute the main source of costs. Hence, the combination of economic and environmental factors is an important task for manufacturers and designers, contributing to the development of new solutions to provide comfort conditions for small operating and investment outlays. In 2018, the industry sector accounted for about 32% of total global energy consumption. The transport sector accounted for 28% of the energy use. The building construction and operations accounts for the largest share of global final energy use-36%, of which 8% was connected with operation of the non-residential building, 22% with residential building operation and 6% with the construction industry [1]. Global final energy consumption in buildings [2] in 2018 increased 1% from 2017, and about 7% since 2010. According to the Energy efficiency indicators Report published by IEA, nearly 50% of building consumption is related to space heating and 4% with cooling. Increasing energy consumption in the European Union led to appearance of the general regulation in this field-Directive 201013/EU of the European Parliament and of the Council on the energy performance of buildings [3]. According to Article No. 8, Member States should set system requirements for the purpose of optimizing the energy use of technical systems in the buildings. Regulations cover at least Jovanović et al. [22] presented a prediction of heating energy using various neural networks: feed forward backpropagation neural network (FFNN), radial basis function network (RBFN), and adaptive neuro-fuzzy interference system (ANFIS). The subject of analysis was the university buildings in Norway. The authors have predicted building energy use based on the input feature: mean daily outside temperature, mean daily wind speed, total daily solar radiation, minimum daily temperature, maximum daily temperature, relative humidity, day of the week, month of the year, and heating consumption of the previous day. Data for the working days in the cold period for three years was used. For model FFNN, all input variables mentioned above are used; for model RBFN, seven most influencing parameters, and for model ANFIS, only three of them. The results showed that all three models have very good agreement with measured values. Sha et al. [16] presented a simplified energy prediction method based on the three input features: degree-day, day type, and month type. Their study adopted three machine learning algorithms: MLR, SVR, and ANN. The results showed that ANN and SVR methods have better performance than the MLR model. The authors mentioned that all of the methods do not have sufficient quality in heating energy prediction, due to the size of the training dataset. Manjarres et al. [20] proposed to implement the HVAC energy management system in a separate part of the office building in Spain. Solution includes a two-way communication system, enhanced database management system, and a set of machine learning algorithms based on random forest (RF) regression techniques. The proposed optimizer included information such as: indoor and outdoor temperatures, relative humidity, and occupancy level. The simulations took into account different modes of operation of HVAC systems. Data were collected from 63 days in summer and 46 days in winter, which was the basis during the simulation phase. The solution assumes the ON/OFF operation of the HVAC system and the operation of the mechanical ventilation system in accordance with the proposed solutions, which is to ensure minimization of energy consumption while maintaining the assumed temperature inside the rooms. The authors estimate that the implementation of the described system will contribute to the reduction of heat demand by 48% and 39% for cooling consumption. Ahmad et al. [21] presented a comparison between feed-forward back-propagation artificial neural network and random forest for HVAC electricity consumption of a hotel building in Madrid. Results showed that ANN performed marginally better than RF. Generally, both models have comparable quality of prediction and could be implemented in the building system.
In order to increase the accuracy of forecasting, as well as to expand the possibility of implementing solutions, many authors decide to modify classic prediction models or combine several approaches. The biggest problem of these patterns is the nonlinearity of relationships. Zhong et al. [18] proposed using a novel vector field-based support vector regression method. The purpose of the method is to define the optimal feature space by modifying the input data space. The resulting algorithm is then used to build a predictive model. The implementation of such a solution in an office building in China gave very good results compared to commonly used methods. The algorithm proposed in this article is used to determine the refrigeration load forecasting model based on the integrated data set. The input parameters are both external and internal. Casteleiro-Roca et al. [15] described an intelligent hybrid model to predict the short-term energy demand in a hotel, including three techniques: clustering, MLP, and LS-SVR. It was used for predicting the power load of the building for each hour in a 24-h horizon. The authors identified three input variables: the energy demand in the previous 24 h, the mean temperature of the previous day, and the occupancy rate of the hotel. The obtained results were compared with conventional forecast techniques based on ARIMAX modeling and a method based on tree models. The hybrid appeared to have better accuracy (lower mean absolute error) than the above-mentioned models.
Artificial Intelligence Algorithms are also widely used for electricity consumption forecasting, including district public consumption [23]. Güngör et al. [24] presented electricity consumption prediction for a variety of households using different prediction algorithms (Holt-Winters, ARIMA, LSTM i TESLA). Results showed that TESLA performance is better than other prediction methods. The authors have used five different classifiers (Logistic Regression, Stochastic Gradient Descent, K-Nearest Neighbors, Random Forest, Support Vector Machine). Another example of such algorithms is the forecast of meteorological conditions for the needs of the HVAC system proposed by Işik and Inalli. A back-propagation neural network perceptron model with seven inputs was used to predict temperature, solar radiation, and relative humidity. A comparison with the ANFIS model showed that the ANN model has better accuracy in terms of forecasting meteorological data for HVAC. [25] In this study, cooling energy consumption predictive models based on an artificial neural network and support vector machine algorithms are presented. The paper includes a statistical analysis of historical data of hotel building. The cooling load and proposed variables during the summer season are considered. The main contribution of this paper is the development of high-accuracy predictive models and comparison neural network-based model with the support vectors approach. The structure of this study was organized as follows. Firstly, an introduction to energy prediction is presented. A short review of the prediction method was included. Section 2 provided the case of the study and used methods description, including the details of data collection, input variables, and proposed models. In the Results section, the main results obtained from models are presented. In these sections, real energy consumption and predicted load are compared and analyzed. Finally, conclusions and remarks are given in Section 5.

Case of Study
The Turówka hotel building located in Wieliczka near Kraków (the south-central part of Poland) is used as a case of study for this paper. The five-story building is a reconstruction of a historic salt store. The hotel has a floor area of 5525.00 m 2 and a volume of 19,300 m 3 . Facilities include 50 double rooms, a hotel bar, a restaurant, a drink bar, a conference room, and a pool. A detailed description of the building with an analysis of the cooling and heating load was described in the previous article [26]. Based on the analysis of the summer period in the hotel building, it was found that the cooling system is responsible for 50-60% of the total energy load. Additionally, the analysis showed a clear relationship between the outside temperature and the cooling load; therefore, the presented predictive model applies to the cooling energy prediction during the summer. The data used in the research mainly include three parts: meteorological data, load data, and data related to operational conditions. The input variables used for the predictive models for the calculation of the cooling demands include weather conditions, occupancy level in the hotel, hour, and day of the week. The cooling energy load data is provided by meters systems installed in the building cooling system i.e., feed and return of the high and, depending on demand, the low parameter of the refrigerant. Data transmitted via a serial communications protocol-MODBUS RTU-is stored in a recording system. The measurement system consists of MULTICAL heat meters by Kamstrup and flow sensors submitted to a type of approval according to EN 1434 [27], which includes the 2400-h measurement stability test of the flow sensors. The meteorological data used in this paper are obtained from the National Research Institute-Polish Institute of Meteorology and Water Management; only the outside temperature was measured directly at the hotel area. The data used in predictive models are an hourly time series collected in a summer season in Poland, where the cooling load was observed. The hourly meteorological data were calculated as an average value based on the measurement with sampling time set to 10 min. Data directly from the analyzed object, i.e., outdoor temperature and cooling energy consumption, were collected with a sampling time of 1 min. The data used for the models were calculated as an arithmetic average of measurement from an hourly period of time. For this study, the measurement season was selected from 15 May to 15 September 2019. The framework of the case study is shown in Figure 1.

Methodology of Artificial Neural Networks
There are many types of artificial neural networks (ANN) including simple feed forward networks, recurrent neural networks, and spiking neural networks, RBFNs. One of the most commonly used models is the multi-layer back-propagation neural network (BPNN). The BPNN architecture includes three types of the layers: an input layer (variable), an output layer (predicted value), and a hidden layer. A basic processing unit in this model is a neuron. A schematic diagram of an artificial neural network structure which consists of all three layers is shown in Figure 2.
For Multi-layer Perceptron (MLP), neurons in the input layer distribute the input signals x i to neurons in the hidden layer. Each neuron j in the hidden layer sums up its input signals x i after weighting them with the strengths of the respective connections w ji from the input layer and computes its output y j as a function f of the sum [28]: In this study, the Statistica Artificial Neural Network Package was used. A partition of the data into training (70%), validation (15%), and test (15%) is carried out.

Methodology of Support Vector Machines
Support Vector Machine is a supervised learning method increasingly used in solving nonlinear problems. This method is commonly used for classification, regression, and clustering. One of the main features of this model is the lack of local minima. It consists of two main parts: universal linear learning algorithm and a specific kernel that calculates the inner product of input points in feature space [29].
The universal linear function is as Equation (2): where f(x) means the forecasting values and the coefficients w and b are adjustable.
The main aim of SVM is to find the optimal hyperplane between classes, with the maximal margin. The margin is defined as the distance between the closest point in each class and hyperplane. For this purpose, the ε-insensitive loss function is used. Minimizing the overall errors is expressed by Equation (3) [30]: with the constraints: The method of operation of the support vector machine is shown in Figure 3.
There are four types of kernel function linear, polynomial, radial basis function (RBF), and sigmoidal function [29]. The most used kernel functions are the Gaussian RBF with a function of kernel defined by Equation (7): where x i and x j are vectors in the input space and γ is kernel parameter. An equivalent definition involves a σ parameter, where γ = 1/2σ 2 . The forecasting accuracy of the SVM model is affected by hyperparameters. In the ε-SVR, three proper parameters need to be determined: C, ε, and the kernel parameter (γ). Parameter ε represents the width of the ε-insensitive loss function and can affect the number of support vectors in the model. The higher ε value results in fewer support vectors and more flat estimates. Parameter C is related to model complexity and the degree of the deviations larger than ε which are tolerated. In models with high C parameter values, the main objective is to minimize the empirical risk only, without regard to model complexity part in the optimization formulation. Parameters σ and γ describe the Gaussian function width [31]. In this paper, the radial basis function RBF function is used as a kernel function to estimate the cooling load of the hotel building. A grid-search technique was applied to find the optimal parameter values. The kernel parameter γ was selected in priori based on the literature. According to the Limsvm-2.6 [32], the kernel parameter is defined as γ = 1/n, where n means the number of input variables. For d-dimensional problems, Cherkassy and Ma [31] noticed that the width parameter σ depends on the number of input variables d in accordance with the formula σ d~( 0.2-0.5). On this basis, four values of γ parameters were found: 0.1, 0.3, 0.5, 0.7. The ten-fold cross-validation was applied to reduce the error of the model. The dataset was randomly divided into two parts: learning samples (75%) and testing samples (25%). The feasible ranges of the parameters are set as follows: C ∈ [0.5, 150] and ε ∈ [0.01, 0.5].

Model Evaluation Index
The performance of the proposed models is evaluated by the mean absolute error (MAE), root mean square error (RMSE), weighted absolute percentage error (WAPE), coefficient of variance (CV), and coefficient of determination (r) [11,12,18,33]. The indicators are calculated as follows: where n denates the entire number of observations, E A is the actual value, E A denotes the mean of actual values, and E P represents the predicted value.

Preliminary Statistical Analysis
The first step in the analysis was a preliminary statistical analysis of the dataset. From the available data, nine parameters were selected that could potentially have an impact on cooling energy consumption. Apart from the most obvious values, such as temperature, air humidity, wind speed, and relative humidity, it was decided to use time variables such as the hour and day of the week as well as the occupancy level. Table 2 presents the information summary of the data used in this work. In the beginning, the relationship between cooling energy consumption and the values of the variables was determined. Graphs for each of the variables are presented in Figure 4. The Pearson correlation coefficient was the key parameter determining the acceptance of a given variable for analysis. Coefficients for each between the studied variables and the predicted output were provided. The results are summarized in Figure 5. Variables with low correlation coefficients can be significant in more complex predictive models. Based on the analysis of the correlation coefficient, the rejection of two parameters was initially planned: day and occupancy level. Due to the low correlation coefficients of the variables which, according to the authors, may have a significant impact on the predicted values, a more detailed analysis of the cooling load variability overtime was performed. Figure 6 shows plots of variation over time for the raw data collected with a sampling time of 1 min, and also after taking the hourly mean which was then accepted for prediction models.
As shown in Figure 6, there is a clear relationship between the demand for cooling energy and the time it was recorded. This relationship is not linear, hence the low correlation coefficient in the previous analysis step. The adoption of averaged values for further analysis may of course affect the accuracy of prediction, due to the unstable variability of the demand value; however, due to practical aspects, it was decided that the hourly variables were more efficient and could give sufficient effects in the prediction models. Despite the low correlation coefficients for time parameters and the occupancy level, it was decided that these parameters may be of great importance for a hotel facility due to the variability of the energy load depending on the use by guests.

Artificial Neural Networks
As mentioned in Section 2.2.1, the Statistica Artificial Neural Network Package was used to prepare predictive models. The data was divided into three groups. In addition, 70% of the data was used for the design of the network, 15% was used for validation, and 15% for testing. The hidden layer activation-functions, output layer activation-function, and the number of hidden neurons are selected using the methodology based on statistical tests and least-squares estimation. Models were created by combining different types of activation functions and a different number of hidden neurons. The selection of the function was made from identity, logistic, hyperbolic tangent, and exponential function. To find the optimum number of hidden neurons, various numbers of neurons were examined. The various combination of activation functions and numbers of hidden neurons as described above were tested. Sum-of-squares was selected as the error function during the network training process. Training Algorithm BFGS (Broyden-Fletcher-Goldfarb-Shanno) was chosen for this work. Five models with the best accuracy were selected and described in Table 3.  Figure 7 shows the schemes of regressions for all data sets according to each of the MLP models. The plots explain the correlation between the real values and the MLP model output. The solid line in each plot represents the best linear fit between the output and target values. In Table 4, sensitivity coefficients are presented. The analysis describes the change in the system's outputs due to variations in the parameters that affect the system. Performing the sensitivity analysis consists of controlling how the network error behaves in the case of fluctuations of the independent variables. For each input variable, its values are converted to the mean (from the training set) so that it does not contribute any information to the model. After supplying such modified data to the network input, the final prediction error is checked. A larger error value means that the model depends on the proposed variable. The higher the value of the sensitivity analysis coefficients, the greater the importance of a given variable for a good fit of the model. According to the statistical analysis and the analysis of the sensitivity of neural networks, a clear impact on energy consumption is noticeable in the case of parameters such as relative humidity, maximum wind speed, occupancy level, hour, and day of the week

Support Vectors Machines
As mentioned above, ranges of gamma, C, and epsilon parameters were defined and tested in the search for optimal values. Below, in Table 5, models with given characteristic parameters are defined which were characterized by the best fit during the tests. In Figure 8, the relationship between the real energy consumptions and the predicted values was plotted. The line of a theoretical perfect 1:1 match line was marked in red. Based on the coefficients defined in Section 2.3, selected models of neural networks were compared. As previously mentioned, five matching indexes were selected for this purpose: MAE, RMSE, WAPE, CV, and correlation coefficient (r). The results for cooling consumption are presented in Table 6. Similarly, for selected SVM models, the coefficient values are summarized in Table 7.  Figure 9 shows comparison of the real values and predicted results of the MLP and SVM models with the high accuracy; it is MLP 2 and an SVM 4 model. The figure shows the real values of hourly consumption of cooling energy in the analyzed period with a dashed gray line. The blue color marks the results obtained with the MLP 2 model, which received the best results among the proposed ANN networks, and the red color indicates SVM 4, analogically the best among the presented SVM models. In both of the proposed models, the worst effects present at predicting extreme values, where the cooling load is very high or very low. Comparing the models with each other, it is noticeable that neural networks perform better in this matter, and the difference between the real load and the predicted value is significantly smaller.

Discussion
The analysis of the cooling energy load in the hotel building showed that, based on several parameters characterizing the external conditions, building using conditions and time, it is possible to estimate the overall cooling load of the building. The analysis used nine parameters, including hour, day of the week, average temperature, occupancy level, wind direction, average wind speed, maximum wind speed, total hourly precipitation, and relative humidity. The external temperature has an obvious influence on energy consumption, which determines the demand for cooling energy. As shown by the preliminary analysis, relative humidity, wind speed, and direction can also be considered significant factors. Despite the low correlation coefficients of the time parameters (hour and day of the week) and the occupancy level, it was decided that, in the general model, they may be significant; therefore, they were not omitted in further analysis. Based on the assumed parameters, five models of neural networks based on the MLP algorithm and four SVM models with different configurations of parameters defining the models were proposed. Five model evaluation indicators were used to check the quality of the models shown: the mean absolute error (MAE), root mean square error (RMSE), weighted absolute percentage error (WAPE), coefficient of variance (CV), and coefficient of determination (r). Among all the proposals, a better fit was found for the ANN models, the correlation coefficient of which did not fall below 0.9. As shown by the sensitivity analysis of inputs (Table 4), time and occupancy level played an important role in the model, despite the seemingly low importance of these parameters. Total hourly precipitation had the least impact on the overall result. The selected neural networks are characterized by the WAPE coefficient ranging from 19.93 to 22.77% and the MAE coefficient of 10.27 to 11.80 kWh/h. The best of the proposed models, i.e., MLP 2, achieved the value of the correlation coefficient r at the level of 0.93. For comparison, the mean absolute error for the proposed SVM models varies from 13.13 to 14.46 kWh/h, and the weighted absolute percentage error from 25.45 to 28.04%. The most precise SVM model-SVM 4-is characterized by a correlation coefficient of 0.88. The proposed prediction methods are widely used for energy prediction due to the possibility of their application in nonlinear dependencies of many variables. As the results show, the use of neural networks in energy prediction enables the achievement of better model fit coefficients. Both methods used were based on the nine variables mentioned above. The greatest differences between the proposed models are visible in the extreme values. The SVM model performs much worse at very low and very high cooling loads. In the event of high values of cooling energy consumption, both the ANN and SVM models lower the predicted values compared to the actual values. This is especially noticeable with the SVM model, which directly affects the lower fit factors.

Conclusions
Reducing energy consumption is an issue that is becoming more and more popular nowadays. This is related to both the obvious economic aspects as well as the growing awareness of the society regarding the limitation of human impact on the environment, including the exploitation of non-renewable resources and emissions of pollutants into the environment. There are new solutions on the market to reduce the energy demand of buildings. Systems of proper management of energy demand, especially in combined energy economies, are also becoming more and more popular. The key issue in such solutions is the ability to accurately determine the demand for energy at a given moment. As a consequence, machine learning techniques are also becoming more and more popular, used to predict the energy load of a building.
The article presents two popular methods of energy prediction: neural networks and support vector machines. For each of the methods, several models differing in characteristic parameters and selected optimization methods are presented. The subject of the analysis is a building of historical importance, the modernization of which is limited due to the minimization of interference with the cubature and the overall appearance of the facility. In addition to replacing the heat source and internal installations, one of the effective methods of reducing operating costs may be the proper management of energy installations, which requires a building energy consumption forecasting system. The models use parameters that may affect consumption, both characterizing external conditions, time of use, and the number of guests. Based on the collected data, five models of neural networks and four SVM models were presented. Each of them was compared according to the proposed forecasting accuracy coefficients. The analysis showed that, despite the initially insignificant influence of some parameters on the obtained results, they played an important role in the predictive model. The best fit coefficients were obtained for models using artificial neural networks to predict the heating load. The proposed model made it possible to estimate the demand for cooling energy with a matching coefficient of 0.93. The quality of the model can be improved by extending the analysis time to several summer seasons. Hotel buildings are a specific object due to the users who have different preferences as to the conditions inside the rooms. Individual control allows them to maintain thermal comfort by changing the temperature, and thus their behavior directly affects energy consumption for cooling purposes.