1 Introduction

Port-based network modeling of physical systems (both in electrical and mechanical domains) leads directly to their representation as port-Hamiltonian systems which are, if the Hamiltonian is non-negative, an important class of \(passive\) state-space systems. At the same time network modeling of physical systems often leads to high-dimensional dynamical models. Large state-space dimensions are obtained as well if distributed-parameter models are spatially discretized. Therefore an important issue concerns model reduction of these high-dimensional systems, both for analysis and control. The goal of this work is to show that the specific model reduction techniques of linear port-Hamiltonian systems preserve the port-Hamiltonian structure, and, as a consequence, passivity, and demonstrate the possibility of applying those techniques to electrical circuits as port-Hamiltonian systems.

Port-Hamiltonian systems are endowed with more structure than just passivity. Other important issues like interconnection between port-Hamiltonian systems, the presence of conservation laws and energy dissipation are also reflected by the port-Hamiltonian structure. In Sect. 14.2 we provide a brief overview of linear port-Hamiltonian systems. General theory on port-Hamiltonian systems can be found in [12]. We will show by applying the Kalman decomposition in Sect. 14.3 that the reduction of the dynamics of an uncontrollable/unobservable linear port-Hamiltonian system to a dynamics on the reachability/observability subspace preserves the Port-Hamiltonian structure. This result holds both for energy and co-energy variable representations of linear port-Hamiltonian systems. The co-energy variable representation of port-Hamiltonian systems is considered in Sect. 14.4. It is shown in Sect. 14.4 that the reduced models in the co-energy coordinates take a somewhat "dual" form to the reduced models obtained in the standard energy coordinates.

Within the systems and control literature a popular and elegant tool for model reduction is balancing, going back to [8]. One favorable property of model reduction based on balancing, as compared with other techniques such as modal analysis, is that the approximation of the dynamical system is explicitly based on its input-output properties. Balancing for port-Hamiltonian systems is considered in Sect. 14.6, see also [13]. We will apply two structure preserving model reduction procedures in Sect. 14.6 to linear port- Hamiltonian systems and show that the reduced order models are again port-Hamiltonian. One reduction procedure is called the effort-constraint reduction method. The other procedure is structure preserving under a given condition. Preliminary results of this paper are reported in [11] using scattering coordinates. Similar reduced order port-Hamiltonian models are obtained in [6, 7] employing perturbation analysis. In Sect. 14.7 we consider numerical simulations of a ladder network, and apply the effort-constraint method and the balanced truncation method in order to obtain reduced order models and compare the results.

2 Linear Port-Hamiltonian Systems

Port-based network modeling of physical systems leads to their representation as port-Hamiltonian systems (see e.g. [4, 9]). In the linear case, and in the absence of algebraic constraints, port-Hamiltonian systems take the form (see [1113])

$$ \left\{\begin{array}{ll} \dot x = (J - R)Qx + Bu, \\ y = B^TQx, \end{array}\right. $$
(14.1)

with \(H(x) = {\frac{1}{2}}x^TQx\) the total energy (Hamiltonian), \(Q = Q^T\geq 0\) the \(energy\) matrix and \(R = R^T\geq 0\) the dissipation matrix. The matrices \(J = -J^T\) and \(B\) specify the \(interconnection\) structure of the system. By skew-symmetry of \(J\) and since \(R\) is positive semidefinite it immediately follows that

$$ \frac{d}{dt}\frac{1}{2}x^TQx = u^Ty - x^TQRQx \leq u^Ty. $$
(14.2)

Thus if \(Q \geq 0\) (and the Hamiltonian is non-negative) any port-Hamiltonian system is \(passive\) (see [12, 16]). The state variables \({x \in \mathbb{R}^n}\) are also called \(energy\) variables, since the total energy \(H(x)\) is expressed as a function of these variables. Furthermore, the variables \({u \in \mathbb{R}^m, y \in \mathbb{R}^m}\) are called \(power\) variables, since their product \(u^Ty\) equals the power supplied to the system.

In the sequel we will often abbreviate \(J-R\) to \(F = J-R\). Clearly

$$ F + F^T \leq 0. $$
(14.3)

Conversely, any \(F\) satisfying (14.3) can be written as \(J-R\) as above by decomposing \(F\) into its skew-symmetric and symmetric part

$$ \begin{aligned} J &= \frac{1}{2}(F - F^T),\\ R &= -\frac{1}{2}(F + F^T). \end{aligned} $$
(14.4)

Two special cases of port-Hamiltonian systems correspond to either \(R = 0\) or \(J = 0\). In fact, if \(R = 0\) (no internal energy dissipation) then the dissipation inequality (14.2) reduces to an equality

$$ \frac{d}{dt}\frac{1}{2}x^TQx = u^Ty. $$
(14.5)

In this case the transfer matrix \(G(s) = B^TQ(sI-JQ)^{-1}B\) of the system (for invertible \(Q\)) satisfies

$$ G(s) = -G^T(-s). $$
(14.6)

Conversely, any transfer matrix \(G(s)\) satisfying \(G(s)\ =\ -G^T(-s)\) can be shown to have a minimal realization

$$ \left\{\begin{array}{ll} \dot x = JQx + Bu,\\ y = B^TQx, \end{array}\right. $$
(14.7)

(with in fact \(Q\) being invertible again).

The other special case corresponds to \(J=0\), in which case the system takes the form

$$ \left\{\begin{array}{ll} \dot x = -RQx + Bu,\\ y = B^TQx, \end{array}\right. $$
(14.8)

with transfer matrix \(G(s) = B^TQ(sI+RQ)^{-1}B\) satisfying (for invertible \(Q\))

$$ G(s) = G^T(s). $$
(14.9)

Conversely, any transfer matrix \(G(s)\) satisfying (14.9) is represented by a minimal state-space representation (14.8) with \(Q\) invertible, where, however, \(R\) need not necessarily be positive semidefinite.

In these two special cases, either \(R=0\) or \(J=0\), there is a direct relationship between controllability and observability properties of the port-Hamiltonian system.

Proposition 1

Consider a port-Hamiltonian system (14.7) or (14.8), and assume \({\hbox{det}}Q \neq 0\). The system is controllable if and only if it is observable, while the unobservability subspace\(\fancyscript{N}\)is related to the reachability subspace\(\fancyscript{R}\)by

$$ {\fancyscript{N}} = {\fancyscript{R}}^{\perp} $$
(14.10)

\(with\)\(\perp\)denoting the orthogonal complement with respect to the (possibly indefinite) inner product defined by\(Q\).

Proof

For any port-Hamiltonian system (14.1) with \(F=J-R\) we have

$$ \begin{array}{l} \left[\begin{array}{l} B^TQ \\ B^TQFQ \\ B^TQFQFQ \\ \vdots \\ \end{array}\right]= \left[\begin{array}{lllllll} B &\vdots & F^TQB &\vdots& F^TQF^TQB &\vdots& \ldots \end{array}\right]^TQ. \end{array} $$
(14.11)

Since the kernel of the matrix on the left-hand side defines the unobservability subspace, while on the right-hand side the image of the matrix preceding Q defines the reachability subspace if \(F^T = F\) or \(F^T = -F\), the assertion follows. \(\square\)

Nevertheless, in general controllability and observability for a port-Hamiltonian system are not equivalent, as the following example shows.

Example 1

Consider a port-Hamiltonian system

$$ \left\{\begin{array}{l} \left[\begin{array}{c} \dot x_{1} \\ \dot x_{2} \end{array}\right]=\left[\begin{array}{cc} -1 & 1 \\ -1 & -1 \end{array}\right] \left[\begin{array}{cc} 1 &-1 \\ -1 & 2 \end{array}\right]\left[\begin{array}{l} x_{1} \\ x_{2} \end{array} \right] +\left[\begin{array}{cc} 1 \\ 0 \end{array} \right] u, \\ y= \left[\begin{array}{cc} 1 & 0 \end{array} \right] \left[\begin{array}{cc} 1 & -1 \\ -1 & 2 \end{array} \right] \left[\begin{array}{l} x_{1} \\ x_{2} \end{array} \right],\end{array}\right. $$
(14.12)

corresponding to \(J= \left(\begin{array}{cc} 0 & 1 \\ -1 & 0\end{array} \right) \) and \(R= \left(\begin{array}{cc} 1 & 0 \\ 0 & 1 \end{array}\right)\). The system is observable but \(not\) controllable.

3 The Kalman Decomposition of Port-Hamiltonian Systems

3.1 Reduction to a Controllable Port-Hamiltonian System

Consider a port-Hamiltonian system on a state space \(\fancyscript{X}\) which is not controllable. Take linear coordinates \(x=\left[\begin{array}{l} x_{1} \\ x_{2} \end{array} \right]\) such that vectors of the form \(\left[\begin{array}{l} x_{1} \\ 0 \end{array} \right]\) span the reachability subspace \(\fancyscript{R}\subset\fancyscript{X}\):

$$ \left\{\begin{array}{l} \left[\begin{array}{l} \dot x_{1} \\ \dot x_{2} \end{array} \right]=\left[\begin{array}{ll} F_{11} & F_{12} \\F_{21} &F_{22} \end{array} \right] \left[\begin{array}{ll} Q_{11} & Q_{12} \\ Q_{21} & Q_{22} \end{array} \right] \left[\begin{array}{l} x_{1} \\ x_{2} \end{array} \right] + \left[\begin{array}{ll} B_{1} \\ B_{2} \end{array} \right] u, \\ y=\left[\begin{array}{ll} B_{1}^T & B_{2}^T \end{array}\right] \left[\begin{array}{ll} Q_{11} & Q_{12} \\ Q_{21} & Q_{22} \end{array} \right] \left[\begin{array}{l} x_{1} \\ x_{2} \end{array} \right]. \end{array} \right. $$
(14.13)

By invariance of \(\fancyscript{R}\) (see e.g. [10]) this implies

$$ \begin{array}{l} F_{21}Q_{11} + F_{22}Q_{21} = 0,\\ \qquad \quad \quad B_{2} = 0. \end{array} $$
(14.14)

It follows that the dynamics restricted to \(\fancyscript{R}\) is given as

$$ \left\{\begin{array}{l} \dot x_{1}=(F_{11}Q_{11} + F_{12}Q_{21})x_{1} + B_{1}u, \\ y= B_{1}^TQ_{11}x_{1}. \end{array}\right. $$
(14.15)

Now let us assume that \(F_{22}\) in (14.14) is invertible. Then it follows from (14.14) that \(Q_{21}=-F_{22}^{-1}F_{21}Q_{11}\). Substitution in (14.15) yields

$$ \left\{\begin{array}{l} {\dot x}_{1}= (F_{11} - F_{12}F_{22}^{-1}F_{21})Q_{11}x_{1} + B_{1}u, \\ y = B_{1}^TQ_{11}x_{1}, \end{array}\right. $$
(14.16)

which is again a port-Hamiltonian system. Indeed, \(F + F^T \leq 0\) implies that the Schur complement \(\bar{F} = F_{11} - F_{12}F_{22}^{-1}F_{21}\) satisfies \(\bar{F} + \bar{F}^T \leq 0\).

Remark 1

Note that \(\bar{F}\) is skew-symmetric if \(F\) is skew-symmetric, and is symmetric if \(F\) is symmetric.

Remark 2

The Schur complement of a general \(F\) with singular \(F_{22}\) is not defined. Nevertheless, it is still possible to extend the definition of the Schur complement of \(F\) to the case where \(F_{22}\) is singular if \(F\) is symmetric, which corresponds to the purely damped port-Hamiltonian systems (14.8). For details see Lemma 1 in the appendix at the end of the paper.

3.2 Reduction to an Observable Port-Hamiltonian System

Consider again a port-Hamiltonian system (14.1) and suppose the system is not observable. Then there exist coordinates \(x=\left[\begin{array}{l} x_{1} \\ x_{2} \end{array} \right]\) such that the unobservability subspace \(\fancyscript{N}\) is spanned by vectors of the form \(\left[\begin{array}{c} 0 \\ x_{2} \end{array} \right]\). By invariance of \(\fancyscript{N}\) (see again [10]) it follows that

$$ \begin{array}{l} F_{11}Q_{12} + F_{12}Q_{22}=0, \\ B_{1}^TQ_{12} + B_{2}^TQ_{22}= 0. \end{array} $$
(14.17)

The dynamics on the quotient space \(\fancyscript{X} / \fancyscript{N}\) is

$$ \left\{\begin{array}{l} \dot x_{1}=(F_{11}Q_{11} + F_{12}Q_{21})x_{1} + B_{1}u, \\ y = B_{1}^TQ_{11}x_{1} + B_{2}^TQ_{21}x_{1}. \end{array}\right. $$
(14.18)

Assuming invertibility of \(Q_{22}\) it follows from (14.17) that \(F_{12}=-F_{11}Q_{12}Q_{22}^{-1}\) and \(B_{2}^T=-B_{1}^TQ_{12}Q_{22}^{-1}\). Substitution in (14.18) yields

$$ \left\{\begin{array}{lll} \dot x_{1}=F_{11}(Q_{11} - Q_{12}Q_{22}^{-1}Q_{21})x_{1} + B_{1}u, \\ y= B_{1}^T(Q_{11} - Q_{12}Q_{22}^{-1}Q_{21})x_{1}, \end{array}\right. $$
(14.19)

which is again a port-Hamiltonian system with Hamiltonian \(\bar{H}(x_1)=\frac{1}{2}x_{1}^T(Q_{11} - Q_{12}Q_{22}^{-1}Q_{21})x_{1}\).

Remark 3

Note that \((Q_{11} - Q_{12}Q_{22}^{-1}Q_{21}) \geq 0\) if \(Q \geq 0\).

Remark 4

Since \(Q\) is symmetric the definition of the Schur complement of \(Q\) can be extended to the case that \(Q_{22}\) is singular. For details see Lemma 1 in the appendix at the end of the paper.

3.3 The Kalman Decomposition

It is well known that a linear system \(\dot{x} = Ax+Bu, y=Cx\) can be represented in a suitable basis as (see [10, 17])

$$ A=\left[ \begin{array}{llll} A_{11} & A_{12} & 0 & 0 \\ 0 & A_{22} & 0 & 0 \\ A_{31} & A_{32} & A_{33} & A_{34} \\ 0 & A_{42} & 0 & A_{44} \end{array} \right] ,\quad B= \left[ \begin{array}{l} B_{1} \\ 0 \\ B_{3} \\ 0 \end{array} \right] , C =\left[ \begin{array}{llll} C_{1}^T \\ C_{2}^T \\ 0 \\ 0 \end{array} \right]^T, $$

with \(\fancyscript{X} = \fancyscript{X}_{1} \times \fancyscript{X}_{2} \times\fancyscript{X}_{3} \times \fancyscript{X}_{4}\), where \(\fancyscript{X}_{1}\) is the part of the system that is both controllable and observable, \(\fancyscript{X}_{2}\) is uncontrollable but observable, \(\fancyscript{X}_{3}\) is controllable but unobservable, while \(\fancyscript{X}_{4}\) is uncontrollable and unobservable, that is

$$ \begin{aligned} {\fancyscript{N}} = {\fancyscript{X}}_{3} \times {\fancyscript{X}}_{4}, \\ {\fancyscript{R}} = {\fancyscript{X}}_{1} \times {\fancyscript{X}}_{3}. \end{aligned} $$
(14.20)

Writing out

$$ \begin{array}{l} \left[ \begin{array}{llll} A_{11} & A_{12} & 0 & 0 \\ 0 & A_{22} & 0 & 0 \\ A_{31} & A_{32} & A_{33} & A_{34} \\ 0 & A_{42} & 0 & A_{44} \end{array} \right] = \left[ \begin{array}{llll} F_{11} & F_{12} & F_{13} & F_{14} \\ F_{21} & F_{22} & F_{23} & F_{24} \\ F_{31} & F_{32} & F_{33} & F_{34} \\ F_{41} & F_{42} & F_{43} & F_{44} \\ \end{array} \right] \left[ \begin{array}{llll} Q_{11} & Q_{12} & Q_{13} & Q_{14} \\ Q_{21} & Q_{22} & Q_{23} & Q_{24} \\ Q_{31} & Q_{32} & Q_{33} & Q_{34} \\ Q_{41} & Q_{42} & Q_{43} & Q_{44} \\ \end{array} \right], \end{array} $$

this implies that the blocks of the \(F\) and \(Q\) matrix satisfy

$$ \begin{array}{l} (a) F_{11}Q_{13} + F_{12}Q_{23}+ F_{13}Q_{33}+ F_{14}Q_{43}=0, \\ (b) F_{11}Q_{14} + F_{12}Q_{24}+ F_{13}Q_{34}+ F_{14}Q_{44}=0, \\ (c) F_{21}Q_{11} + F_{22}Q_{21}+ F_{23}Q_{31}+ F_{24}Q_{41}= 0, \\ (d) F_{21}Q_{13} + F_{22}Q_{23}+ F_{23}Q_{33}+ F_{24}Q_{43}=0, \\ (e) F_{21}Q_{14} + F_{22}Q_{24}+ F_{23}Q_{34}+ F_{24}Q_{44} = 0, \\ (f) F_{41}Q_{11} + F_{42}Q_{21}+ F_{43}Q_{31}+ F_{44}Q_{41} = 0, \\ (g) F_{41}Q_{13} + F_{42}Q_{23}+ F_{43}Q_{33}+ F_{44}Q_{43} = 0, \\ \end{array} $$
(14.21)

and similarly by writing out

$$ \begin{array}{l} \left[ \begin{array}{llll} B_{1}^T & 0 & B_{3}^T & 0 \end{array} \right] \left[ \begin{array}{llll} Q_{11} & Q_{12} & Q_{13} & Q_{14} \\ Q_{21} & Q_{22} & Q_{23} & Q_{24} \\ Q_{31} & Q_{32} & Q_{33} & Q_{34} \\ Q_{41} & Q_{42} & Q_{43} & Q_{44} \\ \end{array} \right] = \left[ \begin{array}{llll} C_{1} & C_{2} & 0 & 0 \end{array} \right], \end{array} $$

we obtain

$$ \begin{array}{l} B_{1}^TQ_{13}+B_{3}^TQ_{33} = 0, \\ B_{1}^TQ_{14}+B_{3}^TQ_{34} = 0. \end{array} $$
(14.22)

The resulting dynamics on \(\fancyscript{X}_{1}\) (the part of the system that is both controllable and observable) can be identified in port-Hamiltonian form, by combining the previous two reduction schemes corresponding to controllability and observability. Indeed, application of Sect. 14.3.2 yields the following observable system on \({\fancyscript{X}}_{1} \times \fancyscript{X}_{2}\)

$$ \left\{\begin{array}{l} \left[\begin{array}{l} \dot{x_{1}} \\ \dot{x_{2}} \end{array} \right] = \left[\begin{array}{ll} F_{11} & F_{12} \\ F_{21} & F_{22} \end{array} \right]\bar{Q} \left[\begin{array}{l} x_{1} \\ x_{2} \end{array} \right] + \left[\begin{array}{l} B_{1} \\ 0 \end{array} \right] u, \\ y = \left[\begin{array}{ll} B_{1}^T &0 \end{array} \right]\bar{Q} \left[\begin{array}{l} x_{1} \\ x_{2} \end{array} \right],\end{array}\right. $$
(14.23)

where

$$ \begin{array}{l} \bar{Q} = \left[\begin{array}{ll} Q_{11} & Q_{12} \\ Q_{21} & Q_{22} \end{array} \right] - \left[\begin{array}{ll} Q_{13} & Q_{14} \\ Q_{23} & Q_{24} \end{array} \right] \left[\begin{array}{ll} Q_{33} & Q_{34} \\ Q_{43} & Q_{44} \end{array} \right]^{-1} \left[\begin{array}{ll} Q_{31} & Q_{32} \\ Q_{41} & Q_{42} \end{array} \right]. \end{array} $$
(14.24)

Next, application of Sect. 14.3.1 to (14.23) yields the following port-Hamiltonian description of the dynamics on \({\fancyscript{X}}_{1}\)

$$ \left\{\begin{array}{lll} \dot x_{1} & = & (F_{11} - F_{12}F_{22}^{-1}F_{21})\bar{Q}_{11}x_{1} + B_{1}u, \\ y & = & B_{1}^T\bar{Q}_{11}x_{1}, \end{array}\right. $$
(14.25)

having the same transfer matrix as the original system (14.1).

Further analysis (using the well-known matrix inversion formula) yields

$$ \begin{array}{llllll} \bar{Q}_{11} = {Q}_{11} -{Q}_{13}(Q_{33} - Q_{34}Q_{44}^{-1}Q_{43})^{-1}Q_{31} \\ \qquad + {Q}_{14}{Q}_{44}^{-1}{Q}_{43}(Q_{33} -Q_{34}Q_{44}^{-1}Q_{43})^{-1}Q_{31} \\ \qquad +{Q}_{13}{Q}_{33}^{-1}{Q}_{34}(Q_{44} -Q_{43}Q_{33}^{-1}Q_{34})^{-1}Q_{41} \\ \qquad - {Q}_{14}(Q_{44} -Q_{43}Q_{33}^{-1}Q_{34})^{-1}Q_{41}.\end{array} $$
(14.26)

Remark 5

By first applying the procedure of Sect. 14.3.1 and then applying the procedure of Sect. 14.3.2 for zero initial conditions it can be shown that we obtain the same port-Hamiltonian formulation.

4 The Co-Energy Variable Representation

In this section we assume throughout that the matrix \(Q\) is invertible. This means that

$$e = Qx $$
(14.27)

is a valid coordinate transformation, and the port-Hamiltonian system (14.1) in these new coordinates takes the form

$$ \left\{\begin{array}{llll} \dot e & = & QFe + QBu, & F = J - R, \\ y & = & B^Te. \end{array}\right. $$
(14.28)

Since \(e=Qx=\frac{\partial H}{\partial x}(x)\), with \(H(x) = \frac{1}{2}x^TQx\) the energy, the variables \(e\) are usually called the co-energy variables.

Example 2

Consider the LC-circuit in Fig. 14.1, with \(q\) the charge on the capacitor and \(\phi_1, \phi_2\) the fluxes over the inductors \(L_1, L_2\) correspondingly. The energy (in the case of a linear capacitor and inductors) is given as

$$ H(q, \phi_1, \phi_2) = \frac{1}{2C}q^2+\frac{1}{2L_1}\phi_1^2+\frac{1}{2L_2}\phi_2^2, $$
(14.29)

and \(x=\left[q,\phi_1,\phi_2\right]^T\) are the energy variables, in which the system takes the port-Hamiltonian form

$$ \left\{\begin{array}{l} \left[\begin{array}{l} \dot{q} \\ \dot{\phi}_1 \\ \dot{\phi}_2 \end{array}\right] = \left[\begin{array}{lll} 0 & 1 & -1 \\ -1 & 0 & 0 \\ 1 & 0 & 0 \end{array}\right] \left[\begin{array}{l} \frac{q}{C}\\ \frac{\phi_1}{L_1} \\ \frac{\phi_2}{L_2} \end{array}\right] + \left[\begin{array}{ll} 0 \\ 1 \\ 0 \end{array}\right]u, \\ y=\phi_1/L_1, \end{array}\right. $$
(14.30)

with \(u,y\) being the voltage across and the current through the voltage source. The co-energy variables

$$ e= \left[ \begin{array}{l} q/C \\ \phi_1/L_1 \\ \phi_2/L_2 \end{array} \right] = \left[ \begin{array}{l} V_{C} \\ I_{L1} \\ I_{L2} \end{array} \right] $$

are the voltage over the capacitor and the currents through the inductors, leading to the following form of the dynamics

$$ \left\{\begin{array}{l} \left[\begin{array}{l} \dot V_{C} \\ \dot I_{L1} \\ \dot I_{L2} \end{array} \right]=\left[\begin{array}{lll} \frac{1}{C} & 0 & 0 \\ 0 & \frac{1}{L_1} & 0 \\ 0 & 0 & \frac{1}{L_2} \end{array}\right]\left[\begin{array}{lll} 0 & 1 & -1 \\ -1 & 0 & 0 \\ 1 & 0 & 0 \end{array}\right] \left[ \begin{array}{l} V_{C} \\ I_{L1} \\ I_{L2} \end{array} \right] + \left[\begin{array}{l} 0 \\ \frac{1}{L_1} \\ 0 \end{array}\right]u,\\ y=I_{L1}. \end{array}\right. $$
(14.31)

Note that

$$ \frac{d}{dt}\frac{1}{2}e^TQ^{-1}e = \frac{1}{2}e^T(F+F^T)e+e^TBu=-e^TRe+u^Ty, $$
(14.32)

and thus if \(Q > 0\) then \(V(e)=\frac{1}{2}e^TQ^{-1}e\) (the Legendre transform of \(H(x) = \frac{1}{2}x^TQx\)) is a storage function of (14.28). \(V(e)\) is called the co-energy of the system, which is in this linear case equal to the energy \((V(Qx) = H(x))\).

Fig. 14.1
figure 1

LC-circuit

A main advantage of the co-energy variable representation of a port-Hamiltonian system is that additional \(constraints\) on the system are often expressed as constraints on the co-energy variables (see also Sect. 14.6)

The reduction of the port-Hamiltonian system to its controllable and/or observable part takes the following form in the co-energy variable representation. Interestingly enough, the formulas take a somewhat "dual" form to the formulas obtained in the energy variable representation.

Consider the system (14.28) in co-energy variable representation. Take linear coordinates \(e=\left[\begin{array}{l} e_{1} \\ e_{2}\end{array}\right]\) such that the reachability subspace \(\fancyscript{R}\) is spanned by vectors of the form \(\left[\begin{array}{l} e_{1}\\ 0\end{array}\right]\):

$$ \left\{\begin{array}{lllll} \left[\begin{array}{l} \dot e_{1} \\ \dot e_{2} \end{array} \right] = \left[\begin{array}{ll} Q_{11} & Q_{12} \\ Q_{21} & Q_{22} \end{array} \right] & \left[\begin{array}{ll} F_{11} & F_{12} \\ F_{21} & F_{22} \end{array} \right] & \left[\begin{array}{l} e_{1} \\ e_{2} \end{array} \right] + \left[\begin{array}{ll} Q_{11} & Q_{12} \\ Q_{21} & Q_{22} \end{array} \right] \left[\begin{array}{ll} B_{1} \\ B_{2} \end{array} \right] u, \\ y = \left[\begin{array}{ll} B_{1}^T & B_{2}^T \end{array} \right] & \left[\begin{array}{l} e_{1} \\ e_{2} \end{array} \right]. \end{array}\right. $$
(14.33)

By invariance of \(\fancyscript{R}\) this implies

$$ \begin{array}{l} Q_{21}F_{11} + Q_{22}F_{21}=0, \\ Q_{21}B_{1} + Q_{22}B_{2}=0. \end{array} $$
(14.34)

Hence the dynamics restricted to \(\fancyscript{R}\) equals

$$ \left\{\begin{array}{lll} {\dot e}_{1} & = & (Q_{11}F_{11} + Q_{12}F_{21})e_{1} + (Q_{11}B_{1} + Q_{12}B_{2})u \\ & = & (Q_{11} - Q_{12}Q_{22}^{-1}Q_{21})F_{11}e_{1} + (Q_{11} - Q_{12}Q_{22}^{-1}Q_{21})B_{1}u, \\ y & = & B_{1}^Te_{1}, \end{array}\right. $$
(14.35)

which is a port-Hamiltonian system in co-energy variable representation, with energy matrix \(\bar{Q} = Q_{11} - Q_{12}Q_{22}^{-1}Q_{21}\), and interconnection/damping matrix \(F_{11}\). Notice that these formulas are dual to the corresponding formulas (14.16) for the controllable part of the system in energy variable representation, where the resulting interconnection/damping matrix is a Schur complement, while the resulting energy matrix is \(Q_{11}\). This duality is associated with the Legendre transform of the Hamiltonian \(H(x)\).

Analogously, take linear coordinates \(e=\left[\begin{array}{l} e_{1} \\ e_{2}\end{array} \right]\) such that the unobservability subspace \(\fancyscript{N}\) is spanned by the vectors \(\left[\begin{array}{l} 0 \\ e_{2}\end{array}\right]\). This implies

$$ \begin{array}{lll} Q_{11}F_{12} + Q_{12}F_{22} = 0,\\ \qquad \quad \quad B_{2} = 0, \end{array} $$
(14.36)

leading to the observable reduced dynamics

$$ \left\{\begin{array}{lll} \dot e_{1} = (Q_{11}F_{11} + Q_{12}F_{21})e_{1} + Q_{11}B_{1}u \\= Q_{11}(F_{11} - F_{12}F_{22}^{-1}F_{21})e_{1} + Q_{11}B_{1}u, \\ y = B_{1}^Te_{1}. \end{array}\right. $$
(14.37)

Combination of the above leads to a similar Kalman decomposition as in the energy variable representation.

Remark 6

To extend the definition of the Schur complements of \(Q, F\) for singular \(Q_{22}, F_{22}\) see Remarks 2, 4.

5 Balancing for Port-Hamiltonian Systems

Definition 1

The \(controllability\) and observability function of a linear system are defined as

$$ L_c(x_0)=\min\limits_{u \in L_2(-\infty,0)}\frac{1}{2}\int\limits_{-\infty}^{0}\parallel u(t) \parallel^2dt, \qquad x(-\infty)=0,\quad x(0)=x_0 $$
(14.38)

and

$$ L_o(x_0)=\frac{1}{2}\int\limits_{0}^{\infty}\parallel y(t) \parallel^2dt,\qquad u(t)=0, \quad x(0)=x_0, $$
(14.39)

respectively.

The value of the controllability function at \(x_0\) is the minimum amount of input energy required to reach the state \(x_0\) from the zero state, and the value of the observability function at \(x_0\) is the amount of output energy generated by the state \(x_0\).

Theorem 1

Consider a linear time invariant (LTI) asymptotically stable system [8]

$$ \left\{\begin{array}{ll} \dot x = Ax + Bu, \\ y = Cx. \end{array}\right. $$
(14.40)

\(Then\)\(L_c(x_0)=\frac{1}{2}x^T_0W^{-1}x_0\)\(and\)\(L_o(x_0)=\frac{1}{2}x^T_0Mx_0\), \(where\)\(W = \int_{0}^{\infty}e^{At}BB^Te^{A^Tt}dt\)is the controllability Gramian and\(M =\int_{0}^{\infty}e^{A^Tt}C^TCe^{At}dt\) is the observability Gramian. Furthermore\(W\)\(and\)\(M\)are symmetric and positive definite, and are unique solutions of the Lyapunov equations

$$ AW + WA^T=-BB^T $$
(14.41)

\(and\)

$$ A^TM + MA=-C^TC $$
(14.42)

\(respectively.\)

In the port-Hamiltonian case Eqs. (14.41) and (14.42) specialize to

$$ (J - R)Q W + WQ(J - R)^T=-BB^T $$
(14.43)

and

$$ Q(J - R)^T M + M(J - R)Q=-QBB^TQ. $$
(14.44)

Sometimes it is useful to proceed using so-called scattering representation for port-Hamiltonian systems (motivated by electrical domain), where controllability and observability Gramians are related to the energy matrix \(Q\) as \(M \leq Q \leq W^{-1}\), and Hankel singular values \(\sigma_i\) are all \( \Leftarrow1\) (see [11, 13]).

Nevertheless in this paper we proceed without using scattering coordinates.

The balancing coordinate transformation \(S, x = Sx_b\), where \(x_b\) denotes balanced coordinates, clearly preserves the port-Hamiltonian structure of the system (14.1):

$$ \left\{\begin{array}{l} \dot x_b = (J_b - R_b)Q_bx_b + B_bu, \\ y =B_b^TQ_bx_b, \end{array}\right. $$
(14.45)

where \(S^{-1}RS^{-T} = R_b = R_b^T\geq 0\) is the dissipation matrix, \(S^{-1}JS^{-T} = J_b = -J_b^T\) is the structure matrix and \(S^{T}QS = Q_b = Q_b^T\geq 0\) is the energy matrix in the balanced coordinates \(x_b\). In this case, \(B_b = S^{-1}B\).

Similarly, the port-Hamiltonian structure is preserved applying balancing coordinate transformation \(T, e = Te_b,\) to the port-Hamiltonian system (14.28) in co-energy coordinates.

Now bringing the system (14.1) into a balanced form where \(W = M\) (see [8, 14]) and computing the square roots of the eigenvalues of \(MW\) which are equal to the Hankel singular values (see [3]) provides us the information about the number of state components of the system to be reduced. These state components require large amount of the incoming energy to be reached and give small amount of the outgoing energy to be observed. Therefore they are less important from the energy point of view and can be removed from the system (see also [1]).

6 Reduction of Port-Hamiltonian Systems in the General Case

For a general port-Hamiltonian system in energy (14.1) or co-energy (14.28) coordinates with no uncontrollable/unobservable but with "hardly" controllable/observable states we may apply balancing as explained in Sect. 14.5 and use one of the following structure-preserving reduction techniques. Since the techniques considered apply to the port-Hamiltonian systems in balanced coordinates, for the sake of simplicity in this section we skip the subscript ‘\(b\)’ writing \(x, e, J, R, Q, B\) instead of \(x_b, e_b, J_b, R_b, Q_b, B_b\).

6.1 Effort-Constraint Reduction

Consider a full order port-Hamiltonian system (14.1). We balance the system (14.1), but now in co-energy coordinates (and thus with another change of coordinates (14.27), obtaining the following balanced representation of our system

$$ \left\{\begin{array}{l} \dot e = Q(J - R)e + QBu, \\ y = B^Te, \end{array}\right. $$
(14.46)

where the lower part of the state vector \(e=\left[\begin{array}{l} e_{1} \\ e_{2} \end{array}\right]\) is the most difficult to reach and to observe.

Consider the system (14.1) again, but now in the coordinates where the system (14.46) is balanced

$$ \left\{\begin{array}{l} \dot x = (J - R)e + Bu, \\ y = B^Te. \end{array}\right. $$
(14.47)

A natural choice for the reduced model would be a model which contains only the \(e_{1}\) dynamics since the lower part of the state vector \(e_{2}\) is much less relevant from the energy point of view

$$ e_{2} = Q_{21}x_{1}+Q_{22}x_{2} \approx 0. $$
(14.48)

Therefore the reduced system takes the following form

$$ \left\{\begin{array}{l} \dot x_{1} = (J_{11} - R_{11})e_{1} + B_{1}u \\ =(J_{11} - R_{11})(Q_{11}x_{1} + Q_{12}x_{2}) + B_{1}u,\\ y =B_{1}^Te_{1} = B_{1}^T(Q_{11}x_{1}+Q_{12}x_{2}). \end{array}\right. $$
(14.49)

After substituting \(x_{2}\approx-Q_{22}^{-1}Q_{21}x_{1}\) from (14.48) into (14.49), assuming that \(Q_{22}^{-1}\) exists, the reduced system will take the final form in energy coordinates

$$ \left\{\begin{array}{l} \dot x_{1}= (J_{11} - R_{11}) (Q_{11} - Q_{12}Q_{22}^{-1}Q_{21})x_{1} + B_{1}u,\\ \bar y = B_{1}^T(Q_{11} - Q_{12}Q_{22}^{-1}Q_{21})x_{1}, \end{array}\right. $$
(14.50)

which is again a port-Hamiltonian system produced by the effort-constraint method.

6.2 An Alternative Reduction Method

Another structure preserving way of model reduction of port-Hamiltonian systems assumes that we balance the system (14.1) and approximate the lower part of the state vector, but now in energy coordinates, \(plus\) its dynamics. Using the notation \(F := J - R\) we obtain

$$ \begin{array}{l} x_{2}\approx0,\\ \dot x_{2}=(F_{21}Q_{11}+F_{22}Q_{21})x_{1}+B_{2}u\approx0, \end{array} $$
(14.51)

with the reduced port-Hamiltonian system of the form

$$ \left\{\begin{array}{l} \dot x_{1} = (F_{11}Q_{11}+F_{12}Q_{21})x_{1} + B_{1}u,\\ y = (B_{1}^TQ_{11}+B_{2}^TQ_{21})x_{1}. \end{array}\right. $$
(14.52)

From (14.51) it immediately follows that \(Q_{21}x_{1}\approx-F_{22}^{-1}F_{21}Q_{11}x_{1}-F_{22}^{-1}B_{2}u\), assuming that \(F_{22}^{-1}\) exists. Substituting in (14.52) yields

$$ \left\{\begin{array}{l} \dot x_{1}=(F_{11} - F_{12}F_{22}^{-1}F_{21})Q_{11}x_{1} + (B_{1}- F_{12}F_{22}^{-1}B_{2})u,\\ \hat y = (B_{1}^T - B_{2}^TF_{22}^{-1}F_{21})Q_{11}x_{1} - (B_{2}^TF_{22}^{-1}B_{2})u, \end{array}\right. $$
(14.53)

which is if \((F_{12}F_{22}^{-1})^T=F_{22}^{-1}F_{21}\) again a reduced system in the port-Hamiltonian form.

Remark 7

The reduced order port-Hamiltonian systems (14.50) and (14.53) are automatically passive since the preservation of the port-Hamiltonian structure implies the preservation of the passivity property (see [12]).

Remark 8

Although the approximation method with the reduced model (14.53) is similar to the well-known balanced truncation (\(x_{2}\approx 0 \), see e.g. [1] and the references therein) which gives the reduced order model of the form

$$ \left\{\begin{array}{l} \dot x_{1} = A_{11}x_{1}+ B_{1}u,\\ y_{bt} = C_{1}x_{1}, \end{array}\right. $$
(14.54)

and less well-known singular perturbation method (\(\dot x_{2}\approx0\), see [2, 5]) with the reduced order model

$$ \left\{\begin{array}{l} \dot x_{1} =(A_{11} - A_{12}A_{22}^{-1}A_{21})x_{1} + (B_{1}- A_{12}A_{22}^{-1}B_{2})u,\\ y_{sp}=(C_{1} - C_{2}A_{22}^{-1}A_{21})x_{1} -C_{2}A_{22}^{-1}B_{2}u, \end{array}\right. $$
(14.55)

we want to underline that it is different from these reduction methods since it is easy to show that neither of them preserves the port-Hamiltonian structure.

7 Example

We consider a ladder network, similar to that of [15]. In our case we take the current \(I\) as the input and the voltage of the first capacitor \(U_{c_1}\) as the port-Hamiltonian output. The state variables are as follows: \(x_1\) is the charge \(q_1\) over \(C_1\), \(x_2\) is the flux \(\phi_1\) over \(L_1\), \(x_3\) is the charge \(q_2\) over \(C_2\), \(x_4\) is the flux \(\phi_2\) over \(L_2\), etc.

In our case, as in [15], the resulting Hankel singular values obtained after balancing are not distinct enough. In order to overcome this difficulty we inject additional dissipative elements, in this case resistors \(R_1, \ldots, R_n,\) into the model as shown in Fig. 14.2.

We take unit values of the capacitors \(C_i\) and inductors \(L_i\), while \(R_0 = 0.2\), \(R_i = 0.2, i = 1,\ldots, n/2, R_{n/2+1} = 0.4\). A minimal realization of this port-Hamiltonian ladder network for the order \(n = 6\) is

$$ A= \left[ \begin{array}{llllll} 0 & -\frac{1}{L_1} & 0 & 0 & 0 & 0 \\ \frac{1}{C_1} & -\frac{R_1}{L_1} & -\frac{1}{C_2} & 0 & 0 & 0 \\ 0 & \frac{1}{L_1} & 0 & -\frac{1}{L_2} & 0 & 0 \\ 0 & 0 & \frac{1}{C_2} & -\frac{R_2}{L_2} & -\frac{1}{C_3} & 0 \\ 0 & 0 & 0 & \frac{1}{L_2} & 0 & -\frac{1}{L_3} \\ 0 & 0 & 0 & 0 & \frac{1}{C_3} & -\frac{R_3+R_4}{L_3} \end{array} \right] ,\quad B= \left[ \begin{array}{l} 1 \\ 0 \\ 0 \\ 0 \\ 0 \\ 0 \end{array} \right] , \ C =\left[ \begin{array}{llll} \frac{1}{C_1} \\ 0 \\ 0 \\ 0 \\ 0 \\ 0 \end{array} \right]^T, $$

where \(A = (J - R)Q\) with

$$ J= \left[ \begin{array}{llllll} 0 & -1 & 0 & 0 & 0 & 0 \\ 1 & 0 & -1 & 0 & 0 & 0 \\ 0 & 1 & 0 & -1 & 0 & 0 \\ 0 & 0 & 1 & 0 & -1 & 0 \\ 0 & 0 & 0 & 1 & 0 & -1 \\ 0 & 0 & 0 & 0 & 1 & 0 \end{array} \right] ,\quad R= \left[ \begin{array}{llllll} 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & R_1 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & R_2 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & R_3+R_4 \end{array} \right] , $$
$$ Q= \left[ \begin{array}{llllll} \frac{1}{C_1} & 0 & 0 & 0 & 0 & 0 \\ 0 & \frac{1}{L_1} & 0 & 0 & 0 & 0 \\ 0 & 0 & \frac{1}{C_2} & 0 & 0 & 0 \\ 0 & 0 & 0 & \frac{1}{L_2} & 0 & 0 \\ 0 & 0 & 0 & 0 & \frac{1}{C_3} & 0 \\ 0 & 0 & 0 & 0 & 0 & \frac{1}{L_3} \end{array} \right] . $$

Adding another \(LC\) pair to the network (with appropriate resistors), which would correspond to an increase of the dimension of the model by two, will modify the \(ABC\)-model in the following way. The sub-diagonal of the matrix \(A\) will contain additionally \(L_{n/2-1}^{-1}, C_{n/2}^{-1}\). The super diagonal of \(A\) will contain \(-C_{n/2}^{-1},-L_{n/2}^{-1}\). Furthermore, the main diagonal of \(A\) will have \(-{\frac{R_{n/2-1}}{L_{n/2-1}}}\) in the \((n-2,n-2)\) position, zero in the \((n-1,n-1)\) position and \(-{\frac{R_{n/2}+R_{n/2+1}}{L_{n/2}}}\)in the \((n,n)\) position.

Fig. 14.2
figure 2

Ladder network

We considered the 12-dimensional full order minimal port-Hamiltonian network and reduce it to a 5-dimensional one by the effort-constraint method considered in the previous section and the usual balanced truncation method. The non-minimal system can be first reduced to a minimal one as shown in Sect. 14.3. The Hankel singular values of the full order system in decreasing order are shown in Table 14.1.

Table 14.1 Decreasing Hankel singular values of the full order system

It is a well-known fact that the transfer functions of reduced order models obtained by the balanced truncation method approximate the full order transfer functions well in the high-frequency region and not that well in the low-frequency one (of course, depending on the application considered). Since the effort-constraint method is similar to the balanced truncation method (with the above explained modification in order to preserve the port-Hamiltonian structure and passivity) we expected approximations of similar nature. In Figs. 14.3 and 14.4 the frequency response of the full order model is shown vs. the frequency responses of the reduced order models, obtained by the balanced truncation method and the effort-constraint method respectively. The figures show that the reduced order transfer functions indeed behave in a similar way.

Fig. 14.3
figure 3

Frequency response

Fig. 14.4
figure 4

Frequency response

In Table 14.2 \(\fancyscript{H}_{\infty}\)- and \(\fancyscript{H}_2\)-norms are shown for the error systems obtained after balanced truncation reduction and effort-constraint reduction. It follows that the error-norms for the effort-constraint method are larger than those for the balanced truncation method.

Table 14.2 \(\fancyscript{H}_{\infty}\)- and \(\fancyscript{H}_2\)-norms for the error systems

Port-Hamiltonian systems are somewhere in between general passive systems and electrical circuits. We believe that whenever a transfer function of a full order electrical circuit is approximated well by the balanced truncation method, we can always apply the (port-Hamiltonian) structure preserving effort-constraint method in order to obtain an approximation of a similar quality as the approximation obtained by the balanced truncation method along with the preservation of the port-Hamiltonian structure and passivity.

Important questions concerning general error bounds for the structure preserving port-Hamiltonian model reduction methods and about the physical realization of the obtained port-Hamiltonian reduced order models are currently under investigation.

8 Conclusions

We have shown in Sect. 14.3 that a full order uncontrollable/unobservable port-Hamiltonian system can be reduced to a controllable/observable system, which is again port-Hamiltonian, by exploiting the invariance of the reachability/unobservability subspaces of the original system. We discussed energy and co-energy variable representations of port-Hamiltonian systems in Sect. 14.4, illustrated by the example of electrical networks, where the energy variables are charges and fluxes, while the co-energy variables are voltages and currents

Balancing for port-Hamiltonian systems is discussed in Sect. 14.5. The effort-constraint method and the other alternative reduction method are introduced in Sect. 14.6 and applied to a general port-Hamiltonian full order system showing that the proposed approximations preserve the port-Hamiltonian structure for the reduced order systems as well as the passivity property. In Sect. 14.7 we considered a full order ladder network and applied the balanced truncation method and the effort-constraint method in order to obtain reduced order models.

Port-Hamiltonian structure preserving model reduction methods motivate to investigate further important issues about error bounds between full order and reduced order systems, and about the physical realization of the reduced order systems, e.g. as an electrical circuit.