Compensator
Compensator
Specifications
• Normally consists of relative stability, transient response, steady
state response and frequency response.
• The sets of design specifications are normally expressed as rise
time, delay time, settling time, maximum overshoot, maximum
overshoot time, steady state error etc.
• In practice, if a system is to be designed as to meet the
required specifications, therefore, it is necessary to alter
the system by adding an external device to it.
r t e t u t y t
Controller Plant
Series / cascade Compensation
Controller
In some cases, the feedback is taken from some internal element and
compensator is introduced in such a feedback path to provide an
additional internal feedback-loop is called feedback compensation.
The energy transfer in such feedback scheme is from higher energy
level towards lower energy level point. Thus, the number components
required to design are less than series compensation.
r t e t u t y t
Controller
Plant
Gc s
Controller
GH s
Series-Feedback Compensation
(1) Flow
• Very noisy, thus need derivative-action
• Overall gain less than, integral-action will ensure no steady-state error.
(2) Level
• Normally is of type 1, thus just required proportional action
(3) Temperature
• Thermal delay, thus normally required PID-action
(4) Pressure
i (s ) + Kp 1 (s)
- Js F
i (s ) 1 (s )
KI
s Js F
+ -
KI 1
.
( s ) s Js F KI
Closed-loop transfer function
i (s) KI 1 Js 2 sF K I
1 .
s Js F
For a unit step input, the response is
KI 1
( s )
Js 2 sF K I s
KI 1 KI
ess had s 2
1
s 0 Js sF K I s K I
Derivative compensator (D)
Quick response
No effect at steady state because no error signal
Useful for controlling type 2 together with a P-controller
Response only to rate of change and no effect to steady
state
o (s) km
Example: Determine kd , if damping ratio 0.6 and k a 0.2 , Gm ( s )
va ( s ) s m s 1
Error detector Amplifier Servo motor
r va o
ke e ka Gm (s )
,,
where k e 5 V.rad
-1
k m 20 rad.s 1 .V 1 and m 0.05 s
Compensator
Va ( s )
k a (1 sk d )
E (s)
km kkk
Go ( s) k e .k a . .1 e a m
s m s 1 s m s 1
New open loop transfer function
k e k a (1 sk d )k m
Go ( s )
s m s 1
Closed loop transfer function
k e k a (1 sk d )k m
Gc ( s )
s m s 1 k e k a (1 sk d )k m
20(1 sk d ) 400(1 sk d )
Gc ( s ) 2
s 0.05s 1 20(1 sk d ) s 20s (1 20k d ) 400
Hence
2 0.6 1
kd 0.01
20
Proportional-integral compensator (PI)
KI
Gc ( s ) K P or
s
1
Gc ( s ) K P 1 Where Kp/KI is called the integral constant, TI
T s
I
Example: Find the steady state error
i (s ) K 1 (s)
KP I Js F
+ - s
K 1
K P I .
( s ) s Js F sK P K I
2
i (s) K 1 Js s( F K P ) K I
1 K P I .
s Js F
KI
ss had s .( s ) 1
s 0 KI
Proportional-integral-derivative
compensator (PID)
Ki
Gc ( s ) K p sK d or
s
1
Gc ( s) K p 1 sTd
Ti s
Characteristics of Phase-Lead and
Phase-Lag Compensators
Phase-Lead Compensator (PD type compensation)
0.63k
L T
k
The above response can be approximated by G (s) e sL
1 sT
where k is static gain, T time constant, L time delay and a k L
T
Based rule-of-thumb, for 0.1 L T 0.6 the controller gains can be appoximated by
Controller Kp Ti Td
PID 1/a 3L L/2
PI 0.9/a 2L
P 1.2/a
Zeigler-Nichols Closed-Loop Method
Using Routh-Hurwitz criteria, we can determined the margainally stable’s gain, K c and its period
of oscilation, T for a controller with a gain of K
With rule-of-thumb of thumb
Controller Kp Ti Td
6
G ( s)
( s 1)( s 2)( s 3)
With a gain of K connected in cascade to the system, its characteristic equaton becomes
D( s) s 3 6s 2 11s 6(1 K ) 0
1 11
s3
2 6 6(1+K)
s
10 K
s1
1+K
s0
Thus
Controller
Kp Ti Td
P 5
PID 6 0.947
Example
25
G(s)
(s 5)(s 2 2s 5)
By introducing a zero and normalizing the response
( s a) 25
G ( s)
a ( s 5)(s 2 2s 5)
a 25
G(s)
( s a) ( s 5)( s 2 2s 5)
Lag compensator
Use for steady state improvement without affecting the transient response
Consider a lag compensator transfer function
Ge ( s )
s ze
s pe
where ze pe
.
ze pe
Consider a plant
m
(s z i )
G p (s) K i 1
n
(s
j 1
pj)
With compensator
ze z1 z2 .... zm
Kc K
pe p1 p2 .... pn
s zd
Gd
s pd
where pd z d .
Uncompensated
s z1 s z2 ..... s zm
s p1 s p2 ..... s pn r
Compensated
s zd s pd s z1 s z2 ..... s zm
s p1 s p2 ..... s pn r
Thus
c s zd s pd
Example:
s zd
Use a lead compensator Gd so that the overall system has undamped frequency
s pd
of 4 rad.s-1 and rate of decay 0.5 s-1, if z d 12
+ 20 K
( s 1 j )( s 1 j )
-
1
s 10
s1, 2 n j n 1 2
1
n 0.5 and n 4
that give a damping ratio of
0.5 0.5
0.125
n 4
and
d n 1 2 4 1 0.125 2 3.97
c j3.97
j
c
-11-10 -1 -0.5
-j
c -j3.97
Hence, the dc gain
20K
1
( s 1 j )( s 1 j )( s 10) s 0.5 j 3.97
j Satah s
s j 3.97
j
O
p d -12 -10 -1 -0.5 -j
j 3.97
Using the angle condition on the closed loop poles of 0.5 j 3.97
3.97 3.97 3.97 1 3.97 (1)
tan 1 tan 1 tan 1 tan 1
0.5 (12) 0.5 (10) 0.5 (1) 0.5 (1)
180
3.97
tan 1 11 .67
0.5 p d
p d 19.72
dB
g
0
g GM (rad.s-1)
Plot LM
o PM
-180
PM’ Plot
Design Procedure
(i) With a chosen gain, obtain the Bode plot and the gain crossover frequency, g
(ii) Determine the required phase margin
(iii) Obtain the gain that is required for the new cossover frequency, g '
This gain is the extension of the gain in (i).
Example:
Consider a type-1 system.
(a) Determine the uncompensated phase margin.
(b) If a P-compensator is cascaded to the system, determine the required gain so that the
o
phase margin is 30.
+ 2 10 4
Gc s ( s 10)( s 500)
-
Solution:
2 10 4
G ( j )
j j
10 500 ( j ) 1 1
10 500
4
j j
( j ) 1 1
10 500
and
4
LM ( j ) 20 log
2 2 and
1 1
10 500
1
s 500
(dB/dec)
Total slope -20 -40 -60
(dB/dec)
and
(rad.s-1) 1 50 100 5000
LM 2 LM 1 LM log 2 log 1
and
2 1 log 2 log 1
1 10 500 10000
(rad.s-1)
Total slope -20 -40 -60 -60
LM
(dB/dec)
LM 1 LM
LM 2
LM 2 LM 1 LM log 2 log 1
log 1 log 2
2 1 log 2 log 1
(rad.s-1) 1 50 100 5000 10000
Total -45 -90 -45 0 0
slope
(deg/dec)
(deg) -90 -166 -193 -269 -269
0
Gm'
-50
-100
-150
-200
0 1 , 2 3 4
10 10 10 10 10
-50
-100
-150
-200
-250
-300
0 Wg 1 Wg' 2 3 4
10 10 10 10 10
10 T 0.1 T (rad.s-1)
>> alpha1=2;T=0.1;alpha2=5
>> sys1=tf([1 1/T],[1 1/(alpha1*T)]);
>> sys2=tf([1 1/T],[1 1/(alpha2*T)]);
>> bode(sys1,sys2)
Gambarajah 6.47: Plot Bode bagi pemampas mengekor dengan penghampiran asimtot
Observation from the plot:
At low frequency, the compensator will not have influenced on the open-loop
gain so we can incresed the gain for steady state improvement
Design Procedure
Prosedur rekabentuk adalah seperti berikut :
(i) Determine the gain K for the required steady state error and draw the Bode plot
o o
(ii) Obtained the required phase margin and add, compensator phase angle, =5 - 12
(iii) Compensator’s zero will be a decade below of the new gain crossover frequency of (ii).
(iv) Compensator’s pole is obtained by drawing a slope of -20dB/dec from the compensator’s zero
until the line touched the 0dB.
Example
If the new gain crossover frequency is, g ' , and the LM at that frequency is LM ' Y
g dB.
While, compensator’s pole is obtained by finding the frequency where the slope of -20dB/dec which
begin from the compensator’s zero cross the 0dB-axis.
dB
1 T 1T
0 (rad.s-1)
20dB/dekad
-Y
+ K
Gc
s ( s 5)( s 20)
-
2
s 1
2 KGc
s( s 1)( s 5)( s 20)
2 50
G ( j )
j j
5 20 ( j )( j 1) 1 1
5 20
1
j j
( j )( j 1) 1 1
5 20
1
LM ( j ) 20 log
and
2 2
( ) 2 1 1 1
5 20
2K
K r had sG ( s) 10
s 0 100
2K
G(s)
s( s 1)( s 5)( s 20)
with initial value of
2 500
LM ' ( j 0.1) 20 log 40 dB
100 ( 0 .1)
dB
0.0065 0.065
0 (rad.s-1)
-20dB/dekad
-20
1 1 T 0.065
Gain of the compensator 0 .1
1T 0.65
s 0.06
The compensator Gc ( s) 0.1
s 0.0065
>> syms s;
>> den=expand((s+0.0065)*s*(s+5)*(s+20)*(s+1))
den = s^5+52013/2000*s^4+125169/1000*s^3+1613/16*s^2+13/20*s
>> num=expand(0.1*(s+0.065)*2)
num = 1/5*s+13/1000
>> num=[1/5 13/1000];den=[1 52013/2000 125169/1000 1613/16 13/20 0];
>> bode(num,den)
>> syms s;
>> den=expand((s+0.065) *s*(s+5)*(s+20)*(s+1))
den = s^5+5213/200*s^4+12669/100*s^3+865/8*s^2+13/2*s
>> num=expand(0.1*(s+0.65)*2)
num = 1/5*s+13/100
>> num=[1/5 13/100];den=[1 5213/200 12669/100 865/8 13/2 0];
>> bode(num,den)
>> num=[1/5 13/100];den=[1 5213/200 12669/100 865/8 13/2 0];
bode(num,den)
sys=tf(num,den);
[GM,PM,Wg,Wp] = margin(sys)
GM_dB = 20*log10(Gm)
GM = 693.1782
PM = 73.8732
Wg = 1.0751
Wp = 0.0192
GM_dB = 56.8169
System type –depends on input
"Weakness of attitude becomes
weakness of character."