diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /1151/CH8 | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '1151/CH8')
-rwxr-xr-x | 1151/CH8/EX8.1/example1.sce | 7 | ||||
-rwxr-xr-x | 1151/CH8/EX8.10/example10.sce | 20 | ||||
-rwxr-xr-x | 1151/CH8/EX8.11/example11.sce | 21 | ||||
-rwxr-xr-x | 1151/CH8/EX8.14/example14.sce | 6 | ||||
-rwxr-xr-x | 1151/CH8/EX8.15/example15.sce | 5 | ||||
-rwxr-xr-x | 1151/CH8/EX8.16/example16.sce | 24 | ||||
-rwxr-xr-x | 1151/CH8/EX8.17/example17.sce | 9 | ||||
-rwxr-xr-x | 1151/CH8/EX8.18/example18.sce | 7 | ||||
-rwxr-xr-x | 1151/CH8/EX8.19/example19.sce | 9 | ||||
-rwxr-xr-x | 1151/CH8/EX8.2/example2.sce | 13 | ||||
-rwxr-xr-x | 1151/CH8/EX8.20/example20.sce | 19 | ||||
-rwxr-xr-x | 1151/CH8/EX8.21/example21.sce | 11 | ||||
-rwxr-xr-x | 1151/CH8/EX8.22/example22.sce | 9 | ||||
-rwxr-xr-x | 1151/CH8/EX8.23/example23.sce | 9 | ||||
-rwxr-xr-x | 1151/CH8/EX8.25/example25.sce | 7 | ||||
-rwxr-xr-x | 1151/CH8/EX8.27/example27.sce | 5 | ||||
-rwxr-xr-x | 1151/CH8/EX8.28/example28.sce | 7 | ||||
-rwxr-xr-x | 1151/CH8/EX8.3/example3.sce | 7 | ||||
-rwxr-xr-x | 1151/CH8/EX8.31/example31.sce | 5 | ||||
-rwxr-xr-x | 1151/CH8/EX8.32/example32.sce | 7 | ||||
-rwxr-xr-x | 1151/CH8/EX8.33/example33.sce | 16 | ||||
-rwxr-xr-x | 1151/CH8/EX8.34/example34.sce | 9 | ||||
-rwxr-xr-x | 1151/CH8/EX8.6/example6.sce | 9 |
23 files changed, 241 insertions, 0 deletions
diff --git a/1151/CH8/EX8.1/example1.sce b/1151/CH8/EX8.1/example1.sce new file mode 100755 index 000000000..23990970a --- /dev/null +++ b/1151/CH8/EX8.1/example1.sce @@ -0,0 +1,7 @@ +printf("given the differential equation \n let select the state variables as x1=y,x2=y(dot),x3=y(double dot)")
+a=[0 1 0;0 0 1;-10 -11 -6]
+b=[0;0;8]
+
+disp("x(t)=[x1;x2;x3]")
+disp(a,"A=")
+disp(b,"B=")
diff --git a/1151/CH8/EX8.10/example10.sce b/1151/CH8/EX8.10/example10.sce new file mode 100755 index 000000000..fe885f0a5 --- /dev/null +++ b/1151/CH8/EX8.10/example10.sce @@ -0,0 +1,20 @@ +A =[-1 0 0;0 -2 0;0 0 -3]
+B =[1;1;0]
+x=[0 1 2]
+p=cont_mat(A,B)
+disp (p," controllability matrix=");
+d=det(p)
+if d==0
+printf ("matrix is singular, so the system is uncontrollable");
+else
+printf ("system is controllable ");
+end
+s=%s
+[r c]= size (A)
+h=s*eye(r,c)-A // s*I-A
+q=inv(h)
+c=x*q*B;
+disp(c,"required transfer function =")
+
+
+
diff --git a/1151/CH8/EX8.11/example11.sce b/1151/CH8/EX8.11/example11.sce new file mode 100755 index 000000000..142e3c5d9 --- /dev/null +++ b/1151/CH8/EX8.11/example11.sce @@ -0,0 +1,21 @@ +A =[-0.5 0;0 -2]
+B =[0;1]
+C=[0 1]
+p=cont_mat(A,B)
+disp (p," controllability matrix=");
+d=det(p)
+if d==0
+printf ("matrix is singular, so the system is uncontrollable");
+else
+printf ("system is controllable ");
+end
+g= obsv_mat (A,C);
+disp (g," Observability Matrix=");
+i= det(g)
+if i ==0
+printf ("matrix is singular, so the system is unobservable");
+else
+printf (" system is observable ");
+end
+
+
diff --git a/1151/CH8/EX8.14/example14.sce b/1151/CH8/EX8.14/example14.sce new file mode 100755 index 000000000..d91050edf --- /dev/null +++ b/1151/CH8/EX8.14/example14.sce @@ -0,0 +1,6 @@ +s=%s ;//convert to state space
+K=1;
+TFcont=syslin ('c',K/(s ^4+3*s^3+3*s^2+3*s+2))
+SScont=tf2ss (TFcont )
+[Ac ,Bc ,U, ind ]=canon( SScont( 2 ) , SScont( 3 ) )
+disp(SScont)
diff --git a/1151/CH8/EX8.15/example15.sce b/1151/CH8/EX8.15/example15.sce new file mode 100755 index 000000000..0f5320d4d --- /dev/null +++ b/1151/CH8/EX8.15/example15.sce @@ -0,0 +1,5 @@ +s=%s ;// convert to state space
+
+TFcont=syslin ('c',20*(10*s+1)/(s^3+3*s^2+2*s+1))
+SScont=tf2ss (TFcont )
+[Ac ,Bc ,U, ind ]=canon( SScont( 2 ) , SScont( 3 ) )
diff --git a/1151/CH8/EX8.16/example16.sce b/1151/CH8/EX8.16/example16.sce new file mode 100755 index 000000000..b0c3f5898 --- /dev/null +++ b/1151/CH8/EX8.16/example16.sce @@ -0,0 +1,24 @@ +s=%s ;//convert to state space
+TFcont=syslin ('c',2/(s^3+6*s^2+11*s+6))
+SScont=tf2ss (TFcont)
+[Ac ,Bc ,U, ind ]=canon( SScont( 2 ) , SScont( 3 ) )
+disp(Ac,"A=")
+disp(Bc,"B=")
+C=[1 0 0]
+p=cont_mat(Ac,Bc)
+disp (p," controllability matrix=");
+d=det(p)
+if d==0
+printf ("matrix is singular, so the system is uncontrollable");
+else
+printf ("system is controllable ");
+end
+g= obsv_mat (Ac,C);
+disp (g," Observability Matrix=");
+i= det(g)
+if i ==0
+printf ("matrix is singular, so the system is unobservable");
+else
+printf (" system is observable ");
+end
+
diff --git a/1151/CH8/EX8.17/example17.sce b/1151/CH8/EX8.17/example17.sce new file mode 100755 index 000000000..81b5cee0f --- /dev/null +++ b/1151/CH8/EX8.17/example17.sce @@ -0,0 +1,9 @@ +s=%s;
+A =[-1 1;0 -2];
+B =[1 0 1;0 1 1];
+x =[1 2;1 0;1 1];
+[r c]= size (A)
+p=s*eye(r,c)-A // s*I-A
+q=inv(p)
+c=x*q*B;
+disp(c,"required transfer function =")
diff --git a/1151/CH8/EX8.18/example18.sce b/1151/CH8/EX8.18/example18.sce new file mode 100755 index 000000000..0c1cd75c8 --- /dev/null +++ b/1151/CH8/EX8.18/example18.sce @@ -0,0 +1,7 @@ +s=%s ;// convert to state space
+
+TFcont=syslin ('c',20*(4*s+2)/(s^3+5*s^2+8*s+2))
+SScont=tf2ss (TFcont )
+[Ac ,Bc ,U, ind ]=canon( SScont( 2 ) , SScont( 3 ) )
+disp(Ac,"Matrix A=")
+disp(Bc,"Matrix B=")
diff --git a/1151/CH8/EX8.19/example19.sce b/1151/CH8/EX8.19/example19.sce new file mode 100755 index 000000000..d39cce0ca --- /dev/null +++ b/1151/CH8/EX8.19/example19.sce @@ -0,0 +1,9 @@ +s=%s ;// convert to state space
+
+TFcont=syslin ('c',(s+2)/(s^3+3*s^2+2*s+10))
+SScont=tf2ss (TFcont )
+[Ac ,Bc ,U, ind ]=canon( SScont( 2 ) , SScont( 3 ) )
+disp(Ac,"Matrix A=")
+disp(Bc,"Matrix B=")
+C=[2 1 0]
+disp(C," Matrix Ct=")
diff --git a/1151/CH8/EX8.2/example2.sce b/1151/CH8/EX8.2/example2.sce new file mode 100755 index 000000000..64aa7a822 --- /dev/null +++ b/1151/CH8/EX8.2/example2.sce @@ -0,0 +1,13 @@ +clear ; clc;
+xdel ( winsid ()); // c l o s e a l l windows
+mode (0)
+x1 = [1; 2; 3]
+x2 = [1; 0; 1]
+x3 = [2; 2; 4]
+A = [x1 x2 x3 ];
+disp (A, ' [ x1 : x2 : x3 ] =' );
+disp ( clean ( det (A)), ' de t ( [ x1 : x2 : x3 ] ) =' ); // s i n g u l a r
+x3 = [2;2;2]
+A = [x1 x2 x3 ];
+disp (A, ' [ x1 : x2 : x3 ] =' );
+disp (det(A), ' de t ( [ x1 : x2 : x3 ] ) =' );
diff --git a/1151/CH8/EX8.20/example20.sce b/1151/CH8/EX8.20/example20.sce new file mode 100755 index 000000000..de1526dd6 --- /dev/null +++ b/1151/CH8/EX8.20/example20.sce @@ -0,0 +1,19 @@ +A=[-1 0 0;0 -2 0;0 0 -3]//controlability and observebility
+B=[1;1;0]
+C=[1 0 2]
+p=cont_mat(A,B)
+disp (p," controllability matrix=");
+d=det(p)
+if d==0
+printf ("matrix is singular, so the system is uncontrollable");
+else
+printf ("system is controllable ");
+end
+g= obsv_mat (A,C);
+disp (g," Observability Matrix=");
+i= det(g)
+if i ==0
+printf ("matrix is singular, so the system is unobservable");
+else
+printf (" system is observable ");
+end
diff --git a/1151/CH8/EX8.21/example21.sce b/1151/CH8/EX8.21/example21.sce new file mode 100755 index 000000000..fa03cc76f --- /dev/null +++ b/1151/CH8/EX8.21/example21.sce @@ -0,0 +1,11 @@ +//check the obersebability of the system
+A=[-1 0;0 -2]
+C=[1 1]
+g= obsv_mat (A,C);
+disp (g," Observability Matrix=");
+i= det(g)
+if i ==0
+printf ("matrix is singular, so the system is unobservable");
+else
+printf (" system is observable ");
+end
diff --git a/1151/CH8/EX8.22/example22.sce b/1151/CH8/EX8.22/example22.sce new file mode 100755 index 000000000..bbe97f347 --- /dev/null +++ b/1151/CH8/EX8.22/example22.sce @@ -0,0 +1,9 @@ +s=%s'
+A =[0 1 0;0 0 1;0 -2 -3]
+B =[0;0;1]
+x=[1 2 0]
+[r c]= size (A)
+h=s*eye(r,c)-A // s*I-A
+q=inv(h)
+c=x*q*B;
+disp(c,"required transfer function =")
diff --git a/1151/CH8/EX8.23/example23.sce b/1151/CH8/EX8.23/example23.sce new file mode 100755 index 000000000..cbce113e2 --- /dev/null +++ b/1151/CH8/EX8.23/example23.sce @@ -0,0 +1,9 @@ +s=%s;//find transfer function of the given system
+A =[-2 -1;-3 -2];
+B =[3;4];
+x =[2 1];
+[r c]= size (A)
+p=s*eye(r,c)-A // s*I-A
+q=inv(p)
+c=x*q*B;
+disp(c,"required transfer function =")
diff --git a/1151/CH8/EX8.25/example25.sce b/1151/CH8/EX8.25/example25.sce new file mode 100755 index 000000000..a72b3b612 --- /dev/null +++ b/1151/CH8/EX8.25/example25.sce @@ -0,0 +1,7 @@ +s=%s ;
+//create state equation of the following matrix
+TFcont=syslin ('c',(1+0.5*s)/(s^2+2*s+0.5) )
+SScont=tf2ss(TFcont )
+[Ac ,Bc ,U, ind ]=canon( SScont ( 2 ) , SScont ( 3 ) )
+disp(Ac,"MAtrix A=")
+disp(Bc,"MAtrix B=")
diff --git a/1151/CH8/EX8.27/example27.sce b/1151/CH8/EX8.27/example27.sce new file mode 100755 index 000000000..a4dbcf962 --- /dev/null +++ b/1151/CH8/EX8.27/example27.sce @@ -0,0 +1,5 @@ +s=%s ;
+//create state equation of the following matrix
+TFcont=syslin ('c',(1+0.5*s)/(s^2+2*s+0.5) )
+SScont=tf2ss(TFcont )
+[Ac ,Bc ,U, ind ]=canon( SScont ( 2 ) , SScont ( 3 ) )
diff --git a/1151/CH8/EX8.28/example28.sce b/1151/CH8/EX8.28/example28.sce new file mode 100755 index 000000000..95fbf373a --- /dev/null +++ b/1151/CH8/EX8.28/example28.sce @@ -0,0 +1,7 @@ +s=%s ;
+//create state equation of the following matrix
+TFcont=syslin ('c',1/(s^3+6*s^2+11*s+6) )
+SScont=tf2ss(TFcont )
+[Ac ,Bc ,U, ind ]=canon( SScont ( 2 ) , SScont ( 3 ) )
+disp(Ac,"MAtrix A=")
+disp(Bc,"MAtrix B=")
diff --git a/1151/CH8/EX8.3/example3.sce b/1151/CH8/EX8.3/example3.sce new file mode 100755 index 000000000..2e7a6c675 --- /dev/null +++ b/1151/CH8/EX8.3/example3.sce @@ -0,0 +1,7 @@ +clear ; clc;
+ xdel ( winsid ()); // c l o s e a l l windows
+ s = %s;
+ num = 25.04* s + 5.008;
+den = poly([5.008 25.1026 5.03247 1],'s','c');
+Hss = cont_frm (num ,den);
+disp (Hss , ' Hss = ' )
diff --git a/1151/CH8/EX8.31/example31.sce b/1151/CH8/EX8.31/example31.sce new file mode 100755 index 000000000..bd280b90d --- /dev/null +++ b/1151/CH8/EX8.31/example31.sce @@ -0,0 +1,5 @@ +//write down dcf of the following state space
+A =[0 1 0;0 0 1; -6 -11 -6]
+T =[1 1 1;-1 -2 -3;1 4 9]
+Adcf =inv(T)*A*T
+disp (Adcf ,"Adcf=")
diff --git a/1151/CH8/EX8.32/example32.sce b/1151/CH8/EX8.32/example32.sce new file mode 100755 index 000000000..a256373ab --- /dev/null +++ b/1151/CH8/EX8.32/example32.sce @@ -0,0 +1,7 @@ +s=%s ;
+//create state equation of the following matrix
+TFcont=syslin ('c',(s+6)/(s^2+5*s+6))
+SScont=tf2ss(TFcont )
+[Ac ,Bc ,U, ind ]=canon( SScont ( 2 ) , SScont ( 3 ) )
+disp(Ac,"MAtrix A=")
+disp(Bc,"MAtrix B=")
diff --git a/1151/CH8/EX8.33/example33.sce b/1151/CH8/EX8.33/example33.sce new file mode 100755 index 000000000..a347a6fce --- /dev/null +++ b/1151/CH8/EX8.33/example33.sce @@ -0,0 +1,16 @@ +s=%s ;
+//create state equation of the following matrix
+TFcont=syslin ('c',(s^2+3*s+3)/(s^3+2*s^2+3*s-1))
+SScont=tf2ss(TFcont )
+[Ac ,Bc ,U, ind ]=canon( SScont ( 2 ) , SScont ( 3 ) )
+disp(Ac,"MAtrix A=")
+disp(Bc,"MAtrix B=")
+s=%s;
+A =[0 0 1;1 0 -3;0 1 -2];
+B =[3;3;1];
+x =[0 0 1];
+[r c]= size (A)
+p=s*eye(r,c)-A // s*I-A
+q=inv(p)
+c=x*q*B;
+disp(c,"required transfer function =")
diff --git a/1151/CH8/EX8.34/example34.sce b/1151/CH8/EX8.34/example34.sce new file mode 100755 index 000000000..3bb3caaad --- /dev/null +++ b/1151/CH8/EX8.34/example34.sce @@ -0,0 +1,9 @@ +s=%s ;
+//create state equation of the following matrix
+TFcont=syslin ('c',(s+6)/(s^2+5*s+6))
+SScont=tf2ss(TFcont )
+[Ac ,Bc ,U, ind ]=canon( SScont ( 2 ) , SScont ( 3 ) )
+disp(Ac,"MAtrix A=")
+disp(Bc,"MAtrix B=")
+
+
diff --git a/1151/CH8/EX8.6/example6.sce b/1151/CH8/EX8.6/example6.sce new file mode 100755 index 000000000..a95142ecd --- /dev/null +++ b/1151/CH8/EX8.6/example6.sce @@ -0,0 +1,9 @@ +s=%s;
+A =[0 1;-2 -3];
+B =[0;1];
+x =[1 0];
+[r c]= size (A)
+p=s*eye(r,c)-A // s*I-A
+q=inv(p)
+c=x*q*B;
+disp(c,"required transfer function =")
|