Download as pdf or txt
Download as pdf or txt
You are on page 1of 16

CONTROL AND ELECTRICAL SYSTEM DESIGN LAB

Guided by: Prof. Susovon Samanta

ASSIGNMENT 2

DATE:26-08-2022
119EE0642,KRITARTHA NATH

1
119EE0642,KRITARTHA NATH

2
119EE0642,KRITARTHA NATH

Matlab code:
K = (0:0.1:220).';
N = length(K);
x = zeros(N, 2);
y = zeros(N, 2);

c=[1,5,6];
R=roots(c);

for i = 1:N
K_ = K(i);
C = [1, 5,(6+K_)];
r = roots(C).'; % 1*2
x(i, : ) = real(r);
y(i, : ) = imag(r);

end
centroid=(R(1)+R(2))/2;
pole1=append(append('pole1: (',int2str(R(1))),',0)');
pole2=append(append('pole2: (',int2str(R(2))),',0)');
centr=append(append('centroid: (',num2str(centroid)),',0)');
figure();

plot(x, y);
xlabel('Real axis');
ylabel('Imaginary axis');
hold on;
plot(R(1),0,'r*');
hold on;
plot(R(2),0,'r*');
hold on;
plot(centroid,0,'-o');
%text(centroid,0,'centroid');
hold on;
legend('root-locus','root-locus',pole1,pole2,centr);

3
119EE0642,KRITARTHA NATH

Fig 1: Root locus diagram from part 1(a).

4
119EE0642,KRITARTHA NATH

a.
Matlab code:

c=[1,5,4,0];
R=roots(c).';
centroid=(R(1)+R(2)+R(3))/3;
pole1=append(append('pole1: (',int2str(R(1))),',0)');
pole2=append(append('pole2: (',int2str(R(2))),',0)');
pole3=append(append('pole3: (',int2str(R(3))),',0)');

num=[1];
den=[1,5,4,0];

figure();

rlocus(num,den);

v = [-6 6 -6 6];
axis(v); axis('square')
grid;
text(R(1)+3,0,pole1);
text(R(1)+3,1,pole2);
text(R(1)+3,2,pole3);
title ('Root-Locus Plot of G(s) = K/[s(s + 1)(s+ 4)]')

Fig 2: Root locus of G(s)=k/s(s+1)(s+4)

5
119EE0642,KRITARTHA NATH

Matlab code:
num=[20 80];
den=[1 5 4 20 ];
sys=tf(num,den);
step(sys,10);

6
119EE0642,KRITARTHA NATH

Fig 3: Time response of the closed-loop system

c.

Fig 4: Root locus for zeta= 0.85

7
119EE0642,KRITARTHA NATH

Fig 5: Root locus for zeta= 0.77

The closed loop poles obtained are at approx.: -4.103, -0.450-j0.301, -0.450+j0.301.
Since the pole -4.103 lies far away from the origin, it is not a dominant pole, The complex
conjugate pair of poles are dominant poles.

d.
(i) adding [-1,0]:
Matlab code:
num=[1 -0.5];
den=conv(conv([1 0],[1 1]),[1 4]);
sys=tf(num,den);
rlocus(sys)
v = [-6 0 -6 6];
axis(v); axis('square')
grid;

8
119EE0642,KRITARTHA NATH

Fig 6: adding zero at (-1,-0)

(ii) adding [-2,-1]:

Matlab code:

num=[1 -1.5];
den=conv(conv([1 0],[1 1]),[1 4]);
sys=tf(num,den);
rlocus(sys);
v = [-6 2 -6 6];
axis(v); axis('square')
grid;

9
119EE0642,KRITARTHA NATH

Fig 7: adding zero at (-2,-1)

(ii) adding [-inf,-2]:

Matlab code:

num=[1 -10];
den=conv(conv([1 0],[1 1]),[1 4]);
sys=tf(num,den);
rlocus(sys);
v = [-6 11 -6 6];
axis(v); axis('square')
grid;

10
119EE0642,KRITARTHA NATH

Fig 8: adding zero at (-inf,-2)

11
119EE0642,KRITARTHA NATH

a.
Matlab code:
num=[1 3];
den=conv([1 0],[1 2]);
sys=tf(num,den);
rlocus(sys);
hold on;
plot([-2 -2], [2 -2],'r');

Fig 9: root locus and finding gain for min damping

In the above code, two vertical at Re =-2 intersects the root locus plot at two points to give us
the min zeta value. s = -2+1.42i (approx.)

s = -2-1.42i.
Min. zeta value found is 0.817 and its gain is 2.05.

b.
12
119EE0642,KRITARTHA NATH

13
119EE0642,KRITARTHA NATH

Ans:
Matlab code:
num=[5/9 100/3 2500/9];
den=[1 100/3 2500/9];
sys=tf(num,den);
step(sys,'--b');
hold on;
num1=(576/5)*[1 60 500];
den1=[1 144 0 0];
sys1=tf(num1,den1);
sysf=feedback(sys1,1);
step(sysf,'r');
hold on;
legend('Dominant poles', 'Ordinary poles');
grid on;

Fig 10: Step response using ordinary and dominant poles

14
119EE0642,KRITARTHA NATH

Conclusion:
Thus, through this experiment, we got to learn different properties of root locus. The root-
locus plot clearly shows the contributions of each open-loop pole and zero to the locations of
the closed-loop poles. The root-locus plot also shows the way the open-loop poles and zeros
should be modified so that the response meets system performance specifications.

15

You might also like