summaryrefslogtreecommitdiff
path: root/28/CH5
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /28/CH5
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 '28/CH5')
-rwxr-xr-x28/CH5/EX5.2.2/ex5_2_2.sce4
-rwxr-xr-x28/CH5/EX5.2/ex5_2_1.sce20
-rwxr-xr-x28/CH5/EX5.3.2/ex5_3_2.sce20
-rwxr-xr-x28/CH5/EX5.3/ex5_3_1.sce17
-rwxr-xr-x28/CH5/EX5.4.1/ex5_4_1.sce9
-rwxr-xr-x28/CH5/EX5.4.2/ex5_4_2.sce16
-rwxr-xr-x28/CH5/EX5.4.3/ex5_4_3.sce15
-rwxr-xr-x28/CH5/EX5.8/ex5_8.sce15
-rwxr-xr-x28/CH5/EX5.9/ex5_9.sce32
9 files changed, 148 insertions, 0 deletions
diff --git a/28/CH5/EX5.2.2/ex5_2_2.sce b/28/CH5/EX5.2.2/ex5_2_2.sce
new file mode 100755
index 000000000..afef22ace
--- /dev/null
+++ b/28/CH5/EX5.2.2/ex5_2_2.sce
@@ -0,0 +1,4 @@
+// given Qi(s)=0.04/s^2
+Qi=0.04/s^2;
+e=limit(s*Qi*H,s,0)
+disp(e,"Steady stste eror=")
diff --git a/28/CH5/EX5.2/ex5_2_1.sce b/28/CH5/EX5.2/ex5_2_1.sce
new file mode 100755
index 000000000..51822c230
--- /dev/null
+++ b/28/CH5/EX5.2/ex5_2_1.sce
@@ -0,0 +1,20 @@
+s=%s
+syms K J f
+K=60; // given
+J=10; // given
+p=K/J
+q=K/J+(f/J)*s+s^2
+G=p/q;
+disp(G,"Qo(s)/Qi(s)=")
+zeta=0.3; // given
+cof1=coeffs(q,'s',0)
+// on comparing the coefficients
+Wn=sqrt(cof1)
+cof2=coeffs(q,'s',1)
+// 2*zeta*Wn=cof2
+f/J=2*zeta*Wn
+r=s^2+f/J
+s=s^2+f/J+K/J
+H=r/s;
+disp(H,"Qe(s)/Qi(s)=")
+
diff --git a/28/CH5/EX5.3.2/ex5_3_2.sce b/28/CH5/EX5.3.2/ex5_3_2.sce
new file mode 100755
index 000000000..a42da1168
--- /dev/null
+++ b/28/CH5/EX5.3.2/ex5_3_2.sce
@@ -0,0 +1,20 @@
+s=%s;
+syms Kp Ka Kt Kd J f
+// given
+J=0.4;
+Kp=0.6;
+Kt=2;
+f=2;
+Ka=5;
+p=Kp*Ka*Kt
+q=s^2+((f+Ka*Kd*Kt)/J)*s+(Kp*Ka*Kt)/J
+G=p/q;
+disp(G,"Qm(s)/Qr(s)=")
+cof_1=coeffs(q,'s',0)
+// on comparing the coefficients
+Wn=sqrt(cof_1)
+zeta=1 // given
+cof_2=coeffs(q,'s',1)
+// 2*zeta*Wn=cof_2
+Kd=(2*zeta*sqrt(Kp*J*Ka*Kt)-f)/(Ka*Kt)
+disp(Kd,"Tachogenertor constant=")
diff --git a/28/CH5/EX5.3/ex5_3_1.sce b/28/CH5/EX5.3/ex5_3_1.sce
new file mode 100755
index 000000000..82784ffdd
--- /dev/null
+++ b/28/CH5/EX5.3/ex5_3_1.sce
@@ -0,0 +1,17 @@
+s=%s;
+syms Kp Ka Kt J f
+// given
+J=0.4;
+Kp=0.6;
+Kt=2;
+f=2;
+p=Kp*Ka*Kt
+q=s^2+f/J+(Kp*Ka*Kt)/J
+G=p/q;
+disp(G,"Qm(s)/Qr(s)=")
+cof_1=coeffs(q,'s',0)
+// on comparing the coefficients
+// Wn=sqrt(cof_1)
+Wn=10;
+Ka=(Wn)^2*J/(Kp*f)
+disp(Ka,"Amplifier Constant=") \ No newline at end of file
diff --git a/28/CH5/EX5.4.1/ex5_4_1.sce b/28/CH5/EX5.4.1/ex5_4_1.sce
new file mode 100755
index 000000000..b3c1ad3e4
--- /dev/null
+++ b/28/CH5/EX5.4.1/ex5_4_1.sce
@@ -0,0 +1,9 @@
+syms Wn zeta Kv Ess
+s=%s;
+p=poly([8 2 1],'s','coeff'); // characteristic equation
+z=coeff(p);
+Wn=sqrt(z(1,1))
+zeta=z(1,2)/(2*Wn)
+Kv=z(1,1)/z(1,2)
+Ess=1/Kv // Steady state error for unit ramp i/p
+disp(Ess,"Steady state Error=")
diff --git a/28/CH5/EX5.4.2/ex5_4_2.sce b/28/CH5/EX5.4.2/ex5_4_2.sce
new file mode 100755
index 000000000..1e5aa445a
--- /dev/null
+++ b/28/CH5/EX5.4.2/ex5_4_2.sce
@@ -0,0 +1,16 @@
+// with derivative feedback
+// characteristic equation is
+syms a
+s=%s;
+p=s^2+(2+(8*a))*s+8=0
+zeta=0.7 // given
+Wn=2.828;
+cof_1=coeffs(p,'s',1)
+// on comparing 2*zeta*Wn=cof_1
+a=((2*zeta*Wn)-2)/8
+disp(a,"Derivative feedback=")
+cof_2=coeffs(p,'s',0)
+cof_1=2+8*0.245;
+Kv=cof_2/cof_1;
+Ess=1/Kv
+disp(Ess,"Steady state error=") \ No newline at end of file
diff --git a/28/CH5/EX5.4.3/ex5_4_3.sce b/28/CH5/EX5.4.3/ex5_4_3.sce
new file mode 100755
index 000000000..cc7307a9b
--- /dev/null
+++ b/28/CH5/EX5.4.3/ex5_4_3.sce
@@ -0,0 +1,15 @@
+// let the char equation be
+syms Ka
+s=%s;
+p=s^2+(2+(a*Ka))*s+Ka=0
+cof_1=coeffs(p,'s',0)
+// Wn^2=cof_1
+Wn=sqrt(cof_1)
+cof_2=coeffs(p,'s',1)
+// 2*zeta*Wn=cof_2
+Kv=cof_1/cof_2;
+Ess=1/Kv;
+// given Ess=0.25
+Ess=0.25;
+Ka=2/(Ess-a)
+disp(Ka."Ka=") \ No newline at end of file
diff --git a/28/CH5/EX5.8/ex5_8.sce b/28/CH5/EX5.8/ex5_8.sce
new file mode 100755
index 000000000..a75d9fe76
--- /dev/null
+++ b/28/CH5/EX5.8/ex5_8.sce
@@ -0,0 +1,15 @@
+s=%s;
+syms K V
+p=s^2+(100*K)*s+100=0
+cof_1=coeffs(p,'s',0)
+Wn=sqrt(cof_1)
+zeta=1 // given
+cof_2=coeffs(p,'s',1)
+// 2*zeta*Wn=cof_2
+K=(2*Wn*zeta)/100
+// For ramp input
+R=V/s^2
+E=R/p
+// steady state error
+e=limit(s*E(s),s,0)
+disp(e,"e(ss)=") \ No newline at end of file
diff --git a/28/CH5/EX5.9/ex5_9.sce b/28/CH5/EX5.9/ex5_9.sce
new file mode 100755
index 000000000..e591f5a00
--- /dev/null
+++ b/28/CH5/EX5.9/ex5_9.sce
@@ -0,0 +1,32 @@
+s=%s;
+syms t m
+A=[0 1;-100 -20];
+B=[0;100];
+C=[1 0];
+x=[0;0];
+[r c]=size(A)
+p=s*eye(r,c)-A
+q=inv(p);
+disp(q,"phi(s)=") // Resolvant matrix
+for i=1:r;
+for j=1:c;
+q(i,j)=ilaplace(q(i,j),s,t)
+end
+end
+disp(q,"phi(t)=") // State transition matrix
+t=t-m;
+q=eval(q)
+// Integrate q w.r.t m
+r=integrate(q*B,m)
+m=0 // Upper limit is t
+g=eval(r) // Puting upper limit in q
+m=t // Lower limit is 0
+h=eval(r) // Putting lower limit in q
+y=(h-g);
+disp(y,"y=")
+printf("x(t)=phi(t)*x(0)+integrate(phi(t-m*B) w.r.t m from 0 to t)")
+y1=(q*x)+y;
+disp(y1,"x(t)=")
+// transfer function
+t=C*q*B;
+disp(t,"T(s)=")