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 /2096 | |
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 '2096')
171 files changed, 2505 insertions, 0 deletions
diff --git a/2096/CH1/EX1.1.a/ex_1_1_a.sce b/2096/CH1/EX1.1.a/ex_1_1_a.sce new file mode 100755 index 000000000..b6ec688a4 --- /dev/null +++ b/2096/CH1/EX1.1.a/ex_1_1_a.sce @@ -0,0 +1,8 @@ +
+// Example 1.a : static error
+clc, clear
+// given :
+vm=112.68; // voltmeter in volts
+vt=112.6; // voltage in volts
+Es=vm-vt;
+disp(Es,"static error,Es = (V)")
diff --git a/2096/CH1/EX1.1.b/ex_1_1_b.sce b/2096/CH1/EX1.1.b/ex_1_1_b.sce new file mode 100755 index 000000000..b37190342 --- /dev/null +++ b/2096/CH1/EX1.1.b/ex_1_1_b.sce @@ -0,0 +1,9 @@ +
+// Example 1.b : static correction
+clc, clear
+// given :
+vm=112.68; // voltmeter in volts
+vt=112.6; // voltage in volts
+Es=vm-vt;
+Cs=-Es;
+disp(Cs,"static corection,Cs = (V)")
diff --git a/2096/CH1/EX1.10/ex_1_10.sce b/2096/CH1/EX1.10/ex_1_10.sce new file mode 100755 index 000000000..4e6b49f55 --- /dev/null +++ b/2096/CH1/EX1.10/ex_1_10.sce @@ -0,0 +1,12 @@ +//Example 1.10// deflection +clc; +clear; +close; +S1=6.8;//sensivity of the piezoelectric transducer in pC/bar +S2=0.0032;//sensivity of the piezoelectric transducer in V/bar +S3=16;//sensivity of the piezoelectric transducer in mm/V +OS= S1*S2*S3;// overall sensivity in mm/bar +CI=20;//changeb in input pressure +CO=OS*CI;//change in out put signal +DC= CO;//deflection on the chart mm +disp(DC,"deflection on the chart in mm") diff --git a/2096/CH1/EX1.11/ex_1_11.sce b/2096/CH1/EX1.11/ex_1_11.sce new file mode 100755 index 000000000..976cc4904 --- /dev/null +++ b/2096/CH1/EX1.11/ex_1_11.sce @@ -0,0 +1,7 @@ +// Example 1.11. smallest change which can be measured by this transducer
+clc, clear
+// given :
+F=200; // range of force in N
+R=.15/100; // resolution of full scale
+Sc=R*F;
+disp(Sc,"smallest change,Sc = (N)")
diff --git a/2096/CH1/EX1.12/ex_1_12.sce b/2096/CH1/EX1.12/ex_1_12.sce new file mode 100755 index 000000000..2e70a9940 --- /dev/null +++ b/2096/CH1/EX1.12/ex_1_12.sce @@ -0,0 +1,12 @@ +//Example 1.12// resolution
+clc;
+clear;
+close;
+//given data :
+a=50; // uniform scale
+b=50; // full scale reading in volts
+c=1/10;
+O=a/b;
+R=O*c;
+disp(O,"one scale division,O = (v)")
+disp(R,"resolution,R = (v)")
diff --git a/2096/CH1/EX1.13/ex_1_13.sce b/2096/CH1/EX1.13/ex_1_13.sce new file mode 100755 index 000000000..519c3e69f --- /dev/null +++ b/2096/CH1/EX1.13/ex_1_13.sce @@ -0,0 +1,9 @@ +//Example 1.13// resolution
+clc;
+clear;
+close;
+//given data :
+D=1/9999;
+F=9.999;
+R=D*F;
+disp(R*10^3,"resolution,R(mv) = ")
diff --git a/2096/CH1/EX1.14/ex_1_14.sce b/2096/CH1/EX1.14/ex_1_14.sce new file mode 100755 index 000000000..f52bd3d5b --- /dev/null +++ b/2096/CH1/EX1.14/ex_1_14.sce @@ -0,0 +1,13 @@ +
+//Example 1.14// temperature range
+clc;
+clear;
+close;
+//given data :
+a=800; // calibration range in celcius
+b=300; // calibration range in celcius
+c=.11; // percentage of span
+S=a-b;
+D=(.11/100)*500;
+disp(S,"span of pyrometer,S(degree celcius) = ")
+disp(D,"dead zone,D(degree celcius) = ")
diff --git a/2096/CH1/EX1.15.b.i/ex_1_15_b_i.sce b/2096/CH1/EX1.15.b.i/ex_1_15_b_i.sce new file mode 100755 index 000000000..7cf35dc92 --- /dev/null +++ b/2096/CH1/EX1.15.b.i/ex_1_15_b_i.sce @@ -0,0 +1,13 @@ +//Example 1.15.b.i// loading error
+clc;
+clear;
+close;
+//given data :
+Rv=125; // internal resistance in kilo-ohm
+V=180; // in volts
+I=6; // im mili-ampere
+Rt=V/I;
+Ra=Rt;
+Rat=(Rt*Rv)/(Rv-Rt);
+Le=((Rat-Ra)/Rat)*100;
+disp(Le,"percentage loading error,Le(%) = ")
diff --git a/2096/CH1/EX1.15.b.ii/ex_1_15_b_ii.sce b/2096/CH1/EX1.15.b.ii/ex_1_15_b_ii.sce new file mode 100755 index 000000000..13d1247c9 --- /dev/null +++ b/2096/CH1/EX1.15.b.ii/ex_1_15_b_ii.sce @@ -0,0 +1,13 @@ +//Example 1.15.b.ii// loading error
+clc;
+clear;
+close;
+//given data :
+Rv=125; // internal resistance in kilo-ohm
+V=60; // in volts
+I=1.2; // ampere
+Rt=V/I;
+Ra=Rt;
+Rat=((Rt/1000)*Rv)/(Rv-(Rt/1000));
+Le=((Rat-(Ra/1000))/Rat)*100;
+disp(Le,"percentage loading error,Le(%) = ")
diff --git a/2096/CH1/EX1.18.a/ex_1_18_a.sce b/2096/CH1/EX1.18.a/ex_1_18_a.sce new file mode 100755 index 000000000..64305c640 --- /dev/null +++ b/2096/CH1/EX1.18.a/ex_1_18_a.sce @@ -0,0 +1,12 @@ +
+//Example 1.18.a// what will be the reading of the thermometer after 1.2 seconds.
+clc;
+clear;
+close;
+//given data :
+Iin=160; // in celcius
+t1=1.2; // in seconds
+t2=2.2;// in seconds
+I=20; // in celcius
+Io=Iin*(1-(exp(-t1/t2)));
+disp(Io,"thermometer reading,Io(degree celcius) = ")
diff --git a/2096/CH1/EX1.18.b/ex_1_18_b.sce b/2096/CH1/EX1.18.b/ex_1_18_b.sce new file mode 100755 index 000000000..ea3080fac --- /dev/null +++ b/2096/CH1/EX1.18.b/ex_1_18_b.sce @@ -0,0 +1,12 @@ +
+//Example 1.18.b// determine its reading
+clc;
+clear;
+close;
+//given data :
+Iin=160; // in celcius
+t1=1.2; // in seconds
+t2=2.2;// in seconds
+I=20; // in celcius
+Io=Iin+(I-Iin)*exp(-t1/t2);
+disp(Io,"thermometer reading,Io(degree celcius) = ")
diff --git a/2096/CH1/EX1.19/ex_1_19.sce b/2096/CH1/EX1.19/ex_1_19.sce new file mode 100755 index 000000000..66d19053a --- /dev/null +++ b/2096/CH1/EX1.19/ex_1_19.sce @@ -0,0 +1,11 @@ +//Example 1.19.// calculate the temperature indicated
+clc;
+clear;
+close;
+//given data :
+Iin=160; // in celcius
+t1=10; // in seconds
+t2=5;// in seconds
+I=30; // in celcius
+Io=Iin+(I-Iin)*exp(-t1/t2);
+disp(Io,"thermometer reading,Io(celcius) = ")
diff --git a/2096/CH1/EX1.2/ex_1_2.sce b/2096/CH1/EX1.2/ex_1_2.sce new file mode 100755 index 000000000..613e12eb9 --- /dev/null +++ b/2096/CH1/EX1.2/ex_1_2.sce @@ -0,0 +1,8 @@ +
+// Example 2. : true value of temperature
+clc, clear
+// given :
+vm=92.35; // in celcius
+cs=-0.07; // in celcius
+Vt=vm+cs;
+disp(Vt,"true value of temperature Vt = (degree celcius)")
diff --git a/2096/CH1/EX1.20/ex_1_20.sce b/2096/CH1/EX1.20/ex_1_20.sce new file mode 100755 index 000000000..6c672c242 --- /dev/null +++ b/2096/CH1/EX1.20/ex_1_20.sce @@ -0,0 +1,9 @@ +//Example 1.20.// calculate the time taken by the transducer to read half of the temperature difference
+clc;
+clear;
+close;
+//given data :
+t1=3; // in seconds
+I=0.5; // in celcius
+T=(-t1)*(log (I));
+disp(T,"the time taken,T (second) = ")
diff --git a/2096/CH1/EX1.21/ex_1_21.sce b/2096/CH1/EX1.21/ex_1_21.sce new file mode 100755 index 000000000..483ba35f7 --- /dev/null +++ b/2096/CH1/EX1.21/ex_1_21.sce @@ -0,0 +1,13 @@ +//Example 1.21.// resistance
+clc;
+clear;
+close;
+//given data :
+R1=90; // stable resistance
+t1=12; // in seconds
+t2=4.8; // in seconds
+G=.296; // steady stage gain
+T=80; // change of temperature
+R=G*T;
+Rt=R*(1-exp(-t1/t2))+R1;
+disp(Rt,"resistance,Rt(ohm) = ")
diff --git a/2096/CH1/EX1.22.a/ex_1_22_a.sce b/2096/CH1/EX1.22.a/ex_1_22_a.sce new file mode 100755 index 000000000..7eb301d31 --- /dev/null +++ b/2096/CH1/EX1.22.a/ex_1_22_a.sce @@ -0,0 +1,12 @@ +//Example 1.22.a // the time contant for the thermometer
+clc;
+clear;
+close;
+//given data :
+Iin=140; // in celcius
+t1=4; // in seconds
+I=15; // in celcius
+Io=75; // in celcius
+a=(Io-Iin)/(I-Iin);
+t2=-t1/(log(a));
+disp(t2,"time constant in seconds")
diff --git a/2096/CH1/EX1.22.b/ex_1_22_b.sce b/2096/CH1/EX1.22.b/ex_1_22_b.sce new file mode 100755 index 000000000..13b317dc8 --- /dev/null +++ b/2096/CH1/EX1.22.b/ex_1_22_b.sce @@ -0,0 +1,13 @@ +
+//Example 1.22.b// indicated temperature
+clc;
+clear;
+close;
+//given data :
+Iin=140; // in celcius
+t1=5; // in seconds
+t2=1; // in celcius
+I=15; // in celcius
+Io=75; // in celcius
+Io=Iin+(I-Iin)*exp(-t1/t2);
+disp(Io,"thermometer reading,Io(degree celcius) = ")
diff --git a/2096/CH1/EX1.23/ex_1_23.sce b/2096/CH1/EX1.23/ex_1_23.sce new file mode 100755 index 000000000..f27417998 --- /dev/null +++ b/2096/CH1/EX1.23/ex_1_23.sce @@ -0,0 +1,9 @@ +//Example 1.23.// calculate the time constant
+clc;
+clear;
+close;
+//given data :
+Ed=3.9; // dynamic error
+Si=0.2; // slope in celcius/seconds
+T=Ed/Si;
+disp(T,"time constant,T(seconds) = ")
diff --git a/2096/CH1/EX1.24/ex_1_24.sce b/2096/CH1/EX1.24/ex_1_24.sce new file mode 100755 index 000000000..fb3bf02bb --- /dev/null +++ b/2096/CH1/EX1.24/ex_1_24.sce @@ -0,0 +1,15 @@ +//Example 1.24.// calculate the time altitude
+clc;
+clear;
+close;
+//given data :
+h=2500; // height in meter
+t1=8; // in seconds
+a=5; // rate of rise balloon in m/s
+b=30; // temprerature indicated at an altiude of 2500 m in celcius
+c=.011; // rate of temperature variation with altitude in celcius/meter
+y=c*a;
+Ed=y*t1;
+E=Ed/c;
+A=h-E;
+disp(A,"actual altitude,A(meter) = ")
diff --git a/2096/CH1/EX1.25.a/ex_1_25_a.sce b/2096/CH1/EX1.25.a/ex_1_25_a.sce new file mode 100755 index 000000000..ccac6242b --- /dev/null +++ b/2096/CH1/EX1.25.a/ex_1_25_a.sce @@ -0,0 +1,10 @@ +//Example 1.25.a // the ratio of output to input
+clc;
+clear;
+close;
+//given data :
+t1=50; // in seconds
+t2=500; // in seconds
+w=2*%pi/t2;
+I=1/sqrt(1+(w*t1)^2);
+disp(I,"ratio of output to input,I = ")
diff --git a/2096/CH1/EX1.25.b/ex_1_25_b.sce b/2096/CH1/EX1.25.b/ex_1_25_b.sce new file mode 100755 index 000000000..fd85c2040 --- /dev/null +++ b/2096/CH1/EX1.25.b/ex_1_25_b.sce @@ -0,0 +1,11 @@ +//Example 1.25.b // the time lag
+clc;
+clear;
+close;
+//given data :
+t1=50; // in seconds
+t2=500; // in seconds
+w=2*%pi/t2;
+P=atan(w*t1)
+T=(1/w)*P
+disp(T,"the time lag,T(seconds) = ")
diff --git a/2096/CH1/EX1.26.a/ex_1_26_a.sce b/2096/CH1/EX1.26.a/ex_1_26_a.sce new file mode 100755 index 000000000..5a54d9f90 --- /dev/null +++ b/2096/CH1/EX1.26.a/ex_1_26_a.sce @@ -0,0 +1,14 @@ +//Example 1.26.a // the variation in the indicated temerature
+clc;
+clear;
+close;
+//given data :
+Iin=25; // may be +ve or -ve
+t1=20; // in seconds
+t2=4; // in minutes
+f=1/(t2*60); // cycles/sec
+w=2*%pi*f; // rad/sec
+pi=atand(w*t1);
+A=sin(w*t2-pi);
+Io=(Iin/sqrt(1+(w*t1)^2));
+disp(Io,"the variation in the indiacated temperature,Io(degree celcius) = ±")
diff --git a/2096/CH1/EX1.26.b/ex_1_26_b.sce b/2096/CH1/EX1.26.b/ex_1_26_b.sce new file mode 100755 index 000000000..81595e4f9 --- /dev/null +++ b/2096/CH1/EX1.26.b/ex_1_26_b.sce @@ -0,0 +1,13 @@ +//Example 1.26.b // the lag
+clc;
+clear;
+close;
+//given data :
+Iin=25; // may be +ve or -ve
+t1=20; // in seconds
+t2=4; // in minutes
+f=1/(t2*60); // cycles/sec
+w=2*%pi*f; // rad/sec
+pi=atan(w*t1); // in rad
+L=(1/w)*pi
+disp(L,"the lag,L(seconds)= ")
diff --git a/2096/CH1/EX1.27/ex_1_27.sce b/2096/CH1/EX1.27/ex_1_27.sce new file mode 100755 index 000000000..611965388 --- /dev/null +++ b/2096/CH1/EX1.27/ex_1_27.sce @@ -0,0 +1,16 @@ +//Example 1.27 // maximum time constant
+clc;
+clear;
+close;
+//given data :
+f1=90;//cycles per seconds
+f=120; // frequency response in cylcle per second
+w=2*%pi*f; // rad/sec
+I=0.96
+a=(1/I)^2;
+b=sqrt(a)
+t=(b-1)/w;
+tl=atan(2*(%pi)*f1*t);//
+tla=(1/(2*%pi*f1))*tl;// time lag in seconds
+disp(t,"maximum time constant,t(sec) = ")
+disp(tla,"time lag at 90 cycles per seconds in seconds")
diff --git a/2096/CH1/EX1.28.a/ex_1_28_a.sce b/2096/CH1/EX1.28.a/ex_1_28_a.sce new file mode 100755 index 000000000..ec6342ed5 --- /dev/null +++ b/2096/CH1/EX1.28.a/ex_1_28_a.sce @@ -0,0 +1,20 @@ +//Example 1.28.a // maximum and minimum value
+clc;
+clear;
+close;
+//given data :
+Iin=30; // in celcius
+t1=50; // in seconds
+t2=10; // in seconds
+T1=520; // starting range variation of temerature
+T2=580; // range variation of temperature
+T=(T1+T2)/2; // mean value in celcius
+w=2*%pi*(1/t1); // angular frequency of oscillation rad/sec
+a=1/sqrt(1+(w*t2)^2);
+Io=Iin*a;
+Tmax=T+Io;
+Tmin=T-Io;
+disp(Tmax,"maximum temperature,Tmax(celcius) = ")
+disp(Tmin,"minimum temperature,Tmin(celcius) = ")
+
+
diff --git a/2096/CH1/EX1.28.b/ex_1_28_b.sce b/2096/CH1/EX1.28.b/ex_1_28_b.sce new file mode 100755 index 000000000..81015e42d --- /dev/null +++ b/2096/CH1/EX1.28.b/ex_1_28_b.sce @@ -0,0 +1,15 @@ +//Example 1.28.b // phase shift and time
+clc;
+clear;
+close;
+//given data :
+Iin=30; // in celcius
+t1=50; // in seconds
+t2=10; // in seconds
+T1=520; // starting range variation of temerature
+T2=580; // range variation of temperature
+T=(T1+T2)/2; // mean value in celcius
+w=2*%pi*(1/t1); // angular frequency of oscillation rad/sec
+pi=atan(w*t2);
+L=(1/w)*pi;
+disp(L,"the time lag,L(seconds) = ")
diff --git a/2096/CH1/EX1.29/ex_1_29.sce b/2096/CH1/EX1.29/ex_1_29.sce new file mode 100755 index 000000000..f67aaa427 --- /dev/null +++ b/2096/CH1/EX1.29/ex_1_29.sce @@ -0,0 +1,13 @@ +//Example 1.29 // output
+clc;
+clear;
+close;
+//given data :
+Iin=0.35; // sinusoidl input relation
+t=0.3; // sec
+w=25; // rad/sec
+a=1/sqrt(1+(w*t)^2);
+Io=Iin*a;
+pi=atand(w*t);
+disp(pi,"the phase shift,pi(celcius)")
+disp("the output expression,Io = 0.0462sin(25t-82.4)")
diff --git a/2096/CH1/EX1.3.a/ex_1_3_a.sce b/2096/CH1/EX1.3.a/ex_1_3_a.sce new file mode 100755 index 000000000..c075b11e1 --- /dev/null +++ b/2096/CH1/EX1.3.a/ex_1_3_a.sce @@ -0,0 +1,10 @@ +
+// Example 1.3.a : absolute error and correction
+clc, clear
+// given :
+vm=2.65; // in volts
+vt=2.70; // in volts
+Es=vm-vt;
+Cs=-Es;
+disp(Es,"absolute error,Es = (V)")
+disp(Cs,"correction,Cs = (V)")
diff --git a/2096/CH1/EX1.3.b/ex_1_3_b.sce b/2096/CH1/EX1.3.b/ex_1_3_b.sce new file mode 100755 index 000000000..f10e2ca23 --- /dev/null +++ b/2096/CH1/EX1.3.b/ex_1_3_b.sce @@ -0,0 +1,12 @@ +
+// Example 1.3.b : relative error
+clc, clear
+// given :
+vm=2.65; // in volts
+vt=2.70; // in volts
+v=5;// full scale range of voltage
+Es=vm-vt;
+Er1=Es/vt;
+Er2=Es/v;
+disp("relative error as a function of true value is "+string(Er1)+" or "+string(100*Er1)+" %")
+disp("relative error as a function of full scale deflection is "+string(Er2)+" or "+string(100*Er2)+" %")
diff --git a/2096/CH1/EX1.30.a/ex_1_30_a.sce b/2096/CH1/EX1.30.a/ex_1_30_a.sce new file mode 100755 index 000000000..65c580525 --- /dev/null +++ b/2096/CH1/EX1.30.a/ex_1_30_a.sce @@ -0,0 +1,15 @@ +//Example 1.30.a // determine the maximum value of temperature
+clc;
+clear;
+close;
+//given data :
+T=20; // rate change of temperature may be +ve or -ve in celcius
+t=120; // in seconds
+t1=18; // time constant for the bulb in seconds
+t2=36; // time constant for the well in seconds
+w=2*%pi*(1/t);
+a=1/sqrt(1+(w*t1)^2);
+b=1/sqrt(1+(w*t2)^2);
+I=a*b;
+Tmax=T*I;
+disp(Tmax,"the maximum indicated temperature,Tmax(celcius) = ±")
diff --git a/2096/CH1/EX1.30.b/ex_1_30_b.sce b/2096/CH1/EX1.30.b/ex_1_30_b.sce new file mode 100755 index 000000000..522d9de48 --- /dev/null +++ b/2096/CH1/EX1.30.b/ex_1_30_b.sce @@ -0,0 +1,13 @@ +//Example 1.30.b // determine the maximum value of temperature
+clc;
+clear;
+close;
+//given data :
+T=20; // rate change of temperature may be +ve or -ve in celcius
+t=120; // in seconds
+t1=18; // time constant for the bulb in seconds
+t2=36; // time constant for the well in seconds
+w=2*%pi*(1/t);
+A=atan(w*t1)+atan(w*t2); // angle of lag
+L=(1/w)*A;
+disp(L,"the time lag,L(seconds) = ")
diff --git a/2096/CH1/EX1.31/ex_1_31.sce b/2096/CH1/EX1.31/ex_1_31.sce new file mode 100755 index 000000000..7b4598232 --- /dev/null +++ b/2096/CH1/EX1.31/ex_1_31.sce @@ -0,0 +1,9 @@ +//Example 1.31// output +clc; +clear; +close; +t=1;//assume +I1= 2*sin(2*t)+0.5*sin(10*t);// input current equation +t1=0.3;//time constant in seconds +Io= ((sin(2*t)- atan(2*t1))/(sqrt(1+(2*t1)^2)))+ ((sin(10*t)- atan(10*t1))/(sqrt(1+(10*t1)^2)));//output current equation +disp(" output current equation is 0.857sin(2t-30.96)+0.316sin(10t-71.56)") diff --git a/2096/CH1/EX1.32/ex_1_32.sce b/2096/CH1/EX1.32/ex_1_32.sce new file mode 100755 index 000000000..62571dd3c --- /dev/null +++ b/2096/CH1/EX1.32/ex_1_32.sce @@ -0,0 +1,20 @@ +//Example 1.32// expression of output +clc; +clear; +close; +//I1=2*sin(2*t)+0.2*cos(8*t);// +//I1=2*sin(2*t)-0.2*sin(8*t+%pi);// +w=2;// +t=0.15;//secomds +r=1/(sqrt(1+(w*t)^2));// +mo=w*r;//magnitude +pf=atand(w*t);//degree +//Io=mo*sin(2*t-16.7);//output +x=0.2 +w1=8;// +t=0.15;//secomds +r1=1/(sqrt(1+(w1*t)^2));// +mo1=x*r;//magnitude +pf1=atand(w1*t);//degree +//Io=mo1*sin(8*t+%pi-50.19);//output +disp("Overall output is 1.956sin(2t-16.7)-0.128sin(8t+%pi-50.19)") diff --git a/2096/CH1/EX1.34.b/ex_1_34_b.sce b/2096/CH1/EX1.34.b/ex_1_34_b.sce new file mode 100755 index 000000000..f9c1ccc84 --- /dev/null +++ b/2096/CH1/EX1.34.b/ex_1_34_b.sce @@ -0,0 +1,9 @@ +//Example 1.34.b// percentage reduction in mass +clc; +clear; +close; +m=4.5;//mass in grams +PM=1.15;//percentage increase in mass +m2= m/(PM^2);//new mass +PCM= (m-m2)/(m);//PERCENTAGE CHANGE IN MASS +disp(PCM*100,"percentage change in mass is") diff --git a/2096/CH1/EX1.35.a/ex_1_35.sce b/2096/CH1/EX1.35.a/ex_1_35.sce new file mode 100755 index 000000000..44118a263 --- /dev/null +++ b/2096/CH1/EX1.35.a/ex_1_35.sce @@ -0,0 +1,13 @@ +//Example 1.35// damping ration,damped natural frequency ,static sensivity and time constant +clc; +clear; +close; +k=1;//static sensivity +wn=sqrt(30);//natural frequency in rad/s +y=(0.1*wn)/2;//damping ratio +wd=wn*sqrt(1-y^2);//damped natural frequency in rad/s +t=(1/wn);//time constant in seconds +disp(y,"damping ratio is") +disp(wd,"damped natural frequency in rad/s is") +disp(k,"static sensivity is") +disp(t,"time constant in seconds is") diff --git a/2096/CH1/EX1.36/ex_1_36.sce b/2096/CH1/EX1.36/ex_1_36.sce new file mode 100755 index 000000000..5d6f09011 --- /dev/null +++ b/2096/CH1/EX1.36/ex_1_36.sce @@ -0,0 +1,16 @@ +//Example 1.36// damping ration,damped natural frequency ,natural frequency and time constant +clc; +clear; +close; +q=1.22;//in Nm/rad +j=0.14;//in kg meter square +w=1.95;//frequency in rad/s +wn=sqrt(q/j);//natural frequency in rad/s +y=(w/wn);//damping ratio +y1=0.555;//damping ratio corresponding to maximum possible error of 8% +wd=wn*sqrt(1-y1^2);//damped natural frequency in rad/s +t=(1/wn);//time constant in seconds +disp(wn,"natural frequency in rad/s") +disp(y1,"damping ratio is") +disp(wd,"damped natural frequency in rad/s is") +disp(t,"time constant in seconds is") diff --git a/2096/CH1/EX1.37/ex_1_37.sce b/2096/CH1/EX1.37/ex_1_37.sce new file mode 100755 index 000000000..5d6f54544 --- /dev/null +++ b/2096/CH1/EX1.37/ex_1_37.sce @@ -0,0 +1,12 @@ + +//Example 1.37:// damping ratio and undamped natural frequency +clc; +clear; +PO=12;//percentage overshhot +Rt=0.22;//rise time in seconds +y=0.56;//damping ration +wd=(%pi/Rt);//damped natural frequency +wn=(wd/(sqrt(1-y^2)));// +fn=(wn/(2*%pi));//undamped natural frequency in Hz +disp(y,"damping ratio is") +disp(fn,"undamped natural frequency in Hz is") diff --git a/2096/CH1/EX1.38/ex_1_38.sce b/2096/CH1/EX1.38/ex_1_38.sce new file mode 100755 index 000000000..b1d2cc131 --- /dev/null +++ b/2096/CH1/EX1.38/ex_1_38.sce @@ -0,0 +1,10 @@ +//Example 1.38:// percentage error +clc; +clear; +fn=5;// natural frequency in kHz +f=7;//excitation frequency in kHz +r=f/fn;//ratio +y=0.62;//damping ratio +M= (1/(sqrt((1-r^2)^2+(2*y*r)^2)));//amplitude ratio +E=(1-M)*100;//error due to proximity of excitation frequency with the natural frequency of the system +disp(E,"percentage error due to proximity of excitation frequency with the natural frequency of the system ") diff --git a/2096/CH1/EX1.39/ex_1_39.sce b/2096/CH1/EX1.39/ex_1_39.sce new file mode 100755 index 000000000..b0cc05ef2 --- /dev/null +++ b/2096/CH1/EX1.39/ex_1_39.sce @@ -0,0 +1,13 @@ +//Example 1.39://frequency range +clc; +clear; +fn=800;// natural frequency in cps +MD=12;//maximum amount of deviation in amplitude ratio +M1=1.12;// +M2=0.88 +r=0.904;//ratio +y=0.62;//damping ratio +f=fn*r;//excitation frequency in cps +//When M=1.12 THE SOLUTION WILL HAVE IMAGINARY ROOTS AND THIS IMLIES THE OUTPUT WOULD NEVER BE 1.12 TIMES THE OUTPUT FOR ANY FREQUENCY +disp(f,"excitation frequency in cps") +//the deviation remains with in 12 percent of output for the frequency range 0-723cps diff --git a/2096/CH1/EX1.4.a/ex_1_4_a.sce b/2096/CH1/EX1.4.a/ex_1_4_a.sce new file mode 100755 index 000000000..9974cc40d --- /dev/null +++ b/2096/CH1/EX1.4.a/ex_1_4_a.sce @@ -0,0 +1,7 @@ +// Example 1.4.a :static error
+clc, clear
+// given :
+vm=42; // pressure in bar
+vt=41.4; // pressure in bar
+Es=vm-vt;
+disp(Es,"static error,Es = (bar)")
diff --git a/2096/CH1/EX1.4.b/ex_1_4_b.sce b/2096/CH1/EX1.4.b/ex_1_4_b.sce new file mode 100755 index 000000000..c976f9543 --- /dev/null +++ b/2096/CH1/EX1.4.b/ex_1_4_b.sce @@ -0,0 +1,9 @@ +
+// Example 1.4.b :correction
+clc, clear
+// given :
+vm=42; // pressure in bar
+vt=41.4; // pressure in bar
+Es=vm-vt;
+Cs=-Es;
+disp(Cs,"static corrction,Cs = (bar)")
diff --git a/2096/CH1/EX1.4.c/ex_1_4_c.sce b/2096/CH1/EX1.4.c/ex_1_4_c.sce new file mode 100755 index 000000000..f4946d87c --- /dev/null +++ b/2096/CH1/EX1.4.c/ex_1_4_c.sce @@ -0,0 +1,9 @@ +
+// Example 1.4.c :relative error
+clc, clear
+// given :
+vm=42; // pressure in bar
+vt=41.4; // pressure in bar
+Es=vm-vt;
+Er=Es/vt;
+disp("relative error is "+string(Er)+" or "+string(100*Er)+" %")
diff --git a/2096/CH1/EX1.40/ex_1_40.sce b/2096/CH1/EX1.40/ex_1_40.sce new file mode 100755 index 000000000..e16de9ecd --- /dev/null +++ b/2096/CH1/EX1.40/ex_1_40.sce @@ -0,0 +1,14 @@ +//Example 1.40://output amlitude,output frequency and phase lag +clc; +clear; +f=0.6;//frequency in hertz +w=2*%pi*f;//frequency in rad/s +t=1;// +I1=sin(w*t);//current +r= ((8/((%i*w)^2+(4*%i*w)+20)));//ratio of out put current to input current +rm=sqrt(0.724^2+1.885^2);//magnitude +rp=atand(1.885/0.724);//pahse lag +Mo= 1/rm;//magnitude of output +disp(w,"output frequency in rad/s") +disp(Mo,"magnitude of amplitude is") +disp(rp,"pahse lag in degree is") diff --git a/2096/CH1/EX1.41/ex_1_41.sce b/2096/CH1/EX1.41/ex_1_41.sce new file mode 100755 index 000000000..182f70a3a --- /dev/null +++ b/2096/CH1/EX1.41/ex_1_41.sce @@ -0,0 +1,15 @@ +//Example 1.41 // range +clc; +clear; +close; +//given data : +w=500; // in watt +E=1.5; // may be +ve or -ve in % +Qs=50; // in watt +Le=(E/100)*w; // may be +ve or -ve +Er=(Le/Qs)*100; +Me=(E/100)*Qs; // may be +ve or -ve +w1=Qs-Me; +w2=Qs+Me; +disp(w1,"strating range,w1(watt) = ") +disp(w2,"last range,w2(watt) = ") diff --git a/2096/CH1/EX1.42/ex_1_42.sce b/2096/CH1/EX1.42/ex_1_42.sce new file mode 100755 index 000000000..a64466e53 --- /dev/null +++ b/2096/CH1/EX1.42/ex_1_42.sce @@ -0,0 +1,10 @@ +//Example 1.42://limitting error +clc; +clear; +Er= 3;//full scale reading +Qs=2.5*10^-6;//full scale reading +Fm=1.25*10^-3;//flow measured by the meter in meter cuber per seconds +dQs= Er*Qs;//magnitude limiting errr +Er1= dQs/Qs;//relative error at flow +PEr= dQs/(Fm*10^-3);//percentage limiting error +disp(PEr," peercentage limiting error in percentage in ±") diff --git a/2096/CH1/EX1.43/ex_1_43.sce b/2096/CH1/EX1.43/ex_1_43.sce new file mode 100755 index 000000000..86caf735b --- /dev/null +++ b/2096/CH1/EX1.43/ex_1_43.sce @@ -0,0 +1,16 @@ + +//Example 1.43://limitting values and limiting error +clc; +clear; +R1=25;//in ohms +ER1=4;//percentage error +R2=65;//in ohms +ER2=4;//percentage error +R3=45;//in ohms +ER3=4;//percentage error +er= (ER1/100)*(R1+R2+R3);//magnitude of resultant resistance limiting error +r= (R1+R2+R3);//magnitude of resultant resistance +lr= (er/r)*100;//limiting error +disp(r,"magnitude of resultant resistance in ohms") +disp(er,"resultane error in percentage is ±") +disp(lr," percentage limiting error in percentage is ±") diff --git a/2096/CH1/EX1.44/ex_1_44.sce b/2096/CH1/EX1.44/ex_1_44.sce new file mode 100755 index 000000000..914e19884 --- /dev/null +++ b/2096/CH1/EX1.44/ex_1_44.sce @@ -0,0 +1,7 @@ +//Example 1.44://limiting error
+clc;
+clear;
+lp=1.2;//limiting error in the measurement of power
+ll=0.8;//limiting error in the measurement of current
+lr=lp+2*ll;//limting error in meaurement of resistance
+disp(lr," peercentage limiting error in percentage is ±")
diff --git a/2096/CH1/EX1.45/ex_1_45.sce b/2096/CH1/EX1.45/ex_1_45.sce new file mode 100755 index 000000000..a2dbf3301 --- /dev/null +++ b/2096/CH1/EX1.45/ex_1_45.sce @@ -0,0 +1,17 @@ +//Example 1.45://resistance and limiting error +clc; +clear; +R1=50;//in ohms +ER1=0.5;//percentage error +R2=500;//in ohms +ER2=0.5;//percentage error +R3=440;//in ohms +ER3=0.5;//percentage error +R4= (R2*R3)/R1;//unknown resistance in ohms +dR4=(ER1+ER2+ER3);//relative limiting error in unknown resistance +lr= (dR4*R4)/100;//limiting error in ohms +R41= R4+lr;// +R42=R4-lr;// +disp(R41,"VALUE OF RESISTANCE IN OHMS") +disp(R42,"VALUE OF RESISTANCE IN OHMS") +disp(lr," limiting error in OHMS is ±") diff --git a/2096/CH1/EX1.46/ex_1_46.sce b/2096/CH1/EX1.46/ex_1_46.sce new file mode 100755 index 000000000..238146191 --- /dev/null +++ b/2096/CH1/EX1.46/ex_1_46.sce @@ -0,0 +1,19 @@ +//Example 1.46://limiting error +clc; +clear; +dE=0.2;//erroe in modulus of elesticity +d1=0.01;//change in width +b=4.5;//width +dB=d1/b;//error in width +d2=0.01;//change in width +D=0.9;//width +dD=d2/D;//error in width +d3=0.01;//change in beam +L=45;//BEAM +dL=d3/L;//error in beam +d4=0.1;//change in deflection +y=1.8;//deflectrion +dy=d2/D;//error in deflection +lr= (dE+dB+3*dD+3*dL+dy);//percentage limiting error +disp(lr," peercentage limiting error in percentage is ±") +// answer is wrong in the textbook diff --git a/2096/CH1/EX1.47/ex_1_47.sce b/2096/CH1/EX1.47/ex_1_47.sce new file mode 100755 index 000000000..abea2f47a --- /dev/null +++ b/2096/CH1/EX1.47/ex_1_47.sce @@ -0,0 +1,15 @@ +//Example 1.47://magnitude and limiting error +clc; +clear; +F=4.26;//in KG +EF1=0.02;//percentage error +L=382;//in MM +EL2=1.2;//percentage error +R=1192;//in ohms +ER=1;//percentage error +T=60;//in seconds +Et=0.50;//percentage error +P= ((2*%pi*9.81*F*L*R)/(T*10^6));//power in kW +lr=((EF1/F)+(EL2/L)+(ER/R)+(Et/T))*P//limiting error in WATTS +disp(P,"magnitude of power in watts") +disp(lr," limiting error in watts is ±") diff --git a/2096/CH1/EX1.48.b/ex_1_48_b.sce b/2096/CH1/EX1.48.b/ex_1_48_b.sce new file mode 100755 index 000000000..126eddcf0 --- /dev/null +++ b/2096/CH1/EX1.48.b/ex_1_48_b.sce @@ -0,0 +1,8 @@ +//Example 1.48.b://true power is a percentage of the power
+clc;
+clear;
+dI=(-0.011);//ERROR IN CURRENT MEASUREMENT
+dR=0.0025;//ERROR IN RESISTANCE
+dP= 2*dI+dR;//total relative error
+RP= (1/(1+dP));//true power as a percentage of orignal power
+disp(RP*100,"true power as a percentage of orignal power")
diff --git a/2096/CH1/EX1.49/ex_1_49.sce b/2096/CH1/EX1.49/ex_1_49.sce new file mode 100755 index 000000000..2632e3658 --- /dev/null +++ b/2096/CH1/EX1.49/ex_1_49.sce @@ -0,0 +1,16 @@ +//Example 1.49://ARITHEMATIC MEAN,AVERAGE DEVIATION ,STANDARD DEVIATION AND VARAIANCE +clc; +clear; +q=[1.34,1.38,1.56,1.47,1.42,1.44,1.53,1.48,1.40,1.59];//length in mm +AM= mean(q);//arithematic mean in mm +for i= 1:10 + qb(i)= q(i)-AM; +end +Q= [qb(1),qb(2),qb(3),qb(4),qb(5),qb(6),qb(7),qb(8),qb(9),qb(10)];// +AV=(-qb(1)-qb(2)+qb(3)+qb(4)-qb(5)-qb(6)+qb(7)+qb(8)-qb(9)+qb(10))/10;// +SD=st_deviation(Q);//standard deviation +V=SD^2;//variance +disp(AM,"arithematic mean in mm") +disp(AV,"average deviation") +disp(SD,"standard deviation in mm") +disp(V,"variance in mm square") diff --git a/2096/CH1/EX1.5.a/ex_1_5_a.sce b/2096/CH1/EX1.5.a/ex_1_5_a.sce new file mode 100755 index 000000000..34ce801a4 --- /dev/null +++ b/2096/CH1/EX1.5.a/ex_1_5_a.sce @@ -0,0 +1,9 @@ +//Example 1.5.a // the percentage error on the basis of maximum scale value
+clc;
+clear;
+close;
+//given data :
+P=50; // pressure range in bar
+E=0.15; // may be +ve or -ve in bar
+Pe=(E/P)*100;
+disp(Pe,"the percentage error,Pe(%)= ±");
diff --git a/2096/CH1/EX1.5.b/ex_1_5_b.sce b/2096/CH1/EX1.5.b/ex_1_5_b.sce new file mode 100755 index 000000000..1727d675a --- /dev/null +++ b/2096/CH1/EX1.5.b/ex_1_5_b.sce @@ -0,0 +1,9 @@ +//Example 1.5.b // the percentage error on the basis of indicated value of 10 bar pressure
+clc;
+clear;
+close;
+//given data :
+P=10; // pressure range in bar
+E=0.15; // may be +ve or -ve in bar
+Pe=(E/P)*100;
+disp(Pe,"the percentage error,Pe(%)= ±");
diff --git a/2096/CH1/EX1.50.a/ex_1_50_a.sce b/2096/CH1/EX1.50.a/ex_1_50_a.sce new file mode 100755 index 000000000..44ec6eb3e --- /dev/null +++ b/2096/CH1/EX1.50.a/ex_1_50_a.sce @@ -0,0 +1,16 @@ +//Example 1.50.a // arithmetic deviation
+clc;
+clear;
+close;
+//given data :
+n=8;
+a=412;
+b=428;
+c=423;
+d=415;
+e=426;
+f=411;
+g=423;
+h=416;
+q=(a+b+c+d+e+f+g+h)/n;
+disp(q,"the arithmetic mean,q(kHz) = ")
diff --git a/2096/CH1/EX1.50.b/ex_1_50_b.sce b/2096/CH1/EX1.50.b/ex_1_50_b.sce new file mode 100755 index 000000000..07a9832e6 --- /dev/null +++ b/2096/CH1/EX1.50.b/ex_1_50_b.sce @@ -0,0 +1,25 @@ +//Example 1.50.b // average deviation
+clc;
+clear;
+close;
+//given data :
+n=8;
+a=412;
+b=428;
+c=423;
+d=415;
+e=426;
+f=411;
+g=423;
+h=416;
+q=(a+b+c+d+e+f+g+h)/n;
+d1=a-q;
+d2=b-q;
+d3=c-q;
+d4=d-q;
+d5=e-q;
+d6=f-q;
+d7=g-q;
+d8=h-q;
+d=(abs(d1)+abs(d2)+abs(d3)+abs(d4)+abs(d5)+abs(d6)+abs(d7)+abs(d8))/n;
+disp(d,"the average deviation,d(kHz) = ")
diff --git a/2096/CH1/EX1.50.c/ex_1_50_c.sce b/2096/CH1/EX1.50.c/ex_1_50_c.sce new file mode 100755 index 000000000..010decbb0 --- /dev/null +++ b/2096/CH1/EX1.50.c/ex_1_50_c.sce @@ -0,0 +1,26 @@ +//Example 1.50.c // standard deviation
+clc;
+clear;
+close;
+//given data :
+n=8;
+a=412;
+b=428;
+c=423;
+d=415;
+e=426;
+f=411;
+g=423;
+h=416;
+q=(a+b+c+d+e+f+g+h)/n;
+d1=a-q;
+d2=b-q;
+d3=c-q;
+d4=d-q;
+d5=e-q;
+d6=f-q;
+d7=g-q;
+d8=h-q;
+d=(abs(d1)+abs(d2)+abs(d3)+abs(d4)+abs(d5)+abs(d6)+abs(d7)+abs(d8))/n;
+s=sqrt(((d1^2)+(d2^2)+(d3^2)+(d4^2)+(d5^2)+(d6^2)+(d7^2)+(d8^2))/(n-1));
+disp(s,"the standard deviation(kHz) = ")
diff --git a/2096/CH1/EX1.50.d/ex_1_50_d.sce b/2096/CH1/EX1.50.d/ex_1_50_d.sce new file mode 100755 index 000000000..57aaad731 --- /dev/null +++ b/2096/CH1/EX1.50.d/ex_1_50_d.sce @@ -0,0 +1,27 @@ +//Example 1.50.d // variance
+clc;
+clear;
+close;
+//given data :
+n=8;
+a=412;
+b=428;
+c=423;
+d=415;
+e=426;
+f=411;
+g=423;
+h=416;
+q=(a+b+c+d+e+f+g+h)/n;
+d1=a-q;
+d2=b-q;
+d3=c-q;
+d4=d-q;
+d5=e-q;
+d6=f-q;
+d7=g-q;
+d8=h-q;
+d=(abs(d1)+abs(d2)+abs(d3)+abs(d4)+abs(d5)+abs(d6)+abs(d7)+abs(d8))/n;
+s=sqrt(((d1^2)+(d2^2)+(d3^2)+(d4^2)+(d5^2)+(d6^2)+(d7^2)+(d8^2))/(n-1));
+V=s^2;
+disp(V,"the variance,V (kHz)^2 = ")
diff --git a/2096/CH1/EX1.51/ex_1_51.sce b/2096/CH1/EX1.51/ex_1_51.sce new file mode 100755 index 000000000..e48271853 --- /dev/null +++ b/2096/CH1/EX1.51/ex_1_51.sce @@ -0,0 +1,38 @@ +
+//Example 1.50.d // variance
+clc;
+clear;
+close;
+//given data :
+n=10;
+a=39.6;
+b=39.9;
+c=39.7;
+d=39.9;
+e=40;
+f=39.8;
+g=39.9;
+h=39.8;
+i=40.4;
+j=39.7;
+q=(a+b+c+d+e+f+g+h+i+j)/n;
+d1=a-q;
+d2=b-q;
+d3=c-q;
+d4=d-q;
+d5=e-q;
+d6=f-q;
+d7=g-q;
+d8=h-q;
+d9=i-q;
+d10=j-q;
+d=(abs(d1)+abs(d2)+abs(d3)+abs(d4)+abs(d5)+abs(d6)+abs(d7)+abs(d8)+abs(d9)+abs(d10))/n;
+s=sqrt(((d1^2)+(d2^2)+(d3^2)+(d4^2)+(d5^2)+(d6^2)+(d7^2)+(d8^2)+(d9^2)+(d10^2))/(n-1));
+r1=0.6745*s;
+rm=r1/sqrt(n-1);
+R=i-a;
+disp(q,"the arithmetic mean,q(degree celcius) = ")
+disp(s,"the standard deviation(degree celcius) = ")
+disp(r1,"probable error of one reading,r1(degree celcius) = ")
+disp(rm,"probable error of mean,rm(degree celcius) = ")
+disp(R,"range,R(degree celcius) = ")
diff --git a/2096/CH1/EX1.52/ex_1_52.sce b/2096/CH1/EX1.52/ex_1_52.sce new file mode 100755 index 000000000..eb4bc398b --- /dev/null +++ b/2096/CH1/EX1.52/ex_1_52.sce @@ -0,0 +1,26 @@ +
+//Example 1.52://ARITHEMATIC MEAN,AVERAGE DEVIATION ,STANDARD DEVIATION AND VARAIANCE
+clc;
+clear;
+T=[197,198,199,200,201,202,203,204,205];//temperature in degree celsius
+f=[2,4,10,24,36,14,5,3,2];//frequency of occurence
+q=[T(1)*f(1),T(2)*f(2),T(3)*f(3),T(4)*f(4),T(5)*f(5),T(6)*f(6),T(7)*f(7),T(8)*f(8),T(9)*f(9)];//
+AM=(q(1)+q(2)+q(3)+q(4)+q(5)+q(6)+q(7)+q(8)+q(9))/100;//arithematic mean in mm
+for i= 1:9
+ qb(i)= T(i)-AM;
+end
+Q= [qb(1),qb(2),qb(3),qb(4),qb(5),qb(6),qb(7),qb(8),qb(9)];//
+AV=(-qb(1)*f(1)-qb(2)*f(2)-qb(3)*f(3)-qb(4)*f(4)+qb(5)*f(5)+qb(6)*f(6)+qb(7)*f(7)+qb(8)*f(8)+qb(9)*f(9))/100;//
+SD=sqrt(219.72/100);//standard deviation
+V=SD^2;//variance
+r1= 0.6745*SD;//PROBABLE ERROR OF ONE READING
+rm= r1/(sqrt(100));//probable error of the mean
+SGm= SD/10;//standard deviation of the mean
+SDg= SGm/(sqrt(2));//standard deviation of the standard deviation
+disp(AM,"arithematic mean in degreebcelsius")
+disp(AV,"average deviation in degree celsius")
+disp(SD,"standard deviation in degree celsius")
+disp(V,"variance in degree celsius square")
+disp(r1,"probable error of the one reading degree celsius")
+disp(rm,"probable error of the mean in degree celsius")
+disp(SDg,"standard deviation of the standard deviation")
diff --git a/2096/CH1/EX1.53/ex_1_53.sce b/2096/CH1/EX1.53/ex_1_53.sce new file mode 100755 index 000000000..df7f2c9de --- /dev/null +++ b/2096/CH1/EX1.53/ex_1_53.sce @@ -0,0 +1,11 @@ +//Example 1.53://STANDARD DEVIATION OF THE METER AND PROBABLITY OF ERROR +clc; +clear; +x=0.8;//in ampere +y=0.5248;// +SD=x/y;//standard deviation +x1=1.2;//in ampere +y1=x1/SD;//probability of error +disp(SD,"standard deviation is") +disp(2*0.2842*100,"probablity of an error for 1.2A in percentage is") +//thus 57% of the readings are with in 1.2A OF THE TRUE VALUE diff --git a/2096/CH1/EX1.54/ex_1_54.sce b/2096/CH1/EX1.54/ex_1_54.sce new file mode 100755 index 000000000..e21379b65 --- /dev/null +++ b/2096/CH1/EX1.54/ex_1_54.sce @@ -0,0 +1,11 @@ +//Example 1.54://readings +clc; +clear; +x=25-21.9;//in mm +r=2.1;//probable error +SD=r/0.6745;//standard deviation +y=x/SD;//ratio +NR=2*0.3413*100;//no. of readings having deviation with in 3.1mm +NR1=100-NR;//no. of readings EXCEEDING deviation OF 3.1mm +nor= round(NR1/2);// noumber of readings having deviation of 3.1mm +disp(nor,"number of readings having deviation of 3.1mm") diff --git a/2096/CH1/EX1.55/ex_1_55.sce b/2096/CH1/EX1.55/ex_1_55.sce new file mode 100755 index 000000000..c9f92978b --- /dev/null +++ b/2096/CH1/EX1.55/ex_1_55.sce @@ -0,0 +1,11 @@ +//Example 1.55://NUMBER OF RODS +clc; +clear; +a=5000-1000;//NO. OF RODS WHERE LENGTH LIES BETWEEN 20MM AND 20.25MM +PY=0.4;//PROBABLITY THAT ROBABILITY THAT 4000 RODS HAVE A VLUE GREATER THAN 20MM AND LESS THAN 20.25MM +SD=(20.25-20)/1.3;//standard deviation +y=(20-19.25)/SD;// +PY1=0.4953;//ROBABILITY THAT 4000 RODS HAVE A VLUE GREATER THAN 20MM AND LESS THAN 20.25MM +NR=10000*PY1//NO. OF RODS WHERE LENGTH LIES BETWEEN 19.25MM AND 20MM +tr=NR+a;//total number of rods whose length lie betweem specified limits of 19.5mm and 20.25mm +disp(tr,"total number of rods whose length lie betweem specified limits of 19.5mm and 20.25mm") diff --git a/2096/CH1/EX1.56/ex_1_56.sce b/2096/CH1/EX1.56/ex_1_56.sce new file mode 100755 index 000000000..5ef622ef4 --- /dev/null +++ b/2096/CH1/EX1.56/ex_1_56.sce @@ -0,0 +1,12 @@ +//Example 1.56://probability error and readings +clc; +clear; +d=15;//deviation in r.p.m +h=0.04;//precision index +SD=(1/(sqrt(h)));//standard deviation +y=d/SD;// +py=0.3015;//probablity +pr= 2*py;//probablity of an error +r=0.6*20;//no. of readings lie between 1485 to 1515 r.p.m +disp(pr,"probability of an error ±15 rpm is,=") +disp(r,"no. of readings lie between 1485 to 1515 r.p.m") diff --git a/2096/CH1/EX1.57/ex_1_57.sce b/2096/CH1/EX1.57/ex_1_57.sce new file mode 100755 index 000000000..5eade71f8 --- /dev/null +++ b/2096/CH1/EX1.57/ex_1_57.sce @@ -0,0 +1,11 @@ +//Example 1.57://prescribed range +clc; +clear; +p1=(40-10)/40;//probablity of falling in particular range +py=p1/2;//probablity +h=9;//precision index +SD=(1/(sqrt(h)));//standard deviation +y=1.15;// +d= y*SD;//deviation +disp(d,"standard deviation is") +disp("75% of the depth measurement lie wtih the range of (15±0.0904)cm") diff --git a/2096/CH1/EX1.58/ex_1_58.sce b/2096/CH1/EX1.58/ex_1_58.sce new file mode 100755 index 000000000..dbf958faf --- /dev/null +++ b/2096/CH1/EX1.58/ex_1_58.sce @@ -0,0 +1,20 @@ +//Example 1.58://precision index and false alarms +clc; +clear; +y=0.675;// +x=4.8;// +SD= x/y;//STANDARD DEVIATION +h=(1/(sqrt(2)*SD));//precision index +x1=100-88;// +y=x1/SD;// +py=0.45;//probablity +nm=30*4;//no. of measurements in the month of november +fa=nm*0.05;//expected no. of false alarms +rfa=fa/2;//reduced no. of false alarms +pfa=(rfa/nm)*100;//probablity of false alarms +py1=0.5-0.025;//probablity of data lie in the tolerant band +SD1=(100-88)/1.96;// +h1=((1/(sqrt(2)*SD1)));//PRCESION INDEX +disp(h,"precision index in part a") +disp(fa,"expected no. of false alarms") +disp(h1,"precision index in part b is") diff --git a/2096/CH1/EX1.59/ex_1_59.sce b/2096/CH1/EX1.59/ex_1_59.sce new file mode 100755 index 000000000..e96cab9a4 --- /dev/null +++ b/2096/CH1/EX1.59/ex_1_59.sce @@ -0,0 +1,20 @@ +//Example 1.59://READING +clc; +clear; +q=[5.30,5.73,6.77,5.26,4.33,5.45,6.09,5.64,5.81,5.75];//length in mm +AM= mean(q);//arithematic mean in mm +for i= 1:10 + qb(i)= q(i)-AM; +end +Q= [qb(1),qb(2),qb(3),qb(4),qb(5),qb(6),qb(7),qb(8),qb(9),qb(10)];// +AV=(-qb(1)-qb(2)+qb(3)+qb(4)-qb(5)-qb(6)+qb(7)+qb(8)-qb(9)+qb(10))/10;// +SD=st_deviation(Q);//standard deviation +for i=1:10 + B(i)= (qb(i))/SD;// + disp(B(i)) +end +V=SD^2;//variance +disp(AM,"arithematic mean in mm") +disp(SD,"standard deviation in mm") +disp("it is given that for 10 readings the ratio of deviation to standard deviation is not to exceed 1.96 and therefore reading no. 5 i.e. 4.33m should be rejected") + diff --git a/2096/CH1/EX1.6/ex_1_6.sce b/2096/CH1/EX1.6/ex_1_6.sce new file mode 100755 index 000000000..cf245d8bb --- /dev/null +++ b/2096/CH1/EX1.6/ex_1_6.sce @@ -0,0 +1,12 @@ +//Example 1.6// maximum possible error and root square accuracy
+clc;
+clear;
+close;
+//given data :
+a=.3; // accuracy limits for transmitter
+b=1.4; // accuracy limits for relay
+c=0.9; // accuracy limits for receiver
+Me=a+b+c;
+Rs=sqrt((a^2)+(b^2)+(c^2));
+disp(Me,"maximum possible error,Me(%) = ±")
+disp(Rs,"root sqare accuracy,Rs(%) = ±")
diff --git a/2096/CH1/EX1.60/ex_1_60.sce b/2096/CH1/EX1.60/ex_1_60.sce new file mode 100755 index 000000000..176eb3f31 --- /dev/null +++ b/2096/CH1/EX1.60/ex_1_60.sce @@ -0,0 +1,31 @@ +//Example 1.60://standard deviation +clc; +clear; +u1=[1.8,4.6,6.6,9.0,11.4,13.4];// +v1=[2.2,3.2,5.2,6.4,8.0,10.0];// +for i= 1:6 + m(i)= u1(i)*v1(i) + d(i)= u1(i)^2;// +end +su= u1(1)+u1(2)+u1(3)+u1(4)+u1(5)+u1(6); +sv= v1(1)+v1(2)+v1(3)+v1(4)+v1(5)+v1(6); +sm=m(1)+m(2)+m(3)+m(4)+m(5)+m(6);// +sd=d(1)+d(2)+d(3)+d(4)+d(5)+d(6);// +a= ((6*sm)-(su*sv))/((6*sd)-(su)^2);// +b=((sv*sd)-(sm*su))/((6*sd)-(su)^2);// +disp(a,"variable a is") +disp(b,"variable b is") +disp("best linear equation is 0.672u+0.591") +for i=1:6 + x(i)=a*u1(i)+b-v1(i) + dx(i)=x(i)^2 +end +sdx=dx(1)+dx(2)+dx(3)+dx(4)+dx(5)+dx(6);// +SD= sqrt(sdx/6);// +SDu=SD/a;//deviation of u +SDa= sqrt((6)/((6*sd)-(su^2)))*SD;//standard deviation in a +SDb= sqrt((sd)/((6*sd)-(su^2)))*SD;//standard deviation in b +disp(SD,"standard deviation is ±") +disp(SDu,"standard deviation in u is ±") +disp(SDa,"standard deviation in a is ±") +disp(SDb,"standard deviation in b is ±") diff --git a/2096/CH1/EX1.61/ex_1_61.sce b/2096/CH1/EX1.61/ex_1_61.sce new file mode 100755 index 000000000..29e4b2f3e --- /dev/null +++ b/2096/CH1/EX1.61/ex_1_61.sce @@ -0,0 +1,20 @@ +//Example 1.61://standard deviation +clc; +clear; +u1=[550,700,850,1000];// +v1=[0.04182,0.04429,0.05529,0.0610];// +for i= 1:4 + m(i)= u1(i)*v1(i) + d(i)= u1(i)^2;// +end +su= u1(1)+u1(2)+u1(3)+u1(4); +sv= v1(1)+v1(2)+v1(3)+v1(4); +sm=m(1)+m(2)+m(3)+m(4);// +sd=d(1)+d(2)+d(3)+d(4);// +a= ((4*sm)-(su*sv))/((4*sd)-(su)^2);// +b=((sv*sd)-(sm*su))/((4*sd)-(su)^2);// +disp(a,"variable a is") +disp(b,"variable b is") +disp("best linear equation is 45.7*10^-6*f^2+15.18*10^-3*f in mW") +//value of a and b is wrong in the book + diff --git a/2096/CH1/EX1.62/ex_1_62.sce b/2096/CH1/EX1.62/ex_1_62.sce new file mode 100755 index 000000000..5e76f9048 --- /dev/null +++ b/2096/CH1/EX1.62/ex_1_62.sce @@ -0,0 +1,12 @@ +// Example 1.62. limiting error and standard deviation +clc, clear +// given : +q1=50; +q2=100; +dq1=0.02; // may be +ve or -ve +dq2=0.01; // may be +ve or-ve +Le=(((q1/(q1+q2))*dq1)+((q2/(q1+q2))*dq2))*100; +Re=sqrt(1+1); // when individul error are standard deviation,then errors in individual measurement are 2% of 50 and 1% of 100 ie., 1 and 1 +Sd=(Re/(q1+q2))*100; +disp(Le,"limiting error,Le(%) = ") +disp(Sd,"standard deviation,Sd(%) = ") diff --git a/2096/CH1/EX1.63/ex_1_63.sce b/2096/CH1/EX1.63/ex_1_63.sce new file mode 100755 index 000000000..36aa411dd --- /dev/null +++ b/2096/CH1/EX1.63/ex_1_63.sce @@ -0,0 +1,11 @@ +// Example 1.63. resistance +clc, clear +// given : +Im=0.1; // maximum current in A +V=10; // voltage in volts +Rm=2.5; // resistance in ohm +Rs=(V/Im)-Rm; +I=10; // in A +Rsh=(Im*Rm)/(I-Im); +disp(Rs,"resistance in series,Rs(ohm) = ") +disp(Rsh,"resistance in parallel,Rsh(ohm) = ") diff --git a/2096/CH1/EX1.64/ex_1_64.sce b/2096/CH1/EX1.64/ex_1_64.sce new file mode 100755 index 000000000..1c99ede4a --- /dev/null +++ b/2096/CH1/EX1.64/ex_1_64.sce @@ -0,0 +1,11 @@ +// Example 1.64. resistance +clc, clear +// given : +Rm=10; // in ohm +Im=.005; // in A +I=1; // in A +V=5; +Rsh=(Im*Rm)/(I-Im); +Rs=(V-(Im*Rm))/Im; +disp(Rsh,"shunt resistance,Rsh(ohm) = ") +disp(Rs,"series resistance,Rs(ohm) = ") diff --git a/2096/CH1/EX1.65/ex_1_65.sce b/2096/CH1/EX1.65/ex_1_65.sce new file mode 100755 index 000000000..2323c3dd3 --- /dev/null +++ b/2096/CH1/EX1.65/ex_1_65.sce @@ -0,0 +1,9 @@ +// Example 1.65. turning moment +clc, clear +// given : +l=0.03; // in m +B=0.09; // in Wb/m^2 +I=0.01; // in A +N=100; // number of turn +T=(N*B*I*l^2); +disp(T,"turning moment,T(N-m) = ") diff --git a/2096/CH1/EX1.66/ex_1_66.sce b/2096/CH1/EX1.66/ex_1_66.sce new file mode 100755 index 000000000..25c1ce8bf --- /dev/null +++ b/2096/CH1/EX1.66/ex_1_66.sce @@ -0,0 +1,31 @@ + +//Example 1.66// percentage error +clc; +clear; +close; +//given data : +alfa_c=.4/100; // in per degree celcius +alfa_m=0.015/100; // in per degree celcius +Rm=5; // in ohm +Im=0.015; // in A +I=100; // in A +Ish=I-Im; +Vsh=Im*Rm; +Rsh=Vsh/Ish; +a=20; // in degree celcius +Rsh1=Rsh*(1+(a*alfa_m)); // the shunt resistance after a rise of 20 degree celcius +R1=5; // internal resistance in ohm +R2=1; // copper resistor in ohm +R3=4; // manganin swamping resistor in ohm +Ri=R1*(1+20*alfa_c); +// current through the instrument corresponding to 100 A +I1=(Rsh1/(Ri+Rsh1))*100; +Ii=(I1*I)/Im; +Pe1=I-Ii; +Ri1=(R2*(1+20*alfa_c))+(R3*(1+20*alfa_m)); + // instrument current with a line current of 100 A +Il=(Rsh1/(Ri1+Rsh1))*100; +Ir=Il*(100/Im); +Pe2=100-Ir; +disp(Pe1,"the percentage error,Pe1(low) = ") +disp(Pe2,"the percentage error,Pe2(low) = ") diff --git a/2096/CH1/EX1.67/ex_1_67.sce b/2096/CH1/EX1.67/ex_1_67.sce new file mode 100755 index 000000000..ff5ea9cf0 --- /dev/null +++ b/2096/CH1/EX1.67/ex_1_67.sce @@ -0,0 +1,17 @@ +//Example 1.67// percentage error +clc; +clear; +close; +//given data : +f=100; // in Hz +V1=250; // in volts +I1=0.05; // in A +L=1; // in H +R=V1/I1; +V=250; // in volts +XL=2*%pi*f*L; +Z=sqrt(R^2+XL^2); +Vr=(V1*R)/Z; +Ve=Vr-V; +Pe=abs(Ve/V)*100; +disp(Pe,"percentage error,Pe = ") diff --git a/2096/CH1/EX1.68/ex_1_68.sce b/2096/CH1/EX1.68/ex_1_68.sce new file mode 100755 index 000000000..970c0705d --- /dev/null +++ b/2096/CH1/EX1.68/ex_1_68.sce @@ -0,0 +1,18 @@ +//Example 1.68// voltmeter reading +clc; +clear; +close; +//given data : +f1=25; // in Hz +f2=100; // in Hz +R=300; // in ohm +L=0.12; // in H +XL1=2*%pi*f1*L; +V_ac=15; // in volts +Z1=sqrt(R^2+XL1^2); +Vr1=V_ac*(R/Z1); +XL2=2*%pi*f2*L; +Z2=sqrt(R^2+XL2^2); +Vr2=V_ac*(R/Z2) +disp(Vr1,"the voltmeter reading at f1,Vr1(V) = ") +disp(Vr2,"the volt meter reading at f2, Vr1(V) = ") diff --git a/2096/CH1/EX1.69/ex_1_69.sce b/2096/CH1/EX1.69/ex_1_69.sce new file mode 100755 index 000000000..9b545f5d8 --- /dev/null +++ b/2096/CH1/EX1.69/ex_1_69.sce @@ -0,0 +1,10 @@ +//Example 1.69// power factor +clc; +clear; +close; +//given data : +W1=920; // in watt +W2=300; // in watt +fi=atand(sqrt(3)*(W1-W2)/(W1+W2)); +cos_fi=cosd(fi) +disp(cos_fi,"the power factor,cos_fi(lag) = ") diff --git a/2096/CH1/EX1.7/ex_1_7.sce b/2096/CH1/EX1.7/ex_1_7.sce new file mode 100755 index 000000000..538629987 --- /dev/null +++ b/2096/CH1/EX1.7/ex_1_7.sce @@ -0,0 +1,12 @@ +
+//Example 1.7// maximum static error
+clc;
+clear;
+close;
+//given data :
+s=.20; // in %
+a=60; // pressure gauge in bar
+b=5; // pressure gauge in bar
+Pg=a-b;
+Se=(s*Pg)/100;
+disp(Se,"maximum static error,Se(bar)= ±")
diff --git a/2096/CH1/EX1.70/ex_1_70.sce b/2096/CH1/EX1.70/ex_1_70.sce new file mode 100755 index 000000000..d983c65ef --- /dev/null +++ b/2096/CH1/EX1.70/ex_1_70.sce @@ -0,0 +1,15 @@ +//Example 1.70// power factor and line current +clc; +clear; +close; +//given data : +W1=14.2; // in k-watt +W2=-6.1; // in k-watt +El=440; // in volts +P=W1+W2; +fi=atand(sqrt(3)*(W1-W2)/(W1+W2)); +cos_fi=cosd(fi); +IL=P*1000/(sqrt(3)*El*cos_fi); +disp(P,"true power,P(k-watt) = ") +disp(cos_fi,"the power factor,cos_fi(lag) = ") +disp(IL,"the line current,IL(A) = ") diff --git a/2096/CH1/EX1.71/ex_1_71.sce b/2096/CH1/EX1.71/ex_1_71.sce new file mode 100755 index 000000000..442f1abe2 --- /dev/null +++ b/2096/CH1/EX1.71/ex_1_71.sce @@ -0,0 +1,14 @@ +//Example 1.71// READING +clc; +clear; +close; +Pi=25;//in kW +El=440;//line voltage in volts +pf=0.6;//power factor +ph=acosd(pf);// +tp=tan(ph);// +dw=(tp*Pi)/((3)^(1/3));//change in weights +W1=22.12;//IN kW +W2=25-W1;// +disp(W1,"reading in kW") +disp(W2,"reading in kW") diff --git a/2096/CH1/EX1.72/ex_1_72.sce b/2096/CH1/EX1.72/ex_1_72.sce new file mode 100755 index 000000000..a94376994 --- /dev/null +++ b/2096/CH1/EX1.72/ex_1_72.sce @@ -0,0 +1,14 @@ + +//Example 1.72// percentage error +clc; +clear; +I=5;//current in ampere +V=230;//volts +pf=1;//power factor +n=60;//no. of revolutions +t=360;//total time in seconds +nr=520;//normal disc no. of revolutions per kWh +E=((V*I*pf*360)/(3600*1000));//energy consumed in 360 seconds in kWh +Er= n/nr;//energy recorded by the meter +Per=((Er-E)/E)*100;//percentage error +disp(Per,"percentage error is (fast)") diff --git a/2096/CH1/EX1.73/ex_1_73.sce b/2096/CH1/EX1.73/ex_1_73.sce new file mode 100755 index 000000000..4626cacd5 --- /dev/null +++ b/2096/CH1/EX1.73/ex_1_73.sce @@ -0,0 +1,14 @@ +//Example 1.73// percentage error +clc; +clear; +I=4.5;//current in ampere +V=230;//volts +pf=1;//power factor +n=10;//no. of revolutions +t=360;//total time in seconds +nr=185;//normal disc no. of revolutions per kWh +E=((V*I*pf*190)/(3600*1000));//energy consumed in 190 seconds in kWh +Er= n/nr;//energy recorded by the meter +Per=((Er-E)/E)*100;//percentage error +disp(-Per,"percentage error is (slow),(%)=") +//answer is calculated wrong in the textbook because in calculation of percentage error it is not divided by the actual value diff --git a/2096/CH1/EX1.74/ex_1_74.sce b/2096/CH1/EX1.74/ex_1_74.sce new file mode 100755 index 000000000..e948c71e2 --- /dev/null +++ b/2096/CH1/EX1.74/ex_1_74.sce @@ -0,0 +1,8 @@ +//Example 1.74// power +clc; +clear; +kwh1=15000;//in one kWh +n=150;//no. of revolutions in 45 seconds +Pm= (1*n)/kwh1;//power metered on 150 revolutions +P=(Pm*3600)/45;//POWER +disp(P*1000,"power in watts is") diff --git a/2096/CH1/EX1.75/ex_1_75.sce b/2096/CH1/EX1.75/ex_1_75.sce new file mode 100755 index 000000000..5a260ab58 --- /dev/null +++ b/2096/CH1/EX1.75/ex_1_75.sce @@ -0,0 +1,14 @@ +//Example 1.74// kWh & percentage error +clc; +clear; +I= (40*225)/600;//current in amperes +I1=14;//current in ampere +V=230;//volts +pf=1;//power factor +n=225;//no. of revolutions +t=360;//total time in seconds +E=((V*I*pf*10)/(60*1000));//energy recorded in 1 hour in kWh +Er=((V*I1*pf*10)/(60*1000));//energy consumed in 1 hour in kWh;//energy recorded by the meter +Per=((Er-E)/E)*100;//percentage error +disp(-Per,"percentage error is") + diff --git a/2096/CH1/EX1.8/ex_1_8.sce b/2096/CH1/EX1.8/ex_1_8.sce new file mode 100755 index 000000000..e1089905f --- /dev/null +++ b/2096/CH1/EX1.8/ex_1_8.sce @@ -0,0 +1,10 @@ +// Example 1.8.sensitivity of gauge
+clc, clear
+// given :
+C=60; // calibration pressure
+F=(300*%pi)/180; //full scale deflection
+L=F*90; // length of scale
+S=L/C;
+disp(S,"sensitivity,S = (mm/pa)")
+//answer is calculated in the form of pi in the textbook
+
diff --git a/2096/CH1/EX1.9.a/ex_1_9_a.sce b/2096/CH1/EX1.9.a/ex_1_9_a.sce new file mode 100755 index 000000000..5971ddc52 --- /dev/null +++ b/2096/CH1/EX1.9.a/ex_1_9_a.sce @@ -0,0 +1,8 @@ +// Example 1.9.a.sensitivity
+clc, clear
+// given :
+Mo=2.4; // magnitude of output response in mm
+Mi=6; // magnitude of input in ohm
+S=Mo/Mi;
+disp(S,"sensitivity,S = (mm/ohm)")
+
diff --git a/2096/CH1/EX1.9.b/ex_1_9_b.sce b/2096/CH1/EX1.9.b/ex_1_9_b.sce new file mode 100755 index 000000000..334c42792 --- /dev/null +++ b/2096/CH1/EX1.9.b/ex_1_9_b.sce @@ -0,0 +1,7 @@ +// Example 1.9.b. deflection factor
+clc, clear
+// given :
+Mo=2.4; // magnitude of output response in mm
+Mi=6; // magnitude of input in ohm
+D=Mi/Mo;
+disp(D,"deflection factor = (ohm/mm)")
diff --git a/2096/CH12/EX12.1.b/ex_12_1_b.sce b/2096/CH12/EX12.1.b/ex_12_1_b.sce new file mode 100755 index 000000000..3f2b6c09f --- /dev/null +++ b/2096/CH12/EX12.1.b/ex_12_1_b.sce @@ -0,0 +1,12 @@ +//Example 12.1.b // percentage +clc; +clear; +close; +//given data : +Gf=2; // gauge factor +a=100; // stress in MN/m^2 +E=200; // modulus of elasticity in GN/m^2 +S=(a*10^6)/(E*10^9); +R=Gf*S; +P=R*100; +disp(P,"percentange change in resistance,P(%) = ") diff --git a/2096/CH12/EX12.4/ex_12_4.sce b/2096/CH12/EX12.4/ex_12_4.sce new file mode 100755 index 000000000..97a4a8d23 --- /dev/null +++ b/2096/CH12/EX12.4/ex_12_4.sce @@ -0,0 +1,17 @@ +//Example 12.4 // the water flow rate +clc; +clear; +close; +//given data : +D1=0.2; // in m +D2=0.1; // in m +h=220; // in mm +Cd=0.98; +ph=13.6; +pw=1; // in Kg/m^3 +g=9.81; +P=g*h*10^-3*(ph-pw)*1000; +M=1/sqrt(1-(D2/D1)^4) +A2=(%pi/4)*D2^2; +Q=(Cd*M*A2*sqrt((2*g/g*1000)*P))*10^-3; +disp(Q,"water flow rate,Q(m^3/s) = ") diff --git a/2096/CH12/EX12.5/ex_12_5.sce b/2096/CH12/EX12.5/ex_12_5.sce new file mode 100755 index 000000000..cc1ec9caa --- /dev/null +++ b/2096/CH12/EX12.5/ex_12_5.sce @@ -0,0 +1,17 @@ +//Example 12.5 //rate of flow oin pipe line +clc; +clear; +D1=0.4;//diameter of pipe at inlet +A1= (%pi/4)*D1^2;//area of inlet in meter square +D2=0.2;//throat diameter in meter +A2=(%pi/4)*D2^2;//area of throat in meter square +y=0.05;//reading of the differntial manometer in meter +Shl=13.6;//SPECIFIC GRAVITY OF HEAVY LIQUID +Sp=0.7;//SPECIFIC GRAVITY OF OIL FLOWING THE PIPELINE +h=y*((Shl/Sp)-1);//differntial pressure head in meter +g=9.81;//assume +V2=sqrt(h/((1/(2*g))-(1/(32*g))));// +V1=(A2*V2)/A1;// +Q=A2*V2;// +disp(Q,"rate of flow of oil in m^3/s is") + diff --git a/2096/CH12/EX12.6/ex_12_6.sce b/2096/CH12/EX12.6/ex_12_6.sce new file mode 100755 index 000000000..7f9dbcd39 --- /dev/null +++ b/2096/CH12/EX12.6/ex_12_6.sce @@ -0,0 +1,18 @@ + +//Example 12.6 // difference +clc; +clear; +close; +//given data : +Q=0.015; // in m^3/s +D0=0.1; // in m +D1=0.2; // in m +Cc=0.6; +Cd=0.6; +g=9.81; +AO=((%pi/4)*D0^2);//in m^2 +A1=((%pi/4)*D1^2);//in m^2 +K=Cd/sqrt(1-(Cc*(AO/A1))^2); +S=sqrt((2*g)/(g*1000)); +DP=((Q/(K*AO*S)))^2;// +disp("difference in thr pressure head is "+string(DP)+" N/m^2 or "+string(DP/9739.45)+" m of water") diff --git a/2096/CH12/EX12.7/ex_12_7.sce b/2096/CH12/EX12.7/ex_12_7.sce new file mode 100755 index 000000000..6be583006 --- /dev/null +++ b/2096/CH12/EX12.7/ex_12_7.sce @@ -0,0 +1,10 @@ +//Example 12.7 // flow rate +clc; +clear; +close; +//given data : +Qv=1.2; // m^3/s +C0=0.6; // discharge coeficient of orifice +Cv=0.97; // discharge coeficient +Q0=(C0/Cv)*Qv; +disp(Q0,"the flow rate,Q0(m^3/s) = ") diff --git a/2096/CH12/EX12.8/ex_12_8.sce b/2096/CH12/EX12.8/ex_12_8.sce new file mode 100755 index 000000000..ba456d417 --- /dev/null +++ b/2096/CH12/EX12.8/ex_12_8.sce @@ -0,0 +1,13 @@ + +//Example 12.8 // speed +clc; +clear; +close; +//given data : +g=9.81; // gravity og earth +Sh=13.6; // gravity of mercury +Sl=1.025; // gravity of sea water +y=0.2; // reading of the manometer in m +h=y*((Sh/Sl)-1); +V=sqrt(2*g*h); +disp("velocity of sub-marine,V(m/s) "+string(V)+" or "+string(V*(3.6))+" km/h") diff --git a/2096/CH13/EX13.1/ex_13_1.sce b/2096/CH13/EX13.1/ex_13_1.sce new file mode 100755 index 000000000..7835c6894 --- /dev/null +++ b/2096/CH13/EX13.1/ex_13_1.sce @@ -0,0 +1,14 @@ +//Example 13.1 // resistance and inductance +clc; +clear; +close; +//given data : +Q=1000; // in ohm +S=Q; +P=500; // in ohm +r=100; // in ohm +C=0.5; // in micro-farad +R=(P*Q)/S; +L=((C*10^-6*P)/S)*(r*(Q+S)+(Q*S)); +disp(R,"resistance,R(ohm) = ") +disp(L,"inductance,L(H) = ") diff --git a/2096/CH13/EX13.2/ex_13_2.sce b/2096/CH13/EX13.2/ex_13_2.sce new file mode 100755 index 000000000..49a0433d5 --- /dev/null +++ b/2096/CH13/EX13.2/ex_13_2.sce @@ -0,0 +1,14 @@ +//Example 13.2 // resistance and inductance +clc; +clear; +close; +//given data : +R2=1000; // in ohm +R3=500; // in ohm +R4=1000; // in ohm +r=100; // in ohm +C=3; // in micro-farad +R=(R2*R3)/R4; +L=((C*10^-6*R2)/R4)*(r*(R3+R4)+(R3*R4)); +disp(R,"resistance,R(ohm) = ") +disp(L,"inductance,L(H) = ") diff --git a/2096/CH13/EX13.3/ex_13_3.sce b/2096/CH13/EX13.3/ex_13_3.sce new file mode 100755 index 000000000..7d336c841 --- /dev/null +++ b/2096/CH13/EX13.3/ex_13_3.sce @@ -0,0 +1,17 @@ + +//Example 13.3 // impedance +clc; +clear; +close; +//given data : +C3=0.124; // in micro-farad +R3=834; // in ohm +C4=0.1; // in micro-farad +f=2000; // in Hz +R2=100; // in ohm +L1=R2*R3*C4*10^-6; +R1=R2*(C4/C3); +X1=2*%pi*f*L1; +Z1=sqrt(R1^2+X1^2); +disp(R1,"resistance in ohms is") +disp(Z1,"impedance of the specimen,Z1(ohm) = ") diff --git a/2096/CH13/EX13.4/ex_13_4.sce b/2096/CH13/EX13.4/ex_13_4.sce new file mode 100755 index 000000000..53c7eadcd --- /dev/null +++ b/2096/CH13/EX13.4/ex_13_4.sce @@ -0,0 +1,15 @@ +//Example 13.4 // capacitance and series resistance +clc; +clear; +close; +//given data : +M=18.35; // in m-H +R1=200; // in ohm +L1=40.6; // in m-H +R2_1=119.5; // in ohm +R4=100; // in ohm +C2=((M*10^-3)/(R1*R4))*10^6; +R2=(R4*(L1-M))/M; +Rs=R2-R2_1; +disp(C2,"capacitance,C(micro-farad) = ") +disp(Rs,"the series resistance,Rs(ohm) = ") diff --git a/2096/CH2/EX2.1/ex_2_1.sce b/2096/CH2/EX2.1/ex_2_1.sce new file mode 100755 index 000000000..d03a21d41 --- /dev/null +++ b/2096/CH2/EX2.1/ex_2_1.sce @@ -0,0 +1,15 @@ +
+//Example 2.1. // ameter current
+clc;
+clear;
+close;
+//given data :
+Rq1=100; // in kilo-ohm
+Rq2=Rq1;
+Rq=Rq2;
+gm=0.005; // in siemens
+Rm=50; // in ohm
+Rd=10; // in kilo-ohm
+V1=1; // in volts
+i=((gm*Rq*10^2*Rd*10^2)/(Rq*10^2+Rd*10^2)*V1)/(((2*Rd*10^2*Rq*10^2)/(Rd*10^2+Rq*10^2))+Rm);
+disp(i*10^3,"the ammeter current,i(mA) = ")
diff --git a/2096/CH2/EX2.10/ex_2_10.sce b/2096/CH2/EX2.10/ex_2_10.sce new file mode 100755 index 000000000..f0bf6d087 --- /dev/null +++ b/2096/CH2/EX2.10/ex_2_10.sce @@ -0,0 +1,18 @@ +//Example 2.10 // peak to peak, amplitude and rms value
+clc;
+clear;
+close;
+//given data :
+Va=3; // vertical attenuation in mV/div
+S=0.2; // 1 subdivision
+//From the figure given in question : Div=1 unit & subdiv=0.2 unit
+Div=1;//unit
+subdiv=0.2;//unit
+Vpeak=2*Div+3*subdiv;//only for one peak
+Vpp=Vpeak*2;//For peak to peak
+Vpp1=(Va/Div)*Vpp;
+Vmax=Vpp1/2;
+Vrms=Vmax/sqrt(2);
+disp(Vpp1,"peak to peak value,Vpp1(mV) = ")
+disp(Vmax,"amplitude,Vmax(mV) = ")
+disp(Vrms,"R.M.S value,Vrms(mV) = ")
diff --git a/2096/CH2/EX2.11/ex_2_11.sce b/2096/CH2/EX2.11/ex_2_11.sce new file mode 100755 index 000000000..59298fb7b --- /dev/null +++ b/2096/CH2/EX2.11/ex_2_11.sce @@ -0,0 +1,10 @@ +
+//Example 2.11 // determine the possible phase angles
+clc;
+clear;
+close;
+//given data :
+y1=1.25; // division
+y2=2.5; // division
+pi=asind(y1/y2);
+disp("the possible angles,pi(degree) "+string(pi)+" or "+string(360-pi)+" = ")
diff --git a/2096/CH2/EX2.12/ex_2_12.sce b/2096/CH2/EX2.12/ex_2_12.sce new file mode 100755 index 000000000..3a2d564c6 --- /dev/null +++ b/2096/CH2/EX2.12/ex_2_12.sce @@ -0,0 +1,11 @@ +
+//Example 2.12 // calculate the unknown resistance
+clc;
+clear;
+close;
+//given data :
+R1=20; // in kilo-ohm
+R2=30; // in kilo-ohm
+R3=80; // in kilo-ohm
+Rx=(R2*R3)/R1;
+disp(Rx,"the unknown resistance,Rx(killo-ohm) = ")
diff --git a/2096/CH2/EX2.13/ex_2_13.sce b/2096/CH2/EX2.13/ex_2_13.sce new file mode 100755 index 000000000..1516aa6e9 --- /dev/null +++ b/2096/CH2/EX2.13/ex_2_13.sce @@ -0,0 +1,16 @@ +//Example 2.13 // calculate the unknown resistance
+clc;
+clear;
+close;
+//given data :
+R1=100.24; // in ohm
+R2=200; // in ohm
+R3=100.03; // in micro-ohm
+l=100.31; // in ohm
+m=200; // in ohm
+Ry=680; // in micro-ohm
+A=(R1*R3*10^-6)/R2;
+B=(m*Ry*10^-6)/(l+m+Ry*10^-6);
+C=((R1/R2)-(l/m));
+Rx=(A+B*C)*10^6;
+disp(Rx,"the unknown resistance,Rx(micro-ohm) = ")
diff --git a/2096/CH2/EX2.14/EX_2_14.sce b/2096/CH2/EX2.14/EX_2_14.sce new file mode 100755 index 000000000..eab2e1c27 --- /dev/null +++ b/2096/CH2/EX2.14/EX_2_14.sce @@ -0,0 +1,12 @@ +//Example 2.14//unknown resistance +clc; +clear; +Z1=50//impedance of first arm(in ohm) +Za=80//phase angle of first arm(in degree) +Z2=125//impedance of second arm(in ohm) +Z3=200//impedane of third arm(in ohm) +Zc=30//phase angle of third arm(in degree) +Z4=(Z2*Z3)/Z1 +disp(Z4,'magnitude of Z4 arm(in ohm)=') +Zd=Zc-Za +disp(Zd,'phase angle of Z4 arm(in degree)=') diff --git a/2096/CH2/EX2.15/EX_2_15.sce b/2096/CH2/EX2.15/EX_2_15.sce new file mode 100755 index 000000000..542390b6c --- /dev/null +++ b/2096/CH2/EX2.15/EX_2_15.sce @@ -0,0 +1,20 @@ + +//Example 2.15//calculate the constants of arm CD +clc; +clear; +f=1;//frequency in kHz +R1=225;//in ohms +R2=150;//in ohms +C2=0.53;//capacitance in micro farad +R3=100;//in ohms +L=7.95;//in mH +oC2=(2*%pi*f*10^3*C2*10^-6);//IN OHMS +wL= (2*%pi*f*10^3*L*10^-3);//in ohms +Z1=225;//in ohms +Z2= R2-(%i*(1/oC2)); +Z3=R3+(%i*wL);// +Z4= (Z2*Z3)/(Z1);//unknow resistance in ohms +R4=real(Z4);// +C4=1/(2*%pi*f*10^3*imag(-Z4));//capacitance in farad +disp(R4,"resistance in arm CD in ohms") +disp(C4*10^6,"capacitance in micro farads") diff --git a/2096/CH2/EX2.16/EX_2_16.sce b/2096/CH2/EX2.16/EX_2_16.sce new file mode 100755 index 000000000..13def08aa --- /dev/null +++ b/2096/CH2/EX2.16/EX_2_16.sce @@ -0,0 +1,18 @@ + +//Example 2.16//resistance and capacitance +clc; +clear; +w=7500;//in rad/s +R2=140;//in ohms +R3=1000;//in ohms +R4=R3;//in ohms +C2=0.0115;//capacitance in micro farad +oC2=(w*C2*10^-6);//IN OHMS +Z2= R2+(%i*(1/oC2)); +Z3=R3;// +Z4=R4;// +Z1=(Z2*Z3)/(Z4);// +R1=real(Z1);// +C1=1/(w*imag(Z1));//capacitance in farad +disp(R1,"resistance in arm CD in ohms") +disp(C1*10^6,"capacitance in arm CD in micro farads") diff --git a/2096/CH2/EX2.17/EX_2_17.sce b/2096/CH2/EX2.17/EX_2_17.sce new file mode 100755 index 000000000..9dae266a4 --- /dev/null +++ b/2096/CH2/EX2.17/EX_2_17.sce @@ -0,0 +1,11 @@ +//Example 2.17//series equivalent of unknown impedence +clc; +clear; +R1=235;//in killo ohms +C1=0.012;//capacitance in micro farads +R2=2.5;//in killo ohms +R3=50;// in kilo ohms +Rx=(R2*R3)/(R1);//in killo ohms +Lx=C1*10^-6*R2*R3*10^6;//in henry +disp(Rx,"unknown resistance in killo ohms") +disp(Lx,"inductance in henry") diff --git a/2096/CH2/EX2.18/EX_2_18.sce b/2096/CH2/EX2.18/EX_2_18.sce new file mode 100755 index 000000000..471f37314 --- /dev/null +++ b/2096/CH2/EX2.18/EX_2_18.sce @@ -0,0 +1,14 @@ + +//Example 2.18//series equivalent of unknown impedence +clc; +clear; +w=3000;//in rad/s +R1=1.8;//in killo ohms +C1=0.9;//capacitance in micro farads +R2=9;//in killo ohms +R3=0.9;// in kilo ohms +Rx= ((w^2*(C1*10^-6)^2*R1*10^3*R2*10^3*R3*10^3)/(1+w^2*(R1*10^3)^2*(C1*10^-6)^2));// +Lx=((R2*10^3*R3*10^3*C1*10^-6)/(1+w^2*(R1*10^3)^2*(C1*10^-6)^2));//in henry +disp(Rx*10^-3,"unknown resistance in killo ohms") +disp(Lx,"inductance in henry") +//answer is wrong in the textbook diff --git a/2096/CH2/EX2.19/EX_2_19.sce b/2096/CH2/EX2.19/EX_2_19.sce new file mode 100755 index 000000000..ef6fd01bd --- /dev/null +++ b/2096/CH2/EX2.19/EX_2_19.sce @@ -0,0 +1,14 @@ +//Example 2.19//unknown resistance ,capacitance and dissipation factor +clc; +clear; +f=1;//frequency in kHz +R1=1.5;//in killo ohms +C1=0.4;//in micro farads +R2=3;//in killo ohms +C3=0.4;//in micro farads +Rx=(R2*C1)/(C3);//unknown resistance in killo ohms +Cx=(R1*C3)/(R2);//UNKNOWN CAPACITANCE IN MICRO FARADS +D= 2*%pi*f*Cx*10^-6*Rx*10^3*10^3;//DISSIPATION FACTPR +disp(Rx,"unknown resistance in killo ohms") +disp(Cx,"unknown capacitance in micro farads") +disp(D,"dissipation factor is") diff --git a/2096/CH2/EX2.2/ex_2_2.sce b/2096/CH2/EX2.2/ex_2_2.sce new file mode 100755 index 000000000..b45eadd92 --- /dev/null +++ b/2096/CH2/EX2.2/ex_2_2.sce @@ -0,0 +1,16 @@ +//Example 2.2. // error
+clc;
+clear;
+close;
+//given data :
+m=150;
+T=3;
+Kf_sin=1.11;//Form factor of sine wave
+//e=50*t
+Erms=sqrt(1/T*integrate('(50*t)^2','t',0,T));
+Eav=(1/T*integrate('(50*t)','t',0,T));
+kf=Erms/Eav;
+R=Kf_sin/kf; // ratio of the two form factors
+Pe=(R-1/1)*100;
+disp(Pe,"the percentage error,Pe(%) = ")
+
diff --git a/2096/CH2/EX2.20/EX_2_20.sce b/2096/CH2/EX2.20/EX_2_20.sce new file mode 100755 index 000000000..548a8845d --- /dev/null +++ b/2096/CH2/EX2.20/EX_2_20.sce @@ -0,0 +1,13 @@ +//Example 2.20//unknown resistance ,capacitance +clc; +clear; +f=2;//frequency in kHz +R1=2.8;//in killo ohms +C1=4.8;//in micro farads +R2=20;//in killo ohms +R4=80;//in killo ohms +R3=((R4/R2)*(R1*10^3+(1/((2*%pi*f*10^3)^2*(C1*10^-6)^2*R1*10^3))));// +C3=(1/((2*%pi*f*10^3)^2*C1*10^-6*R1*10^3*R3));//capaciatnce +disp(R3*10^-3,"unknown resistance in killo ohms") +disp(C3*10^12,"CAPACITANCE IN PICO FARAD IS") + diff --git a/2096/CH2/EX2.21/EX_2_21.sce b/2096/CH2/EX2.21/EX_2_21.sce new file mode 100755 index 000000000..df96128cf --- /dev/null +++ b/2096/CH2/EX2.21/EX_2_21.sce @@ -0,0 +1,10 @@ +//Example 2.21//RESISTANCE AND INDUCTANCE +clc; +clear; +L1=52.6;//in mH +R2=1.68;//in ohms +r1=28.5;//internal resistance in ohms +r2=r1-R2;//resistance in ohms +L2=L1;//inductance in mH +disp(r2,"resistance in ohms") +disp(L2,"inductance in mH") diff --git a/2096/CH2/EX2.22/EX_2_22.sce b/2096/CH2/EX2.22/EX_2_22.sce new file mode 100755 index 000000000..5c531f19e --- /dev/null +++ b/2096/CH2/EX2.22/EX_2_22.sce @@ -0,0 +1,17 @@ + +//Example 2.22//calculate the constants of arm CD +clc; +clear; +f=1;//frequency in kHz +C1=0.2;//in micro farad +R2=500;//in ohms +R3=300;//in ohms +C3=0.1;//in micro frads +Z1=0-%i*(1/(2*%pi*f*10^3*C1*10^-6));// +Z2=R2;// +Y3= ((1/R3)+(%i*2*%pi*f*10^3*C3*10^-6));// +Z4=(Z2)/(Z1*Y3);// +Rx= real(Z4);// +Lx=(imag(Z4))/(2*%pi*f);// +disp(Rx,"unknown resistance in ohms") +disp(round(Lx),"unknow capacitance in mH") diff --git a/2096/CH2/EX2.23/EX_2_23.sce b/2096/CH2/EX2.23/EX_2_23.sce new file mode 100755 index 000000000..aaf583bc9 --- /dev/null +++ b/2096/CH2/EX2.23/EX_2_23.sce @@ -0,0 +1,18 @@ + +//Example 2.23//calculate the constants zX +clc; +clear; +R1=200;//IN OHMS +f=1;//frequency in kHz +C2=5;//in micro farad +R2=200;//in ohms +R3=500;//in ohms +C3=0.2;//in micro frads +Z1=R1;// +Z2=R2-(%i*(1/(2*%pi*f*10^3*C2*10^-6)));// +Z3=R3-(%i*(1/(2*%pi*f*10^3*C3*10^-6)));// +Zx=(Z2*Z3)/Z1; +Rx=real(Zx); +Cx=((1/(2*%pi*f*10^3*imag(-Zx))));// +disp(Rx,"unknown resistance in ohms") +disp(Cx*10^6,"unknown capacitance in micro farads") diff --git a/2096/CH2/EX2.24/EX_2_24.sce b/2096/CH2/EX2.24/EX_2_24.sce new file mode 100755 index 000000000..4247a5ff7 --- /dev/null +++ b/2096/CH2/EX2.24/EX_2_24.sce @@ -0,0 +1,17 @@ + +//Example 2.24//find unknow resistance and inductance +clc; +clear; +R1=600;//in ohms +f=1;//frequency in kHz +C1=1;//in micro farad +R2=100;//in ohms +R3=1000;//in ohms +Y1=((1/R1)+(%i*2*%pi*f*10^3*C1*10^-6));// +Z2=R2;// +Z3=R3;// +Z4=Z2*Z3*Y1;// +Rx= real(Z4);// +Lx=(imag(Z4))/(2*%pi*f);// +disp(round(Rx),"unknown resistance in ohms") +disp(Lx*10^-3,"unknow capacitance in Henry") diff --git a/2096/CH2/EX2.25/EX_2_25.sce b/2096/CH2/EX2.25/EX_2_25.sce new file mode 100755 index 000000000..4e8d6fcf2 --- /dev/null +++ b/2096/CH2/EX2.25/EX_2_25.sce @@ -0,0 +1,18 @@ +//Example 2.25//capacitance ,power factor and relative permittivity +clc; +clear; +f=50;//in hertz +C2=106;//capacitance in pico farad +R4=(1000/%pi);//IN OHMS +C4=0.055;//in micro farads +R3=270;//in ohms +R1= (R3*C4*10^-6)/(C2*10^-12);// IN OHMS +C1=(R4*C2*10^-12)/(R3);//in farads +pf=2*%pi*f*R1*C1*10^-12;// +Eo=8.854*10^-12;// +a= (%pi*12^2)/(4*100^2);//in meter square +t=0.005;//THICKNESS IN METER +Er= ((C1*t)/(Eo*a));//relative permittivity +disp(C1*10^12,"capacitance in pico farad ") +disp(pf*10^13,"power factor is") +disp(Er,"realtive permittivity is") diff --git a/2096/CH2/EX2.26/ex_2_26.sce b/2096/CH2/EX2.26/ex_2_26.sce new file mode 100755 index 000000000..80185be0e --- /dev/null +++ b/2096/CH2/EX2.26/ex_2_26.sce @@ -0,0 +1,9 @@ +//Example 2.26 // self capacitance
+clc;
+clear;
+close;
+//given data :
+C1=420; // in pico-farad
+C2=90; // inpico-farad
+Cd=(C1-4*C2)/3;
+disp(Cd,"the self capacitance,Cd(pico-farad) = ")
diff --git a/2096/CH2/EX2.27/ex_2_27.sce b/2096/CH2/EX2.27/ex_2_27.sce new file mode 100755 index 000000000..e24e5da01 --- /dev/null +++ b/2096/CH2/EX2.27/ex_2_27.sce @@ -0,0 +1,12 @@ +//Example 2.27 // distributed capacitance
+clc;
+clear;
+close;
+//given data :
+C1=410; // in pico-farad
+C2=50; // inpico-farad
+f1=2; // in MHz
+f2=5; // in MHz
+F=f2/f1;
+Cd=(C1-F^2*C2)/5.25;
+disp(Cd,"the self capacitance,Cd(pico-farad) = ")
diff --git a/2096/CH2/EX2.28/ex_2_28.sce b/2096/CH2/EX2.28/ex_2_28.sce new file mode 100755 index 000000000..a6685fe2a --- /dev/null +++ b/2096/CH2/EX2.28/ex_2_28.sce @@ -0,0 +1,15 @@ +//Example 2.28 //resistive and reactive component
+clc;
+clear;
+close;
+//given data :
+C1=190*10^-12; // in farad
+C2=170*10^-12; // in farad
+Q1=75;
+Q2=45;
+f=200; // in kilo-Hz
+w=2*%pi*f*1000;
+Rx=((C1*Q1)-(C2*Q2))/(w*C1*C2*Q1*Q2);
+Xx=(C1-C2)/(w*C1*C2);
+disp(Rx,"the resistive,Rx(ohm) = ")
+disp(Xx,"the reactive component,Xx(ohm) = ")
diff --git a/2096/CH2/EX2.29/ex_2_29.sce b/2096/CH2/EX2.29/ex_2_29.sce new file mode 100755 index 000000000..15c63abbb --- /dev/null +++ b/2096/CH2/EX2.29/ex_2_29.sce @@ -0,0 +1,14 @@ +//Example 2.29 //percentage error
+clc;
+clear;
+close;
+//given data :
+R=4; // in ohm
+f=500; // in kilo-Hz
+C=120; // in pico-farad
+O=0.02; // in ohm
+w=2*%pi*f*10^3;
+Qt=1/(w*C*10^-12*R);
+Qi=1/(w*C*10^-12*(R+O));
+Pe=((Qt-Qi)/Qt)*100;
+disp(Pe,"the percentage error,Pe(%) = ")
diff --git a/2096/CH2/EX2.3/ex_2_3.sce b/2096/CH2/EX2.3/ex_2_3.sce new file mode 100755 index 000000000..64d4b01fd --- /dev/null +++ b/2096/CH2/EX2.3/ex_2_3.sce @@ -0,0 +1,11 @@ +//Example 2.3. // error``
+clc;
+clear;
+close;
+//given data :
+Kf_sin=1.11;//Form factor of sine wave
+kf=1; // from interation Erms=Eav
+R=Kf_sin/kf; // ratio of the two form factors
+Pe=(R-1/1)*100;
+disp(Pe,"the percentage error,Pe(%) = ")
+
diff --git a/2096/CH2/EX2.30/ex_2_30.sce b/2096/CH2/EX2.30/ex_2_30.sce new file mode 100755 index 000000000..43da9a03d --- /dev/null +++ b/2096/CH2/EX2.30/ex_2_30.sce @@ -0,0 +1,10 @@ +//Example 2.30 //self capacitance
+clc;
+clear;
+close;
+//given data :
+C1=100; // in pico-farad
+f1=600;// in kilo-Hz
+f2=2; // in M-Hz
+Cd=(f1*1000)^2*C1/((f2*10^6)^2-(f1*1000)^2)
+disp(Cd,"the self capacitance,Cd(pico-farad) = ")
diff --git a/2096/CH2/EX2.31/ex_2_31.sce b/2096/CH2/EX2.31/ex_2_31.sce new file mode 100755 index 000000000..c9df937f2 --- /dev/null +++ b/2096/CH2/EX2.31/ex_2_31.sce @@ -0,0 +1,15 @@ +
+//Example 2.31 //inductance and resistance
+clc;
+clear;
+close;
+//given data :
+C=220; // in pico-farad
+f1=400;// in kilo-Hz
+Rsh=0.8; // in ohm
+Q=110;
+w=2*%pi*f1*1000;
+L=(1/(w^2*C*10^-12));
+R=((w*L)/Q);
+disp(L*10^6,"inductance,L(micro-H) = ")
+disp(R,"resistance,R(ohm) = ")
diff --git a/2096/CH2/EX2.32/ex_2_32.sce b/2096/CH2/EX2.32/ex_2_32.sce new file mode 100755 index 000000000..dba8942e4 --- /dev/null +++ b/2096/CH2/EX2.32/ex_2_32.sce @@ -0,0 +1,12 @@ +//Example 2.32 //inductance and capacitance
+clc;
+clear;
+close;
+//given data :
+f=2*10^6; // resonant freqencies in Hz
+Cs=210*10^-12; // resonant capacitor in farad
+Cv=6*10^-12; // capacitance of voltmeter in farad
+L=1/((Cs+Cv)*4^2*(%pi)^2*f^2);
+C=((1/(4*L*(%pi)^2*f^2*10^-12))-6);//
+disp(L*10^6,"inductance,L(micro henry) = ")
+disp(C,"capacitance in pF is")
diff --git a/2096/CH2/EX2.33/ex_2_33.sce b/2096/CH2/EX2.33/ex_2_33.sce new file mode 100755 index 000000000..d073c8520 --- /dev/null +++ b/2096/CH2/EX2.33/ex_2_33.sce @@ -0,0 +1,18 @@ +//Example 2.33 //inductance and resistance
+clc;
+clear;
+close;
+//given data :
+C1=40; // in pico-farad
+C2=48; // in pico-farad
+f=4; // in MHz
+R1=60; // additional series resistance in ohm
+C0=(C1+C2)/2;
+w=2*%pi*f*10^6;
+L=(1/(4*%pi^2*(f*10^6)^2*(C0*10^-6)));//
+X= ((w*L*10^6)-(1/(w*C2*10^-12)))^2;//
+R= (X-R1^2)/120;// unknown resistance in ohms
+disp(L*10^12,"inductance in MH")
+disp(R,"unknown resistance in ohms")
+//resistance is calculated wrong in the textbbok
+
diff --git a/2096/CH2/EX2.34/ex_2_34.sce b/2096/CH2/EX2.34/ex_2_34.sce new file mode 100755 index 000000000..d771924bc --- /dev/null +++ b/2096/CH2/EX2.34/ex_2_34.sce @@ -0,0 +1,15 @@ +//Example 2.31 //inductance and resistance
+clc;
+clear;
+close;
+//given data :
+fo=1.2*10^6; // in Hz
+C=160*10^-12; // in farad
+f=6*10^3; // resonant frequency in Hz
+f1=fo+f;
+f2=fo-f;
+F=f1-f2;
+Q=fo/F;
+R=F/((2*%pi*(fo)^2*C));
+disp(Q,"Q factor,Q = ")
+disp(R,"resistance,R(ohm) = ")
diff --git a/2096/CH2/EX2.35/EX_2_35.sce b/2096/CH2/EX2.35/EX_2_35.sce new file mode 100755 index 000000000..2cf6b3014 --- /dev/null +++ b/2096/CH2/EX2.35/EX_2_35.sce @@ -0,0 +1,12 @@ +//Example 2.35 //self capacitance and inductance +clc; +clear; +close; +C1=200;//in pico farads +f1=(2/%pi)*10^6;//in hertz +C2=40;// in pico fards +f2=2*f1;// +CD= ((f1^2*C1*10^-12)-(f2^2*C2*10^-12))/(f2^2-f1^2);// +L=1/(4^2*(C1+CD*10^12));// +disp(CD*10^12,"capacitance in pico farad") +disp(L*10^6,"inductance in micro henry") diff --git a/2096/CH2/EX2.4/ex_2_4.sce b/2096/CH2/EX2.4/ex_2_4.sce new file mode 100755 index 000000000..4d4666209 --- /dev/null +++ b/2096/CH2/EX2.4/ex_2_4.sce @@ -0,0 +1,15 @@ +
+//Example 2.4. // input voltage``
+clc;
+clear;
+close;
+//given data :
+Va=2000; // in volts
+ld=0.02; // in m
+d=.005; // in m
+L=.3; // in m
+D=.03; // in m
+Og=100; // overall gain
+Vd=(2*d*Va*D)/(L*ld);
+I=Vd/Og;
+disp(I,"inout voltage,I(V) = ")
diff --git a/2096/CH2/EX2.5/ex_2_5.sce b/2096/CH2/EX2.5/ex_2_5.sce new file mode 100755 index 000000000..6e42d70c6 --- /dev/null +++ b/2096/CH2/EX2.5/ex_2_5.sce @@ -0,0 +1,15 @@ +
+//Example 2.5. // deflection voltage and deflection sensitivity`
+clc;
+clear;
+close;
+//given data :
+Va=2500; // in volts
+ld=0.025; // in m
+d=.005; // in m
+L=.2; // in m
+D=.03; // in m
+Vd=(2*d*Va*D)/(L*ld);
+S=(D/Vd)*1000;
+disp(Vd,"deflection voltage,Vd(V) = ")
+disp(S,"deflection sensitivity,S(mm/V) = ")
diff --git a/2096/CH2/EX2.6/ex_2_6.sce b/2096/CH2/EX2.6/ex_2_6.sce new file mode 100755 index 000000000..bea70b438 --- /dev/null +++ b/2096/CH2/EX2.6/ex_2_6.sce @@ -0,0 +1,14 @@ +
+//Example 2.6 // deflection sensitivity
+clc;
+clear;
+close;
+//given data :
+Va=2500; // in volts
+ld=0.02; // in m
+d=.005; // in m
+L=.2; // in m
+D=.03; // in m
+Vd=(2*d*Va*D)/(L*ld);
+S=(D/Vd)*1000;
+disp(S,"deflection sensitivity,S(mm/V) = ")
diff --git a/2096/CH2/EX2.7/ex_2_7.sce b/2096/CH2/EX2.7/ex_2_7.sce new file mode 100755 index 000000000..3fc5168cd --- /dev/null +++ b/2096/CH2/EX2.7/ex_2_7.sce @@ -0,0 +1,16 @@ +
+//Example 2.7 // the beem speed and the deflection sensitivity
+clc;
+clear;
+close;
+//given data :
+Va=2500; // in volts
+ld=.015; // in m
+d=.005; // in m
+L=.5; // in m
+m=9.109*10^-31; // in kg
+e=1.602*10^-19;
+v=sqrt((2*e*Va)/m);
+S=((L*ld)/(2*d*Va))*10^3;
+disp(v,"the beem speed,v(m/s)")
+disp(S,"deflection sensitivity,S(mm/V) = ")
diff --git a/2096/CH2/EX2.8/ex_2_8.sce b/2096/CH2/EX2.8/ex_2_8.sce new file mode 100755 index 000000000..8cc2e1518 --- /dev/null +++ b/2096/CH2/EX2.8/ex_2_8.sce @@ -0,0 +1,16 @@ +//Example 2.8 // the density of magnetic field
+clc;
+clear;
+close;
+//given data :
+Va=6000; // in volts
+l=.033; // in m
+L=.22; // in m
+D=0.044; // in m
+m=9.109*10^-31; // in kg
+e=1.602*10^-19;
+A=sqrt(e/(2*m*Va));
+C=(L*l*A);
+B=(D/C)*10^3;
+disp(B,"the density magnetic field,B(mWb/m^2) = ")
+
diff --git a/2096/CH2/EX2.9/ex_2_9.sce b/2096/CH2/EX2.9/ex_2_9.sce new file mode 100755 index 000000000..13c3a80d2 --- /dev/null +++ b/2096/CH2/EX2.9/ex_2_9.sce @@ -0,0 +1,16 @@ +
+//Example 2.9 // voltage
+clc;
+clear;
+close;
+//given data :
+Va=800; // in volts
+B=1.8*10^-4; // in Wb/m^2
+d=.01; // in m
+m=9.109*10^-31; // in kg
+e=1.602*10^-19;
+A=sqrt(e/(2*m*Va));
+C=A*B;
+F=1/(2*d*Va);
+Vd=C/F;
+disp(Vd,"voltage,Vd(V)")
diff --git a/2096/CH5/EX5.1/ex_5_1.sce b/2096/CH5/EX5.1/ex_5_1.sce new file mode 100755 index 000000000..e23363db5 --- /dev/null +++ b/2096/CH5/EX5.1/ex_5_1.sce @@ -0,0 +1,9 @@ +//Example 5.1 // frequency +clc; +clear; +close; +//given data : +N=45; // count +t=10; // gate period in ms +f=(N/(t*10^-3))*10^-3; +disp(f,"frequency,f(k-Hz) = ") diff --git a/2096/CH5/EX5.2/ex_5_2.sce b/2096/CH5/EX5.2/ex_5_2.sce new file mode 100755 index 000000000..b1167055f --- /dev/null +++ b/2096/CH5/EX5.2/ex_5_2.sce @@ -0,0 +1,14 @@ +//Example 5.2 // possible error +clc; +clear; +close; +//given data : +n=3; +R=1/10^n; +v=2; // in v +r=0.5/100; +R1=1*R; // full scale range of 1 V +R2=10*R; // full scale range of 10 V +Lsd=5*R; +Pe=(r*v)+Lsd; +disp(Pe,"the possible error,Pe(V) = ") diff --git a/2096/CH5/EX5.3/ex_5_3.sce b/2096/CH5/EX5.3/ex_5_3.sce new file mode 100755 index 000000000..df4c9678f --- /dev/null +++ b/2096/CH5/EX5.3/ex_5_3.sce @@ -0,0 +1,8 @@ +//Example 5.3 // resolution +clc; +clear; +close; +//given data : +n=4; +R=1/10^n; +disp(R,"resolution,R = ") diff --git a/2096/CH6/EX6.1/EX_6_1.sce b/2096/CH6/EX6.1/EX_6_1.sce new file mode 100755 index 000000000..80e580011 --- /dev/null +++ b/2096/CH6/EX6.1/EX_6_1.sce @@ -0,0 +1,23 @@ +//Example 6.1// actual transformer ratio ,phase angle and maximum flux density +clc; +clear; +Np=1;//no. of primary turns +Ns=240;//no. of secondary turns +Is=5;//SECONDARY WINDING CURRENT IN AMPERE +Re=1.2;//external burden in ohms +mmf=96;//magneromotive force in AT +Ac=1200;//CROSS SECTIONAL AREA IN MM sqaure +f=50;//suplly frequency in hertz +Kt=Ns/Np;//turn ratio +Es=Is*Re;//voltage induced in secondary winding +Im= mmf/Np;//magnetising component of current in ampere +Rs=Kt*Is;//reflected secondary winding current in ampere +Ip=sqrt(Rs^2+Im^2);//primary current in ampere +Kact= Ip/Is ;//actual turn ratio +Theta= atand(Im/(Kt*Is));// +Phm= ((Es/(4.44*f*Ns)));//flux in Wb +Bm= Phm/(Ac*10^-6);//maximum flux density in Wb/Meter squre +temp=Theta-floor(Theta) +disp(Kact,"actual transformation ratio is") +disp("the phase angle is "+string(floor(Theta))+" degree and "+string(round(temp*60))+"min"); +disp(Bm,"maximum flux density in Wb/meter square") diff --git a/2096/CH6/EX6.10/EX_6_10.sce b/2096/CH6/EX6.10/EX_6_10.sce new file mode 100755 index 000000000..cc30f9374 --- /dev/null +++ b/2096/CH6/EX6.10/EX_6_10.sce @@ -0,0 +1,24 @@ + +//Example 6.10// phase errors and burden +clc; +clear; +Vs=100;//IN VOLTS +Kt=10;//TRANSFORMATION RATIO +Rp=86.4;//primry resistance IN OHMS +Xp=62.5;//primary reactance in ohms +Rs=0/78;//secondary resistance in ohms +Xe=102;//reactance in ohms +Io=0.03;//in amperes +pf=0.42 +csd1=0.42;// +sd=sqrt(1-csd1^2);// +Iw=Io*csd1;//in amperes +Im=Io*sd;//in amperes +pa= ((Iw*Xp)-(Im*Rp))/(Kt*Vs);//phase angle in radians AT NO LOAD +csd2=1;//AT BURDEN +sd2=0;// +Is= 1.5632/10.2;//in amperes +B=Vs*Is;//BURDEM IN VA +disp(pa,"phase angle in radians at no load") +//phase angle is calulated wrong in the textbook +disp(B,"burden in VA is") diff --git a/2096/CH6/EX6.11/EX_6_11.sce b/2096/CH6/EX6.11/EX_6_11.sce new file mode 100755 index 000000000..dbe5b7712 --- /dev/null +++ b/2096/CH6/EX6.11/EX_6_11.sce @@ -0,0 +1,16 @@ +//Example 6.11//ratio and phase errors +clc; +clear; +Kt=60.476;//TRANSFORMATION RATIO +Knom=Kt;// +Vs=63;//in volts +Rs=2;//in ohms +Xs=1;//IN OHMS +va=100+%i*200;//burden in VA +y=atand((imag(va)/(real(va))));//in degree +Zs= sqrt((imag(va)^2+real(va)^2));//magnitude +Kact=Kt+((Kt*(Rs*cosd(y)+Xs*sind(y))))/Zs;//actual turn ratio +Pr=(Knom-Kact)/Kact;//percentage ration error +pa=((Xs*cosd(y)-Rs*sind(y))/Zs)*(180/%pi);//change in phase angle error in degree +disp(Pr*100,"percetage ratio error is") +disp(pa,"phase error in degree is") diff --git a/2096/CH6/EX6.2/EX_6_2.sce b/2096/CH6/EX6.2/EX_6_2.sce new file mode 100755 index 000000000..2bf01ecb6 --- /dev/null +++ b/2096/CH6/EX6.2/EX_6_2.sce @@ -0,0 +1,23 @@ +//Example 6.2// ratio error and phase angle +clc; +clear; +dv=0;//as secondary winding power factor is unity +Io=1;//in ampere +Knom=200;//nominal ratio +Re=1.1;//external burden in ohms +Pf=0.45;//power factor +d= acosd(Pf);// +alpha=90-d;//in degrees +Is=5;//in ampere +Rs=Knom*Is;// +Kact= Knom+((Io/Is)*sind(dv+alpha));//actual transformation ratio +Re= ((Knom-Kact)/Kact)*100;//ratio error in percentage +pa=((180/%pi)*(Io*cosd(dv+alpha))/Rs);//phase angle in degree +pa1=pa-round(pa); +pa2=pa*3600;// +pa3= round(pa2); +pa4= pa3-180;// +pa5=pa2-pa4;// +disp(Re,"ratio error in percentage is") +disp("the phase angle is "+string(round(pa5/60))+" min and "+string(pa4)+" seconds" ); + diff --git a/2096/CH6/EX6.3/EX_6_3.sce b/2096/CH6/EX6.3/EX_6_3.sce new file mode 100755 index 000000000..42cb67366 --- /dev/null +++ b/2096/CH6/EX6.3/EX_6_3.sce @@ -0,0 +1,20 @@ +//Example 6.3// aflux ,ratio error +clc; +clear; +f=50;//frequency in hertz +Np=1;//no. of primary turns +Il=1.4;//iron loss in watts +Is=5;//SECONDARY WINDING CURRENT IN AMPERE +Re=1.4;//external burden in ohms +mmf=80;//magneromotive force in AT +Kt=200;//turn ratio +Ns=Kt*Np;//no. of secondary turns +Es=Is*Il;//voltage induced in secondary winding +Ep=Es/Kt;//primary voltage +Iw= Il/Ep;//loss component in ampere +Im= mmf/Np;//magnetising component of current in ampere +Kact= Kt+((Iw/Is));//actual ratio +Re= ((Kt-Kact)/Kact)*100;//ratio error in percentage +Phm= ((Es/(4.44*f*Ns)));//flux in Wb +disp(Phm,"maximum flux density in Wb") +disp(Re,"ratio error in percentage is") diff --git a/2096/CH6/EX6.4/EX_6_4.sce b/2096/CH6/EX6.4/EX_6_4.sce new file mode 100755 index 000000000..28fd17bf4 --- /dev/null +++ b/2096/CH6/EX6.4/EX_6_4.sce @@ -0,0 +1,25 @@ +//Example 6.4// ratio error and phase angle error +clc; +clear; +Ns=250;//no. of secondary turns +Rp=1.4;//in ohms +f=50;//frequency in hertz +Np=1;//no. of primary turns +Is=5;//SECONDARY WINDING CURRENT IN AMPERE +Re=1.1;//external burden in ohms +mmf=80;//magneromotive force in AT +Il=1.1;//IRON LOSS IN WATTS +Kt=Ns/Np;//turn ratio +Se=sqrt(Rp^2+Re^2);//secomdary circuit impedance in ohms +csd=Rp/Se;//cos angle +sd=Il/Se;//SIN ANGLE + +Es=Is*Se;//voltage induced in secondary winding +Ep=Es/Kt;//primary voltage +Iw= Il/Ep;//loss component in ampere +Im= mmf/Np;//magnetising component of current in ampere +Kact= Kt+((Im*sd)+(Iw*csd))/Is;//actual ratio +Re= ((Kt-Kact)/Kact)*100;//ratio error in percentage +Pa=((180/%pi)*(Im*csd-Iw*sd)/(Kt*Is));//phase angle in degree +disp(Re,"ratio error in percentage is") +disp(Pa,"phase angle in degree is") diff --git a/2096/CH6/EX6.5/EX_6_5.sce b/2096/CH6/EX6.5/EX_6_5.sce new file mode 100755 index 000000000..28e5ab49f --- /dev/null +++ b/2096/CH6/EX6.5/EX_6_5.sce @@ -0,0 +1,30 @@ +//Example 6.5// primary winding current ,actual transformation ratio and no. of turns +clc; +clear; +Ns=300;//no. of secondary turns +Xe=0.55;//in ohms +Xs=0.25;//in ohms +f=50;//frequency in hertz +Np=1;//no. of primary turns +Is=5;//SECONDARY WINDING CURRENT IN AMPERE +Re=1.0;//external burden in ohms +Rs=0.3;//in ohms +mmf=90;//magneromotive force in AT +mmfc=45;//mmf for core loss in AT +ts=Rs+Re;//total secondary circuit resistance +tr=Xe+Xs;//total secondary circuit reactance +d= atand(tr/ts);//secondady phase angle in degree +csd= cosd(d); +sd=sind(d); +Kt=300;// +Iw= mmfc/Np;//loss component in ampere +Im= mmf/Np;//magnetising component of current in ampere +Kact= Kt+((Im*sd)+(Iw*csd))/Is;//actual ratio +Ip=Kact*Is;//primary current in amperes +Knom=300;//NOMINAL TRANSFORMATION RATIO +Ktd= Knom-((Im*sd)+(Iw*csd))/Is;//for zero ratio error +Nsd=Ktd*Np +Rtr=round(Knom-Nsd);//reduction in secondary winding turns +disp(Ip,"primary current in ampere") +disp(Kact,"actual transformation ratio") +disp(Rtr,"reduction in secondary winding turns") diff --git a/2096/CH6/EX6.6/EX_6_6.sce b/2096/CH6/EX6.6/EX_6_6.sce new file mode 100755 index 000000000..329f8474c --- /dev/null +++ b/2096/CH6/EX6.6/EX_6_6.sce @@ -0,0 +1,19 @@ +//Example 6.6// actual ratio and phase angle +clc; +clear; +Ns=100;//no. of secondary turns +f=50;//frequency in hertz +Np=1;//no. of primary turns +Knom=100 +Io=1.8;//amperes +Is=1;//SECONDARY WINDING CURRENT IN AMPERE +Re=1.45;//external burden in ohms +Rs=0.25;//in ohms +La=38.4;//lagging angle in degree +Kt=Ns/Np;//actual ratio +ts=Rs+Re;//total secondary circuit resistance +alpha=90-La;// PHASE ANGLE +Kact= Kt+((Io/Is)*sind(alpha));//actual transformation ratio +Pa=((180/%pi)*(Io*cosd(alpha))/(Kt*Is));//phase angle in degree +disp(Pa,"phase angle in degree is") +disp(Kact,"actual transformation ratio") diff --git a/2096/CH6/EX6.7/EX_6_7.sce b/2096/CH6/EX6.7/EX_6_7.sce new file mode 100755 index 000000000..61fafa157 --- /dev/null +++ b/2096/CH6/EX6.7/EX_6_7.sce @@ -0,0 +1,27 @@ + +//Example 6.7// ratio +clc; +clear; +Is=5;//in amperes +Ns=200;//no. of secondary turns +f=50;//frequency in hertz +Np=1;//no. of primary turns +Iw=5;//in amperes +Im=8;//amperss +Kt=Ns/Np;//turn ratio +csd1=0.8;// +sd1= sqrt(1-csd1^2);// +Kact1= Kt+((Im*sd1)+(Iw*csd1))/Is;//actual ratio when 0.8 p.f. lagging +Re1= ((Kt-Kact1)/Kact1)*100;//ratio error in percentage when 0.8 p.f. lagging +Pa1=((180/%pi)*(Im*csd1-Iw*sd1))/(Kt*Is);//phase angle in degree when 0.8 pf lagging +csd2=0.8;// +sd2=-0.6;// +Kact2= Kt+((Im*sd2)+(Iw*csd2))/Is;//actual ratio when 0.8 p.f. leading +Re2= ((Kt-Kact2)/Kact2)*100;//ratio error in percentage when 0.8 p.f. leading +Pa2=((180/%pi)*(Im*csd2-Iw*sd2))/(Kt*Is);//phase angle in degree when 0.8 pf leading +disp(Kact1,"actual ratio when 0.8 p.f. lagging") +disp(Re1,"percentage ratio error when 0.8 p.f. lagging") +disp(Pa1,"phase angle when 0.8 p.f. lagging in degree ") +disp(Kact2,"actual ratio when 0.8 p.f. leading") +disp(Re2,"percentage ratio error when 0.8 p.f. leading") +disp(Pa2,"phase angle when 0.8 p.f. leading in degree") diff --git a/2096/CH6/EX6.8/EX_6_8.sce b/2096/CH6/EX6.8/EX_6_8.sce new file mode 100755 index 000000000..fd0fb2711 --- /dev/null +++ b/2096/CH6/EX6.8/EX_6_8.sce @@ -0,0 +1,28 @@ +//Example 6.8// current and phase angle errors +clc; +clear; +Ns=99;//no. of secondary turns +Xe=0.55;//in ohms +Xs=0.35;//in ohms +f=50;//frequency in hertz +Np=1;//no. of primary turns +Is=5;//SECONDARY WINDING CURRENT IN AMPERE +Rs=0.4;//in ohms +Re= (20)/(Is^2);//innohms +Xe=0;// +mmf=6;//magneromotive force in AT +mmfc=8;//mmf for core loss in AT +ts=Rs+Re;//total secondary circuit resistance +tr=Xe+Xs;//total secondary circuit reactance +d= atand(tr/ts);//secondady phase angle in degree +csd= cosd(d); +sd=sind(d); +Kt=99;// +Knom=100 +Iw= mmfc/Np;//loss component in ampere +Im= mmf/Np;//magnetising component of current in ampere +Kact= Kt+((Im*sd)+(Iw*csd))/Is;//actual ratio +Re=((Knom-Kact)/Kact)*100;//current error in percentage +Pa=((180/%pi)*(Im*csd-Iw*sd))/(Kt*Is);//phase error +disp(Re,"current error in percentage is") +disp(Pa,"phase error in degree is") diff --git a/2096/CH6/EX6.9/EX_6_9.sce b/2096/CH6/EX6.9/EX_6_9.sce new file mode 100755 index 000000000..f596c93cb --- /dev/null +++ b/2096/CH6/EX6.9/EX_6_9.sce @@ -0,0 +1,22 @@ +//Example 6.9// current and phase angle errors
+clc;
+clear;
+Is=5;//IN AMPERES
+Ip=100;//primary current in amperes
+VA=20;//BURDEN
+xr=4;//
+mmfc=0.18;//mmf for core loss in AT
+Ep=VA/Ip;//voltage across primary winding
+d= atand(1/xr);//secondady phase angle in degree
+csd= cosd(d);
+sd=sind(d);
+Kt=20;//
+Knom=20
+Iw= mmfc/Ep;//loss component in ampere
+Im= 1.4;//magnetising component of current in ampere
+Kact= Kt+((Im*sd)+(Iw*csd))/Is;//actual ratio
+Re=((Knom-Kact)/Kact)*100;//current error in percentage
+Pa=((180/%pi)*(Im*csd-Iw*sd))/(Kt*Is);//phase error
+disp(Re,"current error in percentage is")
+disp(Pa,"phase error in degree is")
+//answer is wrong in the book
diff --git a/2096/CH7/EX7.10/ex_7_10.sce b/2096/CH7/EX7.10/ex_7_10.sce new file mode 100755 index 000000000..03c65824e --- /dev/null +++ b/2096/CH7/EX7.10/ex_7_10.sce @@ -0,0 +1,21 @@ +
+//Example 7.10 // strain charge and capacitance
+clc;
+clear;
+close;
+//given data :
+A=6*6*10^-6; // in m^2
+t=1.5*10^-3; // in m
+e=12.5*10^-9; // in F/m
+F=6; // in N
+d=150*10^-12; // in F
+E=12*10^6; // in N/m^2
+p=F/A;
+S=p/E;
+g=d/e;
+E1=g*t*p;
+Q=d*F*10^12;
+C=Q/E1;
+disp(S,"strain,S = ")
+disp(Q,"charge,Q(pC) = ")
+disp(C,"capacitance,C(pF) = ")
diff --git a/2096/CH7/EX7.11/ex_7_11.sce b/2096/CH7/EX7.11/ex_7_11.sce new file mode 100755 index 000000000..c0bc46cb3 --- /dev/null +++ b/2096/CH7/EX7.11/ex_7_11.sce @@ -0,0 +1,15 @@ +//Example 7.11 // the hall angle +clc; +clear; +close; +//given data : +p=0.00912; // resistivity of semiconductor material in ohm-m +B=0.48; // in Wb/m^2 +Rh=3.55*10^-4; // in m^3/C +Jx=1; +Ex=p*Jx; +Ey=Rh*B*Jx; +t=Ey/Ex; +Theta=atand(t) +temp=Theta-round(Theta) +disp("the hall angle is "+string(round(Theta))+" degree and "+string(round(temp*60))+"min"); diff --git a/2096/CH7/EX7.12/ex_7_12.sce b/2096/CH7/EX7.12/ex_7_12.sce new file mode 100755 index 000000000..84e4f326b --- /dev/null +++ b/2096/CH7/EX7.12/ex_7_12.sce @@ -0,0 +1,14 @@ + +//Example 7.12 // voltage +clc; +clear; +close; +//given data : +Rh=3.55*10^-4; // hall coefficient in m^3/C +I=0.015; // current in A +A=15*10^-6; // area in m^2 +B=0.48; // flux density in Wb/m^2 +Jx=I/A; +Ey=Rh*B*Jx; +V=Ey*A*10^3; +disp(V,"voltage between contact,V(V) = ") diff --git a/2096/CH7/EX7.13/ex_7_13.sce b/2096/CH7/EX7.13/ex_7_13.sce new file mode 100755 index 000000000..0c627234a --- /dev/null +++ b/2096/CH7/EX7.13/ex_7_13.sce @@ -0,0 +1,8 @@ +//Example 7.13 // poisson's ratio +clc; +clear; +close; +//given data : +Gf=4.2; +mu=(Gf-1)/2; +disp(mu,"poissons ratio,mu = ") diff --git a/2096/CH7/EX7.14/ex_7_14.sce b/2096/CH7/EX7.14/ex_7_14.sce new file mode 100755 index 000000000..230379d5f --- /dev/null +++ b/2096/CH7/EX7.14/ex_7_14.sce @@ -0,0 +1,18 @@ +//Example 7.14 // resistance +clc; +clear; +close; +//given data : +alfa=20*10^-6; //resistance temperature coefficient in per degree celcius +R=120; // in ohm +E=400; // in MN/m^2 +Gf=2; +Me=200*10^9; // modulus of elasticity in N/m^2 +Cs=(1/10)*E*10^6; // in N/m^2 +e=Cs/Me; +dR=R*Gf*e*10^3; // +t=20; // temerature in degree celcius +dR1=R*alfa*t*10^3; +disp(dR,"resistance due to change in stress,dR(m-ohm) = ") +disp(dR1,"resistance due to change of temperature,dR1(m-ohm) = ") +//ANSWER IS WRONG IN THE TEXTBOOK diff --git a/2096/CH7/EX7.15/ex_7_15.sce b/2096/CH7/EX7.15/ex_7_15.sce new file mode 100755 index 000000000..a3d57aaea --- /dev/null +++ b/2096/CH7/EX7.15/ex_7_15.sce @@ -0,0 +1,16 @@ +//Example 7.15 // change in length and force +clc; +clear; +close; +//given data : +E=207*10^9; // strain gauge in N/m^2 +L=0.12; // im m +A=3.8*10^-4; // in m^2 +R=220; // in ohm +Gf=2.2; +dR=0.015; // in ohm +dL=(((dR/R)*L)/Gf); +a=E*(dL/L); +F=a*A/1000; +disp(dL,"change in length,L(m) = ") +disp(F,"the force,F(kN) = ") diff --git a/2096/CH7/EX7.16/ex_7_16.sce b/2096/CH7/EX7.16/ex_7_16.sce new file mode 100755 index 000000000..4a2ddc1a2 --- /dev/null +++ b/2096/CH7/EX7.16/ex_7_16.sce @@ -0,0 +1,10 @@ +//Example 7.16 // strain +clc; +clear; +close; +//given data : +Rg=100; // in ohm +Rsh=80000; // in ohm +Gf=2.1; // +e=(1/Gf)*(Rg/(Rg+Rsh))*10^6; +disp(e,"the strain,e(microstrain) = ") diff --git a/2096/CH7/EX7.17/ex_7_17.sce b/2096/CH7/EX7.17/ex_7_17.sce new file mode 100755 index 000000000..1812a3960 --- /dev/null +++ b/2096/CH7/EX7.17/ex_7_17.sce @@ -0,0 +1,15 @@ +//Example 7.17 // strain +clc; +clear; +close; +//given data : +n=4; +Rg=200; // in ohm +Rsh=100*10^3; // in ohm +Gf=2; // gauge factor +e=Rg/(n*Gf*(Rg+Rsh)); +// case 1 -when the calibration switch is closed, the read out gives a reading of 140 division +D=e/140; +//case 2 - when the strain gauge is loaded, the strain +S=D*220*10^6; +disp(S,"the strain,S(microstrain) = ") diff --git a/2096/CH7/EX7.18/ex_7_18.sce b/2096/CH7/EX7.18/ex_7_18.sce new file mode 100755 index 000000000..fd182983a --- /dev/null +++ b/2096/CH7/EX7.18/ex_7_18.sce @@ -0,0 +1,13 @@ +//Example 7.18 // the longitudinal and hoop stress +clc; +clear; +close; +//given data : +ex=0.00016; +ey=0.00064; +E=200*10^9; // in N/m^2] +mu=0.26; +a=(E*(ex+(mu*ey))/(1-(mu)^2))*10^-6; +b=(E*(ey+(mu*ex))/(1-(mu)^2))*10^-6; +disp(a,"longitudinal,a(MN/m^2) = ") +disp(b,"hoop stress,b(MN/m^2) = ") diff --git a/2096/CH7/EX7.19/ex_7_19.sce b/2096/CH7/EX7.19/ex_7_19.sce new file mode 100755 index 000000000..6e67105ed --- /dev/null +++ b/2096/CH7/EX7.19/ex_7_19.sce @@ -0,0 +1,15 @@ +//Example 7.18 // the longitudinal and hoop stress +clc; +clear; +close; +//given data : +ex=1540; +ey=-420; +A=110*10^-6; // in m^2 +P=25*10^3; // load in N +ax=P/A; +by=0; +E=(ax/ex); +mu=(ey*E)/ax; +disp(E*10^-3,"modulus of elasticity,E(GN/m^2) = ") +disp(-mu,"poisson ratio,ey = " ) diff --git a/2096/CH7/EX7.2/ex_7_2.sce b/2096/CH7/EX7.2/ex_7_2.sce new file mode 100755 index 000000000..4eba8ef7a --- /dev/null +++ b/2096/CH7/EX7.2/ex_7_2.sce @@ -0,0 +1,20 @@ +//Example 7.2 // resolution
+clc;
+clear;
+close;
+//given data :
+l=50; // a linear resistance potentiometer lenth in mm
+r=10000; // resistance in ohm
+rmin=10; // minimum measurable resistance in ohm
+r1=3850; // `case 1 in ohm
+r2=7560; // case 2 in ohm
+R1=r/2; // in ohm
+R2=r/l; // in ohm/mm
+Rc=R1-r1;
+D1=Rc/R2;
+Rd=r2-R1; // opposite direction in ohm
+D2=Rd/R2;
+R=rmin/R2;
+disp(D1,"displacement in case 1 ,D1(mm) = ")
+disp(D2,"displacement in case 2,D2(mm) = ")
+disp(R,"resolution,R(mm) = ")
diff --git a/2096/CH7/EX7.21/ex_7_21.sce b/2096/CH7/EX7.21/ex_7_21.sce new file mode 100755 index 000000000..40ef30e5c --- /dev/null +++ b/2096/CH7/EX7.21/ex_7_21.sce @@ -0,0 +1,22 @@ + +// Example 7.21 : principle strains , principal stess ,maximum shreat stress and location of principle planes +clc, clear +// given : +e1=60; // in microstrain +e2=48; // in microstrain +e3=-12; // in microstrain +E=200*10^9; // in N/m^2 +mu=0.3; +e_max=((e1+e3)/2)+(1/sqrt(2))*sqrt((e1-e2)^2+(e2-e3)^2); +e_min=((e1+e3)/2)-(1/sqrt(2))*sqrt((e1-e2)^2+(e2-e3)^2); +a_max=E*(e1+e3)/(2*(1-mu))+((E/(sqrt(2)*(1+mu)))*sqrt((e1-e2)^2+(e2-e3)^2)); +a_min=E*(e1+e3)/(2*(1-mu))-((E/(sqrt(2)*(1+mu)))*sqrt((e1-e2)^2+(e2-e3)^2)); +tau_max=(E/(sqrt(2)*(1+mu)))*sqrt((e1-e2)^2+(e2-e3)^2); +A=atand((2*e2-e1-e3)/(e1-e3)); +B=A/2; +disp(e_max*10^-6,"principle strain (e_max)") +disp(e_min*10^-6,"principle strain (e_min)") +disp(a_max*10^-12,"principle stresses (a_max) in MN/m^2") +disp(a_min*10^-12,"principle stresses (a_min)in MN/m^2") +disp(tau_max*10^-12,"maximm shear stress (tau_max) in MN/m^2") +disp(B,"location of the princinple planes (B) in degree") diff --git a/2096/CH7/EX7.22/ex_7_22.sce b/2096/CH7/EX7.22/ex_7_22.sce new file mode 100755 index 000000000..3af517a92 --- /dev/null +++ b/2096/CH7/EX7.22/ex_7_22.sce @@ -0,0 +1,18 @@ +//Example 7.22 // sensitivity
+clc;
+clear;
+close;
+//given data :
+d=0.06; // in mm
+Rg=120; // in ohm
+Gf=2; // gauge factor
+v=6; // im volts
+E=200; // GN/m^2
+mu=0.3; // poisson's ratio
+l=1000; // consider a load applied in N
+Si=l/((%pi/4)*(d)^2)
+e=Si/(E*10^9);
+R=Gf*e;
+dVo=2*(1+mu)*R*(v/4)*10^-6;
+S=dVo/(l*1000);
+disp(S*10^18,"the sesitivity,S(microvolt/kN) = ")
diff --git a/2096/CH7/EX7.3/ex_7_3.sce b/2096/CH7/EX7.3/ex_7_3.sce new file mode 100755 index 000000000..f561b7ab2 --- /dev/null +++ b/2096/CH7/EX7.3/ex_7_3.sce @@ -0,0 +1,12 @@ +
+//Example 7.3 // resistance
+clc;
+clear;
+close;
+//given data :
+R25=100; // in ohm
+alfa=-5/100;
+T1=35; // in degree celcius
+T2=25; // in degree celcius
+R35=R25*(1+alfa*(T1-T2));
+disp(R35,"resistance R35(ohm) = ")
diff --git a/2096/CH7/EX7.4/ex_7_4.sce b/2096/CH7/EX7.4/ex_7_4.sce new file mode 100755 index 000000000..ed35015e4 --- /dev/null +++ b/2096/CH7/EX7.4/ex_7_4.sce @@ -0,0 +1,16 @@ +
+//Example 7.4 // inductance
+clc;
+clear;
+close;
+//given data :
+l=1; // air gap lenth in mm
+L1=2; // in mH
+D1=0.02; // when a displacement is applied
+l1=l-D1;
+dL=(L1*(l/l1))-L1;
+L=dL/L1;
+D=D1/l;
+disp(L*10^2," inductance ,L(mH) = ")
+disp(dL,"inductance,dL(mH) = ")
+disp(D,"the ratio of displacement to original gap length,D = ")
diff --git a/2096/CH7/EX7.5/ex_7_5.sce b/2096/CH7/EX7.5/ex_7_5.sce new file mode 100755 index 000000000..252220aa5 --- /dev/null +++ b/2096/CH7/EX7.5/ex_7_5.sce @@ -0,0 +1,9 @@ +//Example 7.5 // LINEARITY
+clc;
+clear;
+close;
+//given data :
+V=1.8; // the output voltage
+D=.0045; // the deviation from a straight line through the origin may be +ve or-ve
+A=(D/V)*100;
+disp(A,"age linearity,A(%) = ± ")
diff --git a/2096/CH7/EX7.6/ex_7_6.sce b/2096/CH7/EX7.6/ex_7_6.sce new file mode 100755 index 000000000..1091fb4dd --- /dev/null +++ b/2096/CH7/EX7.6/ex_7_6.sce @@ -0,0 +1,16 @@ +//Example 7.6 // the sensitivity and resolution
+clc;
+clear;
+close;
+//given data :
+Vo=1.8; // output voltage
+D=0.6; // displacement
+S=Vo/D;
+Af=500; // amplification factor
+Sm=Af*S; // in mV/mm
+V=4000; // in mili-volts
+Sd=V/100; // one scale division
+Vmin=(1/4)*Sd; // scale can be read to 1/4 of a division
+R=Vmin*(1/Sm);
+disp(S,"sensitivity of LVDT,S(mV/mm) = ")
+disp(R,"resolution,R(mm) = ")
diff --git a/2096/CH7/EX7.7.a/ex_7_7_a.sce b/2096/CH7/EX7.7.a/ex_7_7_a.sce new file mode 100755 index 000000000..a14d559af --- /dev/null +++ b/2096/CH7/EX7.7.a/ex_7_7_a.sce @@ -0,0 +1,12 @@ +//Example 7.7.a // determine the value of capacitance
+clc;
+clear;
+close;
+//given data :
+A=300; // plates of area in mm^2
+eo=8.85*10^-12; // in F/m
+er1=1;
+er2=8; // dielectric contant of mica
+d=0.2; //
+C=((eo*er1*10^-6*A)/(d*10^-3))*10^12;
+disp(C,"capacitance,C(pF) = ")
diff --git a/2096/CH7/EX7.7.b/ex_7_7_b.sce b/2096/CH7/EX7.7.b/ex_7_7_b.sce new file mode 100755 index 000000000..38c3dd884 --- /dev/null +++ b/2096/CH7/EX7.7.b/ex_7_7_b.sce @@ -0,0 +1,20 @@ +//Example 7.7. // change in capacitance
+clc;
+clear;
+close;
+//given data :
+A=300; // plates of area in mm^2
+eo=8.85*10^-12; // in F/m
+er1=1;
+er2=8; // dielectric contant of mica
+d1=0.18; //
+d=0.2; //
+D=d-d1;
+C=((eo*er1*10^-6*A)/(d*10^-3))*10^12;
+C1=((eo*er1*10^-6*A)/(d1*10^-3))*10^12;
+dC=C1-C;
+a=dC/C;
+b=D/d;
+R=a/b;
+disp(dC,"capacitance,dC(pF) = ")
+disp(R,"ratio of per unit cahnge of capacitance to per unit change of displacement,R = ")
diff --git a/2096/CH7/EX7.7.c/ex_7_7_c.sce b/2096/CH7/EX7.7.c/ex_7_7_c.sce new file mode 100755 index 000000000..4bf42d3fc --- /dev/null +++ b/2096/CH7/EX7.7.c/ex_7_7_c.sce @@ -0,0 +1,23 @@ +//Example 7.7.c // ratio
+clc;
+clear;
+close;
+//given data :
+A=300; // plates of area in mm^2
+eo=8.85*10^-12; // in F/m
+er1=1;
+er2=8; // dielectric contant of mica
+d1=0.01; // thickness of mica
+d2=0.02; // when a displacement is applied
+d=0.2; //
+D=d-d1;
+D1=D-d2;
+C=((eo*A*10^-6)/(((D/er1)+(d1/er2))*10^-3))*10^12;
+C1=((eo*A*10^-6)/(((D1/er1)+(d1/er2))*10^-3))*10^12;
+dC=C1-C;
+a=dC/C;
+b=d2/d;
+R=a/b;
+disp(C,"Capacitance ,C(pF)=")
+disp(dC,"capacitance,dC(pF) = ")
+disp(R,"ratio of per unit cahnge of capacitance to per unit change of displacement,R = ")
diff --git a/2096/CH7/EX7.8/ex_7_8.sce b/2096/CH7/EX7.8/ex_7_8.sce new file mode 100755 index 000000000..625bd0e71 --- /dev/null +++ b/2096/CH7/EX7.8/ex_7_8.sce @@ -0,0 +1,14 @@ +
+//Example 7.8 // voltage output and charge sensitivity
+clc;
+clear;
+close;
+//given data :
+t=2.5*10^-3; // thick quartz in mm
+g=0.055; // in Vm/N
+p=1.4; // MN/m^2
+e=40.6*10^-12; // in F
+E=g*t*p*10^6;
+C=e*g*10^12;
+disp(E,"voltage output,E(V) = ")
+disp(C,"charge sensitivity,C(pC/N) = ")
diff --git a/2096/CH7/EX7.9/ex_7_9.sce b/2096/CH7/EX7.9/ex_7_9.sce new file mode 100755 index 000000000..234f7f89b --- /dev/null +++ b/2096/CH7/EX7.9/ex_7_9.sce @@ -0,0 +1,12 @@ +//Example 7.9 // force
+clc;
+clear;
+close;
+//given data :
+A=6*6*10^-6; // in m^2
+t=1.8*10^-3; // in m
+g=0.055; // in Vm/N
+E=120; // in volts
+p=E/(g*t);
+F=p*A;
+disp(F,"force,F(N) = ")
diff --git a/2096/CH8/EX8.1/EX_8_1.sce b/2096/CH8/EX8.1/EX_8_1.sce new file mode 100755 index 000000000..8f8b3b0d9 --- /dev/null +++ b/2096/CH8/EX8.1/EX_8_1.sce @@ -0,0 +1,11 @@ +//Example 8.1 //total voltage gain +clc; +clear; +g1=100;//FIRST STAGE GAIN +g1db=20*(log10(g1));//first stage gain in db +g2=200;//second stage gain +g2db=20*(log10(g2));//second stage gain in db +g3=400;//third stage gain +g3db=20*(log10(g3));//third stage gain in db +Tdb=g1db+g2db+g3db;// +disp(Tdb,"total gain in dB") diff --git a/2096/CH8/EX8.2/EX_8_2.sce b/2096/CH8/EX8.2/EX_8_2.sce new file mode 100755 index 000000000..e2d118c5b --- /dev/null +++ b/2096/CH8/EX8.2/EX_8_2.sce @@ -0,0 +1,11 @@ +//Example 8.2 //POWER GAIN AND RESULTANTT POWER GAIN +clc; +clear; +g1=30;//ABSOLUTE GAIN FOR EACH STAGE +N=5;// no. of stages +Pdb=10*(log10(g1));//power gain in db +Ndb= Pdb*N;//power gai of 5 stages in db +Nfb=10;//NEGATIVE FEEDBACK IN DB +Rpg=Ndb-Nfb;//RESULTANT POWER GAIN IN db +disp(Ndb,"power gain in db") +disp(Rpg,"resultant power gain in db") |