Experiment No. 5 Study of The Effect of A Forward-Path Lead Compensator On The Performance of A Linear Feedback Control System
Experiment No. 5 Study of The Effect of A Forward-Path Lead Compensator On The Performance of A Linear Feedback Control System
Experiment no. 5
1. To measure the gain and phase margins of an uncompensated linear 3rd order,
type-1 system from its Bode plot.
2. To study the bode plot of a suggested forward-path lead compensator.
3. To recalculate the gain and phase margins of the compensated system.
4. To compare the step responses of the unity-feedback uncompensated and
compensated systems.
Software used:
Note the manufacturer’s name, version number and release date of the MATLAB
software in use.
0.01, a K of 100 is required. Using the Routh-Hurwitz criterion, the value of the
critical gain Kc, for which the system is critically stable, can be determined. It will be
seen that since Kc is very close to 100, the closed-loop system will exhibit very poor
relative stability. It is manifested in the form of very low gain margin (GM) and
phase margin (PM) in the frequency domain and also in the form of a highly
oscillatory step response in the time domain.
One popular way of alleviating the stability problem, without compromising the given
velocity error specification, is to add a lead compensator block with a transfer
function Gc(s)= (1+aTs)/(1+Ts), a>1, before the plant. Verify that this modification
does not change the value of Kv, and thus the value of the steady state velocity error.
There are suitable design methods to determine values of ‘a’ and ‘T’, the two
parameters of the compensator, in order that given GM and PM specifications are
met. Without going into the design techniques, we will use a = 10 and T = 0.015
(second) for this experiment.
Procedure:
1. Click on the MATLAB icon on the desktop to invoke the MATLAB program. In
command window, go to file new m-file to open the MATLAB
editor/debugger. Copy the first twelve lines of the sample program given at the
end of this section. Use the file menu of the editor to save the code with a
filename expt6.m. Now the program can be executed by going to tools run in the
editor window. From the MATLAB command window measure the values of gain
crossover frequency, phase margin, phase crossover frequency and gain margin of
the uncompensated system.
Reduce the plant gain K to 50 (= 100/2) now. Observe that the phase-vs-
frequency plot has remained unchanged, but the gain-vs-frequency plot has
shifted downwards by 6 dB (= 20 log 2). Again read the values of gain crossover
frequency, phase margin, phase crossover frequency and gain margin. Record the
data in the present and the previous paragraph in a single table.
2. Restore the value of K to 100 now. Copy five more lines of the sample program
(up to line 16). Run the program and make a free-hand sketch of the Bode plot of
the lead compensator. Using the data cursor record the values of very low
frequency gain, very high frequency gain, maximum phase lead m and the
corresponding angular frequency m.
3. Extend the program up to line 25 and run it. Observe the Bode plot of the
compensated system and read the values of gain crossover frequency, phase
margin, phase crossover frequency and gain margin.
4. Copy the remaining lines of the sample program. Observe the unit step responses
of the original and the compensated systems. Approximately measure the
maximum peak overshoots of the two systems.
SAMPLE PROGRAM:
clear; close; clc; % Expt 6 – Control Lab % (Line 1)
nump = [100]; % Specifies the plant TF numerator
denp = [0.01 1.01 1 0]; % Specifies the plant TF denominator
sysp = tf(nump,denp);
w = logspace (-1, 4, 100);
bode(sysp, w); grid on;
[Gm,Pm,Wcp,Wcg] = MARGIN(sysp); Gm_db = 20*log10(Gm);
Gm_db
Wcg
Pm
Wcp % (Line 11)
pause;
numc = [0.15 1];
denc = [0.015 1];
bode(numc, denc, w);
grid on; % (Line 16)
pause;
[num, den] = series (numc, denc, nump, denp); % The open-loop cascaded system
sys_OL = tf(num,den);
bode(sys_OL, w); grid on;
[Gm,Pm,Wcp,Wcg] = MARGIN(sys_OL); Gm_db = 20*log10(Gm);
Gm_db
Wcg
Pm
Wcp % (Line 25)
pause;
[n1, d1] = feedback (nump, denp, 1, 1, -1); % The original closed-loop system
t= 0:0.02:5;
y1 = step (n1, d1, t);
[n2, d2] = feedback (num, den, 1, 1, -1); % the compensated closed-loop system
y2 = step (n2, d2, t);
subplot(2,1,1);plot (t, y1); grid on; title('The original closed-loop system');
subplot(2,1,2);plot (t, y2); grid on; title('The compensated closed-loop system');
Report:
1. Reproduce all the data in tabular form and the free-hand sketch of the Bode plot of
the compensator obtained in step 2 of procedure. Compare the theoretical values
of m and m with the experimentally obtained ones.
2. Show that for a<1, a compensator with a transfer function G c(s)= (1+aTs)/(1+Ts)
always produces a phase lag, independent of the frequency. What should be a
suitable name for such a compensator?
Roll no: