f :
>> p = pole (f)
:
>> [w0,zeta,p] = damp (f)
p, w0 zeta .
f
>> z = zero (f);
, . :
>> pzmap (f);
( ) () .
2 [6]:
, .
( 16, ).
( 16) [6]:
(29)
2-
.. | ||
() | ||
() | ||
() () | ||
1- () () | ||
2- (2) ( ) | , | |
() | , ζ < 1. | |
() | ||
( ) () | ||
( ) () |
, ( 1, ). [6]:
(30)
, ( 16, ). [6]:
(31)
-; -; - -
16-
Matlab tf 29 31.
Matlab. , , . :
(32)
5 Matlab
3
3 -
Matlab | |
1. Matlab (). | clear all |
2. Matlab. | clc |
3. tf. | help tf |
4. , . | which('tf') |
5. tf. | n = [n2 n1 n0] d = [1 d2 d1 d0] f = tf (n, d) |
6. , . | [n1,d1] = tfdata (f, 'v') |
7. . | z = zero (f) p = pole (f) |
8. . | k = dcgain (f) |
9. ( , , ). | b = bandwidth (f) |
10. . | f_ss = ss (f) |
11. , 1. | f_ss.d = 1 |
12. . | k1 = dcgain (f_ss) |
13. ? ? | |
14. -. | f_zp = zpk (f) |
15. , . | who whos ( ?) |
16. . | pzmap (f) |
17. ( ). | [wc,ksi,p] = damp (f) |
18. LTIViewer. | ltiview |
19. f. | File Import |
20. ( ) . | Plot Types - Impulse |
21. f_ss. | File Import |
22. , ? | Systems |
23. f. ? | Systems |
24. . | Systems |
25. . | Plot Types Step |
26. , :
|
Characteristics:
|
27. -, , . | |
28. . | File Print to Figure |
29. . | print -dmeta |
30. (Microsoft Word). | - |
31. LTIViewer. | |
32. (100 ). | w = logspace(-1, 2, 100); |
33. | r = freqresp (f, w); r = r(:); |
34. . | semilogx (w, abs(r)) |
35. . | print -dmeta |
36. (Microsoft Word). , . | |
37. , Matlab. | |
38. , 4 ( 5 ). | [u,t] = gensig('square',4); |
39. f . | lsim (f, u, t) |
40. . | print -dmeta |
41. (Microsoft Word). |
|
|
|
|
6 Simulink
Simulink . , . , , .
(Sources) (Sinks).
. , , .
. .
, 90 , Ctrl+R. Ctrl+I .
Format . Format. (Foreground color), (Background color), (Show drop shadow), (Flip name).
. , , . Delete . ( ), ().
, . , , , Ctrl, -. .
( ), . , . . Edit Copy model to clipboard. , .
, , . . ( , ) Simulation Parameters. (Stop time) (Solver options). (Sources) 4.
4 -
Constant . | |
Step , (Step Time), (Initial Value) (Final Value). | |
Ramp (Slope). (Start Time) (Initial Value). | |
Pulse Generator , (Amplitude), (Period), (Pulse Width, ), (Phase Delay). | |
Repeating Sequence , (; ) | |
Sine Wave , (Amplitude), (Frequency), (Phase) (Bias). | |
Signal Builder , , . | |
Random Number () . (Mean Value), (Variance), (Sample Time). | |
Uniform Random Number Minimum Maximum. | |
Band Limited White Noise , ( ). . (Noise Power) (Sample Time), . , , . |
(Sinks) 5
|
|
5
Display , . | |
Scope , , Matlab . |
(Continuous) 6
6
Transfer Fcn , (Numerator) (Denominator) . | |
State Space , , , (Initial conditions). | |
Zero-Pole -, (Zeros), (Poles), (Gain). | |
Integrator (Initial condition), (Lower saturation limit Upper saturation limit). , , . | |
Derivative - , . . . |
7
7
Gain , (Gain). | |
Sum , . List of signs , (+ ). ( |). | |
Trigonometric Function . | |
Manual Switch , . | |
Mux , ( ), (Number of Inputs). | |
Demux , , (Number of Outputs). |
Scope
Scope ( 17 ) . , ( ).
17 Scope
-5 5. , (, ) . .
, Data history. Limit data points, , , .
|
|
Save data to workspace Matlab , , . Variable name , . Array ( Format). , ( , , .., ).
Matlab
>> figure(1);
. , . , . Matlab
Matlab . , , . :
>> subplot(2, 1, 1);
subplot , , ( , ). (plot, title, xlabel, ylabel, legend .) .
, . ,
>> plot(x(1:20), y(11:30));
, x 1 20, y 11 30.
. ,
>> plot(x(:,1), x(:,2));
x ( ).
plot ( semilogx, semilogy, loglog) . :
>> plot(x, y, v, z);
y x, z v. . , ,
>> plot(x, y, 'b', v, z, 'g');
( y x) , ( z v) . : b - (blue ); g - (green); r - (red); c - (cyan );m - (magenta); y - (yellow); k - (black ).
, .. .
-
:
-.-
--
,
>> plot(x, y, 'b:', v, z,'g--');
, . .
title
xlabel
ylabel
.
legend . , , . legend , , . Simulink
7 Simulink
7.1
, , 18.
18 -
:
; (33)
; (34)
; (35)
. (36)
7.2 Simulink
Simulink 8
8 - Simulink
Matlab | |
1 1 Simulink Matlab simulink . | simulink |
2 2 Simulink Library Browser. | File New Model |
3 Transfer Fcn ( ) Simulink Library Browser ( Continuous) . | a. Numerator [K] b. Denominator [ 1 0] |
4 W3. | |
5 Transfer Fcn, W2, W1 W4, . , . | |
6 lab3.mdl. | File Save |
7 W4 . | Ctrl+I Ctrl+R. |
8 , W1, W2W3 . | , Format - Flip name |
9 . | , Format Background color |
10 Sum Math Operations W1. | |
11 , ( ). | , |+- List of signs |
12 Step Sources . . | |
13 0 10. | , 0 Step time 10 Final value |
14 . | , Ctrl , |
15 Scope () Sinks . 1 2. | |
16 , Scope c W2, c W3. . | , , , . |
17 , , . . | Edit Copy model to clipboard |
18 100 . | Simulation Simulation parameters 100 Stop time |
19 . | |
20 , 1 2. | |
21 , | |
22 , | |
23 , Scope Matlab , , (1 2). | Data history Variable name: Y1 (1) Y2 (2) Format: Array |
24 . | |
25 Matlab . . | figure(1); |
26 2 . subplot , , , . | subplot(2, 1, 1); |
27 Y1. plot , . , . | plot(Y1(:,1),Y1(:,2)); |
28 . | title('y1'); |
29 . LaTeX, | xlabel(', '); ylabel('\Y1, V'); |
30 , Y1, . | subplot(2, 1, 2); plot(Y2(:,1),Y2(:,2)); title(' '); xlabel(', '); ylabel('Y2, V'); |
31 . | print -dmeta |
|
|