summaryrefslogtreecommitdiff
path: root/29/CH7/EX7.17.9/exa7_17_9.sce
blob: a7cebccaaffc3f4f0926e13e537504fc97050c7f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//caption: gain_margin_and_phase_margin
//example 7.17.9
//page 245
s=%s;
syms w;
s1=-s;
gh=(32/(s*(s+sqrt(6))^3));
g=sym((32/(s*(s+sqrt(6))^3)));
s=%i*w;
a=eval(g);
w=sqrt(2);
b=float(eval(abs(a)));
disp(b,"at w=sqrt(2),|G(jw)H(jw)|=");
GH=syslin('c',gh);
gm=g_margin(GH);
pm=p_margin(GH);
disp(gm,"Gain margin=");
disp(pm,"Phase margin=");
disp("since gm=0 and pm=0, so system is marginally stable")