summaryrefslogtreecommitdiff
path: root/1340/CH4/EX4.5/4_5.sce
blob: a83d4fdf2ce93cf0f5607c6cee5e116655567110 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
clc;
s = %s;
G = syslin('c',100/(s^2+15*s+100));
disp(G,"G(s)=");
den = denom(G);
coef = coeff(den);
Wn = sqrt(coef(1,1));
disp(Wn,"Natural Frequency =");
zeta = coef(1,2)/(2*Wn);
disp(zeta,"Damping Ratio =");
Tp = %pi/(Wn*sqrt(1-zeta^2));
disp(Tp,"Peak time");
Os = %e^(-%pi*zeta/sqrt(1-zeta^2))*100;
disp(Os,"Pecentage overshoot =");
Ts = 4/(zeta*Wn);
disp(Ts,"Settling time for 2% tolerance =");
Tr = (%pi - atan(sqrt(1-zeta^2)/zeta))/(Wn*sqrt(1-zeta^2));
disp(Tr,"Rise time =");
C = syslin('c',G/s);
disp(C);