5.5 The simple Hamiltonian system model of process systems
5.5.1 Input variables for the Hamiltonian description
T(C)
] T
(5.20)
q =[P T(1)
::: P T(C)
] T
(5.21)
Observe that the abovevariablesare exactlythe same asbeforein Eqs. (5.13)and
(5.17),thatisthe generalizedmomentaarethenormalizedconserved extensive
vari-ablesand the generalized co-ordinatesare the normalizedthermodynamicaldriving
forces. In additionto the state space model equations, there is a linear static (i.e.
time invariant) relationship between the state and co-state variables of a process
system in the form:
q =Qp (5.22)
where Qis a negative denitesymmetric block-diagonalmatrix of the form
Q= 2
6
6
4 Q
(1)
0 ::: 0
0 Q
(2)
0 ::: 0
::: ::: ::: :::
0 0 ::: Q
(C) 3
7
7
5
(5.23)
Theaboveequationsaretheconsequencesofthedenitionsofthestateandco-state
variablesinEqs. (5.20)and(5.21),andoftheconcavityoftheentropyfunctionnear
anequilibrium(steady-state)point. Thereisanotherrelationshipbetween the state
and co-state variables of a process system which is an analogue of the mechanical
relationship (5.1). This can be derived from the form of the Onsager relationship
in Eq. (5.18) which givesan expression for the transfer rate of conserved extensive
quantities asa function of the related thermodynamicaldriving forces:
_ p
transfer
=
;transfer
=L q ; L > 0 ; L T
=L (5.24)
where the matrix L is positive deniteand symmetric inthe followingform:
L= 1
2 C
X
j=1 C
X
`=1 I
(j;`)
L (j;`)
Observe, that the matrix L in(5.24) is the same as the transfer matrix A
transfer in
the decomposed state equation (5.19).
5.5.1 Input variables for the Hamiltonian description
InordertohaveaHamiltoniandescriptionofprocesssystemswehavetoassumethat
only the mass ow rates form the set of input variables with the inlet engineering
driving force variables being constant. Then the set of normalized input variables
isthe same asin Eq. (5.15):
u=[(v (j)
); j =1;:::;C]
T
Following the mechanical analogue the Hamiltonian function of process systems
should describe the directionof changes taking place in an open-loopsystem. The
mechanicalanalogueandthegeneraldeningproperties(5.7)-(5.11)ofsimple
Hamil-toniansystemswillbeusedforthe constructionofthe simpleHamiltonianmodelof
processsystemsusingthe Onsagerrelationship(5.24)andtheconservationbalances
together withthe relationshipsbetween the stateand co-statevariables(5.22). The
Hamiltonianfunctionis then constructed intwo sequentialsteps asfollows.
1. The kineticterm
Thekinetictermisconstructedfromthe Onsagerrelationship(5.24)by
trans-forming it to the form of (5.9) using the relationship between the state and
co-statevariables (5.22) toget:
_
q=(QLQ)p=Gp (5.25)
where G is a positive semi-denite symmetric matrix not depending on q.
Symmetricity follows from the identity
(QLQ)
and positive semi-deniteness is a simple consequence of the positive
semi-deniteness of L
x
The kinetic term T(p) in the Hamiltonian function will be constructed to
satisfy (5.9),i.e.
T(p) =
2. The potential term and the coupling Hamiltonians
ThepotentialtermandthecouplingHamiltoniansarederivedbymatchingthe
terms in the special form of the dening Hamiltonian property (5.10) taking
intoaccount that now G does not depend onq
_
and that of the decomposed general conservation balances (5.19) with the
ow-ratesas input variables:
_
where B
j;conv
is the jth column of the input convection matrix B
conv
in the
decomposed state equation (5.19). From this correspondence the potential
energy term V(q) and the couplingHamiltoniansH
j
(q)should satisfy:
f
inthe form
H(p;q;u)=T(p)+V(q) m
X
j=1 H
j (q) u
j
(5.30)
satisfyingalltherequiredproperties(5.9)-(5.11). Wemayfurtherspecializetheform
of the Hamiltonian function above using the decomposition of the state function
f(q) in Eq. (5.28) according to the mechanisms (transfer and source) to get a
decompositionof the potential term V(q) tosatisfy (5.29):
V(q)=V
transfer
(q)+V
Q
(q) ; V
transfer (q)=
1
2 q
T
Lq ;
@V
Q (q)
@q
= Q
(q) (5.31)
Substituting the above decomposed potential term to the Hamiltonian function
(5.30) abovewe obtain
H(p;q;u)=V
Q (q)
m
X
j=1 H
j (q) u
j
(5.32)
It can be seen that there is no kinetic term in the equation above because
T(p)= V
transfer (q)
but the internal Hamiltonian does only contain the potential term originating from
thesources. Thefollowingconstructivederivationgivesrisetothefollowingtheorem
which summarizes the main result.
Theorem 5.5.1 A process system with the input variables (5.15) being the
ow-rates, the state and co-state variables (5.20) and (5.21) enables us to construct a
simpleHamiltonian systemmodelwiththeHamiltonian function(5.32)andwiththe
underlying relationships (5.25), (5.28) and (5.22), (5.29).
Furthermore,the followingcondition forthe sourcefunction f follows fromthe rst
equationof (5.29).
The source function f in the system model(5.12) must satisfythe relation
@f
i
@q
j
=
@f
j
@q
i
8i;j (5.33)
in order to describe the system in simple Hamiltonian form. Obviously, a process
system with anarbitrarysource functioncannotbe described inHamiltonianform.
Theconditionisalwaysfullledifthesystemcontainsonlyonecomponentor,inthe
higherdimensionalcase,onlyatransferpartiscontainedinthesystemmodel(5.19).
Furthermore,theconditionisalsotrueiftheJacobianmatrixofthenonlinearsource
functionQ
issymmetric. Infact,(5.33)makesitpossibletocalculatethepotential
term V(q) by integration.
Remarks
There are important remarks tothe above as follows.
Asithasbeenmentionedbefore, theinternalHamiltonianfunctionisastorage
function of the system with respect to the supply rate P
. Recall
thatthearticialoutputvariableshavebeendenedtobeequaltothecoupling
Hamiltonians,thatisy
j
=H
j
(q). Therefore the supplyrate ofthe systemcan
be writtenin the formof
a=y T
u
the internal Hamiltonian
It isimportanttonote that the internalHamiltonianabove isa storage
func-tionforprocesssystemswhichgivesthetotalentropypower(entropyproduced
inunit time). Thiscan bechecked bycomputing theunitsinthe Hamiltonian
function. Therefore the storage function derived from the simple Hamiltonian
descriptionisentirelydierentfromtheentropy-basedstoragefunctionin[25].
This is explained by the known fact that the storage function of a nonlinear
system is not unique.
the time derivative of the Hamiltonian storage function
Forstability analysis the time derivative of the storage function is important
which is ina special formin this case:
dH
wherethedeningequations(5.9)and(5.10)havebeen usedforthederivation
with u=0.
5.6 Passivation andloop-shaping based on the
Hamil-tonian description
In order to stabilize simple Hamiltonian systems which are not open-loop stable
because of not being passive we should again recall that the internal Hamiltonian
H
0
(q;p)is astorage function for the system with the supply rate P
constructionof thesimple Hamiltoniansystem models alsoensure thatinany
equi-librium point p = 0 and the passivity in the neighborhood does only depend on
the potential energy V(q) because the kinetic energy term T(p) in itself is always
positive semi-denite with negative semi-denite time derivative. Passivation and
loop-shaping is then directed towards modifying the potential energy part V(q) of
the Hamiltonian description by a suitable state feedback in such a way that the
modied potential energy V(q) is positive denite with its time derivative being
negative denite. The rst result (Nijmejer, van der Schaft, 1990; Theorem 12.27.)
showsthatastableequilibriumpoint(q
0
;0)isnotnecessarilyasymptoticallystable.
Lemma 5.6.1 Let(q
0
;0)bean equilibrium point of thesimple Hamiltoniansystem
given by (5.7)-(5.8). Suppose that V(q) V(q
0
) is a positive denite function on
someneighborhood of q
0
. Thenthe system for u=0 isstable but notasymptotically
stable.
totically stable by introducing a derivative output feedback to every input-output
pair asfollows:
u
whichphysicallymeansaddingdampingtothesystem. Observethathereweusethe
time derivativeof the articial(natural) outputto the system which is a nonlinear
function of the co-state variables in the general case. The main assumption in
Lemma 5.6.1 was the positive deniteness of the dierence V(q) V(q
0
) near an
equilibrium point q
0
. If this assumption does not hold then let us apply a linear
proportional static outputfeedback
u
the newcontrolstothe simpleHamiltoniansystem(5.7)-(5.8). The resulted
system is againa simple Hamiltoniansystem with the internal Hamiltonian
H
where V(q) isthe new potential energy
V(q)=V(q)+
and with the state space model:
_
Eq. (5.37)shows that wehave addeda positive term tothe "old" potentialenergy.
By choosing the feedback gains k
i
> 0 suciently large we may shape the potential
energy in such a way that it becomes positive denite. The concrete form of the
potential energy V(q) together with Eq. (5.37) gives a guideline for tuning the
nonlinear proportionalcontrollers. We should choose k
i
; i =1;:::;m large enough
to get a positive dente V(q) in the entire region of interest around the equilibrium
setpoint q
0
. Observe, that we have as many "independent" single-input
single-output proportional controllers as the number of input variables and their eect
is summed up to make the potential energy positive denite. This whole set of
controllers can be seen as a special version of nonlinear static state feedback with
a diagonal gain matrix where the nonlinearity is present in the articial output
values H
j
(q); j =1;:::;m. Moreover, wecan achievepassivity even by asinglePD
controller if we can realize a large enough gain k
j
to make the modied potential
energyV(q)positivedenite. Itisimportanttonotethatpassivation isonlyneeded
system the proportional nonlinear state feedback controllers above will shape the
dynamicresponse of the system similarlytothe way pole-placementcontrollersact
onthe dynamics of a stablelinear time-invariantsystem (Kailath,1980).
5.7 Case study: a nonlinear heat exchanger cell
Consider the simplest possible model of a heat exchanger consisting of only two
perfectly stirred regions or lumps for the hot and cold sides respectively. We shall
callone of the lumps the hot (j = h) and the other one the cold (j =c) side. The
lumps with their variablesare depicted ing. 5.1.
5.7.1 Conservation balances and system variables
Thecontinuous-timestateequationsoftheheatexchangercellabovewillbederived
fromthe following energy conservation balances:
E
whereT
ji andT
(j)
are the inletand outlettemperatureand v
j
isthe mass ow-rate
of the two sides (j = c;h) respectively. Note that we have now two regions, that
is C = 2. Observe that the model equations above contain an input and output
convection and a transfer term expressed in engineering driving forces but there is
nosourceterm. Thevectorof conserved extensive quantitiesconsistsofthe internal
energies for the tworegions:
=[E
Letus choose the volumetricow-rates v
c and v
h
as input variables.
5.7.2 Extensive-intensive relationships
Letuschooseareference thermodynamicalequilibriumstate fortheheatexchanger
cellsuch that
T
The energy - temperature relationsare known fromelementary thermodynamics:
E
wherem (j)
isthe constant overallmass ofregion j. From(5.42)expanding 1
T (j)
into
Taylor series we obtain
T
T
<0being aconstant in this case. Therefore
Q=
5.7.3 Normalized system variables
Withthereference equilibriumstate(5.41)wecan easilydenethenormalizedstate
and thermodynamicaldriving force variables as
q=[
From the conservation balance equations ( Eqs. (5.38)-(5.39) ) it follows that now
the reference pointfor the input variablesis the zero vector therefore
u=[ v
5.7.4 Decomposed state equation in input ane form
Withtheabove dened normalizedsystem variablesthe conservationbalance
equa-tions (Eqs. (5.38)-(5.39) )can bewritten inthe following canonical form
dp
dt
=A
transfer q+B
transfer
=(T
where A
transfer
and B
1c
are constant matrices and N
1
and N
2
are linear functions
ofthenormalizedengineeringdrivingforcevariables. Observethatnowthe transfer
function matrix L (c;h)
Let us now develop the Hamiltonian description of the nonlinear heat exchanger
cell model. The internal Hamiltonian of the heat exchanger cell system is easily
constructedfromthespecial formofthe Hamiltoniandeveloped forprocesssystems
in Eq. (5.32) taking into account that there is no source term in the conservation
balanceequations, i.e. V
Q
(q)=0
H
0
(q;p)=0 (5.46)
Now we need to identify the coupling HamiltoniansH
1
(q) and H
2
(q) from the
co-state equation (5.44)for the input variables
u=[ v
The coupling Hamiltonians can be reconstructed from the vector functions g
1 (q)
and g
2
(q)respectively which are the gradient vectorsof the correspondingcoupling
Hamiltonians:
Observe that the gradients are naturally given in terms of the engineering driving
force variables but we need to transform them into the form depending on the
state variables q. In the heat exchanger cellcase we have
g
Bypartial integration we get that
H
From the passivity analysis we know that the system is inherently passive but it
has apoleatthe stability boundarybecausethere isnosourceterm andV
Q
(q)=0.
Therefore we can perform stabilization by a derivative feedback and loop shaping
by a static feedback using PD controllers.
5.8 A simple unstable CSTR example
Let us have an isotherm CSTR with xed mass holdup m and constant
physico-chemical properties. A 2nd order
2A+S!T +3A
in a great excess. Assume that the inlet concentration of component A (c
Ain ) is
constant and the inlet mass ow-rate v is used as input variable. We develop the
Hamiltoniandescription of the system aroundits steady-state point determined as
the setpoint for passivation and loop shaping. This description is then used for a
nonlinear proportionalfeedback controller tostabilize the system.
5.8.1 Conservation balance equation and system variables
The state equation is a single component mass conservation balance equation for
component A inthe form:
dm
where k is the reaction rate constant. Note that we only have a single region,
therefore C = 1. The given steady-state concentration c
A
with a nominal mass
ow-ratev
From this we can determine v
which should be non-negative, therefore c
Ain c
A
should hold. The given
steady-stateconcentration c
A
alsodetermines thenominalvalueof theconserved extensive
quantity m
A
being the component mass inthis case:
m
The engineeringdriving forcevariable tothe component massm
A
isthe
concentra-tion c
A
and the thermodynamicaldriving force is
P = R
with R being a constant under isothermconditions and assumingideal mixtures.
5.8.2 Hamiltonian description
It follows from the abovethat the normalized system variables for the Hamiltonian
description of the simple unstable CSTR are as follows:
p=m
Observe that the constant R has been omitted from the denition of the co-state
variable q as compared to the thermodynamical driving force P above. From the
variable denitions abovewe see that the matrix Q specializesto
Q= 1
m
region present in the system and there is no transfer term. Therefore the transfer
coecient matrix L = 0. This implies that now the reference point for the state
and co-state variables can be chosen arbitrarily. However, the source term Q
is
nowpresent asa secondorder term originatingfrom the autocataliticsecond order
reaction. Ifwesubstitutethenormalizedvariables(5.50)totheconservationbalance
equation (5.49)the followingnormalized state equation is obtained:
dp
FromtheequationabovewecanidentifytheelementsoftheHamiltoniandescription
tobe
Bypartial integration we get:
V
5.8.3 Passivity analysis of the unstable CSTR
The passivity analysis isperformedusing the internalHamiltonianof the system
H
We can see that the above functionis of nodenite sign because of the presence of
the secondand thirdorder terms ofdierentconstant coecients. This meansthat
the system fails tobepassive inthe generalcase.
5.8.4 Passivation and loop-shaping of the unstable CSTR:
illustration of the controller tuning method
System parameters and open-loop response
Let us introduce the normalized concentration variables c
A
. The conservation balance equation(5.49) then takes the form
dc
The parameter values used in the simulations are shown in Table 5.1. There were
two initialconcentrationvalues (c
A
(0)) given for the simulations:
1
respectively. It is easily seen from the data that c
A
is an unstable equilibrium for
the system as it is illustrated in both of the sub-gures in g. 5.2. Nonlinear
proportional feedback controller
Letus apply the following feedback controller
u=k
where k
c
is an appropriately chosen controller gain and w is the new reference
signal. The new reference, w was set to 0 for the simulations. The chosen value
of the controller gain is shown in Table 5.1. The closed loop simulation results in
g. 5.3 show that the proposed control method indeed stabilizes the equilibrium
c
. Here again, the simulation was performed using two dierent initial
conditions asabove as shown inthe two sub-gures of g. 5.3.
Controller tuning method based on stability region analysis
It is an important question for a nonlinear controller to determine its stability
re-gion as a function of the state variables with its parameter(s) xed. For this very
simple case this problem can be solved analytically. Let us consider the nonlinear
proportionalfeedback controller above with its gain xed at k
c
= 10. In fact, it is
easy to show that the resulting closed loop system with the parameters described
above ispassive with respect tothe supply rate wy if
c
A
> 1:9088 kmol
m 3
i:e: c
A
>0:3912
wherey=c
A
. Inordertoshowthis, letustakethesimplestoragefunctionV(c
A
. It can becalculated that
@V
> 1:9088 (5.56)
and equality holds only if c
A
= 0. Since g(c
A
) = 1 in the closed loop state space
modelwe can deduce that
y=L
where L
g
is the Lie-derivative of the simple storage function with respect to the
function g. Therefore it follows that the closed loop system is passive in the given
interval. Thetimederivativeofthe storagefunction(asafunctionofc
A
)isdepicted
ing. 5.4.
5.9 Summary
Usingathermodynamicapproachof constructingand analyzingdynamicmodels of
process plants the simple Hamiltonian model of lumped process systems has been
constructedbasedonmechanicalanalogue. Theconservedextensivequantitiesform
the system. The approach is applicable for systems where Kirchho convective
transport takes place together with transfer and sources of various type. Systems
with constant molar holdup and uniform pressure in every balance volume satisfy
these conditions. The resulted simple Hamiltonianmodelcan be used for passivity
analysis because it contains a storage function together with the nonlinear state
space model of the system in a special canonical form. This type of modelenables
us to design a nonlinear PD feedback controller for passivation and loop shaping.
The general results are illustrated on simple examples of practical importance: on
abilinear heat exchanger celland onan isothermCSTR with nonlinear reaction.
T ci
T hi T (h)
T (c) v c
v h
Figure5.1: The heat exchanger celland its variables
0 200 400 600 800 1000
0.7 0.75 0.8 0.85 0.9 0.95 1
time [s]
outlet concentration [kmol/m 3 ]
0 200 400 600 800 1000
2.6 2.8 3 3.2 3.4 3.6 3.8 4 4.2 4.4 4.6
time [s]
outlet concentration [kmol/m 3 ]
Figure5.2: Open loopsimulation results
0 500 1000 1500 2000 1
1.5 2 2.5
time [s]
outlet concentration [kmol/m 3 ]
0 500 1000 1500 2000
2.3 2.35 2.4 2.45 2.5 2.55 2.6 2.65 2.7 2.75 2.8
time [s]
outlet concentration [kmol/m 3 ]
Figure 5.3: Closedloopsimulationresults
m 1800 kg
k 510
4 m
3
kmol s
c
Ain
0.4
kmol
m 3
c
A
2.3
kmol
m 3
v
2.5058 kg
s
k
c
10
-Table 5.1: Parameter valuesof the simulatedCSTR
-0.8 -0.6 -0.4 -0.2 0
-2 -1 1 2 3
Figure 5.4: Timederivative of the storage function asa functionof c
A
Conclusions
In conclusion, the main contributions and the proposed theses of this work are
summarizedinthenext section,thenthepublicationsrelatedtothisdissertationare
listed and nally,the possible directions of further researchare given. The relevant
chapterofthe dissertationand thelabelsofthe relatedpublications(enumerated in
section6.2) are indicated inparenthesis.
6.1 Theses
Thesis 1 Model-based fault diagnosis of processsystems (Chapter 2)
([P1], [P5], [P6], [P7], [P11])
A method has been developed for the model-based fault detection and
di-agnosis of nonlinear process systems. Physical model has been used for the
descriptionof the process dynamicsand semi-empiricalmodels have been
ap-plied forfault modeling.
1. It has been shown that the performance of the fault detection and
iso-lation algorithms is improving with the increasing level of detail of the
process models. A method has been worked out for the spatial
localiza-tion of the faults using measured signals belonging to dierent spatial
locationsof the system.
2. It has been shown that safesimultaneous fault detection and isolationis
possible using the grey- or white-box models of the faults together with
the process model.
The results have been illustrated on the example of countercurrent
heat-exchangers. Theknownprocessdynamicshavebeenusedasalterfor
heat-exchangers. Theknownprocessdynamicshavebeenusedasalterfor