## 5 Optimization Control Strategies in Bems
### Uses of Intelligent Controls in BEMS  
Several research works have been carried out on different intelligent methods for BEMS, and the most used are categorized as: (i) learning based methods of the AI domain, including a support vector machine (SVM) [128; 129], K-nearest neighbor (K-NN) [128], artificial neural network (ANN) [130], reinforce learning (RL) [131], etc. ; and (ii) model-based methods, such as the model predictive control (MPC) technique [132]. A learning-based control model where self-scheduling loads and the ESS of the building ensure the maximum usage of PV power, curtailment load profiles, and a reduced energy cost. The optimization algorithm optimizes the building cost and minimizes the fluctuation between PV generation and energy consumption, relying on predicted control information using a machine-learning algorithm [11]. In addition, it demonstratesthe benefit of combining model-based and learning-based control methods into a single management framework for controlling multiple aspects of building performance [11; 133]. The predictive algorithm model of energy consumption in smart buildings with a Microsoft Azure cloud-based machine learning platform wherein three methodologies namely SVM, K-NN, and ANN have been adopted for comparison to find the most accurate prediction model as compared to actual demand. Notably, the collected data is partitioned between 70% training data and 30% testing data. Though it took the most time to train, SVM was able to predict more accurately than the other two. The K-NN approach, on the other hand, was faster at completing the training, and ANN was faster than SVM, but it took many hours. However, a high training time is required for the SVM model to achieve a higher performance [134]. Most researchers focus on maintaining the indoor comfort of the buildings by implementing complexity prediction algorithms with higher cost and computational time, and power consumption. The model is carried out and investigated on five standard supervised machine learning models: polynomial regression (PR), support vector regression (SVR), random forest (PF), extreme gradient boost (XGB), and neural network (NN). In contrast, the best result output is shown for the SVR model with a tiny prediction error. A trustworthy NN model needs extensive data training set input and more processing time, while the amount of data is relatively small in the proposed system application, so it is rational to avoid the NN [135]. A novel deep neural-network-based algorithm for the day-ahead hourly energy consumption profile prediction of residential and commercial buildings in terms of occupancy rate and seasonality was investigated. A survey was conducted by a business manager, an electrical engineer, and a data scientist about all machine learning techniques, in which deep ANN achieved the highest score (multi-criteria analysis = 189) with a high accuracy prediction rate of about 98%. Firstly, training data was generated using synthetic load generation, where 100,000 data set points (load profiles) were produced for each occupancy rate type. The proposed forecasting model introduced these data to train an eight-layer deep neural network-based model and made decisions based on a limited number of inputs, evaluated using root mean square error (RMSE) and the coefficient of determination metrics [136]. Q-learning-based peak load reduction (QL-PLR) uses RL to present the optimal residential energy management (REM), which can decline only peak load demand and is associated with the dissatisfaction of consumers [137]. The designation of a dueling deep Q network (DDQN) captures the real-time state of the grid, demand-side strategy for interruptible loads (IL), along with the safe limit of regulating the system voltage and a reduction in peak demand loads, and the operation cost of distribution system operators (DSO). It is noteworthy that deep reinforcement learning (DRL) is adopted with DDQNs to optimize the DR management of IL under the TOU tariff and variable patterns of electricity consumption.