diff options
Diffstat (limited to '3889')
55 files changed, 682 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 diff --git a/3889/CH2/EX2.4/Ex2_4.sce b/3889/CH2/EX2.4/Ex2_4.sce new file mode 100644 index 000000000..00723546e --- /dev/null +++ b/3889/CH2/EX2.4/Ex2_4.sce @@ -0,0 +1,50 @@ +//Example 2.4
+//page 63
+//Control Systems: Principles and Design
+//M Gopal, Second Edition, Tata McGraw-Hill
+//Chapter: Dynamic Models and Dynamic Response
+
+
+xdel(winsid())//close all graphics Windows
+clear;
+clc;
+
+// Transfer function
+s= %s;
+//s=poly(0,'s');
+y=1;
+r=(s^2) + (3*s) + 2;
+//continuous time linear model created
+g=syslin('c',y/r);
+
+clf();
+t=0:0.5:100;
+a=size(t)
+u=ones(a(1),a(2));
+//step response
+y1=csim(u,t,[g*5]);
+
+//ramp response
+u2= 5* t;
+y2=csim(u2,t,g)
+
+//plot
+subplot(211)
+plot(t,y1)
+m=gca();
+m.auto_scale = "off"
+m.data_bounds = [0,0;6,6]
+plot(t,5*u)
+title('Step Response of transfer function','fontsize',3)
+xlabel('Time t (sec.)','fontsize',2)
+ylabel('Amplitude','fontsize',2)
+subplot(212)
+plot(t,y2)
+m=gca();
+m.auto_scale = "off"
+m.data_bounds = [0,0;10,10]
+
+plot(t,u2)
+title('Ramp Response of transfer function','fontsize',3)
+xlabel('Time t (sec.)','fontsize',2)
+ylabel('Amplitude','fontsize',2)
diff --git a/3889/CH2/EX2.4/Ex2_4output.PNG b/3889/CH2/EX2.4/Ex2_4output.PNG Binary files differnew file mode 100644 index 000000000..6a2d654de --- /dev/null +++ b/3889/CH2/EX2.4/Ex2_4output.PNG diff --git a/3889/CH5/EX5.1/Ex5_1.sce b/3889/CH5/EX5.1/Ex5_1.sce new file mode 100644 index 000000000..bf716c150 --- /dev/null +++ b/3889/CH5/EX5.1/Ex5_1.sce @@ -0,0 +1,22 @@ +//Example 5.1
+//page 318
+//Control Systems: Principles and Design
+//M Gopal, Second Edition, Tata McGraw-Hill
+//Chapter: Concepts of Stability: Routh Stability Array
+
+xdel(winsid())//close all graphics Windows
+clear;
+clc;
+//transfer function
+s=%s;
+P=s^4 + 8* s^3 +18*s^2 +16*s +5;
+//routh array
+disp('Routh Array')
+r=routh_t(P)
+disp(r)
+[r,num]=routh_t(1/P,20)
+if num==0
+ disp("As all the elements in first column are positive, system is stable")
+else
+ mprintf("There is %g sign changes in entries of first column.\nTherefore, system is unstable.", num)
+end
diff --git a/3889/CH5/EX5.1/Ex5_1output.PNG b/3889/CH5/EX5.1/Ex5_1output.PNG Binary files differnew file mode 100644 index 000000000..14e95bcaa --- /dev/null +++ b/3889/CH5/EX5.1/Ex5_1output.PNG diff --git a/3889/CH5/EX5.10/Ex5_10.sce b/3889/CH5/EX5.10/Ex5_10.sce new file mode 100644 index 000000000..c5aecdcfe --- /dev/null +++ b/3889/CH5/EX5.10/Ex5_10.sce @@ -0,0 +1,21 @@ +//Example 5.10
+//page 327
+//Control Systems: Principles and Design
+//M Gopal, Second Edition, Tata McGraw-Hill
+//Chapter:Concepts of Stability: Routh Stability Array
+
+xdel(winsid())//close all graphics Windows
+clear;
+clc;
+//transfer function
+s=poly(2,'s');
+//substitution of s-2 for s
+
+P=(1+(5/s))*((s+3)/(s^2+2*s+2));
+k=poly(0,'k')
+//routh array
+r=routh_t(P,k)
+disp(r,"Routh Array")
+kval=kpure(P)
+mprintf('%g <K , is range of gain for closed loop poles to satisfy Re(s)<-2',kval(1))
+
diff --git a/3889/CH5/EX5.10/Ex5_10output.PNG b/3889/CH5/EX5.10/Ex5_10output.PNG Binary files differnew file mode 100644 index 000000000..4338c03b8 --- /dev/null +++ b/3889/CH5/EX5.10/Ex5_10output.PNG diff --git a/3889/CH5/EX5.2/Ex5_2.sce b/3889/CH5/EX5.2/Ex5_2.sce new file mode 100644 index 000000000..4ff2369c1 --- /dev/null +++ b/3889/CH5/EX5.2/Ex5_2.sce @@ -0,0 +1,22 @@ +//Example 5.2
+//page 318
+//Control Systems: Principles and Design
+//M Gopal, Second Edition, Tata McGraw-Hill
+//Chapter: Concepts of Stability: Routh Stability Array
+
+xdel(winsid())//close all graphics Windows
+clear;
+clc;
+//transfer function
+s=%s;
+P=3*s^4 + 10* s^3 +5*s^2 +5*s +2;
+//routh array
+disp('Routh Array')
+r=routh_t(P)
+disp(r)
+[r,num]=routh_t(1/P,20)
+if num==0
+ disp("As all elements of first row are positive,system is stable")
+else
+ mprintf("There are %g sign changes in entries of first column.\nTherefore, system is unstable.", num)
+end
diff --git a/3889/CH5/EX5.2/Ex5_2output.PNG b/3889/CH5/EX5.2/Ex5_2output.PNG Binary files differnew file mode 100644 index 000000000..b7e2bad6c --- /dev/null +++ b/3889/CH5/EX5.2/Ex5_2output.PNG diff --git a/3889/CH5/EX5.3/Ex5_3.sce b/3889/CH5/EX5.3/Ex5_3.sce new file mode 100644 index 000000000..d9e06917b --- /dev/null +++ b/3889/CH5/EX5.3/Ex5_3.sce @@ -0,0 +1,22 @@ +//Example 5.3
+//page 319
+//Control Systems: Principles and Design
+//M Gopal, Second Edition, Tata McGraw-Hill
+//Chapter: Concepts of Stability: Routh Stability Array
+
+xdel(winsid())//close all graphics Windows
+clear;
+clc;
+//transfer function
+s=%s;
+P=s^6+4*s^5+3*s^4 + 2* s^3 +s^2 +4*s +4;
+//routh array
+disp('Routh Array')
+r=routh_t(P)
+disp(r)
+[r,num]=routh_t(1/P,20)
+if num==0
+ disp("As all elements of first row are positive system is stable")
+else
+ mprintf("There are %g sign changes in entries of first column.\nTherefore, system is unstable.", num)
+end
diff --git a/3889/CH5/EX5.3/Ex5_3output.PNG b/3889/CH5/EX5.3/Ex5_3output.PNG Binary files differnew file mode 100644 index 000000000..a93ca399c --- /dev/null +++ b/3889/CH5/EX5.3/Ex5_3output.PNG diff --git a/3889/CH5/EX5.4/Ex5_4.sce b/3889/CH5/EX5.4/Ex5_4.sce new file mode 100644 index 000000000..ed4f4911a --- /dev/null +++ b/3889/CH5/EX5.4/Ex5_4.sce @@ -0,0 +1,22 @@ +//Example 5.4
+//page 321
+//Control Systems: Principles and Design
+//M Gopal, Second Edition, Tata McGraw-Hill
+//Chapter: Concepts of Stability: Routh Stability Array
+
+xdel(winsid())//close all graphics Windows
+clear;
+clc;
+//transfer function
+s=%s;
+P=s^5+s^4 + 4* s^3 +24*s^2 +3*s +63;
+//routh array
+disp('Routh Array')
+r=routh_t(P)
+disp(r)
+[r,num]=routh_t(1/P,20)
+if num==0
+ disp("System is stable")
+else
+ mprintf("There are %g sign changes in entries of first column.\nTherefore, system is unstable.", num)
+end
diff --git a/3889/CH5/EX5.4/Ex5_4output.PNG b/3889/CH5/EX5.4/Ex5_4output.PNG Binary files differnew file mode 100644 index 000000000..42e2fb354 --- /dev/null +++ b/3889/CH5/EX5.4/Ex5_4output.PNG diff --git a/3889/CH5/EX5.5/Ex5_5.sce b/3889/CH5/EX5.5/Ex5_5.sce new file mode 100644 index 000000000..e94a985f3 --- /dev/null +++ b/3889/CH5/EX5.5/Ex5_5.sce @@ -0,0 +1,26 @@ +//Example 5.5
+//page 321
+//Control Systems: Principles and Design
+//M Gopal, Second Edition, Tata McGraw-Hill
+//Chapter:Concepts of Stability: Routh Stability Array
+
+xdel(winsid())//close all graphics Windows
+clear;
+clc;
+//transfer function
+s=%s;
+P=s^6+2*s^5+8*s^4 + 12* s^3 +20*s^2 +16*s +16;
+//routh array
+disp('Routh Array')
+r=routh_t(P)
+disp(r)
+[r,num]=routh_t(P)
+disp('As there are no sign changes,there is no root on right half of s plane')
+disp('However as two rows are having same values, we decide stability on basis of auxiliary equation')
+//Extracting and finding roots of auxiliary polynomial
+a=flipdim(r(2,:),2)
+b=kron(a(1:$), [1 zeros(1,1)])
+P1=roots(poly(coeff(b),"x","coeff"))
+disp(P1,"Roots of auxiliary equation=")
+disp("As roots of auxiliary equation are purely imaginary, system is marginally stable")
+
diff --git a/3889/CH5/EX5.5/Ex5_5output.PNG b/3889/CH5/EX5.5/Ex5_5output.PNG Binary files differnew file mode 100644 index 000000000..dcd9026fb --- /dev/null +++ b/3889/CH5/EX5.5/Ex5_5output.PNG diff --git a/3889/CH5/EX5.6/Ex5_6.sce b/3889/CH5/EX5.6/Ex5_6.sce new file mode 100644 index 000000000..58642a3a4 --- /dev/null +++ b/3889/CH5/EX5.6/Ex5_6.sce @@ -0,0 +1,23 @@ +//Example 5.6
+//page 323
+//Control Systems: Principles and Design
+//M Gopal, Second Edition, Tata McGraw-Hill
+//Chapter:Concepts of Stability: Routh Stability Array
+
+xdel(winsid())//close all graphics Windows
+clear;
+clc;
+//transfer function
+s=%s;
+P=s^5+3*s^4 + 2* s^3 +6*s^2 +6*s +9;
+//routh array
+
+r=routh_t(P)
+disp(r,"Routh Array")
+[r,num]=routh_t(1/P,20)
+disp("We know, eps tends to zero")
+if num==0
+ disp("System is stable")
+else
+ mprintf("There are %g sign changes in entries of first column.\nTherefore, system is unstable.", num)
+end
diff --git a/3889/CH5/EX5.6/Ex5_6output2.PNG b/3889/CH5/EX5.6/Ex5_6output2.PNG Binary files differnew file mode 100644 index 000000000..6b337768e --- /dev/null +++ b/3889/CH5/EX5.6/Ex5_6output2.PNG diff --git a/3889/CH5/EX5.6/Ex5_6outputarray.PNG b/3889/CH5/EX5.6/Ex5_6outputarray.PNG Binary files differnew file mode 100644 index 000000000..47696faa3 --- /dev/null +++ b/3889/CH5/EX5.6/Ex5_6outputarray.PNG diff --git a/3889/CH5/EX5.7/Ex5_7.sce b/3889/CH5/EX5.7/Ex5_7.sce new file mode 100644 index 000000000..e3d541ae2 --- /dev/null +++ b/3889/CH5/EX5.7/Ex5_7.sce @@ -0,0 +1,22 @@ +//Example 5.7
+//page 324
+//Control Systems: Principles and Design
+//M Gopal, Second Edition, Tata McGraw-Hill
+//Chapter:Concepts of Stability: Routh Stability Array
+
+xdel(winsid())//close all graphics Windows
+clear;
+clc;
+//transfer function
+s=%s;
+P=s^6+s^5+3*s^4 + 3* s^3 +3*s^2 +2*s +1;
+//routh array
+r=routh_t(P)
+disp(r,"Routh Array")
+[r,num]=routh_t(1/P,20)
+disp("We know, eps tends to zero")
+if num==0
+ disp("System is stable")
+else
+ mprintf("There are %g sign changes in entries of first column.\nTherefore, system is unstable.", num)
+end
diff --git a/3889/CH5/EX5.7/Ex5_7output2.PNG b/3889/CH5/EX5.7/Ex5_7output2.PNG Binary files differnew file mode 100644 index 000000000..b8af86186 --- /dev/null +++ b/3889/CH5/EX5.7/Ex5_7output2.PNG diff --git a/3889/CH5/EX5.7/Ex5_7outputarray.PNG b/3889/CH5/EX5.7/Ex5_7outputarray.PNG Binary files differnew file mode 100644 index 000000000..3693f9b04 --- /dev/null +++ b/3889/CH5/EX5.7/Ex5_7outputarray.PNG diff --git a/3889/CH5/EX5.8/Ex5_8.sce b/3889/CH5/EX5.8/Ex5_8.sce new file mode 100644 index 000000000..ddc724253 --- /dev/null +++ b/3889/CH5/EX5.8/Ex5_8.sce @@ -0,0 +1,22 @@ +//Example 5.8
+//page 326
+//Control Systems: Principles and Design
+//M Gopal, Second Edition, Tata McGraw-Hill
+//Chapter:Concepts of Stability: Routh Stability Array
+
+xdel(winsid())//close all graphics Windows
+clear;
+clc;
+//transfer function
+//substitution of s-1 for s
+s=poly(1,'s');
+P= s^3 +7*s^2 +25*s +39;
+//routh array
+r=routh_t(P)
+disp(r,"Routh Array")
+[r,num]=routh_t(1/P,20)
+if num==0
+ disp("As all the elements in first column are positive,roots of characteristic polynomial are more negative than -1 ")
+else
+ mprintf("There is %g sign changes in entries of first column.\nTherefore, characteistic polynomial has some roots relatively unstable with respect to s=-1", num)
+end
diff --git a/3889/CH5/EX5.8/Ex5_8output.PNG b/3889/CH5/EX5.8/Ex5_8output.PNG Binary files differnew file mode 100644 index 000000000..bcea18cc9 --- /dev/null +++ b/3889/CH5/EX5.8/Ex5_8output.PNG diff --git a/3889/CH5/EX5.9/Ex5_9.sce b/3889/CH5/EX5.9/Ex5_9.sce new file mode 100644 index 000000000..f24448eb1 --- /dev/null +++ b/3889/CH5/EX5.9/Ex5_9.sce @@ -0,0 +1,23 @@ +//Example 5.9
+//page 327
+//Control Systems: Principles and Design
+//M Gopal, Second Edition, Tata McGraw-Hill
+//Chapter:Concepts of Stability: Routh Stability Array
+
+xdel(winsid())//close all graphics Windows
+clear;
+clc;
+//transfer function
+s=%s;
+P=s*(s^2+s+1)*(s+4);
+k=poly(0,'k')
+//routh array
+disp('Routh Array')
+r=routh_t(1/P,k)
+disp(r)
+disp('Solving for positive values,')
+disp(r($-1,1))
+mprintf('%g >K >0, for stability',kpure(1/P))
+
+
+
diff --git a/3889/CH5/EX5.9/Ex5_9output2.PNG b/3889/CH5/EX5.9/Ex5_9output2.PNG Binary files differnew file mode 100644 index 000000000..5ef4be740 --- /dev/null +++ b/3889/CH5/EX5.9/Ex5_9output2.PNG diff --git a/3889/CH5/EX5.9/Ex5_9outputarray.PNG b/3889/CH5/EX5.9/Ex5_9outputarray.PNG Binary files differnew file mode 100644 index 000000000..87dcfd7f2 --- /dev/null +++ b/3889/CH5/EX5.9/Ex5_9outputarray.PNG diff --git a/3889/CH7/EX7.3/Ex7_3.sce b/3889/CH7/EX7.3/Ex7_3.sce new file mode 100644 index 000000000..ddc6c19ed --- /dev/null +++ b/3889/CH7/EX7.3/Ex7_3.sce @@ -0,0 +1,31 @@ +//Example 7.3
+//page 432
+//Control Systems: Principles and Design
+//M Gopal, Second Edition, Tata McGraw-Hill
+//Chapter:Compensator Design Using Root Locus
+
+xdel(winsid())//close all graphics Windows
+clear;
+clc;
+//transfer function
+s=%s;
+P=1/((s)*(s+1)*(s+2));
+
+//Root locus plot using evans root locus
+f=figure()
+evans(P)
+title("Root locus of 1/(s*(s+1)*(s+2)",'fontsize',5)
+h=legend('');
+h.visible="OFF"
+zoom_rect([-2 -1.5 2 1.5]*kpure(P)/3)
+a=gca();
+a.x_location="origin"
+a.y_location="origin"
+a.parent.background=8;
+legends(['root locus';'';'asymptotic directions';'open loop poles'],[2,3,1,-2],with_box=%f,opt="ur",2.8)
+sgrid();
+K=poly(0,'K')
+R= routh_t(P,K);
+disp(R,'Routh Array=')
+kval= kpure(P)
+disp(kval,'Limiting Gain Kmax=')
diff --git a/3889/CH7/EX7.3/Ex7_3output1.PNG b/3889/CH7/EX7.3/Ex7_3output1.PNG Binary files differnew file mode 100644 index 000000000..76eb82bd6 --- /dev/null +++ b/3889/CH7/EX7.3/Ex7_3output1.PNG diff --git a/3889/CH7/EX7.3/Ex7_3output2.PNG b/3889/CH7/EX7.3/Ex7_3output2.PNG Binary files differnew file mode 100644 index 000000000..04ab00aba --- /dev/null +++ b/3889/CH7/EX7.3/Ex7_3output2.PNG diff --git a/3889/CH7/EX7.4/Ex7_4.sce b/3889/CH7/EX7.4/Ex7_4.sce new file mode 100644 index 000000000..260d60321 --- /dev/null +++ b/3889/CH7/EX7.4/Ex7_4.sce @@ -0,0 +1,32 @@ +//Example 7.4
+//page 436
+//Control Systems: Principles and Design
+//M Gopal, Second Edition, Tata McGraw-Hill
+//Chapter:Compensator Design Using Root Locus
+
+xdel(winsid())//close all graphics Windows
+clear;
+clc;
+//transfer function
+s=%s;
+P=1/((s)*(s+3)*(s^2+2*s+2));
+
+//Root locus plot using evans root locus
+f=figure()
+evans(P)
+title("Root locus of 1/((s)*(s+3)*(s^2+2*s+2))",'fontsize',5)
+h=legend('');
+h.visible="OFF"
+zoom_rect([-2 -1.5 2 1.5]*kpure(P)/3)
+a=gca();
+a.x_location="origin"
+a.y_location="origin"
+a.parent.background=8;
+legends(['root locus';'';'asymptotic directions';'open loop poles'],[2,3,1,-2],with_box=%f,opt="ur",2.8)
+sgrid();
+K=poly(0,'K')
+R= routh_t(P,K);
+disp(R,'Routh Array=')
+kval= kpure(P)
+disp(kval,'Limiting Gain Kmax=')
+
diff --git a/3889/CH7/EX7.4/Ex7_4output1.PNG b/3889/CH7/EX7.4/Ex7_4output1.PNG Binary files differnew file mode 100644 index 000000000..d43c893e0 --- /dev/null +++ b/3889/CH7/EX7.4/Ex7_4output1.PNG diff --git a/3889/CH7/EX7.4/Ex7_4output2.PNG b/3889/CH7/EX7.4/Ex7_4output2.PNG Binary files differnew file mode 100644 index 000000000..f5231597f --- /dev/null +++ b/3889/CH7/EX7.4/Ex7_4output2.PNG diff --git a/3889/CH7/EX7.5/Ex7_5.sce b/3889/CH7/EX7.5/Ex7_5.sce new file mode 100644 index 000000000..5404ba5a4 --- /dev/null +++ b/3889/CH7/EX7.5/Ex7_5.sce @@ -0,0 +1,28 @@ +//Example 7.5
+//page 439
+//Control Systems: Principles and Design
+//M Gopal, Second Edition, Tata McGraw-Hill
+//Chapter:Compensator Design Using Root Locus
+
+xdel(winsid())//close all graphics Windows
+clear;
+clc;
+//transfer function
+s=%s;
+P=(s+1)/((s^2)*(s+9));
+
+//Root locus plot using evans root locus
+f=figure()
+evans(P)
+title("Root locus of (s+1)/((s^2)*(s+9))",'fontsize',5)
+h=legend('');
+h.visible="OFF"
+zoom_rect([-5 -10 5 10])
+a=gca();
+a.x_location="origin"
+a.y_location="origin"
+a.parent.background=8;
+legends(['root locus';'';'asymptotic directions';'open loop poles'],[2,3,1,-2],with_box=%f,opt="ur",2.8)
+K=poly(0,'K')
+R= routh_t(P,K);
+disp(R,'Routh Array')
diff --git a/3889/CH7/EX7.5/Ex7_5output1.PNG b/3889/CH7/EX7.5/Ex7_5output1.PNG Binary files differnew file mode 100644 index 000000000..23ff9a105 --- /dev/null +++ b/3889/CH7/EX7.5/Ex7_5output1.PNG diff --git a/3889/CH7/EX7.5/Ex7_5output2.PNG b/3889/CH7/EX7.5/Ex7_5output2.PNG Binary files differnew file mode 100644 index 000000000..006f060ae --- /dev/null +++ b/3889/CH7/EX7.5/Ex7_5output2.PNG diff --git a/3889/CH7/EX7.6/Ex7_6.sce b/3889/CH7/EX7.6/Ex7_6.sce new file mode 100644 index 000000000..755d3a126 --- /dev/null +++ b/3889/CH7/EX7.6/Ex7_6.sce @@ -0,0 +1,32 @@ +//Example 7.6
+//page 441
+//Control Systems: Principles and Design
+//M Gopal, Second Edition, Tata McGraw-Hill
+//Chapter:Compensator Design Using Root Locus
+
+xdel(winsid())//close all graphics Windows
+clear;
+clc;
+//transfer function
+s=%s;
+P=1/((s)*(s+2)*(s^2+2*s+5));
+
+//Root locus plot using evans root locus
+f=figure()
+evans(P)
+title("Root locus of 1/((s)*(s+2)*(s^2+2*s+5))",'fontsize',5)
+h=legend('');
+h.visible="OFF"
+zoom_rect([-2 -1.5 2 1.5]*kpure(P)/3)
+a=gca();
+a.x_location="origin"
+a.y_location="origin"
+a.parent.background=8;
+legends(['root locus';'';'asymptotic directions';'open loop poles'],[2,3,1,-2],with_box=%f,opt="ur",2.8)
+sgrid();
+K=poly(0,'K')
+R= routh_t(P,K);
+disp(R,'Routh Array=')
+kval= kpure(P)
+disp(kval,'Limiting Gain Kmax=')
+
diff --git a/3889/CH7/EX7.6/Ex7_6output1.PNG b/3889/CH7/EX7.6/Ex7_6output1.PNG Binary files differnew file mode 100644 index 000000000..bdd137584 --- /dev/null +++ b/3889/CH7/EX7.6/Ex7_6output1.PNG diff --git a/3889/CH7/EX7.6/Ex7_6output2.PNG b/3889/CH7/EX7.6/Ex7_6output2.PNG Binary files differnew file mode 100644 index 000000000..1b5dce8c2 --- /dev/null +++ b/3889/CH7/EX7.6/Ex7_6output2.PNG |