A Review of Energy Consumption Forecasting in Smart Buildings: Methods, Input Variables, Forecasting Horizon and Metrics

: Buildings are among the largest energy consumers in the world. As new technologies have been developed, great advances have been made in buildings, turning conventional buildings into smart buildings. These smart buildings have allowed for greater supervision and control of the energy resources within the buildings, taking steps to energy management strategies to achieve signiﬁcant energy savings. The forecast of energy consumption in buildings has been a very important element in these energy strategies since it allows adjusting the operation of buildings so that energy can be used more e ﬃ ciently. This paper presents a review of energy consumption forecasting in smart buildings for improving energy e ﬃ ciency. Di ﬀ erent forecasting methods are studied in nonresidential and residential buildings. Following this, the literature is analyzed in terms of forecasting objectives, input variables, forecasting methods and prediction horizon. In conclusion, the paper examines future challenges for building energy consumption forecasting.


Introduction
Energy efficiency is a general concern, from people to governments, since it yields efficient reserve funds, lessens ozone-depleting substance outflows and lightens energy requirements [1]. In recent years, carbon dioxide (CO 2 ) emissions from buildings have been on the rise after a reduction between 2013 and 2016. In 2019, CO 2 emissions reached a total of 10 GtCO 2 , the highest level recorded [2]. The decrease in building energy consumption is important to alleviate greenhouse gas emissions and help to advance sustainable building practices [3]. Noteworthy changes to decrease building operating expenses and assets arrangement may be reached through cutting-edge control techniques. Some of these techniques utilize forecasts of unsettling influences to foresee future building behavior and select an ideal arrangement of activities [4].
Forecasting is aimed at anticipating the future as precisely as possible, given the entirety of the data accessible, and is one of the most significant instruments for a proactive energy management system [5,6]. Lately, much consideration has been paid to advancement of energy utilization in the This paper begins with Section 2 by describing the methodology used for the review. Section 3 presents the methods, objectives, input variables, horizon and metrics used to support the forecasting of energy consumption in buildings. Section 4 discusses previous studies, and Section 5 presents future challenges in building energy consumption forecasting. Finally, in Section 6, conclusions are presented.

Methodology
For the realization of this review, the following methodology [15,16] was used: 1.
Data gathering: several searches were carried out in the Web of Science and Scopus databases using search criteria such as keywords, types of articles, and publication time. Keywords such as building forecasting, building energy estimation and building energy consumption forecasting were used. The types of articles chosen were review articles and research articles with a publication time of no more than five years. These databases were selected because they allow a more complete vision of the subject since information can be obtained from multiple publishers.

2.
Data filtering: after obtaining the results of the searches, with the help of a reference manager, the articles were selected base on the title, keywords and abstract to later eliminate the articles that were not relevant to the research. 3.
Subtopics selection: the filtered articles were analyzed so that a relationship could be made between them, and then subtopics selected that would be used in the paper.

4.
New data gathering: a new search was carried out focused on the defined structure to maintain a recent literature review. In this case, several searches were carried out in the databases of the publishers that offered scientific journals with topics related to the research. 5.
Results analysis: a critical analysis of the data obtained was carried out, which resulted in the conclusions presented in this article.

Building Energy Consumption Forecasting
Building energy utilization is influenced by the building envelope, heating, ventilation and air conditioning (HVAC), occupants' behavior and lighting [17]. Building energy forecasting can be sorted into five categories: heating energy, cooling energy, heating and cooling energy, whole-building energy and others [18]. In this research, energy consumption is studied from the electrical demand approach.

Objectives of Forecasting in Buildings
Forecasting in buildings aims to achieve different objectives (see Figure 1) such as: (a) confirm and measure the impact of energy-saving activities [19] and once the guidelines have been drawn up and implemented to obtain reductions in energy consumption, this objective pursues to validate that these guidelines have the expected results; (b) assume the energy needs considering normal requirements, which seeks to anticipate events that may modify the usual energy consumption of the systems, such as a sudden change in temperature that may affect the occupant's comfort; and (c) indicate the variations in energy consumption of events at specific times; once an event that may alter energy consumption has occurred, this objective pursues to determine how much the variation in energy consumption would be. These forecasts can be used in the organization and distribution of goods to meet the need [20]. and implemented to obtain reductions in energy consumption, this objective pursues to validate that these guidelines have the expected results; (b) assume the energy needs considering normal requirements, which seeks to anticipate events that may modify the usual energy consumption of the systems, such as a sudden change in temperature that may affect the occupant's comfort; and (c) indicate the variations in energy consumption of events at specific times; once an event that may alter energy consumption has occurred, this objective pursues to determine how much the variation in energy consumption would be. These forecasts can be used in the organization and distribution of goods to meet the need [20].
Building energy consumption forecasting is critical for building performance enhancements, energy management and reserves, detecting system faults and optimization of intelligent building process [21,22]. It is commonly a noteworthy segment to permit the control framework to decide ideal control settings to accomplish energy or cost investment funds. The exactness of energy use estimation legitimately impacts the general control execution and energy/cost investment funds [23]. Consequently, the more precise the prediction, the more prominent the advantages the building proprietors procure. Despite what might be expected, a vulnerability in the estimation lessens the space for efficient energy management, which brings about pointless expenses. Thus, it is important to improve energy utilization forecasting [24].

Forecasting Methods
Forecasting methods can successfully anticipate energy utilization by creating a relationship between energy and the system that consumes it by reducing the waste created by oversupply and undersupply [25]. In recent years, different techniques have been proposed to capture this knowledge in the form of predictions [26]. In the building segment, smart meters that measure and transmit energy usage are being widely installed. These open the door to new applications and results in the energy sector that allow for better forecasting accuracy [27]. Energy utilization forecasting for buildings has a huge incentive in energy proficiency and manageability research. Precise energy forecasting methods have various ramifications in arranging and energy optimization [28]. A great deal of building energy forecasting methods have been created in the previous two decades from different points of view [29].
There are three fundamental methodologies in building energy forecasting and modeling: physical, data-driven and hybrid methods [30,31]. Physical methods estimate energy use using thermodynamic rules to solve the heat and mass balance inside a building, which is also called a Building energy consumption forecasting is critical for building performance enhancements, energy management and reserves, detecting system faults and optimization of intelligent building process [21,22]. It is commonly a noteworthy segment to permit the control framework to decide ideal control settings to accomplish energy or cost investment funds. The exactness of energy use estimation legitimately impacts the general control execution and energy/cost investment funds [23]. Consequently, the more precise the prediction, the more prominent the advantages the building proprietors procure. Despite what might be expected, a vulnerability in the estimation lessens the space for efficient energy management, which brings about pointless expenses. Thus, it is important to improve energy utilization forecasting [24].

Forecasting Methods
Forecasting methods can successfully anticipate energy utilization by creating a relationship between energy and the system that consumes it by reducing the waste created by oversupply and undersupply [25]. In recent years, different techniques have been proposed to capture this knowledge in the form of predictions [26]. In the building segment, smart meters that measure and transmit energy usage are being widely installed. These open the door to new applications and results in the energy sector that allow for better forecasting accuracy [27]. Energy utilization forecasting for buildings has a huge incentive in energy proficiency and manageability research. Precise energy forecasting methods have various ramifications in arranging and energy optimization [28]. A great deal of building energy forecasting methods have been created in the previous two decades from different points of view [29].
There are three fundamental methodologies in building energy forecasting and modeling: physical, data-driven and hybrid methods [30,31]. Physical methods estimate energy use using thermodynamic rules to solve the heat and mass balance inside a building, which is also called a "white-box" as the internal logic is known [32]. Data-driven depends on time-series statistical assessments and machine learning s of rules to evaluate and estimate the building energy utilization, and is also called a black-box since it predicts energy utilization ignoring the physical characteristics of the building [33]. The hybrid method known as a grey-box, which was first presented in the 1990s to improve HVAC control frameworks' effectiveness [34], and combines physical and data-driven methods [35,36].
Physical methods permit monitoring and modeling and investigate the cycle bit by bit where all the conditions are known [37]. However, they cannot deal with the complex energy resulting from the occupants' behavior in this manner, bringing about huge forecast mistakes. Therefore, these models are not commonly used for exact load expectations [38]. To build up an accurate physical method, many input variables are required, which makes it complex to acquire all the necessary information. More significantly, the unsure and unreliable data suggest a difference between the model outcomes and reality [39]. There have been studies on physical methods that have focused on-the demand forecast model for several energy sources [40], namely energy consumption for a building elevator [41], electrical consumption for cooling [42,43], energy demand [44][45][46], load forecasting [47], electric and heat load [48] and heating consumption [49]. Based on the aforementioned studies, a summary of their contributions and limitations is presented in Table 1.

Reference
Author Contribution Limitation [40] Ha et al.
Energy demand methods to predict yearly energy demand for nonresidential buildings.
The methods proposed are not appropriate for the long-term.
A forecasting model for a building elevator using seasonal autoregressive integrated moving average (SARIMA).
Variables such as social parameters, energy-related factors and schedules were excluded.
A strategy to evaluate the national cooling load of the building and, subsequently, conjecture is drawn out power utilization dependent on two particular situations.
The yearly mean temperature was excluded from the rundown of autonomous factors.
A method to forecast cooling energy in a whole building using system identification.
Just one of the precooling demand response activities was tried in the research because of the analysis plans.

[44] Yu
A two-advance method to deal with determining city-wide building energy demand.
Occupant behavior was not considered when making the method, and some nonresidential buildings were considered with constant energy consumption.
A method to forecast airport building electricity demand based on flight schedule data using regression analysis.
The research evaluated the number of travelers by accepting that all seats on constant skyline were involved.
An approach for demonstrating and projecting energy utilization in residential buildings until 2040.
Insufficient information on the behavior of users in residential buildings.
[47] Lee A short-term load prediction method for energy management systems in nonresidential buildings.
The research did not focus on high forecasting exactness yet inspected the load estimating strategies to survey their effortlessness and cost-effectiveness. Excluded examination of load profiles for industrial buildings, and electric vehicles.
A method for estimating thermal energy utilization in residential buildings.
In general, the forecasting model presented a noteworthy prognostic capacity but, in the case of electricity consumption for cooling purposes, the model showed lower capacity.
A method to estimate the building energy utilization utilizing a recurrent neural network (RNN).
No cross-validation was used because of restrictions in the accessibility of calculation assets.
A forecasting method for daily electricity utilization using multiple regression techniques.
No genuine information was accessible for building occupancy and in this manner, an intermediary variable was utilized to repay the impact of occupancy. A method to forecast electrical energy utilization in residential buildings, which gives day-ahead estimation utilizing a deep residual neural network.
The forecast was made for several residential buildings individually, the option for clustering the residential building for the forecasting was not analyzed.
A multiple linear regression (MLR) method for estimating the thermal heating or cooling energy demand of buildings.
The method was evaluated in nonresidential buildings created in a virtual environment.
A methodology to forecast net demand, photovoltaic power generation, and electricity consumption using a Gaussian process (GP).
The dynamic technique experienced issues anticipating unexpected peak in the time arrangement, which was likely an outcome of a too restricted moving preparing window.
A methodology utilizing a component extraction and an ANN to make a one-day-ahead estimation of the power utilization profile for a nonresidential building.
The methodology gave a day-ahead power utilization profile with subhourly spans.
A method to forecast electrical load in large commercial buildings using RNN with long-short term memory.
Due to computational limitations, the dataset with which the model was trained could not be fully used.
[62] Cerquitelli et al. A methodology to forecast power utilization on a large scale.
The forecasting methodology did not include physical model information.
A coordinated strategy for short-term forecasting utilizing machine learning calculation to forecast energy consumption.
A restriction was that climate information was just estimated values, so there was no blunder likelihood for the climate conjecture.
A method for short-term load estimation in a district building utilizing ANN.
The occupancy was determined using occupancy indicators based on calendar data.
A building load prediction model thinking about vulnerabilities in climate estimations and irregular peak load using ANN.
The load forecast contained estimates of typical load and unusual maximum differential load.
A short-term electrical energy utilization forecast method that concentrates on exhaustive meteorological perceptions for a hospital complex.
The method can only be used in buildings with the same climate conditions and energy profiles.
A short-term load forecasting approach is based on the SVR method for nonresidential buildings.
This approach just anticipated the load benchmark for eight hours on working day. Some load occasions might be shorter, and model expectation exactness levels may fluctuate.
A methodology for a day-ahead photovoltaic power generation probabilistic prediction for building energy management system applications.
The methodology was tested in a specific climate and location.
A method to forecast thermal and electricity demand in a nonresidential building.
The method excluded the building's physical parameters.
To utilize the models that support the area of cooling load demand forecasting for short-term and medium-term.
As the number of samples increased, the accuracy of the method decreased due to particular aspects of the load curve [72] Deb et al.
An approach to estimate diurnal cooling load energy utilization for nonresidential building utilizing ANN.
The occupancy information for the building was not included in the data analysis. An ANN-based approach to forecast cooling and heating load in residential buildings.
Just a single climatic zone was included in the development of the method.
A method to estimate energy utilization supported by alternative information sources, for example, the number of vehicles in a parking area.
The method for energy forecasting was based on the fact that the occupancy prediction model was accurate.
A forecasting model to characterize and estimate the energy utilization of residential and nonresidential buildings using machine learning.
The method created was restricted to residential and nonresidential buildings from a topographical zone.
A methodology to forecast peak load demand in nonresidential buildings using ANN with external variables.
The methodology did not consider the occupancy in the forecast of peak load demand.
A methodology to estimate the building heating and cooling load utilization to discover the peak load of a water source heat pump in the early and operation stage.
This methodology applies just to buildings and service companies that have sufficient monitoring information, and is proper for building without retrofitting in the computing time frame. A method to forecast electric energy consumption in an office building using ANN.
The method did not consider building occupancy.
The hybrid methods need approaches to recognize and mirror the timetable and occupants' intensity change, plug loads, and lighting [82]. For existing buildings with accessible monitoring information, the hybrid method is considered to consolidate the best of two universes: physical understanding and model structure, and boundary estimation and measurable framework [83]. Using a hybrid method frequently requires long computation time because of the boundary advancement procedure and master information during the model improvement process [84]. There have been studies on hybrid methods that have focused on electrical consumption [85][86][87][88][89][90][91][92], cooling and heating load [79,80,[93][94][95], energy consumption [96][97][98][99][100][101], thermal load [102], thermal response [103] and load demand [104]. Based on the aforementioned studies, a summary of their contributions and limitations is presented in Table 3. A hybrid method incorporating statistical and artificial intelligence models using the data entropy-based weighting technique to foresee electricity utilization.
The model is suitable only for medium-term electricity utilization forecasts.
A forecasting method for the energy consumption of healthcare customers using simple multivariate analysis methods.
When the method was tested in another building, order selection required approving the number of segments to be remembered for terms of the eigenvalue profile.
A hybrid method to forecast electricity load-dependent on consolidated improved Elman neural system and novel shark smell advancement calculation.
The model is intended to be used only in short-term prediction.
An estimating strategy for the power load of a nonresidential building utilizing a hybrid method including K-means and autoregressive integrated moving average (ARIMA).
The technique was proposed for the power load decrease in nonresidential buildings. A method to forecast multiple electric energy utilization of an intelligent building utilizing transfer learning and long short-term memory (LSTM).
The method was only tested in residential buildings.
An LSTM RNN approach to estimate load consumption in nonresidential buildings.
The approach requires an adequate inputs selection for a given precision.
A methodology for future electricity forecasts in nonresidential and residential buildings using a convolutional neural network with an LSTM. autoencoder.
Two datasets were used; in one dataset the energy consumption was carried out with three meters while in the other only one was used.
[93] Xuan et al. Needs more computational time than constituent models to locate the best estimations of the tuning boundaries and does not completely clarify the connection between the indicator factors and the reaction factors.
An energy utilization forecasting model for exact building energy determination that utilizes an improved sine-cosine optimization algorithm and long short-term memory networks.
The investigation on the effect of the characteristics (power and climatic-related) on the power utilization system was not completed.
A hybrid method for the building's electricity consumption forecasting.
The methods proposed are not appropriate for the short term and must be utilized for the medium term.
An ensemble method to achieve short-term forecasting of building energy consumption.
The parameter optimization methodology needs further investigation. The method was evaluated in nonresidential buildings created in a virtual environment.
A methodology for mimicking the thermal behavior of the building dependent on gathered information utilizing a hybrid method.
The methodology was tested in a specific climate.
A method to estimate the load demand of residential buildings with a one-hour goal using deep learning.
The method expects the information on future climate data to make a conjecture, which would influence the exactness.

Input Variables
Essentially, the most significant and highly correlated input variables may bring better forecast outcomes [105]. Input variables can be categorized (see Figure 2) into historical, time type, occupancy, and climatic. Historical variables, for example, record energy as the main input, showing a load profile pattern in numerical form. Occupation variables refer to human behavior and occupation hours. Climatic variables are obtained using methods for climatic stations [106]. [99] al.
short-term forecasting of building energy consumption.
methodology needs further investigation.
A method to forecast building energy consumption of an office building using deep learning techniques.
The method requires more calculation time in the training stage due to the previous data preparation steps.
A hybrid approach that consolidates the time arrangement model and ANN to improve the forecast exactness of building thermal load.
The method was evaluated in nonresidential buildings created in a virtual environment.
A methodology for mimicking the thermal behavior of the building dependent on gathered information utilizing a hybrid method.
The methodology was tested in a specific climate.
A method to estimate the load demand of residential buildings with a one-hour goal using deep learning.
The method expects the information on future climate data to make a conjecture, which would influence the exactness.

Input Variables
Essentially, the most significant and highly correlated input variables may bring better forecast outcomes [105]. Input variables can be categorized (see Figure 2) into historical, time type, occupancy, and climatic. Historical variables, for example, record energy as the main input, showing a load profile pattern in numerical form. Occupation variables refer to human behavior and occupation hours. Climatic variables are obtained using methods for climatic stations [106].
A significant purpose of building energy utilization estimation lies in the commitment to the input parameters and timetable data of some virtual instruments [107]. Considering that there are many estimates of a building management system, the choice of the information parameters of a model strongly influences the exposure of a model. Therefore, choosing proper factors for a building energy forecasting method could prompt better performance [108]. Effective energy forecasting requires that many key factors be anticipated [109].  A significant purpose of building energy utilization estimation lies in the commitment to the input parameters and timetable data of some virtual instruments [107]. Considering that there are many estimates of a building management system, the choice of the information parameters of a model strongly influences the exposure of a model. Therefore, choosing proper factors for a building energy forecasting method could prompt better performance [108]. Effective energy forecasting requires that many key factors be anticipated [109].

Prediction Horizon
The forecasting horizon (see Figure 3) is usually classified as very short-term, short-term, medium-term and long-term. The very short-term forecast ranges from seconds or minutes to several hours [110]. Short-term extends for one hour to a week [111]. For the medium-term, the anticipating time ranges from weeks to months [112]. Long-term determination, as a rule, includes yearly forecasts of territorial or national power utilization [113]. Long term forecasting is commonly used to plan the improvement of the energy framework and to implement new appropriate production and storage systems [114]. Short and medium-term forecasts assume important tasks to promote the integration of sustainable energy sources and support more viable demand management [115,116]. Besides the forecasting horizon, the main contrast among them is the extent of the variables used: very short term utilization variables in the range of minutes or hours, short term utilization variables in the range of days, and medium and long term utilization variables in the range of weeks or even months [117].

Prediction Horizon
The forecasting horizon (see Figure 3) is usually classified as very short-term, short-term, medium-term and long-term. The very short-term forecast ranges from seconds or minutes to several hours [110]. Short-term extends for one hour to a week [111]. For the medium-term, the anticipating time ranges from weeks to months [112]. Long-term determination, as a rule, includes yearly forecasts of territorial or national power utilization [113]. Long term forecasting is commonly used to plan the improvement of the energy framework and to implement new appropriate production and storage systems [114]. Short and medium-term forecasts assume important tasks to promote the integration of sustainable energy sources and support more viable demand management [115,116]. Besides the forecasting horizon, the main contrast among them is the extent of the variables used: very short term utilization variables in the range of minutes or hours, short term utilization variables in the range of days, and medium and long term utilization variables in the range of weeks or even months [117].

Accuracy Metrics
A variety of accuracy metrics are used to validate the forecasting models, the most used being (see Figure 4) coefficient of variation of root mean square error (CVRMSE), mean absolute percentage error (MAPE), mean absolute error (MAE), root mean squared error (RMSE) and determination coefficient (R 2 ). Each of these metrics has a particular function. CVRMSE standardizes the expectation error and can give a helpful unitless metric. MAPE shows rate accuracy and decreases the impact of absolute errors caused by singular exceptions [118]. MAE depends on the absolute error and can show the normal separation between the anticipated value and the real value. RMSE is generally proposed as an expectation quality estimation and it is frequently used to analyze the precision of various anticipating standards [119]. The measurement punishes huge errors because it mathematically enhances mistakes [120]. R 2 assesses how a model approximates the real information, giving a metric of the consistency of the model [121].
Other accuracy metrics used by several researchers are normalized mean absolute error, expect error percentage, mean Absolute, relative error, mean square error, percentage of bias, weight absolute percentage error, and Pearson correlation coefficient.

Accuracy Metrics
A variety of accuracy metrics are used to validate the forecasting models, the most used being (see Figure 4) coefficient of variation of root mean square error (CVRMSE), mean absolute percentage error (MAPE), mean absolute error (MAE), root mean squared error (RMSE) and determination coefficient (R 2 ). Each of these metrics has a particular function. CVRMSE standardizes the expectation error and can give a helpful unitless metric. MAPE shows rate accuracy and decreases the impact of absolute errors caused by singular exceptions [118]. MAE depends on the absolute error and can show the normal separation between the anticipated value and the real value. RMSE is generally proposed as an expectation quality estimation and it is frequently used to analyze the precision of various anticipating standards [119]. The measurement punishes huge errors because it mathematically enhances mistakes [120]. R 2 assesses how a model approximates the real information, giving a metric of the consistency of the model [121].
Other accuracy metrics used by several researchers are normalized mean absolute error, expect error percentage, mean Absolute, relative error, mean square error, percentage of bias, weight absolute percentage error, and Pearson correlation coefficient. Appl. Sci. 2020, 10, x FOR PEER REVIEW 12 of 28

Discussion
Based on the review of previous research work, a summary based on building energy consumption forecasting methods is presented in Table 4.

Discussion
Based on the review of previous research work, a summary based on building energy consumption forecasting methods is presented in Table 4.     About 71.67% of the reviewed research efforts focused on developing building energy consumption forecasting methods for nonresidential, 18.33% focused on residential buildings and only 10% on both (see Figure 5).
Appl. Sci. 2020, 10, x FOR PEER REVIEW 19 of 28 About 71.67% of the reviewed research efforts focused on developing building energy consumption forecasting methods for nonresidential, 18.33% focused on residential buildings and only 10% on both (see Figure 5). Within the forecasting categories for building energy consumption, the most studied were whole-building energy with 63.3%. For whole-building energy about 48.3% focused on nonresidential buildings, 13.3% focused on residential buildings and 1.7% on both. The next category studied was cooling and heating energy with 13.2%. For this category about 8.3% focused on nonresidential buildings, 3.3% focused on a residential building, and 1.6% on both. Although the thermal comfort of the occupants is decisive in building energy consumption, a large part of the authors focused on forecasting the energy consumption of the entire building so that they could consider not only HVAC systems but also other systems, which represent a considerable consumption such as lighting and plug loads. On the other hand, the least studied was heating energy with 1.6% and was only considered in residential buildings (see Figure 6).  Within the forecasting categories for building energy consumption, the most studied were whole-building energy with 63.3%. For whole-building energy about 48.3% focused on nonresidential buildings, 13.3% focused on residential buildings and 1.7% on both. The next category studied was cooling and heating energy with 13.2%. For this category about 8.3% focused on nonresidential buildings, 3.3% focused on a residential building, and 1.6% on both. Although the thermal comfort of the occupants is decisive in building energy consumption, a large part of the authors focused on forecasting the energy consumption of the entire building so that they could consider not only HVAC systems but also other systems, which represent a considerable consumption such as lighting and plug loads. On the other hand, the least studied was heating energy with 1.6% and was only considered in residential buildings (see Figure 6). About 71.67% of the reviewed research efforts focused on developing building energy consumption forecasting methods for nonresidential, 18.33% focused on residential buildings and only 10% on both (see Figure 5). Within the forecasting categories for building energy consumption, the most studied were whole-building energy with 63.3%. For whole-building energy about 48.3% focused on nonresidential buildings, 13.3% focused on residential buildings and 1.7% on both. The next category studied was cooling and heating energy with 13.2%. For this category about 8.3% focused on nonresidential buildings, 3.3% focused on a residential building, and 1.6% on both. Although the thermal comfort of the occupants is decisive in building energy consumption, a large part of the authors focused on forecasting the energy consumption of the entire building so that they could consider not only HVAC systems but also other systems, which represent a considerable consumption such as lighting and plug loads. On the other hand, the least studied was heating energy with 1.6% and was only considered in residential buildings (see Figure 6).  For the prediction horizon, about 58.3% of the reviewed research focused on forecasting short-term, 23.3% focused on long-term, 13.4% focused on a very short term, and 5% on medium-term. The explanation could the increased use of demand-side management strategies such as load shifting, which allows shifting the load from on-peak hours to the off-peak hours and requires knowing the building energy consumption in a period of one to 24 h. It should be acknowledged that in recent research the very short-term horizon has grown, since it has been of great help in forecasting the availability of energy resources for the use of renewable energy in buildings (see Figure 7).
Appl. Sci. 2020, 10, x FOR PEER REVIEW 20 of 28 For the prediction horizon, about 58.3% of the reviewed research focused on forecasting shortterm, 23.3% focused on long-term, 13.4% focused on a very short term, and 5% on medium-term. The explanation could the increased use of demand-side management strategies such as load shifting, which allows shifting the load from on-peak hours to the off-peak hours and requires knowing the building energy consumption in a period of one to 24 hours. It should be acknowledged that in recent research the very short-term horizon has grown, since it has been of great help in forecasting the availability of energy resources for the use of renewable energy in buildings (see Figure 7). About 53.4% of the reviewed studies focused on using historical and calendar data on the forecasting methods, 41.7% focused on using historical, weather and calendar data, 3.3% focused on using historical, occupancy and calendar data, and only 1.6% use historical, weather, occupancy and calendar data. This could be because in current BEMS we can count on various sensors to record the energy consumption in the building, but the data related to the occupancy in many cases is not considered due to the complexity that the acquisition of these data can present depending on the nature of the building. On the other hand, having these data can further improve the accuracy of the prediction (see Figure 8).  About 53.4% of the reviewed studies focused on using historical and calendar data on the forecasting methods, 41.7% focused on using historical, weather and calendar data, 3.3% focused on using historical, occupancy and calendar data, and only 1.6% use historical, weather, occupancy and calendar data. This could be because in current BEMS we can count on various sensors to record the energy consumption in the building, but the data related to the occupancy in many cases is not considered due to the complexity that the acquisition of these data can present depending on the nature of the building. On the other hand, having these data can further improve the accuracy of the prediction (see Figure 8).
Appl. Sci. 2020, 10, x FOR PEER REVIEW 20 of 28 For the prediction horizon, about 58.3% of the reviewed research focused on forecasting shortterm, 23.3% focused on long-term, 13.4% focused on a very short term, and 5% on medium-term. The explanation could the increased use of demand-side management strategies such as load shifting, which allows shifting the load from on-peak hours to the off-peak hours and requires knowing the building energy consumption in a period of one to 24 hours. It should be acknowledged that in recent research the very short-term horizon has grown, since it has been of great help in forecasting the availability of energy resources for the use of renewable energy in buildings (see Figure 7). About 53.4% of the reviewed studies focused on using historical and calendar data on the forecasting methods, 41.7% focused on using historical, weather and calendar data, 3.3% focused on using historical, occupancy and calendar data, and only 1.6% use historical, weather, occupancy and calendar data. This could be because in current BEMS we can count on various sensors to record the energy consumption in the building, but the data related to the occupancy in many cases is not considered due to the complexity that the acquisition of these data can present depending on the nature of the building. On the other hand, having these data can further improve the accuracy of the prediction (see Figure 8).

Future challenges
Energy consumption forecasting is an important instrument that can help in the recognition, measurement and management of demand flexibility. In this aspect, some challenges need to be overcome in the future.
• Future lines of research should encourage the use of current methods (physical, data-driven and hybrid), allowing them to be relevant for the representation of the energy of buildings at various scales and in different environmental conditions [122]. Current methods need to address challenges such as forecast error compensation, dynamic model selection issues, adaptive predictive model design and data integrity [123].

•
In some forecasting methods based on machine learning, noise-free simulation data are embraced.
In this way the variety of energy performance is more predictable than that of energy simulation results [124], which lead to an overfitting or even wrong-fitting issues [125]. • Achieving high accuracy in forecasting energy use is critical to improving energy management.
In any case, this requires the determination of appropriate estimation models, ready to capture the individual attributes of the array to be anticipated, which is a task that includes a lot of uncertainties [126].

•
Since the energy frameworks of buildings have the essential function of meeting the needs of tenants, numerous investigations accepted a consistent schedule. For residential buildings, tenant patterns are more erratic and irregular, and the assumption of a coherent schedule is less reasonable [127]. The main causes of such inconsistencies are unrealistic inputs regarding tenant behavior and existing forecasting methods [128].

•
Forecasting methods need the ability to accurately predict when space is occupied [129]. Some research is still needed on building management systems in terms of tenant behavior and choices, e.g., a collaboration between the system and tenant preferences in terms of comfort and energy use, the adaptability of these systems to tenant behavior and the extent to which they can adjust to that behavior [130].
Considering the above challenges, it would not be possible to use a single forecasting method that could be applied to any building to meet all the requirements of the different application scenarios, taking also into account the preference of the occupants. Therefore, one should think about maximizing the potential of each of the methods by using criteria to select the best one for a specific application. Building prediction methods benefit economically and environmentally by creating energy flexibility strategies such as strategic conservation, flexible load shape, peak trimming and load shifting. These strategies are highly dependent on the behavior of the occupants, so it is necessary to create models that consider the preferences and decisions of the building's occupants, which would change depending on the nature of the building.

Conclusions
This paper presents an overview of energy consumption forecasting in intelligent buildings. It evaluates research related to different forecasting methods for buildings, such as physical, data-driven and hybrid methods, as far as residential and nonresidential buildings are concerned. The building forecasting categories, input variables and the prediction horizon used for each type of method were examined. The precise metrics used to validate the methods were evaluated. This paper ends with an analysis of the results found in each of the methods and topics of the research.
As observed in the review literature, most of the research focused on nonresidential buildings using data-based and hybrid methods that prioritize energy for the entire building, so that all existing systems in the buildings can be considered, but using only historical data and calendar data as input variables to predict system consumption. The results of this work show that some research topics may require further reflection, such as occupant behavior, which is important to more accurately predict energy consumption. The accuracy and precision of the sensors are important. In virtual testing environments that do not contemplate the error readings of the sensors, implementing sensor data in the model that do not come close to reality can give the false impression that the error is in the model. Future lines of research should not only focus on improving the use of methods by incorporating new techniques, but also on evaluating the input variables to obtain greater accuracy with the use of appropriate variables.