You are on page 1of 34

Introduction to bond graph theory

First part: basic concepts

References
D.C. Karnopp, D.L. Margolis & R.C. Rosenberg, System Dynamics. Modeling and Simulation of Mechatronic Systems (3rd edition). Wiley (2000). ISBN: 0-471-33301-8. B.M. Maschke, A.J. van der Schaft & P.C. Breedveld, An intrinsic Hamiltonian formulation of the dynamics of LC-circuits. IEEE Trans. Circ. & Systems I 42, pp. 73-82 (1995). G. Golo, P.C. Breedveld, B.M. Maschke & A.J. van der Schaft, Input output representations of Dirac structures and junction structures in bond graphs. Proc. of the 14th Int. Symp. of Mathematical Theory of Networks and
Systems (MTNS2000), Perpignan, June 19-23 (2000):
http://www.univ-perp.fr/mtns2000/articles/B01.pdf

Network description of systems


Power discontinuous element

e2 e1 f1

f2

Power discontinuous element

Power continuous network fN

eN
Power discontinuous element

eorts e = (e1 , . . . , eN ) V

[ei ][fi ] = power, i = 1, . . . , N f1 . f = . V ows . fN

A power orientation stroke sets the way in which power ows when ei fi > 0. We adopt an input power convention, except when indicated.
N X i=1

e(f ) he, f i =

ei fi K

(R or C)

The network is power continuous if it establishes relations such that he, f i = 0

Example: Tellegens theorem


Circuit with b branches and n nodes i1 To each node we assign a voltage uj , j = 1, . . . , n u3 u1 To each branch we assign i2 3 i a current i , = 1, . . . , b, u2 and this gives an orientation to the branch ib un uj ul

For each branch we dene the voltage drop v , = 1, . . . , b: This is KVL!

v = u j u l

Mathematically, the circuit, with the orientation induced by the currents, is a digraph (directed graph) We can dene its n b 1 +1 Ai = 0 adjacency matrix A by if branch is incident on node i if branch is anti-incident on node i otherwise

Then, KCL states that


b X

Ai i = 0,

=1

i = 1, . . . , n

In fact, KVL can also be stated in terms of A: v =


n X i=1

Ai ui

The sum contains only two terms, because each branch connects only two nodes

Tellegens theorem. Let {v(1) (t1 )}=1,...,b be a set of branch voltages satisfying KVL at time t1 , and let {i (t2 )}=1,...,b be a set of currents satisfying (2) KCL at time t2 . Then
b X

=1

v(1) (t1 )i (t2 ) hv(1) (t1 ), i(2) (t2 )i = 0 (2) KVL

Proof: Pb v(1) (t1 )i (t2 ) (2)


n X i=1

=1

= !

=1

b X

n X i=1

Ai u(1)i (t1 ) i (t2 ) (2)


n X i=1

=1

b X

Ai i (t2 ) u(1)i (t1 ) (2)

0 u(1)i (t1 ) = 0

KCL

Notice that {v(1) (t1 )} and {i (t2 )} may correspond to dierent times (2) and they may even correspond to dierent elements for the branches of the circuit. The only invariant element is the topology of the circuit i.e. the adjacency matrix.

Corollary. Under the same conditions as for Tellegens theorem, r s d d v(1) (t1 ), s i(2) (t2 ) = 0 dtr dt2 1 for any r, s N.
In fact, even duality products between voltages and currents in dierent domains (time or frequency) can be taken and the result is still zero.

In terms of abstract network theory, a circuit can be represented as follows


Element in branch 2

2 v2 i

i1 v1
Element in branch 1

Network: KVL+KCL vb ib
Element in branch b

The kth branch element imposes a constitutive relation between vk and ik .

May be linear or nonlinear, algebraic or dierential, . . .

Basic bond graph elements


In bond graph theory, every element, power continuous or not, is represented by a multiport. Ports are connected by bonds. The basic blocs of standard bond graph theory are 1-ports: C-type elements I-type elements R-type elements Eort sources Flow sources
Integral relation between f and e Integral relation between e and f Algebraic relation between f and e Fixes e independently of f Fixes f independently of e

power discontinuous

2-ports: Transformers Gyrators 3-ports: 0-junctions 1-junctions

power continuous, make up the network

C-type elements
C ..
C e f input power convention

Constitutive relation through a state variable q called displacement. q=f e = 1 (q) C

sometimes indicated this way C-type elements have a preferred computational direction, from f to e: Z t e(t) = (e(t0 ) 1 (0)) + 1 f ( ) d C C
t0

Examples: mechanical springs and electric capacitors Linear case: 1 (q) C q = C

I-type elements
I ..
I e f input power convention

Constitutive relation through a state variable p called momentum. p=e f = 1 (p) I

sometimes indicated this way I-type elements have a preferred computational direction, from e to f : Z t f (t) = (f (t0 ) 1 (0)) + 1 e( ) d I I
t0

Examples: mechanical masses and electric inductors Linear case: 1 (p) I p = I

R-type elements
e

Direct algebraic constitutive relation between e and f .


e = R (f )

R .. R

f input power convention sometimes indicated this way

Examples: electric resistor, viscous mechanical damping, static torque-velocity relationships Linear case: R (f ) = Rf

Eort sources
e does not depend on f
e
Se .. f E output power convention

e = E(t) f is given by the system to which the source is connected

Flow sources
.. F output power convention

f does not depend on e


f = F (t)

Sf

e f

e is given by the system to which the source is connected

Transformers
output power convention

TF .. input power convention

e1 f1

e2 f2

e1 f1

= e2 = f2

transformer modulus > 0

It is power continuous:

Gyrators
e1 f1

e 1 f1 e 2 f 2 = 0
e1 f1 = f2 = e2

output power convention

GY ..

e2 f2

input power convention

gyrator modulus > 0

It is power continuous:

e 1 f1 e 2 f 2 = 0

0-junctions
e 2 f2

e1 = e2 = e3
f1 + f2 + f3 = 0 It is power continuous:

e1 f1

e3 f3

e1 f1 e2 f2 e3 f3 = 0 Signs depend on power convention!

For instance, if

would still be e1 = e2 = e3 but e3


0

e 2 f2 e1 f1

f1 f2 + f3 = 0 e1 f1 + e2 f2 e3 f3 = 0

and

f3

1-junctions
e 2 f2 e1 f1

1-junction relations are dual to those of 0-junctions: f1 = f 2 = f3 e1 + e2 + e3 = 0 e3 f3 Again, this is power continuous: e1 f1 e2 f2 e3 f3 = 0

0- and 1-junctions with an arbitrary number of bonds can be considered. Notice that something like
0

can be simplied to

but
0

cannot be simplied

Some elements can be modulated. This means that their parameters or constitutive relations may depend on an external signal, carrying no power. In bond graph theory, this is represented by an activated bond. For instance, a modulated transformer is represented by

MTF

Activated bonds appear frequently in 2D and 3D mechanical systems, and when representing instruments. Special values of the modulus are represented with special symbols. For instance, a gyrator with = 1 is represented by

SGY

Flow sources, transformers and I-type elements can be replaced by combinations of the other elements, given rise to generalized bond graphs. For instance,

I .. I
with q = p

is equivalent to

GY ..

C ..
C

1 (q) = 1 ( q) C I

Nevertheless, we will use them to keep things simpler. Generalized bond graphs are, however, necessary in order to make contact with port-Hamiltonian theory.

Energy relations
For any element with a bond with power variables e and f , the energy variation from t0 to t is H(t) H(t0 ) = Z
t

e( )f ( ) d
t0

For C-type elements, e is a function of q and q = f . Z q H(q) H(q0 ) = 1 () d q Changing variables from t to q, C q
q0

In the linear case,

H(q) H(q0 ) =

1 2 1 2 q q0 2C 2C

For I-type elements, f is a function of p and p = e. Z p H(p) H(p0 ) = 1 () d p p Changing variables from t to p, I
p0

In the linear case,

H(p) H(p0 ) =

1 2 1 p p2 2I 2I 0

For R-type elements, e = R (f ) or f = 1 (e). Then R H(t) H(t0 ) = Z


t

R (f ( ))f ( ) d =

t0

t t0

e( )1 (e( )) d R

If the R-element is a true dissipator, H(t) H(t0 ) 0, t t0 . This means that the graph of R must be completely contained in the rst and third quadrant.

Causality
A bond links two elements, one of which sets the eort and the other one the ow. The causality assigment procedure chooses who sets what for each bond. Causality assigment is necessary to transform the bond graph into computable code. For each bond, causality is indicated by the causal stroke.

+ A+B
A B

means that A sets e and B sets f

means that B sets e and A sets f

Elements with xed causality


Sources set either the eort or the ow, so only a causality is possible:

Se

Sf

In gyrators and transformers, the variable relations allow only two causalities:

TF

or

TF

GY

or

GY

For 0-junctions, one of the bonds sets the eort for the rest, so only one causal stroke is on the junction, while the others are away from it:

For 1-junctions, one of the bonds sets the ow for the rest, and its eort is computed from them, so all but one of the causal strokes are on the junction, while the remaining one is away from it:

TF

Elements with preferred causality


Energy-storing elements, I or C, have a preferred causality, associated to the computation involving integrals instead of derivatives.

This is called integral causality. C-elements are given the ow and return the eort. I-elements are given the eort and return the ow. Dierential causality is possible but not desirable: Dierentiation with respect to time implies knowledge of the future. With dierential causality, the response to an step input is unbounded. Sometimes it is unavoidable and implies a reduction of state variables.

Elements with indierent causality


R-type elements have, in principle, a causality which can be set by the rest of the system:
e f
R .. R

e f .. R
R

f = 1 (e) R

e = R (f )

However, diculty in writting either R or 1 R may favor one of the two causalities. For instance, in mechanical ideal Coulomb friction, F can be expressed as a function of v, but not the other way around.

Mechanical domain example


General rules: Each velocity is associated with a 1-junction, including a reference (inertial) one. Masses are linked as I-elements to the corresponding 1-junctions. Springs and dissipative elements are linked to 0-junctions connecting appropriate 1-junctions. The rest of elements are inserted and power orient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xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

open port F

k2

v2

k1

v1

M2

M1

vref = 0 C: vref 1
1 k2

No friction C: v2 1
1 k1

power orientation 0-velocity reference simplication v1 1 F

Sf .. 0

0 C ..
1 k2

I : M2

I : M1

The nal (acausal) bond graph is thus C:


4 1 3

1 k1

Causality propagation 1
6

C ..
1 k2

1
2

F
7

Hence, all the storage elements get an integral causality assignation.

I : M2

I : M1

Finally, we assign numbers to the bonds. For each storage element, the state variable will be designed with the same index as the bond.

C:
4 1 3

1 k1

f1 = f 2 = f3 e3 = e4 = e5 f5 = f 6 = f7 F
7 6

e2 = e1 e3 f4 = f3 f5 e6 = e5 + e7 e1 = k2 q1 1 f2 = M2 p2 e4 = k1 q4 1 f6 = M1 p6

C ..
1 k2

1
2

q1 = f1 p 2 = e2 q4 = f4 p 6 = e6 e7 = F

I : M2 q1 = f1 = f2 =
1 M2 p2

I : M1 (= v2 )

p2 = e2 = e1 e3 = k2 q1 e4 = k2 q1 k1 q4 q4 = f4 = f3 f5 = f2 f6 =
1 M2 p2

1 M1 p6

System of ODE for analysis (= v2 v1 ) and simulation

p6 = e6 = e5 + e7 = e4 + F = k1 q4 + F

Energy balance
2 2 H(q1 , p2 , q4 , p6 ) = 1 k2 q1 + 1 k1 q4 + 2 2 1 p2 2M2 2

1 p2 2M1 6

d H dt

= = +

1 1 k2 q1 q1 + k1 q4 q4 + p2 p2 + p6 p6 M2 M1 1 1 1 k2 q1 p2 + k1 q4 p2 p6 M2 M2 M1 1 1 p2 (k2 q1 k1 q4 ) + p6 (k1 q4 + F ) M2 M1

H=

1 M1 p6 F

= v1 F

Since the spring k2 is to the left of the mass M2 , it follows from q1 = v2 that v2 is positive to the right. Similarly, since the spring k1 is to the left of M1 , it follows from q4 = v2 v1 that v1 is positive to the left. Finally, from the later and p6 = k1 q1 + F one deduces that F is positive to the left.

Hence, v1 and F have the same positive orientation and v1 F is the power into the system.

Multidomain example
dc motor r ywheel, J I C dc/dc
xxxxxxx xxxxxxx xxxxxxx xxxxxxx xxxxxxx xxxxxxx

command

bearings,

We will model the converter as a modulated transformer, and the dc motor as a gyrator. In the electrical domain, a 0-junction is introduced for each voltage, and everything is connected in between by means of 1-junctions. In the electrical domain 0-junction parallel connection 1-junction series connection

xxxxxxx xxxxxxx xxxxxxx

xxxxxxx xxxxxxx xxxxxxx

R 0 Sf 1 C 1 0 1 MTF 0 1 0
We set to earth these two

Voltage nodes Electric elements insertion Velocities Friction Flywheel Power convention Reference voltage and velocity

0 1 GY 1 I

R
Flywheel angular speed zero velocity

Reference (= 0) angular speed

After eliminating these three nodes and their bonds, several simplications can be carried out.

The nal bond graph, with causal assignment and bond naming, is R:r
5 1

Sf .. I

0
2

MTF (t)
e4 f3

GY .. g

1
8

I:J

C:C

1 (t) 1 = f4 (t) = e3

R:
e6 e7 = = gf7 gf6

Exercise

Write all the network and constitutive relations Obtain the state space equations Write down the energy balance equation

Next seminar
Storage and dissipation elements with several ports. Thermodynamic systems. Dirac structures and bond graphs. Distributed systems.

You might also like