diff options
Diffstat (limited to '165/CH1')
-rw-r--r-- | 165/CH1/EX1.1.a/ex1_1_a.sce | 14 | ||||
-rw-r--r-- | 165/CH1/EX1.1.b/ex1_1_b.sce | 14 | ||||
-rw-r--r-- | 165/CH1/EX1.2/ex1_2.sce | 13 | ||||
-rw-r--r-- | 165/CH1/EX1.3.a/ex1_3_a.sce | 14 | ||||
-rw-r--r-- | 165/CH1/EX1.3.b/ex1_3_b.sce | 14 | ||||
-rw-r--r-- | 165/CH1/EX1.4/ex1_4.sce | 13 | ||||
-rw-r--r-- | 165/CH1/EX1.5/ex1_5.sce | 11 | ||||
-rw-r--r-- | 165/CH1/EX1.6/ex1_6.sce | 16 | ||||
-rw-r--r-- | 165/CH1/EX1.7/ex1_7.sce | 9 | ||||
-rw-r--r-- | 165/CH1/EX1.8.a/ex1_8_a.sce | 9 | ||||
-rw-r--r-- | 165/CH1/EX1.8.b/ex1_8_b.sce | 23 |
11 files changed, 150 insertions, 0 deletions
diff --git a/165/CH1/EX1.1.a/ex1_1_a.sce b/165/CH1/EX1.1.a/ex1_1_a.sce new file mode 100644 index 000000000..dfe434e63 --- /dev/null +++ b/165/CH1/EX1.1.a/ex1_1_a.sce @@ -0,0 +1,14 @@ +//Example 1.1(a)
+clc;
+Yn=80; //Expected value
+Xn=79; //Measured value
+e=Yn-Xn; //Absolute error
+pe=e*100/Yn; //Percentage error
+RA=1-(e/Yn); //Relative Accuracy
+pa=RA*100; //Percentage Accuracy
+printf('\nExpected value = %.2f V\n',Yn)
+printf('\nMeasured value = %.2f V\n',Xn)
+printf('\nAbsolute error = %.2f V\n',e)
+printf('\nPercentage error = %.2f percent\n',pe)
+printf('\nRelative accuracy = %.4f\n',RA)
+printf('\nPercentage accuracy = %.2f percent\n',pa)
\ No newline at end of file diff --git a/165/CH1/EX1.1.b/ex1_1_b.sce b/165/CH1/EX1.1.b/ex1_1_b.sce new file mode 100644 index 000000000..fbb9a2d03 --- /dev/null +++ b/165/CH1/EX1.1.b/ex1_1_b.sce @@ -0,0 +1,14 @@ +//Example 1.1(b)
+clc;
+Yn=20*10^-3; //Expected value
+Xn=18*10^-3; //Measured value
+e=Yn-Xn; //Absolute error
+pe=e*100/Yn; //Percentage error
+RA=1-(e/Yn); //Relative Accuracy
+pa=RA*100; //Percentage Accuracy
+printf('\nExpected value = %.2f mA\n',Yn*1000)
+printf('\nMeasured value = %.2f mA\n',Xn*1000)
+printf('\nAbsolute error = %.2f mA\n',e*1000)
+printf('\nPercentage error = %.2f percent\n',pe)
+printf('\nRelative accuracy = %.2f\n',RA)
+printf('\nPercentage accuracy = %.2f percent\n',pa)
\ No newline at end of file diff --git a/165/CH1/EX1.2/ex1_2.sce b/165/CH1/EX1.2/ex1_2.sce new file mode 100644 index 000000000..4ed4c0e30 --- /dev/null +++ b/165/CH1/EX1.2/ex1_2.sce @@ -0,0 +1,13 @@ +//Example 1.2
+clc;
+//Enter the measurements in a vector
+Xn=[98,101,102,97,101,100,103,98,106,99];
+//Calculate mean
+Y=mean(Xn);
+//Extract the 6th element
+X6=Xn(1,6);
+//Calculate the absolute value
+a=abs((X6-Y)/X6);
+P=1-a;
+printf('\nMean of all the measurements = %.2f \n',Y)
+printf('\nPrecision of 6th measurement = %.3f \n',P)
\ No newline at end of file diff --git a/165/CH1/EX1.3.a/ex1_3_a.sce b/165/CH1/EX1.3.a/ex1_3_a.sce new file mode 100644 index 000000000..19d01bb51 --- /dev/null +++ b/165/CH1/EX1.3.a/ex1_3_a.sce @@ -0,0 +1,14 @@ +//Example 1.3(a)
+clc;
+Vs=1000; //Voltmeter Sensitivity
+Fs=150; //Scale of Voltmeter
+Vt=80; //Voltmeter reading
+It=10*10^-3; //milliammeter reading
+//Circuit resistance neglecting milliammmeter resistance
+Rt=Vt/It;
+Rv=Vs*Fs; //Voltmeter Resistance
+Rx=Rv*Rt/(Rv-Rt); //Value of unknown resistance
+Pe=100*(Rx-Rt)/Rx; //Percentage Error
+printf('\nApparent value of unknown Resistance = %.2f kohm\n',Rt/1000)
+printf('\nActual value of unknown Resistance = %.2f kohm\n',Rx/1000)
+printf('\nPercentage error = %.2f Percent \n',Pe)
\ No newline at end of file diff --git a/165/CH1/EX1.3.b/ex1_3_b.sce b/165/CH1/EX1.3.b/ex1_3_b.sce new file mode 100644 index 000000000..09c6bc487 --- /dev/null +++ b/165/CH1/EX1.3.b/ex1_3_b.sce @@ -0,0 +1,14 @@ +//Example 1.3(b)
+clc;
+Vs=1000; //Voltmeter Sensitivity
+Fs=150; //Scale of Voltmeter
+Vt=30; //Voltmeter reading
+It=600*10^-3; //milliammeter reading
+//Circuit resistance neglecting milliammmeter resistance
+Rt=Vt/It;
+Rv=Vs*Fs; //Voltmeter Resistance
+Rx=Rv*Rt/(Rv-Rt); //Value of unknown resistance
+Pe=100*(Rx-Rt)/Rx; //Percentage Error
+printf('\nApparent value of unknown Resistance = %.2f ohm\n',Rt)
+printf('\nActual value of unknown Resistance = %.4f ohm\n',Rx)
+printf('\nPercentage error = %.4f Percent \n',Pe)
\ No newline at end of file diff --git a/165/CH1/EX1.4/ex1_4.sce b/165/CH1/EX1.4/ex1_4.sce new file mode 100644 index 000000000..768a448f5 --- /dev/null +++ b/165/CH1/EX1.4/ex1_4.sce @@ -0,0 +1,13 @@ +//Example 1.4
+clc;
+d_dev=[];
+Xn=[49.7,50.1,50.2,49.6,49.7]; //Given Data
+X=mean(Xn); //Mean
+disp(X,'Aritmatic Mean')
+for i=1:5
+ d=Xn(1,i)-X;
+ d_dev=[d_dev,d];
+end
+dtotal=sum(d_dev);
+disp(d_dev,'Deviations from each value')
+disp(dtotal,'Algebraic sum of deviations')
\ No newline at end of file diff --git a/165/CH1/EX1.5/ex1_5.sce b/165/CH1/EX1.5/ex1_5.sce new file mode 100644 index 000000000..de951336e --- /dev/null +++ b/165/CH1/EX1.5/ex1_5.sce @@ -0,0 +1,11 @@ +//Example 1.5
+clc;
+d_dev=[];
+Xn=[49.7,50.1,50.2,49.6,49.7]; //Given Data
+X=mean(Xn); //Mean
+for i=1:5
+ d=Xn(1,i)-X;
+ d_dev=[d_dev,abs(d)];
+end
+Davg=mean(d_dev);
+disp(Davg,'Average deviation')
\ No newline at end of file diff --git a/165/CH1/EX1.6/ex1_6.sce b/165/CH1/EX1.6/ex1_6.sce new file mode 100644 index 000000000..0e78feac1 --- /dev/null +++ b/165/CH1/EX1.6/ex1_6.sce @@ -0,0 +1,16 @@ +//Example 1.6
+clc;
+d_dev=[];
+Xn=[49.7,50.1,50.2,49.6,49.7]; //Given Data
+X=mean(Xn); //Mean
+for i=1:5
+ d=Xn(1,i)-X;
+ d_dev=[d_dev,d^2];
+end
+sq_sum=sum(d_dev);
+var=sq_sum/4;
+//For small no of data(n<30) we use n-1 as the
+//denominator so as to obtain a more accurate value
+//for Standard deviation
+Std_dev=sqrt(var); //Std deviation
+disp(Std_dev,'Standard deviation')
\ No newline at end of file diff --git a/165/CH1/EX1.7/ex1_7.sce b/165/CH1/EX1.7/ex1_7.sce new file mode 100644 index 000000000..a675f50aa --- /dev/null +++ b/165/CH1/EX1.7/ex1_7.sce @@ -0,0 +1,9 @@ +//Example 1.7
+clc;
+Fs=600; //Full Scale
+e=0.02; //error permissable +-2%
+V=250; //Voltage measured
+lim_err=Fs*e; //magnitude of limiting error
+//limiting error at a given voltage drop V
+lim_err_V=100*lim_err/V;
+printf('\nLimiting error at 250 V = %.2f percent\n',lim_err_V)
\ No newline at end of file diff --git a/165/CH1/EX1.8.a/ex1_8_a.sce b/165/CH1/EX1.8.a/ex1_8_a.sce new file mode 100644 index 000000000..18b13f3de --- /dev/null +++ b/165/CH1/EX1.8.a/ex1_8_a.sce @@ -0,0 +1,9 @@ +//Example 1.8(a)
+clc;
+Fs=500*10^-3; //Full Scale
+e=0.02; //error permissable +-2%
+I=300*10^-3; //Current measured
+lim_err=Fs*e; //magnitude of limiting error
+//limiting error at a given current I
+lim_err_I=100*lim_err/I;
+printf('\nLimiting error at 300 mA = %.2f percent\n',lim_err_I)
\ No newline at end of file diff --git a/165/CH1/EX1.8.b/ex1_8_b.sce b/165/CH1/EX1.8.b/ex1_8_b.sce new file mode 100644 index 000000000..fcec268ea --- /dev/null +++ b/165/CH1/EX1.8.b/ex1_8_b.sce @@ -0,0 +1,23 @@ +//Example 1.8(b)
+clc;
+
+VFs=100; //Full Scale
+Ve=0.015; //error permissable +-1.5%
+V=70; //Voltage measured
+V_lim_err=VFs*Ve; //magnitude of limiting error
+//limiting error at a given voltage drop V
+lim_err_V=100*V_lim_err/V;
+
+IFs=150*10^-3; //Full Scale
+Ie=0.015; //error permissable +-1.5%
+I=80*10^-3; //Current measured
+I_lim_err=IFs*Ie; //magnitude of limiting error
+//limiting error at a given current I
+lim_err_I=100*I_lim_err/I;
+
+//Limiting error of power
+lim_err_P=lim_err_V+lim_err_I;
+
+printf('\nLimiting error at 70 V = %.3f percent\n',lim_err_V)
+printf('\nLimiting error at 80 mA = %.3f percent\n',lim_err_I)
+printf('\nLimiting error of power = %.3f percent\n',lim_err_P)
\ No newline at end of file |