You are on page 1of 16

P7.

CP 7.2
>> num=[1,-2,2];den=[1,3,2,0];
>> sys=tf(num,den);
>> rlocus(sys)
>> [k,poles] = rlocfind(sys)
Select a point in the graphics window
selected_point =
-0.0010 + 0.6445i
k =
0.7870
poles =
-3.7843 + 0.0000i

-0.0013 + 0.6449i
-0.0013 - 0.6449i

CP 7.8
% Define the open loop function, and make
% a transfer function.
num=[1,5]; den=[1,0,0];
sys=tf(num,den);
% Create vertical line for -zeta*wn on the
% the real axis.
x1=-8:0.1:8;
zetawn=-1*ones(1,length(x1));
% Create the lines for the zeta=0.6
x2=-6:0.1:0; zeta=0.6;
% Find the angle by taking the arccos of
% zeta.
angle=acos(zeta);
% Find the corresponding y values.
ypos=tan(angle)*x2;

yneg=-tan(angle)*x2;
% Create the root locus
rlocus(sys)
% Hold the locus to plot the other lines
hold on
plot(zetawn,x1,'--')
plot(x2,ypos,'--',x2,yneg,'--')
% Take hold off
hold off
% Find the Intersect.
[k, poles] = rlocfind(sys)

Select a point in the graphics window


selected_point =
-3.5707 + 4.7877i

k =
7.1395
poles =
-3.5697 + 4.7911i
-3.5697 - 4.7911i