summaryrefslogtreecommitdiff
path: root/1499/CH5/EX5.22/s22.sce
blob: 7b6388f49f374eb7ff893d67866291f1f243011c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
s=%s;

g=(5/(s*(s+1)*(s^0.2+2*s+5)));

G=syslin('c',g)
fmin=0.01;
fmax=100;
bode(G,fmin,fmax)
show_margins(G)
xtitle("uncompensated system")
[gm,freqGM]=g_margin(G)
[pm,freqPM]=p_margin(G)
disp(gm,"gain_margin=")
disp((freqGM*2*%pi),"gain margin freq=");
disp(pm,"phase margin=")
disp((freqPM*2*%pi),"phase margin freq=");