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
- Draw the root locus of the given open loop uncompensated system with K=1
- From given specifications determine the damping ratio.
- Draw a line from origin making an angle with the negative real axis. The point of intersection of that line with root locus gives the dominant pole Sd
- Determine open Loop gain K at Sd,by taking equation
- Let Kv velocity constatn for uncompensated system, Kvd=Desired velocity Constant
- A=Kvd/Kv and
1/T is always choosen to be 10%of second pole of uncompensated system.
- a lag compensator has the form
- form the complete transfer function with the lag compensator added in series to th original system
- 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
. 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.
The percentage overshoot is given to determine the damping ratio and we can use the relation
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)