您好,欢迎访问三七文档
当前位置:首页 > IT计算机/网络 > 数据库 > 自动控制理论课程设计超前串联校正设计
一.题目004已知单位负反馈系统的开环传递函数为)5.0(4)(0SSSG,试对系统进行超前串联校正设计,使之满足:(1)闭环主导极点的阻尼比ζ=0.5;(2)自然振荡角频率wn=5rad/s;(3)静态速度误差系数Kv=50rad/s。二.校正前系统分析编程绘制其单位阶跃响应曲线,根轨迹,奈氏图如下:num=4;den=conv([1,0],[1,0.5]);G0=tf(num,den);G=feedback(G0,1);figure(1);step(G);figure(2);rlocus(G0);figure(3);nyquist(G0)2.1单位阶跃响应图1..校正前单位阶跃响应由图可知上升时间tr=0.567s,峰值时间tp=1.61s,超调量σ%=67..2%,调节时间ts=14.7s(2%的允许误差),系统稳态误差ess=0。2.2根轨迹图图2闭环根轨迹使系统稳定的根轨迹增益范围为k0。3.3奈氏图奈氏图不包括(-1,0),所以系统稳定。应用Matlab绘制出开环系统Bode图,程序如下:4.4开环波特图num=4;den=conv([1,0],[1,0.5]);w=logspace(-2,3,100);bode(num,den,w);gridon;[mag,phase,w]=bode(num,den,w);magdB=20*log10(mag);[Gm,Pm,Wcg,Wcp]=margin(mag,phase,w)%求系统的幅值裕量、相角裕量及其所对应的频率mr=max(mag)%求谐振峰值wr=spline(mag,w,mr)%求谐振频率运行结果:幅值裕量:Gm=1.6482e+006幅值裕量:Pm=14.2694穿越频率:Wcg=2.5676e+003剪切频率:Wcp=1.9688谐振峰值:mr=799.8400谐振频率:wr=0.0100图3开环波特图校正前系统的相角裕量γ=14.2694°,幅值裕量20lgkg=1.6482*10^6。5.5闭环波特图num=4;den=[1,0.5,4];w=logspace(-2,3,100);bode(num,den,w);gridon;[mag,phase,w]=bode(num,den,w);magdB=20*log10(mag);[Gm,Pm,Wcg,Wcp]=margin(mag,phase,w)mr=max(mag)wr=spline(mag,w,mr)运行结果:幅值裕量:Gm=1.6482e+006幅值裕量:Pm=20.7044穿越频率:Wcg=2.5676e+003剪切频率:Wcp=2.7906谐振峰值:mr=3.7852谐振频率:wr=1.8738三.校正装置的设计3.1校正装置参数的确定设计串联超前环节校正装置的传递函数:11sTpsTzKcGc由50)(*)(0*lim0sGcsGsKvs得Kc=6.25。为使校正后系统的根轨迹能经过期望闭环主导极点,其闭环特征方程跟必须满足幅值和相角条件,即jjeeMTpsTzsKcsGSGc111)(0)(0011,式中,M0是校正前系统在1s处的幅值,θ0是对应的相角。令111jeMs,代入得)1(11101101PjjcjzjTeMeMKeTeM解得0sin)sin(sin101001MMKMKTcCZ;0sin)sin(sin11010MMKTcp3.2串联校正设计过程(1)用Matlab编辑满足ζ=0.5和wn=5的程序如下:子函数:functionGc=ggjx(G,s1,kc)numG=G.num{1};denG=G.den{1};ngv=polyval(numG,s1);dgv=polyval(denG,s1);g0=ngv/dgv;theta0=angle(g0);theta1=angle(s1);M0=abs(g0);M1=abs(s1);Tz=(sin(theta1)-kc*M0*sin(theta0-theta1))/(kc*M0*M1*sin(theta0));Tp=-(kc*M0*sin(theta1)+sin(theta0+theta1))/(M1*sin(theta0));Gc=tf([Tz1],[Tp1]);主程序:clearnum=4;den=conv([10],[10.5]);G=tf(num,den);zeta=0.5;wn=5;[num,den]=ord2(wn,zeta);s=roots(den);s1=s(1);kc=6.25;Gc=ggjx(G,s1,kc)%求超前校正环节的传递函数GGc=G*Gc*kc;G1=feedback(G,1)%求校正前系统的闭环传递函数G2=feedback(GGc,1)%求校正后系统的闭环传递函数figure(1)step(G2,'b');holdon;step(G1,'r--');figure(2)numGGc=GGc.num{1};denGGc=GGc.den{1};rlocus(numGGc,denGGc,'b')holdonnumG=G.num{1};denG=G.den{1};rlocus(numG,denG,'r--')figure(3)numGGc=GGc.num{1};denGGc=GGc.den{1};bode(numGGc,denGGc,'b')holdon;numG=G.num{1};denG=G.den{1};bode(numG,denG,'r--')figure(4)bode(G1,'b');holdon;bode(G2,'r--');figure(5)numGGc=GGc.num{1};denGGc=GGc.den{1};nyquist(numGGc,denGGc,'b')holdon;numG=G.num{1};denG=G.den{1};nyquist(numG,denG,'r--')运行结果:0.18s+1----------------5.435e-017s+1Transferfunction:4---------------s^2+0.5s+4Transferfunction:4.5s+25-------------------------------5.435e-017s^3+s^2+5s+25(2)校正前后比较图:051015202500.20.40.60.811.21.41.61.8StepResponseTime(sec)Amplitude图一.单位阶跃响应由上图可知,校正后系统的动态性能明显提高,响应速度更快,超调量和调节时间明显变小,输出响应振荡程度明显变弱,性能更好。-20-15-10-505x1015-5-4-3-2-1012345x1015RootLocusRealAxisImaginaryAxis图二.根轨迹由图得,校正后根轨迹更远离虚轴,更稳定。-100-50050100Magnitude(dB)BodeDiagramFrequency(rad/sec)10-210-1100101102103-180-135-90Phase(deg)图三.开环波特图由图可知,校正后开环系统的波特图较校正前波特图向右平移,使得原开环系统的剪切频率和相角裕量都得到有效的提高,有利于改善开环系统的性能满足校正条件。-80-60-40-20020Magnitude(dB)10-1100101102-180-135-90-450Phase(deg)BodeDiagramFrequency(rad/sec)图四.闭环波特图-100-90-80-70-60-50-40-30-20-100-1500-1000-5000500100015000dBNyquistDiagramRealAxisImaginaryAxis图五.奈氏图四.校正后系统分析由程序计算得校正装置传递函数110435.5118.0)(17sssGc,则校正后系统的开环传递函数为)110435.5)(5.0()118.0(25)(1702sssssG。编程绘制其单位阶跃响应曲线,伯德图,根轨迹,奈氏图如下,计算出有关参数:4.1单位阶跃响应StepResponseTime(sec)Amplitude01234567891000.20.40.60.811.21.41.6System:G2Peakamplitude:1.17Overshoot(%):16.8Attime(sec):0.509System:G2RiseTime(sec):0.221System:G2Time(sec):1.38Amplitude:0.95System:G2FinalValue:1由图可知上升时间tr=0.221s,峰值时间tp=0.509s,超调量σ%=16.8%,调节时间ts=1.38s(5%的允许误差),系统稳态误差ess=0。4.2根轨迹-20-15-10-505x1015-5-4-3-2-1012345x10150.40.660.820.90.9450.9740.990.9970.40.660.820.90.9450.9740.990.9972.5e+0155e+0157.5e+0151e+0161.25e+0161.5e+0161.75e+0162e+016RootLocusRealAxisImaginaryAxis由图得K>0时系统稳定。4.3奈氏图-100-90-80-70-60-50-40-30-20-100-1500-1000-5000500100015000dBNyquistDiagramRealAxisImaginaryAxis由图可知,奈氏路径不包含点(-1,j0),且在s域的右半面不存在校正后系统的零极点,系统稳定。4.4开环波特图-50050100Magnitude(dB)BodeDiagramFrequency(rad/sec)10-210-1100101102103-150-120-90System:G02PhaseMargin(deg):52.3DelayMargin(sec):0.15Atfrequency(rad/sec):6.08ClosedLoopStable?YesPhase(deg)由图得,相角裕量γ=52.3°,剪切频率:wc=6.08rad/s4.5闭环波特图-30-20-10010Magnitude(dB)100101102-135-90-450Phase(deg)BodeDiagramFrequency(rad/sec)程序如下:num=[4.5,25];den=conv([1,0],conv([1,0.5],[5.435*10^(-17),1]));G02=tf(num,den);G2=feedback(G02,1);figure(1);step(G2);axis([01001.6]);figure(2);rlocus(G02)figure(3);nyquist(G02)figure(4)bode(G02)[mag,phase,w]=bode(num,den,w);magdB=20*log10(mag);[Gm,Pm,Wcg,Wcp]=margin(mag,phase,w)mr=max(mag)wr=spline(mag,w,mr)figure(5)bode(G2)[mag,phase,w]=bode(num,den,w);magdB=20*log10(mag);[Gm2,Pm2,Wcg2,Wcp2]=margin(mag,phase,w)mr2=max(mag)wr2=spline(mag,w,mr)运行结果:Gm:无穷大Pm=52.2858Wcp=6.0811Wcg:不存在mr=22.7200wr=1Pm2=52.2858Wcp2=6.0811mr2=22.7200wr2=1四.课设总结经过几天对matlab应用软件以及相关参考资料的学习,学会了Matlab软件的基本使用,
本文标题:自动控制理论课程设计超前串联校正设计
链接地址:https://www.777doc.com/doc-2051252 .html