Solution 6.8.1.16
The MATLAB dialogue
EDU>g = zpk([-1],[0 -4 -10],5)
Zero/pole/gain:
5 (s+1)
--------------
s(s+4) (s+10)
EDU>rlocus(g)
EDU>print -deps rl68116.eps
EDU>
draws and saves the root locus is shown in Figure 1.
-10 -8 -6 -4 -2 0 2 4
-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=1
p1 =0
p2 = 4
1
8.4 8.41 8.42 8.43 8.44 8.45 8.46 8.47 8.48 8.49 8.5
-181.2
-181
-180.8
-180.6
-180.4
-180.2
-180
-179.8
-179.6
Figure 2: Angle versus !
n
p3 = 10
zeta = 0.8
omegan =linspace(8.4,8.5,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 68116a.eps
creates the plot shown in Figure 2. Wesee that the root locus crosses the
line of constant damping ratio at about s = ;6:7314+ j5:0486. Indeed, at
s = ;6:7314+ j5:0486 the net angle is 180:00
.
Then the gain to place closed loop poles at s = ;12:3471+ j9:2603 is
K =
jsjjs+4js +10j]
js +1j
s=;6:7314+j5:0486
=38:0319:
The natural frequency of the closed loop poles is
!
n
=
p
6:7314
2
+5:0486
2
=8:4143:
The MATLAB program
z=1
2
p1 =0
p2 = 4
p3 = 10
zeta = 0.8
omegan =linspace(8.4,8.5,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 68116a.eps
pause
s=-zeta*omegan(58) + j*omegan(58)*sqrt(1-zeta^2)
K=(abs(s + p1)*abs(s+p2)*abs(s+p3))/abs(s+z)
omegn=omegan(58)
sc = conj(s)
tn2 = zpk([],[s sc],omegan(58)^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 sr68116.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