Modeling, Identification and Control - Structural observability ...2016/03/03  · Modeling, Identi...

10
Modeling, Identification and Control, Vol. 37, No. 3, 2016, pp. 171–180, ISSN 1890–1328 Structural observability analysis and EKF based parameter estimation of building heating models D. Wathsala U. Perera M. Anushka S. Perera Carlos F. Pfeiffer Nils-Olav Skeie Faculty of Technology, University College of Southeast Norway, Postboks 203, N-3901, Porsgrunn, Norway. E-mail: [email protected] Abstract Research for enhanced energy-efficient buildings has been given much recognition in the recent years owing to their high energy consumptions. Increasing energy needs can be precisely controlled by practicing advanced controllers for building Heating, Ventilation, and Air-Conditioning (HVAC) systems. Advanced controllers require a mathematical building heating model to operate, and these models need to be accurate and computationally efficient. One main concern associated with such models is the accurate estimation of the unknown model parameters. This paper presents the feasibility of implementing a simplified building heating model and the com- putation of physical parameters using an off-line approach. Structural observability analysis is conducted using graph-theoretic techniques to analyze the observability of the developed system model. Then Ex- tended Kalman Filter (EKF) algorithm is utilized for parameter estimates using the real measurements of a single-zone building. The simulation-based results confirm that even with a simple model, the EKF follows the state variables accurately. The predicted parameters vary depending on the inputs and disturbances. Keywords: Extended Kalman Filter, Mathematical models, Parameter estimation, Single-zone building, Structural observability 1 Introduction Buildings use 40% of the primary energy supply in the world, and the same figures apply to the European Union [Perez-Lombard et al. (2008)]. Out of that, Heating, Ventilation and Air-Conditioning (HVAC) systems are responsible for the majority of the over- all energy consumed in buildings. Increasing energy demands can be reduced by upgrading the relevant building components and by using advanced controllers for the operation of the HVAC systems. Advanced controllers require a building heating model to oper- ate [Dounis and Caraiscos (2009)]. Identification of a suitable model for the control system is essential for better use of energy in buildings. The model can be used to control indoor climate, estimate building heat- ing and cooling times, forecast energy consumption and describe the energy performance of the building. These models usually need to be accurate and com- putationally efficient. However, obtaining such mod- els for buildings is difficult due to highly time-varying and non-linear nature of the weather conditions and building dynamics. Further, model-based controllers, often need information of all state variables, while not all state variables in a building model are measurable [Maasoumy et al. (2013)]. According to Maasoumy et al. (2013), it is also challenging to estimate the ther- mal parameters accurately. Buildings have uncertain and time-varying heat transfer characteristics. They are profoundly depen- dent on the ambient weather conditions and occupant behaviours. The thermal parameters of a building such as heat transfer coefficients are highly reliant on the outside weather conditions. Owing to the continuous doi:10.4173/10.4173/mic.2016.3.3 c 2016 Norwegian Society of Automatic Control

Transcript of Modeling, Identification and Control - Structural observability ...2016/03/03  · Modeling, Identi...

  • Modeling, Identification and Control, Vol. 37, No. 3, 2016, pp. 171–180, ISSN 1890–1328

    Structural observability analysis and EKF basedparameter estimation of building heating models

    D. Wathsala U. Perera M. Anushka S. Perera Carlos F. Pfeiffer Nils-Olav Skeie

    Faculty of Technology, University College of Southeast Norway, Postboks 203, N-3901, Porsgrunn, Norway. E-mail:[email protected]

    Abstract

    Research for enhanced energy-efficient buildings has been given much recognition in the recent years owingto their high energy consumptions. Increasing energy needs can be precisely controlled by practicingadvanced controllers for building Heating, Ventilation, and Air-Conditioning (HVAC) systems. Advancedcontrollers require a mathematical building heating model to operate, and these models need to be accurateand computationally efficient. One main concern associated with such models is the accurate estimationof the unknown model parameters.

    This paper presents the feasibility of implementing a simplified building heating model and the com-putation of physical parameters using an off-line approach. Structural observability analysis is conductedusing graph-theoretic techniques to analyze the observability of the developed system model. Then Ex-tended Kalman Filter (EKF) algorithm is utilized for parameter estimates using the real measurements of asingle-zone building. The simulation-based results confirm that even with a simple model, the EKF followsthe state variables accurately. The predicted parameters vary depending on the inputs and disturbances.

    Keywords: Extended Kalman Filter, Mathematical models, Parameter estimation, Single-zone building,Structural observability

    1 Introduction

    Buildings use 40% of the primary energy supply in theworld, and the same figures apply to the EuropeanUnion [Perez-Lombard et al. (2008)]. Out of that,Heating, Ventilation and Air-Conditioning (HVAC)systems are responsible for the majority of the over-all energy consumed in buildings. Increasing energydemands can be reduced by upgrading the relevantbuilding components and by using advanced controllersfor the operation of the HVAC systems. Advancedcontrollers require a building heating model to oper-ate [Dounis and Caraiscos (2009)]. Identification of asuitable model for the control system is essential forbetter use of energy in buildings. The model can beused to control indoor climate, estimate building heat-ing and cooling times, forecast energy consumption

    and describe the energy performance of the building.These models usually need to be accurate and com-putationally efficient. However, obtaining such mod-els for buildings is difficult due to highly time-varyingand non-linear nature of the weather conditions andbuilding dynamics. Further, model-based controllers,often need information of all state variables, while notall state variables in a building model are measurable[Maasoumy et al. (2013)]. According to Maasoumyet al. (2013), it is also challenging to estimate the ther-mal parameters accurately.

    Buildings have uncertain and time-varying heattransfer characteristics. They are profoundly depen-dent on the ambient weather conditions and occupantbehaviours. The thermal parameters of a building suchas heat transfer coefficients are highly reliant on theoutside weather conditions. Owing to the continuous

    doi:10.4173/10.4173/mic.2016.3.3 c© 2016 Norwegian Society of Automatic Control

    http://dx.doi.org/10.4173/10.4173/mic.2016.3.3

  • Modeling, Identification and Control

    ambient changes, the mathematical model describingthe dynamics of the building has uncertain parame-ters. Therefore, the algorithms used for evaluation ofthese parameters should be time-varying and hence beadaptive [Maasoumy et al. (2013)]. However, first prin-ciples models for the heating of buildings may presenta rather large number of parameters. The complexityof the parameter identification depends on the com-plexity of the model. If the building has several zonesat different temperatures, identification becomes evenmore challenging. Further, practical difficulties suchas outdoor air exchange, energy inputs, moisture andoccupant behaviours can make the system more com-plicated. Concurrently, the parameter identification ofbuilding models can be important for the developmentof simplified models, like application in Building En-ergy Management Systems (BEMS), optimal control,energy audits and characterization of building compo-nents.

    When physical insight is used to propose a modelfor the building heat dynamics with differential equa-tions, Maximum Likelihood method [Madsen and Holst(1995), Bacher and Madsen (2011)] and Maximuma posteriori estimation [Kristensen et al. (2004)] andKalman Filtering [Maasoumy et al. (2013), Fux et al.(2014), Martincevic et al. (2014), Radecki and Hencey(2012)] have been used for parameter identification.They are called hybrid or grey box modelling ap-proaches that blend the two extremes (white box andblack box) in various degrees. Grey-box approacheswere used by Walker (2005), Bacher and Madsen (2011)to estimate state variables and unknown thermal pa-rameters for buildings.

    2 Physical models of buildings

    Physical models of dynamical systems such as build-ings can be formulated with ordinary differential equa-tions. They are typically developed by using the laws ofphysics such as conservation of mass and energy. Lin-ear and non-linear dynamic models for buildings canbe developed using different techniques. Non-linearmodels provide a better prediction of building ther-mal dynamics while they are computationally inten-sive. Linear models are obtained following the sim-plification of non-linear models and tend to have lim-ited computational intensity while restrained to theoperating zones they are tuned for [Maasoumy et al.(2013)]. Sometimes, it is quite tricky to assess theaccuracy of the linear models owing to the inevitableidealisations and simplifications according to Madsenand Holst (1995). However, Maasoumy et al. (2013)have stated that these linear models can be adjustedby using an adaptive parameter estimation technique

    such that the building parameters are updated as theinside and outside environment changes. The combi-nation is a hybrid model and an upgraded version ofthe linear physical model of the building. Grey-boxmodelling can also be applied to non-linear models si-multaneously with linear models.

    A mechanistic model is developed for a single-zoneexperimental construction built in 2014 and located atthe University College of Southeast Norway in Pors-grunn, Norway. The building has an inside volume of9.4m3, and it is completely sealed such that no venti-lation is provided from outside. A view of the buildingand the floor plan are presented in Figures 1 and 2.

    Figure 1: The experimental single-zone building fromeast direction.

    Solid Wall Standard Wall

    Sustainable Wall

    Figure 2: Plan of the test building. Measurements arein mm.

    There are three distinctive walls in the building.Each wall, roof and floor has entirely different com-position based on the materials used for construction.Therefore, each component of the building envelope hasseparate heat transfer characteristics. The test build-ing is constructed on support structures made out ofconcrete, and, therefore, the floor of the building is notin contact with the ground. Hence, all building com-

    172

  • Perera et.al., ”Structural observability analysis and EKF based parameter estimation of building heating models”

    ponents interact with outside air. The building hasthree windows of each 60×90cm2 into the south, westand east directions. The door is on the north wall ofthe building and has a dimension of 90×120cm2. Anelectrical heater with a maximum capacity of 370W isused inside the building for heating with a thermostatcontroller. Also, a computer is used inside the build-ing for data logging which contributes to use a powerin between 100W-120W. The interior humidity of thetest building is controlled using a humidifier.

    There is a measurement system inside the experi-mental setup which consists of a weather station and aDAQ device (NI USB-6218) connected to temperaturesensors (TMP36), humidity sensors (Honeywell 4000)and a power consumption sensor. Power consumption,inside temperature, inside humidity, outside temper-ature, three wall temperatures, roof temperature andfloor temperature are the interested measurements forthis study.

    A linear physical model is developed for the above-mentioned test building, and it is inherited from themodels presented in Perera et al. (2014a) and Pereraet al. (2014b). The energy balance equation for insideair is derived and presented by the equation (1). Toobtain a simple model for control purposes, we lessenthe number of independent parameters by consideringa common overall heat transfer coefficient (Uo) and acommon thermal diffusivity (α) for all components ofthe building envelope. The symbols used in the modelequations are explained in Table 2.

    dTidt

    =−MiAtotUo

    ρiVi (Micpi −R)Ti +

    MiρiVi (Micpi −R)

    Q̇h

    +MiAtotUo

    ρiVi (Micpi −R)To

    (1)

    The next step is to formulate the equations for threewalls, roof and floor to depict their heat transfer char-acteristics. These equations are derived after discretiz-ing the one-dimensional heat equation using finite dif-ference method.

    dTmwdt

    =2αmwzmw2

    Ti −4αmwzmw2

    Tmw +2αmwzmw2

    To (2)

    dTbwdt

    =2αbwzbw2

    Ti −4αbwzbw2

    Tbw +2αbwzbw2

    To (3)

    dTswdt

    =2αswzsw2

    Ti −4αswzsw2

    Tsw +2αswzsw2

    To (4)

    dTrdt

    =2αrzr2

    Ti −4αrzr2

    Tr +2αrzr2

    To (5)

    dTfdt

    =2αfzf 2

    Ti −4αfzf 2

    Tf +2αfzf 2

    To (6)

    In matrix notation, a system of coupled ordinarydifferential equations can be concatenated in the de-terministic linear state space model in continuous timeas given in equation (7). Here, X denotes the statevector, and U is the input vector. A is the systemmatrix which characterizes the dynamical behaviour ofthe system and B is the system input matrix whichstipulates how the input signals enter the system.

    dX

    dt= AX +BU (7)

    However, often, equation (7) is not able to exactlypredict the future behaviour of the state of the system.An additive noise term is introduced to the model tosimulate random variation of the state variables. Intro-ducing a noise term is important because it accountsfor:

    • modelling approximations such as completelymixed air, ideal gas assumption and lumped statesand parameters.

    • unrecognized and unmodelled inputs such as windspeed and solar irradiation.

    • noise-corrupted measurements.

    Then the new model of system dynamics is describedby equation 8 and it describes all states in the system.ω(t) is assumed to be a stochastic process with a zeromean and a given covariance.

    dX = AXdt+BUdt+ dω(t) (8)

    Another equation is introduced to represent the mea-sured states of the system which is called the measure-ment equation and presented in equation (9). The termv(t) is the measurement error which accounts for thenoise affected output signals from different sensors. Inthis equation, it is assumed that only a linear combina-tion of the states is measured. C is a constant matrix,which specifies the measured states. D is also a con-stant matrix, and it accounts for the input variablesdirectly affecting the output.

    Y (t) = CX(t) +DU(t) + v(t) (9)

    The physical model developed for the single-zonebuilding unit can now be concatenated to obtaina stochastic linear state space model in continuoustime corresponding to the equations (8) and (9). Wereduced the number of independent parameters byassuming αmw = αbw = αsw = αr = αf = α, in orderto obtain a simple model for parameter estimation.

    173

  • Modeling, Identification and Control

    The matrices X, A, B, U, Y and C are given below.The process noise matrix is W and measurement noisematrix is V.

    X =[Ti Tmw Tbw Tsw Tr Tf

    ]T

    A =

    −MiAtotUoρiVi(Micpi−R)

    0 0 0 0 0

    2αzmw2

    −4αzmw2

    0 0 0 02αzbw2

    0 −4αzbw2 0 0 02αzsw2

    0 0 −4αzsw2 0 02αzr2

    0 0 0 −4αzr2 02αzf 2

    0 0 0 0 −4αzf 2

    B =

    MiρiVi(Micpi−R)

    MiAtotUoρiVi(Micpi−R)

    0 2αzmw20 2αzbw20 2αzsw20 2αzr20 2αzf 2

    U =

    [Q̇h To

    ]TY =

    [y1 y2 y3 y4 y5 y6

    ]T

    C =

    1 0 0 0 0 00 1 0 0 0 00 0 1 0 0 00 0 0 1 0 00 0 0 0 1 00 0 0 0 0 1

    W =

    [ω1 ω2 ω3 ω4 ω5 ω6

    ]TV =

    [v1 v2 v3 v4 v5 v6

    ]T3 Parameter estimation

    The goal of the Extended Kalman Filter is to estimatethe unmeasured state variables and actual if they areobservable, and reduce the noise on the measured pro-cess outputs. It involves two step predictor-correctoralgorithms. In the first step, the most recent state es-timate and an estimation of the error covariance arepresented. These predictions are used to estimate othestate variables at the current time. In the second step,the predicted state estimate in the first step is correctedto generate an updated state estimate by incorporat-ing the latest process measurements. For a detaileddescription of the Kalman Filter, please consult Simon(2006). The unknown parameters of a the model are

    estimated using the Extended Kalman Filter (EKF) byaugmenting the state with the parameters. This pro-cess may transform a linear system of equations to anon-linear system. Since EKF can equally be appliedto linear and non-linear systems, the parameterizationproblem can be solved depending on the system ob-servability. Implementation steps of the discrete timeEKF are summarized in Table 1.

    3.1 Structural observability analysis

    Observability of a dynamic system determines how wellthe states can be inferred from input-output data. Theconcept of observability characterizes whether a givenset of measurements is adequate to estimate the stateof the system [Simon (2006)]. Structural observabil-ity analyzes the observability of a system based onthe system structure. It gives a necessary conditionfor observability which means that if a system is notstructurally observable, then it is not observable [Per-era et al. (2015)]. A method for verifying the struc-tural observability of a dynamic system is presentedin detail in Perera et al. (2015) using graph-theoretictechniques. It offers a visual means to pinpoint mea-surements needed to estimate state, disturbances andparameters or to detect which cannot be estimated atall in the augmented system. When estimating the un-known parameters of a system, Kalman filtering canbe used by augmenting the system with them as statevariables. This necessitates a check up of the observ-ability of the augmented system.

    To analyze the structural observability, a digraph ofthe augmented system was created first. Definitionsof some important terms given in Perera et al. (2015)that are used to interpret the graph are given belowto assist the reader to understand the theory behindstructural observability.

    • Nodes of the graph represents augmented states,inputs, and output variables.

    • An edge connects two nodes in the system. In adirected graph (digraph) nodes are connectedwith directed lines.

    • A path has an initial node and a final node. Thenumber of edges in a path is called the length ofit. A Path can be a simple/elementary path (pathcontains no node appearing more than once) ora closed path (path with initial and final nodesare identical). In our system, no closed paths areobserved.

    • If the closed path has no node appearing morethan once except the initial and final nodes, thenit is a cycle. Cycles having a length of one, are

    174

  • Perera et.al., ”Structural observability analysis and EKF based parameter estimation of building heating models”

    Table 1: Extended Kalman Filter algorithm

    1. System equation: xk = fk−1(xk−1, uk−1, ωk−1) and measurement equation: yk = hk(xk, ωk) are known.

    2. Specify the process noise matrix Qk−1, and measurement noise matrix Rk−1.

    3.Initialize the filter with state estimates x̂+k−1, and state estimation covariance P̂

    +k−1.

    4. Compute the partial derivative matrices Fk−1 =∂fk−1∂x |x̂+k−1 and Lk−1 =

    ∂fk−1∂ω |x̂+k−1 .

    5. Perform the time update of the state estimate x̂−k = fk−1(x̂

    +k−1, uk−1, 0), and estimation error

    covariance Pk− = Fk−1Pk−1F

    Tk−1 + Lk−1Qk−1L

    Tk−1.

    6. Compute the partial derivative matrices Hk =∂hk∂x |x̂−k and Mk =

    ∂hk∂v |x̂−k .

    7.Compute the Kalman filter gain matrix Kk = Pk

    −HTk (HkPk−HTk +MkRkM

    Tk )

    −1.

    8. Perform the measurement update of the state estimate x̂+k = x̂

    −k +Kk[yk − hk(x̂

    −k , 0)], and estimation

    error covariance Pk = (I −KkHk)Pk.

    9. To implement EKF, the matrix Fk−1 should be invertible and the pair Fk−1 and Hk−1 should beobservable.

    called self-cycles or loops. In the system, six loopscan be observed around each state variable.

    • A directed cactus (figure 3) is made out of a stemand buds connected in a special way.

    A distinguished edge

    The topA bud

    The root

    Figure 3: A cactus with two buds. The initial nodeand final node of the stem is called rootand top [Perera et al. (2015)].

    The digraph of the augmented system is presentedin figure 4. The system is said to be structurally ob-servable if and only if cacti 1 span the digraph as de-scribed by Perera et al. (2015). That is for the modelto be structurally observable, the graph with root nodemust be directed in the forward path and terminates

    1The plural of ”cactus” is ”cacti”

    at the final node. If the graph contains any buds, thenthese buds need to be in the cycle. The initial nodeshould be output measurements, and the final node canbe unknown parameters, disturbances or outputs. Tocheck the structural observability of the given buildingheating model, each cactus from the digraph presentedin figure 4 needs to be analyzed. In this case, cac-tus 1 starts with output measurement y1 directed inthe forward direction path and connected to the stateTi. Then Ti is joined with the unknown parameter Uo.Cactus 2 starts with the measurement y5 and directedin the forward path to connect with state Tr. FinallyTr directs towards the unknown parameter α. Severalother cacti can be observed from the figure connectingα, such as y2 → Tmw → α, y3 → Tbw → α, y4 → Tsw→ α and y6 → Tf → α.

    Based on the observations, root nodes of the graphare connected to the final nodes in a forward path,and there are no buds in the system. Therefore, themodel is structurally observable and satisfies the pri-mary condition to be observable. The observabilitymatrix which is constructed using system matrix A andconstant matrix C has full rank. Hence, the system isobservable, and the unknown parameters can be esti-mated based on the output measurements.

    The figure 5 is presented to illustrate the idea behindthe structurally un-observable systems. Consider thesame building heating model having individual overallheat transfer coefficients and individual thermal dif-fusivities to characterize the heat flow through walls,

    175

  • Modeling, Identification and Control

    Cactus 1

    Cactus 2

    Figure 4: Digraph of the augmented system.

    roof and floor. The digraph is developed for the newscenario to analyze the model structure. In this case,cactus 3 starts with output measurement y1 and di-rected in the forward direction path to state Ti. Tiis connected with the five unknown parameters Umw,Ubw, Usw, Ur and Uf . Hence, cactus 3 has five un-known augmented states as final nodes which makesthe new model structurally not observable. Therefore,the new model does not satisfy the necessary conditionto be observable, and the individual parameters cannotbe estimated using the Extended Kalman filter.

    Cactus 3Cactus 4

    Figure 5: Digraph of the system with individual over-all heat transfer coefficients and individualthermal diffiusivities.

    4 Results

    The presented model is implemented in the ExtendedKalman Filter algorithm to estimate the two unknownparameters U0 and α. An off-line approach is usedfor the identification. The properties ρi and Mi areassumed to vary depending on the state variable (in-door temperature) and, cpi is considered as a constantthroughout the model execution. However, it will notmake a considerable effect on the results if the prop-erties are assumed to be constant because they are re-lated to air and do not have a high variability basedon the temperature.

    Two data sets were used describing the cooling and

    0 50 100 15090

    100

    110

    120

    Time (hrs)

    Po

    we

    r su

    pp

    ly [W

    ]

    0 50 100 150 200 250 300 3500

    200

    400

    600

    800

    Time (hrs)

    Po

    we

    r su

    pp

    ly [W

    ]

    Cooling

    Heating

    Figure 6: Total power supply to the building duringcooling and heating [W].

    0 50 100 150

    -15

    -10

    -5

    Time (hrs)

    Ou

    tsid

    e T

    [0C

    ]

    0 50 100 150 200 250 300 350-30

    -20

    -10

    0

    10

    Time (hrs)

    Ou

    tsid

    e T

    [0C

    ]

    Cooling

    Heating

    Figure 7: Outside temperature variation at the loca-tion of the test building [0C].

    176

  • Perera et.al., ”Structural observability analysis and EKF based parameter estimation of building heating models”

    heating of the test building. The cooling data set wasrecorded from 02-01-2016 to 10-01-2016, and the heat-ing data set was recorded from 11-01-2016 to 27-01-2016. Each data set consists of 362 and 769 samples re-spectively with 0.5-hour sampling interval. Data usedfor external conditions such as outside temperature arealso collected at the building location. Input powerconsumption from the on-off controlled heater is alsomeasured. The quality of the parameterization largelydepends on the quality of the data used for identifica-tion. The collected data ensures the excitation of mostof the system conditions depending on the climate ofthe building location. Power consumption representingthe system input and the outside temperatures describ-ing the system disturbance are illustrated in figure 6and figure 7.

    The power consumption of the building depends on aheater and a computer. The computer is placed insidefor data logging. The low limit of the power consump-tion is approximately 95-100 W, which is the powerused by the computer. During cooling the heater iscompletely off and the average power consumption ofthe computer is 105 W. According to the heater dy-namics seen in figure 6 during heating, the heater isautomatically turned on and off several times duringthe experimental period. The outdoor temperaturesobtained for the two cases show a significant variabil-ity throughout the period.

    0 50 100 1501

    2

    3

    4

    U [W

    /(m

    2K

    )]

    Time [hrs]

    0 50 100 150-15

    -10

    -5

    0

    5x 10

    -4

    [m

    2/s

    ]

    Time [hrs]

    Figure 8: Estimated value of the overall heat transfercoefficient, U0 and thermal diffusivity, α us-ing EKF for cooling.

    The EKF and the system model manage to tune theparameters and lead to a very good temperature track-ing for the six state variables (inside, three walls, roof,and floor temperatures). Figure 8 and figure 9 showthe evolution of the two parameters (U0 and α) overtime for both cooling and heating. For the coolingexperiment, the parameters do not reach stable values

    0 50 100 150 200 250 300 350-40

    -20

    0

    20

    Time [hrs]

    U [W

    /(m

    2K

    )]

    0 50 100 150 200 250 300 350-5

    0

    5

    10

    15x 10

    -4

    Time [hrs]

    [m

    2/s

    ]

    Figure 9: Estimated value of the overall heat transfercoefficient, U0 and thermal diffusivity, α us-ing EKF for heatling.

    during the experimental period. However, during heat-ing, the overall heat transfer coefficient reaches steadystate while thermal diffusivity does not. Both param-eters take negative values at some points which is notphysically interpretable. Therefore, they rather seemto follow the building dynamics based on the inputsand disturbances.

    The predicted and measured values of each statevariable for both cooling, and heating are illustratedin figures 10 and 11 respectively.

    5 Discussion

    The model is found to be stable and observable for allthe experiments. The state estimations follow the mea-surements closely. However, the estimated parametersdo not converge to a single value but reflect the heatdynamics of the building. One main limitation asso-ciated with this method is the loss of physical inter-pretability of the parameters. Both estimated param-eters take negative values at some points which do nothave physical meaning. Also, it is challenging to obtainreal values for the parameters because they depend onthe thermal properties of the construction materials,inputs to the system and disturbances. The thermaldiffusivity of each component can be computed theo-retically if thermal conductivity, density and specificheat capacity of each material are known.

    There are several disturbances present in the systemthat have not been modelled. The EKF can be im-proved by measuring the contribution of each distur-bance such as solar irradiation and wind speed. How-ever, this will increase the model complexity and henceresult in high simulation times. Therefore, there is a

    177

  • Modeling, Identification and Control

    0 20 40 60 80 100 120 140 160 180270

    275

    280

    285

    Ti [

    K]

    Measured

    Prediction

    0 20 40 60 80 100 120 140 160 180260

    265

    270

    275

    Tm

    w [K

    ]

    Measured

    Prediction

    0 20 40 60 80 100 120 140 160 180260

    265

    270

    275

    280

    Tsw

    [K

    ]

    Measured

    Prediction

    0 20 40 60 80 100 120 140 160 180265

    270

    275

    280

    Tb

    w [K

    ]

    Measured

    Prediction

    0 20 40 60 80 100 120 140 160 180265

    270

    275

    280

    Time [hrs]

    Tr [K

    ]

    Measured

    Prediction

    0 20 40 60 80 100 120 140 160 180265

    270

    275

    280

    Time [hrs]

    Tf [

    K]

    Measured

    Prediction

    Figure 10: Measured and predicted temperatures of the six state variables using EKF for cooling.

    0 50 100 150 200 250 300 350 400270

    280

    290

    300

    Ti [

    K]

    Measured

    Predicted

    0 50 100 150 200 250 300 350 400265

    270

    275

    280

    285

    Tm

    w [K

    ]

    Measured

    Predicted

    0 50 100 150 200 250 300 350 400270

    275

    280

    285

    290

    Tb

    w [K

    ]

    Measured

    Predicted

    0 50 100 150 200 250 300 350 400265

    270

    275

    280

    285

    Tsw

    [K

    ]

    Measured

    Predicted

    0 50 100 150 200 250 300 350 400265

    270

    275

    280

    285

    Tr [K

    ]

    Measured

    Predicted

    0 50 100 150 200 250 300 350 400265

    270

    275

    280

    285

    Tf [

    K]

    Measured

    Predicted

    Figure 11: Measured and predicted temperatures of the six state variables using EKF for heating.

    178

  • Perera et.al., ”Structural observability analysis and EKF based parameter estimation of building heating models”

    trade-off between the system complexity and requiredprecision.

    The computational time of the system is around 1hour for the simulated period using a laptop computerwith a CORE i5 processor having Windows 7 operat-ing system and 8 GB memory. For one day period,the simulation time is around 2 minutes and hence thecomputational time seems acceptable. The EKF esti-mator has relatively less number of state variables andcomparatively less computational time that makes itworthwhile to implement an on-line controller with on-line parameter estimation for the mentioned building.

    6 Conclusion

    Advanced control algorithms require a mathematicalbuilding heating model to tailor the controller towardsbuilding dynamics. As buildings are complex and non-linear dynamic systems, the development of the pre-cise and reliable building heating model is a challeng-ing task. However, non-linear and reliable models tendto be computationally intensive for the application ofon-line building control systems. A dynamic model isdeveloped for the specified single-zone building whichconsists of six state variables, one input, one distur-bance and two unknown parameters. The state vari-ables are augmented with the two unknown parameterswhich transform the model to a non-linear system. Thesuggested model is declared to be sufficient to capturethe essential dynamics of the building. Procedure forestimation of unknown model parameters in the de-veloped continuous time model based on the measuredbuilding performance data in discrete time is presentedin this report. The proposed methodology is based onthe Extended Kalman Filter, which requires the ex-amination of the observability of the system. The ob-servability of the model is interpreted using structuralobservability analysis using graph theory. The applica-tion of the EKF algorithm to the system estimates theunknown parameters of the model. The EKF is foundto be a promising algorithm as it yields accurate in-door temperature estimations as well as wall, roof andfloor temperatures. However, predicted parameres losetheir physical interpretability and can result in nega-tive value estimations. This can probably be caused byunmodelled dynamics or process disturbances Compu-tational time of the proposed model with EKF is lowand thus suitable for real-time implementation.

    7 Future work

    The parameters of the model are estimated using anoff-line approach. A framework for on-line estimation

    of unknown parameters of the building needs to bestudied. On-line approach concurrently tunes the pa-rameters of the model and provides future state esti-mates based on the predicted inputs and disturbances.Such strategies are important for the on-line control inBuilding Energy Management Systems. Further, othertechniques such as Unscented Kalman Filter, Ensem-ble Kalman Filter and Particle Filters can be appliedto check their performance in parameter estimation.

    8 Author Contributions

    D. Wathsala U. Perera designed the experiments,performed the analysis and was responsible for prepar-ing the manuscript. M. Anushka S. Perera providedthe theoretical information for conducting the struc-tural observability analysis for the building heatingmodel and implemented the Extended Kalman Filteralgorithm. Carlos F. Pfeiffer and Nils-Olav Skeieprovided ideas to analyse the results and revised themanuscript in all versions.

    References

    Bacher, P. and Madsen, H. Identifying suit-able models for the heat dynamics of buildings.Energy and Buildings, 2011. 43(7):1511–1522.doi:10.1016/j.enbuild.2011.02.005.

    Dounis, A. and Caraiscos, C. Advanced control sys-tems engineering for energy and comfort manage-ment in a building environment-a review. Renewableand Sustainable Energy Reviews, 2009. 13(6-7):1246–1261. doi:10.1016/j.rser.2008.09.015.

    Fux, S. F., Ashouri, A., Benz, M. J., and Guzzella, L.Ekf based self-adaptive thermal model for a passivehouse. Energy and Buildings, 2014. 68, Part C:811–817. doi:10.1016/j.enbuild.2012.06.016.

    Kristensen, N., Madsen, H., and Jrgensen, S.Parameter estimation in stochastic grey-boxmodels. Automatica, 2004. 40(2):225–237.doi:10.1016/j.automatica.2003.10.001.

    Maasoumy, M., Moridian, B., Razmara, M., Shah-bakhti, M., and Sangiovanni-Vincentelli, A. Onlinesimultaneous state estimation and parameter adap-tation for building predictive control. In ASME2013 Dynamic Systems and Control Conference2013.2013. doi:10.1115/DSCC2013-4064.

    Madsen, H. and Holst, J. Estimation of continuous-time models for the heat dynamics of a build-ing. Energy and buildings, 1995. 22(1):67–79.doi:10.1016/0378-7788(94)00904-X.

    179

    http://dx.doi.org/10.1016/j.enbuild.2011.02.005http://dx.doi.org/10.1016/j.rser.2008.09.015http://dx.doi.org/10.1016/j.enbuild.2012.06.016http://dx.doi.org/10.1016/j.automatica.2003.10.001http://dx.doi.org/10.1115/DSCC2013-4064http://dx.doi.org/10.1016/0378-7788(94)00904-X

  • Modeling, Identification and Control

    Table 2: Nomenclature

    Symbols Subscripts

    ASurface area [m2]

    iOutside

    cpSpecific heat capacity [J/(kg.K)] bw Sustainable wall

    M Molar mass [kg/mol]f

    Floor

    R Gas constant [J/(mol.K)]mw

    Solid wall

    Q̇h Heat supply [W]o

    Outside

    T Temperature [K]sw

    Standard wall

    tTime [s]

    totTotal

    Uo Overall heat transfer coefficient[W/(m2K)]

    VVolume [m3]

    zThickness [m]

    αThermal diffusivity [m2/K]

    ρdensity [kg/m3]

    Martincevic, A., Starcic, A., and Vasak, M. Parameterestimation for low-order models of complex build-ings. In Innovative Smart Grid Technologies Confer-ence Europe (ISGT-Europe), 2014 IEEE PES. 2014.doi:10.1109/ISGTEurope.2014.7028767.

    Perera, D. W. U., Pfeiffer, C., and Skeie, N.-O. Mod-elling the heat dynamics of a residential buildingunit: Application to norwegian buildings. Model-ing, Identification and Control, 2014a. 35(1):43–57.doi:10.4173/mic.2014.1.4.

    Perera, M. A. S., Lie, B., and Pfeiffer, C. F.Structural observability analysis of large scalesystems using modelica and python. ModelingIdentification and Control, 2015. 36(1):53–65.doi:10.4173/mic.2015.1.4.

    Perera, W., Pfeiffer, C. F., and Skeie, N.-O. Model-ing and simulation of multi-zone buildings for bet-

    ter control. In 55th Conference on Simulation andModelling, Aalborg, Denmark: Linkping UniversityElectronic Press. 2014b.

    Perez-Lombard, L., Ortiz, J., and Pout, C. A review onbuildings energy consumption information. Energyand Buildings, 2008. 40:394–398.

    Radecki, P. and Hencey, B. Online building thermalparameter estimation via unscented kalman filter-

    ing. In American Control Conference (ACC). 2012.doi:10.1109/ACC.2012.6315699.

    Simon, D. Optimal state estimation : Kalman, H In-finity and nonlinear approaches. Wiley-Interscience,2006.

    Walker, D. M. System identification using constrainedkalman filters. In International Symposium on Non-linear Theory and its Applications. 2005.

    180

    http://dx.doi.org/10.1109/ISGTEurope.2014.7028767http://dx.doi.org/10.4173/mic.2014.1.4http://dx.doi.org/10.4173/mic.2015.1.4http://dx.doi.org/10.1109/ACC.2012.6315699http://creativecommons.org/licenses/by/3.0

    IntroductionPhysical models of buildingsParameter estimationStructural observability analysis

    ResultsDiscussionConclusionFuture workAuthor Contributions