# Identity observers design for a class of port-Hamiltonian systems

Mario Spirito, Yann Le Gorrec, Bernhard Maschke

► To cite this version:

Mario Spirito, Yann Le Gorrec, Bernhard Maschke. Identity observers design for a class of port-Hamiltonian systems. 2026. hal-05528168

HAL Id: hal-05528168

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

Preprint submitted on 26 Feb 2026

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 CC BY 4.0 - Attribution - International License
# Identity observers design for a class of port-Hamiltonian systems

Mario Spirito, Yann Le Gorrec, and Benhard Maschke

*Abstract*—We study structure-preserving observer design problem for nonlinear port-Hamiltonian systems. We propose an *identity observer* in the original coordinates with an affine output-injection term to preserve the explicit port-Hamiltonian representation. Within the convergent-dynamics framework, we derive explicit gain conditions that guarantee tunable exponential rates for state reconstruction. We treat practically relevant subclasses with constant Hessian or structure matrices and extend the results to the two combined cases. We then analyze the structure-preservation and passivity properties of the observer dynamics, the induced error system, and the system-observer cascade, illustrating how this analysis paves the way for observer-based controller design. The results are illustrated on two examples, including rotor-velocity reconstruction for a permanent-magnet synchronous motor from current measurements and an electrical-circuit case study.

*Index Terms*—Structure-preserving, nonlinear functional observer, port-Hamiltonian systems, convergent dynamics, observer design.

## NOTE TO PRACTITIONERS

Observers are dynamic algorithms used to reconstruct unmeasured quantities (e.g., functions of the state) when direct sensing is impractical due to cost, space, or reliability constraints. These estimates are key enablers for supervision, fault diagnosis, and feedback control.

This paper addresses port-Hamiltonian (pH) models, which represent physical systems in an energy-based, form and naturally support modular interconnection. We propose an *identity observer*, i.e., an observer designed directly in the original coordinates (without a change of variables), and we provide constructive conditions that ensure exponential convergence using convergent dynamics arguments.

From an implementation standpoint, preserving the pH structure is not only a modeling convenience: pH systems are intrinsically passive, and many control designs rely on maintaining passivity after interconnection. We therefore analyze how the observer and the system-observer cascade affect passivity, highlighting when passivity can be preserved and where practical limitations appear. The approach is illustrated on a permanent-magnet synchronous motor (PMSM), where the rotor velocity is reconstructed using current measurements only, and on an electrical circuit case study.

## I. INTRODUCTION

M. Spirito is with Rehab Technologies Lab, Italian Institute of Technologies, Genoa, 16130, Italy, e-mail: mario.spirito@iit.it (spirito.mario@gmail.com)

B. Maschke is with LAGEPP, University Claude Bernard Lyon 1, Villeurbanne, 69100 France.

Y. Le Gorrec is with FEMTO, Engineering School of Micromechanics and Microsystems (ENSMM), 25000 Besançon, France

Manuscript received; revised.

THE port-Hamiltonian (pH) approach to modeling and controlling complex physical systems constitutes a well-established framework that originated with the seminal work by Maschke and van der Schaft [1], [2]. For a comprehensive overview on this field, including control techniques, one can refer to [3]–[5]. Port-Hamiltonian systems are attractive because they make the underlying physical structure explicit, including energy storage and dissipation, passivity, and power-balance relations. This structure has made them a powerful framework for modeling, simulation, and control of complex physical systems.

The pH literature contains extensive results on controller design; see, e.g., [4], [6]. By comparison, observer design for pH systems has received less attention. For general nonlinear systems, widely used observer paradigms include high-gain observers [7], the extended Kalman filter [8], Kazantzis-Kravaris-Luenberger (KKL) observers [9], and contractive observers [10]; see [11] for a recent overview.

For linear pH systems, state reconstruction can be addressed with a standard Luenberger observer [12], yielding Hurwitz error dynamics (see [13] for a pH-based implementation). For this linear setting, related developments include dual-observer-based compensators [14], combined input-state reconstruction [15], and passive observer synthesis via linear matrix inequalities [16], [17].

For nonlinear pH systems, the Hamiltonian gradient can be explicitly exploited in the injection term, which shifts the design perspective and enables a direct analysis of convergence and passivity. The first observer design for nonlinear pH systems dates back to [18], where asymptotic convergence is guaranteed only when the system reaches a steady-state equilibrium. A later contribution [19] proposes a passivity-based observer with global exponential convergence for pH systems with nonlinear interconnection and nonlinear Hamiltonian gradient; however, it relies on additional (non-conjugate) measurements and on solving coupled algebraic equations and PDEs.

Other nonlinear designs target more restricted subclasses. In [20], an IDA-PBC-inspired observer is developed for pH systems with constant structure matrices and nonquadratic Hamiltonians; see also [21], [22].

Robustness to constant perturbations is addressed in [23] by augmenting a proportional passivity-based observer with integral action (for systems with linear Hamiltonian gradient). Further examples include a Lyapunov-based design for a class of bilinear pH systems [24] and an observer tailored to systems with a particular Hamiltonian structure in [25], where some non-conjugate measurements and partial state availability are assumed. In [26], an observer-based controller is proposed
by studying passivity of the system–observer cascade and combining the observer with an MPC-like strategy.

Overall, [18] and [19] remain the only observer designs that explicitly accommodate both nonlinear interconnection and nonlinear Hamiltonian gradient. Yet, [18] does not establish general asymptotic convergence, and [19] entails a delicate design procedure due to the required algebraic conditions and PDEs.

### A. Motivations and paper contributions

In the port-Hamiltonian framework, a key advantage is modularity: pH systems can be interconnected, and the resulting interconnected dynamics is again port-Hamiltonian. This is powerful because passivity properties are inherited by the interconnection thanks to the preserved structure. Consequently, in control design one typically seeks a closed-loop interconnection that remains passive with respect to an auxiliary input and the corresponding system output.

To preserve this structure, we restrict our attention to identity observers. In particular, we avoid coordinate transformations that could obscure the physical meaning of the state and compromise the pH representation. Maintaining the pH form is crucial for interconnections and simplifies passivity arguments; it also makes transparent the limitations that arise in closed-loop analysis when using observer-based controllers. From a control perspective, enforcing passivity is desirable because a passive closed loop can be safely interconnected with other subsystems in larger-scale architectures. Moreover, passivity analysis clarifies how the observer design affects the intrinsic passivity of pH systems, which are passive by construction, and highlights the difficulties in obtaining a passive closed loop.

These considerations motivate the passivity analysis presented in the second part of the paper. Finally, for the design of convergent observers we adopt the convergence-dynamics paradigm [27]–[31], which characterizes attractivity using the norm induced by a constant metric. This choice is motivated by the fact that, historically, the contraction-analysis framework of [32] did not provide a constructive convergence proof for general time-varying nonlinear systems.

**Paper contributions:** This paper contributes to the design and analysis of structure-preserving observers for port-Hamiltonian systems by clarifying what can (and cannot) be made passive in the observer dynamics and by providing a constructive convergence-based design with an explicit rate tuning. The main contributions are as follows:

*   **Convergent-observer synthesis with tunable exponential rate:** building on the convergence framework of [30], [31] and its modern formulation in [27], we derive explicit conditions on the observer gain that guarantee exponential convergence and allow direct tuning of the convergence rate for practically relevant classes of pH systems.

*   **Passivity of the observer dynamics and error system:** we provide a detailed passivity analysis of the proposed observer and of the associated error dynamics, highlighting a key subtlety: the observer state is not, in general, a passive output for the overall observer dynamics. In contrast, $\nabla H(\hat{x})$ (the gradient of the observer Hamiltonian)

is always a naturally conjugate (possibly passive) output with respect to the output-injection term.

Beyond these results, the analysis also provides the foundations for an observer-based controller design.

### B. Paper structure

This paper is organized as follows. Section II introduces the notation and recalls the main background material. In particular, Section II-A states the dynamical system and observer-design problem under consideration; Section II-B reviews basic notions on dissipative and passive systems; Section II-C summarizes the port-Hamiltonian framework; and Section II-D recalls the concepts of convergent dynamics used in this paper.

Section III presents the proposed identity-observer design based on convergence analysis. The construction is developed progressively: Section III-A treats the case of constant Hessian, Section III-B considers constant structural matrices, and Section III-C provides the general design. Section III-D discusses practical guidelines for selecting the gain $L$, Section III-E recalls the results on linear systems, and Section III-F compares the approach with related observer designs.

Section IV discusses structure-preservation and passivity properties of the resulting observer. In particular, Section IV-A addresses passive state observation, Section IV-B focuses on passive gradient observation, Section IV-C analyzes the induced error dynamics, Section IV-D studies passivity of the system-observer cascade, and Section IV-E briefly comments on the use of the observer in feedback control.

Section V illustrates the method on two examples: velocity reconstruction for a PMSM and an electrical-circuit case study. Finally, Section VI concludes the paper and outlines directions for future work.

### C. Notation

The set of real (complex) numbers is denoted by $\mathbb{R}$ ($\mathbb{C}$), and $\mathbb{N}$ denotes the set of natural numbers. Given $n \in \mathbb{N}$, vectors are assumed to belong to $\mathbb{R}^n$ and matrices to $\mathbb{R}^{n \times n}$. The symbol $\| \cdot \|$ is used as the standard Euclidean norm for vectors and the induced 2-norm for matrices, unless otherwise stated.

A function $\alpha: \mathbb{R}_{\ge 0} \to \mathbb{R}_{\ge 0}$ is said to be of class $\mathcal{K}$ if it is continuous, strictly increasing, and satisfies $\alpha(0) = 0$. It is of class $\mathcal{K}_{\infty}$ if it is of class $\mathcal{K}$ and $\alpha(r) \xrightarrow{r \to \infty} = \infty$. It is of class $\mathcal{KL}$ if $\alpha(\cdot, t)$ is of class $\mathcal{K}$ for each fixed $t \ge 0$, and $\alpha(r, \cdot)$ is decreasing and converges to zero as $t \to \infty$ for each fixed $r \ge 0$. $c^k(\mathcal{X})$ denotes the class of continuously $k$ times differentiable functions on $\mathcal{X}$.

For a matrix $M \in \mathbb{R}^{n \times n}$, $\sigma(M)$ denotes its spectrum, $\lambda_i(M)$ its $i$-th eigenvalue, and $\sigma_i(M)$ its $i$-th singular value, defined as $\sigma_i(M) = \sqrt{\lambda_i(M^\top M)}$. The minimum and maximum singular values are denoted by $\sigma_{\min}(M)$ and $\sigma_{\max}(M)$, respectively, and the condition number of $M$ is $\mu(M) = \frac{\sigma_{\max}(M)}{\sigma_{\min}(M)}$.

For any matrix $M \in \mathbb{R}^{n \times n}$, its skew-symmetric and symmetric parts are defined as $\text{skew}(M) = \frac{1}{2}(M - M^\top)$ and $\text{sym}(M) = \frac{1}{2}(M + M^\top)$. A matrix $P$ is said to be symmetric if $P = P^\top$. A symmetric matrix $P \in \mathbb{R}^{n \times n}$ is
positive definite, denoted by $P > 0$, if $x^\top P x > 0$, for all $x \in \mathbb{R}^n \setminus \{0\}$. Given a real-valued function $\mathcal{H}: \mathbb{R}^n \to \mathbb{R}$, we denote its gradient (in covector form) as $\frac{\partial \mathcal{H}}{\partial x}$, for the sake of clarity and simplicity in the exposition, we write its column vector form as $\nabla \mathcal{H}(x) = \frac{\partial \mathcal{H}(x)}{\partial x}^\top$. Then its Hessian will be written as $\nabla^2 \mathcal{H}(x) = \frac{\partial \nabla \mathcal{H}(x)}{\partial x}$. To apply a chain rule to a matrix $J(x)$ times a vector $Qx$ multiplication, we consider the following notation

$$ \frac{\partial (J(x)Qx)}{\partial x} = \nabla J(x, Qx) + J(x)Q $$

where $\nabla J(x, \cdot)$ denotes the 3-tensor obtained by taking the Jacobian of each of the columns of $J(x)$, i.e., the i-th column of $\nabla J(x, Qx)$ is given by $\nabla J_i(x)Qx$, where $J_i(x)$ is the i-th column in $J(x)$.

For the sake of exposition, we use the notation $M = M(x)$, $\hat{M} = M(\hat{x})$, and $\tilde{M} = \hat{M} - M$, for $M \in \{J, R, g, \mathcal{H}\}$, while $\nabla \mathcal{H} = \nabla \hat{\mathcal{H}} - \nabla \mathcal{H} = \nabla \mathcal{H}(\hat{x}) - \nabla \mathcal{H}(x)$.

## II. PRELIMINARIES AND CONTEXT

### A. Dynamical systems and observer design problem

Let $\mathcal{X} \subseteq \mathbb{R}^n$ be a differentiable manifold. We consider the class of dynamical systems characterized by the state-space representation

$$ \begin{aligned} \dot{x} &= f(x, u), \quad x(t_0) = x_0 \\ y &= h(x) \end{aligned} \qquad (1) $$

where $t \in [t_0, \infty)$, $x(t) \in \mathcal{X}$ denotes the state vector in local coordinates, $u(t) \in \mathcal{U} \subseteq \mathbb{R}^{n_u}$ is the input, and $y(t) \in \mathcal{Y} \subseteq \mathbb{R}^{n_y}$ is the output, $f: \mathcal{X} \times \mathcal{U} \to \mathcal{T}\mathcal{X}$ and $h: \mathcal{X} \to \mathcal{Y}$. The sets $\mathcal{X}$ and $\mathcal{T}\mathcal{X}$ are the state manifold and the associate tangent bundle, while $\mathcal{U}$ and $\mathcal{Y}$ denote the input and output spaces, respectively. With a slight abuse of notation, $\mathcal{U}$ also denotes the set of admissible input signals $u: [t_0, \infty) \to \mathcal{U}$ that ensure the forward completeness<fnref n="1" /> of the system.

Related to the dynamical system (1), we consider the following identity observer design problem. An identity observer for (1) is a dynamical systems

$$ \begin{aligned} \dot{\hat{x}} &= F(\hat{x}, u, y), \quad \hat{x}(t_0) = 0 \\ \hat{y} &= h(\hat{x}) \\ \hat{\ell} &= \ell(\hat{x}) \end{aligned} \qquad (2) $$

where $\hat{x} \in \hat{\mathcal{X}} \subseteq \mathbb{R}^n$, $F: \hat{\mathcal{X}} \times \mathcal{U} \times \mathcal{Y} \to \mathcal{T}\hat{\mathcal{X}}$, and $\ell: \mathbb{R}^n \to \mathbb{R}^{n_\ell}$, $\ell \in \mathcal{C}^0$. In the context of observer design, $\hat{y}$ is the reconstructed output measurement, and it is used to drive the observer state to converge on the original system trajectory, while $\hat{\ell}$ plays the role of an unmeasured vector-value function to reconstruct <fnref n="2" />. The latter problem, also known as functional observer design [34], [35], does not necessarily employ an identity observer. Instead, it may use reduced-order dynamics combined with partial measurement reconstruction to estimate the evolution of the unmeasurable vector $\ell(x)$.

For an identity observer, its vector field $F$ must be designed such that for all $\hat{x} = x$ it holds $F(x, u, h(x)) = f(x, u)$ for all $(x, u) \in \mathcal{X} \times \mathcal{U}$, and for any $x_0 \in \mathcal{X}$, it must be $\hat{x}(t) \xrightarrow{t \to \infty} x(t)$. The latter property is called convergence of the observer dynamics; the former is instead a function agreement property that involves both fine mathematical modeling and observer stability robustness. In the context of this study, we assume that the system model is available and specified with sufficiently high accuracy.

### B. Dissipative/Passive systems

Established in the seminal works by Willems [36], [37], the theory of dissipative systems characterizes the input-output relationship of physical systems from an energy balance point of view, by means of the so-called supply rate $s$ and storage function $S$.

**Definition II-B.1 (Dissipative systems).** A nonlinear system (1) is said to be dissipative with respect to the supply rate $s: \mathcal{U} \times \mathcal{Y} \to \mathbb{R}$ and the storage function $S: \mathcal{X} \to \mathbb{R}_{\ge 0}$ if, for all $t_1, t_2 \in \mathbb{R}$ with $t_2 \ge t_1$, the inequality

$$ S(x(t_2)) - S(x(t_1)) \le \int_{t_1}^{t_2} s(u(\tau), y(\tau)) d\tau \qquad (3) $$

holds for every admissible input-state-output<fnref n="3" /> trajectory $t \mapsto (u(t), x(t), y(t))$ satisfying (1).

The standard interpretation of the dissipation inequality (3) is that the increase in stored energy, i.e., $S(x(t_2)) - S(x(t_1))$, cannot exceed the amount of energy provided by the environment through the supply rate; the difference between what is supplied and what is stored represents the energy dissipated by the system.

An important subclass of dissipative systems arises when the supply rate is given by the injected power, namely the inner product between input and output, i.e., $s(u, y) = y^\top u$, in this context we say that $u$ and $y$ are conjugate entities. Dissipativity with respect to this supply rate is called passivity. This property has been extensively employed and exploited in the port-Hamiltonian framework, see as reference [5], introduced in the seminal work by Maschke and van der Schaft [1].

### C. Port-Hamiltonian systems

The concept of passive system is explicitly expressed by the dynamics of the port-Hamiltonian systems. In particular, a nonlinear system (1) is port-Hamiltonian when its dynamical equation presents a predefined structure, of the form

$$ \begin{aligned} \dot{x} &= (J(x) - R(x))\nabla\mathcal{H}(x) + g(x)u \\ y &= g(x)^\top\nabla\mathcal{H}(x) \end{aligned} \qquad (4) $$

where $J: \mathcal{X} \to \mathbb{R}^{n \times n}$ is a skew-symmetric matrix that describes the underlying Dirac structure (i.e., the energy transfer between different physical domains), $R: \mathcal{X} \to \mathbb{R}^{n \times n}$ is a positive semi-definite matrix describing the dissipative elements

<footnote n="1">¹A system is called forward complete if, for every initial condition, the corresponding solution is defined for all $t \ge t_0$ [33].</footnote>

<footnote n="2">²As pure state-feedback techniques such as the IDA-PBC approach or any other control law of the form $\alpha(\hat{x})$</footnote>

<footnote n="3">³Admissible input-state-output trajectories refer to non-diverging state evolution satisfying the system dynamical equation that are induced by admissible inputs and producing non-diverging output signals, as introduced in [38], [39]</footnote>
of the system, and $\mathcal{H}: \mathcal{X} \to \mathbb{R}$ is the Hamiltonian function associated to the system energy. The particular structure of $y$ defines an output that is power-conjugated to the input $u$, i.e., their inner product provides an equivalent power quantity.

We said that the passivity concept is explicitly expressed by the dynamics of a port-Hamiltonian system (4) because, via the energy balance, we retrieve the differential form of the dissipation inequality (3), i.e.,

$$ \dot{\mathcal{H}} = \nabla \mathcal{H}^{\top} (J - R) \nabla \mathcal{H} + \nabla \mathcal{H}^{\top} gu \leq y^{\top} u. $$

Thus, the system dynamics explicitly satisfies the dissipation inequality of a passive system if $\mathcal{H}$ is lower bounded.

**Structure preservation:** The relevance of port-Hamiltonian systems in the literature of dynamical systems is given by their flexibility to interconnect each other. This relevant feature is strengthened by the fact that the resulting interconnected system once again has the port-Hamiltonian structure and that related Hamiltonian function is the sum of the Hamiltonians of the two considered systems.

This has a powerful consequence: interconnected port-Hamiltonian systems are port-Hamiltonian, so they preserve the dynamical equation structure and the passivity properties are combined. Therefore, in the framework of port-Hamiltonian systems, when analyzing an interconnection it is relevant to focus on the preservation of the dynamical equations structure and on the passivity properties of the resulting system. However, having a port-Hamiltonian dynamical equations structure, that is one can identify the involved terms $J, R, \mathcal{H}, g$, does not imply a passivity property. Hence, with structure-preserving analyzes in port-Hamiltonian context, it should be intended as preservation of the dynamical equations structure together with the passivity properties of the original systems.

### D. Convergent Dynamics

Although classical notions of stability are defined with respect to an equilibrium point, modern system analysis has moved their attention on how trajectories evolve relative to one another. This paradigm change was motivated by the introduction of incremental and differential notions of stability, which generalize Lyapunov stability by characterizing convergence between system trajectories, see [40] for a recent review on the topics. Incremental stability was first formalized in the context of Lyapunov theory in [41], while differential stability and contraction analysis were developed in [32], [42]. These concepts form the theoretical foundation for convergent dynamics and contraction theory, providing powerful tools for the analysis of stability of nonlinear dynamical systems. Connections between contraction theory and port-Hamiltonian systems can be found in [43], [44].

**Convergent dynamics:** A particular case of incremental stability occurs when there exists a unique limiting trajectory $x^*(t) := \varphi(x_0^*, t; t_0)$, attractive for all trajectories in a region $\bar{\mathcal{X}} \subseteq \mathcal{X}$ and bounded for all time.

**Definition II-D.1 (Convergent dynamics [27]).** A system $\dot{x} = f(x, t)$ is convergent in a forward invariant set $\bar{\mathcal{X}} \subseteq \mathcal{X}$ if:

* there exists a unique solution $x^*(t)$ in $\bar{\mathcal{X}}$ defined and bounded for all $t \in \mathbb{R}$;

* $x^*(t)$ is attractive in $\bar{\mathcal{X}}$, i.e., there exists a class $\mathcal{KL}$ function $\beta_{t_0}$ such that for any trajectory $x(t)$ initialized at $(t_0, x_0) \in \mathbb{R} \times \bar{\mathcal{X}}$,

$$ \|x(t) - x^*(t)\| \leq \beta_{t_0} (\|x_0 - x_0^*\|, t - t_0), \quad \forall t \geq t_0. \]

A sufficient condition to determine whether the system is convergent (or incrementally stable) on a forward invariant manifold $\bar{\mathcal{X}}$ is the existence of a constant metric $P$ for which the induced distance between any two trajectories of the system is monotonically decreasing in time. We thus have the following well-known result, also known as Demidovic condition in [27].

**Lemma II-D.1.** A system $\dot{x} = f(x, t)$ is convergent on $\mathcal{X}$ if there exists a constant $P \in \mathbb{R}^{n \times n}$ symmetric and positive definite, such that

$$ P \frac{\partial f(x, t)}{\partial x} + \frac{\partial f(x, t)^{\top}}{\partial x} P < 0 \quad (5) $$

for all $x \in \mathcal{X} \subset \mathbb{R}^n$ and $t \geq t_0$.

Condition (5) directly implies that the $P$-induced norm of the difference between any two trajectories vanishes asymptotically, i.e.,

$$ \|x(t) - x^*(t)\|_P := (x(t) - x^*(t))^{\top} P (x(t) - x^*(t)) \underset{t \to \infty}{\longrightarrow} 0. $$

### III. IDENTITY OBSERVER DESIGN VIA CONVERGENCE ANALYSIS

Our final objective is seeking structure preservation and passivity analysis involving the observer dynamics, we are not considering any coordinate transformation and, for the same reason, the measured outputs are the standard passive outputs of the systems (thus, we can already foreseen restrictive conditions on the designed observer convergence property). Furthermore, because pH systems are passive, it is out of the scope to deal with the observer stability in terms of robustness.

Following the description of the identity observer problem in Sec. II-A, in this section, we consider

$$ \dot{x} = (\hat{J} - \hat{R} - \hat{L}^{\top} \hat{g}^{\top}) \nabla \hat{\mathcal{H}} + \hat{g}u + \hat{L}^{\top} y \quad (6) $$

$$ \hat{y} = \hat{g}^{\top} \nabla \hat{\mathcal{H}} $$

where $\hat{x} \in \hat{\mathcal{X}}$ and we dropped the reconstruction of $\hat{\ell}$ for the time being, as in this section we first focus on the convergence problem. The discussion on $\hat{\ell}$ will be a topic of next section.

We exploit the identity $L^{\top}(y - g^{\top}\nabla \mathcal{H}) = 0$, to extend the system dynamics in (4) to

$$ \dot{x} = (J - R - L^{\top} g^{\top}) \nabla \mathcal{H} + gu + L^{\top} y \quad (7) $$

$$ y = g^{\top} \nabla \mathcal{H} $$

where the signal $y$ in the dynamics can be considered as a additional 'fake input' not conjugated to any output. In this new form, the agreement between vector fields in (6) and (7) is straightforward when $\hat{x} = x$. Therefore, (6) is a good
candidate for an identity observer of (4) exploiting only the passive output measurement.

From this perspective, we can notice that, in this form, the observer dynamics is the system dynamics initialized on some other initial condition from which the two output measurements $\hat{y}$ and $y$ do not agree. This reformulation allows us to exploit the contraction property, i.e., Lemma II-D.1, on the observer dynamics (6), to obtain the observer convergence on a certain domain of interest $\hat{\mathcal{X}}$.

**Remark III.1** For nonlinear pH systems, it is useful to distinguish two main sources of nonlinearity: (a) nonlinearities in the interconnection structure and (b) nonlinearities in the gradient of the Hamiltonian (storage function). The former typically manifests itself through state-dependent matrices, whereas the latter arises from non-quadratic Hamiltonians. Both types may occur simultaneously in the same dynamics, which generally complicates stability and convergence analysis.

Next, we restrict attention to two subclasses of port-Hamiltonian systems with constant input matrix $g(x) = g$: (i) systems with a quadratic Hamiltonian $\mathcal{H}$, and (ii) systems with constant parameters $J$ and $R$ but a non-quadratic Hamiltonian. In both cases, we take the output injection matrix $L$ to be constant (as is $g$). This choice keeps the exposition simple by avoiding the design of $L(x)$ via a PDE.

Moreover, due to the peaking phenomenon in observer transients, the observer state $\hat{x}(t)$ may (in principle) leave the original state space $\mathcal{X}$. To guarantee uniform convergence, we therefore study convergence on a larger set $\hat{\mathcal{X}}$ such that $\mathcal{X} \subseteq \hat{\mathcal{X}} \subset \mathbb{R}^n$.

### A. Observer design with constant Hessian

In this subsection, we consider the case in which the system (7) has a quadratic form Hamiltonian, i.e., $\mathcal{H}(x) = \frac{1}{2}x^\top Q x$, with $Q = Q^\top$ positive definite, so that $\nabla \mathcal{H}(x) = Qx$, and we have the following

**Theorem III-A.1.** Given system (7), with $x \in \mathcal{X}$, with $g(x) = g$ constant, and $\nabla \mathcal{H}(x) = Qx$, with $Q$ positive definite. The observer dynamics (6), with $\hat{x} \in \hat{\mathcal{X}}$, converges to the system state, i.e., $\hat{x} \xrightarrow{t \to \infty} x$, if there exists a constant $L$ such that for any $x \in \hat{\mathcal{X}}$

$$R'(x) + \mathrm{sym}(gL) \geq \beta I > 0, \quad (8)$$

where

$$R'(x) = R - \mathrm{sym}(\nabla J(x, Qx)Q^{-1} - \nabla R(x, Qx)Q^{-1}). \quad (9)$$

Moreover, for any $\alpha$ satisfying $\beta I \geq \alpha Q^{-1}$, the convergence rate of the observer error is of the form

$$|\tilde{x}(t)| \leq \mu(Q) \exp(-\alpha t) |\tilde{x}(0)|. \quad (10)$$

with $\alpha$ being a positive constant.

**Proof.** To have a convergent observer, due to $\mathcal{X} \subseteq \hat{\mathcal{X}}$, we need to guarantee the convergence property of (7) for any

$x \in \hat{\mathcal{X}}$. That is, according to Lemma II-D.1 and considering the dynamics in (7) as $\dot{x} = F(x, t)$, we analyze its gradient

$$\begin{aligned} \frac{\partial F}{\partial x}(x, t) &= \left( \frac{\partial J(x)}{\partial x} - \frac{\partial R(x)}{\partial x} \right) Qx \\ &\quad + (J(x) - R(x) - L^\top g^\top) Q \\ &= (\nabla J(x, Qx)Q^{-1} - \nabla R(x, Qx)Q^{-1} \\ &\quad + (J(x) - R(x) - L^\top g^\top)) Q \\ &= (J'(x) - R'(x) - L^\top g^\top) Q, \end{aligned}$$

where

$$J'(x) = J - \mathrm{sym}(\nabla J(x, Qx)Q^{-1} - \nabla J(x, Qx)Q^{-1}). \quad (11)$$

Then the convergence property can be studied with respect to the metric $Q$, i.e., defining $V = \tilde{x}^\top Q \tilde{x} = 2\mathcal{H}$ and taking its time derivative, we have by the mean value theorem

$$\begin{aligned} \dot{V} &= 2\tilde{x}^\top Q(F(\tilde{x}, t) - F(x, t)) = \\ &= 2\tilde{x}^\top Q \int_0^1 \frac{\partial F}{\partial x}(\bar{x}(t, s), t) ds \tilde{x} \\ &= 2\tilde{x}^\top Q \int_0^1 (J'(\bar{x}(t, s)) - R'(\bar{x}(t, s)) - L^\top g^\top) ds Q \tilde{x} \end{aligned}$$

where $\bar{x}(t, s) = x + s(\hat{x} - x)$ for $s \in [0, 1]$. We can hence write

$$\dot{V} = -\tilde{x}^{\top} Q \int_{0}^{1} (R'(\bar{x}(t, s)) + \mathrm{sym}(gL)) ds Q\tilde{x} < 0$$

Then, by standard arguments, since $R' + \mathrm{sym}(gL)$ is uniformly positive, there exists a positive $\alpha$ such that for every $x \in \hat{\mathcal{X}}$

$$-R'(x) - \mathrm{sym}(gL) \leq -\alpha Q^{-1},$$

so that we have (10) by applying the comparison lemma [45, Lemma 3.4] to the Lyapunov function. □

**Remark III.2** This result resembles the approach proposed in [21] and it is the complement of the one proposed in [20] in which the authors assume that the system matrices are constant and the only nonlinearity is due to the gradient of the Hamiltonian $\nabla \mathcal{H}(\hat{x})$.

### B. Observer design with constant structural matrices

In this subsection, we consider a system dynamics (7) whose matrices $J, R, g$ are constant and that the only nonlinearity comes from the gradient of the Hamiltonian function $\nabla \mathcal{H}(x)$. We additionally assume that the Hessian of $\mathcal{H}$ is diagonalizable by means of a constant orthogonal matrix $T$, i.e., $\nabla^2 \mathcal{H}(x) = T^\top \Lambda \nabla^2 \mathcal{H} T$, where

$$\Lambda \nabla^2 \mathcal{H} = \mathrm{diag} \left( \lambda_1(\nabla^2 \mathcal{H}), \dots, \lambda_n(\nabla^2 \mathcal{H}) \right)$$

is the matrix with the eigenvalues of $\nabla^2 \mathcal{H}(x)$ on the main diagonal. For this class of systems, we have the following result.

**Theorem III-B.1.** Consider (7) with constant matrices $J, R, g$, and consider $Q = \nabla^2 \mathcal{H}(x_{\min})$ to be positive definite, where
$x_{min}$ is such that, for all $x \in \hat{\mathcal{X}}$, $\nabla^2 \mathcal{H}(x) - \nabla^2 \mathcal{H}(x_{min}) \ge 0$. Moreover, assume that there exists a constant orthogonal matrix $T$ such that $\nabla^2 \mathcal{H}(x) = T^\top \Lambda \nabla^2 \mathcal{H}(x) T$ for all $x \in \hat{\mathcal{X}}$. Then the observer dynamics (6) is convergent on $\hat{\mathcal{X}}$ with metric $\underline{Q}$ if there exists a constant $L$ such that

$$R(x) + \operatorname{sym}(gL) \ge \beta I > 0, \quad (12)$$

for all $x \in \hat{\mathcal{X}}$. Moreover, for any $\alpha$ satisfying $\beta I \ge \alpha \underline{Q}^{-1}$ we can explicitly determine the exponential convergence of the observation error as

$$\|\tilde{x}(t)\| \le \mu(\underline{Q}) \exp(-\alpha t) |\tilde{x}(0)|. \quad (13)$$

**Proof.** The proof of this theorem leverages on the orthogonal transformation $T$. In particular, by definition of $\underline{Q}$, we first introduce $\Delta Q(x) := \nabla^2 \mathcal{H}(x) - \underline{Q} \ge 0 \forall x \in \hat{\mathcal{X}}$, that is the deviation matrix between $\nabla^2 \mathcal{H}(x)$ and $\underline{Q}$ and is always positive semidefinite on the domain of interest $\hat{\mathcal{X}}$. Then, since $T$ is a constant transformation, it diagonalizes the matrix $\underline{Q}(:= \nabla^2 \mathcal{H}(x_{min}))$ and, hence, also the matrix $\Delta Q(x)$.

We now show by contradiction that the matrix

$$\underline{Q}(J - R - L^\top g^\top) \Delta Q(x)$$

is negative semidefinite for all $x \in \hat{\mathcal{X}}$. Thus, assume it is positive semidefinite, then we have

$$\begin{aligned} \underline{Q}(J - R - L^\top g^\top) \Delta Q(x) &= T^\top \Lambda(\underline{Q}) T(J - R - L^\top g^\top) T^\top \Lambda(\Delta Q(x)) T \\ &\le \lambda_{\max}(\underline{Q})(J - R - L^\top g^\top) \lambda_{\max}(\Delta Q(x)) \le 0 \end{aligned}$$

by the property (12) of $L$. Hence, we have a contradiction. In particular, we have

$$\begin{aligned} T^\top \Lambda(\underline{Q}) T(J - R - L^\top g^\top) T^\top \Lambda(\Delta Q(x)) T \\ \le \lambda_{\min}(\underline{Q})(J - R - L^\top g^\top) \lambda_{\min}(\Delta Q(x)) = 0 \end{aligned}$$

because $\Delta Q(x)$ is positive semidefinite for all $x \in \hat{\mathcal{X}}$.

We can now proceed with the convergence proof considering as Lyapunov function $V = \tilde{x}^\top \underline{Q} \tilde{x}$. Taking the time derivative of $V$ we have

$$\begin{aligned} \dot{V} &= 2\tilde{x}^\top \underline{Q} (F(\tilde{x}, t) - F(x, t)) = 2\tilde{x}^\top \underline{Q} \int_0^1 \frac{\partial F}{\partial x}(\tilde{x}(t, s), t) ds \tilde{x} \\ &= 2\tilde{x}^\top \int_0^1 \underline{Q} \left[ (J - R - L^\top g^\top) \nabla^2 \mathcal{H}(\tilde{x}(t, s)) \right] ds \tilde{x} \\ &= 2\tilde{x}^\top \int_0^1 \underline{Q} \left[ (J - R - L^\top g^\top) (\underline{Q} + \Delta Q(\tilde{x}(t, s))) \right] ds \tilde{x} \\ &\le 2\tilde{x}^\top \underline{Q} \left[ (J - R - L^\top g^\top) \underline{Q} \right] \tilde{x} < 0, \forall \tilde{x} \ne 0. \end{aligned}$$

Then, because $R+\operatorname{sym}(gL)$ is uniformly positive, there exists a positive $\alpha$ such that

$$-R - \operatorname{sym}(gL) \le -\alpha \underline{Q}^{-1},$$

so that we have (13) by applying the comparison lemma [45, Lemma 3.4] to the Lyapunov function. □

**Remark III.3** A particular case in which Theorem III-B.1 can be applied is when $\mathcal{H}$ is separable, so that its Hessian has a natural diagonal structure and thus $T$ is the identity matrix. ▼

### C. Observer design: a general case

This result can be easily extended and merged with the results presented in the previous subsection (Sec.III-A), under the existence assumption of such a transformation matrix $T$, if (8) can be satisfied for all $x \in \hat{\mathcal{X}}$ by a constant $L$.

**Theorem III-C.1.** Consider (7) with constant matrix $g$, and consider $\underline{Q}$ and $T$ defined as in Theorem III-B.1. Then the observer dynamics (6) is convergent on $\hat{\mathcal{X}}$ with metric $\underline{Q}$ if there exists a constant $L$ such that (8) is satisfied for all $x \in \hat{\mathcal{X}}$. Moreover, for some positive $\alpha$, we can explicitly determine the exponential convergence of the observation error as in (13) ▼

The proof is simply an application of the previous Theorems' proofs and thus it is omitted.

**Remark III.4** The results shown in this section hold for any value of $u$ and $y$, and allow us to determine an exponential convergence of the observed dynamics with convergence rate $\alpha$. Such a value only depends on the choice of $L$ and, because $\underline{Q}$ is a fixed metric independent of $L$, we can possibly make $\alpha$ arbitrarily large by properly defining $L$. This property paves the way for the design of an observer-based controller that leverages the separation principle. ▼

### D. Discussion on the choice of $L$

The existence of the matrix $L$ satisfying (8) and/or (12), introduced for the observer design, can be determined through the sufficient condition introduced in [25, Lemma 4]. In particular, the authors show that there exists a matrix $L$, such that for all $x \in \hat{\mathcal{X}}$, (8) holds with $R'(x) \ge 0$, if and only if (8) is satisfied 'already' by the trivial choice $L = g^\top$. Thus, for $R'(x) \ge 0$, this 'observability' condition can be easily checked by first setting $L = g^\top$. We can then set $L = \gamma g^\top$, with positive scalar $\gamma$ chosen sufficiently high, to possibly obtain a desired convergence rate $\alpha$.

For $R'(x)$ which is not sign defined, but bounded from below we can still get a similar property as detailed in the following generalization of Lemma 4 in [25].

**Lemma III-D.1.** Define $\underline{R}'$ as the minimum value for $R'$ in (11), i.e., for all $x \in \hat{\mathcal{X}}$, $R'(x) \ge \underline{R}'$, and assume it to take finite values on $\hat{\mathcal{X}}$. If there exists a $\Gamma = \Gamma^\top$ such that $\underline{R}' + g\Gamma g^\top \ge 0$, then there exists an $L$ such that (8) if and only if (8) is satisfied by $L = (\Gamma + I)g^\top$. ▼

The proof reads as in [25] when considering $R(x) = \underline{R}' + g\Gamma g^\top \ge 0$, and thus it is omitted.

In this case, to obtain the observer convergence rate and satisfy (8), we can define $L = (\Gamma + \gamma I)g^\top$, with $\Gamma$ as defined above, and set $\gamma > 0$ according to the desired observer convergence rate.
## E. The linear case

A particular case of the scenarios considered above is the linear case, for which we can give a larger characterization of the observer convergence. In particular, it is well-known that for linear systems, the observation error dynamics is autonomous, i.e., (19) is independent of the $u(t)$ and $\nabla H$ terms. Thus in this scenario, a sufficient condition for the observer convergence is that (12) is satisfied. However, we can think of the matrix $L$ to be parameterized into a symplectic $J_L$, positive definite<fnref n="4" /> $R_L$ and the $g$ matrices, i.e., we write

$$L = (J_L + R_L)g^\top.$$

With this parameterization of $L$, the observer error dynamics (19) reads as

$$\dot{\tilde{x}} = (J + gJ_Lg^\top - (R + gR_Lg^\top))Q\tilde{x} = (J_{\text{obs}} - R_{\text{obs}})Q\tilde{x} \quad (14)$$

and if $R_{\text{obs}} \ge 0$ we can still have asymptotic stability of the origin for $\tilde{x}$, even if $J_{\text{obs}} - R_{\text{obs}}$ is not Hurwitz, as described in the following corollary.

**Proposition III-E.1.** Denote by $k$ the dimension of the kernel of $R_{\text{obs}} \ge 0$, and assume it is spanned by $\{r_1, \dots, r_k\}$. Then (14) is asymptotically stable if and only if the matrix

$$(sI - QJ_{\text{obs}}) [r_1|r_2|\dots|r_k]$$

has rank $k$, for every $s = j\omega$, $\omega \in \mathbb{R}$.

The proof of this proposition follows the same steps as that for [17, Proposition 6], and it is thus omitted.

We can then characterize the stability of an autonomous linear system, rather than placing its eigenvalues on the open left hand side, by exploiting the positive semidefiniteness of its equivalent resistive part along with the geometrical conditions related to its kernel space.

**Remark III.5** Note that however, conditions (8) and (12) only sufficient and can be restrictive for a general class of port-Hamiltonian systems. In particular, it is still possible to obtain the attractiveness of the origin for $\tilde{x}$ with $R'(x)+\text{sym}(gL) \ge 0$ for all $x \in \hat{\mathcal{X}}$, if some additional condition on the error dynamics is fulfilled. For linear systems, this condition is easy to find, as shown in [17, Proposition 6], and it is related to kernel space of $R + \text{sym}(gL)$, as in Proposition III-E.1. By applying the same kernel arguments as in this subsection, it possible to weaken the restrictive conditions on $L$, while on the same time some Lasalle-like arguments should be added to prove the convergence of the observer dynamics. The extension to the nonlinear case is currently under investigation and left for a future work.

Moreover, we believe that this type of approach can also lead to a separation principle in the nonlinear context for the class of port-Hamiltonian systems with a constant input matrix because the input signal does not affect the convergence rate of the observer dynamics.

Here the intent is to have some preliminary results on observer design in easy to handle cases (thus obtaining conditions for observer convergence that may result as restrictive) and to discuss passivity seeking limitations.

## F. Comparison with other observer approaches

This section positions the proposed design with respect to existing observer constructions for nonlinear port-Hamiltonian systems.

The earliest observer design for nonlinear pH systems is [18]. Its convergence analysis is carried out under the additional requirement that the trajectories reach a steady-state equilibrium. A later contribution is [19], which provides a passivity-based observer with global exponential convergence for pH systems featuring nonlinear interconnection and a nonlinear Hamiltonian gradient. The price for this generality is that the observer relies on extra measurements that are not conjugate to the system input and that are assumed available for feedback, and its construction requires solving algebraic equations as well as PDEs.

For pH systems with constant structure matrices and non-quadratic Hamiltonian functions, [20] proposes an observer synthesis inspired by interconnection and damping assignment passivity-based control (IDA-PBC) [6]. Related passivity-based observer designs are developed in [21] and extended in [22]. We emphasize that [20] adopts a structure-preserving description that differs from the one used here: in our case the observer dynamics are analyzed through an explicit pH representation (explicit Hamiltonian, interconnection, and resistance matrices), which allows us to directly establish passivity relations between the observer input signals and their conjugate outputs.

For nonlinear pH systems with linear Hamiltonian gradient, in [23], an integral action is added to a proportional passivity-based observer to improve robustness against constant disturbances. A Lyapunov-based observer is presented in [24] for a class of bilinear pH systems. In [25], the considered nonlinear pH class assumes a particular Hamiltonian shape (a quadratic form plus a nonlinearity depending on a subset of the state); additionally, the output injection exploits measurements that are not conjugate to the original input, including direct access to the “critical” state component entering the nonquadratic part, which substantially simplifies the estimation problem.

Finally, [26] studies an observer-based controller by analyzing passivity of the system–observer cascade and combines the observer with an MPC-like strategy for controller synthesis.

Overall, among the above contributions, [18] and [19] are the only two approaches that explicitly address pH systems with both nonlinear structural matrices and nonlinear Hamiltonian gradient. Nevertheless, [18] does not provide a general asymptotic convergence guarantee, while [19] requires solving a delicate set of algebraic equations and PDEs.

Compared to [13], the proposed approach is more general because we do not require the matrix $(J_o - R_o)$ to be Hurwitz, which may fail even under full observability, see also the discussion around Proposition III-E.1. While, compared to [20], our result avoids the solution of an algebraic Riccati inequality (or an ARE with an arbitrarily small $\epsilon$, as in their paper). On the other hand, our analysis assumes the existence of a constant transformation matrix $T$ that diagonalizes the Hessian of $H$.

<footnote n="4">⁴Previously, we considered $R_L = \Gamma + \gamma I$.</footnote>
<figure><img src="image_2.png" /><figcaption>Fig. 1. System-observer cascade configuration highlighting the passive part of the observer dynamics.</figcaption></figure>

## IV. DISCUSSIONS ON STRUCTURE PRESERVATION AND PASSIVITY

In this last part of the paper, we come back to the general formulation in which all structural matrices are state dependent.

One can notice that in (6), there is a floating input that is not conjugate to any output. Thus, we induce the functional observer structure (2) by augmenting the number of reconstructed outputs

$$ 
\begin{aligned}
\dot{\hat{x}} &= (\hat{J} - \hat{R} - \hat{L}^{\top}\hat{g}^{\top})\nabla\hat{\mathcal{H}} + \hat{g}u + \hat{L}^{\top}y \\
\hat{y} &= \hat{g}^{\top}\nabla\hat{\mathcal{H}} \\
\hat{\ell} &= \ell(\hat{x}).
\end{aligned} 
\quad (15) $$

This dynamics, encompassed by the blue rectangle in Fig. 1, takes as input $(u, y)$ and provide $(\hat{y}, \hat{\ell})$ as output. In order to pursue a passivity analysis, we first impose a port-Hamiltonian structure to the observer dynamics with augmented outputs (15). In particular, we decompose the injection term by the identity

$$ \hat{L}^{\top}y = \psi\psi^{\dagger}\hat{L}^{\top}y $$

where $\psi: \hat{\mathcal{X}} \to \mathbb{R}^{n \times n_\ell}$, and $\psi^\dagger \in \mathbb{R}^{n_\ell \times n}$ is such that $\psi\psi^\dagger = I$ for every $\hat{x} \in \hat{\mathcal{X}}$, i.e., it is a pointwise right-inverse of $\psi$. By forcing this decomposition, we implicitly restrict the function of interest $\ell$ to a certain class, i.e., the class of functions that can be rewritten as the multiplication between a matrix-valued function $\psi^\top$ and the gradient of the system Hamiltonian $\nabla\mathcal{H}$. Then, the decomposed functional observer (15) reads as<fnref n="5" />

$$ 
\text{Observer} \quad 
\left\{ 
\begin{array}{l}
u_{\ell} = \psi(\hat{x})^{\dagger}\hat{L}^{\top}y \\
\text{Passive} \quad 
\left\{ 
\begin{aligned}
\dot{\hat{x}} &= (\hat{J} - \hat{R} - \hat{L}^{\top}\hat{g}^{\top})\nabla\mathcal{H}(\hat{x}) + \hat{g}u + \psi(\hat{x})u_{\ell} \\
\hat{y} &= \hat{g}^{\top}\nabla\hat{\mathcal{H}} \\
\hat{\ell} &= \psi(\hat{x})^{\top}\nabla\hat{\mathcal{H}}
\end{aligned}
\right.
\end{array}
\right. 
\quad (16) $$

where the signals $(\hat{y}, \hat{\ell})$ are the collocated outputs of the inputs $(u, u_\ell)$. Furthermore, if $R(\hat{x}) + \text{sym}(g(\hat{x})L(\hat{x})) \ge 0$ for all $\hat{x} \in \hat{\mathcal{X}}$, the observer is passive with respect to the inputs $(u, u_\ell)$ and these conjugated outputs $(\hat{y}, \hat{\ell})$.

In this scenario, $\psi$ acts as a phantom input matrix for the passive dynamical component of the observer, thereby

inducing a port-Hamiltonian structure for the functional observer (15). The matrix $\psi$ is introduced solely to preserve the structure of an explicit port-Hamiltonian system. Consequently, if such a matrix-valued function $\psi$ exists, whether or not it is known or explicitly used, the observer is intrinsically passive with respect to the inputs $(u, u_\ell)$ and outputs $(\hat{y}, \hat{\ell})$.

### A. Passive state observation

In the introduced framework, to obtain a passive state reconstruction, we need to assume a strong property of the Hamiltonian gradient $\nabla\mathcal{H}(x)$, i.e., there exists a locally invertible $\psi$ such that $x = \psi(x)\nabla\mathcal{H}(x)$. Thus the observer dynamics reads as

$$ 
\begin{aligned}
u_{\ell} &= \psi(\hat{x})^{\dagger}L(\hat{x})^{\top}y \\
\dot{\hat{x}} &= (\hat{J} - \hat{R} - \hat{L}^{\top}\hat{g}^{\top})\nabla\mathcal{H}(\hat{x}) + \hat{g}u + \psi(\hat{x})u_{\ell} \\
\hat{y} &= g(\hat{x})^{\top}\nabla\mathcal{H}(\hat{x}) \\
\hat{x} &= \psi(\hat{x})^{\top}\nabla\mathcal{H}(\hat{x}).
\end{aligned} 
\quad (17) $$

Obtaining $\psi(\hat{x})$ for the linear case, whenever $Q = Q^\top > 0$ in $\nabla\mathcal{H}(x) = Qx$, is easy since $\psi(\hat{x})^\top = Q^{-1}$. In the nonlinear context, i.e., $\nabla\mathcal{H}(x) \ne Qx$, we cannot provide any general solution for $\psi$, and the problem should be addressed on a case-by-case basis.

### B. Passive gradient observation

In this particular case, we are interested in the reconstruction of the system Hamiltonian's gradient, and thus the matrix-valued function $\psi$ is the identity matrix, thus the functional observer trivially reads as

$$ 
\begin{aligned}
u_{\ell} &= L(\hat{x})^{\top}y \\
\dot{\hat{x}} &= (\hat{J} - \hat{R} - \hat{L}^{\top}\hat{g}^{\top})\nabla\mathcal{H}(\hat{x}) + \hat{g}u + I u_{\ell} \\
\hat{y} &= g(\hat{x})^{\top}\nabla\mathcal{H}(\hat{x}) \\
\hat{\ell} &= I \nabla\mathcal{H}(\hat{x}).
\end{aligned} 
\quad (18) $$

Reconstructing the Hamiltonian gradient is a natural case of conjugated functional observation because the functional $\hat{\ell} = \nabla\mathcal{H}(\hat{x})$ is intrinsically passive with respect to the injection term $u_\ell = L(\hat{x})^\top y$, see further details in Section IV-E.

In the following, we discuss the passivity of the error dynamics and of possible interconnections, i.e., system-error dynamics, system-observer dynamics, observer-based controller.

<footnote n="5">⁵The colors of the parentheses mimic those used in Fig. 1.</footnote>
### C. Discussion on error dynamics

In order to analyze the convergence of the observer state $\hat{x}$ to the system state trajectory $x$, the standard approach is to introduce the error coordinate $\tilde{x} = \hat{x} - x$. Substituting the observer's and system's dynamics into the time derivative of $\tilde{x}$, i.e., $\dot{\tilde{x}} = \dot{\hat{x}} - \dot{x}$, we have

$$ 
\begin{aligned}
\dot{\tilde{x}} &= (\tilde{J} - \tilde{R})\nabla\tilde{H} + \tilde{L}^\top (g^\top\nabla H - \tilde{g}^\top\nabla H + \tilde{g}^\top\nabla H - \tilde{g}\nabla\tilde{H}) \\
&\quad + (\tilde{g} - g)u - (\tilde{J} - \tilde{R})\nabla H \\
&= (\tilde{J} - \tilde{R})\tilde{\nabla}H - (\tilde{J} - \tilde{R} - (\tilde{J} - \tilde{R}))\nabla H + \tilde{g}u \\
&\quad - \tilde{L}^\top (\tilde{g}^\top\tilde{\nabla}H + \tilde{g}^\top\nabla H) \\
&= (\tilde{J} - \tilde{R} - \tilde{L}^\top\tilde{g}^\top)\tilde{\nabla}H + \tilde{g}u + (\tilde{J} - \tilde{R} - \tilde{L}^\top\tilde{g}^\top)\nabla H
\end{aligned}
$$

from which we derived an error dynamics that has a (perturbed) port-Hamiltonian structure, although the error Hamiltonian function is not explicitly defined. Thus, the error dynamics reads as

$$ 
\begin{aligned}
\dot{\tilde{x}} &= (\tilde{J} - \tilde{R} - \tilde{L}^\top \tilde{g}^\top) \tilde{\nabla} H + \tilde{g} u + (\tilde{J} - \tilde{R} - \tilde{L}^\top \tilde{g}^\top) \nabla H \\
\tilde{y} &= \tilde{g}^\top \tilde{\nabla} H
\end{aligned}
\qquad (19) $$

where $\tilde{y}$ is the induced outputs conjugated to the inputs $u$.

In general, $\tilde{\nabla}H$ is not only a function of $\tilde{x}$ and thus the corresponding Hamiltonian function, obtained by integration in the $\tilde{x}$ usually depends also on the system state variable $x$. In particular, by involving the multivariable mean value theorem, we can explicitly write $\tilde{\nabla}H$ as

$$ 
\begin{aligned}
\tilde{\nabla}H &= \nabla H(\tilde{x} + x) - \nabla H(x) \\
&= \int_0^1 \nabla^2 H(x(t) + s(\hat{x}(t) - x(t)))ds \cdot (\hat{x} - x) \\
&= \int_0^1 \nabla^2 H(x(t) + s\tilde{x}(t))ds \tilde{x} = Q(x, \tilde{x})\tilde{x}
\end{aligned}
$$

where

$$ Q(x, \tilde{x}) := \int_{0}^{1} \nabla^{2} \mathcal{H}(x(t) + s\tilde{x}(t))ds. $$

However, integrating $Q(x, \tilde{x})\tilde{x}$ to get a time dependent<fnref n="6" /> Hamiltonian functional for the observer error dynamics is in general not an easy task; but, by introducing the so-called Availability function

$$ \mathcal{A}(x, \tilde{x}) = \mathcal{H}(x + \tilde{x}) - \mathcal{H}(x) - \tilde{x}^\top \nabla \mathcal{H}(x) \quad (20) $$

one can easily see that the partial derivative of $\mathcal{A}(x, \tilde{x})$ with respect to $\tilde{x}$ gives

$$ \nabla_{\tilde{x}} \mathcal{A}(x, \tilde{x}) = \nabla \mathcal{H}(x + \tilde{x}) - \nabla \mathcal{H}(x) = \tilde{\nabla} \mathcal{H} $$

Unfortunately, the partial derivative of $\mathcal{A}$ with respect to $x$ does not provide the gradient of the original system Hamiltonian $\nabla \mathcal{H}(x)$. Thus, the system-observer error cascade has a pseudo

port-Hamiltonian structure, but, in general, it is not port-Hamiltonian, i.e., the cascade dynamics reads as

$$ 
\begin{aligned}
\begin{pmatrix} \dot{x} \\ \dot{\tilde{x}} \end{pmatrix} &= \begin{bmatrix} J - R & 0 \\ \tilde{J} - \tilde{R} - \tilde{L}^\top \tilde{g}^\top & \tilde{J} - \tilde{R} - \tilde{L}^\top \tilde{g}^\top \end{bmatrix} \begin{pmatrix} \nabla_x \mathcal{H}(x) \\ \nabla_{\tilde{x}} \mathcal{A}(x, \tilde{x}) \end{pmatrix} \\
&\quad + \begin{bmatrix} g & 0 \\ 0 & \tilde{g} \end{bmatrix} \begin{pmatrix} u \\ u \end{pmatrix} \\
\begin{pmatrix} y \\ \tilde{y} \end{pmatrix} &= \begin{bmatrix} g & 0 \\ 0 & \tilde{g} \end{bmatrix}^\top \begin{pmatrix} \nabla_x \mathcal{H}(x) \\ \nabla_{\tilde{x}} \mathcal{A}(x, \tilde{x}) \end{pmatrix},
\end{aligned}
\qquad (21) $$

with no explicit total Hamiltonian function through which we can describe the passivity property of the cascade.

However, if we additionally assume that there exists a function $\mathcal{H}(\tilde{x}, x)$ such that

$$ \frac{\partial \mathcal{H}(\tilde{x}, x)}{\partial \tilde{x}} = \frac{\partial \mathcal{H}}{\partial x}(\tilde{x} + x) - \frac{\partial \mathcal{H}}{\partial x}(x), \quad \frac{\partial \mathcal{H}(\tilde{x}, x)}{\partial x} = \frac{\partial \mathcal{H}}{\partial x}(x), \qquad (22) $$

then passivity conditions simplifies for the system cascade, as detailed in the following corollary.

**Lemma IV-C.1.** Assume there exists a Hamiltonian function $\mathcal{H}(x, \tilde{x})$ with property (22). Then the cascade (4)-(19), is passive with respect to the inputs $(u, u)$ and outputs $(y, \tilde{y})$, with storage function $\mathcal{H}(x, \tilde{x})$, if the following passivity condition holds

$$ \begin{bmatrix} -2R & (\tilde{J} - \tilde{R} - \tilde{L}^\top \tilde{g}^\top)^\top \\ [(\tilde{J} - \tilde{R} - \tilde{L}^\top \tilde{g}^\top) & -2(\tilde{R} + \text{sym}(\tilde{L}^\top \tilde{g}^\top))] \end{bmatrix} \le 0. \quad (23) $$

*Proof.* The proof of the Lemma simply comes by noticing that the structure of the system-observer error cascade (21) is indeed port-Hamiltonian with a well-defined Hamiltonian function $\mathcal{H}(x, \tilde{x})$, i.e.,

$$ 
\begin{aligned}
\begin{pmatrix} \dot{x} \\ \dot{\tilde{x}} \end{pmatrix} &= \begin{bmatrix} J - R & 0 \\ \tilde{J} - \tilde{R} - \tilde{L}^\top \tilde{g}^\top & \tilde{J} - \tilde{R} - \tilde{L}^\top \tilde{g}^\top \end{bmatrix} \begin{pmatrix} \nabla_x \mathcal{H}(x, \tilde{x}) \\ \nabla_{\tilde{x}} \mathcal{H}(x, \tilde{x}) \end{pmatrix} \\
&\quad + \begin{bmatrix} g & 0 \\ 0 & \tilde{g} \end{bmatrix} \begin{pmatrix} u \\ u \end{pmatrix} \\
\begin{pmatrix} y \\ \tilde{y} \end{pmatrix} &= \begin{bmatrix} g & 0 \\ 0 & \tilde{g} \end{bmatrix}^\top \begin{pmatrix} \nabla_x \mathcal{H}(x, \tilde{x}) \\ \nabla_{\tilde{x}} \mathcal{H}(x, \tilde{x}) \end{pmatrix}
\end{aligned}
$$

where the matrix in the LMI (23) is twice the symmetric part of the cascade structure matrices. Thus, computing the time derivative of $\mathcal{H}(x, \tilde{x})$ proves the Lemma, i.e., $\dot{\mathcal{H}}(x, \tilde{x}) \le y^\top u + \tilde{y}^\top u$. $\square$

A particular case occurs when the Hamiltonian function of the system $\mathcal{H}(x)$ is quadratic, i.e., $\mathcal{H}(x) = x^\top Q x$, with an associate positive definite matrix, $Q = Q^\top > 0$. In particular, in this situation the Availability function is trivially $\mathcal{A}(x, \tilde{x}) = \mathcal{H}(\tilde{x})$, the cascade Hamiltonian function $\mathcal{H}(x, \tilde{x})$ can be taken as the sum of the two dynamics Hamiltonian, i.e., $\mathcal{H}(x, \tilde{x}) = \mathcal{H}(x) + \mathcal{H}(\tilde{x})$.

The conclusion of this analysis is that, when seeking passivity for the error dynamics or for the state-error system cascade, it can be guaranteed by quadratic Hamiltonian functions, i.e., of the form $\mathcal{H} = \frac{1}{2} x^\top Q x$.

<footnote n="6">⁶Owing to the state dependence $x(t)$.</footnote>
## D. System-observer cascade passivity

We consider now the cascade of the system and the observer dynamics. This cascade system, has again a port-Hamiltonian structure, i.e., defining $\mathcal{H}_a(x, \hat{x}) = \mathcal{H}(x) + \mathcal{H}(\hat{x})$ we have

$$ 
\begin{aligned}
\begin{pmatrix} \dot{x} \\ \dot{\hat{x}} \end{pmatrix} &= [J_a(x, \hat{x}) - R_a(x, \hat{x})] \nabla \mathcal{H}_a(x, \hat{x}) + g_a(x, \hat{x}) u_a \\
&= \begin{bmatrix} J - R & 0 \\ \hat{L}^{\top} g^{\top} & \hat{J} - \hat{R} - \hat{L}^{\top} \hat{g}^{\top} \end{bmatrix} \begin{pmatrix} \nabla_x \mathcal{H}_a(x, \hat{x}) \\ \nabla_{\hat{x}} \mathcal{H}_a(x, \hat{x}) \end{pmatrix} \\
&\quad + \begin{bmatrix} g & 0 \\ 0 & \hat{g} \end{bmatrix} \begin{pmatrix} u \\ u \end{pmatrix} \\
\begin{pmatrix} y \\ \hat{y} \end{pmatrix} &= g_a(x, \hat{x})^{\top} \nabla \mathcal{H}_a(x, \hat{x}) \\
&= \begin{bmatrix} g & 0 \\ 0 & \hat{g} \end{bmatrix}^{\top} \begin{pmatrix} \nabla_x \mathcal{H}_a(x, \hat{x}) \\ \nabla_{\hat{x}} \mathcal{H}_a(x, \hat{x}) \end{pmatrix}.
\end{aligned} \quad (24) 
$$

Therefore, with storage function $\mathcal{H}_a$, the passivity condition is satisfied if

$$ R_a(x, \hat{x}) = \begin{bmatrix} R & -\frac{1}{2}g\hat{L} \\ -\frac{1}{2}\hat{L}^{\top}g^{\top} & \hat{R} + \text{sym}(\hat{L}^{\top}\hat{g}^{\top}) \end{bmatrix} \geq 0 \quad (25) $$

and this condition can be satisfied, in general, under strong assumptions<fnref n="7" /> on $L$, despite what is reported in the analysis by [26, eq. (6)]. Thus in general, the cascade system-observer dynamics is not passive from the inputs $(u, u)$ to outputs $(y, \hat{y})$. One reason for the lack of passivity in the system-observer cascade lies in the use of a high-gain-based approach to achieve robust observer convergence. In particular, the standard choice of the output injection gain $L(\hat{x})$ typically involves ‘high-gain’ terms to enforce fast convergence of the observer dynamics. Consequently, designing a rapidly convergent observer is, in principle, at odds with maintaining any desired passivity properties of the overall system-observer cascade.

## E. On observer-based controllers

A straightforward consequence of the passivity analysis above is in the controllers design for port-Hamiltonian systems. In particular, it is well-known that any symplectic interconnection between passive systems preserves the passivity of the overall interconnected system. Thus, considering $u_\ell$ as a virtual system input, for the passive subsystem in (16), suggests the passivity- and structure-preserving control law

$$ u = -L(\hat{x})\nabla\mathcal{H}(\hat{x}) + v \quad (26) $$

where $L$ is the output injection term matrix employed to provide the observer subsystem passivity<fnref n="8" />, $\nabla\hat{\mathcal{H}}$ is the observer co-state, i.e., a particular observed functional $\hat{l}$, and $v \in \mathbb{R}^m$ is an auxiliary input the interconnected dynamics (4)-(16). The symplectic feedback (26) thus provides the passivity property with respect to the inputs $(v, v)$ and the outputs

<figure><img src="image_3.png" /><figcaption>Fig. 2. Observer-based controller in closed-loop. Highlighting the passive dynamics of the observer in the case of Gradient-based control law.</figcaption></figure>

$(y, \hat{y})$ of the closed-loop dynamics, i.e., defining $\mathcal{H}_{cl}(x, \hat{x}) = \mathcal{H}(x) + \mathcal{H}(\hat{x})$,

$$ J_{cl}(x, \hat{x}) = \begin{bmatrix} J & -g\hat{L} \\ \hat{L}^{\top}g^{\top} & \hat{J} - \text{skew}\{\hat{L}^{\top}\hat{g}^{\top}\} \end{bmatrix} \quad (27) $$

$$ R_{cl}(x, \hat{x}) = \begin{bmatrix} R & 0 \\ 0 & \hat{R} + \text{sym}\{\hat{L}^{\top}\hat{g}^{\top}\} \end{bmatrix} \quad (28) $$

we have

$$ 
\begin{aligned}
\begin{pmatrix} \dot{x} \\ \dot{\hat{x}} \end{pmatrix} &= [J_{cl} - R_{cl}] \begin{pmatrix} \nabla_x \mathcal{H}_{cl}(x, \hat{x}) \\ \nabla_{\hat{x}} \mathcal{H}_{cl}(x, \hat{x}) \end{pmatrix} + \begin{bmatrix} g & 0 \\ 0 & \hat{g} \end{bmatrix} \begin{pmatrix} v \\ v \end{pmatrix} \\
\begin{pmatrix} y \\ \hat{y} \end{pmatrix} &= \begin{bmatrix} g & 0 \\ 0 & \hat{g} \end{bmatrix}^{\top} \begin{pmatrix} \nabla_x \mathcal{H}_{cl}(x, \hat{x}) \\ \nabla_{\hat{x}} \mathcal{H}_{cl}(x, \hat{x}) \end{pmatrix}.
\end{aligned} \quad (29) 
$$

By employing the controller (26), we implicitly assume that the system (4) can be stabilized through its interconnection with the observer dynamics (15).

Traditionally, the stabilization of the interconnection between the plant and observer dynamics relies on designing an ideal state-dependent stabilizing control law. This is typically accomplished by applying the separation principle in combination with a converging observer. In contrast, the interconnection method achieves a stable closed-loop system by leveraging the dissipativity properties of the observer dynamics and the symplectic interconnection with the controlled system. This method guarantees the stability of the closed-loop dynamics without invoking the separation principle. Instead, it builds on [17, Proposition 6], which was originally formulated for the linear case, with ongoing work extending it to the nonlinear setting.

To conclude, it is now clear, from the above analysis and the control scheme in Fig. 2, role of the passive subsystem in the port-Hamiltonian observer dynamics (16).

# V. EXAMPLES

## A. Velocity Reconstruction of PMSM system

We consider here the case of a 3-phase permanent magnetic synchronous motor (PMSM) in the dq-coordinates, with un-

<footnote n="7">⁷Take for example a scalar system case with $R$ positive real. In order to satisfy the passivity condition, one should take a sufficiently small $L$, and thus a robust high-gain approach will go against the passivity requirements.</footnote>

<footnote n="8">⁸Note that passivity is enough, no convergence property is required when dealing with passivity of the closed-loop.</footnote>
measured shaft velocity. Its port-Hamiltonian dynamics reads as

$$
\begin{pmatrix} \dot{\varphi}_d \\ \dot{\varphi}_q \\ \dot{p} \end{pmatrix} = \begin{pmatrix} \begin{bmatrix} 0 & 0 & \varphi_q \\ 0 & 0 & -\varphi_d - \Phi \\ -\varphi_q & \varphi_d + \Phi & 0 \end{bmatrix} & -\begin{bmatrix} r & 0 & 0 \\ 0 & r & 0 \\ 0 & 0 & \beta \end{bmatrix} \end{pmatrix} \begin{pmatrix} \frac{\varphi_d}{L} \\ \frac{\varphi_q}{L} \\ \frac{p}{J_m} \end{pmatrix} + \begin{bmatrix} 1 & 0 \\ 0 & 1 \\ 0 & 0 \end{bmatrix} u = [J(x) - R]\nabla\mathcal{H}(x) + gu \\
y = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \end{bmatrix} \begin{pmatrix} \frac{\varphi_d}{L} \\ \frac{\varphi_q}{L} \\ \frac{p}{J_m} \end{pmatrix} = g^\top \nabla\mathcal{H}(x)
$$

where $\varphi_d, \varphi_q$ are the stator magnetic fluxes along the $d$ and $q$ axes, respectively, while $\Phi$ is the constant rotor magnetic flux, $L$ is the phase inductance, $r$ the phase resistance, $p$ is the shaft momentum, $J_m$ its inertia, and $\beta$ is the viscous friction coefficient. The control signals $u$ are the two supplied voltages $v_d, v_q$, and the available outputs the corresponding phase currents $i_d, i_q$. The associated Hamiltonian function is then

$$ \mathcal{H} = \frac{\varphi_d^2}{2L} + \frac{\varphi_q^2}{2L} + \frac{p^2}{2J_m} $$

This model has constant input matrix and linear Hamiltonian gradient, with a diagonal $Q$ matrix, thus it fits precisely into the framework described in Section III-A. In order to design the observer dynamics (6), according to the case analyzed in Section III-A, we investigate the partial derivative of $J(x)Qx$ with respect to $x$, i.e.,

$$ \frac{\partial (J(x)Qx)}{\partial x} = \frac{\partial}{\partial x} \begin{pmatrix} \frac{\varphi_q}{L} \frac{p}{J_m} \\ -(\varphi_d + \Phi) \frac{p}{J_m} \end{pmatrix} = \begin{bmatrix} 0 & \frac{p}{J_m} & \frac{\varphi_q}{J_m} \\ -\frac{p}{J_m} & 0 & \frac{\varphi_d + \Phi}{J_m} \\ 0 & \frac{\Phi}{L} & 0 \end{bmatrix} $$

We are then interested in the symmetric part of $\frac{\partial(J(x)Qx)}{\partial x}Q^{-1}$, that is,

$$ \operatorname{sym} \left( \frac{\partial J(x) Q x}{\partial x} Q^{-1} \right) = \begin{bmatrix} 0 & 0 & \frac{1}{2} \varphi_q \\ 0 & 0 & -\frac{1}{2} \varphi_d \\ \frac{1}{2} \varphi_q & -\frac{1}{2} \varphi_d & 0 \end{bmatrix} $$

so that the resistive matrix $R'(x)$ in (11) reads as

$$ R - \operatorname{sym} \left( \frac{\partial J(x) Q x}{\partial x} Q^{-1} \right) = \begin{bmatrix} r & 0 & \frac{1}{2} \varphi_q \\ 0 & r & -\frac{1}{2} \varphi_d \\ \frac{1}{2} \varphi_q & -\frac{1}{2} \varphi_d & \beta \end{bmatrix}. $$

In general, this $R'(x)$ is not sign definite, since its principal minors do not have a uniform positive sign, i.e.,

$$ r > 0; \quad r^2 > 0; \quad r^2\beta - r\frac{1}{4}(\varphi_d^2 + \varphi_q^2) \stackrel{?}{>} 0. $$

The last inequality can be analyzed by considering the fact that the supplied current norm $\sqrt{i_d^2 + i_q^2}$ saturates in any practical application<fnref n="9" />. Then, we can write an upper bound for $\varphi_d^2 + \varphi_q^2$, that is valid for any working configuration of the motor, i.e.,

$$ \varphi_d^2 + \varphi_q^2 = (i_d^2 + i_q^2)L^2 = i_{\max}^2 L^2. \quad (30) $$

Although a lower bound for the determinant of $R'(x)$ can be found, there is no guarantee that the resistance $r$ is sufficiently

<caption>TABLE I
PMSM SYSTEM PARAMETERS</caption>

$$
\left| \begin{array}{c|c} J_m & 0.012 \\ \beta & 0.0026 \\ \Phi & 0.17 \end{array} \right| \left[ \begin{array}{c|c} [Kg \cdot m^2] & L \\ [N \cdot ms/rad] & r \\ [Wb] & i_{\max} \end{array} \right] \left| \begin{array}{c|c} 3.8 \cdot 10^{-3} & [H] \\ 0.225 & [\Omega] \\ 15 & [A] \end{array} \right|
$$

large to overcome the norm of the magnetic flux, $\varphi_d^2 + \varphi_q^2$, in all configurations and for every friction coefficient $\beta$. We therefore consider as the output injection matrix $L^\top = \gamma g$, where $\gamma$ is a positive parameter to be tuned. With this choice, the equivalent resistance matrix is

$$ R'(x) + \gamma GG^\top = \begin{bmatrix} r + \gamma & 0 & \frac{1}{2}\varphi_q \\ 0 & r + \gamma & -\frac{1}{2}\varphi_d \\ \frac{1}{2}\varphi_q & -\frac{1}{2}\varphi_d & \beta \end{bmatrix}, \quad (31) $$

whose principal minors are given by

$$ r + \gamma > 0; \quad (r + \gamma)^2 > 0; \quad (r + \gamma)^2 \beta - (r + \gamma) \frac{1}{4}(\varphi_d^2 + \varphi_q^2). $$

It is easy to see that

$$ \gamma \geq \max \left\{ \frac{i_{\max}^2}{4\beta} L^2 - r, 0 \right\}. $$

guarantees that (31) is positive definite. Furthermore, it allows to derive an exponential convergence of the observation error, independently of the applied input voltages. For the

<figure><img src="image_4.png" /><figcaption>Fig. 3. Error evolution with $u = (v_d, v_q)$ constant ($-4V, 3V$) and with sinusoidal inputs $(v_d, v_q) = (-4 \cos(10t) [V], 3 \cos(3t) [V])$.</figcaption></figure>

simulation results, we set $\gamma = 10$ and we initialize system dynamics at $(\varphi_d(0), \varphi_q(0), \omega(0)) = (0, 0.001, 1)$, and the observer at the origin, $\hat{x}(0) = 0$. We apply two sets of input signals. We first set the input voltage to a constant value $(v_d, v_q) = (-4 [V], 3 [V])$ and the resulting error and states evolutions are shown in Fig. 3 and Fig. 4, respectively. Then, we consider two sinusoidal input signals, i.e., $(v_d(t), v_q(t)) = (-4 \cos(10t) [V], 3 \cos(3t) [V])$, and the resulting error and states evolutions are depicted in Fig. 3 and Fig. 5, respectively.

<footnote n="9">⁹Moreover, the magnetic fluxes usually saturate even at lower current values.</footnote>
<figure><img src="image_5.png" /><figcaption>Fig. 4. System and observer states evolution with $u = (v_d, v_q)$ constant ($-4V, 3V$).</figcaption></figure>

It is worth noticing that the observer convergence is independent of the input signal as a consequence of the constant input matrix $g$.

<figure><img src="image_6.png" /><figcaption>Fig. 5. System and observer states evolution with cosinusoidal inputs ($v_d, v_q$) = $(-4 \cos(10t) [V], 3 \cos(3t) [V])$.</figcaption></figure>

## B. An electrical circuit

Consider the electrical system with non-quadratic Hamiltonian

$$ \mathcal{H}(q, \phi) = \frac{1}{C_1} \left( \frac{q_1^4}{4} + \frac{q_1^2}{2} \right) + \frac{1}{C_2} \frac{q_2^2}{2} + \frac{1}{C_3} \left( \frac{q_3^6}{6} + \frac{q_3^2}{2} \right) + \frac{1}{L_{e1}} \frac{\phi_1^2}{2} + \frac{1}{L_{e2}} \left( \frac{\phi_2^4}{4} + \frac{\phi_2^2}{2} \right) + \frac{1}{L_{e3}} \left( \frac{\phi_3^4}{4} + \frac{\phi_3^2}{2} \right) $$

where $q = (q_1, q_2, q_3)^\top$ and $\phi = (\phi_1, \phi_2, \phi_3)^\top$ are the charges of the capacitors and the magnetic fluxes of inductors, while

the parameters $C_i$ and $L_{ei}$ refer respectively to their energy parameters, $i = 1, 2, 3$.

The input $u$ of the system are the three voltages applied to the inductors, and the measurements $y$ are the relative passive outputs as standard in the port-Hamiltonian formalism [1], i.e. the inductance currents. The system dynamics reads as

$$ \begin{aligned} \dot{x} &= \begin{bmatrix} 0 & J_{LC} \\ -J_{LC}^\top & 0 \end{bmatrix} \nabla \mathcal{H}(x) + \begin{bmatrix} 0 \\ I \end{bmatrix} u \\ y &= \begin{bmatrix} 0 & I \end{bmatrix} \nabla \mathcal{H}(x) \end{aligned} \quad (32) $$

where $x = (q^\top, \phi^\top)^\top$ and

$$ J_{LC} = \begin{bmatrix} 1 & 0 & 1 \\ -1 & 1 & 0 \\ 0 & -1 & 0 \end{bmatrix} $$

and

$$ \nabla \mathcal{H}(x) = \begin{bmatrix} \frac{1}{C_1}(q_1^3 + q_1) & \frac{1}{C_2}q_2 & \frac{1}{C_3}(q_3^5 + q_3) & \dots \\ \frac{1}{L_{e1}}\phi_1 & \frac{1}{L_{e2}}(\phi_2^3 + \phi_2) & \frac{1}{L_{e3}}(\phi_3^3 + \phi_3) \end{bmatrix}. $$

Note that the system is lossless with respect to the supply rate $s(u, y) = u^\top y$ and passive since the damping matrix $R = 0$. The Hessian of the system reads as

$$ \nabla^2 \mathcal{H}(x) = \operatorname{diag} \left( \frac{1}{C_1}(3q_1^2 + 1), \frac{1}{C_2}, \frac{1}{C_3}(5q_3^4 + 1), \dots \right) \\ \frac{1}{L_{e1}}, \frac{1}{L_{e2}}(3\phi_2^2 + 1), \frac{1}{L_{e3}}(3\phi_3^2 + 1) \right) $$

which is lower bounded by its value at the origin $\underline{Q} = \nabla^2 \mathcal{H}(0)$, i.e., $\nabla^2 \mathcal{H}(x) \ge \underline{Q} \ \forall x$

$$ \underline{Q} = \operatorname{diag} \left( \frac{1}{C_1}, \frac{1}{C_2}, \frac{1}{C_3}, \frac{1}{L_{e1}}, \frac{1}{L_{e2}}, \frac{1}{L_{e3}} \right). $$

For this system, the observer dynamics with the choice $L^\top = \gamma g$ will read as

$$ \dot{x} = \begin{bmatrix} 0 & J_{LC} \\ -J_{LC} & -\gamma I \end{bmatrix} \nabla \mathcal{H}(\hat{x}) + \begin{bmatrix} 0 \\ I \end{bmatrix} u + \begin{bmatrix} 0 \\ \gamma I \end{bmatrix} y. $$

By exploiting theorem III-B.1 and [17, proposition 6] one can check that the observer error converges uniformly and exponentially with respect to the metric $\underline{Q}$.

## VI. CONCLUSIONS AND FUTURE WORKS

In this work, we provided a passivity-oriented perspective on the design of structure-preserving observers for port-Hamiltonian systems. After recalling the required background, we developed an identity-observer synthesis based on convergence analysis, which yields explicit gain conditions and a tunable exponential convergence rate for a class of pH systems. We then discussed the interplay between structure preservation and passivity, analyzing the passivity properties of the observer dynamics, the induced estimation-error system, and the resulting system-observer cascade. Finally, we illustrated the theory on two examples (a PMSM velocity-reconstruction problem and an electrical-circuit case study), highlighting the practical relevance of the proposed design and analysis tools.
A further outcome of the paper is a clarification of what “structure-preserving” entails in this setting: beyond retaining a port-Hamiltonian form, enforcing meaningful passivity properties at the observer level is nontrivial. This perspective complements existing approaches such as [20] (see also the discussion in the comparison Section III-F).

## Future works

The developed design approach is currently restricted to a specific class of port-Hamiltonian systems. To extend the results to broader classes of port-Hamiltonian systems, a natural next step is to leverage contraction analysis [32] within the port-Hamiltonian formalism. Although contraction-based arguments were not formally available in the present setting until the recent differential stability developments in [40], [46], these tools appear to be well suited to derive metric-based convergence guaranties and to relax some of the structural restrictions adopted here.

From an application standpoint, future work will also address robustness to modeling uncertainties and disturbances (e.g., parameter variations in the PMSM), systematic tuning guidelines, and experimental validation on real drives and power-electronics platforms.

## REFERENCES

[1] B. M. Maschke and A. J. van der Schaft, “Port-controlled Hamiltonian systems: modelling origins and systemtheoretic properties,” in *Nonlinear Control Systems Design 1992*. Elsevier, 1993, pp. 359–365.

[2] A. van der Schaft and B. M. Maschke, “The Hamiltonian formulation of energy conserving physical systems with external ports,” *AEÜ International journal of electronics and communications*, vol. 49, no. 5/6, pp. 362–371, 1995.

[3] V. Duindam, A. Macchelli, S. Stramigoli, and H. Bruyninckx, *Modeling and control of complex physical systems: the port-Hamiltonian approach*. Springer Science & Business Media, 2009.

[4] A. Van der Schaft, *L₂-gain and passivity techniques in nonlinear control*. Springer, 2000.

[5] A. Van Der Schaft, D. Jeltema et al., “Port-Hamiltonian systems theory: An introductory overview,” *Foundations and Trends® in Systems and Control*, vol. 1, no. 2-3, pp. 173–378, 2014.

[6] R. Ortega, A. Van Der Schaft, B. Maschke, and G. Escobar, “Interconnection and damping assignment passivity-based control of port-controlled Hamiltonian systems,” *Automatica*, vol. 38, no. 4, pp. 585–596, 2002.

[7] H. K. Khalil and L. Praly, “High-gain observers in nonlinear feedback control,” *International Journal of Robust and Nonlinear Control*, vol. 24, no. 6, pp. 993–1015, 2014.

[8] B. Anderson and J. Moore, “Optimal filtering,” 1979.

[9] N. Kazantzis and C. Kravaris, “Nonlinear observer design using Lyapunov’s auxiliary theorem,” *Systems & Control Letters*, vol. 34, no. 5, pp. 241–247, 1998.

[10] V. Andrieu, B. Jayawardhana, and L. Praly, “Transverse exponential stability and applications,” *IEEE Transactions on Automatic Control*, vol. 61, no. 11, pp. 3396–3411, 2016.

[11] P. Bernard, V. Andrieu, and D. Astolfi, “Observer design for continuous-time dynamical systems,” *Annual Reviews in Control*, vol. 53, pp. 224–248, 2022.

[12] D. Luenberger, “Observers for multivariable systems,” *IEEE transactions on automatic control*, vol. 11, no. 2, pp. 190–197, 1966.

[13] S. Zenfari, M. Laabissi, and M. E. Achhab, “Proportional observer design for port Hamiltonian systems using the contraction analysis approach,” *International Journal of Dynamics and Control*, vol. 10, no. 2, pp. 403–408, 2022.

[14] P. Kotyczka and M. Wang, “Dual observer-based compensator design for linear port-Hamiltonian systems,” in *2015 European Control Conference (ECC)*. IEEE, 2015, pp. 2908–2913.

[15] M. Atitallah, R. El Harabi, and M. N. Abdelkrim, “Fault detection and estimation based on full order unknown input Hamiltonian observers,” in *2015 IEEE 12th International Multi-Conference on Systems, Signals & Devices (SSD15)*. IEEE, 2015, pp. 1–7.

[16] J. Toledo, H. R. Estay, Y. Wu, and Y. Le Gorrec, “Linear Matrix Inequality design of observer-based controllers for port-Hamiltonian systems,” *IEEE Transactions on Automatic Control*, vol. 68, no. 10, pp. 6184–6191, 2023.

[17] S. Prajna, A. van der Schaft, and G. Meinsma, “An LMI approach to stabilization of linear port-controlled Hamiltonian systems,” *Systems & control letters*, vol. 45, no. 5, pp. 371–385, 2002.

[18] Y. Wang, S. S. Ge, and D. Cheng, “Observer and observer-based $h_\infty$ control of generalized Hamiltonian systems control of generalized hamiltonian systems,” *Science in China Series F: Information Sciences*, vol. 48, pp. 211–224, 2005.

[19] A. Venkatraman and A. Van der Schaft, “Full-order observer design for a class of port-Hamiltonian systems,” *Automatica*, vol. 46, no. 3, pp. 555–561, 2010.

[20] A. Yaghmaei and M. J. Yazdanpanah, “Structure preserving observer design for port-Hamiltonian systems,” *IEEE Transactions on Automatic Control*, vol. 64, no. 3, pp. 1214–1220, 2018.

[21] B. Biedermann, P. Rosenzweig, and T. Meurer, “Passivity-based observer design for state affine systems using interconnection and damping assignment,” in *2018 IEEE Conference on Decision and Control (CDC)*. IEEE, 2018, pp. 4662–4667.

[22] B. Biedermann and T. Meurer, “Observer design for a class of nonlinear systems combining dissipativity with interconnection and damping assignment,” *International Journal of Robust and Nonlinear Control*, vol. 31, no. 9, pp. 4064–4080, 2021.

[23] B. Vincent, N. Hudon, L. Lefèvre, and D. Dochain, “Port-Hamiltonian observer design for plasma profile estimation in tokamaks,” *Ifac-PapersOnline*, vol. 49, no. 24, pp. 93–98, 2016.

[24] M. Rojas, C. Granados-Salazar, and G. Espinosa-Pérez, “Observer design for a class of nonlinear Hamiltonian systems,” *IFAC-PapersOnLine*, vol. 54, no. 19, pp. 125–130, 2021.

[25] M. Pfeifer, S. Caspart, F. Strehle, and S. Hohmann, “Full-order observer design for a class of nonlinear port-Hamiltonian systems,” *IFAC-PapersOnLine*, vol. 54, no. 19, pp. 149–154, 2021.

[26] N. Vu, T. Pham, I. Prodan, and L. Lefèvre, “Port-Hamiltonian observer for state-feedback control design,” in *2023 European Control Conference (ECC)*. IEEE, 2023, pp. 1–6.

[27] A. Pavlov, A. Pogromsky, N. van de Wouw, and H. Nijmeijer, “Convergent dynamics, a tribute to boris pavlovich demidovich,” *Systems & Control Letters*, vol. 52, no. 3, pp. 257–261, 2004.

[28] A. Pavlov, N. Van De Wouw, and H. Nijmeijer, “Convergent systems: analysis and synthesis,” *Control and observer design for nonlinear finite and infinite dimensional systems*, pp. 131–146, 2005.

[29] ——, *Uniform output regulation of nonlinear systems: a convergent dynamics approach*. Springer, 2006, vol. 205.

[30] B. P. Demidovich, *Lectures on stability theory*. Nauka, Moscow, 1967, (in Russian).

[31] J. L. Willems, *Stability theory of dynamical systems*, 1970.

[32] W. Lohmiller and J.-J. E. Slotine, “On contraction analysis for non-linear systems,” *Automatica*, vol. 34, no. 6, pp. 683–696, 1998.

[33] D. Angeli and E. D. Sontag, “Forward completeness, unboundedness observability, and their lyapunov characterizations,” *Systems & Control Letters*, vol. 38, no. 4-5, pp. 209–217, 1999.

[34] C. Kravaris, “Functional observers for nonlinear systems,” *IFAC-PapersOnLine*, vol. 49, no. 18, pp. 505–510, 2016.

[35] C. Kravaris and S. Venkateswaran, “Functional observers with linear error dynamics for nonlinear systems,” *Systems & Control Letters*, vol. 157, p. 105021, 2021.

[36] J. C. Willems, “Dissipative dynamical systems part I: General theory,” *Archive for rational mechanics and analysis*, vol. 45, no. 5, pp. 321–351, 1972.

[37] ——, “Dissipative dynamical systems part II: Linear systems with quadratic supply rates,” *Archive for rational mechanics and analysis*, vol. 45, pp. 352–393, 1972.

[38] P. E. Crouch and A. J. van der Schaft, *Variational and Hamiltonian Control Systems*, ser. Lecture Notes in Control and Information Sciences. Berlin: Springer-Verlag, 1987, vol. 101.

[39] A. J. van der Schaft, *L₂-gain and passivity techniques in nonlinear control*, 3rd ed., ser. Communications and Control Engineering. Cham: Springer, 2017.

[40] M. Spirito, “The Differential Stability Problem. Part I: Geometric Contraction for Nonlinear Time-Varying Systems,” *Submitted to IEEE Transactions on Automatic Control*, 2026.
[41] D. Angeli, "A Lyapunov approach to incremental stability properties," *IEEE Trans. Autom. Control*, vol. 47, no. 3, pp. 410-421, 2002.

[42] F. Forni and R. Sepulchre, "Differential Lyapunov framework for contraction analysis," *IEEE Trans. Autom. Control*, vol. 59, no. 3, pp. 614-628, 2014.

[43] M. Spirito, B. Maschke, and Y. Le Gorrec, "Contraction theory and differential passivity in the port-hamiltonian formalism," *IFAC-PapersOnLine*, vol. 58, no. 6, pp. 184-189, 2024, 8th IFAC Workshop on Lagrangian and Hamiltonian Methods for Nonlinear Control LHMNC 2024. [Online]. Available: https://www.sciencedirect.com/science/article/pii/S2405896324010206

[44] "A link between contractive and dissipative hamiltonian systems," *IFAC-PapersOnLine*, vol. 58, no. 21, pp. 250-255, 2024, 4th IFAC Conference on Modelling, Identification and Control of Nonlinear Systems MIC-NON 2024.

[45] H. K. Khalil, "Nonlinear systems," *Patience Hall*, vol. 115, 2002.

[46] M. Spirito, "The Differential Stability Problem. Part II: the dynamical spectral decomposition," *Submitted to IEEE - Transactions on Automatic Control*, 2026.