Automated Generation of Explicit Port-Hamiltonian Models from Multi-Bond Graphs

Port-Hamiltonian system theory is a well-known framework for the control of complex physical systems. The majority of port-Hamiltonian control design methods base on an explicit input-state-output port-Hamiltonian model for the system under considera…

Authors: Martin Pfeifer, Sven Caspart, Silja Pfeiffer

Automated Generation of Explicit P ort-Hamiltonian Mo dels from Multi-Bond Graphs ? Martin Pfeifer a , ?? , Sv en Caspart b , Silja Pfeiffer a , Charles Muller a , Stefan Krebs a , Sören Hohmann a , a Institute of Contr ol Systems (IRS), Karlsruhe Institute of T e chnolo gy (KIT), Kaiserstr. 12, 76131 Karlsruhe, Germany b Institute of Algebr a and Ge ometry (IA G), Karlsruhe Institute of T e chnolo gy (KIT), Kaiserstr. 12, 76131 Karlsruhe, Germany Abstract P ort-Hamiltonian system theory is a w ell-known framework for the control of complex physical systems. The ma jority of p ort-Hamiltonian control design metho ds base on an explicit input-state-output port-Hamiltonian mo del for the system under consideration. How ever in the literature, little effort has been made to wards a systematic, automatable deriv ation of suc h explicit models. In this pap er, w e presen t a constructive, formally rigorous metho d for an explicit p ort-Hamiltonian formulation of m ulti-b ond graphs. T w o conditions, one necessary and one sufficient, for the existence of an explicit port-Hamiltonian form ulation of a m ulti-b ond graph are given. W e summarise our approach in a fully automated algorithm of which w e provide an exemplary implementation along with this publication. The theoretical and practical results are illustrated through an academic example. Key wor ds: P ort-Hamiltonian systems; b ond graphs; automated mo delling; state-space mo dels; mo del generation. 1 In tro duction Motiv ation: The theory of p ort-Hamiltonian sys- tems (PHSs) is a well-kno wn framework for con- troller and observ er design in complex physic al sys- tems. PHS hav e first b een introduced for real-v alued, con tinuous-time nonlinear systems with lump ed pa- rameters. Amongst others, pioneering works are [1,2,3]. Mean while, the p ort-Hamiltonian framew ork has b een extended to complex-v alued systems [4], discrete-time systems [5], and distributed-parameter systems [6,7,8,9]. P ort-Hamiltonian metho ds feature a high degree of mo dularit y and physical insight [10,11] and ha ve signif- ican t p otential for automated control design [12]. P ort- ? This pap er was not presented at any conference. ?? Corresp onding author is M. Pfeifer. T el. +49 (0)721 608 43236. F ax +49 (0)721 608 42707. Email addr esses: martin.pfeifer@kit.edu (Martin Pfeifer), sven.caspart@kit.edu (Sven Caspart), usdve@student.kit.edu (Silja Pfeiffer), ubese@student.kit.edu (Charles Muller), stefan.krebs@kit.edu (Stefan Krebs), soeren.hohmann@kit.edu (Sören Hohmann). Hamiltonian controller and observer design metho ds are model-based; the ma jorit y of metho ds base on an explicit input-state-output p ort-Hamiltonian mo del for the system under consideration, see e.g. [13,14,15,16,17]. This raises the question how suc h mo dels can b e derived systematically , esp ecially for systems of high complex- it y . How ever, as will b e seen in the next paragraph there exist only few studies in the literature which address this question. In this pap er we present an automatable method for the deriv ation of explicit input-state-output port- Hamiltonian mo dels from m ulti-b ond graphs. As multi- b ond graphs are graphical system descriptions, our metho d allo ws for a comfortable and time-efficien t mo delling of complex physical systems. W e focus on real-v alued, contin uous-time, finite-dimensional PHSs. Related literature: In literature, different graphical system descriptions ha ve been used for deriving p ort- Hamiltonian mo dels of complex physical systems. In [18], v arious complex systems are describ ed as op en di- rected graphs. Based on the graph description, explicit p ort-Hamiltonian mo dels can b e obtained. The authors of [19] prop ose a method for the automated genera- Preprin t submitted to Automatica Septem b er 9, 2019 tion of differential-algebraic p ort-Hamiltonian mo dels from schematics of analog circuits. The metho d is im- plemen ted in a corresp onding Python to ol [20] which allo ws for an automated equation generation. Besides directed graphs and sc hematics, b ond graphs are a natural starting point for the deriv ation of ex- plicit PHSs as b oth – b ond graphs and PHSs – share an energy- and p ort-based mo delling philosoph y . Ref. [21] w as the first to systematically derive a state-sp ac e for- m ulation of single-b ond graphs. The metho d is based on a mathematical represen tation of the b ond-graph referred to as field r epr esentation (cf. [22, p. 220]). The form ulation of a single-b ond graph as a PHS w as first in vestigated in [23]. The authors show that eac h well- p osed b ond graph p ermits an implicit p ort-Hamiltonian form ulation. Such an implicit PHS aims at a use in nu- merical simulations. F or the design of control metho ds, ho wev er, an explicit PHS is required. The transfer from an implicit to an explicit p ort-Hamiltonian representa- tion is non-trivial. In particular, as we will show later, the existence of an explicit p ort-Hamiltonian formula- tion of a b ond graph is not guaranteed, even if the b ond graph is w ell-p osed. The author of [24] addresses the formulation of a single- b ond graph as differen tial-algebraic PHS. It has b een sho wn that suc h a differential-algebraic PHS can pos- sibly b e transferred into an explicit input-state-output PHS [24]. Concerning this transfer, there exists a suf- ficient condition whic h, how ever, is restrictive as it demands some block matrices of the underlying Dirac structure to b e zero. A ne c essary condition for the existence of an explicit port-Hamiltonian form ulation of a bond graph is missing in the literature. Ref. [25] pro vides a metho d transferring a class of causal single- b ond graphs to an explicit input-state-output PHS. The approac h is restricted to non-feedthrough systems. As in [21], the starting p oint of [25] is a b ond graph field represen tation. In the field representation, the authors assume some of the blo ck matrices to b e constant or zero. The author of [26] prop oses a concept for formu- lating single-bond graphs as simulation mo dels with p ort-Hamiltonian dynamics. How ever, the mo dels are not formulated as input-state-output PHSs which ham- p ers their application to control design. As can b e seen from the ab ov e, the automated ex- plicit p ort-Hamiltonian formulation of b ond graphs has only b een treated for sp ecial cases in literature so far. Ref. [24] and [25] address this topic but are restricted to particular classes of single-b ond graphs. Moreo ver, the literature lac ks ne c essary conditions for the exis- tence of an explicit p ort-Hamiltonian form ulation of b ond graphs. The results of [24] suggest that an au- tomated generation of p ort-Hamiltonian models from b ond graphs is p ossible. How ever, a sp ecific method whic h can be fully automated is missing. Lastly , all noted con tributions on the port-Hamiltonian form ula- tion of b ond graphs fo cus on single -b ond graphs. T o the b est of our knowledge, a generalisation to multi -bond graphs has not b een addressed so far. Con tributions: This pap er addresses the automated generation of explicit input-state-output PHSs from m ulti-b ond graphs. The main theoretical contributions are (i) the deriv ation of an explicit p ort-Hamiltonian form ulation of multi-bond graphs and (ii) the prese n ta- tion of tw o conditions, one necessary and one sufficien t, for the existence of an explicit p ort-Hamiltonian for- m ulation of multi-bond graphs. F urthermore, the main practical con tribution of this pap er is (iii) an algorithm whic h summarises the metho ds from (i) and (ii) in or- der to automatically generate an explicit PHS from a giv en multi-bond graph. F urthermore, w e pro vide an implemen tation of (iii) in the W olfram language (along with this publication). P ap er organisation: In Section 2, we define the prob- lem under consideration. Section 3 summarises the main theoretical result of this pap er which is then in terpreted and discussed. In Section 4, we pro vide the pro of for the main theoretical result from Section 3. Section 5 assem- bles the results from Sections 3 and 4 in an o verall al- gorithm which is the main practical result of this pap er. Sections 6 and 7 pro vide an illustrative example and a conclusion of this pap er, resp ectively . Notation: Let X b e a vector space. F or the dimension of X we write dim X . Let Y b e another v ector space. X ∼ = Y means that X and Y are isomorphic. Let A = ( a ij ) ∈ R n × m b e a matrix with n ro ws and m columns and x ∈ R m b e a (column) v ector. F or a blo c k diagonal matrix of matrices w e write blkdiag( · ) . W e write A  0 and A  0 if A is p ositive definite or p ositive semi-definite, resp ectively . The image of the linear map x 7→ Ax is written as im ( A ) ; for the kernel w e write ker ( A ) . O ( n ) denotes the group of orthogonal matrices. The matrix 0 n × m is an n × m zero matrix; we abbreviate 0 n × n to 0 n . Let 0 p,q n denote an ( p × q ) blo c k matrix of zero matrices 0 n . The n × n identit y matrix is denoted as I n . I p × q n is a ( p × q ) blo ck matrix of iden tity matrices I n . Let M b e a set. | M | denotes the cardinalit y of M . F or eac h i ∈ M , let A i ∈ R n × m i b e a matrix with n rows and m i columns. F or the horizontal concatenation of all A i w e write ( A i ) and app end “for all i ∈ M ”. F urther, for each i ∈ M , supp ose a (column) vector x i ∈ R n . F or the vertic al concatenation of all x i w e write ( x i ) and app end “for all i ∈ M ”. Let G = ( V , B ) b e a directed graph with vertices V and edges B . The set of all adjacent vertices at u ∈ V is denoted as V ( u ) : = { v ∈ V | ( u, v ) or ( v , u ) ∈ B } . Supp ose ˜ B ⊆ B . W e define the set of all incident edges from ˜ B at u ∈ V as ˜ B ( u ) : = { ( u, v ) , ( v , u ) ∈ ˜ B | v ∈ V } . Similarly , ← − ˜ B ( u ) : = { ( v , u ) ∈ ˜ B | v ∈ V } and − → ˜ B ( u ) : = { ( u, v ) ∈ ˜ B | v ∈ V } are the sets of all ingoing and outgoing edges in ˜ B at u ∈ V , resp ectively . 2 2 Problem definition In this pap er, w e consider N -dimensional m ulti- b ond graphs 1 ( N ∈ N ≥ 1 ) in the generalised b ond graph framew ork [11, p. 24] with the following t yp es of elemen ts: storages ( C ), mo dulated resis- tors ( R ), sources of flo w ( Sf ), sources of effort ( Se ), 0-junctions ( 0 ), 1-junctions ( 1 ), mo dulated transform- ers ( TF ) and modulated gyrators ( GY ). Let the set E : = { C , R , Sf , Se , 0 , 1 , TF , GY } collect the different t yp es of elements. In the sequel, we describ e the top ology of a b ond graph b y a directed graph. F or each α ∈ E , let us define a set V α with n α : = | V α | which contains all elements of t yp e α . W e will denote elemen ts of type C , R , Sf , Se as exterior elements ; elements of type 0 , 1 , TF , GY are referred to as interior elements . The sets of exterior and in terior elements are defined as V E : = V C ∪ V R ∪ V Sf ∪ V Se , (1a) V I : = V 0 ∪ V 1 ∪ V TF ∪ V GY , (1b) with n E : = | V E | and n I : = | V I | , resp ectively . The union V : = ∪ α ∈ E V α = ∪ α ∈{ E , I } V α is the set of all b ond graph elemen ts ( n : = | V | ). The n elements of V are connected b y a set B of m b onds, i.e. m : = | B | . Each b ond j ∈ B carries a flow f j ∈ R N and an effort e j ∈ R N . The directed graph G = ( V , B ) describ es the top ology of the b ond graph. Analogous to the naming of elements, we define sets of exterior and interior b onds B E : = { ( u, v ) , ( v , u ) ∈ B | v ∈ V E , u ∈ V I } , (2a) B I : = { ( u, v ) ∈ B | u, v ∈ V I } , (2b) with m E : = | B E | and m I : = | B I | . The set B E con tains b onds which connect an exterior element to an in terior elemen t; B I con tains b onds which connect tw o in terior elemen ts with each other. W e consider b ond graphs that are non-degenerate, i.e. b ond graphs where G = ( V , B ) is weakly connected, and where each exterior element is connected b y exactly one b ond to one interior element, i.e. for eac h v ∈ V E w e hav e V ( v ) ⊂ V I with | B ( v ) | = 1 and | V ( v ) | = 1 . Moreov er, w e use the b ond orientation rules from standard b ond graph literature [27, p. 59] in which b onds are incom- ing to storages and resistors and outgoing from sources of flo w and effort. Without loss of generalit y , we assume eac h transformer and each gyrator to hav e exactly one incoming and exactly one outgoing b ond in order to en- able an unambiguous definition of transformer and gy- rator ratios. Definition 2.1 The junction structure of a b ond gr aph is define d as the sub-gr aph G I ⊂ G with G I = ( V I , B I ) . 1 In the remainder of this pap er, we use “b ond graph” for “m ulti-b ond graph” and “b ond” for “multi-bond”. F rom the prop erties of a non-degenerate b ond graph, it follo ws that G I is w eakly connected and B = B E ∪ B I . F urthermore, we make the following t wo assumptions. Assumption 2.2 Mo dulation of r esistors, tr ansform- ers and gyr ators c an b e expr esse d only in dep endenc e on states of C -typ e elements and c onstant p ar ameters. Assumption 2.3 The c onstitutive r elations of mo du- late d r esistors ar e line ar with r esp e ct to the r esp e ctive p ower-p ort variables and in Onsager form [27, p. 364]. In [27, p. 159], it is sho wn that b ond graphs violating Assumption 2.2 c annot in general b e formulated in an explicit form. Likewise, Assumption 2.3 is a well-kno wn requiremen t for formulating an explicit PHS [28, p. 53]. Next, we define the mathematical representation of in- terest in this pap er. Definition 2.4 A n explicit input-state-output p ort- Hamiltonian system (PHS) (with fe e dthr ough) is define d as dynamic system of the form ˙ x = [ J ( x ) − R ( x )] ∂ H ∂ x ( x ) + [ G ( x ) − P ( x )] u , (3a) y = [ G ( x ) + P ( x )] > ∂ H ∂ x ( x ) + [ M ( x ) + S ( x )] u , (3b) wher e x ∈ X , u ∈ R p , and y ∈ R p ar e the state vector , the input vector , and the output vector , r esp e ctively 2 . W e assume the state-sp ac e X to b e a r e al ve ctor sp ac e with dim X = n . The Hamiltonian is a non-ne gative func- tion H : X → R ≥ 0 . The matric es J ( x ) , R ( x ) ∈ R n × n , G ( x ) , P ( x ) ∈ R n × p , M ( x ) , S ( x ) ∈ R p × p satisfy J ( x ) = − J > ( x ) , M ( x ) = − M > ( x ) , and Q ( x ) : = R ( x ) P ( x ) P > ( x ) S ( x ) ! = Q > ( x )  0 , ∀ x ∈ X . (4) With the following prop ert y , w e exclude causally implau- sible p ort-Hamiltonian formulations of b ond graphs. T o this end, we require the flows of Sf elements and the ef- forts of Se elements to act as inputs in the PHS. Cor- resp ondingly , the resp ectiv e conjugated v ariables must act as output of the PHS. Prop ert y 2.5 L et B α = ∪ i ∈ V α B ( i ) for α ∈ { Sf , Se } . In (3) , u c onsists of ( f j ) , ( e k ) while the y c onsists of ( e j ) , ( f k ) for al l j ∈ B Sf , k ∈ B Se . This pap er will show a solution to the follo wing problem: Problem 2.6 Consider an N -dimensional b ond gr aph that satisfies Assumptions 2.2 and 2.3. What is a c on- 2 Throughout this paper we omit the time-dependence “ ( t ) ” of vectors in the notation. 3 structive and automatable metho d that formulates the b ond gr aph as a PHS (3) with Pr op erty 2.5. 3 Main theoretical result In this section, w e presen t and discuss the main theoret- ical result of this pap er. This main result is summarised in Theorem 3.1 which contains a structured metho d to form ulate an N -dimensional b ond graph as an explicit PHS with Prop ert y 2.5. The theorem is organised in four parts: In (i), the junction structure of the b ond graph is described by a Dirac structure in implicit representa- tion 3 . Afterwards, in (ii) the Dirac structure is trans- ferred from an implicit to an explicit represen tation. The inputs and outputs in the explicit represen tation are c hosen under consideration of Prop erty 2.5. In (iii), the explicit representation of the Dirac structure is merged with the constitutive relations of storages and resistors whic h leads to an explicit p ort-Hamiltonian form ulation of the b ond graph. Finally , part (iv) provides t wo condi- tions, one necessary and one sufficient, for the existence of such an explicit formulation. A discussion of Theo- rem 3.1 concludes this section. Preliminaries on Dirac structures are giv en in App endix A. Theorem 3.1 (i) Given an N -dimensional b ond gr aph that satisfies Assumption 2.2, the junction structur e of the b ond gr aph c an b e describ e d by a Dir ac structur e in implicit form: D = { (        f C f R f Sf f Se        ,        e C e R e Sf e Se        ) ∈ R N m E × R N m E |        F > C ( x ) F > R ( x ) F > Sf ( x ) F > Se ( x )        > | {z } =: F ( x )        − f C − f R f Sf f Se        +        E > C ( x ) E > R ( x ) E > Sf ( x ) E > Se ( x )        > | {z } =: E ( x )        e C e R e Sf e Se        = 0 } . (5) wher e f α = ( f i ) ∈ R N n α , e α = ( e i ) ∈ R N n α for al l i ∈ V α and F α ( x ) , E α ( x ) ∈ R N n E × N n α with α ∈ { C , R , Sf , Se } . 4 (ii) L et the matric es in (5) fulfil l rank ( F C ( x ) E Sf ( x ) F Se ( x )) = N ( n C + n Sf + n Se ) , (6) 3 cf. Remark A.7. 4 The negative sign of f C and f R in (5) stems from the fact that b onds are inc oming to storages and resistors. for al l x ∈ X . Then, (5) c an b e formulate d in an explicit r epr esentation D = { (        f C f R f Sf f Se        ,        e C e R e Sf e Se        ) ∈ R N n E × R N n E |     y C y R y P     =     Z CC ( x ) − Z CR ( x ) − Z CP ( x ) Z > CR ( x ) Z RR ( x ) − Z RP ( x ) Z > CP ( x ) Z > RP ( x ) Z PP ( x )     | {z } Z ( x )     u C u R u P     } , (7) wher e Z ( x ) = − Z > ( x ) for al l x ∈ X with Z ( x ) = ( F C ( x ) F R , 1 ( x ) E R , 2 ( x ) E Sf ( x ) F Se ( x )) − 1 · ( E C ( x ) E R , 1 ( x ) F R , 2 ( x ) F Sf ( x ) E Se ( x )) (8a) and u C = e C , u R = e R , 1 − f R , 2 ! , u P = f Sf e Se ! , (8b) y C = − f C , y R = − f R , 1 e R , 2 ! , y P = e Sf f Se ! . (8c) In (8a) , ( F R , 1 ( x ) F R , 2 ( x )) is a splitting of F R ( x ) (p ossibly after some p ermutations) such that (a) ( F C ( x ) F R , 1 ( x ) E Sf ( x ) F Se ( x )) has ful l c olumn r ank and (b) rank ( F C ( x ) F R , 1 ( x ) E Sf ( x ) F Se ( x )) is e qual to rank ( F C ( x ) F R ( x ) E Sf ( x ) F Se ( x )) for al l x ∈ X . Such a splitting of F R ( x ) always exists. A c- c or ding to the splitting of F R ( x ) , we split E R ( x ) into ( E R , 1 ( x ) E R , 2 ( x )) and the ve ctors f R and e R (se e u R and y R in (8b) and (8c) , r esp e ctively). (iii) F or the b ond gr aph, supp ose C -typ e elements sub- je ct to nonline ar c onstitutive r elations of the form [27, pp. 357–358] y C = − f C = − ˙ x , u C = e C = ∂ H ∂ x ( x ) . (9) with ener gy state x ∈ X , dim( X ) = N n C , and ener gy stor age function H : X → R ≥ 0 , x 7→ H ( x ) . F urther, let Assumption 2.3 hold, which enables us to write the c onstitutive r elations of the R -typ e elements as f R = D ( x ) e R (10) wher e D ( x ) = D ( x ) >  0 . Assume that (10) c an b e 4 written in input-output form u R = − ˜ R ( x ) y R (11) with ˜ R ( x ) = ˜ R ( x ) >  0 . The b ond gr aph c an then b e formulate d as explicit input-state-output PHS of the form (3) with state x and Hamiltonian H ( x ) fr om (9) . Mor e over, the inputs and outputs of the PHS ar e given by u = u P , y = y P fr om (8b) and (8c) , r esp e ctively. Thus, the PHS has Pr op erty 2.5. The matric es of (3) ar e c alculate d as: J ( x ) = − Z CC ( x ) − 1 2 Z CR ( x ) A ( x ) Z > CR ( x ) , (12a) R ( x ) = 1 2 Z CR ( x ) B ( x ) Z > CR ( x ) , (12b) G ( x ) = Z CP ( x ) + 1 2 Z CR ( x ) A ( x ) Z RP ( x ) , (12c) P ( x ) = − 1 2 Z CR ( x ) B ( x ) Z RP ( x ) , (12d) M ( x ) = Z PP ( x ) + 1 2 Z > RP ( x ) A ( x ) Z RP ( x ) , (12e) S ( x ) = 1 2 Z > RP ( x ) B ( x ) Z RP ( x ) , (12f ) wher e A ( x ) = ˜ K ( x ) ˜ R ( x ) − ˜ R ( x ) ˜ K > ( x ) , (12g) B ( x ) = ˜ K ( x ) ˜ R ( x ) + ˜ R ( x ) ˜ K > ( x ) , (12h) ˜ K ( x ) = ( I + ˜ R ( x ) Z RR ( x )) − 1 . (12i) (iv) Equations (6) and (11) to gether form a sufficien t c ondition for the existenc e of an explicit formulation (3) of a b ond gr aph. Mor e over, (6) implies rank ( E Sf ( x ) F Se ( x )) = N ( n Sf + n Se ) , ∀ x ∈ X . (13) which is (under Pr op erty 2.5) a necessary c ondition for the existenc e of such a formulation. Theorem 3.1 gives a structured metho d to formulate a b ond graph as PHS (3) with Prop erty 2.5. The matri- ces of the PHS can b e calculated with the equations in (12). These equations reveal that the matrices of the PHS are indep endent of the storage function of the C - t yp e elements in (9). Conv ersely in (9), the state v ector and the Hamiltonian of the PHS are solely dep endent on v ariables and parameters of C -type elements. Hence, the separation of energy-storage elements and energy- routing elements of the b ond graph directly translates in to the explicit PHS. By (5), (7), and (12), we see that state-mo dulated transformers and gyrators yield an explicit PHS with state-dep endent matrices. Simi- larly , state-mo dulated R -t yp e elemen ts generally results in a state-dependent PHS matrices. I f all bond graph elemen ts of type TF , GY , and R are unmo dulate d , the matrices of the explicit p ort-Hamiltonian formulation in (12) are constant. If, in addition, the storages ob ey quadratic storage functions, the resulting PHS is lin- ear. In conclusion, the ma jor prop erties of a b ond graph translate into the explicit p ort-Hamiltonian formulation. Th us, (3) may b e seen as a natural explicit state-space represen tation of b ond graphs. Remark 3.2 In L emma 4.15 we wil l show that the matrix ˜ K ( x ) in (12i) always exists. This matrix (or r e- late d expr essions) has app e ar e d in pr evious public ations addr essing the derivation of state-sp ac e formulations of b ond gr aphs, e.g. [21, e q. (7)], [22, e q. (29)], [25, e q. (14)], and [24, R emark 2]. However, to the b est of the authors’ know le dge, the existenc e of ˜ K has not b e en dis- cusse d so far. Equation (13) is a necessary condition for the existence of an input-state-output model that has Prop erty 2.5. This condition is plausible as it prev ents the bond graph from having dep endent sour c es [27] which are physically implausible [29, p. 169]. Remark 3.3 Equation (13) is also ne c essary if we aim at an implicit p ort-Hamiltonian formulation of a b ond gr aph [23] which has Pr op erty 2.5. This is plausible as (13) is ne c essary for a b ond gr aph to b e well-posed in the sense of [23, Def. 2]. T ogether, (6) and (11) form a sufficien t condition for the existence of an explicit p ort-Hamiltonian formulation of a b ond graph. Equation (6) is more stringent than (13) as it, in addition to dep endent sources, preven ts the b ond graph from ha ving (i) dependent storages [27, p. 107] and (ii) storages that are directly determined b y source elemen ts. F rom b ond graph theory , it is kno wn that (i) and (ii) o ccur from ph ysically implausible structures in the b ond graph. Moreov er, different strategies exist to resolv e such implausible structures in the bond graph [27]. Thus, (6) is not very restrictive. Equation (11) as- sumes the resistive structure to b e in an input-output form which is a well-kno wn requirement for the deriv a- tion of explicit input-state-output PHSs [28, p. 53]. F or man y bond graphs, (11) is satisfied by design. In par- ticular, for single-b ond graphs ( N = 1 ) equation (11) is alw ays fulfilled. Remark 3.4 The or em 3.1 is indep endent of the p artic- ular form of the skew-symmetric matrix Z RR ( x ) in (7) . This is r emarkable as dep endent r esistors (i.e. Z RR ( x ) 6 = 0 ) ar e gener al ly known to le ad to mo dels in the form of differ ential-algebr aic e quations [27, p. 134], [29, p. 187]. 4 Pro of of Theorem 3.1 In this section, we present a constructive pro of of The- orem 3.1. As the theorem, the pro of is sub divided in to four parts. Each of the following Sections 4.1 to 4.4 is dedicated to the corresp onding part (i) to (iv) of Theo- rem 3.1. 4.1 Description of interior elements as Dir ac structur es In this section, w e show that the junction structure of the b ond graph can alwa ys b e describ ed b y a Dirac struc- 5 ture of the form (5). The approach is as follows: First, w e show that the constitutive relations of the set of in- terior elements of a b ond graph can b e describ ed as a set of Dirac structures for whic h we pro vide sp ecific ma- trix representations. Secondly , we presen t an approach to comp ose the set of Dirac structures to one single Dirac structure. Preliminaries on Dirac structures are given in App endix A. Before we form ulate sp ecific Dirac structures for the in- terior elemen ts, we give t wo preliminary statements. Lemma 4.1 Supp ose a mo dulate d Dir ac structur e (A.2) and let T ( x ) ∈ O ( n ) b e a family of ortho gonal matric es p ar ametrise d over x ∈ X . Then ˜ D ( x ) = { ( ˜ f , ˜ e ) ∈ R n × R n | ˜ F ( x ) ˜ f + ˜ E ( x ) ˜ e = 0 } (14) with ˜ F ( x ) = F ( x ) T ( x ) > , ˜ E ( x )= E ( x ) T ( x ) > is a mo d- ulate d Dir ac structur e. PR OOF. Inserting f = T ( x ) > ˜ f and e = T ( x ) > ˜ e in to (A.2) gives (14). Equation (14) is a Dirac structure as it fulfills (A.3): ( i ) ˜ F ( x ) ˜ E > ( x ) + ˜ E ( x ) ˜ F > ( x ) = E ( x ) F > ( x ) + F ( x ) E > ( x ) = 0 , (15a) ( ii ) rank( ˜ F ( x ) ˜ E ( x )) = rank  ( F ( x ) E ( x )) T ( x ) >  = rank( F ( x ) E ( x )) = n. 2 (15b) Corollary 4.2 Given two ve ctor sp ac es D i ( x ) = { ( f i , e i ) ∈ R n × R n | F i ( x ) f i + E i ( x ) e i = 0 } (16) with x ∈ X , i ∈ { 1 , 2 } . If for every x ∈ X ther e exists a T ( x ) ∈ O ( n ) such that ( f 1 , e 1 ) 7→ ( T ( x ) f 1 , T ( x ) e 1 ) is a bije ction b etwe en D 1 ( x ) and D 2 ( x ) , then “ D 1 ( x ) is a Dir ac structur e” is e quivalent to “ D 2 ( x ) is a Dir ac structur e”. PR OOF. The pro of follo ws directly from a tw ofold ap- plication of Lemma 4.1. The following lemma no w provides sp ecific matrix rep- resen tations of Dirac structures describing the constitu- tiv e relations of each in terior element. Lemma 4.3 Given an N -dimensional b ond gr aph which fulfil ls Assumption 2.2. L et us c onsider the set of interior elements V I fr om (1b) with n I = | V I | . The c onstitutive r elations of al l elements of V I c an b e describ e d by a set of Dir ac structur es DS with | DS | = n I . F or e ach element i ∈ V I ther e exists a c orr esp onding Dir ac structur e D i ( x ) ∈ DS with D i ( x ) = { ( ( f j ) ( f k ) ! , ( e j ) ( e k ) ! ) ∈ R N · m ( i ) × R N · m ( i ) | F i ( x ) ( f j ) − ( f k ) ! + E i ( x ) ( e j ) ( e k ) ! = 0 } , (17) for al l j ∈ ← − B ( i ) , k ∈ − → B ( i ) , and m ( i ) : = | B ( i ) | . Dep ending on the typ e of i , the matric es F i ( x ) and E i ( x ) in (17) ar e as fol lows. F or i ∈ V 0 and i ∈ V 1 we have F i = Ψ i , E i = Θ i ; (18a) and F i = Θ i T i , E i = Ψ i T i ; (18b) r esp e ctively, Ψ i = I 1 × m ( i ) N 0 ( m ( i ) − 1) × m ( i ) N ! , (19a) Θ i = 0 N 0 1 × ( m ( i ) − 1) N I ( m ( i ) − 1) × 1 N − I N ( m ( i ) − 1) ! , (19b) and T i = blkdiag  I N ·| ← − B ( i ) | , − I N ·| − → B ( i ) |  . F or i ∈ V TF and i ∈ V GY the matric es ar e given by F i ( x ) = I N U i ( x ) 0 N 0 N ! , E i ( x ) = 0 N 0 N − U > i ( x ) I N ! ; (20a) and F i ( x ) = 0 N V i ( x ) − V > i ( x ) 0 N ! , E i = I N 0 N 0 N I N ! , (20b) wher e U i ( x ) and V i ( x ) ar e squar e matric es of ful l r ank N for al l x ∈ X , which describ e the (multi-dimensional) tr ansformer and gyr ator r atios, r esp e ctively. PR OOF. First, we prov e that each elemen t D i ( x ) ∈ DS describ es the constitutive relations of the corresp ond- ing interior element i ∈ V I . Secondly , we show that the elemen ts D i ( x ) ∈ DS define Dirac structures. F or i ∈ V 0 , we insert the matrices (18a) with (19) in to the equation system of (17) and obtain Kirc hhoff ’s cur- ren t la w which is the relation go verning 0 -junctions. Analogously , for i ∈ V 1 w e obtain Kirchhoff ’s v oltage 6 la w in the form ˜ F i ˜ f i + ˜ E i ˜ e i = 0 with Θ i    ˜ f j   ˜ f k    + Ψ i ( ˜ e j ) − ( ˜ e k ) ! = 0 , (21) for all j ∈ ← − B ( i ) , k ∈ − → B ( i ) . T o bring (21) to the form of the equation system in (17), we p e rform a change of co ordinates f i = T > i ˜ f i , e i = T > i ˜ e i , with matrix T i as ab o ve to obtain (18b). F or i ∈ V TF and i ∈ V GY w e insert (20a) and (20b) into the equation system of (17) and get i ∈ V TF : f j = U i ( x ) f k , e k = U > i ( x ) e j , (22) i ∈ V GY : e j = V i ( x ) f k , e k = V > i ( x ) f j , (23) where j ∈ ← − B ( i ) , k ∈ − → B ( i ) . Equations (22) and (23) are the relations gov erning m ulti-dimensional transformers and gyrators, respectively [27, pp. 358–359]. Inserting the matrices F i ( x ) and E i ( x ) from (18a), (20a), (20b) in to (A.3) shows that these matrices indeed define Dirac structures. Analogously , the matrices from (21) define a Dirac structure. As T i ∈ O ( m ( i )) , by Corollary 4.2 the matrices (18b) then also define a Dirac structure. 2 Lemma 4.3 provides a set DS containing n I Dirac struc- tures. The n I Dirac structures describ e the constitutive equations of the n I in terior elements of the b ond graph b y relating the flows and efforts of the exterior and inte- rior b onds. In the sequel, w e show that it is alwa ys p os- sible to compose the n I Dirac structures to one single Dirac structure (5) which relates the flows and efforts of only the exterior b onds, i.e. without using flows and ef- forts of interior b onds. F or the comp osition, we use the metho ds from [30] and [28, pp. 70ff.]. Consider the sets of exterior and in terior vertices V E , V I and the sets of exterior and interior b onds B E , B I as de- fined in (1) and (2), resp ectively . F rom B = B E ∪ B I it follo ws that for each i ∈ V I w e can reorder (cf. Corol- lary 4.2) the vectors and matrices of D i ∈ DS in (17) suc h that they are sorted b y exterior and interior b onds and not by ingoing and outgoing b onds, thus bringing D i in to the form D i ( x ) = { ( ( f j ) ( f k ) ! , ( e j ) ( e k ) ! ) ∈ R N · m ( i ) × R N · m ( i ) | (( F j ( x )) ( F k ( x ))) ( ε ( j ) f j ) ( ε ( k ) f k ) ! + (( E j ( x )) ( E k ( x ))) ( e j ) ( e k ) ! = 0 } , (24) for all j ∈ B E ( i ) , k ∈ B I ( i ) where ε : B ( i ) → {− 1 , 1 } , b 7→ ε ( b ) is a sign function which is 1 if b ∈ ← − B ( i ) and − 1 if b ∈ − → B ( i ) . F or each i ∈ V I , we define f IC i : = ( ε ( k ) f k ) and e IC i : = ( e k ) for all k ∈ B I ( i ) . 5 F urthermore, w e write f IC : = ( f IC i ) and e IC : = ( e IC i ) for all i ∈ V I . Eac h in terior b ond is incident to two interior elements. Thus, for each k ∈ B I the flow f k app ears exactly twice in f IC : once with a p ositive sign and once with a negative sign. Analogously , for each k ∈ B I the effort e k app ears exactly t wice in e IC , b oth times with a positive sign. Let us equate these v ariables app earing t wice by setting I N m I I N m I 0 N m I 0 N m I ! ( f k ) − ( f k ) ! + + 0 N m I 0 N m I I N m I − I N m I ! ( e k ) ( e k ) ! = 0 (25) for all k ∈ B I . By permutations, we rearrange the entries of the vectors in (25) suc h that they are in the same order as in f IC and e IC . F urthermore, we rename the columns of the resulting matrices according to their affiliation to elemen ts of V I . The equation system is then of the form  F IC i   f IC i  +  E IC i   e IC i  = 0 , ∀ i ∈ V I (26) with the matrices F IC i , E IC i ∈ R 2 N m I × N m I ( i ) . 6 Let us define the v ector space D IC = { ( f IC , e IC ) ∈ R 2 N m I × R 2 N m I | (26) holds } . (27) Prop osition 4.4 D IC in (27) is a Dir ac structur e. PR OOF. The matrices in (25) satisfy (A.3) and can th us b e related to a Dirac structure. By a p erm utation matrix T ∈ O (2 N m I ) we can reorder the entries of the v ectors of (25) to obtain (26). By Corollary 4.2, this pro ves (27) to b e a constan t Dirac structure. 2 F ollowing the terminology of [30], (27) is an inter c on- ne ction Dir ac structur e of the Dirac structures (24). W e no w hav e all the required to ols to comp ose the Dirac structures from (17) into one single Dirac structure. Lemma 4.5 ([30]) Consider n I Dir ac structur es of the form (24) . F urthermor e, c onsider a c orr esp onding in- ter c onne ction Dir ac structur e of the form (27) . Define 5 The “IC” refers to “interconnection”. 6 By 2 m I = P i ∈ V I m I ( i ) , the sizes of the matrices in (25) and (26) are equal. 7 a ful l-r ank matrix Γ > ( x ) ∈ R 2 N m I × N (2 m I + m E ) as a (1 × n I ) blo ck matrix Γ > ( x ) = ( Γ > i ( x )) of matric es Γ > i ( x ) ∈ R 2 N m I × N m ( i ) for al l i ∈ V I with Γ > i ( x ) = F IC i ( E k ( x )) > + E IC i ( F k ( x )) > , ∀ k ∈ B I ( i ) . (28) Cho ose a matrix Λ ( x ) ∈ R N m E × N (2 m I + m E ) such that im( Λ > ( x )) = ker( Γ > ( x )) for al l x ∈ X . Sinc e rank( Γ > ( x )) = 2 N m I for al l x ∈ X , we have dim(k er( Γ > ( x ))) = N m E and such a matrix Λ ( x ) al- ways exists. Matrix Λ ( x ) c an b e written as a (1 × n I ) blo ck matrix ( Λ i ( x )) of matric es Λ i ( x ) ∈ R N m E × N m ( i ) for al l i ∈ V I . Then the c omp osite Dir ac structur e r elates the flows f j and efforts e j of only the exterior b onds j ∈ B E and is of the form (5) : D ( x ) = { (( f j ) , ( e j )) ∈ R N m E × R N m E | ( Λ i ( x ) ( F j ( x ))) | {z } =: F ( x ) ( f j ) + ( Λ i ( x ) ( E j ( x ))) | {z } =: E ( x ) ( e j ) = 0 } , (29) for al l j ∈ B E ( i ) , i ∈ V I . PR OOF. The pro of for the more general case of an y in terconnection Dirac structure can b e found in [30]. 4.2 Explicit r epr esentation of the Dir ac structur e In the previous section, we show ed that it is alwa ys p os- sible to determine a single implicit Dirac structure (5) describing the equations of the junction structure. In this section, w e propose a constructive pro cedure for transferring the Dirac structure from an (implicit) ker- nel represen tation into an (explicit) input-output repre- sen tation. As with the kernel representation, the input- output represen tation of a Dirac structure is not unique. In particular, not all explicit Dirac structures allo w for a subsequent deriv ation of an explicit PHS with Prop- ert y 2.5. The inputs and outputs of an explicit PHS are determined b y the inputs and outputs of the underlying explicit Dirac structure. Th us, based on Property 2.5 w e deduce the follo wing prop ert y . Prop ert y 4.6 L et B α = ∪ i ∈ V α B ( i ) for α ∈ { Sf , Se } . The input ve ctor of the explicit Dir ac structur e has to include ( f j ) , ( e k ) while the output ve ctor has to include ( e j ) , ( f k ) for al l j ∈ B Sf , k ∈ B Se . In the sequel, w e aim at an explicit representation of (5) that has Prop erty 4.6. Necessary and sufficient condi- tions for the existence of such an explicit represen tation will b e provided. Giv en a Dirac structure in kernel represen tation (5). F or the sak e of notation, let us in tro duce F CR ( x ) : = ( F C ( x ) F R ( x )) , (30a) E CR ( x ) : = ( E C ( x ) E R ( x )) , (30b) as w ell as f CR : =  f > C f > R  > and e CR : =  e > C e > R  > . Assumption 4.7 The matric es in (5) fulfil l (13) . Based on Assumption 4.7 w e can no w state the following lemma. Lemma 4.8 Consider the Dir ac structur e (5) . L et As- sumption 4.7 hold. The Dir ac structur e c an b e formulate d in an input-output r epr esentation with Pr op erty 4.6: D = { (     f CR f Sf f Se     ,     e CR e Sf e Se     ) ∈ R N n E × R N n E | y CR y P ! = Z ( x ) u CR u P ! } , (31) wher e Z ( x ) is skew-symmetric for al l x ∈ X and u CR = e CR , 1 − f CR , 2 ! , u P = f Sf e Se ! , (32a) y CR = − f CR , 1 e CR , 2 ! , y P = e Sf f Se ! . (32b) The matrix Z ( x ) exists for al l x ∈ X and is given by: Z ( x ) = ( F CR , 1 ( x ) E CR , 2 ( x ) E Sf ( x ) F Se ( x )) − 1 · ( E CR , 1 ( x ) F CR , 2 ( x ) F Sf ( x ) E Se ( x )) . (33) The matric es in (33) c an b e obtaine d fr om splitting (p os- sibly after some p ermutations) F CR ( x ) by (30a) into ( F CR , 1 ( x ) F CR , 2 ( x )) such that ( i ) ( F CR , 1 ( x ) E Sf ( x ) F Se ( x )) has ful l c olumn r ank ( ii ) rank ( F CR , 1 ( x ) E Sf ( x ) F Se ( x )) = rank ( F CR ( x ) E Sf ( x ) F Se ( x )) (34) for al l x ∈ X . A c c or ding to the manner in which F CR ( x ) is split, we p artition E CR ( x ) fr om (30b) into ( E CR , 1 ( x ) E CR , 2 ( x )) . In the same way, we split f CR and e CR . Remark 4.9 Note that the ab ove lemma is true for any de c omp osition of F CR such that (34) is fulfil le d. However, we cho ose F CR , 1 such that the numb er of c olumns origi- 8 nating fr om F C is as lar ge as p ossible sinc e this is mor e useful for the subse quent derivation of an explicit PHS. PR OOF. Let Assumption 4.7 hold. F or the sake of readabilit y , w e omit the argument x and the supplement “for all x ∈ X ” in this pro of. W e apply the ideas from [31, Theorem 4] to show that we can alwa ys find de- comp ositions ( F CR , 1 , F CR , 2 ) and ( E CR , 1 , E CR , 2 ) of F CR and E CR suc h that rank ( F CR , 1 E CR , 2 E Sf F Se ) = N n E holds. Choose a decomp osition of F CR (p ossibly after some p ermutations) such that the conditions in (34) are fulfilled. Next, split E CR according to the decomp osition c hosen for F CR in to E CR = ( E CR , 1 E CR , 2 ) . By (34), the matrix ( F CR , 1 E Sf F Se ) has full column rank. Thus, its adjoin t ( F CR , 1 E Sf F Se ) > is surjectiv e. In particular we ha ve im  E CR , 1 F Sf E Se  = im   E CR , 1 F Sf E Se  ·  F CR , 1 E Sf F Se  >  = im  E CR , 1 F > CR , 1 + F Sf E > Sf + E Se F > Se  . (35) Equation (A.3a) is 0 = E F > + F E > = X α ∈{ (CR , 1) , (CR , 2) , Sf , Se }  E α F > α + F α E > α  (36) from whic h follows im  E CR , 1 F > CR , 1 + F Sf E > Sf + E Se F > Se  = im  F CR , 1 E > CR , 1 + E CR , 2 F > CR , 2 + + F CR , 2 E > CR , 2 + E Sf F > Sf + F Se E > Se  ⊆ im  F CR , 1 E > CR , 1 E CR , 2 F > CR , 2 F CR , 2 E > CR , 2 E Sf F > Sf F Se E > Se  ⊆ im  F CR , 1 E CR , 2 F CR , 2 E Sf F Se  (34) = im  F CR , 1 E CR , 2 E Sf F Se  . (37) Com bining (35) and (37) we can derive im  F E  = im  E CR , 1 F Sf E Se  + + im  F CR , 1 E CR , 2 F CR , 2 E Sf F Se  ⊆ im  F CR , 1 E CR , 2 E Sf F Se  ⊆ im  F E  . (38) Th us, equality holds in the ab ov e formula and we ha ve rank  F CR , 1 E CR , 2 E Sf F Se  = rank  F E  (A.3b) = N n E . (39) Hence, the square matrix ( F CR , 1 E CR , 2 E Sf F Se ) has full rank and is inv ertible. As sho wn in [31] and [32], un- der the ab ov e rank condition (39) the kernel represen- tation (5) can b e formulated as the input-output repre- sen tation (31) with Z = − Z > = −  F CR , 1 E CR , 2 E Sf F Se  − 1 · ·  E CR , 1 F CR , 2 F Sf E Se  . (40) 2 As can b e seen in (32), the flows and efforts corresp ond- ing to elements of type Sf and Se are assigned as inputs and outputs of the explicit Dirac structure in a fixe d manner. By this fixed assignmen t, (31) has Property 4.6. In contrast, the flows and efforts corresp onding to ele- men ts of type C and R ma y b e freely designated as in- puts or outputs as long as (34) is fulfilled. In the next t wo propositions, we analyse the result of Lemma 4.8 more in detail. Prop osition 4.10 F or any given or der of the variables in (32) , the matrix Z ( x ) in (31) is unique. This state- ment is indep endent of Assumption 4.7. PR OOF. The idea is to show that D is linearly isomorphic to R N n E (i.e. isomorphic as v ector spaces) and thus Z is unique. F or the sak e of releasing notational burden, w e will suppress the argumen t x to the matrices during the pro of and use the following notation: u =  u > CR u > P  > , (41a) y =  y > CR y > P  > , (41b) f =  f > CR , 1 f > CR , 2 f > Sf f > Se  > , (41c) e =  e > CR , 1 e > CR , 2 e > Sf e > Se  > . (41d) Let Z and Z 0 ∈ R N n E × N n E b e tw o matrices fulfilling y = Z u and y = Z 0 u . (42) Recall (32) and that dim D = N n E . As y dep ends lin- early on u , we ha ve that D is isomorphic to R N n E via R N n E → D , u 7→ ( f , e ) , where y = Z u and via D → R N n E , ( e , f ) 7→ u . F rom (42) it follo ws that 9 Z u = Z 0 u and th us Z = Z 0 as u ranges o v er all of R N n E . 2 Note that the uniqueness of Z ( x ) in Prop osition 4.10 is restricted to the case of a certain arrangement of v ari- ables. In particular, Prop osition 4.10 do es not imply the uniqueness of an input-output represen tation in general. Prop osition 4.11 Assumption 4.7 is a necessary and sufficien t condition for the existenc e of an input-output r epr esentation of (5) which has Pr op erty 4.6. This state- ment is true indep endent of the sp e cific r e alisation of F ( x ) and E ( x ) in (5) (cf. R emark A.5). PR OOF. F rom the pro of of Lemma 4.8 it follo ws that Assumption 4.7 is a sufficient c ondition for transfer- ring (5) in to an input-output representation with prop- ert y 4.6. So it is left to show that the assumption is ne c- essary . T o this end, w e use the uniqueness of Z ( x ) from Prop osition 4.10. F or the sake of brevity , we neglect the argumen t x and the supplement “for all x ∈ X ” in this pro of. Moreo ver, we use the notation from (41a), (41b) and w e give a s horthand to t wo matrices: X =  F CR , 1 E CR , 2 E Sf F Se  ∈ R N n E × N n E , (43a) Y =  E CR , 1 F CR , 2 F Sf E Se  ∈ R N n E × N n E . (43b) Assume we can write D in b oth forms (5) and (31). More- o ver, Assumption 4.7 is fulfilled if X has full rank. Note that in the situation of Lemma 4.8 we hav e Z = − X − 1 Y whic h gives us a hin t that w e should prov e and use X Z = − Y along the w ay . As an elemen t ( f , e ) of D fulfills the equations in (5), we hav e F  − f > CR , 1 − f > CR , 2 f > Sf f > Se  > + E  e > CR , 1 e > CR , 2 e > Sf e > Se  > = 0 , (44) or equiv alently after reordering X y = − Y u . (45) The same elemen t ( f , e ) also fulfills (31), i.e. w e hav e y = Z u , where Z is unique according to Prop osition 4.10. By m ultiplying from the left with X w e obtain X y = X Z u . (46) Com bining (45) and (46) yields X Z u = − Y u , (47) establishing X Z = − Y , since u ranges ov er all of R N n E . Let us now in vestigate the rank of X . First, note that im X = im( X X Z ) as im X Z ⊆ im X . F rom this the statemen t that X has full rank follows: rank X = rank  X X Z  (47) = rank  X − Y  (43) = rank  F E  (A.1b) = N n E . (48) Note that (48) holds for an y realisation of F and E . Moreo ver, every submatrix in (43a) must hav e full col- umn rank. In particular Assumption 4.7 holds. 2 So far, we presented a metho d whic h allows to con vert the Dirac structure (5) to an explicit form (31). In the sequel, we consider an imp ortant special case of (31) whic h will pa ve the w ay to a p ort-Hamiltonian formula- tion of the b ond graph. The sp ecial case is characterised b y the following assumption. Assumption 4.12 F or al l x ∈ X the matric es in (5) fulfil l (6) . Note that Assumption 4.7 is necessary for Assump- tion 4.12. In the subsequent corollary , we make use of Assumption 4.12 and address an imp ortant sp ecial case of Lemma 4.8. Corollary 4.13 Given the Dir ac structur e (5) . L et As- sumption 4.12 hold. The Dir ac structur e (5) c an then b e formulate d in the input-output r epr esentation (7) . Mor e- over, Assumption 4.12 is ne c essary and sufficient for the existenc e of (7) with ve ctors as in (8b) and (8c) . PR OOF. The pro of of Corollary 4.13 follows directly from Lemma 4.8 under Assumption 4.12, whic h also sho ws that Assumption 4.12 is a sufficient condition. The pro of for the necessity of the assumption is the same as the one giv en for Prop osition 4.11. 2 Lemma 4.8 pro vides a practical pro cedure for transfer- ring the Dirac structure from a kernel representation (5) into an input-output representation (31) with Prop- ert y 4.6. Assumption 4.7 is prov en to b e necessary and sufficien t for the existence of suc h a representation. In Corollary 4.13, we considered an imp ortant sp ecial case of Lemma 4.8, which will b e used to derive an explicit PHS from the b ond graph in the next section. 4.3 F ormulation of an explicit p ort-Hamiltonian system In the previous section, w e show ed that under certain conditions an explicit represen tation of the Dirac struc- ture (5) can be obtained. Hereby , the inputs and outputs 10 of the explicit representation are chosen under consid- eration of Property 2.5. In this section, w e merge the explicit representation of the Dirac structure with the constitutiv e relations of storages and resistors to obtain an explicit PHS (3) that has Prop erty 2.5. F or this, let us mak e the following assumption. Assumption 4.14 The r esistive r elation (10) c an b e r e- or ganise d as in (11) . The negative sign in (11) accounts for the opposite signs of the flows in the vectors ( f R , e R ) and ( u R , y R ) (see (8b) and (8c)). Before we formulate the b ond graph as PHS, w e need one more prerequisite lemma, whic h ensures the existence of ˜ K in (12i). Lemma 4.15 L et X , Y ∈ R p × p with X = X >  0 and Y = − Y > . Then, the matrix K : = ( I + X Y ) is r e gular. In p articular K − 1 always exists. PR OOF. The idea of the pro of is to show that (i) we can (without loss of generality) assume X to b e diagonal; (ii) the matrix K is in vertible as it has only non-zero eigen v alues. F or (ii) w e in vestigate first the case of X b eing p ositive definite. Afterwards, w e generalise to the case of X b eing p ositive semi-definite. Indeed, since X is a symmetric and real matrix, there exists (by the Sp ectral Theorem) an orthogonal matrix T ∈ O ( p ) such that T X T > is diagonal. Moreov er, I + X Y is inv ertible if and only if T ( I + X Y ) T > = I + ( T X T > )( T Y T > ) = I + ˜ X ˜ Y is inv ertible, where ˜ X = T X T > is diagonal and p ositive semi-definite and ˜ Y = T Y T > is skew-symmetric. Thus, we can assume X to b e diagonal in the remainder of the pro of. The matrix I + X Y is regular if and only if 0 is not an eigenv alue of it, that is if − 1 is not an eigenv alue of X Y . W e will show that X Y has at most 0 as r e al- value d eigenv alue. Throughout this pro of we use Spec( · ) to denote the (real) sp ectrum of a matrix. Case 1: X is positive definite. Let √ X be a diagonal matrix whic h is a square ro ot of X , i.e. √ X √ X = X . Suc h a matrix exists and is in vertible since X is diagonal and p ositiv e definite. Because the sp ectrum of a matrix is in v ariant under conjugation, we hav e Sp ec ( X Y ) = Sp ec  √ X − 1 X Y √ X  = Sp ec  √ X Y √ X  = Sp ec  √ X Y √ X >  ⊆ { 0 } , (49) where the last inclusion holds since √ X Y √ X > is real and skew-symmetric. Thus, − 1 is not an eigen v alue of X Y and I + X Y is in vertible. Case 2: X is p ositive semi-defi nite. By the same conju- gation argument as at the b eginning of the pro of (this time with a p ermutation matrix) we may assume with- out loss of generality that X is of the form X = X 0 0 0 0 ! , (50) where X 0 ∈ R ` × ` is a p ositive definite diagonal matrix. With the same blo ck decomp osition we write Y as Y = Y 0 Y 00 ∗ ∗ ! , where Y 0 ∈ R ` × ` . (51) W e hav e X Y = X 0 Y 0 X 0 Y 00 0 0 ! . (52) Th us, Sp ec( X Y ) = Sp ec( X 0 Y 0 ) ∪ Sp ec( 0 ) ⊆ { 0 } , where the last inclusion uses Case 1 applied to X 0 Y 0 . Hence, I + X Y is inv ertible. 2 In the follo wing, we use Lemma 4.15 to merge the ex- plicit Dirac structure (7) and the constitutive relations of storages (9) and resistors (11) into an explicit PHS. Lemma 4.16 Given an explicit Dir ac structur e (7) and the c onstitutive r elations of stor age elements as in (9) . Supp ose Assumption 4.14 holds, which al lows the c onsti- tutive r elations of the r esistive elements (10) to b e written as in (11) . Equations (7) , (9) , and (11) c an b e written as explicit input-state-output PHS of the form (3) with state x and Hamiltonian H ( x ) fr om (9) and u = u P , y = y P . PR OOF. The proof follo ws four steps: (i) we elimi- nate the resistive v ariables in (7); (ii) w e decomp ose the structure obtained from (i) in to symmetric and sk ew- symmetric parts; (iii) we substitute storage v ariables with (9); (iv) we show that (4) holds. Again, w e omit the argument x and the supplement “for all x ∈ X ” for all matrices in this pro of. Substituting the second row from the linear equation system in (7) into (11) yields u R = − ˜ RZ > CR u C + ˜ RZ RP u P − ˜ RZ RR u R ⇔ u R = − ˜ K ˜ RZ > CR u C + ˜ K ˜ RZ RP u P (53) with ˜ K as in (12i). Due to Lemma 4.15, ˜ K alwa ys exists. Inserting (53) in to the first and third row from the linear 11 equation system in (7) yields y C y P ! = " Z CC − Z CP Z > CP Z PP ! + Z CR − Z > RP ! ˜ K ˜ R  Z > CR − Z RP  # u C u P ! . (54) The first addend in the square brack et is a skew- symmetric matrix. The second addend can be decom- p osed in to a skew-symmetric and a symmetric matrix b y writing 2 ˜ K ˜ R as a sum of a sk ew-symmetric A and a symmetric matrix B . Using this decomp osition and ˜ R = ˜ R > , (54) reads y C y P ! = Z CC − Z CP Z > CP Z PP ! u C u P ! + 1 2 Z CR − Z > RP ! ( A + B )  Z > CR − Z RP  u C u P ! , (55) with A and B as in (12g) and (12h), resp ectively . Equa- tion (55) can b e written as y C y P ! = " − J − G G > M ! | {z } =: Q ss + R P P > S !# | {z } =: Q s u C u P ! , (56) with J , G , M , R , P , S as in (12) and Q ss = − Q > ss , Q s = Q > s . Inserting (9) into (56) then yields (3). Using the idea of [28, p. 56], we even tually pro ve (4):  u > C u > P  Q s u C u P ! =  u > C u > P  ( Q ss + Q s ) u C u P ! =  u > C u > P  y C y P ! (A.1a) = − y > R u R (11) = y > R ˜ Ry R ≥ 0 . (57) 2 Remark 4.17 The authors of [25] derive an explicit PHS without fe e dthr ough for the c ase Z PP ( x ) = 0 , Z RP ( x ) = 0 . In [24], the pr oblem has b e en addr esse d for the sp e cial c ase Z RR ( x ) = 0 . L emma 4.16 gener alises the r esults of [25] and [24] to the c ase wher e al l matric es of (7) ar e p otential ly non-zer o. 4.4 Ne c essary and sufficient c onditions Sections 4.1 to 4.3 show ed that if (6) and (11) are ful- filled, an explicit p ort-Hamiltonian formulation of the b ond graph can b e obtained. Hence, under Prop erty 2.5, equations (6) and (11) form together a sufficient con- dition for the existence of such an explicit PHS. No w it is left to show that (13) is a necessary condition for the existence of a p ort-Hamiltonian formulation that has Prop ert y 2.5. Prop ert y 2.5 implies Prop erty 4.6. In Prop osition 4.11 w e sho w that (13) is necessary (and sufficient) for form u- lating the junction structure equations as a Dirac struc- ture in an explicit representation with Prop erty 4.6. In Lemma 4.16 it is shown, that the inputs and outputs of the explicit Dirac structure directly translate in to the in- puts and outputs of the explicit PHS. Th us, under Prop- ert y 2.5, the necessit y of (13) from Prop osition 4.11 also accoun ts for the existence of an explicit PHS. 5 Main practical result The metho ds from Sections 3 and 4 can b e summarised in an algorithm whic h generates an explicit PHS from a given b ond graph. This algorithm can b e fully auto- mated in a technical computing system and is the main practical result of this pap er. Algorithm 1 presents a program listing which serves as a guide for implemen ta- tion. On the webpage www.irs.kit.edu/2758.php , we pro vide an implementation in W olfram language. 6 A cademic example In this section, w e illustrate the main theoretical and practical results of this pap er through an academic ex- ample. Consider the N -dimensional b ond graph in Fig- ure 1. The elemen ts and b onds are summarised in the sets V = V I ∪ V E , B = B I ∪ B E , respectively , with V I = { 0 , 1 , TF } , V E = { C 1 , C 2 , R , Sf } , B I = { 1 , 2 } , and B E = { 3 , 4 , 5 , 6 } . The system state vector is x =  x > 1 x > 2  > ∈ R 2 N . W e supp ose an arbitrary , differen- tiable, non-negative storage function H ( x ) = H 1 ( x 1 ) + H 2 ( x 2 ) . The R -type element is sp ecified by a matrix D ∈ R N × N with D = D >  0 . The transformer TF is state- mo dulated with full rank matrix U ( x ) = U > ( x ) ∈ R N × N . 0 1 TF : U ( x ) Sf C 2 : H 2 ( x 2 ) C 1 : H 1 ( x 1 ) f 6 e 6 f 1 e 1 f 2 e 2 R : D f 3 e 3 f 4 e 4 e 5 f 5 Figure 1. Exemplary N -dimensional b ond graph. First, for each element i ∈ V I w e formulate a Dirac struc- ture D i of the form (17). With the matrices from (18a), 12 Algorithm 1 Input: N -dimensional b ond graph 1: for all i ∈ V I do 2: compute F i ( x ) , E i ( x ) according to (18) or (20) 3: construct D i ( x ) as in (17) 4: bring D i ( x ) to the form (24) 5: compute D IC according to (27) 6: compute Γ > i ( x ) according to (28) 7: end for 8: Γ > ( x ) ← ( Γ > i ( x )) for all i ∈ V I 9: Λ > ( x ) ← ker( Γ > ( x )) 10: write Λ > ( x ) as ( Λ > i ( x )) for all i ∈ V I 11: compute D ( x ) according to (29) 12: bring D ( x ) to the form (5) 13: if (13) is violated then 14: prin t " B G contains dep endent sources" 15: terminate 16: end if 17: if (6) is violated then 18: prin t " B G contains dep endent storages or storages determined b y sources" 19: terminate 20: end if 21: split F R ( x ) suc h that (34) is fulfilled 22: split E R ( x ) , f R , e R in same parts as F R ( x ) 23: compute Z ( x ) according to (8) 24: compute D ( x ) as in (7) 25: if (11) do es not exist then 26: prin t "no suitable input-output splitting of R -t yp e elements exists " 27: terminate 28: end if 29: bring resistiv e relation from (10) to (11) 30: compute PHS matrices with (12) 31: u ← u P , y ← y P 32: return explicit PHS (3) (18b), and (20a), the equation systems of the Dirac struc- tures are: D 0 :     I I I 0 0 0 0 0 0         f 5 f 2 − f 4     +     0 0 0 I − I 0 I 0 − I         e 5 e 2 e 4     = 0 , (58a) D 1 :     0 0 0 − I I 0 − I 0 I         − f 3 − f 6 − f 1     +     − I − I − I 0 0 0 0 0 0         e 3 e 6 e 1     = 0 , (58b) D TF : I U ( x ) 0 0 ! f 1 − f 2 ! + 0 0 − U ( x ) I ! e 1 e 2 ! = 0 . (58c) Throughout this example, square zero matrices and iden tity matrices are of dimension N . Rewrite (58a) as     I I I 0 0 0 0 0 0         − f 4 f 5 f 2     +     0 0 0 0 I − I − I I 0         e 4 e 5 e 2     = 0 . (59) Equations (58b), (58c), (59) are then of the form (24). The equation system of the interconnection Dirac struc- ture D IC from (27) is given by:        0 I 0 0 | {z } F IC 0 I 0 0 0 |{z} F IC 1 I 0 0 I 0 0 0 0        | {z } F IC TF        f 2 − f 1 f 1 − f 2        +        0 0 0 I | {z } E IC 0 0 0 − I 0 | {z } E IC 1 0 0 0 0 I 0 0 − I        | {z } E IC TF        e 2 e 1 e 1 e 2        = 0 . (60) With (60), w e obtain Γ > ( x ) =        0 0 0 0 − I 0 0 0 0 I 0 0 | {z } Γ 0 − I 0 0 0 0 0 0 0 − I 0 0 0 | {z } Γ 1 0 − U ( x ) 0 I I 0 − U ( x ) 0        | {z } Γ TF ( x ) . (61) A matrix Λ ( x ) with im( Λ > ( x )) = ker( Γ > ( x )) for all x ∈ X is given by Λ ( x ) =        0 I 0 U ( x ) 0 0 0 0 0 0 0 I | {z } Λ 0 ( x ) − U ( x ) 0 0 0 0 I 0 I 0 0 0 0 | {z } Λ 1 ( x ) 0 I I 0 0 0 0 0        | {z } Λ TF . (62) With (62), we can compute a single Dirac structure de- scribing the equations of the junction structure. The 13 equation system of the comp osed Dirac structure is        0 0 − I U ( x ) − I 0 0 0 | {z } F C ( x ) 0 0 I 0 |{z} F R 0 U ( x ) 0 0        | {z } F Sf ( x )        − f 3 − f 4 − f 6 f 5        +        U ( x ) 0 0 0 0 0 0 − I | {z } E C ( x ) U ( x ) 0 0 0 | {z } E R ( x ) I 0 0 I        | {z } E Sf        e 3 e 4 e 6 e 5        = 0 . (63) Since rank ( F C ( x ) E Sf ) = 3 N for all x ∈ R 2 N , Assump- tions 4.7 and 4.12 are fulfilled. Using Corollary 4.13 with F R , 2 = F R w e obtain an explicit repres en tation of (63)        − f 3 − f 4 e 6 e 5        =        0 0 I 0 0 0 V ( x ) − I − I − V ( x ) 0 0 0 I 0 0               e 3 e 4 − f 6 f 5        (64) where V ( x ) = U − 1 ( x ) . The dashed lines indicate the matrix blo cks according to (7). F or an input-output splitting of the R -type elemen t as in (64), Assump- tion 4.14 is satisfied. With (12) we then obtain the follo wing explicit PHS ˙ x = − D D V ( x ) V ( x ) D V ( x ) D V ( x ) ! | {z } = R ( x ) ∂ H ∂ x ( x ) + 0 I ! | {z } = G f 5 , (65a) e 5 =  0 I  | {z } = G > ∂ H ∂ x ( x ) , (65b) with J ( x ) , P ( x ) , M ( x ) , S ( x ) b eing zero. By the prop- erties of D and U ( x ) w e indeed hav e R ( x ) = R > ( x ) for all x ∈ R 2 N . Moreo ver, (65) has Prop ert y 2.5. 7 Conclusion In this pap er, w e present a metho d for an explicit p ort- Hamiltonian form ulation of multi-bond graphs (Theo- rem 3.1). F urthermore, we pro vide tw o conditions for the existence of such an explicit formulation – one nec- essary and one sufficient. The metho d can b e fully au- tomated (Algorithm 1); along with this publication, we pro vide an implementation in W olfram language. F u- ture work will address the generalisation of our mo d- elling metho d to multi-bond graphs con taining dep en- den t storages and/or storages determined b y sources, i.e. the case where (6) is violated. References [1] B. Maschk e, A. v an der Schaft, Port-contr olled Hamiltonian systems: modelling origins and systemtheoretic properties, IF AC Pro ceedings V olumes 25 (13) (1992) 359–365. [2] B. Maschk e, A. van der Schaft, P . C. Breedveld, An intrinsic Hamiltonian formulation of netw ork dynamics: Non-standard poisson structures and gyrators, Journal of the F ranklin Institute 329 (5) (1992) 923–966. [3] A. v an der Sc haft, B. Maschk e, The Hamiltonian formulation of energy conserving ph ysical systems with external p orts, AEU - Archiv für Elektronik und Übertragungstechnik 49 (5- 6) (1995) 362–371. [4] C. Mehl, V. Mehrmann, P . Sharma, Stabilit y radii for linear Hamiltonian systems with dissipation under structure- preserving p erturbations, SIAM Journal on Matrix Analysis and Applications 37 (4) (2016) 1625–1654. [5] P . Kot yczk a, L. Lefèvre, Discrete-time p ort-Hamiltonian systems based on Gauss-Legendre collo cation, IF AC- PapersOnLine 51 (3) (2018) 125–130. [6] A. v an der Schaft, B. Maschk e, Hamiltonian formulation of distributed-parameter systems with boundary energy flo w, Journal of Geometry and Physics 42 (1-2) (2002) 166–194. [7] Y. Le Gorrec, H. Zw art, B. Maschk e, Dirac structures and b oundary control systems asso ciated with skew- symmetric differential op erators, SIAM Journal on Control and Optimization 44 (5) (2005) 1864–1892. [8] B. Jacob, H. Zw art, Linear port-Hamiltonian systems on infinite-dimensional spaces, V ol. 223, Springer Science & Business Media, 2012. [9] H. Ramirez, H. Zwart, Y. Le Gorrec, S tabilization of infinite dimensional port-Hamiltonian systems b y nonlinear dynamic boundary control, Automatica 85 (2017) 61–69. [10] A. Kugi, Non-linear control based on physical mo dels: electrical, mechanical and hydraulic systems, Lecture Notes in Control and Information Sciences, Springer, London, 2001. [11] V. Duindam, A. Macchelli, S. Stramigioli, H. Bruyninckx (Eds.), Modeling and control of complex physical systems: the p ort-Hamiltonian approach, Springer, Berlin Heidelb erg, 2009. [12] P . Kot yczk a, Lo cal linear dynamics assignment in ID A-PBC, Automatica 49 (4) (2013) 1037–1044. [13] R. Ortega, A. v an der Sc haft, F. Castanos, A. Astolfi, Control by interconnection and standard passivity-based control of port-Hamiltonian systems, IEEE T ransactions on Automatic control 53 (11) (2008) 2527–2542. [14] F. Dörfler, J. K. Johnsen, F. Allgöw er, An introduction to interconnection and damping assignmen t passivity-based control in pro cess engineering, Journal of Pro cess Con trol 19 (9) (2009) 1413–1426. [15] A. V enk atraman, A. v an der Schaft, F ull-order observ er design for a class of p ort-Hamiltonian systems, Automatica 46 (3) (2010) 555–561. 14 [16] B. Vincent, N. Hudon, L. Lefèvre, D. Do chain, Port- Hamiltonian observer design for plasma profile estimation in tok amaks, IF AC-P ap ersOnLine 49 (24) (2016) 93–98. [17] A. v an der Schaft, L2-Gain and Passivit y T echniques in Nonlinear Control, 3rd Edition, Communications and Control Engineering, Springer, Cham, Switzerland, 2016. [18] A. v an der Schaft, B. Maschk e, Port-Hamiltonian systems on graphs, SIAM Journal on Control and Optimization 51 (2) (2013) 906–937. [19] A. F alaize, T. Hélie, Passive guaranteed simulation of analog audio circuits: a p ort-Hamiltonian approach, Applied Sciences 6 (10). [20] A. F alaize, T. Hélie, PyPHS, https://github.com/pyphs/ pyphs , accessed: 2019-07-03. [21] R. C. Rosenberg, State-space formulation for b ond graph models of multiport systems, Journal of Dynamic Systems, Measurement, and Control 93 (1) (1971) 35–40. [22] P . E. W ellstead, Introduction to physical system mo delling, Acadamic Press, London, 1979. [23] G. Golo, A. v an der Schaft, P . Breedveld, B. Maschk e, Hamiltonian formulation of b ond graphs, in: Nonlinear and hybrid systems in automotiv e control, Springer, London, 2003, pp. 351–372. [24] N. Lop es, Appro che passive p our la modélisation, la simulation et l’étude d’un banc de test robotisé p our les instruments de type cuivre, Ph.D. thesis, Université Pierre et Marie Curie, Paris (2016). [25] A. Donaire, S. Junco, Deriv ation of input-state-output port-Hamiltonian systems from b ond graphs, Simulation Modelling Practice and Theory 17 (1) (2009) 137–151. [26] S. Dai, Comp ositional mo deling and design of cyber- physical systems using p ort-Hamiltonian systems, Ph.D. thesis, V anderbilt Universit y , Nashville, T ennessee (2016). [27] W. Borutzky , Bond Graph Metho dology: Developmen t and Analysis of Multidisciplinary Dynamic System Mo dels, Springer, London, 2010. [28] A. v an der Schaft, D. Jeltsema, P ort-Hamiltonian systems theory: An introductory o verview, F oundations and T rends R  in Systems and Control 1 (2-3) (2014) 173–378. [29] D. C. Karnopp, D. L. Margolis, R. C. Rosenberg, System Dynamics: Mo deling, Simulation, and Control of Mechatronic Systems, 5th Edition, John Wiley & Sons, Incorporated, Hoboken, USA, 2012. [30] C. Batlle, I. Massana, E. Simó, Representation of a general comp osition of Dirac structures, in: 2011 50th IEEE Conference on Decision and Control and Europ ean Control Conference, 2011, pp. 5199–5204. [31] A. Blo ch, P . E. Crouch, Representations of Dirac structures on vector spaces and nonlinear L-C circuits, in: Differential Geometry and Con trol, V ol. 64 of Symposia in Pure Mathematics, American Mathematical So ciety , Providence, Rhode Island, 1999, pp. 103–117. [32] G. Golo, P . Breedveld, B. Maschk e, A. v an der Schaft, Geometric formulation of generalized bond graph mo dels - part i: Generalized junction structures, T echnical Rep ort, Universit y of T wen te, F aculty of Mathematical Sciences, Enschede (2000). A Dirac structures In App endix A we recapitulate some representations of Dirac structures. F or a detailed in tro duction, w e refer the reader to [28]. Giv en an abstract finite-dimensional v ector space F and its dual v ector space E : = F ∗ . The spaces F and E are referred to as sp ac e of flows and sp ac e of efforts , resp ec- tiv ely . W e denote f ∈ F as flow ve ctors and e ∈ E as effort ve ctors . Definition A.1 ([28]) A subsp ac e D ⊂ F × E is a con- stan t Dirac structure if ( i ) h e | f i = 0 , ∀ ( f , e ) ∈ D , (A.1a) ( ii ) dim D = dim F , (A.1b) wher e h e | f i = e ( f ) denotes the dual p airing. Remark A.2 Thr oughout this p ap er we have F = R n . As E = ( R n ) ∗ ∼ = R n , we identify E with R n . Definition A.3 A mo dulated Dirac structure is a fam- ily of c onstant Dir ac structur es D ( x ) ⊂ R n × R n indexe d over x ∈ X . Definition A.4 A k ernel representation of a mo dulate d Dir ac structur e D ( x ) ⊂ R n × R n with x ∈ X is D ( x ) = { ( f , e ) ∈ R n × R n | F ( x ) f + E ( x ) e = 0 } , (A.2) wher e the matric es F ( x ) and E ( x ) satisfy ( i ) E ( x ) F > ( x ) + F ( x ) E > ( x ) = 0 , (A.3a) ( ii ) rank( F ( x ) E ( x )) = n (A.3b) for al l x ∈ X . R emark A.5 The matric es F ( x ) and E ( x ) ar e not uniquely determine d by the kernel r epr esentation. F or ex- ample b oth matric es c an b e multiplie d fr om the left by an arbitr ary invertible matrix T ( x ) without changing D . Definition A.6 L et D ( x ) ⊂ R n × R n with x ∈ X b e a mo dulate d Dir ac structur e and ( f , e ) ∈ D ( x ) . Possibly after p ermutations split f into  f > 1 f > 2  > . Corr esp ond- ingly, split e into  e > 1 e > 2  > . An input-output represen- tation of D ( x ) is D ( x ) = { ( f , e ) ∈ R n × R n | y = Z ( x ) u } . (A.4) wher e u =  e > 1 f > 2  > and y =  f > 1 e > 2  > ar e r eferr e d to as input vector and output v ector , r esp e ctively. The matrix Z ( x ) satisfies Z ( x ) = − Z ( x ) > for al l x ∈ X . Remark A.7 Due to the structur e of the e quation sys- tems, we denote (A.2) and (A.4) as implicit and explicit r epr esentations, r esp e ctively. 15

Original Paper

Loading high-quality paper...

Comments & Academic Discussion

Loading comments...

Leave a Comment