Modeling & Simulation 2019 Lecture 8. Bond graphs
Claudio Altafini Automatic Control, ISY Linköping University, Sweden 1 / 45 Summary of lecture 7
• General modeling principles • Physical modeling: dimension, dimensionless quantities, scaling • Models from physical laws across different domains • Analogies among physical domains 2 / 45 Lecture 8. Bond graphs
Summary of today • Analogies among physical domains • Bond graphs • Causality
In the book: Chapter 5 & 6 3 / 45 Basic physics laws: a survey
Electrical circuits Hydraulics
Mechanics – translational Thermal systems
Mechanics – rotational 4 / 45 Electrical circuits
Basic quantities: • Current i(t) (ampere) • Voltage u(t) (volt)
• Power P (t) = u(t) · i(t) 5 / 45 Electrical circuits
Basic laws relating i(t) and u(t) • inductance d 1 Z t L i(t) = u(t) ⇐⇒ i(t) = u(s)ds dt L 0 • capacitance
d 1 Z t C u(t) = i(t) ⇐⇒ u(t) = i(s)ds dt C 0 • resistance (linear case) u(t) = Ri(t) 6 / 45 Electrical circuits
Energy storage laws for i(t) and u(t) • electromagnetic energy 1 T (t) = Li2(t) 2 • electric field energy 1 T (t) = Cu2(t) 2 • energy loss in a resistance
Z t Z t Z t 1 Z t T (t) = P (s)ds = u(s)i(s)ds = R i2(s)ds = u2(s)ds 0 0 0 R 0 7 / 45 Electrical circuits
Interconnection laws for i(t) and u(t) • Kirchhoff law for voltages On a loop: ( X +1, σk aligned with loop direction σkuk(t) = 0, σk = −1, σ against loop direction k k
• Kirchhoff law for currents On a node: ( X +1, σk inward σkik(t) = 0, σk = −1, σ outward k k 8 / 45 Electrical circuits
Transformations laws for u(t) and i(t) • transformer
u1 = ru2 1 i = i 1 r 2 u1i1 = u2i2 ⇒ no power loss
• gyrator
u1 = ri2 1 i = u 1 r 2 u1i1 = u2i2 ⇒ no power loss 9 / 45 Electrical circuits
Example
State space model: d 1 i = (u − Ri − u ) dt L s C d 1 u = i dt C C 10 / 45 Mechanical – translational
Basic quantities: • Velocity v(t) (meters per second) • Force F (t) (newton)
• Power P (t) = F (t) · v(t) 11 / 45 Mechanical – translational
Basic laws relating F (t) and v(t) • Newton second law d 1 Z t m v(t) = F (t) ⇐⇒ v(t) = F (s)ds dt m 0 • Hook’s law (elastic bodies, e.g. spring)
1 d Z t F (t) = v(t) ⇐⇒ F (t) = k v(s)ds k dt 0
• viscosity (e.g. dry friction)
F (t) = bv(t) 12 / 45 Mechanical – translational
Energy storage laws for F (t) and v(t) • kinetic energy 1 T (t) = mv2(t) 2 • potential energy 1 T (t) = F 2(t) 2k • energy loss due to friction
Z t Z t Z t 1 Z t T (t) = P (s)ds = F (s)v(s)ds = b v2(s)ds = F 2(s)ds 0 0 0 b 0 13 / 45 Mechanical – translational Interconnection laws for F (t) and v(t) • sum of forces; same velocity (series connection)
F = F1 + F2
v1 = v2
• sum of velocities; same force (parallel connection)
F1 = F2
v = v1 + v2 14 / 45 Mechanical – translational
Transformations laws for F (t) and v(t) • levers
`2 F1 = − F2 `1 `1 v1 = − v2 `2 • pulleys
1 F = F 1 2 2 1 v = − v 1 2 2 15 / 45 Mechanical – rotational
Basic quantities: • Angular Velocity ω(t) (radians per second) • Torque M(t) (newton · meter)
• Power P (t) = M(t) · ω(t) 16 / 45 Mechanical – rotational
Basic laws relating M(t) and ω(t) • Newton second law d 1 Z t J ω(t) = M(t) ⇐⇒ ω(t) = M(s)ds dt J 0 • torsion of a body
1 d Z t M(t) = ω(t) ⇐⇒ M(t) = k ω(s)ds k dt 0
• rotational friction (typically nonlinear)
M(t) = h(ω(t)) 17 / 45 Mechanical – rotational
Energy storage laws for M(t) and ω(t) • rotational energy 1 T (t) = Jω2(t) 2 • torsional energy 1 T (t) = M 2(t) 2k • energy loss due to rotational friction
Z t Z t T (t) = P (s)ds = M(s)ω(s)ds 0 0 18 / 45 Mechanical – rotational Interconnection laws for M(t) and ω(t) • sum of torques; same angular velocity (series connection)
M = M1 + M2
ω1 = ω2
• sum of velocities; same force (parallel connection)
M1 = M2
ω = ω1 + ω2 19 / 45 Mechanical – rotational
Transformations laws for M(t) and ω(t) • gears
M1 = rM2 1 ω = − ω 1 r 2
• “gyrator”
My = rωz 1 ω = − M y r z 20 / 45 Flow system
Basic quantities: • Flow Q(t) (cubic meters per second) • Pressure p(t) (newton per square meter)
• Power P (t) = p(t) · Q(t) 21 / 45 Flow system Basic laws relating p(t) and Q(t) • Newton second law ρ` d 1 Z t Q(t) = p(t) ⇐⇒ Q(t) = p(s)ds A dt Lf 0 |{z} Lf =inertance
• pressure of a liquid column
A d 1 Z t p(t) = Q(t) ⇐⇒ p(t) = Q(s)ds ρg dt Cf 0 |{z} Cf =capacitance
• flow resistance (laminar flow)
p(t) = Rf Q(t) |{z} flow resistance 22 / 45 Flow system
Energy storage laws for p(t) and Q(t) • kinetic energy (fluid in a tube) 1 T (t) = L Q2(t) 2 f • potential energy (fluid in a tank) 1 T (t) = C p2(t) 2 f • energy loss due to flow resistance
Z t Z t T (t) = P (s)ds = p(s)Q(s)ds 0 0 23 / 45 Flow system
Interconnection laws for p(t) and Q(t) • series connection
p = p1 + p2
Q1 = Q2
• parallel connection
p1 = p2
Q = Q1 + Q2 24 / 45 Flow system
Transformations laws for p(t) and Q(t) • flow transformer
p1 = rp2 1 Q = Q 1 r 2
where r = A2/A1 25 / 45 Analogies among physical domains
Electrical Mechanical Mechanical Hydraulic Thermal translational rotational flow current velocity angular volume heat flow velocity flow effort voltage force torque pressure temperature power power power power power power · temperature inductive inductor inertia moment of inertia of −− element inertia fluid capacitive capacitor spring torsional tank heat element spring storage resistive resistor friction friction friction thermal element resistance transformer transformer lever gears transducer −− gyrator gyrator −− gyro −− −− 26 / 45 Conversions among domains
• Mechanical (translational) – Hydraulics
transformer:
1 p = F A Q = A v • Mechanical (rotational) – Electrical
gyrator:
M = k i 1 ω = u k 27 / 45 Analogies among physical domains
• two "power" variables 1. flow f = i, v, ω, Q, q 2. effort e = u, F, M, p, T
• their product: power
e · f = u · i, F · v, M · ω, p · Q, T · q 28 / 45 Analogies, cont’d
• three energy "exchange" relationships 1. inductance =⇒ effort storage
df 1 1 Z t = e =⇒ f(t) = e(s)ds dt α α 0 2. capacitance =⇒ flow storage
de 1 1 Z t = f =⇒ e(t) = f(s)ds dt β β 0 3. resistance =⇒ loss of energy
e = γf (possibly nonlinear: e = h(f)) 29 / 45 Bond graphs
Bond graph theory: an exchange of energy is a bond
−−−e* f
• line = connection between parts of the system • above the line (harpoon side): effort • below the line: flow • direction of half arrow = direction of energy flow (i.e., direction in which power p = e · f is positive)
−−u* −−−F* −−−M* −−−p* −−T* i v ω Q q 30 / 45 Bond graphs for energy exchanges
• bond graph for effort storage: I-type element 1 Z t f(t) = e(s)ds ⇐⇒ −−−e* I : α α 0 f • bond graph for flow storage: C-type element 1 Z t e(t) = f(s)ds ⇐⇒ −−−e* C : β β 0 f • bond graph for resistive elements: R-type element
e(t) = γ f(t) ⇐⇒ −−−e* R : γ f 31 / 45 Bond graphs for sources
• bond graph for effort source e Se −−−−* system ] f
• bond graph for flow source e Sf −−−−* system ] f 32 / 45 Bond graphs for junctions
bond graph for series connection: s - junction
e2 f2 ...... e1 ...... s f . 1 ......
en fn
f1 = f2 = ... = fn =⇒ common flow
e1 + e2 + ... + en = 0
outgoing harpoon at ej: change sign to ej in the summation 33 / 45 Bond graphs for junctions
bond graph for parallel connection: p - junction
e2 f2 ...... e .. 1 ...... p f . 1 ......
en fn
e1 = e2 = ... = en =⇒ common effort
f1 + f2 + ... + fn = 0
outgoing harpoon at fj: change sign to fj in the summation 34 / 45 Bond graphs for transformer and gyrators
• bond graph for transformer: TF - junction
−−−−e1 * TF −−−−e2 * f1 f2 1 e = ne , f = f 2 1 2 n 1 • bond graph for gyrator: GY - junction
−−−−e1 * GY −−−−e2 * f1 f2
1 e = rf , f = e 2 1 2 r 1 Both conserve power 35 / 45 Bond graphs and ports
Edges (bonds) of the bond graph are connecting points (or ports) of the system. The number of ports can be
• one port: Se, Sf , C, I, R • two ports: TF , GY • multiport: s-junction, p-junction 36 / 45 Example: electrical circuit / hydraulic system 37 / 45 Example: electrical circuit 37 / 45 Example: electrical circuit 38 / 45 Example: an hydraulic system 38 / 45 Example: an hydraulic system 39 / 45 State space description
Is it possible to obtain a state space description out of a bond graph?
Information flow in a state space model
x˙ = f(x, u)
• for given x och u it is possible to compute x˙?
• in a bond graph: causality marking 40 / 45 Information flow
Information flow for bond graphs of C , I, and Se, Sf types:
| {z } integral causality 41 / 45 Causality
Causal strokes
• “A sets e and B sets f” (i.e., A is of C and Se types)
• “B sets e and A sets f” (i.e., A is of I and Sf types) 42 / 45 Causality, cont’d
• Bond graphs with fixed causality strokes: 1. sources
2. C and I type
3. transformers
4. gyrators 43 / 45 Causality, cont’d
• Causality at junctions 1. s-junctions
2. p-junctions 44 / 45 Causality, cont’d
• Elements with free causality 1. R-type – e can be computed from a given f – f can be computed from a given e – certain nonlinearities may constitute an exception
e = φ(f) f = φ−1(e) 45 / 45 Bond graphs
Meaning of bond graphs: • describes various physical domains in the same way • expresses simple addition rules for effort and flow variables • illustrates the structure of a system from its components • translates physical laws into graphical interactions • formalism prone to object-oriented programming Claudio Altafini www.liu.se