Section 6–3 / Plotting Root Loci with MATLAB 301To obtain a root-locus plot with MATLAB, enter the numerator and denominator
as usual. For example, if T=1sec and enter the following numandden
in the program:
num = [-0.5 1]
den = [1 1 0]
MATLAB Program 6–8 gives the plot of the root loci shown in Figure 6–27.
Ta=0.5 sec,
MATLAB Program 6–8
num = [-0.5 1];
den = [1 1 0];
k1 = 0:0.01:30;
k2 = 30:1:100;
K3 = 100:5:500;
K = [k1 k2 k3];
rlocus(num,den,K)
v = [-2 6 -4 4]; axis(v); axis('square')
grid
title('Root-Locus Plot of G(s) = K(1 - 0.5s)/[s(s + 1)]')
% Place 'x' mark at each of 2 open-loop poles.
% Place 'o' mark at open-loop zero.
gtext('x')
gtext('x')
gtext('o')
Root-Locus Plot of G(s) = K(1− 0.5s)/[s(s + 1)]Real AxisImag Axis1− 3− (^4) − 2 − 10123456
2
− 1
− 2
0
3
4
Figure 6–27
Root-locus plot of
G(s)=
K(1-0.5s)
s(s+1)