matlab and simulinkphhoang/dlh/ch_matlab va simulink.pdf · function: y = f(x) sinusgenerator: y =...

21
1 Matlab and Simulink Các khica Simulink Sum: y = x 1 + x 2 + + integrator: d q / d t = x , y = q 1/s * Multiplier: y = x 1 * x 2 c Gain: y = c * x c Constant: y = c f(x) Function: y = f ( x ) Sinusgenerator: y = sin ( t ) Subsystem: Placeholder for a subnetwork model 1 Inport: Input froman external model 1 Outport: Output to an external model

Upload: others

Post on 28-May-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Matlab and Simulinkphhoang/DLH/ch_matlab va simulink.pdf · Function: y = f(x) Sinusgenerator: y = sin (t) Subsystem: Placeholder for a subnetwork model 1 Inport: Input from an external

1

Matlab and Simulink

Các khối của Simulink

Sum: y = x1 + x2++

integrator: dq / dt = x, y = q1/s

* Multiplier: y = x1 * x2

c Gain: y = c * x

cConstant: y = c

f(x) Function: y = f(x)

Sinusgenerator: y = sin (t)

Subsystem: Placeholder for a subnetwork model

1Inport: Input from an external model

1Outport: Output to an external model

Page 2: Matlab and Simulinkphhoang/DLH/ch_matlab va simulink.pdf · Function: y = f(x) Sinusgenerator: y = sin (t) Subsystem: Placeholder for a subnetwork model 1 Inport: Input from an external

2

Sơ đồ giao động

1/s

k

1/s-+

-+

1

* *

v x 1

Hệ bậc 1 – exponential growth/decay

q

c

( ) ( )dq f q f q cqdt

= =

0c >

0c <

Page 3: Matlab and Simulinkphhoang/DLH/ch_matlab va simulink.pdf · Function: y = f(x) Sinusgenerator: y = sin (t) Subsystem: Placeholder for a subnetwork model 1 Inport: Input from an external

3

Hệ bậc 1– constant input to exponential decay

∫x + q

-c

( , ) ( )

At equilibrium,

0 = /eq

dq f q x f q x cqdt

dq x cq q x cdt

= = −

= − → =

( ) ( )difference t x cq t= −

/eqq x c=

Hệ bậc 2 - Giao động có giảm chấn

F(t)

x

d

k

m ∫F(t) + v

-d

∫ x

-k

(a) (b)

m = 1

Page 4: Matlab and Simulinkphhoang/DLH/ch_matlab va simulink.pdf · Function: y = f(x) Sinusgenerator: y = sin (t) Subsystem: Placeholder for a subnetwork model 1 Inport: Input from an external

4

Ghế của xe tảiSuspended seat of a truck

Page 5: Matlab and Simulinkphhoang/DLH/ch_matlab va simulink.pdf · Function: y = f(x) Sinusgenerator: y = sin (t) Subsystem: Placeholder for a subnetwork model 1 Inport: Input from an external

5

Page 6: Matlab and Simulinkphhoang/DLH/ch_matlab va simulink.pdf · Function: y = f(x) Sinusgenerator: y = sin (t) Subsystem: Placeholder for a subnetwork model 1 Inport: Input from an external

6

Page 7: Matlab and Simulinkphhoang/DLH/ch_matlab va simulink.pdf · Function: y = f(x) Sinusgenerator: y = sin (t) Subsystem: Placeholder for a subnetwork model 1 Inport: Input from an external

7

Page 8: Matlab and Simulinkphhoang/DLH/ch_matlab va simulink.pdf · Function: y = f(x) Sinusgenerator: y = sin (t) Subsystem: Placeholder for a subnetwork model 1 Inport: Input from an external

8

Tần số riêng (natuaral frequency) bằng độ lớn của mỗi cực - số phứcliên hợp (complex conjugate pole)

Tần số cộng hưởng (resomant freq.) bằng độ lớn của phần ảo củamỗi cực

Page 9: Matlab and Simulinkphhoang/DLH/ch_matlab va simulink.pdf · Function: y = f(x) Sinusgenerator: y = sin (t) Subsystem: Placeholder for a subnetwork model 1 Inport: Input from an external

9

Hệ số giảm chấn có thể tính theo tỉ số phần thực của cực và tần sốriêng

Độ lợi/khuyếch đại/ bằng giá trị hàm truyền khi s bằng 0

Page 10: Matlab and Simulinkphhoang/DLH/ch_matlab va simulink.pdf · Function: y = f(x) Sinusgenerator: y = sin (t) Subsystem: Placeholder for a subnetwork model 1 Inport: Input from an external

10

Độ lợi có thể được tính khi quan sátbiểu đồ Bode khi tần số gần 0

Simulink

Page 11: Matlab and Simulinkphhoang/DLH/ch_matlab va simulink.pdf · Function: y = f(x) Sinusgenerator: y = sin (t) Subsystem: Placeholder for a subnetwork model 1 Inport: Input from an external

11

Đáp ứng sóng vuông: Khối vi phân không xử lý tín hiệu không liên tục nhưsóng vuông. Sử dụng hàm truyền gần đúng với khối vi phân.

Page 12: Matlab and Simulinkphhoang/DLH/ch_matlab va simulink.pdf · Function: y = f(x) Sinusgenerator: y = sin (t) Subsystem: Placeholder for a subnetwork model 1 Inport: Input from an external

12

Đáp ứng tín hiệu tuần hoàndạng Sin

Đáp ứng bước (step)Dùng hàm truyền gầnđúng với khối vi phân

Page 13: Matlab and Simulinkphhoang/DLH/ch_matlab va simulink.pdf · Function: y = f(x) Sinusgenerator: y = sin (t) Subsystem: Placeholder for a subnetwork model 1 Inport: Input from an external

13

Thu nhận lại mô hình MATLAB từ mô hình Simulink

Page 14: Matlab and Simulinkphhoang/DLH/ch_matlab va simulink.pdf · Function: y = f(x) Sinusgenerator: y = sin (t) Subsystem: Placeholder for a subnetwork model 1 Inport: Input from an external

14

Loa (Loudspeaker)

Page 15: Matlab and Simulinkphhoang/DLH/ch_matlab va simulink.pdf · Function: y = f(x) Sinusgenerator: y = sin (t) Subsystem: Placeholder for a subnetwork model 1 Inport: Input from an external

15

Page 16: Matlab and Simulinkphhoang/DLH/ch_matlab va simulink.pdf · Function: y = f(x) Sinusgenerator: y = sin (t) Subsystem: Placeholder for a subnetwork model 1 Inport: Input from an external

16

Page 17: Matlab and Simulinkphhoang/DLH/ch_matlab va simulink.pdf · Function: y = f(x) Sinusgenerator: y = sin (t) Subsystem: Placeholder for a subnetwork model 1 Inport: Input from an external

17

Page 18: Matlab and Simulinkphhoang/DLH/ch_matlab va simulink.pdf · Function: y = f(x) Sinusgenerator: y = sin (t) Subsystem: Placeholder for a subnetwork model 1 Inport: Input from an external

18

Page 19: Matlab and Simulinkphhoang/DLH/ch_matlab va simulink.pdf · Function: y = f(x) Sinusgenerator: y = sin (t) Subsystem: Placeholder for a subnetwork model 1 Inport: Input from an external

19

Page 20: Matlab and Simulinkphhoang/DLH/ch_matlab va simulink.pdf · Function: y = f(x) Sinusgenerator: y = sin (t) Subsystem: Placeholder for a subnetwork model 1 Inport: Input from an external

20

Mô hình được thử quan sátvới nhiều tần số khác nhau.

300rad/s – 47,7 Hz

Chỉ quan sát một vùng t=1s (phải đổi default setting of running từ 10 s sang 1 s)

Page 21: Matlab and Simulinkphhoang/DLH/ch_matlab va simulink.pdf · Function: y = f(x) Sinusgenerator: y = sin (t) Subsystem: Placeholder for a subnetwork model 1 Inport: Input from an external

21