blob: 8d6a092bd6b4a34f5107c0c907a58c3d5a8726c1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
//root locus
s=%s
sys=syslin('c',(s+1)/(s*(s+4)*(s^2+2*s+2)))
clf
evans(sys)
n=4;
disp(n,"no of poles=")
m=1;
disp(m,"no of poles=")
//angle of asymptotes
printf("angle of asymptotes of RL")
for i=0:(n-m-1)
O=((2*i)+1)/(n-m)*180
disp(O,"q=")
end
printf("angle of asymptotes of CRL")
for i=0:(n-m-1)
O=(2*i)/(n-m)*180
disp(O,"q=")
end
//centroid
printf("Centroid=((sum of all real part of poles of G(s)H(s))-(sum of all real part of zeros of G(s)H(s))/(n-m) \n")
C=((0-4-1-1)-(-1))/(n-m);
disp(C,"centroid=")
|