21
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

BOND GRAPH MODELING AND SIMULATION IN MECHATRONICS …

  • Upload
    others

  • View
    9

  • Download
    0

Embed Size (px)

Citation preview

Page 1: BOND GRAPH MODELING AND SIMULATION IN MECHATRONICS …

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

Page 2: BOND GRAPH MODELING AND SIMULATION IN MECHATRONICS …

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

Page 3: BOND GRAPH MODELING AND SIMULATION IN MECHATRONICS …

iq ia=0

i2

i2 ir

ic C

R

Ua

U2 A

Operational Amplifier

Housing

Piezoelectric Cristal

Oscillator ü

ÿ

Piezoelectric Sensor

Page 4: BOND GRAPH MODELING AND SIMULATION IN MECHATRONICS …

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

Page 5: BOND GRAPH MODELING AND SIMULATION IN MECHATRONICS …

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

Page 6: BOND GRAPH MODELING AND SIMULATION IN MECHATRONICS …

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=

..

Page 7: BOND GRAPH MODELING AND SIMULATION IN MECHATRONICS …

ü

ÿ

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

Page 8: BOND GRAPH MODELING AND SIMULATION IN MECHATRONICS …

CAMP-G Sensor Model

Mechanical Oscillator

Piezoelectric Transformation

Operational Amplifier

Page 9: BOND GRAPH MODELING AND SIMULATION IN MECHATRONICS …

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

Page 10: BOND GRAPH MODELING AND SIMULATION IN MECHATRONICS …

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)

Page 11: BOND GRAPH MODELING AND SIMULATION IN MECHATRONICS …

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

Page 12: BOND GRAPH MODELING AND SIMULATION IN MECHATRONICS …

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)] ]

Page 13: BOND GRAPH MODELING AND SIMULATION IN MECHATRONICS …

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

Page 14: BOND GRAPH MODELING AND SIMULATION IN MECHATRONICS …

K PID Ra La

Ja Jr br ba k

-

Electromechanical Actuator

Page 15: BOND GRAPH MODELING AND SIMULATION IN MECHATRONICS …

Input voltage

Inductor

Resistor

Motor

Bearings Friction

Rotor Inertia

Flexible Shaft

Load

Friction

Page 16: BOND GRAPH MODELING AND SIMULATION IN MECHATRONICS …
Page 17: BOND GRAPH MODELING AND SIMULATION IN MECHATRONICS …

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];

Page 18: BOND GRAPH MODELING AND SIMULATION IN MECHATRONICS …

Computer Generated C and D matrices

% f12=P12/I12 C(1,:) = [1/I12,0,0,0]; D(1,:) = [0];

Page 19: BOND GRAPH MODELING AND SIMULATION IN MECHATRONICS …

-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

Page 20: BOND GRAPH MODELING AND SIMULATION IN MECHATRONICS …

Controller output and input signals

Page 21: BOND GRAPH MODELING AND SIMULATION IN MECHATRONICS …

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