summaryrefslogtreecommitdiff
path: root/1151/CH9/EX9.8/example8.sce
diff options
context:
space:
mode:
Diffstat (limited to '1151/CH9/EX9.8/example8.sce')
-rwxr-xr-x1151/CH9/EX9.8/example8.sce30
1 files changed, 30 insertions, 0 deletions
diff --git a/1151/CH9/EX9.8/example8.sce b/1151/CH9/EX9.8/example8.sce
new file mode 100755
index 000000000..24f13ef43
--- /dev/null
+++ b/1151/CH9/EX9.8/example8.sce
@@ -0,0 +1,30 @@
+s=%s;
+ K=23.6;//K=23.6sec^-1
+g = K/(s*(s+4)*(s+5));
+ G= syslin ('c',g)
+fmin =0.01;
+fmax =100;
+bode (G,fmin , fmax )
+show_margins (G)
+xtitle (" uncompensated sys t em")
+[gm , freqGM ]= g_margin (G)
+[pm , freqPM ]= p_margin (G)
+disp(gm ," gain margin=")
+disp(( freqGM *2* %pi)," g a in margin f r e q=");
+disp(pm ," phase margin=")
+disp(( freqPM *2* %pi)," phas e margin f r e q=");
+disp("since the phase margin is greater than desired phase margin system need lag compensator ")
+gc =(s +0.4) /(s+0.0944);
+ Gc= syslin ('c',gc);
+disp (Gc ," transfer function of lag compensator=");
+G1=G*Gc
+disp (G1 ," overall transfer function=");
+fmin =0.01;
+ fmax =100;
+bode (G1 ,fmin , fmax );
+show_margins (G1)
+xtitle (" compensated sys t em")
+[gm , freqGM ]= g_margin (G1);
+[pm , freqPM ]= p_margin (G1);
+disp (pm ," phase margin of compensated system=")
+disp (( freqPM *2* %pi)," gain crossover frequency=")