Lag Compensator design with Bode plot


In the previous post  An Introduction to compensator Design with matlab we saw an introduction to compensators. In this post we will deal with lag compensator design with frequency domain specifications.

The steps to design the lag Compensator are

  1. Determine K from the error constatns given
  2. Sketch the bode plot
  3. Determine phase margin if it is not satisfactory design lag compensator
  4. take  as the required phase margin to that add a tolerance of 5 so that new phase margin is
    $\gamma_{n}=\gamma_{d}+5$
  5. Find new gain cross over frequency $\omega_{gcn}$ which is the frequency corresponding to $\gamma_n$ of previous step for that find
    $\phi_{gcn}=\gamma_n - 180$ from the bode plot determine $\omega_{gcn}$corresponding to $\phi_{gcn}$
  6. Determine gain corresponding to $\omega_{gcn}$ from bode plotlet it be A db
  7. a lag compensator has the form
    $\frac{(s+\frac{1}{T})}{(s+\frac{1}{\beta T})}$

  8. $\beta=10^{\frac{A}{20}}$ since
    $A = 20log\beta$

  9. $T= \frac{10}{\omega_{gcn}}$
  10. form the complete transfer function with the lag compensator added in series to th original system
  11. 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 6.2 in 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

Open loop transfer function   and the phase margin should be atleast 33 and velocity error constant is 30.

Solution:
The velocity error constant is

On solving we get K =9600

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

K=9600
d1=conv([1 4 0],[1 80]) % used to formulate the polynomial
G=tf(K,d1) % generate the transfer function.
margin(G)
pmreq=input('Enter Required Phase Margin') % enter 33 as given in question
pmreq=pmreq+5
phgcm=pmreq-180
wgcm=input('Enter new gain cross over frequency') % from the first bode plot use the mouse pointer and locate wgcm corresponding to phgcm.
[Beta,p]=bode(G,wgcm)
T=10/wgcm
Zc=1/T
Pc=1/(Beta*T)
Gc=tf([1 Zc],[1 Pc])
sys=Gc*G/Beta
margin(sys)
Uncompensated system
Matlab window
Identifying the new frequency
Compensated system

If you have any doubts please do contact me.

 

 An Introduction to compensator Design with matlab

Lag compensator design with root locus

Advertisement

4 thoughts on “Lag Compensator design with Bode plot

  1. Ivan

    Hello, Vineethkartha!

    How can I compensate model by putting in the PID into the feedback? PID tuning, and automated matlab response optimisation bring no help///

    Thanks.

    PS your blog’s nice!

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