summaryrefslogtreecommitdiff
path: root/22/CH4
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /22/CH4
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '22/CH4')
-rwxr-xr-x22/CH4/EX4.1/ch4ex1.jpgbin0 -> 15997 bytes
-rwxr-xr-x22/CH4/EX4.1/ch4ex1.sce10
-rwxr-xr-x22/CH4/EX4.10/ch4ex10.sce11
-rwxr-xr-x22/CH4/EX4.11/ch4ex11.sce11
-rwxr-xr-x22/CH4/EX4.12/ch4ex12.sce11
-rwxr-xr-x22/CH4/EX4.15/ch4ex15.sce11
-rwxr-xr-x22/CH4/EX4.16/ch4ex16.sce9
-rwxr-xr-x22/CH4/EX4.17/ch4ex17.sce11
-rwxr-xr-x22/CH4/EX4.2/ch4ex2.sce14
-rwxr-xr-x22/CH4/EX4.23/ch4ex23.jpgbin0 -> 63302 bytes
-rwxr-xr-x22/CH4/EX4.23/ch4ex23.sce3
-rwxr-xr-x22/CH4/EX4.24/ch4ex24.sce5
-rwxr-xr-x22/CH4/EX4.24/ch4ex24a.jpgbin0 -> 69205 bytes
-rwxr-xr-x22/CH4/EX4.24/ch4ex24b.jpgbin0 -> 69122 bytes
-rwxr-xr-x22/CH4/EX4.25/ch4ex25.jpgbin0 -> 71499 bytes
-rwxr-xr-x22/CH4/EX4.25/ch4ex25.sce3
-rwxr-xr-x22/CH4/EX4.26/ch4ex26.jpgbin0 -> 70880 bytes
-rwxr-xr-x22/CH4/EX4.26/ch4ex26.sce3
-rwxr-xr-x22/CH4/EX4.27/ch4ex27.jpgbin0 -> 68087 bytes
-rwxr-xr-x22/CH4/EX4.27/ch4ex27.sce10
-rwxr-xr-x22/CH4/EX4.28/ch4ex28.sce30
-rwxr-xr-x22/CH4/EX4.29/ch4ex29.sce11
-rwxr-xr-x22/CH4/EX4.3.a/ch4ex3a.sce12
-rwxr-xr-x22/CH4/EX4.3.b/ch4ex3b.sce10
-rwxr-xr-x22/CH4/EX4.3.c/ch4ex3c.sce10
-rwxr-xr-x22/CH4/EX4.30/ch4ex30.sce11
-rwxr-xr-x22/CH4/EX4.31/ch4ex31.sce19
-rwxr-xr-x22/CH4/EX4.4/ch4ex4.sce11
-rwxr-xr-x22/CH4/EX4.5/ch4ex5.sce17
-rwxr-xr-x22/CH4/EX4.8/ch4ex8.sce12
-rwxr-xr-x22/CH4/EX4.9/ch4ex9.sce11
31 files changed, 266 insertions, 0 deletions
diff --git a/22/CH4/EX4.1/ch4ex1.jpg b/22/CH4/EX4.1/ch4ex1.jpg
new file mode 100755
index 000000000..2c6460fb1
--- /dev/null
+++ b/22/CH4/EX4.1/ch4ex1.jpg
Binary files differ
diff --git a/22/CH4/EX4.1/ch4ex1.sce b/22/CH4/EX4.1/ch4ex1.sce
new file mode 100755
index 000000000..5198eeaac
--- /dev/null
+++ b/22/CH4/EX4.1/ch4ex1.sce
@@ -0,0 +1,10 @@
+//signals and systems
+//Laplace Transform x(t) = exp(-at).u(t) for t negative and positive
+syms t s;
+a = 3;
+y =laplace('%e^(-a*t)',t,s);
+t1=0:0.001:10;
+plot2d(t1,exp(-a*t1));
+disp(y)
+y1 = laplace('%e^(a*-t)',t,s);
+disp(y1)
diff --git a/22/CH4/EX4.10/ch4ex10.sce b/22/CH4/EX4.10/ch4ex10.sce
new file mode 100755
index 000000000..57dca52f0
--- /dev/null
+++ b/22/CH4/EX4.10/ch4ex10.sce
@@ -0,0 +1,11 @@
+//signals and systems
+//Unilateral Laplace Transform:Solving Differential Equation
+//example 4.10
+s = %s;
+syms t;
+[A] = pfss((2*s^2+20*s+45)/((s+2)*(s+3)*(s+4)));
+F1 = ilaplace(A(1),s,t)
+F2 = ilaplace(A(2),s,t)
+F3 = ilaplace(A(3),s,t)
+F = F1+F2+F3
+disp(F)
diff --git a/22/CH4/EX4.11/ch4ex11.sce b/22/CH4/EX4.11/ch4ex11.sce
new file mode 100755
index 000000000..d331bc68a
--- /dev/null
+++ b/22/CH4/EX4.11/ch4ex11.sce
@@ -0,0 +1,11 @@
+//signals and systems
+//Unilateral Laplace Transform:Solving Differential Equation
+//example 4.11
+s = %s;
+syms t;
+[A] = pfss((2*s)/(s^2+2*s+5));
+F1 = ilaplace(A(1),s,t)
+//F2 = ilaplace(A(2),s,t)
+//F3 = ilaplace(A(3),s,t)
+F = F1+F2+F3
+disp(F)
diff --git a/22/CH4/EX4.12/ch4ex12.sce b/22/CH4/EX4.12/ch4ex12.sce
new file mode 100755
index 000000000..d4bfd3876
--- /dev/null
+++ b/22/CH4/EX4.12/ch4ex12.sce
@@ -0,0 +1,11 @@
+//signals and systems
+//Unilateral Laplace Transform:Solving Differential Equation
+//example 4.12
+s = %s;
+syms t;
+[A] = pfss((3*s+3)/((s+5)*(s^2+5*s+6)));
+F1 = ilaplace(A(1),s,t)
+F2 = ilaplace(A(2),s,t)
+F3 = ilaplace(A(3),s,t)
+F = F1+F2+F3
+disp(F)
diff --git a/22/CH4/EX4.15/ch4ex15.sce b/22/CH4/EX4.15/ch4ex15.sce
new file mode 100755
index 000000000..f2a304a38
--- /dev/null
+++ b/22/CH4/EX4.15/ch4ex15.sce
@@ -0,0 +1,11 @@
+//signals and systems
+//Unilateral Laplace Transform:Solving Differential Equation
+//example 4.15
+s = %s;
+syms t;
+[A] = pfss((10)/(s^2+3*s+2));
+F1 = ilaplace(A(1),s,t)
+F2 = ilaplace(A(2),s,t)
+//F3 = ilaplace(A(3),s,t)
+F = F1+F2+F3
+disp(F)
diff --git a/22/CH4/EX4.16/ch4ex16.sce b/22/CH4/EX4.16/ch4ex16.sce
new file mode 100755
index 000000000..f13e0303e
--- /dev/null
+++ b/22/CH4/EX4.16/ch4ex16.sce
@@ -0,0 +1,9 @@
+//signals and systems
+//Unilateral Laplace Transform: transfer function
+//example 4.16
+s = %s;
+syms t s;
+y1 =laplace('24*%e^(-3*t)+48*%e^(-4*t)',t,s);
+disp(y1)
+y2 =laplace('16*%e^(-3*t)-12*%e^(-4*t)',t,s);
+disp(y2)
diff --git a/22/CH4/EX4.17/ch4ex17.sce b/22/CH4/EX4.17/ch4ex17.sce
new file mode 100755
index 000000000..b8975d1ea
--- /dev/null
+++ b/22/CH4/EX4.17/ch4ex17.sce
@@ -0,0 +1,11 @@
+//signals and systems
+//Unilateral Laplace Transform:Solving Differential Equation
+//example 4.17
+s= %s;
+syms t;
+[A] = pfss((2*s^2+9*s+4)/((s)*(s^2+3*s+1)));
+F1 = ilaplace(A(1),s,t)
+F2 = ilaplace(A(2),s,t)
+F3 = ilaplace(A(3),s,t)
+F = F1+F2+F3
+disp(F) \ No newline at end of file
diff --git a/22/CH4/EX4.2/ch4ex2.sce b/22/CH4/EX4.2/ch4ex2.sce
new file mode 100755
index 000000000..eade38b3a
--- /dev/null
+++ b/22/CH4/EX4.2/ch4ex2.sce
@@ -0,0 +1,14 @@
+//signals and systems
+//(a) laplace transform x(t) = del(t)
+syms t s;
+
+y =laplace('0',t,s)
+disp(y)
+//(b) Laplace Transform x(t) = u(t)
+
+y1 =laplace('1',t,s);
+disp(y1)
+//(c) laplace transform x(t) = cos(w0*t)u(t)
+
+y2 =laplace('cos(w0*t)',t,s);
+disp(y2) \ No newline at end of file
diff --git a/22/CH4/EX4.23/ch4ex23.jpg b/22/CH4/EX4.23/ch4ex23.jpg
new file mode 100755
index 000000000..399071d7e
--- /dev/null
+++ b/22/CH4/EX4.23/ch4ex23.jpg
Binary files differ
diff --git a/22/CH4/EX4.23/ch4ex23.sce b/22/CH4/EX4.23/ch4ex23.sce
new file mode 100755
index 000000000..27dccfba8
--- /dev/null
+++ b/22/CH4/EX4.23/ch4ex23.sce
@@ -0,0 +1,3 @@
+s=poly(0,'s')
+h=syslin('c',(s+0.1)/(s+5))
+clf();bode(h,0.1,100); \ No newline at end of file
diff --git a/22/CH4/EX4.24/ch4ex24.sce b/22/CH4/EX4.24/ch4ex24.sce
new file mode 100755
index 000000000..a6ed29979
--- /dev/null
+++ b/22/CH4/EX4.24/ch4ex24.sce
@@ -0,0 +1,5 @@
+s=poly(0,'s')
+h=syslin('c',(s^2/s))
+clf();bode(h,0.1,100);
+h1=syslin('c',(1/s))
+clf(); bode(h1,0.1,100); \ No newline at end of file
diff --git a/22/CH4/EX4.24/ch4ex24a.jpg b/22/CH4/EX4.24/ch4ex24a.jpg
new file mode 100755
index 000000000..2949316f3
--- /dev/null
+++ b/22/CH4/EX4.24/ch4ex24a.jpg
Binary files differ
diff --git a/22/CH4/EX4.24/ch4ex24b.jpg b/22/CH4/EX4.24/ch4ex24b.jpg
new file mode 100755
index 000000000..9a199cf6d
--- /dev/null
+++ b/22/CH4/EX4.24/ch4ex24b.jpg
Binary files differ
diff --git a/22/CH4/EX4.25/ch4ex25.jpg b/22/CH4/EX4.25/ch4ex25.jpg
new file mode 100755
index 000000000..e4c4bccab
--- /dev/null
+++ b/22/CH4/EX4.25/ch4ex25.jpg
Binary files differ
diff --git a/22/CH4/EX4.25/ch4ex25.sce b/22/CH4/EX4.25/ch4ex25.sce
new file mode 100755
index 000000000..203db6c16
--- /dev/null
+++ b/22/CH4/EX4.25/ch4ex25.sce
@@ -0,0 +1,3 @@
+s=poly(0,'s')
+h=syslin('c',((20*s^2+2000*s)/(s^2+12*s+20)))
+clf();bode(h,0.1,100); \ No newline at end of file
diff --git a/22/CH4/EX4.26/ch4ex26.jpg b/22/CH4/EX4.26/ch4ex26.jpg
new file mode 100755
index 000000000..5bec75d80
--- /dev/null
+++ b/22/CH4/EX4.26/ch4ex26.jpg
Binary files differ
diff --git a/22/CH4/EX4.26/ch4ex26.sce b/22/CH4/EX4.26/ch4ex26.sce
new file mode 100755
index 000000000..cdc4b7ab1
--- /dev/null
+++ b/22/CH4/EX4.26/ch4ex26.sce
@@ -0,0 +1,3 @@
+s=poly(0,'s')
+h=syslin('c',((10*s+1000)/(s^2+2*s+100)))
+clf();bode(h,0.1,100); \ No newline at end of file
diff --git a/22/CH4/EX4.27/ch4ex27.jpg b/22/CH4/EX4.27/ch4ex27.jpg
new file mode 100755
index 000000000..51b8197d9
--- /dev/null
+++ b/22/CH4/EX4.27/ch4ex27.jpg
Binary files differ
diff --git a/22/CH4/EX4.27/ch4ex27.sce b/22/CH4/EX4.27/ch4ex27.sce
new file mode 100755
index 000000000..0389caa79
--- /dev/null
+++ b/22/CH4/EX4.27/ch4ex27.sce
@@ -0,0 +1,10 @@
+omega_0=2*%pi*60; theta = [60 80 87]*(%pi/180);
+omega = (0:0.5:1000)'; mag = zeros(3,length(omega));
+s=poly(0,'s')
+for m =1:length(theta)
+ H=syslin('c',((s^2+omega_0^2)/(s^2+2*omega_0*cos(theta(m))*s +omega_0^2)));
+ bode(H,10,100);
+end
+f=omega/((2*%pi))plot(f,mag(1,:),'k-',f mag(2,:),'k--',f,mag(3,:),'k-.');
+xlabel('f[hz]'); ylabel('|H(j2/pi f)|');
+legend('\theta=60^\circ','\theta = 80^\circ','\theta = 87^\circ',0) \ No newline at end of file
diff --git a/22/CH4/EX4.28/ch4ex28.sce b/22/CH4/EX4.28/ch4ex28.sce
new file mode 100755
index 000000000..b4d76fd0a
--- /dev/null
+++ b/22/CH4/EX4.28/ch4ex28.sce
@@ -0,0 +1,30 @@
+//signals and systems
+//bilateral Inverse Lapalce Transform
+//X(S) = 1/((s-1)(s+2))
+s =%s ;
+syms t ;
+[A]=pfss(1/((s-1)*(s+2))) //partial fraction of F(s)
+F1 = ilaplace(A(1),s,t)
+F2 = ilaplace(A(2),s,t)
+F=F1+F2;
+disp(F,"f(t)=")
+
+
+//X(S) = 1/((s-1)(s+2)) Re(s)> -1,Re(s)< -2
+s =%s ;
+syms t ;
+[A]=pfss(1/((s-1)*(s+2))) //partial fraction of F(s)
+F1 = ilaplace(A(1),s,t)
+F2 = ilaplace(A(2),s,t)
+F = -F1-F2;
+disp(F,"f(t)=")
+
+
+//X(S) = 1/((s-1)(s+2)) -2< Re(s)< 1
+s =%s ;
+syms t ;
+[A]=pfss(1/((s-1)*(s+2))) //partial fraction of F(s)
+F1 = ilaplace(A(1),s,t)
+F2 = ilaplace(A(2),s,t)
+F = -F1+F2;
+disp(F,"f(t)=") \ No newline at end of file
diff --git a/22/CH4/EX4.29/ch4ex29.sce b/22/CH4/EX4.29/ch4ex29.sce
new file mode 100755
index 000000000..663dbcc70
--- /dev/null
+++ b/22/CH4/EX4.29/ch4ex29.sce
@@ -0,0 +1,11 @@
+//signals and systems
+//Unilateral Laplace Transform:Solving Differential Equation
+//example 4.30
+s= %s;
+syms t;
+[A] = pfss((-s)/((s-1)*(s-2)*(s+1)));
+F1 = ilaplace(A(1),s,t)
+F2 = ilaplace(A(2),s,t)
+F3 = ilaplace(A(3),s,t)
+F = F1+F2+F3
+disp(F) \ No newline at end of file
diff --git a/22/CH4/EX4.3.a/ch4ex3a.sce b/22/CH4/EX4.3.a/ch4ex3a.sce
new file mode 100755
index 000000000..cffac0944
--- /dev/null
+++ b/22/CH4/EX4.3.a/ch4ex3a.sce
@@ -0,0 +1,12 @@
+//signals and systems
+//Inverse Lapalce Transform
+//(a) X(S) = (7s-6)/s^2-s-6 Re(s)>-1
+s =%s ;
+syms t ;
+[A]=pfss((7*s-6)/((s^2-s-6))); //partial fraction of F(s)
+F1 = ilaplace(A(1),s,t)
+F2 = ilaplace(A(2),s,t)
+//F3 = ilaplace(A(3),s,t)
+F = F1+F2;
+disp(F,"f(t)=")
+
diff --git a/22/CH4/EX4.3.b/ch4ex3b.sce b/22/CH4/EX4.3.b/ch4ex3b.sce
new file mode 100755
index 000000000..52f7301c7
--- /dev/null
+++ b/22/CH4/EX4.3.b/ch4ex3b.sce
@@ -0,0 +1,10 @@
+//example 4.3
+//(b) X(S) = (2*s^2+5)/s^2-3*s+2 Re(s)>-1
+s =%s ;
+syms t ;
+[A]=pfss((2*s^2+5)/((s^2-3*s+2))); //partial fraction of F(s)
+F1 = ilaplace(A(1),s,t)
+F2 = ilaplace(A(2),s,t)
+//F3 = ilaplace(A(3),s,t)
+F = F1+F2;
+disp(F,"f(t)=") \ No newline at end of file
diff --git a/22/CH4/EX4.3.c/ch4ex3c.sce b/22/CH4/EX4.3.c/ch4ex3c.sce
new file mode 100755
index 000000000..270164745
--- /dev/null
+++ b/22/CH4/EX4.3.c/ch4ex3c.sce
@@ -0,0 +1,10 @@
+//example4.3
+//(c) X(S) = 6(s+34)/s(s^2+10*s+34) Re(s)>-1
+s =%s ;
+syms t ;
+[A]=pfss((6*(s+34))/(s*(s^2+10*s+34))); //partial fraction of F(s)
+F1 = ilaplace(A(1),s,t)
+F2 = ilaplace(A(2),s,t)
+//F3 = ilaplace(A(3),s,t)
+F = F1+F2;
+disp(F,"f(t)=") \ No newline at end of file
diff --git a/22/CH4/EX4.30/ch4ex30.sce b/22/CH4/EX4.30/ch4ex30.sce
new file mode 100755
index 000000000..3ec2abb49
--- /dev/null
+++ b/22/CH4/EX4.30/ch4ex30.sce
@@ -0,0 +1,11 @@
+//signals and systems
+//Unilateral Laplace Transform:Solving Differential Equation
+//example 4.30
+s= %s;
+syms t;
+[A] = pfss((-1)/((s-1)*(s+2)));
+F1 = ilaplace(A(1),s,t)
+F2 = ilaplace(A(2),s,t)
+//F3 = ilaplace(A(3),s,t)
+F = F1+F2
+disp(F) \ No newline at end of file
diff --git a/22/CH4/EX4.31/ch4ex31.sce b/22/CH4/EX4.31/ch4ex31.sce
new file mode 100755
index 000000000..8f3e02fb2
--- /dev/null
+++ b/22/CH4/EX4.31/ch4ex31.sce
@@ -0,0 +1,19 @@
+//signals and systems
+//Unilateral Laplace Transform:Solving Differential Equation
+//example 4.17
+s= %s;
+syms t;
+// Re s>-1
+[A] = pfss(1/((s+1)*(s+5)));
+F1 = ilaplace(A(1),s,t)
+F2 = ilaplace(A(2),s,t)
+//F3 = ilaplace(A(3),s,t)
+F = F1+F2
+disp(F)
+//-5< Re s <-2
+[B] = pfss(-1/((s+2)*(s+5)));
+G1 = ilaplace(B(1),s,t)
+G2 = ilaplace(B(2),s,t)
+//F3 = ilaplace(A(3),s,t)
+G = G1+G2
+disp(G) \ No newline at end of file
diff --git a/22/CH4/EX4.4/ch4ex4.sce b/22/CH4/EX4.4/ch4ex4.sce
new file mode 100755
index 000000000..1b6a89b4a
--- /dev/null
+++ b/22/CH4/EX4.4/ch4ex4.sce
@@ -0,0 +1,11 @@
+//signals and systems
+//Lapalce Transform x(t) = (t-1)u(t-1)-(t-2)u(t-2)-u(t-4), 0<t<T
+syms t s;
+a = 3;
+T = 1;
+//t = T;
+y1 = laplace('t',t,s);
+y2 = laplace('t',t,s);
+y3 = laplace('1',t,s);
+y=y1*(%e^(-s))+y2*(%e^(-2*s))+y3*(%e^(-4*s))
+disp(y) \ No newline at end of file
diff --git a/22/CH4/EX4.5/ch4ex5.sce b/22/CH4/EX4.5/ch4ex5.sce
new file mode 100755
index 000000000..f4fdc2f01
--- /dev/null
+++ b/22/CH4/EX4.5/ch4ex5.sce
@@ -0,0 +1,17 @@
+//signals and systems
+//example4.5
+// X(S) = s+3+5*exp(-2*s)/(s+1)*(s+2)) Re(s)>-1
+s1 =%s ;
+syms t s;
+[A]=pfss((s1+3)/((s1+1)*(s1+2))); //partial fraction of F(s)
+F1 = ilaplace(A(1),s,t)
+F2 = ilaplace(A(2),s,t)
+//F3 = ilaplace(A(3),s,t)
+Fa = F1+F2;
+disp(Fa,"f1(t)=")
+[B]=pfss((5)/((s1+1)*(s1+2))); //partial fraction of F(s)
+F1 = ilaplace(B(1),s,t)
+F2 = ilaplace(B(2),s,t)
+Fb = (F1+F2)*(%e^(-2*s));
+disp(Fb,"f2(t)=")
+disp(Fa+Fb,"f(t)=") \ No newline at end of file
diff --git a/22/CH4/EX4.8/ch4ex8.sce b/22/CH4/EX4.8/ch4ex8.sce
new file mode 100755
index 000000000..9230c2587
--- /dev/null
+++ b/22/CH4/EX4.8/ch4ex8.sce
@@ -0,0 +1,12 @@
+ //signals and systems
+//Example 4.8
+//Lapalce Transform for convolution
+s=%s
+syms t ;
+a=3;b=2;
+[A]=pfss(1/(s^2-5*s+6)); //partial fraction of F(s)
+F1 = ilaplace(A(1),s,t)
+F2 = ilaplace(A(2),s,t)
+//F3 = ilaplace(A(3),s,t)
+F = F1+F2;
+disp(F,"f(t)=") \ No newline at end of file
diff --git a/22/CH4/EX4.9/ch4ex9.sce b/22/CH4/EX4.9/ch4ex9.sce
new file mode 100755
index 000000000..6f6a695e4
--- /dev/null
+++ b/22/CH4/EX4.9/ch4ex9.sce
@@ -0,0 +1,11 @@
+//Initial and final Value Theorem of Lapalace Transform
+syms s;
+num =poly([30 20],'s','coeff')
+den =poly([0 5 2 1],'s','coeff')
+X = num/den
+disp (X,"X(s)=")
+SX = s*X;
+Initial_Value =limit(SX,s,%inf);
+final_value =limit(SX,s,0);
+disp(Initial_Value,"x(0)=")
+disp(final_value,"x(inf)=") \ No newline at end of file