blob: 5829325589babd55bfbd230c53994eddad4154f0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
s=%s;
g=(1/(s*((s*0.5)+1)*((s*0.1)+1)));
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=");
|