summaryrefslogtreecommitdiff
path: root/257/CH8
diff options
context:
space:
mode:
Diffstat (limited to '257/CH8')
-rw-r--r--257/CH8/EX8.10/example_8_10.sce21
-rw-r--r--257/CH8/EX8.12/example_8_12.sce40
-rw-r--r--257/CH8/EX8.14/example_8_14.sce24
-rw-r--r--257/CH8/EX8.15/example_8_15.sce18
-rw-r--r--257/CH8/EX8.16/example_8_16.sce24
-rw-r--r--257/CH8/EX8.17/example_8_17.sce39
-rw-r--r--257/CH8/EX8.18/example_8_18.sce17
-rw-r--r--257/CH8/EX8.19/example_8_19.sce23
-rw-r--r--257/CH8/EX8.2/example_8_2.sce16
-rw-r--r--257/CH8/EX8.20/example_8_20.sce36
-rw-r--r--257/CH8/EX8.21/example_8_21.sce30
-rw-r--r--257/CH8/EX8.22/ex_8_22.sce20
-rw-r--r--257/CH8/EX8.23/example_8_23.sce27
-rw-r--r--257/CH8/EX8.24/example_8_24.sce21
-rw-r--r--257/CH8/EX8.25/example_8_25.sce23
-rw-r--r--257/CH8/EX8.26/example_8_26.sce21
-rw-r--r--257/CH8/EX8.27/example_8_27.sce27
-rw-r--r--257/CH8/EX8.28/example_8_28.sce23
-rw-r--r--257/CH8/EX8.29/example_8_29.sce27
-rw-r--r--257/CH8/EX8.3/example_8_3.sce16
-rw-r--r--257/CH8/EX8.30/example_8_30.sce34
-rw-r--r--257/CH8/EX8.31/example_8_31.sce27
-rw-r--r--257/CH8/EX8.32/example_8_32.sce21
-rw-r--r--257/CH8/EX8.33/example_8_33.sce27
-rw-r--r--257/CH8/EX8.4/example_8_4.sce19
-rw-r--r--257/CH8/EX8.5/example_8_5.sce11
-rw-r--r--257/CH8/EX8.6/example_8_6.sce27
-rw-r--r--257/CH8/EX8.7/example_8_7.sce27
-rw-r--r--257/CH8/EX8.8/example_8_8.sce24
-rw-r--r--257/CH8/EX8.9/example_8_9.sce22
30 files changed, 732 insertions, 0 deletions
diff --git a/257/CH8/EX8.10/example_8_10.sce b/257/CH8/EX8.10/example_8_10.sce
new file mode 100644
index 000000000..c5a1af4c4
--- /dev/null
+++ b/257/CH8/EX8.10/example_8_10.sce
@@ -0,0 +1,21 @@
+s=%s
+P=s^4+2*s^2+1
+disp(routh_t(P))
+r=coeff(P)
+routh=routh_t(P)
+n=length(r)
+c=0;
+for i=1:n
+if (routh(i,1)<0)
+c=c+1;
+ end
+end
+ if(c>=1)
+ printf("system is unstable")
+ else printf("no sign changes, so no roots in RHS")
+ end
+ disp("s^2 is")
+ k=roots(routh(1,:))
+ disp(k)
+
+ disp("since, s^2 is negetive, s is purely imaginary. hence the 4 roots are on the imaginary axis") \ No newline at end of file
diff --git a/257/CH8/EX8.12/example_8_12.sce b/257/CH8/EX8.12/example_8_12.sce
new file mode 100644
index 000000000..ca0e2964c
--- /dev/null
+++ b/257/CH8/EX8.12/example_8_12.sce
@@ -0,0 +1,40 @@
+s=%s
+F=s^3+4*s^2+13*s+50
+
+disp(routh_t(F))
+r=coeff(F)
+routh=routh_t(F)
+n=length(r)
+c=0;
+for i=1:n
+if (routh(i,1)<0)
+c=c+1;
+ end
+ end
+ if(c>=1)
+ printf("system is unstable")
+ else printf("there are no roots on RHS")
+ end
+syms s k
+G=5*k/(s*(1+s/3)*(1+s/6)*18)
+H=1
+Kv=limit(s*G*H,s,0)
+disp(Kv, " Kv = ")
+
+s=%s
+F=s^3+9*s^2+18*s+180
+
+disp(routh_t(F))
+r=coeff(F)
+routh=routh_t(F)
+n=length(r)
+c=0;
+for i=1:n
+if (routh(i,1)<0)
+c=c+1;
+ end
+ end
+ if(c>=1)
+ printf("system is unstable")
+ else printf("there are no roots on RHS")
+ end
diff --git a/257/CH8/EX8.14/example_8_14.sce b/257/CH8/EX8.14/example_8_14.sce
new file mode 100644
index 000000000..fc06620a1
--- /dev/null
+++ b/257/CH8/EX8.14/example_8_14.sce
@@ -0,0 +1,24 @@
+s=%s
+F=s^6+2*s^5+8*s^4+12*s^3+20*s^2+16*s+16
+
+disp(routh_t(F))
+r=coeff(F)
+routh=routh_t(F)
+n=length(r)
+c=0;
+for i=1:n
+if (routh(i,1)<0)
+c=c+1;
+ end
+ end
+ if(c>=1)
+ printf("system is unstable")
+ else printf("there are no roots on RHS")
+ end
+
+
+R=sqrt(roots(routh(3,:)))
+disp(R)
+
+disp("non repeated roots on imaginary axis. hence system is marginally stable")
+
diff --git a/257/CH8/EX8.15/example_8_15.sce b/257/CH8/EX8.15/example_8_15.sce
new file mode 100644
index 000000000..53f97fd04
--- /dev/null
+++ b/257/CH8/EX8.15/example_8_15.sce
@@ -0,0 +1,18 @@
+s=%s
+F=2*s^5+s^4+6*s^3+s+1
+
+disp(routh_t(F))
+r=coeff(F)
+routh=routh_t(F)
+n=length(r)
+c=0;
+for i=1:n
+if (routh(i,1)<0)
+c=c+1;
+ end
+ end
+ if(c>=1)
+ printf("system is unstable")
+ else printf("there are no roots on RHS")
+ end
+
diff --git a/257/CH8/EX8.16/example_8_16.sce b/257/CH8/EX8.16/example_8_16.sce
new file mode 100644
index 000000000..424a2bd5d
--- /dev/null
+++ b/257/CH8/EX8.16/example_8_16.sce
@@ -0,0 +1,24 @@
+//determining critical value of K
+s=%s
+syms K
+m=s^3+3*(K)*s^2+(K+2)*s+4
+cof_a_0 = coeffs(m,'s',0);
+cof_a_1 = coeffs(m,'s',1);
+cof_a_2 = coeffs(m,'s',2);
+cof_a_3 = coeffs(m,'s',3);
+
+r=[cof_a_0 cof_a_1 cof_a_2 cof_a_3]
+
+n=length(r);
+routh=[r([4,2]);r([3,1])];
+routh=[routh;-det(routh)/routh(2,1),0];
+t=routh(2:3,1:2); //extracting the square sub block of routh matrix
+routh=[routh;-det(t)/t(2,1),0]
+disp(routh,"rouths tabulation=")
+routh(3,1)=0 //For marginaly stable system
+
+
+
+
+
+
diff --git a/257/CH8/EX8.17/example_8_17.sce b/257/CH8/EX8.17/example_8_17.sce
new file mode 100644
index 000000000..179904bfb
--- /dev/null
+++ b/257/CH8/EX8.17/example_8_17.sce
@@ -0,0 +1,39 @@
+//determining critical value of K
+s=%s
+syms K
+m=s^3+10*s^2+(K+21)*s+13*K
+cof_a_0 = coeffs(m,'s',0);
+cof_a_1 = coeffs(m,'s',1);
+cof_a_2 = coeffs(m,'s',2);
+cof_a_3 = coeffs(m,'s',3);
+
+r=[cof_a_0 cof_a_1 cof_a_2 cof_a_3]
+
+n=length(r);
+routh=[r([4,2]);r([3,1])];
+routh=[routh;-det(routh)/routh(2,1),0];
+t=routh(2:3,1:2); //extracting the square sub block of routh matrix
+routh=[routh;-det(t)/t(2,1),0]
+disp(routh,"rouths tabulation=")
+routh(3,1)=0 //For marginaly stable system
+
+disp("for its closed loop poles more negetive than -1")
+s=%s
+syms K
+m=s^3+7*s^2+(K+4)*s+12*K-12
+cof_a_0 = coeffs(m,'s',0);
+cof_a_1 = coeffs(m,'s',1);
+cof_a_2 = coeffs(m,'s',2);
+cof_a_3 = coeffs(m,'s',3);
+
+r=[cof_a_0 cof_a_1 cof_a_2 cof_a_3]
+
+n=length(r);
+routh=[r([4,2]);r([3,1])];
+routh=[routh;-det(routh)/routh(2,1),0];
+t=routh(2:3,1:2); //extracting the square sub block of routh matrix
+routh=[routh;-det(t)/t(2,1),0]
+disp(routh,"rouths tabulation=")
+routh(3,1)=0 //For marginaly stable system
+
+
diff --git a/257/CH8/EX8.18/example_8_18.sce b/257/CH8/EX8.18/example_8_18.sce
new file mode 100644
index 000000000..84b2438de
--- /dev/null
+++ b/257/CH8/EX8.18/example_8_18.sce
@@ -0,0 +1,17 @@
+s=%s
+// C=s^4+10*s^3+36*s^2+70*s+75 characteristic equation//
+F=(s-2)^4+10*(s-2)^3+36*(s-2)^2+70*(s-2)+75 //shifting the origin with respect to s=-2//
+disp(routh_t(F))
+r=coeff(F)
+routh=routh_t(F)
+n=length(r)
+c=0;
+for i=1:n
+if (routh(i,1)<0)
+c=c+1;
+ end
+end
+ if(c>=1)
+ printf("there are %d roots to the right of s=-2 line",c+1)
+ else printf("system is stable")
+ end
diff --git a/257/CH8/EX8.19/example_8_19.sce b/257/CH8/EX8.19/example_8_19.sce
new file mode 100644
index 000000000..f3b367aea
--- /dev/null
+++ b/257/CH8/EX8.19/example_8_19.sce
@@ -0,0 +1,23 @@
+s=%s
+F=s^6+2*s^5+5*s^4+8*s^3+8*s^2+8*s+4
+
+disp(routh_t(F))
+r=coeff(F)
+routh=routh_t(F)
+n=length(r)
+c=0;
+for i=1:n
+if (routh(i,1)<0)
+c=c+1;
+ end
+ end
+ if(c>=1)
+ printf("system is unstable")
+ else
+ disp("s^2 is")
+ k=(roots(routh(3,:)))
+ disp(k)
+end
+
+if(k(2,1)==k(3,1))
+ printf("repeated roots on imaginary axis. hence unstable system") \ No newline at end of file
diff --git a/257/CH8/EX8.2/example_8_2.sce b/257/CH8/EX8.2/example_8_2.sce
new file mode 100644
index 000000000..1dd56abae
--- /dev/null
+++ b/257/CH8/EX8.2/example_8_2.sce
@@ -0,0 +1,16 @@
+s=%s;
+P=s^3+6*s^2+11*s+6;
+routh=routh_t(P)
+disp(routh)
+r=coeff(P)
+n=length(r)
+c=0;
+for i=1:n
+if (routh(i,1)<0)
+c=c+1;
+ end
+ end
+ if(c>=1)
+ printf("system is unstable")
+ else printf("system is stable")
+ end \ No newline at end of file
diff --git a/257/CH8/EX8.20/example_8_20.sce b/257/CH8/EX8.20/example_8_20.sce
new file mode 100644
index 000000000..794126e0a
--- /dev/null
+++ b/257/CH8/EX8.20/example_8_20.sce
@@ -0,0 +1,36 @@
+s=%s
+syms K
+m=s^4+6*s^3+30*s^2+60*s+K
+cof_a_0 = coeffs(m,'s',0);
+cof_a_1 = coeffs(m,'s',1);
+cof_a_2 = coeffs(m,'s',2);
+cof_a_3 = coeffs(m,'s',3);
+
+r=[cof_a_0 cof_a_1 cof_a_2 cof_a_3]
+
+n=length(r);
+routh=[r([4,2]);r([3,1])];
+routh=[routh;-det(routh)/routh(2,1),0];
+t=routh(2:3,1:2); //extracting the square sub block of routh matrix
+routh=[routh;-det(t)/t(2,1),0]
+disp(routh,"rouths tabulation=")
+routh(3,1)=0 //For marginaly stable system
+
+disp("for all closed loop poles to left of -1")
+s=%s
+syms K
+m=s^4+2*s^3+18*s^2+14*s+K-35
+cof_a_0 = coeffs(m,'s',0);
+cof_a_1 = coeffs(m,'s',1);
+cof_a_2 = coeffs(m,'s',2);
+cof_a_3 = coeffs(m,'s',3);
+
+r=[cof_a_0 cof_a_1 cof_a_2 cof_a_3]
+
+n=length(r);
+routh=[r([4,2]);r([3,1])];
+routh=[routh;-det(routh)/routh(2,1),0];
+t=routh(2:3,1:2); //extracting the square sub block of routh matrix
+routh=[routh;-det(t)/t(2,1),0]
+disp(routh,"rouths tabulation=")
+routh(3,1)=0 //For marginaly stable system \ No newline at end of file
diff --git a/257/CH8/EX8.21/example_8_21.sce b/257/CH8/EX8.21/example_8_21.sce
new file mode 100644
index 000000000..5d16fc8d4
--- /dev/null
+++ b/257/CH8/EX8.21/example_8_21.sce
@@ -0,0 +1,30 @@
+s=%s
+P=s^6+s^5+5*s^4+s^3+2*s^2-2*s-8
+routh=routh_t(P)
+disp(routh)
+r=coeff(P)
+n=length(r)
+c=0;
+for i=1:n
+if (routh(i,1)<0)
+c=c+1;
+ end
+ end
+ if(c>=1)
+ printf("system has %d roots in RHS",c)
+ else printf("no roots in RHS")
+ end
+ k=0
+
+R=(sqrt(roots(routh(3,:)))) //real part of the roots//
+disp("s is")
+disp(R)
+for(i=1:3)
+ if(real(R(i,1)) == 0)
+ k=k+1
+ end
+end
+
+ printf("%d is in the imaginary axis and ",k) //conjugate pairs//
+ printf(" %d roots are in LHS",6-k-c) //out of 6 roots//
+ \ No newline at end of file
diff --git a/257/CH8/EX8.22/ex_8_22.sce b/257/CH8/EX8.22/ex_8_22.sce
new file mode 100644
index 000000000..36729e0ff
--- /dev/null
+++ b/257/CH8/EX8.22/ex_8_22.sce
@@ -0,0 +1,20 @@
+//terms in a row become infinite//
+s=%s;
+//P=s^5+2*s^4+3*s^3+6*s^2+2*s+1;//
+//replace 's' by '1/z' to get F//
+z=%z;
+F=z^5+2*z^4+6*z^3+3*z^2+2*z+1
+disp(routh_t(F))
+r=coeff(F)
+routh=routh_t(F)
+n=length(r)
+c=0;
+for i=1:n
+if (routh(i,1)<0)
+c=c+1;
+ end
+ end
+ if(c>=1)
+ printf("system is unstable")
+ else printf("system is stable")
+ end \ No newline at end of file
diff --git a/257/CH8/EX8.23/example_8_23.sce b/257/CH8/EX8.23/example_8_23.sce
new file mode 100644
index 000000000..17abb700e
--- /dev/null
+++ b/257/CH8/EX8.23/example_8_23.sce
@@ -0,0 +1,27 @@
+s=%s
+P=s^6+2*s^5+9*s^4+16*s^3+24*s^2+32*s+16
+routh=routh_t(P)
+disp(routh)
+r=coeff(P)
+n=length(r)
+c=0;
+for i=1:n
+if (routh(i,1)<0)
+c=c+1;
+ end
+ end
+ if(c>=1)
+ printf("there are %d roots on RHS",c)
+ else printf("there are no roots in RHS")
+ end
+ disp("s is")
+R=(sqrt(roots(routh(3,:))))
+ disp(R)
+k=0
+for(i=1:3)
+ if(real (R(i,1))==0)
+ k=k+1
+ end
+ end
+
+printf("thus %d roots on imaginary axis and there are %d roots in LHS",2*(k-1),6-c-2*(k-1)) \ No newline at end of file
diff --git a/257/CH8/EX8.24/example_8_24.sce b/257/CH8/EX8.24/example_8_24.sce
new file mode 100644
index 000000000..335718daa
--- /dev/null
+++ b/257/CH8/EX8.24/example_8_24.sce
@@ -0,0 +1,21 @@
+s=%s
+syms K
+m=0.125*s^3+0.875*s^2+(1.75)*s+1+K
+cof_a_0 = coeffs(m,'s',0);
+cof_a_1 = coeffs(m,'s',1);
+cof_a_2 = coeffs(m,'s',2);
+cof_a_3 = coeffs(m,'s',3);
+
+r=[cof_a_0 cof_a_1 cof_a_2 cof_a_3]
+
+n=length(r);
+routh=[r([4,2]);r([3,1])];
+routh=[routh;-det(routh)/routh(2,1),0];
+t=routh(2:3,1:2); //extracting the square sub block of routh matrix
+routh=[routh;-det(t)/t(2,1),0]
+disp(routh,"rouths tabulation=")
+routh(3,1)=0 //For marginaly stable system
+
+sys=syslin('c',1/(0.125*s^3+0.875*s^2+(1.75)*s+1))
+k=kpure(sys)
+disp(k,"K(marginal)=")
diff --git a/257/CH8/EX8.25/example_8_25.sce b/257/CH8/EX8.25/example_8_25.sce
new file mode 100644
index 000000000..0d03de8b8
--- /dev/null
+++ b/257/CH8/EX8.25/example_8_25.sce
@@ -0,0 +1,23 @@
+s=%s
+P=s^5-s^4-2*s^3+2*s^2-8*s+8
+routh=routh_t(P)
+disp(routh)
+r=coeff(P)
+n=length(r)
+c=0;
+for i=1:n
+if (routh(i,1)<0)
+c=c+1;
+ end
+ end
+ if(c>=1)
+ printf("there are %d roots on RHS",c)
+ else printf("there are no roots on RHS")
+ end
+
+ disp("s^2 is")
+ disp(roots(routh(2,:)))
+
+
+
+ \ No newline at end of file
diff --git a/257/CH8/EX8.26/example_8_26.sce b/257/CH8/EX8.26/example_8_26.sce
new file mode 100644
index 000000000..54d87cc0c
--- /dev/null
+++ b/257/CH8/EX8.26/example_8_26.sce
@@ -0,0 +1,21 @@
+//determining critical value of K
+s=%s
+syms K
+m=0*s^3+s^2+(K+1)*s+2*K
+cof_a_0 = coeffs(m,'s',0);
+cof_a_1 = coeffs(m,'s',1);
+cof_a_2 = coeffs(m,'s',2);
+cof_a_3 = coeffs(m,'s',3);
+
+r=[cof_a_0 cof_a_1 cof_a_2 cof_a_3]
+
+n=length(r);
+routh=[r([4,2]);r([3,1])];
+routh=[routh;-det(routh)/routh(2,1),0];
+t=routh(2:3,1:2); //extracting the square sub block of routh matrix
+routh=[routh;-det(t)/t(2,1),0]
+disp(routh,"rouths tabulation=")
+routh(3,1)=0 //For marginaly stable system
+sys=syslin('c',s*(3*s+1)/(s^3+2*s+4))
+k=kpure(sys)
+disp(k,"K(marginal)=") \ No newline at end of file
diff --git a/257/CH8/EX8.27/example_8_27.sce b/257/CH8/EX8.27/example_8_27.sce
new file mode 100644
index 000000000..d1a4ff496
--- /dev/null
+++ b/257/CH8/EX8.27/example_8_27.sce
@@ -0,0 +1,27 @@
+s=%s
+//P=s^4+2*s^3+3*s^2+s+1
+s'=%s
+P=(s'-1)^4+2*(s'-1)^3+3*(s'-1)^2+(s'-1)+1 //putting s=s'-1
+routh=routh_t(P)
+disp(routh)
+r=coeff(P)
+n=length(r)
+c=0;
+for i=1:n
+if (routh(i,1)<0)
+c=c+1;
+ end
+ end
+ if(c>=1)
+ printf("there are 2*%d roots to the right of s=-1",c) //2 terms with negetive signs implies 4 sign changes//
+ else printf("system is stable")
+ end
+
+F=(s'-0.5)^4+2*(s'-0.5)^3+3*(s'-0.5)^2+(s'-0.5)+1
+disp(routh_t(F))
+r=coeff(F)
+rouths=routh_t(F)
+n=length(r)
+
+ printf("there are 2 sign changes.so there are 2 roots to the right of s=-0.5")
+ \ No newline at end of file
diff --git a/257/CH8/EX8.28/example_8_28.sce b/257/CH8/EX8.28/example_8_28.sce
new file mode 100644
index 000000000..7e26f1770
--- /dev/null
+++ b/257/CH8/EX8.28/example_8_28.sce
@@ -0,0 +1,23 @@
+//determining critical value of K
+s=%s
+syms K
+m=s^4+18*s^3+121*s^2+360*s+400-2*K^2
+cof_a_0 = coeffs(m,'s',0);
+cof_a_1 = coeffs(m,'s',1);
+cof_a_2 = coeffs(m,'s',2);
+cof_a_3 = coeffs(m,'s',3);
+
+r=[cof_a_0 cof_a_1 cof_a_2 cof_a_3]
+
+n=length(r);
+routh=[r([4,2]);r([3,1])];
+routh=[routh;-det(routh)/routh(2,1),0];
+t=routh(2:3,1:2); //extracting the square sub block of routh matrix
+routh=[routh;-det(t)/t(2,1),0]
+disp(routh,"rouths tabulation=")
+routh(3,1)=0 //For marginaly stable system
+
+disp("k marginal is")
+k=sqrt(200)
+disp(k)
+
diff --git a/257/CH8/EX8.29/example_8_29.sce b/257/CH8/EX8.29/example_8_29.sce
new file mode 100644
index 000000000..6d5e0b848
--- /dev/null
+++ b/257/CH8/EX8.29/example_8_29.sce
@@ -0,0 +1,27 @@
+syms s K
+G=K*(s+2)/(s*(s+3)*(s^2+5*s+10))
+H=1
+Kv=limit(s*G*H,s,0)
+disp(Kv, " Kv = ")
+
+Ess=0.01 //given
+K=15/Ess
+disp(K,"K=")
+
+s=%s
+F=s^3+8*s^2+1525*s+3030
+
+disp(routh_t(F))
+r=coeff(F)
+routh=routh_t(F)
+n=length(r)
+c=0;
+for i=1:n
+if (routh(i,1)<0)
+c=c+1;
+ end
+ end
+ if(c>=1)
+ printf("system is unstable")
+ else printf("there are no roots on RHS")
+ end \ No newline at end of file
diff --git a/257/CH8/EX8.3/example_8_3.sce b/257/CH8/EX8.3/example_8_3.sce
new file mode 100644
index 000000000..ac3949380
--- /dev/null
+++ b/257/CH8/EX8.3/example_8_3.sce
@@ -0,0 +1,16 @@
+s=%s;
+P=s^3+4*s^2+s+16;
+routh=routh_t(P)
+disp(routh)
+r=coeff(P)
+n=length(r)
+c=0;
+for i=1:n
+if (routh(i,1)<0)
+c=c+1;
+ end
+ end
+ if(c>=1)
+ printf("system is unstable")
+ else printf("system is stable")
+ end
diff --git a/257/CH8/EX8.30/example_8_30.sce b/257/CH8/EX8.30/example_8_30.sce
new file mode 100644
index 000000000..37241f42f
--- /dev/null
+++ b/257/CH8/EX8.30/example_8_30.sce
@@ -0,0 +1,34 @@
+s=%s
+
+F=s^8+s^7+4*s^6+3*s^5+14*s^4+11*s^3+20*s^2+9*s+9
+disp(routh_t(F))
+r=coeff(F)
+routh=routh_t(F)
+n=length(r)
+c=0;
+for i=1:n
+if (routh(i,1)<0)
+c=c+1;
+ end
+ end
+ if(c>=1)
+ printf("there are %d roots with positive real part as there are %d sign cganges",c+1,c+1) //two number of sign changes
+ else printf("no roots with positive real part")
+ end
+
+
+P=1+s^1+3*s^2+2*s^3+5*s^4+3*s^5+1*s^6
+routh=routh_t(P)
+disp(routh)
+r=coeff(P)
+n=length(r)
+c=0;
+for i=1:n
+if (routh(i,1)<=0)
+c=c+1;
+ end
+ end
+ if(c>=1)
+ printf("there are %d roots with positive real part",c+1)
+ else printf("no roots with positive real part")
+ end
diff --git a/257/CH8/EX8.31/example_8_31.sce b/257/CH8/EX8.31/example_8_31.sce
new file mode 100644
index 000000000..c1aaabd74
--- /dev/null
+++ b/257/CH8/EX8.31/example_8_31.sce
@@ -0,0 +1,27 @@
+syms s K
+G=(10+s)*K/(s^2*(s^2+2*s+10))
+H=1
+
+Ka=limit(s^2*G*H,s,0)
+disp(Ka, " Ka = ")
+Ess=0.1 //given
+K=1/Ess //A=1
+disp(K,"K=")
+
+s=%s
+F=s^4+2*s^3+10*s^2+10*s+100
+
+disp(routh_t(F))
+r=coeff(F)
+routh=routh_t(F)
+n=length(r)
+c=0;
+for i=1:n
+if (routh(i,1)<0)
+c=c+1;
+ end
+ end
+ if(c>=1)
+ printf("system is unstable")
+ else printf("there are no roots on RHS")
+ end
diff --git a/257/CH8/EX8.32/example_8_32.sce b/257/CH8/EX8.32/example_8_32.sce
new file mode 100644
index 000000000..05525be20
--- /dev/null
+++ b/257/CH8/EX8.32/example_8_32.sce
@@ -0,0 +1,21 @@
+//determining critical value of K
+s=%s
+syms K
+m=s^4+5*s^3+5*s^2+4*s+K
+cof_a_0 = coeffs(m,'s',0);
+cof_a_1 = coeffs(m,'s',1);
+cof_a_2 = coeffs(m,'s',2);
+cof_a_3 = coeffs(m,'s',3);
+
+r=[cof_a_0 cof_a_1 cof_a_2 cof_a_3]
+
+n=length(r);
+routh=[r([4,2]);r([3,1])];
+routh=[routh;-det(routh)/routh(2,1),0];
+t=routh(2:3,1:2); //extracting the square sub block of routh matrix
+routh=[routh;-det(t)/t(2,1),0]
+disp(routh,"rouths tabulation=")
+routh(3,1)=0 //For marginaly stable system
+sys=syslin('c',1/(s^4+5*s^3+5*s^2+4*s))
+k=kpure(sys)
+disp(k,"K(marginal)=") \ No newline at end of file
diff --git a/257/CH8/EX8.33/example_8_33.sce b/257/CH8/EX8.33/example_8_33.sce
new file mode 100644
index 000000000..79d877e7c
--- /dev/null
+++ b/257/CH8/EX8.33/example_8_33.sce
@@ -0,0 +1,27 @@
+//determining critical value of K
+s=%s
+syms K
+m=s^4+12*s^3+44*s^2+48*s+K
+cof_a_0 = coeffs(m,'s',0);
+cof_a_1 = coeffs(m,'s',1);
+cof_a_2 = coeffs(m,'s',2);
+cof_a_3 = coeffs(m,'s',3);
+
+r=[cof_a_0 cof_a_1 cof_a_2 cof_a_3]
+
+n=length(r);
+routh=[r([4,2]);r([3,1])];
+routh=[routh;-det(routh)/routh(2,1),0];
+t=routh(2:3,1:2); //extracting the square sub block of routh matrix
+routh=[routh;-det(t)/t(2,1),0]
+disp(routh,"rouths tabulation=")
+routh(3,1)=0 //For marginaly stable system
+sys=syslin('c',1/(s^4+12*s^3+44*s^2+48*s))
+k=kpure(sys)
+disp(k,"K(marginal)=")
+
+omega=sqrt(k/routh(3,1))
+
+
+
+
diff --git a/257/CH8/EX8.4/example_8_4.sce b/257/CH8/EX8.4/example_8_4.sce
new file mode 100644
index 000000000..2eb74881b
--- /dev/null
+++ b/257/CH8/EX8.4/example_8_4.sce
@@ -0,0 +1,19 @@
+s=%s;
+//F=s^5+s^4+2*s^3+2*s^2+3*s+15//
+//replacing 's' by '1/z' we get F//
+z=%z;
+F=15*z^5+3*z^4+2*z^3+2*z^2+z+1;
+disp(routh_t(F))
+r=coeff(F)
+routh=routh_t(F)
+n=length(r)
+c=0;
+for i=1:n
+if (routh(i,1)<0)
+c=c+1;
+ end
+ end
+ if(c>=1)
+ printf("system is unstable")
+ else printf("system is stable")
+ end
diff --git a/257/CH8/EX8.5/example_8_5.sce b/257/CH8/EX8.5/example_8_5.sce
new file mode 100644
index 000000000..f3503b097
--- /dev/null
+++ b/257/CH8/EX8.5/example_8_5.sce
@@ -0,0 +1,11 @@
+s=%s;
+F=s^6+4*s^5+3*s^4-16*s^2-64*s-48;
+//replace 's' by '1/z'//
+//F=48*z^6+64*z^5+16*z^4-3*z^2-4*z-1;
+disp(routh_t(F))
+routh=routh_t(F)
+r=coeff(F)
+n=length(r)
+c=0;
+
+disp("positive real=1, zero real part=2, negative real part=3")
diff --git a/257/CH8/EX8.6/example_8_6.sce b/257/CH8/EX8.6/example_8_6.sce
new file mode 100644
index 000000000..14192064f
--- /dev/null
+++ b/257/CH8/EX8.6/example_8_6.sce
@@ -0,0 +1,27 @@
+//determining critical value of K
+s=%s
+syms K
+m=0.1*s^3+0.65*s^2+s+K
+cof_a_0 = coeffs(m,'s',0);
+cof_a_1 = coeffs(m,'s',1);
+cof_a_2 = coeffs(m,'s',2);
+cof_a_3 = coeffs(m,'s',3);
+
+r=[cof_a_0 cof_a_1 cof_a_2 cof_a_3]
+
+n=length(r);
+routh=[r([4,2]);r([3,1])];
+routh=[routh;-det(routh)/routh(2,1),0];
+t=routh(2:3,1:2); //extracting the square sub block of routh matrix
+routh=[routh;-det(t)/t(2,1),0]
+disp(routh,"rouths tabulation=")
+routh(3,1)=0 //For marginaly stable system
+sys=syslin('c',1/(0.1*s^3+0.65*s^2+s))
+k=kpure(sys)
+disp(k,"K(marginal)=")
+
+w=sqrt(-k/0.65)
+disp(w,"w = ")
+
+
+
diff --git a/257/CH8/EX8.7/example_8_7.sce b/257/CH8/EX8.7/example_8_7.sce
new file mode 100644
index 000000000..9560835c3
--- /dev/null
+++ b/257/CH8/EX8.7/example_8_7.sce
@@ -0,0 +1,27 @@
+//determining critical value of K
+s=%s
+syms K
+m=s^4+22*s^3+10*s^2+s+K
+cof_a_0 = coeffs(m,'s',0);
+cof_a_1 = coeffs(m,'s',1);
+cof_a_2 = coeffs(m,'s',2);
+cof_a_3 = coeffs(m,'s',3);
+
+r=[cof_a_0 cof_a_1 cof_a_2 cof_a_3]
+
+n=length(r);
+routh=[r([4,2]);r([3,1])];
+routh=[routh;-det(routh)/routh(2,1),0];
+t=routh(2:3,1:2); //extracting the square sub block of routh matrix
+routh=[routh;-det(t)/t(2,1),0]
+disp(routh,"rouths tabulation=")
+routh(3,1)=0 //For marginaly stable system
+sys=syslin('c',1/(s^4+22*s^3+10*s^2+s))
+k=kpure(sys)
+disp(k,"K(marginal)=")
+
+w=sqrt(-k/9.95)
+disp(w,"w = ")
+
+
+
diff --git a/257/CH8/EX8.8/example_8_8.sce b/257/CH8/EX8.8/example_8_8.sce
new file mode 100644
index 000000000..dccb26a9b
--- /dev/null
+++ b/257/CH8/EX8.8/example_8_8.sce
@@ -0,0 +1,24 @@
+s=%s
+F=s^6+3*s^5+4*s^4+6*s^3+5*s^2+3*s+2
+
+disp(routh_t(F))
+r=coeff(F)
+routh=routh_t(F)
+n=length(r)
+c=0;
+for i=1:n
+if (routh(i,1)<0)
+c=c+1;
+ end
+ end
+ if(c>=1)
+ printf("system is unstable")
+ else printf("there are no roots on RHS")
+ end
+
+disp("s^2 is")
+R=roots(routh(3,:))
+disp(R)
+
+disp("as there are 2 pairs of repeated roots on the imaginary axis, the system is unstable")
+
diff --git a/257/CH8/EX8.9/example_8_9.sce b/257/CH8/EX8.9/example_8_9.sce
new file mode 100644
index 000000000..7f1ffa052
--- /dev/null
+++ b/257/CH8/EX8.9/example_8_9.sce
@@ -0,0 +1,22 @@
+//determining critical value of K
+s=%s
+syms K p
+m=s^3+p*s^2+(2+K)*s+K+1
+cof_a_0 = coeffs(m,'s',0);
+cof_a_1 = coeffs(m,'s',1);
+cof_a_2 = coeffs(m,'s',2);
+cof_a_3 = coeffs(m,'s',3);
+
+r=[cof_a_0 cof_a_1 cof_a_2 cof_a_3]
+
+n=length(r);
+routh=[r([4,2]);r([3,1])];
+routh=[routh;-det(routh)/routh(2,1),0];
+t=routh(2:3,1:2); //extracting the square sub block of routh matrix
+routh=[routh;-det(t)/t(2,1),0]
+disp(routh,"rouths tabulation=")
+routh(3,1)=0 //For marginaly stable system
+
+
+
+