Available online at www.sciencedirect.com
ScienceDirect Available onlineatatwww.sciencedirect.com www.sciencedirect.com Available online
ScienceDirect ScienceDirect
Energy Procedia 00 (2017) 000–000
www.elsevier.com/locate/procedia
Energy (2017) 000–000 161–166 EnergyProcedia Procedia143 00 (2017) www.elsevier.com/locate/procedia
World Engineers Summit – Applied Energy Symposium & Forum: Low Carbon Cities & Urban Energy Joint Conference, WES-CUE 2017, 19–21 July 2017, Singapore
A Meta Model Based Bayesian Approach for Building Energy The 15th International Symposium on District Heating and CoolingModels Calibration
Assessing the feasibility of using the heat demand-outdoor Jun Yuana, Victor Nianb, Bin Sub temperature function for a University, long-term heat demand forecast Shanghai Maritime 1550 Haigangdistrict Ave, Shanghai, China a
b
Energy Studies Institute, 29 Heng Mui Keng Terrace, Singapore 119620, Singapor
I. Andrića,b,c*, A. Pinaa, P. Ferrãoa, J. Fournierb., B. Lacarrièrec, O. Le Correc a IN+ Center for Innovation, Technology and Policy Research - Instituto Superior Técnico, Av. Rovisco Pais 1, 1049-001 Lisbon, Portugal b Abstract Veolia Recherche & Innovation, 291 Avenue Dreyfous Daniel, 78520 Limay, France c Département Systèmes Énergétiques et Environnement - IMT Atlantique, 4 rue Alfred Kastler, 44300 Nantes, France Buildings contribute a large proportion of energy-related emissions. In order to characterize the buildings’ energy performance, building energy models have been widely used due to their flexibility and convenience. When building energy models are developed to represent the existing buildings, there always exist some unknown or unmeasurable parameters which need to be specified in the simulation models. It is important to calibrate these parameters before applying the building energy models for intended use. In addition, there are various uncertainties in the using of the building energy Abstract models. To provide more reliable and confident results for decision making, it is necessary to account for these uncertainties in the calibration procedure. In this paper, a metamodel based Bayesian approach is proposed to calibrate the building energy models. This method is efficient by using District heating networks areinto commonly addressed in the To literature as one of most effective solutions for decreasing the metamodel and can also take account various uncertainties. further improve the the computational efficiency of the proposed method, the a greenhouse gas emissions the building sector. evaluate These systems require high investments which are returned through the heat posterior approximation methodfrom is proposed to analytically the posterior distributions in the Bayesian approach. The proposed method is applied calibrate an EnergyPlus model which is developed simulate an office building locatedheat in Singapore. results indicate that sales. toDue to the changed climate conditions and tobuilding renovation policies, demandThe in numerical the future could decrease, itprolonging is accurate and to usereturn the proposed theefficient investment period.method for building energy models calibration.
The main scope of this paper is to assess the feasibility of using the heat demand – outdoor temperature function for heat demand
© 2017 The Authors. Published by Elsevier Ltd. forecast. The district of Alvalade, located in Lisbon (Portugal), was used as a case study. The district is consisted of 665 Peer-review under responsibility of the scientific committee of the World Engineers Summit – Applied Energy Symposium & Forum: Low Carbon buildings thatEnergy vary Joint in both construction period and typology. Three weather scenarios (low, medium, high) and three district Cities & Urban Conference.
renovation scenarios were developed (shallow, intermediate, deep). To estimate the error, obtained heat demand values were and validated by the authors. The results showed that when only weather change is considered, the margin of error could be acceptable for some applications (the error in annual demand was lower than 20% for all weather scenarios considered). However, after introducing renovation 1. Introduction scenarios, the error value increased up to 59.5% (depending on the weather and renovation scenarios combination considered). The value of slope coefficient increased on average within the range of 3.8% up to 8% per decade, that corresponds to the Building is one of the major contributors to the global energy consumption and energy-related carbon emissions [1]. With the decrease in the number of heating hours of 22-139h during the heating season (depending on the combination of weather and increasing concern about the climate change, it is important to improve the building energy performance so as to reduce the building renovation scenarios considered). On the other hand, function intercept increased for 7.8-12.7% per decade (depending on the energy consumption and emissions. Due to the complexity of the physical process of real building, building energy simulation models coupled scenarios). values suggested could energy be used to modify For the instance, function they parameters for to thesupport scenarios considered, and are often used to assistThe in analysing the real building performance. can be used building design and improve the accuracy of heat demand estimations. retrofit [2]. Currently, there are many different types of building energy models, including DOE-2, EnergyPlus, TRNSYS and ESP-r. Keywords: Building calibration; Posterior approximation. compared with energy resultsmodel; fromBayesian a dynamic heat Gaussian demandprocess; model, previously developed
The comparison among these simulation tools can be found in [3]. ©When 2017 The Authors.energy Published by is Elsevier the building model used toLtd. represent the existing building, there always exist some unknown parameters in the Peer-review under responsibility of the Scientific Committee of The 15th International Symposium on District Heating schedules and existing building but their values have to be specified in the building energy model, such as thermal properties, occupancy
Cooling.
1876-6102 © 2017 The Authors. Published by Elsevier Ltd.
Keywords: Heat demand; Forecast; Climate change Peer-review under responsibility of the scientific committee of the World Engineers Summit – Applied Energy Symposium & Forum: Low Carbon Cities & Urban Energy Joint Conference.
1876-6102 © 2017 The Authors. Published by Elsevier Ltd. Peer-review under responsibility of the Scientific Committee of The 15th International Symposium on District Heating and Cooling. 1876-6102 © 2017 The Authors. Published by Elsevier Ltd. Peer-review under responsibility of the scientific committee of the World Engineers Summit – Applied Energy Symposium & Forum: Low Carbon Cities & Urban Energy Joint Conference. 10.1016/j.egypro.2017.12.665
Jun Yuan et al. / Energy Procedia 143 (2017) 161–166
162
Author name / Energy Procedia 00 (2017) 000–000
2
and receptacle power. In order to improve the fit of the building energy model to the existing building, it is important to calibrate these parameters. Various calibration methods have been proposed for building energy model calibration. One type of methods is to calibrate manually. Manual calibration can be applied using the characterisation of building physical properties [4], graphical representation [5], parameter reductions [6], and data disaggregation [7]. The disadvantage of the manual calibration methods is that they usually depend on expert knowledge, which can be biased. Another commonly used way for building energy model calibration is to define an objective function and then apply some optimization methods to find the optimal parameters [8, 9]. This way can be easily automated. However, it is usually not easy to account for various uncertainties in this type of method. For a better quantification of uncertainties in the analysis, Bayesian calibration method is often used [10]. Recently, metamodel based methods become popular where the simpler and cheaper metamodels are used instead of the original complex building energy simulation models. One of the commonly used metamodel is Gaussian process (GP) model. For instance, a Gaussian process (one type of metamodel) based methods have been applied to calibrate building energy models [11, 12]. This type of method is more efficient for the time consuming simulation models by using faster metamodels. However, the process to develop the metamodel (e.g. GP) itself can be complex and the computation for metamodel based method can be expensive. In this paper, a GP based Bayesian method is proposed to calibrate the building energy model. For the Bayesian method, it is required to evaluate the posterior distributions of the unknown parameters. However, the analytical forms of the posterior distributions are usually not available due to the complex structure of the metamodel. In this situation, the numerical methods are often used to evaluate the posterior distributions, such as the commonly used Markov chain Monte Carlo (MCMC) method [13]. These numerical methods usually require a large number of evaluations or replications to obtain an accurate posterior distribution. Therefore, the numerical method can also be time consuming if the posterior evaluation is time consuming. To ease the computational burden, analytical approximations to the posteriors are often used. There are several posterior approximation methods, such as the radial basis function based approximation method [14], variational inference method [15] and weighted normal approximation method [16]. Among these methods, the weighted normal approximation method can provide convenient analytical forms to approximate the posterior distributions. Based on [16], a weighted normal approximation method is further proposed to improve the GP based Bayesian calibration method. This method is much more efficient not only by using the GP model, but also by directly evaluating analytical posterior approximations. In addition, this method can also take into account various uncertainties. This paper is organized as follows: a GP based Bayesian calibration method is provided in Section 2. A posterior approximation method is proposed in Section 3 to extend the GP based Bayesian method. A case study is given in Section 4 to illustrate the accuracy and efficiency of the proposed approximation method. The conclusion is given in Section 5. 2. Bayesian calibration based on Gaussian process Building energy model is often developed to represent the existing building. The relationship between the real observed output from existing building and the simulated output from building energy model can be denoted as Equation (1) according to [17]. (1)
z = y ( x,q ) + d ( x ) + e
where z denote the observed output from existing building and y(x,q) denote the simulated output from building energy model at variable input x and unknown optimal calibration parameter q. The interest it to adjust the calibration parameter q. d(x) denote the discrepancy between the existing building and the building energy model which is assumed to be independent of q. The discrepancy exists as the building energy model usually cannot perfectly represent the existing building. e denote the observation error of the observed output from existing building, which is usually assumed to be a normal random variable [17]. Building energy model is usually easier to evaluate than existing building. However, building energy model itself can be time consuming to evaluate. In this situation, metamodel (e.g. GP model) can be further used to represent the building energy model, which is simpler and faster to evaluate. Here, simulation output y(x,q) and discrepancy term d(x) are both assumed to be a constant mean Gaussian process. A GP with constant mean is widely applicable in practice [18]. To be more specific, a function h(·) (e.g. y(x,q) or d(x)) can be assumed to be a GP with constant mean µ and covariance function s2R(·,·), where the correlation R(·,·) between any two input sets (e.g. xi and xj) is assumed to a commonly used Gaussian correlation [18] with the following exponential form.
{
R( xi , x j ) = exp -f xi - x j
2
}
(2)
With these assumptions, it can be found that the unknown parameters contain µ, s2 and f besides calibration parameter q. Then the issue becomes how to estimate these parameters. Bayesian method has been widely used to estimate the parameters by obtaining their posterior distributions [19]. The advantage of the Bayesian method is that it can reflect the prior knowledge and take into account various uncertainties [20]. Here, the Bayesian method is used to estimate these parameters based on the developed GP model.
Jun Yuan et al. / Energy Procedia 143 (2017) 161–166
163
Author name / Energy Procedia 00 (2017) 000–000
3
Firstly, proper priors should be assigned for these unknown parameters. Based on practical applications, different priors can be assigned, such as non-informative prior and conjugate prior. The choices of priors can be found in [18]. Then the likelihood function should be further derived. The total set of data available includes the real observations from existing building and the simulated outputs from building energy model. This total data set is assumed to be a normal distribution given all the parameters, which provides the likelihood function. Given the prior and likelihood, the posterior of the all the parameters, f(µ,s2,f,q|d), can be derived, which is shown as following equation. f ( µ , s 2 , f ,q | d ) µ f ( µ , s 2 , f ,q ) f ( d | µ , s 2 , f ,q )
(3)
where d denote the total data set, f(µ,s2,f,q) denote the prior density function and f(d|µ,s2,f,q) denote the likelihood function. To estimate all these parameters, it is of interest to obtain the marginal posterior of each parameter. For instance, the marginal posterior of calibration parameter, f(q|d), can be used for calibration purpose. The marginal posterior can be derived by following equation. f (q | d ) = ò
ò ò
A B F
f ( µ , s 2 , f ,q | d )d µ d s 2 d f
(4)
where A, B and F denote the domains of µ, s2 and f respectively. However, it is usually not possible to integrate out the other parameters to obtain the analytical posterior distribution. Therefore, numerical methods are often used, such as the Markov chain Monte Carlo (MCMC) method. Numerical methods have been widely used in practice due to their flexibility. The disadvantage of the numerical methods is that they usually require a large number of replications, which may make the methods inefficient. In this paper, instead of using numerical methods, an analytical approximation method is proposed to estimate the posterior distributions. The details are given as following section. 3. An approximation method There are many methods that have been proposed to approximate posterior distributions. In this paper, a weighted normal approximation is proposed based on [16] which can provide analytical approximations of both joint and marginal posterior distributions. For simplicity, x = {µ, s2, f, q} is used to denote all the unknown parameters. It is of interest to approximate the joint posterior f(x|d) and further approximate the marginal posterior f(q|d) for calibration purpose. By Taylor series expansion, posterior can be approximated as a normal distribution at posterior mode xˆ with the following form. ì 1 ü f (x | d ) » f (xˆ | d )exp í- (x - xˆ)¢W-1 (x - xˆ) ý î 2 þ
(5)
Here W is the inverse of the Hessian matrix at posterior mode which can be estimated by cross-validation. Given various evaluation points, a normal approximation can be obtained for each evaluation point. Then the weighted normal approximation can be obtained by weighted averaging over all the evaluation points. The weighted normal approximation of the joint posterior f(x|d) can be derived as following equation.
åi =1 fˆ (x | d ) = m
ci N (x : wi , W) + å i =1 å j =1 kij N (x : µij , Q ) m
å
m
m
c
(6)
i =1 i
where m is the dimension of data set d and w denote m evaluation points of x. N(x:wi,W) denote a multivariate normal distribution of x with mean wi and covariance W, which is given as following form. N (x : wi , W) =
1 (2p )
m /2
W
1/2
ì 1 ü exp í- (x - wi )¢W-1 (x - wi ) ý î 2 þ
(7)
N(x:µij,Q) can be obtained similarly. c is a weight factor which can be estimated by minimizing the sum of square errors between the evaluated posterior values and the estimated posterior values. The term kijN(x:µij,Q) is used to avoid the negative approximation, where Q=W(W+L)-1L with matrix L estimated by cross-validation, µij=Q(W-1wi +L-1wj), and kij can be computed given c [16]. Equation (4) provides a weighted normal approximation of the joint posterior of all the unknown parameters. Based on the properties of the multivariate normal distribution, the marginal distribution of q, which is of interest for calibration purpose, can be derived as
Jun Yuan et al. / Energy Procedia 143 (2017) 161–166
164
Author name / Energy Procedia 00 (2017) 000–000
4
åi =1 fˆ (q | d ) = m
ci N (q : wil , Wll ) + å i =1 å j =1 kij N (q : µijl , Qll ) m
å
m
m
(8)
c
i =1 i
where wil, Wll, µijl and Qll are the lth components (i.e. q components) of wi, W, µij and Q respectively. Equation (5) provides an analytical approximation to the posterior of calibration parameter q. This approximate distribution can be used to make inference about q such as to estimate their posterior mean, mode, variance, and quantify the calibration parameter uncertainty in the follow up analysis. The accuracy of this approximation method is illustrated in the following case study. 4. Case study A twenty-six years old seven-storey office building located in Singapore is studied. The Gross Floor Area (GFA) is 28364 m2. An EnergyPlus model is developed to represent the existing building. For illustrative purpose, six parameters are selected as calibration parameters, which are given in Table 1. These parameters consist of three U values for roof, wall and window, and internal loads including equipment power density, lighting power density and occupant density. The design or initial U values are given in Table 1. The minimum (min) and maximum (max) U values are derived based on the uncertainty analysis given in [21]. The initial internal loads are estimated from existing building. Their min and max values are also obtained using the uncertainty given in [21]. The output data used for calibration are the observed monthly electricity consumption from existing building from 2013 to 2014 and the simulated monthly electricity consumption from EnergyPlus building energy model. To obtain the building energy model data, the Latin hypercube design method is used, where 200 design points are selected. Table 1. Prior values for selected calibration parameters. Group
Type
Initial
Min
Max
Envelop
Roof U value (W/m2K)
0.16
0.14
0.18
Wall U value (W/m2K)
0.21
0.19
0.23
Window U value (W/m2K)
1.09
0.98
1.20
Equipment power density (W/m2)
14
10
18
Lighting power density (W/m2)
12
9
15
Occupant density (m2/person)
9.1
7.7
10.5
Internal loads
Conjugate priors based on [22] are assigned for the unknown parameters except q, where µ follows a conditional normal distribution, s2 follows an inverse Gamma distribution and f follows a Gamma distribution. For the calibration parameter q, a triangular prior is assigned with initial, min and max values given in Table 1. Given prior and likelihood, the posterior of the unknown parameters can be obtained. Here we compare the proposed posterior approximation method to the fully MCMC method [13]. The posterior distributions are shown in Fig. 1 and the posterior means and 95% confidence intervals (CIs) are given in Table 2. Table 2. Posterior means and 95% confidence intervals (CIs) for parameters using posterior approximation method (PAM) and MCMC method. Mean (95% CI)
Parameter type
PAM
MCMC
Roof U value (W/m2K)
0.162 (0.153, 0.172)
0.162 (0.153, 0.172)
Wall U value (W/m2K)
0.216 (0.207, 0.225)
0.216 (0.207, 0.225)
Window U value (W/m2K)
1.11 (1.04, 1.19)
1.11 (1.04, 1.19)
Equipment power density (W/m )
14.2 (11.1, 17.9)
14.3 (11.2, 18.0)
Lighting power density (W/m2)
12.3 (10.2, 15.1)
12.3 (10.2, 15.1)
Occupant density (m2/person)
9.1 (8.2, 10.1)
9.1 (8.2, 10.1)
2
Jun Yuan et al. / Energy Procedia 143 (2017) 161–166 Author name / Energy Procedia 00 (2017) 000–000
165 5
Fig. 1. Posterior distributions of calibration parameters for the proposed posterior approximation method (PAM) and the MCMC method.
Compared to priors, it can be seen from Fig. 1 and Table 2 that the posteriors of all the U values become larger after calibration. The results indicate that the energy performance of the envelope may be worse than the prior believe. This is reasonable due to the deterioration of the thermal properties of building envelope after many years. For internal loads, the results shows that the posteriors of equipment power density and lighting power density are slightly larger than the priors and the posterior of occupant density is almost the same with the prior. This indicates that the equipment power density and the lighting power density may be underestimated due to actual operating conditions. Comparing the performance between the proposed posterior approximation method and the MCMC method, Fig. 1 and Table 2 show that two methods perform almost the same in terms of posterior distribution. The two sample t-test is further used to test the differences of the posterior mean, model and variance between these two methods. The results demonstrate that the differences are not significant. Therefore, the posterior approximation method can perform as well as the numerical evaluation method using MCMC in terms accuracy. When comparing the computational time, the results indicate that the MCMC method costs more than 2 hours while the posterior approximation method can obtain the results within 1 minute. Therefore, the proposed posterior approximation method is much faster than the MCMC method. This is reasonable as the posterior approximation method provide analytical forms for evaluation while the MCMC method requires a large number of replications before convergence. For a better comparison, the commonly used criterion, coefficient of variation of root mean square error (CVRMSE) [23], is used to compare the building energy model performance before and after calibration. The results show that the CVRMSE before calibration is 20.8%, after calibration using the posterior approximation method is 6.5% and using the MCMC method is 6.4%. The smaller value of CVRMSE indicates better performance. Therefore, it can be found that the building energy model performance can be significantly improved after calibration with a better representative of the existing building. For the posterior approximation method and the MCMC method, the results again show that these two methods perform almost the same. Therefore, it can be concluded from the results that the proposed approximation method can provide accurate calibration results while it is much more efficient than the MCMC method. 5. Conclusion The widely used building energy model is an approximations to the real building. When the building energy model is used to represent the real building for intended use, such as for building design and retrofit, it is important to calibrate the building energy model first by adjusting the unknown parameters. In this paper, a Gaussian process based Bayesian method is proposed to calibrate the building energy model, where a simpler and faster Gaussian process model is used and various uncertainties can be taken into account. In addition, to further improve the efficiency of the proposed method, an analytical approximation method is proposed to evaluate the posterior distributions of interest instead of using the numerical evaluation methods. The results in the case study indicate that the proposed approximation method can provide accurate calibration results and it is much faster than the numerical MCMC method.
166
6
Jun Yuan et al. / Energy Procedia 143 (2017) 161–166
Author name / Energy Procedia 00 (2017) 000–000
In terms of practical and policy implications, the proposed method provides an efficient tool to calibrate building energy models with less simulation effort for complex building energy models. This method can be used to assess and improve the building energy model performance by evaluating the technical, operational and policy instruments. It can also be a support tool to assist in the building retrofit. The study can be extended in several ways. First, the method can be improved to handle the large data set problem faced by the GP model. Second, the method can be applied to many different types of buildings to provide more comprehensive policy implications. Last but not least, the method can be adopted to other simulation models other than the building energy models. References [1] WEC. World energy resources: 2013 survey. London, UK: World Energy Council; 2013. [2] Augenbroe G. Trends in building simulation. Building and Environment. 2002;37:891-902. [3] Connolly D, Lund H, Mathiesen BV, Leahy M. A review of computer tools for analysing the integration of renewable energy into various energy systems. Applied Energy. 2010;87:1059-82. [4] Waltz JP. Practical experience in achieving high levels of accuracy in energy simulations of existing buildings. Strategic planning for energy and the environment. 1995;15. [5] Haberl J, Bou-Saada T. Procedures for calibrating hourly simulation models to measured building energy and environmental data. Journal of solar energy engineering. 1998;120:193-204. [6] Raftery P, Keane M, O’Donnell J. Calibrating whole building energy models: An evidence-based methodology. Energy and Buildings. 2011;43:2356-64. [7] Akbari H. Validation of an algorithm to disaggregate whole-building hourly electrical load into end uses. Energy. 1995;20:1291-301. [8] Ruiz GR, Bandera CF, Temes TG-A, Gutierrez AS-O. Genetic algorithm for building envelope calibration. Applied Energy. 2016;168:691-705. [9] Yang T, Pan Y, Mao J, Wang Y, Huang Z. An automated optimization method for calibrating building energy simulation models with measured data: Orientation and a case study. Applied Energy. 2016;179:1220-31. [10] Booth A, Choudhary R, Spiegelhalter D. A hierarchical Bayesian framework for calibrating micro-level models with macro-level data. Journal of Building Performance Simulation. 2013;6:293-318. [11] Heo Y, Choudhary R, Augenbroe G. Calibration of building energy models for retrofit analysis under uncertainty. Energy and Buildings. 2012;47:550-60. [12] Manfren M, Aste N, Moshksar R. Calibration and uncertainty analysis for computer models–a meta-model based approach for integrated building energy simulation. Applied energy. 2013;103:627-41. [13] Smith AF, Roberts GO. Bayesian computation via the Gibbs sampler and related Markov chain Monte Carlo methods. Journal of the Royal Statistical Society Series B (Methodological). 1993:3-23. [14] Bliznyuk N, Ruppert D, Shoemaker C, Regis R, Wild S, Mugunthan P. Bayesian calibration and uncertainty analysis for computationally expensive models using optimization and radial basis function approximation. Journal of Computational and Graphical Statistics. 2008;17:270-94. [15] Bishop C. Pattern Recognition and Machine Learning (Information Science and Statistics), 1st edn. 2006. corr. 2nd printing edn. Springer, New York. 2007. [16] Joseph VR. Bayesian computation using Design of experiments-based Interpolation technique. Technometrics. 2012;54:209-25. [17] Kennedy MC, O'Hagan A. Bayesian calibration of computer models. Journal of the Royal Statistical Society: Series B (Statistical Methodology). 2001;63:425-64. [18] Santner TJ, Williams BJ, Notz WI. The design and analysis of computer experiments: Springer Science & Business Media; 2013. [19] Tarantola A. Inverse problem theory and methods for model parameter estimation: SIAM; 2005. [20] O’Hagan A. Bayesian analysis of computer code outputs: a tutorial. Reliability Engineering & System Safety. 2006;91:1290-300. [21] Macdonald IA. Quantifying the effects of uncertainty in building simulation: University of Strathclyde Glasgow, Scotland; 2002. [22] Yuan J, Ng SH. A sequential approach for stochastic computer model calibration and prediction. Reliability Engineering & System Safety. 2013;111:273-86. [23] Coakley D, Raftery P, Keane M. A review of methods to match building energy simulation models to measured data. Renewable and sustainable energy reviews. 2014;37:123-41.