Data-Driven Predictive Control of Building Energy Consumption under the IoT Architecture

Model predictive control is theoretically suitable for optimal control of the building, which provides a framework for optimizing a given cost function (e.g., energy consumption) subject to constraints (e.g., thermal comfort violations and HVAC system limitations) over the prediction horizon. However, due to the buildings’ heterogeneous nature, control-oriented physical models’ development may be cost and time prohibitive. Data-driven predictive control, integration of the “Internet of Things”, provides an attempt to bypass the need for physical modeling. This work presents an innovative study on a data-driven predictive control (DPC) for building energy management under the four-tier building energy Internet of Things architecture. Here, we develop a cloud-based SCADA building energy management system framework for the standardization of communication protocols and data formats, which is favorable for advanced control strategies implementation. Two DPC strategies based on building predictive models using the regression tree (RT) and the least-squares boosting (LSBoost) algorithms are presented, which are highly interpretable and easy for different stakeholders (end-user, building energy manager, and/or operator) to operate. The predictive model’s complexity is reduced by efficient feature selection to decrease the variables’ dimensionality and further alleviate the DPC optimization problem’s complexity. The selection is dependent on the principal component analysis (PCA) and the importance of disturbance variables (IoD). The proposed strategies are demonstrated both in residential and office buildings. The results show that the DPC-LSBoost has outperformed the DPC-RT and other existing control strategies (MPC, TDNN) in performance, scalability, and robustness.


Introduction
One major challenge in today's society concerns energy savings and CO 2 footprint in existing and new buildings. To date, the building sector has witnessed immense development in the way by which building systems are managed [1,2],which aimed at alleviating the significant environmental impact of this sector (40% of the world energy consumption and a third of the associated CO 2 emissions [3]). Decreasing this impact could be achieved by elegant controlling the resources [4]; building energy management systems (BEMS) provides sustainable and efficient solutions.
An expected BEMS aims to increase energy efficiency while maintaining the required comfort levels and enhance environmental effects. However, based on a large number of practical implementations, it is found that the current problems in existing BEMS are mainly concentrated in the following aspects: (1) the traditional BEMS mostly has relatively sole functions. For example, the systems lack effective monitoring and linkage management of the dynamic environment and energy-related equipment, (2) the family of BEMS is still far from the standardization of communication protocols and data formats, and (3) many systems only collect and store data employing local databases for monitoring and lack supervisory applications (advanced control, human-machine interactions, data analysis). The dilemma attributes to the usage of supervisory control and data acquisition (SCADA) architecture in existing BEMS [5].
The popularity of the Internet of Things (IoT) and its successful industrial applications provide a new perspective for us to deal with the dilemma above [6][7][8]. Utilizing the IoT technology, a massive amount of data is aggregated into a unified energy management platform. GÃ¼nter Alce proposes a new concept of IoT interaction [9]. However, some challenges have arisen. How to manage big data (transferring, storing, preprocessing, optimization, and control under a suitable IoT framework) [10]. On the other hand, delivering useful information to different stakeholders based on their use is another challenge [1,[11][12][13]. These challenges pose new questions: what is the complex SCADA-based BEMS framework under IoT, and how to build it? On top of these, what are suitable control strategies for achieving optimal BEMS performance?
Numerous studies have proven that an advanced control strategy could significantly reduce energy use and alleviate greenhouse gas emissions, see, e.g., [14][15][16]. However, many buildings currently adopt rule-based control (RBC) with limited energy-saving capabilities [17][18][19]. Many studies have proved that the building sector can significantly benefit from replacing the current RBC for more advanced control strategies like model predictive control (MPC) [18]. MPC's perfect performance is achieved by accounting to minimize consumed energy and maintain high comfort indexes while considering physical constraints, weather forecasts, and building dynamics. In recent years, many energy-efficient MPC approaches have been validated to control the building systems [20][21][22][23][24]. Despite these tries, RBC-based control remains business as usual in the building sector. A key factor prohibiting this technology transfer to the commercial sector is the cost, time, and effort associated with capturing first-principle-based dynamical models of the building. Also, a gap always exists between the modeled and the real building, and the domain expert must then manually tune the model to match the measured data from the building [25,26].
An alternative approach for implementing MPC is using control-oriented data-driven predictive models. In the literature, this approach is called data predictive control (DPC) [25]. In [27,28], the authors proposed MPC closedloop optimization strategies based on neural networks (NN) for energy-saving control in buildings both in commercial and residential buildings, respectively. However, these approaches are not easily scrabbled to different types of buildings [29]. NN is employed in the closed-loop control scheme to determine control performance indexes instead of neural network-based system state dynamics. Unfortunately, since NN, a nonlinear nature, the complementary MPC-based optimization problem becomes computationally more demanding when the neural network's complexity is high.
To overcome this complexity above, the regression treebased approaches were employed in the literature to develop data-driven predictive models. Authors in [30,31] developed RT and random forest for building control in different settings. However, the simulation results demonstrated that these models were trapped in limitations due to overfitting and high variance [5]. In [18], a well-performing approximate MPC via machine learning has been developed based on two multivariate regression algorithms, namely, deep time-delay neural networks (TDNN) and regression trees (RT) on Hollandsch Huys, which is an office building in Belgium. This approach mentioned above is an advantage which is the simplified control laws that retain comparable performances with MPC. However, the RT-based controller scored worse in performance than a well-tuned PID controller, which dates back to modeling inaccuracy. To overcome the drawbacks of previous works above, we present an ensemble learning algorithm, called least-squares boosting (LSBoost), which integrate multiple decision trees to produce robust models. The residential building model data in [18] will also be used in our simulation and validation. What is different from prior studies is our work focus on data-driven optimization control of BEMS both in residential and office buildings under the IoT framework.
In this paper, we develop a data-driven energy optimization control strategy based on an improved LSBoost under a layered building energy IoT framework, which improves the occupants' comfort and reduces energy consumption. We validate the proposed control scheme by numerical simulation with two types of buildings: residential building and office building. The work has the following contributions: (1) We develop a novel four-tier building energy internet architecture. This architecture is used for managing data from both IoT devices and BEMS, by using a cloud-based user-friendly human-machine interaction interface. The motivating factor behind the developed architecture will be elaborated details in Section 2. The platform above can provide useful data representations to different stakeholders (end-user, building energy manager, and/or operator), enabling flexibility and scalability.
(2) An optimization strategy is the first strategy proposed for building energy management based on the improved LSBoost. The LSBoost algorithm is used to enhance the building model's interpretability and reduce complexity without losing accuracy. The optimization problem takes the optimal index of human comfort into account the constraints to ensure a good living and office environment.
The remainder of this paper is organized as follows. A novel building energy internet architecture is presented in Section 2. In Section 3, two types of buildings, namely, residential and office buildings, are built. Section 4 defines the finite receding horizon control problem with the DPC framework. We compare the performance of the DPC-LSBoost with the MPC, the TDNN, and the DPC-RT in Section 5. Conclusions and further work are provided in Section 6.

Building Energy IoT System Architecture
This section describes a complex cloud SCADA-based BEMS framework under the IoT, which is necessary for successfully implementing DPC in public buildings.

Four-Tire Building Energy IoT System Architecture.
The existing SCADA-based control layers in a BEMS constitute three separated layers [33], and those are (1) field layer (sensors, actuators, controllers), (2) automation layer (signal processing, controlling, alarms activating), and (3) management layer (system data presentation, trending, logging, and archival). The IoT also consists of three separate layers: (1) perception layer, (2) network layer, and (3) application layer. However, we introduce a four-tire client-server software architecture web platform consisting of four layers: perception control layer, network transmission layer, data intelligence layer, and representation layer.
The motivation factor behind the four-tire architecture is the complementary advantages for the SCADA architecture and the IoT architecture. One of the main advantages of using a SCADA configuration is that the control and communication flows can be presented sequentially [5]. However, the strength of the IoT configuration is the ability of data processing in-depth. Based on the reasons mentioned above, we define the first 3 layers. In addition, to make IoT data form building useful to different stakeholders, we decide to develop the presentation layer as the fourth layer. The idea is inspired by a building lifecycle data management strategy in [1]. The architecture of the IoT in the building energy system is shown in Figure 1.
(1) Perception control layer: in BEMS, this layer is endowed with two primary functions:  Figure 1: The overall architecture of the IoT in the building energy system.

Wireless Communications and Mobile Computing
(a) Collecting sensor data of environment parameters (such as indoor and outdoor temperature, humidity, and wind speed), power consumption, pressure difference, water flow, and heat (b) Receiving control signals from the field controllers or executing agencies to ensure that the control objectives, i.e., heating unit refrigeration unit, works properly.
(2) Network transmission layer: the Internet of Things communication technology such as NB-IoT, 5G, is utilized to ensure the sensor data upload and control signal U transmission.
(3) Data intelligence layer: this layer consists of two sublayers: the data sublayer and the supervision layer. The data collected by sensors will be filtered and fused first, and the abnormal signals are checked to ensure the data's integrity and accuracy, which is stored in the database. Then, the existing data is used to establish the control-oriented building models. The supervision sublayer is based on the datadriven predictive model, according to the set optimization objectives, using the optimization control technology developed in this paper (such as the MPC, the DPC-RT, the DPC-LSBoost, and the TDNN), to form the control strategy, such as ensuring the building's indoor environment control requirements while making the building energy consumption lowest.
(4) Presentation layer: the presentation layer endows two main functions: visual programming Language (VPL) interface and textual programming language (TPL) interface-dashboard. The dashboard is an information management tool for different stakeholders, including the environmental parameters setting, real-time monitoring data display, the PMV value, and energy consumption prediction.

Building Modeling and Analysis
This section describes the linear time invariant (LTI) state space model (SSM) for residential buildings used in this study. Firstly, the internal structure of complex building is modeled. Its purpose is to accurately build the HVAC system and internal housing structure. Moreover, the house is easily affected by the natural environment. The disturbance of the external environment to the building should be considered. Common disturbances include ambient temperature, light intensity, wind speed, humidity, and other disturbance information so that the mathematical model can be close to the real building.

Residential Building Modeling
3.1.1. Model Description. The building model is located in a six-bedroom townhouse in Bruges, Belgium. The residential building consists of 6 guest rooms, 5 windows, and 11 single buildings with external walls. For the temperature control system of residential buildings, the central steam furnace is used for heating. For the building's parameters, including building area, room orientation, and other information, please refer to the literature [18].
At the beginning of building the model, the Modelica building envelope model is implemented by using idea library, but its complexity cannot be directly used as a state-space model. A large number of collected data are nonlinear and need to be linearized before they can be used. For example, the heat generated by solar radiation: the equation of sunlight transmission and absorption through windows is highly nonlinear, so if you want to deal with it, you have to use a nonlinear filtering algorithm. For these unprocessed data, to remove the burr, the processing algorithm is extended Kalman filter [34]. After linearization, the state space expression can be constructed. For a complete description of building state-space expressions, please read the paper [35]. The sampling interval for humidity, temperature, wind speed, light, and other sensors is 15 minutes in the sensor and control layer. Therefore, the discrete space expression is constructed as follows: In the above equation, x k , u k , and d k , respectively, represent the state, input, and disturbance variables at time k; y is the output variable; the model's sampling frequency is Ts = 900 sec. The disturbance signal d k presents the heat absorbed and the direct and diffuse solar radiation transmitted by each window such as radiation temperature of ambient and sky temperature, ambient temperature, and ground temperature. Table 1 summarizes the dimensions of the building model variables used.

Model Analysis.
House analysis is the analysis of the established model (SSM). From the house's perspective, entering a changing curve to reflect the change of the indoor temperature of the model without the control of the controller. Entering U U 50 * 1348 = R 6 * 1348 D 44 * 1348 ½ , with R 6 * 1348 as the input temperature input, the external environmental disturbance as D 44 * 1348 , k as the sampling   The total number of simulation days is 14 days. Two weeks can reflect the changing trend of the model temperature, so as to better design the controller. Figure 2 shows the temperature change of 6 rooms in 14 days.
The overall trend of changes in the 6 rooms is consistent with the gradual decrease in temperature. However, it is quite different from the preset temperature. The maximum temperature of the ROOM2 can reach 37°C, which is 10°C higher than the other two models. The same goes for other room temperature trends. Therefore, for the model, the stability of the model is the most important. A major feature of the choice of the building body model is stability and robustness. Such a building conforms to the human habitation. And when the controller is not added, the temperature of the room will gradually decrease, and, finally, drop to 7°C.

Office Building Modeling
3.2.1. Model Description. The office building is modeled by Hollandsch Huys, and the building is located in Hasselt, Belgium. Hollandsch Huys represents a class of geotab buildings [36]. Hollandsch Huys is a 5-storey building, including 3storey office areas located in the ground floor, first floor, and second floor; underground garage; and top loft. When building the office building model, considering the complexity of the model and the personnel distribution, it is mainly to build a model for the three floors of the office area. Please refer [37] for the main parameters of relevant building structures.
Similarly, the office building's SSM is established by using the method described in 3.1. The office building's SSM construction is consistent with that of the residential building construction, please refer to Equations (1a) and (1b). Compared with residential buildings, the SSM of office buildings is more complex, and the variable dimension is higher. The dimensions of the Hollandsch Huys building model variables n x , n u , n y , n r , and n d are 700, 20, 12, 20, and 301, respectively.

Model Analysis.
For an excellent mathematical model, we hope that the model we build can be applied, so we need to simulate the established SSM and simulate the output-  Figure 4: Schematic representation of the building optimal control closed-loop system using the DPC controller.
with R 20 * 1348 as the input temperature, external environment disturbance as D 301 * 1348 , k as the sampling time, the sampling interval as 4 hours, ts = 4hours, and the total number of simulation days as 14 days. The simulation results are shown in Figure 3. It can be seen from Figure 3 that the SSM is constructed. The temperature change is greatly affected by external Building data-driven predictive control.
Require: feature vector x important features p: Step 1:Compute the covariance matrix of the feature vector x:Σ = ð1/mÞx T x Step 2:SVD decomposition of the covariance matrix Σ,Σ = USV T * U, S are the principal component coefficients and variances.
Step 3: Matrix S accounts for the proportion of total features,and call it as v i , v i = S i,i /trðSÞ * trðSÞ is the trace of the matrix S. Step 1:Compute the l 1 norm of each column vector in matrix E, given as IOD i .
Step 2:IOD i Feature normalization,  Wireless Communications and Mobile Computing disturbance. As long as the input has a temperature change, the output temperature will be severely affected. The building model itself is a time-delay system, so the temperature of the output will change greatly. It is difficult to output the input of tracking. From Figure 3, The temperature of each room may change abruptly, and either it becomes very high or very low. This established model has a certain distance from the actual model. However, it is still in a stable state for the entire system. Therefore, it is necessary to design a controller for the built house building model. The most significant purpose of the controller is to achieve stability and stability within the human comfort zone.

Data-Driven Predictive Control
The supervision sublayer design's primary purpose is to design the controller, which plays the role of the control decision. Because the control effect of the designed controller will directly affect the indoor temperature and human comfort, the controller design should be deeply analyzed from the complexity, real-time, and robustness. The more commonly used controllers in the market should be compre-hensively analyzed, and finally, the DPC-LSBoost controller should be selected. Because the DPC-LSBoost controller has a perfect explanation, the regression tree constructed is straightforward and easy to understand, convenient for management, and decision-making.

Control Optimization Design for Comfort Objective.
In the building energy management system, most of the designed design controllers need to meet certain comfort and economic practicality. Therefore, when designing the controller, the reference input is a range instead of a specific    [38], which specifies the upper limit of temperature between ub ∈ ½23, 26 and the lower limit of lb ∈ ½20, 23. Equation (4) defines the mathematical expression of the temperature comfort zone.
with s as a slack variable, k as a time series, and y i,k represents the ith room temperature at time k. It is necessary to ensure that the output temperature is within the comfort zone, so as to minimize the s k and the room energy consumption. However, the ideal comfort and energy consumption are contradictory. In order to solve this problem, the control problem is transformed into an optimization problem. Table 2 lists the symbols and meanings of variables frequently used in this section. Figure 4 is a control structure diagram designed to solve this optimization problem. The purpose of control is to achieve minimum energy consumption and maximum human comfort, which involves two variables: the control signal U and the output temperature Y. In summary, Equation 5 established an optimization function. s:t: with N b a = fa, a + 1, ⋯, bg as a set of integers, and x k ,u k ,y k and d k represent state, input, output, and disturbance variables, respectively. The prediction range is N, and k is the k-th moment in the prediction range. (5b) and (5c) are the time-invariant state space expressions of the building (5d). The lower boundary lb k and the upper boundary ub k are taken into consideration. (5g) introduces the popular Comfort Index of Human Body (CIHB) in recent years [39] and divides it into 9 levels to evaluate comfort Table 3. The index also considers the effects of average temperature, relative humidity and wind speed on human comfort. Equation (6) is shown below. CIHB = 1:8y − 0:55 1:8y − 0:26 with y as the average temperature°C, RH as the average humidity (%), and V as the wind speed ðm/sÞ. According to Table 3, comfort level 0 is the most liveable environment for the human body. The CIHB index should be the most reasonable at 59~70, which is converted into an inequality (5 h) about temperature, to construct a constraint (5e). Limit the maximum and minimum boundaries of the control signal u k . (5f) and (5g) set the initial parameters. (5a) indicates that the objective function finally constructed by the optimization problem outputs a sequence u 0 , u 1 , ⋯, u N−1 under the influence of 7 constraints, so that the output control amount is minimized, the objective function ∥·∥ 2 2 represents the square of the second norm, s k is a slack variable, u k is a control variable, Q s represents the weight of human comfort, and Q u represents the weight of energy consumption. The weighting matrices Q s and Q u are given as positive definite diagonal matrices. Set it to Q s /Q u = 10 7 . The first term in the objective function is the square with the lowest degree of comfort violation, and the second term is the square with the lowest energy consumption.
The architecture of DPC is shown in Algorithm 1. The DPC-LSBoost is a DPC algorithm with the LSBoost model. The DPC-RT is a DPC algorithm with the RT model.

Feature Selection.
This section proposes a simple and systematic approach for the efficient feature selection (FS) of predictive models in the context of building energy control applications. Because the method introduced in this section is versatile, it can be used to identify and select the most relevant variables in a dynamic building model, reducing model complexity, or reducing the cost of sensing equipment in practice. For current building data, feature selection based on principal component analysis (PCA) is first proposed. The simplicity and the PCA algorithm efficiency are well known, so we choose the method described in [40] to perform feature selection on the dataset we build. Algorithm 2 shows the PCA feature selection progress. Figure 6: After dividing the regression tree twice, we get 5 sets R 1 , ⋯, R 5 .

Wireless Communications and Mobile Computing
Now, we consider that there are N sets of observations in a data set, and each set of observations contains s features and n outputs, written as a mathematical expression as follows: The x i shown in Equation (7) encapsulates all parameters that change over time, for example, the current state quantity xðtÞ, the current and future disturbance variable dðtÞ, ⋯, dðt + kTsÞ in Equation 1, and comfort boundary signals l bðtÞ, ⋯, lbðt + kTsÞ and ubðtÞ, ⋯, ubðt + NTsÞ. Among them, the feature selection for disturbance is mainly considered in the degree of influence of the disturbance variable d t on the system. Among them, the feature selection of the disturbance is mainly considered to the degree of influence of the disturbance variable d t on the system.
In algorithm 2,the data variables have a large dimension, so the PCA feature selection is utilized to reach a more appropriate dimension, and the accuracy thresholds η = 0:99 and ψ = 0:99 are chosen.
Then, with the house disturbance model, the matrix E of the LTI model constructed in Equation 1 considers the disturbance's influence on the system. Figure 5 shows the impact of construction disturbance both in residential and office buildings. The higher the index of AIOD i means the higher impact of the disturbance on the system performance.
Therefore, from the above two types of algorithms, the most relevant features can be filtered, and the intersection of the two sets is taken as the FS that is finally selected.
where p is the important feature set, and q is the important disturbance set. So, the distribution features of the models can be obtained, as shown in Table 4. The features of residential buildings and office buildings are 81.81% and 96.01%, respectively. It is shown that the more features mean better results using this feature selection method. It also means that many of these features are redundant.

Design of the DPC-RT Controller.
This section focuses on the prediction modeling of multiple output regression tree. Because of a lot of advantages of the regression tree, the controller adopts a very representative The controller adopts a very representative regression tree method in machine learning because of the RT advantages. Tree method in machine learning. The regression tree, as the name implies, is to use tree model to do regression problems, and each leaf will output a prediction value. The predicted value is generally the mean value of the output of the training set elements contained in the leaf, with y m as the predicted output value of the m-th leaf. When x i ∈ leaf m , the training set outputs y i . ave means averaging. The nodes of the tree split are shown in Figure 6. With each split, the regression tree divides the current data set into two subsets. For example, in i-th divided nodes, the left branch tree R L contains data divided by x i ≤ t i , and the right branch tree R R contains data divided by x i > z i . Then, the optimal segmentation point of each node is determined by minimizing the sum of the mean square errors of the two branches. The equation is with y L , y R ∈ R, respectively, that represents the average output of all points of the left branch tree R L and the right branch tree R R and finds the smallest x k corresponding t k by traversing in sequence. In this way, we can introduce the Require: Data in Equation (7) and a Loss Function Equation (11) Ensure:T min Step 1:Using Equation (11) to recursive binary splitting makes a large tree T 0 on the training data.
Step 2:Use K-fold cross-validation to choose best tree. For k =1,...,K: Apply cost complexity pruning(prune) to the large tree in order to obtain a sequence of best subtrees, as a function of α. end Step 3:After k-th fold, An optimal tree T iin is selected.T min = argmin

10
Wireless Communications and Mobile Computing   Figure 9: A snapshot of the developed building energy management system (the building image data source: [18]).

Wireless Communications and Mobile Computing
weight matrix Q ∈ R n * n and introduce it into the quadratic optimization function as an adjustable parameter.
Both Equation (10) and Equation (11) provide two solutions to get the optimal ðx k > t k Þ. The more times the tree is split, the more accurate the result. In terms of (9) and (10), the end conditions for building a tree are the same.
The process described above may produce good predictions on the training set but is likely to overfit the data, leading to poor test set performance. A smaller tree with fewer splits (that is, fewer regions R 1 , ⋯, R m ) might lead to lower   variance and better interpretation at the cost of a little bias. Therefore, a better strategy is to grow a very large tree T 0 and then prune it back in order to obtain a subtree. Intuitively, our goal is to select a subtree that subtree leads to the lowest test error rate.
For each value of α, there corresponds a subtree T ∈ T 0 such that is as small as possible. Here, |T | indicates the number of terminal nodes of the tree T, Rm is the rectangle (i.e., the subset of predictor space) corresponding to the mth terminal node, and y m is the predicted response associated with R m -, that is, the mean of the training observations in R m . It turns out that as we increase α from zero in prune, branches get pruned from the tree in a nested and predictable fashion, so obtaining the whole sequence of subtrees as a function of α is easy. This process is summarized in Algorithm 4.
In short, when the data set is a continuous variable, the objective function of the optimal segmentation of each input feature is determined firstly. And then the input element with the lowest cost is used as the segmentation variable. In this way, we obtain the tree model T min from Algorithm 4.

Design of the DPC-LSBoost Controller.
Although the regression tree has the advantages of faster training and prediction speed, it is also good at obtaining the nonlinear relationship in the dataset; however, it still suffers from regression tree's poor scalability that needs to be solved. We change the regression tree structure from a single tree to multiple trees, enhancing the system's stability and robustness. Figure 7 illustrates that the enhanced tree belongs to the branch of ensemble learning and includes two types of boosting and bagging. The main focus is on reducing bias. The latter is mainly about reducing variance. Representative learning algorithms are random forest and gradient descent tree. The full name of LSBoost is least-squares boosting which is a boosting algorithm in ensemble learning. It inherits the advantages of regression trees and is developed on the classification and regression tree (CART) algorithm. Actually, a regression tree is a weak learner.
The LSBoost is an improvement on the gradient boosting decision tree (GBDT) algorithm. It has been improved from a previous classification algorithm to a regression algorithm.

Wireless Communications and Mobile Computing
Like other boosting trees, LSBoost is training hundreds or thousands of weak learners like CART and iteratively updates the error and eventually becomes a strong learner, which is also the advantage of ensemble learning. Namely, each tree is part of the training of the current optimal. All the optimal are combined to build the strongest integrated tree. The schematic description of the LSBoost model is shown in Figure 8.
The difference between LSBoost and GBDT is that GBDT chooses to use the Gini index when the tree splits nodes, while LSBoost uses the minimum error square as the loss function at the tree split nodes as shown in Equation (13).
with x i that represents the i -th set of feature data in the training set, x i as the observation value corresponding to x i in the training set, and FðxÞ as the current prediction data. The loss function setting here is not fixed. The degree of fit can be checked through the trained data, evaluate through some indicators, such as R-square and RMSE, and choose a suitable loss function for the current data. LSBoost uses Equation 13 as a loss function to facilitate the data differentiation, simplify operations, reduce computational complexity, and reduce training time. For the entire system, it speeds up the system response and enhances robustness. Therefore, the constructed LSBoost algorithm is as follows.
Algorithm 5 shows the method of constructing the LSBoost controller by training on the data set. The input training data is the same as Equation (7), the number of trainings is M times, the loss function uses Equation (13), and the second step (B) is the RT weak learner established. v is the learning rate, ranging from 0 to 1, with a default value of 0.1. Finally, the prediction value F M ðxÞ after M trainings is output.

Algorithm Complexity Analysis.
The algorithm complexity can reflect the actual operation of the algorithm, which is divided into time complexity analysis and space complexity  analysis. For this reason, the DPC based on Algorithm 1 is used to analyze the influence of RT and LSBoost algorithms on the system. Table 5 shows the comparative analysis of time complexity and spatial complexity in multiple methods. D means the maximum depth of tree. n means the number of samples in the training set. d means the dimension of the data. k means the number of principal components.

Simulation and Verification
The Internet of Things platform used in this simulation experiment is a network service platform built by Nod-RED, MQTT broker, and other tools. Figure 9 demonstrates the current operation state, such as real-time sensor data display, energy consumption prediction curve, and log.
In this section, the case study's simulation results for indoor temperature control and energy consumption of residential buildings and office buildings for 15 days are demonstrated. We mainly focus on validating the proposed control strategies' performance for all investigated controllers (the TDNN, the MPC, the DPC-RT, and the DPC-LSBoost). The simulation objects selected this time are residential buildings (Section 3.1) and office buildings (Section 3.2). Based on the feature selection introduced in Section 4.4, we construct the reduced feature spacex dimension of the LSBoost model and the RT model to participate in training, following Equation (14).
with n y as the number of output variables, and n t as time converted into three sinusoidal signals with different frequencies, which correspond to days, weeks, and months, respectively. nr is the reference input, and nd is the number of disturbance signals after feature selection. An overview of control variables and machine learning parameters is given in Table 6. For the residential building, the dimension ofx is calculated by Equation (14): * n y = 6, nr = 1, nd = 8,and n t = 3. For the office building, the dimension ofx is calculated by Equation (14): * n y = 12, nr = 1, nd = 12,and n t = 3. Moreover, the reference input lb and the disturbance d at the current time and the next time are required during training. For more details, please see Table 6.
TDNN consists of one input layer, two hidden layers, and one output layer. Set the delay parameter N = 22, iterate 1000 times, and learn rate α = 0:01. The main parameter of MPC is to set prediction horizon N = 22. For ideal training results, the dataset is divided into training set, validation set, and test set, which are 80%, 10%, and 10%, respectively.

Residential Building Simulation
Analysis. This section presents the simulation results for a 6-room residential building's performance validation with the investigated controllers. The closed-loop profiles of 15 days are chosen from the simulation test. To clearly show the control effects of the building, ROOM6 is selected as the control object to analyze the temperature control and energy consumption, and    Figures 10 and 11. The other rooms have similar behavior. Figure 10 shows the comparison of temperature control effects with different control actions in ROOM6. It can be seen that both the MPC and the DPC-LSBoost have better control performance than the others. Under the MPC controller's action, the reference room temperature is well tracked. The temperature obtained by the TDNN fluctuates greatly, especially from the tenth to the thirteenth day. The control effect obtained by the DPC-RT is relatively general. Temperature changes abruptly on the first day, and there are more burrs in the waveform, but they will still closely follow the input. With the DPC-LSBoost, room temperature can be tracked well, make up for the DPC-RT's shortage, and achieve a good control effect. Under the MPC controller's action, the temperature change in the room is very smooth, and the temperature difference is small. The reference room temperature is well tracked to achieve a good control effect. Figure 11 shows the effects of the investigated controllers with energy consumption. It can be seen that the DPC-LSBoost has the lowest energy cost. Figure 12 shows the temperature and energy consumption of 6 rooms under the DPC-LSBoost control method. It can be found that the system will adjust the controller to varying degrees according to the state of the room. Compared with the second and sixth rooms, the first room will spend much energy stabilizing the temperature. Through this kind of fine management and control, each room's temperature can be controlled independently.
The indoor temperature changes are greatly affected by external disturbances. For the investigated residential buildings, there are a total of 44 external disturbances. Through the feature selection, the eight most relevant features are selected. Figure 13 shows the eight disturbances profiles. Three of them are the external ambient temperature (K), and five are the effects of solar radiation on various rooms in the house. The abscissa is a time interval of 15 days, a total  Figure 16: Comparison of the investigated controllers with respect to energy consumption in ROOM9. 16 Wireless Communications and Mobile Computing of 1440 time samples. Table 7 describes the specific information of the eight disturbances D1-D8. For power consumption, a holistic analysis is required. Figure 14 shows the comparison results of the total power consumption of the four controllers for 15 days. Figure 14 shows that the TDNN consumes the most energy, followed by the MPC and the RT, and the lowest energy consumption is the DPC-LSBoost. The detailed comparison results are shown in Table 8. Power consumption is analyzed from five dimensions: heating cost (kWh), cooling cost (kWh), total cost (kWh), PMV, and prediction time (s). It can be seen from the table that the overall power consumption of the DPC-LSBoost is the least, which is reduced by 78.909 kWh compared to the TDNN, and the overall energy consumption is reduced by 11.92% compared to the TDNN. With the prediction time, the DPC-LSBoost has the shortest time cost. The quantitative comparison of RMSE, R-square, and mean error for model accuracy is summarized in Table 9. It is observed that the DPC-LSBoost has the better model fitting capability.

Office Building Simulation
Analysis. The analysis methods for office buildings and residential buildings are consistent. However, the temperature setting is between 20°C and 22°C in the office building.   Figure 15 shows the room temperature controlled by all control strategies. The tracking effect is not desirable from the results, although they are all within the comfort zone. Figure 16 shows the energy consumption comparison of the four control methods. It is also found that the daily energy consumption of the MPC and the TDNN is relatively high, but the temperature change is not large, and even there is a certain energy loss due to the DPC-RT algorithm's single tree structure, which contributes to the control satisfaction violation. The DPC-LSBoost controller consumes the lowest daily energy and makes the room temperature more stable with little fluctuation.
The indoor temperature change shown in Figure 3, which is greatly affected by external disturbances. The 12 most relevant features are selected from 301 external disturbances by FS for the investigated office buildings. Figure 17 below shows the 12 perturbed features. Three of them are outside ambient temperature (K), and there are 9 solar radiation effects on each room. Table 10 gives detailed information on the 12 interferences D1-D12. Figure 18 shows the total power consumption with the investigated controllers. The TDNN and the MPC almost have similar control profiles with a higher peak value of the curve, especially from the tenth day, the power consumption began to soar, and the power consumption reached its peak in 12 days. Table 11 shows the comparative analysis of the control energy consumption and predicted time of the four controllers. It is found that the TDNN has the highest energy consumption, which is as high as 740.89 kWh. Compared with the TDNN, both the DPC-RT and the DPC-LSBoost are reduced significantly, which are 582.87 kWh and 515.61 kWh, respectively. It can be seen from the table that the overall power consumption of the DPC-LSBoost is the least, which is 225.28 kWh reduced compared to the TDNN, and the overall energy consumption is reduced by 30.4% compared to the TDNN. From the 15-day simulation test, the DPC-LSBoost takes the shortest prediction time comparing with other algorithms.
The quantitative comparison with three indicates (RMSE, R-square, and mean error) is demonstrated in Table 12. The same conclusion is achieved that the LSBoost has the better model fitting capability.

Conclusion and Prospect
This paper reports an innovative study combining the datadriven predictive control strategy with a complex cloud SCADA-based building energy management platform, which attempts to standardize communication protocols and data formats and further implement advanced control strategies. The platform also provides useful data representations to   We present two algorithms, based on RT and LSBoost, to create control-oriented models for the DPC. Moreover, an efficient feature selection method, which depends on the principal component analysis and the importance of disturbance variables, is leveraged to decrease the model's dimension and further alleviate the DPC optimization problem's complexity. We then apply the DPC to two different case studies for energy consumption in residential and office buildings. The numerical simulation shows that the DPC-LSBoost provides lower energy consumption while maintaining the required thermal comfort compared to the MPC, the TDNN, and the DPC-RT. With the same environmental comfort demand, compared with the TDNN, the peak power consumption with the DPC-LSBoost can be reduced by 11.92% and 30.4%, even compared to the DPC-RT 4.99% and 11.54% that are achieved. These advantages make the DPC-LSBoost an attractive tool for large-scale cyberphysical energy systems to reduce energy consumption. Also, in the context of prediction time, comparing with the MPC, the prediction time of the DPC-LSBoost is reduced by 72 s and 294.7 s, respectively.
Future work will focus on the combination of IoT with DPC (IoT-DPC), which will apply to more complex buildings. IoT-DPC applications are not limited to building energy management and include critical infrastructures such as water supply networks, district heating, and cooling.