summaryrefslogtreecommitdiff
path: root/29/CH8
diff options
context:
space:
mode:
Diffstat (limited to '29/CH8')
-rwxr-xr-x29/CH8/EX8.6.1/exa8_6_1.sce40
-rwxr-xr-x29/CH8/EX8.6.1/exa8_6_1_compensated.jpgbin0 -> 48163 bytes
-rwxr-xr-x29/CH8/EX8.6.1/exa8_6_1_uncompensated.jpgbin0 -> 48847 bytes
-rwxr-xr-x29/CH8/EX8.6.2/exa8_6_2.sce41
-rwxr-xr-x29/CH8/EX8.6.2/exa8_6_2_compensated.jpgbin0 -> 47836 bytes
-rwxr-xr-x29/CH8/EX8.6.2/exa8_6_2_uncompensated.jpgbin0 -> 47944 bytes
-rwxr-xr-x29/CH8/EX8.6.3/exa8_6_3.sce44
-rwxr-xr-x29/CH8/EX8.6.3/exa8_6_3_compensated.jpgbin0 -> 48508 bytes
-rwxr-xr-x29/CH8/EX8.6.3/exa8_6_3_uncompensated.jpgbin0 -> 49510 bytes
9 files changed, 125 insertions, 0 deletions
diff --git a/29/CH8/EX8.6.1/exa8_6_1.sce b/29/CH8/EX8.6.1/exa8_6_1.sce
new file mode 100755
index 000000000..57c5eb943
--- /dev/null
+++ b/29/CH8/EX8.6.1/exa8_6_1.sce
@@ -0,0 +1,40 @@
+//caption:design_suitable_compensator
+//example 8.6.1
+//page 339
+s=%s;
+clf();
+syms K;
+g=(K/(s*(1+0.2*s)));
+Kv=limit(s*g,s,0);//static velocity error coefficient
+//since Kv=10
+K=10;
+g=(10/(s*(1+0.2*s)));
+G=syslin('c',g)
+fmin=0.01;
+fmax=100;
+bode(G, fmin, fmax)
+show_margins(G)
+xtitle("uncompensated system")
+[gm,freqGM]=g_margin(G);
+[pm,freqPM]=p_margin(G);
+disp(gm,"gain_margin=");
+disp((freqGM*2*%pi),"gain_margin_freq=");
+disp(pm,"phase_margin=");
+disp((freqPM*2*%pi),"phase_margin_freq_or_gain_cross_over_frequency=");
+disp("since P.M is less than desired value so we need phase lead network ")
+disp("selecting zero of lead compensating network at w=5.5rad/sec and pole at w=13.8rad/sec and applying gain to account attenuatin factor .")
+gc=(1+0.18*s)/(1+0.072*s)
+Gc=syslin('c',gc)
+disp(Gc,"transfer function of lead compensator=");
+G1=G*Gc
+disp(G1,"overall transfer function=");
+fmin=0.01;
+fmax=100;
+figure();
+bode(G1, fmin, fmax);
+show_margins(G1)
+xtitle("compensated system")
+[gm,freqGM]=g_margin(G1);
+[pm,freqPM]=p_margin(G1);
+disp(pm,"phase_margin_of_compensated_system=");
+disp((freqPM*2*%pi),"gain_cross_over_frequency="); \ No newline at end of file
diff --git a/29/CH8/EX8.6.1/exa8_6_1_compensated.jpg b/29/CH8/EX8.6.1/exa8_6_1_compensated.jpg
new file mode 100755
index 000000000..13582834c
--- /dev/null
+++ b/29/CH8/EX8.6.1/exa8_6_1_compensated.jpg
Binary files differ
diff --git a/29/CH8/EX8.6.1/exa8_6_1_uncompensated.jpg b/29/CH8/EX8.6.1/exa8_6_1_uncompensated.jpg
new file mode 100755
index 000000000..c1dd97c6a
--- /dev/null
+++ b/29/CH8/EX8.6.1/exa8_6_1_uncompensated.jpg
Binary files differ
diff --git a/29/CH8/EX8.6.2/exa8_6_2.sce b/29/CH8/EX8.6.2/exa8_6_2.sce
new file mode 100755
index 000000000..52026a035
--- /dev/null
+++ b/29/CH8/EX8.6.2/exa8_6_2.sce
@@ -0,0 +1,41 @@
+//caption:design_phase_lead_compensator
+//example 8.6.2
+//page 340
+clc;
+s=%s;
+clf();
+syms K;
+g=(K/(s^2*(1+0.05*s)));
+Ka=limit(s^2*g,s,0);//static acceleration error coefficient
+//since Ka=100
+K=100;
+g=(100/(s^2*(1+0.05*s)));
+G=syslin('c',g)
+fmin=0.01;
+fmax=100;
+bode(G, fmin, fmax)
+show_margins(G)
+xtitle("uncompensated system")
+[gm,freqGM]=g_margin(G);
+[pm,freqPM]=p_margin(G);
+disp(gm,"gain_margin=");
+disp((freqGM*2*%pi),"gain_margin_freq=");
+disp(pm,"phase_margin=");
+disp((freqPM*2*%pi),"phase_margin_freq_or_gain_cross_over_frequency=");
+disp("since P.M is negaative so system is unstable ")
+disp("selecting zero of lead compensating network at w=5rad/sec and pole at w=54rad/sec and applying gain to account attenuatin factor .")
+gc=(1+0.2*s)/(1+0.0186*s)
+Gc=syslin('c',gc)
+disp(Gc,"transfer function of lead compensator=");
+G1=G*Gc
+disp(G1,"overall transfer function=");
+fmin=0.01;
+fmax=100;
+figure();
+bode(G1, fmin, fmax)
+show_margins(G1)
+xtitle("compensated system")
+[gm,freqGM]=g_margin(G1);
+[pm,freqPM]=p_margin(G1);
+disp(pm,"phase_margin_of_compensated_system=");
+disp((freqPM*2*%pi),"gain_cross_over_frequency="); \ No newline at end of file
diff --git a/29/CH8/EX8.6.2/exa8_6_2_compensated.jpg b/29/CH8/EX8.6.2/exa8_6_2_compensated.jpg
new file mode 100755
index 000000000..1f281ea73
--- /dev/null
+++ b/29/CH8/EX8.6.2/exa8_6_2_compensated.jpg
Binary files differ
diff --git a/29/CH8/EX8.6.2/exa8_6_2_uncompensated.jpg b/29/CH8/EX8.6.2/exa8_6_2_uncompensated.jpg
new file mode 100755
index 000000000..d22203e90
--- /dev/null
+++ b/29/CH8/EX8.6.2/exa8_6_2_uncompensated.jpg
Binary files differ
diff --git a/29/CH8/EX8.6.3/exa8_6_3.sce b/29/CH8/EX8.6.3/exa8_6_3.sce
new file mode 100755
index 000000000..24a6be898
--- /dev/null
+++ b/29/CH8/EX8.6.3/exa8_6_3.sce
@@ -0,0 +1,44 @@
+//caption:design_suitable_compensator
+//example 8.6.3
+//page 344
+clc;
+s=%s;
+clf();
+syms K;
+g=(K/(s*(1+0.5*s)*(1+0.2*s)));
+Kv=1/0.125//static velocity error coefficient(Kv=desired output velocity/steady state error)
+//since Kv=8, as system is type 1 , so K=Kv;
+K=8;
+g=(8/(s*(1+0.5*s)*(1+0.2*s)));
+G=syslin('c',g)
+fmin=0.01;
+fmax=100;
+bode(G, fmin, fmax)
+show_margins(G)
+xtitle("uncompensated system")
+[gm,freqGM]=g_margin(G);
+[pm,freqPM]=p_margin(G);
+disp(gm,"gain_margin=");
+disp((freqGM*2*%pi),"gain_margin_freq_or_phase_cross_over_frequency==");
+disp(pm,"phase_margin=");
+disp((freqPM*2*%pi),"phase_margin_freq_or_gain_cross_over_frequency=");
+disp("since gain crossover freq and phase crossover freq are very close to each other. So, system is marginally stable");
+disp("so we need phase lag network ")
+disp("selecting zero of lead compensating network at w=0.18rad/sec and pole at w=0.04rad/sec and applying gain to account attenuatin factor .")
+gc=(1+5.55*s)/(1+24.7*s)
+Gc=syslin('c',gc)
+disp(Gc,"transfer function of lead compensator=");
+G1=G*Gc
+disp(G1,"overall transfer function=");
+fmin=0.01;
+fmax=100;
+figure();
+bode(G1, fmin, fmax)
+show_margins(G1)
+xtitle("compensated system")
+[gm,freqGM]=g_margin(G1);
+[pm,freqPM]=p_margin(G1);
+disp(gm,"gain_margin=");
+disp((freqGM*2*%pi),"gain_margin_freq_or_phase_cross_over_frequency==");
+disp(pm,"phase_margin_of_compensated_system=");
+disp((freqPM*2*%pi),"gain_cross_over_frequency="); \ No newline at end of file
diff --git a/29/CH8/EX8.6.3/exa8_6_3_compensated.jpg b/29/CH8/EX8.6.3/exa8_6_3_compensated.jpg
new file mode 100755
index 000000000..0d2769ff0
--- /dev/null
+++ b/29/CH8/EX8.6.3/exa8_6_3_compensated.jpg
Binary files differ
diff --git a/29/CH8/EX8.6.3/exa8_6_3_uncompensated.jpg b/29/CH8/EX8.6.3/exa8_6_3_uncompensated.jpg
new file mode 100755
index 000000000..a376ee536
--- /dev/null
+++ b/29/CH8/EX8.6.3/exa8_6_3_uncompensated.jpg
Binary files differ