Solution 10.8.9.4
The MATLAB program
%
%Note when matlab takes the transpose
%ofarowmatrix with complet elements
%itCHANGES THE SIGN of the complex part
%
x=linspace(-0.001,-4,100);;
s= j*x;;
s=s-abs(x);;
s=s'
y=linspace(4,0,100);;
s1 = -j*y;;
s1 = s1 -4;;
s1= s1'
s=[s;; s1]
K=10
z=3
p1 = 0
p2 = 1
p3 = 18
g=(K*(s + 3))./((s + p1).*(s + p2).*(s+p3))
realg = real(g)
imagg = imag(g)
figure(1)
plot(realg,imagg)
grid on
axis([-4 0 -0.5 0.5])
print -deps 10894polara.eps
figure(2)
plot(realg,imagg)
grid on
axis([-0.5 0 -0.1 0.1])
print -deps 10894polarb.eps
K=linspace(0 ,50,1000);;
gcgp = zpk([-z],[-p1 -p2 -p3],10)
[R,K] = rlocus(gcgp,K);;
figure(3)
1
-4 -3.5 -3 -2.5 -2 -1.5 -1 -0.5 0
-0.5
-0.4
-0.3
-0.2
-0.1
0
0.1
0.2
0.3
0.4
0.5
Figure 1: Large scale polar plot
plot(R,'k.')
grid on
axis([-9,1,-5,5])
print -deps 10894rl.eps
Draws the polar plots shown in Figures 1 and 2, for the contour
shown
in Figure 3. The complete Nyquist plot is shown in Figure 4
For K =10
pointd = ;2:3
pointc = ;0:13
pointd = ;0:105
pointd = ;0:06
For
K<
10
2:3
=4:3478;;
there are no encirclements The poles at s =0and s = ;1areinside the
contour
: Thus
Z = N + P =0+2=2;;
2
-0.5 -0.45 -0.4 -0.35 -0.3 -0.25 -0.2 -0.15 -0.1 -0.05 0
-0.1
-0.08
-0.06
-0.04
-0.02
0
0.02
0.04
0.06
0.08
0.1
Figure 2: Small scale polar plot
Re(s)
Im(s)
Figure 3: Contour
3
123
45
Im(G G )
cp
Re( )G G
cp
a
b
c
d
Figure 4: Complete Nyquist plot
and the closed loop poles that originate from s =0and s = ;1are inside
the contour.
For
4:3478<K<
10
0:13
=76:9231
There are twoclockwise encirclements and
Z = N +P = ;2+2=0;;
and there are no closed loop poles inside the contour. Actually 76.9 is an
approximate value. The exact value is 78, as wefound in Chapter 7.
For
78 <K<10=0:105 = 95:2381
there is one counterclockwise and one clockwise encirclementandso
Z = N +P =0+2;;
and the two dominantpolesarenowinside the contour again.
For
95:2381 <K<10=0:06 = 166:7;;
4
-9 -8 -7 -6 -5 -4 -3 -2 -1 0 1
-5
-4
-3
-2
-1
0
1
2
3
4
5
Figure 5: Root locus
weagain havetwocounterclockwise encirclementand
Z = N +P = ;2+2=0:
Finally for K>166:7 there is one counterclockwise encirclementand
Z = N +P = ;1+2=1:
This corresponds to the the closed loop pole that originated at s = ;18
reaching and passing to the rightofs = ;4.
Thus the dominantpoles are inside the triangular area for
0 <K<4:3478 and 78 <K<95:2381:
All this can be seen from the root locus in Figure 5.
5