. . . . MATLAB & Simulink • • 2016 « 30 » 06.07.2015 .) ( ). – , . : MATLAB & Simulink / . .– : , 2016. – 45 . , , « » « , », , « » « ». © © © 2 o- , 2016 ., 2016 : , 2016 1. 1.1. 1.2. 1.3. 2. 2.1. 2.2. 2.3. 2.4. 2.5. 2.6. 2.7. 2.8. 3. 4. 5. ............................................................................................................................... 4 .......................................................................................... 4 ......................................................... 7 ................................................... 13 ..................................... 18 .................................................... 27 ...................................................................................................... 28 .......................................................................................... 29 .................................................................................................. 30 ......................................................................... 31 ................................................................................................. 32 ......................................................................... 33 .................................................................................................... 34 ................................................................................................... 35 ..................................................................................... 35 ...................................................... 38 ................................................................................................ 43 ................................................................... 44 3 . , , . , , , . MATLAB/Simulink . 1. ( ), . – , . : , , . – . , , , , , , . , , , . , 4 . ( ) , , . . , , . , . – . . . : . 1. , , : 5 . 2. , ( . 3). , . . 3. . , ( , ), . . , 6 , , . . , . , . . , – , . , , . . , , , . . . , , , , , , , . . , . , . 1.1. . , 7 U t Y t : Y t (1) A U t . : , , . , , . . , . , RLC , . 4 . . 4. RLC : i t d 2u t dt 2 u t R C 1 du t RC dt du t dt 1 u t dt. L 1 di t . C dt 1 u t LC . , . 8 , . X s x t e st dt , L x t 0 t ( x t s X s , ) j , – X s x t , L – . : L , L x t x1 t L x1 t L x2 t , , sL x t L x2 t sX s , 1 L x t s x t dt 1 X s . s . Y s y t U s : u t Y s . U s W s (2) y t u t ,v t an y n an 1 y n 1 ... a0 y n bmu m m ai y i i 0 bm 1u bj u m 1 l j j 0 ... b0u cl v ck v k , m, l l cl 1v n. ai y i 0 i m L bju j 0 j , l L ck v k 0 9 k (3) (4) : n ... c0v k 0 (4) L l 1 , n i 0 Y s L y t ,U s m ai s iY s l b j s jU s j 0 ck s kV s , (5) k 0 L u t ,V s L v t . (5) Wu s , Wv s : u t ,v t m Y s Wu s U s bj s j j 0 n ai s i bm s m bm 1s m 1 ... b0 , an s n an 1s n 1 ... a0 i 0 l Y s V s Wv s ck s k k 0 n ai s i cl s l cl 1 s l 1 ... c0 . an s n an 1s n 1 ... a0 i 0 , . s, , – , . . , , . . : : . 5. V s W1 s U s , Y s W s W2 s V s Y s U s : 10 Y s W1 s W2 s . W1 s W2 s U s . 6. V s Y s W1 s U s , Q s W1 s W2 s U s , Y s V s Q s Y s U s W1 s W2 s . W s W2 s U s : . 7. V s Y s U s Q s , Y s W1 s U s W2 s Y s W1 s V s , Q s Y s U s W s W2 s Y s W1 s . 1 W1 s W2 s . . , , , . , , . , . 11 xi , i 1, n X X x1 AX BU , x2 ... xn T , (6) n n, B – A – u1 u2 ... um n m, U T – . (6) . Y y1 y2 ... yr T : Y C CX DU , (7) r n D – (6) r m . (7) : . 8. (6), , « », . (6) (7), sX s Y s CX s AX s BU s , sI DU s , Y s C sI A X s A 1 BU s , X s B D U s W s sI C sI X, X s , U s ,Y s – Y, I A 1 BU s , A 1 B D, U n n, – 12 W s C sI A 1 B D – , . 1.2. , , . . . , , . . , , . : , 0, t 0, , t 0. t t dt 1. – , , : 1 t 1, t 0, 0, t 0. t 1 t d . : u t at , t 0, a 0, t 0. const, at 2 , t const, : u t 0, t 0, a 0. : u t, s 13 e st , s j , j2 1, : u t, s j e t e t cos t je t sin t. , : ej u t, t cos t ( j sin t. ) g t h t . 9). . h t . . . , – . . 9. : – , , – , : an y n an 1 y n 1 ... a0 y bmu m bm 1u m 1 ... b0u. : Y s Y s L y t ,U s W s U s , L u t , W s bm s m bm 1 s m 1 ... b0 . an s n an 1 s n 1 ... a0 14 (8) , Y s L g t 1, U s y g t t . u (8) W s g t e st dt , L g t (9) 0 . , Y s L h t U s y 1 s, L 1 t u 1 t . h t (8) L h t 1 , s W s W s sL h t . , (9) dh t , dt g t (10) . (9) (10) , . , . an y n an 1 y n 1 ... a0 y bmu m bm 1u m 1 ... b0u, bm s m bm 1 s m 1 ... b0 . an s n an 1 s n 1 ... a0 W s W j W j W j W j bm j m an j n P bm an jQ – 1 1 j m 1 ... b0 j n 1 ... a0 A , P , Q Im W j 15 – ej . , Re W j – , A P2 W j arctg Q Q2 – , – P . W j OC ( . 10), , A , . , , W j 0 , . . 10. W j – , . L L . 20 lg A ( -1 (11) ). . , 10 , . lg . , , 16 , , , , . . , s (9) W j j t g t e j : (12) dt. 0 t W j g t e 0, g t 0 j t (12) (13) dt. , , , : 1 2 g t t e j td . W j 0 g t 1 2 0 W j 1 g t , t cos t W j 1 P P Q P (15) d . (15), t e 2 j t d . jQ j sin t g t Q ej W j j t e (14) ej (14) cos t d i 1 Q Q P , (16) cos t d . P (16) , , : g t 2 P 0 17 cos t d . (17) (10) (17) 0 2 P h t t: (18) sin t d . 0 . 1.3. , . , . 11. , , , . , . , , , ». .11, , . 11, , . », « . , , « . . 11. – « », : – « », – , – , ( . 12. . 12). – 18 , – , , u t an y n an 1 y n 1 m ... a0 y bmu an y n an 1 y n bm 1u 1 m 1 ... a0 y ... b0u cl v fu t l cl 1v l 1 ... c0v, fv t , bm s m bm 1 s m 1 ... b0 . an s n an 1 s n 1 ... a0 W s Q v t an n an n 1 ... a0 1 (19) 0. . , , . , Q , s ( ). . , g t t lim g t c– d c, t0 . . , , . . , 19 , , , . , i , i 1, n , (19) : an (20) 0, i 1, n, i an 3 an 5 an an 2 an 4 0 an 1 an 3 1 n 0 0 0 0 a0 0 0 0 0 a1 0 0 0 0 a2 a0 : an 1 , an 2 , , a0 , , – , n , , 0. n : an 1 , 1 an 2 an 1 an an 3 an 2 , 3 1 an 3 an 5 4 3 an an 2 an 0 an 1 an … . , . , . ( , . 13) , G j l 2 1, j 0 , l – . . 14. 20 . 13. . 14. G j , , 1, j 0 . . . : , , , , , , , , . . , , . 21 , . , . – h t ( 1 t . 15). . 15. , , , : t ( )– , 5%): h t h t t . (21) % hmax1 h h 22 100%. (22) 20-30% . t 1 t (23) h . h t 2 , T T– (24) . t – . hmax1 h hmax 2 . h (25) n h t t – . . (19), . . 16 : min Re i i min Re i max Re i i i . (26) , , . i , , i ( . 16 ), : max tg i max i 23 i Im Re tg i i max, . (27) (28) . 16. , , . , . , . ( . 17, 18): Amax A 0 – M : 1,1 M M, . , 1,5 . – , , . – 0 A 0 0 , 2 A 0 . 2 , . , A 0 : A A 0 . , 24 t 1 2 2 . (29) . 17. L , . 18). . 18. : – , – L . 25 , ( . 18, ). , : L 20lg 1 , U U ; U (30) . . 18, . : e t y t y t (31) y t , – , y t , . – , . : ( ): t e2 I d . (32) d . (33) 0 ( ): t I e 0 ( ): t I e (34) d . 0 ( ): t e2 I (35) d . 0 t . , ( ). , 26 . , , t I f e ,u ,y (36) , d , 0 f– , , . 2. , , , bm s m bm 1s m 1 ... b0 an s n an 1 s n 1 ... a0 W s 1 1 1 k , s, , Ts 1, , T 2 s 2 2 Ts 1, 2 2 , s Ts 1 T s 2 Ts 1 k– ,T– , ( (37) – ). , , , . , an y n an 1 y n 1 ... a0 y bmu m bm 1u m 1 ... b0u, . (37) , . 1. W s k. (38) W s s. (39) W s 1 . s (40) 2. 3. 4. 27 W s 5. ( Ts 1. (41) 1 . Ts 1 (42) ) W s 6. W s T 2s2 W s 2 2 2 Ts 1. (43) 1 . 2 Ts 1 (44) 7. 0, (44) , T s 1 – , 0 1 – . , . , : W s e 2.1. . 19, 20. h t . 19. 28 s . (45) L , 20 log k , . 20. ( ) ( ), , . 2.2. . 21, 22. h t 0 0 t, c . 21. ( . 23, ), . 23, ). 29 L , , . 22. . 23. 2.3. . 24, 25. h t . 24. 30 L , , . 25. . 26. . 26. : – , – 2.4. . 27, 28. h t . 27. 31 L , , . 28. 2.5. . 29, 30. h t . 29. L , -20 -90 -1 10 100 . 30. 32 , 101 102 . 31. . 31. – RC , : – , – 2.6. . 32, 33. h t . 32. L , 40 0 90 0 10 -1 100 . 33. 33 , 101 10 2 2.7. . 34, 35. h t 1 0 t, c . 34. L , , . 35. RLC , ( m k ( . 36. 34 . 36, ). . 36, ), 2.8. . , , , . , , , . , . : W j e j cos h t 1 t j sin , L , 20 lg1 0, . 3. . . , bm s m bm 1 s m 1 ... b0 . an s n an 1 s n 1 ... a0 W s : 1. . 2. h t 3. . g t A . 4. L , . 5. Simulink. . 35 6. W j , 0, . 7. . 8. . . ) Control System Toolbox MATLAB, Simulink. LTI (Linear Time Invariant Models)- . Control System Toolbox , . , c LTI- : tf([bm, …, b1, b0], [an, …, a1, a0]), B = [bm, …, b0], A=[an, …, a0] – . , 1. 1. step(<LTI>) impulse(<LTI>) freqs(num,den,w) bode(<LTI>) pole(<LTI>) zero(<LTI>) nyquist(<LTI>) ( MATLAB ) , Simulink, Simulink Control Design, Continuous, Sources, Sinks, Simulink Simulink Library Browser, View. , : 1. . 2. MATLAB 3. tf- Simulink. , . 4. . 5. MATLAB ( – – , , . 36 .1) 6. pole zero, . 7. Simulink . 8. . 9. . 10. . 11. . , , , , , , . , : – ( – , . 2). 2. W s 1 2 3 4 W s W s W s 1 2 3 4 b3 s 3 b2 s 2 b1s b0 a3 s 3 a2 s 2 a1s a0 a4 s 4 a5 s 5 a4 s 4 a4 s 4 1 2 3 4 b2 s 2 b1s b0 a3 s 3 a2 s 2 a1s a0 1 2 3 4 b1s b0 a3 s 3 a2 s 2 a1s a0 1 2 3 4 b3 s 3 b2 s 2 b1s a3 s 3 a2 s 2 a1s a0 37 b3 0 3 1 0 b2 8 1 9 0 b1 4 0 7 6 b3 7 11 5 6 b2 5 4 5 2 b1 0 3 4 2 b0 11 1 9 0 b2 8 3 9 1 b1 2 0 4 13 b0 1 5 7 3 a5 1 0 5 1 b1 4 8 1 0 b0 1 4 2 7 a4 1 2 7 4 a4 5 0 1 2 a4 1 7 5 4 a3 1 7 8 0 a3 2 0 9 1 a3 3 4 2 5 a3 2 6 0 5 a2 7 5 11 7 a2 7 6 3 4 a2 7 9 3 4 a2 5 9 2 8 a1 9 6 0 5 a1 9 8 11 1 a1 4 1 6 8 a1 3 5 6 7 a0 1 1 9 4 a0 1 7 8 3 a0 1 5 4 7 a0 0 4 1 3 4. . W s 4s 3 3s 2 5s 7 . 3s 4 4 s3 5s 2 2 s 1 . MATLAB. 1. LTI- W B A: >> B = [4 3 5 7]; A = [3 4 5 2 1]; W = tf(B,A) W = 4 s^3 + 3 s^2 + 5 s + 7 ------------------------------3 s^4 + 4 s^3 + 5 s^2 + 2 s + 1 Continuous-time transfer function. 2. Y s U s W s 4 s 3 3s 2 5 s 7 , 3s 4 4s 3 5s 2 2 s 1 Y s 3s 4 4 s3 5s 2 2 s 1 3 y (IV) t 4 y (III) t 5y t 2y t U s 4 s 3 3s 2 5 s 7 , y t 4u (III) t 3. 3u t step(W) ( 5u t 7u t . . 37): >> step(W); grid 4. impulse(W) ( . 38): >> impulse(W); grid 5. ( . 39) ( . 40) : >> w = 0.1:0.1:30; h = freqs(B,A,w); >> Amp = abs(h); phi = angle(h); >>plot(w,Amp); grid; title('AFR'); xlabel('\omega, rad/sec'); ylabel('Amplitude'); >>plot(w,phi*180/pi); grid; title('FFR'); ylabel('\phi, deg.'); 38 xlabel('\omega, rad/sec'); Step Response 12 10 8 6 4 2 0 0 5 10 15 20 25 30 35 40 45 35 40 45 Time (seconds) . 37. Impulse Response 3 2.5 2 1.5 1 0.5 0 -0.5 -1 -1.5 0 5 10 15 20 25 30 Time (seconds) . 38. AFR 14 12 Amplitude 10 8 6 4 2 0 0 5 10 15 20 25 30 , rad/sec . 39. 6. ( . 41) , >> bode(W); grid; 39 bode(W): FFR 200 150 100 50 0 -50 -100 -150 -200 0 5 10 15 20 25 30 , rad/sec Phase (deg) Magnitude (dB) . 40. . 41. 7. pole(W), zero(W): >> pole(W) ans = -0.5000 + 0.8660i -0.5000 - 0.8660i -0.1667 + 0.5528i -0.1667 - 0.5528i >> zero(W) ans = 0.1674 + 1.2590i 0.1674 - 1.2590i -1.0848 + 0.0000i 40 8. : W s 7 0.9218s 1 0.6199s 2 0.2075s 1 s 2 1 1 . 2 s 1 3s s 1 , ( . 42). . 42. 9. Simulink . 43) ( Linear Analysis Tool, Analysis . 45.) Control Design . 43. Linear Analysis. Simulink 10. ( . 44) nyquist(W): Nyquist Diagram 15 0 dB 10 5 2 dB -2 dB -4 dB -6 dB 4 dB 6 dB 0 -5 -10 -15 -8 -6 -4 -2 0 2 Real Axis . 44. 41 4 6 8 . 45. , Simulink 11. . : 4 2 0 0 3 5 1 0 4 0 4 2 0 0 3 5 1 , 4 2 0 3 5 1, 3 0 4 2 4 2 2 3 5 , 1 MATLAB: >> del4 = [4,2,0,0;3,5,1,0;0,4,2,0;0,3,5,1]; del4 = det(del4) del4 = 12 >> del3 = [4,2,0;3,5,1;0,4,2]; del3 = det(del3) del3 = 12 >> del2 = [4,2;3,5]; del2 = det(del2) del2 = 42 4. 14 , 4 12, 12, 3 14, 2 1 4 0, , , ( . . 45). . 5. 1. . 2. . 3. . 4. . 5. . 6. . 7. . 8. . 9. . 10. . 11. . 12. . 13. . 14. . 15. , . 16. . 17. . 18. . 19. . 20. . 43 1. ., .: . « . – », 2003. – 752 . 2. . .: . . – , 1978. – 736 . 3. ., .– . .: 4. . . , 1991. – 332 . . . .1. . – .: , 2003. – 288 . 5. : 5- . .1: , . . . . . – , 2004. – 656 . 6. . . ., . 2.– . .1. .: , 1986. – 367 . 7. Dorf R.C., Bishop R.H. Modern Control Systems. – Prentice Hall, 2010. – 1104 pp. 44 .: MATLAB & Simulink 10.03.2016. 29,7 × 42/2 (A4). . . .- . . 3,5. . . . 4,3. Times New Roman. 2 . . 45