summaryrefslogtreecommitdiff
path: root/29/CH12/EX12.27/exa12_27.sce
blob: ebeda64fd483f2b3b267314231efc06a434d8c8c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//caption:gain_and_phase_margin
//example 12_27
//page543
clf();
s=%s;
s1=-s;
disp("for K=0.5")
g=(0.5)/(s*(s+1)^2);
GH=syslin('c',g);
nyquist(GH);
//mtlb_axis([-5 1  -500 500]);
xtitle('Nyquist plot of (2.5*3)/(s*(0.4*s+1)*(0.2*s+1))')
pm=p_margin(GH)
disp(pm,"phase margin=")
gm=g_margin(GH)
disp(gm,"gain margin=")