System Analysis through Bond Graph Modeling Robert McBride May 3, 2005 Overview • Modeling – Bond Graph Basics – Bond Graph Construction • Simulation • System Analysis – Efficiency.

Download Report

Transcript System Analysis through Bond Graph Modeling Robert McBride May 3, 2005 Overview • Modeling – Bond Graph Basics – Bond Graph Construction • Simulation • System Analysis – Efficiency.

System Analysis through Bond
Graph Modeling
Robert McBride
May 3, 2005
Overview
• Modeling
– Bond Graph Basics
– Bond Graph Construction
• Simulation
• System Analysis
– Efficiency Definition and Analysis
– Optimal Control
– System Parameter Variation
• Conclusions
• References
Modeling: Bond Graph Basics
• Bond graphs provide a systematic method for
obtaining dynamic equations.
– Based on the 1st law of thermodynamics.
– Map the power flow through a system.
– Especially suited for systems that cross multiple
engineering domains by using a set of generic variables.
– For an nth order system, bond-graphs naturally produce n,
1st-order, coupled equations.
– This method easily identifies structural singularities in the
model. Algebraic loops can also be identified.
Modeling: Bond Graph Basic Elements
• The Power Bond
 The most basic bond graph element is the power arrow or
bond.
 There are two generic variables associated with every power
bond, e=effort, f=flow.
 e*f = power.
A
e
f
Power moves from system
A to system B
B
Modeling: Bond Graph Basics
• effort/flow definitions in different engineering domains
Effort e
Flow f
Voltage [V]
Current [A]
Force [N]
Velocity [m/s]
Rotational
Torque [N*m]
Angular Velocity
[rad/sec]
Hydraulic
Pressure [N/m2]
Volumetric Flow
[m3/sec]
Chemical
Chemical Potential
[J/mole]
Molar Flow
[mole/sec]
Temperature
[K]
Entropy Flow
dS/dt [W/K]
Electrical
Translational
Thermodynamic
Modeling: Bond Graph Basic Elements
• Power Bonds Connect at Junctions.
• There are two types of junctions, 0 and 1.
5
1
4
0
3
2
11
1
13
12
Efforts are equal
Flows are equal
e1 = e2 = e3 = e4 = e5
f11 = f12 = f13
Flows sum to zero
Efforts sum to zero
f1+ f2 = f3 + f4 + f5
e11+ e12 = e13
Modeling: Bond Graph Basic Elements
• I for elect. inductance, or mech. Mass
I
• C for elect. capacitance, or mech. compliance
C
• R for elect. resistance, or mech. viscous friction
R
• TF represents a transformer
e1
• GY represents a gyrator
e1
f1
f1
• SE represents an effort source.
SE
• SF represents a flow source.
SF
TF
m
GY
d
e2
f2
e2
f2
e2 = 1/m*e1
f1 = 1/m*f2
f2 = 1/d*e1
f1 = 1/d*e2
Modeling: Bond Graph Construction
R:R1
SE
1
R:R2
0
1
SineVoltage1
C:C1
This bond graph is a-causal
I:L1
Modeling: Bond Graph Construction
Causality
• Causality determines the SIGNAL direction of both
the effort and flow on a power bond.
• The causal mark is independent of the power-flow
direction.
e
f
e
f
Modeling: Bond Graph Construction
Integral Causality
e
f
e
f
I
e
f
e
C
f
1
sI
1
sC
Integral causality is preferred when given a choice.
Modeling: Bond Graph Construction
Necessary Causality
5
1
4
0
3
1
11
2
e
Efforts are equal
e1 = e3 = e4 = e5 ≡ e2
13
12
f
Flows are equal
f11 = f13 ≡ f12
Modeling: Bond Graph Construction
R:R1
SE
1
R:R2
0
1
SineVoltage1
C:C1
This bond graph is Causal
I:L1
Modeling: Bond Graph Construction From
the System Lagrangian
• Power flow through systems of complex geometry is
often difficult to visualize.
• Force balancing methods may also be awkward due to
the complexity of internal reaction forces.
• It is common to model these systems using an energy
balance approach, e.g. a Lagrangian approach.
L  T V  0
d L L

0
dt q i qi
Question: Is there a method for mapping the Lagrangian of a
system to a bond graph representation?
Modeling: Lagrangian Bond Graph
Construction
1. Assume that the system is conservative.
2. Note the flow terms in the Lagrangian. The kinetic
energy terms in the Lagrangian will have the form ½
I * f 2 where I is an inertia term and f is a flow term.
3. Assign bond graph 1-junctions for each distinct flow
term in the Lagrangian found in step 2.
L
p

4. Note the generalized momentum terms.
q
5. For each generalized momentum equation solve for
the generalized velocity. q i
i
i
Modeling: Lagrangian Bond Graph
Construction (cont.)
6. Note the equations derived from the Lagrangian
show the balance of efforts around each 1-junction.
7. If needed, develop the Hamiltonian for the
conservative system.
8. Add non-conservative elements where needed on the
bond graph structure.
9. Add external forces where needed as bond graph
sources.
10. Use bond graph methods to simplify if desired.
Modeling: Lagrangian Bond Graph,
Gyroscope Example
L T 

1
 A  A2   A  B2 sin 2  
2
2
 C  cos    C2 cos2   C2



Modeling: Lagrangian Bond Graph,
Gyroscope Example
1. The system is already conservative.
2. Rewrite the Lagrangian to note the flow terms.


1
 A  Bsin 2   C  C cos2   C  2 
2
1
1
  A  A 2  C 2  C cos
2
2
L
. .
.
3. Form 1-junctions for θ, ψ, and φ.
4. Generalized momentums are


p 
L
  A  B  sin 2   C  C  cos2   C    C cos


p 
L
  A  A


p 
L
 C  C cos


Modeling: Lagrangian Bond Graph,
Gyroscope Example
5. Solve for the generalized velocities.
 
A  Bsin
 
p
 A  A 
 
p  C cos
2
  C  C  cos2   C 
p  C cos
C
Modeling: Lagrangian Bond Graph,
Gyroscope Example
6. Complete Lagrange Equations


d L
sin 2   C  C  cos2   C   


A

B
dt 
 2 A  B sin  cos  2C  C  sin  cos 
 C cos  C sin   0
p  
p 
. .
d L
 C  C cos  C sin   0
dt 
d L
  A  A   A  B 2 sin  cos 
dt 
 C  C  2 sin  cos  C sin   0
p  
Note P*f Cross Terms
Modeling: Lagrangian Bond Graph,
Gyroscope Example
.
.
Overview
• Modeling
– Bond Graph Basics
– Bond Graph Construction
• Simulation
• System Analysis
– Efficiency Definition and Analysis
– Optimal Control
– System Parameter Variation
• Conclusions
• References
Common Bond Graph Simulation Flow Chart
Question: Does Such a Simulation Environment Exist?
Bond Graph Construction
Equation Formulation
Simulation
Environment
Simulation Code Development
Model Analysis through Simulation
The Dymola Simulation Environment
• Dymola/Modelica provides an object-oriented
simulation environment.
• Dymola is very capable of handling algebraic
loops and structural singularities.
• Dymola does not have any knowledge of bond
graph modeling. A bond graph library is
needed within the framework of Dymola.
The Dymola Bond Graph Library
• The bond graph library consists of a Dymola
model for each of the basic bond graph
elements.
• These elements are used in an object-oriented
manner to create bond graphs.
The Dymola Bond Graph Library:
Bonds
The Dymola Bond Graph Library:
Junctions
The Dymola Bond Graph Library:
Passive Elements
The Dymola Gyroscope Bond Graph Model
The Dymola Gyroscope Bond Graph Model
Gyroscopically Stabilized Platform
Gyroscopically Stabilized Platform with
Mounted Camera
Overview
• Modeling
– Bond Graph Basics
– Bond Graph Construction
• Simulation
• System Analysis
– Efficiency Definition and Analysis
– Optimal Control
– System Parameter Variation
• Conclusions
• References
System Analysis:
Servo-Positioning System
System Analysis:
Motor Dynamics
System Analysis:
Fin Dynamics
System Analysis:
Backlash Model
System Analysis:
Servo Controllers
Control Scheme 1
0.095 * z  0.999985 
z 1
@ 6000 Hz
G(Z ) 
Control Scheme 2
Y 2( z ) 
0.172 * z  0.688
@ 1200 Hz
z  0.453
System Analysis:
Servo Step Response
5 (deg) Step: Hinge Moment = -6 (N*m/deg)
5.3
5.2
5.1
Fin Position (deg)
5
4.9
4.8
4.7
4.6
4.5
NL1
NL2
4.4
0.1
0.12
0.14
0.16
0.18
0.2
Time (sec)
0.22
0.24
0.26
0.28
System Analysis:
Controller Efficiency Definition
• By monitoring the output power and
normalizing by the input power an efficiency
calculations is defined as
controller
 tf OutputPower dt 
 tf Effort * Flow dt 
tf 
Out
Out
 dt  tf  0
 dt
   0 tf
o  tf Effort * Flow dt 
o 



InputPower
dt
In
In
 0

 0

• Bond graph modeling naturally provides the
means for this analysis.
System Analysis:
Servo Step Response Efficiency
-6
1.4
x 10
5 (deg) Step: Hinge Moment = -6 (N*m/deg)
1.2
Integ(|Fin Energy|)
1
0.8
0.6
0.4
NL1
NL2
0.2
0
0
0.5
1
Time (sec)
1.5
System Analysis:
Controller Efficiency
• The power flow through a bond graph model of
the plant can be used to compare the
effectiveness of different control schemes
regardless of the architecture of the controller
design, and without limiting the analysis to
linear systems.
Question: Can the controller efficiency be used to measure
optimality of controller gain selection?
System Analysis:
Missile System
System Analysis:
Missile System Bond Graph
System Analysis:
Missile System 3-Loop Autopilot
1
1
1
System Analysis:
Missile System Dymola Model
Missile System Analysis:
Performance Index Minimization
tf





2 w A  A
2 w P 2 dt
PI   w A
A
1 ZC
ZA
2 YC
YA
3
0
0
Linear
Constraints
Gain Margin  3dB

P haseMargin  20
Overshoot 20%
Undershoot 30%
0
Missile System Analysis:
Performance Index Minimization
δ
.
θ=q
α
Sample Optimal Control
Gains and Response
Complete System: -12.92 G step response
6
4
Set 1
0.07836
0.30587
36.11504
1.13686
0.06014
3.465 dB
180˚
0%
30.00%
51.51505 (-1 + i)
51.51505 (-1 - i)
-17.17168
Set 2
0.10696
0.23254
24.68886
1.10027
0.06105
3.000 dB
61.535˚
0.92%
25.60%
32.68964 (-1 + i)
32.68964 (-1 - i)
-29.27869
Set 4
0.11625
0.21848
21.86830
1.09226
0.06224
3.000 dB
45.0055˚
6%
24.05%
-26.845 + 28.459i
-26.845 - 28.459i
-36.70808
2
Set 1
Set 2
Set 4
30% Undershoot
0
Missile Acceleration (G's)
Variable
KA
KR
WI
KDC
PI
Gain Marg.
Phase Marg.
Overshoot
Undershoot
Pole1
Pole2
Pole3
-2
-4
-6
-8
-10
-12
-14
0
0.05
0.1
0.15
Time (sec)
0.2
0.25
Sample Optimal Gain Efficiency
-6
3.5
Complete System: -12.92 G step response
x 10
Set 1
Set 2
Set 4
3
Actuator Effeciency
2.5
2
1.5
1
0.5
0
0
0.05
0.1
0.15
Time (sec)
0.2
0.25
System Analysis:
Controller Efficiency
• The efficiency signal can be used as a
benchmark when comparing efficiencies of
different gain selections.
• Constraint violation is assumed when the
efficiency signal is more proficient than the
benchmark.
Question: How do the efficiency signals compare against an
optimal control autopilot such as an SDRE design?
System Analysis:
Missile System Dymola Model
System Analysis:
Autopilot Response Comparison
-6
Complete System: -12.92 G step response
2.5
6
Complete System: -12.92 G step response
x 10
3
2
-3
Actuator Effeciency
Missile Acceleration (G's)
0
Set 2
Set 4
SDRE
30% Undershoot
-6
1.5
1
-9
Set 2
Set 4
SDRE
0.5
-12
-15
0
0.05
0.1
0.15
Time (sec)
0.2
0.25
0
0
0.05
0.1
0.15
Time (sec)
0.2
0.25
System Analysis: Varying Mass
Parameter Efficiency
• Often a system’s mass parameters change as
parts replacements are made.
• The autopilot gain selection, chosen with the
original mass parameters, may no longer be
valid for the changed system.
• The efficiency signal can be used to determine
if a controller gain redesign is necessary.
System Analysis:
Mass Parameter Variations
Complete System: -12.92 G step response
Complete System: 1 G step response
0.067
5
Xcg = 8.5
Xcg = 8.875
Xcg = 9.25
Xcg = 9.625
Xcg = 10 (Nominal)
Xcg = 10.375
Xcg = 10.75
30% Undershoot
20% Overshoot
0.065
-5
Performance Index
Missile Acceleration (G's)
0
0.066
-10
0.064
0.063
Xcg
Xcg
Xcg
Xcg
Xcg
Xcg
Xcg
0.062
-15
=
=
=
=
=
=
=
8.5
8.875
9.25
9.625
10 (Nominal)
10.375
10.75
0.061
-20
0
0.05
0.1
0.15
Time (sec)
0.2
0.25
0.06
0.04
0.06
0.08
0.1
Time (sec)
0.12
0.14
0.16
System Analysis:
Mass Parameter Variations
-6
1.4
Complete System: -12.92 G step response
x 10
1.2
Actuator Effeciency
1
0.8
0.6
0.4
Xcg
Xcg
Xcg
Xcg
Xcg
Xcg
Xcg
0.2
0
0
0.05
0.1
0.15
Time (sec)
=
=
=
=
=
=
=
0.2
8.5
8.875
9.25
9.625
10 (Nominal)
10.375
10.75
0.25
Conclusions
• A method for creating a bond graph from the system
Lagrangian was provided.
• A Dymola Bond Graph Library was constructed to
allow system analysis directly from a bond graph
model.
• A controller efficiency measurement was defined.
• The controller efficiency measurement was used to
compare controllers with different control structures
and gain sets to better determine a proper gain
set/control structure.
• The efficiency signal is also useful for determining the
need for gain re-optimization when a system
undergoes changes in its design.
References
• Cellier, F. E., McBride, R. T., Object-Oriented Modeling of Complex
Physical Systems Using the Dymola Bond-Graph Library. Proceedings,
International Conference of Bond Graph Modeling, Orlando, Florida, 2003,
pp. 157-162.
• McBride, R. T., Cellier, F. E., Optimal Controller Gain Selection Using the
Power Flow Information of Bond Graph Modeling. Proceedings,
International Conference of Bond Graph Modeling, New Orleans,
Louisiana, 2005, pp. 228-232.
• McBride, R. T., Quality Metric for Controller Design. Raytheon Missile
Systems, Tucson AZ 85734, 2005.
• McBride, R. T., Cellier, F. E., System Efficiency Measurement through Bond
Graph Modeling. Proceedings, International Conference of Bond Graph
Modeling, New Orleans, Louisiana, 2005. pp. 221-227.
• McBride, R. T., Cellier, F. E., Object-Oriented Bond-Graph Modeling of a
Gyroscopically Stabilized Camera Platform. Proceedings, International
Conference of Bond Graph Modeling, Orlando, Florida, 2003, pp. 157-223.
• McBride, R. T., Cellier, F. E., A Bond Graph Representation of a TwoGimbal Gyroscope. Proceedings, International Conference of Bond Graph
Modeling, Phoenix, Arizona, 2001, pp. 305-312.
Backups
Modeling: Lagrangian Bond Graph,
Ball Joint Table
1
1
1
1 2
2
2
2
2
2



L  I 1 sin   I 2 cos   I  I 3  mgl cos 
2
2
2
2
Modeling: Lagrangian Bond Graph,
Ball Joint Table
System Analysis:
Linear Autopilot Power IO
5 (deg) Step: Hinge Moment = 0 (N*m/deg)
5 (deg) Step: Hinge Moment = 0 (N*m/deg)
4500
4
PID1
PID2
PID3
4000
PID1
PID2
PID3
3
3500
2
Output Power (N*m/s)
Input Power (N*m/s)
3000
2500
2000
1
0
-1
1500
-2
1000
-3
500
0
0.095
0.1
0.105
0.11
0.115
0.12
0.125
Time (sec)
0.13
0.135
0.14
0.145
-4
0.1
0.11
0.12
0.13
0.14
0.15
Time (sec)
0.16
0.17
0.18
0.19
0.2
System Analysis:
Linear Autopilot Energy IO
5 (deg) Step: Hinge Moment = 0 (N*m/deg)
5 (deg) Step: Hinge Moment = 0 (N*m/deg)
0.014
400
PID1
PID2
PID3
350
0.012
300
0.01
Output Energy (N*m)
Input Energy (N*m)
250
PID1
PID2
PID3
200
150
0.008
0.006
0.004
100
0.002
50
0
0
0.05
0.1
0.15
0.2
Time (sec)
0.25
0.3
0.35
0.4
0
0.1
0.11
0.12
0.13
0.14
0.15
Time (sec)
0.16
0.17
0.18
0.19
0.2
System Analysis:
Linear Autopilot Normalized Energy
and Integral (|Normalized Energy|)
-4
-6
5 (deg) Step: Hinge Moment = 0 (N*m/deg)
x 10
6
5 (deg) Step: Hinge Moment = 0 (N*m/deg)
x 10
5
5
4
4
Integ(|Fin Energy|)
|Fin Energy|
PID1
PID2
PID3
3
3
2
2
1
1
0
0.1
0.11
0.12
0.13
0.14
0.15
Time (sec)
0.16
0.17
0.18
0.19
0.2
PID1
PID2
PID3
0
0
0.05
0.1
0.15
0.2
Time (sec)
0.25
0.3
0.35
0.4
System Analysis:
Linear Autopilot Efficiency Comparison
-8
5 (deg) Step: Hinge Moment = -6 (N*m/deg)
5.2
7
5 (deg) Step: Hinge Moment = -6 (N*m/deg)
x 10
6
5
5
Integ(|Fin Energy|)
Fin Position (deg)
4.8
4.6
4
PID1
PID2
PID3
3
4.4
2
PID1
PID2
PID3
4.2
1
4
0
1
2
3
4
5
Time (sec)
6
7
8
9
10
0
0
1
2
3
4
5
Time (sec)
6
7
8
9
10
System Analysis:
Missile Parameters