From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 29/CH7/EX7.17.9/exa7_17_9.sce | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 29/CH7/EX7.17.9/exa7_17_9.sce (limited to '29/CH7/EX7.17.9/exa7_17_9.sce') diff --git a/29/CH7/EX7.17.9/exa7_17_9.sce b/29/CH7/EX7.17.9/exa7_17_9.sce new file mode 100755 index 000000000..a7cebccaa --- /dev/null +++ b/29/CH7/EX7.17.9/exa7_17_9.sce @@ -0,0 +1,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") \ No newline at end of file -- cgit