Vous êtes sur la page 1sur 59

Design by Frequency Response Method

• Transient response and steady state performance


are usually most important in control system design.
In frequency response approach, performance is
specified in an indirect manner, i.e., in terms of
phase margin, gain margin, and static error
constants.
• The compensator design is usually an iterative
process where design and performance checking
are repeated till specifications are met. In this design
approach mostly Bode plots are used.
• In many cases, compensation is a compromise
between steady-state accuracy and relative stability.
Design by Frequency Response Method
(A) Lead Compensator Design:
The transfer function for lead compensator is
1
s
G c (s)  K c T , 0   1
1
s
T
where  is called the attenuation factor.

• Since 0 <  < 1, the zero is always located to the


right of the pole. The minimum value of  is limited
by the physical construction of the compensator.
Generally, minimum value of  is taken as 0.05.
Design by Frequency Response Method
The polar plot of
j T  1
K c , 0    1 with Kc = 1 is shown.
jT  1

• For any , the angle between the positive real axis


and the tangent line from the origin to the semicircle
gives the maximum phase-lead angle m at a
frequency m.
1 
It can be shown that: sin  m 
1 
• The Bode plot with Kc = 1 and  = 0.1 is shown.

m is geometric mean of the two corner frequencies.


1 1 1  1
log m   log  log   m 
2 T T  T
Design by Frequency Response Method
Thus, it can be seen that the lead-compensator is
basically a high-pass filter.

Control system

Design Procedure:
Gc(s) is to be designed as per specifications.
(1) For the lead compensator,
1  sT
G c (s)  K Kc = K
1  s T
The open-loop transfer function of the compensated
system is
1  sT
G c (s)G (s)  G1 (s) where G1(s) = KG(s).
1  s T
So, determine the gain K to satisfy the given static
error constant.
(2) Draw Bode diagram of G1(j) using gain K. Evaluate
the phase margin.

(3) Determine the necessary phase angle to be added.


Add an additional 50 to 100 to the required angle
because the addition of the compensator shifts the gain
crossover frequency to the right and decreases the
phase margin.
1 
(4) Determine  using sin  m 
1 
Determine the frequency where magnitude of the
uncompensated system G1(j) is equal to  20 log(1 /  )

Select this frequency as the new gain crossover


frequency and it corresponds to m  1 /( T )
Phase angle m occurs at this frequency. Thus, T can
be computed.
(5)Determine the corner frequencies of the lead
compensator as 1/T and 1/(T).
(6) The gain Kc can be computed by: Kc = K/.
(7) Check the gain margin to be sure it is satisfactory. If
not, repeat the design process by modifying the pole-
zero locations of the compensator.
Design by Frequency Response Method
Example :
A unity feedback system has a forward transfer
function: 4
G (s) 
s(s  2)
Design a lead compensator so that Kv = 20 sec-1, phase
margin is at least 500, and gain margin is at least 10 dB.
Solution:
4K
As per the guidelines, G1 (s)  KG (s)  , K  K c
s(s  2)
4sK
K v  Lim sG c (s)G (s)  Lim  2K  20
s 0 s  0 s(s  2)

So, K = 10. Next, Bode plot of G1(j) is shown.


Design by Frequency Response Method

Bode diagram of G1(s)


• From the plot, Phase Margin = 170 and Gain
Margin = + dB. Thus, additional 330 phase-lead is
required and this should be contributed by the
compensator.
• For taking the shift of the gain crossover frequency
into account, let us assume m = 330 + 50 = 380.
1 
sin  m  So,  = 0.24.
1 
• From step (4) of the procedure, 20 log(1 /  ) = 6 dB
G1 ( j)  6.2 dB
corresponds to  = 9 rad/sec and this frequency is
chosen as the new gain crossover frequency c,
which is equal to 1 /( T) .Thus, T can be
determined as 1/4.41
Design by Frequency Response Method
Kc = K/ = 41.7. Thus, Gc(s) is given by 41.7 s  4.41
s  18.4
• From the Bode diagram of the compensated system
(shown in next slide) , the followings can be verified.
• Gain crossover frequency increases from 6.3 to 9
rad/sec. The increase in this frequency means
increase in bandwidth resulting in faster response.
• The phase and gain margins of the compensated
system are approximately 500 and much larger than
10 dB, respectively. Thus, all the requirements are
met and the design is complete.
Bode Plots for Gc(s) G(s)

Gain crossover frequency = 8.9 rad/sec ; Phase Margin = 50.50


Design by Frequency Response Method

Comparison of unit-step responses


Design by Frequency Response Method

Comparison of unit-ramp responses


Design by Frequency Response Method
(B) Lag Compensator Design:
Characteristics of Lag Compensator:
1
s
The transfer function is given by G c (s)  K c T ,  1
1
s
T

Polar plot of lag compensator


Design by Frequency Response Method

Bode diagram of lag compensator: Kc=1,  =10

• Thus, the lag compensator is essentially a low-pass


filter.
Design Procedure:
1  sT
(1) Define Kc= K. Thus, G c (s)  K
1  s T
The open-loop transfer function of the compensated
system is: 1  sT
G c (s)G (s)  G1 (s)
1  s T
where G1(s) = KG(s). So, determine the gain K to
satisfy the given error constant.
(2) Draw Bode diagram of G1(j) using gain K. If phase
and gain margins are not satisfied, find the frequency
where phase angle is –1800 + the required phase
margin. This frequency is the new gain crossover
frequency (c).
Design by Frequency Response Method
N. B.: The required phase margin is typically the
specified phase margin plus 50 to 120 to compensate for
the phase lag of the compensator.

(3) To prevent the detrimental effects of phase lag of the


lag compensator, the pole and zero of the lag
compensator must be located substantially lower than
the new gain crossover frequency. Choose  = 1/T one
octave to one decade below c to prevent the
undesirable effects of phase lag due to compensator.
Note that we choose the compensator pole and zero
sufficiently small.
Design by Frequency Response Method
(4) Determine the attenuation to bring the magnitude
curve down to 0 dB at c . This attenuation = -20 log 
and calculate . The other corner frequency is  =
1/(T).
(5) Calculate Kc = K/.

Example: A system’s open-loop transfer function is:


1
G (s) 
s(s  1)(0.5s  1)
and it has a unity feedback. Design a lag compensator
such that Kv = 5 sec-1, Phase margin  400.
Design by Frequency Response Method
Solution:
sK
K v  Lim  K  5 (=Kc)
s  0 s(s  1)(0.5s  1)

G1(s) = KG(s)
• From the Bode plots G1(j), phase margin is seen to
be negative. The frequency corresponding to the
required phase margin (400) is around 0.7 rad/s, (new
gain crossover frequency c may be chosen closer
this frequency).
• Thus, corner frequency  = 1/T is roughly chosen
as 0.1 rad/s.
Design by Frequency Response Method
• We may add 120 (say) to the phase margin as an
allowance for lag angle by the compensator. Thus,
the required phase margin is now 520. The phase
angle of uncompensated open-loop system is –1280
and corresponding frequency (0.5 rad/sec) is
chosen as the new gain crossover frequency.
• To bring the magnitude curve down to 0 dB, the
attenuation is –20 dB. Thus,  = 10. So, 1/(T) = 0.01
rad/s. Kc = K/ = 5/10 = 0.5. So,
s  0.1
G c (s)  0.5
s  0.01
You can sketch the compensated system’s {Gc(s)G(s)}
Bode plot to verify the design.
Design by Frequency Response Method

Comparison of unit ramp responses


Design by Frequency Response Method
(C) Design of Lag-Lead Compensator:
Characteristics of Lag-Lead Compensator:
The transfer function is given by
 1  1 
 s   s  
G c (s)  K c  T1  T2  ,  > 1 and  > 1
   1 
 s   s  
 T1  T2 
The first and second factors produce the effects of lead
and lag networks, respectively. A typical design choice,
is:  = .
Design by Frequency Response Method
• The polar plot of the lag-lead compensator is shown
for Kc = 1 and  = .

1
1 
T1T2

• For 0 <  < 1, it acts like a lag compensator and for
1 <  < , it acts like a lead compensator. At  = 1,
the phase angle is zero.
Design by Frequency Response Method

Bode diagram of lag-lead compensator, Kc=1,  =  =10,


T2 = 10T1
Design Procedure: The design of a lag-lead
compensator is based on the combination of the design
techniques for lead and lag compensations.

Example:
The open-loop transfer function of a unity feedback
system is:
K
G (s) 
s(s  1)(s  2)
It is desired that Kv = 10 sec-1, phase margin  500, and
gain margin  10 dB. Design a lag-lead compensator
for this.
Design by Frequency Response Method
Solution:  1  1 
 s+  s+ 
 T1  T2 
G c (s)=K c  
 β  1 
 s+  s+ 
 T1  βT2 
Let us assume Kc = 1. Then, we get,
sKGc (s) K
K v  Lim   10  K  20
s 0 s(s  1)(s  2) 2

From the Bode plots of gain-adjusted uncompensated


system with this K, phase margin = -320 (an unstable
system).
• From phase angle curve, it is seen that phase
crossover frequency is 1.5 rad/s. Let us choose this
as the new gain crossover frequency. Thus, we may
choose the corner frequency  = 1/T2 to be one
decade below the new gain crossover frequency, i.e.,
0.15 rad/s.

• Recall that for the lead compensator, the maximum


phase lead angle m is (with  = 1/, here ):
 1
sin  m 
 1
• Notice that  = 10 corresponds to m = 54.90. Since
our requirement for phase margin is 500, we choose 
= 10.
Bode diagram for G, Gc, and GcG
• Thus, the corner frequency  = 1/(T2) becomes
0.015 rad/s. Therefore, the transfer function of the
phase-lag portion of the compensator is
(s+0.15)/(s+0.015).
• Design of phase-lead portion: It is seen from the
Bode plot that the open-loop gain at 1.5 rad/s is
roughly + 13 dB. Thus, the lag-lead compensator
should contribute –13 dB at this frequency since 1.5
rad/s is the new gain crossover frequency.

• Thus, in Bode plot, draw a straight line of slope 20


dB/decade passing through the point (1.5 rad/s, -13
dB). The intersections of this line and the 0 dB line
and the –20 dB line determine the corner frequencies.
They are obtained as 0.7 rad/s and 7 rad/s.
Design by Frequency Response Method
• Thus, the transfer function of the lead portion of the
compensator is (s+0.7)/(s+7). Thus, the complete
transfer function of the compensator is:

 s  0.7  s  0.15 
G c (s)    
 s  7  s  0.015 
PD Controller Design

A control system with PD controller

• The series controller is of proportional-derivative


(PD) type with the transfer function
G c (s)  K P  K Ds
PD Controller Design
Thus the control signal applied to the process is
de( t )
u ( t )  K P e( t )  K D
dt
where KP and KD are the proportional and derivative
constants, respectively.
Two realizations of the PD controller are shown.
• The transfer function of circuit in Fig. (a) is
E 0 (s) R 2
G c (s)    R 2 C1s
E in (s) R 1
Comparing with PD equation,
K P  R 2 / R1 K D  R 2 C1
PD controller circuits: (a) Two-OPAMP circuit,
(b) Three-OPAMP circuit
• The transfer function of the circuit in Fig. (b) is
E 0 (s) R 2
G C (s)    R d Cds
E in (s) R 1
By comparison, K P  R 2 / R1 K D  R d C d
• The advantage with the circuit in Fig. (a) is that two
op-amps are used. But, the circuit does not allow
independent choice of KP and KD, as they are both
dependent on R2. But, Fig. (b) allows KP and KD to be
controlled independently.
• The forward-path transfer function of the
compensated system is
Y(s)  2n K P  K D s 
G (s)   G C (s)G P (s) 
E(s) ss  2 n 
PD Controller Design
which shows the PD control is equivalent to adding a
zero at s = -KP/KD to the forward-path transfer function.

Summary of Effects of PD Control:


• Improves damping and reduces maximum overshoot
• Reduces rise time and settling time
• Increase BW, GM, PM and resonant peak
• May amplify noise at higher frequencies
• May require a large capacitor in circuit implementation.
PD Controller Design
Example:
Consider the second-order model of an aircraft attitude
control system as follows:

θy 4500K
G p (s)= =
θ r s(s+361.2)

The performance specifications are:


Steady-state error due to unit-ramp input  0.000443;
Maximum overshoot  5% ; Rise time tr  0.005 sec.;
Settling time ts  0.005 sec. Design a PD controller.
Solution: For maximum value of the specified steady-
state error requirement, K should be set at 181.17.
• However, with this K, the damping ratio is 0.2 and
maximum overshoot is 52.7% for unit-step response.
• Let us consider inserting a PD controller in the
forward path of the system, so that the damping and
maximum overshoot of the system are improved
while maintaining the steady-state error due to the
unit-ramp input at 0.000443.
• With PD controller and K = 181.17, the forward-path
transfer function of the system becomes
 y (s) 815265 (K P  K Ds)
G (s)  
e (s) s(s  361.2)
The closed-loop transfer function is
 y (s) 815265 (K P  K D s)

 r (s) s 2  (361.2  815265 K D )s  815265 K p

815265 K P
K v  lim sG(s)   2257 .1K P
s 0 361.2
Steady-state error is: ess = 1/Kv = 0.000443/KP
• Closed-loop transfer function shows that the effects
of the PD controller are to:
(1) Add a zero at s = -KP/KD to the closed-loop
transfer function.
(2) Increase the “damping term”. The coefficient of
the s term in the denominator is increased from 361.2
to (361.2 + 815265KD).
PD Controller Design
The characteristic equation is
2
s  (361.2  815265 K D )s  815265 K P  0
• We can arbitrarily set KP = 1 which is acceptable from
the steady-state error requirement. The damping ratio
of the system is
361.2  815265 K D
  0.2  451.46K D
1805.84
which shows the positive effect of KD on damping.

If we wish to have critical damping  = 1, KD = 0.00177


PD Controller Design
PD Controller Design
• Attributes of the unit-step response of this system
with PD Control (KP = 1)
KD tr (sec) ts (sec) Max. overshoot (%)
0 0.00125 0.0151 52.2
0.0005 0.0076 0.0076 25.7
0.00177 0.00119 0.0049 4.2
0.0025 0.00103 0.0013 0.7

• Thus, the performance requirements are all satisfied


with KD  0.00177. It should be kept in mind that KD
should only be large enough to satisfy the
performance requirements.
PI Controller Design
• We have seen that the PD controller can generally
improve the damping and rise time of a control
system at the expense of higher resonant frequency.

• Thus the PD controller may not fulfill the


compensation objectives in some situations. The
integral part of the PI controller produces a signal that
is proportional to the time integral of the input of the
controller.

• The transfer function of the PI controller is


KI
G C (s)  K P 
s
PI Controller Design

A prototype second-order system with series PI controller


PI Controller Design
R2 C2
R
R1
R
Ein _ _
Eo

(a)
R2

R1
_ R
R

Ein
_
Ci Eo

Ri
_ R

(b)

OPAMP circuit realization of PI controller:


(a) Two-OPAMP circuit. (b) Three-OPAMP circuit
• Transfer function of two-OPAMP circuit in Fig. (a) is
E 0 (s) R 2 R2
G c (s)   
E in (s) R 1 R C s
1 2
R2 R2
By comparison, K P  KI 
R1 R 1C 2

• Transfer function of three-OPAMP circuit in Fig. (b):

E 0 (s) R 2 1
G C (s)   
E in (s) R 1 R i C i s
R2 1
KP  KI 
R1 R i Ci
PI Controller Design
Forward-path transfer function of the compensated
system is
2
n (K Ps  K I )
G (s)  G C (s)G P (s) 
s 2 (s  2n )

• Clearly the immediate effects of the PI controller are:


(1) Adds a zero at s = -KI/KP to the forward-path
transfer function
(2) Adds a pole at s = 0 to the forward-path transfer
function. This means that the system type is increased
by one to a type-2 system. Thus the steady-state error
of the original system is improved by one order.
• The system will now have a zero steady-state error
when the reference input is a ramp function.
However, because the system is now of third order,
it may be less stable than the original second-order
system or even become unstable if the parameters
KP and KI are not properly chosen.
• Since the PI controller is essentially a low-pass filter,
the compensated system usually will have a slower
rise time and longer settling time.
• One method of designing the PI control is to select
the zero at s = -KI /KP so that it is relatively closer to
the origin and away from the most significant poles
of the process. The values of KP and KI should
generally be relatively small.
PI Controller Design
Example: Consider the second-order attitude control
system (same as the one used in previous example)
y 4500 K
G P (s)  
r s(s  361.2)
Applying the PI controller, the forward-path transfer
function of the system becomes
4500 KK P (s  K I / K P )
G (s)  G C (s)G P (s) 
s 2 (s  361.2)
Time-domain performance requirements are:
Steady-state error due to parabolic input t2us(t)/2  0.2 ,
Maximum overshoot  5 % , Rise time tr  0.01 sec. ,
Settling time ts  0.02 sec.
PI Controller Design
• The parabolic-error constant is
2 2 4500 KK P (s  K I / K P )
K a  lim s G (s)  lim s
s 0 s 0 s 2 (s  361.2)
4500KK I
  12.46KK I
361.2
• The steady-state error due to parabolic input is
1 0.08026
e ss   ( 0.2)
Ka KK I
• Let us set K = 181.17 (the value used in previous
Example). Substituting for K = 181.17 and solving KI
for the minimum steady-state error requirement of
0.2, we get the minimum value of KI to be 0.002215. If
necessary, the value of K can be adjusted later.
• With K = 181.17, the characteristic equation of the
closed-loop system is
3 2
s  361.2s  815265 K P s  815265 K I  0
• Applying Routh’s test to the above equation yields the
result that the system is stable if 0 < KI/KP < 361.2
• This means that the zero of G(s) at s = -KI/KP cannot
be placed too far to the left in the left-half s-plane, or
the system would be unstable. Let us place the zero
at –KI/KP relatively close to the origin.

• For the present case, the most significant pole of


GP(s), beside the pole at s = 0, is at –361.2
• Thus KI/KP should be chosen so that K I  361.2
KP
Root loci with KI/KP = 10 as KP varies:
PI Controller Design
Neglecting the small loop around the zero at s=-10,
G(s) can be approximated by
815265 K P
G (s) 
s(s  361.2)
where the term KI/KP in numerator is neglected
compared with the magnitude of s, which takes on
values along the operating points on the complex
portion of the root loci that corresponds to, say, a
relative damping ratio in the range 0.7 <  < 1.0.
• Let us assume that we wish to have a relative
damping ratio of 0.707. From G(s), the required
value of KP for this damping ratio is 0.08.
PI Controller Design
• This should also be true for third-order system with
the PI controller if the value KI/KP meets the
inequality. Thus with KP = 0.08, KI = 0.8, the root
loci show that the relative damping ratio of the two
complex roots is approximately 0.707.
• In fact the three characteristic equation roots are at
s = -10.605 , -175.3 + j175.4 and
-175.3 – j175.4
• Attributes of the unit-step responses of the system
with PI control for various values of KI/KP, with Kp =
0.08, which corresponds to relative damping ratio of
0.707 are shown in the Table.
PI Controller Design
KI/ KP KI KP Max. Overshoot tr (sec) ts (sec)
(%)
0 0 1.00 52.7 0.00135 0.015
20 1.60 0.08 15.16 0.0074 0.049
10 0.80 0.08 9.93 0.0078 0.0294
5 0.40 0.08 7.17 0.0080 0.023
2 0.16 0.08 5.47 0.0083 0.0194
1 0.08 0.08 4.89 0.0084 0.0114
0.5 0.04 0.08 4.61 0.0084 0.0114
0.1 0.008 0.08 4.38 0.0084 0.0115
PI Controller Design

Unit-step responses for the system


PID Controller Design
• Transfer function of the PID controller:

2
KI K Ds  K Ps  K I
Kp   K Ds 
s s
de
u  K p e  K I  e dt  K D
dt
PID Controller Design
Bode Diagrams

40
Phase (deg); Magnitude (dB)

30

20

10

100

50

-50

-100
10-2 10-1 10 0 101

Frequency (rad/sec)

Bode plot of PID controller; KP=KI=KD=1


PID Controller Design
• When you are designing a PID controller for a
given system, the steps shown below may be
followed as typical guidelines to obtain a desired
response.

(1) Obtain an open-loop response and determine what


needs to be improved.
(2) Add a proportional control to improve the rise time.
(3) Add a derivative control to improve the overshoot.
(4) Add integral control to eliminate steady-state error.
(5) Adjust each of KP, KI, and KD until you obtain a
desired overall response.