Sei sulla pagina 1di 6

ELSEVIER

Error prediction in Markov models of building / HVAC systems


V. I. Hanby and A. J. Dil *
Department of Civil and Building Engineering, University of Technology, Loughborough, UK

Markov mode&g offers the possibility of extracting long-term results from dynamic simulations with a significantly reduced execution time over that which would be necessary with an equivalent time-series simulation. The discretization of the problem variables which is necessary for Markov modelling introduces an inaccuracy into the simulation process which means that a balance must be struck between the accuracy required and the time reduction that is possible. The paper describes an approach to the quantification of the errors introduced by discretization of the simulation variables. Two error expressions were tested by running a representative building/HVAC system dynamic model in both time-series and Markov modes with varying degrees of discretization of the variables. A simplified error bound was found useful in identifiiing near-optimal discretization schemes: further refinement of this approach led to an expression that was found to give a good prediction of the error in Markov simulations of this type of system.

Keywords: Markov modelling, stochastic modelling, building energy simulation

1. Introduction Modelling the performance of buildings and their heating, ventilation, and air conditioning (HVAC) systems is most realistically carried out by using dynamic modelling techniques. Transient effects are important over both a longterm scale (hours), in the context of thermal storage in the building fabric, and also short-term transients (minutes) generated by the operation of the plant. The type of information that is sought from such simulation programs is generally of a long-term nature, such as annual energy consumption or the ability of the plant to control the internal environment in response to disturbance inputs. Such simulations are often performed in a design context, where repeated simulation runs are carried out to assess the consequences of changes to the design of the building or its plant. The normal mode of operation is for the simulation to be run using input generated from time-series data files of driving variables such as weather information, occupancy schedules, and supervisory control schemes. The programs that are frequently used for these purposes, and which are capable of the required level of modelling of plant opera-

tion, such as HVACSIM + and TRNSYS generally have long execution times, often of the order of real time, which inhibits their use in a design context. A method of dynamic simulation that can reduce execution time without compromising the dynamic nature of the problem is to use a stochastic modelling technique based on Markov chains. In Markov models, all the problem variables (the system state variables and the driving variables) are discretized, and a long-term probability vector of system states is produced from which the required performance figures can be calculated. Markov modelling has been applied to active solar systems,4 passive building cells, and thermal comfort studies5 and has been shown to offer positive advantages in these applications. The faster execution of a Markov model results from its existence in only a limited number of discrete states, hence there is a reduction in the number of model calls during a simulation run. However, the problem is simplified by the discretization process and hence there is a balance between reduction in execution time and the accuracy of the solution. The work reported here was carried out to investigate this relationship and to attempt to quantify the magnitude of the errors introduced by discretization.

Address reprint requests to Dr. Hanby at the Department of Civil and Building Engineering, University of Technology, Loughborough, Leics LEll 3TU, UK. Received 4 July 1994; revised 8 November 1996. * Present address: Department of Artificial Edinburgh, UK. 1995; accepted Intelligence,

2. Markov modelling of a building/HVAC


2.1 The model

system

2 January
of

University

A simple dynamic model of a single zone combined with a HVAC air handling unit plant model was implemented. The building model was the two-node five-parameter model

Appl. Math. Modelling 1996 Vol. 20, August 0 1996 by Elsevier Science Inc. 655 Avenue of the Americas, New York, NY 10010

0307-904X/96/$15.00 SSDI 0307-904X(96)00008-2

Building/HVACsystems:

V. I. Hanbyand

A. J. Dil

Figure 1.

Simplified

zone model.

described by Penman6 (Figure I), and the model of the air handling plant was derived from the component models of the program HVACSIM + .7 The building model contains two nodes representing the air and structure temperatures, T, and T,, and five parameters. There is a fast conductance path from the inside air node to the outside, K,, representative of the essentially nonreactive elements such as the ventilation, glazing, and roof heat flow paths. The air node communicates directly with a capacitance, C,, representing the thermal capacity of the air in the room. The remaining conductance terms Ki and K, connect the internal air node to the outside via a structure capacitance C,. The zone parameters were chosen as representative of office-type accomodation with a design heating load of 35 kW and a cooling load of 60 kW. The values used are shown in Table I. The inclusion of dynamic plant characteristics added a further node, that of the supply air temperature from the air handling plant, which was effectively characterized as a simple first-order subsystem. The system thus contained three state variables, and the resulting differential equations were solved using a fourth-order Runge-Kutta algorithm. 2.2 The Markov model In a files This each then able Markov model, the real-time driving variable data must be discretized into a set of representative values. is done by dividing the range of values present in data file into a number of equal intervals (bins) and processing the time series file to allocate each variinto its appropriate bin. The representative value for

each bin is taken as either the centerline value of the bin or the mean value of the data within the bin. A transition matrix is then formed for each variable in which the elements of the matrix represent the probability of transition from the row representative value to the column value. TabZe 2 shows the transition probabilities for a five-bin matrix of outside air dry bulb temperatures (in degrees Celsius) for the CIBSE Example Year (October 1964-September 1965j.s A transition matrix is formed for each of the driving variables, then the matrices are combined to form a single matrix covering all possible input states. If we have three driving variables, binned into n,, n2 and n3 intervals an input transition matrix is formed of size respective1 7, ( n,.n2.n3)-. Given that the system itself contains three state variables which have been allocated bins of size s,, s2 and sX, a square system monitor matrix is formed of size (n,.nz.n3.s1.s2.s3). The elements of the monitor matrix M contain transition probabilities from the row state to the column state: these are obtained by running the system dynamic model. Conformity with the Markov paradigm requires that the driving variables be independent of each other and that the system state at the end of a time period depends only on its state at the start of the period. Given these conditions, a steady-state probability vector V exists such that V.M=V (1)

and long-term calculated quantities, such as energy consumption and control system performance, can be obtained from this vector. The vector can be obtained by Gaussian elimination, but generally the faster Power method was used. The overall time period used in this study was 1 year, the input data being obtained from the CIBSE Example Year.8 The driving variables were outside air temperature, global solar radiation on the horizontal, heat gains to the space from people and lights, and a supervisory control signal which turned the plant on or off. This last variable could only take the values of 0 or 1. The long-term calculated quantities that were extracted from the simulation results were the energy consumption of the plant and the absolute mean deviation of the zone air temperature

Table 1.

Model parameters

used in Markov simulation c, cw Kf Ki K0 3,300 45,500 1.0 8.4 0.5 kJ/K kJ/K kW/K kW/K kW/K

Thermal capacity of air node Thermal capacity of structure node Fast conductance Air-to-struture conductance Structure-to-outside conductance

Table 2. Bin ranges

Dry bulb temperature

transition probabilities. 0.52-7.04 0.1205 0.9404 0.0298 0.0000 0.0000 7.04-13.56 0.0000 0.0442 0.9234 0.0742 0.0000 13.56-20.08 0.0000 0.0000 0.0467 0.9035 0.1901 20.08-26.6 0.0000 0.0000 0.0000 0.0223 0.8099

- 6.00-0.52 0.8795 0.0154 0.0000 0.0000 0.0000

- 6.00-0.52 0.52-7.04 7.04-13.56 13.56-20.08 20.08-26.6

Appl.

Math. Modelling,

1996, Vol. 20, August

609

Building/HVAC

systems:

V. I. Hanby

and A. J. Oil 4. Error bound In the course of a normal simulation run, the absolute value of a quantity such as energy consumption is generally what is required. In developing an error analysis, it is more convenient to refer to the mean value of the calculated quantity per time period. The former is easily obtained by multiplying the mean value by the number of time periods. Consider a system that is described by a total of n variables: The simulation is driven by a time-series (t,, f,, t,, . . . , t,_ ,) where each item ti is an n-tuple of variable values at time i. If the function g(t,> represents the desired model output at t, then the mean value of the calculated quantity required from the simulation over the entire period of the time-series is

Figure 2.

Comparison

of execution times.

from its set point. The second measure was used to assess the performance of the plant control system. Figure 2 shows a comparison of execution times for the simulations on a Sun SPARCl machine. It can be seen that about 15 bins per variable represents a break-even point with the benchmark time-series simulation but that an average of 10 bins per variable gives a useful saving in execution time.

In the case of a discretized model, if this can exist in N states, each of which is denoted by M,, then g(Zt4,) is the model output for state M,. If the n-dimensional space bounding state Mi is denoted by (M,) then the expected outcome of the stochastic simulation is then

3. Errors arising from discretization Markov modelling will incur inaccuracies resulting from data discretization. It is important to make clear at this point that the errors under discussion are those produced by this transformation and not those inherent in the models limitations. The baseline from which errors are measured in this work is that obtained by running the same model with time-series data and then with different numbers of bins for each variable. It is to be expected that some variables will be more significant than others, hence a greater degree of discretization would be appropriate for these variables. However, in the first instance the same number of bins were used for all the continuous variables. The systematic study of the errors incurred subsequently led to the implementation of a more optimal discretization strategy. There is clearly a conflict between increasing the degree of discretization (greater numbers of bins), which should increase accuracy, and execution time, which will increase in proportion to the number of model function calls. The following factors would be expected to influence this balance: 0 The number of bins chosen for each variable; 0 The sensitivity of the model output to each binned variable; and 0 The distribution of values of the variables within each bin. An important objective of this work was to investigate a method for predicting the error introduced by discretization. This should take the form of a bound, or confidence limit, which would be useful in both a validation context and in formulating near-optimal discretization schemes for use in Markov modelling.

i=

where P() denotes the probability of the system being in a given state. The difference between the mean value predicted by the stochastic simulation and the true mean is thus
N c d~JfwfL1) i= 1 1 k-l ; ,c d4) 1=O

In order to combine these two summations, the time-series data can be divided up into N sets, according to which model state region (M,} the n-tuple t, falls into:
N i= 1 ,
R

N
i=l

f,E(M,)

If the number

of items (k) in the time-series

is large, then

The error expression

can now be written as

i=l

KL

Further combining difference between


N 1 f,&f.)

the two summations and noting the the two function values as Ag, gives

(2)

610

Appl.

Math.

Modelling,

1996, Vol. 20, August

Building/HVAC systems: V. I. Hanby and A. J. Dil


As there are n variables (u(l), uC2),. . , , u()) in the function g(> then a bound can be placed on Ag, using a first-degree Taylor expansion

Ag,=-

AU(~) Au + au@M, ar() M, + . ..ag AU() achfl)M,


0
Figure 4. tion. Actual

ag

ag

Each Au() represents the difference between one of the n(M,) time-series values of the nth variable and the representative value of the same variable in the ith model state. Equation (2) can now be simplified further if Ag, is replaced by a bound max( 1Ag I>:

NO ofLl$~rtisbk

1s

20
consump-

and estimated

errors for energy

icl i txy)Agx
giving
imp max(

5 5 kn({Mi}) max(
i= 1

I Ag

I)

1g I)

This summation is equal to 1 since it is the sum of the probabilities of being in all possible states. The value of max( 1Ag I> then provides a bound on the size of the difference between the calculated quantity as found by the stochastic simulations and that found from the time-series simulations. In the worst case max(IAgl)= where max( pd) = abs max [

c
i=

n
max( pd))
I

When the bound of equation (3) was applied to a range of example simulations, it was found to always contain the true mean, but the ratio of the bound error to the actual error was too large to make it of use in error prediction (Figure 3). Its comparative simplicity did, however, make it very useful in implementing near-optimal discretization strategies (see below). A more accurate error estimate was obtained by rejecting the use of maximum partial derivatives, and instead each partial derivative value was used where appropriate in the summation according to the current model state. Again, substituting the first-degree Taylor approximation for Ag, in equation (2) gives
5 i= I ; (2 x=l i j=l & /I(

max(

Au)

(3)

A+!;)

(is)]
values of maximum difference maximum maximum

further simplification

leads to

over all model states and


max(

Au(i))

Hi(~~c~o)

where again, +Yl)

Hi() and Lo() are the maximum and minimum the ith variable, while B( is its bin width. The partial derivatives were estimated using finite formulas at each of the variables states, and the of all these was chosen as the estimate of the partial derivative with respect to that variable.

k
Noting that &) I

=fwtJ)

$)Alri

is the mean deviation of the time-series values from the representative value for variable j in state i, this can be abbreviated as A:). It is appropriate to use absolute values for both the partial derivatives and the differences, so the X l expression becomes
?
i=l

P({M,})

t
j=l

abs( &

/R ] abs( A,~~()

(4)

0
Figure 3. Error prediction

IS BiMpe:OVtible
of initial bound.

In order to apply this relationship to the estimation of errors it is necessary to evaluate the partial derivatives and mean deviations for each variable. Partial derivatives were estimated by finite difference using the five-point method where possible. The mean deviations of the variables were

Appl.

Math.

Modelling,

1996, Vol. 20, August

611

Building/HVAC

systems:

V. I. Hanby

and A. J. Dil function evaluations necessary in its use. For this purpose, a simpler error expression based on equation (3) was used, based on the numerical range of each variable -+-

$1)

B(2)

Figure 5.
deviation.

Actual

and estimated

errors for set point absolute

measured, in the case of system variables, by keeping track of the values while running the stochastic simulation and forming the mean deviations from these figures. In the case of the boundary variables, if these are exogenous to the problem (i.e., independent of the system variables) then the mean deviations from their representative values can be evaluated from the parent time-series files. Examples of the actual errors incurred in the stochastic simulation and the estimated errors given by equation (4) are shown in Figures 4 and 5 for the zone energy consumption and set point deviation, respectively. It can be seen that equation (4) gives a good estimate of the error incurred by discretization and that using about 10 bins per variable gives a result to within 5% of the equivalent time-series value.The behavior of the error estimate is that which would be expected, i.e., a decrease in the error as the number of bins per variable was increased, a significant characteristic that occurs when the number of bins are increased for the more significant variables, leaving the other numbers of bins constant. Under these conditions, the error estimate converges onto a nonzero value.

where Kc) is the difference between the function values at the extremes of the range of the variable n, multiplied by half the range of n. B is the number of bins ascribed to the variable ucn). This expression was preferred over the more complex equation (4) because the computation involved is relatively simple: a short stochastic run sufficed to produce the necessary terms. The search method used was the steepest descent method: each variable was started at its minimum number of bins and then the variable u(l) for which incrementing B() most decreased the objective function had its number of bins incremented. This process continued until the bound on the total number of bins was reached, and the search was then terminated. While there is no guarantee that a global optimum has been found, and acknowledging the imprecise nature of the error expression used, results obtained using this method showed that it was an effective indicator of how to allocate bins to variables. As an illustration of the effectiveness of this approach results from an example simulation showing that using a total of 24 bins an error of 9.6% was obtained by distributing the bins equally between the variables; this was reduced to 3.3% by implementing the optimized strategy. When a total of 36 bins were used, the figures were 4.5 and 1.8%, respectively.

6. Conclusions Deterministic error estimation expressions for the long-term calculated quantities output from simulations were derived that can be used to evaluate the inaccuracies introduced by discretization of system and boundary variables in Markov modelling. The method utilizes partial derivatives of the model output with respect to each of the variables used in the model, combined with the deviations of the values of the simulation variables from their representative values chosen in the discretization scheme. Two expressions were derived: a simplified error bound was found always to contain the true mean value of the relevant calculated quantity, but it gave an unacceptably large ratio between the predicted and the actual error. Some refinement of the basic approach led to a more accurate error estimate at the expense of greater execution time for calculating the simulation error. The expressions were tested by comparing the results obtained from a representative building/HVAC system model when operated in time-series mode with those obtained when the model was run as a Markov simulation. It was found that a useful reduction in execution time could be achieved by using Markov models of this type of system and that errors to within 2% of the equivalent time-series output could be achieved.

5. Optimal

discretization

scheme

In the investigation described above, the bins were distributed equally between the continuous variables, however, this does not acknowledge the relative sensitivity of the model to the individual system and driving variables. This led to the development of a method for discretizing the variables in relation to their importance. There are three constraints on this process: 1. Each variable must be ascribed at least one bin; 2. Each variable should have an upper limit on the number of bins used. This is necessary to avoid the situation where if the number of bins is large some will have no members; and 3. The product of the numbers of bins must be constrained to limit the size of the monitor matrix, hence the execution time of the simulation. An optimal discretization method was implemented by attempting to minimize the predicted error in the stochastic simulation, subject to the set of constraints above. Equation (4), while giving good error predictions, was not considered ideal for this task due to the large number of

612

Appl.

Math.

Modelling,

1996,

Vol. 20, August

Building/HVAC The use of a simple error bound enabled a steepest-descent optimization process to be used to selectively allocate bins to the problem variables. This led to a significant increase in the accuracy of the results from the Markov model. B K

systems: V. 1. Hanby and A. J. Dil

bin width of ith variable the difference between the function

values

References
1. Park, C., Clarke D. R., and Kelly, G. E. An Overview

Acknowledgment The authors gratefully acknowledge the Science and Engineering Research Council for financial support of this work.
2.

3. 4.

Nomenclature temperature of the air temperature of the structure fast conductance path the thermal capacity of the room air conductance inside, outside respectively structure capacitance number of variables time series item max & min values of ith variable

5.

6. 7.

8. 9.

of HVACSIM + , A Dynamic Building/HVAC/Control Simulation Program. Proceedings of the First Building Energy Simulation Conference, Seattle, Washington, USA, 1985 Klein, S. A., et al. TRNSYS: A Transient Simulation Program. University of Wisconsin-Madison Engineering Experimental Station Rept. 38-12, version 12.2, 1988 Kemeny, J. G. and Snell, J. L. Finite Markou Chains. D. Van Nostrand, Princeton, NJ, USA, 1960 Lameiro, G. S. and Duff, W. S. A Markov model of solar energy space and water heating systems. Solar Energy 22, 1979, 211-219 Scartezzini, J. L. and Faist, A. Using Markovian stochastic modelling to predict energy performances and thermal comfort. Energy Build. 1987, 6 (3), 1-15 Crabb, J. A., Murdoch, N., and Penman, J. M. A simplified thermal response model. Build. Seru. Eng. Rex Technol. 1987, S(l), 13-19 Park, C., Clark, D. R., and Kelly, G. HVACSIM + Building Systems and Equipment Simulation Program: Building Loads Calculation. US Department of Commerce, National Bureau of Standards, Gaithersburg, Maryland, USA, 1986 Holmes, M. J. and Hitchin, E. R. An example year for the calculation of energy demand in buildings. Build. Sera. Eng. 1978, 45, 186-189 Clymer, J. R. Systems Analysis Using Simulation and Markou Models. Prentice-Hall, Englewood Cliffs, NJ, USA, 1990

Appl.

Math. Modelling,

1996, Vol. 20, August

613

Potrebbero piacerti anche