summaryrefslogtreecommitdiff
path: root/1499/CH5/EX5.6/q6.sce
blob: e1daf7555dc2ba508946aefab54caf24176fc3d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
s=%s;
syms K;
g=(K/(s^2);
// given K=10
K=10;


g=(5/(s^2));

G=syslin('c',g)
fmin=0.001;
fmax=1000;
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=");