summaryrefslogtreecommitdiff
path: root/3889/CH10/EX10.1
diff options
context:
space:
mode:
authorprashantsinalkar2018-02-03 11:01:52 +0530
committerprashantsinalkar2018-02-03 11:01:52 +0530
commit7bc77cb1ed33745c720952c92b3b2747c5cbf2df (patch)
tree449d555969bfd7befe906877abab098c6e63a0e8 /3889/CH10/EX10.1
parentd1e070fe2d77c8e7f6ba4b0c57b1b42e26349059 (diff)
downloadScilab-TBC-Uploads-7bc77cb1ed33745c720952c92b3b2747c5cbf2df.tar.gz
Scilab-TBC-Uploads-7bc77cb1ed33745c720952c92b3b2747c5cbf2df.tar.bz2
Scilab-TBC-Uploads-7bc77cb1ed33745c720952c92b3b2747c5cbf2df.zip
Added new codeHEADmaster
Diffstat (limited to '3889/CH10/EX10.1')
-rw-r--r--3889/CH10/EX10.1/Ex10_1.sce51
-rw-r--r--3889/CH10/EX10.1/Ex10_1output1.PNGbin0 -> 41597 bytes
-rw-r--r--3889/CH10/EX10.1/Ex10_1output2.PNGbin0 -> 46800 bytes
3 files changed, 51 insertions, 0 deletions
diff --git a/3889/CH10/EX10.1/Ex10_1.sce b/3889/CH10/EX10.1/Ex10_1.sce
new file mode 100644
index 000000000..650489ecf
--- /dev/null
+++ b/3889/CH10/EX10.1/Ex10_1.sce
@@ -0,0 +1,51 @@
+//Example 10.1
+//page 655
+//Control Systems: Principles and Design
+//M Gopal, Second Edition, Tata McGraw-Hill
+//Chapter:Compensator design using Bode Plots
+xdel(winsid())//close all graphics Windows
+clear;
+clc;
+s=poly(0,"s")
+w=poly(0,'w')
+G=1/(s*(s+1))
+Kv=10
+pm=45 //degrees
+K=Kv/horner(s*G,0)
+G1=syslin('c',K*G)
+[gm,frg]=g_margin(G1)
+
+[pm0,frp]=p_margin(G1)
+//Finding extra phase lead required
+phi=pm-pm0+3
+alpha= (1-sind(phi))/(1+sind(phi))
+gain_uncomp=-20*log(1/(sqrt(alpha)))
+wc=4.16 //New gain crossover frequency
+z=wc*sqrt(alpha) //z=1/T
+p=wc/sqrt(alpha) //p=1/(alpha*T)
+Kc=K/alpha
+D=Kc*(s+z)/(s+p)
+disp(D,'Lead Compensator=')
+Gc=syslin('c',G1*D)
+f=figure()
+bode(G1)
+bode_asymp(G1)
+title('Bode plot of uncompensated system')
+a=gca();
+a.parent.background=8;
+f=figure()
+bode(Gc)
+bode_asymp(Gc)
+title('Bode plot of compensated system')
+a=gca();
+a.parent.background=8;
+f=figure()
+black([G1;Gc ],0.01,100,["Plant";"Plant and Lead Compensator"]);
+a=gca();
+a.parent.background=8;
+Leg=a.children(1);
+Leg.legend_location="in_lower_right";
+nicholschart(colors=color('light gray')*[1 1])
+
+
+
diff --git a/3889/CH10/EX10.1/Ex10_1output1.PNG b/3889/CH10/EX10.1/Ex10_1output1.PNG
new file mode 100644
index 000000000..4fe6e2dab
--- /dev/null
+++ b/3889/CH10/EX10.1/Ex10_1output1.PNG
Binary files differ
diff --git a/3889/CH10/EX10.1/Ex10_1output2.PNG b/3889/CH10/EX10.1/Ex10_1output2.PNG
new file mode 100644
index 000000000..9e47f8932
--- /dev/null
+++ b/3889/CH10/EX10.1/Ex10_1output2.PNG
Binary files differ