Artificial Intelligence Evolution in Smart Buildings for Energy Efficiency

The emerging concept of smart buildings, which requires the incorporation of sensors and big data (BD) and utilizes artificial intelligence (AI), promises to usher in a new age of urban energy efficiency. By using AI technologies in smart buildings, energy consumption can be reduced through better control, improved reliability, and automation. This paper is an in-depth review of recent studies on the application of artificial intelligence (AI) technologies in smart buildings through the concept of a building management system (BMS) and demand response programs (DRPs). In addition to elaborating on the principles and applications of the AI-based modeling approaches widely used in building energy use prediction, an evaluation framework is introduced and used for assessing the recent research conducted in this field and across the major AI domains, including energy, comfort, design, and maintenance. Finally, the paper includes a discussion on the open challenges and future directions of research on the application of AI in smart buildings.


Artificial Intelligence (AI) Evolution
Artificial intelligence (AI) can be defined as a set of computerized systems that perform tasks usually associated with human beings. It reaches or exceeds human intelligence as it achieves human-like levels of perception, reasoning, interacting, and learning. Like human beings, artificial intelligence systems in intelligent machines can instigate changes in their own behavior without explicit re-programming. Intelligence, then, can be defined as the ability to learn from one's environment and apply that knowledge to situations which have, until that particular point in time, not been encountered.
As intelligent creatures, human beings have the inherent ability to learn from their environment and respond to new situations by integrating new experiences with their knowledge base. This process of learning and applying knowledge is what differentiates intelligent beings from "unintelligent" machines or non-automated machines. Therefore, a machine that can take information from its environment and make decisions on projected future data based on the past data can be said to be intelligent. Essentially, AI can be defined as the process of demonstrating that intelligence.
The history of AI can be traced to medieval times. In the more distant past, Aristotle (384-322 B.C) formulated laws governing the rational part of the mind. The laws of thought that Aristotle believed oversee the operation of the mind constituted the cornerstone in the field of logic [1,2]. Medieval logicians vastly expanded the concept of logic as a field of study in the 16th century. The calculating machines made since then captured the imagination of great thinkers who pioneered great developments.

AI and Urban Energy Transitions
Urban systems consist of numerous multi-level dynamic units that serve as integral features in the organization of societies. These units govern the smooth running of society and the control of political frameworks, and they also play essential roles in many aspects of the urban form [15]. Flexibility, efficiency, and sustainability are required in the technological structures that are responsible for the smooth operation of the interconnected units in the urban environment. As the global population grows and the pace of urbanization continues unabated, the construction of smart cities with large commercial and residential buildings is expected to accelerate. Information and communication technologies and the Internet of Things (IoT) methodologies are central to the creation of smart cities. The implementation of these technologies in modern cities is driving the transition from the twentieth-century concept of cities to the smart cities of the future [16].
A key observation here is that while alternatives may be found for many aspects of traditional city living, there is no substitute for energy or power from sources, as the whole edifice of modern life is built upon it. Energy is absolutely indispensable in the smoothrunning of essential urban elements. The impact of the specific type of energy sources, their availability, and their pattern of utilization is considerable in the urban environment [17]. To maintain stability and efficiently drive the collective intelligent infrastructure of smart cities, a stable urban energy system that utilizes a smart technological framework must be established. It is expected that considerable energy savings will be a feature of these more productive, more comfortable, and more sustainable cities of the future [18,19]. The efficiency and reliability of communication systems, transportation networks, sewage and water systems, production and the service industry, buildings, and the utilities in the human habitat depend on an efficient and intelligent urban energy structure.
Significant advances in computer and communication technologies in recent years have led to the use of AI in urban energy transitions. Intelligent control enabled by the utilization of computer simulations has automated the management of energy in a variety of urban environments. The rapidly expanding role of AI in urban planning is largely due to its wide-ranging potential and its ability to sustain autonomous operations. While many in the general public still tend to consider AI a far-fetched idea that belongs to the realm of science fiction, AI-systems have already become a reality in the modern infrastructure. Recent developments in AI have led to progress in solving the urban aspects of impulsiveness, uncertainty, mismatch, complexity, and the discrepancies of evolution. AI technologies have given us automated tools to design, analyze, simulate, control, diagnose, and supply reliable energy within urban neighborhoods. These tools are capable of allocating energy resources as well as managing supply and demand to ensure the efficiency and the cost-effective operation of the grid.
AI is indisputably well suited to govern urban energy systems flexibly by using real-time data [20][21][22]. It was shown to be highly capable of running the autonomous grid management system by successfully optimizing energy consumption through the enhanced efficient management of supply and demand, and also by carrying out the auto-maintenance of energy infrastructure. AI can also reduce peak loads and stabilize the grid [23][24][25]. By utilizing energy demand and supply forecasts, AI-based prediction models can optimize dispatch and minimize the operation cost of power generation as a consequence, while power plants meet demand and operate within the operational constraints of the power network for extended periods of changing conditions [26]. By utilizing big data (BD) and AI, the demand response and end-use energy efficiency are optimized, and the energy bills on the premises are reduced [27,28].
IoT and AI today are at the top of the agenda of all the leading technology. The studies on the future of building technology show that requirements are undergoing lasting changes. The need for security will play an even more significant role in the future. Flexibility and dynamics will be the basic requirements for system operation. Maximum efficiency will have a top priority. One of the current global challenges in buildings is to increase energy efficiency while upgrading the comfort level, health, and safety of their inhabitants. AI seems to be the only solution that creates the greatest synergies between energy efficiency, comfort, adaptability, safety, and security, all of which can be sustainable over the long term. AI turns buildings into living organisms: networked, intelligent, and adaptable to the changing needs of their operators and users. An intelligent energy management system controls the interplay between internal consumers, producers, and the energy mix of public power grids.
AI can help overcome the challenges in developing energy-efficient buildings by increasing the rate of energy savings, facilitating on-site generation, detecting and minimizing operation faults, as well as controlling and ensuring continued energy savings [29]. The benefits that come from desiring optimum energy savings will be secured by integrating advanced reporting on-board visualization diagnostics and cloud connectivity. Having multiple control systems creates complexities and ultimately results in high costs in buildings. Therefore, adopting a digital transformation mindset when deploying AI solutions will lower operational costs while maximizing the overall energy performance of the building. Case studies discussed in [30] have highlighted the role of AI in ventilation control strategies and integrated air pre-heaters, which manifested about 26% energy savings in commercial buildings in the US. The following section addresses the applications of AI in improving energy efficiency in buildings and integrated communities.

What Will Be Elucidated in This Paper
According to the discussion, the problem of energy conservation in buildings is a multidimensional one. It remains a challenging and yet rewarding study. AI can offer a possible solution to this problem by providing energy efficiency, comfort, health and productivity in living spaces. On this basis, the major objective of this research is to review, analyze, and identify the application of AI and AI-based approaches in smart buildings, especially for building energy efficiency. The review method in this paper includes the establishment of a comprehensive database, through search string design, bibliographic analysis, and content analysis of over 150 articles. The database consists of relevant publications on the topic of current research, namely AI in smart buildings, and data are taken from reliable and comprehensive databases such as Scopus and Web of Science.
The paper is organized as follows. In Section 2, the principles of a cyber-physical system in a smart building are explained, and then the role of AI in demand side management through the implementation of the demand response programs is discussed. In Section 3, the main aspects of an AI-based approach infrastructure in buildings are thoroughly reviewed and compared by addressing the most recent studies. Finally, the opportunities and challenges of AI-based applications for smart building implementation are summarized.

Application of AI to Smart and Energy-Efficient Buildings
A recent survey on the energy consumption in buildings revealed their high levels of energy consumption. In a global study conducted by the International Energy Agency, it was shown that buildings account for 71% of the total electricity and 39% of the final energy consumption in an urban area; furthermore, buildings are responsible for close to 40% of the total carbon dioxide emissions in urban areas [31].
The most promising application of AI in urban energy systems is the advent of smart buildings. Smart buildings are equipped with numerous sensors, subsystems, and actuators, and their many advanced and smart automation monitoring and control tools can be utilized for energy-saving purposes. These reductions in energy consumption are accompanied by simultaneous reductions in greenhouse gas emissions. It was shown that the potential impact of smart buildings is in urban areas toward protecting the environment, reducing the running costs of buildings, and conserving energy [32][33][34][35].
The smart building is a concept representative of the modern infrastructure. It includes automated control systems and utilizes data to optimize the building's performance and the level of comfort experienced by its inhabitants [36]. It provides a cyber-physical system (CPS) that integrates the cyber world; it also combines sensing devices, controllers, and metering components with the physical world, which includes various electric appliances and electronic devices ( Figure 1).
The smart building concept is based on the correct assumption that free interactions between both worlds yield advantages. As technology advances, the presence of AI technologies in smart buildings becomes more pronounced. The joint development of ever smaller, more energy-efficient sensors and communication procedures with parallel advances in hardware and software technologies provides simpler possibilities for evaluating, monitoring, and interacting with the environment [38]. Efficiency is constantly being improved with the lower operating and maintenance costs and the reductions in energy consumption as well as with parallel improvements in the comfort level and safety conditions for the inhabitants of the buildings [39]. This concept, known as the building management system (BMS), hints at the potential of AI to greatly enhance in the future not only the efficiency of buildings but also the experience of living in them. Appl. Sci. 2021, 11, x FOR PEER REVIEW 5 of 26 Figure 1. A cyber-physical system in a smart building (adapted from [37]).
The smart building concept is based on the correct assumption that free interactions between both worlds yield advantages. As technology advances, the presence of AI technologies in smart buildings becomes more pronounced. The joint development of ever smaller, more energy-efficient sensors and communication procedures with parallel advances in hardware and software technologies provides simpler possibilities for evaluating, monitoring, and interacting with the environment [38]. Efficiency is constantly being improved with the lower operating and maintenance costs and the reductions in energy consumption as well as with parallel improvements in the comfort level and safety conditions for the inhabitants of the buildings [39]. This concept, known as the building management system (BMS), hints at the potential of AI to greatly enhance in the future not only the efficiency of buildings but also the experience of living in them.
Smart buildings and smart homes are essential components of smart grids. Demand side management (DSM) plays a crucial role in the concept of smart grid (SG) by developing diverse and flexible strategies to conserve the stability of the grid. The purpose of DSM is to overcome the challenges of the traditional grid by strategically planning and contributing to the control and management of demand loads of electricity [40,41]. AI features strongly in automated energy systems that integrate demand response programs (DRPs) and learn from human behavior to reduce user discomfort and to determine the required level of human-controller interaction [42].
DRPs can be viewed as institution-led efforts to reduce the energy demand by inducing changes in energy consumption in response to changes in tariffs or incentive payments. The application of DRPs to smart grids equipped with renewable energy resources has been studied extensively [43][44][45]. As shown in Figure 2, DRPs can be classified into time-based rate (TBR) programs and incentive-based programs (IBPs).
TBR programs are based mostly on dynamic pricing, which aims to smooth the load by varying consumer electricity prices based on the time of day. These programs are designed to encourage consumers to react sensitively to the reduced rate of electricity at certain times of the day. TBR programs propose an optimal and automatic residential scheduling of energy consumption to minimize the electricity payment and minimize the operation waiting time of each appliance by taking into account the consumer's lifestyle Smart buildings and smart homes are essential components of smart grids. Demand side management (DSM) plays a crucial role in the concept of smart grid (SG) by developing diverse and flexible strategies to conserve the stability of the grid. The purpose of DSM is to overcome the challenges of the traditional grid by strategically planning and contributing to the control and management of demand loads of electricity [40,41]. AI features strongly in automated energy systems that integrate demand response programs (DRPs) and learn from human behavior to reduce user discomfort and to determine the required level of human-controller interaction [42].
DRPs can be viewed as institution-led efforts to reduce the energy demand by inducing changes in energy consumption in response to changes in tariffs or incentive payments. The application of DRPs to smart grids equipped with renewable energy resources has been studied extensively [43][44][45]. As shown in Figure 2, DRPs can be classified into time-based rate (TBR) programs and incentive-based programs (IBPs).
TBR programs are based mostly on dynamic pricing, which aims to smooth the load by varying consumer electricity prices based on the time of day. These programs are designed to encourage consumers to react sensitively to the reduced rate of electricity at certain times of the day. TBR programs propose an optimal and automatic residential scheduling of energy consumption to minimize the electricity payment and minimize the operation waiting time of each appliance by taking into account the consumer's lifestyle as well as environment/social factors [46,47]. Kato et al. investigated maximum-saving behavior as a response to the summer residential critical peak price (CPP) in an apartment complex in Japan [48]. However, the concept of an IBP requires consumers to contribute voluntarily to a pattern in which the system operator directly turns off some appliances to reduce consumer energy usage during peak time [49].
A direct load control (DLC) program aims to minimize energy demand by combining the flexibility from shared energy storage systems and the DLC-based demand response without decreasing customer satisfaction [50,51]. The authors in [52] studied the effect of implementing interruptible/curtailable (I/C) service in different modes on operation cost, customer profit, load factor, and peak reduction on the micro-grid, taking into consideration various uncertainties. The impact of flexibility options, which are offered in the capacity market (CM) program in a hybrid electricity market, was addressed by [53].
as well as environment/social factors [46,47]. Kato et al. investigated maximum-s behavior as a response to the summer residential critical peak price (CPP) in an apar complex in Japan [48]. However, the concept of an IBP requires consumers to cont voluntarily to a pattern in which the system operator directly turns off some appl to reduce consumer energy usage during peak time [49].
A direct load control (DLC) program aims to minimize energy demand by com the flexibility from shared energy storage systems and the DLC-based demand res without decreasing customer satisfaction [50,51]. The authors in [52] studied the ef implementing interruptible/curtailable (I/C) service in different modes on operatio customer profit, load factor, and peak reduction on the micro-grid, taking into cons tion various uncertainties. The impact of flexibility options, which are offered in t pacity market (CM) program in a hybrid electricity market, was addressed by [53]. A comparison between the different DRPs based on their time resolution, res type, and methods is given in Table 1. A comparison between the different DRPs based on their time resolution, response type, and methods is given in Table 1.

AI-Based Approaches in Building Energy Management
The application of modern technologies in BMS and DRPs, including sensors, network communication, cloud computing, wireless transmission, information, and smart devices, has led to the rapid implementation of computational modeling frameworks in these domains. The statistical approaches applied to the modeling frameworks result in accurate and precise predictions of consumer energy use, which are classified into artificial intelligence (AI) based engineering and hybrid approaches [55].
The AI-based approach predicts the future trends of energy demand using historical data. The impact of key variables such as characteristics of the building and environmental conditions are considered in a process comprising four main steps: "(1) data collection, (2) data pre-processing, (3) model training process, and (4) model testing" [55]. The main learning algorithms that are commonly applied in AI-based models are described in the following sections.

Machine Learning (ML)
Machine learning (ML) is, by definition, introspective and adaptable, and it allows for the evolution of superior performance. It calls for development interfaces that enable societies to scrutinize the behavior of AI systems and to allow the system to account for its operational procedures. Advances in AI are bolstered by the availability of massive amounts of data through the Internet and by the progress in sensory technology together with ML and its subset, i.e., deep learning. Since self-improvement through evolution is a basic tenet of machine learning systems, the pace of progress in many AI research areas has been considerable. Machine learning (ML) can be defined as the learning made by machines from algorithms designed to allow machines to react to new input from their environment. ML allows non-linear relationships to be determined, such as the relation between the energy demand and other relevant factors, through mapping functions from a training dataset (supervised learning) or any form of the dataset (unsupervised learning), or even a sequence of decisions in an uncertain or a complex system [56].
Supervised learning is a type of machine learning in which the algorithms are pretrained with some dataset input-output values. The algorithm is then expected to produce a correct output when a different input (different from the training dataset) is entered into the model. Supervised learning is used to solve classification problems by determining to which group the input data belong and to solve regression problems by predicting the correct output value given a new input. Unsupervised learning is a type of machine learning in which the algorithm is not pre-trained with any form of the dataset. The algorithm learns from the input data as they arrive. Reinforcement learning is a type of machine learning in which the algorithm learns by being rewarded for every correct output and being punished for every wrong output. The algorithm, therefore, gets improved over time. Figure 3 shows the relationship between the existing machine learning technologies. Machine learning models can be categorized as either shallow learning or deep learning. Shallow learning models are models with simple layers, while deep learning models are models with complex or multiple layers. Figure 4 represents the relationship between the different types of machine learning techniques used in energy systems. Machine learning models can be categorized as either shallow learning or deep learning. Shallow learning models are models with simple layers, while deep learning models are models with complex or multiple layers. Figure 4 represents the relationship between the different types of machine learning techniques used in energy systems. Machine learning models can be categorized as either shallow learning or deep learning. Shallow learning models are models with simple layers, while deep learning models are models with complex or multiple layers. Figure 4 represents the relationship between the different types of machine learning techniques used in energy systems.

Commonly Used Machine Learning Methods
In the following sub-sections, some of the most commonly used ML methods are explained.

Commonly Used Machine Learning Methods
In the following sub-sections, some of the most commonly used ML methods are explained.

Decision Trees
Decision trees is a machine learning model in which classification decisions are divided into sets of choices depending on the features of the input parameters, which are considered individually. This process starts from the base feature and then progresses in a manner resembling a tree branch. A tree is constructed by dividing the root node (source set) of the tree into branch nodes (sub-sets). The division is based on a set of rules determined from the properties of the set and the target classification [58]. There are several areas in smart energy buildings where decision trees models have been used, including the predicted risk of a blackout [59] and energy storage planning and energy management in buildings [60][61][62].

Random Forest
An extension to ML is random forest, which uses classification and regression tasks and incorporates multiple decision trees to improve the prediction accuracy. Bagging (bootstrap aggregation) is a general procedure that can be used to reduce the variance of a decision tree algorithm. Bootstrapping is a process that involves estimating a quantity from a data sample. The random forest algorithm is achieved by creating a new bootstrap sample of the training set and using it to train a decision tree. Features are randomly selected at every node of the decision tree and then applying Gini impurity (i.e., a measurement of the likelihood of an incorrect classification of a new instance of a random variable) only on that set of features, then selecting the optimal one and repeating the process until the tree is complete. The random forest model is widely used in building energy systems to predict hourly energy consumption [63,64].

Wavelet Neural Network
The wavelet neural network is another machine learning model that combines the concepts of wavelet analysis and neural network architecture. The wavelet concept stems from the generalization of the Fourier transform (FT) and the windowed Fourier transform (WFT). The concept has been found to be useful in the prediction of time series data for hybrid renewable residential micro-grids for simultaneously optimizing system cost and the battery state of charge [65,66].

Naïve Bayes
The Naïve Bayes learning model is based on the Naïve Bayes theorem [67]. The theorem is used for calculating the probability of a guess when given prior knowledge. This learning model has been used extensively to solve building energy problems. Prasetiyo et al. used a Naïve Bayes classifier in their analysis of building energy efficiency datasets [68], and Bayindir et al. used it in the prediction of photovoltaic energy [69]. In another study, Lin et al. applied this method to predict HVAC energy using hourly data [70].

Artificial Neural Networks (ANNs)
Artificial neural networks are widely used in the modeling of non-linear processes. It is useful in a wide range of applications, such as natural language processing, decision making, classification, dimension reduction, regression problems, clustering, decision making, anomaly detection, and computer vision. ANNs have been broadly utilized to forecast electricity consumption and the cooling and heating loads in buildings.
A "deep neural network" is a type of deep learning model that is an artificial neural network with multiple layers. The concept is centered on the modeling of the hierarchical characterization behind the patterns used to predict data. This is achieved by creating modules comprised of multiple layers of information for processing.
ANNs are used in combination with building information models (BIMs) to evaluate thermal comfort. Suggestions for optimizing savings on interior energy consumptions are made by forecasting the indoor climate, with a focus on temperature and humidity [71,72]. Real-time monitoring is also possible using the ANN method. One of the advantages of this method is that it can detect non-linearity between the input and output datasets.
Deep learning (DL) is an artificial neural network method, the objective of which is to model the hierarchical characterization behind data prediction patterns by stacking multi-layer information processing modules. Examples include a convolutional neural network (CNN), radial basis function (RBF) networks, restricted Boltzmann machines (RBMs), and recurrent neural networks (RNNs). The DL method can be used in estimating the power consumption of individual appliances in the distribution system [73,74].

Regression
Multiple linear regression (MLR) is a machine learning model based on statistical linear regression, and it is widely used in several studies to predict the monthly heating and cooling demands of residential buildings. A support vector machine is typically used in contexts where the objective is to classify data. The main goal of these methods is to find a function from the obtained target for all the training data, including information about the weather condition, the relative humidity, and the intensity of the solar radiation [75,76]. The prediction accuracy and robustness of both the MLR and the SVR methods require improvement for use with the highly non-linear energy demand function.
Li et al. compared predictions of the hourly cooling load in a building made using SVR with those made using several ANN models [77]. In another study on non-residential buildings, Massana et al. used SVR as well as MLR and ANNs to predict the short-term thermal load for non-residential buildings [78]. These studies showed that the improve-ment in the energy use prediction when using SVR was better than using other AI-based prediction methods. The trade-off between prediction accuracy and computation speed when using the SVR has also been shown to be better than that provided by MLR and ANNs.
Logistic regression is based on the statistical logistic function (also referred to as the sigmoid function), and is basically used as a model for classification. It is widely used in events or problems that require predictions of the probability of occurrence. Wang et al. used logistic regression in analyzing the effect of certain significant factors on the amount of energy consumed when heating rural buildings in China [79].

Genetic Algorithm (GA)
The GA is a heuristic search technique extensively used in AI-based models because of its ability to cope with non-linear characteristics of smart buildings. Both unconstrained and constrained optimization problems can be solved competently using GA. This technique is widely applied in the scheduling of residential loads with the aim of minimizing the total energy cost in a dynamic pricing scheme [80]; it is also applied in finding the optimal energy consumption to provide comfortable thermal conditions by selecting the optimal range of the indoor temperature setpoints [81]. Manzoor et al. developed an intelligent energy management strategy using a DR program to schedule household load with the aim of minimizing the cost of electricity based on a hybrid of the GA and the teachinglearning-based optimization algorithm [82].

Fuzzy Logic (FL)
Because their simplicity, fuzzy logic control models have been adopted more widely than other models that use conventional configuration control logic (CCL). The adaptive network-based fuzzy inference system (ANFIS) is a machine learning model that combines the forecasting approach of fuzzy logic with the capability of a neural network. In this hybrid configuration, each learning model complements the weaknesses of the other, producing better results and better performance. ANFIS is used along with the wireless sensors network to forecast the demand load based on the changes in the indoor and outdoor climate conditions of buildings [83][84][85].

Particle Swarm Optimization
Particle swarm optimization (PSO) is a meta-heuristic optimization technique developed based on the flocking behavior and social cooperation of birds and fish. The PSO algorithm employs a swarm of particles that traverse a multi-dimensional search space to seek the optimal location [86]. Each particle is a potential solution and is influenced by the experiences of its neighbors and itself. PSO is used in hybridization with a machine learning technique to achieve an optimal solution. PSO was used in hybridization with the genetic algorithm to estimate energy demand [87] and was also used with differential evolution (DE) in the planning of transmission expansion [88]. PSO was hybridized with ant colony optimization (ACO) for studying the energy demand in Turkey [89] and for conducting a techno-economic analysis of the hybrid renewable energy systems in Japan [90,91].

K-Nearest Neighbor
K-nearest neighbor (KNN) is performed based on memorizing the training set and then predicting the label of any new instance based on the labels of its closest neighbors in the training set. KNN is widely used in building energy management systems and in demand analyses of energy consumption in residential buildings [92,93].

Principal Component Analysis
Principal components analysis (PCA) is a machine-learning model used for dimensionality reduction. Dimensionality reduction is the process of mapping a function from higher-dimensional space into a lower-dimensional space. Sun and Sun (2017) used the PCA method to predict carbon dioxide emission with a regularized extreme learning machine. It has been used in improving the residential load disaggregation of energy [94] and the determination and analysis of electricity consumption in China [95,96].

Hybrid Models
Hybrid models use multiple machine-learning techniques. Data pre-processing and optimization tools have become common in the effort to produce high-accuracy hybrid models for improved prediction capabilities. Hybrid models are being applied to the day-ahead prediction of power generation in the hybrid renewable energy systems and micro-grids [97,98] and the prediction of energy consumption in buildings [99]. Table 2 presents a comparison of machine learning models used in the smart building system. This comparison was made by considering the complexity, user-friendliness, and speed of the models. Previous studies have focused on comparing data-driven models with physics-based models, comparing machine learning with statistical techniques, evaluating group methods, and analyzing machine learning, with the objective to forecast building energy use. Runge and Zmeureanu in 2019 provided a comprehensive review of the studies published since the year 2000 that have applied artificial neural networks for forecasting building energy use and demand; they particularly focused on reviewing the applications, data, forecasting models, and performance metrics used in model evaluations [100]. Zhao et al. in 2012 published a review focusing on the main approaches for energy prediction and forecasting in buildings, and they compared machine learning, statistical, and physics-based models. Their results showed that the machine learning-based models could provide the highest accuracy and flexibility, compared with statistical models such as support vector machines [101].
A comparison between the machine learning-based models and other conventional methods was carried out by [102]; the comparison indicated a lack of flexibility of the current conventional methods in dealing with non-linear patterns, especially in forecasting building electrical consumption. The application of hybrid models within building energy prediction was explored by [55], who highlighted the role of ANN models and their improved performance compared with single prediction models. Wei et al. in 2018 provided a review for data-driven approaches of both the prediction and classification in buildings, and they noted the wide range of practical applications of ANN models to date, including forecasting and predicting energy loads; their work ascertained the current energy performance of a building and predicted the potential for energy saving through retrofit strategies [103]. Seyedzadeh et al. in 2018 provided a substantial review on the four main ML approaches, including artificial neural network, support vector machine, Gaussian-based regressions, and clustering, all of which have commonly been applied in forecasting and improving building energy performance [56].
The recent work in the field of AI-based approaches for predicting building energy is presented in Table 3. The application of the AI-based methods in building energy systems was assessed by considering the domains, targets, and applied methodologies used in each study. Figure 5 shows the classification of the domains in the present study, which takes into consideration the building services suitable for linking to the AI components, as discussed in the Building Intelligence Quotient (BiQ) [104], the Honeywell Smart Building Score [105] and the EU Smart Readiness Indicator (SRI) [106]. Table 3. Applications of the AI-based approaches used in building energy systems.

Focus of the Study Domains Target and Results
Algorithm /Method Ref.

Energy Comfort Safety Design Maintenance
Proposing a decision-making system for maintaining the thermal comfort of the user; it uses intelligent sensors, and is flexible and energy-efficient Lower operational costs FL [107] Analyzing the outcomes in residential buildings when the indoor temperature is set too high, using passive cooling √ • Improved thermal comfort GA [108] Examining the utilization of IoT and cyber-physical systems in a large-scale network game designed to improve energy efficiency in a building √ • Lower energy cost • Lower energy consumption DL [109] Comparing predictions achieved by the artificial neural network (ANN) and random forest (RF) of the hourly HVAC energy consumption of a hotel in Madrid, Spain √ • Improved air quality and other conditions for the comfort of the occupants ANN [71] Discussing the potential of AI to improve the well-being of building users and the interaction of the users with the building environments √ • Lower costs and reduced waste • Improved architectural, electrical, mechanical, and layout design ML [110] Predicting the monthly demand for heating in residential buildings √ • Easy and efficient prediction tools for calculating the energy demand for heating residential buildings MLR [111] Predicting the cooling demand in buildings using a back-propagation neural network (BPNN)

√ •
A higher accuracy when identifying and predicting due to the number of input neurons and hidden layers • Improved accuracy when identifying the values of the model parameters for the neural network model ANN [112]  Predicting the energy consumption in buildings using a combination of the neural networks and a hybrid genetic algorithm-adaptive network-based fuzzy inference system (GA-ANFIS)

√ •
The prediction accuracy of the hybrid GA-ANFIS model is better than that of the ANN GA ANN [99] Predicting the sub-hourly electricity consumption in commercial buildings using a combination of the ANN model with the Bayesian regularization algorithm √ • Faster and more accurate predictions of building energy consumption ANN [113] Building a prediction model to determine the hourly building cooling load based on SVR in an office building in Guangzhou, China √ • Useful building cooling load SVR [85] Predicting the short-term electricity demand in a bioclimatic building in Spain using the ANN model √ • Used in the prediction of demand ANN [114] Estimating the energy consumption and the thermal comfort of the inhabitants in buildings using an ANN √ √ • Building energy retrofit • Sensitivity analysis ANN [115] Evaluating thermal comfort using a combination of wireless sensors and smart grid initiatives in reinforcement learning  Forecasting the electricity price and load using a novel hybrid algorithm in smart grids with demand-side management, using the ANN-GA scheme √ • Reduced the consumption of grid electricity ANN SV [120] tems was assessed by considering the domains, targets, and applied metho in each study. Figure 5 shows the classification of the domains in the presen takes into consideration the building services suitable for linking to the A as discussed in the Building Intelligence Quotient (BiQ) [104], the Honeywe ing Score [105] and the EU Smart Readiness Indicator (SRI) [106].

Opportunities
The smart energy-efficient buildings targeted in this review constitute the elemental level at which the benefits of AI are being materialized. The much greater benefits lie ahead as we build on this foundation and when smart buildings are integrated with AI into connected communities that interact in real time through the power and water grids. The path to this opportunity is traced in recent advances with constructal theory and design [121]. By empowering software applications to analyze large datasets by identifying patterns, detecting anomalies, and making precise predictions, AI can create further revenue opportunities for smart buildings.

AI for Renewable Energy Forecasting
A consistent challenge with the variable sources of energy such a renewable energy is their unreliability. Weather-dependent power sources will often fluctuate in their strength. Weather can often be unpredictable, which can result in destabilization of the power supply generated from weather-dependent energy sources such as solar and wind. This means that greater precautions could be taken to harness and preserve the energy that was generated. The AI-based approaches can extract a combination of data from local satellite, meteorological stations to provide a precise hour-ahead estimation of weather conditions, including wind, temperature, lightning density, and humidity [122]. This will help in balancing the energy supply and demand in smart buildings that are equipped with hybrid micro-grids.

AI for Energy Efficiency
Although building automation and energy management systems have been available for some time, they focus mainly on monitoring and providing alarm capabilities. With the increasing convergence of smart buildings, there is great value in developing a central analytics platform to provide more insights from the combined data. AI monitors, collects information, controls, evaluates, and manages energy consumption in buildings. It controls energy usage and reduces it during peak hours, identifies and signals problems, and detects equipment failures before they occur. The AI-based approaches can facilitate active customer participation in demand response programs using ML algorithms and leverag-ing blockchain to protect data. While heating, ventilation, and air-conditioning (HVAC) systems provide indoor comfort, they also contribute to staggering energy consumption levels. AI-driven district heating provides an irreplaceable flexibility element for the new energy system in smart cities.
Several smart buildings can have their heat pumps connected efficiently and adaptively to a single heat exchanger loop buried in the ground that the buildings share [123]. AI can enable the automation of district heating when electrification increases the amount of controllable units as the energy system becomes more complex. It can predict the heat demand of customers, steer the usage of storage, and guide the control room in the optimal utilization of assets.
In an arid area, the connected community shares the power grid and the water grid that is driven by power, as in the case of a distributed solar power field that delivers power to the community and the field of desalination plants that deliver water to community in the same area [124]. The integrative design of the community with distributed power and water is fast-forwarded in time by AI, and it enables future designers and builders to correctly scale up (and scale down) the efficient designs that have been perfected and tested at a particular scale [125].

AI for Energy Accessibility
With the decarbonization, decentralization, and the rollout of novel technologies, utilities, independent power producers (IPPs) and other energy companies are employing AI to manage the imbalance in demand and supply. In combination with other technologies such as big data, cloud, and Internet of Things (IoT), AI can support the active management of electricity grids by improving the accessibility of renewable energy sources in buildings. Along with a slew of advanced AI-based technologies, AI enables customer-centric solutions that understand evolving customer needs, in turn allowing AI to make automatic recommendations as well as use predictive analytics to improve equipment O&M and predict downtime, which can extend the lifetime of the equipment in buildings.

Open Challenges
It is widely understood that the social and ethical impacts of AI will amount to nothing short of a revolution. While many cite the multitude benefits of this revolution for the human race, there are skeptics who see it as a major threat to human control and dominance. With the ongoing advances in AI spurring new technologies in fully-automated driving as well as the evolving technologies of IoT, BD, and robotics, AI is arguably the major contributor in the current evolution of humankind. This situation requires the development of policies governing human-AI issues. Such policies must seek to ensure that all future developments in AI are trustworthy human-centered systems [126]. Policymaking in the era of AI must acknowledge and reflect the awareness that despite the undisputed benefits of AI applications in today's society and the potential benefits of future applications, AI is little understood and widely feared by the general public.
From a humanistic point of view, AI systems are required to be robust. The "robustness" of AI refers to the reliability of the intelligent algorithms used in AI systems to process and execute tasks in a manner that upholds the common good and benefits all of humanity. Robustness includes features such as fairness, and it ensures that the privacy of individuals, families, and communities is protected. Robustness also requires the socio-economic well-being of society to be upheld impartially, and it guarantees that there are appropriate measures in place to ensure that the autonomous power to hurt, destroy, or deceive humanity cannot be pursued.
The role of a robust AI system is then to oversee solutions, provide technical vigor and data control measures, and generate diverse results. One of the challenges in the technical elements of AI systems is establishing human-operator expectations. For a society to trust and adopt a new technology, the system must prove beyond a reasonable doubt that it is reliable and safe, and that it contributes to the betterment of society. To gain the trust of humanity, AI systems must be instrumental in solving complicated challenges that the society faces. The confidence of the general public in the ability of AI systems to reliably process private data will build over time with successes.
The public's confidence in AI would be significantly bolstered by the success of AI systems in the future of smart buildings designed to optimize energy requirements according to the data shared from individual residences, appliances, and other lifestyle facilities. It is reasonable to expect that the general public will balk at participating in such big data processing unless people are completely confident that their data are secure. In other words, creating trust and confidence as well as respect for human beings whose abilities are being emulated must be apparent in the operation of the AI applications.
While smart buildings represent a revolution in the built environment with their innovative applied standards for managing numerous devices and handling data, the massive step-up in the approach taken by smart buildings presents numerous challenges and difficulties. For the smooth functioning of any organization, Internet security is of utmost importance. To ensure that smart building users do not lose their data due to improper measures being taken, it is necessary to manage security concerns with extra measures. Such measures will bring higher costs. Investing in user privacy, however, must not be considered optional since the protection of data is a basic duty for all organizations. Since smart buildings are a hub of consumer devices and a center for data, measures to secure privacy are absolutely essential.
It is conceivable that the lack of globally accepted and unified IoT standards may hinder the widespread development of IoT. Regulators and governments need to consider how relevant standards can be developed. The diversity of standard protocols will inevitably present a challenge in finding appropriate experts in programming languages. With billions of devices operating simultaneously in smart buildings around the world, the biggest challenges are in the storage, protection, and analysis of the data. Furthermore, developments in technology are required to handle the huge number of devices in the network and to improve the role of the central processor and the other devices involved.

Conclusions
On the way to zero-emission buildings, several challenges have to be answered. In modern energy systems, several energy sources must be adjusted to maintain high security and a healthy environment for building users, with minimal energy consumption. Improving the comfort level of residents is associated with the use of large amounts of energy, and this stresses the need for establishing an optimal balance between quality of life and energy savings in buildings. The optimization of the performance of the whole building is computationally intensive and needs robust data on the status of all the systems and equipment. Because building energy systems increasingly integrate sensors and embedded components, buildings are becoming complex networked cyber-physical energy systems. Artificial intelligence can help to optimize the operation of these complex systems by managing the computational burden rapidly and efficiently. AI includes standard communication protocols that enable the interchange of information to achieve the main goals, such as energy efficiency, comfort, health, and productivity in living spaces.
AI-based prediction methods offer promising prediction accuracy once the model is well trained. In addition, the process of data acquisition and data loading in these models is relatively convenient, which means the prediction model can be easily established. There are limitations to the use of AI-based approaches in building energy efficiency. For example, there is no explicit relation between the physical building parameters and model inputs in these models, making it impossible to extrapolate building energy performance once the building's design or operation has changed. Furthermore, AI-based approaches require extensive training data for model establishment and the maintenance of prediction quality, which means that the models need to be re-trained once changes are made to the building envelope, system, or operation. In order to integrate AI-based methods into building energy efficiency practices, the application needs to be simplified in both the type and the number of input parameters. Incorporating occupancy information into the prediction model has a great potential to improve prediction performance. Occupancy factors such as the number and type of occupants and their activities play a key role in the energy consumption of the building.
The establishment of good practices and threat-driven procedures to strengthen the trust in AI systems is of paramount importance. Although the advent of the widespread use of AI has generated intense discussions about the need for more interpretable AI models, the main challenges for the right deployment of AI in smart buildings and in society concern the resilience, accuracy, reliability of AI systems. Several avenues for reflection should be considered to address these challenges, for example, by introducing standardized tests to assess the robustness of AI technologies and, in particular, to determine their field of action concerning the data that have been used for the training, the type of mathematical model, and the context of use.