Port-Hamiltonian descriptor systems are relative generically controllable and stabilizable

The present work is a successor of [Ilchmann, Kirchhoff 2022] on generic controllability and of [Ilchmann, Kirchhoff 2023] on relative generic controllability of linear differential-algebraic equations. We extend the result from general, unstructured differential-algebraic equations to differential-algebraic equations of port-Hamiltonian type. We derive new results on relative genericity. These findings are the basis for characterizing relative generic controllability of port-Hamiltonian systems in terms of dimensions. A similar result is proved for relative generic stabilizability.

the field of the real, complex numbers, resp.K either the field of the real or complex numbers N * ≤j := {1, . . ., j} , j ∈ N * R k×ℓ the vector space of all k × ℓ matrices with entries in a ring R Gl(R k ) general linear group of all invertible k × k matrices with entries in R M i,j (M i,• , M •,j ) the entry (i, j) (the i-th row, j-th column, resp.) of a matrix M ∈ R k×ℓ , i ∈ N * ≤k , j ∈ N * ≤ℓ rk F M the rank of M ∈ R k×ℓ over the field F • p,q an operator norm on R p×q B(x 0 , ε) := x ∈ X x − x 0 < ε , the open ball with center x 0 ∈ X and radius ε ∈ (0, ∞) for a normed real or complex vector space (X, • ).AC(R, K n ) the set of all absolutely continuous functions f : R → K n L 1 loc (R, K n ) the set of all locally integrable functions f : R → K n f −1 (A) := {x ∈ X : f (x) ∈ A}, the preimage of the set A ⊆ Y under the function f : In the present work we characterize (relative) genericity of controllability and stabilizability of linear finite-dimensional port-Hamiltonian descriptor systems described by linear differentialalgebraic input-state-output systems of the following form [31] d dt Ex = (J − R)Qx + Bu, where So two subjects meet: genericity of controllability/stabilizability and port-Hamiltonian descriptor systems.We give a brief literature review on both subjects in the following.
After Rudolf Kalman had introduced and characterized in 1960 [21,22] controllability of linear systems of the form where (A, B) ∈ K n×n × K n×m for n, m ∈ N * , Lee and Markus [26] proved in 1967 that the set of all controllable systems (1. 2) is open and dense with respect to the Euclidean topology.
In 1974, Wonham [41] showed that this set is not only open and dense but also conull w.r.t. the Lebesgue measure, i.e. its complement is a Lebesgue null set.In 2019, Hinrichsen and Oeljeklaus [15] improved Wonham's result.They proved that in the case m ≥ 2 the set of controllable systems (1.2) is generically convex, i.e. the set of pairs of tuples ((A 1 , B 1 ), (A 2 , B 2 )) so that all the systems (1.2) associated to the tuples (A 1 +λ(A 2 −A 1 ), B 1 +λ(B 2 −B 1 )), λ ∈ [0, 1], are controllable is generic.Recently, in 2021, Wonham's results were generalized by Ilchmann and Kirchhoff [18,Thm. 2.3] to systems described by differential-algebraic equations of the form where (E, A, B) ∈ Σ ℓ,n,m := K ℓ×n × K ℓ×n × K ℓ×m for ℓ, n, m ∈ N * .It was shown that the DAE-systems (1.3)  (1.4) and if one of the conditions on the right-hand side is violated, then the associated controllability notion is generically violated; see Proposition 2.1 for a definition of the five controllability concepts.In 2022, Hinrichsen and Oeljeklaus [16] proved that linear time-invariant ordinary delay-differential equations are generically controllable.However, the concept of genericity of controllability for DAE-systems has the drawback that the set Σ ℓ,n,m is too "large": if ℓ = n, then in each arbitrarily small neighbourhood of (E, A, B) ∈ Σ ℓ,n,m there is some invertible E ′ ∈ K n×n such that (E ′ , A, B) is an ordinary differential equation.To resolve this drawback, Kirchhoff [23] introduced the concept of relative genericity 2 , and Ilchmann and Kirchhoff [19,Thm. 3.2] showed in 2022 that a similar characterization to (1.4) holds for relative genericity of controllability for various reference sets such as (E, A, B) ∈ Σ ℓ,n,m rk R E ≤ r for r ∈ N.
In 2021, Kirchhoff [23,Prop. III.1] has shown that the set of all controllable linear port-Hamiltonian systems described by where B ∈ K ℓ×m , J = −J * ∈ K ℓ×ℓ , and Q * = Q ∈ K ℓ×n , is relative generic in the set of all systems (1.5).Similar results of the afore mentioned hold for stabilizability.
The brief literature review about systems port-Hamiltonian systems is as follows.Port-Hamiltonian systems were introduced in the seminal work [28].They provide a flexible and highly structured framework to model complex phenomena by means of input-state-output dynamical systems.Application areas encompass many physical domains, such as, e.g., mechanics, electrical circuits, thermodynamics, and multi-energy systems, cf.[14,27,40] for recent applications.Due to their energy-based nature, a port-Hamiltonian (pH) structure inherently ensures passivity and stability and thus enables powerful analytic tools [20], numerical methods [24,31] or passivitybased control techniques [32,37], to analyze, simulate or control the corresponding systems.In view of optimal control, it was recently shown that pH structures can be used to overcome challenges in singular optimal control [9,10], allowing results that are not available for general input-state-output systems.Another advantage of the pH model class is its closedness under power-conserving interconnection: A power-conserving coupling of pH systems is again port-Hamiltonian.Last, the class of pH systems can be shown to be particularly robust w.r.t.structured perturbations [30].
Port-Hamiltonian models arise in various formulations, such as geometric (by means of, e.g., Dirac structures [6,7,25] and Lagrangian subspaces [29]) or explicit state space models, both in finite- [38] and infinite-dimensional [20,34] spaces.This is, so far, the state of the art in relative genericity of controllability/stabilizability of descriptor port-Hamilonian systems.In the present paper we turn to linear port-Hamiltonian differential-algebraic systems described by (1.1).This class is a generalization of (1.5) and a restriction of (1.3).Due to the particular structure in (1.1), it is not readily possible to apply the results of [18,Theorem 2.3] and of [19,Thm. 3.2].However, utilizing Kirchhoff's [23] slight adaptation of Wonham's original concept, we characterize -with striking resemblance to (1.4)genericity and relative genericity of controllability/stabilizability of the system class (1.1).The latter is the main result of the paper.
Our article is organized as follows.In section 2, we define subclasses of port-Hamiltonian systems; recall the definition and algebraic characterizations of the five controllability and three stabilizability concepts; recall the definitions of (relative) genericity and prove some properties that will be intensively exploited in the proofs of the upcoming results.Section 3 is an intermediate section; we derive various lemmata and a proposition to show that subsets of systems (1.1) which satisfy certain algebraic constraints (the latter induced by the characterizations of controllability/stabilizability) are relative generic in some reference sets of port-Hamiltonian systems.These results lay the ground for the proofs of the main results in section 4. The latter are necessary and sufficient criteria on the dimensions ℓ, n and m under which port-Hamiltonian systems are relative generically controllable.Similar results for relative generic stabilizability are shown in section 5. Lastly, we will give a brief overview of possible future research in section 6.

Controllability, stabilizability, and relative genericity
In this section, we define a class of port-Hamiltonian DAE systems, recall controllability and stabilizability concepts for differential-algebraic equations, and collect results on (relative) genericity needed for later purposes.

Port-Hamiltonian systems classes
A port-Hamiltonian descriptor system is a differential-algebraic equation of the form (1.1).If R > 0, then the resulting DAE is called dissipative; otherwise it is called semi-dissipative, see [4, Definition 4.1.1(xxii)and (xxiii)] and [1].We denote the sets of all matrix quintuples associated to (semi-)dissipative port-Hamiltonian systems by An important subclass of port-Hamiltonian descriptor systems are conservative systems, i.e.R = 0, denoted by

Controllability and stabilizability
To define controllability and stabilizability we need to define the behaviour of the differentialalgebraic equation (1.3), where ℓ, n, m ∈ N * , that is the set wherein "a.e." stands for "almost everywhere" with respect to the Lebesgue measure.
Next we recall the five definitions and characterizations of controllability for linear differentialalgebraic systems (1.3).
for each of the following controllability concepts defined and algebraically characterized as follows: :

Furthermore,
S completely controllable = S freely initializable ∩ S behavioural controllable and S strongly controllable = S impulse controllable ∩ S behavioural controllable .
For port-Hamiltonian systems (1.1), we use, analogously to general differential-algebraic equations, the notation and where controllable stands for either of the five aforementioned controllability concepts.
Proof.Berger and Reis [3] derive a feedback form and use this as a tool in conjunction with 'canonical' representatives of certain equivalence classes to prove all characterizations of controllability in their survey.Note that in their characterization of strongly controllability, the term '+im R E' is missing in the first respective line in [3,Cor. 4.3].
Additionally to controllability, we will characterize genericity of stabilizability for port-Hamiltonian descriptor systems.To this end, we recall the definitions and algebraic characterizations.3) for some ℓ, n, m ∈ N * .Writing, similar to the case of controllability, the following definitions and characterizations hold true: : For port-Hamiltonian systems (1.1), we use the notations , there is no meagre set (i.e. a set, whose complement is residual) that is also residual.Thus, the complement of our set cannot contain any residual set and is therefore not generic in the Euclidean topological sense.Thus, the two aforementioned genericity concepts are, in general, unrelated.To this end, we will utilize a concept of genericity that unites the topological and measure theoretic point of view.Consider the real finite-dimensional coordinate space R n , which is intrinsically a Baire spaceequipped with the Euclidean topology -and intrinsically a complete measure space -equipped with the Lebesgue measure.In this case, Wonham introduced the classical concept of genericity that unites the Euclidean topological and the Lebesgue meaure theoretic concepts of genericity using the Zariski topology as follows.
Definition 2.5 ( [41, p. 28] and [36]).Let n ∈ N * .A set V ⊆ R n is called an algebraic set if, and only if, i.e. algebraic sets are the locus of the common zeros of finitely many polynomials in n indeterminants.
A set S is called generic in R n if, and only if, there is some strict algebraic set V R n so that S c ⊆ V. ⋄ Let the polynomials p i in Definition 2.5 generate the ideal i.e. an additive subgroup that is closed under multiplication with any polynomial.It is easy to verify that all members of I vanish at the algebraic set V. In later considerations, we make use of the correspondence of algebraic sets in R n and ideals in the ring of n-variate polynomials.
Since the latter is a commutative ring, there is no need to distinguish between left and right ideals.
Lemma 2.6 ( [36, pp.50/1]).A set V ⊆ R n is an algebraic set if, and only if, there is some ideal Genericity in the sense of Definition 2.5 can also be characterised by means of the Zariski topology.This topology is given by its closed sets, that are precisely the algebraic sets, see [36, p. 50 measure theoretic approach to genericity.Additionally, from the tame nature of polynomials, the authors would like to argue that the concept of genericity in the sense of Definition 2.5 is rather handy to work with as opposed to the natural choice of defining genericity as residual (or even open and dense) conull sets.Unfortunately, a drawback of Wonham's genericity as defined in Definition 2.5 is that its naive extension to genericity with respect to some reference set V ⊆ R n fails in general.The relative Zariski topology on V has, in general, not the same favourable properties regarding the Euclidean topology (and the Lebesgue measure, if there is some reasonable way of defining such a measure) which allows to study genericity in the sense of Definition 2.5 as a reasonable concept; the simplest example is a discrete set with at least two points.To overcome this issue, Kirchhoff used in [23] an adapted concept for genericity in some reference se, which was refined in [19] and is defined as follows.

⋄
Analogously to Wonham's original concept as given in Definition 2.5, relative genericity can be characterised in terms of the relative Euclidean and relative Zariski topologies as follows.
Lemma 2.9 In view of Lemma 2.7, relative genericity and genericity in the sense of Definition 2.5 coincide for V = R n .Moreover, when the reference set V admits enough structure (e.g. if V is an analytic submanifold with countable atlas), then the properties of the relative Zariski topology can be invoked to conclude that every relative generic set is conull w.r.t. a Lebesgue-type measure, see [19,Proposition 2.8].Thus, the authors prefer this concept of relative genericity over an adaptation of the purely topological concept of definition 2.3 w.r.t. the relative Euclidean topology on V .Ilchmann and Kirchhoff [19] have collected the results needed in the following considerations.We recall the most important ones here.
some open, dense set (in the relative Euclidean topology) and therefore S c 1 ∩ V is nowhere dense in V .The converse, however, is in general not true.
The statement (g) implies that relative genericity in open reference sets and genericity are equivalent.When considering relative open subsets of a given reference set -which is not necessarily R n , as it was in (g) -only one implication remains true.
The converse fails in general.
Proof.Let S be relative generic in V .By Definition 2.8 there is some algebraic set It remains to show that V c ∩ V is relative Euclidean dense in V .Seeking a contradiction, assume that V ∩ V contains an inner point x 0 ∈ V ∩ V w.r.t. the relative Euclidean topology on V , i.e.
Thus x 0 is an inner point of V ∩ V w.r.t. the relative Euclidean topology on V -a contradiction to density of V c ∩ V in V which is guaranteed by Definition 2.8.
To see that the converse implication fails in general, consider the reference set is open and hence by Proposition 2.10 (g) the set R 2 \ R × {0} is relative generic in B(0, 1).However, R 2 \ R × {0} is not Euclidean dense in V and thus especially not relative generic in V .
An even simpler counter-example would be a disconnected reference set: Each connected component of any set V is relative generic in itself, but not relative generic in V provided that V possesses at least two connected components.So far, we have considered genericity in the sense of Wonham only in the real coordinate space, a restriction that seems odd.However, one should be careful when extending Wonham's original definition (or the small adaptation towards arbitrary reference sets) to the complex case.Naively, the authors would try to use the complex Zariski topology (defined as in the real case but with complex polynomials) and get a reasonable concept.It should be kept in mind that the complex coordinate space C n has naturally a real vector space structure and is isomorphic to R 2n .When applying Wonham's genericity to the R 2n representation of C n , we must be aware that there are 2n-dimensional real algebraic sets in C n that can only contain complex algebraic sets up to dimension n.We must therefore distinguish between the complex genericity and the weaker concept of real genericity that is induced by any isomorphism between C n and R 2n .From the Euclidean topological and Lebesgue measure theoretic point of view, there seems to be no reason to prefer either of these concepts.For simplicity, however, we will use the real genericity for the complex coordinate space; a formal definition is the following.
Definition 2.12.Let n ∈ N * , S, V ∈ C n and ϕ : C n → R 2n a real vector space isomorphism.We call S relative generic in V if, and only if, ϕ(S) is relative generic in ϕ(V ).⋄ We stress that we will be very informal when identifying C n with R 2n and equipping the former with its real Zariski topology.Since isomorphisms are bijective linear maps and especially polynomial vectors, Definition 2.12 is independent of the explicit choice of ϕ.Therefore we do not state the used isomorphism explicitly.Since we have defined relative genericity in the complex coordinate space via its representation as real coordinate space, the results of Proposition 2.10 hold true for C instead of R.
Before we proceed with our main results, we need an additional lemma on relative genericity.
If V contains only one point, then we conclude from In the following, we consider the case that V contains at least two (and hence, due to convexity, uncountably many) points.We split the proof into steps.
Step 1: We show that we can, without loss of generality, assume that V has non-empty interior and spans R n .Since relative genericity is by Definition 2.8 invariant under simultaneous translations of S and V , we may assume , without loss of generality, that 0 ∈ V .Moreover, in view of Lemma 2.9 it can be readily seen that S is relative generic in V if, and only if, S ∩ V is relative generic in V .Thus, we may assume without loss of generality that S ⊆ V .In [23, Lemma III.2], it was shown that when considering relative genericity w.r.t. a reference set that is contained in a linear subspace V ⊆ R n , it can, without loss of generality, be assumed that V = R n .Hence, we can assume without loss of generality that R n and span V , the linear span of V , coincide.In this case, it is well-known that V contains a basis (b Since the boundary of an n-simplex is the union of its lower-dimensional faces, v 0 = n i=1 1 n+1 b i is an inner point of C and hence the interior of V , int V , is indeed non-empty.
Step 2: We show Invoking convexity of V , we see that Further, we conclude from our choice of v 1 , . . ., v n that C is an n-dimensional simplex in an ndimensional space and thus Hence the property (2.6) holds indeed true.
Step 3: We prove that S ⊆ V is relative generic in V .In view of Lemma 2.9, we may equivalently show that S contains some relative Zariski-open relative Euclidean dense set O ⊆ V .
By assumption, there is some Zariski-open set O ⊆ R n so that O ∩V ⊆ S = S ∩V and O ∩V = ∅.Thus, O∩V is, by definition of the relative topology, a relative Zariski open subset of S. Hence, it remains to prove that O∩V is Euclidean dense in V .Seeking a contradiction, assume that O c ∩V contains a relative inner point, i.e.
In view of (2.6), there is some x ′ ∈ B x, ε 2 ∩ int V .By the triangle inequality, we conclude Since x ′ is an inner point of V , there is some ε ′ ∈ (0, ε 2 ) so that

Relative generic sets
The present section is an intermediate section.We prove those results on relative genericity which are needed for proving the main result in section 4. The main result under these lemmata is Proposition 3.11; it shown that various subsets of differential-algebraic systems (1.1) satisfiying an algebraic constraint associated to controllability/stabilizability are (relative) generic sets with respect to (semi-)dissipative or conservative port-Hamiltonian descriptor systems.
The most important tool in our analysis is the well-known concept of a minor.
Then there are multivariate polynomials M 0 , . . ., M dg ∈ K[x 1 , . . ., x ℓn(g+1) ] so that ∀(P 0 , . . ., P g ) ∈ K ℓ×n g+1 : M (P 0 , . . ., P g ) = dg i=0 M i (P 0 , . . ., P g )x i . (3.1) In particular, M 0 (P 0 , . . ., P g ) = M (P 0 ) and M gd (P 0 , . . ., P g ) = M (P g ). (3.2) Proof.By definition, minors are determinants of certain submatrices.Therefore, it suffices to consider the case ℓ = n = d and M = det(•).In that case, the Leibniz formula for the determinant yields where S d denotes the set of all permutations of all d-tuples.From this, (3.1) and (3.2) follow by expanding the products and sorting by the degree of the resulting monomials.The fact that the functions M i are polynomials in the entries of P 0 , . . ., P g , follows likewise from the Leibniz formula.
The properties of minors in Lemma 3.2 and 3.3 will help to understand Zariski-open sets within the sets S H controllable and S sdH controllable that are given by the rank of particular block matrices.As a last algebraic ingredient, we recall the important concept of the Sylvester resultant.with deg p = n ≥ 0 and deg q = m ≥ 0 and coefficients p 1 , . . ., p n , q 1 , . . ., q m ∈ K is defined as .
The matrix above contains m columns with the coefficients of p and n columns with the coefficients of q, so that it is in K (n+m)×(m+n) .All other entries are zero.Please note that the diagram illustrates the case n < m.The resultant of p and q vanishes if, and only if, p and q are not coprime i.e. there is some common zero z ∈ C such that p(z) = q(z) = 0 .
Since relative genericity strongly depends on the reference set, we seek to simplify (in the sense of Proposition 2.10 (e)) the reference sets Σ H ℓ,n,m and Σ sdH ℓ,n,m as much as possible.As a first step towards a simplification, we prove that semi-definite matrices are generically definite.Lemma 3.5.Let ℓ ∈ N * .The set S = M ∈ K ℓ×ℓ M * = M > 0 of Hermitian (symmetric) positive definite matrices is relative generic in V = M ∈ K ℓ×ℓ M * = M ≥ 0 , the set of Hermitian (symmetric) positive semidefinite matrices.The same holds true if we consider negative instead of positive (semi-)definite matrices.
Proof.Recall that each symmetric positive semi-definite matrix is not positive definite if, and only if, it has non-empty kernel (see e.g.[17,Theorem 7.2.6]).Since the determinant is a polynomial, S = V ∩ S = V \ M ∈ K ℓ×ℓ det M = 0 is relative Zariski-open.In view of Lemma 2.9, it remains to prove that S is a Euclidean dense subset of V .Let M ∈ V and ε > 0. We construct a symmetric positive definite matrix M ∈ S so that M − M < ε, where • is a norm on K ℓ×ℓ so that This shows the assertion.
When studying the reference sets Σ H ℓ,n,m and Σ sdH ℓ,n,m , one of the properties of the matrix tuples (E, J, Q, B) and (E, J, R, Q, B), resp., is the symmetry condition we show how perturbations of E and Q that preserve this symmetry property look like.
such that, for some and and and Furthermore, Proof.By the singular value theorem [17, Theorem 2.6.3],there are orthogonal (unitary) matrices P ∈ K ℓ×ℓ and T ∈ K n×n such that (3.4) holds with Σ k as in (3.3).Since P is unitary (orthogonal) and T invertible, Inserting the first equation of (3.4) into (3.8)yields the second equation in (3.4).This gives which shows (3.5).As Σ k ∈ Gl(R k ), the second equation in (3.6) follows from (3.9).A repeated application of which shows the first equation in (3.6).The equivalence in (3.7) is a consequence of (3.9).Finally, it is easy to see that V Σ k is a real vector space.
Next, we show that the matrices E and Q, from which the generalized energy function x → x * E * Qx that is associated to a port-Hamiltonian descriptor system is composed of, have generically full rank.Lemma 3.7.Let ℓ, n ∈ N * .Then each of the sets Proof.Since the statements of (i) and (ii) are symmetric, it suffices in view of Proposition 2.10 (b) to show that S (i) is relative generic in V .Due to Lemmata 3.2 and 3.3, the set is Zariski-open, as well.By Lemma 2.9, it suffices to show that S (i) ∩ V is Euclidean dense in V .Let (E, Q) ∈ V .Lemma 3.6 yields that there are unitary (orthogonal) matrices P ∈ K ℓ×ℓ and T ∈ K n×n and some diagonal matrix Σ ∈ Gl(R k ) with k = rk E so that and SQ ′ T ∈ V Σ as introduced in Lemma 3.6.We show that the set is relative generic in V Σ .By Lemma 3.6, V Σ is a real vector space and therefore convex.Further, S ′ is, in view of Lemma 3.3, relative Zariski open in V Σ .Hence, we can apply Lemma 2.13 and conclude that S ′ is relative generic in V Σ if, and only if, S ′ is non-empty.Lemma 3.6 yields that This shows that S ′ is indeed non-empty and thus relative generic in V Σ .Especially, S ′ is a dense subset of V Σ .Thus, each neighbourhood of (E, Q) contains some (E, Q ′ ) so that P Q ′ T ∈ S ′ or, equivalently, (E, Q ′ ) ∈ S (i) .We conclude that S (i) is indeed relative generic in V .
Using the results of Lemma 3.7, we can show that the rank of E * Q is generically full.
Lemma 3.8.Let ℓ, n ∈ N * .The set Proof.For brevity put k = min {ℓ, n}.Consider the set Using the notation of Lemma 3.7, we see rightforthly that Hence Lemma 3.7 (ii) yields that V is a relative generic subset of V .In view of Proposition 2.10 (e), it suffices to show that S is relative generic in the reference set V .Since rk 3 relative Zariski open in V .Therefore, it remains to show that S ∩ V is Euclidean dense in V .Let (E, Q) ∈ V .In view of Lemma 3.6, there are unitary (orthogonal) matrices P ∈ Gl(K ℓ ) and T ∈ Gl(K n ), and some diagonal matrix Σ ∈ Gl(R k ) so that By (3.6), rk E * Q = k if, and only if, Q ∈ Gl(K k ).We show that the set 13 yields that it suffices to verify that S ′ is non-empty.The latter, however, holds true since Thus S ′ is indeed relative generic in V Σ .Hence, each neighbourhood of (E, Q) contains some (E, Q ′ ) ∈ V so that P Q ′ T ∈ S ′ or, equivalently, (E, Q ′ ) ∈ S ∩ V .This proves the assertion.
We have not yet taken into account that E * Q is positive semidefinite for port-Hamiltonian systems.We adapt the proof of Lemma 3.7 to show that, for fixed Q, E has generically full rank.
Lemma 3.9.Let ℓ, n ∈ N * and Q ∈ K ℓ×n .The set is relative generic in the set Proof.It is rightforthly verified that V Q is a convex set.Further, S is in view of Lemma 3.
3 Zariski-open.By Lemma 2.13, S is relative generic in V Q if, and only if, S ∩ V Q is non-empty.In view of Lemma 3.6, there are unitary matrices P ∈ Gl(R ℓ ) and T ∈ Gl(R n ) and a diagonal matrix Σ ∈ Gl(R k ), k = rk Q, so that .
In view of Lemma 3.6, we find This shows that S ∩ V Q is non-empty.Thus S is indeed relative generic in V Q .
Lemma 3.8 shows that in the case ℓ ≥ n the matrix E * Q is generically invertible.We will use a similiar argument to show (essentially analogous to the proof of Lemma 3.8) that positive semidefinite matrices of the form E * Q are generically positive definite.
Lemma 3.10.Let ℓ ≥ n ∈ N * .The set Proof.A semi-definite matrix is not definite if, and only if, it has non-empty kernel.Thus, we have Since the determinant is a polynomial, V \ S is an algebraic set.Equivalently, V ∩ S is Zariskiopen.By Lemma 2.9 and since S ⊆ V , it remains to show that S is Euclidean dense in V .Define the norm for some operator norm • ℓ,n on K ℓ×n .Since all norms on K ℓ×n ×K ℓ×n are equivalent, it suffices to prove density w.r.t.• ′ .Let (E, Q) ∈ V and ε > 0. In view of Lemma 3.9, there is some From the spectral theorem for symmetric matrices (see [17, Theorem 2.5.3]),we conclude that there is some orthogonal matrix O ∈ Gl(K n ) so that for some λ 1 , . . ., λ n ∈ R ≥0 .Without loss of generality we may assume that the λ i 's are ordered in such a manner that Since H has full rank and ℓ ≥ n, the columns of H * contain a basis of K n .Therefore, for each x ∈ K n , there is some y ∈ K ℓ with x = H * y.Especially, there is some ∆ ∈ K ℓ×n so that Since the right-hand side of this equation is Hermitian, H * ∆ = ∆ * H. Invoking unitarity (orthogonality) of O, we have equivalently ∆) is Hermitian with Hence, the assertion follows from Before we prove that port-Hamiltonian descriptor systems are generically controllable, however, we need an auxiliary result, where we show that the rank of the block matrices that appear in the algebraic criteria in Proposition 2.1 is generically full.Recall that our reference sets of port-Hamiltonian matrix tuples are defined as  Proof.This proof is split into the two cases ℓ ≥ n and ℓ < n.
Case ℓ ≥ n: We find convenient reference sets to simplify our calculations.Note that In Lemma 3.10 we have shown that (E, In view of Proposition 2.10 (d), we conclude that is a relative generic subset of Σ H ℓ,n,m .Thus, in view of Proposition 2.10 (e), relative genericity in Σ H ℓ,n,m and V 1 are equivalent.By definition of Σ H ℓ,n,m and continuity of the spectrum, V 1 is a relatively open subset of By Lemma 2.11 it suffices to prove the assertion for the reference set V ′ 1 instead of Σ H ℓ,n,m .For Σ sdH ℓ,n,m we have Since V 1 is a relative generic subset of Σ H ℓ,n,m , we conclude from Lemma 3.5 and Proposition 2.10 (d) that . By continuity of the spectrum, we conclude with Proposition 2.10 (e) and Lemma 2.11 that it suffices to consider the reference set instead of Σ sdH ℓ,n,m .We consider therefore, without loss of generality, the reference set V ′ 1 instead of Σ H ℓ,n,m , and the reference set V ′ 2 instead of Σ sdH ℓ,n,m .
(a) Since all minors are polynomials, S (a) is in view of Lemma 3.
3 Zariski-open.In view of Lemma 2.9, it remains to prove that and ε > 0. Since relative generic sets are especially Euclidean dense, see Lemma 2.10 (a), Lemma 3.7 (ii) yields that there are some E, Q ∈ K ℓ×n so that < ε.Thus, we have found some This shows that S (a) ∩ V ′ 1 is indeed Euclidean dense and therefore relative generic in V ′ Analogously to (a), Lemma 3.7 (ii) implies the existence of some E, Q ∈ K ℓ×n so that rk

Consider the convex reference set
13 yields that it suffices to prove that S (b) ( E) = ∅.In view of Lemma 3.6, there are unitary (orthogonal) matrices P ∈ Gl(K ℓ ), T ∈ Gl(K n ) and some diagonal matrix Σ ∈ R n×n so that Choose the skew-symmetric matrix else, and put Let κ := min {ℓ − n − m, n}.Since P and T are unitary and Σ ∈ K n×n is an invertible diagonal matrix, we have This shows that ( J ′ , Q ′ , B ′ ) ∈ S (b) ( E) and thus the latter set is indeed non-empty.We conclude that From the definition of S (b) ( E), we conclude that ( E, J, Q, B) ∈ S (b) ∩ V ′ 1 , and the triangle inequality yields , and therefore relative generic in V ′ 1 .
(c) Analogously to the proof of Lemma 3.3, a simple application of the Leibniz formula for the determinant yields with Lemma 3.2 that the implication holds true for all E ∈ K ℓ×n and B ∈ K ℓ×m .Thus, we have S (a) ⊆ S (c) .Since we have proven that S (a) is relative generic in V ′ 1 , we conclude from Proposition 2.10 (b) that S (c) is relative generic in V ′ 1 .
(d) Since rk E = n yields ker E = {0}, the inclusion holds true.Since S (a) is relative generic in V ′ 1 by (a) of the present proposition, we conclude from Lemma 3.7 (ii) and Proposition 2.10 (c) that the intersection The proof of (e)-(h) is analogous to the proof of (a)-(d): While the proof of (a), (c) and (d) does not depend on J, their counterparts (e), (g) and (h) follow analogously.To prove (f), we can simply add a summand R ∈ K ℓ×ℓ R = R * to the real vector space V (b) ( E) in the proof of (b) and proceed analogously.
(i) We proceed with the proof of (i) in steps (i 1 )-(i 5 ). Step Therefore, the fundamental theorem of algebra yields that there is some λ ∈ C so that det[λE − JQ, B] = 0.This shows that S (a) ⊆ S c Step (i 2 ): Let ℓ = n + m and ℓ ≥ n.We construct an algebraic set V so that V ′ 1 \ S (i) ⊆ V.This construction is analogous to the construction in the proof of [18,Proposition B.8], where a similiar result for matrices without structural constraints is shown.Let M 1 , . . ., M q , q ∈ N be all minors of order d := min {ℓ, n + m} w.r.t.K[x] ℓ×(n+m) and put, for all i ∈ N * ≤q and P ∈ Gl(K ℓ ), Since the rank of a matrix is invariant under regular transformations from the left and from the right, we have by Lemma 3.2 (E, J, Q, B) ∈ S (i) if, and only if, Define the maximal degree of M P i as In passing, note that the maximal degree γ P i is attained at (E, J, Q, B) if, and only if Since (E, 0, 0, B) ∈ V ′ 1 for all E ∈ K ℓ×n and B ∈ K ℓ×m , By Lemma 3.3, there are polynomials The M P i,k , k ∈ 0, . . ., γ P i , which are multivariate polynomials in the entries of E, J, Q, B, are the coefficients of M P i in the monomial basis of the univariate polynomials.Using these representations, define, for all i, j ∈ N * ≤q and P ∈ Gl(K ℓ ), the polynomials If M P i,γ i (E, J, Q, B) = 0 and M P j,γ j (E, J, Q, B) = 0, then p P i,j (E, J, Q, B) is the Sylvester resultant (see Lemma 3.4) of the polynomials M i (E, J, Q, B) and M j (E, J, Q, B).Invoking Lemma 3.4 and Laplace's expansion formula [12, p. 203], we have, for all E = (E, J, Q, B) ∈ K ℓ×n × K ℓ×ℓ × K ℓ×n × K ℓ×m , the equivalence Thus, Lemma 3.2 yields that the following chain of implications holds true for all (E, J, Q, B) ∈ ] be the ideal generated by the set Since multivariable polynomials are a commutative ring, the ideal I has the form as the algebraic set generated by the ideal I, see Lemma 2.6.Due to our chain of implications after (3.11), we have Step (i 3 ): We show that the set The arguments used are similiar to those in the proof of [18,Proposition B.8]. However [18,Proposition B.8] deals with the unrestrained case; a more involved proof has to obey the reference set Consider the set Assume, for a moment, that we had already proven that the set

By definition of
The latter is convex and hence it remains, in view of Lemma 2.13, to show that S (i) ( E) is non-empty.As in the proof of [18,Proposition B.8], we distinguish between the two cases ℓ < n + m and ℓ > n + m; the case ℓ = n + m was dealt with in Step (i 1 ).
Without loss of generality we may assume that the M i are ordered in such a manner that M 1 = P (x) → det[P (x) i,j ] i,j∈N * ≤ℓ , i.e. σ and π in Definition 3.1 are the respective identity functions, and ≤ℓ , i.e. π in Definition 3.1 is the increment by one and σ the identity function.Then, our choice of J 0 , Q(β) and B(δ, ξ) yields δ j + lower order terms.
Step (i 5 ): Let ℓ > n + m.We show that S (i) ( E) is non-empty.Analogously to Step (i 4 ), we use the decomposition for some T ∈ Gl(R ℓ ).Define, additionally to the matrices J 0 and Q(β) defined in Step (i 4 ), the matrix Analogously to the case ℓ < n + m in Step (i 4 ), we can, without loss of generality, assume that the minors M i are ordered in such a manner that .
Since E has n columns, it is easy to see that the maximal degree of any minor of [xP E −P JQ, B] of order d does not exceed n.Hence we have Further, we have This shows that p P 1,2 ( E, J 0 , Q(1), B ′ 0 ) = 0 and therefore (J 0 , Q(1), B ′ 0 ) ∈ S (i) ( E).This shows that the latter set is indeed non-empty.As discussed earlier, this shows that V c is indeed Euclidean dense in V ′ 1 .
(j) The proof of (j) is analogous to the proof of (i): We can construct an algebraic set V of the same type as in (i).It is just necessary to redefine the M P i as to incorporate the R. Then we show that for given E ∈ K ℓ×n with full rank the set of all matrices (J, R, Q, B) with (E, J, R, Q, B) ∈ V c has non-empty intersection with the convex set This can be directly concluded from the proof in Step (i 3 ) since each matrix triple (J, Q, B) ∈ S(E) yields a feasible matrix quadruple (J, 0, Q, B) for the proof of this step.This completes the proof of (a)-(j) for the case ℓ ≥ n.
In view of Lemma 3.9, the set (i) Analogously to the case ℓ ≥ n, we construct the polynomials p i,j associated to all minors M 1 , . . ., M q , q ∈ N * , of order ℓ w.r.t.R[x] ℓ×(n+m) and their induced functions We omit the details of this construction.The ideal I generated by the polynomials p P,T i,j defined as in (3.10) generates the algebraic set As discussed in detail in the proof of (i) in the case ℓ ≥ n, it suffices to show that Furthermore, an application of Lemma 3.9 analogously to Lemma 3.7 (ii) in the case ℓ ≥ n yields that it suffices to consider the case rk E = ℓ.Since V is an algebraic set, S(E) is Zariski-open.Since V (E) is a non-empty convex set, it suffices therefore in view of Lemma 2.13 to prove that S(E) ∩ V (E) = ∅.There are P ∈ Gl(K ℓ ) and T ∈ Gl(K n ) so that Since T is regular, we conclude from that E * Q 1 is Hermitian and positive semi-definite.Choose further the skew-symmetric matrix and with e ℓ = [0, . . ., 0, 1] ⊤ , With these particular matrices, we get .
Without loss of generality we can assume that the M i are ordered in such a manner that Then, it is easy to verify that M We can, analogously to the case ℓ ≥ n, conclude from (3.11) that p P,T 1,2 (E, J 1 , Q 1 , B) = 0. Thus, we have (J 1 , Q 1 , B) ∈ S(E)∩V (E) and therefore the latter is non-empty.We conclude that S(E) is relative generic in V (E).Therefore, we conclude that V c is indeed Euclidean dense in Σ H ℓ,n,m .
(j) As in the case ℓ ≥ n, we can modify the proof of (i) to incorporate the additional matrix R and readily conclude that S (j) is relative generic in Σ sdH ℓ,n,m .This completes the proof of the proposition.

Relative genericity of controllability
We are now in the position to derive necessary and sufficient conditions on the dimensions ℓ, n, m of linear finite-dimensional port-Hamiltonian descriptor systems described by (1.1)  Proof.The corollary is a direct consequence of the conjunction of [18, Thm.2.3] and Theorem 4.1.

Relative genericity of stabilizability
In this section we study -similar to relative generic controllability in Section 4 -relative generic stabilizability.Recall that there are three different concepts of stabilizability -see Proposition 2.2.We derive necessary and sufficient conditions on the dimensions ℓ, n, m of linear finitedimensional port-Hamiltonian descriptor systems described by (1.1)This yields  Proof.The corollary is a direct consequence of the conjunction of [18,Thm. 3.3] and Theorem 5.1.

Conclusion and outlook
We have studied relative genericity of controllability and stabilizability for port-Hamiltonian systems and derived necessary and sufficient conditions for relative genericity of five controllability and three stabilizability concepts.This extends the result of [23,Theorem II.1] to descriptor systems with arbitrary dimensions and nontrivial dissipation matrix.For square port-Hamiltonian systems, that is, ℓ = n, the matrix E in (1.1) is generically invertible.In this case, Theorem 4.1 is very closely related to [23,Theorem II.1], although with the addition of a possibly (generically) nonzero R. In future work, we will put particular care on the rank of E and consider the reference sets When ℓ = n and r < n, this excludes especially the case that the considered systems can be (generically) reduced to an ODE system.We are confident that we can extend [19, Theorems 3.2 and 4.2], where unstructured DAEs with the same restriction on the rank of E are considered, to these reference sets for port-Hamiltonian descriptor systems.
Consider the set S (a) ( E) := B ∈ K ℓ×m rk [ E, B] = min {ℓ, n + m} .By Lemma 3.3, S (a) ( E) is Zariski-open.Furthermore, in view of the basis completion lemma and since rk E = n, it can be readily seen that S (a) ( E) = ∅.Thus Lemma 2.7 yields that S (a) ( E) is generic.Especially, we conclude that there is some B ∈ K ℓ×m so that rk [ E, B] = min {ℓ, n + m} and B − B ℓ,m

Proof.
We distinguish the two cases ℓ = n + m and ℓ = n + m.Case ℓ = n + m: In view of Proposition 2.2, the inclusionsS (a) ∩ S (b) ∩ S (i) ⊆ S H completely stabilizable , ℓ < n + m, (S H completely stabilizable ) c , ℓ > n + m,andS (b) ∩ S (d) ∩ S (i) ⊆ S H strongly stabilizable , ℓ < n + m, (S H strongly stabilizable ) c , ℓ > n + m,andS (c) ∩ S (i) ⊆ S Hbehavioural stabilizable hold true.Therefore, Proposition 3.11 and Proposition 2.10 (b) and (c) yields the assertion for ℓ = n + m.Case ℓ = n + m: We show that the set S H := (E, J, Q, B) ∈ Σ H ℓ,n,m ∃λ ∈ int C + : rk [λE − JQ, B] < ℓ = min {ℓ, n + m} contains a inner point w.r.t. the Euclidean relative topology on Σ H ℓ,n,m .Then, we can show that the complement of S Hcontrollable has a relative inner point and is therefore especially not nowhere dense.In passing we note that ℓ = n + m ≥ 2. Since the spectrum of a matrix depends continuously from its entries, S H is open and thus it suffices to show that S H = ∅.Put Then E * Q = 0 n×n ∈ R n×n is symmetric and positive semi-definite.Furthermore,
[8,lidean topological sense, but its complement is generic in the Lebesgue measure theoretical sense.Since the Lebesgue measure is nontrivial, we see that our set is not generic in the Lebesgue measure theoretical sense.Conversely, by the Baire category theorem[8, Theorem  10.1] ]. Let n ∈ N * .As set S ⊆ R n is generic if, and only if, it contains a non-empty Zariski-open set O ⊆ R n .
Definition 2.8 ( [23, Def.I.2] and [19, Def.1.2]).Let n ∈ N * and S, V ⊆ R n .S is relative generic in V if, and only if, there is some algebraic set V ⊆ R n so that Proof." =⇒ ": Let S be relative generic in V .In view of Lemma 2.9, there is some relative Zariski-open, relative Euclidean dense set O ⊆ V so that O ⊆ S ∩ V .By definition of the relative Zariski-topology, there is some Zariski open set O ⊆ R n so that O = O ∩ V .Hence, the inclusion O ∩ V ⊆ S ∩ V holds true.Since V is non-empty and O is an Euclidean dense subset of V , O is non-empty.This yields O = ∅.
Lemma 2.13.Let n ∈ N * and V ⊆ R n be convex and non-empty.Then S ⊆ R n is relative generic in V if, and only if, there is some Zariski open set O so that O ∩V = ∅ and O ∩V ⊆ S ∩V ." ⇐= ": Let O ⊆ R be a Zariski-open set so that therefore an inner point of O c .Since O is Zariskiopen, O c is an algebraic set and since O is non-empty, O c is, in view of [11, p. 240], a Lebesgue nullset.Since every nontrivial open ball has nonzero Lebesgue measure, O c must have empty interior -a contradiction to the existence of a relative inner point of O c ∩ V .This shows that S is indeed relative generic in V .
Lemma 3.3.Let d, g ∈ N 0 and ℓ, n ∈ N * with d ≤ min {ℓ, n}.Let M be a minor of order d w.r.t.K[x] ℓ×n and consider the induced function j∈N * ≤d is called minor of order d w.r.t.R ℓ×n .The minor of order 0 w.r.t.R ℓ×n is the constant function A → 1. ⋄ Recall the correspondence between lower bounds of the rank of matrices and minors.Lemma 3.2 (see [12, Section 3.3.6]).Let d ∈ N 0 and ℓ, n ∈ N * with d ≤ min {ℓ, n} and either R = K or R = K[x].A matrix A ∈ R ℓ×n has rank at least d if, and only if, there is some minor of order d w.r.t.R ℓ×n that does not vanish at A.Motivated by the algebraic characterizations of controllability and stabilizability in Proposition 2.1 and 2.2, we make use of Lemma 3.2 to construct algebraic sets defined by the rank of certain polynomial matrices.This is possible since determinants and thus minors are in particular polynomials.
so that they are relative generically controllable (with respect to the five concepts defined in Proposition 2.1) , where controllable stands for either one of the studied controllability notions.The above remains true, if we consider S sdH controllable with reference set Σ sdH ℓ,n,m or S dH controllable with reference set Σ dH ℓ,n,m .Hence, Proposition 2.10 (c), and (ii) and (iii) of the present proposition imply the proposed equivalence for relative genericity of S strongly controllable .The assertion for the reference set Σ sdH ℓ,n,m can be analogously proven by replacing S (a) , S (b) , S (c) , S (d) and S (i) by S (e) , S (f ) , S (g) , S (h) and S (j) , respectively.Finally, in view of Lemma 3.5 and Proposition 2.10 (d), Σ dH ℓ,n,m is a relative generic subset of Σ sdH ℓ,n,m .Therefore, Proposition 2.10 (e) yields the assertion for the reference set Σ dH ℓ,n,m .This shows the proposition.We finally observe that generic controllability holds for port-Hamiltonian descriptor systems if, and only if, relative generic controllability holds for unconstrained differential-algebraic systems.This is made precise in the following corollary.Corollary 4.2.Let r, ℓ, n, m ∈ N * .Then the port-Hamiltonian descriptor systems (1.1) are generically controllable if, and only if, the unconstrained descriptor systems (1.3) are relative generically controllable in Σ H ℓ,n,m , where controllable stands for either of the five controllability concepts defined in Proposition 2.1.
Proof.In this proof, we will use the notions introduced in Proposition 3.11.(i)ByProposition3.11 and Proposition 2.10 (c), the setS (a) ∩ S (b) is relative generic in Σ H ℓ,n,m .c,ℓ > n + m.S(c) ∩ S (i) ⊆ S H behavioural controllable holds true.Thus, Proposition 2.10 (b) yields that S H behavioural controllable is relative generic in Σ H ℓ,n,m if, and only if, ℓ = n + m; otherwise its complement is relative generic in Σ H ℓ,n,m .
so that they are relative generically stabilizable in the reference sets Σ H ℓ,n,m , Σ sdH ℓ,n,m , and Σ dH ℓ,n,m .Theorem 5.1.Let ℓ, n, m ∈ N * .Then the following equivalences hold: The above remains true, if we consider S sdH stabilizable with reference set Σ sdH ℓ,n,m .Moreover, if ℓ > n + m, then (S * completely stabilizable ) c and (S * strongly stabilizable ) c are relative generic in Σ * ℓ,n,m , where * stands for either H or dH.
∩ S H ⊆ (S H strongly stabilizable ) c S (c) ∩ S H ⊆ (S H behavioural stabilizable ) c hold true.Hence, the sets on the righthandside contain an inner point and are especially not nowhere dense.By Proposition 2.10 (a), we conclude that neither of the sets S H completely stabilizable , S H strongly stabilizable and S H behavioural stabilizable are relative generic in Σ H ℓ,n,m .The respective statement for Σ sdH ℓ,n,m can be proven similiarly by considering S sdH := (E, J, Q, B) ∈ Σ sdH ℓ,n,m ∃λ ∈ C + : rk [λE − JQ, B] < min {ℓ, n + m} .Since Σ dH ℓ,n,m is a relative generic subset of Σ sdH ℓ,n,m , Proposition 2.10 (e) yields the assertion for the reference set Σ dH ℓ,n,m .This completes the proof of the theorem.Finally we observe -as for controllability in Corollary 4.2 -that port-Hamiltonian descriptor systems (1.1) are generically stabilizable if, and only if, the unconstrained systems (1.3) are relative generically stabilizable in Σ H ℓ,n,m .Corollary 5.2.Let ℓ, n, m ∈ N * .Then the port-Hamiltonian descriptor systems (1.1) are generically stablizable if, and only if, the unconstrained descriptor systems (1.3) are relative generically stablizable in Σ H ℓ,n,m , where stablizable stands for either of the three concepts in Proposition 2.2.