Hamiltonian Approach
Hamiltonian Approach
a r t i c l e i n f o a b s t r a c t
Article history: In this work, we present an approach to construct generalized Hamiltonian representations for thermo-
Received 13 August 2015 mechanical systems. Using entropic formulation of thermodynamic systems, the construction is applied
Received in revised form to a class of thermo-mechanical systems. The proposed approach leads to an explicit expression of the
24 September 2016
dissipation along the trajectories of the dynamics. The considered thermo-mechanical systems are, in a
Accepted 27 September 2016
thermodynamical sense, systems for which the dynamics of the extensive variables are functions of the
intensive variables with respect to an entropic formulation. Using the entropy as the storage function, the
Keywords:
dissipative structures of an analogue to a port-controlled Hamiltonian (PCH) representation are identified
Thermo-mechanical systems
Thermodynamics
with irreversible phenomena, while the conservative structures are identified with reversible or isen-
Generalized Hamiltonian dynamics tropic phenomena. Examples are presented to illustrate the application of the proposed methodology,
Dissipative systems including a reacting system.
Entropic formulation © 2017 Elsevier Ltd. All rights reserved.
1. Introduction phenomena that lead to a certain steady state and one interesting
question is what does it dissipate? Hence, one has to find decom-
Dissipative and passive systems constitute a very important position approaches to identify those dissipative and conservative
class of dynamical systems [1] for which the dissipated energy, structures. A solution adopted by many consists in considering
been the difference between the stored energy variation with the extensive variables rather than intensive variables for chemical
system and the amount of energy supplied by the environment, is process systems analysis purposes, an approach related to mul-
always non-negative. In view of this energy–dissipation feature, it tidomain modelling reviewed in [5] adapted to thermodynamic
is clear that dissipativity and passivity are intimately related to sys- systems. This approach, based on the Legendre transformation
tem stability. In this context, it has been shown that many physical with respect to a known potential (the energy or the entropy),
processes may be dissipative, including those that obey the laws was considered within the framework of passivity theory in [6,7].
of thermodynamics [2], since dissipativity, like irreversibility in a More recently, the idea of representing the dynamics of a system
thermodynamic system, captures the idea that some mechanical, using both intensive and extensive variables was considered in
electrical or chemical energy is dissipated as heat. [8].
Using dissipativity and passivity properties to develop stability Alternatively, the port Hamiltonian (PH) approach, as described
conditions and feedback stabilization design techniques for electri- in [9] and successfully adopted for electrical and mechanical sys-
cal and mechanical systems is well-established [3]. However, this tems, was also considered for the analysis of thermodynamical
development has shortcomings when applied to chemical systems systems [10]. Generally speaking, the Hamiltonian function refers
[4], particularly when chemical reactions occur. Indeed, chemical to any energy function, while Hamiltonian systems are dynami-
processes models are written in such a way that dissipative and cal systems governed by Hamilton’s equations. Thus, PH systems
conservative structures are not explicit and depend on intensive are open dynamical systems that interact with their surroundings
variables and although in some cases the total mass and energy through ports, and whose geometric structures are derived from
remain constant, the system still has, in some sense, dissipative the interconnection of their sub-systems. In addition PH systems
provide a framework for the geometric description of network
models of physical systems, where the dissipative and conserva-
∗ Corresponding author. tive structures can be explicitly expressed in the interconnection
E-mail address: [email protected] (J.P. García-Sandoval). matrix [11]. Based on this general framework, some efforts have
http://dx.doi.org/10.1016/j.jprocont.2016.09.011
0959-1524/© 2017 Elsevier Ltd. All rights reserved.
J.P. García-Sandoval et al. / Journal of Process Control 51 (2017) 18–26 19
mi = MTw,i Ni (2)
• Subsystem 2: Balance equations for the internal energy, U2 , posi-
are the subsystems position, momentum and mass, respectively, tion, z2 , and velocity, v2 , of the piston
with Mw,i ∈ RCi + the molar mass vector, and vi as the velocity.
Depending on the particular configuration and characteristics of U̇2 = −(T2 − T1 ) + ˛v22 ,
each subsystem, the state variables, i ∈ Rˇi , are selected within ż2 = v2 ,
the set of the extensive and motion variables. For instance, if the
process is isochoric, then the state variables vector may be defined m2 v̇2 = AP 1 − Fext − m2 g − ˛v2 ,
as = col{N, U} ∈ (RC+ × R), while for isochoric systems with only
one incompressible moving solid, the state variable may be defined
as = {U, z, mv} ∈ R3 . In this work it is assumed that each sub- where T1 and T2 are the gas and piston temperatures, respectively,
system is homogeneous, i.e., there is no spatial dependence in the P1 = N1 Rg T1 /V1 is the gas pressure, with N1 and Rg denotes the mole
considered thermo-mechanical systems. It is also considered that number in the chamber and the ideal gas constant, respectively.
20 J.P. García-Sandoval et al. / Journal of Process Control 51 (2017) 18–26
The external force applied to the piston is denoted by Fext , A is the and the Euler theorem, the difference of entropy can be obtained
piston cross section area, m2 is the piston mass, ˛ is the friction through the Gibbs relation [15]
coefficient, is a heat exchange constant, and g is the gravity con-
1 P T
stant. In addition, the volume of the chamber is a function of the dS i = dU i + i dV i − i dNi . (8)
piston position as follows: Ti Ti Ti
Here it is assumed that the total energy only depends on the
V1 = Az 2 + c, (4) internal, potential and kinetic energies, i.e., Ei = Ui + pot (mi , zi ) +
1
m v2 , and using relation (2), the aforementioned Gibbs relation is
2 i i
where c is a constant which, without loss of generality, will be con-
equivalent to
sidered equal to zero in the following; thus reducing the number of
state variables to 4. For instance, one could choose (U1 , U2 , z2 , v2 )
1 pot
T
1 P i − v2
2 i
− mi (mi , zi ) Mi
as the system state vector. The relations between internal energies dS i = dE i + i dV i − dNi
Ti Ti Ti
and temperatures are
T1 pot
zi (mi , zi ) vi
− dz i − d(mi vi ), (9)
U1 = N1 u1,0 + cv,1 dT , (5) Ti Ti
T0
pot ∂pot (mi ,zi ) pot ∂pot (mi ,zi )
T2 where mi (mi , zi ):=
∂mi
and zi (mi , zi ):=
∂zi
. From
By adding and subtracting Ts g(, s )F to the last expression, the Furthermore, we assume the existence of constant matrices J and
transport and entropy production terms from (14) can be identified R, such that the matrix M in (3) can be decomposed as
directly as
M = J + R, (22)
AJ s = Ts g(, s )F (15)
= T Mf () + ( T − Ts )g(, s )F. (16) and together with matrices L and , satisfy the following expres-
sions
Note that the entropy production, , is composed of a term
representing the internal entropy production T Mf() ≥ 0, which
R ()LT = L T ()RT ≥ 0,
quantifies the entropy generated from reactions, transport and fric- (23)
tion phenomena taking place within the system, and a second term J ()LT = −L T ()J T ,
U̇1 + P1 V̇1 Ė2 − m2 v2 v̇2 − m2 g ż2 the driving force vector, f(), for this particular model is similar
Ṡ = +
T1 T2 to Eq. (21). Decomposing the structure matrix M as M = R + J with
1 (19)
1 v22 constant matrices
= (T2 − T1 ) − +˛ ≥ 0,
T1 T2 T2 ⎛ ⎞ ⎛ ⎞
1 0 0 0 0 0
which describes the irreversibility of the heat exchange and the
⎜ −1 0 0⎟ ⎜0 0 0 ⎟
momentum dissipation due to the piston–chamber friction. Also ⎜ ⎟ ⎜ ⎟
R=⎜ 0 0 0⎟ and J = ⎜ 0 1 0 ⎟,
note that for this particular case T g(, s ) = 0, therefore the inter- ⎝ ⎠ ⎝ ⎠
action with the surrounding through the force Fext is a isentropic ˛ 1
0 − 0 0 0
(conservative) phenomena. m2 m2
2.2. Reaction, transport and motion phenomena and the then conditions (23) are fulfilled with
conjugated forces ⎛ ⎞
T1 T2 −T1 T2 0 0
When the system does not interact with the surroundings, the ⎜ ⎟
⎜ −T1 T2 T1 T2 0 0⎟
entropy change is equal to the internal entropy production, i.e., ⎜ ⎟
R ()L = ⎜
T
⎟≥0 (24)
Ṡ = T Mf () =: ˙ ≥ 0. ⎜0 0 0 0 ⎟
(20) ⎝ ˛T2 ⎠
0 0 0
Therefore, for the non-interacting case at steady state it holds that m22
Mf() = 0 and ˙ = 0, implying that for this particular case the steady
state and the thermodynamical equilibrium are the equivalent. A ⎛ ⎞
0 0 0 0
feasible solution for both equations is f() = 0.
⎜0 0 0 0 ⎟
If the driving forces are considered to be LT , where L ∈ Rpס , ⎜ ⎟
then at thermodynamical equilibrium it also holds that LT = 0. ⎜ T2 ⎟
J ()L = ⎜ 0 0 0
T
− ⎟ = −L T
()J T . (25)
Therefore, it is not unreasonable to assume that the vector field ⎜ m2 ⎟
⎝ ⎠
f, that contains the kinetic expressions for reaction, transport, T2
0 0 0
motion and mechanical phenomena taking place within the sys- m2
tem, depends explicitly on the driving forces. Thus, it is considered
the following assumption with respect to the structure of the inter- Note that the eigenvalues of R ()LT are 0, 0, 2T1 T2 ,
˛T2
, while
m2
nal phenomena carried out inside system , i.e., the structure of the T
2
term Mf() in Eq. (3). the eigenvalues of J are ()LT 0, 0, ± m2 i
. The decomposition
2
Assumption 1. Given the symmetric positive definite matrix directly identifies dissipative and conservative components of the
() : Rpס −→ Rp×p and the constant matrices L, we assume that system, which is further investigated below. Eqs. (22) and (23) are
f depends only on the conjugated forces as follows instrumental to obtain an entropic analogue representation of PCH
systems described in Eqs. (26) and (27) as shown in the following
f () = ()LT . (21) section.
22 J.P. García-Sandoval et al. / Journal of Process Control 51 (2017) 18–26
3. Entropy based representation analogue to PH Also, note that for a thermo-mechanical system that does not
representation interact with the surroundings, i.e., g(, s ) = 0, and is initially out
of equilibrium, its total energy remains constant. Hence, a PCH rep-
3.1. Port-controlled Hamiltonian (PCH) systems resentation based on total energy may fail to identify the dissipative
structures. However in this case, the entropy will be increasing until
Network modeling of lumped-parameter physical systems with the system reaches the equilibrium. The opposite of the entropy
independent storage elements leads to a special class of structured (the ectropy) may be used as a storage function as suggested in
models called port-controlled Hamiltonian (PCH) systems [9] [10]. At first sight it might seem difficult to decompose the vec-
⎧ tor field f and the matrix M to identify the matrices L, J, R, and .
⎪
⎪ ∂H One possible approach to compute the desired realization is given
⎨ ẋ = [J(x) − R(x)] ∂x (x) + g(x)u
H: (26) below and illustrated in the following section.
⎪
⎪
⎩ y = g T (x) ∂H (x) 1. Given a thermo-mechanical system, if it already has the structure
∂x
of Eq. (3) then go to step 3, otherwise, if the system is described
where x ∈ Rn are the energy variables, the smooth Hamiltonian by a set of ordinary differential equations
function H(x) : Rn → R represents the total stored energy and
u, y ∈ Rm are the port power variables. The port variables u and ẋ = (x) + ϕ(x)F, (31)
y are conjugated variables, in the sense that their duality prod-
uct defines the power flows exchanged with the environment of
where x is a set or subset of the extensive and motion properties
Ni , Ui , Vi , zi , mi vi for each subsystem i = 1, 2, . . ., n, first define
the system, for instance currents and voltages in electrical circuits ˇ
or forces and velocities in mechanical systems. The interconnec-
a diffeomorphism = (x), such that ∈ R is a set or subset
of Ni , Ei + W , Vi , zi , mi vi for each subsystem i = 1, 2,
tion structure is captured in the n × n skew-symmetric matrix / i ij
j=
J(x) =− JT (x) and the n × m matrix g(x), while R(x) = RT (x) ≥ 0 rep- . . ., n and based on Eq. (10) identify its corresponding conjugated
resents the dissipation, all these matrices depend smoothly on the forces, . Then transform system (31) as
state x.
Evaluating the rate of change of the total energy we obtain ∂ ∂
˙ = (x) + ϕ(x)F
∂x ∂x
T
d ∂H ∂H
H=− (x) R(x) (x) + uT y, (27)
dt ∂x ∂x and define g(, s ) = ∂ ϕ(x).
∂x
2. Identify p, the number of thermo-mechanical phenomena car-
where the first term on the right-hand side (which is non-positive) ried out inside the system. Then, by analyzing the term ∂ (x),
∂x
represents the dissipation due to the resistive (friction) elements find a matrix M ∈ Rˇ×p and a vector f : Rˇ → Rp such that
in the system. Mf () = ∂ (x).
∂x
3. Compute the conditions such that f() = 0. In most physical cases,
3.2. Entropy-based representation these conditions are precisely LT = 0, therefore from here it is
easy to identify the matrix L, and consequently matrix ().
Considering Eqs. (21) and (23) and Assumption 1, system in 4. Compute the internal entropy production, ˙ = T Mf().
(3) is equivalent to The terms associated to the conservative phenomena, i.e.,
T J ()LT , will cancel out, while the remaining terms appearing
˙ = (R + J) ()LT + g(, s )F, (28)
in ˙ = T R ()LT define the number of dissipative phenomena.
while the internal entropy production becomes ˙ = 5. Compute the matrices J and R.
T (R + J) ()LT . However, using Eq. (23), the internal entropy
production reduces to ˙ = T R ()LT ≥ 0, therefore matrix R can 4. Case studies
be associated to phenomena that produce entropy, while matrix J is
associated with reversible or isentropic phenomena. The following To illustrate how one can outline dissipative and conservative
theorem presents an entropic analogue representation to a PCH phenomena of a given process using the proposed construction,
representation of system (3), where instead of using energy or we consider two case studies: a pendulum immersed in an incom-
power, the entropy is considered as the potential. pressible liquid bath; and a gas–piston system similar to the one
described in Eq. (7) but with chemical reactions taking place in
Theorem 2. Consider the general balance system (3) together with the gas phase. A different case study is presented in a previous
Assumption 1. Given the entropy gradient definition (13) and Eq. (28), contribution [16].
it is possible to represent system as
!
˙ = (R + J) ()LT ∇ S() + g(, s )F 4.1. Adiabatic liquid-pendulum system
E: (29)
y = g T (, s )∇ S() Consider a pendulum immersed in an incompressible liquid
bath as shown in Fig. 2. Typically, pendulum models are based on
and the entropy dynamics can be rewritten as mechanical energy, i.e.,
d ˙ =ω
S = [∇ S()]T R ()LT ∇ S() + F T y. (30)
dt
mlω̇ = −mg sin( ) − ˛lω +
System (29) and Eq. (30) are the entropic analogue versions of l
the PCH system (26) and Eq. (27). However in this case, we have where , ω and are the angular position and velocity and
[∇ S()] R ()LT ∇ S() ≥ 0.
T the torque applied, respectively, while the parameters m, l, g
and ˛ are the pendulum mass and length and the gravity and
For instance, using matrices (24) and (25) and vector (7), the friction constants. When the pendulum is in vacuum, the mechan-
gas–piston model has an equivalent representation to system (29). ical energy remains constant. However, when the pendulum is
J.P. García-Sandoval et al. / Journal of Process Control 51 (2017) 18–26 23
J ()LT are {0, 0, ±i(T2 /m2 l2 )}. The number of non zero eigen- where cv1 and u1,0 are the molar heat capacity and reference inter-
values for both these structures identifies directly the number of nal energy vectors at temperature T0 , respectively.
dissipative and conservative phenomena in the process, respec- In order to have a thermodynamically consistent model, rate of
tively. Hence, by the proposed approach, it is possible to compute reaction must be such that the reaction entropy production
a representation that outlines directly dissipative and conservative
phenomena. T
rxn = −V r
T
4.2. Adiabatic gas–piston reacting system is positive definite. The reaction affinity A = T (in Energy/mole),
commonly used in the literature (see for instance [18]), as originally
Consider an adiabatic gas–piston system similar to the one proposed by Oster et al. [17] can be expressed as the differ-
described above with n ≥ k + l chemical species, X1 , X2 , . . ., Xn , and ence between the direct affinity Ad = T A and the reverse affinity
the reversible chemical reaction Ar = T B, i.e. A = Ar − Ad . In general, the rate of reaction, r(), is
a nonlinear function of the intensive properties. Thermodynamic
a1 X1 + a2 X2 + · · · + ak Xk b1 Xk+1 + b2 Xk+2 + · · · + al Xk+l (37)
expressions for the rate of reaction such that the kinetics is ther-
is taking place within the system. The first k species participate in modynamically consistent, i.e., such that r = 0 for A = 0, have been
the reaction as reactants (or products in the reverse direction) with proposed in [19,20]. These kinetic expressions have the following
stoichiometric coefficients ai > 0, i = 1, 2, . . ., k, respectively, while form
the remaining l compounds are the products (or reactants in the
reverse direction) with stoichiometric coefficients bi > 0, i = 1, 2, . . ., r= () r + − r − , (39)
l. If n > k + l, the remaining n − k − l species are considered as inert
with
compounds. Under the ideal gas assumption, the adiabatic model
takes the form: Ad Ar
r + = exp , r − = exp , (40)
Rg T Rg T
• Subsystem 1: Balance equations for the moles vector, N1 =
col N1,1 , . . ., N1,n , internal energy, U1 , and volume, V1 , of the the dimensionless driving forces of the reaction in each direction,
gas while is a positive definite function that can be interpreted as a
rate of reaction “conductivity”. Note that the reaction rate (39) can
Ṅ1 = V1 r, be rewritten as
A
U̇1 = (T2 − T1 ) − Av2 P1 , r = −ϑ , (41)
T
V̇1 = Av2 .
where
• Subsystem 2: Balance equations for the internal energy, U2 , posi- sinh −A
tion, z2 , and velocity, v2 , of the piston () Ad + Ar 2Rg T
ϑ= exp −A
, (42)
Rg 2Rg T
2Rg T
U̇2 = (T2 − T1 ) + ˛v22 ,
−A
Ad +Ar sinh 2R
gT
ż2 = v2 , ϑ > 0 since () exp 2Rg T
> 0 and −A ≥ 1 for all
2Rg T
m2 v̇2 = AP 1 − Fext − m2 g − ˛v2 , A ∈ R. Therefore, the reaction entropy production becomes rxn =
2
Vϑ A/T > 0 for A =
/ 0. The total entropy change is expressed as
T
T2
number of chemical species, i.e. 1 = 1 ··· 1 .
1×n
3
In the present work, we consider only one reaction, hence will have dimension
n × 1 throughout. This can be generalized to systems of m reactions, in which case
Define the following
change of variables: =
would be of dimension n × m and r would be a column vector of dimension m. col N1 , U1 + W21 , E2 + W12 , z2 , v2 . Thus, the dynamics of
J.P. García-Sandoval et al. / Journal of Process Control 51 (2017) 18–26 25
the system can be expressed in compact form as in Eq. (3): Using matrices (47) and (48) and vector (46), the reacting
representation to system (29).
gas–piston model has an equivalent
˛T2
The eigenvalues of R ()LT are 0, . . ., 0, V1 ϑT , 2T1 T2 , ,
m2
T
2
while the eigenvalues of J ()LT are 0, . . .0, ± m2 i . The number
2
of non zero eigenvalues in both structures identifies directly the
number of dissipative and conservative phenomena.
5. Conclusions
References
[1] J.C. Willems, Dissipative dynamical systems. Part I: general theory, Arch.
Ration. Mech. Anal. 45 (5) (1972) 321–351.
therefore the driving force vector, f(), for this particular model is
[2] O.J. Rojas, J. Bao, P.L. Lee, On dissipativity, passivity and dynamic operability of
similar to Eq. (21). Performing the decomposition of the matrix M nonlinear processes, J. Process Control 18 (5) (2008) 515–526.
with the matrices [3] R. Ortega, A.J. van der Schaft, I. Mareels, B. Maschke, Putting energy back in
control, IEEE Control Syst. Mag. 21 (2) (2001) 18–33.
[4] A. Favache, D. Dochain, Thermodynamics and chemical systems stability: the
CSTR case study revisited, J. Process Control 19 (3) (2009) 371–379.
[5] D. Jeltsema, J.M.A. Scherpen, Multidomain modeling of nonlinear networks
and systems: energy- and power-based perspectives, IEEE Control Syst. Mag.
29 (4) (2009) 28–59.
[6] B.E. Ydstie, A.A. Alonso, Process systems and passivity via the Clausius–Planck
inequality, Syst. Control Lett. 30 (5) (1997) 253–264.
[7] K.R. Jillson, B.E. Ydstie, Process networks with decentralized inventory and
flow control, J. Process Control 17 (5) (2007) 399–413.
[8] H. Ramirez, B. Maschke, D. Sbarbaro, Irreversible port-Hamiltonian systems: a
general formulation of irreversible processes with application to the CSTR,
the conditions (23) are satisfied with Chem. Eng. Sci. 89 (15) (2013) 223–234.
[9] R. Ortega, A. van der Schaft, B. Maschke, G. Escobar, Interconnection and
damping assignment passivity-based control of port-controlled Hamiltonian
systems, Automatica 38 (4) (2002) 585–596.
[10] H. Hoang, F. Couenne, C. Jallut, Y.L. Gorrec, The port Hamiltonian approach to
modeling and control of continuous stirred tank reactors, J. Process Control 21
(10) (2011) 1449–1458.
[11] F. Dörfler, J.K. Johnsen, F. Allgöwer, An introduction to interconnection and
damping assignment passivity-based control in process engineering, J.
Process Control 19 (9) (2009) 1413–1426.
[12] K.M. Hangos, J. Bokor, G. Szederkényi, Hamiltonian view on process systems,
(47) AIChE J. 48 (8) (2001) 1819–1831.
[13] A. Favache, D. Dochain, B. Maschke, An entropy-based formulation of
irreversible processes based on contact structures, Chem. Eng. Sci. 65 (18)
(2010) 5204–5216.
[14] M. Nič, J. Jirát, B. Koš, IUPAC Compendium of Chemical Terminology,
International Union of Pure and Applied Chemistry (IUPAC), Chicago, 2009.
[15] S. Kjelstrup, D. Bedeaux, E. Johannessen, J. Gross, Non-Equilibrium
Thermodynamics for Engineers, World Scientific, New Jersey, 2010.
[16] J.P. García-Sandoval, N. Hudon, D. Dochain, Dissipative and conservative
structures for thermo-mechanical systems, in: Proceeding of the 9th
International Symposium on Advanced Control of Chemical Processes, IFAC,
(48) Whistler, British Columbia, Canada, 2015, pp. 1058–1065.
26 J.P. García-Sandoval et al. / Journal of Process Control 51 (2017) 18–26
[17] G.F. Oster, A.S. Perelson, A. Katchalsky, Network thermodynamics: dynamic [19] N.H. Hoang, D. Dochain, On an evolution criterion of homogeneous
modelling of biophysical systems, Q. Rev. Biophys. 6 (1) (1973) multi-component mixtures with chemical transformation, Syst. Control Lett.
1–134. 62 (2) (2013) 170–177.
[18] F. Couenne, C. Jallut, B. Maschke, M. Tayakout, P. Breedveld, Structured [20] J.P. García-Sandoval, V. González-Álvarez, C. Calderón, Stability analysis and
modeling for processes: a thermodynamical network theory, Comput. Chem. passivity properties for a class of chemical reactors: internal entropy
Eng. 32 (6) (2008) 1120–1134. production approach, Comput. Chem. Eng. 75 (6) (2015) 184–195.