% Generates Fig 4.19 % Computer Controlled Systems (3rd ed) % Author: B. Wittenmark % Last edit: 1997-07-02 % Copyright (c) 1996 by K. J. Åström, B. Wittenmark and % Department of Automatic Control, Lund Institute of % Technology, Lund, Sweden close all; clear all; %block419; newplot; set(gcf,'PaperUnits','centimeters','PaperPosition',[2 2 13 8]) set(gcf,'Units','centimeters','position',get(gcf,'PaperPosition')) lw=2; J1=10/9; J2=10; k=1; d=0.1; kI=1; om0=sqrt(k*(J1+J2)/(J1*J2)); al=J1/(J1+J2); be1=d/(J1*om0); be2=d/(J2*om0); ga=kI/(J1*om0); de=1/(J1*om0); clf; x0=[0 1 0]; % [t,x,y]=sim('block419',[0, 75]); subplot(1,1,1) plot(t,y(:,1),'k','Linew',lw); axis([0,75,0,0.2]); %title(['Fig 4.19']); set(gca,'Fontsize',9,'Fontname','NewCenturySchlbk'); set(gca,'xtick',[0 25 50 75]); set(gca,'ytick',[0 0.1]); xlabel('Time','Fontname','NewCenturySchlbk','Fontsize',9) ylabel('Output','Fontname','NewCenturySchlbk','Fontsize',9) drawnow;