Transcript Document

CS 367: Model-Based Reasoning
Lecture 15 (03/12/2002)
Gautam Biswas
7/17/2015
1
Today’s Lecture
Last Lectures:

Modeling with Bond Graphs
Today’s Lecture:





7/17/2015
Review
Bond Graphs and Causality
State Space Equations from Bond Graphs
More Complex Examples
20-SIM
2
Review: Modeling with Bond Graphs
• Based on concept of reticulation
• Properties of system lumped into processes with distinct
parameter values
Lumped Parameter Modeling
• Dynamic System Behavior: function of energy
exchange between components
• State of physical system – defined by distribution of
energy at any particular time
Dynamic Behavior: Current State + Energy exchange
mechanisms
7/17/2015
3
Review: Modeling with Bond Graphs
Exchange of energy in system through ports



1 ports: C, I: energy storage elements; R: dissipator
2 ports: TF, GY
Exchange with environment: through sources and sinks:
Se & Sf
Behavior Generation: two primary principles
Continuity of power
 Conservation of energy
enforced at junctions: 3 ports
0- (parallel) junction
1- (series) junction

7/17/2015
4
Review: Junctions
Electrical Domain: 0- enforces Kirchoff’s current law, 1enforces Kirchoff’s voltage law
Mechanical Domain: 0- enforces geometric compatibility of
single force + set of velocities that must sum to 0;
1- enforces dynamic equilibrium of forces associated with a
single velocity
Hydraulic Domain: 0- conservation of volume flow rate, when a
set of pipes join
1- sum of pressure drops across a circuit (loop) involving a single
flow must sum to 0.
Sometimes junction structures are not obvious.
7/17/2015
5
Component Behaviors
Mechanics
Electricity
Hydraulic
Thermal
T, temperature
Effort
e(t)
F, force
V, voltage
P, pressure
Flow
f(t)
v, velocity
i, current
Q, volume
flow rate
Q , heat flow
rate
Momentum
p =e.dt
P,
momentum
, flux
p =P.dt
P.dt = Pp
Displacement
q =f.dt
x, distance
q, charge
q =Q.dt
volume
Q, heat energy
Power
P(t)=e(t).f(t)
F(t).v(t)
V(t).i(t)
P(t).Q(t)
Energy
E(p)=f.dp
E(q)=e.dq
v.dP
(kinetic)
F.dx
(potential)
i.d 
v.dq
Q.dp
P.dq
7/17/2015
Q
Q
6
Building Electrical Models
For each node in circuit with a distinct potential create a
0-junction
Insert each 1 port circuit element by adjoining it to a 1junction and inserting the 1-junction between the
appropriate of 0-junctions.
Assign power directions to bonds
If explicit ground potential, delete corresponding 0junction and its adjacent bonds
Simplify bond graph (remove extraneous junctions)
Hydraulic, thermal systems similar, but mechanical different
7/17/2015
7
Electrical Circuit: Example
7/17/2015
8
Electrical Circuits: Example 2
Try this one:
7/17/2015
9
Building Mechanical Models
For each distinct velocity, establish a 1-junction
(consider both absolute and relative velocities)
Insert the 1-port force-generating elements between
appropriate pairs of 1-junctions; using 0-junctions;
also add inertias to respective 1-junctions (be sure they
are properly defined wrt inertial frame)
Assign power directions
Eliminate 0 velocity 1-junctions and their bonds
Simplify bond graph
7/17/2015
10
Example: Mechanical Model
7/17/2015
11
Mechanical Model: Example 2
Try this one:
7/17/2015
12
Behavior of System:
State Space Equations
Linear System
x  A. x  B.u ; x : n 1 state vector
u : m 1 input vector
y  C . x  D.u
y : p 1 output vector
Nonlinear System
x  ( x, u) ; x : n 1 state vector
u : m 1 input vector
y  ( x, u)
y : p 1 output vector
7/17/2015
13
State Equations
Linear
x  A. x  B.u
x1  a11 . x1  .... a1n x n  b11u1  .... b1m um
x 2  a 21. x1  .... a 2 n x n  b21u1  .... b2 m um
..
.
x n  a n1. x1  .... a nn x n  bn1u1  .... bnm um
Nonlinear
x  ( x, u)
x 1  1 ( x1 ,...., x n , u1 ,....,um )
x 2   2 ( x1 ,...., x n , u1 ,....,um )
7/17/2015
..
.
x n   n ( x1 ,...., x n , u1 ,....,um )
14
State Space: Standard form
m. x  k. x  b. x
m. x  b. x  k. x  0
Single nth order form
Or
Write in terms of state variablesx and v
m.v  b.v  k.x
x  v
n first-order coupled
equations
In general, can have any combination in between
7/17/2015
15
More complex example
g
Fourth order form with x 2 as system variable
 k2
d4
1
1  d2
k .k
1
1
( x2 )  
 k1 ( 
)
( x 2 )  1 2 . x 2  k1 ( 
)g
dt
m1 m 2  dt
m1.m 2
m1 m 2
 m2
7/17/2015
16
More complex example (2):
Second order form with two displacements x3 and x4
m1. x3  m1. x4  k1. x3  m2 .g
m1. x3  (m1  m2 ) x4  k2 . x4  (m1  m2 ) g
First order form with x3 and x 4 , and v1 and v 2
m1.v1  k1. x3  m1. g
m 2 .v2  k1. x3  k 2 x 4  m 2 .g
x 3  v1  v 2
x 4  v 2
7/17/2015
17
Causality in Bond Graphs
To aid equation generation, use causality relations
among variables
Bond graph looks upon system variables as interacting
variable pairs
Cause effect relation: effort pushes, response is a flow
Indicated by causal stroke on a bond
A
7/17/2015
e
f
B
18
Causality for basic multiports
Note that a lot of the causal considerations are based on
7/17/2015 algebraic relations
19
Causality Assignment Procedure
7/17/2015
20
Causality Assignment: Example
7/17/2015
21
Causality Assignment: Double Oscillator
7/17/2015
22
Causality Assignment: Example 3
Try this one:
7/17/2015
23
Generate equations from Bond Graphs
Step 1: Augment bond graph by adding
1)
2)
3)
7/17/2015
Numbers to bonds
Reference power direction to each bond
A causal sense to each e,f variable of bond
24
Equation generation procedure
7/17/2015
25
Equation generation example
p 2  E (t )  e3  e 4  E (t )  R3 . f 3  e5
 E (t )  R3I.2P2 
q5
C5
q5  f 4  f 6  f 2 

7/17/2015
q
p2
 5
I 2 C 5 .R6
e6
e
p
 2 5
R6 I 2 R6
26
Equation Generation: Example 2
7/17/2015
27
H. W. Problem 1 :
k1
k2
m1
m2
b1
b2
F0(t)
Two springs, masses, & damper friction all linear.
F0(t) = f1 = constant.
Build bond graph; state equations.
Simulate for various parameter values.
7/17/2015
28
H. W. Problem 2 :
V
(a) Bond graph.
g
M
(b) Derive state equations in
terms of energy variables.
B
K
V
m
g
(c) Simulate in 20-Sim with diff.
Parameter values. Comment
on results.
k
V0(t)
7/17/2015
Input : Velocity at bottom of tire
29
Extending Modeling to other domains
Fluid Systems
e(t) – Pressure, P(t)
 f(t) – Volume flow rate, Q(t)
 Momentum, p = e.dt = Pp, integral of pressure
 Displacement, q = Q.dt = V, volume of flow
 Power, P(t).Q(t)
 Energy (kinetic): Q(t).dPp
 Energy (potential): P(t).dV
Fluid Port: a place where we can define an average pressure, P and a volume
flow rate, Q
Examples of ports: (i) end of a pipe or tube
(ii) threaded hole in a hydraulic pump

7/17/2015
30
Fluid Ports
Flow through ports transfers energy

P – force/unit area
Q – volume flow rate
P.Q = power = force . displacement / time

Moving fluid also has kinetic energy



But it can be ignored if
1 Q 2
P   ( )
2 A
Next time: fluid capacitors (tanks), resistances (pipes), and
sources (pumps)
7/17/2015
31