Dynamic Modeling For Vapor Compression Systems Part II Simulation Tutorial - Importante
Dynamic Modeling For Vapor Compression Systems Part II Simulation Tutorial - Importante
To cite this article: Bryan P. Rasmussen & Bhaskar Shenoy (2012) Dynamic modeling for vapor
compression systems—Part II: Simulation tutorial, HVAC&R Research, 18:5, 956-973
This two-part article provides an introduction to dynamic modeling for vapor compression systems. Part
II presents example physics-based models for each component with a discussion on common assumptions
and model variations. For two-phase heat exchangers, examples for both moving boundary and finite-
control volume approaches are given, along with their associated advantages and limitations. Particular
modeling challenges, such as model initialization, validation, and numerical simulation, are also addressed,
and sample simulation results are utilized to compare modeling paradigms and illustrate key issues. Rather
than advocating the use a particular software tool, this article provides a general tutorial on constructing
dynamic simulations of vapor compression systems, outlining potential challenges and possible solutions.
956
HVAC&R Research, 18(5):956–973, 2012. Copyright
C 2012 ASHRAE.
(2) model-based control design; (3) control tuning termine the evolution of system pressures with in-
and commissioning; and (4) fault detection and di- let/outlet mass flow rates as model inputs. Mass flow
agnosis. Each of these tasks may benefit from a devices, such as compressors and valves, are also
different modeling approach with varying levels of discussed briefly, as these models are significantly
detail. For example, while a linearized model of low simpler and utilize inlet and outlet pressures to de-
dynamic order is preferred for model-based multi- termine mass flow rates. Outlet fluid enthalpy is de-
variable control design, a detailed nonlinear simu- termined by each component model and supplied as
lation model may be preferred for tuning a single an input to subsequent component models. Receiver
proportional-integral-derivative (PID) controller or models are addressed separately. After individual
optimizing overall system design. Readers are en- component models are reviewed, fundamental theo-
couraged to keep this perspective as they evaluate retical and practical challenges associated with VCS
and select an appropriate modeling/simulation ap- model simulation and prediction is discussed.
proach.
Compressors
Overview of dynamic modeling
approaches The bulk of residential, commercial, and indus-
trial VCSs are driven by positive displacement com-
As discussed in part I of this article, dynamic pressors. Except for the thermal capacitance of the
models are often classified as physics-based and compressor shell, the dynamics of these compres-
data-based models. While data-based models are an sors typically evolve on much faster time scales
effective and fast method of generating dynamics than the heat exchanger dynamics, and they are thus
models, they are valid for only the system and sce- modeled with static relationships that dictate the re-
nario from which the data was obtained. Thus sim- frigerant mass flow rate and the outlet fluid enthalpy.
ulations of VCSs generally employ models based This approach is typical of the majority of publica-
on fundamental physics to ensure applicability to tions regarding VCS dynamics. The mass flow rate
a wide range of conditions and modularity in sys- (Equation 1) is characterized by the speed, ωk , the
tem design and configuration. For this reason, the volume, Vk , the inlet density ρk = ρ(Pk,in , h k,in )
following discussion is restricted to physics-based and a volumetric efficiency, typically modeled using
models; for an overview of data-based modeling a semi-empirical relationship based on the pressure
techniques and appropriate references, the reader is ratio and speed ηvol = f (Pk,out /Pk,in , ωk ). The state
referred to part I of this article. of the outlet fluid is determined assuming an adia-
batic efficiency (Equation 2), where the isentropic
Notation enthalpy is determined as
The Nomenclature section located at the end of h out,isen = h(Pk,out , sk,in ) and
this article defines the notation of variables used
throughout the article. To the extent possible, stan- sk,in = s(Pk,in , h k,in ),
dard notation is used. However, some exceptions are
ṁ k = ωk Vk ρk ηvol , (1)
necessary, as this article spans more than one field
of study, which results in some inevitable conflicts h k,out,isen − h k,in
= ηk . (2)
in standard notation. h k,out − h k,in
Figure 1. System modeling: external inputs and interconnection variables (color figure available online).
or electronic means to regulate refrigerant flow Characterization of the orifice area depends on the
based on pressure or temperature. Thermostatic type of valve. For fixed orifice valves, the area is
expansion valves (TEVs) utilize a sensing bulb constant, Av = a0 ; whereas for electronic expan-
filled with a two-phase refrigerant placed at the sion valves, the orifice area is directly controlled,
evaporator outlet to measure superheat temperature. Av = f (u v ). In TEVs, the orifice area depends on
The bulb pressure acts on a diaphragm inside the internal geometry and is adjusted by fluctuating
valve to increase/decrease the flow area accordingly. bulb and evaporator pressures, Av = f (Pbulb , Pe ).
Expansion valves that alter the flow area to regulate Pressure in the sensing bulb is typically modeled
pressure, rather than superheat, are termed pressure by performing an energy balance (Equation 4),
regulation valves, or automatic expansion valves leading to a simple first-order dynamic model
(AEVs). These work on the same principle as the (Equation 5) with a time constant τ . By including
TEV, but instead of a sensing bulb, they use the separate energy balance equations for the bulb,
evaporator pressure directly. Electronic expansion pipe wall, refrigerant, etc., it is possible to develop
valves modify the flow area using an externally higher-order models of TEV behavior:
controlled mechanism, typically a stepper motor.
In virtually all published models, these valves ṁ v = Av Cd ρv (Pv,in − Pv,out ), (3)
are assumed to be ideal throttling valves, and thus
isenthalpic, h v,in = h v,out . For fixed orifice expan- m bulb C p,bulb Ṫbulb = αo Ao (Tamb − Tbulb )
sion valves, the refrigerant flow rate is typically
modeled using a form of Bernoulli’s equation − αi Ai (Tbulb Ter o ), (4)
(Equation 3), where ρv = ρ(Pv,in , h v,in ). The
discharge coefficient is determined empirically or Tb (s) ko
from manufacturer information, Cd = f (Av , P). = . (5)
Ter o (s) τs + 1
HVAC&R RESEARCH 959
to remove the spatial dependence, resulting in Tw,int − Tw2
several ordinary differential equations (ODEs) (He (mC p )w L̇ 1 + λ1 Ṫw2
LT
et al. 1997; Rasmussen and Alleyne 2004).
As an example, for an evaporator, Equations 11 = qo2 − qi2 . (16)
and 12 are the conservation of refrigerant mass
for each region, Equations 13 and 14 are the con-
servation of refrigerant energy, and Equations 15 The final form of governing equations differs
and 16 are the conservation of heat exchanger wall slightly in the literature, depending on assumptions
energy. In these equations, q is the heat transfer regarding the lumped fluid properties, void frac-
to/from the wall, such as qi1 = αi1 Ai λ1 (Tw1 − Tr 1 ) tion, and wall temperature at the interface between
and qo2 = αo Ao λ2 (Tair − Tw2 ), and λ is the the regions, Tw,int . For example, the properties
normalized length of each fluid region, i.e., for the two-phase region typically employ a mean
λ2 = L 2 /L T : void fraction ρ1 h 1 = ρ f h f (1 − γ̄ ) + ρg h g (γ̄ ), the
properties in the single-phase region are generally
dρ1 lumped using an average value h 2 = 12 (h g + h o ),
Acs L 1 Ṗe + (ρ1 − ρg )Acs L̇ 1 = ṁ i − ṁ int , and the interface wall temperature is assumed to
d Pe
(11) simply be equal to the two-phase wall tempera-
ture Tw,int = Tw1 . These six equations can be al-
dρ2 dρ2 gebraically combined to eliminate the mass flow
Acs L 2 Ṗe + Acs L 2 ḣ o + (ρg − ρ2 )Acs L̇ 1
d Pe dh o rate at the fluid interface and then organized into
= ṁ int − ṁ o , (12) the Z (x)ẋ = f (x, u) form, as in Equation 17. The
matrix Z (x) remains full rank and invertible as long
dρ1 h 1 as λ1,2 > 0, or in other words, as long as evaporator
− 1 Acs L 1 Ṗe + (ρ1 h 1 − ρg h g )Acs L̇ 1
d Pe superheat is maintained:
= ṁ i h i − ṁ int h g + qi1 , (13) ⎡ ⎤ ⎡ L̇ ⎤
z 11 z 12 0 0 0 1
dρ2 h 2 dρ2 h 2 ⎢ z 21 z 22 z 23 0 0 ⎥⎢ Ṗ ⎥
− 1 Acs L 2 Ṗe + ⎥⎢ ⎥
e
Acs L 2 ḣ o ⎢
d Pe dh o ⎢ z 31 z 32 z 33 0 ⎢
0 ⎥ ⎢ ḣ o ⎥ ⎥
⎣ 0 0 0 z 44 0 ⎦ ⎣ Ṫw1 ⎦
+(ρg h g − ρ2 h 2 )Acs L̇ 1
z 51 0 0 0 z 55 Ṫw2
= ṁ int h g − ṁ o h o + qi2 , (14) ⎡ ⎤
ṁ i (h i − h g ) + qi1
Tw1 − Tw,int ⎢ ṁ o (h g − h o ) + qi2 ⎥
(mC p )w L̇ 1 + λ1 Ṫw1 ⎢ ⎥
LT =⎢ ṁ i − ṁ o ⎥. (17)
⎣ q −q ⎦
= qo1 − qi1 , (15) o1 i1
qo2 − qi2
HVAC&R RESEARCH 961
While this is a distinctly nonlinear model, con- lumped parameter approaches that rely on effective
structing a linear approximation for the purposes of parameters and only describe the dominant physical
dynamic analysis and control design is straightfor- mechanisms for heat transfer, fluid flow, etc. How-
ward. First the values of the state variables are de- ever, the resulting model contains many differential
termined at the desired steady-state operating point, equations, which increases computation time, with
xo = [L 1 (0) Pe (0) h o (0) Tw1 (0) Tw2 (0)], as the possibility of additional numerical challenges
are the values of the external inputs, u o = (e.g., stiff dynamics, differential algebraic equations
[ṁ i (0) ṁ o (0) h i (0) αo (0) Tair (0)]. The lin- [DAEs], iterative solvers, etc.). If a pressure gradi-
earized model is then formulated in terms of the ent is assumed, then a staggered grid approach for
deviation variables δx = x − x0 , and δu = u − u 0 modeling the mass and energy flow for each control
as: region is typical (Eborn 2001), where pressure dif-
ferentials dictate mass flow rates, and mass flow rate
−1 ∂ f (x 0 , u 0 ) differentials drive the pressure and energy dynamics
δ ẋ = Z (x0 ) δx
∂x (Figure 4).
The governing equations for each region include
−1 ∂ f (x 0 , u 0 )
+ Z (x0 ) δu. (18) (1) the conservation of refrigerant mass (Equation
∂u 19), where the intermediate mass flow rates are
Additional details regarding this linearization pro- determined using a manipulated form of the
cess, and a complete description of the resulting Darcy-Weisbach equation (Equation 20), where the
model, can be found in several places in the litera- coefficient Cd is a function of the tube diameter,
ture (He et al. 1998; Rasmussen and Alleyne 2004). length, friction factor, etc.; (2) the conservation
The linearized model is a local approximation, and of refrigerant energy (Equation 21), where the
the approximation errors grow as the model oper- storage rate of specific energy u̇ e, j is expanded
ates away from the operating point of linearization. in terms of pressure and and enthalpy; and (3)
Although nonlinearities in the heat exchanger pa- the conservation of heat exchanger wall energy
rameters (e.g., heat transfer correlations) and fluid (Equation 22), where qi, j = αi, j Ai, j (Tw, j − Tr, j )
properties do result in some error, the dynamics re- and qo, j = αo, j Ao, j (Tair, j − Tw, j ).
main qualitative the same (Figure 3).
ṁ e, j = ṁ j−1 − ṁ j , (19)
Fixed-control volumes models
Finite-difference or FCV approaches offer the ṁ j = Cd A ρ(P j − P j+1 ), (20)
capability to model the fluid behavior with ex-
du e, j du e, j
treme detail, capturing the thermo-physical gradi- U̇j = ṁ e, j u e, j + m e, j Ṗ j + ḣ j
d Pe dh j
ents and distributed parameters. This, reportedly,
lends itself to higher accuracy prediction than the = ṁ j−1 h j−1 − ṁ j h j + qi, j , (21)
Figure 3. Comparison of nonlinear and linearized MB models for step changes in expansion valve and compressor speed. Signals
shown are evaporator pressure, evaporator superheat, and evaporator air outlet temperature (color figure available online).
962 VOLUME 18, NUMBERS 5, OCTOBER 2012
Ė w, j = mC p w Ṫw, j = qo, j − qi, j . (22) If isobaric conditions are assumed for the heat
exchanger, P j = Pe , ∀ j, and the conservation of
momentum is neglected, the conservation equations
When organized into the standard Z (x)ẋ = f (x, u)
may be simplified to eliminate the intermediate mass
form, j
flow variables as ṁ j = ṁ in − k=1 ṁ e,k . The con-
⎡ ⎤ ⎡ ⎤ servation of refrigerant energy (Equation 21) now
U̇1 Ṗ1 becomes
⎢ .. ⎥ ⎢ .. ⎥
⎢ . ⎥ ⎢ . ⎥
⎢ ⎥ ⎢ ⎥ du e, j du e, j
⎢ U̇n ⎥ ⎢ Ṗn ⎥ U̇j = ṁ e, j u e, j + m e, j Ṗe + ḣ j
⎢ ⎥ ⎡ ⎤ ⎢ ⎥ d Pe dh j
⎢ ṁ e,1 ⎥ ⎢ ḣ 1 ⎥
⎢ ⎥ Z 11 Z 12 0 ⎢ ⎥
⎢ .. ⎥ ⎢ .. ⎥
⎢ . ⎥ = ⎣ Z 21 Z 22 0 ⎦ ⎢ . ⎥
j−1
⎢ ⎥ ⎢ ⎥ = ṁ in − ṁ e,k h j−1 − h j
⎢ ṁ e,n ⎥ 0 0 Z 33 ⎢ ḣ n ⎥
⎢ ⎥ ⎢ ⎥ k=1
⎢ Ė w,1 ⎥ ⎢ Ṫw,1 ⎥
⎢ ⎥ pseudo−state ⎢ ⎥
⎢ .. ⎥ transformation matrix ⎢ . ⎥ + ṁ e, j h j + qi, j , (24)
⎣ . ⎦ ⎣ .. ⎦
Ė w,n Ṫw,n where the rate of mass storage in each re-
mass and energy dynamic state gion is also expanded as ṁ e, j = ρ̇e, j V j =
storage rates dρ dρ
variables
( d Pe,ej Ṗe + dhe,jj ḣ j )V j . After these substitutions, the
⎡ ⎤
ṁ i h i − ṁ 1 h 1 + qi,1 conservation equations in Equation 25 are trans-
⎢ .. ⎥ formed into Equation 26:
⎢ . ⎥
⎢ ⎥
⎢ ṁ n−1 h n−1 − ṁ o h o + qi,n ⎥ ⎡ ⎤ ⎡ ⎤
⎢ ⎥ U̇1 ṁ i h i − ṁ 1 h 1 + qi,1
⎢ ṁ i − ṁ 1 ⎥
⎢ ⎥ ⎢ .. ⎥ ⎢ .. ⎥
⎢
=⎢ .
.. ⎥. (23) ⎢ . ⎥ ⎢ . ⎥
⎥ ⎢ ⎥ ⎢ ⎥
⎢ ⎥ ⎢ U̇n ⎥ ⎢ ṁ h − ṁ h + q ⎥
⎢ ṁ n−1 − ṁ o ⎥ ⎢ ⎥ ⎢ n−1 n−1 o o i,n
⎥
⎢ ⎥ ⎢ ṁ e ⎥ = ⎢ ṁ − ṁ ⎥,(25)
⎢ qo,1 − qi,1 ⎥ ⎢ ⎥ ⎢
in out
⎥
⎢ ⎥ ⎢ Ė w,1 ⎥ ⎢ q − q ⎥
⎣ .. ⎦ ⎢ ⎥ ⎢
o,1 i,1
⎥
. ⎢ .. ⎥ ⎣ .. ⎦
qo,n − qi,n ⎣ . ⎦ .
Ė w,n qo,n − qi,n
steady state mass and
energy balances mass and energy steady state mass and
storage rates energy balances
HVAC&R RESEARCH 963
⎡ ⎤
Ṗe air temperature predictions converge for a modest
⎢ ⎥ ḣ 1 level of discretization, the prediction of refriger-
⎢ ⎥
⎡ ⎤ ⎢ ⎥ .. ant outlet temperature (superheat) clearly requires
Z 11 Z 12 0 ⎢ ⎥ . n > 20 before the simulations show quantative
⎢ ⎥
⎣ Z 21 Z 22 0 ⎦ ⎢ ⎥
⎢ ḣ n ⎥ convergence.
0 0 Z 33 ⎢ Ṫw,1 ⎥
⎢ While n > 20 may be required for numerical
⎢ . ⎥ ⎥
pseudo−state ⎣ .. ⎦ consistency, the dominant dynamics appear to be
transformation matrix of much lower order. This indicates some level of
Ṫw,n “over-modeling,” as data-driven models do not re-
dynamic state quire 50+ dynamic states to reproduce the required
variables transient response (Rasmussen et al. 2005). In this
⎡ ⎤
ṁ in (h in − h 1 ) + qi,1 form, these models capture subtle parameter varia-
⎢ .. ⎥ tions but are of high dynamic order, making them
⎢ . ⎥ most useful for control evaluation or tuning, rather
⎢ ⎥
⎢ ṁ in (h n−1 − h out ) + qi,n ⎥ than dynamic analysis or model-based control de-
⎢ ⎥
=⎢ ṁ in − ṁ out ⎥. (26) sign. If such design tasks are attempted, numerical
⎢ qo,1 − qi,1 ⎥
⎢ ⎥ model reduction techniques are generally applied
⎢ . ⎥
⎣ .. ⎦ to obtain a simple low-order approximate model.
qo,n − qi,n Although computation time was reported to be a
serious concern in some earlier publications (e.g.,
modified steady state mass and Wang and Touber 1991), computer and software ad-
energy balances
vances are rapidly eliminating this as a significant
issue. Current capabilities allow real-time (or bet-
This particular model has 2n + 1 dynamic states, ter) simulation of VCS models with multiple FCV
where n is the number of control volumes or cells heat exchangers.
(conservation of refrigerant/heat exchanger energy When the FCV and MB models are initialized
for each region, and one equation for the conser- with the same physical parameters, the resulting
vation of refrigerant mass). If conservation of mo- simulations exhibit only small differences (Fig-
mentum is included, the model includes 3n dynamic ure 6). The MB model responds slightly faster than
equations, with the additional algebraic constraints the FCV model to step changes in expansion valve
that define the mass flow rate between regions. or compressor, indicating that some adjustment of
Publications typically report using n > 20 regions the “effective” parameters used by the MB model
to achieve grid (or mesh) independence. Figure 5 may be appropriate (e.g., the user may opt to use
presents simulation results for FCV models with a weighted average of a particular parameter ver-
increasing numbers of regions. While pressure and sus strict average when lumping the parameters for
Figure 5. Comparison of FCV with differing levels of discretization for step changes in expansion valve and compressor speed.
Signals shown are evaporator pressure, evaporator superheat, and evaporator air outlet temperature (color figure available online).
964 VOLUME 18, NUMBERS 5, OCTOBER 2012
Figure 6. Comparison of FCV and MB models for step changes in expansion valve and compressor speed. Signals shown are
evaporator pressure, evaporator superheat, and evaporator air outlet temperature (color figure available online).
two-phase or superheated fluid regions). The models solvers, thus requiring the user to resolve the issue
also give slightly different steady-state predictions of numerical stiffness prior to simulation.
for evaporator outlet conditions (superheat). This The primary source of multi-time scale behavior
discrepancy demonstrates the fundamental differ- is the inclusion of the conservation of momentum
ence between the modeling paradigms, as the FCV in the dynamic equations. Given that the pressure in
model avoids extensive lumping of parameters and the system propagates much faster than the evolu-
captures parameter and temperature gradients that tion of the thermal dynamics, this results in a natu-
result in a more precise prediction of outlet condi- ral conflict. A common approach of addressing this
tions. However, it is noted that these prediction er- issue is to assume isobaric conditions in the heat ex-
rors are typically within the differences seen when changers (thus neglecting the associated momentum
validating the models against experimental data and, change). Zhang et al. (2009) presented a direct com-
therefore, may not be a critical factor in selecting parison of the most common assumptions regarding
which model to use. how the momentum equation is handled, revealing
that including momentum effects is not critical for
Modeling challenges and innovations large transient simulations but that discernible dif-
Stiff dynamics and DAEs ferences are present for instaneous step changes in
VCSs exhibit dynamics that evolve on several mass flow rate. However, as most compressors and
time scales. At the extremes are the dynamics of valves do not respond instantly, this may not be a
the building or cabin cooling load whose dynamic critical effect to capture.
response is on the order of hours or days, whereas Beyond momentum dynamics, most two-phase
the propagation of pressure waves through the re- heat exchangers exhibit multi-time scale behavior.
frigerant is completed in milliseconds. The user An analysis of the eigenvalues of the linearized heat
typically isolates a time scale of primary interest exchanger dynamics reveals dynamic modes whose
and approximates slower dynamics as constant, and time scale varies by several orders of magnitude
faster dynamics as instantaneous, resulting in a set (Rasmussen and Alleyne 2004). This leads naturally
of DAEs. However, isolating dynamics at particular to the search for a reduced-order model that elimi-
time scales is not always possible, and the resulting nates dynamics outside of the time scale of interest,
system retains the multi-time scale behavior and is serving both to simplify the model computation-
referred to as a “stiff ” set of ODEs. Most simulation ally for simulation tasks and analytically for control
software packages include variable time-step nu- design tasks. The particular method of model re-
merical integration algorithms for stiff systems and duction and the physical interpretation varies in the
algorithms for solving simple DAEs (i.e., DAEs of literature. He et al. (1997) used both pure numerical
index 1). However, compiling simulations for real- reduction as well as a physically motivated tech-
time or embedded computing requires fixed step nique for removing non-essential modes (He et al.
HVAC&R RESEARCH 965
1998), an approach later duplicated by Leducq et al. tion options were used). The same simulations were
(2003). Rasmussen and Alleyne (2004) explored al- also compiled into stand-alone executable files re-
ternative choices of state variables to identify those sulting in order-of-magnitude improvements in ex-
that virtually decoupled the modes according to time ecution speed. The real-time factor was computed
scale and then applied singular pertubation tech- by dividing the total simulation time (initialization
niques for model reduction. Regardless of the ap- + execution) by the length of the simulated time
proach, these studies indicate that some commonly (500 s).
modeled dynamics are not essential for accurate
transient simulation. Fluid properties and heat transfer correlations
Modelers of centrifugal compressors should Refrigerant properties pose a particular chal-
also be aware of the potential challenges spe- lenge for dynamic VCS simulation, as standard
cific to the “surge-and-stall” dynamics inherent methods using equations of state (EOS) for de-
to this particular component. Models of this phe- termining fluid properties can be computationally
nomena are readily available in the literature (see expensive and not suitable for real-time dynamic
Moore and Greitzer, 1986) and numerous subse- simulations that require updating of fluid proper-
quent publications). These unstable dynamics pose a ties at each simulation time step. Likewise, using
particular challenge for simulation but also typi- software interfaces to external databases or com-
cally contribute to the “stiff systems” problem, as panion software programs can significantly increase
these dynamics are much faster than heat exchanger simulation computation time. A typical solution
dynamics. Integrating standard VCS models with to this dilemma is to utilize high-accuracy fluid
centrifugal compressors is likely to be an area of property database software, e.g., NIST’s REFPROP
research in the near future, specifically for aircraft (Lemmon et al. 2007), to generate tables of fluid
cooling systems. properties for a predetermined range of conditions.
This table is then used for fast interpolation of
Real-time simulation fluid properties during simulation. Likewise, tables
Computation speed for VCS simulations is for the partial derivatives of fluid properties may
largely dependent on the chosen heat exchanger be generated by computing the numerical gradient
modeling paradigm. As described above, solving or from fundamental thermodynamic relationships
the nonlinear differential equation Z (x)ẋ = f (x, u) (e.g., Appendix B of Tummescheit 2002). Care must
requires a matrix inversion, where the matrix size be taken to appropriately handle discontinuities in
depends on the number of dynamic states. MB the property tables, such as the transition point be-
models typically have five to nine states, depending tween fluid phases, or significant numerical inac-
on the formulation, and FCV models have 2n + 1 curacies will occur during interpolation. While this
dynamic states, where n is the number of control method of fluid property calculation sacrifices some
volumes. Linearized model approximations are level of accuracy, increasing the grid density of the
capable of much faster simulation, as the matrix interpolation tables can reduce the numerical errors
inversion is only computed once during the intiliza- to insignificant levels.
tion of the simulation to compute the appropriate Correlations for heat transfer, void fraction, and
state space matrices (Equation 18). Compiled code fluid flow are also the source of potential difficul-
also offers a significant improvement in execution ties. For maximum accuracy, the values for heat
time, although this eliminates the option of modify- transfer coefficients, pressure drop, etc. must be up-
ing the simulation or viewing the predicted outputs dated during the simulation. Some approximations
during execution. may be necessary to enable fast explicit calculation
For comparison, Table 1 summarizes the compu- of values and to avoid circular algebraic dependen-
tation time required to produce the 500-second sim- cies that would require calling a numerical equation
ulations shown in Figures 3 and 5. The simulations solver at each time step. For example, a heat trans-
were conducted on a standard desktop computer (3- fer coefficient correlation may require heat flux as a
GHz processor) using a fourth-order Runge-Kutta parameter. However, the instantaneous heat flux is
solver with a fixed step size of 0.01 s. The “standard determined using the heat transfer coefficient. With
simulation” results were created by simulating the only minor loss in accuracy, the heat flux from the
systems using MATLab/Simulink with the default previous time step may be used as an approxima-
simulation settings (i.e., no “accelerated” simula- tion of the current heat flux for calculating the heat
Table 1. Comparison of simulation execution time.
966
Nonlinear FCV—10 Region 21 12.8 158.7 0.34 31.9 11.1 0.09
Nonlinear FCV—20 Region 41 13.9 774.5 1.58 32.6 23.8 0.11
Nonlinear FCV—30 Region 61 14.4 2166.1 4.36 33.8 37.1 0.14
Nonlinear FCV—40 Region 81 13.2 4772.5 9.57 41.5 53.2 0.19
Nonlinear FCV—50 Region 101 14.2 9153.4 18.34 43.0 72.4 0.23
Nonlinear FCV—100 Region 201 19.0 70,594 141.23 47.5 275.2 0.65
HVAC&R RESEARCH 967
transfer coefficient and avoiding an algebraic depen- (Ljung 1999). Parametric-based approaches explore
dency. Although this is an obvious approximation, the sensitivity of the model predictions to parameter
numerical inaccuracies are typically well within the variations and techniques for improving model fit by
uncertainty levels of the correlation. More impor- parameter tuning (Butterfield and Thomas 1986a,
tant is to ensure continuity in the computation to 1986; Butterfield 1990). Robust model validation
avoid false transient responses due to discontinu- is specifically designed for control-oriented models
ous changes in model parameters during a simula- and seeks to determine the level of dynamic model
tion. For example, numerical problems in solving uncertainty required to reproduce the experimental
for heat transfer correlation may lead to a sudden data (Poolla et al. 1994; Dullerud and Smith 1996;
change in the value of the coefficient. This, in turn, Smith and Dullerud 1996).
would induce a transient response not unlike a sud- As seen from the dicussion in previous sections,
den blockage or fouling of the heat exchanger. Thus, despite the large number of publications regarding
care must be taken to ensure continuous calculation VCS dynamic models, relatively few provide de-
of the correlation from one simulation time step to tailed experimental validation. The most common
the next. deficiencies are (1) no validation, (2) only steady-
state validation of a dynamic model, (3) compari-
Model validation and tuning son with other simulation models, (4) comparison of
Central to any model-based research effort is only a few model outputs or not the critical outputs,
establishing the validity of the model. The prob- or (5) qualitative comparison with no quantitative
lem of model validation is separate and distinct metrics. Depending on the intended model use, val-
from the issues associated with model purposive- idation of the model for small transient deviations
ness (e.g., whether the model meets the required pur- may or may not be appropriate; this includes fre-
pose), model plausibility (e.g., whether the model quency domain validation, which focuses on linear
conceptually agree with the process physics), and model behavior.
model verification (e.g., whether the software em- Perhaps the lack of detailed model validation in
bodiment of the model is accurate) (Bohlin 1991). the literature stems from the challenge of proper ini-
Model validation is a question of assessing whether tializing and tuning of the model. Most VCS mod-
the model outputs agree with experimental data els contain measurable physical parameters (areas,
(Murray-Smith 1998). From a philosophical per- volumes) as well as unmeasurable or uncertain pa-
spective, it is impossible to truly validate a model, rameters (void fraction, heat transfer correlations).
as this would require an infinite amount of experi- Additionally, many model parameters are lumped
mental data (Smith et al. 1997); model invalidation (effective surface areas, effective volumes, etc.) and
is a more proper term, as the majority of techniques must be adjusted given model assumptions. For ex-
are used to determine when a model is not capa- ample, whereas the effective internal surface area of
ble of reproducing the measurements (i.e., model a heat exchanger includes only the area that directly
falseness). participates in heat transfer, the effective heat ex-
The techniques for external model validation can changer volume should be adjusted to include head-
be considered qualitative (e.g., visual inspection of ers and entrance exit pipe lengths because all of
model/data agreement) and quantitative (e.g., nu- these participate in the increase/decrease in system
merical metric of model validity). Common quanti- pressure. The following figures illustrate some of
tative methods for dynamic models include (1) sta- the key tuning parameters and their relative effects
tistical, (2) residual-based, (3) parametric, and (4) on predicted temperatures and pressures.
robustness methods. Statistical methods can be ei- Figure 7 presents MB model simulations where
ther descriptive statistics that evaluate the mean, the external heat transfer coefficient has been in-
variances, and correlations of the data or infer- creased. While the pressure and superheat response
ential statistics that deal with hypothesis testing remain relatively unchanged, the outlet air temper-
(Ljung 1999). Residual-based approaches rely on ature is lowered by several degrees and exhibits a
numerical performance measures by calculating the transient response that is more responsive to valve
root mean square of the prediction error, relative and compressor changes. Figure 8 shows the effect
prediction error, or other variations (Murray-Smith of increasing the effective cross-sectional area of
1998) and generally assume that model residuals the heat exchanger or, in other words, increasing
are caused by noise that is uncorrelated to the input the total internal volume. Assuming a constant void
968 VOLUME 18, NUMBERS 5, OCTOBER 2012
Figure 7. Comparison of MB simulations for variations in external heat transfer coefficient. Transients are induced by step changes
in expansion valve and compressor speed (color figure available online).
fraction, this also equates to more refrigerant mass A final comment on model tuning: VCS models
in the heat exchanger. As expected given the large exhibit a significant sensitivity to refrigerant mass
volume to pressurize and the greater mass to af- flow rate prediction. Because the heat exchanger
fect, the transient responses are somewhat slower, model dynamics are driven by mass flow rate dif-
and the superheat response is noticeably reduced in ferentials (inlet versus outlet), accurate valve and
magnitude. Figure 9 presents an example of a pa- compressor models are critical. This is somewhat
rameter that affects primarily the transient response of a paradox, as the bulk of the dynamic complex-
rather than the steady-state values. For void frac- ities lie with the heat exchanger models, but it is
tion correlations, the slip ratio defines the velocity the quantitative accuracy of the mass flow models
of the vapor phase to liquid phase (homogeneous that largely determines the quality of the valida-
flow refers to a slip ratio of one). Increasing the slip tion and comprise much of the parameter tuning
ratio decreases the mean void fraction and increases effort. Given the large number of parameters to be
the amount of refrigerant mass. Thus, for higher tuned, it is therefore essential to cross-validate the
slip ratios, the transient response of all signals is models, using different datasets to tune and validate
slower. the model.
Figure 8. Comparison of MB simulations for variations in heat exchanger cross-sectional area (i.e., heat exchanger internal volume).
Transients are induced by step changes in expansion valve and compressor speed (color figure available online).
HVAC&R RESEARCH 969
Figure 9. Comparison of MB simulations for variations in void fraction slip ratio. Transients are induced by step changes in expansion
valve and compressor speed (color figure available online).
Figure 10. Comparison of FCV, MB, and SMB models for the loss of evaporator superheat induced by step changes in expansion
valve. Signals shown are evaporator pressure, evaporator superheat, and evaporator air outlet temperature (color figure available
online).
reappears, but McKinley and Alleyne (2008) used The following figures illustrate the behavior of
a criteria based on void fraction. The assumptions these various models under hard transients. The
regarding interface wall temperatures also vary. Pet- simulation shown in Figure 10 assumes that the
tit et al. (1998) made the standard assumption that expansion valve is opened wide for a period of
the wall temperature at the interface is equal to time, resulting in a large increase in refrigerant flow
the two-phase wall temperature (Case 1), whereas into the evaporator. Without changing the airflow
McKinley and Alleyne (2008) used an approach rate or the compressor speed, this results in a loss
suggested in Jensen and Tummescheit (2002) that of evaporator superheat. The MB model fails, with
the interface temperature depends on whether the the prediction values exploding toward infinite due
two-phase region is growing or shrinking, Tw,int = to the singularity in the Z (x) matrix that makes
T1 if ddtL 1 < 0 and Tw,int = T2 if ddtL 1 > 0 (Case 2). it not invertable. However the FCV and SMB
Zhang and Zhang (2006) assumed a weighted av- models both handle the transient without numerical
erage Tw,int = LLtotal
2
T1 + LLtotal
1
T2 , which eliminated failures. Although examination of the internal
the numerical singularity associated with dividing model variables, such as wall temperature, differ
by the length of a disappearing region (Case 3). distinctly depending on the assumptions regarding
Figure 11. Comparison of expansion valve strategies during compressor shutdown using FCV models. Signals shown are evaporator
pressure, evaporator superheat, and evaporator air outlet temperature (color figure available online).
HVAC&R RESEARCH 971
Smith, R., and G.E. Dullerud. 1996. Continuous-time control Zhang, W.-J., and C.-L. Zhang. 2006. A generalized moving-
model validation using finite experimental data. IEEE Trans- boundary model for transient simulation of dry-expansion
actions on Automatic Control 41(8):1094–105. evaporators under larger disturbances. International Journal
Tummescheit, H. 2002. Design and implementation of object- of Refrigeration 29(7):1119–27.
oriented model libraries using Modelica. Ph.D. Thesis, Lund, Zhang, W.-J., C.-L. Zhang, and G.-L. Ding. 2009. On three forms
Sweden, Lund Institute of Technology. of momentum equation in transient modeling of residential
Wang, H., and S. Touber. 1991. Distributed and non-steady- refrigeration systems. International Journal of Refrigeration
state modelling of an air cooler. International Journal of 32(5):938–44.
Refrigeration 14(2):98–111.