---
title: Port-Hamiltonian Systems on Graphs
url: https://www.emergentmind.com/topics/port-hamiltonian-systems-on-graphs
type: topic
---

# Port-Hamiltonian Systems on Graphs

Port-Hamiltonian systems on graphs furnish a rigorous, energy-based modeling framework for networked physical systems, in which the interconnection structure is directly encoded by a graph and the dynamics capture both conservation laws and dissipative effects. By leveraging the formalism of incidence and Laplacian matrices, Dirac structures, and, more broadly, the syntax of wiring diagrams, the port-Hamiltonian approach unifies the treatment of electrical circuits, mechanical networks, transport systems, and even higher-order chain complexes. Recent developments have further extended this paradigm to data-driven model discovery and thermodynamically consistent system composition.

## 1. Graph Structures, Incidence Matrices, and Laplacians

Let $\mathcal{G}=(\mathcal{V},\mathcal{E})$ denote a directed graph with $n=|\mathcal{V}|$ vertices and $m=|\mathcal{E}|$ edges. The $n\times m$ (node-to-edge) incidence matrix $B$ assigns each edge $j$ a $+1$ in the row of its head, $-1$ in the row of its tail, and zeros elsewhere. For edge weights encoded by a diagonal matrix $R_e= \operatorname{diag}(r_1, ..., r_m)$, the symmetric Laplacian is defined by
$$
L = B R_e B^T
$$
which is symmetric, positive semidefinite, with $L \mathbf{1}=0$ and $\mathbf{1}^T L =0$. This structure naturally emerges in the conservation law for stored quantities $x\in\mathbb{R}^n$ at graph nodes, with flows $f\in\mathbb{R}^m$ along edges:
$$
\dot{x} = B f
$$
If $f = -R_e e$ with efforts $e = B^T \frac{\partial H}{\partial x}$, and a separable Hamiltonian $H(x)=\sum_i H_i(x_i)$, then
$$
\dot{x} = -L \frac{\partial H}{\partial x}
$$
which encodes passive, energy-dissipative dynamics governing key physical network models [1510.04984].

## 2. Port-Hamiltonian System Structure and Energy-Based Network Dynamics

A finite-dimensional port-Hamiltonian system (PHS) with input $u\in\mathbb{R}^k$ and output $y\in\mathbb{R}^k$ takes the canonical form:
$$
\dot{x} = [J(x) - R(x)] \frac{\partial H}{\partial x} + G(x)u,\quad y = G^T(x) \frac{\partial H}{\partial x}
$$
where $J(x) = -J^T(x)$ encodes the lossless interconnection structure (Dirac structure), $R(x) = R^T(x) \geq 0$ governs dissipation, and $H(x) \geq 0$ is the Hamiltonian (total stored energy). For graph-based networks where storage resides only at vertices, $J=0$ and $R=L$, so:
$$
\dot{x} = -L \frac{\partial H}{\partial x} + B u
$$
with $y = B^T \frac{\partial H}{\partial x} + Du$, where a direct feedthrough $D$ arises for resistive ports [1510.04984]. The formulation directly preserves passivity, and recasts many classic models—mass-spring-damper arrays, power grids, resistive-capacitive circuits, consensus protocols—in a unified port-Hamiltonian language [1107.2006].

## 3. Non-Symmetric Laplacians, Kirchhoff Balancing, and Generalized Graphs

In non-reversible transport or asymmetric influence networks, the flow Laplacian $L_{\text{ns}} = -B R_e$ is generally non-symmetric but still satisfies $\mathbf{1}^T L_{\text{ns}}=0$ (column sums vanish, ensuring conservation). For strongly connected components, there exists a positive vector $\sigma \in \mathbb{R}^n_{>0}$ such that $L_{\text{ns}} \sigma =0$, constructible using the Kirchhoff Matrix-Tree theorem (sum of spanning trees directed to each node, weighted by edge weights). The balancing transformation
$$
L_{\text{bal}} := D_\sigma^{-1} L_{\text{ns}} D_\sigma
$$
with $D_\sigma = \operatorname{diag}(\sigma)$, yields a Laplacian with both row and column sums zero, and symmetric if and only if detailed balance holds. Introducing scaled state $z=D_\sigma x$, and corresponding scaled Hamiltonian $\tilde{H}(z)=H(D_\sigma^{-1}z)$, the dynamics in $z$ take standard pH-form
$$
\dot{z} = [J - R] \frac{\partial \tilde{H}}{\partial z} + \tilde{B} u, \quad \tilde{B}=D_\sigma B
$$
with $L_{\text{bal}} = J - R$ for $J=-J^T$, $R=R^T \geq 0$ [1510.04984]. This structure generalizes the approach to settings beyond symmetric networks, including directed consensus algorithms and distribution systems.

## 4. Dirac Structures, Compositionality, and Network Interconnection

Port-Hamiltonian structure fundamentally relies on Dirac structures, which are power-conserving subspaces of flow/effort pairs satisfying symmetry and dimensionality properties [1107.2006]. On a graph, flow-continuous ($\mathcal{D}_f$) and effort-continuous ($\mathcal{D}_e$) Dirac structures encode coupling conditions via the incidence matrix and manage the interconnection of internal, boundary, and edge variables. Graph composition—attaching subgraphs via common boundary vertices—is represented as categorical pushouts of Dirac or bond-graph structures. This induces modular assembly: coupled systems inherit the passivity and energetic properties of their constituents [2202.00377, 2402.17640].

The diagrammatic or operadic syntax for compositional modeling has been formalized in modern frameworks such as the EPHS modeling language. Primitive components, junctions, and their interconnections are presented as typed undirected wiring diagrams, with semantics functorially assigning to any wiring diagram a global (aggregate) port-Hamiltonian model. Hierarchical modeling and automated elimination of internal variables are then encoded by syntactic composition, ensuring that system-theoretic properties such as passivity, conservation, and structure preservation are maintained under arbitrary hierarchical interconnection [2202.00377, 2402.17640].

## 5. Analytical Tools: Storage Functions and System-Theoretic Analysis

Port-Hamiltonian models on graphs admit explicit computation of available storage or minimal storage functions. For passive systems $\dot{x} = D_s u$, $y = D_s^T \frac{\partial H}{\partial x}$, the available storage is
$$
S_a(x) = \sup_{u(\cdot),T\geq 0} \left( -\int_0^T y(t)^T u(t) dt \right) = H(x) - H(x^*)
$$
where $x^*$ is the reachable minimizer of $H$ over all $x^*$ with $\frac{\partial H}{\partial x}(x^*) = \lambda \mathbf{1}$ and mass conservation $1^T x^* = 1^T x$ enforced. For quadratic Hamiltonians, this yields
$$
S_a(x) = \frac{1}{2} x^T [I - \frac{1}{n} 11^T] x
$$
representing the maximal extractable energy constrained by invariant total mass [1510.04984].

Equilibria, Lyapunov analysis, and the existence of Casimir invariants fall naturally out of the Hamiltonian structure. Under quadratic $H$, necessary and sufficient conditions for convergence to equilibrium involve the interplay of the Laplacian, mass/damping assignment, and graph connectivity. Robustness to disturbances and symmetry reduction can be treated algebraically within the same formalism [1107.2006].

## 6. Higher-Order Complexes, Infinite-Dimensional Extensions, and Metric Graphs

Directed graphs are 1-complexes in the framework of chain complexes. For higher-order $k$-complexes, a sequence of boundary operators $d_j$ satisfying $d_{j-1} \circ d_j = 0$ encodes structure on faces, edges, and higher-dimensional cells. Port-Hamiltonian equations can be written on these complexes, e.g., to model heat transfer on a 2-complex where stored energy is associated to faces, fluxes to edges, and efforts determined via the coboundary operator $d_j^T$. The resulting Laplacian has the general form $d_k R d_k^T$, encoding physical laws on combinatorial or simplicial complexes [1510.04984].

For infinite-dimensional settings, particularly hyperbolic PDEs (telegraph systems) on metric graphs, the port-Hamiltonian approach provides explicit semigroup representations under general Kirchhoff-type boundary conditions [2111.08475]. The formulation splits boundary data into incoming and outgoing ports, with the coupling governed by a boundary matrix $B$. The long-term dynamic behavior is completely determined by the spectrum of $B$, with invariant subspace decompositions yielding periodic and decaying modes. Rigorous criteria for "graph realizability" of Kirchhoff port-boundary conditions are available in terms of the structure of the boundary matrix and its relation to the adjacency matrix of line-digraphs [2103.06651].

## 7. Data-Driven and Automated Discovery of Graph Port-Hamiltonian Structure

Algorithms have been recently developed for learning port-Hamiltonian descriptions—starting from unlabelled ODE data, one first infers the underlying graph structure via pooling network approaches or cross-correlation of observed trajectories, then reconstructs the Hamiltonian, Poisson, and port structures for each identified subsystem [2207.07124]. The algorithm clusters variables to recover network modules, learns normal forms via catalogs of symplectic and Poisson tensors, and separates internal Hamiltonian flows from port and dissipative terms. The process is scalable, modular, and supports both nonlinear and large-scale models. Automated translation from bond-graph representations to explicit input-state-output port-Hamiltonian models has also been rigorously formalized via rank criteria and constructive algorithms [1909.02848], allowing for algorithmic assembly and passivity verification.

---

**Principal References:**  
- [1510.04984] (van der Schaft, "Modeling of Physical Network Systems")
- [1107.2006] (van der Schaft, "Port-Hamiltonian systems on graphs")
- [2202.00377], [2402.17640] (Lohmayer et al., EPHS modeling language and operadic syntax)
- [2207.07124] (Salnikov et al., learning port-Hamiltonian systems)
- [1909.02848] (Pfeifer et al., port-Hamiltonian model generation from bond graphs)
- [2111.08475], [2103.06651] (Banasiak–Błoch, port-Hamiltonian PDEs on graphs)

Source: https://www.emergentmind.com/topics/port-hamiltonian-systems-on-graphs