---
title: Port-Hamiltonian Formulation
url: https://www.emergentmind.com/topics/port-hamiltonian-formulation
type: topic
---

# Port-Hamiltonian Formulation

A port-Hamiltonian (pH) formulation is a geometric, energy-based framework for modeling and interconnecting dynamical systems—including ordinary differential equations (ODEs), partial differential equations (PDEs), networks, and physical devices—based on explicit encoding of energy storage, dissipation, interconnection, and power exchange via the language of Hamiltonian functions, Dirac structures, and boundary/interface "ports." This approach unifies the representation of diverse multi-physics domains through a combination of skew-symmetric interconnection (J), symmetric positive semidefinite dissipation (R), and explicit port variables (B), together with a Hamiltonian function (H) describing the stored (and, sometimes, also supplied or available) energy. The port-Hamiltonian formulation is closed under structure-preserving interconnection, supports modular modeling, and provides a rigorous foundation for structure-preserving (energy-consistent) discretization and control design. It is now foundational in mathematical systems theory, control, modeling of distributed-parameter systems, numerical analysis, and emerging fields such as energy-based machine learning and multi-physics model reduction.

## 1. General Structure and Geometric Foundations

The core of the port-Hamiltonian framework is the representation of a system as an explicit interconnection of:

- **Conservative subsystems** (described by a Lagrangian submanifold, typically the graph of the gradient of the Hamiltonian)
- **Dissipative elements** (modeled as non-negative Lagrangian subspaces, capturing resistive effects)
- **Dirac structures** (maximal isotropic, skew-symmetric subspaces encoding the conservation of power and power-preserving interconnection)

In local coordinates, the general port-Hamiltonian system takes the form:
\[
E(x)\,\dot{x} = [J(x) - R(x)] z(x) + B(x)\,u
\]
with output $y = B(x)^T z(x)$ and compatibility $\nabla H(x) = E(x)^T z(x)$. Here,
- $x$ is the state,
- $H(x)$ is the Hamiltonian,
- $J(x) = -J(x)^T$ is the interconnection matrix,
- $R(x) = R(x)^T \succeq 0$ is the dissipation (resistive) matrix,
- $B(x)$ is the port matrix,
- $u$ and $y$ are the port input/output variables.

Dirac structures are closed under interconnection (composition), which is the key geometric feature enabling systematic modular modeling of large-scale and multi-physics systems [2511.20150].

## 2. Port-Hamiltonian Systems: Ordinary and Partial Differential Equations

The port-Hamiltonian formalism applies to a range of dynamical system classes:

- **Finite-dimensional ODEs:** Classical Hamiltonian systems, network ODEs, electrical circuits (including DAEs), multibody mechanics, with states $x \in \mathbb{R}^n$ and explicit $J, R, B$ matrices (e.g., [2004.10821], [2511.20150], [2603.12841]).
- **Infinite-dimensional PDEs:** Field theories in elasticity, fluids, plates, and distributed-parameter networks, expressed in terms of appropriate function spaces, with interconnection via skew-adjoint differential operators and energy flow through boundary ports (e.g., [2212.07041], [1809.11136], [2305.00377], [2404.12078]).
- **DAEs and algebraic variables:** Naturally incorporate constraints via the singularity of $E(x)$ or inclusion of algebraic variables as Lagrange multipliers or latent variables in the Dirac structure [2606.21544].

The explicit appearance of boundary ports makes pH-PDEs particularly suitable for open-system modeling, structure-preserving discretization (e.g., partitioned FE, DG, symplectic integrators), and energy-based control [2212.07041], [1809.11136], [2404.12078].

## 3. Modeling Examples and Extensions

The port-Hamiltonian framework has been systematically applied across configurations:

- **Network flow problems:** Reformulating minimum-cost network flow as a pH optimal control problem, where flow conservation is encoded by the skew-symmetric interconnection and dissipation models leakage or friction. The pH approach enables extensions such as dynamic capacity, node reservoirs, nonlinear costs, and modular port-based interconnection—unlike traditional static or time-expanded formulations [2303.13196].
- **Elasticity and plates:** Both thin (Kirchhoff–Love) and thick (Mindlin–Reissner) plate models can be cast as infinite-dimensional or discretized pH systems, each associated with higher-order Dirac structures and explicit boundary ports for control and observation [1809.11136], [1809.11131], [1210.7630].
- **Continuum mechanics:** Nonlinear elasticity (including finite-strain hyperelasticity), viscoelasticity, and viscous fluids (Navier–Stokes) can all be systematically derived as pH systems, with stress and velocity represented as energy port variables. Constitutive relations for stress close the energy balance via suitable Lagrangian submanifolds [2404.12078].
- **Poroelasticity, Oseen flows, and network interconnections:** Biot poroelasticity, Oseen equations, and large-scale coupled pH-DAE systems can all be formulated within the port-Hamiltonian structure, preserving passivity, energy-dissipation, and enabling structure-preserving discretization and splitting [2012.01949], [2305.09618], [2004.12951].

A summary of domains and representative pH features is given below.

| Application Domain         | Structure Type     | Ports and Energy Functionals            |
|---------------------------|-------------------|-----------------------------------------|
| Network flows             | ODE (descriptor)  | Edge/node variables, flow conservation, quadratic H |
| Flexible solids/strings   | PDE (first order) | Strain, momentum densities, nonlinear H |
| Elastic plates/fields     | High-order PDE    | Moments, curvature/strain, boundary ports |
| Fluid mechanics           | PDE (Lie–Poisson) | Mass/momentum forms, Dirac via advective bracket |
| Electrical circuits       | DAE (KCL/KVL)     | Charge/flux variables, circuit interconnection |
| Multibody rigid systems   | DAE/ODE           | Momentum, positions, constraint variables, Schur complements |

## 4. Boundary Ports, Dissipation, and Power Balance

A central feature of port-Hamiltonian systems is the explicit treatment of energy exchange not only between system components, but also through the spatial or network boundaries ("ports"):

- **Boundary port variables** are canonically conjugate pairs (e.g., velocity/traction in elasticity, voltage/current in circuits, pressure/flow in networks) appearing both in weak forms of the PDE/DAE and in energy (power) balance:
  \[
  \dot{H}(x) = y^T u - z^T R z
  \]
- **Dissipation** enters via symmetric positive semidefinite $R$ matrices or, in continuous settings, via monotone operators or parabolic terms (e.g., viscosity, fluid friction).
- **Power-conserving property:** The interconnection encoded by $J$ (or, for PDEs, skew-adjoint differential operators) is constructed to be structure-preserving (maximal isotropic/Dirac) so that only explicit ports and dissipative effects can produce net change in total stored energy.
- **Structure-preserving discretization:** Partitioned finite element methods, mixed and discontinuous Galerkin finite element methods, can be constructed to preserve the discrete pH structure, resulting in energy-stable and passivity-preserving integrators [1809.11136], [2212.07041].

Boundary ports also enable modular coupling across system boundaries, as in multi-network poroelasticity [2012.01949], operator splitting [2511.20150], and modular robotic or flow network systems [2303.13196].

## 5. Interconnection, Modularization, and Ambiguities

Port-Hamiltonian systems are closed under structure-preserving interconnection: coupling of two or more pH subsystems through their ports (using Dirac structures) yields another pH system. The off-diagonal blocks in the total interconnection matrix emerge via Schur complements of the port variables [2511.20150]. This mathematical property enables:

- **Plug-and-play modeling** of large or hierarchical systems (e.g., flow networks with subnetwork coupling, vehicle–manipulator systems, massive circuit webs).
- **Operator splitting and distributed simulation:** Decomposition into weakly coupled subsystems for parallel or iterative numerical methods, maintaining Lyapunov stability and energy-balance [2511.20150], [2004.12951].
- **Ambiguity in algebraic representation:** There is non-uniqueness ("geometric" and "algebraic" ambiguity) in the coordinate representation of pH systems, especially in the treatment of algebraic variables and resistive ports—such as state versus latent port choice [2606.21544]. This modeling freedom can be exploited to simplify interconnection or controller design.

## 6. Optimal Control, Model Reduction, and Numerical Analysis

The energy-based pH formulation facilitates optimal control under dynamic constraints (PDE or DAE), and supports the development of robust structure-preserving algorithms:

- **Optimal control:** Minimum cost flow problems can be recast as optimal control problems with pH system constraints; the first-order Karush–Kuhn–Tucker conditions yield coupled state–adjoint pH systems, with structure-exposing gradient-based optimization [2303.13196].
- **Numerical discretization:** Structure-preserving time integrators (implicit midpoint, discrete gradients, symplectic methods) and spatial discretizations (mixed-FE, DG, PFEM) are directly compatible with pH systems and provide discrete energy and passivity conservation [2212.07041], [1809.11136], [2603.12841].
- **Model order reduction:** pH-preserving (passive) reduction techniques ensure that the reduced models retain energy-balance properties and are robust under interconnection [2012.01949].

## 7. Impact and Extensions

The port-Hamiltonian formulation unifies control theory, multi-physics modeling, numerical analysis, and system-theoretic perspectives across scientific and engineering domains. Key points of impact:

- **Universal physical modeling:** By centering on the energy-balance law and geometric structure, pH methods provide a high-level abstraction that directly encodes conservation, dissipation, and modularity.
- **Structure-preserving discretization and simulation:** Ensures that numerical schemes respect underlying physical laws, crucial for stability and fidelity, especially in large-scale non-dissipative or weakly dissipative systems [2603.12841].
- **Emergent fields:** pH techniques have been transferred to mixed-dimensional networks (e.g., fluid/elastic networks), complex robotic systems (vehicle–manipulator coupling [2603.16882]), and energy-based learning/control architectures.

The port-Hamiltonian approach continues to extend into hybrid, stochastic, and learning-based systems, with ongoing development of structure-preserving algorithms and geometric reduction techniques. The formalism's ability to integrate physical and network-theoretic perspectives under the overarching principle of energy-based modularity provides a mathematically rigorous backbone for modern multi-physics system theory and engineering [2303.13196], [1809.11136], [2511.20150], [2606.21544].

Source: https://www.emergentmind.com/topics/port-hamiltonian-formulation