Code covered by the BSD License  

Highlights from
Feedback Control of Dynamic Systems, 6th Edition, Prentice-Hall, 2010

image thumbnail

Feedback Control of Dynamic Systems, 6th Edition, Prentice-Hall, 2010

by

 

MATLAB and Simulink files for the book, Feedback Control of Dynamic Systems, 6th Edition, 2010

fig6_45.m
%  Figure 6.45      Feedback Control of Dynamic Systems, 6e
%                   Franklin, Powell, Emami

%   Weighting function in Bode's gain-phase theorem

clear all;
%close all;
clf

coth=0*ones(1,101);
u=-6:.02:6;
length(u);
for i=1:1:601,
num=exp(.5*abs(u(i)))-exp(-.5*abs(u(i)));
den=exp(.5*abs(u(i)))+exp(.5*abs(u(i)));
tanhu=num/den;
if i == 301, tanhu=.000001; end   % prevents div by zero error
cothu=1/tanhu;
coth(1,i)=log(cothu);
end;
ii=[1:300 302:601];
plot(u(ii),coth(ii));
xlabel('u');
ylabel('W(u)');
title('Fig. 6.45 Weighting function in Bode s gain-phase theorem');
nicegrid;

Contact us