You are on page 1of 39

EEC 4043

Control Systems

Compensator Design I:
Lead and Lag
Learning Objectives:
At the end of this lecture, students should be able:
 design and simulate phase-lead compensator according
to a desire specification

 design and simulate phase-lag compensator according


to a desire specification
Control System Compensation
 Compensation refers to design changes in the control system to
improve the system performance.

 Improved stability, means changing the open-loop gain


such that:
Gain margin is at least 6dB

Phase margin is between 45o and 65o

 Improved step response, means choosing poles such that:

The system response is slightly under damped

The overshoot is between 20% and 30% of the steady state value
More on Stability
Instability occurs when the open-loop gain is greater than 1 and -180o out
of phase.

In other words, instability occurs when the resulting feeback signal is


greater than the initial input signal and has the opposite sign.

Since the error signal is the input minus the feedback signal, a feedback
that is greater than the input signal, and has the opposite sign, will
create a regenerative signal.

e x f
e
x y
y  Ge
f
f  Hy  HGe
1 The worse case is
e  x  HGe e x when HG = -1!
1  HG
Gain Compensation
The situation to avoid is when the open-loop gain equals -1.

Gain compensation is accomplished by inserting an attenuator (or gain)


in order to ensure the open-loop gain is far from -1.

In this example, the open-loop gain  2000


is
x (t )  s 2  5s  100
y (t )
GH 
2000 
s 2  5s  100
Which has the following
Bode plot, describing the
magnitude and phase.

Very close to instability!

Thus, the open-loop gain


must be reduced move
away from the GH=-1
problem.

According to Bode, a -26db reduction in


gain makes the system more stable.
Gain Compensation - 2
 26db
2000
To reduce open-loop gain, a 26db x (t )  s 2  5s  100
y (t )
reduction is added. 

In other words, the system is gain compensated.


 2000
 26  20 log 10 G  x (t )  0.05 s 2  5s  100
y (t )

 26
 G  10 20
 0.05

Note that the phase


margin is 45o, per the
compensation design.

However, gain
compensation has
its problems.

Reducing the gain,


slows the step
response.
Phase Compensation
 2000
If lowering the gain, slows the system x (t )  s 2  5s  100
y (t )
response… why not change the phase 
instead?

In other words, the


problem occurs when:

HG  1
HG  1 180
Instead of lowering the
magnitude at -180o,

Leave the magnitude and


change the phase directly.

In other words, add compensation that leaves the gain the same, but
changes the phase at the frequency of interest, 50 rad / sec.

There are two phase compensation procedures: Lead & Lag


Phase Compensation - 2
 2000
The control system is compensated x (t )  C (s )
s 2  5s  100
y (t )
by adding another system of poles 
and zeros.

Cascade (series)
systems are
multiplied
together in the
Laplace domain.

 bode(CHG )

Check out the new


phase margin!

Notice that the


magnitude response
has not changed
much.
Phase-Lead Compensation
Phase-lead compensation is used to provide
positive phase to the open-loop gain.
C
Phase-lead compensation
1  as
has the following transfer C ( s) 
function: 1  s
In other words, add a zero and a pole to
the system transfer function.

Design the phase compensator such that


the zero occurs before the pole.

The zero gives a 20db increase in gain over


one decade.

The pole gives a -20db increase in gain


over one decade, which stabilizes the gain.

The phase has the following shape.

Add the phase to the frequency of interest.


Phase-Lead Compensation - 2
1  as
C ( s) 
The goal is to choose a and  to compensate the system 1  s
with phase at the right frequency.

The frequency of maximum


1
phase occurs at the midpoint max 
between the pole and zero.  a

The phase at this frequency a 1


is computed as: sin max 
a 1

These facts are used to develop a procedure


for designing a phase lead compensator.
max
The compensator is termed a phase lead compensator
because it adds phase to the over all open-loop gain.
Phase-Lead Compensation - 3
These equations 1  as 1 a 1
are used in a C ( s)  max  sin max 
design procedure. 1  s  a a 1

Procedure to determine the required values of a and 


1. Determine the amount of phase to add to open-loop gain in order to
give the desired phase margin.
1  sin max
2. From the additional phase, determine the a value. a
1  sin max
3. The high frequency gain of the compensator is 20 log 10 (a )
The gain at the maximum phase is half this gain: 10 log 10 (a )
4. This gives a new gain crossover at the frequency of maximum phase.

1 And the
This frequency is at  10 log 10 (a )   compensator is
m a designed.
Phase-Lead Compensation Example
Determine the transfer function of the  10
cascade lead-compensator that can be
x (t )  C s2
y (t )
used to give a phase margin of 45o.

The uncompensated open-


loop gain has the following
Bode plot and is critically
stable.
To get a phase margin of 45o,
1  sin max 1  sin 45
a 
1  sin max 1  sin 45

1  0.707
a  5.83
1  0.707

The compensator adds the


following gain:

10 log 10 (a)  7.7db


4.9
Therefore, the frequency of interest is at -7.7db.
Phase-Lead Compensation Example 2
From the previous slide, the compensator  10
parameters were determined:
x (t )  C s2
y (t )

a  5.83 max  4.9
1
Therefore, to complete the design:   0.0845
4.9 5.83
1  as 1  0.49s
And the compensator is: C ( s)  
1  s 1  0.083s

 1  0.49s  10 
And the open-loop gain is: CGH ( s )    2 
 1  0.083s  s 

Is this stable? Check out the Bode plot on the next slide.

4.9 s + 10
>>C = tf([0.49 1],[0.083 1]);
---------------
>>CGH = C*GH;
0.083 s^3 + s^2
Phase-Lead Compensation Example 3
The control system with the phase  0.49s  1 10
compensator has an over all open-loop
x (t )  0.083s  1 s2
y (t )
gain of: 
 0.49s  1  10 4.9s  10
CGH    2 
 0.083s  1 s 0.083s 3  s 2

Note that at 0db,


the phase is no
longer -180o.

Using the MATLAB


information
button, the phase
margin is 45o, per
the design
specification.

Thus, the
compensated
system is stable.
Phase-Lead Compensation Example 4
Compare the root locus of the two systems.
 10 
x (t )  s2
y (t ) x (t ) 
0.49s  1 10
y (t )
 0.083s  1 s2

X X O X

The addition of the pole and zero, stabilizes the oscillating system.

What about the response time of the system?


Phase-Lead Compensation Example 5
Compare the step response of the two systems.
 10 
x (t )  s2
y (t ) x (t ) 
0.49s  1 10
y (t )
 0.083s  1 s2

Critically stable. Slightly under damped

Oscillates at 0.5Hz Overshoot of about 0.3 (30%)

Rise time of about 0.3s


Zero – Pole Placement
1  as
The lead phase compensator has the generic form of: C ( s ) Lead 
1  s
1
Therefore, the compensator zero is at: 1  as  0 s
a
1
The compensator pole is at: 1  s  0 s

Moving the zero (-1/(a)) towards the origin improves rise and settling
times, but also increases the overshoot

Moving the pole (-1/) away from the zero reduces the overshoot but
also increases the rise and settling times.
Phase Lead Compensation Example
50
The Bode plot of the open loop gain is plotted below: GHOL 
s(1  0.2s)
Determine the compensation needed for a 50o
phase margin. 60
Bode Diagram

50

The current phase 40

margin is about 20o. 30


Magnitude (dB) 20

Thus, an additional 10

0
30o is needed. -10

-20

1  sin 30 -30

a 3 -40

1  sin 30
-90

10 log 10 (3)  4.8db


-120
Phase (deg)

max  20.4
-150

1
   0.028
-180
-1 0 1 2
10 10 10 10

max a Frequency (rad/sec)


Phase Lead Compensation Example 2
1  as 1  (3)(0.028) s 1  0.85s
 C (s)   
1  s 1  0.028s 1  0.028s

 1  0.085s  50  4.3s  50
CGHCOL    
 1  0.028s  s(1  0.2s)  0.0056s  0.23s  s
3 2

Bode Diagram

50
This gives a phase
Magnitude (dB)

margin of 44o 0
(-137o - -180o)
which is about 6o
-50
away from desired
value.
-90

Is it
Phase (deg)

-120

possible to -137o
account for -150

this error? -180


-1 0 1 2 3
10 10 10 10 10
Frequency (rad/sec)
Phase Lead Compensation Example
Again
Adding phase is not completely a linear operation.

Recall that the phase chart of the Bode plot had more error when adding
the effect of poles and zeros than the MATLAB function phase response.

Since the design procedure seems to add about 6o of error, increase the
required phase and repeat the design procedure.

Thus, an additional 36o (30o + 6o) is required for the compensator.

1  sin 36
a  3.85
1  sin 36

10 log 10 (3.85)  5.85db

1 1  as 1  0.09s
max  21.8    0.023  C ( s)  
max a 1  s 1  0.023s
Phase Lead Compensation Example
Again – With Error Correction

 1  0.090s  50 
CGHCOL   
 1  0.023s  s(1  0.2s) 

Check out the 50o Phase Margin!


Phase Lead Compensation Example 3
Compare the step response of the two systems.

  1  0.09s 50
x (t ) 
50
s 1  0.2 s 
y (t ) x (t )  1  0.023s s 1  0.2 s 
y (t )
 

Under damped Under damped


Rise time of about 0.1s Rise time of about 0.1s
Settling time of about 1.4s Settling time of about 0.25s
Overshoot of 0.6 (60%) Overshoot of 0.2 (20%)
MATLAB SISOTOOL Function
MATLAB is very helpful for displaying the Bode plot, root locus, Nyquist plot
and simulating the step response.
Wouldn’t it be nice to have something that integrated all this commands?

SISOTOOL SISO Design Tool.

SISOTOOL opens the SISO Design Tool. This Graphical User Interface
lets you design single-input/single-output (SISO) compensators by
graphically interacting with the root locus, Bode, and Nichols plots of
the open-loop system. To import the plant data into the SISO Tool,
select the Import item from the File menu. By default, the control
system configuration is

r -->[ F ]-->O--->[ C ]--->[ G ]----+---> y


- | |
+-------[ H ]----------+

where C and F are tunable compensators.

SISOTOOL(G) specifies the plant model G to be used in the SISO Tool.


Here G is any linear model created with TF, ZPK, or SS.

SISOTOOL(G,C) and SISOTOOL(G,C,H,F) further specify values for the


feedback compensator C, sensor H, and prefilter F. By default,
C, H, and F are all unit gains.
MATLAB SISOTOOL Function-2
SISOTOOL(VIEWS) or SISOTOOL(VIEWS,G,...) specifies the initial set of
views for graphically editing C and F. You can set VIEWS to any of the
following strings or combination of strings:
'rlocus' Root locus plot
'bode' Bode diagram of the open-loop response
'nichols' Nichols plot of the open-loop response
'filter' Bode diagram of the prefilter F
For example
sisotool({'nichols','bode'})
opens a SISO Design Tool showing the Nichols plot and Bode diagrams
for the open loop CGH.

SISOTOOL(INITDATA) initializes the SISO Design Tool with more general


control system configurations. Use SISOINIT to build the initialization
data structure INITDATA.

SISOTOOL(SESSIONDATA) opens the SISO Design Tool with a previously


saved session where SESSIONDATA is the MAT file for the saved session.

See also sisoinit, ltiview, rlocus, bode, nichols.


MATLAB SISOTOOL Example

Use the MATLAB SISOTool to determine

1
the gain, K, which gives a phase margin
x (t ) K s ( s  4)
y (t )

of 40o.
>>Gp=zpk([],[0 -4],1);
>>sisotool

The tool opens with


two windows.

One windows contains


the default Bode and
root locus system plots.

The other window is


used to import the
system model.
MATLAB SISOTOOL Example - 2
 1
x (t )  K s ( s  4)
y (t )

Import the
system
information
here.

The system
displays will
automatically
change.
MATLAB SISOTOOL Example - 3
 1
x (t )  K s ( s  4)
y (t )

The phase margin is


currently 86.4o.

Thus, the gain, K, can be


increased until the phase
margin reaches the
desired value of 40o.

Open the compensation


editor in order to adjust
gain for the designed
phase margin (~29dB).

Notice that the closed-loop


poles move and the system
becomes under damped.
MATLAB SISOTOOL Example - 4
I wonder about the step response
parameters… SISOTOOL gives these too!
Check out the analysis menu!

Notice that the


phase margin is
40o!
More on the MATLAB SISOTOOL
Additional help is posted on the course website.

The course book gives additional examples, though uses the name RLTOOL.

SISOTool may be used with various compensators.

SISOTool may be used to display various system responses.

SISOTool may also be used to add poles and zeros.

SISOTool may be used for PID compensation and tuning.

SISOTool may be used to generate a Simulink model.


Another Phase Compensation
Recall that the system becomes unstable when the
open-loop gain is -1.

HG  1
HG  1 180
To make the system more stable, either the gain or the phase is adjusted.

Gain compensation focused on compensating the open-loop magnitude.

Lead-phase compensation increased the system stability by adding phase


to the open-loop.

Could the system become just as stable by subtracting phase from the
open-loop?

Since the goal is to avoid -1, why not?

This is called Lag-phase compensation.


Phase-Lag Compensation
Phase-lag compensation is used to provide
negative phase to the open-loop gain.

Phase-lag compensation has the


following transfer function and
frequency response:
1  s
G( s) 
1  as

Since the pole is before the zero, the


frequency response reduces the overall
open-loop magnitude.

Since the phase-lag compensator


adds a negative phase angle to the
system, it does not provide a direct
means of improving the phase
margin.
Phase-Lag Compensation Procedure
1. Determine the frequency where the required phase margin would be
obtained if the gain was 0dB at this frequency.

2. One decade below the new crossover frequency is 1/.

3. Determine the gain required at the new crossover frequency to ensure


the compensated system crosses at this frequency.

The gain produced by the phase-lag compensator at this frequency is


-20log10(a).

1  s
4. Use  and a to determine the phase-lag compensator: C ( s ) 
1  as
Phase Lag Compensation Example
Use lag-compensation to give a phase
 4
margin of 45o.
x (t )  s 2 s  1
y (t )

Uncompensated PM is -160o – (-180o) = 20o.
Bode Diagram
60
Frequency for a phase
margin of 45ois about 40

0.5rad/sec.
Magnitude (dB)
20

One decade less is 0

0.05rad/sec.
-20

1
   20
-40
-90
0.05
Gain at 0.5rad/sec is
Phase (deg)

15dB. -135

15  20 log 10 (a )
a  5.6 -180
10
-2 -1
10
0
10 10
1

Frequency (rad/sec)
Phase Lag Compensation Example 2
1  s 1  20s 4
  20, a  5.6 C ( s)   G( s) 
1  as 1  112s s2s  1
Note that the phase
margin is about 45o
per the design
specification.

However, notice that


the crossover
frequency (@ 0db) is
lower and magnitude
has decreased.

This means the step


response rise time
has increased.
Lag Compensation Response
The uncompensated system. The compensated system.

yovershoot  0.6 yovershoot  0.3 The rise time is


worse, but the
trise  1.25s trise  3.4s overshoot is lower
and the system is

tsettling  20 s tsettling  20 s more stable.


Comparing Phase –lead and Phase-Lag
Compensators
Phase Lead Phase Lag
Advantages i. Stability margins are i. The low frequency
improved characteristics are
ii. High frequency maintained or
performance, such as improved. This leads to
speed of response, is improve steady state
improved performance
iii. It is required to stabilize ii. The stability margins
certain type of system are improved
iii. The bandwidth is
reduced, which is an
advantage if high-
frequency noise is a
problem
Disadvantages i. Any high frequency i. The reduced
noise problems are bandwidth may be a
accentuated problem in some
ii. Large signals may be systems
generated, which may ii. The system transient
damage the system. response will have a
very low term

You might also like