⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fig915.m

📁 realize analysis and design for computer-controlled system
💻 M
字号:
% Generates Fig 9.15% Computer Controlled Systems (3rd ed)% Author: B. Wittenmark% Last edit: 1997-07-09% Copyright (c) 1996 by K. J. 舠tr鰉, B. Wittenmark and% Department of Automatic Control, Lund Institute of% Technology, Lund, Swedennewplot;set(gcf,'PaperUnits','centimeters','PaperPosition',[2 2 13 10])set(gcf,'Units','centimeters','position',get(gcf,'PaperPosition')) block915;lw=0.9;h=1;w=0.2;z=0.707;d=0.02;a=1;%Regulator design pole placement with Am=z2+a1m*z+a2m and%Ao=z2+a1o*z+a2mwh=w*h;z1=sqrt(1-z*z);a1m=-2*exp(-z*wh)*cos(z1*wh);a2m=exp(-2*z*wh);ams=1+a1m+a2m;ae=exp(-a*h);a1o=-2*ae;a2o=ae*ae;aos=1+a1o+a2o;amp=2+a1m;aop=2+a1o;p1=ams*aos;pp=amp*aos+ams*aop;p2p=2*(ams+amp*aop+aos);h2=h*h;s0=(p1/4-pp/2+p2p/2)/h2;s1=(-p1+2*pp-p2p)/h2;s2p=(7*p1/4-3*pp/2+p2p/2);s2=s2p/h2;r=s2p/2-a2m*a2o;r1=r-1;r2=-r;t0=ams/h2;t1=t0*a1o;t2=t0*a2o;clf;%[t,x,y]=sim('block915',[0, 150]);subplot(3,1,1);[ts,ys]=stairs(t,y(:,4));plot(t,y(:,3),'k--',t,y(:,1),'k','Linew',lw);axis([0,150,0,1.15]);%title(['Fig 9.15']);set(gca,'Fontsize',9,'Fontname','NewCenturySchlbk');set(gca,'xtick',[0 50 100 150]);set(gca,'ytick',[0 1]);ylabel('Output','Fontname','NewCenturySchlbk','Fontsize',9)drawnow;%subplot(3,1,2);plot(t,y(:,3),'k--',t,y(:,1),'k-',ts,ys,'m-','Linew',lw);axis([0,150,0.97,1.03]);set(gca,'Fontsize',9,'Fontname','NewCenturySchlbk');set(gca,'xtick',[0 50 100 150]);set(gca,'ytick',[0.98 1.02]);ylabel('Output','Fontname','NewCenturySchlbk','Fontsize',9)drawnow;%subplot(3,1,3);[ts,ys]=stairs(t,y(:,2));plot(ts,ys,'m','Linew',lw);axis([0,150,-0.05,0.05]);set(gca,'Fontsize',9,'Fontname','NewCenturySchlbk');set(gca,'xtick',[0 50 100 150]);set(gca,'ytick',[-0.05 0 0.05]);xlabel('Time','Fontname','NewCenturySchlbk','Fontsize',9)ylabel('Input','Fontname','NewCenturySchlbk','Fontsize',9)drawnow;%ylblalgn

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -