Section 6–6 / Lead Compensation 319MATLAB Program 6–9, where num1 and den1 denote the numerator and denominator of the
system designed by Method 1 and num2 and den2 denote that designed by Method 2. Also, num
and den are used for the original uncompensated system. The resulting unit-step response curves
are shown in Figure 6–45. The MATLAB program to obtain the unit-ramp response curves of theMATLAB Program 6–9
% Unit-Step Response of Compensated and Uncompensated Systems
num1 = [12.287 23.876];
den1 = [1 5.646 16.933 23.876];
num2 = [9];
den2 = [1 3 9];
num = [10];
den = [1 1 10];
t = 0:0.05:5;
c1 = step(num1,den1,t);
c2 = step(num2,den2,t);
c = step(num,den,t);
plot(t,c1,'-',t,c2,'.',t,c,'x')
grid
title('Unit-Step Responses of Compensated Systems and Uncompensated System')
xlabel('t Sec')
ylabel('Outputs c1, c2, and c')
text(1.51,1.48,'Compensated System (Method 1)')
text(0.9,0.48,'Compensated System (Method 2)')
text(2.51,0.67,'Uncompensated System')
Outputsc1,c2, andc0.40.81.80
0 0.5 1 1.5 2 2.5
t Sec3 3.5 4 4.5 51.20.610.21.41.6Unit-Step Responses of Compensated Systems and Uncompensated SystemCompensated System (Method 1)Compensated System (Method 2)Uncompensated SystemFigure 6–45
Unit-step response
curves of designed
systems and original
uncompensated
system.