summaryrefslogtreecommitdiff
path: root/104/CH9/EX9.17/9_17.sce
diff options
context:
space:
mode:
Diffstat (limited to '104/CH9/EX9.17/9_17.sce')
-rwxr-xr-x104/CH9/EX9.17/9_17.sce14
1 files changed, 14 insertions, 0 deletions
diff --git a/104/CH9/EX9.17/9_17.sce b/104/CH9/EX9.17/9_17.sce
new file mode 100755
index 000000000..d9741847a
--- /dev/null
+++ b/104/CH9/EX9.17/9_17.sce
@@ -0,0 +1,14 @@
+//relative stability
+s=%s;
+sys=syslin('c',(100)*(s+5)*(s+40)/(s^3*(s+100)*(s+200)))//K=1
+bode(sys)
+show_margins(sys,'bode')
+gm=g_margin(sys)
+pm=p_margin(sys)
+disp(gm,"gain margin=")
+disp(pm,"phase margin=")
+if (gm<=0 | pm<=0)
+ printf("system is unstable")
+else
+ printf("system is stable")
+ end \ No newline at end of file