port-hamiltonian systems: from geometric network modeling
TRANSCRIPT
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 1
Port-Hamiltonian Systems: fromGeometric Network Modeling to Control
Arjan van der Schaft, University of Groningen
Dimitri Jeltsema, Delft University of Technology
In collaboration with Bernhard Maschke, Romeo Ortega,
Jacquelien Scherpen, Stefano Stramigioli, Alessandro Macchelli,
Peter Breedveld, Hans Zwart, Morten Dalsmo, Guido Blankenstein,
Damien Eberard, Goran Golo, Ram Pasumarthy, Javier Villegas,
Gerardo Escobar, Guido Blankenstein, Aneesh Venkatraman,
Rostyslav Polyuga ..
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 2
From Port-Based Network Modeling to
Port-Hamiltonian Systems
1. From junction structures to Dirac structures
2. Port-Hamiltonian systems
3. Examples
4. Input-state-output port-Hamiltonian systems
5. Multi-modal physical systems
6. Representations and transformations
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 3
Port-based network modeling of lumped-parameter
physical systems leads to a representation of a multi-physics
system as a graph, where each edge is decorated with a (vector)
pair of flow variables f ∈ Rm, and effort variables e ∈ R
m.
H1 fH1
eH1
0
R1
1
IC : f = 0
T H2
H3 0fR2
eR2
R2
Figure 1: Port-based network modeling; bond graphs of Paynter
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 4
Each vertex corresponds to one of the following ideal elements:
• Energy-storing elements H:
x = fH
eH = ∂H∂x
(x)
• Power-dissipating elements R:
R(fR, eR) = 0, eTRfR ≥ 0
• Power-conserving elements: transformers T, gyrators GY,
ideal constraints IC.
• 0- and 1-junctions 0, 1:
e1 = e2 = · · · = ek, f1 + f2 + · · · + fk = 0
f1 = f2 = · · · = fk, e1 + e2 + · · · + ek = 0
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 5
• Transformers, gyrators, etc., are energy-routing devices, and
may correspond to exchange between different types of energy.
• Ideal powerless constraints such as kinematic constraints.
• 0- and 1-junctions correspond to basic conservation laws such
as Kirchhoff’s laws.
All power-conserving elements have the following properties in
common. They are described by linear equations:
Ff +Ee = 0, f, e ∈ Rl
satisfying
eT f = e1f1 + e2f2 + · · · + elfl = 0,
rank[
F E]
= l
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 6
A geometric definition of port-based network models
Take all power-conserving elements
(T, G, IC, 0- and 1-junctions)
together in a single power-conserving interconnection structure:
H1fH1
eH1
0
R1
1
IC : f = 0
T H2
H3 0fR2
eR2
R2
D
Figure 2: Power-conserving interconnection structure
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 7
Geometric definition:
Definition 1 A (constant) Dirac structure on a finite-dimensional
space V is a subspace
D ⊂ V × V∗
such that
(i) eT f = 0 for all (f, e) ∈ D,
(ii) dimD = dimV.
The elements of V are denoted as flows f , and of V ∗ as efforts e.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 8
Equivalent, more general, definition of Dirac structure
Power is defined by
P = e(f) =:< e | f >= eT f, (f, e) ∈ V × V∗.
where the linear space V is called the space of flows f (e.g.
currents), and V∗ the space of efforts e (e.g. voltages).
Symmetrized form of power is the indefinite bilinear form , on
V × V∗:
(fa, ea), (f b, eb) := < ea | f b > + < eb | fa >,
(fa, ea), (f b, eb) ∈ V × V∗.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 9
Definition 2 A (constant) Dirac structure is a subspace
D ⊂ V × V∗
such that
D = D⊥,
where ⊥ denotes orthogonal complement with respect to the
bilinear form ,.
Key element in the definition of port-Hamiltonian systems
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 10
An k dimensional storage element is determined by a
k-dimensional state vector x = (x1, · · · , xk) and a Hamiltonian
H(x1, · · · , xk) (energy storage), defining the lossless system
xi = −fHi, i = 1, · · · , keHi = ∂H
∂xi(x1, · · · , xk)
ddtH = −
∑ki=1 fHieHi
Such a k- dimensional storage component is written in vector
notation as:
x = −fH
eH = ∂H∂x
(x)
The elements of x are called energy variables, those of ∂H∂x
(x)
co-energy variables.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 11
Geometric definition of a port-Hamiltonian system
H(x) DfH
eH
fP
eP
fR eR
The dynamics is given by the DAEs
(−x(t) = fH(t),∂H
∂x(x(t)) = eH(t), fR(t), eR(t), fP (t), eP (t)) ∈ D(x(t)), t ∈ R
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 12
Basic property
dH
dt(x(t)) =
∂H
∂x(x(t))x(t) = −eT
H(t)fH(t) = eTR(t)fR(t)+eT
P (t)fP (t) ≤ eTP (t)fP (t)
Example: The ubiquitous mass-spring-damper system:
Two storage elements:
• Spring Hamiltonian Hs(q) = 12kq
2 (potential energy)
q = fs = velocity
es = dHs
dq(q) = kq = force
• Mass Hamiltonian Hm(p) = 12mp2 (kinetic energy)
p = fm = force
em = dHm
dp(p) = p
m= velocity
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 13
interconnected by the Dirac structure
fs = em = y, fm = −es + u
(power-conserving since fses + fmem = uy) yields the
port-Hamiltonian system
q
p
=
0 1
−1 0
∂H∂q
(q, p)
∂H∂p
(q, p)
+
0
1
u
y =[
0 1]
∂H∂q
(q, p)
∂H∂p
(q, p)
with
H(q, p) = Hs(q) +Hm(p)
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 14
Energy-dissipation is included by adding an extra port to the
Dirac structure, terminated by power-conserving relations:
R(fR, eR) = 0, eTRfR ≤ 0
Example: For the mass-spring system, the addition of the damper
ed = −dRdfd
= −cfd, R(fd) =1
2cf2
d (Rayleigh function)
via the extended interconnection (Dirac structure)
fs = em = −fd = y, fm = es − ed + u
leads to the mass-damper-spring system
q
p
= (
0 1
−1 0
−
0 0
0 c
)
∂H∂q
(q, p)
∂H∂p
(q, p)
+
0
1
u
y =[
0 1]
∂H∂q
(q, p)
∂H∂p
(q, p)
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 15
Example: Electro-mechanical systems
q
p
ϕ
=
0 1 0
−1 0 0
0 0 − 1R
∂H∂q
(q, p, φ)
∂H∂p
(q, p, φ)
∂H∂ϕ
(q, p, φ)
+
0
0
1
V, I =
∂H
∂ϕ(q, p, φ)
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 16
Coupling electrical/mechanical domain via Hamiltonian H(q, p, φ).
H(q, p, ϕ) = mgq +p2
2m+
ϕ2
2k1(1 − qk2
)
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 17
Example: LC circuits
Two inductors with magnetic energies H1(ϕ1), H2(ϕ2) (ϕ1 and ϕ2
magnetic flux linkages), and capacitor with electric energy H3(Q)
(Q charge).
V denotes the voltage of the source.
Q
C
ϕ1 ϕ2
V
L1 L2
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 18
Hamiltonian equations for the components of the LC-circuit:
Inductor 1 ϕ1 = f1 (voltage)
(current) e1 = ∂H1
∂ϕ1
Inductor 2 ϕ2 = f2 (voltage)
(current) e2 = ∂H2
∂ϕ2
Capacitor Q = f3 (current)
(voltage) e3 = ∂H3
∂Q
All are port-Hamiltonian systems with J = 0 and g = 1.
If the elements are linear then the Hamiltonians are quadratic, e.g.
H1(ϕ1) = 12L1
ϕ21, and ∂H1
∂ϕ1
= ϕ1
L1
= current , etc.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 19
Kirchhoff’s interconnection laws in f1, f2, f3, e1, e2, e3, f = V, e = I are
−f1−f2−f3e
=
0 0 1 −1
0 0 −1 0
−1 1 0 0
1 0 0 0
e1
e2
e3
f
Substitution of eqns. of components yields port-Hamiltonian
system
ϕ1
ϕ2
Q
=
0 0 −1
0 0 1
1 −1 0
∂H∂ϕ1
∂H∂ϕ2
∂H∂Q
+
1
0
0
f
e = ∂H∂ϕ1
with H(ϕ1, ϕ2, Q) := H1(ϕ1) +H2(ϕ2) +H3(Q) total energy.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 20
However, this class of port-Hamiltonian systems is not closed
under interconnection:
Figure 3: Capacitors and inductors swapped
Interconnection leads to algebraic constraints between the state
variables Q1 and Q2.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 21
Network modeling is prevailing in modeling and simulation of
lumped-parameter physical systems (multi-body systems, electrical
circuits, electro-mechanical systems, hydraulic systems, robotic
systems, etc.), with many advantages:
• Modularity and flexibility. Re-usability (‘libraries’).
• Multi-physics approach.
• Suited to design/control.
Disadvantage of network modeling: it generally leads to a large set
of DAEs, seemingly without any structure.
Port-based modeling and port-Hamiltonian system theory
identifies the underlying structure of network models of
physical systems, to be used for analysis, simulation and
control.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 22
Example of ideal constraints: Mechanical systems with
kinematic constraints
Ideal constraints on the generalized velocities q:
AT (q)q = 0.
This can be modelled as the composition of a transformer T and
an ideal constraint IC
q
F = A(q)λ
T
v = AT (q)q
λ
IC v = 0
Figure 4: Kinematic constraints
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 23
This leads to constrained Hamiltonian equations
q = ∂H∂p
(q, p)
p = −∂H∂q
(q, p) +A(q)λ+B(q)f
0 = AT (q)∂H∂p
(q, p)
e = BT (q)∂H∂p
(q, p)
with H(q, p) total energy, and λ the Lagrange multipliers.
The Dirac structure is defined by the symplectic form on the phase
space T ∗Q together with constraints AT (q)q = 0 and force matrix
B(q).
This can be systematically extended to general multi-body
systems, where the kinematic constraints are more generally given
by so-called kinematic pairs.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 24
Example Unicycle
The rolling-without-slipping kinematic constraints are
x = ψ cosϕ, y = ψ sinϕ
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 25
Example of a transformer
Figure 5: Conversion from translational into rotational kinetic en-
ergy; and vice versa.
Transformer from (F, v) to (τ, ω); transformer ratio 2πl.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 26
Example of a gyrator
Figure 6: Port-based model of a DC motor
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 27
Figure 7: A gyrator
Gyrator from (V, I) to (τ, ω): τ = KI, V = −Kω
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 28
For many systems, especially those with 3-D mechanical
components, the interconnection structure will be modulated by
the energy or geometric variables.
This leads to the notion of non-constant Dirac structures on
manifolds.
Definition 3 Consider a smooth manifold M . A Dirac structure on
M is a vector subbundle D ⊂ TM ⊕ T ∗M such that for every x ∈M
the vector space
D(x) ⊂ TxM × T ∗xM
is a Dirac structure as before.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 29
Mathematical intermezzo: Jacobi identity and
holonomic constraints
There is an important notion of integrability of a Dirac structure
on a manifold.
Definition 4 A Dirac structure D on a manifold M is called
integrable if
< LX1α2 | X3 > + < LX2
α3 | X1 > + < LX3α1 | X2 >= 0
for all (X1, α1), (X2, α2), (X3, α3) ∈ D.
For constant Dirac structures the integrability condition is
automatically satisfied.
The Dirac structure D defined by the canonical symplectic
structure and kinematic constraints AT (q)q = 0 satisfies the
integrability condition if and only if the constraints are holonomic;
that is, can be integrated to geometric constraints φ(q) = 0.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 30
Examples
(a) Let J be a (pseudo-)Poisson structure on M , defining a
skew-symmetric mapping J : T ∗M → TM . Then
graph J ⊂ T ∗M ⊕ TM is a Dirac structure.
Integrability is equivalent to the Jacobi-identity for the Poisson
structure.
(b) Let ω be a (pre-)symplectic structure on M , defining a
skew-symmetric mapping ω : TM → T ∗M . Then
graph ω ⊂ TM ⊕ T ∗M is a Dirac structure.
Integrability is equivalent to the closedness of the symplectic
structure.
(c) Let K be a constant-dimensional distribution on M , and let
annK be its annihilating co-distribution. Then
K × annK ⊂ TM ⊕ T ∗M is a Dirac structure.
Integrability is equivalent to the involutivity of distribution K.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 31
Input-state-output port-Hamiltonian systems:
Particular case is a Dirac structure D(x) ⊂ TxX × T ∗xX × F × F∗
given as the graph of the skew-symmetric map
fx
eP
=
−J(x) −g(x)gT (x) 0
ex
fP
,
leading (fx = −x, ex = ∂H∂x
(x)) to a port-Hamiltonian system as
before
x = J(x)∂H∂x
(x) + g(x)fP , x ∈ X , fP ∈ Rm
eP = gT (x)∂H∂x
(x), eP ∈ Rm
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 32
Power-dissipation is included by terminating some of the ports by
static resistive elements
fR = −F (eR), where eTRF (eR) ≥ 0, for all eR.
d
dtH ≤ eT
P fP
This leads, e.g. for linear damping, to input-state-output
port-Hamiltonian systems in the form
x = [J(x) −R(x)]∂H∂x
(x) + g(x)fP
eP = gT (x)∂H∂x
(x)
where J(x) = −JT (x), R(x) = RT (x) ≥ 0 are the interconnection and
damping matrices, respectively.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 33
Multi-modal physical systems
Physical systems with switching constraints and/or switching
network topology: locomotion behavior of robots and animals,
power converters with switches and diodes, systems with inequality
constraints.
Many multi-modal physical systems can be formulated as
port-Hamiltonian systems with switching Dirac structure.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 34
Example 5 (Boost converter) The circuit consists of an
inductor L with magnetic flux linkage φL, a capacitor C with
electric charge qC and a resistance load R, together with a diode
and an ideal switch S, with switch positions s = 1 (switch closed)
and s = 0 (switch open).
The diode is modeled as an ideal diode:
vDiD = 0, vD ≤ 0, iD ≥ 0. (1)
we Port-Hamiltonian model (with H = 12Cq2C + 1
2Lφ2
L):
qC
φL
=
− 1
R1 − s
s− 1 0
∂H∂qC
= qC
C
∂H∂φL
= φL
L
+
0
1
E +
siD
(s− 1)vD
I = φL
L
(2)
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 35
Example 6 (Bouncing pogo-stick) Consider a vertically
bouncing pogo-stick consisting of a mass m and a massless foot,
interconnected by a linear spring (stiffness k and rest-length x0)
and a linear damper d.
m
kd
g
x
y sum of forces
zero on foot
spring/damper
in series
foot fixed
to ground
spring/damper
parallel
Figure 8: Model of a bouncing pogo-stick: definition of the variables
(left), situation without ground contact (middle), and situation with
ground contact (right).
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 36
The mass can move vertically under the influence of gravity g until
the foot touches the ground. The states of the system are x
(length of the spring), y (height of the bottom of the mass), and p
(momentum of the mass, defined as p := my). Furthermore, the
contact situation is described by a variable s with values s = 0 (no
contact) and s = 1 (contact). The Hamiltonian of the system
equals
H(x, y, p) =1
2k(x− x0)
2 +mg(y + y0) +1
2mp2 (3)
where y0 is the distance from the bottom of the mass to its center
of mass.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 37
When the foot is not in contact with the ground total force on the
foot is zero (since it is massless), which implies that the spring and
damper force must be equal but opposite. When the foot is in
contact with the ground, the variables x and y remain equal, and
hence also x = y.
For s = 0 (no contact) the system is described by the
port-Hamiltonian system
ddt
y
p
=
0 1
−1 0
mg
pm
−dx = k(x− x0)
(4)
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 38
while for s = 1 the port-Hamiltonian description is
d
dt
x
y
p
=
0 0 1
0 0 1
−1 −1 −d
k(x− x0)
mgpm
(5)
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 39
The two situations can be taken together into one
port-Hamiltonian system with variable Dirac structure:
d
dt
x
y
p
=
s−1d
0 s
0 0 1
−s −1 −sd
k(x− x0)
mgpm
(6)
The conditions for switching of the contact are functions of the
states, namely as follows: contact is switched from off to on when
y − x crosses zero in the negative direction, and contact is switched
from on to off when the velocity y − x of the foot is positive in the
no-contact situation, i.e. when pm
+ kd(x− x0) > 0.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 40
In both examples above we obtain a switching port-Hamiltonian
system, specified by a Dirac structure Ds depending on the switch
position s ∈ 0, 1n (here n denotes the number of independent
switches), a Hamiltonian H : X → R and a resistive structure R.
Furthermore, every switching may be internally induced (like in the
case of a diode in an electrical circuit or an impact in a mechanical
system) or externally triggered (like an active switch in a circuit or
mechanical system).
Problems
• Well-posedness questions: e.g., systems with reverse Coulomb
friction may have multiple solutions.
• Computation of the next mode may be difficult.
• Collision rules.
• Investigation of limit cycles/periodic orbits.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 41
REPRESENTATIONS AND TRANSFORMATIONS
Dirac structures, and therefore port-Hamiltonian systems, admit
different representations, with different properties for simulation
and control.
Let D ⊂ V × V∗, with dimV = n, be a Dirac structure.
1. Kernel and Image representation
D = (f, e) ∈ V × V∗ | Ff +Ee = 0, for n× n matrices F and E
(possibly depending on x) satisfying
(i) EFT + FET = 0,
(ii) rank[F...E] = n.
It follows that D can be also written in image representation as
D = (f, e) ∈ V × V∗ | f = ETλ, e = FTλ, λ ∈ Rn.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 42
2. Constrained input-output representation
Every Dirac structure D can be written as
D = (f, e) ∈ V × V∗ | f = Je+Gλ,GT e = 0
for a skew-symmetric matrix J and a matrix G such that
im G = f | (f, 0) ∈ D.
Furthermore, kerJ = e | (0, e) ∈ D.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 43
3. Hybrid input-output representation
Let D be given by square matrices E and F as in 1. Suppose rank
F = m(≤ n). Select m independent columns of F , and group them
into a matrix F1. Write (possibly after permutations) F = [F1
...F2],
and correspondingly E = [E1
...E2], f =
f1
f2
, e =
e1
e2
.
Then the matrix [F1
...E2] is invertible, and
D =
f1
f2
,
e1
e2
∣∣∣∣∣∣
f1
e2
= J
e1
f2
with J := −[F1
...E2]−1[F2
...E1] skew-symmetric.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 44
4. Canonical coordinates
For simplicity take F × F∗ to be void (no external ports).
If the Dirac structure on X is integrable then there exist
coordinates (q, p, r, s) for X such that
D(x) = (fq, fp, fr, fs, eq, ep, er, es) ∈ TxX × T ∗xX
fq = −ep, fp = eq
fr = 0, 0 = es
Hence the port-Hamiltonian system on X takes the form
q = ∂H∂p
(q, p, r, s)
p = −∂H∂q
(q, p, r, s)
r = 0
0 = ∂H∂s
(q, p, r, s)
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 45
DAE representation of port-Hamiltonian systems
Represent the Dirac structure D in kernel representation as
D = (fx, ex, f, e) | Fx(x)fx +Ex(x)ex + F (x)f + E(x)e = 0,
with
(i) ExFTx + FxE
Tx +EFT + FET = 0,
(ii) rank [Fx
...Ex
...F...E] = dim(X × F).
Since the flows fx and efforts ex corresponding to the
energy-storing elements are given respectively as fx = −x and
ex = ∂H∂x
(x), it follows that the system is described by the set of
differential-algebraic equations (DAEs)
Fx(x(t))x(t) = Ex(x(t))∂H
∂x(x(t)) + F (x(t))f(t) + E(x(t))e(t)
with f, e the external port variables.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 46
Mixture of constrained and hybrid input-output representation
By a hybrid input-output partition of the vector of port flows
(f, e) ∈ F × F∗ as (u, y) we can represent any port-Hamiltonian
system in constrained form as
x = J(x)∂H∂x
(x) +G(x)λ+ g(x)u, x ∈ X , u ∈ Rm
0 = GT (x)∂H∂x
(x) +D(x)u,
y = gT (x)∂H∂x
(x), y ∈ Rm
where
J(x) = −JT (x), D(x) = −DT (x)
This is the form as encountered before in the case of kinematic
constraints.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 47
Intermezzo: Relation with classical Hamiltonian equations
x = J(x)∂H
∂x(x)
with constant or ’ integrable’J- matrix admits coordinates
x = (q, p, r) in which
J =
0 I 0
−I 0 0
0 0 0
,
q = ∂H∂p
(q, p, r)
p = −∂H∂q
(q, p, r)
r = 0
For constant or integrable Dirac structure one gets Hamiltonian
DAEs
q = ∂H∂p
(q, p, r, s)
p = −∂H∂q
(q, p, r, s)
r = 0
0 = ∂H∂s
(q, p, r, s)
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 48
Recall of Hamiltonian dynamical systems from analytical
mechanics
Historically, the Hamiltonian approach starts from the principle of
least action, via the Euler-Lagrange equations and the Legendre
transformation, towards the Hamiltonian equations of motion.
The standard Euler-Lagrange equations are given as
d
dt
(∂L
∂q(q, q)
)
− ∂L
∂q(q, q) = τ,
where q = (q1, . . . , qk)T are generalized configuration coordinates for
the system with k degrees of freedom, the Lagrangian L equals the
difference T − P between kinetic co-energy T and potential energy
P , and τ = (τ1, . . . , τk)T is the vector of generalized forces acting on
the system.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 49
The vector of generalized momenta p = (p1, . . . , pk)T is defined as
p =∂L
∂q=∂T
∂q
By defining the state vector (q1, . . . , qk, p1, . . . , pk)T the k
second-order equations transform into 2k first-order equations
q = ∂H∂p
(q, p)
p = −∂H∂q
(q, p) + τ
where the Legendre transform
H(q, p) = K(q, p) + P (q)
is the total energy of the system.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 50
In standard mechanical systems the kinetic co-energy T is of the
form
T (q, q) =1
2qTM(q)q
where the k× k inertia (generalized mass) matrix M(q) is symmetric
and positive definite for all q. Hence
p = M(q)q
and because of the fact that the kinetic co-energy T is a quadratic
function of the velocities q it equals the kinetic energy
K(q, p) = 12p
TM−1(q)p.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 51
The above equations are called the Hamiltonian equations of
motion, and H is called the Hamiltonian. The state space with
local coordinates (q, p) is called the phase space.
The following energy balance immediately follows:
d
dtH =
∂TH
∂q(q, p)q +
∂TH
∂p(q, p)p =
∂TH
∂p(q, p)τ = qT τ,
expressing that the increase in energy of the system is equal to the
supplied work (conservation of energy).
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 52
A Hamiltonian system with collocated inputs and outputs is more
generally given in the following form
q = ∂H∂p
(q, p) , (q, p) = (q1, . . . , qk, p1, . . . , pk)
p = −∂H∂q
(q, p) +B(q)u, u ∈ Rm,
y = BT (q)∂H∂p
(q, p) (= BT (q)q), y ∈ Rm,
Here B(q) is the input force matrix. In case m < k we speak of an
underactuated system.
By definition of the output y = BT (q)q we again obtain
dH
dt(q(t), p(t)) = uT (t)y(t)
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 53
A major generalization of the class of Hamiltonian systems consists
in considering systems which are described in local coordinates as
x = J(x)∂H∂x
(x) + g(x)u, x ∈ X , u ∈ Rm
y = gT (x)∂H∂x
(x), y ∈ Rm
Here J(x) is an n× n matrix which is skew-symmetric:
J(x) = −JT (x),
and x = (x1, . . . , xn) are local coordinates for an n-dimensional state
space manifold X . We recover the energy-balance
dHdt
(x(t)) = uT (t)y(t). In the previous case we had J =
0 I
−I0
.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 54
Example 7 Consider a rigid body spinning around its center of
mass in the absence of gravity. The energy variables are the three
components of the body angular momentum p along the three
principal axes: p = (px, py, pz), and the energy is the kinetic energy
H(p) =1
2
(
p2x
Ix+p2
y
Iy+p2
z
Iz
)
,
where Ix, Iy, Iz are the principal moments of inertia. Euler’s
equations are
px
py
pz
=
0 −pz py
pz 0 −px
−py px 0
︸ ︷︷ ︸
J(p)
∂H∂px
∂H∂py
∂H∂pz
+ g(p)u, y = gT (p)∂H
∂p
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 55
J(p) is the canonical Lie-Poisson structure matrix on the dual of
the Lie algebra so(3) corresponding to the configuration space
SO(3) of the rigid body.)
Equations arise from the standard (6-dimensional) Hamiltonian
equations by reduction (’symmetry’).
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 56
Large-scale port-Hamiltonian systems, and composition of
Dirac structures
The composition of two Dirac structures with partially shared
variables is again a Dirac structure:
D12 ⊂ V1 × V∗1 × V2 × V∗
2
D23 ⊂ V2 × V∗2 × V3 × V∗
3
V1
V∗1
V2
V∗2
V3
V∗3
D12 D23
︸ ︷︷ ︸D12||D23
Figure 9: Composed Dirac structure
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 57
Af2
Ae2
DA
DB
1f 3
f
1e 3
e
Bf2
Be2
Figure 10: Standard interconnection
fA = −fB ∈ F2
eA = eB ∈ F∗2
The gyrating (or feedback) interconnection
fA = −eB
eB = fB
can be easily transformed to this case.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 58
Thus
DA ‖ DB := (f1, e1, f3, e3) ∈ F1 ×F∗1 ×F3 ×F∗
3 | ∃(f2, e2) ∈ F2 ×F∗2 s.t.
(f1, e1, f2, e2) ∈ DA and (−f2, e2, f3, e3) ∈ DB
Theorem 8 Let DA, DB be Dirac structures (defined with respect
to F1 ×F∗1 ×F2 ×F∗
2 , respectively F2 ×F∗2 × F3 ×F∗
3 and their
bilinear forms). Then DA ‖ DB is a Dirac structure with respect to
the bilinear form on F1 ×F∗1 ×F3 ×F∗
3 .
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 59
Proof
Consider DA, DB defined in matrix kernel representation by
DA = (f1, e1, fA, eA) ∈ F1 ×F∗1 × F2 ×F∗
2 | F1f1 +E1e1 + F2AfA +E2AeA = 0DB = (fB , eB, f3, e3) ∈ F2 × F∗
2 ×F3 × F∗3 | F2BfB +E2BeB + F3f3 + E3e3 = 0
Make use of the following basic fact from linear algebra:
(∃λ s.t. Aλ = b) ⇔ [∀α s.t. αTA = 0 ⇒ αT b = 0]
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 60
Note that DA, DB are alternatively given in matrix image
representation as
DA = im
ET1
FT1
ET2A
FT2A
0
0
DB = im
0
0
ET2B
FT2B
ET3
FT3
Hence, (f1, e1, f3, e3) ∈ DA ‖ DB ⇔ ∃λA, λB such that
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 61
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 62
f1
e1
0
0
f3
e3
=
ET1 0
FT1 0
ET2A ET
2B
FT2A −FT
2B
0 FT3
0 ET3
λA
λB
⇔
⇔ ∀(β1, α1, β2, α2, β3, α3) s.t.
(βT1 α
T1 β
T2 α
T2 β
T3 α
T3 )
ET1 0
FT1 0
ET2A ET
2B
FT2A −FT
2B
0 FT3
0 ET3
= 0,
βT1 f1 + αT
1 e1 + βT3 f3 + αT
3 e3 = 0 ⇔
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 63
⇔ ∀(α1, β1, α2, β2, α3, β3) s.t.
F1 E1 F2A E2A 0 0
0 0 −F2B E2B F3 E3
α1
β1
α2
β2
α3
β3
= 0,
βT1 f1 + αT
1 e1 + βT3 f3 + αT
3 e3 = 0 ⇔
⇔ ∀(α1, β1, α3, β3) ∈ DA ‖ DB , βT1 f1 + αT
1 e1 + βT3 f3 + αT
3 e3 = 0 ⇔
⇔ (f1, e1, f3, e3) ∈ (DA ‖ DB)⊥
Thus DA ‖ DB = (DA ‖ DB)⊥, and so it is a Dirac structure.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 64
Explicit expressions for the composition of two Dirac
structures
Consider Dirac structures DA ⊂ F1 ×F∗1 ×F2 ×F∗
2 ,
DB ⊂ F2 ×F∗2 × F3 ×F∗
3 , given by matrix kernel/image
representations (FA, EA) = ([F1|F2A], [E1|E2A]), respectively
(FB, EB) = ([F2B|F3], [E2B|E3]). Define
M =
F2A E2A
−F2B E2B
(7)
and let LA, LB be matrices with
L = [LA|LB ] , kerL = imM
F = [LAF1|LBF3]
E = [LAE1|LBE3]
is a relaxed matrix kernel/image representation of DA ‖ DB.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 65
This relaxed kernel/image representation can be readily understood
by premultiplying the equations characterizing the composition of
DA with DB
F1 E1 F2A E2A 0 0
0 0 −F2B E2B F3 E3
f1
e1
f2
e2
f3
e3
= 0, (8)
by the matrix L := [LA|LB]. Since LM = 0 this results indeed in the
relaxed kernel representation
LAF1f1 + LAE1e1 + LBF3f3 + LBE3e3 = 0 (9)
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 66
Consequence
The interconnection of a number of port-Hamiltonian systems
(Xi,Di, Hi), i = 1, · · · , k through an interconnection Dirac structure
DI is a port-Hamiltonian system (X ,D, H), with
H = H1 + · · · +Hk,
X = X1 × · · · × Dk
and D the composition of D1, · · · ,Dk,DI.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 67
Example 9 (1-D mechanical system) Consider a spring with
elongation q and energy function Hs(q) = 12kq
2. Let (vs, Fs)
represent the external port through which energy can be exchanged
with the spring, where vs is equal to the rate of elongation
(velocity) and Fs is equal to the elastic force. This
port-Hamiltonian system can be written in kernel representation as
1 1
0 0
−qvs
+
0 0
1 −1
kq
Fs
= 0 (10)
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 68
Similarly we model a moving mass m with scalar momentum p and
kinetic energy Hm(p) = 12p
2 as the port-Hamiltonian system
1 1
0 0
−pFm
+
0 0
1 −1
pm
vm
= 0 (11)
where (Fm, vm) are respectively the external force exerted on the
mass and the velocity of the mass.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 69
The mass and the spring can be interconnected to each other
using the symplectic gyrator
vs
Fm
=
0 1
−1 0
Fs
vm
(12)
Collecting all equations we have obtained a port-Hamiltonian
system with energy variables x = (q, p), total energy
H(q, p) = Hs(q) +Hm(p) and with interconnection port variables
(vs, Fs, Fm, vm). After elimination of the interconnection variables
(vs, Fs, Fm, vm) one obtains the port-Hamiltonian system
1 0
0 1
−q−p
+
0 1
−1 0
kq
pm
= 0 (13)
which is the ubiquitous mass-spring system.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 70
Example: Coupled masses Consider two point masses m1 and m2
which are rigidly linked to each other. When decoupled the masses
are described by the port-Hamiltonian systems
pi = Fi,
vi = pi
mi
i = 1, 2 (14)
with Fi the force exerted on mass mi. Rigid coupling amounts to
F1 = −F2, v1 = v2 (15)
This leads to the port-Hamiltonian system
p1
p2
=
1
−1
λ
0 =[
1 −1]
p1
m1
p2
m2
(16)
where λ = F1 = −F2 now denotes the internal constraint force.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 71
The resulting interconnnected system does not have external ports
anymore. On the other hand, external ports for the interconnected
system can be included by either extending (14) to
pi = Fi + F exti
vi = pi
mi
vexti = pi
mi
i = 1, 2 (17)
with F exti and vext
i denoting the external forces and velocities, or by
modifying the interconnection constraints (15) to e.g.
F1 + F2 + F ext = 0, v1 = v2 = vext, (18)
with F ext and vext denoting the external force exerted on the
coupled masses, respectively the velocity of the coupled masses.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 72
Consider the port-Hamiltonian system
Σ :
x = J(x)∂H∂x
(x) + g(x)u+ b(x)λ
y = gT (x)∂H∂x
(x)
0 = bT (x)∂H∂x
(x)
x ∈ X
The Lagrange multipliers λ can be eliminated by constructing a
matrix b⊥(x) of maximal rank such that
b⊥(x)b(x) = 0
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 73
By premultiplication with b⊥(x) one obtains
Σ :
b⊥(x)x = b⊥(x)J(x)∂H∂x
(x) + b⊥(x)g(x)u
y = gT (x)∂H∂x
(x)
0 = bT (x)∂H∂x
(x)
x ∈ X (19)
This is a kernel representation of the port-Hamiltonian system.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 74
Example 10 (Coupled masses continued) Consider the system
of two coupled masses. Premultiplication of the dynamic equations
by the row vector[
1 1]
yields the equations
p1 + p2 = 0,p1
m1− p2
m2= 0, (20)
which constitutes a kernel representation of the port-Hamiltonian
system.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 75
A more difficult question concerns the possibility to solve for the
algebraic constraints of a port-Hamiltonian system:
0 = bT (x)∂H
∂x(x) (21)
Under constant rank assumptions the set
Xc := x ∈ X | bT (x)∂H
∂x(x) = 0
defines a submanifold of the total state space X ; the constrained
state space. In order that this constrained state space qualifies as
the state space for a port-Hamiltonian system without further
algebraic constraints one needs to be able to restrict the dynamics
of the port-Hamiltonian system to the constrained state space.
This is always possible under the condition that the matrix
bT (x)∂2H
∂x2(x)b(x) (22)
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 76
has full rank, since in this case the differentiated constraint
equations
0 =d
dt(bT (x)
∂H
∂x(x)) = ∗ + bT (x)
∂2H
∂x2(x)b(x)λ (23)
can be always uniquely solved for λ.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 77
Example 11 (Coupled masses continued) Differentiating the
constraint equation p1
m1
− p2
m2
= 0 and using p1 = λ and p2 = −λ one
obtains
(1
m1+
1
m2)λ = 0 (24)
which determines the constraint force λ (to be equal to 0).
Defining the total momentum p = p1 + p2 one obtains the reduced
system p = p1 + p2 = 0.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 78
On the other hand, suppose that the mass m1 is connected to a
linear spring with spring constant k1 and elongation q1 and that the
mass m2 is connected to a linear spring with spring constant k2 and
elongation q2. Then the dynamical equations change into
p1 = −k1q1 + λ and p2 = −k2q2 − λ, and differentiation of the
constraint p1
m1
− p2
m2
= 0 leads to
− k1
m1q1 +
k2
m2q2 + (
1
m1+
1
m2)λ = 0 (25)
which determines the constraint force λ as λ = m1m2
m1+m2
( k1
m1
q1 − k2
m2
q2),
and results in the dynamical equation for the total momentum p
given by
p = −k1q1 − k2q2 (26)
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 79
Consider the equations of a general mechanical system subject to
kinematic constraints. The constrained Hamiltonian equations
define a port-Hamiltonian system, with respect to the Dirac
structure D (in constrained input-output representation)
D = (fS , eS , fC , eC) | 0 =[
0 AT (q)]
eS , eC =[
0 BT (q)]
eS ,
−fS =
0 In
−In 0
eS +
0
A(q)
λ+
0
B(q)
fc, λ ∈ Rk
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 80
The algebraic constraints on the state variables (q, p) are
0 = AT (q)∂H
∂p(q, p)
and the constrained state space is Xc = (q, p) | AT (q)∂H∂p
(q, p) = 0.We may solve for the algebraic constraints and at the same time
eliminate the constraint forces A(q)λ in the following way. Since
rank A(q) = k, there exists locally an n× (n− k) matrix S(q) of rank
n− k such that
AT (q)S(q) = 0
Now define p = (p1, p2) = (p1, . . . , pn−k, pn−k+1, . . . , pn) as
p1 := ST (q)p, p1 ∈ Rn−k
p2 := AT (q)p, p2 ∈ Rk
The map (q, p) 7→ (q, p1, p2) is a coordinate transformation. Indeed,
the rows of ST (q) are orthogonal to the rows of AT (q).
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 81
In the new coordinates the constrained Hamiltonian system
becomes
q
˙p1
˙p2
=
0n S(q) ∗−ST (q)
(−pT [Si, Sj ](q)
)
i,j∗
∗ ∗ ∗
∂H∂q
∂H∂p1
∂H∂p2
+
0
0
AT (q)A(q)
λ+
0
Bc(q)
B(q)
u
AT (q)∂H∂p
= AT (q)A(q) ∂H∂p2 = 0
with H(q, p) the Hamiltonian H expressed in the new coordinates
q, p.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 82
Here Si denotes the i-th column of S(q), i = 1, . . . , n− k, and [Si, Sj ]
is the Lie bracket of Si and Sj, in local coordinates given as:
[Si, Sj ](q) =∂Sj
∂q(q)Si(q) −
∂Si
∂qSj(q)
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 83
Since λ only influences the p2-dynamics, and the constraints
AT (q)∂H∂p
(q, p) = 0 are equivalently given by ∂H∂p2 (q, p) = 0, the
constrained dynamics is determined by the dynamics of q and p1
(coordinates for the constrained state space Xc)
q
˙p1
= Jc(q, p1)
∂Hc
∂q(q,p1)
∂Hc
∂p1(q,p1)
+
0
Bc(q)
u,
where Hc(q, p1) equals H(q, p) with p2 satisfying ∂H
∂p2 = 0, and where
the skew-symmetric matrix Jc(q, p1) is given as the left-upper part
of the structure matrix, that is
Jc(q, p1) =
On S(q)
−ST (q)(−pT [Si, Sj](q)
)
i,j
,
where p is expressed as function of q, p, with p2 eliminated from∂H∂p2 = 0.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 84
Furthermore, in the coordinates q, p, the output map is given in the
form
y =[
BTc (q) B
T(q)]
∂H∂p1
∂H∂p2
which reduces on the constrained state space Xc to
y = BTc (q)
∂H
∂p1(q, p1)
These equations define a port-Hamiltonian system on Xc, with
Hamiltonian Hc given by the constrained total energy, and with
structure matrix Jc.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 85
Example 12 (Example ?? continued: The rolling euro) Define
the new p-coordinates
p1 = pϕ
p2 = pθ + px cosϕ+ py sinϕ
p3 = px − pθ cosϕ
p4 = py − pθ sinϕ
The constrained state space Xc is given by p3 = p4 = 0, and the
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 86
dynamics on Xc is computed as
x
y
θ
ϕ
p1
p2
=
0 cosϕ
0 sinϕ
O4 0 1
1 0
0 0 0 −1 0 0
− cosϕ − sinϕ −1 0 0 0
∂Hc
∂x
∂Hc
∂y
∂Hc
∂θ
∂Hc
∂ϕ
∂Hc
∂p1
∂Hc
∂p2
+
0 0
0 0
0 0
0 0
0 1
1 0
u1
u2
y1
y2
=
12p2
p1
where Hc(x, y, θ, ϕ, p1, p2) = 12p
21 + 1
4p22.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 87
Analysis of port-Hamiltonian systems
Port-Hamiltonian systems and passivity
A square nonlinear system
Σ :
x = f(x) + g(x)u, u ∈ Rm
y = h(x), y ∈ Rm
where x ∈ Rn are coordinates for an n-dimensional state space X , is
passive if there exists a storage function V : X → R with
V (x) ≥ 0 for every x, such that
V (x(t2)) − V (x(t1)) ≤∫ t2
t1
yT (t)u(t)dt
for all solutions (u(·), x(·), y(·)) and times t1 ≤ t2.
The system is lossless if ≤ is replaced by =.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 88
If H is differentiable then ’passive’ is equivalent to
d
dtV ≤ yTu
which reduces to (Willems, Hill-Moylan)
∂T V∂x
(x)f(x) ≤ 0
h(x) = gT (x)∂V∂x
(x)
while in the lossless case ≤ is replaced by =.
In the linear case
x = Ax+Bu
y = Cx
is passive if there exists a quadratic storage function V (x) = 12x
TQx,
with Q = QT ≥ 0 satisfying the LMIs
ATQ+QA ≤ 0, C = BTQ
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 89
Clearly, any port-Hamiltonian system with Hamiltonian H ≥ 0 is
passive, sinced
dtH = −eT
RfR + eTP fP ≤ eT
P fP
and thus H is a storage function. Furthermore, if there are no
power-dissipating elements R, then a port-Hamiltonian system with
H ≥ 0 is lossless.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 90
Every linear passive system with storage function V (x) = 12x
TQx,
satisfying
kerQ ⊂ kerA
can be rewritten as a linear port-Hamiltonian system
x = (J −R)Qx+Bu, J = −JT , R = RT ≥ 0
y = BTQx,
in which case the storage function V (x) = 12x
TQx is called the
Hamiltonian H.
Passive linear systems are thus port-Hamiltonian with
non-negative Hamiltonian.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 91
Mutatis mutandis ’most’ nonlinear lossless systems can be written
as a port-Hamiltonian system
x = J(x)∂H∂x
(x) + g(x)u
y = gT (x)∂H∂x
(x)
with J(x) = −JT (x) and ∂H∂x
(x) the column vector of partial
derivatives. Note that
x = J(x)∂H
∂x(x)
is the internal Hamiltonian dynamics known from physics, which in
classical mechanics can be written as
q = ∂H∂p
(q, p)
p = −∂H∂q
(q, p)
with the Hamiltonian H the total (kinetic + potential) energy.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 92
Similarly, most nonlinear passive systems can be written as a
port-Hamiltonian system (with dissipation)
x = [J(x) −R(x)]∂H∂x
(x) + g(x)u
y = gT (x)∂H∂x
(x)
with R(x) = RT (x) ≥ 0 specifying the energy dissipation
d
dtH = −∂
TH
∂x(x)R(x)
∂H
∂x(x) + uT y ≤ uT y
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 93
Pole- and zero-dynamics of port-Hamiltonian
systems
Start with a general port-Hamiltonian system in kernel
representation
Fxx = Ex
∂H
∂x(x) − FRF (eR) +EReR + FP fP +EP eP
Various pole/zero-dynamics, which inherit the port-Hamiltonian
structure, can be defined. Simplest two possibilities:
fP = 0, or eP = 0
For eP = 0 (while leaving fP free) we obtain the port-Hamiltonian
system
LFxx = LEx
∂H
∂x(x) − LFRF (eR) + LEReR (27)
where L is any matrix of maximal rank satisfying LFP = 0.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 94
Indeed, the equations LFxfx + LExex + LFRfR + LEReR = 0 define
the reduced Dirac structure
Dred ⊂ Fx × Ex ×FR × ER,
which results from interconnection of the original Dirac structure Dwith the Dirac structure on the space of external port variables
FP × EP defined by eP = 0.
The choice fP = 0 is similar, the difference being that L should now
satisfy LEP = 0.
For a hybrid partitioning of the port-variables fP , eP , we may define
for every subset K ⊂ 1, · · · ,m the reduced Dirac structure
corresponding to setting the variables ePi, i ∈ K, fPi, i /∈ K, equal to
zero (while leaving the complementary part free).
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 95
Model reduction of port-Hamiltonian systems
• Network modeling of complex lumped-parameter systems
(circuits, multi-body systems) often leads to high-dimensional
models.
• Structure-preserving spatial discretization of
distributed-parameter port-Hamiltonian systems yields
high-dimensional port-Hamiltonian models.
• Lumped-parameter modeling of systems like MEMS gives
high-dimensional port-Hamiltonian systems.
• Controller systems may be in first instance
distributed-parameter, and need to be discretized to low-order
controllers.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 96
In many cases we want the reduced-order system to be again
port-Hamiltonian:
• Port-Hamiltonian model reduction preserves passivity.
• Port-Hamiltonian model reduction may (approximately)
preserve other balance laws /conservation laws.
• Physical interpretation of reduced-order model.
• Reduced-order system can replace the high-order
port-Hamiltonian system in a larger context.
Thus there is a need for structure-preserving model reduction of
high-dimensional port-Hamiltonian systems.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 97
General structure-preserving model reduction
Let us assume that we have been able to find a splitting of the
state space variables x = (x1, x2) having the property that the x2
coordinates hardly contribute to the external port behavior of the
system, and thus could be omitted from the state space
description.
In which way is it possible to retain the port-Hamiltonian structure
in model reduction ?
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 98
Recall that the vector of flow and effort variables is required to be
in the Dirac structure
(f1x , f
2x , e
1x, e
2x, fR, eR, fP , eP ) ∈ D,
while the flow and effort variables fx, ex are linked to the
constitutive relations of the energy-storage by
x1 = −f1x ,
∂H∂x1 (x1, x2) = e1x
x2 = −f2x ,
∂H∂x2 (x1, x2) = e2x,
The basic idea for structure-preserving model reduction is to ’cut’
the interconnection
x2 = −f2x ,
∂H
∂x2(x1, x2) = e2x
between the energy storage corresponding to x2 and the Dirac
structure, in such a way that no power is transferred.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 99
This is done by making both power products ( ∂H∂x2 )T x2 and (e2x)T f2
x
equal to zero.
H DR
−x1
−x2
∂H∂x1
∂H∂x2
e1x
e2x
f1x
f2x
fR
fP
eR
eP
Figure 11: Model Reduction Scheme
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 100
The following main scenario’s arise:
1 Set∂H
∂x2(x1, x2) = 0, e2x = 0
The first equation imposes an algebraic constraint on the space
variables x = (x1, x2). Under general conditions this constraint
allows one to solve x2 as a function x2(x1) of x1, leading to the
reduced Hamiltonian
Hecred(x1) := H(x1, x2(x1))
Furthermore, the second equation defines the reduced Dirac
structure
Decred := (f1
x , e1x, fR, eR, fP , eP ) | ∃f2
x such that
(f1x , e
1x, f
2x , 0, fR, eR, fP , eP ) ∈ D
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 101
leading to the reduced port-Hamiltonian system
(−x1,∂Hec
red
∂x1(x1),−F (eR), eR, fP , eP ) ∈ Dec
red
This reduction method is the Effort-constraint reduction method.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 102
2 (Flow-constraint reduction method) Set
x2 = 0, f2x = 0
The first equation imposes the constraint
x2 = c (constant)
and thus defines the reduced Hamiltonian
H fcred(x1) := H(x1, c),
while the second equation leads to the reduced Dirac structure
Dfcred := (f1
x , e1x, fR, eR, fP , eP ) | ∃e2x such that
(f1x , e
1x, 0, e
2x, fR, eR, fP , eP ) ∈ D
and the corresponding reduced port-Hamiltonian system
(−x1,∂H fc
red
∂x1(x1),−F (eR), eR, fP , eP ) ∈ Dfc
red
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 103
3 Set
x2 = 0, e2x = 0
This leads to the reduced-order port-Hamiltonian system with
reduced Hamiltonian H fcred(x1) and reduced Dirac structure Dec
red.
4 Set∂H
∂x2(x1, x2) = 0, f2
x = 0
This leads to the port-Hamiltonian system with reduced
Hamiltonian Hecred(x1) and reduced Dirac structure Dfc
red.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 104
The above reduction schemes have different physical
interpretations and consequences.
Consider an electrical circuit where x2 corresponds to the charge Q
of a single (linear) capacitor.
Application of the Effort-constraint method corresponds to
removing the capacitor (and setting its charge equal to zero) and
short-circuiting the circuit at the location of the capacitor.
The Flow-constraint method corresponds to open-circuiting the
circuit at the location of the capacitor, and keeping the charge of
the capacitor constant.
Method 3 is in this case very similar to the Effort-constraint
method, and corresponds to short-circuiting, with the minor
difference of setting the charge of the capacitor equal to a
constant.
Method 4 corresponds to open-circuiting while setting the charge
equal to zero (similar to Flow-constraint method).
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 105
Explicit equational representations of the four methods
starting from the full-order model:
Fxx = Ex
∂H
∂x(x) − FRF (eR) +EReR + FP fP +EP eP
Corresponding to the splitting of the state vector x into x = (x1, x2)
and the splitting of the flow and effort vectors fx, ex into f1x , f
2x and
e1x, e2x we write
Fx =[
F 1x F 2
x
]
, Ex =[
E1x E2
x
]
The reduced Dirac structure Decred corresponding to the
effort-constraint e2x = 0 is given by the explicit equations
LecF 1xf
1x + LecE1
xe1x + LecFRfR + LecEReR + LecFP fP + LecEP eP = 0
where Lec is any matrix of maximal rank satisfying
LecF 2x = 0
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 106
Similarly, the reduced Dirac structure Dfcred corresponding to the
flow-constraint f2x = 0 is given by the equations
LfcF 1xf
1x + LfcE1
xe1x + LfcFRfR + LfcEReR + LfcFP fP + LfcEP eP = 0
where Lfc is any matrix of maximal rank satisfying
LfcE2x = 0
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 107
It follows that the reduced-order model resulting from applying the
Effort-constraint method is given by
LecF 1x x
1 = LecE1x
∂Hecred
∂x1(x1)−LecFRF (eR)+LecEReR+LecFP fP +LecEP eP ,
whereas the reduced-order model resulting from applying the
Flow-constraint method is given by
LfcF 1x x
1 = LfcE1x
∂H fcred
∂x1(x1)−LfcFRF (eR)+LfcEReR +LfcFP fP +LfcEP eP
Similar expressions follow for the reduced-order models arising from
applying Methods 3 and 4.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 108
Control of port-Hamiltonian systems
Contents
• Use of passivity for control
• Control by interconnection: set-point stabilization
• The dissipation obstacle
• A state feedback perspective; shaping the Hamiltonian
• New control paradigms
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 109
Use of passivity for control and beyond
• The storage function can be used as Lyapunov function,
implying some sort of stability for the uncontrolled system.
• The standard feedback interconnection of two passive systems
is again passive, with storage function being the sum of the
individual storage functions.
• Passive systems can be asymptotically stabilized by adding
artificial damping. In fact,
d
dtH ≤ uT y
together with the additional damping u = −y yields
d
dtH ≤ − ‖ y ‖2
proving asymptotic stability provided an observability
condition is met.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 110
Example The Euler equations for the motion of a rigid body
revolving about its center of gravity with one input are
I1ω1 = [I2 − I3]ω2ω3 + g1u
I2ω2 = [I3 − I1]ω1ω3 + g2u
I3ω3 = [I1 − I2]ω1ω2 + g3u,
Here ω := (ω1, ω2, ω3)T
are the angular velocities around the principal
axes of the rigid body, and I1, I2, I3 > 0 are the principal moments
of inertia. The system for u = 0 has the origin as an equilibrium
point. Linearization yields the linear system
A =
0 0 0
0 0 0
0 0 0
B =
I−11 g1
I−12 g2
I−13 g3
.
Hence the linearization does not say anything about stabilizability.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 111
Stability and asymptotic stabilization by damping injection
Rewrite the system in port-Hamiltonian form by defining the
angular momenta
p1 = I1ω1, p2 = I2ω2, p3 = I3ω3
and defining the Hamiltonian H(p) as the total kinetic energy
H(p) =1
2(p21
I1+p22
I2+p23
I3)
Then the system can be rewritten as
p1
p2
p3
=
0 −p3 p2
p3 0 −p1
−p2 p1 0
∂H∂p1
∂H∂p2
∂H∂p3
+
g1
g2
g3
u, y =
[
g1 g2 g3
]
∂H∂p1
∂H∂p2
∂H∂p3
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 112
Since H = 0 and H has a minimum at p = 0 the origin is stable.
Damping injection amounts to the negative output feedback
u = −y = −g1p1
I1− g2
p2
I2− g3
p3
I3= −g1ω1 − g2ω2 − g3ω3,
yielding convergence to the largest invariant set contained in
S := p ∈ R3 | H(p) = 0 = p ∈ R
3 | g1p1
I1+ g2
p2
I2+ g3
p3
I3= 0
It can be shown that the largest invariant set contained in S is the
origin p = 0 if and only if
g1 6= 0, g2 6= 0, g3 6= 0,
in which case the origin is rendered asymptotically stable (even,
globally).
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 113
Beyond control via passivity: What can we do if the
desired set-point is not a minimum of the storage function ??
Recall the proof of stability of an equilibrium (ω∗1 , 0, 0) 6= (0, 0, 0) of
the Euler equations.
The total energy H = 2I1
p2
1
+ 2I2
p2
2
+ 2I3
p2
3
= 12I1ω
21 + 1
2I2ω22 + 1
2I3ω23 has a
minimum at (0, 0, 0). Stability of (ω∗1 , 0, 0) is shown by taking as
Lyapunov function a combination of the total energy K and
another conserved quantity, namely the total angular momentum
C = p21 + p2
2 + p23 = I2
1ω21 + I2
2ω22 + I2
3ω23
This follows from
[
p1 p2 p3
]
0 −p3 p2
p3 0 −p1
−p2 p1 0
= 0
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 114
In general, for any Hamiltonian dynamics
x = J(x)∂H
∂x(x)
one may search for conserved quantities C, called Casimirs, as
being solutions of∂TC
∂x(x)J(x) = 0
Then ddtC = 0 for every H, and thus also H + C is a candidate
Lyapunov function.
Note that the minimum of H + C may now be different from the
minimum of H.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 115
Control by interconnection: set-point stabilization:
Consider first a lossless Hamiltonian plant system P
x = J(x)∂H∂x
(x) + g(x)u
y = gT (x)∂H∂x
(x)
where the desired set-point x∗ is not a minimum of the
Hamiltonian H, while the Hamiltonian dynamics x = J(x)∂H∂x
(x) does
not possess useful Casimirs.
How to (asymptotically) stabilize x∗ ?
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 116
Control by interconnection:
Consider a controller port-Hamiltonian system
C :
ξ = Jc(ξ)∂Hc
∂ξ(ξ) + gc(ξ)uc, ξ ∈ Xc
yc = gT (ξ)∂Hc
∂ξ(ξ)
via the standard feedback interconnection
u = −yc, uc = y
cc
P
C
u
u
y
y
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 117
Then the closed-loop system is the port-Hamiltonian system
x
ξ
=
J(x) −g(x)gT
c (ξ)
gc(ξ)gT (x) Jc(ξ)
∂H∂x
(x)
∂Hc
∂ξ(ξ)
with state space X × X c, and total Hamiltonian H(x) +Hc(ξ).
Main idea: design the controller system in such a manner
that the closed-loop system has useful Casimirs C(x, ξ) !
This may lead to a suitable candidate Lyapunov function
V (x, ξ) := H(x) +Hc(ξ) + C(x, ξ)
with Hc to-be-determined.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 118
Thus we look for functions C(x, ξ) satisfying
[∂T C∂x
(x, ξ) ∂T C∂ξ
(x, ξ)]
J(x) −g(x)gT
c (ξ)
gc(ξ)gT (x) Jc(ξ)
= 0
such that the candidate Lyapunov function
V (x, ξ) := H(x) +Hc(ξ) + C(x, ξ)
has a minimum at (x∗, ξ∗) for some (or a set of) ξ∗ ⇒ stability.
Remark: The set of such achievable closed-loop Casimirs C(x, ξ)
can be fully characterized.
Subsequently, one may add extra damping (directly or in the
dynamics of the controller) to achieve asymptotic stability.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 119
Example: the ubiquitous pendulum
Consider the mathematical pendulum with Hamiltonian
H(q, p) =1
2p2 + (1 − cos q)
actuated by a torque u, with output y = p (angular velocity).
Suppose we wish to stabilize the pendulum at a non-zero angle q∗
and p∗ = 0.
Apply the nonlinear integral control
ξ = uc = y
−u = yc = ∂Hc
∂ξ(ξ)
which is a port-Hamiltonian controller system with Jc = 0.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 120
Casimirs C(q, p, ξ) are found by solving
[∂C∂q
∂C∂p
∂C∂ξ
]
0 1 0
−1 0 −1
0 1 0
= 0
leading to Casimirs C(q, p, ξ) = K(q − ξ), and candidate Lyapunov
functions
V (q, p, ξ) =1
2p2 + (1 − cos q) +Hc(ξ) +K(q − ξ)
with the functions Hc and K to be determined.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 121
For a local minimum, determine K and Hc such that
Equilibrium assignment
sin q∗ + ∂K∂z
(q∗ − ξ∗) = 0
−∂K∂z
(q∗ − ξ∗) + ∂Hc
∂ξ(ξ∗) = 0
Minimum condition
cos q∗ + ∂2K∂z2 (q∗ − ξ∗) 0 −∂2K
∂z2 (q∗ − ξ∗)
0 1 0
−∂2K∂z2 (q∗ − ξ∗) 0 ∂2K
∂z2 (q∗ − ξ∗) + ∂2Hc
∂ξ2 (ξ∗)
> 0
Many possible solutions.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 122
The dissipation obstacle
Surprisingly, the presence of dissipation R 6= 0 may pose a problem !
C(x) is a Casimir for the Hamiltonian dynamics with dissipation
x = [J(x) −R(x)]∂H
∂x(x), J = JT , R = RT ≥ 0
iff
∂TC
∂x[J −R] = 0 ⇒ ∂TC
∂x[J −R]
∂C
∂x= 0 ⇒ ∂TC
∂xR∂C
∂x= 0 ⇒ ∂TC
∂xR = 0
and thus C is a Casimir iff
∂TC
∂x(x)J(x) = 0,
∂TC
∂x(x)R(x) = 0
The physical reason for the dissipation obstacle is that by using a
passive controller only equilibria where no energy-dissipation takes
place may be stabilized.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 123
Similarly, if C(x, ξ) is a Casimir for the closed-loop port-Hamiltonian
system then it must satisfy
[∂T C∂x
(x, ξ) ∂T C∂ξ
(x, ξ)]
R(x) 0
0 Rc(ξ)
= 0
implying by semi-positivity of R(x) and Rc(x)
∂T C∂x
(x, ξ)R(x) = 0
∂T C∂ξ
(x, ξ)Rc(ξ) = 0
This is the dissipation obstacle, which implies that one cannot
shape the Lyapunov function in the coordinates that are directly
affected by energy dissipation.
Remark: For shaping the potential energy in mechanical systems
this is not a problem since dissipation enters in the differential
equations for the momenta.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 124
To overcome the dissipation obstacle
Suppose one can find a mapping C : X → Rm, with its (transposed)
Jacobian matrix KT (x) := ∂C∂x
(x) satisfying
[J(x) −R(x)]K(x) + g(x) = 0
Construct now the interconnection and dissipation matrix of an
augmented system as
Jaug :=
J JK
KTJ KTJK
, Raug :=
R RK
KTR KTRK
By construction
[KT (x) | −I]Jaug = [KT (x) | −I]Raug = 0
implying that the components of C are Casimirs for the
Hamiltonian dynamics
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 125
x
ξ
= [Jaug −Raug]
∂H∂x
(x)
∂Hc
∂ξ(ξ)
Furthermore, since [J(x) −R(x)]K(x) + g(x) = 0
Jaug −Raug =
J −R [J −R]K
KT [J −R] KTJK −KTRK
=
J −R −g
[g − 2RK]T KTJK −KTRK
Thus the augmented system is a closed-loop system for a different
output !
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 126
Port-Hamiltonian systems with feedthrough term take the form
x = [J(x) −R(x)]∂H∂x
(x) + g(x)u
y = (g(x) + 2P (x))T ∂H∂x
(x) + [M(x) + S(x)]u,
with M skew-symmetric and S symmetric, while
R(x) P (x)
P T (x) S(x)
≥ 0
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 127
The augmented system is thus the feedback interconnection of the
nonlinear integral controller
ξ = uc
yc = ∂Hc
∂ξ(ξ)
with the plant port-Hamiltonian system with modified output with
feedthrough term
x = [J(x) −R(x)]∂H∂x
(x) + g(x)u
ymod = [g(x) − 2R(x)K(x)]T ∂H∂x
(x) + [−KT (x)J(x)K(x) +KT (x)R(x)K(x)]u
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 128
Generalization to feedback interconnection with
state-modulation.
Recall that KT (x) := ∂C∂x
(x) is a solution to
[J(x) −R(x)]K(x) + g(x) = 0. This can be generalized to
[J(x) −R(x)]K(x) + g(x)β(x) = 0
with β(x) an m×m design matrix.
The same scheme as above works if we extend the standard
feedback interconnection u = −yc, uc = y to the state-modulated
feedback
u = −β(x)yc, uc = βT (x)y
Note that K(x) is a solution for some β(x) iff
g⊥(x)[J(x) −R(x)]K(x) = 0
(In fact, β(x) := −(gT (x)g(x))−1gT (x)[J(x) −R(x)]K(x) does the job.)
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 129
A state feedback perspective: shaping the
Hamiltonian
Restrict (without much loss of generality) to Casimirs of the form
C(x, ξ) = ξj −Gj(x)
It follows that for all time instants
ξj = Gj(x) + cj , cj ∈ R
Suppose that in this way all control state components ξi can be
expressed as function
ξ = G(x)
of the plant state x. Then the dynamic feedback reduces to a
state feedback, and the Lyapunov function H(x) +Hc(ξ) + C(x, ξ)
reduces to the shaped Hamiltonian
H(x) +Hc(G(x))
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 130
A direct state feedback perspective:
Interconnection-Damping Assignment (IDA)-PBC control
A direct way to generate candidate Lyapunov functions Hd is to
look for state feedbacks u = uIDA(x) such that
[J(x) −R(x)]∂H
∂x(x) + g(x)uIDA(x) = [Jd(x) −Rd(x)]
∂Hd
∂x(x)
where Jd and Rd are newly assigned interconnection and damping
structures.
Remark: For mechanical systems IDA-PBC control is equivalent to
the theory of Controlled Lagrangians (Bloch, Leonard, Marsden, .).
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 131
For Jd = J and Rd = R (Basic IDA-PBC) this reduces to
[J(x) −R(x)]∂(Hd −H)
∂x(x) = g(x)uBIDA(x)
and thus in this case, there exists an uBIDA(x) if and only if
g⊥(x)[J(x) −R(x)]∂(Hd −H)
∂x(x) = 0
which is the same equation as obtained for stabilization by Casimir
generation with a state-modulated nonlinear integral controller !
Conclusion: Basic IDA-PBC ⇔ State-modulated Control by
Interconnection.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 132
Shifted passivity w.r.t. a controlled equilibrium
(see Jayawardhana, Ortega). Consider a port-Hamiltonian system
x = Fz + gu, z = ∂H∂x
(x)
y = gT z
where F = J −R, g are constant, and a controlled equilibrium x0:
Fz0 + gu0 = 0, z0 =∂H
∂x(x0)
Define the shifted storage function
V (x) := Hp(x) − (x− x0)T ∂Hp
∂x(x0) −Hp(x0)
Note that ∂V∂x
= z − z0. It follows that
ddtV = (z − z0)
T x = (z − z0)T (Fz + gu) =
(z − z0)TF (z − z0) + (z − z0)
T g(u− u0) + (z − z0)T (Fz0 + gu0) ≤ (y − y0)
T (u− u0)
implying passivity w.r.t. the shifted inputs u− u0 and outputs y− y0.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 133
New control paradigms
Example: Energy transfer control
Consider two port-Hamiltonian systems Σi
xi = Ji(xi)∂Hi
∂xi(xi) + gi(xi)ui
yi = gTi (xi)
∂Hi
∂xi(xi), i = 1, 2
Suppose we want to transfer the energy from the port-Hamiltonian
system Σ1 to the port-Hamiltonian system Σ2, while keeping the
total energy H1 +H2 constant.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 134
This can be done by using the output feedback
u1
u2
=
0 −y1yT
2
y2yT1 0
y1
y2
It follows that the closed-loop system is energy-preserving.
However, for the individual energies
d
dtH1 = −yT
1 y1yT2 y2 = −||y1||2||y2||2 ≤ 0
implying that H1 is decreasing as long as ||y1|| and ||y2|| are
different from 0. On the other hand,
d
dtH2 = yT
2 y2yT1 y1 = ||y2||2||y1||2 ≥ 0
implying that H2 is increasing at the same rate. Has been
successfully applied to energy-efficient path-following control of
mechanical systems (cf. Duindam & Stramigioli).
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 135
Impedance control
Consider a system with two (not necessarily distinct) ports
x = [J(x) −R(x)]∂H∂x
(x) + g(x)u+ k(x)f, x ∈ X , u ∈ Rm
y = gT (x)∂H∂x
(x) u, y ∈ Rm
e = kT (x)∂H∂x
(x) f, e ∈ Rm
(28)
The relation between the f and e variables is called the
’impedance’ of the (f, e)-port. In Impedance Control (Hogan) one
tries to shape this impedance by using the control port
corresponding to u, y.
Typical application: the (f, e)-port corresponds to the end-point of
a robotic manipulator, while the (u, y)-port corresponds to
actuation.
Basic question: what are achievable impedances of the
(f, e)-port ?
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 136
Conclusions
• Beyond passivity by port-Hamiltonian systems theory.
• Control by interconnection and Casimir generation, IDA-PBC
control.
• Allows for ’physical’ interpretation of control strategies.
Suggests new control paradigms for nonlinear systems.
Use of passivity generally yields good robustness, but
performance theory is yet lacking.
See www.math.rug.nl/˜arjan for further info.
See recent book: Modeling and Control of Complex Physical
Systems; the Port-Hamiltonian Approach, Geoplex consortium,
Springer, 2009.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 137
Part Distributed-parameter port-Hamiltonian
systems
fa
ea
fb
eb
a b
Figure 12: Simplest example: Transmission line
Telegrapher’s equations define the boundary control system
∂Q∂t
(z, t) = − ∂∂zI(z, t) = − ∂
∂z
φ(z,t)L(z)
∂φ∂t
(z, t) = − ∂∂zV (z, t) = − ∂
∂z
Q(z,t)C(z)
fa(t) = V (a, t), e1(t) = I(a, t)
fb(t) = V (b, t), e2(t) = I(b, t)
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 138
Transmission line as port-Hamiltonian system
Define internal flows fx = (fE , fM ) and efforts ex = (eE , eM ):
electric flow fE : [a, b] → R
magnetic flow fM : [a, b] → R
electric effort eE : [a, b] → R
magnetic effort eM : [a, b] → R
together with external boundary flows f = (fa, fb) and boundary
efforts e = (ea, eb). Define the infinite-dimensional Dirac structure
fE
fM
=
0 ∂
∂z
∂∂z
0
eE
eM
fa,b
ea,b
=
eE|a,b
eM |a,b
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 139
This defines a Dirac structure on the space of internal flows and
efforts and boundary flows and efforts.
Substituting (as in the lumped-parameter case)
fE = −∂Q∂t
fM = −∂ϕ∂t
fx = −x
eE = QC
= ∂H∂Q
eM = ϕL
= ∂H∂ϕ
ex =
∂H
∂x
with, for example, quadratic energy density
H(Q,ϕ) =1
2
Q2
C+
1
2
ϕ2
L
we recover the telegrapher’s equations.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 140
Of course, the telegrapher’s equations can be rewritten as the
linear wave equation
∂2Q∂t2
= − ∂∂z
∂I∂t
= − ∂∂z
∂∂t
φL
=
− ∂∂z
1L
∂φ∂t
= ∂∂z
1L
∂∂z
QC
= 1LC
∂2Q∂z2
(provided L(z), C(z) do not depend on z), or similar expressions in
φ, I or V .
The same equations hold for a vibrating string, or for a
compressible gas/fluid in a one-dimensional pipe.
Basic question:
Which of the boundary variables fa, fb, ea, eb can be considered to
be inputs, and which outputs ?
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 141
Example 2: Shallow water equations; distributed-parameter
port-Hamiltonian system with non-quadratic Hamiltonian
The dynamics of the water in an open-channel canal can be
described by
∂t
h
v
+
v h
g v
∂z
h
v
= 0
with h(z, t) the height of the water at position z, and v(z, t) the
velocity (and g gravitational constant).
This can be written as a port-Hamiltonian system by recognizing
the total energy
H(h, v) =1
2
∫ b
a
[hv2 + gh2]dz
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 142
yielding the co-energy functionsa
eh = ∂H∂h
= 12v
2 + gh Bernoulli function
ev = ∂H∂v
= hv mass flow
It follows that the shallow water equations can be written, similarly
to the telegraphers equations, as
∂h∂t
(z, t) = − ∂∂z
∂H∂v
∂v∂t
(z, t) = − ∂∂z
∂H∂h
with boundary variables −hv|a,b and ( 12v
2 + gh)|a,b.
aDaniel Bernoulli, born in 1700 in Groningen as son of Johann Bernoulli, profes-
sor in mathematics at the University of Groningen and forerunner of the Calculus
of Variations (the Brachistochrone problem).
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 143
Paying tribute to history:
Figure 13: Johann Bernoulli, professor in Groningen 1695-1705.
Figure 14: Daniel Bernoulli, born in Groningen in 1700.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 144
We obtain the energy balance
d
dt
∫ b
a
[hv2 + gh2]dz = −(hv)(1
2v2 + gh)|ba
which can be rewritten as
−v( 12gh
2)|ba − v( 12hv
2 + 12gh
2))|ba =
velocity × pressure + energy flux through the boundary
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 145
Conservation laws
All examples have the same structure
∂α1
∂t(z, t) = − ∂
∂z∂H∂α2
= − ∂∂zβ2
∂α2
∂t(z, t) = − ∂
∂z∂H∂α1
= − ∂∂zβ1
with boundary variables β1|a,b, β2|a,b, corresponding to two
coupled conservation laws:
ddt
∫ b
aα1 = −
∫ b
a∂∂zβ2 = β2(a) − β2(b)
ddt
∫ b
aα2 = −
∫ b
a∂∂zβ1 = β1(a) − β1(b)
(In the transmission line, α1 and α2 is charge- and flux-density, and
β1, β2 voltage V and current I, respectively.)
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 146
For some purposes it is illuminating to rewrite the equations in
terms of the co-energy variables β1, β2:
∂β1
∂t
∂β2
∂t
=
∂2H∂α2
1
∂2H∂α1α2
∂2H∂α2α1
∂2H∂α2
2
∂α1
∂t
∂α2
∂t
= −
∂2H∂α2
1
∂2H∂α1α2
∂2H∂α2α1
∂2H∂α2
2
∂β2
∂z
∂β1
∂z
For the transmission line this yields
∂V∂t
∂I∂t
= −
0 1
C
1L
0
∂V∂z
∂I∂z
The matrix is called the characteristic matrix, whose eigenvalues
are the characteristic velocities 1√LC
and − 1√LC
corresponding to
the characteristic eigenvectors (and curves).
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 147
For the shallow water equations this yields
∂β1
∂t
∂β2
∂t
= −
v g
h v
∂β1
∂z
∂β2
∂z
with
β1 =1
2v2 + gh, β2 = hv
being the Bernoulli function and mass flow, respectively.
This corresponds to two characteristic velocities v ±√gh, which
are, like in the transmission line case, of opposite sign (subcritical
or fluvial flow) if
v2 ≤ gh
Because the Hamiltonian is non-quadratic, and thus the pde’s are
nonlinear, the characteristic curves may intersect, corresponding
to shock waves.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 148
Higher-dimensional spatial domain
Electromagnetic Field: Maxwell’s equations
∂D∂t
= curl H, E = ε−1D Faraday
∂B∂t
= − curl E, H = µ−1B Ampere
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 149
Differential version of
∫
∂SE = − d
dt
∫
SB Faraday
∫
∂SH = d
dt
∫
SD Ampere
This means that D and B are differential two-forms,
and E and H are differential one-forms!
Similar phenomenon in the telegrapher’s equations:
Voltage / current: functions on [a, b]
Charge / flux density: one-forms Qdz, ϕdz on [a, b]
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 150
General framework: Z is n-dimensional spatial domain with
boundary ∂Z.
The exterior derivative d : Ωk(Z) → Ωk+1(Z) incorporates all vector
calculus operations (grad, curl, div).
Define a Dirac structure on the space of flows and efforts:
f = (fE , fM , f) ∈ Ωp(Z) × Ωq(Z) × Ωn−q(∂Z)
e = (eE , eM , e) ∈ Ωn−p(Z) × Ωn−q(Z) × Ωn−p(∂Z)
by setting
fE(t, z) = ±deM (t, z), fM (t, z) = deE(t, z),
f(t) = eE(t, ∂Z), e(t) = ±eM (t, ∂Z)
(Transmission line: n = p = q = 1
Maxwell’s equations: n = 3, p = q = 2 )
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 151
Mixed lumped- and distributed-parameter
port-Hamiltonian systems
Typical example: power-converter connected via a transmission
line to a resistive load or an induction motor:
• The power-converter is a switching port-Hamiltonian
system.
• Transmission line is distributed-parameter port-Hamiltonian
system.
• Induction motor is a port-Hamiltonian system, with
Hamiltonian being the electro-mechanical energy.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 152
Power converter connected to the load via transmission line
Il
VC = VL
Vl
E
L
CS
D
Rline
Figure 15: The Boost converter with a transmission line
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 153
Control by interconnection of
distributed-parameter port-Hamiltonian systems
Example: stabilization of the shallow water equations
∂h∂t
(z, t) = − ∂∂z
∂H∂v
(h, v)
∂v∂t
(z, t) = − ∂∂z
∂H∂h
(h, v)
with the 4 boundary variables
hv|a,b
−( 12v
2 + gh)|a,b
(mass flow and Bernoulli function at the boundary points a, b).
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 154
Suppose we want to control the water level h to a desired
height h∗.
An obvious ’physical’ controller is to add to one side of the canal,
say the right-end b, an infinite water reservoir of height h∗,
corresponding to the port-Hamiltonian ’source’ system
ξ = uc
yc = ∂Hc
∂ξ( = gh∗)
with Hamiltonian Hc(ξ) = gh∗ξ, by the feedback interconnection
uc = y = h(b)v(b), yc = −u =1
2v2(b) + gh(b)
This yields a closed-loop port-Hamiltonian system with total
Hamiltonian∫ l
0
1
2[hv2 + gh2]dz + gh∗ξ
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 155
By mass balance,∫ b
a
h(z, t)dz + ξ + c
is a Casimir for the closed-loop system. Thus we may take as
Lyapunov function
V (h, v, ξ) := 12
∫ b
a[hv2 + gh2]dz + gh∗ξ − gh∗[
∫ b
ah(z, t)dz + ξ] + 1
2g(b− a)h∗2
= 12
∫ b
a[hv2 + g(h− h∗)2]dz
which has a minimum at the desired set-point (h∗, v∗ = 0, ξ∗)
(with ξ∗ arbitrary).
Remark Note that the source port-Hamiltonian system is not
passive, since the Hamiltonian Hc(ξ) = gh∗ξ is not bounded from
below.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 156
An alternative, passive, choice of the Hamiltonian controller system
is to take e.g.
Hc(ξ) =1
2gh∗ξ2
leading to the Lyapunov function
V (h, v, ξ) =1
2
∫ b
a
[hv2 + g(h− h∗)2]dz +1
2gh∗(ξ − 1)2
Asymptotic stability of the equilibrium (h∗, v∗ = 0, ξ∗ = 1) can be
obtained by adding ’damping’, that is, replacing uc = y = h(b)v(b) by
uc := y − ∂V
∂ξ(ξ) = h(b)v(b) − gh∗(ξ − 1)
leading to (if there is no power flow through the left-end a)
d
dtV = −gh∗(ξ − 1)2
(See also the work of Bastin & co-workers for related and more
refined results.)
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 157
Lumped port-Hamiltonian modeling of distributed
phenomena
Main idea: Discretize the spatial domain, while still identifying the
’correct’ nature of the lumped variables. Thus provide the direct
discrete analogue of the 0-forms, 1-forms, 2-forms, etc. employed in
the description of distributed-parameter port-Hamiltonian systems.
Alternative route: Discretize the port-Hamiltonian pde model in a
structure-preserving manner (using mixed finite elements).
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 158
Conclusions
• Port-Hamiltonian systems provide a unified framework for
modeling, analysis, and simulation of complex
lumped-parameter multi-physics systems.
• Starting point for (nonlinear) control. Suggests new control
paradigms.
• Inclusion of distributed-parameter components.
• Lumping of distributed-parameter systems to
finite-dimensional PH systems.
Structure-preserving model reduction
Extensions to thermodynamic systems and chemical reaction
networks.
Further exploration of the network graph information.
Port-Hamiltonian Systems: from Geometric Network Modeling to Control, EECI, April 6-10, 2010 159
THANK YOU !, MERCI !See www.math.rug.nl/˜arjan for further info.
See selected references on webpage.