欢迎来到天天文库
浏览记录
ID:44229850
大小:1.48 MB
页数:23页
时间:2019-10-19
《matlab自动控制仿真课设》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、一阶系统:ToWorkspace2GainToWorkspace2hoklonbUG1诜G2_bode(G)H>gure(一rmargin(G)-Magnitude(dB)500,50BodeDiagramGmnsdB(a二nfrad/sec)-Pmn56.3deg(ai0.666rad'sec)soPhase(deg)2X00Frequency(rad/sec)onum丄obcHen丄一二blHif(num」den)_bode(Gl)Bgure(一)holdon;num1x1」;den1x10」Q2Hsn
2、um1CLen1)一bode(G2);figure(lh1・522・5Time(sec)rlumHobokden丄二」;Gl"tf(num"den)G3ufeedback(G1125)SOP(G3);figure(2)hoki03-num】丄二八denlAl0一八G2Htf(num「den1)八GHG7GWG4Hfeedback(G1许GNL25)sHp(G4hfiguAl);SCDPResponsesysQnrG3Fina-vacw0.4StepResponse3、0.50.40.30.2System:G4FinalValue:0.881012Time(sec)T『anstarFcn1Signal1—.1.0.8sTransferFenScopeSignalBuilderToWorkspace?0.80.70.60.50.40.3二阶系统:12345678ToWorkspace2Gain1.210.80.60.40.20GainSignalBuilderGain21.510.551015202530nl=[8]dl=[l24]Gl=tf(nl,dl)bode(G1)h4、oldonfigure(1)n2=[l,12]d2=[1,16,0]G2=tf(n2,d2)bode(G2)holdonfigure(l)G=GPG2bode(G)holdonfigure(1)margin(G)(6OP)oseqdBodeDiagramGm=2.82dB⑻2.04rad/sec),Pm=20.7deg(at1.69rad/sec)0-50-100-150-2000-90-180-27010'110°101102103Frequency(rad/sec)G=tf([8],[l241)G1=f5、eedback(G,0.5)step(G1)figure(1);holdonG2=tf([l12],[1160])G3=G*G2;G4=feedback(G3,0.5)step(G4);figure(2);holdon1.4①pru_-dluvStepResponse123456Time(sec)①pru_-dluvStepResponse离散:一阶AmplitudeoooCHorooocoSQPResponseTime(sec)numHobolden"一二Gp卫f(num"den)八TSHirrGpdHC6、2d(GP"TS)figured)rocus(Gpd)rpo-esITrocfind(Gpd)kcr=4.9wcr=20Tcr=2关3・14、wcr;kpuo.6*kcr;TH-0.5关Tcr!Tduo・125*TCr»kll-kp*TS/Ti;kdHkp诧Td/Ts八ZHtf(N「TS);Gcdukp+tf(k*z、Nl))+tf(kd*(z—1)、z)GduGpd游GcdGCoseufeedback(Gds1.25)八figure(2)srep(GCose)皤。Edgo/IAOHco-J0.350.307、.250.20.150.10.05QI丨丨丨丨丨丨i丨i11.11.21.31.41.51.61.71.81.92Gain101214161820二阶离散系统:num=[8]den=[l24JGp=tf(num,den);Ts=0.001;Gpd=c2d(Gp,Ts)figure(l)rlocus(Gpd)[k,poles]=rlocfind(Gpd)kcr=40.5wcr=&5Tci•二2*3.14/wcr;kp=0.6*kcr;Ti=0.5*Tcr;Td=0.125*Tcr;ki=kp*Ts/Ti;kd8、=kp*Td/Ts;z=tf('z',Ts);Gcd=kp+tf(ki*z/(z-1))+tf(kd*(z-l)>/z)Gd=Gpd*Gcd;Gclose=feedback(Gd,1/2);figure(2)step(Gclose):innalOnildArGain
3、0.50.40.30.2System:G4FinalValue:0.881012Time(sec)T『anstarFcn1Signal1—.1.0.8sTransferFenScopeSignalBuilderToWorkspace?0.80.70.60.50.40.3二阶系统:12345678ToWorkspace2Gain1.210.80.60.40.20GainSignalBuilderGain21.510.551015202530nl=[8]dl=[l24]Gl=tf(nl,dl)bode(G1)h
4、oldonfigure(1)n2=[l,12]d2=[1,16,0]G2=tf(n2,d2)bode(G2)holdonfigure(l)G=GPG2bode(G)holdonfigure(1)margin(G)(6OP)oseqdBodeDiagramGm=2.82dB⑻2.04rad/sec),Pm=20.7deg(at1.69rad/sec)0-50-100-150-2000-90-180-27010'110°101102103Frequency(rad/sec)G=tf([8],[l241)G1=f
5、eedback(G,0.5)step(G1)figure(1);holdonG2=tf([l12],[1160])G3=G*G2;G4=feedback(G3,0.5)step(G4);figure(2);holdon1.4①pru_-dluvStepResponse123456Time(sec)①pru_-dluvStepResponse离散:一阶AmplitudeoooCHorooocoSQPResponseTime(sec)numHobolden"一二Gp卫f(num"den)八TSHirrGpdHC
6、2d(GP"TS)figured)rocus(Gpd)rpo-esITrocfind(Gpd)kcr=4.9wcr=20Tcr=2关3・14、wcr;kpuo.6*kcr;TH-0.5关Tcr!Tduo・125*TCr»kll-kp*TS/Ti;kdHkp诧Td/Ts八ZHtf(N「TS);Gcdukp+tf(k*z、Nl))+tf(kd*(z—1)、z)GduGpd游GcdGCoseufeedback(Gds1.25)八figure(2)srep(GCose)皤。Edgo/IAOHco-J0.350.30
7、.250.20.150.10.05QI丨丨丨丨丨丨i丨i11.11.21.31.41.51.61.71.81.92Gain101214161820二阶离散系统:num=[8]den=[l24JGp=tf(num,den);Ts=0.001;Gpd=c2d(Gp,Ts)figure(l)rlocus(Gpd)[k,poles]=rlocfind(Gpd)kcr=40.5wcr=&5Tci•二2*3.14/wcr;kp=0.6*kcr;Ti=0.5*Tcr;Td=0.125*Tcr;ki=kp*Ts/Ti;kd
8、=kp*Td/Ts;z=tf('z',Ts);Gcd=kp+tf(ki*z/(z-1))+tf(kd*(z-l)>/z)Gd=Gpd*Gcd;Gclose=feedback(Gd,1/2);figure(2)step(Gclose):innalOnildArGain
此文档下载收益归作者所有