You are on page 1of 15

Two types of compensators

1. Lead compensator
2. Lag compensator

Why Use Lag Compensators?


Lag compensators are sometimes the best controller to use to get a
system to do what you want it to do. Like other compensators, lag
compensators can be used to adjust frequency response by adding equal
numbers of poles and zeroes to a systems. Those added singularities may
possibly be manipulated to give better stability, better performance and
general improvement. Lag compensators are one tool that should be in the
toolkit of every control system designer.

What Is A Lag Compensator?


A lag compensator can be thought of in several different ways.
• First, a lag compensator is a device that provides phase lag in its' frequency
response.
• If the compensator has phase lag - and never a phase lead - then there are
implications about where the corner frequencies are in the Bode' plot.
• Other implications are that the phase lag compensator will have only certain
types of pole-zero patterns in the s plane.
A lag compensator will have a transfer function of the form:

• Since a lead compensator has only positive phase angle, we must have:
○ ω z>ω p

• A Bode' plot will make this clearer.


Here's a Bode' plot for a transfer function, G(s), with:
G(s) = (s + 1)/(10s + 1)
• Notice:
○ ω z>ω p

• since:
○ ω p = .1 rad/sec, and
○ ω z = 1 rad/sec.
This Bode' plot shows the essential characteristic of a phase lag compensator.
• There is one pole and one zero. Both are real.
• Phase is always negative!
• ω z>ω p

○ If, for example, ω z<ω p , we would have a lead network, not a lag
network.
Here note the following in the plot of the example we encountered earlier.
• Phase angle is always negative.
○ The pole at ω z = .1, or f = .0159 Hz, causes the magnitude plot to bend
down, and the phase to become negative near f = .159 Hz.
○ Later, the zero at 1.59 Hz. brings the Bode' plot's slope back to zero
for high frequencies, and the phase back to zero.
Below, we have a video that shows how lag networks behave as the ratio of
the pole to the zero changes.

Using Lag Compensators


Usually, a lag network is used as part of the controller in a feedback system.
Here's where the lag network would be used.

• In this system, we assume that you have a lag network, and an adjustable
gain in the lag network.
○ In that case, the compensator transfer function would be:
 Gc(s) = Kc(s + a)/(s + b)
 And we must have a > b, for a lag compensator.
Bode' Plot Effects
Let's first examine how adding a lag compensator to a system affects the
Bode' plot - and therefor the performance - of the system. Consider a system
with this transfer function.
Gp(s) = 1/[(s + 1)(s + 4)]
Here is the Bode' plot for this transfer function.

This is the Bode' plot for the system as it stands - with no compensator or
controller. Let us first see how well we can control the system as it stands. Here
are some specifications to try to achieve.
• SSE < 2%
• Phase Margin > 50o
The Bode' plot below has a line indicating where the phase reaches -130o.
Examining the Bode' plot we can conclude the following:
• The zero db crossing should occur at around f = 0.8 if we want to get a
phase margin of 50o.
• If the zero db crossing is set at f = 0.8, the db gain at that point is-30 db.
○ If the gain is -30 db, we can add 30 dbgain to the system.
○ If we add 30 db of gain, the DC gain will move from -12 db to +18 db.
A gain of 30 db is a gain of about 32.
○ A DC gain of 18 db is a gain of 8.
○ A DC gain of 8 will produce a SSE of .11 or 11%.
• Here's the Bode' plot after adjusting the gain.
Here is the response for the gain we have just computed. This response shows the
following:
• 11% SSE.
• About 24% overshoot (up to 1.1 when it settles out to 0.89).
• A rise time (10-90%) that looks to be a little less than 0.5 sec, and about
what we predicted.

Note the following.


• If the SSE if 11%, then we cannot simultaneously achieve both specifications
above.
○ If we raise the gain to get the SSE smaller, we will also bring the
phase margin below what we need to have.
○ If we wanted to get the SSE to <2%, we would need to increase the
DC gain to 50. Since it is now at 8, we need a further increase of
(50/8) or a factor of 6.25.
• Also note that since the zero db crossing is at f = 0.8, we expect the closed
loop bandwidth to be near that frequency, and the rise time to be given by:
Rise time ~= .35/0.8 = .44 sec.
If you want to check things on this system, click here to open a simulated system +
compensator in a separate window. From the comments above, there are some
general conclusions to draw for this example.
• It's possible to meet the stability requirements (rise time and phase
margin), and they depend mostly on the behavior of the Bode' plot near the
zero db crossing.
• The accuracy requirement is really a requirement on the DC gain - i.e. the
behavior at low frequencies.
Now, we can examine what happens when a lag compensator is added. We will
try to go through this slowly - step-by-step.
When we use a lag compensator we are probably defining our problem as one
where the DC gain cannot be made high enough - as in the example above. The
important points in our thought processes are these.
• We use the lag compensator to allow us to increase the DC gain of the
system. We focus on the low frequency behavior.
• We want to increase the DC gain without disturbing the stability properties.
In other words, we are willing to accept the system's behavior around the
zero-db crossing for the open-loop Bode' plot.
○ In the example system the zero db crossing of the uncompensated
system was aat f = 0.8. If we want to use a lag compensator in that
system we will do that by trying to leave the behavior around 0.8 Hz
undisturbed. That means that the pole and zero in the compensator
will have to produce their phase and magnitude changes at frequencies
lower than f = 0.8 Hz.
• The implications of these considerations are:
○ We need a zero to pole frequency ratio of 6.25 - the gain increase we
need.
○ The zero will have to be around f = 0.08Hz. By putting the zero
there, there will be little effect on the phase at f = 0.8Hz.
○ If the zero is a 0.08Hz, then the pole has to be at .08/6.25, or at .
013Hz
○ The actual compensator will be (s + .08*2*π )/(s + .013*2*π ) = (s + .
503)/(s + .082).
○ And remember that we want a DC gain of 50, and we have:
 Total transfer function = K (s + .503)/[(s + .082)(s + 1)(s + 4)
 To get a DC gain of 50, we need K = 32 or thereabouts.
○ Check that out with the simulator.
○ And, since these are very low frequencies, the compensator may be
best implemented digitally.
Here is a Bode' plot of the compensated system. In this plot, the solid lines are for the original
(uncompensated) system while the dotted lines are for the compensated system. (Red for db,
blue for phase) Note how the magnitude and phase plots of both systems are pretty much the
same around the zero db crossing.

Here is the unit step response for a system with that gain calculated above.
There seems to be something wrong here. It looks like this system has about 5%
SSE. However, that's not true! If you examine what happens over a longer time
frame, you get something like the response shown below. You can see the same
effect in the simulator where you can see how the exponential tail approaches the
steady state.

This response shows the following:


• 2.5% SSE.
• About 15% overshoot if you count from the final value.
• A rise time (10-90%) that looks to be a little less than 0.5 sec, and about
what we predicted.
• BUT!
○ The rise time doesn't tell the whole story because there is a very slow
"exponential tail" in this response, and we don't get near the steady
state in anything like 0.5 sec.
There is clearly something here that we need to understand. The time
response of this system effectively contains two parts - a fast response that
overshoots a little, and a slow response that seems to take forever to crawl up to
the final value. The time response is not easily evaluated because of the general
shape it seems to have. We are going to examine this through the lens of the Root
Locus. Since the root locus is a time-domain based approach we may be able to get
more insight into what is happening here because the root locus is the tool that
addresses time response more directly.

Root Locus Analysis


Let's review the situation. We have a system with this transfer function.
Gp(s) = 1/[(s + 1)(s + 4)]
This system is embedded in a control loop like this:

Now, examine the root locus for this system


Thinking about this root locus, we can conclude the following.
• When the closed-loop poles move away from the open-loop poles they come
together at s = -2.5
• After coming together at s = -2.5, the closed-loop poles have a real part of
-2.5.
○ A real part of -2.5 implies a settling time of approximately 1.1 sec.
(Click here for the relationship between the real part of the pole and
the settling time.)
○ Earlier, we found this response for a DC gain of 8.
○ The DC gain of 8 corresponds to a Root Locus gain of 32. In other
words, the forward transfer function, GcGp(s), is given by:
 Gc(s)Gp(s) = 32/[(s + 1)(s + 4)]
 A root locus gain of 32 is off the scale in the root locus plot
above, and the roots are at s = -2.5 + j5.45 and -2.5 - j5.45.
• Here's the step response of the closed loop system for this gain. This plot
was shown above and is just reproduced here.
Now, what happens when we add the compensator?

To see the root locus for the compensated system click the button on the right.
You should be able to see that the root locus doesn't change much except for the
addition of a branch between the compensator pole and the compensator zero.
That branch is critical. Here is the root locus for the compensated system.
Note the following points that you can see in this plot.
• The centroid (center of gravity) shifts to the right when the lag
compensator is added because the zero is larger than the pole.
○ The shift isn't really very large, but there is definitely a shift.
○ Putting the pole and zero at higher frequencies - keeping the pole-to-
zero ratio the same - would cause the centroid to shift even further
because the pole and zero would both be further into the left half
plane.
○ The asymptotes for the branches going to infinity will be shifted to
the right because of the centroid's shift to the right.
• If there is root locus activity near the zero, then the locus will have a
tendency to bend toward the zero.
Why Use Lead Compensators?
Lead compensators are sometimes the best controller to use to get a system
to do what you want it to do. It's as simple as that. They are an option that you
may need if you cannot use anything in the PID family to bring a system's
performance within specifications. There's no guarantee that a lead compensator
will do the trick, but it is another weapon in the arsenal.

Goals Of This Lesson


Before we get very far, we need to establish what our goals are for lead
compensators.
Given a Compensator Transfer Function:

Know which compensators are leads and which are lags.

Given a lead compensator,


Determine the effects of the lead compensator on closed loop system behavior
using Bode' plot methods,
Determine the effects of the lead compensator on closed loop system behavior
using Root Locus methods,
Given a system to be controlled,
Determine if a lead compensator can be used to satisfy closed loop system
specifications,
Given a system in which a lead compensator can be used,
Determine the parameters of a lead compensator to produce a closed loop system
that meets specifications.

What Is A Lead Compensator?


A lead compensator can be thought of in several different ways.
• First, a lead compensator is a device that provides phase lead in its'
frequency response.
• If the compensator has phase lead - and never a phase lag - then there are
implications about where the corner frequencies are in the Bode' plot.
• Other implications are that the phase lead compensator will have only
certain types of pole-zero patterns in the s plane.
Next, we will examine those implications. A lead compensator will have a
transfer function of the form:

• Since a lead compensator has only positive phase angle, we must have:
○ ω z<ω p

• A Bode' plot will make this clearer.


Here's a Bode' plot for a transfer function, G(s), with:
G(s) = (10s + 1)/(s + 1)

• Notice:
○ ω z<ω p

• since:
○ ω z = .1 rad/sec
○ ω p = 1 rad/sec.
This Bode' plot shows the essential characteristic of a phase lead
compensator.
• There is one pole and one zero. Both are real.
• Phase is always positive!
• ω z<ω p

If, for example,


• ω z>ω p ,
○ we would have a lag network, not a lead network since the phase would
always be negative.

You might also like