# Stokes-Lagrange and Stokes-Dirac representations of N-dimensional port-Hamiltonian systems for modeling and control

Antoine Bendimerad-Hohl, Ghislain Haine, Laurent Lefèvre, Denis Matignon

## ► To cite this version:

Antoine Bendimerad-Hohl, Ghislain Haine, Laurent Lefèvre, Denis Matignon. Stokes-Lagrange and Stokes-Dirac representations of N-dimensional port-Hamiltonian systems for modeling and control. Communications in Analysis and Mechanics, 2025, 17 (2), pp.474-519. 10.3934/cam.2025020. hal-05358629

HAL Id: hal-05358629

https://hal.science/hal-05358629v1

Submitted on 11 Nov 2025

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Stokes-Lagrange and Stokes-Dirac representations of N-dimensional port-Hamiltonian systems for modeling and control

Antoine Bendimerad-Hohl<fnref n="1" />, Ghislain Haine<fnref n="1" />,*, Laurent Lefèvre<fnref n="2" /> and Denis Matignon<fnref n="1" />

* Correspondence: Email: ghislain.haine@isae.fr.

**Abstract:** In this paper, we extended the port-Hamiltonian framework by introducing the concept of Stokes-Lagrange structure, which enables the implicit definition of a Hamiltonian over an N-dimensional domain and incorporates energy ports into the system. This new framework parallels the existing Dirac and Stokes-Dirac structures. We proposed the Stokes-Lagrange structure as a specific case where the subspace is explicitly defined via differential operators that satisfy an integration-by-parts formula. By examining various examples through the lens of the Stokes-Lagrange structure, we demonstrated the existence of multiple equivalent system representations. These representations provide significant advantages for both numerical simulation and control design, offering additional tools for the modeling and control of port-Hamiltonian systems.

**Keywords:** port-Hamiltonian systems; Stokes-Dirac structure; Stokes-Lagrange structure; Reissner-Mindlin model; Kirchhoff-Love model; Maxwell's equations; passivity-based control

**Mathematics Subject Classification:** 93C20; 37K06; 74K20; 35Q61

## 1. Introduction

The port-Hamiltonian (pH) framework stems from classical Hamiltonian formalism and bond graphs theory. As in the classical Hamiltonian formalism, the dynamics of the state $\alpha$ derive from a Hamiltonian functional $H(\alpha)$ (e.g., energy, entropy, exergy, etc.), however the underlying structure is not symplectic but defined as a more general Dirac structure (in particular, the dimension of the state space is not necessarily even). This structure, similarly to bond graphs, allows for representing systems as subsystems interconnected through power preserving interconnections. In particular, it is composed of pairs of flow and effort variables $(f, e)$ named power ports whose duality product $\langle e, f \rangle$ corresponds to a power; the Dirac structure then guarantees that the power balance over its power ports is zero: $\sum_i \langle e_i, f_i \rangle = 0$, which

<footnote n="1">¹ Fédération ENAC ISAE-SUPAERO ONERA, Université de Toulouse, Toulouse, France</footnote>

<footnote n="2">² Université Grenoble Alpes, Grenoble INP, Laboratoire de Conception et d'Intégration des Systèmes, Valence, France</footnote>
enforces the preservation of energy.

These ports are usually of three different natures: storage ports, control ports, and dissipative ports. Storage ports contain a state variable $\alpha$ and its flows and effort are defined as $f_s = -\frac{d}{dt}\alpha$, $e_s = \nabla_{\alpha}H$. Control ports allow for both controlling the system and interconnecting it with another pH system, and its flows and effort are usually defined as the control and collocated observation, respectively, $f = u, e = y$ (note that ensuring that $\langle e_u, f_u \rangle$ is well-defined and corresponds to a power requires the observation to be collocated with the control). Finally, resistive ports allow for modeling dissipativity, the flow and effort corresponding (in the mechanical case) to some velocity and friction force, respectively, such that $f_r = -R e_r$ with $R \ge 0$. Writing the power balance $\sum_i \langle e_i, f_i \rangle = 0$ gives us that $\frac{d}{dt}H(\alpha) = \langle u, y \rangle - \langle e_r, Re_r \rangle \le \langle u, y \rangle$; the variation of energy is equal to the power provided by the control minus the dissipative phenomena.

PH systems have been developed to model, simulate, and control complex multiphysics systems, including mechanics, electromagnetism, and irreversible thermodynamics (see [1] for an introductory textbook and [2] for a wide array of applications, and more specifically [3] for nonequilibrium thermodynamics using a Lagrangian variational formulation). The seminal work of [4] extended the pH framework to distributed parameter systems (DPS) with boundary energy flows. In particular, the semigroup approach applied to distributed parameter linear pH systems has yielded elegant results in the 1D case (see [5] for an introduction), with recent extensions to $N$-dimensional systems presented in [6]. Since 2002, the body of literature on distributed pH systems has grown significantly, encompassing both theoretical developments and application-based studies (see [7] for a comprehensive review).

PH systems with algebraic constraints have also been explored, leading to the development of finite-dimensional pH differential-algebraic equations (pH-DAE, see for instance [8] for linear descriptor systems in matrix representation, [9] for abstract dissipative Hamiltonian DAE in infinite dimension, and [10] for a review on control applications). These arise naturally from the interconnection of subsystems, which results in constraints between effort and flow variables in the underlying Dirac structure. Alternatively, constraints may stem from implicit energy constitutive equations, affecting the relationship between effort and energy state variables in a Lagrangian submanifold (see [11, 12] for nonlinear cases).

Recently, there has been increasing interest in distributed parameter models represented in implicit form within the pH framework. These models include examples such as the implicit formulation of the Allen-Cahn equation [13], the Dzektser equation governing the seepage of underground water [14], and the nonlocal visco-elastic models for nanorods [15, 16]. Accompanying these advances, structure-preserving numerical methods have been proposed (see [17]). The introduction of boundary control pH systems has been extended to systems where the variational derivative of the Hamiltonian is replaced by reciprocal operators, as shown in [18]. This generalization has led to the definition of a boundary pH system on a Stokes-Lagrange subspace, allowing the representation of previously discussed implicit models, such as the elastic rod with nonlocal elasticity.

When working with distributed pH systems governed by partial differential equations (PDEs) on a spatial domain, special attention must be given to boundary variables. Specifically, Stokes-Dirac structures are employed to account for boundary power ports, while Stokes-Lagrange structures are used to describe boundary energy ports (see [19, 20]). The explicit formulation of these structures plays a crucial role in ensuring energy-conserving behavior within the system dynamics. Field theory has been used to study different formulations of port-Hamiltonian systems; see [21] for an introduction. This
approach allows for different representations of pH systems [22, 23] by considering different definitions of the energy variables.

This paper aims to extend the preliminary work presented in [24] and achieve three objectives. First, it defines the Stokes-Lagrange structure by following the methodology of [25] on Dirac structures and extending the Stokes-Lagrange subspaces presented in [18] to N-dimensional domains. Second, it presents examples of 2D and 3D systems that admit both Stokes-Dirac and Stokes-Lagrange representations; i.e., systems that can be written using a Stokes-Dirac or a Stokes-Lagrange structure. Third, it discusses the differences and relations between these two structures and how the newly defined Stokes-Lagrange structure can be useful for modeling, numerics, and control. In particular, it is shown how the Stokes-Lagrange structure allows for alternate control laws using the energy control port instead of the power control port.

The paper is organized as follows: In Section 1, the main ideas of the article are presented using a simple model, namely the 1D linear wave equation; in particular, how different representations are obtained considering either Stokes-Dirac or Stokes-Lagrange representation and how implicit constitutive relations can be taken into account. In Section 2, the definitions of a Stokes-Dirac and a Stokes-Lagrange structure are presented. These structures and their relations are then illustrated in Section 3 through a series of examples: the Reissner-Mindlin thick plate model and the Kirchhoff-Love thin plate model; the Maxwell's equation in classical and vector potential formulation; and finally a dissipative nonlocal case, the Dzektser equation. For the plate models and Maxwell's equations, two representations are presented using either Stokes-Dirac or Stokes-Lagrange structures. In Section 4, applications to boundary and distributed control using energy control ports are presented; in particular, it is shown how the energy control ports allow for interconnections using nonseparable Hamiltonian functionals. Finally, 5 appendices are found at the end of this paper which detail more precisely the operator transposition procedure A, Maxwell reciprocity conditions B, the Stokes-Lagrange structure C, and the last two contain proofs of variational derivatives D and Stokes' identities E.

## 1.1. Study of a simple case: the 1D wave equation

Let us begin with the 1D linear wave equation. This equation has already been thoroughly studied in the pH community [1, 4, 18, 26], and its relative simplicity will allow us to introduce the main ideas of the paper.

Let $[a, b] \subset \mathbb{R}$ be an interval, and consider $w(t, x)$ the vertical displacement of a string over this interval. Then the wave equation reads [4]:

$$ \partial_t(\rho \partial_t w) = \partial_x(E \partial_x w), \qquad (1.1) $$

with $\rho(x) > 0$ the density and $E(x) > 0$ the tension of the string. A Hamiltonian associated to this equation is the total mechanical energy given by the sum of the kinetic and elastic energies:

$$ H(w) := \frac{1}{2} \int_a^b \rho (\partial_t w)^2 + E (\partial_x w)^2 \, dx. \qquad (1.2) $$
### 1.1.1. The classical pH representation

To write (1.1) as a pH system, let us follow [4]. Choose energy variables to write the Hamiltonian: $p := \rho \partial_t w$ is the linear momentum, and $\varepsilon := \partial_x w$ is the strain. Then the Hamiltonian (1.2) becomes*:

$$H_W^{SD}(\varepsilon, p) = \frac{1}{2} \int_a^b \frac{1}{\rho} p^2 + E \varepsilon^2 \, dx. \qquad (1.3)$$

The co-state variables are then computed as the variational derivatives [27] of the Hamiltonian (1.3) with respect to the state variables $\varepsilon, p$, which yields: $v := \delta_p H_W^{SD} = \frac{1}{\rho} p$ as the velocity, and $\sigma = \delta_\varepsilon H_W^{SD} = E \varepsilon$ as the stress. Then, the classical pH formulation of the 1D linear wave equation (1.1) reads:

$$\frac{\partial}{\partial t} \begin{bmatrix} \varepsilon \\ p \end{bmatrix} = \begin{bmatrix} 0 & \partial_x \\ \partial_x & 0 \end{bmatrix} \begin{bmatrix} \sigma \\ v \end{bmatrix}, \qquad (1.4)$$

and together with the constitutive relations, namely Hooke's law and the definition of linear momentum:

$$\begin{bmatrix} \sigma \\ v \end{bmatrix} = \begin{bmatrix} E & 0 \\ 0 & \frac{1}{\rho} \end{bmatrix} \begin{bmatrix} \varepsilon \\ p \end{bmatrix}. \qquad (1.5)$$

In order to identify the boundary power port, one can compute the power balance $\frac{d}{dt} H_W^{SD}$ along the trajectory of a solution, which yields:

$$\forall t > 0, \quad \frac{d}{dt} H_W^{SD}(\varepsilon(t), p(t)) = [v \sigma]_a^b = \sigma(t, b)v(t, b) - \sigma(t, a)v(t, a), \qquad (1.6)$$

namely, the product of the force and the velocity at both boundaries.

**Remark 1.** We denote the flow variables as $f = (-\partial_t \varepsilon, -\partial_t p)^\top$ and $f_\partial = (-v(t, a), v(t, b))^\top$; the effort variables: $e = (\sigma, v)^\top$ and $e_\partial = (\sigma(t, a), \sigma(t, b))^\top$; and equation (1.6) is equivalently rewritten as: $\langle e, f \rangle + e_\partial \cdot f_\partial = 0$. This shows the power preserving nature of this system: power is either put or removed at the boundary through the boundary power port ($f_\partial, e_\partial$). This motivates the definition of Stokes-Dirac structures, as will be enlightened in Section 2.

A choice of state variables was made in (1.3), leading to the Hamiltonian given as an explicit functional of the state variables. However, this choice is not canonical. Hence, two questions naturally arise: What could a different choice of variables (i.e., representation) yield? And what happens when the Hamiltonian is not an explicit functional of the state variables anymore?

### 1.1.2. A different representation

Let us now choose a different set of variables, e.g., the displacement $w$ and the linear momentum $p$, thus the Hamiltonian (1.2) reads:

$$H_W^{SL}(w, p) = \frac{1}{2} \int_a^b \frac{1}{\rho} p^2 + E (\partial_x w)^2 \, dx. \qquad (1.7)$$

<footnote>*The superscripts .$^{SD}$ and .$^{SL}$ refer to the Stokes-Dirac or Stokes-Lagrange representation of the system. The subscript .$_w$ refers to the wave equation.</footnote>
Computing the co-state variables yields $N := \delta_w H_W^{SL} = -\partial_x (E \partial_x w)$, the stress resultant, and $v := \delta_p H_W^{SL} = \frac{1}{\rho} p$, the velocity (see D.1 for a detailed proof), which gives us the following pH system:

$$ \frac{\partial}{\partial t} \begin{bmatrix} w \\ p \end{bmatrix} = \begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix} \begin{bmatrix} N \\ v \end{bmatrix}, \qquad (1.8) $$

together with the constitutive relations:

$$ \begin{bmatrix} N \\ v \end{bmatrix} = \begin{bmatrix} -\partial_x(E\partial_x\cdot) & 0 \\ 0 & \frac{1}{\rho} \end{bmatrix} \begin{bmatrix} w \\ p \end{bmatrix}. \qquad (1.9) $$

**Remark 2.** With this representation (1.8)–(1.9), the differential operator $\partial_x$ appears in the Hamiltonian (1.7), hence in the constitutive relations (1.9), and not in the structure matrix operator (1.8), as in (1.4). This will require a broader notion of a Hamiltonian and be further discussed in Section 2.

Finally, one can compute the power balance as follows:

$$ \forall t > 0, \quad \frac{d}{dt} H_W^{SL}(w, p) = [(\partial_t w) E(\partial_x w)]_a^b. \qquad (1.10) $$

**Remark 3.** The physical interpretation of this power balance (1.10) is identical to that of the first representation (1.6). However, the mathematical objects used are different (namely, the time derivative of a state variable and the Neumann trace of a state variable, instead of Dirichlet and normal traces of co-state variables). These boundary ports do not fit in the Stokes-Dirac framework anymore, as they are not functions of the effort variables $(N, v)$ but of the state variable $w$. Hence, an extension of the pH framework has to be performed. This has been done for a class of differential operators on 1D domains in [18] by using Lagrangian subspaces. The present work proposes an extension to $N$-dimensional domains, and by analogy with Stokes-Dirac structures, it will lead to the definition of Stokes-Lagrange structures.

### 1.1.3. Implicit Hamiltonian

Another instance where the Stokes-Lagrange structure will prove beneficial involves certain constitutive relations, particularly those that are nonlocal. Let us consider the representation (1.4), and say that one is studying a nanorod onto which the stress is nonlocal, i.e., the stress not only depends on the local strain but also on other points of the domain. In Eringen's original paper [28], nonlocal constitutive relations are first presented as a kernel operator:

$$ \sigma(t, x) = \int_a^b \alpha(|x - x'|) E \varepsilon(t, x') dx', \qquad (1.11) $$

with the kernel $\alpha(x) := \frac{1}{2\sqrt{\mu}} e^{-\frac{1}{\sqrt{\mu}}x}$ and $\mu > 0$; $\sqrt{\mu}$ being the characteristic length of the nonlocal effects. Then, assuming Robin boundary conditions $\sigma(a) - \sqrt{\mu} \partial_x \sigma(a) = \sigma(b) + \sqrt{\mu} \partial_x \sigma(b) = 0$ [28, 29], the nonlocal constitutive relation is written equivalently:

$$ (1 - \mu \partial_x^2) \sigma = E \varepsilon. \qquad (1.12) $$
**Modeling aspects** It turns out that on top of some functional analysis arguments (which allow for the study of a partial differential equation instead of an integro-partial differential equation), this formulation is much better numerically as will be shown in the following. Such a constitutive relation is given in [15, 28] and leads to the constitutive relations:

$$ \begin{bmatrix} (1 - \mu \partial_{x^2}^2) & 0 \\ 0 & I \end{bmatrix} \begin{bmatrix} \sigma \\ \nu \end{bmatrix} = \begin{bmatrix} E & 0 \\ 0 & \frac{1}{\rho} \end{bmatrix} \begin{bmatrix} \varepsilon \\ p \end{bmatrix}, \quad (1.13) $$

with $\mu > 0$ the nonlocality parameter.

This constitutive relation is implicit in the sense that an (unbounded) operator is to be found on the left-hand side of (1.13), i.e., in front of the co-state variables. Hence, the Hamiltonian is not an explicit function of the state variables. Indeed, the co-state variables are, by definition, the variational derivatives of the Hamiltonian with respect to the state variables. Then, the presence of the operator on the left-hand side of (1.13) corresponds to, roughly speaking, $\delta_{\varepsilon}H = (1 - \mu\partial_{x^2}^2)^{-1}E\varepsilon$—one should be cautious about boundary terms in the existence and definition of an inverse here—which does determine the Hamiltonian $H$, but not in a straightforward manner, or in other words, implicitly.

To solve this issue, two possibilities have been explored: extend the flow and effort space in order to put this relation as a constraint in the Dirac structure [16], or use a Lagrange subspace to define the Hamiltonian [18]. In this article, we will focus on the latter, by first extending this setting to $N$-dimensional spatial domains (which will then be called a Stokes-Lagrange structure) and presenting some examples.

When using such an approach, it is useful to define the *latent state space*. In the above linear 1D wave example, the latent deformation $\lambda$ is defined by $(1 - \mu\partial_{x^2}^2)\lambda = \varepsilon$.

**Remark 4.** Note that as the parameter $\mu$ tends to zero, the relation (1.13) turns into the classical local stress-strain relation (1.5) (i.e., Hooke's law). This property is rather important when dealing with such systems, in particular for numerics where different model parametrization might require very small values of $\mu$. In particular, when using the representation proposed in [16], this property is lost: the relation diverges to infinity as this parameter tends to zero.

**Numerical aspects** Let us now discuss the advantages of such an implicit relation over an explicit nonlocal relation. First, considering a test function $\phi$ over $[a, b]$, the variational formulations of (1.11) and (1.12) may be written:

$$ \int_a^b \phi(x) \sigma(t, x) \mathrm{d}x = \int_a^b \int_a^b \alpha(|x - x'|) E \phi(x) \varepsilon(t, x') \mathrm{d}x' \mathrm{d}x, \\ \int_a^b \phi(x) \sigma(t, x) + \mu \partial_x \phi(x) \partial_x \sigma(t, x) \mathrm{d}x = \int_a^b E \phi(x) \varepsilon(t, x) \mathrm{d}x. $$

Let us now apply the finite element method to such equations as follows. Let $(\phi_i)_{i \in [1, N]}$ be a family of $\mathbb{P}^1$ Lagrange finite elements over $[a, b]$, and then, defining $\sigma^d(t, x) := \sum_i \phi_i(x)\bar{\sigma}_i(t)$ and $\varepsilon^d(t, x) := \sum_i \phi_i(x)\bar{\varepsilon}_i(t)$, one gets:

$$ \forall i \in [1, N], \quad \sum_j \underbrace{\int_a^b \phi_i \phi_j \bar{\sigma}}_{M_{i,j}} = \sum_j \underbrace{\int_a^b \int_a^b \alpha(|x-x'|) \phi_i(x) E \phi_j(x') \mathrm{d}x \mathrm{d}x'}_{K_{i,j}^\alpha}, $$
$$ \forall i \in [1, N], \quad \sum_j \left[ \int_a^b \phi_i \phi_j + \underbrace{\int_a^b (\partial_x \phi_i \mu \partial_x \phi_j)}_{K_{i,j}^\mu} \right] \bar{\varepsilon} = \sum_j \underbrace{\int_a^b \phi_i E \phi_j \bar{\varepsilon}}_{K_{i,j}^E} $$

More compactly we get:

$$ \begin{aligned} M \bar{\sigma} &= K^\alpha \bar{\varepsilon}, && (\text{explicit formulation}), \\ (M + K^\mu) \bar{\sigma} &= K^E \bar{\varepsilon}, && (\text{implicit formulation}). \end{aligned} $$

Then, in both cases a linear system has to be solved (since $M \neq I_N$ and $(M + K^\mu) \neq I_N$). However in the implicit case, the matrices are sparse whereas in the explicit case, a double integration has to be carried (which slows the assembly of the matrix) and $K^\alpha$ is full, which greatly degrades the numerical simulation CPU time and memory usage (see Figure 1). In particular, the memory usage increases ($O(N^2)$ nonzero components instead of $O(N)$).

<figure><img src="image_2.png" /><figcaption>Figure 1. Comparison of the assembly and solving time of the implicit vs. explicit formulations.</figcaption></figure>

## 1.2. Operator transposition

As presented in the previous subsection, the Stokes-Lagrange structure allows us to describe implicit constitutive relations. Let us now show that this Stokes-Lagrange structure gives us different choices of representations and that one can choose whether the differential operators are to be found in the Dirac structure or in the Hamiltonian [22]. Throughout the article, given an operator $A$ we will denote by $A^*$ the adjoint of $A$ [30].

We will consider the general case as follows (detailed assumptions and proofs are provided in
Appendix A): Let us consider a spatial domain $\Omega \subset \mathbb{R}^n$, and the following wave-like system:

$$ \begin{cases} \partial_t \alpha_1 = \kappa \alpha_2, \\ \partial_t \alpha_2 = -K^\dagger (\eta K \alpha_1), \end{cases} \qquad (1.14) $$

with $\alpha_1, \alpha_2$ of size $n$ and $\eta, \kappa$ some symmetric and bounded from above and below operators of appropriate sizes. $K$ is a closed and densely defined operator $K: D(K) \subset L^2(\Omega, \mathbb{R}^n) \to L^2(\Omega, \mathbb{R}^m)$ satisfying a Stokes' identity. More precisely, for all $\phi \in D(K)$, $\psi \in D(K^\dagger)$:

$$ \int_{\Omega} K(\phi) \cdot \psi \, dx = \int_{\Omega} \phi \cdot K^{\dagger}(\psi) \, dx + \langle \beta(\psi), \gamma(\phi) \rangle_{U, Y}, $$

with $K^\dagger$ being the formal adjoint of $K$, $U$ and $Y := U'$ the control and observation subspaces, and $\gamma: D(K) \to Y$ and $\beta: D(K^\dagger) \to U$ the boundary operators. The associated Hamiltonian of (1.14) is:

$$ H := \frac{1}{2} \int_{\Omega} (K \alpha_1) \cdot \eta(K \alpha_1) + \alpha_2 \cdot \kappa \alpha_2 \, dx \geq 0. $$

Now, in order to represent (1.14) as a pH system, one can choose as the energy variable either $(\alpha_1^{SD}, \alpha_2^{SD}) = (K\alpha_1, \alpha_2)$, which removes the operator from the Hamiltonian, or one can choose $(\alpha_1^{SL}, \alpha_2^{SL}) = (\alpha_1, \alpha_2)$. This yields the two following pH systems:

$$ \begin{bmatrix} \partial_t \alpha_1^{SD} \\ \partial_t \alpha_2^{SD} \end{bmatrix} = \underbrace{\begin{bmatrix} 0 & K \\ -K^\dagger & 0 \end{bmatrix}}_{=: J^{SL}} \begin{bmatrix} e_1^{SD} \\ e_2^{SD} \end{bmatrix}, \quad \begin{cases} e_1^{SD} = \eta \alpha_1^{SD}, \\ e_2^{SD} = \kappa \alpha_2^{SD}, \end{cases} \qquad (1.15) $$

being called the Stokes-Dirac representation, and:

$$ \begin{bmatrix} \partial_t \alpha_1^{SL} \\ \partial_t \alpha_2^{SL} \end{bmatrix} = \underbrace{\begin{bmatrix} 0 & \mathrm{Id} \\ -\mathrm{Id} & 0 \end{bmatrix}}_{=: J^{SL}} \begin{bmatrix} e_1^{SL} \\ e_2^{SL} \end{bmatrix}, \quad \begin{cases} e_1^{SL} = K^\dagger (\eta K \alpha_1^{SL}), \\ e_2^{SL} = \kappa \alpha_2^{SL}, \end{cases} \qquad (1.16) $$

being called the Stokes-Lagrange representation.

**Remark 5.** We call a representation of a pH system a Stokes-Dirac representation when the differential operators are only present in the structure matrix; and we call it a Stokes-Lagrange representation when the differential operators are only present in the Hamiltonian. Note that some systems (e.g., the nanorod equation) possess differential operators both in the Hamiltonian and the structure matrix [18]. Precise definitions and details about these two structures are given in Section 2.

Finally, we define $G$ along with its formal adjoint $G^\dagger$ as:

$$ G = \begin{bmatrix} K & 0 \\ 0 & \mathrm{Id} \end{bmatrix}, \quad G^\dagger = \begin{bmatrix} K^\dagger & 0 \\ 0 & \mathrm{Id} \end{bmatrix}, $$

and we get the following theorem:

<footnote>$^\dagger K^\dagger$ is the adjoint of $K$ “up to boundary terms”, i.e., it is the adjoint of $K$ in the subspace $\ker(\gamma) \subset D(K)$, or more precisely $(K_{|\ker(\gamma)})^* = K^\dagger$ and $(K_{|\ker(\beta)})^* = K$.</footnote>
**Theorem 1.** The Stokes-Dirac (1.15) and Stokes-Lagrange (1.16) representations of the system (1.14) satisfy the following equalities:

$$ \left\{ \begin{array}{l} \alpha^{SD} = G\alpha^{SL}, \\ G^{\dagger}e^{SD} = e^{SL}, \\ GJ^{SL}G^{\dagger} = J^{SD}. \end{array} \right. \qquad (1.17) $$

They are then said to be equivalent.

*Proof.* See Appendix A.3. □

**Remark 6.** Note that the position of G and $G^\dagger$ are not the same between line one and two of (1.17). From a geometrical viewpoint, this can be explained by the fact that state variables are usually described as vectors whereas effort variables are described as covectors; leading to contravariant and covariant transformations, respectively.

**Remark 7.** Note that $K$ may have a nonzero kernel. Then, when using the Stokes-Dirac representation, a linear subspace of the state space is removed from the representation, namely $ker(K)$, and by the definition of the Hamiltonian, this subspace exactly corresponds to states that have zero energy: $\forall \alpha \in ker(K)$, $K\alpha \cdot \eta K\alpha = 0$. This will be commented in Example 1 where the rigid body motion is not taken into account in the Stokes-Dirac representation.

**Remark 8.** This procedure has been presented here using an operator theory point of view which translates directly to vector calculus; it has also been carried from a geometric point of view using jet extension in [22, 31].

**Example 1.** (Wave equation: N-dimensional case)

Let us consider the wave equation on $\Omega \subset \mathbb{R}^n$:

$$ \partial_t(\rho \partial_t w) = \text{div}(E \text{grad}(w)), $$

with the Hamiltonian $H = \frac{1}{2} \int_{\Omega} \rho (\partial_t w)^2 + E |\text{grad}(w)|^2 \, dx$. Defining $\varepsilon := \text{grad}(w)$ and $p := \rho \partial_t w$, one deduces the co-energy variables $\sigma = E \varepsilon$ and $v = \frac{1}{\rho} p$ and gets the following Stokes-Dirac formulation:

$$ \partial_t \begin{bmatrix} \varepsilon \\ p \end{bmatrix} = \begin{bmatrix} 0 & \text{grad} \\ \text{div} & 0 \end{bmatrix} \begin{bmatrix} \sigma \\ v \end{bmatrix}. $$

Using directly $w$ and $p$, one can then write the Stokes-Lagrange representation as:

$$ \partial_t \begin{bmatrix} w \\ p \end{bmatrix} = \begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix} \begin{bmatrix} \delta_w H \\ \delta_p H \end{bmatrix}, \quad \text{with} \quad \begin{bmatrix} \delta_w H \\ \delta_p H \end{bmatrix} = \begin{bmatrix} -\text{div}(E \text{grad}(w)) \\ \frac{1}{\rho} p \end{bmatrix}. $$

In particular, let us denote the transposition operator:

$$ G = \begin{bmatrix} \text{grad} & 0 \\ 0 & \text{Id} \end{bmatrix}, \quad G^{\dagger} = \begin{bmatrix} -\text{div} & 0 \\ 0 & \text{Id} \end{bmatrix}, $$

which yields:

$$ \begin{bmatrix} \varepsilon \\ p \end{bmatrix} = G \begin{bmatrix} w \\ p \end{bmatrix}, \quad G^{\dagger} \begin{bmatrix} \sigma \\ v \end{bmatrix} = \begin{bmatrix} \delta_w H \\ v \end{bmatrix}. $$
**Remark 9.** Note that the kernel of G is precisely the constant displacements: given $c \in \mathbb{R}$, $G[c \ 0]^T = 0$; hence in the Stokes-Dirac representation of the wave equation, the rigid body motion is lost [32]. However, this is not the case if one extends the original state variables $(w, p)$ with the first jet $\partial_x w = \varepsilon$ while keeping the displacement $w$ in the state variable (see in particular [31]).

To conclude and motivate the following section, let us summarize the important properties highlighted in the linear wave equation example.

### 1.3. Summary and main results

The pH formulation of the wave equation exhibits the following properties: This system can be decomposed into two structures; one that defines the energy linked to the state variables, and one that describes how this energy is exchanged between the ports. The former is usually called the Hamiltonian and the latter the Dirac structure.

Let us emphasize once again that the usual Hamiltonian definition is not sufficient to describe implicit relations and does not take into account boundary terms when differential operators are to be found in the Hamiltonian.

Hence, as in the case of the Dirac structure [33], we need to extend the energy definition as a Hamiltonian to a so-called Lagrange subspace to account for implicit relations and as in the case of the Stokes-Dirac structure [25], we need to define a special case of the Lagrange subspace, namely a Stokes-Lagrange structure, to include boundary terms [18] when differential operators are present.

## 2. Stokes-Dirac and Stokes-Lagrange structures

The Stokes-Dirac structure is already well known in the pH community, and we will simply recall the basic facts presented in [25] that will motivate our choices regarding the Stokes-Lagrange structure. The Stokes-Lagrange structure has only been studied on 1D domains with a restricted set of operators [18], but here we will extend it to $N$-dimensional domains. To do so, let us first define the Dirac and Lagrange structures.

### 2.1. Dirac and Lagrange structures

Let us consider a Hilbert space $\mathcal{P}$, and then define the effort space $\mathcal{X} = \mathcal{F} \subset \mathcal{P}$ as a dense Hilbert subspace and the flow and state space as $\mathcal{E} = \mathcal{F}'$, the dual of $\mathcal{F}$ with respect to the pivot space $\mathcal{P}$.

**Remark 10.** Identifying the state and flow spaces $\mathcal{X}$ and $\mathcal{F}$ is only possible in the linear case (where we currently restrain ourselves). In the nonlinear case, given a manifold $\mathcal{M}$, the Dirac structure is defined on $TM \oplus T^*\mathcal{M}$ and the Lagrange submanifold on $T^*\mathcal{M}$ (see [11, 12, 19] for details).

Now following [18] let us define the plus pairing and minus pairing as:

$$ \forall \begin{bmatrix} f_1 \\ e_1 \end{bmatrix}, \begin{bmatrix} f_2 \\ e_2 \end{bmatrix} \in \mathcal{F} \times \mathcal{E}, \quad \left\langle\left\langle\begin{bmatrix} f_1 \\ e_1 \end{bmatrix}, \begin{bmatrix} f_2 \\ e_2 \end{bmatrix}\right\rangle\right\rangle_+ = \langle e_2, f_1 \rangle_{\mathcal{E}, \mathcal{F}} + \langle e_1, f_2 \rangle_{\mathcal{E}, \mathcal{F}}, $$

$$ \forall \begin{bmatrix} x_1 \\ e_1 \end{bmatrix}, \begin{bmatrix} x_2 \\ e_2 \end{bmatrix} \in \mathcal{X} \times \mathcal{E}, \quad \left\langle\left\langle\begin{bmatrix} x_1 \\ e_1 \end{bmatrix}, \begin{bmatrix} x_2 \\ e_2 \end{bmatrix}\right\rangle\right\rangle_- = \langle e_2, x_1 \rangle_{\mathcal{E}, \mathcal{X}} - \langle e_1, x_2 \rangle_{\mathcal{E}, \mathcal{X}}. $$
Then, defining the orthogonal of a subspace with respect to the plus pairing as $⊥_+$, i.e.:

$$ \forall Q \subset \mathcal{F} \times \mathcal{E}, \quad Q^{\perp+} := \{z \in \mathcal{F} \times \mathcal{E} \mid \forall \tilde{z} \in Q, \langle\langle z, \tilde{z} \rangle\rangle_+ = 0\}, $$

and similarly with respect to the minus pairing as $⊥_-$, we can properly define Lagrange and Dirac structures as:

**Definition 2.** A subspace $\mathcal{D} \subset \mathcal{F} \times \mathcal{E}$ is called a Dirac structure if:

$$ \mathcal{D} = \mathcal{D}^{\perp+}. $$

In particular a Dirac structure is isotropic ($\mathcal{D} \subset \mathcal{D}^{\perp+}$) and co-isotropic ($\mathcal{D}^{\perp+} \subset \mathcal{D}$) with respect to the plus pairing.

**Definition 3.** A subspace $\mathcal{L} \subset \mathcal{X} \times \mathcal{E}$ is called a Lagrangian subspace if:

$$ \mathcal{L} = \mathcal{L}^{\perp-}. $$

In particular, a Lagrangian subspace is isotropic ($\mathcal{L} \subset \mathcal{L}^{\perp-}$) and co-isotropic ($\mathcal{L}^{\perp-} \subset \mathcal{L}$) with respect to the minus pairing.

Let us now illustrate the meaning of the two previous definitions. The Dirac structure allows for describing the energy routing in a system (or equivalently entropy/free energy/free enthalpy, etc.), and to represent a system as a network of subsystems exchanging energy through power ports. These ports are usually of three different natures (see [1]): energy storage ports, input/output (control) ports, and resistive ports. Given a set of storage ports ($f_s, e_s$), resistive ports ($f_R, e_R$), and control ports ($f_u, e_u$) that belongs to a certain Dirac structure $\mathcal{D}$, one can deduce from the isotropy the following power balance:

$$ \langle e_s, f_s \rangle_{\mathcal{E}_s, \mathcal{F}_s} + \langle e_R, f_R \rangle_{\mathcal{E}_R, \mathcal{F}_R} + \langle e_u, f_u \rangle_{\mathcal{E}_u, \mathcal{F}_u} = 0, $$

which states that given a port ($f_i, e_i$), the power provided/received by this port expressed as $\langle e_i, f_i \rangle$ (e.g., force × velocity, current × voltage) is preserved and can only be provided (resp. received) to (resp. by) other subsystems.

The Lagrangian subspace defines the energy of the system by extending the classical Hamiltonian definition [11, 12, 19]. Isotropy and co-isotropy with respect to the minus product enforces the Maxwell's reciprocity conditions (see Definition 19) on the constitutive relations [34]. This guarantees the existence of a controlled Hamiltonian $H(z, \chi)$, with $(\chi, \delta_\chi H)$ being the energy control port (see Appendix B for a detailed exposition) and $z$ the latent state variable.

**Remark 11.** Given an implicit linear relation between the state and effort variable as $S^\top \alpha = P^\top e$ with $\alpha, e \in \mathbb{R}^n$ and $S, P \in \mathbb{R}^{n \times n}$, Maxwell's reciprocity conditions read:

$$ S^\top P = P^\top S, $$

which ensure that a corresponding latent state variable $z \in \mathbb{R}^n$ such that $\alpha = Pz, e = Sz$ exists, along with a Hamiltonian $H(z)$ that satisfies the power balance:

$$ \frac{d}{dt} H(z) = \langle \partial_t \alpha, e \rangle. $$
In the linear case, these conditions can be written as [35]:

$$S^{\top}P - P^{\top}S = 0,$$

in which, given $i \in \{1, 2\}$, $\begin{bmatrix} \alpha_i \\ e_i \end{bmatrix} = \begin{bmatrix} P \\ S \end{bmatrix} z_i$ is equivalent to:

$$\langle\langle\begin{bmatrix} \alpha_1 \\ e_1 \end{bmatrix}, \begin{bmatrix} \alpha_2 \\ e_2 \end{bmatrix}\rangle\rangle_-=0.$$

Note that in the nonlinear case, the Lagrange subspace becomes a Lagrangian submanifold [12]. See Appendix B for a proof of the existence of a Hamiltonian given the Maxwell's reciprocity conditions.

In this work, the Lagrangian subspace is referred to as a Lagrange structure for its similarities with the Dirac structure (isotropy and co-isotropy with respect to the plus/minus pairing [36]). These two structures will give rise to equivalent representations as will be discussed later. Note that such a matter has been studied in the finite-dimensional case in [35].

**Remark 12.** The Dirac and Lagrange structures can be studied in the broader notion of Krečn spaces [37] using the indefinite plus and minus product, respectively. They would then correspond to hyper-maximal neutral subspaces of Krečn spaces equipped with the plus and minus product, respectively. Such an approach has been suggested in [25] for Dirac structures.

## 2.2. Defining a port-Hamiltonian system

A pH system is defined by a Dirac structure $\mathcal{D}$, a Lagrange structure $\mathcal{L}$, and a resistive subspace $\mathcal{R}$ such that$^{‡}$:

$$\underbrace{\begin{bmatrix} f_s & f_R & f_u & e_s & e_R & e_u \end{bmatrix}^{\top} \in \mathcal{D}}_{\text{Energy routing}}, \quad \underbrace{\begin{bmatrix} \alpha & \chi & e_s & \varepsilon \end{bmatrix}^{\top} \in \mathcal{L}}_{\text{Energy definition}}$$

$$\underbrace{f_s = -\partial_t \alpha}_{\text{Dynamics}}, \quad \underbrace{(f_R, e_R) \in \mathcal{R}}_{\text{Resistive relation}}.$$

$(f_s, e_s), (f_u, e_u)$, and $(f_R, e_R)$ are the state, control, and resistive power ports, respectively; and $(\alpha, e_s)$ and $(\chi, \varepsilon)$ are the state and control energy ports. In particular, the resistive relation $(f_R, e_R) \in \mathcal{R}$ gives us $\langle e_R, f_R \rangle \le 0$ (by the definition of a resistive structure [1]). This pH system can be represented as the following diagram:

<figure><img src="image_3.png" /><figcaption>**Figure 2.** Diagram of an implicitly defined port-Hamiltonian system.</figcaption></figure>

<footnote>$^{‡}$Note that $f_s = -\partial_t \alpha$ is due to the sign convention and allows us to write $\langle e, f \rangle = 0$.</footnote>
From the Lagrange structure, we get the existence of a Hamiltonian $H(z, \chi)$, $z$ being the latent state variable and $\chi$ the energy control variable. This Hamiltonian satisfies along the trajectories:

$$ \frac{d}{dt} H(z, \chi) = \langle e_s, \partial_t \alpha \rangle_{\mathcal{E}_s, \mathcal{F}_s} + \langle \varepsilon, \partial_t \chi \rangle_{u, y}. $$

Then, one can deduce from the Dirac and resistive structure the following power balance:

$$ \begin{aligned} \frac{d}{dt} H(z, \chi) &= \langle e_R, f_R \rangle_{\mathcal{E}_R, \mathcal{F}_R} + \langle e_u, f_u \rangle_{\mathcal{E}_u, \mathcal{F}_u} + \langle \varepsilon, \partial_t \chi \rangle_{u, y} \\ &\le \langle e_u, f_u \rangle_{\mathcal{E}_u, \mathcal{F}_u} + \langle \varepsilon, \partial_t \chi \rangle_{u, y}. \end{aligned} $$

As a consequence, every pH system is cyclo-passive [38] and is passive if $H \ge 0$ (cyclo-passivity does not require the storage function $H$ to be positive whereas passivity does, see, e.g., [38] for details).

**Remark 13.** Even though pH systems are described here in implicit form (tuples of variables belonging to sets); explicit formulations of pH systems, and in particular explicit representations of the Stokes-Dirac and Stokes-Lagrange structures, are given in Subsection 2.5.

**Remark 14.** Note that the Dirac structure and Lagrange structure are usually defined on different spaces: $(\mathcal{F} \times \mathcal{F}_R \times \mathcal{F}_u) \times (\mathcal{E} \times \mathcal{E}_R \times \mathcal{E}_u)$ and $(\mathcal{X} \times \mathcal{Y} \times \mathcal{E} \times \mathcal{U})$, respectively, i.e., the Dirac structure may contain a resistive structure $(\mathcal{F}_R, \mathcal{E}_R)$ and an input space with collocated output $(\mathcal{F}_u \times \mathcal{E}_u)$; whereas the Lagrange structure contains the state and costate $(\mathcal{X}, \mathcal{E})$ along with an energy control port $(\mathcal{Y}, \mathcal{U})$.

## 2.3. The Stokes-Dirac structure

A Stokes-Dirac structure is a particular case of Dirac structures. More precisely, it allows us to explicitly take into account the boundary terms when differential operators define the dynamics. We will follow the definition presented in [25, Eq. (4.4)] where it is defined using operator colligation. To do so, let us consider two Hilbert spaces $\mathcal{F} = \mathcal{F}_s \times \mathcal{F}_u$ and $\mathcal{E} = \mathcal{E}_s \times \mathcal{E}_u$, the flow and effort spaces; $\mathcal{E}$ being the dual of $\mathcal{F}$.

Now, let $J: \mathcal{D}(J) \subset \mathcal{E}_s \to \mathcal{E}_s$ be the structure operator. Defining $\mathcal{W}_1 := \mathcal{D}(J)$, let $G: \mathcal{W}_1 \to \mathcal{E}_u$ and $K: \mathcal{W}_1 \to \mathcal{F}_u$ be the two observation and control operators, and $\mathcal{W}_0 = \ker(K) \cap \ker(G)$. Then, let us define the bond space $\mathcal{B} := \mathcal{F} \times \mathcal{E}$ and assume, following [25, Theorem 4.3] and [25, Proposition 4.4], that:

**Assumption 1.** (skew-symmetry, maximality, and density)

* $\forall z \in \mathcal{W}_1$, $\langle Jz, z \rangle_{\mathcal{E}_s} = \langle Gz, Kz \rangle_{\mathcal{E}_u, \mathcal{F}_u}$.

* $J_0 := J_{\mid \mathcal{W}_0}$ is densely defined and satisfies $J_0^* = -J$.

* The operator $[\begin{matrix} K \\ G \end{matrix}]$ is onto in $\mathcal{F}_u \times \mathcal{E}_u$.

The Stokes-Dirac structure can be defined as:

$$ \mathcal{D} := \begin{bmatrix} J \\ K \\ \mathrm{Id} \\ G \end{bmatrix} \mathcal{W}_1 \subset \mathcal{B}. $$

Assumption 1 guarantees that it is a Dirac structure, i.e., $\mathcal{D}^{\perp} = \mathcal{D}$ (see [25]).
**Remark 15.** Let us comment on Assumption 1; the first line is what is usually referred to as a “formally skew-symmetric” operator, i.e., skew-symmetric up to the boundary terms; the second and third lines give us the co-isotropy of the Dirac structure, and in particular the third line ensures that the observation and control spaces are of the appropriate size. Assumption 1 will be used in Appendix A to prove that the wave-like system (1.14) is defined on a Stokes-Dirac structure.

Note that this definition of a Dirac structure is explicit, in the sense that given $(f_s, f_u, e_s, e_u) \in \mathcal{D}$, we get by definition $f_s = J e_s$. In the next subsection, the Stokes-Lagrange subspace will allow for implicit relations, e.g., having a (possibly unbounded) operator acting in front of $f_s$.

## 2.4. The Stokes-Lagrange structure

The goal of this section is to properly define a Stokes-Lagrange structure, and to give an explicit construction, as in [18], by extending it to spatial domains with dimension greater than one. This is necessary as the following plate and electromagnetic examples require 2D and 3D domains, respectively.

This will be carried out from a functional analysis point of view and not a differential geometric point of view as in [19], which allows us to look precisely at the effect of differential operators on the Lagrange structure. However, only the linear case is explored, i.e., systems with a quadratic Hamiltonian.

Similarly to the Stokes-Dirac structure [6, 25], the goal here is to use differential operators in the Lagrange structure (i.e., in the Hamiltonian) and to describe the role of the integration by parts in such a definition.

First, let us consider a Hilbert space $\mathcal{Z}$ where the latent space will be defined, and then let us define the control space as a Hilbert space $\mathcal{U}$ and the observation space $\mathcal{Y} := \mathcal{U}'$ as the dual of the control space. Additionally, let us define a Hilbert space $\mathcal{X}$ as the state space and $\mathcal{E} := \mathcal{X}'$, the effort space, as the dual of the state space. We will now consider four operators, the first two ($S$ and $P$) will allow us to define the Hamiltonian density in the spatial domain and the last two ($\gamma$ and $\beta$) will allow us to take into account the integration by parts when $S$ or $P$ is a differential operator.

Let:

$$P: \mathcal{D}(P) \subset \mathcal{Z} \to \mathcal{X}, \quad S: \mathcal{D}(S) \subset \mathcal{Z} \to \mathcal{E},$$

be two operators, and in this work, we will assume that either $P$ or $S$ is bounded on $\mathcal{Z}$ and that the other is densely defined and closed. We will define the latent space $\mathcal{Z}_1 = \mathcal{D}(P)$ or $\mathcal{Z}_1 = \mathcal{D}(S)$ accordingly.

**Assumption 2. (Unbounded operator)** Either $P$ or $S$ is bounded on $\mathcal{Z}$.

**Remark 16.** This simplification avoids the necessity of considering the intersection of operator domains $\mathcal{D}(P) \cap \mathcal{D}(S)$ at the cost of only encompassing cases where at most one operator among $P$ and $S$ is unbounded. However, it does not imply that either $P$ or $S$ are invertible, and hence constraints on the Lagrange structure are still allowed [11]. In particular, the case where both $P$ and $S$ are bounded and $P$ is allowed to be singular is discussed in [39].

Now let us define the corresponding boundary observation and control operators: $\gamma: \mathcal{Z}_1 \to \mathcal{Y}$, $\beta: \mathcal{Z}_1 \to \mathcal{U}$. With those defined, let us denote by $\mathcal{Z}_0$ the subspace $\mathcal{Z}_0 := \ker(\gamma) \cap \ker(\beta)$ onto which controls and observations are set to zero. Finally, let us state three assumptions on these operators that will allow us to properly define a Stokes-Lagrange structure:

**Assumption 3. (Symmetry)** For all $z_1, z_2 \in \mathcal{Z}_1$ we have:

$$\langle \beta z_1, \gamma z_2 \rangle_{u, y} + \langle S z_1, P z_2 \rangle_{\varepsilon, x} = \langle S z_2, P z_1 \rangle_{\varepsilon, x} + \langle \beta z_2, \gamma z_1 \rangle_{u, y}.$$
This symmetry property is to be understood as an integration by parts on each operator, where the operator $S^*P$ is formally symmetric, i.e., $S^*P = P^*S$ on $\mathcal{Z}_0$, or $S^*P$ is symmetric “up to the boundary terms”.

**Assumption 4.** (Maximality) Let $x, e \in \mathcal{X} \times \mathcal{E}$. If:

$$ \forall z \in \mathcal{Z}_0, \quad \langle Sz, x \rangle_{\mathcal{E}, \mathcal{X}} - \langle e, Pz \rangle_{\mathcal{E}, \mathcal{X}} = 0, $$

then there exists $\tilde{z} \in \mathcal{Z}_1$ such that $x = P\tilde{z}, e = S\tilde{z}$. Defining $S_0 := S|_{\mathcal{Z}_0}$ and $P_0 := P|_{\mathcal{Z}_0}$, we get more compactly (see Appendix C for a proof):

$$ \ker [S_0^* - P_0^*] \subset \mathrm{Im} \left[ \frac{P}{S} \right]. $$

**Definition 4.** A couple $(P, S)$ defined on a Hilbert space $\mathcal{Z}_1$ is said to be maximally reciprocal [18] with respect to a subspace $\mathcal{Z}_0 \subset \mathcal{Z}$ if it satisfies Assumption 4 for that subspace.

**Remark 17.** This maximality assumption allows for the co-isotropy of the Lagrange structure to hold. It extends the second line of Assumption 1 to implicit relations.

**Assumption 5.** (Density) The range of the operator $[\begin{matrix} \gamma \\ \beta \end{matrix}]$ is dense in $\mathcal{Y} \times \mathcal{U}$.

**Remark 18.** The maximality assumption along with the symmetry allows us to formally state Maxwell's reciprocity conditions. These reciprocity conditions are sufficient in the finite-dimensional case, see [40]. However, the density assumption is mandatory in the infinite-dimensional case where we are now considering boundary terms appearing because of integration by parts.

This allows us to define properly a Stokes-Lagrange structure:

**Definition 5.** Given four operators $P, S, \gamma$, and $\beta$ satisfying assumptions 2, 3, 4, and 5, a Stokes-Lagrange structure is defined as:

$$ \mathcal{L} := \begin{bmatrix} P \\ \gamma \\ S \\ \beta \end{bmatrix} \mathcal{Z}_1. $$

Such a definition is called the image representation of the Stokes-Lagrange structure.

Let us extend the minus product on the augmented space $\mathcal{X} \times \mathcal{Y} \times \mathcal{E} \times \mathcal{U}$:

$$ \langle\langle \begin{bmatrix} x_1 \\ \chi_1 \\ e_1 \\ \varepsilon_1 \end{bmatrix}, \begin{bmatrix} x_2 \\ \chi_2 \\ e_2 \\ \varepsilon_2 \end{bmatrix} \rangle\rangle_\perp = \langle e_2, x_1 \rangle_{\mathcal{E}, \mathcal{X}} - \langle e_1, x_2 \rangle_{\mathcal{E}, \mathcal{X}} + \langle \varepsilon_2, \chi_1 \rangle_{\mathcal{U}, \mathcal{Y}} - \langle \varepsilon_1, \chi_2 \rangle_{\mathcal{U}, \mathcal{Y}}. $$

Denoting with a $\perp$ the orthogonal of a subspace in $\mathcal{X} \times \mathcal{Y} \times \mathcal{E} \times \mathcal{U}$ with this augmented minus product, we are now able to state the following theorem:
**Theorem 6.** (Isotropy and co-isotropy of the Stokes-Lagrange structure) Given $\mathcal{L}$ as in Definition 5 we have:

$$ \mathcal{L} = \mathcal{L}^{\perp}, $$

i.e., a Stokes-Lagrange structure is a Lagrange structure.

*Proof.* See Appendix C.1. $\square$

**Remark 19.** This construction is very similar to the (Stokes-)Dirac structure case presented earlier, where $S = L$, $\gamma = K$, $\beta = G$, and $P = \text{Id}$, and the plus product is used instead of the minus product. As mentioned in [25], these subspaces can be understood in the broader notion of Krečn spaces [37].

Definition 5 and Theorem 6 give us a framework onto which we shall build many examples later. Let us come back to the wave equation example to see how a Hamiltonian can be obtained from the Stokes-Lagrange structure.

**Example 2.** (Wave equation: continued) Defining the operators $P = I_2$ and $S = \text{Diag}[\partial_x E \partial_x \frac{1}{\rho}]$, one gets:

$$ \left\{ \begin{array}{l} P \partial_t \begin{bmatrix} w \\ p \end{bmatrix} = \begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix} e, \\ e = S x. \end{array} \right. $$

In particular, since $P = I_2$, the latent state $z$ is equal to the state $x$. One can define a Hamiltonian as the total mechanical energy and obtain:

$$ \begin{align*} H(w, p) &:= \frac{1}{2} \int_a^b \left( \frac{1}{\rho} p^2 + (E \partial_x w)(\partial_x w) \right) \mathrm{d}x, \\ &= \frac{1}{2} \int_a^b \left( \frac{1}{\rho} p^2 - \partial_x (E \partial_x w)w \right) \mathrm{d}x + \frac{1}{2} [w E \partial_x w]_a^b, \\ &= \frac{1}{2} \langle P \alpha, S \alpha \rangle_{L^2([a,b])} + \frac{1}{2} \langle \beta(\alpha), \gamma(\alpha) \rangle_{\mathbb{R}^2}, \end{align*} $$

where $\alpha := \begin{bmatrix} w \\ p \end{bmatrix}$ and the boundary operators are defined by $\gamma(\alpha) := \begin{bmatrix} w(a) \\ w(b) \end{bmatrix}$ (the Dirichlet trace) and $\beta(\alpha) := \begin{bmatrix} -E \partial_x w(a) \\ E \partial_x w(b) \end{bmatrix}$ (the Neumann trace).

Following the previous example, let us now define the Hamiltonian of a general Stokes-Lagrange structure as:

$$ \forall z \in \mathcal{Z}_1, \quad H(z) := \frac{1}{2} \langle S z, P z \rangle_{\mathcal{E}, \chi} + \frac{1}{2} \langle \beta(z), \gamma(z) \rangle_{u, y}. \qquad (2.1) $$

**Remark 20.** Note that this Hamiltonian is explicit with respect to the latent state variable $z$ but not with respect to the state variable $x$. It is the case only if $P = \text{Id}$, i.e., $x = Pz = z$, as in the latter example.
## 2.5. An explicit representation

Now, we consider a port-Hamiltonian system implicitly defined with a Stokes-Dirac structure $\mathcal{D}$ and a Stokes-Lagrange structure $\mathcal{L}$ as:

$$[f \quad f_u \quad f_R \quad e \quad e_u \quad e_R] \in \mathcal{D}, \quad [x \quad \chi \quad e \quad \varepsilon] \in \mathcal{L}, \quad f = -\partial_t x,$$

with $(f, e)$ the state flow and effort power port, $(f_R, e_R)$ the resistive power port $(\langle f_R, e_R \rangle \le 0)$, $(f_u, e_u)$ the control power port, and $(\chi, \varepsilon)$ the control energy port. Denoting $z$ the latent space variable, $S$ and $P$ the Lagrange structure operators, $J$ the formally skew-symmetric Dirac structure operator, and $R = R^* \ge 0$ the resistive structure operator, we get the following explicit dynamics:

$$\left\{ \begin{array}{l} \begin{bmatrix} P\partial_t z \\ -f_R \end{bmatrix} = J \begin{bmatrix} e \\ e_R \end{bmatrix}, \\ e = Sz, \\ f_R = -R e_R. \end{array} \right.$$

Along the trajectories, this system satisfies the following power balance:

$$\begin{align*} \frac{d}{dt} H(z) &= \langle Sz, P\partial_t z \rangle_{\mathcal{E}_s, \mathcal{F}_s} + \frac{1}{2} (\langle \beta(z), \gamma(\partial_t z) \rangle_{u,y} - \langle \beta(\partial_t z), \gamma(z) \rangle_{u,y}) \\ &\quad + \frac{1}{2} (\langle \beta(z), \gamma(\partial_t z) \rangle_{u,y} + \langle \beta(\partial_t z), \gamma(z) \rangle_{u,y}), \\ &= \langle e, \partial_t x \rangle_{\mathcal{E}_s, \mathcal{F}_s} + \langle \varepsilon, \partial_t \chi \rangle_{u,y}, \\ &= \langle e_u, f_u \rangle_{\mathcal{E}_u, \mathcal{F}_u} + \underbrace{\langle e_R, f_R \rangle_{\mathcal{E}_R, \mathcal{F}_R} + \langle \varepsilon, \partial_t \chi \rangle_{u,y}}_{\le 0}, \\ &\le \langle e_u, f_u \rangle_{\mathcal{E}_u, \mathcal{F}_u} + \langle \varepsilon, \partial_t \chi \rangle_{u,y}. \end{align*}$$

Note that an additional port appears in the power balance, namely the energy port $(\chi, \varepsilon)$. Moreover, the definition of a Hamiltonian is not unique [18]. Indeed, $H$ depends on $z$ and $\chi$, and one can perform a Legendre transform with respect to $\chi$ and get the following:

$$\forall z \in \mathcal{Z}_1, \quad \tilde{H}(z) = \frac{1}{2} \langle Sz, Pz \rangle_{\mathcal{E}, \mathcal{X}} - \frac{1}{2} \langle \beta z, \gamma z \rangle_{u,y},$$

which yields:

$$\frac{d}{dt} \tilde{H}(z) = \langle e_u, f_u \rangle_{\mathcal{E}_u, \mathcal{F}_u} + \langle e_R, f_R \rangle_{\mathcal{E}_R, \mathcal{F}_R} - \langle \partial_t \varepsilon, \chi \rangle_{u,y}.$$

From a control perspective, choosing $\tilde{H}$ or $H$ gives us access to different input and output variables (the derivative of the input or the integral of the output) which will be discussed in detail in Section 4.

**Remark 21.** Note that this representation of Dirac and Lagrange structures is not the only possibility; in particular one could choose to put a partition of the effort variable on the left side of the first line and the corresponding flows on the right side yielding, e.g., $[f_1 \quad e_2]^\top = J [e_1 \quad f_2]^\top$, where such representation has been studied in [41]. In particular, since $J = -J^\top$, these systems are also defined on a Dirac structure with an explicit Hamiltonian; hence they are still pH systems.
### 3. Examples

Let us now apply the previous method to a set of examples, namely two plate models, Maxwell's equations and the Dzektser seepage model. In particular, we will focus on the simplification from the Reissner-Mindlin thick plate model to the Kirchhoff-Love thin plate model [42] and from the classical Maxwell's equation to its low-frequency approximation. This will show us the different boundary ports and power balance obtained depending on the choice of representation, as well as how the constrained systems are written in either Stokes-Dirac or Stokes-Lagrange representations.

#### 3.1. Plate models

In the following we will consider a connected spatial domain $\Omega$ with Lipschitz boundary $\partial\Omega$. Let us define the two following operators:

$$ 
\begin{array}{ll}
\forall \mathbf{v} \in H^1(\Omega, \mathbb{R}^2), & \mathbf{Grad}(\mathbf{v}) := \frac{1}{2}(\nabla \mathbf{v} + \nabla \mathbf{v}^T), \\
\forall \bar{\mathbf{T}} \in H^1(\Omega, \mathbb{R}^{2\times2}), & \mathbf{Div}(\bar{\mathbf{T}})_i := \sum_{j=1}^{n} \frac{\partial T_{i,j}}{\partial x_i},
\end{array}
$$

the first being the (tensor-valued) symmetric gradient and the second the (vector-valued) tensor divergence. Then, the Reissner-Mindlin model for a thick plate reads [43]:

$$ 
\left\{
\begin{array}{l}
\rho h \frac{\partial^2 w}{\partial t^2} = \operatorname{div}(kGh (\mathbf{grad}(w) - \boldsymbol{\phi})), \\
\\
\frac{\rho h^3}{12} \frac{\partial^2 \boldsymbol{\phi}}{\partial t^2} = \operatorname{Div}(\mathbb{D} \mathbf{Grad}(\boldsymbol{\phi})) + kGh (\mathbf{grad}(w) - \boldsymbol{\phi}),
\end{array}
\right.
\qquad (3.1)
$$

with $w$ the vertical displacement, $\boldsymbol{\phi} = (\phi_1, \phi_2)$ the deflection of the vertical cross-section along the $x$- and $y$-axis, respectively, $\rho$ the surface density of the plate, $h$ the thickness of the plate, $G$ the shear modulus, $\mathbb{D}$ the bending rigidity fourth-order symmetric tensor, and $k$ the correction factor [44]. These parameters do not need to be constant in space; however, they should be strictly positive, and some minimal regularity conditions could be required to ensure that the differential operators make sense.

**Remark 22.** Such a class of mechanical systems has been thoroughly studied in [45], where a method is proposed to derive—given a set of kinematic assumptions—from the general linear elasticity problem of an $N$-dimensional system, a reduced pH model.

This model allows us to describe a 2D plate under shear and bending constraints. Moreover it can be simplified to the Kirchhoff-Love plate model when neglecting the angular momentum $\partial_i^2 \boldsymbol{\phi} = 0$ and the shear deformation $\mathbf{grad}(w) = \boldsymbol{\phi}$. Let us now write this system using first a Stokes-Dirac structure, and then a Stokes-Lagrange structure.

Such a comparison regarding the position of the operators (in the Hamiltonian or in the structure matrix) was explored in [22] using jet bundles and field theories, and here we will study it in the Stokes-Lagrange formalism and additionally show that the obtained energy boundary ports can be put in the Stokes-Lagrange structure and that we can reduce the Reissner-Mindlin plate model to the Kirchhoff-Love model through an added constraint.
### 3.1.1. Stokes-Dirac formulation

**Reissner-Mindlin** Following [44, 46], let us first define the Hamiltonian and choose the energy variables:

$$H_{RM} := \frac{1}{2} \int_{\Omega} \left( \rho h (\partial_t w)^2 + \frac{\rho h^3}{12} |\partial_t \phi|^2 + kGh |\mathbf{grad}(w) - \mathbf{\phi}|^2 + \mathbf{Grad}(\phi) : \mathbf{D} \mathbf{Grad}(\phi) \right) dx,$$

with $\mathbf{Grad}(\phi) : \mathbf{D} \mathbf{Grad}(\phi) := \sum_{ijkl} \mathbf{Grad}(\phi)_{ij} (\mathbf{D} \mathbf{Grad}(\phi))_{kl}$. Let us now select the 4 following quantities as energy variables:

$$\alpha_{RM}^{SD} = \begin{bmatrix} p_w \\ \bar{\boldsymbol{\epsilon}}_{\phi} \\ \boldsymbol{p}_{\phi} \\ \boldsymbol{\epsilon}_{w\phi} \end{bmatrix} := \begin{bmatrix} \rho h \partial_t w \\ \mathbf{Grad}(\phi) \\ \frac{\rho h^3}{12} \partial_t \phi \\ \mathbf{grad}(w) - \phi \end{bmatrix},$$

namely the linear momentum, the curvature tensor, the angular momentum, and shear deformation, respectively. Then, the Hamiltonian can be written as:

$$H_{RM}^{SD} := \frac{1}{2} \int_{\Omega} \frac{1}{\rho h} p_w^2 + \frac{12}{\rho h^3} |\boldsymbol{p}_{\phi}|^2 + \bar{\boldsymbol{\epsilon}}_{\phi} : \mathbf{D} \boldsymbol{\epsilon}_{\phi} + kGh |\boldsymbol{\epsilon}_{w,\phi}|^2 dx.$$

The dynamics (3.1) reads then:

$$\begin{bmatrix} \partial_t p_w \\ \partial_t \bar{\boldsymbol{\epsilon}}_{\phi} \\ \partial_t \boldsymbol{p}_{\phi} \\ \partial_t \boldsymbol{\epsilon}_{w\phi} \end{bmatrix} = \begin{bmatrix} 0 & 0 & 0 & \text{div} \\ 0 & 0 & \mathbf{Grad} & 0 \\ 0 & \mathbf{Div} & 0 & I_2 \\ \mathbf{grad} & 0 & -I_2 & 0 \end{bmatrix} \begin{bmatrix} v \\ \bar{\boldsymbol{\sigma}}_{\phi} \\ \omega \\ N \end{bmatrix}, \quad (3.2)$$

together with the constitutive relations:

$$\begin{bmatrix} v \\ \bar{\boldsymbol{\sigma}}_{\phi} \\ \omega \\ N \end{bmatrix} = \begin{bmatrix} \frac{1}{\rho h} & 0 & 0 & 0 \\ 0 & \mathbf{D} & 0 & 0 \\ 0 & 0 & \frac{12}{\rho h^3} & 0 \\ 0 & 0 & 0 & kGh \end{bmatrix} \begin{bmatrix} p_w \\ \bar{\boldsymbol{\epsilon}}_{\phi} \\ \boldsymbol{p}_{\phi} \\ \boldsymbol{\epsilon}_{w\phi} \end{bmatrix},$$

where $v$ is the velocity, $\bar{\boldsymbol{\sigma}}_{\phi}$ is the momenta tensor, $\boldsymbol{p}_{\phi}$ is the angular momentum, and $N$ is the shear stress. Finally, the power balance reads:

**Theorem 7.** (Reissner-Mindlin power balance: Stokes-Dirac case)

$$\frac{d}{dt} H_{RM}^{SD} = \int_{\partial \Omega} v N \cdot n + \omega^{\top} \bar{\boldsymbol{\sigma}}_{\phi} n \, ds.$$

*Proof.* The proof is to be found in [44, Eq. (42)]. □

**From the Reissner-Mindlin to the Kirchhoff-Love model** The Kirchhoff-Love model is obtained by neglecting the angular momentum and assuming pure bending of the plate, i.e., $\boldsymbol{p}_{\phi} = 0$ and
$\epsilon_{w,\phi} = \text{grad}(w) - \phi = 0$, which leads to the following constrained differential algebraic equation (DAE) formulation of the Kirchhoff-Love plate model (see, e.g., [9]):

$$ \begin{bmatrix} \partial_t p_w \\ \partial_t \bar{\epsilon}_\phi \\ \mathbf{0} \\ \mathbf{0} \end{bmatrix} = \begin{bmatrix} 0 & 0 & 0 & \text{div} \\ 0 & 0 & \text{Grad} & 0 \\ 0 & \text{Div} & 0 & I_2 \\ \text{grad} & 0 & -I_2 & 0 \end{bmatrix} \begin{bmatrix} v \\ \bar{\sigma}_\phi \\ \omega \\ N \end{bmatrix}, \quad (3.3) $$

where $N$ and $\omega$ now play the role of Lagrange multipliers. Moreover, the Hamiltonian is now reduced to:

$$ H_{KL}^{SD} = \frac{1}{2} \int_{\Omega} \frac{1}{\rho h} p_w^2 + \bar{\epsilon}_\phi : \mathbb{D} \bar{\epsilon}_\phi \, dx. $$

**Theorem 8.** (Kirchhoff-Love power balance: Stokes-Dirac case) The power balance of the Kirchhoff-Love plate model written in Stokes-Dirac formulation reads:

$$ \frac{d}{dt} H_{KL}^{SD} = \int_{\partial \Omega} v \text{Div}(\bar{\sigma}_{\phi}) \cdot \mathbf{n} + \text{grad}(v)^{\top} \bar{\sigma}_{\phi} \mathbf{n} \, ds. $$

*Proof.* Let us compute the time derivative of the Hamiltonian $H_{KL}^{SD}$:

$$ \begin{aligned} \frac{d}{dt} H_{KL}^{SD} &= \int_{\Omega} v \partial_t p_w + \bar{\sigma}_{\phi} : \partial_t \bar{\epsilon}_{\phi} \, dx, \\ &= \int_{\Omega} v \operatorname{div}(N) + \bar{\sigma}_{\phi} : \text{Grad}(w) \, dx, \\ &= \int_{\Omega} -\text{grad}(v) \cdot N - \text{Div}(\bar{\sigma}_{\phi}) \cdot w \, dx + \int_{\partial \Omega} v N \cdot \mathbf{n} + w^{\top} \bar{\sigma}_{\phi} \mathbf{n} \, ds, \\ &= \int_{\Omega} -w \cdot N + N \cdot w \, dx + \int_{\partial \Omega} v \text{Div}(\bar{\sigma}_{\phi}) \cdot \mathbf{n} + \text{grad}(v)^{\top} \bar{\sigma}_{\phi} \mathbf{n} \, ds, \\ &= \int_{\partial \Omega} v \text{Div}(\bar{\sigma}_{\phi}) \cdot \mathbf{n} + \text{grad}(v)^{\top} \bar{\sigma}_{\phi} \mathbf{n} \, ds, \end{aligned} $$

which ends the proof.

**Remark 23.** Note that this model uses first-order differential operators only, contrary to the classical representation of the Kirchhoff-Love model, which requires second-order differential operators. The following unconstrained system is obtained when solving the constraints analytically:

$$ \begin{bmatrix} \partial_t p_w \\ \partial_t \bar{\epsilon}_\phi \end{bmatrix} = \begin{bmatrix} 0 & -\operatorname{div}(\text{Div}(\cdot)) \\ \text{Grad}(\text{grad}(\cdot)) & 0 \end{bmatrix} \begin{bmatrix} v \\ \bar{\sigma}_\phi \end{bmatrix}, $$

together with the constitutive relations $v = \frac{1}{\rho h} p_w$, $\bar{\sigma}_\phi = \mathbb{D} \bar{\epsilon}_\phi$. Such a formulation has been studied in [46].

### 3.1.2. Stokes-Lagrange formulation

**Reissner-Mindlin** Let us now choose a different set of energy variables, namely:

$$ \alpha_{RM}^{SL} := [w \quad p_w \quad \boldsymbol{\phi}^{\top} \quad \mathbf{p}_{\phi}^{\top}]^{\top}, $$
hence the Hamiltonian becomes:

$$H_{RM}^{SL} := \frac{1}{2} \int_{\Omega} \left( \frac{1}{\rho h} p_w^2 + \frac{12}{\rho h^3} |\mathbf{p}_{\phi}|^2 + kGh |\mathbf{grad}(w) - \mathbf{\phi}|^2 + \mathbf{Grad}(\mathbf{\phi}) : \mathbb{D} \mathbf{Grad}(\mathbf{\phi}) \right) dx.$$

In order to define the system properly, let us compute the variational derivatives with respect to each variable.

**Lemma 9.** The variational derivatives of $H_{RM}^{SL}$ are given as:

$$\left\{
\begin{aligned}
\delta_w H_{RM}^{SL} &= -\operatorname{div}(kGh(\mathbf{grad}(w) - \mathbf{\phi})), \\
\delta_{p_w} H_{RM}^{SL} &= \frac{1}{\rho h} p_w, \\
\delta_{\phi} H_{RM}^{SL} &= kGh(\mathbf{grad}(w) - \mathbf{\phi}) - \operatorname{Div}(\mathbb{D} \mathbf{Grad}(\mathbf{\phi})), \\
\delta_{p_{\phi}} H_{RM}^{SL} &= \frac{12}{\rho h^3} \mathbf{p}_{\phi}.
\end{aligned}
\right.
$$

*Proof.* The proof is given in Appendix D.2. □

Now, we can write the dynamics as:

$$\begin{bmatrix} \partial_t w \\ \partial_t p_w \\ \partial_t \mathbf{\phi} \\ \partial_t \mathbf{p}_\phi \end{bmatrix} = \begin{bmatrix} 0 & 1 & 0 & 0 \\ -1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 \\ 0 & 0 & -1 & 0 \end{bmatrix} \begin{bmatrix} \delta_w H_{RM}^{SL} \\ \delta_{p_w} H_{RM}^{SL} \\ \delta_{\phi} H_{RM}^{SL} \\ \delta_{p_{\phi}} H_{RM}^{SL} \end{bmatrix}, \quad (3.4)$$

and with the Lagrange structure matrix:

$$S_{RM}^{SL} := \begin{bmatrix} -\operatorname{div}(kGh \mathbf{grad}(\cdot)) & 0 & -\operatorname{div}(kGh \cdot) & 0 \\ 0 & \frac{1}{\rho h} & 0 & 0 \\ kGh \mathbf{grad}(\cdot) & 0 & -\mathbf{Div}(\mathbb{D} \mathbf{Grad}(\cdot)) + kGh & 0 \\ 0 & 0 & 0 & \frac{12}{\rho h^3} \end{bmatrix},$$

the constitutive relations of Lemma 9 read:

$$e_{RM}^{SL} = S_{RM}^{SL} \alpha_{RM}^{SL},$$

where $e_{RM}^{SL} := [\delta_w H_{RM}^{SL} \ \delta_{p_w} H_{RM}^{SL} \ \delta_{\phi} H_{RM}^{SL}^{\top} \ \delta_{p_{\phi}} H_{RM}^{SL}^{\top}]^{\top}$. This system has the following power balance:

**Theorem 10.** (Reissner-Mindlin power balance: Stokes-Lagrange case) The power balance of the Reissner-Mindlin plate model written in Stokes-Lagrange formulation reads:

$$\frac{\mathrm{d}}{\mathrm{d}t} H_{RM}^{SL} = \int_{\partial\Omega} \underbrace{(\partial_t w)}_{:=\partial_t \chi_{RM,1}^{\partial}} \underbrace{kGh(\mathbf{grad}(w) - \mathbf{\phi}) \cdot \mathbf{n}}_{:=\partial_t \chi_{RM,2}^{\partial}} + \underbrace{\mathbb{D} \mathbf{Grad}(\mathbf{\phi}) \mathbf{n}}_{:=\partial_t \chi_{RM,2}^{\partial}} \mathrm{d}x.$$

**Remark 24.** Similarly to Remark 3, this power balance has the same physical interpretation as in the Stokes-Dirac case (Theorem 7). In particular one can identify the energy ports $\chi_{RM}^{\partial}$, $\varepsilon_{RM}^{\partial}$ with the power ports of the Stokes-Dirac case as: $\partial_t \chi_{RM,1}^{\partial} = v|_{\partial\Omega}$, $\partial_t \chi_{RM,2}^{\partial} = w|_{\partial\Omega}$, $\varepsilon_{RM,1}^{\partial} = N|_{\partial\Omega} \cdot \mathbf{n}$, and $\varepsilon_{RM,2}^{\partial} = \bar{\sigma}_{\phi}|_{\partial\Omega} \mathbf{n}$.
$p_\phi = 0$ and **grad** $w = \phi$, leading to:

$$ \begin{bmatrix} \text{Id} & 0 & 0 & 0 \\ 0 & \text{Id} & 0 & 0 \\ \textbf{grad} & 0 & 0 & 0 \\ 0 & 0 & 0 & \mathbf{0} \end{bmatrix} \begin{bmatrix} \partial_t w \\ \partial_t p_w \\ \mathbf{0} \\ \mathbf{0} \end{bmatrix} = \begin{bmatrix} 0 & 1 & 0 & 0 \\ -1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 \\ 0 & 0 & -1 & 0 \end{bmatrix} \begin{bmatrix} \delta_w H_{KL}^{SL} \\ \delta_{p_w} H_{KL}^{SL} \\ N_\phi \\ \mathbf{w} \end{bmatrix}, \quad (3.5) $$

where $N_\phi$ and $\mathbf{w}$ play the role of Lagrange multipliers of the constraints. This allows us to define the constrained Hamiltonian as:

$$ H_{RM}^{SL} := \frac{1}{2} \int_{\Omega} \frac{1}{\rho h} p_w^2 + \textbf{Grad}(\textbf{grad}(w)) : \mathbb{D} \textbf{Grad}(\textbf{grad}(w)) dx, $$

and deduce the reduced power balance:

**Theorem 11.** (Kirchhoff-Love power balance: Stokes-Lagrange case)

$$ \frac{d}{dt} H_{RM}^{SL} = \int_{\partial \Omega} \frac{\partial}{\partial t} [\textbf{grad}(w)]^{\top} \mathbb{D} \textbf{Grad}(\textbf{grad}(w)) n \, ds. $$

*Proof.* Let us compute the time derivative of the Hamiltonian:

$$ \begin{align*} \frac{d}{dt} H_{KL}^{SL} &= \int_{\Omega} \frac{1}{\rho h} p_w \partial_t p_w + \textbf{Grad}(\textbf{grad}(\frac{\partial}{\partial t}w)) : \mathbb{D} \textbf{Grad}(\textbf{grad}(w)) dx, \\ &= \int_{\Omega} \delta_{p_w} H_{KL}^{SL} \cdot \delta_w H_{KL}^{SL} - \delta_w H_{KL}^{SL} \cdot \delta_{p_w} H_{KL}^{SL} dx \\ &\quad + \int_{\partial \Omega} \frac{\partial}{\partial t} (\textbf{grad}(w))^{\top} \mathbb{D} \textbf{Grad}(\textbf{grad}(\partial_t w)) ds, \\ &= \int_{\partial \Omega} \frac{\partial}{\partial t} (\textbf{grad}(w))^{\top} \mathbb{D} \textbf{Grad}(\textbf{grad}(\partial_t w)) ds. \end{align*} $$

□

Note that this is an example of constrained Stokes-Lagrange structure.

**Remark 25.** In this particular case, the two bottom lines of (3.5) can be removed directly and yield a reduced system with the two state variables $w$ and $p_w$. Here they are kept as they will be useful when studying the relationships between the Stokes-Dirac and Stokes-Lagrange representations in Subsection 3.1.3.

### 3.1.3. Passing from one representation to the other

As in Subsection 1.2, let us define the operator $G$ that will allow us to transform one representation into the other. Such an operator is given as:

$$ G := \begin{bmatrix} 0 & \text{Id} & 0 & 0 \\ 0 & 0 & \textbf{Grad} & 0 \\ 0 & 0 & 0 & \text{Id} \\ \textbf{grad} & 0 & -\text{Id} & 0 \end{bmatrix}, \qquad G^{\dagger} = \begin{bmatrix} 0 & 0 & 0 & -\text{div} \\ \text{Id} & 0 & 0 & 0 \\ 0 & -\textbf{Div} & 0 & -\text{Id} \\ 0 & 0 & \text{Id} & 0 \end{bmatrix}. $$

Applying Theorem 1 shows the following:

**Theorem 12.** The following diagram commutes:
<figure><img src="image_4.png" /><figcaption>**Figure 3.** Commutative diagram showing the relations between the representations of the Reissner-Mindlin and Kirchhoff-Love plate models.</figcaption></figure>

## 3.2. Maxwell's equations

Let us now write Maxwell's equations [47] in Stokes-Dirac and Stokes-Lagrange representations. In this particular example, the former is the classical representation of Maxwell's equations, whereas the latter coincides with the vector potential formulation.

### 3.2.1. Stokes-Dirac formulation

Let us first write the classical port-Hamiltonian representation of Maxwell's equations [4]:

$$ \begin{bmatrix} \partial_t \mathbf{D} \\ \partial_t \mathbf{B} \end{bmatrix} = \begin{bmatrix} 0 & \mathbf{curl} \\ -\mathbf{curl} & 0 \end{bmatrix} \begin{bmatrix} \mathbf{E} \\ \mathbf{H} \end{bmatrix} - \begin{bmatrix} \mathbf{J} \\ 0 \end{bmatrix}, \qquad (3.6) $$

with $\mathbf{D}$ the electric field, $\mathbf{E}$ the electric flux, $\mathbf{B}$ the magnetic field, $\mathbf{H}$ the magnetic flux, and $\mathbf{J}$ the current density. The Hamiltonian reads:

$$ H_{EM} = \frac{1}{2} \int_{\Omega} \left( \frac{1}{\varepsilon_0} |\mathbf{D}|^2 + \frac{1}{\mu_0} |\mathbf{B}|^2 \right) dx, $$

with $\mu_0 > 0$ the magnetic permeability, and $\varepsilon_0 > 0$ the electric permittivity, along with the constitutive relations:

$$ \left\{ \begin{array}{ll} \mathbf{E} = \delta_{\mathbf{D}} H_{EM} = \frac{1}{\varepsilon_0} \mathbf{D}, & \operatorname{div}(\mathbf{D}) = \rho, \\ \\ \mathbf{H} = \delta_{\mathbf{B}} H_{EM} = \frac{1}{\mu_0} \mathbf{B}, & \operatorname{div}(\mathbf{B}) = 0. \end{array} \right. $$

In the following we will assume that the charge density $\rho$ is zero.

**Remark 26.** Note that the gauge conditions $\operatorname{div}(\mathbf{D}) = 0 = \operatorname{div}(\mathbf{B})$ lie in the Stokes-Lagrange structure of the system. However, for the sake of simplicity, they will be dropped in the following as they do not play a role in the dynamics of the system. Indeed $\operatorname{div} \mathbf{curl} = 0$, hence $\frac{\partial}{\partial t} \operatorname{div}(\mathbf{D}) = \operatorname{div}(\mathbf{curl}(\mathbf{H})) = 0$.

Let us now define the Lagrange structure operators as:

$$ P^{SD} = \begin{bmatrix} I_3 & 0 \\ 0 & I_3 \end{bmatrix}, \quad S^{SD} = \begin{bmatrix} \frac{1}{\varepsilon_0} & 0 \\ 0 & \frac{1}{\mu_0} \end{bmatrix}, $$

the Dirac structure operator:

$$ J^{SD} := \begin{bmatrix} 0 & \mathbf{curl} \\ -\mathbf{curl} & 0 \end{bmatrix}, $$
the control operator:

$$B^{SD} = [-I_3 \ 0]^T,$$

and the distributed control $u^{SD} = J$. In the following, we denote the state and co-state variables of this system as $\alpha^{SD} = [D \ B]^T$ and $e^{SD} = [E \ H]^T$. The system now reads:

$$\begin{cases} \partial_t P^E \alpha^{SD} = J^{SD} e^{SD} + B^{SD} u^{SD}, \\ e^{SD} = S^E \alpha^{SD}. \end{cases}$$

Finally, the power balance is:

**Theorem 13.** (Maxwell's equations power balance: Stokes-Dirac case)

$$\frac{d}{dt} H_{EM} = \int_{\partial\Omega} (H \times E) \cdot n \, ds - \int_{\Omega} J \cdot E \, dx.$$

**Remark 27.** Defining the Poynting vector as $\mathbf{\Pi} := E \times H$, one can rewrite the power balance as:

$$\frac{d}{dt} H_{EM} = - \int_{\partial\Omega} \mathbf{\Pi} \cdot n \, ds - \int_{\Omega} J \cdot E \, dx,$$

which shows that such a vector corresponds to the energy flux through the boundary of the considered domain.

**Remark 28.** Note that $J$ is usually decomposed in two parts, $J = J_u + J_r$, with $J_u$ the controlled current and $J_r = \sigma E$ being the induced current, with $\sigma \ge 0$ the conductivity, leading to the additional dissipative port $(E, J_r)$. With such a distributed dissipation, the power balance more precisely reads:

$$\begin{aligned} \frac{d}{dt} H_{EM} &= \int_{\partial\Omega} (H \times E) \cdot n \, ds - \int_{\Omega} J_u \cdot E \, dx - \int_{\Omega} \sigma |E|^2 \, ds, \\ &\le \int_{\partial\Omega} (H \times E) \cdot n \, ds - \int_{\Omega} J_u \cdot E \, dx. \end{aligned}$$

### 3.2.2. Stokes-Lagrange representation

Let us now write the system using the Stokes-Lagrange representation. It turns out that such a representation exactly coincides with the vector potential formulation of Maxwell's equations. To construct it, let us assume that $\Omega$ is simply connected, and then provided that $\mathrm{div}(B) = 0$, there exists an $A$ such that:

$$\mathrm{curl}(A) = B.$$

This allows us to rewrite the Hamiltonian as:

$$H_{EM}^{SL} = \int_{\Omega} \frac{1}{\mu_0} |\mathrm{curl}(A)|^2 + \frac{1}{\varepsilon_0} |D|^2 dx,$$

and the system can be written using a Stokes-Lagrange formulation as:

$$\begin{bmatrix} \partial_t D \\ \partial_t A \end{bmatrix} = \begin{bmatrix} 0 & I_3 \\ -I_3 & 0 \end{bmatrix} \begin{bmatrix} E \\ \delta_A H \end{bmatrix} - \begin{bmatrix} J \\ 0 \end{bmatrix}. \quad (3.7)$$
Let us denote $J^{SL} = \begin{bmatrix} 0 & I_3 \\ -I_3 & 0 \end{bmatrix}$, $P^{SL} = \begin{bmatrix} I_3 & 0 \\ 0 & 1I_3 \end{bmatrix}$, $S^{SL} = \begin{bmatrix} I_3 & 0 \\ 0 & \text{curl}(\frac{1}{\mu_0}\text{curl}\cdot) \end{bmatrix}$, and $B^{SL} = [-I_3 \ 0]$. We will denote the associated state and effort variables as: $\alpha^{SL} = [\mathbf{D} \ \mathbf{A}]^\mathrm{T}$ and $e^{SL} = [\delta_D H_{EM}^{SL} \ \delta_A H_{EM}^{SL}]^\mathrm{T}$. The Stokes-Lagrange formulation now reads:

$$ \begin{cases} \partial_t P^{SL} \alpha^{SL} = J^{SL} e^{SL} + B^{SL} u, \\ e^{SL} = S^{SL} \alpha^{SL}. \end{cases} $$

Finally, the power balance of this system is:

**Theorem 14.** (Maxwell's equations power balance: Stokes-Lagrange case)

$$ \frac{d}{dt} H_{EM}^{SL} = \int_{\partial\Omega} \frac{1}{\mu_0} \mathbf{curl}(\mathbf{A}) \times \partial_t \mathbf{A} \cdot \mathbf{n} \, ds - \int_{\partial\Omega} \mathbf{J} \cdot \mathbf{E} \, ds. $$

### 3.2.3. Passing from one representation to the other

Following Subsection 1.2, let us define $G := \begin{bmatrix} 1 & 0 \\ 0 & \text{curl} \end{bmatrix}$, an operator from $L^2(\Omega, \mathbb{R}^N) \times H^{\text{curl}}(\Omega)$ to $L^2(\Omega, \mathbb{R}^N) \times L^2(\Omega, \mathbb{R}^N)$. This operator is **not** invertible in general, but by restricting ourselves to the subspace $\mathcal{K} = \{\mathbf{B} \in H^{\text{curl}}(\Omega), \text{div}(\mathbf{B}) = 0\}$ and assuming that the domain $\Omega$ is simply connected, we can consider **curl** as invertible thanks to Hodge-Helmholtz decomposition [48]. Then:

$$ \begin{cases} G\alpha^{SL} = \alpha^{SD}, \\ e^{SL} = G^\dagger e^{SD}. \end{cases} $$

We have the following relations:

$$ J^{SD} = G J^{SL} G^{\dagger}, \quad S^{SL} = G S^{SD} G^{\dagger}, \quad P^{SL} = G P^{SD} G^{-1}. $$

### 3.2.4. Low-frequency approximation

The low-frequency approximation (LF) is a usual assumption when considering technical applications [49] (e.g., electrical machines). It consists of neglecting the displacement currents $\partial_t \mathbf{D} = 0$, and the Stokes-Dirac representation then reads:

$$ \begin{bmatrix} \mathbf{0} \\ \partial_t \mathbf{B} \end{bmatrix} = \begin{bmatrix} 0 & \text{curl} \\ \text{curl} & 0 \end{bmatrix} \begin{bmatrix} \mathbf{E} \\ \mathbf{H} \end{bmatrix} - \begin{bmatrix} \mathbf{J} \\ 0 \end{bmatrix}, \qquad (3.8) $$

and the Stokes-Lagrange representation is:

$$ \begin{bmatrix} \mathbf{0} \\ \partial_t \mathbf{A} \end{bmatrix} = \begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix} \begin{bmatrix} \mathbf{E} \\ \delta_A H^{SL} \end{bmatrix} - \begin{bmatrix} \mathbf{J} \\ 0 \end{bmatrix}. \qquad (3.9) $$

**Remark 29.** This representation was studied in [50] when setting $\mathbf{J} = \sigma\mathbf{E}$ and solving the constraint $\delta_A H^{SL} - \mathbf{J} = 0$ yielded the diffusion equation $\sigma\partial_t \mathbf{A} - \text{curl}(\frac{1}{\mu}\text{curl}(\mathbf{A})) = 0$.

**Theorem 15.** Denoting by $\Pi = \text{Diag}[\mathbf{0} \ \mathbf{Id}]$ the projection operator, one gets the commutative diagram:
<figure><img src="image_5.png" /><figcaption>**Figure 4.** Commutative diagram showing the relations between the two representations of Maxwell's equations and their corresponding LF approximations.</figcaption></figure>

### 3.2.5. Maxwell's equations on a 2D domain

The vector potential formulation of Maxwell's equations is particularly useful when considering 2D domains [51, Chap. 9] (e.g., a rotor/stator setup). Let us consider the electromagnetic field to lie parallel to the horizontal plane $\mathbf{B} = [B_x \ B_y \ 0]^\mathrm{T}$ and the electric field to be vertical $\mathbf{D} = [0 \ 0 \ D_z]^\mathrm{T}$, denoting the reduced operators:

$$ 
\left\{ 
\begin{aligned}
\mathbf{grad}^{\perp}(\nu) &:= \begin{bmatrix} -\partial_x \nu \\ \partial_y \nu \end{bmatrix}, \\
\mathrm{curl}_{2D}(\mathbf{w}) &:= \partial_x w_y - \partial_y w_x,
\end{aligned}
\right. 
$$

along with the reduced variable $\mathbf{B} = [B_x \ B_y]^\mathrm{T}$, $E = E_z$, and Maxwell's equations in transverse electric (TE) mode read:

$$ \begin{bmatrix} \partial_t D \\ \partial_t \mathbf{B} \end{bmatrix} = \begin{bmatrix} 0 & \mathrm{curl}_{2D} \\ -\mathbf{grad}^{\perp} & 0 \end{bmatrix} \begin{bmatrix} E \\ H \end{bmatrix} - \begin{bmatrix} J \\ 0 \end{bmatrix}. $$

When the vector potential formulation is considered, we get: $\mathbf{B} = \mathbf{grad}^{\perp} A$, hence the vector potential $A$ is now a scalar field instead of a vector field, and the vector potential formulation reads:

$$ \begin{bmatrix} \partial_t D \\ \partial_t A \end{bmatrix} = \begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix} \begin{bmatrix} E \\ \delta_A H \end{bmatrix} - \begin{bmatrix} J \\ 0 \end{bmatrix}, $$

with $\delta_A H = \mathrm{curl}_{2D} (\frac{1}{\mu} \mathbf{grad}^{\perp} A)$.

**Remark 30.** Even if these representations are equivalent at the continuous level, they might not be from a modeling perspective. When discretizing the system, one requires only scalar-valued functions in the vector potential formulation, compared to vector-valued functions in the classical case, which reduces memory usage (see [52, 53] for a similar approach applied to fluid dynamics).

### 3.3. Dzektser equation

As a last example, let us present a nonlocal model, namely the Dzektser equation [54]. Let us consider a 2D domain $\Omega$ and the (vertical) hydraulic head $h(t, x, y)$ defined at each point of the domain. The Dzektser equation describes the evolution of the hydraulic head $h$ of underground water while neglecting momentum, yielding a diffusion-like equation. Contrary to the Boussinesq equation, it takes
into account a second-order term when modeling the water column, which gives us a nonlocal term in the equation. This gives us a linear system depending on two damping parameters $a, b \ge 0$ and a parameter of nonlocality $\mu \ge 0$ that reads:

$$ (1 - \mu\Delta)\partial_t h = a\Delta h - b\Delta^2 h, $$

and the pH formulation can be formulated as [17]:

$$ \begin{bmatrix} 1 - \mu\Delta & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix} \begin{bmatrix} \partial_t h \\ F_\nabla \\ F_\Delta \end{bmatrix} = \begin{bmatrix} 0 & \text{div} & \Delta \\ \mathbf{grad} & 0 & 0 \\ -\Delta & 0 & 0 \end{bmatrix} \begin{bmatrix} h \\ E_\nabla \\ E_\Delta \end{bmatrix}, \quad \begin{cases} E_\nabla = aF_\nabla, \\ E_\Delta = bF_\Delta, \end{cases} $$

with $(F_\nabla, E_\nabla)$, $(F_\Delta, E_\Delta)$ the two dissipative ports. The associated Hamiltonian is:

$$ H_D = \frac{1}{2} \int_{\Omega} h^2 + \mu |\mathbf{grad} h|^2 dx. $$

Note that the operator $(1 - \mu\Delta)$ with $\Delta = \frac{\partial^2}{\partial x^2} + \frac{\partial^2}{\partial y^2}$ from $H_0^1(\Omega)$ to $L^2$ is invertible; in particular it does not introduce constraints to the dynamics.

Then, one can define the Stokes-Lagrange operators as $P = 1 - \mu\Delta$, $S = \text{Id}$, and the Hamiltonian reads:

$$ H_D = \frac{1}{2} \int_{\Omega} h^2 + \mu |\mathbf{grad} h|^2 dx = \frac{1}{2} \langle S h, P h \rangle + \frac{1}{2} \int_{\partial \Omega} \underbrace{h}_{=:\gamma(h)} \underbrace{\mu \mathbf{grad} h \cdot n}_{=:\beta(h)} ds. $$

## 4. Application to control systems

One of the key features of port-Hamiltonian systems is the passivity of the power control port. More precisely, the natural boundary controls of a system are obtained (e.g., force/velocity, flow/pressure) and allow the use of passivity to design controllers and interconnect pH systems through their Dirac structures [38]. In a recent work [55], it was shown that other types of boundary controls could be useful; defined as the time integral of a passive output or time derivative of a passive output. Let us show that the energy control ports allow us to design such interconnection and that choosing between the two proposed Hamiltonians allows for choosing between the time integral of the passive output or the time derivative of the passive input. As a result, one can interconnect the two systems using a non-separable Hamiltonian (see Definition 16). Such a property is valuable as the usual power port interconnection of two pH systems yields an interconnected pH system whose Hamiltonian is the sum of the Hamiltonians of the two subsystems; adding a non-separable term allows for a broader set of interconnections.

**Definition 16.** (Separable Hamiltonian) Given a latent state $z = [z_1 \ z_2]^T \in \mathbb{Z} = \mathbb{Z}_1 \times \mathbb{Z}_2$, a Hamiltonian $H: \mathbb{Z} \to \mathbb{R}$ is called separable, if there exist $H_1: \mathbb{Z}_1 \to \mathbb{R}$ and $H_2: \mathbb{Z}_2 \to \mathbb{R}$ (corresponding to the Hamiltonian functionals of the two subsystems), such that:

$$ H(z_1, z_2) = H_1(z_1) + H_2(z_2). $$

In particular, $\delta_z H(z) = 0$ if and only if $\delta_{z_1} H_1(z_1) = 0$ and $\delta_{z_2} H_2(z_2) = 0$.

First, we will recall the interconnection of two pH systems through power ports, and then show how this can be performed using energy ports. The latter has already been considered in a recent work [20], and here we will extend it to both methods proposed in [55].
## 4.1. Stokes-Dirac interconnection

Let us take two port-Hamiltonian systems implicitly defined on a Stokes-Dirac structure as follows:

$$ \begin{bmatrix} f^i \\ y^i \\ e^i \\ u^i \end{bmatrix} \in \mathcal{D}^i \subset \mathcal{F}^i \times \mathcal{Y} \times \mathcal{E}^i \times \mathcal{U}, \quad f^i = -\partial_t \alpha^i, \quad e^i = \delta_{\alpha^i} H^i(\alpha^i), $$

for $i \in \{1, 2\}$. Note that the control $\mathcal{U}$ and observation $\mathcal{Y}$ spaces are assumed to be identical. Then, assuming an interconnection of the form:

$$ \begin{bmatrix} u^1 \\ u^2 \end{bmatrix} = \begin{bmatrix} 0 & \mathrm{Id} \\ -\mathrm{Id} & 0 \end{bmatrix} \begin{bmatrix} y^1 \\ y^2 \end{bmatrix} + \begin{bmatrix} v^1 \\ v^2 \end{bmatrix}, $$

the system is (cyclo-)passive with respect to the composed Hamiltonian $\tilde{H} = H^1(\alpha^1) + H^2(\alpha^2)$:

$$ \frac{d}{dt} \tilde{H} = \langle v^1, y^1 \rangle_{u,y} + \langle v^2, y^2 \rangle_{u,y}. $$

In particular, $H^1$ and $H^2$ only depend on $\alpha^1$ and $\alpha^2$, respectively, and no cross-terms are present: the Hamiltonian $\tilde{H}$ is separable.

## 4.2. Stokes-Lagrange interconnection

Let us now take, for $i \in \{1, 2\}$, two pH systems implicitly defined on a Stokes-Lagrange structure as follows:

$$ \begin{bmatrix} f^i \\ e^i \end{bmatrix} \in \mathcal{D}^i \subset \mathcal{F}^i \times \mathcal{E}^i, \quad f^i = -\partial_t \alpha^i, \quad \begin{bmatrix} \alpha^i \\ \chi^i \\ e^i \\ \mathcal{E}^i \end{bmatrix} \in \mathcal{L}^i \subset \mathcal{X}^i \times \mathcal{Y} \times \mathcal{E}^i \times \mathcal{U}, $$

along with the Stokes-Lagrange operators $P^i$, $S^i$ and $\gamma^i$, $\beta^i$. These two systems are defined along with some energy ports which we will use for the interconnection [19].

Denoting by $z^i$ the latent space variable, and following (2.1), the respective Hamiltonian reads either:

$$ H_{+}^{i}(z^{i}) = \frac{1}{2} \langle S^{i} z^{i}, P^{i} z^{i} \rangle + \frac{1}{2} \langle \beta^{i}(z^{i}), \gamma^{i}(z^{i}) \rangle, $$

$$ \text{or} \quad H_{-}^{i}(z^{i}) = \frac{1}{2} \langle S^{i} z^{i}, P^{i} z^{i} \rangle - \frac{1}{2} \langle \beta^{i}(z^{i}), \gamma^{i}(z^{i}) \rangle. $$

**Interconnection through the integration of a passive output** When the plus Hamiltonian $H_+^i$ is chosen, the system is (cyclo-)passive with respect to $(\mathcal{E}^i, \partial_t \chi^i)$, i.e., $\frac{d}{dt} H_+^i = \langle \mathcal{E}^i, \partial_t \chi^i \rangle_{u,y}$. Following [55], let us denote by $\phi_T: \mathcal{Y} \times \mathcal{Y} \to \mathbb{R}$ a differentiable potential, and then let us define the following interconnection scheme as:

$$ \begin{bmatrix} \mathcal{E}^1 \\ \mathcal{E}^2 \end{bmatrix} = - \begin{bmatrix} \mathrm{Id} & 0 \\ 0 & \mathrm{Id} \end{bmatrix} \begin{bmatrix} \delta_{\chi^1} \phi_T(\chi^1, \chi^2) \\ \delta_{\chi^2} \phi_T(\chi^1, \chi^2) \end{bmatrix} + \begin{bmatrix} v^1 \\ v^2 \end{bmatrix}. $$
**Remark 31.** Note that in this case, the interconnection is carried on the whole control/interconnection space. One could also consider an interconnection on a subdomain of the boundary (e.g., the right boundary of a rectangular plate interconnected with the left boundary of a rectangular plate).

As a result, the interconnected system becomes passive with respect to the Hamiltonian defined as $\tilde{H} = H_+^1 + H_+^2 + \phi_T$:

$$ 
\begin{aligned}
\frac{d}{dt} \tilde{H} &= \langle \varepsilon^1, \partial_t \chi^1 \rangle_{u,y} + \langle \varepsilon^1, \partial_t \chi^1 \rangle_{u,y} \\
&\quad + \langle \delta_{\chi^1} \phi_T(\chi^1, \chi^2), \partial_t \chi^1 \rangle_{u,y} + \langle \delta_{\chi^2} \phi_T(\chi^1, \chi^2), \partial_t \chi^2 \rangle_{u,y}, \\
&= \langle \nu^1, \partial_t \chi^1 \rangle_{u,y} + \langle \nu^2, \partial_t \chi^2 \rangle_{u,y}.
\end{aligned}
$$

As a consequence, this interconnected system is (cyclo-)passive with respect to an *a priori* non-separable Hamiltonian. In the setting of control by interconnection (CBI), i.e., when the first system is a physical system and the second a controller, such a property can be used to design an interconnection that assigns a desired equilibrium point. However, this method requires the integral of a passive output to be available which is given here by Stokes-Lagrange structure; the passive output being $\partial_t \chi^i$ and its integral $\chi^i$.

**Remark 32.** The Stokes-Lagrange structure gives us a direct interpretation of the integral of the passive output as an energy control port. In the case of a mechanical system (e.g., Kirchhoff-Love plate model), such an output would be the displacement.

**Example 3.** (Wave equation: continued) In this example we will consider a boundary interconnection using energy port control variables. Let us consider two wave equations written in Stokes-Lagrange representation; for $i \in \{1, 2\}$, we consider:

$$ \frac{\partial}{\partial t} \begin{bmatrix} w^i \\ p^i \end{bmatrix} = \begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix} \begin{bmatrix} N^i \\ v^i \end{bmatrix}, $$

with the constitutive relations $N^i = -\partial_x E \partial_x w^i$ and $v^i = \frac{1}{\rho} p^i$, and the boundary energy ports:

$$ \chi^i = \begin{bmatrix} w^i(a) \\ w^i(b) \end{bmatrix}, \quad \varepsilon^i = \begin{bmatrix} -E \partial_x w^i(a) \\ E \partial_x w^i(b) \end{bmatrix}. $$

Let us now interconnect wave equation 1 on the right boundary with wave equation 2 on the left boundary thanks to the following potential:

$$ V(\chi^1, \chi^2) = V(\chi_2^1, \chi_2^2) = \frac{k}{2}(\chi_2^1 - \chi_1^2)^2 = \frac{k}{2}(w^1(b) - w^2(a))^2, $$

with $k > 0$, see Figure 5. This can be interpreted as adding a spring of stiffness $k$ between the two boundaries. This yields the control laws:

$$ \begin{bmatrix} \varepsilon^1 \\ \varepsilon^2 \end{bmatrix} = \begin{bmatrix} -\text{Id} & 0 \\ 0 & -\text{Id} \end{bmatrix} \begin{bmatrix} \nabla_{\chi^1} V \\ \nabla_{\chi^2} V \end{bmatrix} + \begin{bmatrix} \nu^1 \\ \nu^2 \end{bmatrix} = k \begin{bmatrix} \begin{bmatrix} 0 \\ \chi_1^2 - \chi_2^1 \end{bmatrix} \\ \begin{bmatrix} \chi_2^1 - \chi_1^2 \\ 0 \end{bmatrix} \end{bmatrix} + \begin{bmatrix} \nu^1 \\ \nu^2 \end{bmatrix}. $$
<figure><img src="image_6.png" /><figcaption>Figure 5. Energy port interconnection using a potential V.</figcaption></figure>

Let us now compute the total Hamiltonian $\tilde{H} = H^1 + H^2 + V$:

$$ \tilde{H} = \frac{1}{2} \int_a^b \left( E(w^1)^2 + \frac{1}{\rho}(p^1)^2 + E(w^2)^2 + \frac{1}{\rho}(p^2)^2 \right) dx + \frac{k}{2}(w^1(a) - w^2(b))^2, $$

and the power balance reads:

$$ \frac{d}{dt} \tilde{H} = \partial_t \chi^1 v^1 + \partial_t \chi^2 v^2. $$

In particular, when adding dissipation to the interconnection, e.g., $v_2^1 = -\gamma \partial_t \chi_2^1$ and $v_1^2 = -\gamma \partial_t \chi_1^2$, with $\gamma > 0$ a scalar, one gets:

$$ \frac{d}{dt} \tilde{H} \le 0. $$

Note that such interconnection can also be carried using the Stokes-Dirac representation: For $i \in \{1, 2\}$, let us consider two wave equations written in Stokes-Dirac representation,

$$ \frac{\partial}{\partial t} \begin{bmatrix} \varepsilon^i \\ p^i \end{bmatrix} = \begin{bmatrix} 0 & \partial_x \\ \partial_x & 0 \end{bmatrix} \begin{bmatrix} \sigma^i \\ v^i \end{bmatrix}, \quad \begin{bmatrix} \sigma^i \\ v^i \end{bmatrix} = \begin{bmatrix} E & 0 \\ 0 & \frac{1}{\rho} \end{bmatrix} \begin{bmatrix} \varepsilon^i \\ p^i \end{bmatrix} $$

on the domain $[a, b]$. Their respective Hamiltonians are defined as:

$$ H^i(\varepsilon^i, p^i) = \frac{1}{2} \int_a^b E(\varepsilon^i)^2 + \frac{1}{\rho}(p^i)^2 dx, $$

and the power ports as: $f_{\partial}^i = \begin{bmatrix} v^i(a) \\ v^i(b) \end{bmatrix}$, $e_{\partial}^i = \begin{bmatrix} -\sigma^i(a) \\ \sigma^i(b) \end{bmatrix}$.

In order to carry the interconnection in this setting, let us consider a spring defined by the vertical position of its two endpoints $y^1(t), y^2(t)$ along with its Hamiltonian: $H^s(y^1, y^2) = \frac{k}{2}(y^1 - y^2)^2$, and its two power ports $f^1 = \frac{d}{dt}y^1$, $e^1 = \partial_{y^1}H^s = k(y^1 - y^2)$ and $f^2 = \frac{d}{dt}y^2$, $e^2 = \partial_{y^2}H^s = k(y^2 - y^1)$.

Let us now carry the interconnection by considering a 1-junction, i.e.,

$$ \begin{cases} (f_{\partial}^1)_2 = f^1, & (e_{\partial}^1)_2 + e^1 = 0, \\ (f_{\partial}^2)_1 = f^2, & (e_{\partial}^2)_1 + e^2 = 0. \end{cases} $$
Replacing the flows and efforts by their definitions gives the dynamics of the spring as:

$$ egin{cases} v^1(b) = \frac{d}{dt} y^1, & \sigma^1(b) = k(y^2 - y^1), \\ v^2(a) = \frac{d}{dt} y^2, & \sigma^2(a) = k(y^2 - y^1). \end{cases} $$

This power-port interconnection gives us a port-Hamiltonian system with the total Hamiltonian defined as:

$$ H = H^1(\varepsilon^1, p^1) + H^2(\varepsilon^2, p^2) + H^s(y^1, y^2). $$

Finally the power balance reads:

$$ \frac{d}{dt} H = \sigma^2(b)v^2(b) - \sigma^1(a)v^1(a). $$

The Dirac structures have been interconnected.

**Interconnection through differentiation of a passive output** Let us choose $H^i$, consider the following nonlinear operator $\Psi: X^1 \times X^2 \to \mathcal{L}(Y \times Y, \mathbb{R})$, $(\alpha^1, \alpha^2) \mapsto \psi[\alpha^1, \alpha^2](\cdot, \cdot)$, assume that it is differentiable with respect to $\alpha^1, \alpha^2$, and denote $\beta_i[\alpha^1, \alpha^2]\{u\} := \delta_{\alpha^i} \psi[\alpha^1, \alpha^2]\{u\} \in \mathcal{L}(Y \times Y, \mathbb{R})$. Then, we get:

$$ \frac{d}{dt} \Psi[\alpha^1, \alpha^2] = \beta_1[\partial_t \alpha^1, \alpha^2]\{\partial_t \alpha^1\} + \beta_2[\alpha^1, \partial_t \alpha^2]\{\partial_t \alpha^2\} \in \mathcal{L}(Y \times Y, \mathbb{R}). $$

Let us now define the controls as:

$$ \varepsilon^1 = \Psi[\alpha^1, \alpha^2](\cdot, \chi^2) - \int_0^t [\beta_1[\alpha^1, \alpha^2]\{\partial_t \alpha^1\}(\cdot, \chi^2)] dt + v^1, \quad \in \mathcal{Y}' = \mathcal{U}, $$

$$ \varepsilon^2 = \Psi[\alpha^1, \alpha^2](\chi^1, \cdot) - \int_0^t [\beta_2[\alpha^1, \alpha^2]\{\partial_t \alpha^2\}(\chi^1, \cdot)] dt + v^2, \quad \in \mathcal{Y}' = \mathcal{U}. $$

Then, the coupled system is passive with respect to the total Hamiltonian:

$$ \tilde{H} = H_{-}^{1} + H_{-}^{2} + \Psi[\alpha^{1}, \alpha^{2}](\chi^{1}, \chi^{2}), $$

and the power balance reads:

$$ \begin{aligned} \frac{d}{dt} \tilde{H} = & -\langle \chi^1, \partial_t \varepsilon^1 \rangle - \langle \chi^2, \partial_t \varepsilon^2 \rangle + \Psi[\alpha^1, \alpha^2](\partial_t \chi^1, \chi^2) + \Psi[\alpha^1, \alpha^2](\chi^1, \partial_t \chi^2) \\ & + \beta_1[\alpha^1, \alpha^2]\{\partial_t \alpha^1\}(\chi^1, \chi^2) + \beta_2[\alpha^1, \alpha^2]\{\partial_t \alpha^2\}(\chi^1, \chi^2), \\ = & -\langle \chi^1, \partial_t v^1 \rangle - \langle \chi^2, \partial_t v^2 \rangle. \end{aligned} $$

This method uses the fact that $\varepsilon^i$ is differentiated with respect to time in the power balance; hence it allows us to differentiate the passive output $\chi^i$ with respect to time.

**Example 4.** (Piezoelectric effect) In this example we will consider a distributed interconnection through distributed energy control ports. In particular, we will interpret the piezoelectric effect as a coupling through energy ports, yielding the pH representation found in [56]. Let us define the 1D domain
$\Omega = [a, b]$ and consider two pH systems; the first being the 1D wave equation and the second the 1D Maxwell's equations with $\mathbf{D} = [0 \ 0 \ D]^\mathrm{T}$ and $\mathbf{B} = [0 \ B \ 0]^\mathrm{T}$:

$$ \partial_t \begin{bmatrix} \varepsilon \\ p \end{bmatrix} = \begin{bmatrix} 0 & \partial_x \\ \partial_x & 0 \end{bmatrix} \begin{bmatrix} \sigma \\ v \end{bmatrix}, \quad \partial_t \begin{bmatrix} D \\ B \end{bmatrix} = \begin{bmatrix} 0 & \partial_x \\ \partial_x & 0 \end{bmatrix} \begin{bmatrix} E \\ H \end{bmatrix}, $$

with the two controlled Hamiltonians defined as:

$$ \begin{aligned} H_W(\varepsilon, p, u_1) &= \int_{\Omega} \frac{1}{2\rho} p^2 + \frac{k}{2}\varepsilon^2 + \varepsilon u_1 \, dx, \\ H_{EM}(D, B, u_2) &= \int_{\Omega} \frac{1}{2\varepsilon_0} D^2 + \frac{1}{2\mu_0} B^2 + Du_2 \, dx. \end{aligned} $$

The constitutive relations are given by:

$$ \sigma = k\varepsilon + u_1, \quad v = \frac{1}{\rho}p, \quad E = \frac{1}{\varepsilon_0}D + u_2, \quad H = \frac{1}{\mu_0}B. $$

$u_1$ corresponds to a nonzero stress-free configuration, meaning that the stress-free configuration is attained for a nonzero deformation. $u_2$ corresponds to a dielectric polarization term (usually denoted by $P$ [47]). Controlling these terms allows us to control the stress-free configuration and dielectric polarization of the electric field, and we will use these two controls to interconnect the systems through their Hamiltonian functionals. The two energy ports read:

$$ u_1, \chi_1 = \frac{\delta H_W}{\delta u^1} = \varepsilon, \quad u_2, \chi_2 = \frac{\delta H_{EM}}{\delta u^2} = D. $$

In particular, the latent state for the wave equation is $z = [\varepsilon \ p \ u_1]^\mathrm{T}$, and the Stokes-Lagrange control/observation operators $\gamma$ and $\beta$ select $u_1$ and $\varepsilon$, respectively: $u_1 = \gamma(z)$, $\varepsilon = \beta(z)$. Moreover, writing the constitutive relations with the energy ports reveals the symmetry:

$$ \begin{bmatrix} \sigma \\ v \\ \chi_1 \end{bmatrix} = \begin{bmatrix} k & 0 & 1 \\ 0 & \frac{1}{\rho} & 0 \\ 1 & 0 & 0 \end{bmatrix} \begin{bmatrix} \varepsilon \\ p \\ u_1 \end{bmatrix}, \quad \begin{bmatrix} E \\ H \\ \chi_2 \end{bmatrix} = \begin{bmatrix} \frac{1}{\varepsilon_0} & 0 & 1 \\ 0 & \frac{1}{\mu_0} & 0 \\ 1 & 0 & 0 \end{bmatrix} \begin{bmatrix} D \\ B \\ u_2 \end{bmatrix}. $$

Let us now define $q \in L^\infty(\Omega)$, $q(x) \ge 0$ a distributed parameter and $\alpha_1 = [\varepsilon \ p]^\mathrm{T}$, $\alpha_2 = [D \ B]^\mathrm{T}$ the state variables. Then, let us interconnect the two systems by considering the potential:

$$ \Psi(\alpha_1, \alpha_2)[\chi_1, \chi_2] := -\langle q\chi_1, \chi_2 \rangle_{L^2} = -\int_{\Omega} q\chi_1\chi_2 \, dx. $$

In particular, $\beta_1 = \frac{\delta\Psi}{\delta\alpha_1} = 0$, $\beta_2 = \frac{\delta\Psi}{\delta\alpha_2} = 0$. This gives us the following controls:

$$ u_1 = -\Psi(\alpha_1, \alpha_2)[\cdot, \chi_2] = q\chi_2 = qD, \quad u_2 = -\Psi(\alpha_1, \alpha_2)[\chi_1, \cdot] = q\chi_1 = q\varepsilon, $$

where we used the fact that $\Psi(\alpha_1, \alpha_2)$ is a continuous bilinear function on a Hilbert space to identify $u_1$ and $u_2$ as vectors. Computing the total Hamiltonian $\tilde{H} = H_W + H_{EM} + \Psi(\alpha_1, \alpha_2)[\chi_1, \chi_2]$ yields:

$$ \tilde{H}(\varepsilon, p, D, B) = \frac{1}{2} \int_{\Omega} \frac{1}{\rho} p^2 + k\varepsilon^2 + \frac{1}{\varepsilon_0} D^2 + \frac{1}{\mu_0} B^2 + 2q D\varepsilon \, dx. $$
Computing the variational derivatives with respect to $\varepsilon$ and $D$ gives us:

$$ \sigma = \frac{\delta \tilde{H}}{\delta \varepsilon} = k\varepsilon + qD, \quad E = \frac{\delta \tilde{H}}{\delta D} = \frac{1}{\varepsilon_0}D + q\varepsilon, $$

which corresponds to the model presented in [57].

**Remark 33.** Both methods are an extension of CBI, in particular and contrary to CBI, they do not, however, suffer from the dissipation obstacle that occurs when using power boundary ports as was shown in [55]. The dissipation obstacle prevents the stabilization of the system in the subspace where dissipation occurs [38], e.g., non-zero velocity for mechanical systems with dissipation.

# 5. Conclusion and outlook

We presented a definition of the Stokes-Lagrange structure extending the classical definition of a Hamiltonian functional; this allows for describing classical pH systems in various representations and defining implicit constitutive relations which are necessary when studying *nonlocal* phenomenons. Through a set of examples, namely the Reissner-Mindlin and Kirchhoff-Love plate models, Maxwell's equations of electromagnetism, and Dzektser's equation, we showed how these different representations and implicit constitutive relations are obtained. Moreover, we showed how this structure enables the use of energy ports as controls and gives a physical interpretation (e.g., boundary displacement) based on the system's operators, which yields a new set of tools to design passivity-based controllers.

Moreover, we have yet to describe the structure-preserving discretization of Stokes-Lagrange structures (see [44] for the Stokes-Dirac case), though some examples have already been treated in 1D (see [17]), and an extension to the $N$-dimensional case has yet to be carried out. These representations coupled with a structure-preserving discretization could be useful when studying crack propagation where nonlocal relations are present; moreover, they will allow the study of nonlocal boundary conditions for Maxwell's equations in the pH formalism.

# Appendix

## A. Operator transposition

In this appendix, we will show that the Stokes-Dirac and Stokes-Lagrange representations of the wave-like system (1.14) are properly defining Stokes-Dirac and Stokes-Lagrange structures, respectively.

To do so, we will assume the two following hypotheses, which follow from Assumption 1 on the operators $K, \gamma, \beta$ that allowed us to construct the Stokes-Dirac and Stokes-Lagrange representations and will be used to prove that these are defining Stokes-Dirac and Stokes-Lagrange structures. These are:

* $\gamma$ and $\beta$ have a dense image in $\mathcal{Y}$ and $\mathcal{U}$, respectively.

* $\ker(\gamma)$ and $\ker(\beta)$ are dense in $L^2(\Omega, \mathbb{R}^n)$ and $L^2(\Omega, \mathbb{R}^m)$, respectively.
## A.1. Stokes-Dirac representation

Let us consider the Stokes-Dirac representation (1.15):

$$ \begin{bmatrix} \partial_t \alpha_1^{SD} \\ \partial_t \alpha_2^{SD} \end{bmatrix} = \underbrace{\begin{bmatrix} 0 & \mathbf{K} \\ -\mathbf{K}^\dagger & 0 \end{bmatrix}}_{=: J^{SD}} \begin{bmatrix} e_1^{SD} \\ e_2^{SD} \end{bmatrix}, \quad \begin{cases} e_1^{SD} = \eta \alpha_1^{SD}, \\ e_2^{SD} = \kappa \alpha_2^{SD}, \end{cases} $$

and show that this system is defined on a Stokes-Dirac structure.

First, we will define the flows and effort spaces as $\mathcal{F}_s = \mathcal{E}_s = L^2(\Omega, \mathbb{R}^m) \times L^2(\Omega, \mathbb{R}^n)$, $\mathcal{F}_u = \mathcal{Y}$, and $\mathcal{E}_u = \mathcal{U}$.

Second, let us consider the Stokes-Dirac structure operator $J^{SD}$ along with the control and observation operators $K = [0 \ \gamma]$ and $G = [\beta \ 0]$.

Third, let us define the appropriate spaces: $\mathcal{W}_1 = \mathcal{D}(J^{SD}) \subset \mathcal{E}_s$ and $\mathcal{W}_0 = \ker(G) \cap \ker(K) \subset \mathcal{D}(J^{SD})$. Note that one can deduce that $\mathcal{W}_0 = \ker(\beta) \times \ker(\gamma)$ which is dense in $L^2(\Omega, \mathbb{R}^m) \times L^2(\Omega, \mathbb{R}^n) = \mathcal{E}_s$ by assumption.

Let us now show that $J^{SD}$, $K$, and $G$ satisfy the three conditions of Assumption 1:

1. Let $x = \begin{bmatrix} x_1 \\ x_2 \end{bmatrix} \in \mathcal{W}_1$, computing $\left\langle \begin{bmatrix} x_1 \\ x_2 \end{bmatrix}, J^{SD} \begin{bmatrix} x_1 \\ x_2 \end{bmatrix} \right\rangle_{\mathcal{E}_s}$ yields:

$$ \begin{aligned} \left\langle \begin{bmatrix} x_1 \\ x_2 \end{bmatrix}, J^{SD} \begin{bmatrix} x_1 \\ x_2 \end{bmatrix} \right\rangle_{\mathcal{E}_s} &= \langle x_1, \mathbf{K} x_2 \rangle_{L^2} - \langle x_2, \mathbf{K}^\dagger x_1 \rangle_{L^2} \\ &= \langle [\beta \ 0] x, [0 \ \gamma] x \rangle_{\mathcal{E}_u, \mathcal{F}_Y} \\ &= \langle Gx, Kx \rangle_{\mathcal{E}_u, \mathcal{F}_u}. \end{aligned} $$

2. $J_0 := J_{\mathcal{W}_0}^{SD}$ is densely defined as $\mathcal{W}_0$ is dense in $\mathcal{E}_s$. Let us now prove that $J_0$ satisfies $J_0^* = -J^{SD}$. From the block structure of $J^{SD}$, this gives us the following conditions:

$$ (\mathbf{K}_{|\ker(\beta)})^* = \mathbf{K}, \quad (\mathbf{K}_{|\ker(\gamma)})^* = \mathbf{K}^\dagger, $$

which is true by the definition of the formal adjoint.

3. $\gamma$ and $\beta$ have a dense image in $\mathcal{Y}$ and $\mathcal{U}$, respectively, hence, $\begin{bmatrix} K \\ G \end{bmatrix} = \begin{bmatrix} [0 \ \gamma] \\ [\beta \ 0] \end{bmatrix}$ has a dense range in $\mathcal{F}_u \times \mathcal{E}_u$.

This shows that (1.15) is defined on a Stokes-Dirac structure.

## A.2. Stokes-Lagrange representation

Let us now study the Stokes-Lagrange representation (1.16). To do so, let us define the Lagrange structure operators $P$, $S$, and $\tilde{\gamma}$ and $\tilde{\beta}$ are the observation and control operators:

$$ P = \begin{bmatrix} \mathrm{Id} & 0 \\ 0 & \mathrm{Id} \end{bmatrix}, \quad S = \begin{bmatrix} \mathbf{K}^\dagger \eta \mathbf{K} & 0 \\ 0 & \mathbf{\kappa} \end{bmatrix}, \quad \text{and} \quad \tilde{\gamma} = \begin{bmatrix} -\gamma \\ 0 \end{bmatrix}, \quad \tilde{\beta} = \begin{bmatrix} \beta(\eta \mathbf{K}^\dagger) \\ 0 \end{bmatrix}, $$

along with the appropriate spaces $\mathcal{Z} = \mathcal{X} = \mathcal{E} = L^2(\Omega, \mathbb{R}^m) \times L^2(\Omega, \mathbb{R}^n)$, $\mathcal{Z}_1 = \mathcal{D}(S)$, and $\mathcal{Z}_0 = \ker(\tilde{\gamma}) \cap \ker(\tilde{\beta})$. To prove that these operators define a Stokes-Lagrange subspace, let us assume that
* $\tilde{\beta}$ has a dense image in $\tilde{\mathcal{U}} := \mathcal{U} \times \{0\}$ (the density of the image of $\tilde{\gamma}$ in $\tilde{\mathcal{U}} := \mathcal{Y} \times \{0\}$ is immediate by assumption);

* $Z_0$ is dense in $Z$;

* The couple $(P, S)$ is maximally reciprocal with respect to $Z_0$.

**Remark 34.** The last assumption proves difficult to address in general as one must be careful when defining the domain of $S$ along with appropriate boundary conditions. A recent work tackled such issues by using the formalism of boundary triplets [58, Theorem 2.24].

**Remark 35.** Note that cases exist where $\beta$ has a dense image but $\tilde{\beta}$ does not; in particular, if $\eta$ is null on a part of the boundary. In such cases, one can restrict the control space from $\mathcal{U}$ to the subspace $\tilde{\mathcal{U}} = \overline{\mathrm{Im}(\beta\eta\mathbf{K})} \times \{0\}$.

Now, let us prove that these operators satisfy Assumptions 3 and 5, and hence that they define a Stokes-Lagrange structure.

**Lemma 17.** (Unbounded operator) $P$ and $S$ satisfy the boundedness Assumption 2.

**Lemma 18.** (Symmetry) The quadruple $(P, \tilde{\gamma}, S, \tilde{\beta})$ satisfies the symmetry Assumption 3; for all $z_1, z_2 \in Z_1$:

$$ \langle \tilde{\beta}z_2, \tilde{\gamma}z_1 \rangle_{u,y} + \langle S z_2, Pz_1 \rangle_{\varepsilon, X} = \langle Sz_1, Pz_2 \rangle_{\varepsilon, X} + \langle \tilde{\beta}z_1, \tilde{\gamma}z_2 \rangle_{u,y}. $$

Now applying Theorem 6 with lemmas 17 and 18 shows that $P, S, \tilde{\gamma}, \tilde{\beta}$ define a Stokes-Lagrange structure.

### A.3. Proof of Theorem 1

*Proof.* Let us compute the three different lines directly as follows:

* $\alpha^{SD} = G\alpha^{SL}$:

$$ G\alpha^{SL} = \begin{bmatrix} \mathbf{K} & 0 \\ 0 & \mathrm{Id} \end{bmatrix} \begin{bmatrix} \alpha_1^{SL} \\ \alpha_2^{SL} \end{bmatrix} = \begin{bmatrix} \mathbf{K}\alpha_1^{SL} \\ \alpha_2^{SL} \end{bmatrix} = \begin{bmatrix} \alpha_1^{SD} \\ \alpha_2^{SD} \end{bmatrix}. $$

* $G^\dagger e^{SD} = e^{SL}$:

$$ G^\dagger e^{SD} = \begin{bmatrix} \mathbf{K}^\dagger & 0 \\ 0 & \mathrm{Id} \end{bmatrix} \begin{bmatrix} e_1^{SD} \\ e_2^{SD} \end{bmatrix} = \begin{bmatrix} \mathbf{K}^\dagger \eta \alpha_1^{SD} \\ \kappa \alpha_2^{SD} \end{bmatrix} = \begin{bmatrix} \mathbf{K}^\dagger \eta \mathbf{K} \alpha_1^{SL} \\ \kappa \alpha_2^{SL} \end{bmatrix} = \begin{bmatrix} e_1^{SL} \\ e_2^{SL} \end{bmatrix}. $$

* $GJ^{SL}G^\dagger = J^{SD}$:

$$ GJ^{SL}G^\dagger = \begin{bmatrix} \mathbf{K} & 0 \\ 0 & \mathrm{Id} \end{bmatrix} \begin{bmatrix} 0 & \mathrm{Id} \\ -\mathrm{Id} & 0 \end{bmatrix} \begin{bmatrix} \mathbf{K}^\dagger & 0 \\ 0 & \mathrm{Id} \end{bmatrix} = \begin{bmatrix} 0 & \mathbf{K} \\ -\mathbf{K}^\dagger & 0 \end{bmatrix} = J^{SD}. $$
## B. Maxwell reciprocity conditions

The goal of this appendix is to prove that the Maxwell reciprocity conditions are sufficient in order to define a Hamiltonian given a set of implicit constitutive relations. Let $\mathcal{X}$ be a Hilbert space, and consider $\mathcal{E} = \mathcal{X}'$. Moreover, let us consider $\mathcal{Z}$ the latent state space and assume that there exists (possibly nonlinear) operators $p: \mathcal{Z} \to \mathcal{X}$ and $s: \mathcal{Z} \to \mathcal{E}$ such that:

$$ \mathcal{L} = \begin{bmatrix} p \\ s \end{bmatrix} \mathcal{Z}, \qquad (B.1) $$

i.e., $\alpha = p(z)$ and $e = s(z)$. Moreover, we require that the first variational derivative of $s$ and $p$ exist and the second variational derivative of $p$ exists. These will be denoted by $\delta_z s[z](\cdot)$, $\delta_z p[z](\cdot)$, $\delta_z^2 p[z](\cdot, \cdot)$. Now, let us search for a Hamiltonian corresponding to (B.1). Following [40], given the time-dependent latent state, state, and effort $z(t, x)$, $\alpha(t, x)$, $e(t, x)$, such a Hamiltonian should satisfy the power balance:

$$ \frac{d}{dt} H(z) = \langle e, \partial_t \alpha \rangle_{\mathcal{E}, \mathcal{X}}. \qquad (B.2) $$

This relation means that the power balance exists and is exactly equal to the scalar product between the efforts $e$ and flows $\partial_t \alpha$. Expanding the right-hand side yields:

$$ \frac{d}{dt} H(z) = \langle s(z), \delta_z p[z](\partial_t z) \rangle. \qquad (B.3) $$

Let us now define a Hamiltonian candidate given $p$ and $s$ by using (B.2). To do so, given a state $z(x)$, define $\bar{z}(t, x) = tz(x)$, a segment between the state $0 = \bar{z}(0, \cdot)$ and $z = \bar{z}(1, \cdot)$, see Figure 6.

<figure><img src="image_7.png" /><figcaption>Figure 6. Definition of the Hamiltonian candidate.</figcaption></figure>

Then integrating the power balance (B.3) along the interval $[0, 1]$ gives us:

$$ H(z) - H(0) = \int_{0}^{1} \frac{d}{d\tau} H(\bar{z}(\tau, x)) d\tau = \int_{0}^{1} \langle s(\tau z), \delta_z p[\tau z] z \rangle d\tau. \qquad (B.4) $$

Note that in this case $H$ is defined up to a constant $H(0)$ which can be taken arbitrarily (e.g., $H(0) = 0$ or $H(0) = c$ such that $H(z) \ge 0$ for all $z \in \mathcal{Z}$). Let us now show that the Maxwell reciprocity conditions ensure that this Hamiltonian is well-defined and satisfies (B.2). These reciprocity conditions can be stated as the following symmetry assumption:

**Definition 19.** (Maxwell reciprocity conditions) Let $\mathcal{Z}, \mathcal{X}, \mathcal{E}$ be three Hilbert spaces: $\mathcal{Z}$ is the latent state space, $\mathcal{X}$ is the state space, and $\mathcal{E}$ is the effort space. Let $p: \mathcal{Z} \to \mathcal{X}$ and $s: \mathcal{Z} \to \mathcal{E}$ be two
operators, such that the first variational derivative of p and s exists. Then, p and s satisfy the Maxwell reciprocity conditions if:

$$ \forall z \in \mathcal{Z}, \quad \delta_z s^*(z) \delta_z p(z) = \delta_z p^*(z) \delta_z s(z). $$

Then, given p and s satisfying the Maxwell reciprocity conditions and time-dependent latent state z(t, x), let us expand $\frac{d}{dt}H(z)$:

$$ \begin{aligned} \frac{d}{dt}H(z) &= \int_0^1 \langle \delta_z s[\tau z] \tau \partial_t z, \delta_z p[\tau z] z \rangle \\ &\quad + \langle s(\tau z), \delta_z p[\tau z](\partial_t z) + \delta_z^2 p[\tau z](\tau \partial_t z, z) \rangle \, d\tau, \\ &= \int_0^1 \langle \delta_z p[\tau z] \tau \partial_t z, \delta_z s[\tau z] z \rangle \quad \text{(symmetry)} \\ &\quad + \langle s(\tau z), \delta_z p[\tau z](\partial_t z) + \delta_z^2 p[\tau z](\tau \partial_t z, z) \rangle \, d\tau, \\ &= \int_0^1 \langle s(\tau z) + \delta_z s[\tau z] \tau z, \delta_z p[\tau z] \partial_t z \rangle \\ &\quad + \left\langle \tau s(\tau z), \frac{d}{d\tau} [\delta_z p[\tau z] \partial_t z] \right\rangle \, d\tau, \\ &= \int_0^1 \left\langle \frac{d}{d\tau} [\tau s(\tau z)], \delta_z p[\tau z] \partial_t z \right\rangle + \left\langle \tau s(\tau z), \frac{d}{d\tau} [\delta_z p[\tau z] \partial_t z] \right\rangle \, d\tau, \\ &= \int_0^1 \frac{d}{d\tau} \langle \tau s(\tau z), \delta_z s[\tau z] \partial_t z \rangle \, d\tau, \\ &= \langle s(z), \delta_z p[z] \partial_t z \rangle, \end{aligned} $$

which proves that H satisfies the power balance (B.2). Hence, the definition of a Hamiltonian given a set of nonlinear operators p, s (B.4) is possible if they satisfy Maxwell's reciprocity conditions:

**Theorem 20.** Let $\mathcal{Z}, \mathcal{X}, \mathcal{E}$ be three Hilbert spaces: $\mathcal{Z}$ is the latent state space, $\mathcal{X}$ is the state space, and $\mathcal{E}$ is the effort space. Let $p: \mathcal{Z} \to \mathcal{X}$ and $s: \mathcal{Z} \to \mathcal{E}$ be two operators, such that the first variational derivative of p and s exists and the second variational derivative of p exists.

Then, if p and s satisfy Maxwell's reciprocity conditions, there exists $H: \mathcal{Z} \to \mathbb{R}$ such that:

$$ \frac{d}{dt}H(z) = \langle e, \partial_t \alpha \rangle_{\mathcal{E}, \mathcal{X}}, $$

with $e = s(z)$ and $\alpha = p(z)$.

### C. Stokes-Lagrange structure

In this appendix, we will show additional results and characterizations of the Stokes-Lagrange structure. First, Assumption 4 is not the only good definition of maximality; the following theorem allows for a different one.

**Lemma 21.** Defining $S_0 := S|_{\mathcal{Z}_0}$, $P_0 := S|_{\mathcal{Z}_0}$, Assumption 4 is equivalent to:

$$ \ker [S_0^* - P_0^*] \subset \mathrm{Im} \left[ \frac{P}{S} \right]. $$
Proof. ⇒ Let us assume that Assumption 4 is satisfied and show that $\ker[S_0^* - P_0^*] \subset \text{Im}[\begin{bmatrix} P \\ S \end{bmatrix}]$.

Let $(x, e)^\top \in \ker[S_0^* - P_0^*]$. Then, for all $(z, z_0) \in \mathcal{Z}_1 \times \mathcal{Z}_0$, $\langle Sz, x\rangle_{\mathcal{E},\mathcal{X}} - \langle e, Pz\rangle_{\mathcal{E},\mathcal{X}} = 0$. By applying Assumption 4, there exists $\tilde{z}$ such that $Sz = e$ and $Pz = x$, hence $(x, e)^\top \in \text{Im}[\begin{bmatrix} P \\ S \end{bmatrix}]$. This being true for all $(x, e)^\top \in \ker[S_0^* - P_0^*]$, we deduce that:

$$ \ker[S_0^* - P_0^*] \subset \text{Im}[\begin{bmatrix} P \\ S \end{bmatrix}]. $$

Let us assume that $\ker[S_0^* - P_0^*] \subset \text{Im}[\begin{bmatrix} P \\ S \end{bmatrix}]$.

Let $(x, e)^\top \in \mathcal{X} \times \mathcal{E}$ such that for all $z_0 \in \mathcal{Z}_0$, $\langle Sz_0, x\rangle_{\mathcal{E},\mathcal{X}} - \langle e, Pz_0\rangle_{\mathcal{E},\mathcal{X}} = 0$ and we show that there exists $z \in \mathcal{Z}_1$ such that: $x = Pz$ and $e = Sz$.

Since $\langle Sz_0, x\rangle_{\mathcal{E},\mathcal{X}} - \langle e, Pz_0\rangle_{\mathcal{E},\mathcal{X}} = 0$ is true for all $z \in \mathcal{Z}_0$, we have that $(x, e) \in \ker[S_0^* - P_0^*]$.

Moreover, by assumption, we have that: $\ker[S_0^* - P_0^*] \subset \text{Im}[\begin{bmatrix} P \\ S \end{bmatrix}]$. This implies that there exists $z \in \mathcal{Z}_1$ such that: $x = Pz$ and $e = Sz$.

To conclude, we have that:

If $(x, e)^\top \in \mathcal{X} \times \mathcal{E}$ is such that for all $z_0 \in \mathcal{Z}_0$, $\langle Sz_0, x\rangle_{\mathcal{E},\mathcal{X}} - \langle e, Pz_0\rangle_{\mathcal{E},\mathcal{X}} = 0$, then there exists $z \in \mathcal{Z}_1$ such that: $x = Pz$ and $e = Sz$. This is exactly Assumption 4.

□

**Remark 36.** Definition 5 uses the image representation of a Lagrange structure. However, Theorem 6 shows that one can consider a so-called kernel representation:

$$ \mathcal{L} = \left\{ \begin{bmatrix} x \\ \chi \\ e \\ \epsilon \end{bmatrix} \in \mathcal{X} \times \mathcal{Y} \times \mathcal{E} \times \mathcal{U} \mid \forall z \in \mathcal{Z}_1, \left\langle \left\langle \begin{bmatrix} x \\ \chi \\ e \\ \epsilon \end{bmatrix}, \begin{bmatrix} P \\ \gamma \\ S \\ \beta \end{bmatrix} z \right\rangle \right\rangle_\mathcal{L} = 0 \right\}. $$

This is the usual representation in the explicit finite-dimensional case, with $S^\top x = P^\top e$. In particular, if $P = I_n$, $S = Q = Q^\top \ge 0$, this becomes $e = Qx$. Finally, defining $H(x) = \frac{1}{2}x^\top Qx$ we get the usual $e = \nabla H(x) = Qx$.

### C.1. Proof of Theorem 6

Let us demonstrate Theorem 6, i.e., that a Stokes-Lagrange structure is a Lagrange structure:

Proof. $\subset$: Applying Assumption 3 shows that $\mathcal{L} \subset \mathcal{L}^{\perp}$ directly.

$\supset$: Let $[x \quad \chi \quad e \quad \epsilon]^\top \in \mathcal{L}^{\perp}$, and then for all $z \in \mathcal{Z}_1$, we have:

$$ 0 = \left\langle\left\langle \begin{bmatrix} x \\ \chi \\ e \\ \epsilon \end{bmatrix}, \begin{bmatrix} P \\ \gamma \\ S \\ \beta \end{bmatrix} z \right\rangle\right\rangle_\mathcal{L}. \qquad (C.1) $$
In particular, by choosing $z \in \mathcal{Z}_0$, we have: $0 = \langle e, P_z \rangle_{\mathcal{E},\chi} - \langle Sz, \rangle_{\mathcal{E},\chi}$ which by the maximality assumption gives us that there exists $\tilde{z} \in \mathcal{Z}_1$ such that $e = Sz$ and $x = P\tilde{z}$. Putting it in (C.1) and applying Assumption 3 yields:

$$ \forall z \in \mathcal{Z}_1, \quad 0 = \langle \beta(z), \chi - \gamma(\tilde{z}) \rangle_{U,y} - \langle \varepsilon - \beta(\tilde{z}), \gamma(z) \rangle_{U,y}. $$

Considering that $\begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix}$ is invertible and that $\begin{bmatrix} \gamma \\ \beta \end{bmatrix}$ has a dense range by Assumption 5 yields that $\gamma(\tilde{z}) = \chi$ and $\beta(\tilde{z}) = \varepsilon$. This shows that $[x \ \chi \ e \ \varepsilon]^\top$ belongs to the image representation of the Lagrange structure, hence:

$$ [x \ \chi \ e \ \varepsilon]^\top \in \mathcal{L}. $$

□

## D. Variational derivatives and power balances

### D.1. Variational derivatives of $H_W^{SL}$

**Lemma 22.** The variational derivatives of $H_W^{SL}$ read:

$$ \delta_w H_W^{SL} = -\partial_x(E\partial_x w), \quad \delta_p H_W^{SL} = \frac{1}{\rho}p. $$

*Proof.* Let us first compute $\delta_w H_W^{SL}$, and let $h \in \mathbb{R}$, $w \in H^1([a, b], \mathbb{R})$, and $f \in H_0^1([a, b], \mathbb{R})$. Then:

$$ \begin{aligned} H_W^{SL}(w + hf, p) - H_W^{SL}(w, p) &= \frac{1}{2} \int_{\Omega} \partial_x(w + hf) E \partial_x(w + hf) - \partial_x w E \partial_x w \,dx, \\ &= \int_{\Omega} h \partial_x f E \partial_x w \,dx + o(h), \\ &= - \int_{\Omega} hf \partial_x(E \partial_x w) \,dx + o(h), \\ &= h \langle -f, \partial_x(E \partial_x w) \rangle_{L^2} + o(h). \end{aligned} $$

Now let us compute $\delta_p H_W^{SL}$, and let $h \in \mathbb{R}$ and $f \in L^2([a, b], \mathbb{R})$. Then:

$$ \begin{aligned} H_W^{SL}(w, p + hf) - H_W^{SL}(w, p) &= \frac{1}{2} \int_{\Omega} \frac{1}{\rho} ((p + hf)^2 - p) \,dx, \\ &= \int_{\Omega} hf \frac{1}{\rho} p \,dx + o(h), \\ &= h \langle f, \frac{1}{\rho} p \rangle_{L^2} + o(h). \end{aligned} $$

Hence, we get:

$$ \delta_w H_W^{SL} = -\partial_x(E\partial_x w), \quad \delta_p H_W^{SL} = \frac{1}{\rho}p. $$

□
## D.2. Variational derivatives of $H_{RM}^{SL}$

**Lemma 23.** The variational derivatives of $H_{RM}^{SL}$ read:

$$ \begin{bmatrix} \delta_w H_{RM}^{SL} \\ \delta_{p_w} H_{RM}^{SL} \\ \delta_{\phi} H_{RM}^{SL} \\ \delta_{p_{\phi}} H_{RM}^{SL} \end{bmatrix} = \begin{bmatrix} -\operatorname{div}(kGh \mathbf{grad}(\cdot)) & 0 & -\operatorname{div}(kGh \cdot) & 0 \\ 0 & \frac{1}{\rho h} & 0 & 0 \\ kGh \mathbf{grad}(\cdot) & 0 & -\operatorname{Div}(\mathbb{D} \mathbf{Grad}(\cdot)) + kGh & 0 \\ 0 & 0 & 0 & \frac{12}{\rho h^3} \begin{bmatrix} w \\ p_w \\ \boldsymbol{\phi} \\ p_{\phi} \end{bmatrix} \end{bmatrix} $$

*Proof.* Let us compute the 4 different variational derivatives using the Stokes' identities presented in Appendix E. Let us denote by $f \in H_0^2(\Omega)$ and $F \in H_0^2(\Omega, \mathbb{R}^2)$ a scalar and a vector-valued test function; moreover let us denote by $h \in \mathbb{R}$ a scalar.

* $\delta_w H_{RM}^{SL}$:

Denoting by $\Delta_w^h := H_{RM}^{SL}(w + hf, p_w, \boldsymbol{\phi}, \mathbf{p}_\phi) - H_{RM}^{SL}(w, p_w, \boldsymbol{\phi}, \mathbf{p}_\phi)$, we get:

$$ \begin{aligned} \Delta_w^h &= \frac{1}{2} \langle kGh \mathbf{grad}(w + hf) - \boldsymbol{\phi}, \mathbf{grad}(w + hf) - \boldsymbol{\phi} \rangle_{L^2} \\ &\quad - \frac{1}{2} \langle kGh \mathbf{grad}(w) - \boldsymbol{\phi}, \mathbf{grad}(w) - \boldsymbol{\phi} \rangle_{L^2}, \\ &= \langle f, -\operatorname{div}(kGh(\mathbf{grad}(w) - \boldsymbol{\phi})) \rangle_{L^2} + o(h). \end{aligned} $$

* $\delta_{p_w} H_{RM}^{SL}$:

Denoting by $\Delta_{p_w}^h := H_{RM}^{SL}(w, p_w + hf, \boldsymbol{\phi}, \mathbf{p}_\phi) - H_{RM}^{SL}(w, p_w, \boldsymbol{\phi}, \mathbf{p}_\phi)$, we get:

$$ \begin{aligned} \Delta_{p_w}^h &= \frac{1}{2} \langle \frac{1}{\rho h}(p_w + hf), (p_w + hf) \rangle_{L^2} - \frac{1}{2} \langle \frac{1}{\rho h} p_w, p_w \rangle_{L^2}, \\ &= h \langle f, \frac{1}{\rho h} p_w \rangle_{L^2} + o(h). \end{aligned} $$

* $\delta_{\phi} H_{RM}^{SL}$:

Denoting by $\Delta_{\phi}^h := H_{RM}^{SL}(w + hf, p_w, \boldsymbol{\phi} + hF, \mathbf{p}_\phi) - H_{RM}^{SL}(w, p_w, \boldsymbol{\phi}, \mathbf{p}_\phi)$, we get:

$$ \begin{aligned} \Delta_{\phi}^h &= \frac{1}{2} \langle kGh (\mathbf{grad}(w) - (\boldsymbol{\phi} + hF)), \mathbf{grad}(w) - (\boldsymbol{\phi} + hF) \rangle_{L^2} \\ &\quad + \frac{1}{2} \langle \mathbb{D} \mathbf{Grad}(\boldsymbol{\phi} + hF), \mathbf{Grad}(\boldsymbol{\phi} + hF) \rangle_{L^2} \\ &\quad - \frac{1}{2} \langle kGh \mathbf{grad}(w) - (\boldsymbol{\phi}), \mathbf{grad}(w) - (\boldsymbol{\phi}) \rangle_{L^2} \\ &\quad - \frac{1}{2} \langle \mathbb{D} \mathbf{Grad}(\boldsymbol{\phi}), \mathbf{Grad}(\boldsymbol{\phi}) \rangle_{L^2}, \\ &= h \langle F, kGh (\mathbf{grad}(w) - \boldsymbol{\phi}) \rangle_{L^2} \\ &\quad + h \langle F, -\operatorname{Div}(\mathbb{D} \mathbf{Grad}(\boldsymbol{\phi})) \rangle_{L^2} + o(h). \end{aligned} $$

* $\delta_{p_{\phi}} H_{RM}^{SL}$:

Denoting by $\Delta_{p_{\phi}}^h := H_{RM}^{SL}(w + hf, p_w, \boldsymbol{\phi}, \mathbf{p}_\phi + hF) - H_{RM}^{SL}(w, p_w, \boldsymbol{\phi}, \mathbf{p}_\phi)$, we get:

$$ \begin{aligned} \Delta_{p_{\phi}}^h &= \frac{1}{2} \langle \frac{12}{\rho h^3} (\mathbf{p}_{\phi} + hF), (\mathbf{p}_{\phi} + hF) \rangle_{L^2} + \frac{1}{2} \langle \frac{12}{\rho h^3} \mathbf{p}_{\phi}, \mathbf{p}_{\phi} \rangle_{L^2}, \\ &= h \langle F, \frac{12}{\rho h^3} \mathbf{p}_{\phi} \rangle_{L^2} + o(h). \end{aligned} $$
## E. Stokes' identities

Let us consider $\Omega \subset \mathbb{R}^3$ a domain and $n$ denotes the outer-facing normal of the boundary $\partial\Omega$ of $\Omega$.

### E.1. Div and Grad

**Theorem 24.** Let $\psi \in H^1(\Omega, \mathbb{R}^3)$, $\bar{\phi} \in H^1(\Omega, \mathbb{R}^3 \otimes \mathbb{R}^3)$, with $\bar{\psi} = \bar{\psi}^\top$, one has:

$$ \int_{\Omega} \mathrm{Grad}(\psi) : \bar{\phi} \, dx = - \int_{\Omega} \psi \cdot \mathrm{Div}(\bar{\phi}) \, dx + \int_{\partial\Omega} \psi^\top \bar{\phi} \, n \, ds. $$

*Proof.*

$$ \begin{aligned} \int_{\Omega} \mathrm{Grad}(\psi) : \bar{\phi} &= \frac{1}{2} \int_{\Omega} \nabla \psi : \bar{\phi} + \nabla \psi^\top : \bar{\phi} \, dx, \\ &= \int_{\Omega} \nabla \psi : \frac{1}{2}(\bar{\phi} + \bar{\phi}^\top) \, dx, \\ &= \int_{\Omega} \sum_{ij} \frac{\partial \psi_j}{\partial x_i} \bar{\phi}_{ij} \, dx, \\ &= - \int_{\Omega} \sum_{ij} \psi_j \frac{\partial \bar{\phi}_{ij}}{\partial x_i} \, dx + \int_{\partial\Omega} \sum_{ij} \psi_j \bar{\phi}_{ij} n_i \, ds, \\ &= - \int_{\Omega} \psi \cdot \mathrm{Div}(\bar{\phi}) \, dx + \int_{\partial\Omega} \psi^\top \bar{\phi} \, n \, ds. \end{aligned} $$

### E.2. curl and curl

**Theorem 25.** Let $\phi$, $\psi \in H^{\mathrm{curl}}(\Omega)$ be two vector-valued functions, one has:

$$ \int_{\Omega} \phi \cdot \mathrm{curl}(\psi) \, dx = \int_{\Omega} \mathrm{curl}(\phi) \cdot \psi \, dx + \int_{\partial\Omega} (\psi \times \phi) \cdot n \, ds. $$

*Proof.* Let us first compute $\int_{\partial\Omega} (\psi \times \phi) \cdot n \, ds$ using Stokes' identity:

$$ \begin{aligned} \int_{\partial\Omega} (\psi \times \phi) \cdot n \, ds &= \int_{\Omega} \mathrm{div}(\psi \times \phi) \, dx, \\ &= \int_{\Omega} \mathrm{curl}(\psi) \cdot \phi - \psi \cdot \mathrm{curl}(\phi) \, dx. \end{aligned} $$

The last line is obtained with classical vector calculus identities. Finally, rearranging terms on both sides gives the result.

## Author contributions

Antoine Bendimerad-Hohl, Ghislain Haine, Laurent Lefèvre, Denis Matignon: Writing-original draft, Writing-review, Editing.
# Acknowledgements

The authors sincerely thank the reviewers for their thorough and thoughtful reviews. Their constructive feedback and insightful suggestions have significantly improved the quality of the manuscript.

Moreover, they thank Nathanael Skrepek (University of Twente) for pointing out an error in a former lemma regarding the maximality of (P, S) for the wave-like systems.

This work was supported by the IMPACTS project funded by the French National Research Agency (project ANR-21-CE48-0018), https://impacts.ens2m.fr/.

# Use of AI tools declaration

The authors declare they have not used Artificial Intelligence (AI) tools in the creation of this article.

# Conflict of interest

The authors declare that there is no conflict of interest.

# References

1. A. van der Schaft, D. Jeltsema, Port-Hamiltonian systems theory: An introductory overview, *Found. Trends Syst. Control.*, **1** (2014), 173–378. https://doi.org/10.1561/2600000002

2. V. Duindam, A. Macchelli, S. Stramigioli, H. Bruyninckx, Modeling and control of complex physical systems: the port-Hamiltonian approach, *Springer Berlin, Heidelberg*, 2009. https://doi.org/10.1007/978-3-642-03196-0

3. F. Gay-Balmaz, H. Yoshimura, A Lagrangian variational formulation for nonequilibrium thermodynamics. Part II: Continuum systems, *J. Geom. Phys.*, **111** (2017), 194–212. https://doi.org/10.1016/j geom phys. 2016.08.019

4. A. van der Schaft, B. Maschke, Hamiltonian formulation of distributed-parameter systems with boundary energy flow, *J. Geom. Phys.*, **42** (2002), 166–194. https://doi.org/10.1016/S0393-0440(01)00083-3

5. B. Jacob, H. J. Zwart, Linear port-Hamiltonian systems on infinite-dimensional spaces, *Springer*, 2012. https://doi.org/10.1007/978-3-0348-0399-1

6. A. Brugnoli, G. Haine, D. Matignon, Stokes-Dirac structures for distributed parameter port-Hamiltonian systems: An analytical viewpoint, *Commun. Anal. Mech.*, **15** (2023), 362–387. https://doi.org/10.3934/cam.2023018

7. R. Rashad, F. Califano, A. J. van der Schaft, S. Stramigioli, Twenty years of distributed port-Hamiltonian systems: A literature review, *IMA J. Math. Control Inf.*, **37** (2020), 1400–1422. https://doi.org/10.1093/imamci/dnaa018

8. C. Beattie, V. Mehrmann, H. Xu, H. Zwart, Linear port-Hamiltonian descriptor systems, *Math. Control Signals Syst.*, **30** (2018), 1–27. https://doi.org/10.1007/s00498-018-0223-3

9. H. Zwart, V. Mehrmann, Abstract dissipative Hamiltonian differential-differential equations are everywhere, *DAE Panel*, **2** (2014). https://doi.org/10.52825/dae-p.v2i.957
10. V. Mehrmann, B. Unger, Control of port-Hamiltonian differential-algebraic systems and applications, Acta Numer., 32 (2023), 395-515. https://doi.org/10.1017/S0962492922000083

11. A. van der Schaft, B. Maschke Generalized port-Hamiltonian DAE systems, Systems Control Lett., 121 (2018), 31-37. https://doi.org/10.1016/j.sysconle.2018.09.008

12. A. van der Schaft, B. Maschke, Dirac and Lagrange algebraic constraints in nonlinear port-Hamiltonian systems, *Vietnam J. Math.*, **48** (2020), 929-939. https://doi.org/10.1007/s10013-020-00419-x

13. M. Yaghi, F. Couenne, A. Galfré, L. Lefèvre, B. Maschke, Port-Hamiltonian formulation of the solidification process for a pure substance: A phase field approach, *IFAC-PapersOnLine*, **55** (2022), 93-98. https://doi.org/10.1016/j.ifacol.2022.08.036

14. B. Jacob, K. Morris, On solvability of dissipative partial differential-algebraic equations, *IEEE Control Syst. Lett*, **6** (2022), 3188-3193. https://doi.org/10.1109/LCSYS.2022.3183479

15. H. Heidari, H. Zwart, Port-Hamiltonian modelling of nonlocal longitudinal vibrations in a viscoelastic nanorod, *Math. Comp. Model. Dyn.*, **25** (2019), 447-462. https://doi.org/10.1080/13873954.2019.1659374

16. H. Heidari, H. Zwart, Nonlocal longitudinal vibration in a nanorod, a system theoretic analysis, *Math. Model. Nat. Phenom.*, **17** (2022), 24. https://doi.org/10.1051/mmnp/2022028

17. A. Bendimerad-Hohl, G. Haine, L. Lefèvre, D. Matignon, Implicit port-Hamiltonian systems: structure-preserving discretization for the nonlocal vibrations in a viscoelastic nanorod, and for a seepage model, *IFAC-PapersOnLine*, **56** (2023), 6789-6795.

18. B. Maschke, A. van der Schaft, Linear boundary port-Hamiltonian systems with implicitly defined energy, arXiv preprint arXiv:2305.13772. https://doi.org/10.48550/arXiv.2305.13772

19. K. Krhač, B. Maschke, A. van der Schaft, Port-Hamiltonian systems with energy and power ports, *IFAC-PapersOnLine*, **58** (2024), 280-285. https://doi.org/10.1016/j.ifacol.2024.08.294

20. A. van der Schaft, B. Maschke, Boundary control port-Hamiltonian systems with power and energy ports, in *26th International Symposium on Mathematical Theory of Networks and Systems*, Cambridge, UK, 2024, 120-122.

21. M. Schöberl, K. Schlacher, First-order Hamiltonian field theory and mechanics, *Math. Comp. Model. Dyn.*, **17** (2011), 105-121. https://doi.org/10.1080/13873954.2010.537526

22. M. Schöberl, A. Siuka, Analysis and comparison of port-Hamiltonian formulations for field theories - demonstrated by means of the Mindlin plate, in *2013 European Control Conference (ECC)*, 2013, 548-553. https://doi.org/10.23919/ECC.2013.6669137

23. M. Schöberl, A. Siuka, Jet bundle formulation of infinite-dimensional port-Hamiltonian systems using differential operators, *Automatica*, **50** (2014), 607-613. https://doi.org/10.1016/j.automatica.2013.11.035

24. A. Bendimerad-Hohl, D. Matignon, G. Haine, L. Lefèvre, On Stokes-Lagrange and Stokes-Dirac representations for 1D distributed port-Hamiltonian systems, *IFAC-PapersOnLine*, **58** (2024), 238-243. https://doi.org/10.1016/j.ifacol.2024.10.174
25. M. Kurula, H. Zwart, A. van der Schaft, J. Behrndt, Dirac structures and their composition on Hilbert spaces, *J. Math. Anal. Appl.*, **372** (2010), 402–422.
https://doi.org/10.1016/j.jmaa.2010.07.004

26. G. Haine, D. Matignon, A. Serhani, Numerical analysis of a structure-preserving space-discretization for an anisotropic and heterogeneous boundary controlled *N*-dimensional wave equation as a port-Hamiltonian system, *Int. J. Numer. Anal. Model.*, **20** (2023), 92–133.
https://doi.org/10.4208/ijnam2023-1005

27. P. J. Olver, *Applications of Lie groups to differential equations*, New York: Springer-Verlag, 1993.
https://doi.org/10.1007/978-1-4612-4350-2

28. A. C. Eringen, On differential equations of nonlocal elasticity and solutions of screw dislocation and surface waves, *J. Appl. Phys.*, **54** (1983), 4703–4710.
https://doi.org/10.1063/1.332803

29. G. Romano, R. Barretta, M. Diaco, F. M. de Sciarra, Constitutive boundary conditions and paradoxes in nonlocal elastic nanobeams, *Int. J. Mech. Sci.*, **121** (2017), 151–156.
https://doi.org/10.1016/j.ijmecsci.2016.10.036

30. W. Rudin, *Functional analysis*, 2nd edition, International series in pure and applied mathematics, McGraw-Hill, 1991.

31. T. Preuster, B. Maschke, M. Schaller, Jet space extensions of infinite-dimensional Hamiltonian systems, *IFAC-PapersOnLine*, **58** (2024), 298–303.
https://doi.org/10.1016/j.ifacol.2024.08.297

32. M. Schöberl, K. Schlacher, Lagrangian and port-Hamiltonian formulation for distributed-parameter systems, *IFAC-PapersOnLine*, **48** (2015), 610–615.
https://doi.org/10.1016/j.ifacol.2015.05.025

33. A. van der Schaft, B. Maschke, Differential operator Dirac structures, *IFAC-PapersOnLine*, **54** (2021), 198–203.
https://doi.org/10.1016/j.ifacol.2021.11.078

34. A. F. Gangi, Constitutive equations and reciprocity, *Geophys. J. Int.*, **143** (2020), 311–318.
https://doi.org/10.1046/j.1365-246X.2020.01259.x

35. H. Gernandt, F. M. Philipp, T. Preuster, M. Schaller, On the equivalence of geometric and descriptor representations of linear port-Hamiltonian systems, in *Systems Theory and PDEs*, Springer, 2022, 149–165.
https://doi.org/10.1007/978-3-031-64991-2_6

36. V. Mehrmann, A. van der Schaft, Differential–algebraic systems with dissipative Hamiltonian structure, *Math. Control Signals Syst.*, **35** (2023), 541–584.
https://doi.org/10.1007/s00498-023-00349-2

37. J. Bognár, *Indefinite inner product spaces*, Springer Berlin, Heidelberg, 2012.
https://doi.org/10.1007/978-3-642-65567-8

38. R. Ortega, A. van der Schaft, F. Castanos, A. Astolfi, Control by interconnection and standard passivity-based control of port-Hamiltonian systems, *IEEE Trans. Autom. Control.*, **53** (2008), 2527–2542.
https://doi.org/10.1109/TAC.2008.2006930

39. M. Erbay, B. Jacob, K. Morris, On the Weierstraß form of infinite-dimensional differential algebraic equations, *J. Evol. Equ.*, **24** (2024), 73.
https://doi.org/10.1007/s00028-024-01003-3

40. E. Hairer, C. Lubich, G. Wanner, *Geometric numerical integration: structure-preserving algorithms for ordinary differential equations: structure-preserving algorithms for ordinary differential equations*, Springer Berlin, Heidelberg, 2006.
https://doi.org/10.1007/3-540-30666-8
41. R. Altmann, P. Schulze, A novel energy-based modeling framework, *Math. Control Signals Syst.*, 2025. https://doi.org/10.1007/s00498-024-00405-5

42. P. Destuynder, M. Salaün, *Mathematical analysis of thin plate models*, Springer Berlin, Heidelberg, 2013. https://doi.org/10.1007/978-3-642-51761-7

43. R. D. Mindlin, Influence of rotatory inertia and shear on flexural motions of isotropic, elastic plates, *J. Appl. Mech.*, **18** (1951), 31–38. https://doi.org/10.1115/1.4010217

44. A. Brugnoli, D. Alazard, V. Pommier-Budinger, D. Matignon, Port-Hamiltonian formulation and symplectic discretization of plate models Part I: Mindlin model for thick plates, *Appl. Math. Model.*, **75** (2019), 940–960. https://doi.org/10.1016/j.apm.2019.04.035

45. C. Ponce, Y. Wu, Y. Le Gorrec, H. Ramirez, A systematic methodology for port-Hamiltonian modeling of multidimensional flexible linear mechanical systems, *Appl. Math. Model.*, **134** (2024), 434–451. https://doi.org/10.1016/j.apm.2024.05.040

46. A. Brugnoli, D. Alazard, V. Pommier-Budinger, D. Matignon, Port-Hamiltonian formulation and symplectic discretization of plate models Part II: Kirchhoff model for thin plates, *Appl. Math. Model.*, **75** (2019), 961–981. https://doi.org/10.1016/j.apm.2019.04.036

47. A. Kovetz, *Electromagnetic theory*, Oxford University Press, 2020. https://doi.org/10.1119/1.1371014

48. D. N. Arnold, *Finite element exterior calculus*, SIAM, 2018. https://doi.org/10.1137/1.9781611975543

49. A. Buffa, H. Ammari, J. C. Nédélec, A justification of eddy currents model for the Maxwell equations, *SIAM J. Appl. Math.*, **60** (2020), 1805–1823. https://doi.org/10.1137/S0036139998348979

50. T. Reis, T. Stykel, Passivity, port-Hamiltonian formulation and solution estimates for a coupled magneto-quasistatic system, *Evol. Equations Control Theory*, **12** (2023), 1208–1232. https://doi.org/10.3934/eect.2023008

51. F. Assous, P. Ciarlet, S. Labrunie, *Mathematical foundations of computational electromagnetism*, Springer, 2018 https://doi.org/10.1007/978-3-319-70842-3

52. F. L. Cardoso-Ribeiro, G. Haine, Y. Le Gorrec, D. Matignon, H. Ramirez, Port-Hamiltonian formulations for the modeling, simulation and control of fluids, *Comput. Fluids.*, **283** (2024), 106407. https://doi.org/10.1016/j.compfluid.2024.106407

53. G. Haine, D. Matignon, Incompressible Navier-Stokes Equation as port-Hamiltonian system: velocity formulation versus vorticity formulation, *IFAC-PapersOnLine*, **54** (2021), 161–166. https://doi.org/10.1016/j.ifacol.2021.11.072

54. E. S. Dzektser, Generalization of the equation of motion of ground waters with free surface, *Dokl. Akad. Nauk SSSR*, **202** (1972), 1031–1033.

55. P. Borja, J. Ferguson, A. van der Schaft, Interconnection schemes in modeling and control, *IEEE Control Syst. Lett*, **7** (2023), 2287–2292. https://doi.org/10.1109/LCSYS.2023.3286124

56. A. Macchelli, A. van der Schaft, C. Melchiorri, Multi-variable port-Hamiltonian model of piezoelectric material, in *2004 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS)* (IEEE Cat. No.04CH37566), 2004, 897–902. https://doi.org/10.1109/IROS.2004.1389466
57. A. Macchelli, Energy shaping of distributed parameter port-Hamiltonian systems based on finite element approximation, *Systems Control Lett.*, **60** (2011), 579–589.
https://doi.org/10.1016/j.sysconle.2011.04.016

58. H. Gernandt, F. Philipp, T. Preuster, M. Schaller, Extension theory via boundary triplets for infinite-dimensional implicit port-Hamiltonian systems, arXiv preprint arXiv:2503.17874.

<figure><img src="image_8.png" /></figure>

AIMS Press

©2025 the Author(s), licensee AIMS Press. This
is an open access article distributed under the
terms of the Creative Commons Attribution License
(http://creativecommons.org/licenses/by/4.0)