% Fig. 6.47   Feedback Control of Dynamic Systems, 8e 
%             Franklin, Powell, Emami
%

clear all;
%close all;
clf
 
w=logspace(-3,1,100);

num0 = [ 1];
den0 = [1 0 0];

num1 = [20 1];
den1= [1 0 0];

figure(1)

bode(num0,den0,w);

grid on;
set(findall(gcf,'type','line'),'linewidth',3);

%subplot(211)
%axis([1e-3 1e1 -50 150]);

%subplot(212)
%axis([1e-3 1e1 -200 80]);

xlabel('\omega (rad/sec)');
ylabel('Magnitude, |G|');
title('Open-loop transfer function.');


figure(2)
bode(num1,den1,w);

%[m,p]=bode(num,den,w);
%loglog(w,m,'LineWidth',2);

grid on;
set(findall(gcf,'type','line'),'linewidth',3);

xlabel('\omega (rad/sec)');
ylabel('Magnitude, |D_cG|');
title('Compensated open-loop transfer function.');
