Upload
ahmed-el-wench
View
353
Download
15
Tags:
Embed Size (px)
DESCRIPTION
Modeling a HVAC system using Simulink.
Citation preview
www.elsevier.com/locate/simpat
Simulation Modelling Practice and Theory 12 (2004) 61–76
Simulink and bond graph modelingof an air-conditioned room
B. Yu *, A.H.C. van Paassen
Energy in Built Environment, Energy Technology, Delft University of Technology, Delft, The Netherlands
Received 6 May 2002; received in revised form 24 December 2002; accepted 23 December 2003
Abstract
Dynamic models of the heating, ventilation and air-conditioning (HVAC) systems in the
building are very useful for controller design, commissioning, and fault detection and diagno-
sis. Different applications have different requirements on the models and different modeling
approaches can be applied. Mathematical modeling with two different approaches, block-wise
Simulink and bond graph, is discussed. Advantage and disadvantage of both approaches are
expressed. It is shown that combination with two approaches to realize complicated models of
building HVAC system for the application of model-based fault detection and diagnosis is a
good solution.
� 2004 Elsevier B.V. All rights reserved.
Keywords: Bond graph; Simulink; Air-conditioned room; Modeling; Fault detection; Diagnosis
1. Introduction
A significant amount, as much as 30%, of all energy consumed by commercial
buildings in the US is related to inefficient and improper operation of building equip-
ment [1]. It is from the inability to optimally control, maintain, detect and diagnose
problems with the buildings and their systems, e.g. HVAC and others. Many of these
problems are often ignored or left unresolved because building staff and operatorslack the enough information to address them.
Model-based fault detection and diagnosis (FDD) is a good solution to handle this
problem [5] and general modeling concept has been raised to hierarchically realize
* Corresponding author. Tel.: +31-15-2786662; fax: +31-15-2787204.
E-mail address: [email protected] (B. Yu).
1569-190X/$ - see front matter � 2004 Elsevier B.V. All rights reserved.
doi:10.1016/j.simpat.2003.12.001
62 B. Yu, A.H.C. van Paassen / Simulation Modelling Practice and Theory 12 (2004) 61–76
FDD [6]. However, real buildings are diverse from each other. They have different
properties like sizes, locations and materials, etc. This puts higher requirement for
the models. The contents of a model depend on the application context for which
it is intended. As a consequence, models cannot easily be reused and exchanged.
At present, efficiently constructing high-quality models requires special skills and
experience. Computer support is only available at the computational and mathemat-
ical level. Every model has to be built from scratch, which means that modeling is
very labor and cost intensive and error prone.Nevertheless, reusing and exchanging models between applications is possible
since we accept a certain degree of similarity, to guarantee an adequate answer
(an exact answer is hardly ever required). Moreover, by complying with basic do-
main principles a certain level of confidence can be guaranteed without full valida-
tion, with respect to measured data. Provided that we acknowledge the underlying
assumptions for a particular modeling problem, models may be partially reapplied
in different situations. This means that for reuse of models the following require-
ments have to be fulfilled:
• Models have to be constructed in a modular way. The model fragments should be
pluggable: they can be substituted solely by respecting their interfaces (rather than
their contents).
• The model construction process is to be controlled by the application: model
selection must be controlled by assumption, i.e. explicit modeling experience.
• Hiding complexity. The simulation code is to be generated rather than hand
crafted, internal details are normally not shown. Modeling should occur at theconceptual rather than computational level.
Engineering and design phases are becoming dominant cost factors in the indus-
trial production cycle. This is particularly true for the automotive industry. There-
fore, in the early 1990’s a number of European industries and research institutes
initiated the OLMECO project. The aim of the project was to conceive and construct
an Open Library for models of Mechantronic COmponents. A rather unconven-
tional view of modeling was developed in the project [4]. Its core was the bond graphmodeling language for physical systems.
Two simulation methods, block-wise Simulink and bond graph, are two interest-
ing tools for modeling. Simulink is a software package of Matlab� for modeling and
simulating dynamical systems in academia and industry. It uses graphic user inter-
face (GUI) for building models as block diagrams and adopts click-and-drag mouse
operations. Nowadays, lots of toolboxes are available in Simulink. Bond graph is a
systematic way to represent power interactions between the models’ components.
IMMS [7], whose core concept is bond graph approach, is used to realize the mod-eling process. �Bonds’, the connection lines between different components, carry bothpower variables and causalities between power variables. Paynter [2] started the
bond graph technique and used for modeling dynamic multiport systems. This ap-
proach adopted circuit diagram concept to develop a general theory for engineering
system. It suggested that energy and power are the fundamental dynamic variables
B. Yu, A.H.C. van Paassen / Simulation Modelling Practice and Theory 12 (2004) 61–76 63
which represent all physical interactions and transactions. Rosenberg and Karnopp
[3] expressed the theoretical basis and definitions of the method. From then on, bond
graphs become a good modeling tool for different kind of dynamic systems.
Pseudo-thermal bond graph method is used. The pseudo-thermal bond graph
below represents a heat storage process
C
021
The constitutive relation of the C element is
T ¼ QC
where T is the pseudo-thermal effort temperature [K], Q is the pseudo-thermal stateheat [J] and
C ¼ m � c
where C is the heat capacity [JK�1], c is the material parameter specific heat capacity[JK�1 kg�1], which depends on the material selected by the modeler and
m ¼ q � V
where m is mass [kg], q is material parameter density [kgm�3], which, like specificheat capacity c, depends on the material chosen by the modeler and V is geometricparameter volume [m3], which must be specified by the modeler or depends on thestandard geometry chosen by the modeler.
For the heat conduction process the following bond graph is appropriate
R
1 21
The 1 junction represents effort difference, in this pseudo-thermal case, tempera-
ture difference.
The constitutive relation of the R element is
Q0 ¼ TR
where Q0 is the pseudo-thermal flow heat flow [J s�1], T is the pseudo-thermal efforttemperature [K] and
R ¼ lk � A
where R is the resistance [K s3 m�2 kg�1], l is geometric parameter length [m], k ismaterial parameter heat conduction coefficient [m kg s�3 K�1] and A is geometricparameter area [m2], which, like length l, must be specified by the modeler or de-pends on the standard geometry chosen by the modeler.
64 B. Yu, A.H.C. van Paassen / Simulation Modelling Practice and Theory 12 (2004) 61–76
Different applications ask different requirements on modeling. Some applications
require simple model and less quantitative results and some other applications re-
quire more accurate and complicated model. Some models are only used for specific
applications and some models need higher flexibility and reusability. The real build-
ings are diverse but with some similarity. In order to build up model-based fault
detection and diagnosis, the models with higher reusability and good communication
with Building Management System (BMS) are necessary. In this paper, two model-
ing approaches are studied to analyze the differences.
2. Modeling analysis on an air-conditioned room
A typical room, no. 104, in an office building is analyzed. The scheme of this floor
is shown in Fig. 1. The northeast and northwest walls insulate the room and outside
environment. The southeast and southwest walls separate the room with the neigh-
bors. Scheme of the fundamental air-conditioning components in the room, e.g. insu-lation (walls), zone (air), heating (radiator), cooling ceiling and window system
(shutters and windows) is shown in Fig. 2.
Following are the modeling analyses for these components with Simulink and
bond graph approaches.
2.1. Walls
All walls, floor and ceiling form the insulation system of the room. Lumpedparameter assumption is usually adopted for insulation models. This is realized by
splitting the wall into some layers. In each layer, the parameters, like temperature,
properties, are the same. Since the parameters are actually different, the more layers
the wall is split, and the closer the model is to the reality. However, too many layers
make the models more complicated and lower simulation speed. It is a trade-off.
Fig. 1. Scheme of the floor of room 104.
Fig. 2. Scheme of fundamental air-conditioning components of room 104.
B. Yu, A.H.C. van Paassen / Simulation Modelling Practice and Theory 12 (2004) 61–76 65
A typical wall and its division are shown in Fig. 3.
Electrical R–C analysis chart for this wall is as follow.The equations of inner and outer surface temperatures has the form as
ð0:5qV Þ dTiodt
¼ Aqsolar þX
j
ar � Fshutter;j � AjðTj � TioÞ þ ac � AðTair � TioÞ
þX
i
as � Fradiator;j � AradiatorðTradiator � TioÞ � A � kdðTio � T1Þ ð1Þ
The equations of each layer has similar form as
dT1dt
¼aðTin � T1Þ þ k
D
� �1ðT2 � T1Þ
0:5ðqcdÞ1i ¼ 1 ð2Þ
Tn……T1
TiTo
T2 Tn-1
Fig. 3. Typical wall and its division.
66 B. Yu, A.H.C. van Paassen / Simulation Modelling Practice and Theory 12 (2004) 61–76
dTidt
¼kD
� �iðTi�1 � TiÞ þ k
D
� �iþ1ðTiþ1 � TiÞ
0:5ðqcdÞi þ 0:5ðqcdÞiþ1i ¼ 2; . . . ; n� 1 ð3Þ
dTndt
¼aðTout � TnÞ þ k
D
� �nðTn�1 � TnÞ
0:5ðqcdÞni ¼ n ð4Þ
Simulink block representation for Fig. 4 with four layers is shown in Fig. 5 and for
each layer is shown in Fig. 6.
From the view of bond graph, the wall has radiation heat exchange with the other
walls and radiator. Meantime, all layers are constructed with storage, conduction
and power summation. Bond graph representation for the same wall is shown inFig. 7.
3
Qrad
2To
1
Ti
T1
T3T2
layer3
Ti
T2T1
layer2
Trad.
T1Ti
layer1 T2
Tout
alf a&q_s olar
To
gasbet.sierbet.1
Mux
Mux
f(u)
Fcn
3
W&qz
2
Trad
1
Tout
3
2
1
T1
T3T2
Ti
T2T1
Trad.
T1Ti
T2
Tout
alfa&q_solar
To
Mux f(u)
3
2
1
Fig. 5. Simulink block representation for a wall.
Ti ToT1 T2 Tn-1 Tn1/ δ/λ δ δ/λ λ/α 1/α
C1 C2 Cn-1 Cn
Fig. 4. Electrical R–C analysis chart for the wall.
1
T2
-K-
k3
-K-
k1k1
kSum3
Sum2
Sum11/s
Int
2T3
1T1
Fig. 6. Simulink block for certain layer.
2 Layer Wall
Heat Storage Heat Storage Heat StorageHeat Conduction Heat Conduction
Fig. 7. Bond graph structure for a two layer wall.
Fig. 8. StorageConduction module.
B. Yu, A.H.C. van Paassen / Simulation Modelling Practice and Theory 12 (2004) 61–76 67
In Fig. 7, the bond relations are represented with some standard modules from
library. This is useful for reusable modeling.
All these modules are fundamental bond graph composition. For example, Sto-
rageConduction module is shown in Fig. 8. In the figures, the symbols of � and P
are connection plugs that use to split a bond into two parts.
2.2. Room air
Room air has considered as a lumped parameter. Its state is determined by many
other thermodynamic relations, e.g. heat exchanges with walls, radiator, shutters,
windows, cooling ceiling and so on. For the mathematical equation of room air
model, all heat exchanges should be included to make the equation achieve energy
conservation
ðqair � cp;air � V ÞdTadt
¼ Qinf :in þ Qinf :out þ acon:s:r: � As:ne:ðTs:ne: � TaÞþ acon:s:r: � As:se:ðTs:se: � TaÞ þ acon: � AneðTne � TaÞþ acon: � AseðTse � TaÞ þ acon: � AswðTsw � TaÞþ acon: � AnwðTnw � TaÞ þ acon: � AflðTfl � TaÞþ acon: � AceiðTcei � TaÞ þ acon: � AdoorðTdoor � TaÞþ acon: � Agl:dr:ðTgl:dr: � TaÞ þ acon: � AcolðTcol � TaÞ þ Qcoolþ Qintern þ Qwarm þ Qh þ Qhr ð5Þ
68 B. Yu, A.H.C. van Paassen / Simulation Modelling Practice and Theory 12 (2004) 61–76
Simulink realizes the mathematical equations directly. All heat exchanges are treated
as inputs of integration. Fig. 9 shows the Simulink component model for room air.
For the bond graph modeling, power information (temperature, heat flow rate)
are inside the bonds. After the bonds are connected from room air node to the other
components, the thermodynamic relations are modeled in the meantime. Therefore,
the bond graph node model of room air is very simple as Fig. 10.
Fig. 9. Simulink model of room air.
Fig. 10. Bond graph node model of room air.
B. Yu, A.H.C. van Paassen / Simulation Modelling Practice and Theory 12 (2004) 61–76 69
2.3. Heating system
Heating system is realized by radiator. By means of adjusting the opening rate of
hot water valve, heating capacity added into room is controlled.
Supposing the lumped temperature of radiator is the average of inlet and outlet
water temperature. Analyzing the control domain of radiator in Fig. 11.
Q is the total energy exchanges include radiation heat exchanges to all solid sur-faces (walls, ceiling, floor, windows, etc.) and convection heat exchange to the roomair. Mathematical equations of radiator are
T
Tw
CwMw
dTRdt
¼ _mwCwðTw;in � Tw;outÞ � Q ð6Þ
Q ¼ ARaðTR � TaÞ þ QR;wall ð7Þ
The mass flow rate _mw depends on the valve-opening rate that is controlled withproportion strategy.Simulink model of radiator is shown in Fig. 12.
Like room air node, the bond graph model of radiator is relatively simple as fol-low, Fig. 13.
2.4. Cooling system
In the summer days, cooling system is necessary. It is the cooling ceiling. Cooling
ceiling has two functions. One function is cooling-down the recycle air. Another
Tw,in Tw,out
Q
Fig. 11. Control domain of radiator analysis.
2Qr.conv
1T rad.f(u)
conv. coef
Saturation1
f(u)
Qr.convection
Mux
Mux1
Mux
Mux
Low-Pass Filterwith Initiate
LPFIs
1
Integrator
7
Gain2
1/7
Gain1
f(u)
Fcn
4
air
3Qrad total
2mass flow
1
ater in
Fig. 12. Simulink model of radiator.
Fig. 13. Bond graph model of radiator.
70 B. Yu, A.H.C. van Paassen / Simulation Modelling Practice and Theory 12 (2004) 61–76
function is supplying fresh air from outside. There is almost no capacity to accumu-
late energy at cooling ceiling node. Main thermodynamic process is heat exchange.
The amount of heat exchange is
QC ¼ Qrecycle þ Qfresh ð8Þ
Qrecycle ¼ ðTa � TwÞcðfactor1þ factor2ÞL ð9Þ
Qfresh ¼ GfreshqCpðTa � TfreshÞL ð10Þ
This cooling capacity will add into room air. In Eq. (9), c is controlled by the dif-ference between setpoint and real room air temperature. When the temperature ofthe room is lower than setpoint, no flow in the tube and c will be zero.
2.5. Window system
Window system includes windows and shutters. Solar energy enters room throughwindows and shutters. Due to the distribution effect, the solar energy will be ab-
sorbed by all the surfaces.
Since the capacity of glasses and shutters are small, the heat transfers are instant
in the nodes of windows and shutters. This means they are algebraic equations.
For window, shutter and the air in-between window and shutter, the node equa-
tions are as follow
aoutðTout � TglassÞ þ aaðTa;between � TglassÞ þ qsolar ¼ 0 ð11Þ
aaðTglass � Ta;betweenÞ þ aaðTshutter � Ta;betweenÞ þ ainfiltrationðTa � Ta;betweenÞ ¼ 0 ð12Þ
1W&
B. Yu, A.H.C. van Paassen / Simulation Modelling Practice and Theory 12 (2004) 61–76 71
aaðTa;between � TshutterÞ þ aaðTa � TshutterÞ þX
reðT 4wall � T 4shutterÞ
þ reðT 4radiator � T 4shutterÞ þ qsolar ¼ 0 ð13Þ
Simulink models of these components are shown in Fig. 14. Bond graph structures
for these components and sub-structures of shutter, window and the air inside the
channel are shown in Fig. 15 and Figs. 16–18. In these figures, the real bond graphsare inside each pluggable block to make the modeling reusable.
2Ta a
1Tb a
Mux
Mux2
Mux
Mux1
Mux
Mux
f(u)
Fcn2
f(u)
Fcn1
f(u)
Fcn
Demux
Demux
f (z) zSolvef(z) = 0
Algebraic Constraint2
f (z) zSolvef(z) = 0
Algebraic Constraint1
f (z) zSolvef(z) = 0
Algebraic Constraint
W Alf a o
Alfa out
5To
4Tw
3Tr
2Ta
qz
Fig. 14. Simulink models of window and shutter system.
Fig. 15. Bond graph structure of window and shutter system.
Fig. 16. Bond graph structure of shutter.
Fig. 17. Bond graph structure of the air between shutter and window.
Fig. 18. Bond graph structure of window.
72 B. Yu, A.H.C. van Paassen / Simulation Modelling Practice and Theory 12 (2004) 61–76
B. Yu, A.H.C. van Paassen / Simulation Modelling Practice and Theory 12 (2004) 61–76 73
2.6. Example results
After building the models, the simulation can be fulfilled. Fig. 19 shows the room
temperature results for 11 days and Fig. 20 shows the temperature difference of Fig.
19. It shows the model can simulate the reality properly.
0 50 100 150 200 250 30015
16
17
18
19
20
21
22
23
Time (h)
Tem
pera
ture
(o C)
measured datamodel output
Fig. 19. Example result of the simulation of room temperature.
0 50 100 150 200 250 300-5
-4
-3
-2
-1
0
1
2
3
4
5
Time (h)
Tem
pera
ture
(o C)
Fig. 20. Temperature difference between measurement and model output.
74 B. Yu, A.H.C. van Paassen / Simulation Modelling Practice and Theory 12 (2004) 61–76
3. Comparison between Simulink and BG modeling
Simulink and bond graph modeling use different ways to realize the simulation.
The comparison between these two methods has been made as follow:
Bond graph models can be realized as a block (like Matlab function or S-function)of Simulink models. So that it can take advantage of the Simulink toolbox to real-
ize more complicated functions. Because two modeling methods have their own
advantages and disadvantages, the combination with them would be a good solu-
tion. By means of bond graph method, models that directly represent the physical
relation are made. Then the BG models will be translated into S-function of Simu-link. Combined with the toolbox in Simulink, more functions like control, fuzzy
Simulink Bond graph
Use mathematical modeling concept Use physical modeling concept
Realize the mathematical equa-tions and relations with block
diagram. It’s a direct expression
for the mathematical models
Realize the physical meanings andrelations with bond
The first step of Simulink modeling
is trying to list the corresponding
mathematical equations for all
sub-domains after physical
assumption. For each sub-domain, analyzing the energy
conservation of the control
domain to obtain the mathemati-
cal equations
The first step of bond graph modeling
is analyzing the physical relationship
among the sub-domains. For each
sub-domain, determine the 0-, 1-junc-
tion, corresponding C-, R-elements andsuitable connection plugs
The temperature and heat flow
calculations are modeled sepa-
rately. Sometimes, this will cause
modeling bugs of non-balance ofenergy in the models
With pseudo-thermal BG modeling,
temperature and heat flow calculations
are modeled in the meantime. Inside a
bond, the temperature and heat floware exchanged simultaneously. The
bonds will always keep the energy
balance. Bugs of non-balance of energy
will be avoided
Simulink is easier to realize some
mathematical tricks and assump-
tions since it directly realize the
mathematical equations
Bond graph models are easier to
understand the physical relation
between components
Simulink integrates a lot of tool
box for mathematical analysis,
e.g. signal process, fuzzy logic,
neural network and so on
No toolbox available
Physical relationanalysis
Bond Graph modelling
s-function y=f(x,u)generation
final simulationmodel
Simulink block
Fig. 21. Suggested way of modeling combined with Simulink and bond graph.
B. Yu, A.H.C. van Paassen / Simulation Modelling Practice and Theory 12 (2004) 61–76 75
logic, neural network algorithm can be easily realized. The flowchart is shown in
Fig. 21.
4. Conclusions
Model-based fault detection and diagnosis technology is a possible solution to de-
crease the energy consumption in building HVAC system. Different applications
have different requirements on the models and different modeling approaches can
be applied. Reusability is an important characteristic for the model of building that
applied for model-based FDD. By developing the modeling procedure, models of an
air-conditioned room in office building are built in two approaches, block diagram-
wise Simulink and bond graph. The comparison between two methods is made.Combination with two methods is a suggested way to build the models for fault
detection and diagnosis in building HVAC system.
Acknowledgements
This paper is written within the framework of Ecoview project (BTS97252) spon-
sored by Dutch Senter organization and with close cooperation with ing. H. Rijgers-
berg and Prof. J.L. Top of A&F BV.
References
[1] S. Katipamula, M. Brambley, Automated diagnostics: improving building system and equipment
performance energy user news 23 (4) April 1998.
[2] H.M. Paynter, Analysis and Design of Engineering Systems, MIT Press, Cambridge, Mass, 1961.
[3] R.C. Rosenberg, D.C. Karnopp, Introduction to Physical System Dynamics, McGraw-Hill, 1983.
[4] A.P.J. Breunese, J.L. Top, J.F. Broenink, J.M. Akkermans, Libraries of reusable models: theory and
application, Simulation 71 (1) (1998) 7–22.
76 B. Yu, A.H.C. van Paassen / Simulation Modelling Practice and Theory 12 (2004) 61–76
[5] B. Yu, A.H.C. van Paassen, State-of-the-art of energy fault diagnosis for building HVAC system, in:
International Symposium of Air Conditioning in High Rise Buildings 2000, Shanghai, China, October
2000.
[6] B. Yu, A.H.C. van Paassen, S. Riahy, General modeling for model-based FDD on building HVAC
system, Simulation Modelling Practice and Theory 9 (6–8) (2002) 387–397.
[7] H. Rijgersberg, J.L. Top, HVAC library modeling in IMMS, EcoView Progress Report 1.1, ATO-
DLO, June 1999.