Upload
others
View
9
Download
0
Embed Size (px)
Citation preview
Jose J .Granda, Ph.D. Professor
Department of Mechanical Engineering California State University, Sacramento, California USA
Visiting Professor
Fachhoschule Bonn-Rhein-Sieg, University of Applied Sciences. Sankt Augustin Germany
BOND GRAPH MODELING AND SIMULATION IN MECHATRONICS SYSTEMS. AN INTEGRATED SOFTWARE TOOL: CAMP-G, MATLAB-SIMULINK
Contents Piezoelectric Sensor Dynamic Model
Computer Generated State Space (CAMP-G) Characteristic Polynomial CAMP-G/MATLAB CAMP-G/SIMULINK
Electromechanical Actuators Computer Generated A, B, C, D Matrices Computer Generated Transfer Functions
Mechanical-Hydraulic-Thermodynamic Models Internal Combustion Engine (Single Cylinder) Internal Combustion Engine (Multi Cylinder)
The Role of Bond Graph Modeling in Mechatronics
iq ia=0
i2
i2 ir
ic C
R
Ua
U2 A
Operational Amplifier
Housing
Piezoelectric Cristal
Oscillator ü
ÿ
Piezoelectric Sensor
0 0
U2 Ua
0 0
0
1
SE U2*A
ia=0
i2 i2
SF iq
C ic
Operational Amplifier Bond Graph Model
iq ia=0
i2
i2 ir
ic C
R
Ua
U2 A
iq ia=0 i2
i2 ir
ic C
R
Ua
U2 A 0 0 U2
Ua
0
1
SE 10 9
8
6
C 12
7
2iiq −=
Cdt
dUR
Ui aa
q −−=
dtdqRU
dtdURC a
a −=+
2iiq −= qifff −=−== 6711
131112 fff −=
67 ff −=
qif =6 cif =12 rif =13
iriqic −=
Cdt
dUf a=12 RUiC
dtdU a
qa −=
dtdqRU
dtdURC a
a −=+
Equivalent relations
TF 5 6 .y
.q
qK
iq ia=0
i2
i2 ir
ic C
R
Ua
U2
A
Housing
Piezoelectric Cristal
Operational Amplifier
Oscillator
ü
ÿ
Piezoelectric Transformation
yKq q=
dtdyK
dtdq
q=
..
ü
ÿ
1
1
0 1
I
Housing
I .y
.u
.uy
.−
1
0 1
I .uyy
.
r
.−=
r
.y
SE ..um−
...umym r −−
..
rym
)(..uyb −
)( uyk −I
..
rym 1
SE ..um−
.
ryb
rky
Sensor Mechanical Side Model
umkyybym rrr −=++.
Simplified Bond Graph
CAMP-G Sensor Model
Mechanical Oscillator
Piezoelectric Transformation
Operational Amplifier
Inputs vector u=[ SE1 SE10 ] State variables vector p_q=[Q3;Q12;P4]; A MATRIX [ 1 ] [ 0 0 ---- ] [ I4 ] [ ] [ 1 T5x6] [ 0 - ------- - ----] [ C12 R13 I4 ] [ ] [ 1 T5x6 R2 ] [- ---- ---- - ----] [ C3 C12 I4 ]
Camp-G State Space Model
B MATRIX [0 0 ] [ ] [0 0 ] [ ] [1 -T5x6] C MATRIX [ 1 ] [0 --- 0] [ C12 ] D MATRIX [0 0] System Order = 3 Rank of A MATRIX = 3
State Space (cont)
Characteristic Polynomial
Characteristic Polynomial
2 2
3 (C3 C12 R13 R2 + C3 I4) s (C3 T5x6 R13 + C12 R13 + C3 R2) s
s + -------------------------- + ----------------------------------
C3 I4 C12 R13 C3 I4 C12 R13
1
+ -------------
C3 I4 C12 R13
Computer Generated Transfer Function SIMULINK block
-(+T5x6)*C3*R13s
(C3*C12*R13*I4)s +(C3*C12*R13*R2+C3*I4)s +(C3*T5x6^2*R13+C12*R13+C3*R2)s+13 2
Transfer Fcn e11(s)/e1(s)
... Transfer Functions Matrix H ... [ 3 2 [- s T5x6 C2 R13/(s C2 C12 R13 I4 + (C2 C12 R13 R3 + C2 I4) s [ 2 2 / + (C2 T5x6 R13 + C12 R13 + C2 R3) s + 1) , s T5x6 C2 R13 / ( / 3 2 s C2 C12 R13 I4 + (C2 C12 R13 R3 + C2 I4) s 2 ] + (C2 T5x6 R13 + C12 R13 + C2 R3) s + 1)] ]
10-4
10-2
100
102
104
106
0
0.005
0.01
0.015Sensor Frequency Response
Hz
Mag
nitu
de
10-4
10-2
100
102
104
106
-1.5
-1
-0.5
0
0.5
1x 10
4
Hz
Pha
se
Step Response
Time (sec.)
Am
plitu
de
Time (sec.)
Am
plitu
de
Impulse Response
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
x 10-4
0
2
4
6
x 10-3
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
x 10-4
-100
0
100
200
Frequency and Time Response
K PID Ra La
Ja Jr br ba k
-
Electromechanical Actuator
Input voltage
Inductor
Resistor
Motor
Bearings Friction
Rotor Inertia
Flexible Shaft
Load
Friction
Computer generated state space equations and corresponding A and B matrices.
dP12=Q9/C9-P12/I12*R11 A(1,:) = [-1/I12*R11,0,1/C9,0]; B(1,:) = [0]; dP7=P3/I3/G4x5-P7/I7*R6-Q9/C9 A(2,:) = [0,-1/I7*R6, 1/C9,1/I3/G4x5]; B(2,:) = [0]; dQ9=P7/I7-P12/I12 A(3,:) = [-1/I12,1/I7,0,0]; B(3,:) = [0]; dP3=SE1-P3/I3*R2-P7/I7/G4x5 A(4,:) = [0,-1/I7/G4x5,0,-1/I3*R2]; B(4,:) = [1];
Computer Generated C and D matrices
% f12=P12/I12 C(1,:) = [1/I12,0,0,0]; D(1,:) = [0];
-1
s1e1(s) q12(s)
PID K +
- Electrical Mechanical
Plant
Amplifier and control
Sum ScopePulse
Generator
PID
PID Controller(with Approximate
Derivative)
s
1
Integrator
1
Gain
x' = Ax+Bu y = Cx+Du
Bond GraphActuator Model
Control System - Simulink
Controller output and input signals
CONCLUSIONS What can be done with CAMPG/MATLAB ?
• CAMP-G generated symbolic Transfer Functions useful feature for
design of control systems.
• A new tool in system sensitivity analysis using bond graphs
• Transforming a bond graph model in the form of transfer functions in the S domain, allows building close loop feed back systems in the S domain.
• if the physical model is changed, the derivation of the equations and MATLAB M files in source code form can be generated quickly using CAMP-G.
• It can save a tremendous amount of time as opposed to having to derive new equations by hand and having to modify a whole block diagram.
• The generation of MATLAB M files is oriented to produce a generalized model structure that makes it possible to simulate non-liner systems using MATLAB