The steps to design the Lead Compensator are with root locus are:
- From given specifications determine the damping ratio and the natural frequency .
- Find the dominant pole
. If damping ratio alone is given then draw the root locus and draw line from origin at an angle to intersect the root locus, the point of intersection is the dominant pole.
- Measure angle contributed by each pole and zero of uncompensated system to the dominant pole as marked in the diagram, the angles are measured in the counter clockwise direction from the positive real axis direction.
- The angle needed to be provided byt the compensator is
This angle if greater than 60 then two compensators each providing half the required angle is made.
- as In the figure above draw PC bisection angle APO and draw line PB and PD such that they make angle with respect to PC B is the required pole and D is the required zero.
- a lead compensator has the form
- Determine open Loop gain K at Sd,by taking equation
- form the complete transfer function with the lead compensator added in series to the original system
- plot the new Bode plot and determine phase margin and observe that it is the required phase margin
Now to do this In Matlab let us take a question. I will be solving the question number 1.7 in Advanced Control Systems By Nagoor Kani. In th text book the question has been solved without using matlab you can go through it to understand the steps better.
The question is
the Peak over shot is 12.63% natural frequency of oscillation is 8 rad/sec and velocity error constant should be greater than or equal to 2.5.
Calculate the damping ration from the peak over shoot given the equation had been discussed in the previous post.
The code below shows the matlab commands to obtain the design.
clear all close all n=input('Enter the Coefficients of Numerator') d=input('Enter the Coefficients of Denominator') %enter as array [1 11 28 0] 'G(s)' G1=tf(n,d) G2=tf(conv([1 0],n),d); % this is for evaluating the Kv we multiply numerator with s. M=input('Enter peak overshoot: ') z=sqrt(log(M)^2 /(pi^2 + log(M)^2)) % calulate damping ratio wn=input('Enter wn: ') Kv=input('Enter velocity constant: ') Sd=complex((-z*wn),(wn*sqrt(1-z^2))) % forming the dominant pole rlocus(G1) % plotting uncompensated root locus hold on plot(Sd,'*') % mark the dominant pole axis([-20 20 -20 20]) 'Press any key to proceeed' pause close all pzmap(G1) % make pole zero plot. hold on plot(Sd,'*') % mark the dominant pole plot(conj(Sd),'*') axis([-20 20 -20 20]) Po=roots(d) pang=zeros(1,size(Po,1));
% Finding the angle contributions of poles
% Finding the angle contributions of zeroes
‘Required Phase Lead’
% LOGIC TO CHECK IF PHASE LEAD IS GREATER THAN 60 in some cases it can be 4 times greater than 60 then we have to repeatedly divide it till less than 60
‘Press any key to proceeed’
‘The lead Compensator’
‘Open Loop Transfer Function K=1′
sG=Gc*G2; % For evaluating error constant
sG=(Gc^t)*G2 % For evaluating error constant
sG=minreal(sG); % For evaluating error constant
axis([-20 20 -20 20])
‘The Velocity Error Constant is’
Kvn=dcgain(K*sG); % For evaluating error constant
‘Condition is satisfied’
‘The Complete transfer open loop function’
6 thoughts on “Lead Compensator design with Root Locus”
very good program……..could you please send me the m.file for this programe, since the second part of program not working …..!!!!?
Please send a mail to my contact ID so that I can reply back
Ziad Qatanani , thanks for your support,…
Ziad.Qatanani@dadgroup.com,,,,,,,,,,,,,,,,,,,,,, other question, did you have matlab program to plot and calculate the departure angle of poles in root locus, also can identify (mark in the plote) the root locuse segments as per odd rule.
…thanks in advance.
I tried to use this code for discret time(z plane) but its not working properly. Can help me?
If the angle contributed is more than 60 degree then we consider it is cascade of two lead compensator
But why 60 degree? Why not other angle?