% Fig. 5.39  Feedback Control of Dynamic Systems, 8e 
%             Franklin, Powell, Emami
%
% script to generate Piper Dakota autopilot design step response

clf

figure(3)

s=tf('s');
sysG = 160*(s+2.5)*(s+0.7)/((s^2+5*s+40)*(s^2+0.03*s+0.06));
sysD = (s+3)/(s+20);
sysDG=sysD*sysG;
Kc=1.5;
Kp=0.3;
sysTp = feedback (Kp*sysG,1);
sysT = feedback(Kc*sysDG,1);
step(sysTp,'--')
title('Step Response')
hold on 
step(sysT)
grid on
hold off

% set(gco,'LineWidth',4)


