1 Compensator Design Using Bode Plot
In this lecture we would revisit the continuous time design techniques using frequency domain
since these can be directly applied to design for digital control system by transferring the loop
transfer function in
-plane to
-plane.
1.1 Phase lead compensator
If we look at the frequency response of a simple PD controller, it is evident that the magnitude of
the compensator continuously grows with the increase in frequency.
The above feature is undesirable because it amplifies high frequency noise that is typically
present in any real system.
In lead compensator, a first order pole is added to the denominator of the PD controller at
frequencies well higher than the corner frequency of the PD controller.
A typical lead compensator has the following transfer function.
where,
is the ratio between the pole zero break point (corner) frequencies.
Magnitude of the lead compensator is
lead compensator is given by
. And the phase contributed by the
Thus a significant amount of phase is still provided with much less amplitude at high
frequencies.
The frequency response of a typical lead compensator is shown in Figure 1 where the magnitude
varies from
60 in general).
to
and maximum phase is always less than 90 (around
Figure 1: Frequency response of a lead compensator
It can be shown that the frequency where the phase is maximum is given by
The maximum phase corresponds to
The magnitude of
Example 1: Consider the following system
Design a cascade lead compensator so that the phase margin (PM) is at least 45 and steady state
error for a unit ramp input is 0.1 .
The lead compensator is
where,
Steady state error for unit ramp input is
PM of the closed loop system should be 45. Let the gain crossover frequency of the
uncompensated system with K be g .
Phase angle at g = 3.1 is -90 - tan -1 3.1 = - 162 . Thus the PM of the uncompensated system
with K is 18.
If it was possible to add a phase without altering the magnitude, the additional phase lead
required to maintain PM= 45 is 45 - 18 = 27 at g = 3.1 rad/sec.
However, maintaining same low frequency gain and adding a compensator would increase the
crossover frequency. As a result of this, the actual phase margin will deviate from the designed
one. Thus it is safe to add a safety margin of to the required phase lead so that if it devaites
also, still the phase requirement is met. In general is chosen between 5 to 15.
So the additional phase requirement is 27 + 10 = 37 , The lead part of the compensator will
provide this additional phase at max .
Thus
The only parameter left to be designed is . To find , one should locate the frequency at which
the uncompensated system has a logarithmic magnitude of
Select this frequency as the new gain crossover frequency since the compensator provides a gain
of
at max. Thus
In this case max = g new = 4.41 . Thus
The lead compensator is thus
With this compensator actual phase margin of the system becomes 49.6 which meets the design
criteria.
Figure 2: Bode plot of the compensated system for Example 1
Bode plot is shown in Figure 2
The
corresponding
Example 2:
Now let us consider that the system as described in the previous example is subject to a sampled
data control system with sampling time T = 0.2 sec. Thus
The bi-linear transformation
will transfer
into w -plane, as
[please try the simplification]
We need first design a phase lead compensator so that PM of the compensated system is at least
50 with Kv = 2 . The compensator in w -plane is
Design steps are as follows.
K has to be found out from the Kv requirement.
Make max = gnew.
Compute the gain crossover frequency g and phase margin of the uncompensated
system after introducing K in the system.
At g check the additional/required phase lead, add safety margin, find out
Calculate from the required
Since the lead part of the compensator provides a gain of
, find out the
frequency where the logarithmic magnitude is
. This will be the new
gain crossover frequency where the maximum phase lead should occur.
Calculate from the relation
Now,
Using MATLAB command ``margin'', phase margin of the system with K = 2 is computed as
31.6 with g = 1.26 rad/sec, as shown in Figure 3.
Figure 3: Bode plot of the uncompensated system for Example 2
Thus the required phase lead is 50 - 31.6 = 18.4 . After adding a safety margin of 11.6 ,
becomes 30 . Hence
From the frequency response of the system it can be found out that at = 1.75 rad/sec, the
magnitude of the system is
. Thus max = gnew = 1.75 rad/sec. This gives
Or,
Thus the controller in w-plane is
The Bode plot of the compensated system is shown in Figure 4.
Figure 4: Bode plot of the compensated system for Example 2
Re-transforming the above controller into z -plane using the relation
controller in z -plane, as
, we get the
End
1 Lag Compensator Design
In the previous lecture we discussed lead compensator design. In this lecture we would see how
to design a phase lag compensator
1.1 Phase lag compensator
The essential feature of a lag compensator is to provide an increased low frequency gain, thus
decreasing the steady state error, without changing the transient response significantly.
For frequency response design it is convenient to use the following transfer function of a lag
compensator.
Where,
The above expression is only the lag part of the compensator. The overall compensator is
Typical objective of lag compensator design is to provide an additional gain of in the low
frequency region and to leave the system with sufficient phase margin.
The frequency response of a lag compensator, with =4 and =3, is shown in Figure 1 where the
magnitude varies from
dB to 0 dB.
Figure 1: Frequency response of a lag compensator
Since the lag compensator provides the maximum lag near the two corner frequencies, to
maintain the PM of the system, zero of the compensator should be chosen such that = 1/ is
much lower than the gain crossover frequency of the uncompensated system.
In general, is designed such that 1/ is at least one decade below the gain crossover frequency
of the uncompensated system. Following example will be comprehensive to understand the
design procedure.
Example 1: Consider the following system
Design a lag compensator so that the phase margin (PM) is at least 50 and steady state error to a
unit step input is
The overall compensator is
where,
When
Steady state error for unit step input is
Thus,
Now let us modify the system transfer function by introducing K with the original system. Thus
the modified system becomes
PM of the closed loop system should be 50. Let the gain crossover frequency of the
uncompensated system with K be g .
Required PM is 50. Since the PM is achieved only by selecting K, it might be deviated from this
value when the other parameters are also designed. Thus we put a safety margin of 5 to the PM
which makes the required PM to be 55.
To make g = 2.8 rad/sec, the gain crossover frequency of the modified system, magnitude at g
should be 1. Thus
Putting the value of g in the last equation, we get K = 5.1. Thus,
The only parameter left to be designed is .
Since the desired PM is already achieved with gain K, We should place = 1/ such that it does
not much effect the PM of the modified system with K. If we place 1/ one decade below the
gain crossover frequency, then
or,
The overall compensator is
With this compensator actual phase margin of the system becomes 52.7, as shown in Figure 2,
which meets the design criteria.
Figure 2: Bode plot of the compensated system for Example 1
Example 2:
Now let us consider that the system as described in the previous example is subject to a sampled
data control system with sampling time T = 0.1 sec. We would use MATLAB to derive the plant
transfer function w -plane.
Use the below commands.
>> s=tf('s');
>> gc=1/((s+1)*(0.5*s+1));
>> gz=c2d(gc,0.1,'zoh');
You would get
The bi-linear transformation
will transfer
into w-plane. Use the below commands
>> aug=[0.1,1];
>> gwss = bilin(ss(gz),-1,'S_Tust',aug)
>> gw=tf(gwss)
to find out the transfer function in w-plane, as
The Bode plot of the uncompensated system is shown in Figure 3.
Figure 3: Bode plot of the uncompensated system for Example 2
We need to design a phase lag compensator so that PM of the compensated system is at least 50
and steady state error to a unit step input is 0.1. The compensator in w -plane is
where,
Since
, for 0.1 steady state error.
Now let us modify the system transfer function by introducing K to the original system. Thus the
modified system becomes
PM of the closed loop system should be 50. Let the gain crossover frequency of the
uncompensated system with K be g . Then,
Required PM is 50. Let us put a safety margin of 5. Thus the PM of the system modified with
K should be 55.
By solving the above, g = 2.44 rad/sec. Thus the magnitude at g should be 1.
Putting the value of g in the last equation, we get K = 4.13 .
Thus,
If we place 1/ one decade below the gain crossover frequency, then
or,
Thus the controller in w -plane is
Re-transforming the above controller into z -plane using the relation
, we get
Lag -lead Compensator
When a single lead or lag compensator cannot guarantee the specified design criteria, a lag-lead
compensator is used.
In lag-lead compensator the lag part precedes the lead part. A continuous time lag-lead
compensator is given by
where,
The corner frequencies are
1.
. The frequency response is shown in Figure
Figure 1: Frequency response of a lag-lead compensator
In a nutshell,
If it is not specified which type of compensator has to be designed, one
should first check the PM and BW of the uncompensated system with
adjustable gain K.
If the BW is smaller than the acceptable BW one may go for lead compensator. If the
BW is large, lead compensator may not be useful since it provides high frequency
amplification.
One may go for a lag compensator when BW is large provided the open loop system is
stable.
If the lag compensator results in a too low BW (slow speed of response), a lag-lead
compensator may be used.
1.1 Lag-lead compensator design
Example 1 Consider the following system with transfer function
Design a lag-lead compensator C(s) such that the phase margin of the compensated system is at
least 45 at gain crossover frequency around 10 rad/sec and the velocity error constant Kv is 30.
The lag-lead compensator is given by
where,
When
Thus K = 30 . Bode plot of the modified system KG(s) is shown in Figure 2. The gain crossover
frequency and phase margin of KG(s) are found out to be 9.77 rad/sec and -17.2 respectively.
Figure 2: Bode plot of the uncompensated system for Example 1
Since the PM of the uncompensated system with K is negative, we need a lead compensator to
compensate for the negative PM and achieve the desired phase margin.
However, we know that introduction of a lead compensator will eventually increase the gain
crossover frequency to maintain the low frequency gain.
Thus the gain crossover frequency of the system cascaded with a lead compensator is likely to be
much above the specified one, since the gain crossover frequency of the uncompensated system
with K is already 9.77 rad/sec.
Thus a lag-lead compensator is required to compensate for both.
We design the lead part first.
From Figure 2, it is seen that at 10 rad/sec the phase angle of the system is -198.
Since the new g should be 10 rad/sec, the required additional phase at g, to maintain the
specified PM, is 45 - (180 - 198) = 63 . With safety margin 2,
And
which gives
. However, introducing this compensator will actually increase the gain
crossover frequency where the phase characteristic will be different than the designed one. This
can be seen from Figure 3.
Figure 3: Frequency response of the system in Example 1 with only a lead compensator
The gain crossover frequency is increased to 23.2 rad/sec. At 10 rad/sec, the phase angle is -134
and gain is 12.6 dB. To make this as the actual gain crossover frequency, lag part should provide
an attenuation of -12.6 dB at high frequencies.
At high frequencies the magnitude of the lag compensator part is
which gives
. Now,
. Thus ,
should be placed much below the new gain crossover
frequency to retain the desired PM. Let
be 0.25. Thus
The overall compensator is
The frequency response of the system after introducing the above compensator is shown in
Figure 4, which shows that the desired performance criteria are met.
Figure 4: Frequency response of the system in Example 1 with a lag-lead compensator