Learning-Based Predictive Building Energy Model Using Weather Forecasts for Optimal Control of Domestic Energy Systems

The aim of this study is to develop a model that can accurately calculate building loads and demand for predictive control. Thus, the building energy model needs to be combined with weather prediction models operated by a model predictive controller to forecast indoor temperatures for specified rates of supplied energy. In this study, a resistance–capacitance (RC) building model is proposed where the parameters of the models are determined by learning. Particle swarm optimization is used as a learning scheme to search for the optimal parameters. Weather prediction models are proposed that use a limited amount of forecasting information fed by local meteorological centers. Assuming that weather forecasting was perfect, hourly outdoor temperatures were accurately predicted; meanwhile, differences were observed in the predicted solar irradiances values. In investigations to verify the proposed method, a seven-resistance, five-capacitance (7R5C) model was tested against a reference model in EnergyPlus using the predicted weather data. The root-mean-square errors of the 7R5C model in the prediction of indoor temperatures on all the specified days were within 0.5 ◦C when learning was performed using reference data obtained from the previous five days and weather prediction was included. This level of deviation in predictive control is acceptable considering the magnitudes of the loads and demand of the tested building.


Introduction
Heating, ventilation and air conditioning (HVAC) accounts for approximately 60% of the total energy consumption in buildings.An optimal control of HVAC systems can reduce energy consumption and achieve higher energy efficiency [1].When the thermal mass of structural elements, such as walls, foundations, and floors in buildings, is used to store energy to regulate future heat flow [2], systems can be operated with high efficiency [3].As thermal mass has a high time constant, adequate predictive control is required.Predictive control is typically achieved using system models, and this is called model predictive control (MPC).Under MPC, optimal HVAC operating schedules are planned to reduce HVAC energy consumption and guarantee the thermal comfort of the occupants.Accurate prediction using proper models is a key factor influencing MPC [4][5][6].In particular, the prediction of building energy loads and demand in the near future is important [7,8].
Li and Wen [9] reviewed methods for building energy modeling for control purposes.According to their work, building models can be classified into white, black, and gray-box models.White-box models account for all the physical details of a building using a number of equations to predict its energy demand or indoor temperature.Therefore, this group of models can describe detailed building dynamics.Building energy models implemented in well-known commercial building energy simulation tools, such as EnergyPlus [10], ESP-r [11], and TRNSYS [12], belong to the white-box model category.Several white-box models have been applied to MPC controllers.Corbin et al. used the EnergyPlus building model to satisfy the energy requirements of MPC systems and deduced optimal system control strategies [13].Similar co-simulations that use white-box models became popular through the building controls virtual test bed (BCVTB) developed in Lawrence Berkeley National Laboratory [14].The BCVTB facilitates the connection of controllers and building models defined using different tools.However, detailed white-box models typically require numerous parameter settings, particularly in a deterministic manner, wherein it is infeasible to determine adequate values that match a practical case [8].Black-box models are data-driven models that can be constructed by a statistical method that uses the correlation between input and output data.A popular black-box model is an artificial neural network (ANN), which exhibits advantages in solving nonlinear and multivariate problems [15].Several ANN-based MPC schemes have recently been developed.An ANN can predict indoor temperatures for a specified energy supply [16][17][18] and calculate building energy loads under specified zonal set-point temperatures [19][20][21][22].Similar black-box models are straightforwardly created using sample data; hence, the performance of the model is mainly dependent on the quality and quantity of the data used for learning.In general, an effective model can be constructed using a large amount of training data because input values beyond the ranges experienced during learning can result in unexpected errors [8].The gray-box model is a hybrid model that simplifies target systems that commonly use lumped parameters.An advantage of the gray-box model is that the physical relations among the parameters are maintained and dynamics of the target building can be described using optimized parameters.The resistance and capacitance network (RC) model is a typical gray-box model where the resistances and capacitances are determined through optimization.This learning-based RC model can describe building dynamics with a few learning data items because the number of lumped parameters is small and model outputs are constrained by the physical relations.Moreover, the RC model is constructed using few equations and, thus, can be conveniently implemented in a control processor.
By contrast, the key input values of the building energy model are weather data.To use the building energy model in an MPC loop, weather data for days subsequent to the specified one are required.Typically, hourly or sub-hourly predicted data are required.Past work on MPC has frequently excluded weather prediction, where weather information has been regarded as a known value.Outdoor air temperature and solar irradiance are important for building energy simulations.Several weather models have been proposed at different levels of detail according to the required information.Models can predict weather data for use in MPC applications.A practical methodology for weather prediction is to combine weather models and forecasting information provided by regional meteorological centers.Typically, the forecasting system predicts mean weather conditions for the subsequent day, and the information is conveniently accessed via an API.However, hourly prediction data are not always available.Shaheen and Osman [23] proposed a method for predicting outdoor temperatures, where the model used temperature correction coefficients based on past measured data.The coefficients can be tailored for target regions, and the error in the model can be corrected using outside temperatures measured in real time.Though it is suitable for use in real-time optimal control, it is not adequate for an MPC typically executed ahead by a day for daily prediction.Kawashima et al. [24] used similar temperature correction factors that were statistically determined; however, their model cannot be used for regions where measured data have not been sufficiently archived.The DOE-2 [25] has outdoor temperature prediction functions that can predict hourly outdoor temperatures using the minimum and maximum temperatures.A drawback of the model is that it requires the time of occurrence of the maximum or minimum temperatures, which are not provided in common forecasting systems.For predicting solar radiation, various empirical methods combined with physical models have been used [26][27][28][29][30].These models require various physical and astronomical factors, such as the solar constant, cloudiness, and scattering of air molecules [31].According to Wang et al. [32], calibrated local constants can enhance the model accuracy.However, similar to cases of temperature prediction, the data required for the models are not always available from the weather forecasting system.
Predictions of energy loads and demand are a key input to an MPC, as this energy must be fed by energy systems that are regulated by the MPC.These predictions are made using building energy and weather prediction models.Few studies have investigated the effects of coupling the two models.This study proposes a learning-based building model and simple weather prediction models.The building model is RC-based, and its parameters are determined using data through learning.A low order of RC model was tested, and it is coupled with the proposed weather prediction models.

Scope of the Work
A variety of factors are considered for the MPC, such as weather data, energy costs, and system characteristics.The operating strategies can vary according to the objective of the MPC and corresponding systems.A target system is presented here to clarify the scope of the work.
Figure 1 shows a house where cooling energy is provided by a chilled water storage tank that can be charged by a heat pump.An efficient method to regulate the energy storage systems is investigated.A practical method would be to regulate the set-point temperatures of the zone (T z,set ) and tank to search for the minimum cost over the entire planning period.The electricity required by the heat pump can be fed by an energy storage system (ESS) or a grid under a time-of-use (TOU) system, so that an optimal hourly plan of the set-point temperatures can be executed.combined with physical models have been used [26][27][28][29][30].These models require various physical and astronomical factors, such as the solar constant, cloudiness, and scattering of air molecules [31].
According to Wang et al. [32], calibrated local constants can enhance the model accuracy.However, similar to cases of temperature prediction, the data required for the models are not always available from the weather forecasting system.Predictions of energy loads and demand are a key input to an MPC, as this energy must be fed by energy systems that are regulated by the MPC.These predictions are made using building energy and weather prediction models.Few studies have investigated the effects of coupling the two models.This study proposes a learning-based building model and simple weather prediction models.The building model is RC-based, and its parameters are determined using data through learning.A low order of RC model was tested, and it is coupled with the proposed weather prediction models.

Scope of the Work
A variety of factors are considered for the MPC, such as weather data, energy costs, and system characteristics.The operating strategies can vary according to the objective of the MPC and corresponding systems.A target system is presented here to clarify the scope of the work.
Figure 1 shows a house where cooling energy is provided by a chilled water storage tank that can be charged by a heat pump.An efficient method to regulate the energy storage systems is investigated.A practical method would be to regulate the set-point temperatures of the zone (Tz,set) and tank to search for the minimum cost over the entire planning period.The electricity required by the heat pump can be fed by an energy storage system (ESS) or a grid under a time-of-use (TOU) system, so that an optimal hourly plan of the set-point temperatures can be executed.In this study, the thermal storage in the house shown in Figure 1 is the target object that represents a building.When the cooling energy rate, Qcon (W) is specified for the zone, the model for the thermal storage in the house can output the zone temperature Tz (°C).For a specified Qcon, an accurate estimation of Tz is essential for successful MPC implementation.As Qcon is a function of the difference between Tz and Tz,set, as shown by controller 1 in Figure 1, the errors in the prediction of Tz are likely to result in a plan of operation of Qcon that is not optimum.By contrast, the proposed model can predict Tz similar to that of the target house; thus, it can inversely result in a proper plan of operation of Qcon.The prediction accuracy of Tz is strongly related to that of Qcon.Similar works [33] have been carried out to test Tz under a specified Q.
This building model can be included in an MPC algorithm as component terms of matrices.For example, the linear programming (LP) model that is frequently applied for MPC [33] is set by typical formalism as Equation (1).Tz or Tz,set is included in the vector x of the variables to be optimized by minimizing an objective function, e.g., cost.The function is expressed as c T x where c is a coefficient vector.The building model is included in both A and b, which are the matrix of coefficients and the vector of known coefficients, respectively.The LP searches for an optimal plan for Tz,set and other In this study, the thermal storage in the house shown in Figure 1 is the target object that represents a building.When the cooling energy rate, Q con (W) is specified for the zone, the model for the thermal storage in the house can output the zone temperature T z ( • C).For a specified Q con , an accurate estimation of T z is essential for successful MPC implementation.As Q con is a function of the difference between T z and T z,set , as shown by controller 1 in Figure 1, the errors in the prediction of T z are likely to result in a plan of operation of Q con that is not optimum.By contrast, the proposed model can predict T z similar to that of the target house; thus, it can inversely result in a proper plan of operation of Q con .The prediction accuracy of T z is strongly related to that of Q con .Similar works [33] have been carried out to test T z under a specified Q.
This building model can be included in an MPC algorithm as component terms of matrices.For example, the linear programming (LP) model that is frequently applied for MPC [33] is set by typical formalism as Equation (1).T z or T z,set is included in the vector x of the variables to be optimized by minimizing an objective function, e.g., cost.The function is expressed as c T x where c is a coefficient vector.The building model is included in both A and b, which are the matrix of coefficients and the vector of known coefficients, respectively.The LP searches for an optimal plan for T z,set and other system set-point temperatures within specified bounds of x.Therefore, the building model needs to be expressed in discretized equations.The proposed RC model satisfies this requirement.min c T x subject to Ax ≤ b and x ≥ 0 (1) As explained in the introduction, this work is to combine the building energy model and weather forecasts, for predictive control.Figure 2 shows a schematic of the proposed methodology.An RC model is proposed in the following section, and a learning-based parameter setting method using past data is presented.In Section 4, a simple method is proposed to predict hourly weather data required to execute the RC model.In this work, tests were conducted under the following proposed conditions: Q is specified, optimal parameters are set by learning, and weather data are predicted.As explained in the introduction, this work is to combine the building energy model and weather forecasts, for predictive control.Figure 2 shows a schematic of the proposed methodology.An RC model is proposed in the following section, and a learning-based parameter setting method using past data is presented.In Section 4, a simple method is proposed to predict hourly weather data required to execute the RC model.In this work, tests were conducted under the following proposed conditions: Q is specified, optimal parameters are set by learning, and weather data are predicted.

Development of RC Model
According to ISO 13790 [34], RC models that use fewer calculation nodes are adequate to estimate energy loads and demand.They can be constructed in various orders using different numbers of resistances and capacitances.For example, a 3R2C (three resistances and two capacitances) model was proposed to calculate the building energy demand of an entire zone [35]; it was developed for application in building stock simulations.A more detailed RC model was proposed, where several RC nodes were used for each wall [36].To retain the benefits of simple models for control purposes, a low-order RC model is proposed in this work.

7R5C Model
Figure 3 represents a 7R5C (seven resistances and five capacitance) model.This 7R5C model is similar to previous RC models [35,36], but the current model structure is newly proposed in this work.The corresponding equations particularly for the wall are given as follows (Equations ( 2)-( 4)).

𝐶
Although a lumped wall is used, the wall is composed of three capacitances of Cwe, Cw, and Cwi (J/°C) to account for proper thermal responses to rapid changes in the boundary conditions.This implies that an MPC controller is likely to completely utilize the indoor side of the wall as a heat sink.To simplify the model and reduce the number of parameters to be optimized, weight factors are set

Development of RC Model
According to ISO 13790 [34], RC models that use fewer calculation nodes are adequate to estimate energy loads and demand.They can be constructed in various orders using different numbers of resistances and capacitances.For example, a 3R2C (three resistances and two capacitances) model was proposed to calculate the building energy demand of an entire zone [35]; it was developed for application in building stock simulations.A more detailed RC model was proposed, where several RC nodes were used for each wall [36].To retain the benefits of simple models for control purposes, a low-order RC model is proposed in this work.

7R5C Model
Figure 3 represents a 7R5C (seven resistances and five capacitance) model.This 7R5C model is similar to previous RC models [35,36], but the current model structure is newly proposed in this work.The corresponding equations particularly for the wall are given as follows (Equations ( 2)-( 4)).
Although a lumped wall is used, the wall is composed of three capacitances of C we , C w , and C wi (J/ • C) to account for proper thermal responses to rapid changes in the boundary conditions.This implies that an MPC controller is likely to completely utilize the indoor side of the wall as a heat sink.To simplify the model and reduce the number of parameters to be optimized, weight factors are set for the three wall capacities.In this study, the largest capacity of 0.98 of the total capacity of the wall was allocated to the middle part of the wall; moreover, each of the other surface walls had 1% of the total capacity.To consider the effects of zone and window capacity, the fourth and fifth C are proposed by adding heat capacity nodes for the zone (C z ) and windows (C win ).The equations pertaining to those nodes are given as follows (Equations ( 5) and ( 6)): The surface nodes, T we and T wi ( • C), distinctly account for the absorbed (Q s1 ) and transmitted (Q s2 ) solar irradiances.These are in units of W/m 2 , and the calculation method is detailed in Reference [37].R e and R i (W/ • C) approximately represent the thermal resistances related to outside and inside convective heat transfer; for example, R e = 1/(h c,e × S w ), and R w1 and R w2 are equal to the reciprocals of k w / e × S w .However, as the surface wall nodes, T we and T wi , have control volumes, the surface resistances R e and R i are not identical to those convective heat transfer coefficients.Nevertheless, all the resistances are determined by learning; hence, the deterministic meaning of the parameters is not as important.Equation ( 5) indicates the zonal air temperature, and this is our target variable under the specified energy rate Q con rejected to the indoor coil.Using R l , ventilation is considered.The window node can be calculated using Equation ( 6); here, additional resistances (R g1 , R g2 ) are required across the window nodes, and solar radiation is also absorbed in this node.
Sustainability 2019, 11, x FOR PEER REVIEW 5 of 16 for the three wall capacities.In this study, the largest capacity of 0.98 of the total capacity of the wall was allocated to the middle part of the wall; moreover, each of the other surface walls had 1% of the total capacity.To consider the effects of zone and window capacity, the fourth and fifth C are proposed by adding heat capacity nodes for the zone (Cz) and windows (Cwin).The equations pertaining to those nodes are given as follows (Equations ( 5) and ( 6)): The surface nodes, Twe and Twi (°C), distinctly account for the absorbed (Qs1) and transmitted (Qs2) solar irradiances.These are in units of W/m 2 , and the calculation method is detailed in Reference [37].Re and Ri (W/°C) approximately represent the thermal resistances related to outside and inside convective heat transfer; for example, Re = 1 / (hc,e × Sw), and Rw1 and Rw2 are equal to the reciprocals of kw / e × Sw.However, as the surface wall nodes, Twe and Twi, have control volumes, the surface resistances Re and Ri are not identical to those convective heat transfer coefficients.Nevertheless, all the resistances are determined by learning; hence, the deterministic meaning of the parameters is not as important.Equation ( 5) indicates the zonal air temperature, and this is our target variable under the specified energy rate Qcon rejected to the indoor coil.Using Rl, ventilation is considered.The window node can be calculated using Equation ( 6); here, additional resistances (Rg1, Rg2) are required across the window nodes, and solar radiation is also absorbed in this node.

Parameter Optimization
The main parameters of the RC models are to be determined such that the predicted indoor temperatures Tz are similar to the target values.Such a learning process results in optimal parameters and can be implemented using an optimization method.According to previous studies [38,39], simulations with models using learning-based optimal parameters can demonstrate a realistic situation, exhibiting sufficient model applicability.The optimization proceeds by adjusting the parameters within specified bounds to reduce errors between the simulated and target values during the entire learning period.
In this study, daily sequential learning is required to set the operation planning of the HVAC system for the future; hence, the optimization algorithm must be rapid.Particle swarm optimization (PSO) is a common method used for learning and is advantageous as its calculation time does not increase significantly when the number of variables to be optimized increases [40,41].According to Wang [42], the PSO algorithm exhibits more stable performance pertaining to parameter settings in terms of computation when the number of parameters is increased.Therefore, PSO is selected as the

Parameter Optimization
The main parameters of the RC models are to be determined such that the predicted indoor temperatures T z are similar to the target values.Such a learning process results in optimal parameters and can be implemented using an optimization method.According to previous studies [38,39], simulations with models using learning-based optimal parameters can demonstrate a realistic situation, exhibiting sufficient model applicability.The optimization proceeds by adjusting the parameters within specified bounds to reduce errors between the simulated and target values during the entire learning period.
In this study, daily sequential learning is required to set the operation planning of the HVAC system for the future; hence, the optimization algorithm must be rapid.Particle swarm optimization (PSO) is a common method used for learning and is advantageous as its calculation time does not increase significantly when the number of variables to be optimized increases [40,41].According to Wang [42], the PSO algorithm exhibits more stable performance pertaining to parameter settings in terms of computation when the number of parameters is increased.Therefore, PSO is selected as the learning algorithm to determine the parameters of the proposed RC models.
The performance of the PSO algorithm is affected by the size of the swarm.A larger swarm size is more effective for determining a solution close to the global optimum; however, it can increase the computation time.MATLAB documentation [43] recommends a swarm size that is at least 100 times larger than the number of variables to be optimized.Thus, the swarm size was set to 2000 based on the 7R5C case.
Table 1 lists the parameters of the 7R5C model tested.The PSO method determines the optimal solution by repeating simulations with various combinations of parameters within the bounds presented in Table 1.The minimum and maximum bounds of the parameters are proposed such that they approximate the corresponding physically realistic ranges.
Table 1.Bounds of the resistance-capacitance (RC) parameters to be optimized.

Weather Prediction Models
The 7R5C model proposed in the previous section requires weather data, such as T a , Q s1 , and Q s2 , to run simulations.These inputs can be obtained from regional weather forecasting systems.Figure 4 shows a screenshot of a regional weather forecasting website.As shown in the figure, the forecasted outdoor temperatures and sky conditions for the few days after the given day were provided every three hours.
The prediction of outdoor air temperatures is straightforward as temperatures forecasted at intervals of 3 h can be directly used for predicting hourly temperature by means of interpolation.For most cases, this is adequate, as outdoor temperatures change gradually over a short period.
However, as solar irradiance cannot be directly predicted, a prediction model is required.The forecasting system specifies conditions pertaining to cloudiness. Figure 4 shows four types of sky conditions represented by icons: Mostly cloudy, cloudy, partly cloudy, and clear sky.As cloudiness strongly relates to solar irradiance, the proposed solar prediction model uses this relation.
The model is based on a statistical approach using past data concerning solar irradiance and corresponding cloudiness.The solar irradiance indicates hourly total horizontal irradiance.The process of predicting the total horizontal irradiance is illustrated in Figure 5.The prediction of outdoor air temperatures is straightforward as temperatures forecasted at intervals of 3 h can be directly used for predicting hourly temperature by means of interpolation.For most cases, this is adequate, as outdoor temperatures change gradually over a short period.
However, as solar irradiance cannot be directly predicted, a prediction model is required.The forecasting system specifies conditions pertaining to cloudiness. Figure 4 shows four types of sky conditions represented by icons: Mostly cloudy, cloudy, partly cloudy, and clear sky.As cloudiness strongly relates to solar irradiance, the proposed solar prediction model uses this relation.
The model is based on a statistical approach using past data concerning solar irradiance and corresponding cloudiness.The solar irradiance indicates hourly total horizontal irradiance.The process of predicting the total horizontal irradiance is illustrated in Figure 5.
The first step is to gather hourly horizontal irradiance data of the previous four weeks.This selection utilizes the fact that a large amount of past data is likely to enhance the model performance; however, the irradiance data collected in the distant past can reduce the model accuracy.This is because solar irradiance is also strongly dependent on solar altitude, which changes distinctly over months.The dataset of past irradiance was sorted by the categories of sky conditions and time of day, as shown in the first subfigure of Figure 5.
The second step is to form a single sheet where a single value is assigned to each cell representing a specific time and category.The values are obtained by averaging past values of the same category and time.When the sheet is complete, prediction can be conducted by selecting the value of the target hour in the forecasted cloudiness category.Finally, for cases where the data sheet is incomplete, the missing values are approximated by interpolating or extrapolating the adjacent values.This process is sequenced each day to update the data sheet.The prediction of outdoor air temperatures is straightforward as temperatures forecasted at intervals of 3 h can be directly used for predicting hourly temperature by means of interpolation.For most cases, this is adequate, as outdoor temperatures change gradually over a short period.
However, as solar irradiance cannot be directly predicted, a prediction model is required.The forecasting system specifies conditions pertaining to cloudiness. Figure 4 shows four types of sky conditions represented by icons: Mostly cloudy, cloudy, partly cloudy, and clear sky.As cloudiness strongly relates to solar irradiance, the proposed solar prediction model uses this relation.
The model is based on a statistical approach using past data concerning solar irradiance and corresponding cloudiness.The solar irradiance indicates hourly total horizontal irradiance.The process of predicting the total horizontal irradiance is illustrated in Figure 5.
The first step is to gather hourly horizontal irradiance data of the previous four weeks.This selection utilizes the fact that a large amount of past data is likely to enhance the model performance; however, the irradiance data collected in the distant past can reduce the model accuracy.This is because solar irradiance is also strongly dependent on solar altitude, which changes distinctly over months.The dataset of past irradiance was sorted by the categories of sky conditions and time of day, as shown in the first subfigure of Figure 5.
The second step is to form a single sheet where a single value is assigned to each cell representing a specific time and category.The values are obtained by averaging past values of the same category and time.When the sheet is complete, prediction can be conducted by selecting the value of the target hour in the forecasted cloudiness category.Finally, for cases where the data sheet is incomplete, the missing values are approximated by interpolating or extrapolating the adjacent values.This process is sequenced each day to update the data sheet.

Data averaging
Interpolating for missing data The first step is to gather hourly horizontal irradiance data of the previous four weeks.This selection utilizes the fact that a large amount of past data is likely to enhance the model performance; however, the irradiance data collected in the distant past can reduce the model accuracy.This is because solar irradiance is also strongly dependent on solar altitude, which changes distinctly over months.The dataset of past irradiance was sorted by the categories of sky conditions and time of day, as shown in the first subfigure of Figure 5.
The second step is to form a single sheet where a single value is assigned to each cell representing a specific time and category.The values are obtained by averaging past values of the same category and time.When the sheet is complete, prediction can be conducted by selecting the value of the target hour in the forecasted cloudiness category.Finally, for cases where the data sheet is incomplete, the missing values are approximated by interpolating or extrapolating the adjacent values.This process is sequenced each day to update the data sheet.
From the predicted total horizontal solar irradiance, Q s1 and Q s2 can be calculated as a function of the vertical solar irradiances and the corresponding surface area of walls and windows of the target building [37].The vertical solar irradiances on the walls and windows in different orientations can be obtained from the total horizontal irradiance using a common direct and diffuse split model [44].Of the models for splitting direct and diffuse irradiances, the one proposed by Liu and Jordan [45] was used in this study, as it is a straightforward split model that requires only cloudiness for calculation.That is, other more detailed models cannot be used, as the required information is not available in most forecasting systems.As illustrated in Equation ( 7), Liu and Jordan's model [45] is expressed as the ratio of the diffuse irradiance (I d ) to the total horizontal irradiance (I).K t is a sky clearness factor that is the reciprocal of cloudiness or sky cover and has a value between zero and one.If K t is close to one, the sky is regarded as the clearest.To convert the four categories into K t , specific K t values are allocated as follows: Most cloudy: −0.25, cloudy: −0.5, partly cloudy: −0.75, and clear: −1.The solar altitude h can be deduced by the solar geometry as follows:

Test Methodology
To test the proposed RC and weather prediction models, a detailed simulation model was selected as the reference model.The model was named "SingleFamilyHouse_TwoSpeed_ZoneAir-Balance.idf"and it is available in EnergyPlus example files.The target building was a single-family house of area 186 m 2 and is shown in Figure 6.The model consists of a living room, garage, and attic zone; here, only the living room was the conditioned zone.In this study, a simulation for the entire house was executed, and results pertaining to only the living room were used to train the tested RC models and obtain the optimal parameters.Several studies have used multiple RC models to describe building structures or zones in detail for a detailed comparison [38].However, this study used a single RC model limited to the tested zone, omitting the adjacent zones.use of the optimal parameters obtained by learning is likely to minimize the effects of the adjacent buffer space surrounding the target zone.Although it is practical for model implementation and usability, it can still cause model performance to degrade.Typical weather data for Seoul were provided to the model, and the corresponding sky clearness factor K t was directly used.This measured K t available in the weather dataset was directly converted to the four categories; the sky condition categories for the subsequent day were deduced from it.The mean K t values observed every 3 h were used to match them with the forecast case shown in Figure 4. Thus, it was assumed that the weather was perfectly forecasted.From the predicted total horizontal solar irradiance, Qs1 and Qs2 can be calculated as a function of the vertical solar irradiances and the corresponding surface area of walls and windows of the target building [37].The vertical solar irradiances on the walls and windows in different orientations can be obtained from the total horizontal irradiance using a common direct and diffuse split model [44].Of the models for splitting direct and diffuse irradiances, the one proposed by Liu and Jordan [45] was used in this study, as it is a straightforward split model that requires only cloudiness for calculation.That is, other more detailed models cannot be used, as the required information is not available in most forecasting systems.As illustrated in Equation (7), Liu and Jordan's model [45] is expressed as the ratio of the diffuse irradiance (Id) to the total horizontal irradiance (I).Kt is a sky clearness factor that is the reciprocal of cloudiness or sky cover and has a value between zero and one.If Kt is close to one, the sky is regarded as the clearest.To convert the four categories into Kt, specific Kt values are allocated as follows: Most cloudy: −0.25, cloudy: −0.5, partly cloudy: −0.75, and clear: −1.The solar altitude h can be deduced by the solar geometry as follows:

Test Methodology
To test the proposed RC and weather prediction models, a detailed simulation model was selected as the reference model.The model was named "SingleFamilyHouse_TwoSpeed_ZoneAir-Balance.idf"and it is available in EnergyPlus example files.The target building was a single-family house of area 186 m 2 and is shown in Figure 6.The model consists of a living room, garage, and attic zone; here, only the living room was the conditioned zone.In this study, a simulation for the entire house was executed, and results pertaining to only the living room were used to train the tested RC models and obtain the optimal parameters.Several studies have used multiple RC models to describe building structures or zones in detail for a detailed comparison [38].However, this study used a single RC model limited to the tested zone, omitting the adjacent zones.The use of the optimal parameters obtained by learning is likely to minimize the effects of the adjacent buffer space surrounding the target zone.Although it is practical for model implementation and usability, it can still cause model performance to degrade.Typical weather data for Seoul were provided to the model, and the corresponding sky clearness factor Kt was directly used.This measured Kt available in the weather dataset was directly converted to the four categories; the sky condition categories for the subsequent day were deduced from it.The mean Kt values observed every 3 h were used to match them with the forecast case shown in Figure 4. Thus, it was assumed that the weather was perfectly forecasted.As mentioned above, sequential parameter learning was carried out daily so that the results of the EnergyPlus simulation for the five days prior to the specified one could be provided as learning data.As a target control variable in our MPC was the indoor set-point temperature, the reference model was As mentioned above, sequential parameter learning was carried out daily so that the results of the EnergyPlus simulation for the five days prior to the specified one could be provided as learning data.As a target control variable in our MPC was the indoor set-point temperature, the reference model was executed with variable set-point temperatures to subject the RC models to a variety of cases during the training, as shown in Figure 7.The corresponding Qcon and Qi are also presented at the bottom, and the outdoor temperatures are plotted at the top.The performance of the proposed model in terms of learning and prediction was evaluated with the error estimators provided in Equations ( 8)-( 10).The root-mean-square error (RMSE) and coefficient of variation of the RMSE (CVRMSE) were used to estimate the model performance; moreover, the normalized relative-mean-square error (NRMSE) was used to evaluate the solar irradiance prediction where the measured values were distributed over a large bound:

Prediction of Outdoor Air Temperatures
Figure 8 shows the predicted hourly outdoor temperatures.As temperatures change gradually, the interpolated temperatures are similar to those in the reference case and exhibited an RMSE of 0.1 °C.The right scatter plot more clearly indicates that the prediction accuracy is high, as the points are distributed closely around the diagonal line.When weather forecasting is imperfect, these predicted temperatures tend to deviate more from the measured data.The performance of the proposed model in terms of learning and prediction was evaluated with the error estimators provided in Equations ( 8)-( 10).The root-mean-square error (RMSE) and of variation of the RMSE (CVRMSE) were used to estimate the model performance; moreover, the normalized relative-mean-square error (NRMSE) was used to evaluate the solar irradiance prediction where the measured values were distributed over a large bound:

Prediction of Outdoor Air Temperatures
Figure 8 shows the predicted hourly outdoor temperatures.As temperatures change gradually, the interpolated temperatures are similar to those in the reference case and exhibited an RMSE of 0.1 • C. The right scatter plot more clearly indicates that the prediction accuracy is high, as the points are distributed closely around the diagonal line.When weather forecasting is imperfect, these predicted temperatures tend to deviate more from the measured data.

Prediction of Solar Irradiance
For the solar irradiance prediction model, hourly solar radiation was predicted for a month in the summer; the results for over two weeks are shown in Figure 9a.The solar irradiation prediction model could not describe the measured data as accurately as was the case for temperature prediction; however, the pattern was similarly well predicted.The error in terms of NRMSE was 8.8%.In Figure 9a, the bar graph represents sky cover (1/Kt), and the higher errors occurred mostly on cloudy days.This was because different values of solar irradiances can be measured even when the sky is completely covered with clouds.The model used the average values over the previous four weeks; thus, the daily predicted irradiance did not change significantly when the corresponding sky coverrelated factors were identical.For example, Figure 9a shows similar solar irradiance prediction for days with 100% sky cover.
For the same reason, Liu and Jordan's model [45] exhibited a similar error pattern in predicting diffuse irradiance, as shown in Figure 9b; however, it yielded larger errors in terms of NRMSE as the errors of the split model were added.The overall performance of the weather prediction models is summarized in Table 2.The influence of the weather prediction results on the building energy model is described in the following section.

Prediction of Solar Irradiance
For the solar irradiance prediction model, hourly solar radiation was predicted for a month in the summer; the results for over two weeks are shown in Figure 9a.The solar irradiation prediction model could not describe the measured data as accurately as was the case for temperature prediction; however, the pattern was similarly well predicted.The error in terms of NRMSE was 8.8%.In Figure 9a, the bar graph represents sky cover (1/K t ), and the higher errors occurred mostly on cloudy days.This was because different values of solar irradiances can be measured even when the sky is completely covered with clouds.The model used the average values over the previous four weeks; thus, the daily predicted irradiance did not change significantly when the corresponding sky cover-related factors were identical.For example, Figure 9a shows similar solar irradiance prediction for days with 100% sky cover.

Prediction of Solar Irradiance
For the solar irradiance prediction model, hourly solar radiation was predicted for a month in the summer; the results for over two weeks are shown in Figure 9a.The solar irradiation prediction model could not describe the measured data as accurately as was the case for temperature prediction; however, the pattern was similarly well predicted.The error in terms of NRMSE was 8.8%.In Figure 9a, the bar graph represents sky cover (1/Kt), and the higher errors occurred mostly on cloudy days.This was because different values of solar irradiances can be measured even when the sky is completely covered with clouds.The model used the average values over the previous four weeks; thus, the daily predicted irradiance did not change significantly when the corresponding sky coverrelated factors were identical.For example, Figure 9a shows similar solar irradiance prediction for days with 100% sky cover.
For the same reason, Liu and Jordan's model [45] exhibited a similar error pattern in predicting diffuse irradiance, as shown in Figure 9b; however, it yielded larger errors in terms of NRMSE as the errors of the split model were added.The overall performance of the weather prediction models is summarized in Table 2.The influence of the weather prediction results on the building energy model is described in the following section.For the same reason, Liu and Jordan's model [45] exhibited a similar error pattern in predicting diffuse irradiance, as shown in Figure 9b; however, it yielded larger errors in terms of NRMSE as the errors of the split model were added.The overall performance of the weather prediction models is summarized in Table 2.The influence of the weather prediction results on the building energy model is described in the following section.  Coefficient of variation of the RMSE.

Influence of Predicted Weather on Zonal Temperatures
The investigation of the impact of the errors in the predicted weather data on the zonal temperatures is described in this section.To test the influence of only the weather, the predicted weather data were entered into the reference EnergyPlus model.The EnergyPlus weather data file (EPW) was then generated using the predicted data.
Figure 10 shows the simulated indoor air temperatures using the proposed predicted weather data.The simulated building model differed from the reference model only with regard to the weather data.Although the error in the prediction of solar irradiance was up to 15% in terms of NRMSE, it was 0.43% in terms of CVRMSE.This implies that the proposed weather prediction models can be used for control purposes.  Coefficient of variation of the RMSE.

Influence of Predicted Weather on Zonal Temperatures
The investigation of the impact of the errors in the predicted weather data on the zonal temperatures is described in this section.To test the influence of only the weather, the predicted weather data were entered into the reference EnergyPlus model.The EnergyPlus weather data file (EPW) was then generated using the predicted data.
Figure 10 shows the simulated indoor air temperatures using the proposed predicted weather data.The simulated building model differed from the reference model only with regard to the weather data.Although the error in the prediction of solar irradiance was up to 15% in terms of NRMSE, it was 0.43% in terms of CVRMSE.This implies that the proposed weather prediction models can be used for control purposes.

Learning Performance of the Proposed 7R5C Model
The proposed 7R5C model was tested particularly for the learning performance.The learning period was set to five days.Figure 11 shows a learning case where the RC model learned to use optimized parameters, following the indoor temperatures of the reference model.The 7R5C model exhibited results similar to those of the reference model, with an RMSE of 0.37 °C for the entire test period of a month.It is noteworthy that the reference model was exposed to more boundary conditions, including the soil temperatures, sky temperatures, and buffer space temperatures of the attic and garage.As it is practically challenging to feed these values to MPC controllers, the proposed RC model was set with only boundaries that could be straightforwardly obtained.

Learning Performance of the Proposed 7R5C Model
The proposed 7R5C model was tested particularly for the learning performance.The learning period was set to five days.Figure 11 shows a learning case where the RC model learned to use optimized parameters, following the indoor temperatures of the reference model.The 7R5C model exhibited results similar to those of the reference model, with an RMSE of 0.37 • C for the entire test period of a month.It is noteworthy that the reference model was exposed to more boundary conditions, including the soil temperatures, sky temperatures, and buffer space temperatures of the attic and garage.As it is practically challenging to feed these values to MPC controllers, the proposed RC model was set with only boundaries that could be straightforwardly obtained.

Prediction Using 7R5C Model
The 7R5C model was also tested for prediction.Daily prediction was repeated; thus, the results shown in Figure 12 are the results of 10 consecutive days of prediction obtained by sequence learning data.Similarly, the 7R5C model yielded a comparable performance on learning, with an RMSE of 0.39 °C.
The 7R5C model was tested for cases where weather prediction was included.Simulations similar to the previous ones were carried out; however, the initial weather data were replaced by the predicted weather.The overall prediction results are also shown in Figure 12.Learning was performed in a similar manner as before; however, the predicted weather data were used for prediction.The error increased marginally and was 0.49 °C in terms of RMSE and 1.9% in terms of CVRMSE; meanwhile, the maximum deviation increased more, although apparently temporarily.The 7R5C model was still similar to the reference model, particularly in terms of the patterns of temperature variation.Similar accuracy was also found in an existing well-calibrated RC model [46], but it is worthwhile to note that the test results in this work were obtained under the weather prediction.All the simulation results are summarized and listed in Table 3.
The proposed 7R5C and the weather prediction models could predict indoor air temperatures on days subsequent to the specified one within a difference of 0.5 °C for a specified system operation (Qcon).This is likely to have resulted in a difference of less than 100 W of hourly load for the reference building, based on Q = CΔT/Δt.This level of deviations appears acceptable for a building with a system load of over 10 kW (see Figure 7).Further tests for a higher order of RC models were not conducted, as the 7R5C model was acceptably accurate for an MPC application and other higher RC models require more complex structures.For example, though a number of wall capacities for different orientations can be used, such models are not practical for learning.

Prediction Using 7R5C Model
The 7R5C model was also tested for prediction.Daily prediction was repeated; thus, the results shown in Figure 12 are the results of 10 consecutive days of prediction obtained by sequence learning Similarly, the 7R5C model yielded a comparable performance on learning, with an RMSE of 0.39

Conclusions
Prediction of building energy loads and demand is a key factor influencing MPC.A building energy model is required that can accurately calculate them for the target prediction days.Therefore, weather prediction is required, and the building model should be simple for controller implementation.
In this study, a 7R5C model was proposed, wherein the development focused on model applicability.Simple single-zone modeling was applied using the RC model, and the model parameters were optimized by learning to minimize the error caused by such simplifications.To rapidly search for the optimal parameters, the PSO method was applied.The 7R5C model was tested for cases where weather prediction was included.Simulations similar to the previous ones were carried out; however, the initial weather data were replaced by the predicted weather.The overall prediction results are also shown in Figure 12.Learning was performed in a similar manner as before; however, the predicted weather data were used for prediction.The error increased marginally and was 0.49 • C in terms of RMSE and 1.9% in terms of CVRMSE; meanwhile, the maximum deviation increased more, although apparently temporarily.The 7R5C model was still similar to the reference model, particularly in terms of the patterns of temperature variation.Similar accuracy was also found in an existing well-calibrated RC model [46], but it is worthwhile to note that the test results in this work were obtained under the weather prediction.All the simulation results are summarized and listed in Table 3.The proposed 7R5C and the weather prediction models could predict indoor air temperatures on days subsequent to the specified one within a difference of 0.5 • C for a specified system operation (Q con ).This is likely to have resulted in a difference of less than 100 W of hourly load for the reference building, based on Q = C∆T/∆t.This level of deviations appears acceptable for a building with a system load of over 10 kW (see Figure 7).Further tests for a higher order of RC models were not conducted, as the 7R5C model was acceptably accurate for an MPC application and other higher RC models require more complex structures.For example, though a number of wall capacities for different orientations can be used, such models are not practical for learning.

Conclusions
Prediction of building energy loads and demand is a key factor influencing MPC.A building energy model is required that can accurately calculate them for the target prediction days.Therefore, weather prediction is required, and the building model should be simple for controller implementation.
In this study, a 7R5C model was proposed, wherein the development focused on model applicability.Simple single-zone modeling was applied using the RC model, and the model parameters were optimized by learning to minimize the error caused by such simplifications.To rapidly search for the optimal parameters, the PSO method was applied.
For weather prediction, the model used forecasting information provided by local weather centers.As the information was insufficient for predicting hourly weather, interpolation and sky-conditions-based irradiance prediction model were proposed.Owing to the limited information, the predicted irradiance deviated from the measured values particularly for diffuse irradiances; however, the predicted temperature was accurate under the assumption that weather was perfectly forecasted by the local meteorological center.
The performance of the proposed prediction model was investigated with a reference building defined using a detailed commercial model.The main results are summarized as follows:

•
The proposed prediction method for hourly outdoor temperatures was accurate with an RMSE of 0.1 • C, assuming that weather forecasting is perfect; • whereas solar irradiance was predicted with an NRMSE of 15%, the effects of the error on the indoor temperatures (0.43% in terms of CVRMSE) were not significant; • the 7R5C model could predict indoor air temperatures within 0.5 • C even when weather prediction was included.
This error of 0.5 • C is likely to have caused a deviation of approximately 100 W in the cooling energy rates; moreover, an MPC controller is likely to set a future operating plan of HVAC systems with a deviation of such magnitude.This appears acceptable, as the cooling load of the reference building case was significantly larger than this level of deviation.
The proposed models use fewer equations and they require small amount of memory.In consequence, typical local devices can still be used for implementing them in an MPC processor without resorting to server-based control applications.This is an important factor to consider when controllers are designed for small-size buildings.

Figure 1 .
Figure 1.Example of energy storage systems and model predictive control (MPC) controllers.

Figure 1 .
Figure 1.Example of energy storage systems and model predictive control (MPC) controllers.

Figure 2 .
Figure 2. Schematic of proposed methodology to combine learning-based building energy model and weather forecast models using past data.

Figure 2 .
Figure 2. Schematic of proposed methodology to combine learning-based building energy model and weather forecast models using past data.

Sustainability 2019 , 16 Figure 4 .
Figure 4. Example of real-time weather forecast system in Korea.

Figure 4 .
Figure 4. Example of real-time weather forecast system in Korea.

Figure 4 .
Figure 4. Example of real-time weather forecast system in Korea.

Figure 5 .
Figure 5. Algorithm to predict total solar irradiance using past measured data: Data over past few weeks are grouped and averaged according to time of day and cloudiness.

Figure 5 .
Figure 5. Algorithm to predict total solar irradiance using past measured data: Data over past few weeks are grouped and averaged according to time of day and cloudiness.

Figure 7 .
Figure 7. Variation in indoor temperature according to Qcon, internal casual gain Qi, and Ta.

Figure 7 .
Figure 7. Variation in indoor temperature according to Q con , internal casual gain Q i , and T a .

Figure 8 .
Figure 8. Predicted hourly outdoor air temperatures: (a) Hourly temperatures are obtained by interpolating temperatures forecasted at intervals of 3 h; (b) scatter plot of the predicted hourly temperatures.

Figure 8 .
Figure 8. Predicted hourly outdoor air temperatures: (a) Hourly temperatures are obtained by interpolating temperatures forecasted at intervals of 3 h; (b) scatter plot of the predicted hourly temperatures.

Figure 8 .
Figure 8. Predicted hourly outdoor air temperatures: (a) Hourly temperatures are obtained by interpolating temperatures forecasted at intervals of 3 h; (b) scatter plot of the predicted hourly temperatures.

Figure 10 .
Figure 10.Effect of errors in predicting weather data on indoor temperature variations.

Figure 10 .
Figure 10.Effect of errors in predicting weather data on indoor temperature variations.

Figure 11 .
Figure 11.Learning performance of the proposed 7R5C model.

Figure 11 .
Figure 11.Learning performance of the proposed 7R5C model.

Figure 12 .
Figure 12. 7R5C model without and including weather prediction.

Figure 12 .
Figure 12. 7R5C model without and including weather prediction.

Table 2 .
Performance of the proposed weather prediction models.

Table 2 .
Performance of the proposed weather prediction models.

Table 2 .
Performance of the proposed weather prediction models.

Table 3 .
Performance of the proposed 7R5C model.

Table 3 .
Performance of the proposed 7R5C model.
Author Contributions: All the authors developed and tested the presented models and methodologies.B.-K.J. drafted this manuscript, E.-J.K. revised it, and the other authors approved the current manuscript.matrix of coefficients in LP