实验3.4 Nyquist Plot of G(s)=50/[(s+5)(s-2)]1.52 dB4 dB1-4 dB6 dB0.510 dB20 dB0-6 dB-10 dB-20 dB0 dB-2 dBImaginary Axis-0.5-1-1.5-5-4.5-4-3.5-3-2.5Real Axis-2-1.5-1-0.50
图3-6 Nuquist曲线图
%闭环系统单位脉冲响应
z=[];p=[-5 2];k=50;sys=zpk(z,p,k);sys2=feedback(sys,1,-1);impulse(sys2) grid on;
title('实验3.4 闭环Impulse Response of G(s)=50[(s+5)(s-2)]');
实验3.4 闭环Impulse Response of G(s)=50/[(s+5)(s-2)]6543Amplitude210-1-2-300.511.52Time (sec)2.533.54
图3-7 闭环系统脉冲响应曲线图
31 5.G?s??1Ts?2?Ts?122,?????2,T?0.11,0.5,0.1
%作波特曲线图
kosi1=2;kosi2=1;kosi3=0.5;kosi4=0.1;
num=0.01;den1=[0.01 0.2*kosi1 1]; den2=[0.01 0.2*kosi2 1]; den3=[0.01 0.2*kosi3 1]; den4=[0.01 0.2*kosi4 1]; G1=tf(num,den1); G2=tf(num,den2); G3=tf(num,den3); G4=tf(num,den4); bode(G1,G2,G3,G4);grid on; title('实验3.5 G(s) 波特曲线簇');
实验3.5 G(s) 波特曲线簇-20-40Magnitude (dB)Phase (deg)-60-80-100-1200-45-90-135-18010-1100101102103Frequency (rad/sec)
图3-8 Bode曲线簇
6. ,要求: (a) 作波特图
(b) 由稳定裕度命令计算系统的稳定裕度和,并确定系统的稳定性 (c) 在图上作近似折线特性,与原准确特性相比 (a)
32 %作波特图
G=zpk([],[0 -100 -10],31.6);bode(G);grid on;
title('实验3.6 G(s)=31.6[s(0.01s+1)(0.1s+1) ] Bode 曲线图');
实验3.6 G(s)=31.6/[s(0.01s+1)(0.1s+1) ] Bode 曲线图500Magnitude (dB)Phase (deg)-50-100-150-200-90-135-180-225-27010-1100101102103104Frequency (rad/sec)
图3-9 Bode曲线图
%计算系统的稳定裕度和
G=zpk([],[0 -100 -10],31.6);margin(G);grid on;
33 Bode DiagramGm = 70.8 dB (at 31.6 rad/sec) , Pm = 89.8 deg (at 0.0316 rad/sec)500Magnitude (dB)Phase (deg)-50-100-150-200-90-135-180-225-27010-210-1100101102103104Frequency (rad/sec)
图3-10 Bode曲线图
由图3-10得系统的稳定裕度=70.8dB, =89.8 7.已知系统结构图如图所示 : 其中:(1) (2) 要求:
(a)作波特图,并将曲线保持进行比较
(b)分别计算两个系统的稳定裕度值,然后作性能比较 解 (a)
%Matlab计算程序
Gc1=tf([1],[1]);Gc2=tf([1],[1 1 0]);G=tf([1],[1 1 0]);G11=series(Gc1,G);G22=series(Gc2,G); sys1=feedback(G);sys2=feedback(G); bode(sys1,sys2);
grid on;title('波特图曲线比较');
34 波特图曲线比较500System: sys1Frequency (rad/sec): 9.33Magnitude (dB): -38.7Magnitude (dB)-50-100-150-2000-90System: sys2Frequency (rad/sec): 9.41Magnitude (dB): -78Phase (deg)System: sys1Frequency (rad/sec): 1.69Phase (deg): -137System: sys2Frequency (rad/sec): 1.68Phase (deg): -303-180-270-36010-210-1100101102Frequency (rad/sec)
图3-11 Gc1与Gc2 Bode曲线比较图
(b) Matlab绘图程序如3_7(b).m所示 当时,系统的波特图如下所示:
Bode DiagramGm = Inf dB (at Inf rad/sec) , Pm = 90 deg (at 1 rad/sec)200Magnitude (dB)Phase (deg)-20-40-60-800-45-90-135-18010-210-1100101102Frequency (rad/sec)
图3-12 Gc1 Bode曲线图
35