您好,欢迎访问三七文档
当前位置:首页 > 行业资料 > 冶金工业 > MATLAB校正系统程序
clear;G1=tf(20,[1,0.4,0])%系统的开环传递函数G=feedback(G1,1,-1)%原系统的闭环传递函数figure(1)step(G)%原系统的单位阶跃响应figure(2)rlocus(G1)%原系统的根轨迹figure(3)margin(G1)%原系统的bode图[Gm0,Pm0,Wg0,Wc0]=margin(G1)deta=5%补偿角Phim=45-Pm0+deta%校正装置最大超前角a=sin(Phim*pi/180)alpha=(1+a)/(1-a)Wm=Wc0*alpha^(1/4)T=1/(Wm*sqrt(alpha));alpha_T=alpha*TGc=tf([alpha_T,1],[T,1])%校正装置Ga=G1*Gc%校正后的传递函数G11=feedback(G1,1);%原系统闭环传递函数Gaa=feedback(Ga,1);%校正后系统闭环传递函数figure(4)rlocus(Ga)%校正后系统的根轨迹legend('Ga')figure(5)margin(Ga)%校正后系统的频域特性[Gm,Pm,Wcm,Wpm]=margin(Ga)figure(6)step(G11,'-.k',Gaa)%原系统与校正后系统的时域特性的比较legend('G1','Ga')figure(7)bode(G1,'-.k',Gc,':',Ga)%原系统与校正后系统的频域特性的比较legend('G1','Gc','Ga')G1=20-----------s^2+0.4sContinuous-timetransferfunction.G=20----------------s^2+0.4s+20Continuous-timetransferfunction.Gm0=InfPm0=5.1214Wg0=InfWc0=4.4631deta=5Phim=44.8786a=0.7056alpha=5.7936Wm=6.9243alpha_T=0.3476Gc=0.3476s+1------------0.06s+1Continuous-timetransferfunction.Ga=6.952s+20----------------------------0.06s^3+1.024s^2+0.4sContinuous-timetransferfunction.Gm=InfPm=48.1787Wcm=InfWpm=6.9371校正前校正后
本文标题:MATLAB校正系统程序
链接地址:https://www.777doc.com/doc-2887572 .html