Algorithm Search⌘K

Modeladvanced

Port-Hamiltonian system

Also called port-Hamiltonian model.

A model x' = (J - R) grad H + g u, y = g^T grad H, built from an energy H, a skew interconnection J, a damping R >= 0 and ports. It is passive with storage H.

A port-Hamiltonian system is a model of a physical system written in terms of its energy. A function H(x)H(x) gives the stored energy, a skew-symmetric matrix J(x)J(x) says how energy moves between the parts without loss, a symmetric positive semidefinite matrix R(x)R(x) says where energy is lost, and a matrix g(x)g(x) says where energy enters through the input uu. The output y=gT∇Hy = g^T \nabla H is chosen so that yTuy^T u is the power that flows in. Masses and springs, electric circuits, motors and many coupled systems fit this form. The rate of change of the energy is the supplied power minus the dissipated power, so the model is passive with the energy as storage function (see passivity). Classical Hamiltonian systems are the special case with no damping and no ports. Control methods such as passivity-based control and IDA-PBC use the form because they can change the energy and the damping and keep the structure.

The machine

Equations. The state is x∈Rnx \in \mathbb{R}^n, the input is u∈Rmu \in \mathbb{R}^m, the output is y∈Rmy \in \mathbb{R}^m, and time is continuous, t≥0t \ge 0:

x˙=(J(x)−R(x))∇H(x)+g(x) u,y=g(x)T∇H(x).\dot x = \bigl(J(x) - R(x)\bigr) \nabla H(x) + g(x)\, u, \qquad y = g(x)^T \nabla H(x).

Standing assumptions.

  • H:Rn→RH : \mathbb{R}^n \to \mathbb{R} is the Hamiltonian, the total stored energy. It is C1C^1 with a locally Lipschitz gradient, and bounded below. ∇H\nabla H is the gradient as a column vector.
  • J(x)=−J(x)TJ(x) = -J(x)^T for every xx. This is the interconnection matrix.
  • R(x)=R(x)T≥0R(x) = R(x)^T \ge 0 for every xx. This is the dissipation matrix.
  • g(x)∈Rn×mg(x) \in \mathbb{R}^{n \times m} is the input matrix. JJ, RR and gg are locally Lipschitz.

Under these assumptions the right side is locally Lipschitz in xx and continuous in tt for a continuous input, so solutions exist and are unique while they stay bounded (see the Lipschitz condition and the Picard-Lindelöf theorem). The model is a control-affine system x˙=f(x)+g(x)u\dot x = f(x) + g(x) u with the special drift f=(J−R)∇Hf = (J - R) \nabla H and a matching output. The input uu and the output yy are conjugate variables: force and velocity, voltage and current, torque and angular velocity. Their product is a power.

Example: mass, spring and damper. Let qq be the position and p=mq˙p = m \dot q the momentum, so x=(q,p)x = (q, p). The energy is H=12kq2+12mp2H = \frac12 k q^2 + \frac{1}{2m} p^2, and

J=[01−10],R=[000b],g=[01].J = \begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix}, \qquad R = \begin{bmatrix} 0 & 0 \\ 0 & b \end{bmatrix}, \qquad g = \begin{bmatrix} 0 \\ 1 \end{bmatrix}.

With ∇H=(kq, p/m)\nabla H = (k q,\ p / m) the equations are q˙=p/m\dot q = p / m and p˙=−kq−bp/m+u\dot p = -k q - b p / m + u, where uu is an external force. The output y=p/my = p / m is the velocity, and yuy u is the power of the force.

Example: fully actuated mechanical systems. With configuration q∈Rkq \in \mathbb{R}^k, momentum p=M(q)q˙p = M(q) \dot q, mass matrix M(q)>0M(q) > 0 and potential energy V(q)V(q), take H=12pTM(q)−1p+V(q)H = \frac12 p^T M(q)^{-1} p + V(q),

J=[0I−I0],R=[000D(q)],g=[0I],J = \begin{bmatrix} 0 & I \\ -I & 0 \end{bmatrix}, \qquad R = \begin{bmatrix} 0 & 0 \\ 0 & D(q) \end{bmatrix}, \qquad g = \begin{bmatrix} 0 \\ I \end{bmatrix},

with friction D(q)≥0D(q) \ge 0. The output is the velocity q˙\dot q. This is the same system as the Euler-Lagrange model of the Euler-Lagrange equation, written with momenta instead of velocities.

Example: magnetic levitation. A ball of mass mm hangs under an electromagnet. The state is the flux linkage λ\lambda, the position θ\theta of the ball and its momentum pp. With H=(1−θ)λ22k+p22m+mg0θH = \frac{(1 - \theta) \lambda^2}{2k} + \frac{p^2}{2m} + m g_0 \theta, the coil current is ∂H/∂λ\partial H / \partial \lambda, the magnetic force is −∂H/∂θ-\partial H / \partial \theta, and the coil resistance is the only dissipation. The IDA-PBC page uses this model. Here the electric and the mechanical energy are in one function, and the interconnection matrix couples them.

What it counts

The model counts energy. Along every solution,

ddtH(x(t))=∇HT(J−R)∇H+∇HTg u=−∇HTR ∇H+yTu,\frac{d}{dt} H(x(t)) = \nabla H^T (J - R) \nabla H + \nabla H^T g\, u = -\nabla H^T R\, \nabla H + y^T u,

because ∇HTJ∇H=0\nabla H^T J \nabla H = 0 for a skew-symmetric JJ. This is the power balance: the stored energy changes by the supplied power yTuy^T u minus the dissipated power ∇HTR∇H≥0\nabla H^T R \nabla H \ge 0. Integrated from 00 to tt,

H(x(t))−H(x(0))=∫0tyTu ds−∫0t∇HTR ∇H ds≤∫0tyTu ds.H(x(t)) - H(x(0)) = \int_0^t y^T u\, ds - \int_0^t \nabla H^T R\, \nabla H\, ds \le \int_0^t y^T u\, ds.

So the system is passive with storage function HH (shifted to be nonnegative), in the sense of dissipativity with the supply rate yTuy^T u. The model predicts the energy budget: how much energy a controller must supply, and how much the friction and the resistors take out.

For the mass, spring and damper with m=1m = 1, k=2k = 2, b=0.5b = 0.5 and x(0)=(1,0)x(0) = (1, 0), the energy starts at H=1H = 1. With u=0u = 0, a classical RK4 simulation with step 0.010.01 gives H=0.68257H = 0.68257 at t=1t = 1 and H=0.09856H = 0.09856 at t=5t = 5. With the feedback u=−yu = -y, which adds the damping 11 to bb, it gives H=0.46920H = 0.46920 at t=1t = 1 and H=0.00040H = 0.00040 at t=5t = 5.

Relation to other models

  • Hamiltonian systems. With R=0R = 0, g=0g = 0 and the constant canonical J=[0I−I0]J = \begin{bmatrix} 0 & I \\ -I & 0 \end{bmatrix}, the model is a classical Hamiltonian system, and HH is conserved. The port-Hamiltonian form allows a state dependent and singular JJ, adds dissipation, and opens ports to the outside.
  • Euler-Lagrange systems. For mechanical systems, the Legendre transform p=∂L/∂q˙p = \partial L / \partial \dot q maps the Euler-Lagrange model to the port-Hamiltonian model above. The port-Hamiltonian form is wider: it also covers electrical and electromechanical systems in which the energy is not kinetic plus potential (Ortega et al. 2002, Section 1).
  • Control-affine systems. Every port-Hamiltonian system is a control-affine system. The converse needs a storage function HH and a factorization of the drift as (J−R)∇H(J - R)\nabla H, which is a strong structural property.
  • Passive linear systems. Take H=12xTQxH = \frac12 x^T Q x with Q>0Q > 0. Then x˙=(J−R)Qx+gu\dot x = (J - R) Q x + g u and y=gTQxy = g^T Q x is linear. Conversely, let x˙=Ax+Bu\dot x = A x + B u, y=Cxy = C x be passive with a storage 12xTPx\frac12 x^T P x, P>0P > 0, which by the Kalman-Yakubovich-Popov lemma means ATP+PA≤0A^T P + P A \le 0 and PB=CTP B = C^T. Put J=12(AP−1−P−1AT)J = \frac12 (A P^{-1} - P^{-1} A^T) and R=−12P−1(ATP+PA)P−1R = -\frac12 P^{-1} (A^T P + P A) P^{-1}. Then JJ is skew, R≥0R \ge 0, A=(J−R)PA = (J - R) P and C=BTPC = B^T P. So every linear system with a positive definite quadratic storage function for the supply yTuy^T u is a port-Hamiltonian system with H=12xTPxH = \frac12 x^T P x.
  • Dissipative systems. Port-Hamiltonian systems are dissipative with the supply rate yTuy^T u. A general dissipative system has no such geometric structure, and its storage function need not be the physical energy.

Known results in the model

  • Passivity and the power balance. Shown above. It holds for every HH, every skew JJ and every R≥0R \ge 0, so it does not depend on the numerical values of the parameters. This is the main reason the model is used for robust control design.
  • Lyapunov stability of strict minima. If x⋆x^\star is a strict local minimum of HH and u=0u = 0, then V=H−H(x⋆)V = H - H(x^\star) is a Lyapunov function with V˙=−∇HTR∇H≤0\dot V = -\nabla H^T R \nabla H \le 0, so x⋆x^\star is a Lyapunov stable equilibrium (Khalil 2002, Chapter 4). Asymptotic stability needs more. By the LaSalle invariance principle on a compact sublevel set of HH around x⋆x^\star, it holds if no solution other than x⋆x^\star stays in the set where ∇HTR∇H=0\nabla H^T R \nabla H = 0.
  • Damping injection. The feedback u=−Kvyu = -K_v y with Kv=KvT>0K_v = K_v^T > 0 gives the closed loop x˙=(J−R−gKvgT)∇H\dot x = (J - R - g K_v g^T) \nabla H, which is port-Hamiltonian again with the larger dissipation R+gKvgTR + g K_v g^T. It cannot move the minimum of HH. To stabilize another point the energy must be changed, which is what passivity-based control and IDA-PBC do.
  • Power-preserving interconnection. Connect two port-Hamiltonian systems by u1=−y2+e1u_1 = -y_2 + e_1 and u2=y1+e2u_2 = y_1 + e_2. The result is port-Hamiltonian with energy H1(x1)+H2(x2)H_1(x_1) + H_2(x_2), dissipation diag⁡(R1,R2)\operatorname{diag}(R_1, R_2), inputs (e1,e2)(e_1, e_2) and the interconnection matrix [J1−g1g2Tg2g1TJ2]\begin{bmatrix} J_1 & -g_1 g_2^T \\ g_2 g_1^T & J_2 \end{bmatrix}, which is skew-symmetric. This is the energy view of the passivity theorem: the feedback connection of two passive systems is passive.
  • Casimir functions and the dissipation obstacle. A function C(x)C(x) with ∇CT(J−R)=0\nabla C^T (J - R) = 0 does not change along the system with u=0u = 0, for every HH. Such a function is a Casimir. Multiply the condition on the right by ∇C\nabla C: since ∇CTJ∇C=0\nabla C^T J \nabla C = 0, this gives ∇CTR∇C=0\nabla C^T R \nabla C = 0, so R∇C=0R \nabla C = 0 (because R≥0R \ge 0) and then JT∇C=0J^T \nabla C = 0 as well. So Casimirs cannot depend on the states where dissipation acts. This limits the energy-Casimir method of control, and it is one reason why IDA-PBC changes JJ and RR instead of looking for Casimirs.
  • Structure-preserving simulation. For R=0R = 0 and u=0u = 0, HH is constant along exact solutions, but a general method such as RK4 lets it drift slowly. Symplectic integrators keep a modified energy close to HH over long times for canonical JJ. With dissipation, discrete gradient methods give a discrete power balance. These are properties of the numerical method, not of the model.

References

  1. Port-controlled Hamiltonian systems: modelling origins and system-theoretic properties, the definition of port-controlled Hamiltonian systems and their passivity
  2. Arjan van der Schaft and Dimitri Jeltsema, Port-Hamiltonian Systems Theory: An Introductory Overview, Foundations and Trends in Systems and Control 1(2-3), 173-378, 2014, the input-state-output port-Hamiltonian systems with dissipation, the power balance, interconnection and Casimirs
  3. Romeo Ortega, Arjan van der Schaft, Bernhard Maschke and Gerardo Escobar, Interconnection and damping assignment passivity-based control of port-controlled Hamiltonian systems, Automatica 38(4), 585-596, 2002, Section 2 (the model (1), the energy balance (3) and (4), and the passivity of the map from u to y)
  4. Hassan K. Khalil, Nonlinear Systems, third edition, Prentice Hall, 2002, Chapter 6 (passivity) and Section 4.2 (the invariance principle)

Where this leads

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW4 complete
  • a review of the text: no review record reviews/XPB19M/text.yaml