Solution 6.8.1.14
The MATLAB dialogue
EDU>g = zpk([-0.5],[0 -5,-20],5)
Zero/pole/gain:
5 (s+0.5)
--------------
s(s+5) (s+20)
EDU>rlocus(g)
EDU>print -deps rl68114a.eps
EDU>
draws and saves the root locus is shown in Figure 1.
-20 -15 -10 -5 0 5
-2.5
-2
-1.5
-1
-0.5
0
0.5
1
1.5
2
2.5
Real Axis
I
mag
A
x
i
s
Figure 1: Root locus
Then the MATLAB program
z=0.5
p1 =0
p2 = 5
1
20.35 20.4 20.45 20.5 20.55 20.6
-180.4
-180.3
-180.2
-180.1
-180
-179.9
-179.8
-179.7
-179.6
-179.5
Figure 2: Angle versus !
n
p3 = 20
zeta = 0.6
omegan =linspace(20.4,20.6,400);;
s=-zeta*omegan + j* omegan *sqrt(1-zeta^2);;
ang = (angle(s + z)-angle(s + p1)-angle(s+p2)-angle(s+p3))*180/pi;;
plot(omegan,ang)
print -deps 68114a.eps
creates the plot shown in Figure 2. Wesee that the root locus crosses the
line of constant damping at about s = ;12:3038 + j16:4050. Indeed, at
s = ;12:3038+ j16:4050 the net angle is 180:000
.
Then the gain to place closed loop poles at s = ;12:3038+ j16:4050 is
K =
jsjjs +5js +20j]
js +0:5j
s=;12:3038+j16:4050
=330:1661:
The natural frequency of the closed loop poles is
!
n
=
p
12:3038
2
+16:4050
2
=20:5063:
The MATLAB program
2
z=0.5
p1 =0
p2 = 5
p3 = 20
zeta = 0.6
omegan =linspace(20.4,20.6,400);;
s=-zeta*omegan + j* omegan *sqrt(1-zeta^2);;
ang = (angle(s + z)-angle(s + p1)-angle(s+p2)-angle(s+p3))*180/pi;;
plot(omegan,ang)
print -deps 68114a.eps
s=-zeta*omegan(213) + j*omegan(213)*sqrt(1-zeta^2)
K=(abs(s + p1)*abs(s+p2)*abs(s+p3))/abs(s+z)
omegn=omegan(213)
sc = conj(s)
tn2 = zpk([],[s sc],omegan(213)^2)
g=zpk([-z],[-p1 -p2 -p3],K)
tc = feedback(g,1)
T=linspace(0,6,200);;
[Yn2,T] = step(tn2,T);;
[Ytc,T] = step(tc,T);;
plot(T,Yn2,'k-',T,Ytc,'k--')
print -deps sr68114.eps
Prints and plots the step responses of T
c
(t) and T
N2
(t) shown in Figure 3
3
0 1 2 3 4 5 6
0
0.2
0.4
0.6
0.8
1
1.2
1.4
Figure 3: Comparison of step responses of T
c
and T
N2
for =0:4
4