diff options
author | prashantsinalkar | 2018-02-03 11:01:52 +0530 |
---|---|---|
committer | prashantsinalkar | 2018-02-03 11:01:52 +0530 |
commit | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df (patch) | |
tree | 449d555969bfd7befe906877abab098c6e63a0e8 /3889/CH10 | |
parent | d1e070fe2d77c8e7f6ba4b0c57b1b42e26349059 (diff) | |
download | Scilab-TBC-Uploads-master.tar.gz Scilab-TBC-Uploads-master.tar.bz2 Scilab-TBC-Uploads-master.zip |
Diffstat (limited to '3889/CH10')
-rw-r--r-- | 3889/CH10/EX10.1/Ex10_1.sce | 51 | ||||
-rw-r--r-- | 3889/CH10/EX10.1/Ex10_1output1.PNG | bin | 0 -> 41597 bytes | |||
-rw-r--r-- | 3889/CH10/EX10.1/Ex10_1output2.PNG | bin | 0 -> 46800 bytes | |||
-rw-r--r-- | 3889/CH10/EX10.2/Ex10_2.sce | 44 | ||||
-rw-r--r-- | 3889/CH10/EX10.2/Ex10_2output1.PNG | bin | 0 -> 11138 bytes | |||
-rw-r--r-- | 3889/CH10/EX10.2/Ex10_2output2.PNG | bin | 0 -> 44605 bytes | |||
-rw-r--r-- | 3889/CH10/EX10.3/Ex10_3.sce | 43 | ||||
-rw-r--r-- | 3889/CH10/EX10.3/Ex10_3output1.PNG | bin | 0 -> 11366 bytes | |||
-rw-r--r-- | 3889/CH10/EX10.3/Ex10_3output2.PNG | bin | 0 -> 34078 bytes | |||
-rw-r--r-- | 3889/CH10/EX10.4/Ex10_4.sce | 45 | ||||
-rw-r--r-- | 3889/CH10/EX10.4/Ex10_4output1.PNG | bin | 0 -> 48764 bytes | |||
-rw-r--r-- | 3889/CH10/EX10.4/Ex10_4output2.PNG | bin | 0 -> 46174 bytes | |||
-rw-r--r-- | 3889/CH10/EX10.5/Ex10_5.sce | 46 | ||||
-rw-r--r-- | 3889/CH10/EX10.5/Ex10_5output1.PNG | bin | 0 -> 46137 bytes | |||
-rw-r--r-- | 3889/CH10/EX10.5/Ex10_5output2.PNG | bin | 0 -> 42894 bytes | |||
-rw-r--r-- | 3889/CH10/EX10.6/Ex10_6.sce | 55 | ||||
-rw-r--r-- | 3889/CH10/EX10.6/Ex10_6output1.PNG | bin | 0 -> 47344 bytes | |||
-rw-r--r-- | 3889/CH10/EX10.6/Ex10_6output2.PNG | bin | 0 -> 46380 bytes |
18 files changed, 284 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 Binary files differnew file mode 100644 index 000000000..4fe6e2dab --- /dev/null +++ b/3889/CH10/EX10.1/Ex10_1output1.PNG diff --git a/3889/CH10/EX10.1/Ex10_1output2.PNG b/3889/CH10/EX10.1/Ex10_1output2.PNG Binary files differnew file mode 100644 index 000000000..9e47f8932 --- /dev/null +++ b/3889/CH10/EX10.1/Ex10_1output2.PNG diff --git a/3889/CH10/EX10.2/Ex10_2.sce b/3889/CH10/EX10.2/Ex10_2.sce new file mode 100644 index 000000000..349079f1b --- /dev/null +++ b/3889/CH10/EX10.2/Ex10_2.sce @@ -0,0 +1,44 @@ +//Example 10.2
+//page 657
+//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^2)
+zeta=0.45
+pm=50 //degrees
+K=1
+G1=syslin('c',K*G)
+[gm,frg]=g_margin(G1)
+[pm0,frp]=p_margin(G1)
+//Finding extra phase lead required
+phi=pm-pm0
+alpha= (1-sind(phi))/(1+sind(phi))
+gain_uncomp=-20*log(1/(sqrt(alpha)))
+wc=1.7 //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;
+
+
+
+
diff --git a/3889/CH10/EX10.2/Ex10_2output1.PNG b/3889/CH10/EX10.2/Ex10_2output1.PNG Binary files differnew file mode 100644 index 000000000..5d5514067 --- /dev/null +++ b/3889/CH10/EX10.2/Ex10_2output1.PNG diff --git a/3889/CH10/EX10.2/Ex10_2output2.PNG b/3889/CH10/EX10.2/Ex10_2output2.PNG Binary files differnew file mode 100644 index 000000000..4caa25e0a --- /dev/null +++ b/3889/CH10/EX10.2/Ex10_2output2.PNG diff --git a/3889/CH10/EX10.3/Ex10_3.sce b/3889/CH10/EX10.3/Ex10_3.sce new file mode 100644 index 000000000..7e67ba7bd --- /dev/null +++ b/3889/CH10/EX10.3/Ex10_3.sce @@ -0,0 +1,43 @@ +//Example 10.3
+//page 658
+//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^2)*(0.2*s+1))
+Ka=10
+pm=35 //degrees
+K=Ka/horner((s^2)*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+15
+//As phi is large, we use 2 lead compensators in cascade
+phi=phi/2
+alpha= (1-sind(phi))/(1+sind(phi))
+gain_uncomp=-20*log(1/(sqrt(alpha)))
+wc=4.7 //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))^2)
+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;
+
diff --git a/3889/CH10/EX10.3/Ex10_3output1.PNG b/3889/CH10/EX10.3/Ex10_3output1.PNG Binary files differnew file mode 100644 index 000000000..1b4d10b66 --- /dev/null +++ b/3889/CH10/EX10.3/Ex10_3output1.PNG diff --git a/3889/CH10/EX10.3/Ex10_3output2.PNG b/3889/CH10/EX10.3/Ex10_3output2.PNG Binary files differnew file mode 100644 index 000000000..4d2fc9417 --- /dev/null +++ b/3889/CH10/EX10.3/Ex10_3output2.PNG diff --git a/3889/CH10/EX10.4/Ex10_4.sce b/3889/CH10/EX10.4/Ex10_4.sce new file mode 100644 index 000000000..beb128459 --- /dev/null +++ b/3889/CH10/EX10.4/Ex10_4.sce @@ -0,0 +1,45 @@ +//Example 10.4
+//page 666
+//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)
+phi=-180+pm+6
+wc=0.85 //New gain crossover frequency
+Beta=11
+Kc=K/Beta
+z=wc/(2^3)
+p=z/Beta
+D=Kc*(((s+z)/(s+p)))
+disp(D,'Lag 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 Lag 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.4/Ex10_4output1.PNG b/3889/CH10/EX10.4/Ex10_4output1.PNG Binary files differnew file mode 100644 index 000000000..b37c7bc1d --- /dev/null +++ b/3889/CH10/EX10.4/Ex10_4output1.PNG diff --git a/3889/CH10/EX10.4/Ex10_4output2.PNG b/3889/CH10/EX10.4/Ex10_4output2.PNG Binary files differnew file mode 100644 index 000000000..f092e8394 --- /dev/null +++ b/3889/CH10/EX10.4/Ex10_4output2.PNG diff --git a/3889/CH10/EX10.5/Ex10_5.sce b/3889/CH10/EX10.5/Ex10_5.sce new file mode 100644 index 000000000..15de57b6c --- /dev/null +++ b/3889/CH10/EX10.5/Ex10_5.sce @@ -0,0 +1,46 @@ +//Example 10.5
+//page 668
+//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)*(0.1*s+1)*(0.2*s+1))
+wb=5
+Kv=30
+pm=40 //degrees
+K=Kv/horner((s)*G,0)
+G1=syslin('c',K*G)
+[gm,frg]=g_margin(G1)
+[pm0,frp]=p_margin(G1)
+phi=-180+pm+5
+wc=3 //New gain crossover frequency
+Beta=10
+Kc=K/Beta
+z=wc/10
+p=z/Beta
+D=Kc*(((s+z)/(s+p)))
+disp(D,'Lag 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 Lag 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.5/Ex10_5output1.PNG b/3889/CH10/EX10.5/Ex10_5output1.PNG Binary files differnew file mode 100644 index 000000000..7dfb409b0 --- /dev/null +++ b/3889/CH10/EX10.5/Ex10_5output1.PNG diff --git a/3889/CH10/EX10.5/Ex10_5output2.PNG b/3889/CH10/EX10.5/Ex10_5output2.PNG Binary files differnew file mode 100644 index 000000000..b093fec94 --- /dev/null +++ b/3889/CH10/EX10.5/Ex10_5output2.PNG diff --git a/3889/CH10/EX10.6/Ex10_6.sce b/3889/CH10/EX10.6/Ex10_6.sce new file mode 100644 index 000000000..1051700ee --- /dev/null +++ b/3889/CH10/EX10.6/Ex10_6.sce @@ -0,0 +1,55 @@ +//Example 10.6
+//page 672
+//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)*(0.1*s+1)*(0.2*s+1))
+wb=12
+Kv=30
+pm=50 //degrees
+K=Kv/horner((s)*G,0)
+G1=syslin('c',K*G)
+[gm,frg]=g_margin(G1)
+[pm0,frp]=p_margin(G1)
+
+//Design of lag compensation part
+phi=-180+pm+5
+wc=2.1 //New gain crossover frequency
+Beta=10
+Kc=K/Beta
+z=wc/2
+p=z/Beta
+//Design of lead compensation part
+alpha=1/Beta
+phi1= asin(((1-alpha)/(1+alpha)))
+wc1=6.5
+z1=wc1*sqrt(alpha)
+p1=wc1/sqrt(alpha)
+Kc=Kc/sqrt(alpha)
+D=Kc*((((s+z)*(s+z1))/((s+p)*(s+p1))))
+disp(D,'Lead-Lag 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 Lag 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.6/Ex10_6output1.PNG b/3889/CH10/EX10.6/Ex10_6output1.PNG Binary files differnew file mode 100644 index 000000000..7507746fe --- /dev/null +++ b/3889/CH10/EX10.6/Ex10_6output1.PNG diff --git a/3889/CH10/EX10.6/Ex10_6output2.PNG b/3889/CH10/EX10.6/Ex10_6output2.PNG Binary files differnew file mode 100644 index 000000000..8168e32cd --- /dev/null +++ b/3889/CH10/EX10.6/Ex10_6output2.PNG |