### Design and Compensation via Root Locus

```Design & Compensation via Root Locus
[email protected]
1
Contents
• Compensation
– Lag Compensation
Compensation
• Used to Improve the performance of stable or unstable
systems.
Compensator
Gc(S)
Plant
G(S)
H(S)
• Used to Improve the
Transient behavior of
the system.
1
(S  )
T
Gc ( S )  K c
1
(S 
)
T
where   1
Compensator
Plant
G(S)
Gc(S)
H(S)
• Consider the Following Unity feedback system
R (S )

k=4
p=[0
-2 ]
z=[];
usys=zpk(z,p,k)
rlocus(usys)
csys=feedback(usys,1)
[wn b]=damp(csys)
sgrid(b,wn)
axis([-3 0 -3
3 ])

4
S ( S  2)
C (S )
Design Requirements
• It is desired to increase ωn to 4 rad/sec without changing
damping ratio of closed loop poles.
R (S )

k=4
p=[0
-2 ]
z=[];
usys=zpk(z,p,k)
rlocus(usys)
wn=[2 4]; b=[0.5 0.5];
sgrid(b,wn)
axis([-5 0 -5
5 ])

4
S ( S  2)
C (S )
( S  2.9)
Gc ( S )  4.68
( S  5.4)
kc=4.68
pc=-5.4
zc=-2.9
lc=zpk(zc,pc,kc)
ltiview(lc)
Pole-Zero Map
1
0.98
0.96
0.92
0.85
0.7
0.45
0.8
0.991
0.6
0.4
0.998
Imag Axis
0.2
0
5
4
3
2
1
-0.2
-0.4
0.998
-0.6
0.991
-0.8
0.98
-1
-5
0.96
-4
0.92
-3
0.85
-2
0.7
-1
0.45
0
Real Axis
Bode Diagram
14
Magnitude (dB)
13
12
11
10
9
8
20
Phase (deg)
15
10
5
0
-1
10
0
1
10
10
2
10
Compensated Vs Uncompensated System
Root locus of Compensated & uncompensated Systems
( S  2.9)
G ( S )Gc ( S )  18.7
S ( S  2)(S  5.4)
4
G( S ) 
S ( S  2)
b=0.5; wn=[2 4];
ku=4
pu=[0
-2 ]
zu=[ ];
usys=zpk(zu,pu,ku)
k=18.7
p=[0
-2
-5.4]
z=-2.9
csys=zpk(z,p,k)
rlocus(usys, ‘g’,csys,’b’)
Sgrid(b,wn)
Compensated Vs Uncompensated System
Root locus of Compensated & uncompensated Systems
Root Locus
10
8
6
Uncompensated
4
compensated
4
0.5
2
Imag Axis
2
0
-2
2
-4
0.5
4
-6
-8
-10
-5
-4
-3
-2
-1
0
Real Axis
Compensated Vs Uncompensated System
Response of compensated & Uncompensated system
G( S )Gc ( S )
18.7 S  54.23
 3
1  G( S )Gc ( S ) S  7.4S 2  29.5S  54.23
G(S )
4
 2
1  G ( S ) S  2S  4
numu=4;
denu=[1 2 4];
numc=[18.7
54.23];
denc=[1
7.4
29.5
54.23];
csys=tf(numc,denc);
usys=tf(numu,denu);
ltiview(usys, ‘g:’,csys,’b’)
Compensated Vs Uncompensated System
Pzmap of Compensated & Uncompensated System
Pole-Zero Map
4
3
Uncompensated
compensated
2
Imag Axis
1
0
-1
-2
-3
-4
-3.5
-3
-2.5
-2
-1.5
-1
-0.5
0
Real Axis
Compensated Vs Uncompensated System
Step response of Compensated & Uncompensated System
Step Response
1.4
1.2
Amplitude
Uncompensated
compensated
1
0.8
0.6
0.4
0.2
0
0
1
2
3
4
5
6
Time (sec)
Compensated Vs Uncompensated System
Bode plot of Compensated & Uncompensated System
Bode Diagram
20
-20
-40
-60
-80
0
-45
Phase (deg)
Uncompensated
compensated
Magnitude (dB)
0
-90
-135
-180
-1
10
0
1
10
10
2
10
Compensated Vs Uncompensated System
Steady State Error of Compensated & Uncompensated System
According to final value theorem
K v  lim SG ( S )
S 0
Steady state error is given by
In MATLAB
1
ess 
Kv
limit(f(x),x,0)
Returns the limit of a function f(x) as x
0.
Compensated Vs Uncompensated System
Steady State Error of Compensated & Uncompensated System
clear
4
syms s
G( S ) 
S ( S  2)
numu=4
denu=s^2+2*s
( S  2.9)
Gu=numu/denu
G( S )Gc ( S )  18.7
S ( S  2)(S  5.4)
numc=18.7*s+54.23
denc=s^3+7.4*s^2+10.8*s
Gc=numc/denc
kvu=limit(s*Gu,s,0)
kvc=limit(s*Gc,s,0)
essu=1/kvu
essc=1/kvc