summaryrefslogtreecommitdiff
path: root/29/CH12/EX12.51/exa12_51.sce
blob: 0f03ac36edea1968ec917836d60985f2f463541f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//caption:root_locus_and_gain,phase_margin
//example 12.51
//page 580
s=%s;
K=3.46
G=K/(s*(s+1)*(s+2))
G=syslin('c',G)
clf();
evans(G,20)
xgrid(2)
[gm,freq_gm]=g_margin(G)
[pm,freq_pm]=p_margin(G)
disp(gm,"gain_margin=",freq_gm*2*%pi,"gain_margin_freq=")
disp(pm,"phase_margin=",freq_pm*2*%pi,"phase_margin_freq=")