武汉工程大学实验报告专业班号组别指导教师陈艳菲姓名同组者实验名称线性系统的频域分析实验日期第次实验一、实验目的二、实验内容三、实验结果及分析四、实验心得与体会一、实验目的1.熟练掌握用MATLAB语句绘制频域曲线。2.掌握控制系统频域范围内的分析校正方法。3.掌握用频率特性法进行串联校正设计的思路和步骤。二,实验内容。1.某单位负反馈控制系统的开环传递函数为,试设计一超前校正装置,使校正后系统的静态速度误差系数,相位裕量,增益裕量绘制伯德图程序,以及计算穿越频率,相位裕量ans=相位Inf9.0406频率Inf3.1425e=5;r=50;r0=9;[gm1,pm1,wcg1,wcp1]=margin(num0,den0);phic=(r-r0+e)*pi/180;[gm1,pm1,wcg1,wcp1]=margin(num0,den0);alpha=(1+sin(phic))/(1-sin(phic))[gm1,pm1,wcg1,wcp1]=margin(num0,den0);alpha=6.1261[gm1,pm1,wcg1,wcp1]=margin(num0,den0);[gm1,pm1,wcg1,wcp1])1(4)(sssG120sKv050dBKg10lg20num0=20;den0=[2,1,0];w=0.1:1000;margin(num0,den0)grid;原系统的伯德图:num/den=1.2347s+1-------------0.20154s+1校正之后的系统开环传递函数为:num/den=6.1734s+5-------------------------------------------0.20154s^4+1.6046s^3+3.4031s^2+2s10-210-1100101-180-135-90System:untitled1Frequency(rad/sec):3.13Phase(deg):-171Phase(deg)BodeDiagramGm=InfdB(atInfrad/sec),Pm=9.04deg(at3.14rad/sec)Frequency(rad/sec)-20020406080System:untitled1Frequency(rad/sec):2.97Magnitude(dB):0.95Magnitude(dB)alpha=6.1261;[il,ii]=min(abs(mag1-1/sqrt(alpha)));wc=w(ii);T=1/(wc*sqrt(alpha));numc=[alpha*T,1];denc=[T,1];[num,den]=series(num0,den0,numc,denc);[gm,pm,wcg,wcp]=margin(num,den);printsys(numc,denc)disp('УÕýÖ®ºóµÄϵͳ¿ª»·´«µÝº¯ÊýΪ:');printsys(num,den)[mag2,phase2]=bode(numc,denc,w);[mag,phase]=bode(num,den,w);subplot(2,1,1);semilogx(w,20*log10(mag),w,20*log10(mag1),'--',w,20*log10(mag2),'-.');grid;ylabel('·ùÖµ(db)');title('--Go,-Gc,GoGc');subplot(2,1,2);semilogx(w,phase,w,phase1,'--',w,phase2,'-',w,(w-180-w),':');grid;ylabel('Ïàλ(0)');xlabel('ƵÂÊ(rad/sec)');title(['УÕýÇ°£º·ùÖµÔ£Á¿=',num2str(20*log10(gm1)),'db','ÏàλԣÁ¿=',num2str(pm1),'0';'УÕýºó£º·ùÖµÔ£Á¿=',num2str(20*log10(gm)),'db','ÏàλԣÁ¿=',num2str(pm),'0']);10-1100101102-60-40-2002040幅值(db)--Go,-Gc,GoGc10-1100101102-300-200-1000100相位(0)频率(rad/sec)矫正后系统的伯德图矫正之前系统单位阶跃响应矫正之后系统的单位阶跃响应:比较矫正前后系统的响应情况:可以看出超前矫正使系统的调节时间变短,响应更加迅速,但是超调量偏大,对改善系统的动态性能起到了巨大的作用。2.某单位负反馈控制系统的开环传递函数为3)1()(sksG,试设计一个合适的滞后校正网络,使系统阶跃响应的稳态误差约为0.04,相角裕量约为045。原系统的伯德图:ans=0.3200-30.00451.73222.7477num0=25;den0=conv([1,1],conv([1,1],[1,1]));w=logspace(-1,1.2);[gm1,pm1,wcg1,wcp1]=margin(num0,den0);[mag1,phase1]=bode(num0,den0,w);[gm1,pm1,wcg1,wcp1]margin(num0,den0)grid;由此可以看出,相位裕量小于0,系统不稳定。-40-2002040Magnitude(dB)10-1100101-270-180-900Phase(deg)BodeDiagramGm=-9.9dB(at1.73rad/sec),Pm=-30deg(at2.75rad/sec)Frequency(rad/sec)num0=25;den0=conv([1,0],conv([1,0],[1,0]));w=logspace(-1,1.2);[gm1,pm1,wcg1,wcp1]=margin(num0,den0);[mag1,phase1]=bode(num0,den0,w);[gm1,pm1,wcg1,wcp1]margin(num0,den0)grid;e=10;r=45;r0=pm1;phi=(-180+r+e);[il,ii]=min(abs(phase1-phi));wc=w(ii);beit=mag1(ii);T=10/wc;numc=[T,1];denc=[beit*T,1];[num,den]=series(num0,den0,numc,denc);[gm,pm,wcg,wcp]=margin(num,den);printsys(numc,denc)disp('УÕýÖ®ºóµÄϵͳ¿ª»·´«µÝº¯ÊýΪ:'printsys(num,den)[mag2,phase2]=bode(numc,denc,w);[mag,phase]=bode(num,den,w);subplot(2,1,1);semilogx(w,20*log10(mag),w,20*log10(mag1),'--',w,20*log10(mag2),'-.');grid;ylabel('·ùÖµ(db)');title('--Go,-Gc,GoGc');subplot(2,1,2);semilogx(w,phase,w,phase1,'--',w,phase2,'-',w,(w-180-w),':');grid;ylabel('Ïàλ(0)');xlabel('ƵÂÊ(rad/sec)');title(['УÕýÇ°£º·ùÖµÔ£Á¿=',num2str(20*log10(gm1)),'db','ÏàλԣÁ¿=',num2str(pm1),'0';'УÕýºó£º·ùÖµÔ£Á¿=',num2str(20*log10(gm)),'db','ÏàλԣÁ¿=',num2str(pm),'0']);10-1100101102-150-100-50050100幅值(db)--Go,-Gc,GoGc10-1100101102-200-1000100相位(0)频率(rad/sec)矫正后系的伯德图统矫正前系统的单位阶跃响应矫正后系统的单位阶跃响应由矫正前后系统的单位阶跃响应比较可以看出,系统进过矫正之后由不稳定变为稳定。3.某单位负反馈控制系统的开环传递函数为)2)(1()(sssKsG,试设计一滞后-超前校正装置,使校正后系统的静态速度误差系数110sKv,相位裕量050,增益裕量dBKg10lg20。原系统伯德图及程序:-150-100-50050Magnitude(dB)10-1100101102-270-225-180-135-90Phase(deg)BodeDiagramGm=1.58dB(at1.41rad/sec),Pm=5.02deg(at1.29rad/sec)Frequency(rad/sec)程序:num0=5;den0=conv([1,0],conv([1,1],[1,2]));w=logspace(-1,1.2);[gm1,pm1,wcg1,wcp1]=margin(num0,den0);[mag1,phase1]=bode(num0,den0,w);[gm1,pm1,wcg1,wcp1]margin(num0,den0)grid;ans=1.20005.02391.41421.2885系统稳定裕量过小,临界稳定。矫正后系统伯德图矫正程序及结果:num/den=14.9975s^2+9.1921s+110-1100101102-100-50050幅值(db)--Go,-Gc,GoGc10-1100101102-300-200-1000100相位(0)频率(rad/sec)校正后:幅值裕量=24.4406db相位裕量=71.5870---------------------------14.9975s^2+70.9235s+1校正之后的系统开环传递函数为:num/den=74.9877s^2+45.9604s+5-------------------------------------------------------------14.9975s^5+115.916s^4+243.7654s^3+144.8469s^2+2swc=1.4142;beit=10;T2=10/wc;lw=20*log10(w/1.58)-9.12;[il,ii]=min(abs(lw+20));w1=w(ii);numc1=[1/w1,1];denc1=[1/(beit*w1),1];numc2=[T2,1];denc2=[beit*T2,1];[numc,denc]=series(numc1,denc1,numc2,denc2);[num,den]=series(num0,den0,numc,denc);printsys(numc,denc)disp('УÕýÖ®ºóµÄϵͳ¿ª»·´«µÝº¯ÊýΪ:');printsys(num,den)[mag2,phase2]=bode(numc,denc,w);[mag,phase]=bode(num,den,w);[gm,pm,wcg,wcp]=margin(num,den);subplot(2,1,1);semilogx(w,20*log10(mag),w,20*log10(mag1),'--',w,20*log10(mag2),'-.');grid;ylabel('·ùÖµ(db)');title('--Go,-Gc,GoGc');subplot(2,1,2);semilogx(w,phase,w,phase1,'--',w,phase2,'-',w,(w-180-w),':');grid;ylabel('Ïàλ(0)');xlabel('ƵÂÊ(rad/sec)');title(['УÕýºó£º·ùÖµÔ£Á¿=',num2str(20*log10(gm)),'db','Ï