Solution 10.8.9.5
The MATLAB program
%
% Note when matlab takes the transpose
%ofarow matrix with complet elements
%itCHANGES THE SIGN of the complex part
%
x=linspace(-1,-4,100);;
s=x+j*x;;
y=linspace(0.001,1);;
s1 = -1 - j*y;;
z=linspace(4,0,100);;
s2 = -4 -j*z;;
s = s';;
s1 = s1';;
s2 = s2';;
s=[s1;; s;;s2]
K=10
z=2
p1 = 0
p2 = 1
p3 = 10
g=(K*(s + z))./((s + p1).*(s + p2).*(s+p3))
realg = real(g)
imagg = imag(g)
figure(1)
plot(realg,imagg)
grid on
axis([-2 0 -0.15 1])
print -deps 10895polara.eps
figure(2)
plot(realg,imagg)
grid on
axis([-0.8 -0.15 -0.05 0.05])
print -deps 10895polarb.eps
K=linspace(0 ,50,1000);;
gcgp = zpk([-z],[-p1 -p2 -p3],10)
[R,K] = rlocus(gcgp,K);;
figure(3)
plot(R,'k.')
grid on
axis([-9,1,-5,5])
print -deps 10895rl.eps
1
-2 -1.8 -1.6 -1.4 -1.2 -1 -0.8 -0.6 -0.4 -0.2 0
-0.1
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
Figure 1: Large scale polar plot
K4 = 10
s4 = -1 + j*0.001
g4 = (K4*(s4 + z))/((s4 + p1)*(s4 + p2)*(s4+p3))
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
pointa = ;0:485
pointb = ;0:275
pointc = ;0:24
For
K<
10
0:485
=20:6185;;
there is one clockwise encirclement. The pole at s = ;1isinside the contour
: Thus
Z = N + P
2
-0.8 -0.7 -0.6 -0.5 -0.4 -0.3 -0.2
-0.05
-0.04
-0.03
-0.02
-0.01
0
0.01
0.02
0.03
0.04
0.05
Figure 2: Small scale polar plot
Re(s)
Im(s)
Figure 3: Contour
3
Im(G G )
cp
Re( )G G
cp
a
b
c
8-
Figure 4: Complete Nyquist plot
4
= ;1+1
= 0;;
and none of the closed loop poles are inside the contour.
For
20:6185<K<
10
0:275
=36:36
There is one counterclockwise encirclementand
Z = N +P
= 1+1
= 2;;
and there are two closed loop poles inside the contour. This means that the
closed loop poles that started at s = ;1ands =0are now inside
. The
closed loop pole that originated at s = ;10 is still outside
.
For
36:36 <K<10=0:24 = 41:67
there are two counterclockwise encirclements and so
Z = N +P
= 2+1
= 3;;
and the all three closed loop poles are now inside the contour again.
For
41:67 <K
weagain havenoencirclements and
Z = N +P
= 0+1
= 1;;
and the pole that originated at s = ;10 is still inside the
but the dominant
poles that started at s =0and s = ;1nolonger are.
Thus the dominantpoles are inside the triangular area for
20:6185 <K<40:67:
All this can be seen from the root locus in Figure 5.
5
-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
6