学号:3110411096 实验一: 程序:
g1=tf([3],[1 4]);
g2=tf([2 96],[1 2 3]); g3=tf([2 5 1],[1 2 3]); g4=tf([5 10],[1 96]); sys1=parallel(g1,g2) sys2=series(g1,g2) sys3=feedback(g1,g2) s1=parallel(g3,g4) s2=series(g3,g4) s3=feedback(g3,g4)
结果: 并联: sys1 =
5 s^2 + 92 s + 321 ----------------------- s^3 + 6 s^2 + 11 s + 12 串联: sys2 =
6 s + 234
----------------------- s^3 + 6 s^2 + 11 s + 12 反馈: sys3 =
3 s^2 + 6 s + 9
------------------------ s^3 + 6 s^2 + 17 s + 246 并联: s1 =
7 s^3 + 181 s^2 + 426 s + 108 ----------------------------- s^3 + 80 s^2 + 159 s + 234 串联: s2 =
10 s^3 + 45 s^2 + 55 s + 10 --------------------------- s^3 + 80 s^2 + 159 s + 234 反馈: s3 =
2 s^3 + 161 s^2 + 391 s + 78 ------------------------------ 11 s^3 + 125 s^2 + 214 s + 244 实验二: 1.
①. 程序:
g=tf([5 25 30],[1 6 10 8]); impulse(g); 单位
脉冲响应:
Impulse Response543Amplitude210-101234Time (seconds)5678
step(g);
单位阶跃响应:
Step Response4.543.53Amplitude2.521.510.5000.511.522.5Time (seconds)33.544.55Step Response4.543.53AmplitudeSystem: gPeak amplitude: 4.02Overshoot (%): 7.28At time (seconds): 2.22.521.510.5000.511.522.5Time (seconds)33.544.55②. 程序:
syms s
for wn=[2,4,6,8] zeta=0.7;
figure(1)
ezplot(ilaplace(wn^2/s/(s^2+2*zeta*wn*s+wn^2)),[0 10]); hold on; end
grid on
title('wn:2,4,6,8') axis([0 10 0 1.8]) gtext('2') gtext('4') gtext('6') gtext('8')
wn:2,4,6,81.81.61.41.210.80.60.40.208642012345t6789102.根轨迹分析: 程序:
num=[1 96];
den=[1 17 30 0]; g=tf(num,den); figure(1) pzmap(g); figure(2) rlocus(g); rlocfind(g);
Pole-Zero Map10.80.60.40.20-0.2-0.4-0.6-0.8-1-80Imaginary Axis (seconds-1)-70-60-50-40-30-20-100Real Axis (seconds-1)
Root Locus600400Imaginary Axis (seconds-1)2000-200-400-600-100-80-60-40-2002040Real Axis (seconds-1)>> Untitled
Select a point in the graphics window selected_point = 0.0237 + 1.8634i 实验三: 1.
程序:
num=[500 500*96];
den1=conv([1 0],[0.5 1]); den2=conv([0.25 1],[1 1]); den=conv(den1,den2); g=tf(num,den); figure(1) margin(g); 伯德图
幅值稳定裕度-86.354dB 相角裕度为-146.28° 2. 程序: k=1/0.1;
g0=zpk([],[0 -1],k); [h0,r,wx,wc]=margin(g0) wm=4;
L=bode(g0,wm); Lwc=20*log10(L) a=10^(-0.1*Lwc) T=1/(wm*sqrt(a)); phi=asin((a-1)/(a+1))
Gc=(1/a)*tf([a*T 1],[T 1]); Gc=a*Gc; G=Gc*g0;
bode(G,'r',g0,'b--');grid; [h,r,wx,wc]=margin(G) 结果: ①:wm=4
>> Untitled h0 = Inf r =17.9642 wx = Inf wc = 3.0842 Lwc = -4.3457 a = 2.7200 phi = 0.4807 h = Inf r = 41.5761 wx = Inf wc = 4.0000 >>
Bode Diagram100Magnitude (dB)Phase (deg)500-50-100-90-135-18010-210-1100101102Frequency (rad/s)
②.wm=4.1 >> Untitled h0 = Inf r = 17.9642 wx =Inf wc = 3.0842 Lwc =-4.7623 a = 2.9939 phi =0.5227 h = Inf r = 43.6561 wx = Inf wc =4.1000 >>
Bode Diagram100Magnitude (dB)Phase (deg)500-50-100-90-135-18010-210-1100101102Frequency (rad/s)③.wm=4.2: >> Untitled h0 = Inf r = 17.9642 wx = Inf wc = 3.0842 Lwc = -5.1694 a = 3.2881 phi = 0.5628 h = Inf r =45.6410 wx = Inf wc = 4.2000 >>
Bode Diagram100Magnitude (dB)Phase (deg)500-50-100-90-135-18010-210-1100101102103Frequency (rad/s)④.wm=4.3: >> Untitled h0 = Inf r = 17.9642 wx = Inf wc = 3.0842 Lwc =-5.5675 a = 3.6037 phi = 0.6011 h =Inf
r = 47.5336 wx = Inf wc = 4.3000 >>
Bode Diagram100Magnitude (dB)Phase (deg)500-50-100-90-135-18010-210-1100101102103Frequency (rad/s)⑤.wm=4.4: >> Untitled
h0 = Inf r = 17.9642 wx = Inf wc =3.0842 Lwc = -5.9568 a =3.9417 phi = 0.6376 h = Inf r =49.3369 wx =Inf wc =4.4000 >>
Bode Diagram100Magnitude (dB)Phase (deg)500-50-100-90-135-18010-210-1100101102103Frequency (rad/s)
结论:wm=4.2时,相角裕度r = 45.6410°>45°,幅值裕度为+ᇮdB,满足设计要求。
因篇幅问题不能全部显示,请点此查看更多更全内容