% Fig. 5.22   Feedback Control of Dynamic Systems, 8e 
%             Franklin, Powell, Emami
% script to generate Fig. 5.22 
% 

clf 

s=tf('s');

figure(1)
sys1=(1)/(s*(s+1));
rlocus(sys1)
axis([-6 2 -3 3])
title('Root Locus with P Compensation')
%hold on

figure(2)
sys2=(s+2)/(s*(s+1));
rlocus(sys2)

axis([-6 2 -3 3])
title('Root Locus with PD Compensation')
%z=0.1:.2:.9;
% wn=1:1:6;
 %sgrid(z, wn)
 %hold off
 
 
%set(0,'defaultlinelinewidth',2)
%set(findall(gcf,'Type','line'),'LineWidth',2)
%set(gco,'LineWidth',4)
 