一节系统单位阶跃响应

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

clearallnum=1;den=[1,1];y=tf(num,den);step(0.92*y);gridon;holdon;y=0.001*[0,100,200,300,400,500,600,700,800,820,840,860,880,900,900];x=0.001*[0,140,300,460,660,880,1200,1560,2340,2660,2820,3100,4000,4400,5000];plot(x,y,'k');holdon;p=polyfit(x,y,3);yt=polyval(p,x);plot(x,yt,'r');t=0:0.01:5;yt=polyval(p,t);Index=find(yt0.632*max(yt))T=t(min(Index))xlabel('t/s'),ylabel('U/V')title('T=1s,U=-1v时单位阶跃响应')holdongridon012345600.10.20.30.40.50.60.70.80.91T=1s,U=-1V时单位响应曲线t/s(seconds)U/V时间常数T=1.15s多项式拟合x=0:0.001:5;a=-0.9204;b=0.9022;c=0.9119;yt=a*exp(-b*x)+c;Index=find(yt0.632*max(yt))T=x(min(Index))00.511.522.533.544.55-0.200.20.40.60.811.2xyfittedcurve时间常数T=1.098sclearallnum=1;den=[1,1];y=tf(num,den);step(-0.92*y);gridon;holdon;x=0.001.*[0,160,260,480,680,860,1180,1540,2180,2800,3280,4000,5600,6000];y=0.001.*[0,-100,-200,-320,-400,-500,-600,-700,-800,-840,-880,-900,-920,-920];plot(x,y,'k');holdon;p=polyfit(x,y,3);yt=polyval(p,x);plot(x,yt,'r');t=0:0.01:6;yt=polyval(p,t);Index=find(yt0.632*min(yt))T1=t(min(Index))xlabel('t/s'),ylabel('U/v')title('T=1s,U=-1v时单位阶跃响应')holdongridon0123456-1-0.9-0.8-0.7-0.6-0.5-0.4-0.3-0.2-0.10T=1s,U=1V时单位响应曲线t/s(seconds)U/v时间常数T=1.19sx=0:0.001:5;a=0.9388;b=0.8952;c=-0.9261;yt=a*exp(-b*x)+c;Index=find(yt0.632*min(yt))T1=x(min(Index))0123456-1-0.8-0.6-0.4-0.200.20.4xyfittedcurve时间常数T=1.111s

1 / 4
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功