Lag Compensator design with Root Locus


So far we have discussed on an Introduction to Matlab and Lag compensator design with bode plot. In this post we will deal with lag compensator design with time domain specifications and using the root locus technique.

The steps to design the lag Compensator are

  1. Draw the root locus of the given open loop uncompensated system with K=1
  2. From given specifications determine  the damping ratio.
  3. Draw a line from origin making an angle $cos^{-1}\zeta$ with the negative real axis. The point of intersection of that line with root locus gives the dominant pole Sd
  4. Determine open Loop gain K at Sd,by taking equation

    \begin{displaymath}K=\frac{Product of vector lenghts from Sd to open loop poles}{Product of vector lenghts from Sd to open loop zeroes}\end{displaymath}

  5. Let Kv velocity constatn for uncompensated system, Kvd=Desired velocity Constant
    $Kv=\limit_{s \to 0}sG(s)$
  6. A=Kvd/Kv and $\beta=1.2*A$

  7. $T=\frac{1}{-0.1 * Second pole of G(s)}$ 1/T is always choosen to be 10%of second pole of uncompensated system.
  8. a lag compensator has the form
    $\frac{(s+\frac{1}{T})}{(s+\frac{1}{\beta T})}$
  9. form the complete transfer function with the lag compensator added in series to th original system
  10. plot the new Root locus and check if given conditions are satisfied. Or else change the location of poles.

We will solve question number 1.3 in Advanced Control Systems By Nagoor Kani. Let us solve this with matlab.

The question is Forward ath transfer function of a unity feedback control system is
$G(s) = \frac{K}{s(s+2)(s+8)}$ . Design a lag compensator so that peak overshoot is less than 16% for step input and steady state error is less than 0.125 for ramp input.

Solution:
The percentage overshoot is given to determine the damping ratio and we can use the relation

$\%Over shoot=e^{\frac{\zeta\pi}{\sqrt(1-\zeta^2)}}$

The code below shows the matlab commands to obtain the design.

n=1 %taking K=1
d=conv([1 0],conv([1 2],[1 8]))
'G(s)' % Display title G(s)
G=tf(n,d)
rlocus(G) % plot root locus of uncompensated system
M=input('Enter Percentage overshoot')
zeta=sqrt(log(M)^2 /(pi^2 + log(M)^2)) % calulate damping ratio
sgrid(zeta,0) % draw line from origin with angle of cos^(-1) zeta
[K p]=rlocfind(G) % find the gain K at the point of Sd , Sd selected by clicking on the graph
Kvu=input('Enter Uncompensated Vel VConst')
ess=input('Enter aloowe steady state error')
Kvd=1/ess
A=Kvd/Kvu;
Beta=1.2*A;
root=roots(d); finding roots of the denominator
T=1/(-0.1*root(2)) % usinthe second root
Zc=1/T
Pc=1/(Beta*T)
Gc=tf([1 Zc],[1,Pc])
sys=Gc*G*K
rlocus(sys) % plot root locus of compensated system
pause
sys=feedback(sys,1,-1)
step(sys)
hold on
G=feedback(G,1,-1)
step(G)

The Diagrams below show the results obtained Please don’t forget to comment or ask doubts in case of trouble.

Uncompensated system root locus
Root Locus of Compensated System
Step response of Compensated and Uncompensated system
Advertisement

6 thoughts on “Lag Compensator design with Root Locus

    1. vineethkartha

      See the step 7 says that 1/T is always choosen to be 10% of second pole of uncompensated system. So the roots of the denominator are stored in the array roots. So roots(2) takes the second root and we invert the sign and take 10% of it.

  1. Good day! This is kind of off topic but I need some advice from an established blog.

    Is it hard to set up your own blog? I’m not very techincal but I can figure things
    out pretty fast. I’m thinking about making my own but I’m
    not sure where to start. Do you have any tips or suggestions?

    Thanks

  2. mohitt v k

    Design a lag compensator to
    reduce
    the steady

    state error
    for a step
    input
    by a factor of 10 while the system operates with 15% overshoot.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s