summaryrefslogtreecommitdiff
path: root/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput
diff options
context:
space:
mode:
Diffstat (limited to 'Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput')
-rw-r--r--Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUTCHAPTER_12.ipynb300
-rw-r--r--Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUTCHAPTER_8.ipynb113
-rw-r--r--Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUT_CHAPTER_1__(2).ipynb3389
-rw-r--r--Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUT_CHAPTER_2__(1).ipynb1754
-rw-r--r--Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUT_CHAPTER_7.ipynb957
-rw-r--r--Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K._RAJPUT_CHAPTER_6.ipynb657
-rw-r--r--Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.k.Rajput5.ipynb168
-rw-r--r--Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/screenshots/r.k.rajput12_2.pngbin0 -> 149728 bytes
-rw-r--r--Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/screenshots/r.k_rajput_2.pngbin0 -> 158014 bytes
-rw-r--r--Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/screenshots/r.krajput_2.pngbin0 -> 173255 bytes
10 files changed, 7338 insertions, 0 deletions
diff --git a/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUTCHAPTER_12.ipynb b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUTCHAPTER_12.ipynb
new file mode 100644
index 00000000..553bfea3
--- /dev/null
+++ b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUTCHAPTER_12.ipynb
@@ -0,0 +1,300 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 12:Measurement of Non-Electrical Quantities"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.1,Page No:600"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "percentage change in resistance 0.1 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "Gf = 2; #guage factor \n",
+ "a = 100*10**6; #stress in N/m**2\n",
+ "E = 200*10**9; #elasticity of steel in N/m**2\n",
+ "\n",
+ "#calculation\n",
+ "st = (a/float(E)); #strain\n",
+ "x = Gf*st; # change in guage resistance\n",
+ "p = (x)*100; #percentage change in resistance in %\n",
+ "\n",
+ "#result\n",
+ "print\"percentage change in resistance %1.1f\"%p,\"%\";\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.4,Page No:631"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "water flow rate 0.0586 m**3/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "D1 = 200*10**-3; # inlet horizontal venturimeter in m\n",
+ "D2 = 100*10**-3; #throat horizontal enturimeter in m\n",
+ "h = 220*10**-3; #pressure in m\n",
+ "Cd = 0.98; #coefficient of discharge \n",
+ "phg = 13.6; #specific gravity of mercury\n",
+ "p = 1000; #density of water in kg/m**3\n",
+ "g = 9.81; #gravitational constant\n",
+ "pw = 1; #density of water in kg/m**3\n",
+ "w = 9.81; \n",
+ "\n",
+ "\n",
+ "\n",
+ "#calculation\n",
+ "x = (g)*(h)*(phg-pw)*1000; #differential pressure head in N/m**2\n",
+ "a = 1-((D2/float(D1))**4); #velocity approach factor\n",
+ "M = 1/(float(math.sqrt(a))); #velocity of approach\n",
+ "b = math.sqrt(((2*g)/(float(w*p)))*x);\n",
+ "A2 = (math.pi/float(4))*((D2)**2); #area in m**2\n",
+ "Q = Cd*M*A2*(b); #discharge through venturimeter in m**3/s\n",
+ " \n",
+ "#result\n",
+ "print'water flow rate %3.4f'%Q,'m**3/s'; \n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.5,Page No:631"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "rate of flow of oil 0.137850 m**3/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "D1 = 400*10**-3; #diameter at inlet in m\n",
+ "D2 = 200*10**-3; #diameter at throat in m\n",
+ "y = 50*10**-3; #reading of differential manometer in m\n",
+ "Shl = 13.6; #specific gravity of mercury in U-tube \n",
+ "Sp = 0.7; #specific gravity of oil in U-tube \n",
+ "h = 0.92;\n",
+ "\n",
+ "#bernoulli's equation\n",
+ "#p1/w +z1+V1**2=p2/w +z2+V2**2\n",
+ "#solving we get h+(V1**2/2*g)-(V2**2/2*g)=0\n",
+ "# calculations\n",
+ "\n",
+ "A1 = (math.pi/float(4))*(D1**2); #area in m**2\n",
+ "A2 = (math.pi/4)*(D2**2); #area in m**2\n",
+ "a = A2/float(A1); #ratio of areas\n",
+ "#V1 = a*V2;\n",
+ "#h+(V1**2/2*g)*(1-(1/4))=0\n",
+ "V2 = math.sqrt((2*g*h)/(float(1-((a)**2)))); \n",
+ "Q = A2*V2; #rate of oil flow in m**3/s\n",
+ "\n",
+ "#result\n",
+ "print'rate of flow of oil %f'%Q,'m**3/s';\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.6,Page No:633"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "difference in pressure head 4952.073 N/m**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "Q = 0.015; #rate of flow in m**3/s\n",
+ "D0 = 100*10**-3; #diameter orifice in m\n",
+ "D1 = 200*10**-3; #diameter of pipe in m\n",
+ "Cc = 0.6; #coefficient of contraction\n",
+ "Cd = 0.6; #coefficient of discharge\n",
+ "E = 1; #thermal expansion factor\n",
+ "g = 9.81; #gravitational constant \n",
+ "w = 9810;\n",
+ "\n",
+ "#calculations\n",
+ "A0 = ((math.pi)/float(4))*(D0**2); #area in m**2\n",
+ "A1 = ((math.pi)/float(4))*(D1**2); #area in m**2\n",
+ "a = (Cc*A0)/(float(A1)); \n",
+ "M = math.sqrt(1-((a)**2));\n",
+ "K = Cd/float(M);\n",
+ "x = ((Q/float(K*E*A0))**2);\n",
+ "dp = (x*w/float(2*g)); #difference in pressure head in N/m**2\n",
+ "\n",
+ "#result\n",
+ "print'difference in pressure head %3.3f'%dp,'N/m**2';\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:12.7,Page No:633"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "discharge through the orifice 0.742 m**3/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "C0 = 0.6; #coefficient of orifice\n",
+ "Cv = 0.97; #coefficient of discharge\n",
+ "Qv = 1.2; #flow rate in m**3/s\n",
+ "\n",
+ "#calculations\n",
+ "Q0 = (C0/Cv)*Qv; #discharge through the orifice in m**3/s\n",
+ "\n",
+ "#result\n",
+ "print'discharge through the orifice %3.3f'%Q0,'m**3/s'\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:12.8,Page No:634"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "velocity of submarine 25.0 km/h\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "Shl = 13.6; #specific gravity of mercury\n",
+ "Sl = 1.025; #specific gravity of sea water\n",
+ "y = 200*10**-3; #reading in m\n",
+ "g = 9.81; #constant\n",
+ "\n",
+ "#calculation\n",
+ "x = Shl/float(Sl);\n",
+ "h = (y*((x)-1)); #head\n",
+ "V = math.sqrt(2*g*h); #velocity of submarine in km/h\n",
+ "\n",
+ "#result\n",
+ "print'velocity of submarine %3.1f'%(V*(18/float(5))),'km/h';"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUTCHAPTER_8.ipynb b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUTCHAPTER_8.ipynb
new file mode 100644
index 00000000..afd03593
--- /dev/null
+++ b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUTCHAPTER_8.ipynb
@@ -0,0 +1,113 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 8:Signal Conditioning"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:8.1,Page No:491"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "total voltage gain = 138 dB\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "v1 = 100; #first stage voltage gain \n",
+ "v2 = 200; #second stage voltage gain\n",
+ "v3 = 400; #third stage voltage gain\n",
+ "\n",
+ "#calculations\n",
+ "V1 = 20*math.log10(v1); #first stage voltage gain in dB\n",
+ "V2 = 20*math.log10(v2); #second stage voltage gain in dB\n",
+ "V3 = 20*math.log10(v3); #third stage voltage gain in dB\n",
+ "V = V1+V2+V3; #total voltage gain in dB\n",
+ "\n",
+ "#result\n",
+ "print'total voltage gain = %d'%V,'dB';"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:8.2,Page No:491"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "total power gain 73.86 dB\n",
+ "resultant power gain 63.86 dB\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "G = 30; #absolute power gain \n",
+ "n = 5; #number of stages\n",
+ "G1 = 10; #negative feedback gain in dB\n",
+ "\n",
+ "#calculations\n",
+ "p1 = 10*math.log10(G); #power gain of first stage in dB\n",
+ "pt = n*p1; #total power gain in dB\n",
+ "pr = pt-G1; #resultant power gain with negative feedback in dB\n",
+ "\n",
+ "#result\n",
+ "print'total power gain %2.2f'%pt,'dB';\n",
+ "print'resultant power gain %2.2f'%pr,'dB';"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUT_CHAPTER_1__(2).ipynb b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUT_CHAPTER_1__(2).ipynb
new file mode 100644
index 00000000..b771ce52
--- /dev/null
+++ b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUT_CHAPTER_1__(2).ipynb
@@ -0,0 +1,3389 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 1:Concepts of Measurements and Electromechanical Instruments"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.1,Page No:28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "static error = 0.08 V\n",
+ "static correction = -0.08 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "Vm = 112.68; #voltmeter reading in V\n",
+ "Vt = 112.6; #true value of voltage in V\n",
+ "\n",
+ "#calculations\n",
+ "Es = Vm-Vt; #static error in V\n",
+ "Cs = -Es; #static correction in V\n",
+ "\n",
+ "#result\n",
+ "print'static error = %3.2f'%Es,'V';\n",
+ "print'static correction = %3.2f'%Cs,'V';"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.2,Page No:29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "true value = 92.28 °C\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "V = 92.35; #thermometer reading in °C\n",
+ "Cs = -0.07; #static correction in °C\n",
+ "\n",
+ "#calculations\n",
+ "Vt = V+Cs; #true value in °C\n",
+ "\n",
+ "#result\n",
+ "print'true value = %3.2f'%Vt,'°C';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.3,Page No:29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "absolute error =-0.05 V\n",
+ "relative error = 0.05 V\n",
+ "relative error = -1.85 %\n",
+ "relative error = -1.00 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "Vm = 2.65; #voltage reading in V\n",
+ "Vt = 2.70; #true voltage value in V\n",
+ "x = 5; #scale range\n",
+ "\n",
+ "#calculation\n",
+ "Es = Vm-Vt; #absolute error in V\n",
+ "Cs = -Es; #absolute correction in V\n",
+ "Er = (Es/float(Vt))*100; #relative error as a function of true value in %\n",
+ "Es1 = (Es/float(x))*100; #relative error as a function of full scale deflection in %\n",
+ "\n",
+ "#result\n",
+ "print'absolute error =%3.2f'%Es,'V';\n",
+ "print'relative error = %3.2f'%Cs,'V';\n",
+ "print'relative error = %3.2f'%(Er),'%';\n",
+ "print'relative error = %3.2f'%(Es1),'%';"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.4,Page No:29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "static error = 0.6 bar\n",
+ "static correction = -0.6 bar\n",
+ "relative error = 1.45 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "Vm = 42; #pressure reading in bar\n",
+ "Vt = 41.4; #true value of pressure in bar\n",
+ "x = 5; #scale range\n",
+ "\n",
+ "#calculations\n",
+ "Es = Vm-Vt; #static error in bar\n",
+ "Vs = -Es; #static correction in bar\n",
+ "Er = (Es/float(Vt))*100; #relative error in %\n",
+ "\n",
+ "#result\n",
+ "print'static error = %3.1f'%Es,'bar';\n",
+ "print'static correction = %3.1f'%Vs,'bar';\n",
+ "print'relative error = %3.2f'%Er,'%';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.5,Page No:29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "percentage error = 0.3 %\n",
+ "percentage error = 1.5 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "p1 = 50; #pressure range in bar\n",
+ "e = 0.15; #error in bar(indicates both in -ve and +ve value)\n",
+ "p2 = 10; #error in bar\n",
+ "\n",
+ "#calculations\n",
+ "pe1 = (e/float(p1))*100; #percentage error on basis of maximum scale value(indicates both in -ve and +ve value)\n",
+ "pe2 = (e/float(p2))*100; #percentage error on basis of maximum scale value of 10 bar(indicates both in -ve and +ve value)\n",
+ "\n",
+ "#result\n",
+ "print'percentage error = %3.1f'%pe1,'%';\n",
+ "print'percentage error = %3.1f'%pe2,'%';\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.6,Page No:30"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "error is possibly as large as 2.60 % but probably not large than 1.69 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "\n",
+ "e1 = 0.3; #accuracy limits for transmitter(indicates both in -ve and +ve value)\n",
+ "e2 = 1.4; #accuracy limits for relay(indicates both in -ve and +ve value)\n",
+ "e3 = 0.9; #accuracy limits for receiver(indicates both in -ve and +ve value)\n",
+ "\n",
+ "\n",
+ "#calculations\n",
+ "em = e1+e2+e3; #maximum possible error(indicates both in -ve and +ve value)\n",
+ "x = math.sqrt((e1**2)+(e2**2)+(e3**2)); #least root square accuracy(indicates both in -ve and +ve value)\n",
+ "\n",
+ "#result\n",
+ "print'error is possibly as large as %3.2f'%em,'%',' but probably not large than %3.2f'%x,'%'; \n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.7,Page No:31"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "maximum static error = 0.11 bar\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "r1 = 5; #pressure gauge minimum value in bar\n",
+ "r2 = 60; #pressure guage maximum value in bar\n",
+ "a = 0.2; #accuracy in percent(indicates both in -ve and +ve value)\n",
+ "\n",
+ "#calculations\n",
+ "r = r2-r1; #span of pressure gauge in bar\n",
+ "es = (a*r)/float(100); #maximum static error in bar(indicates both in -ve and +ve value)\n",
+ "\n",
+ "#result\n",
+ "print'maximum static error = %3.2f'%es,'bar';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.8,Page No:34"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 27,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "sensitivity = 2.5 *(math.pi) mm/Pa\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "d = 300; #full scale deflection in degrees\n",
+ "r = 90; #radius of scale in mm\n",
+ "p = 60; #calibration pressure in pascals\n",
+ "\n",
+ "#calculations\n",
+ "f = (d/float(180)); #full scale deflection(multiple of math.pi) in rad.\n",
+ "l = f*r; #length of scale(multiple of math.pi) in mm\n",
+ "s = l/float(p); #sensitivy in mm/pa\n",
+ "\n",
+ "#result\n",
+ "print'sensitivity = %3.1f'%s,'*(math.pi) mm/Pa';"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.9,Page No:35"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 28,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "sensitivity = 0.4 mm/Ω\n",
+ "deflection factor = 2.5 Ω/mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "d = 2.4; #change in deflection in mm\n",
+ "R = 6; #change in arm of wheatstone bridge in Ω\n",
+ "\n",
+ "#calculations\n",
+ "s = d/float(R); #sensitivity in mm/Ω\n",
+ "D = R/float(d); #deflection factor in Ω/mm\n",
+ "\n",
+ "#result\n",
+ "print'sensitivity = %3.1f'%s,'mm/Ω';\n",
+ "print'deflection factor = %3.1f'%D,'Ω/mm';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.10,Page No:35"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 29,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "deflection on the chart = 6.96 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "s1 = 6.8; #sensitivity of piezoelectric transducer in pC/bar\n",
+ "s2 = 0.0032; #sensitivity of charge amplifier in V/pC\n",
+ "s3 = 16; #sensitivity of ultraviolet charge recorder in mm/V\n",
+ "i = 20; #pressure change in bar \n",
+ "\n",
+ "#calculations\n",
+ "S = s1*s2*s3; #overall sensitivty of measuring system in mm/bar\n",
+ "O = S*i; #change of output signal in mm\n",
+ "\n",
+ "\n",
+ "#result\n",
+ "print'deflection on the chart = %3.2f'%O,'mm';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.11,Page No:37"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 30,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "smallest change = 0.3 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "Rn = 200; #range of force 0-200\n",
+ "r = 0.15; #resolution of full scale in %\n",
+ "\n",
+ "#calculations\n",
+ "s = (r*Rn)/float(100); #smallest change which can be measured in N\n",
+ "\n",
+ "#result\n",
+ "print'smallest change = %3.1f'%s,'N';\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.12,Page No:37"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 32,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "resolution = 0.1 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "V = 50; #full scale reading in V\n",
+ "d = 50; #divisions\n",
+ "y = 10; #reciprocal of scale division\n",
+ "\n",
+ "#calculations\n",
+ "x = 1/float(y); #scale division\n",
+ "s1 = V/float(d); #one scale division\n",
+ "R = x*s1; #resolution in V\n",
+ "\n",
+ "#result\n",
+ "print'resolution = %3.1f'%R,'V';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.13,Page No:37"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 33,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "resolution of digital voltmeter = 1 mV\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "f = 9.999; #full scale reading in V\n",
+ "R = 9999; #read out range in counts\n",
+ "\n",
+ "#calculations\n",
+ "r = f/float(R); #resolution of a digital voltmeter in V\n",
+ "\n",
+ "#result\n",
+ "print'resolution of digital voltmeter = %3.1d'%(r*10**3),'mV';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.14,Page No:38"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 34,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Hence a change of 0.55°C must occur before it is detected\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "t1 = 300; #calibration minimum value in °C\n",
+ "t2 = 800; #calibration minimum value in °C \n",
+ "d = 0.11; #dead zone in percent of span\n",
+ "\n",
+ "#calculations\n",
+ "s = t2-t1; #span of the pyrometr in °C\n",
+ "D = (d*s)/float(100); #dead zone in °C\n",
+ "\n",
+ "#result\n",
+ "print'Hence a change of %3.2f°C must occur before it is detected'%D,;\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.15,Page No:39"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 44,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "50.0200080032\n",
+ "loading error 24 %\n",
+ "loading error 0.040 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "Rv = 125; #internal resistance of the voltmeter in kΩ\n",
+ "Rappt = 30; #apparent resistance in kΩ\n",
+ "Rappt1 = 50; #apparent resistance in kΩ\n",
+ "v1 = 180; #voltage in V\n",
+ "i1 = 6*10**-3; #current in A\n",
+ "v2 = 60; #voltage in V\n",
+ "i2 = 1.2*10**-3; #current in A\n",
+ "\n",
+ "#calculations\n",
+ "Rt = (v1/float(i1))*10**-3; #total resistance of circuit in kΩ\n",
+ "Ract = (Rt*Rv)/float(Rv-Rt); #actual value of resistance in kΩ\n",
+ "pe = ((Ract-Rappt)/float(Ract))*100; #percentage loading error in %\n",
+ "Rt1 = (v2/float(i2))*10**-3; #total resistance of circuit in kΩ\n",
+ "Ract1 = ((Rt1*Rv)/float(Rv-(Rt1/float(1000)))); #actual value of resistance in kΩ\n",
+ "pe1 = ((Ract1-Rappt1)/float(Ract1))*100; #percentage loading error in %\n",
+ "\n",
+ "#calculations\n",
+ "print Ract1\n",
+ "print'loading error %3.0f'%pe,'%';\n",
+ "print'loading error %3.3f'%pe1,'%';\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.18,Page No:60"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 45,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "thermometers reading 67.27 °C\n",
+ "thermometers reading 78.86 °C\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration \n",
+ "Ii = 160; #input in °C\n",
+ "t1 = 1.2; #time constant in s\n",
+ "t2 = 2.2; #time constant in s\n",
+ "Iin = 20; #initial reading in °C\n",
+ "\n",
+ "#calculations\n",
+ "x = t1/float(t2); #ratio of time to time constant \n",
+ "I0 = Ii*(1-(math.exp(-x))); #thermometer's reading\n",
+ "e = math.exp(-x);\n",
+ "I1 = (Ii)+(((Iin)-(Ii))*e); #thermometer's reading if intial temperature was 20°C\n",
+ "#calculations\n",
+ "print'thermometers reading %3.2f'%I0,'°C';\n",
+ "print'thermometers reading %3.2f'%I1,'°C';\n",
+ " \n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.19,Page No:60"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 46,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "temperature after 10s is 142.4 °C\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "t1 = 5; #time constant in s\n",
+ "t2 = 10; #time constant in s\n",
+ "Iin = 30; #initial temperature in °C\n",
+ "Ii = 160; #final temperature in °C\n",
+ "\n",
+ "#calculations\n",
+ "x = t2/float(t1); #ratio of time to time constant \n",
+ "I0 = (Ii)+(((Iin)-(Ii))*(math.exp(-x))); #temperature afte 10s in °C\n",
+ "\n",
+ "#result\n",
+ "print'temperature after 10s is %3.1f'%I0,'°C'; \n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.20,Page No:60"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 48,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "time taken by the transducer = 2.08 s\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ " \n",
+ "#variable declaration\n",
+ "T = 9; #three time constant in s\n",
+ "X = 0.5; #temperature difference of I0/I1 \n",
+ "\n",
+ "#calculations\n",
+ "T1 = T/float(3); #time constant in s\n",
+ "t = -3*math.log(1-X); #time taken by the transducer in s\n",
+ "\n",
+ "#result\n",
+ "print'time taken by the transducer = %3.2f'%t,'s';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.21,Page No:61"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 49,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "resistance = 111.74 Ω\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "sg = 0.296; #steady stage gain W/°C\n",
+ "dT = 80; #change in temperature in °C\n",
+ "t = 12; #time in s\n",
+ "T = 4.8; #time constant in s\n",
+ "R = 90; #stable resistance before step change in W\n",
+ "\n",
+ "\n",
+ "#calculations\n",
+ "r = sg*dT; #step input in terms of resistance in Ω\n",
+ "Rt = r*(1-(math.exp(-t/T)))+(R); #resistance in Ω\n",
+ "\n",
+ "#result\n",
+ "print'resistance = %3.2f'%Rt,'Ω';\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.22,Page No:61"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 50,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "time constant for the thermometer = 6.12 s\n",
+ "indicated temperature after five minutes constant 139.16 °C\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "Iin = 15; #intial temperature in °C\n",
+ "Ii = 140; #temperature in °C\n",
+ "Io = 75; #temperature in °C\n",
+ "X = 5\n",
+ "\n",
+ "#calculation\n",
+ "x = (Io-Ii)/float(Iin-Ii); #change in output to input\n",
+ "t = -4/float(math.log(x)); #time constant for the thermometer in s \n",
+ "I0 = Ii+(Iin-Ii)*math.exp(-X); #indicated temperature after five minutes constant in °C\n",
+ "\n",
+ "#result\n",
+ "print'time constant for the thermometer = %3.2f'%t,'s';\n",
+ "print'indicated temperature after five minutes constant %3.2f'%I0,'°C';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.23,Page No:62"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 52,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "time constant = 19.5 s\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "Edy = 3.9; #dynamic error °C\n",
+ "phi = 0.2; #slope °C/s\n",
+ "\n",
+ "#calculation\n",
+ "T = Edy/float(phi); #time constant in s\n",
+ "\n",
+ "#result\n",
+ "print'time constant = %3.1f'%T,'s';"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.24,Page No:62"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 53,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "actual altitude 2460 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "T = 8; #time constant in s\n",
+ "rt = 5; #rate of rise of the ballon in m/s\n",
+ "T1 = 30; #temperature indicated at ana altitude of 2500 min °C\n",
+ "Rt = 0.011; #rate of temperature variation with altitude in °C/m\n",
+ "h = 2500; #height in m\n",
+ "\n",
+ "#calculations\n",
+ "y = Rt*rt; #rate of change of temperature with time in °C/s\n",
+ "Edy = y*T; #error in °C\n",
+ "e = Edy/float(Rt); #error in amplitude in m\n",
+ "a = h-e; #actual altitude in m\n",
+ "\n",
+ "#result\n",
+ "print'actual altitude %d'%a,'m';"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.25,Page No:62"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 54,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "ratio of output to input 0.8467\n",
+ "Time lag 44.64 s\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "T = 50; #time constant of thermometer on s\n",
+ "t = 500; #time period in s\n",
+ "\n",
+ "#calculations\n",
+ "w = (2*math.pi)/float(t); #frequency of temperature variaton in rad/s\n",
+ "x = 1/float(math.sqrt(1+((w*T)**2))); #ratio of output to input \n",
+ "phi = math.atan(w*T); #phase shift in rad \n",
+ "tl = (1/float(w))*phi; #time lag in s\n",
+ "\n",
+ "#result\n",
+ "print'ratio of output to input %3.4f'%x;\n",
+ "print'Time lag %3.2f'%tl,'s';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.26,Page No:63"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 55,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "variation in indicated temperature 22.15 °C\n",
+ "lag = 18.42 s\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "T = 20; #time constant in s\n",
+ "Ii = 25; #sinusoidal variation of input in °C\n",
+ "t = 4; #time in minutes\n",
+ "\n",
+ "#calculation\n",
+ "f = 1/float(t*60); #frequency in Hz\n",
+ "w = 2*math.pi*f; #angular frequency in rad./s\n",
+ "x = 1/float(math.sqrt((1+(w*T)**2))); #temperature indicated to temperature of the medium \n",
+ "I0 = x*Ii; #variation in temperature indictaed in °C(indicates both in -ve and +ve value)\n",
+ "phl = math.atan(w*T); #phase lag in rad\n",
+ "l = (1/w)*phl; #lag in seconds\n",
+ "\n",
+ "#result\n",
+ "print'variation in indicated temperature %3.2f'%I0,'°C';\n",
+ "print'lag = %3.2f'%l,'s';\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.27,Page No:64"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 56,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "maximum time constant 5.526e-05 s\n",
+ "time lag at 90 cycles per second is 5.523e-05 s\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "f = 120; #input frequency in s\n",
+ "p = 4; #amplitude accuracy permissible in %\n",
+ "x = 0.96 #temperature indicated to temperature of the medium \n",
+ "\n",
+ "#calculations\n",
+ "w = 2*math.pi*f; #angular fruequency in rad/s\n",
+ "x1 = 1/float(x);\n",
+ "t1 = ((x1)-1);\n",
+ "T = t1/(float(w)); #maximum time constant in s\n",
+ "phi = math.atan(w*T); #for sinusoidal input phi \n",
+ "tl = (1/float(w))*phi; #time lag at 90 cycles per second\n",
+ "\n",
+ "#result\n",
+ "print'maximum time constant %3.3e'%T,'s';\n",
+ "print'time lag at 90 cycles per second is %3.3e'%tl,'s';\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.28,Page No:64"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 57,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "maximum temperature = 568.68 °C\n",
+ "minimum temperature = 531.32 °C\n",
+ "phase shift = 0.899 °\n",
+ "time lag = 7.15 s\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "R1 = 520; #Range of temperature in °C\n",
+ "R2 = 580; #Range of temperature in °C\n",
+ "t = 50; #periodic time in s\n",
+ "T = 10; #time constant in s\n",
+ "Ii = 30; #initial amplitude in °C\n",
+ "\n",
+ "#calculations\n",
+ "R = (R1+R2)/float(2.0); #temperature oscillating mean value in °C\n",
+ "w = (2*math.pi)/float(t); #angular frequency in rad/s\n",
+ "X = 1/float(math.sqrt((1+(w*T)**2))); #amplitude ratio after transient effect dies away \n",
+ "I0 = X*Ii; #amplitude in °C \n",
+ "Tmax = R+I0; #maximum temperature in °C\n",
+ "Tmin = R-I0; #minimum temperature in °C\n",
+ "phi = math.atan(w*T); #phase shift in rad\n",
+ "Tl = (1/float(w))*phi; #time lag in s\n",
+ "\n",
+ "#result\n",
+ "print'maximum temperature = %3.2f'%Tmax,'°C';\n",
+ "print'minimum temperature = %3.2f'%Tmin,'°C';\n",
+ "print'phase shift = %3.3f'%phi,'°';\n",
+ "print'time lag = %3.2f'%Tl,'s';\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.29,Page No:65"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 59,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "output expression 0.0463 sin(25t-82.4 °)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "Ii = 0.35; #sinusoidal input amplitude from given expression 0.35sin(25t)\n",
+ "T = 0.3; #time constant in s\n",
+ "w = 25; #angular frequency in °,from given expression 0.35sin(25t)\n",
+ "\n",
+ "#calculations\n",
+ "\n",
+ "X = 1/float(math.sqrt((1+((w*T)**2)))); #amplitude ratio\n",
+ "I0 = X*Ii; #magnitude of output \n",
+ "phi = math.atan(w*T); #phase shift in radians\n",
+ "\n",
+ "#result\n",
+ "print'output expression %3.4f'%I0,'sin(25t-%3.1f'%((phi*180)/float(math.pi)),'°)';\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.30,Page No:66"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 60,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "maximum value of temperature indicated 6.82 °C\n",
+ "Time lag = 35.12 s\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "T1 = 18; #time constant for the bulb in s\n",
+ "T2 = 36; #time constant for the well in s\n",
+ "t = 120; #time in s\n",
+ "Temp = 20; #rate of change in temperature in °C\n",
+ "\n",
+ "#calculation\n",
+ "w = (2*math.pi)/float(t);\n",
+ "X1 = 1/float(math.sqrt((1+(w*T1)**2))); #amplitude ratio of first system \n",
+ "X2 = 1/float(math.sqrt((1+(w*T2)**2))); #amplitude for second system \n",
+ "X = X1*X2; #amplitude for double capacity system\n",
+ "Tmax = Temp*X; #maximum temperature in °C(indicates both in -ve and +ve value)\n",
+ "Al = math.atan(w*T1)+math.atan(w*T2); #angle of lag in rad\n",
+ "Tl = (1/float(w))*Al; #time lag in s\n",
+ "\n",
+ "#result\n",
+ "print'maximum value of temperature indicated %3.2f'%Tmax,'°C';\n",
+ "print'Time lag = %3.2f'%Tl,'s';"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.31,Page No:66"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 61,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "output expression 0.857 sin(2t-30.96 °) + 0.316 sin(10t-71.57 °)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "T = 0.3; #time constant in s\n",
+ "I1 = 2; #sinusoidal input amplitude from given expression 2sin(2t)+0.5sin(10t)\n",
+ "w1 = 2; #angular frequency in °,from given expression 2sin(2t)+0.5sin(10t)\n",
+ "I2 = 0.5; #sinusoidal input amplitude from given expression 2sin(2t)+0.5sin(10t)\n",
+ "w2 = 10; #angular frequency in °,from given expression 2sin(2t)+0.5sin(10t)\n",
+ "\n",
+ "#calculations\n",
+ "X1 = 1/float(math.sqrt((1+((w1*T)**2)))); #magnitude of output \n",
+ "phi1 = math.atan(w1*T); #phase shift in radians\n",
+ "X2 = 1/float(math.sqrt((1+((w2*T)**2)))); #magnitude of output\n",
+ "phi2 = math.atan(w2*T); #phase shift in radians\n",
+ "\n",
+ "#result\n",
+ "\n",
+ "print'output expression %3.3f'%X1,'sin(2t-%3.2f' %((phi1*180)/float(math.pi)),'°)','+ %3.3f'%X2,'sin(10t-%3.2f' %((phi2*180)/float(math.pi)),'°)';\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.32,Page No:67"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 63,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "output expression 1.916 sin(2t-16.7 °) - 0.128 sin(8t+180-50.19 °)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "T = 0.15; #time constant in s\n",
+ "I1 = 2; #sinusoidal input amplitude from given expression 2sin(2t)+0.5cos(8t) or 2sin(2t)-0.5sin(180-8t) \n",
+ "w1 = 2; #angular frequency in °,from given expression 2sin(2t)+0.5sin(8t) or 2sin(2t)-0.5sin(180-8t)\n",
+ "I2 = 0.2; #sinusoidal input amplitude from given expression 2sin(2t)+0.5sin(8t) or 2sin(2t)-0.5sin(180-8t)\n",
+ "w2 = 8; #angular frequency in °,from given expression 2sin(2t)+0.5sin(8t) or 2sin(2t)-0.5sin(180-8t)\n",
+ "\n",
+ "#calculations\n",
+ "X1 = 1/float(math.sqrt((1+((w1*T)**2)))); #amplitude ratio\n",
+ "I01 = X1*I1; #magnitude of output \n",
+ "phi1 = math.atan(w1*T); #phase shift in radians\n",
+ "X2 = 1/float(math.sqrt((1+((w2*T)**2)))); #amplitude ratio\n",
+ "I02 = X2*I2; #magnitude of output\n",
+ "phi2 = math.atan(w2*T); #phase shift in radians\n",
+ "\n",
+ "#result\n",
+ "\n",
+ "print'output expression %3.3f'%I01,'sin(2t-%3.1f' %((phi1*180)/float(math.pi)),'°)','- %3.3f'%I02,'sin(8t+180-%3.2f' %((phi2*180)/float(math.pi)),'°)';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.34,Page No:68"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 64,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "percentage reduction in mass 24.4 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "m1 = 4.5; # mass in g\n",
+ "p = 1.15; #percentage increase requiredd in %\n",
+ "\n",
+ "#formula\n",
+ "#wn2 = p*wn1\n",
+ "#m2 = m1*(wn2/wn1)\n",
+ "x = (1/float(p))**2;\n",
+ "#m2 = m1*x\n",
+ "#percentage reduction = (m1-m2)/m1\n",
+ "# p = (m1-x*m1)/m1\n",
+ "m3 = ((1-x)/float(1))*100; #percentage reduction in mass(%)\n",
+ "\n",
+ "\n",
+ "#result\n",
+ "print'percentage reduction in mass %3.1f'%m3,'%'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.35,Page No:69"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 66,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "damping ratio = 0.274\n",
+ "damped natural frequency = 5.268 rad/s\n",
+ "static sensitivity = 1\n",
+ "time constant = 0.1826 s\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "wn = 5.477; #natural frequency\n",
+ "k1 = 0.1; #ratio of 2*gamma/wn\n",
+ "k = 1; #static sensitivity \n",
+ "\n",
+ "#calculations\n",
+ "gamma = (k1*wn)/float(2); #damping ratio\n",
+ "y = (1-(gamma**2)); #damped natural frequency in rad/s\n",
+ "wd = wn*math.sqrt(y); #static sensitivity\n",
+ "t = 1/float(wn); #time constant in s\n",
+ "\n",
+ "#result\n",
+ "print'damping ratio = %3.3f'%gamma;\n",
+ "print'damped natural frequency = %3.3f'%wd,'rad/s';\n",
+ "print'static sensitivity =%3.0f'%k;\n",
+ "print'time constant = %3.4f'%t,'s';"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.36,Page No:70"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 67,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "natural frequency = 2.95 rad/s\n",
+ "damping ratio 0.556\n",
+ "damped natural frequency 2.454 rad/s\n",
+ "time constant 0.339 s\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "w = 1.95; #angular frequency in rad/s\n",
+ "em = 8; #maximum permissible error in %\n",
+ "J = 0.14; #moment of inertia of load in kg m**2\n",
+ "q = 1.22; #torsional constant of the shaft in Nm/rad\n",
+ "M = 1.08; #amplitude ratio \n",
+ "\n",
+ "#calculations\n",
+ "wn = math.sqrt(q/float(J)); #natural frequency in rad/s\n",
+ "r = w/float(wn); #normalised frequency ratio\n",
+ "x = 1/float(M**2); \n",
+ "gamma =math.sqrt((x-((1-r**2)**2))/float(2*r)**2); #damping ratio \n",
+ "wd = wn*(math.sqrt(1-(gamma**2))); #damped natural frequency in rad/s\n",
+ "T = 1/float(wn); #time constant in s\n",
+ "\n",
+ "#result\n",
+ "print'natural frequency = %3.2f'%wn,'rad/s';\n",
+ "print'damping ratio %3.3f'%gamma;\n",
+ "print'damped natural frequency %3.3f'%wd,'rad/s';\n",
+ "print'time constant %3.3f'%T,'s';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.37,Page No:71"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 68,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "effective damping ratio = 0.56\n",
+ "undamped natural frequency = 2.74 Hz\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "po =12; #percentage overshoot in %\n",
+ "Tr = 0.22; #rise time in s\n",
+ "\n",
+ "#calculations\n",
+ "x = -math.log(12/float(100)); \n",
+ "gamma = x/float(math.sqrt((x**2)+(math.pi**2))); #effective damping ratio \n",
+ "wd = math.pi/float(Tr); #damped natural frequency in rad/s\n",
+ "wn = wd/float(math.sqrt(1-(gamma**2))); #undamped angular frequency in rad/s\n",
+ "fn = wn/float(2*math.pi); #undamped natural frequency in Hz\n",
+ " \n",
+ "#result\n",
+ "print'effective damping ratio = %3.2f'%gamma;\n",
+ "print'undamped natural frequency = %3.2f'%fn,'Hz';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.38,Page No:73"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 70,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "natural frequency 1.4\n",
+ "amplitude ratio 0.504\n",
+ "error = 49.6 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "gamma = 0.62; #damping ratio \n",
+ "fn = 5; #natural frequency in Hz\n",
+ "f = 7; #exicitation frequency in Hz\n",
+ " \n",
+ "#calculations\n",
+ "r = f/float(fn); #ratio of excitation frequency tonatural frequency\n",
+ "M = 1/float(math.sqrt(((1-(r**2))**2)+((2*gamma*r)**2))); #amplitude ratio\n",
+ "e = (1-M)*100; #error in %\n",
+ "\n",
+ "#result\n",
+ "print'natural frequency %3.1f'%r;\n",
+ "print'amplitude ratio %3.3f'%M;\n",
+ "print'error = %3.1f'%e,'%';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.39,Page No:73 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 73,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "the deviation remains within 12 percent of output for the frequency range 0 - 723.09 cps\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "fn = 800; #natural frequency of the system in cps\n",
+ "gamma = 62; #damping ratio per cent\n",
+ "d = 12; #maximum amount of deviation of amplitude ratio in per cent\n",
+ "M = 1.12; \n",
+ "M1 =0.88;\n",
+ "\n",
+ "#calculations\n",
+ "#M = 1/math.sqrt(((1-r**2)**2)+((2*0.62*r)**2));\n",
+ "x = (1/float(M))**2;\n",
+ "#1+(r**4)-(2*r**2)+(1.58*(r**2))=x\n",
+ "#r**4-((0.462)*(r**2))+0.203 =0\n",
+ "y = (1/float(M1))**2\n",
+ "#1+(r**4)-(2*r**2)+(1.58*(r**2))=y\n",
+ "#r**4-(0.462*(r**2))-0.29=0\n",
+ "x = math.sqrt((0.462**2)+(4*0.29));\n",
+ "r1 = (0.462+x)/float(2);\n",
+ "r = math.sqrt(r1);\n",
+ "f = fn*r;\n",
+ "\n",
+ "#result\n",
+ "print'the deviation remains within 12 percent of output for the frequency range 0 - %3.2f'%f,'cps';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example:1.40,Page No:74"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 74,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "required expresssion for the output is 0.495 sin(3.77t-69.00°)\n",
+ "output ampliude 0.495\n",
+ "output frequency 3.77\n",
+ "phase lag 69.00 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "f = 0.6; #frequency in rad/s\n",
+ "m = 1; #magnitude of input\n",
+ "a = 3.77; #angle value from sin(3.77t)\n",
+ "\n",
+ "#calculations\n",
+ "w = 2*math.pi*f; #angular frequency\n",
+ "#x = complex(8/float(((j*w)**2)+(4*j*w)+20));\n",
+ "x1 =(-(w**2)+20)/float(8);\n",
+ "y1 = (4*w)/float(8);\n",
+ "x = (complex(x1,y1));\n",
+ "X = abs(x);\n",
+ "phi = ((math.atan(y1/float(x1)))*180)/(math.pi); #phase lag in rad\n",
+ "m = (1/float(2.02))*m;\n",
+ "\n",
+ "#result\n",
+ "print'required expresssion for the output is %3.3f'%m,'sin(3.77t-%3.2f°)'%phi;\n",
+ "print'output ampliude %3.3f'%m;\n",
+ "print'output frequency %3.2f'%a;\n",
+ "print'phase lag %3.2f'%phi,'°';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.41,Page No:75"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 75,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "when the error is specified as a percentage of full scale deflection,the wattmeter reading may be between 42.5 to 57.5 W\n",
+ "when the error is specified as a percentage of true value,the wattmeter reading may be between 49.25 to 50.75 W\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "R = 500; #range of wattemeter in W\n",
+ "e = 1.5; #percentage of full scale deflection rantging -1.5 to +1.5\n",
+ "Qs = 50; #true or specified power in W\n",
+ "me1 = 7.5; #percentage of full scale deflection indicating -7.5 to +7.5\n",
+ "\n",
+ "#calculations\n",
+ "me = (e/float(100))*R; #magnitude of limiting error at full scale in W ranging -me to +me\n",
+ "Rmax = Qs+me; #maximum wattmeter reading may be Rmax in W\n",
+ "Rmin = Qs-me; #minimum wattmeter reading may be Rmin in W\n",
+ "Er = (me1/float(Qs))*100; #relative error in %\n",
+ "Em = ((e*Qs)/float(100));\n",
+ "Mmax = Qs+Em; #maximum wattmeter reading may be Mmax in W\n",
+ "Mmin = Qs-Em; #minimum wattmeter reading may be Mmin in W\n",
+ "\n",
+ "#result\n",
+ "print'when the error is specified as a percentage of full scale deflection,the wattmeter reading may be between %3.1f'%Rmin,'to %3.1f'%Rmax,'W';\n",
+ "print'when the error is specified as a percentage of true value,the wattmeter reading may be between %3.2f'%Mmin,'to %3.2f'%Mmax,'W';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.42,Page No:76"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 77,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "percentage limiting error = 6.00 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "Er = 3; #accuracy of flow meter of full scale reading in % ranging -Er to +Er\n",
+ "Qs = 2.5*10**-6; #full scale reading in m**3/s\n",
+ "Qs1 = 1.25*10**-6; #flow measured by the meter in m**3/s\n",
+ "\n",
+ "#calculations\n",
+ "dQ = (Er/float(100))*Qs; #magnitude of limiting error ranging -dQ to +dQ in m**3/s\n",
+ "Er1 = dQ/float(Qs1); #relative error \n",
+ "Q1 = Qs1*(1); #flow rate in m**3/s\n",
+ "Q2 = Qs1*Er1; #flow rate in m**3/s\n",
+ "Er2 = (Q2/float(Q1))*100; #percentage limiting error ranging -Er2 to +Er1 in %\n",
+ "\n",
+ "#result\n",
+ "\n",
+ "print'percentage limiting error = %3.2f'%Er2,'%';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "##Example:1.43,Page No:77"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 82,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "limting value of resultant reistance is 140.40 and 129.60 Ω\n",
+ "percent limiting error of the series combination of resistance 4.00 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "R1 = 25; #resitance in Ω\n",
+ "R2 = 65; #resitance in Ω\n",
+ "R3 = 45; #resitance in Ω\n",
+ "e1 = 4; #limiting error indicating both in -ve and +ve values in %\n",
+ "e2 = 4; #limiting error indicating both in -ve and +ve values in %\n",
+ "e3 = 4; #limiting error indicating both in -ve and +ve values in % \n",
+ "\n",
+ "#calculations\n",
+ "e11 = (e1*R1)/float(100); #error value indicating both in -ve and +ve values\n",
+ "e21 = (e2*R2)/float(100); #error value indicating both in -ve and +ve values\n",
+ "e31 = (e3*R3)/float(100); #error value indicating both in -ve and +ve values\n",
+ "R = R1+R2+R3; #magnitude of resitance in Ω\n",
+ "e = e11+e21+e31; #error indicating both in -ve and +ve values\n",
+ "Rmax = R+e;\n",
+ "Rmin = R-e;\n",
+ "p =((e)/float(R))*100; #percent limiting error of the series combination of resistance in %(indicating both in -ve and +ve values)\n",
+ "\n",
+ "\n",
+ "#result\n",
+ "print'limting value of resultant reistance is %3.2f'%Rmax,' and %3.2f'%Rmin,' Ω';\n",
+ "print'percent limiting error of the series combination of resistance %3.2f'%p,'%';"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.44,Page No:78"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 83,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "limiting error in the measurement of resistance 2.80 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "x = 1.2; #limiting error in the measurement of power(dP/p) in % \n",
+ "y = 0.8; #limiting error in the measurement of current(dI/I) in %\n",
+ "\n",
+ "#calculations\n",
+ "z = (x+(2*y)); #limiting error in the measurement of resistance(dR/R) indicating -z to +z in %\n",
+ "\n",
+ "#result\n",
+ "print'limiting error in the measurement of resistance %3.2f'%z,'%';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.45,Page No:78"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 84,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "magnitude of unknown resitance= 4400.00 Ω\n",
+ "relative limiting error 1.50 %;\n",
+ "limiting error 66.00 Ω\n",
+ "the guaranteed values of resitance lie between 4334.00 and 4466.00 Ω\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "R1 = 50; #resistance in Ω\n",
+ "R2 = 500; #resistance in Ω\n",
+ "R3 = 440; #resistance in Ω\n",
+ "dR1 = 0.5; #limiting error(dR1/R1) of R1 ranging -dR1 to +dR1 in %\n",
+ "dR2 = 0.5; #limiting error(dR2/R2) of R1 ranging -dR2 to +dR2 in %\n",
+ "dR3 = 0.5; #limiting error(dR3/R3) of R1 ranging -dR3 to +dR3 in %\n",
+ "\n",
+ "#calculations\n",
+ "R4 = (R2*R3)/float(R1); #unknoen resistance in Ω\n",
+ "x = (dR1+dR2+dR3); #relative limiting error of unknown resistance ranging -x to +x in %\n",
+ "e = (x*R4)/float(100); #limiting error(Ω) indcating -ve and +ve values \n",
+ "Rmax = R4+e; #maximum value of resitance in Ω\n",
+ "Rmin = R4-e; #minimum value of resistance in Ω\n",
+ "\n",
+ "#result\n",
+ "print'magnitude of unknown resitance= %3.2f'%R4,'Ω';\n",
+ "print'relative limiting error %3.2f'%x,'%;'\n",
+ "print'limiting error %3.2f'%e,'Ω';\n",
+ "print'the guaranteed values of resitance lie between %3.2f'%Rmin,'and %3.2f'%Rmax,'Ω';\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.46,Page No:78"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 85,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "limiting error in force 0.2918 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration \n",
+ "db = 0.01; #accuracy of width ranging -db to +db\n",
+ "b = 4.5; #width in mm\n",
+ "dd = 0.01; #accuracy of depth ranging -dd to +dd\n",
+ "d = 0.9; #depth in mm\n",
+ "dl = 0.01; #accuracy of length ranging -dl to +dl\n",
+ "l = 45; #length in mm\n",
+ "x = 0.2; #modulus of rigidity(dE/E) in %\n",
+ "dy = 0.1; #accuracy of deflection ranging -dy to +dy\n",
+ "y = 1.8; #deflection in mm\n",
+ "\n",
+ "#calculations \n",
+ "f = (x+(db/float(b))+(3*(dd/float(d)))+(3*(dl/float(l)))+(dy/float(y))); #limiting error in force(dF/F) ranging -f to +f in %\n",
+ "\n",
+ "#result\n",
+ "print'limiting error in force %3.4f'%f,'%';"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.47,Page No:79"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 86,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "magnitude of power = 1.993 kW\n",
+ "magnitude of limiting error 0.0339 kW\n",
+ "magnitude of limiting error can lie between 2.03 and 1.96 kW\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "F = 4.26; #force at the end of torque arm in kg\n",
+ "dF = 0.02; #error in force ranging -dF to +dF in kg \n",
+ "L = 382; #length of torque arm in mm\n",
+ "dL = 1.2; #error in length ranging -dL to +dL in mm\n",
+ "R = 1192; #number of revolutions during time t\n",
+ "dR = 1.0; #error in number of revolutions \n",
+ "t = 60; #time for test run in s\n",
+ "dt = 0.5; #error in time in s\n",
+ "\n",
+ "#calculations\n",
+ "P = (2*math.pi*9.81*F*L*R)/float(t*10**6); #magnitude of power in kW\n",
+ "p = ((dF/float(F))+(dL/float(L))+(dR/float(R))+(dt/float(t))); #limiting error(dP/P) computed ranging -p to +p\n",
+ "dp = p*P; #limiting error in kW\n",
+ "Pmax = P+dp; #maximum value of power in kW\n",
+ "Pmin = P-dp; #minimum value of power in kW\n",
+ "\n",
+ "#result\n",
+ "print'magnitude of power = %3.3f'%P,'kW';\n",
+ "print'magnitude of limiting error %3.4f'%dp,'kW';\n",
+ "print'magnitude of limiting error can lie between %3.2f'%Pmax,'and %3.2f'%Pmin,'kW';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.48,Page No:80"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 87,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "power percentage to original power 101.96 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "I = 26.5; #current in A\n",
+ "Ix = 1.1; #ammeter reading was low by Ix\n",
+ "R = 0.12; #resistance in Ω\n",
+ "Rx = 0.25; #resistance reading was high by Rx\n",
+ "\n",
+ "#calculations\n",
+ "It = I*((1+(Ix/float(100)))); #true value of current in A\n",
+ "Rt = R*((1-(Rx/float(100)))); #true value of resistance in Ω\n",
+ "Pt = (It**2)*Rt; #true value of power in W\n",
+ "Pm = (I**2)*R; #measured value of power in W\n",
+ "P = (Pt/float(Pm))*100; #power percentage of that originally calculated in %\n",
+ "\n",
+ "#result\n",
+ "print'power percentage to original power %3.2f'%P,'%';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.49,Page No:87"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 88,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "arthimetic mean 1.461 mm\n",
+ "average deviation 0.065\n",
+ "standard deviation 0.08075 mm\n",
+ "variance 0.00652 mm**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#varioable declaration\n",
+ "q1 = 1.34; #micrometer reading in mm\n",
+ "q2 = 1.38; #micrometer reading in mm\n",
+ "q3 = 1.56; #micrometer reading in mm\n",
+ "q4 = 1.47; #micrometer reading in mm\n",
+ "q5 = 1.42; #micrometer reading in mm\n",
+ "q6 = 1.44; #micrometer reading in mm\n",
+ "q7 = 1.53; #micrometer reading in mm\n",
+ "q8 = 1.48; #micrometer reading in mm\n",
+ "q9 = 1.40; #micrometer reading in mm\n",
+ "q10 = 1.59; #micrometer reading in mm\n",
+ "n = 10; #number of readings\n",
+ "\n",
+ "#calculations\n",
+ "q = (q1+q2+q3+q4+q5+q6+q7+q8+q9+q10)/float(10); #arthmetic mean in mm\n",
+ "d1 = q1-q; #derivation in mm\n",
+ "d2 = q2-q; #derivation in mm\n",
+ "d3 = q3-q; #derivation in mm\n",
+ "d4 = q4-q; #derivation in mm\n",
+ "d5 = q5-q; #derivation in mm\n",
+ "d6 = q6-q; #derivation in mm\n",
+ "d7 = q7-q; #derivation in mm\n",
+ "d8 = q8-q; #derivation in mm\n",
+ "d9 = q9-q; #derivation in mm\n",
+ "d10 = q10-q; #derivation in mm\n",
+ "d = (abs(d1)+abs(d2)+abs(d3)+abs(d4)+abs(d5)+abs(d6)+abs(d7)+abs(d8)+abs(d9)+abs(d10))/float(n); #average deviation in mm\n",
+ "s = math.sqrt(((d1**2)+(d2**2)+(d3**2)+(d4**2)+(d5**2)+(d6**2)+(d7**2)+(d8**2)+(d9**2)+(d10**2))/float(n-1)); #standard deviation in mm\n",
+ "V = s**2; #variance in mm**2\n",
+ "\n",
+ "#result\n",
+ "print'arthimetic mean %3.3f'%q,'mm';\n",
+ "print'average deviation %3.3f'%d;\n",
+ "print'standard deviation %3.5f'%s,'mm';\n",
+ "print'variance %3.5f'%V,'mm**2';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.50,Page No:88"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 90,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "arthimetic mean 419.62 kHz\n",
+ "average deviation 5.75 kHz\n",
+ "standard deviation 6.55 kHz\n",
+ "variance 42.95 kHz**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "q1 = 412; #resonant frequency in KHz\n",
+ "q2 = 428; #resonant frequency in KHz\n",
+ "q3 = 423; #resonant frequency in KHz\n",
+ "q4 = 415; #resonant frequency in KHz\n",
+ "q5 = 426; #resonant frequency in KHz\n",
+ "q6 = 411; #resonant frequency in KHz\n",
+ "q7 = 423; #resonant frequency in KHz\n",
+ "q8 = 416; #resonant frequency in KHz\n",
+ "n = 8; #number of readings \n",
+ "\n",
+ "#calculations\n",
+ "q = (q1+q2+q3+q4+q5+q6+q7+q8+q9+q10)/float(n); #arthimetc mean in khz\n",
+ "d1 = q1-q; #deviation in kHz\n",
+ "d2 = q2-q; #deviation in kHz\n",
+ "d3 = q3-q; #deviation in kHz\n",
+ "d4 = q4-q; #deviation in kHz\n",
+ "d5 = q5-q; #deviation in kHz\n",
+ "d6 = q6-q; #deviation in kHz\n",
+ "d7 = q7-q; #deviation in kHz\n",
+ "d8 = q8-q; #deviation in kHz\n",
+ "d = (abs(d1)+abs(d2)+abs(d3)+abs(d4)+abs(d5)+abs(d6)+abs(d7)+abs(d8))/float(n); #average deviation in kHz\n",
+ "s = math.sqrt(((d1**2)+(d2**2)+(d3**2)+(d4**2)+(d5**2)+(d6**2)+(d7**2)+(d8**2))/float(n-1)); #standard deviation in k Hz\n",
+ "V = s**2; #variance in (kHz)**2\n",
+ "\n",
+ "#result\n",
+ "print'arthimetic mean %3.2f'%q,'kHz';\n",
+ "print'average deviation %3.2f'%d,'kHz';\n",
+ "print'standard deviation %3.2f'%s,'kHz';\n",
+ "print'variance %3.2f'%V,'kHz**2';\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.51,Page No:94"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 92,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "arthimetic mean 39.87 °C\n",
+ "standard deviation 0.22136 °C\n",
+ "probable error = 0.15 °C\n",
+ "probable error of mean 0.05 °C\n",
+ "range 0.80 °C\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#varioable declaration\n",
+ "q1 = 39.6; #temperature reading °C\n",
+ "q2 = 39.9; #temperature reading °C\n",
+ "q3 = 39.7; #temperature reading °C\n",
+ "q4 = 39.9; #temperature reading °C\n",
+ "q5 = 40.0; #temperature reading °C\n",
+ "q6 = 39.8; #temperature reading °C\n",
+ "q7 = 39.9; #temperature reading °C\n",
+ "q8 = 39.8; #temperature reading °C\n",
+ "q9 = 40.4; #temperature reading °C\n",
+ "q10 = 39.7; #temperature reading °C\n",
+ "n = 10; #number of observations\n",
+ "\n",
+ "#calculations\n",
+ "q = (q1+q2+q3+q4+q5+q6+q7+q8+q9+q10)/float(10); #arthimetic mean in °C\n",
+ "d1 = q1-q; #deviation in °C\n",
+ "d2 = q2-q; #deviation in °C\n",
+ "d3 = q3-q; #deviation in °C\n",
+ "d4 = q4-q; #deviation in °C\n",
+ "d5 = q5-q; #deviation in °C\n",
+ "d6 = q6-q; #deviation in °C\n",
+ "d7 = q7-q; #deviation in °C\n",
+ "d8 = q8-q; #deviation in °C\n",
+ "d9 = q9-q; #deviation in °C\n",
+ "d10 = q10-q; #deviation in °C\n",
+ "R1 = 40.4; #maximum value of temperature in °C\n",
+ "R2 = 39.6; #minimum value of temperature in °C\n",
+ "s = math.sqrt(((d1**2)+(d2**2)+(d3**2)+(d4**2)+(d5**2)+(d6**2)+(d7**2)+(d8**2)+(d9**2)+(d10**2))/float(n-1)); #standard deviation in °C\n",
+ "r1 = 0.6745*s; #probable error of one reading in °C\n",
+ "rm = r1/math.sqrt(float(n-1)); #probable error of mean in °C\n",
+ "R = R1-R2; #range in °C\n",
+ "#result\n",
+ "print'arthimetic mean %3.2f'%q,'°C';\n",
+ "print'standard deviation %3.5f'%s,'°C';\n",
+ "print'probable error = %3.2f'%r1,'°C';\n",
+ "print'probable error of mean %3.2f'%rm,'°C';\n",
+ "print'range %3.2f'%R,'°C';\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.52,Page No:96"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 94,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "arthimetic mean = 200.77 °C\n",
+ "average deviation = 1.096 °C\n",
+ "standard deviation = 1.482 °C\n",
+ "variance = 2.197 °C**2\n",
+ "probable error of one reading = 1 °C\n",
+ "probable error of the mean = 0.1 °C\n",
+ "standard deviation of the standard deviation = 0.1048 °C\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "T1 = 197; #temperature reading °C\n",
+ "T2 = 198; #temperature reading °C\n",
+ "T3 = 199; #temperature reading °C\n",
+ "T4 = 200; #temperature reading °C\n",
+ "T5 = 201; #temperature reading °C\n",
+ "T6 = 202; #temperature reading °C\n",
+ "T7 = 203; #temperature reading °C\n",
+ "T8 = 204; #temperature reading °C\n",
+ "T9 = 205; #temperature reading °C\n",
+ "f1 = 2; #frequency of occurence \n",
+ "f2 = 4; #frequency of occurence \n",
+ "f3 = 10; #frequency of occurence \n",
+ "f4 = 24; #frequency of occurence \n",
+ "f5 = 36; #frequency of occurence \n",
+ "f6 = 14; #frequency of occurence \n",
+ "f7 = 5; #frequency of occurence \n",
+ "f8 = 3; #frequency of occurence \n",
+ "f9 = 2; #frequency of occurence \n",
+ "\n",
+ "\n",
+ "#calculations\n",
+ "t1 = T1*f1;\n",
+ "t2 = T2*f2;\n",
+ "t3 = T3*f3;\n",
+ "t4 = T4*f4;\n",
+ "t5 = T5*f5;\n",
+ "t6 = T6*f6;\n",
+ "t7 = T7*f7;\n",
+ "t8 = T8*f8;\n",
+ "t9 = T9*f9;\n",
+ "n = (f1+f2+f3+f4+f5+f6+f7+f8+f9); \n",
+ "AM = (t1+t2+t3+t4+t5+t6+t7+t8+t9)/float(n); #arthimetic mean in °C\n",
+ "tf = (t1+t2+t3+t4+t5+t6+t7+t8+t9)/float(n);\n",
+ "d1 = T1-tf;\n",
+ "d2 = T2-tf;\n",
+ "d3 = T3-tf;\n",
+ "d4 = T4-tf;\n",
+ "d5 = T5-tf;\n",
+ "d6 = T6-tf;\n",
+ "d7 = T7-tf;\n",
+ "d8 = T8-tf;\n",
+ "d9 = T9-tf;\n",
+ "x1 = d1*f1;\n",
+ "x2 = d2*f2;\n",
+ "x3 = d3*f3;\n",
+ "x4 = d4*f4;\n",
+ "x5 = d5*f5;\n",
+ "x6 = d6*f6;\n",
+ "x7 = d7*f7;\n",
+ "x8 = d8*f8;\n",
+ "x9 = d9*f9;\n",
+ "x = abs(x1)+abs(x2)+abs(x3)+abs(x4)+abs(x5)+abs(x6)+abs(x7)+abs(x8)+abs(x9);\n",
+ "y1 = f1*(d1**2);\n",
+ "y2 = f2*(d2**2);\n",
+ "y3 = f3*(d3**2);\n",
+ "y4 = f4*(d4**2);\n",
+ "y5 = f5*(d5**2);\n",
+ "y6 = f6*(d6**2);\n",
+ "y7 = f7*(d7**2);\n",
+ "y8 = f8*(d8**2);\n",
+ "y9 = f9*(d9**2);\n",
+ "y = y1+y2+y3+y4+y5+y6+y7+y8+y9;\n",
+ "sigma = x/float(n); #average deviation in °C\n",
+ "sd = math.sqrt(y/float(n)); #standard deviation in °C\n",
+ "V = sd**2; #variance in °C**2\n",
+ "r1 = 0.6745*sd; #probable error of one reading in °C\n",
+ "rm = r1/float(math.sqrt(n)); #probable error of mean in °C\n",
+ "sigmam = sd/float(math.sqrt(n)); #standard deviation of the mean in °C\n",
+ "sigmasd = sigmam/float(math.sqrt(2)); #standard deviation of standard deviation in °C\n",
+ "\n",
+ "#result\n",
+ "print'arthimetic mean = %3.2f'%AM,'°C';\n",
+ "print'average deviation = %3.3f'%sigma,'°C';\n",
+ "print'standard deviation = %3.3f'%sd,'°C';\n",
+ "print'variance = %3.3f'%V,'°C**2';\n",
+ "print'probable error of one reading = %3.0f'%r1,'°C';\n",
+ "print'probable error of the mean = %3.1f'%rm,'°C';\n",
+ "print'standard deviation of the standard deviation = %3.4f'%sigmasd,'°C';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example:1.53,Page No:97"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 96,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "thus about 57 % of readings are within -1.2A to 1.2A of the true value\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "I = 80; #current in A\n",
+ "p = 0.2; #p(y) value given \n",
+ "x = 0.8; #probabiltiy of error \n",
+ "y = 0.5248; #y valu from probability tables for sorresponding p(y) value\n",
+ "x1 = 1.2; #probabiltiy of error\n",
+ "\n",
+ "#calculation\n",
+ "sigma = (x/float(y)); #standard eviation\n",
+ "y1 = x1/float(sigma); \n",
+ "#p(y) value corresponding to y1 value from probabitiy table is 0.2842\n",
+ "p1 = 0.2842;\n",
+ "P = (2*p1)*100; #probabity of an error \n",
+ "\n",
+ "#result\n",
+ "print'thus about %3.0f'%P,'% of readings are within -1.2A to 1.2A of the true value';"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.54,Page No:97"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 99,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "number of readings exceeding maximum deflection of 25mm is 16 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "x1 =25; #deflaction in mm\n",
+ "x2 = 21.9; #deflaction in mm\n",
+ "r = 2.1; #probable error in mm\n",
+ "\n",
+ "#calculations\n",
+ "x = x1-x2; #deviation in mm\n",
+ "sigma = r/float(0.6745); #standard deviation\n",
+ "y = x/float(sigma); #ratio \n",
+ "n = 2*0.341*100; \n",
+ "ne = 100-n; #number of readings exceeding a deviation of 3.1\n",
+ "nx = ne/float(2); #number of readings exceeding maximum deflection of 25mm in mm\n",
+ "\n",
+ "#result\n",
+ "print'number of readings exceeding maximum deflection of 25mm is %3.0f'%nx,'mm';\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.55,Page No:98"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 100,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "total number of rods whose length between specified limits is 8953\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "#in case of me of normal distribution .thereis equal probability of +ve and -ve errors\n",
+ "n1 = 5000; #number of rods having length greater than 20 mm\n",
+ "n2 = 1000; #number of rods having length greater than 20.25 mm\n",
+ "n3 = 5000; #number of rods having length smaller than 20 mm\n",
+ "y = 1.3; #from probability tables ,corresponding to the probability of p(y) \n",
+ "x1 = 20.25; #maximum length of rod ,that should not be exceed in mm\n",
+ "x2 = 20.0; #nominal length in mm\n",
+ "x4 = 19.5; #minimum length of rod ,that should not be smmaler than this value in mm\n",
+ "y2 = 0.4953; #from probability tables ,corresponding to the y value \n",
+ "\n",
+ "#calculations\n",
+ "n4 = n1-n2; #number of rods wehere length lies between 20mm and 20.25\n",
+ "x = x1-x2; #probability that 4000 rods have a value greater than 20mm and less than 20.25mm\n",
+ "sigma = x/float(y); #standard deviation\n",
+ "y1 = (x2-x4)/float(sigma); #y value for with nominal length of 19.5mm and 20mm\n",
+ "n = (n1+n3)*y2; #number of rods that have lengths between 19.5 and 20mm\n",
+ "N = n+n4; #total number of rods whose length between specified limits \n",
+ "\n",
+ "#result\n",
+ "print'total number of rods whose length between specified limits is %3.0f'%N;\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.56,Page No:98"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 102,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "we expect 12 readings to lie between 1485 to 1515 rpm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "q = 1515; #tachometer reading in rpm\n",
+ "q1 = 1500; #tachometer reading in rpm\n",
+ "h = 0.04; #precision index\n",
+ "p = 0.3015; #p(y) value from probability table corresponding to y value\n",
+ "n =20; #number of readings\n",
+ "\n",
+ "#calculations\n",
+ "x = q-q1; #deviation in r.p.m(indicates in both -ve and +ve value)\n",
+ "sigma = 1/float((math.sqrt(2))*h); #standard deviation\n",
+ "y = x/float(sigma); \n",
+ "#p(y) from probability table is 0.3015\n",
+ "p = 2*p; #probability of an error\n",
+ "N = p*n; #number of redings\n",
+ "\n",
+ "#result\n",
+ "print'we expect %3.2d'%N,'readings to lie between 1485 to 1515 rpm';"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example:1.57,Page No:99"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 105,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Thus 75 percent of depth measurements lie within th range 15.09 and -14.91 cm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "d = 15; #nominal depth of water in cm\n",
+ "n = 40; #total number of times the measurements taken\n",
+ "n1 = 10; #number of measurement reading found to lie outside a particular range \n",
+ "h = 9; #precision index in cm**-1\n",
+ "y = 1.15; #from probability table corresponding value of p(y)\n",
+ "\n",
+ "#calculations\n",
+ "P = (n-n1)/float(n); #probability of falling within a particular range \n",
+ "p1 = P/float(2); #half of these measiurements have a +ve and half have -ve errors\n",
+ "sigma = 1/float((math.sqrt(2))*h); #standard defviation\n",
+ "x = y*sigma; \n",
+ "Rmax = d+x;\n",
+ "Rmin = d-x;\n",
+ "\n",
+ "#result\n",
+ "print'Thus 75 percent of depth measurements lie within th range %3.2f'%Rmax,'and -%3.2f'%Rmin,'cm';"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example:1.58,Page No:100"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 107,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "precision index 0.099\n",
+ "number of false alarms 6.00\n",
+ "precision index 0.1155\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "py1 = 0.45; #py1 is p(y) given data\n",
+ "y = 0.675; #from probavility table corresponding to p(y) value\n",
+ "x = 4.8; \n",
+ "q = 100; #fixed mass flow rate in kg/s\n",
+ "q1 = 88; #flow meter reading in kg/s\n",
+ "n = 30; #number of days in november month\n",
+ "n1 = 4; #number of times flow is checked in a day\n",
+ "x1 = 0.5; #overall probabilty \n",
+ "y2 = 1.96; #y value corresponding to py ,from probability table\n",
+ "\n",
+ "#calculations\n",
+ "sigma = x/float(y); #standard deviation \n",
+ "a = (math.sqrt(2))*sigma;\n",
+ "h = 1/float(a); #precision index\n",
+ "x1 = q-q1;\n",
+ "y1 = x1/float(sigma); #y value for masss flow rate of 88kg/s\n",
+ "\n",
+ "#p(y) corresponding to y1 is 0.45\n",
+ "\n",
+ "e = 0.5-py1; #amount it fall into false alarms \n",
+ "N = n*n1; #number of measurements in themonth of november\n",
+ "E = e*N; #expected false alarms\n",
+ "E1 = x*E; #reduced number of flase alarms\n",
+ "P = E1/float(N); #probability of false alarms\n",
+ "py = 0.5-P; #probability of datato lie in tolerent band\n",
+ "sigma1 = x1/float(y2); #standard deviation\n",
+ "h1 = 1/float((math.sqrt(2))*sigma1); #precision index\n",
+ "\n",
+ "\n",
+ "#result\n",
+ "print'precision index %3.3f'%h;\n",
+ "print'number of false alarms %3.2f'%E;\n",
+ "print'precision index %3.4f'%h1;\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example:1.59,Page No:103"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 109,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "It is given that for 10 readings the ratio of deviation to standard deviation is not to exceed 1.96\n",
+ "therfore x5 = 2.05 which is greater than 1.96,reading 4.33 should be rejected\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#varioable declaration\n",
+ "q1 = 5.30; #length in cm\n",
+ "q2 = 5.73; #length in cm\n",
+ "q3 = 6.77; #length in cm\n",
+ "q4 = 5.26; #length in cm\n",
+ "q5 = 4.33; #length in cm\n",
+ "q6 = 5.45; #length in cm\n",
+ "q7 = 6.09; #length in cm\n",
+ "q8 = 5.64; #length in cm\n",
+ "q9 = 5.81; #length in cm\n",
+ "q10 = 5.75; #length in cm\n",
+ "n = 10; #number of copper wires\n",
+ "\n",
+ "#calculations\n",
+ "q = (q1+q2+q3+q4+q5+q6+q7+q8+q9+q10)/float(10); #arthimetic mean in cm\n",
+ "d1 = q1-q; #deviation in cm\n",
+ "d2 = q2-q; #deviation in cm\n",
+ "d3 = q3-q; #deviation in cm\n",
+ "d4 = q4-q; #deviation in cm\n",
+ "d5 = q5-q; #deviation in cm\n",
+ "d6 = q6-q; #deviation in cm\n",
+ "d7 = q7-q; #deviation in cm\n",
+ "d8 = q8-q; #deviation in cm\n",
+ "d9 = q9-q; #deviation in cm\n",
+ "d10 = q10-q; #deviation in cm\n",
+ "s = math.sqrt(((d1**2)+(d2**2)+(d3**2)+(d4**2)+(d5**2)+(d6**2)+(d7**2)+(d8**2)+(d9**2)+(d10**2))/float(n-1)); #standard deviation in cm \n",
+ "x1 = abs(d1)/float(s); #ratio of deviation to standard deviation\n",
+ "x2 = abs(d2)/float(s); #ratio of deviation to standard deviation\n",
+ "x3 = abs(d3)/float(s); #ratio of deviation to standard deviation\n",
+ "x4 = abs(d4)/float(s); #ratio of deviation to standard deviation\n",
+ "x5 = abs(d5)/float(s); #ratio of deviation to standard deviation\n",
+ "x6 = abs(d6)/float(s); #ratio of deviation to standard deviation\n",
+ "x7 = abs(d7)/float(s); #ratio of deviation to standard deviation\n",
+ "x8 = abs(d8)/float(s); #ratio of deviation to standard deviation\n",
+ "x9 = abs(d9)/float(s); #ratio of deviation to standard deviation\n",
+ "x10 = abs(d10)/float(s); #ratio of deviation to standard deviation\n",
+ "\n",
+ "#result\n",
+ "print'It is given that for 10 readings the ratio of deviation to standard deviation is not to exceed 1.96';\n",
+ "print'therfore x5 = %3.2f'%x5,'which is greater than 1.96,reading %3.2f should be rejected'%q5;\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.60,Page No:105"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 111,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "linear equation 0.672 u +0.591\n",
+ "standard deviation = 0.34\n",
+ "standard deviation = 0.51\n",
+ "standard deviation = 0.04\n",
+ "standard deviation = 0.31\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "u1 = 1.8; #initial velocity\n",
+ "u2 = 4.6; #initial velocity\n",
+ "u3 = 6.6; #initial velocity\n",
+ "u4 = 9.0; #initial velocity\n",
+ "u5 = 11.4; #initial velocity\n",
+ "u6 = 13.4; #initial velocity\n",
+ "n = 6;\n",
+ "v1 = 2.2; #final velocity\n",
+ "v2 = 3.2; #final velocity\n",
+ "v3 = 5.2; #final velocity\n",
+ "v4 = 6.4; #final velocity\n",
+ "v5 = 8.0; #final velocity\n",
+ "v6 = 10.0; #final velocity\n",
+ "\n",
+ "#calulations\n",
+ "w1 = u1*v1;\n",
+ "w2 = u2*v2;\n",
+ "w3 = u3*v3;\n",
+ "w4 = u4*v4;\n",
+ "w5 = u5*v5;\n",
+ "w6 = u6*v6;\n",
+ "x1 = u1**2;\n",
+ "x2 = u2**2;\n",
+ "x3 = u3**2;\n",
+ "x4 = u4**2;\n",
+ "x5 = u5**2;\n",
+ "x6 = u6**2;\n",
+ "u = u1+u2+u3+u4+u5+u6;\n",
+ "v = v1+v2+v3+v4+v5+v6;\n",
+ "w = w1+w2+w3+w4+w5+w6;\n",
+ "x = x1+x2+x3+x4+x5+x6;\n",
+ "a = ((n*w)-(u*v))/float((n*x)-(u**2));\n",
+ "b = ((v*x)-(w*u))/float((n*x)-(u**2));\n",
+ "y1 = (((a*u1)+b-v1)**2);\n",
+ "y2 = (((a*u2)+b-v2)**2);\n",
+ "y3 = (((a*u3)+b-v3)**2);\n",
+ "y4 = (((a*u4)+b-v4)**2);\n",
+ "y5 = (((a*u5)+b-v5)**2);\n",
+ "y6 = (((a*u6)+b-v6)**2);\n",
+ "y = y1+y2+y3+y4+y5+y6;\n",
+ "Sv = math.sqrt(y/float(n)); #standard deviation indicate sboth -ve and +ve values\n",
+ "Su = Sv/float(a); #standard deviation indicate sboth -ve and +ve values\n",
+ "Sa = (math.sqrt((n)/float(abs((n*x)-(u**2)))))*Sv; #standard deviation indicate sboth -ve and +ve values\n",
+ "Sb = (math.sqrt((x)/float(abs((n*x)-(u**2)))))*Sv; #standard deviation indicate sboth -ve and +ve values\n",
+ "\n",
+ "\n",
+ "#result\n",
+ "print'linear equation %3.3f'%a,'u +%3.3f'%b;\n",
+ "print'standard deviation = %3.2f'%Sv;\n",
+ "print'standard deviation = %3.2f'%Su;\n",
+ "print'standard deviation = %3.2f'%Sa;\n",
+ "print'standard deviation = %3.2f'%Sb;\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example:1.61,Page No:106"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 113,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Best fit equation 4.569e-05 f**2 +1.519e-02 f mW\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "u1 = 550; #initial velocity\n",
+ "u2 = 700; #initial velocity\n",
+ "u3 = 850; #initial velocity\n",
+ "u4 = 1000; #initial velocity\n",
+ "n = 4;\n",
+ "v1 = 0.04182; #final velocity\n",
+ "v2 = 0.04429; #final velocity\n",
+ "v3 = 0.05529; #final velocity\n",
+ "v4 = 0.0610; #final velocity\n",
+ "\n",
+ "#calulations\n",
+ "#P = ((a)*(f**2))+(b*f)\n",
+ "#P/f = (a*f)+b\n",
+ "w1 = u1*v1;\n",
+ "w2 = u2*v2;\n",
+ "w3 = u3*v3;\n",
+ "w4 = u4*v4;\n",
+ "x1 = u1**2;\n",
+ "x2 = u2**2;\n",
+ "x3 = u3**2;\n",
+ "x4 = u4**2;\n",
+ "u = u1+u2+u3+u4;\n",
+ "v = v1+v2+v3+v4;\n",
+ "w = w1+w2+w3+w4;\n",
+ "x = x1+x2+x3+x4;\n",
+ "a = ((n*w)-(u*v))/float((n*x)-(u**2));\n",
+ "b = ((v*x)-(w*u))/float((n*x)-(u**2));\n",
+ "\n",
+ "\n",
+ "#result\n",
+ "print'Best fit equation %3.3e'%a,'f**2 +%3.3e f'%b,'mW';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.62,Page No:108"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 114,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "limiting error 1.33 %\n",
+ "standard deviations 0.943 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "q1 = 50; #measuremnent in series in units\n",
+ "q2 = 100; #measuremnent in series in units\n",
+ "x = 0.02; #error in measurement of q1\n",
+ "y = 0.01; #error in measurement of q2\n",
+ "a = 1; #x % of 50\n",
+ "b = 1; #y % of 100\n",
+ "\n",
+ "\n",
+ "#calculations\n",
+ "e1 = (q1*x)/float(q1+q2); #individual limiting errors\n",
+ "e2 = (q2*y)/float(q1+q2); #individual limiting errors\n",
+ "e = (e1+e2)*100; #combined limiting errors in % (indicates both -ve and +ve values)\n",
+ "er = (math.sqrt((a**2)+(b**2))); #resultant error \n",
+ "er1 = (er/float(q1+q2))*100; #standard deviation in %\n",
+ "\n",
+ "#result\n",
+ "print'limiting error %3.2f'%e,'%';\n",
+ "print'standard deviations %3.3f'%er1,'%';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.63,Page No:116"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 117,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "series resistance 97.5 Ω\n",
+ "shunt resistance 0.02525 Ω\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "Rm =2.5; #resistance in Ω\n",
+ "Im = 0.1; #current in A\n",
+ "V = 10; #voltage in V\n",
+ "I = 10; #ammeter reading in A\n",
+ "\n",
+ "#calculations\n",
+ "Rs = (V/float(Im))-Rm; #series resistance in Ω\n",
+ "Rsh = (Im*Rm)/float(I-Im); #shunt resistance in Ω\n",
+ "\n",
+ "#result\n",
+ "print'series resistance %3.1f'%Rs,'Ω';\n",
+ "print'shunt resistance %3.5f'%Rsh,'Ω';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.64,Page No:116"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 118,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "shunt resistance 0.05025 Ω\n",
+ "series resistance 990 Ω\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "Rm = 10; #resistance in Ω\n",
+ "Im = 0.005; #current in A\n",
+ "I = 1; #current in A\n",
+ "V = 5; #voltage in V\n",
+ "\n",
+ "#calculations\n",
+ "Rsh = (Im*Rm)/float(I-Im); #shunt resistance in Ω\n",
+ "Rs = (V-(Im*Rm))/float(Im); #series resistance in Ω\n",
+ "\n",
+ "#result\n",
+ "print'shunt resistance %3.5f'%Rsh,'Ω';\n",
+ "print'series resistance %3.0f'%Rs,'Ω';\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.65,Page No:117"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 119,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "deflecting torque 8.1e-05 N-m\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "N = 100; #number of turns \n",
+ "l = 0.03; #length of each side in m\n",
+ "B = 0.09; #flux density in Wb/m**2\n",
+ "I = 0.01; #current through the coil in A\n",
+ "\n",
+ "\n",
+ "#calculation\n",
+ "F = N*B*I*l; #force in N\n",
+ "T = F*l; #deflecting torque in N-m\n",
+ "\n",
+ "#result\n",
+ "print'deflecting torque %3.1e'%T,'N-m';"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.66,Page No:118"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 120,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "percentage error when internal resiatance is 5Ω is 7.13\n",
+ "percentage error after rise of temperature 1.5\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "Rm = 5; #resistance in Ω\n",
+ "Im = 0.015; #current through instrument in A\n",
+ "I = 100; #current to be measured in A\n",
+ "alpham = 0.00015; #manganin in °C\n",
+ "alphac = 0.004; #copper in °C\n",
+ "R1 = 1; #reistance of copper in Ω\n",
+ "R2 = 4; #reistance of manganin in Ω\n",
+ "T = 20; #temperature in °C\n",
+ " \n",
+ "#calculations\n",
+ "Ish = I-Im; #current through shunt in A\n",
+ "v = Im*Rm; #voltage across the shunt in V\n",
+ "Rsh = v/float(Ish); #shunt resistance in Ω \n",
+ "Rshunt = Rsh*(1+(T*alpham)); #shunt resistance after rise of temperature in Ω \n",
+ "Rinst = Rm*(1+(T*alphac)); #instrument resistance in Ω \n",
+ "i = (Rshunt/float(Rinst+Rshunt))*100; #current through instrument in A\n",
+ "R = (i/float(Im))*100; #reading of instrument in A\n",
+ "e = I-R; #percentage error \n",
+ "Rinst1 = R1*(1+(T*alphac))+R2*(1+(T*alpham)); #instrument resistance in Ω \n",
+ "Iinst = (Rshunt/float(Rinst1+Rshunt))*100; #instrument current in A\n",
+ "Iread = (Iinst*100)/float(Im); #instrument reading in A\n",
+ "e1 = I-Iread; #percentage error \n",
+ "#result\n",
+ "print'percentage error when internal resiatance is 5Ω is %3.2f'%e;\n",
+ "print'percentage error after rise of temperature %3.1f'%e1;"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.67,Page No:118"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 121,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "percentage error 0.8 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "V = 250; #voltage in V\n",
+ "R = 500; #resistance in Ω\n",
+ "L = 1; #inductance in H\n",
+ "I = 0.05; #current in A\n",
+ "f = 100; #frequency in Hz\n",
+ "\n",
+ "#calculations\n",
+ "R1 = V/float(I); #total ohmic resistance in Ω\n",
+ "Z = math.sqrt((R1**2)+((2*math.pi*f*L)**2)); #coil impedance in Ω\n",
+ "Vr = (V*R1)/float(Z); #voltage reading in A.c\n",
+ "e = ((V-Vr)/float(V))*100; #percentage error in %\n",
+ "\n",
+ "#result\n",
+ "print'percentage error %3.1f'%e,'%';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.68,Page No:119"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 122,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "voltmeter reading at 25Hz frequency 14.97 V\n",
+ "voltmeter reading at 100Hz frequency 14.55 V\n",
+ "As frequency is increased ,impedance of the voltmeter increases ,hence current is decreased\n",
+ "therefore voltmeter readings are lower\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "R = 300; #resistance in Ω\n",
+ "L = 0.12; #inductance in H\n",
+ "f = 25; #frequency in Hz\n",
+ "I = 15; #current in A\n",
+ "f1 = 100; #frequency in Hz\n",
+ "\n",
+ "\n",
+ "#calculations\n",
+ "Z = math.sqrt((R**2)+((2*math.pi*f*L)**2)); #impedance at 25Hz in Ω\n",
+ "V = I*(R/float(Z)); #voltmeter reading at 25 Hz in V\n",
+ "Z1 = math.sqrt((R**2)+((2*math.pi*f1*L)**2)); #impedance at 100Hz in Ω \n",
+ "V1 = I*(R/float(Z1)); #voltmeter reading at 100Hz in V\n",
+ "\n",
+ "#result\n",
+ "print'voltmeter reading at 25Hz frequency %3.2f'%V,'V';\n",
+ "print'voltmeter reading at 100Hz frequency %3.2f'%V1,'V';\n",
+ "print'As frequency is increased ,impedance of the voltmeter increases ,hence current is decreased';\n",
+ "print'therefore voltmeter readings are lower';\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example:1.69,Page No:132"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 123,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "power factor of the motor 0.75 (lag)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "W1 =920; #wattmeter reading in W\n",
+ "W2 =300; #wattmeter reading in W\n",
+ "\n",
+ "#calculations\n",
+ "phi = math.atan(((math.sqrt(3))*(W1-W2))/(float(W1+W2)))*(180/float(math.pi)); \n",
+ "pf = math.cos((phi)*(math.pi/float(180))); #power factor \n",
+ "\n",
+ "#result\n",
+ "print'power factor of the motor %3.2f'%pf,'(lag)';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example:1.70,Page No:132"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 124,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "power factor of the motor 0.22 (lag)\n",
+ "line current 47.34 A\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "W1 =14.2; #wattmeter reading in W\n",
+ "W2 =-6.1; #wattmeter reading in W \n",
+ "El = 440; #line voltage in V\n",
+ "P = 8.1*1000; #power in W\n",
+ "\n",
+ "#calculations\n",
+ "phi = math.atan(((math.sqrt(3))*(W1-W2))/(float(W1+W2)))*(180/float(math.pi)); #phase lag\n",
+ "pf = math.cos((phi)*(math.pi/float(180))); #power factor \n",
+ "Il = P/float((math.sqrt(3))*(El)*(pf)); #line current in A\n",
+ "\n",
+ "#result\n",
+ "print'power factor of the motor %3.2f'%pf,'(lag)';\n",
+ "print'line current %3.2f'%Il,'A';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.71,Page No:132"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 125,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "W1 = 22.12 kW\n",
+ "W2 = 2.88 kW\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "P = 25; #input power in kW\n",
+ "El = 440; #line voltage in \n",
+ "pf = 0.6; #power factor\n",
+ "\n",
+ "#calculations\n",
+ "phi = ((math.acos(pf))*180)/float(math.pi);\n",
+ "t = (math.tan((phi)*(math.pi/float(180))));\n",
+ "#we have tan = math.sqrt(3)*(W1-W2)/W1+W2\n",
+ "#W1+W2 =E\n",
+ "y = (P*t)/float(math.sqrt(3));\n",
+ "W1 = (P+y)/float(2);\n",
+ "W2 = (P-y)/float(2);\n",
+ "\n",
+ "#result\n",
+ "print'W1 = %3.2f'%W1,'kW';\n",
+ "print'W2 = %3.2f'%W2,'kW';\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.72,Page No:134"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 126,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "percentage error 0.33 %(fast)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "V = 230; #voltage in V\n",
+ "i = 5; #current in A \n",
+ "t = 360; #time in s\n",
+ "n = 60; #number of revolutions\n",
+ "n1 = 520; #number of revolutions\n",
+ "cosphi = 1; #power factor \n",
+ "\n",
+ "#calculations\n",
+ "\n",
+ "E = (V*i*cosphi*t)/float(1000*3600); #energy consumed in 360 seconds in kWh\n",
+ "Er = n/float(n1); #energy recorded by the meter in kWh\n",
+ "e = ((Er-E)/float(Er))*100; #percentage error in %\n",
+ "\n",
+ "#result\n",
+ "\n",
+ "print'percentage error %3.2f'%(e),'%(fast)';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.73,Page No:135"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 144,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "percentage error 1.0562 %\n",
+ "Note:Ans printing mistake in textbook\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "V = 230; #voltage in V\n",
+ "i = 4.5; #current in A\n",
+ "cosphi = 1;\n",
+ "t = 190; #time in s\n",
+ "n = 10; #number of revolutions\n",
+ "n1 = 185; #number of revolutions\n",
+ "\n",
+ "#calculations\n",
+ "E = (V*i*cosphi*t)/float(1000*3600); #energy consumed in 360 seconds in kWh\n",
+ "Er = n/float(n1); #energy recorded by the meter in kWh\n",
+ "e = ((E-Er)/float(Er))*100; #percentage error in %\n",
+ "\n",
+ "#result\n",
+ "print'percentage error %3.4f'%(e),'%';\n",
+ "print'Note:Ans printing mistake in textbook'\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.74,Page No:135"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 145,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "power in the circuit 800 W\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "x = 150; #number of revolutions\n",
+ "t = 45; #time in s\n",
+ "\n",
+ "\n",
+ "#calculations\n",
+ "p = 1*(x/float(15000)); #power metered in kWh\n",
+ "a =t/float(3600); #energy consumed in t seconds in times of P\n",
+ "P = p/float(a); #power in the circuit in W\n",
+ "\n",
+ "#result\n",
+ "print'power in the circuit %3.0f'%(P*1000),'W';"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:1.75,Page No:135"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 146,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "energy recorded 0.575 kWh\n",
+ "actual energy consumed 0.5367 kWh\n",
+ "percentage error 6.67 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "V = 230; #D.C supply in V\n",
+ "r = 225; #number of revolutions\n",
+ "i = 40*225; #meter reading in A-s\n",
+ "t =10; #time in minutes\n",
+ "l = 14; #current in A\n",
+ "\n",
+ "\n",
+ "#calculations\n",
+ "L = i/float(10*60); #current in A\n",
+ "E = (V*L*t)/float(1000*60); #energy recorded in kWh\n",
+ "Ea = (V*l*t)/float(1000*60); #actual energy consumed kWh\n",
+ "e = ((E-Ea)/float(E))*100; #percentage error in %\n",
+ "\n",
+ "#result\n",
+ "print'energy recorded %3.3f'%E,'kWh';\n",
+ "print'actual energy consumed %3.4f'%Ea,'kWh';\n",
+ "print'percentage error %3.2f'%e,'%'\n"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUT_CHAPTER_2__(1).ipynb b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUT_CHAPTER_2__(1).ipynb
new file mode 100644
index 00000000..1d312472
--- /dev/null
+++ b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUT_CHAPTER_2__(1).ipynb
@@ -0,0 +1,1754 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 2:Electronic Instruments"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.1,Page no:158"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "currentt through the PMMC meter is 2.5 mA\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "gm = 0.005; #transconductance in siemens\n",
+ "RQ1 = 100*10**3; #FET resistance in KΩ\n",
+ "RQ2 = 100*10**3; #FET resistance in KΩ\n",
+ "RQ = 100*10**3; #FET resistance in KΩ\n",
+ "Rm = 50; #meter's resistance in Ω\n",
+ "RD = 10*10**3; #drain resistance in KΩ\n",
+ "v1 = 1; \n",
+ "\n",
+ "#calculations\n",
+ "x = (RQ*RD)/float(RQ+RD);\n",
+ "i = (gm*x*v1)/float((2*x)+Rm); #currentt through the PMMC meter(mA)\n",
+ "\n",
+ "#result\n",
+ "print'currentt through the PMMC meter is %3.1f'%(i*10**3),'mA';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.2,Page no:164"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "percentage error -3.9 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration \n",
+ "e = 150; #in V\n",
+ "t = 3; #time in s\n",
+ "Kfsin = 1.11; #form factor\n",
+ "\n",
+ "#calculations\n",
+ "#the sawtooth waveform can be expressed as e = mt\n",
+ "m = e/float(t);\n",
+ "\n",
+ "#e = 50*t;\n",
+ "#now integration of (50*t)**2 will be 2500*((t**3)/3) with limits ranging 0 to 3 ,solving we get\n",
+ "\n",
+ "Erms = math.sqrt((1/float(9))*((2500)*(t**3)-(0))); #Erms in V\n",
+ "#now integration of (50*t) will be (50/2)*((t**2)/2) with limits ranging 0 to 3 ,solving we get\n",
+ "Eav = (1/float(6))*((50)*((t**2)-0)); #Eav in V\n",
+ "Kfsaw = Erms/float(Eav); #form factor \n",
+ "x = (Kfsin)/float(Kfsaw); #ratio of two form factors\n",
+ "e = ((x-1)/float(1))*100; #percentage error \n",
+ "\n",
+ "#result\n",
+ "print'percentage error %3.1f'%e,'%'\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.3,Page no:165"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "percentage error 11.00 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#vaariable declaration\n",
+ "Kfsin = 1.11; #form factor of sine wave\n",
+ "\n",
+ "#calculation\n",
+ "#Erms = math.sqrt((1/T)*(integration(e**2)dt)) with limits from 0 to T is math.sqrt((1/T)*(Emax**2(T-0)))=Emax\n",
+ "#Erms = Emax;\n",
+ "#Erms = math.sqrt((1/T)*(integration(e*dt)) with limits from 0 to T is math.sqrt((2/T)*(Emax(T/2-0)))=Emax\n",
+ "#Eav = Emax;\n",
+ "#Kfsquare = Erms/float(Emax); #form factor of squarewave\n",
+ "Kfsquare = 1;\n",
+ "x = Kfsin/float(Kfsquare); #ratio of form factors\n",
+ "e = ((x-1)/float(1))*100; #percentage error in %\n",
+ "\n",
+ "#result\n",
+ "print'percentage error %3.2f'%e,'%';"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.4,Page no:186"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "input voltage 1 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "Va = 2000; #anode voltage in V\n",
+ "Id = 0.02; #length of parallel plates in m\n",
+ "d = 0.005; #distance between plates in m\n",
+ "L = 0.3; #distance between screen and plates in m\n",
+ "D = 0.03; #deflect of beam in m\n",
+ "g = 100; #overall gain\n",
+ "\n",
+ "#calculations\n",
+ "Vd = (2*d*Va*D)/float(L*Id); #voltage in V\n",
+ "Vi = Vd/float(g); #input voltage in V\n",
+ "\n",
+ "#result\n",
+ "print'input voltage %d'%Vi,'V';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.5,Page no:186"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 48,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "deflection sensitivity 0.2 mm/V\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "Va = 2500; #potential difference in V\n",
+ "Id = 0.025; #length of parallel plates in m\n",
+ "d = 0.005; #distance between plates in m\n",
+ "L = 0.2; #distance between screen and plates in m\n",
+ "D = 0.03; #deflect of beam in m\n",
+ "\n",
+ "\n",
+ "#calculations\n",
+ "Vd = (2*d*Va*D)/float(L*Id); #voltage in V\n",
+ "Vi = D/float(Vd); #deflection sensitivity in mm/V\n",
+ "\n",
+ "#result\n",
+ "print'deflection sensitivity %2.1f'%(Vi*10**3),'mm/V';\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.6,Page no:186"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "deflection sensitivity 0.16 mm/V\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "Id = 0.02; #length of horizontal plates in m\n",
+ "d = 0.005; #distance between plates in m\n",
+ "L = 0.2; #distance between screen and plates in m\n",
+ "Va = 2500; #accelerating voltage in V\n",
+ "\n",
+ "#calculations\n",
+ "S = (L*Id)/float(2*d*Va); #deflection sensitivityin mm/V\n",
+ "\n",
+ "\n",
+ "#result\n",
+ "print'deflection sensitivity %3.2f'%(S*10**3),'mm/V';\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.7,Page no:187"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "beam speed 29.65 m/s\n",
+ "deflection sensitivity 0.3 mm/V\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variabledeclaration\n",
+ "va = 2500; #anode to cathode voltage in V\n",
+ "Id = 0.015; #length of parallel plates in m\n",
+ "d = 0.005; #distance between plates in m\n",
+ "L = 0.5; #distance between plates and screen in m\n",
+ "m = 9.109*10**-31; #mass of electron in kg\n",
+ "e = 1.602*10**-19; #charrge of electron in C\n",
+ "\n",
+ "#calculations\n",
+ "v = math.sqrt((2*e*va)/float(m)); #beam speed in m/s\n",
+ "S = (L*Id)/float(2*d*va); #deflection sensitivity in mm/V\n",
+ "\n",
+ "#calculatons\n",
+ "print'beam speed %3.2f'%(v*10**-6),'m/s';\n",
+ "print'deflection sensitivity %3.1f'%(S*10**3),'mm/V';\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.8,Page no:187"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "density of magnetic field 1.584 m Wb/m**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "L = 0.22; #distance between screen and plates in m\n",
+ "l = 0.033; #width of uniform magnetuc field in m\n",
+ "Va = 6000; #anode potential in V\n",
+ "D = 0.044; #deflection on the screen in m\n",
+ "m = 9.107*10**-31; #mass of electron in kg\n",
+ "e = 1.6*10**-19; #charge of electron in m\n",
+ "\n",
+ "#calculations\n",
+ "X = math.sqrt(e/float(2*m*Va)); #density of magnetic field in Wb/m**2\n",
+ "B = D/float(L*l*X);\n",
+ "\n",
+ "#result\n",
+ "print'density of magnetic field %3.3f'%(B*10**3),'m Wb/m**2';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.9,Page no:187"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "voltage applied to Y deflection 30.179 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "B = 1.8*10**-4; #flux density in Wb/m**2\n",
+ "Va = 800; #final anode voltage in V\n",
+ "d = 0.01; #distance ebetween plates in m\n",
+ "m = 9.107*10**-31; #mass of electron in kg\n",
+ "e = 1.6*10**-19; #charge of electron in C\n",
+ "\n",
+ "#calculations\n",
+ "#we have D = B*L*I*(math.sqrt((e/float(2*m*Va)))\n",
+ "#let us assume x = B*(math.sqrt((e/float(2*m*Va)))\n",
+ "#thus D = x*L*I\n",
+ "#we also have D = L*Vd*l/float(2*d*Va)\n",
+ "#let us assume y = 1/float(2*d*Va) \n",
+ "#thus D = L*Vd*l*y\n",
+ "#comparing both D equations we get\n",
+ "x = B*(math.sqrt((e)/float(2*m*Va)));\n",
+ "y = 1/float(2*d*Va) ;\n",
+ "Vd = x/float(y); #voltage applied to Y deflection in V\n",
+ " \n",
+ "#result\n",
+ "print'voltage applied to Y deflection %3.3f'%Vd,'V';\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.10,Page no:207"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Peak-to-peak value 15.6 mV\n",
+ "Amplitude 7.8 mV\n",
+ "R.m.s value 5.515 mV\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "a = 3; #vertical attenuation in mV/div\n",
+ "x = 5; #one part is sub divided in units\n",
+ "\n",
+ "#callculations\n",
+ "s = 1/float(x); #1 subdivision in units\n",
+ "pp = 2+(a*s); #positive peak in units\n",
+ "Vpp = pp+pp; #peak to peak voltage in divisions\n",
+ "Vpp1 = a*Vpp; #peak to peak voltage in mV\n",
+ "Vmax = Vpp1/float(2); #amplitude in mV\n",
+ "Vrms =Vmax/float(math.sqrt(2)); #R.m.s value in mV\n",
+ "\n",
+ "#result\n",
+ "print'Peak-to-peak value %3.1f'%Vpp1,'mV';\n",
+ "print'Amplitude %3.1f'%Vmax,'mV';\n",
+ "print'R.m.s value %3.3f'%Vrms,'mV';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.11,Page no:210"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "possible phases are 30.00 ° or 330.00 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "#from figure we note this values\n",
+ "y1 = 1.25; #vertical axis in divisions\n",
+ "y2 = 2.5; #maximum vertical value in divisions\n",
+ "\n",
+ "#calculations\n",
+ "x = y1/float(y2); \n",
+ "phi = math.asin(x); #sinphi value \n",
+ "phi1 = 360-((phi*180)/float(math.pi)); #possible phases\n",
+ "\n",
+ "#result\n",
+ "print'possible phases are %3.2f'%((phi*180)/float(math.pi)),'°','or %3.2f'%phi1,'°';"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.12,Page no:219"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "unknown resistance 120 kΩ\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "R1 = 20; #resistance in kΩ\n",
+ "R2 = 30; #resistance in kΩ\n",
+ "R3 = 80; #resistance in kΩ\n",
+ "\n",
+ "#calculations\n",
+ "Rx = (R2*R3)/float(R1); #unknown resistance in kΩ\n",
+ "\n",
+ "#result\n",
+ "print'unknown resistance %d'%Rx,'kΩ';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.13,Page no:222"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "unknown resistance 49.977 uΩ\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "R3 = 100.03*10**-6; #standard resistance in uΩ\n",
+ "l = 100.31; # inner ratio arm resistance in Ω\n",
+ "m = 200; # inner ratio arm resistance in Ω\n",
+ "R1 = 100.24; #outer ratio arm resistance in Ω\n",
+ "R2 = 200; #outer ratio arm resistance in Ω\n",
+ "Ry = 680*10**-6; #unknown resistor in uΩ\n",
+ "\n",
+ "#calculation\n",
+ "x = (R1*R3)/float(R2); #resistance in Ω\n",
+ "y = (m*Ry)/float(l+m+Ry); #resistance in Ω\n",
+ "z = ((R1/float(R2))-(l/float(m))); #unknown resistanc in Ω\n",
+ "Rx = x+(y*z);\n",
+ "\n",
+ "#rresult\n",
+ "print'unknown resistance %3.3f'%(Rx*10**6),'uΩ';"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.14,Page no:224"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "unknown resistance 500\n",
+ "unknowm angle -50 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "Z1 = 50; #inductive resistance in Ω\n",
+ "Z2 = 125; #pure rresistance in Ω\n",
+ "Z3 = 200; #inductive resistance in Ω\n",
+ "theta1 = 80;\n",
+ "theta2 = 0;\n",
+ "theta3 = 30;\n",
+ "\n",
+ "#calculations\n",
+ "Z4 = (Z2*Z3)/float(Z1); #unknown resistance in Ω\n",
+ "theta4 = theta2+theta3-theta1; #unknowm angle in °\n",
+ " \n",
+ "#result\n",
+ "print'unknown resistance %d'%Z4;\n",
+ "print 'unknowm angle %d'%theta4,'°';"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.15,Page no:28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " R4 = 133.333333 Ω\n",
+ "capacitance 1.59 uF\n"
+ ]
+ }
+ ],
+ "source": [
+ "import cmath\n",
+ "\n",
+ "#variable declaration\n",
+ "R1 = 225; #resistance in Ω \n",
+ "R2 = 150; #resistance in Ω \n",
+ "C2 = 0.53*10**-6; #capacitance in F\n",
+ "R3 = 100; #resistance in Ω \n",
+ "L = 7.95*10**-3; #inductance in H \n",
+ "f = 1000; #frequency in Hz\n",
+ "\n",
+ "#calculations\n",
+ "Z1 = R1;\n",
+ "w = 2*cmath.pi*f;\n",
+ "x = (1/float(w*C2));\n",
+ "Z2 = complex(R2,-x);\n",
+ "y = w*L;\n",
+ "Z3 = complex(R3,y);\n",
+ "Z4 = (Z2*Z3)/float(Z1); #unknown arm \n",
+ "Z41 = complex(Z4)\n",
+ "C4 = (1/float(2*cmath.pi*f*100)); #imaginary value is 100 from Z4\n",
+ "c = (Z4);\n",
+ "\n",
+ "#result\n",
+ "print' R4 = %05f'%(Z4.real),'Ω';\n",
+ "print'capacitance %3.2f'%(C4*10**6),'uF'\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.16,Page no:226"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "shuntless resistance 140 Ω\n",
+ "capacitor of imperfect condenser 0.0115 uF\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "w = 7500; #frequency in radians/sec \n",
+ "R2 = 140; #resistance in Ω\n",
+ "R3 = 1000; #non-reactive resistance of Ω\n",
+ "R4 = 1000; #non-reactive resistance of Ω\n",
+ "C2 = 0.0115; #capacitance in uF\n",
+ "\n",
+ "\n",
+ "#calculations\n",
+ "R1 = (R2*R3)/float(R4); #shuntless resistance in Ω\n",
+ "C1 = (C2*R4)/float(R3); #capacitor of imperfect condenser in F \n",
+ "\n",
+ "#result\n",
+ "print'shuntless resistance %d'%R1,'Ω';\n",
+ "print'capacitor of imperfect condenser %3.4f'%C1,'uF';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.17,Page no:228"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "unknown resistance 0.53 kΩ\n",
+ "unknown inductance 1.5 H\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "R1 = 235; #resistance in kΩ\n",
+ "R2 = 2.5; #resistance in kΩ\n",
+ "R3 = 50; #resistance in kΩ\n",
+ "C1 = 0.012; #capacitance in uF\n",
+ "\n",
+ "#calculations\n",
+ "Rx = (R2*R3)/float(R1); #unknown resistance in Ω\n",
+ "Lx = C1*R2*R3; #unknown inductance in H\n",
+ "\n",
+ "#result\n",
+ "print'unknown resistance %3.2f'%Rx,'kΩ';\n",
+ "print'unknown inductance %3.1f'%Lx,'H';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.18,Page no:230"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "equivalent resistance 4.32 KΩ\n",
+ "equivalent inductance 0.296 H\n",
+ "Note:calculation mistake in textbook\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "w = 3000; #frequency in radians/sec \n",
+ "R2 = 9000; #resistance in Ω\n",
+ "R1 = 1800; # resistance of Ω\n",
+ "R3 = 900; # resistance of Ω\n",
+ "C1 = 0.9*10**-6; #capacitance in F\n",
+ "\n",
+ "#calculations\n",
+ "a = ((w**2)*(R1**2)*(C1**2));\n",
+ "Rx = ((w**2)*(C1**2)*R1*R2*R3)/float(1+a); #equivalent resistance in KΩ\n",
+ "Lx = (R2*R3*C1)/float(1+((w**2)*(R1**2)*(C1**2))); #equivalent inductance in H\n",
+ "\n",
+ "#result\n",
+ "print'equivalent resistance %3.2f'%(Rx*10**-3),'KΩ';\n",
+ "print'equivalent inductance %3.3f'%Lx,'H';\n",
+ "print'Note:calculation mistake in textbook';"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.19,Page no:232"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "resistance 3000 Ω\n",
+ "capacitance 0.20 uF\n",
+ "dissipation factor 3.77\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "R1 = 1.5*10**3; #resistance in Ω\n",
+ "R2 = 3000; #resistance in Ω\n",
+ "C1 = 0.4*10**-6; #capacitance in F\n",
+ "C3 = 0.4*10**-6; #capacitance in F\n",
+ "f = 1000; #frequency in Hz\n",
+ "\n",
+ "#calculations\n",
+ "w = 2*math.pi*f;\n",
+ "Rx = (R2*C1)/float(C3); #resistance in kΩ\n",
+ "Cx = (R1*C3)/float(R2); #capacitance in F\n",
+ "D = w*Cx*Rx; #dissipation factor\n",
+ "\n",
+ "#result\n",
+ "print'resistance %d'%Rx,'Ω';\n",
+ "print'capacitance %3.2f'%(Cx*10**6),'uF';\n",
+ "print'dissipation factor %3.2f'%D;\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.20,Page no:234"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "resistance 500 Ω\n",
+ "inductance 0.3 H\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "Q = 1000; #resistance in Ω\n",
+ "S = 1000; #resistance in Ω\n",
+ "P = 500; #resistance in Ω\n",
+ "C = 0.5*10**-6; #capacitance in uF\n",
+ "r = 100; #resistance in Ω\n",
+ "\n",
+ "#calculations\n",
+ "R = (P*Q)/float(S); #resistance in Ω\n",
+ "L = ((C*P)*((r*(Q+S))+(Q*S)))/float(S); #inductance in H\n",
+ "\n",
+ "#result\n",
+ "print'resistance %d'%R,'Ω';\n",
+ "print'inductance %3.1f'%L,'H';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.21,Page no:235"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "resistance 500 Ω\n",
+ "inductance 1.95 H\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "R2 = 1000; #resistance in Ω\n",
+ "R4 = 1000; #resistance in Ω\n",
+ "R3 = 500; #resistance in Ω\n",
+ "C = 3*10**-6; #capacitance in uF\n",
+ "r = 100; #resistance in Ω\n",
+ "\n",
+ "#calculations\n",
+ "R = (R2*R3)/float(R4); #resistance in Ω\n",
+ "L = ((C*R2)*((r*(R3+R4))+(R3*R4)))/float(R4); #inductance in H\n",
+ "\n",
+ "#result\n",
+ "print'resistance %d'%R,'Ω';\n",
+ "print'inductance %3.2f'%L,'H';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.22,Page no:237"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 23,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "inductance of specimen 8.34 mH\n",
+ "resistance of specimen 80.65 Ω\n",
+ "impedance of specimen 132.240 Ω\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "R2 = 100; #resistance in Ω\n",
+ "R3 = 834; #resistance in Ω\n",
+ "C4 = 0.1*10**-6; #capacitance in F\n",
+ "C3 = 0.124*10**-6; #capacitance in F\n",
+ "f = 1000;\n",
+ "\n",
+ "#calculations\n",
+ "L1 = R2*R3*C4; #inductance in H\n",
+ "R1 = (R2*C4)/float(C3); #resistance in Ω\n",
+ "X1 = 2*math.pi*2*f*L1; #reactance of specimen in Ω\n",
+ "Z1 = math.sqrt((R1**2)+(X1**2)); #impedance of specimen in Ω\n",
+ "\n",
+ "\n",
+ "#result\n",
+ "print'inductance of specimen %3.2f'%(L1*10**3),'mH';\n",
+ "print'resistance of specimen %3.2f'%R1,'Ω';\n",
+ "print'impedance of specimen %3.3f'%Z1,'Ω';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.23,Page no:243"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "capacitance 0.9175 uF\n",
+ "series resistance of capacitor 1.75 Ω\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "M = 18.35*10**-3; #mutual inductance in H\n",
+ "R1 = 200; #non-reactive resistance in Ω\n",
+ "L1 = 40.6*10**-3; #inductance in mH\n",
+ "R2 = 119.5; #non-reactive resistance in Ω\n",
+ "R4 = 100; # resistance in Ω\n",
+ "\n",
+ "#calculations\n",
+ "C2 = M/float(R1*R4); #capacitance in F \n",
+ "R3 = (R4*(L1-M))/float(M); #resistance in Ω\n",
+ "R = R3-R2; #series resistance of capacitor in Ω \n",
+ "\n",
+ "#result\n",
+ "print'capacitance %3.4f'%(C2*10**6),'uF';\n",
+ "print'series resistance of capacitor %3.2f'%R,'Ω';\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.24,Page no:245"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 25,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "equivalent resistance 11.2 KΩ\n",
+ "equivalent capacitance 42.04 pF\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "R1 = 2.8*10**3; #resistance in Ω\n",
+ "C1 = 4.8*10**-6; #capacitance in uF\n",
+ "R2 = 20*10**3; #resistance in Ω\n",
+ "R4 = 80*10**3; #resistance in Ω\n",
+ "f = 2000; #frequency in Hz\n",
+ "w = 12.57*10**3;\n",
+ "R3 = 11.2*10**3;\n",
+ "\n",
+ "#calculations\n",
+ "x = 1/float((w**2)*(C1**2)*(R1));\n",
+ "y = R1+x;\n",
+ "z = R4/float(R2);\n",
+ "R3 = z*(x+y); #equivalent resistance in KΩ\n",
+ "a = (w**2)*C1*R1*R3;\n",
+ "C3 = 1/float(a); #equivalent capacitance in F\n",
+ "\n",
+ "#result\n",
+ "print'equivalent resistance %3.1f'%(R3*10**-3),'KΩ';\n",
+ "print'equivalent capacitance %3.2f'%(C3*10**12),'pF';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.25,Page no:246"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 27,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "resistance 26.82 Ω\n",
+ "inductance 52.6 mH\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "L1 = 52.6; #inductance in mH\n",
+ "R2 = 1.68; #resistance in MHz\n",
+ "r1 = 28.5; #resistance in MHz\n",
+ "\n",
+ "#calculations\n",
+ "#at balance of bridge (r1+jwL1)=((R2+r2)+jwL2)\n",
+ "#comparing both real and imaginary terms we get \n",
+ "\n",
+ "r2 = r1-R2; #resistance in Ω\n",
+ "L2 = L1; #inductance in H\n",
+ "\n",
+ "#result\n",
+ "print'resistance %3.2f'%r2,'Ω';\n",
+ "print'inductance %3.1f'%L1,'mH';\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.26,Page no:246"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 28,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R4 = 34.311 Ω\n",
+ "inductance 29 mH\n"
+ ]
+ }
+ ],
+ "source": [
+ "import cmath\n",
+ "\n",
+ "#variable declaration\n",
+ "R3 = 300; #resistance in Ω \n",
+ "R2 = 500; #resistance in Ω \n",
+ "C1 = 0.2*10**-6; #capacitance in F\n",
+ "C3 = 0.1*10**-6; #capacitance in F\n",
+ "f = 1000; #frequency in Hz\n",
+ "\n",
+ "#calculations\n",
+ "w = 2*(cmath.pi)*f; #angular frequency \n",
+ "z = (1/float(w*C1));\n",
+ "Z1 = complex(0,-z);\n",
+ "Z2 = R2;\n",
+ "x = 1/float(R3);\n",
+ "y = w*C3;\n",
+ "Y3 = complex(x,y);\n",
+ "Z4 = (Z2)/complex(Z1*Y3);\n",
+ "L = ((182.19)/float(2*cmath.pi*f)); #imaginary value is 182.12 from Z4\n",
+ "\n",
+ "#result\n",
+ "print'R4 = %3.3f'%(Z4.real),'Ω';\n",
+ "print'inductance %3.0f'%(L*10**3),'mH';"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 2.27,Page no:247"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 32,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R4 = 373.35 Ω\n",
+ "capacitance 0.1818 uF\n"
+ ]
+ }
+ ],
+ "source": [
+ "import cmath\n",
+ "\n",
+ "#variable declaration\n",
+ "R1 = 200; #resistance in Ω \n",
+ "R2 = 200; #resistance in Ω \n",
+ "C2 = 5*10**-6; #capacitance in F\n",
+ "C3 = 0.2*10**-6; #capacitance in F\n",
+ "R3 = 500; #resistance in Ω \n",
+ "f = 1000; #frequency in Hz\n",
+ "\n",
+ "#calculations\n",
+ "Z1 = R1;\n",
+ "w = 2*cmath.pi*f; #angular frequency\n",
+ "x = (1/float(w*C2));\n",
+ "Z2 = complex(R2,-x);\n",
+ "y = 1/float(w*C3);\n",
+ "Z3 = complex(R3,-y);\n",
+ "Z4 = (Z2*Z3)/float(Z1); #unknown arm \n",
+ "C4 = (1/float(2*cmath.pi*f*875.3)); #imaginary value is 100 from Z4\n",
+ "\n",
+ "#result\n",
+ "print'R4 = %3.2f'%(Z4.real),'Ω';\n",
+ "print'capacitance %3.4f'%(C4*10**6),'uF';"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 2.28,Page no:248"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 35,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R4 = 167 Ω\n",
+ "inductance 0.1 H\n"
+ ]
+ }
+ ],
+ "source": [
+ "import cmath\n",
+ "\n",
+ "#variable declaration\n",
+ "R1 = 600; #resistance in Ω \n",
+ "R2 = 100; #resistance in Ω \n",
+ "C1 = 1*10**-6; #capacitance in F\n",
+ "R3 = 1000; #resistance in Ω \n",
+ "f = 1000; #frequency in Hz\n",
+ "\n",
+ "\n",
+ "#calculations\n",
+ "w = 2*cmath.pi*f; #angular frequency \n",
+ "x = 1/float(R1);\n",
+ "y = w*C1;\n",
+ "Y1 = complex(x,y);\n",
+ "Z2 = R2;\n",
+ "Z3 = R3;\n",
+ "Z4 = Z2*Z3*Y1; #unknown arm\n",
+ "L = (628.3/float(2*cmath.pi*f)); #inductance in H\n",
+ "\n",
+ "#result\n",
+ "print'R4 = %3.0f'%(Z4.real),'Ω';\n",
+ "print'inductance %3.1f'%L,'H';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 2.29,Page no:249"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 38,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "capacitance = 124.97 pF\n",
+ "power factor = 0.055\n",
+ "relative permittivity = 6.24\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "C2 = 106*10**-12; #capacitance in F\n",
+ "R4 = 1000/float(math.pi); #resistance in\n",
+ "C4 = 0.55*10**-6; #capacitance in F\n",
+ "R3 = 270; #resistance in\n",
+ "e0 = 8.854*10**-12; #absolute permittivity \n",
+ "t = 0.005; #thickness of bakelite in m\n",
+ "d = 12*10**-2; #diameter in m\n",
+ "f = 50; #frequency in Hz\n",
+ "\n",
+ "#calculations\n",
+ "R4 = 1000/float(math.pi); #resistance in\n",
+ "A = (math.pi/float(4))*((d)**2); #area of electrodes in m**2\n",
+ "w = 2*math.pi*f; #angular frequency\n",
+ "R1 = (R3*C4)/float(C2); #resistance in \n",
+ "C1 = (R4*C2)/float(R3); #apacitance in pF\n",
+ "P = w*R1*C1; #power factor \n",
+ "er = (C1*t)/float(e0*A); #relative permittivity\n",
+ "\n",
+ "#result\n",
+ "print'capacitance = %3.2f'%(C1*10**12),'pF';\n",
+ "print'power factor = %3.3f'%P;\n",
+ "print'relative permittivity = %3.2f'%er;\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.30,Page no:260"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 39,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "distributed capacitance 20 pF\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "f1 = 2*10**6; #frequency in Hz\n",
+ "C1 = 420*10**-12; #capacitance in F\n",
+ "C2 = 90*10**-12; #capacitance in F\n",
+ "f2 = 4*10**6; #frequency in Hz\n",
+ "\n",
+ "#calculations\n",
+ "Cd = (C1-(4*C2))/float(3); #distributed capacitance in pF\n",
+ "\n",
+ "#result\n",
+ "print'distributed capacitance %d'%(Cd*10**12),'pF';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.31,Page no:260"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 40,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "distributed capacitance 18.571 pF\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "f1 = 2*10**6; #frequencyin Hz\n",
+ "f2 = 5*10**6; #frequencyin Hz \n",
+ "C1 = 410*10**-12; #capacitance in F\n",
+ "C2 = 50*10**-12; #capacitance in F\n",
+ "\n",
+ "#calculations\n",
+ "x = f2/float(f1);\n",
+ "Cd = (C1-((x**2)*(C2)))/float((x**2)-1); #distributed capacitance in pF\n",
+ "\n",
+ "#result\n",
+ "print'distributed capacitance %3.3f'%(Cd*10**12),'pF';"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.32,Page no:261"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 42,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "resistive 48.18 Ω\n",
+ "reactive components 492.74 Ω\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "C1 = 190*10**-12; #capacitance in F\n",
+ "Q1 = 75; #quality factor \n",
+ "C2 = 170*10**-12; #capacitance in F\n",
+ "Q2 = 45; #quality factor \n",
+ "f = 200*10**3; #frequency in Hz\n",
+ "\n",
+ "#calculations\n",
+ "Rx = ((C1*Q1)-(C2*Q2))/float(2*math.pi*f*C1*C2*Q1*Q2); #resistive in Ω\n",
+ "Xx = (C1-C2)/float(2*math.pi*f*C1*C2); #reactive components in Ω\n",
+ "\n",
+ "#result\n",
+ "print'resistive %3.2f'%Rx,'Ω';\n",
+ "print'reactive components %3.2f'%Xx,'Ω';"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.33,Page no:261"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 43,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "percentage error 0.5 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "R = 4; #resistance in Ω\n",
+ "f = 500*10**3; #frequency in Hz\n",
+ "C = 110*10**-12; #capacitance in F\n",
+ "x = 0.02; #resistance across oscillatory circuit in Ω\n",
+ "\n",
+ "#calculations\n",
+ "Qtrue = 1/float(2*math.pi*f*C*R);\n",
+ "Qindicated = 1/float(2*math.pi*f*C*(R+x));\n",
+ "e = ((Qtrue-Qindicated)/float(Qtrue))*100; #percentage error in %\n",
+ "\n",
+ "#result\n",
+ "print'percentage error %3.1f'%e,'%';"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.34,Page no:262"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 45,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "self-capacitance 9.89 pF\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "f1 = 600*10**3; #frequency in Hz\n",
+ "f2 = 2*10**6; #frequency in Hz\n",
+ "C1 = 100*10**-12; #capacitance in F\n",
+ "\n",
+ "#calculations\n",
+ "Cd = ((f1**2)*C1)/float((f2**2)-(f1**2)); #self-capacitance in F\n",
+ "\n",
+ "#calculations\n",
+ "print'self-capacitance %3.2f'%(Cd*10**12),'pF';"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.35,Page no:263"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 47,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "inductance 719.61 uH\n",
+ "resistance 16 Ω\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "f = 400*10**3; #frequency in kHz\n",
+ "C = 220*10**-12; #capacitance in F\n",
+ "Rsh = 0.8; #resistance in Ω\n",
+ "Q = 110; #quality factor\n",
+ "\n",
+ "#calculations\n",
+ "Lcoil = 1/float(((2*math.pi*f)**2)*C); #inductance in H\n",
+ "x = (2*math.pi*f*Lcoil)/float(Q);\n",
+ "Rcoil = x-Rsh; #resistance in Ω\n",
+ "\n",
+ "\n",
+ "#calculations\n",
+ "print'inductance %3.2f'%(Lcoil*10**6),'uH';\n",
+ "print'resistance %3.0f'%Rcoil,'Ω';"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.36,Page no:271"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 48,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "inductance L = 7.33 uH\n",
+ "capacitance C = 858.000 pF\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "Cs = 210*10**-12; #capacitance in F\n",
+ "Cv = 6*10**-12; #capacitance in F\n",
+ "f1 = 2*10**6; #frequency in Hz\n",
+ "f2 = 4*10**6; #frequency in Hz\n",
+ "\n",
+ "#calculations\n",
+ "#we have Cs+Cv = 1/(4*(math.pi**2)*(f2**2)*L\n",
+ "#we have C+Cv = 1/(4*(math.pi**2)*(f2**2)*L \n",
+ "L = 1/float(4*(math.pi**2)*(f2**2)*(Cs+Cv)); #inductance in uH\n",
+ "C = (1/float((4*(math.pi**2)*(f1**2)*L)))-Cv; #capacitance in pF\n",
+ " \n",
+ "#result\n",
+ "print'inductance L = %3.2f'%(L*10**6),'uH';\n",
+ "print'capacitance C = %3.3f'%(C*10**12),'pF';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.37,Page no:271"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 49,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "inductance L = 3.598e-05 uH\n",
+ "resistance R = 17.3 Ω\n",
+ "ccalculation mistake in textbook assuming approximate values\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "C1 = 40*10**-12; #capacitance in pF\n",
+ "C2 = 48*10**-12; #capacitance in pF\n",
+ "f = 4*10**6; #frequency in Hz\n",
+ "R1 = 60; #resistance in Ω\n",
+ "\n",
+ "#calculations\n",
+ "Co = (C1+C2)/float(2);\n",
+ "L = 1/float(4*(math.pi**2)*(f**2)*Co); #inductance in H\n",
+ "#we have I = E/math.sqrt((R**2)+((w*l)-((1/w*C1))**2))\n",
+ "#we also have I = E/(R+R1)\n",
+ "#comparing we get and solving we get R**2 + 2*R1*R +R1**2 = R**2 + ((w*l)-((1/w*C1))**2)\n",
+ "w = 2*math.pi*f; #angular frequency \n",
+ "x = w*L;\n",
+ "y = 1/float(w*C2);\n",
+ "Y = ((x-y)**2);\n",
+ "R = (Y-(R1**2))/float(2*R1); #resistance in Ω\n",
+ "\n",
+ "#result\n",
+ "print'inductance L = %3.3e'%(L),'uH';\n",
+ "print'resistance R = %3.1f'%(R),'Ω';\n",
+ "print'ccalculation mistake in textbook assuming approximate values'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.38,Page no:272"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 50,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Q factor 100\n",
+ "effective resistance 8.29 Ω\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "C = 160*10**-12; #capacitancein pF\n",
+ "f0 = 1.2*10**6; #frequency in Hz\n",
+ "f01 = 6*10**3; #frequency in Hz\n",
+ "\n",
+ "\n",
+ "#calculations\n",
+ "f1 = f0+f01; #frequency in Hz\n",
+ "f2 = f0-f01; #frequency in Hz\n",
+ "f = f1-f2; #frequency in Hz\n",
+ "Q = f0/float(f); #Q factor\n",
+ "R = f/float(2*math.pi*f0*f0*C); #effective resistance in Ω\n",
+ "\n",
+ "\n",
+ "#result\n",
+ "print'Q factor %d'%Q;\n",
+ "print'effective resistance %3.2f'%R,'Ω';"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "##Example 2.39,Page no:274"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 51,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "self-capacitance of the coil = 13.33 pF\n",
+ "inductance = 292.97 uH\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "C1 = 200*10**-12; #capacitance in F\n",
+ "C2 = 40*10**-12; #capacitance in F\n",
+ "\n",
+ "#calculations\n",
+ "f1 = (2/float(math.pi))*10**6; #frequency in Hz\n",
+ "f2 = 2*f1; #frequency in Hz\n",
+ "x1 = 4*(math.pi**2)*(f1**2);\n",
+ "x2 = 4*(math.pi**2)*(f2**2);\n",
+ "#L = 1/(x1*(C+Cd));\n",
+ "# L = 1/(x2*(C+Cd));\n",
+ "#comparing we get following equation for Cd\n",
+ "Cd = ((x1*C1)-(x2*C2))/float(x2-x1); #capacitance in pF\n",
+ "c = C1+Cd;\n",
+ "L = 1/float(x1*(c)); #inductance in H\n",
+ "\n",
+ "#result\n",
+ "print'self-capacitance of the coil = %3.2f'%(Cd*10**12),'pF';\n",
+ "print'inductance = %3.2f'%(L*10**6),'uH';\n"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUT_CHAPTER_7.ipynb b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUT_CHAPTER_7.ipynb
new file mode 100644
index 00000000..697d4b21
--- /dev/null
+++ b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K.RAJPUT_CHAPTER_7.ipynb
@@ -0,0 +1,957 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 7:Sensors And Transducers"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.2,Page No:401"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "displacement 5.75 mm\n",
+ "displacement 12.800 mm\n",
+ "resolution of potentiometer 0.050 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "R =10000; #resistance in Ω\n",
+ "R1 = 3850; #resistance of potentiometer Ω\n",
+ "R2 = 7560; #resistance of potentiometer Ω\n",
+ "l = 50*10**-3; #length of uniform wound wire in m\n",
+ "x = 10;\n",
+ "\n",
+ "#calculations\n",
+ "\n",
+ "R3 = (R/float(2)); #resistance of potentiometer in .normal position in Ω\n",
+ "r = (R/float(l)); #resistance of potentiometer wire per unit length Ω/mm\n",
+ "dR1 = R3-R1; #change in resistance of potentiometer from its normal position Ω\n",
+ "D1 = (dR1/float(r)); #displacement in mm\n",
+ "dR2 = (R2-R3); #change in resistance of potentiometer from its normal position in Ω\n",
+ "D2 = (dR2/float(r)); #displacement in mm\n",
+ "RE = (x/float(r)); #resolution of potentiometer in mm\n",
+ "\n",
+ "#result\n",
+ "print'displacement %3.2f'%(D1*10**3),'mm';\n",
+ "print'displacement %3.3f'%(D2*10**3),'mm';\n",
+ "print'resolution of potentiometer %3.3f'%(RE*10**3),'mm';\n",
+ " \n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:7.3,Page No:403"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "resistance at 35°C is 50 Ω\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "R25 = 100; #resistance of thermistor at 25°C\n",
+ "t2 = 35; #temperature in °C\n",
+ "t1 = 25; #temperature in °C\n",
+ "alpha = 0.05; #temperature coefficient\n",
+ "\n",
+ "#calculations\n",
+ "t = t2-t1; #temperaturre difference in °C\n",
+ "x = alpha*t;\n",
+ "R35 = (R25)*(1-x); #resistance in Ω\n",
+ "\n",
+ "#result\n",
+ "print'resistance at 35°C is %d'%R35,'Ω';"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:7.4,Page No:406"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "inductance = 0.04 mH\n",
+ "ratio of change in inductance to the original inductance =0.02\n",
+ "ratio of change in inductance to the original inductance =0.02\n",
+ "Hence dl is directly proportional to displacement\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "l = 1.00; #length in mm\n",
+ "L = 2; #inductance in mH\n",
+ "d = 0.02; #displacement in mm\n",
+ "\n",
+ "#calculations\n",
+ "la = l-d; #length of air gap when d=0.02\n",
+ "dl = (2*(1/float(la)))-L; #change in inductance in mH\n",
+ "r = dl/float(L); #ratio of change in inductance to the original inductance\n",
+ "dd = r/float(l); #ratio of displacement to original gap length\n",
+ "\n",
+ "#result\n",
+ "print'inductance = %3.2f'%dl,'mH';\n",
+ "print'ratio of change in inductance to the original inductance =%3.2f'%r;\n",
+ "print'ratio of change in inductance to the original inductance =%3.2f'%dd;\n",
+ "print'Hence dl is directly proportional to displacement';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:7.5,Page No:409"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "percentage linearity 0.25 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "d = 1.8; #output voltage at maximum displacement in V\n",
+ "de = 0.0045; #deviation from straight line through the origin\n",
+ "\n",
+ "#calculations \n",
+ "a = (de/float(d))*100; #percentage linearity indicating in both -ve and +ve\n",
+ "\n",
+ "#result\n",
+ "print'percentage linearity %3.2f'%a,'%';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:7.6,Page No:409"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "sensitivty of LVDT 3.00 mV/mm\n",
+ "resolution 0.0067 mm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "Vo = 1.8; #output voltage in mV\n",
+ "Vi = 0.6; #input voltage in mV;\n",
+ "a = 500; #amplification factor\n",
+ "r = 1/float(4); #scale can read \n",
+ "v = 4; #output of voltmetr in V\n",
+ "D = 100; #millivoltmeter readings\n",
+ "\n",
+ "#calculation\n",
+ "s = Vo/float(Vi); #sensitivity in mV/mm\n",
+ "sm = a*s; #sensitivity of measurement in mV/mm\n",
+ "s1 = (v/float(D))*10**3; # 1 scale division in mV\n",
+ "Vm = r*s1; #minimum voltage that can be read on voltmeter\n",
+ "R = Vm/float(sm); #resolution in mm\n",
+ "\n",
+ "#result \n",
+ "print'sensitivty of LVDT %3.2f'%s,'mV/mm';\n",
+ "print'resolution %3.4f'%R,'mm';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:7.7,Page No:413"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "capacitance = 13.275 pF\n",
+ "change in capacitance 1.475 pF\n",
+ "ratio ofper unit change of capacitance to per unit change in displacement = 1.111111\n",
+ "capcitance when mica is inserted = 13.88 pF\n",
+ "change in capacitance when mica sheet is inserted = 1.62 pF\n",
+ "ratio ofper unit change of capacitance to per unit change in displacement = 1.168\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "A = 300*10**-6; #area of plate in m**2\n",
+ "d = 0.2*10**-3; #distance between plates in mm\n",
+ "e0 = 8.85*10**-12; #permittivity in F/m\n",
+ "er2 = 8; #dielectric constant of mica \n",
+ "d1 = 0.18*10**-3; #distance between plates in mm\n",
+ "er1 = 1; #dielectric constant\n",
+ "D1 = 0.19;\n",
+ "D2 = 0.01; #thickness of mica sheet in mm\n",
+ "D3 = 0.17; #displacement in mm\n",
+ "D4 = 0.01;\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "#calculation\n",
+ "C = ((e0*A)/float(d)); #value of capacitance in pF\n",
+ "dD = d-d1; #change in displacement in mm\n",
+ "dC = ((e0*A)/(float(d1)))-C; #change in capacitance in capacitance\n",
+ "x1 = (dC/float(C)); #per unit change in capacitance \n",
+ "x2 = (dD/float(d)); #per unit change of displacement\n",
+ "d3 = d-d1; #length of air gap between plates in mm\n",
+ "x = x1/float(x2); #ratio of unit change of capacitance to unit change in displacement\n",
+ "D = (D1/(float(er1)))+((D2/float(er2)));\n",
+ "C1 = (e0*A)/float(D*10**-3); #initial capacitance of transducer in mm\n",
+ "d4 = d1-d3; #length of air gap in mm\n",
+ "d1 = (D3/float(er1))+(D4/float(er2));\n",
+ "C2 = (e0*A)/float(d1*10**-3); # capacitance with displacement is applien in pF\n",
+ "dC2 = C2-C1; #change in capacitance in pF\n",
+ "y1 = (dC2/float(C1)); #per unit change in capacitance \n",
+ "y2 = (dD/float(d)); #per unit change of displacement\n",
+ "Y = y1/float(y2); #ratio of unit change of capacitance to unit change in displacement\n",
+ "\n",
+ "#result\n",
+ "print'capacitance = %2.3f'%(C*10**12),'pF';\n",
+ "print'change in capacitance %3.3f'%(dC*10**12),'pF';\n",
+ "print'ratio ofper unit change of capacitance to per unit change in displacement = %f'%x;\n",
+ "print'capcitance when mica is inserted = %3.2f'%(C1*10**12),'pF';\n",
+ "print'change in capacitance when mica sheet is inserted = %2.2f'%(dC2*10**12),'pF';\n",
+ "print'ratio ofper unit change of capacitance to per unit change in displacement = %3.3f'%Y;\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:7.8,Page No:417"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "output voltage = 192.50 V\n",
+ "charge sensitivity = 2.233 pC/N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "t = 2.5*10**-3; #thickness in m\n",
+ "g = 0.055; #voltage intensity in Vm/N\n",
+ "p = 1.4*10**6; #pressure in N/m**2\n",
+ "e = 40.6*10**-12; #permittivity of quartz in F/m\n",
+ "\n",
+ "#calculation\n",
+ "E = g*t*p; #output voltage in V\n",
+ "q = e*g; #charge sensitivity in pC/N\n",
+ "\n",
+ "#result\n",
+ "print'output voltage = %3.2f'%E,'V';\n",
+ "print'charge sensitivity = %3.3f'%(q*10**12),'pC/N';"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:7.9,Page No:417"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "force = 43.64 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "r = 6*10**-3; #radius in m\n",
+ "t = 1.8*10**-3; #thickness in m\n",
+ "g = 0.055; #voltage intensity in Vm/N\n",
+ "E = 120; #voltage developed in V\n",
+ "\n",
+ "#calculation\n",
+ "A = r*r; #area in m**2\n",
+ "p = E/(float(g*t)); #pressure in N/m**2\n",
+ "F = p*A; #force in N\n",
+ "\n",
+ "\n",
+ "#result\n",
+ "print'force = %3.2f'%F,'N';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:7.10,Page No:417"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "strain = 0.01392\n",
+ "charge = 900.0 pC\n",
+ "capacitance = 300 pf\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "r = 6*10**-3; #radius in m\n",
+ "t = 1.5*10**-3; #thickness in m\n",
+ "e = 12.5*10**-9; #permittivity in F/m\n",
+ "F = 6; #force in N\n",
+ "d = 150*10**-12; #charge density in pC/N\n",
+ "E = 12*10**6; #modulus of elasticity in N/m**2\n",
+ "s = 0.167*10**6; #stress \n",
+ "\n",
+ "#calculation\n",
+ "A = r*r;\n",
+ "p = F/float(A); #pressure in MN/m**2\n",
+ "p1 = p*10**-6;\n",
+ "e1 = s/float(E); #strain \n",
+ "g = d/float(e); #voltage sensitivity in V*m/N;\n",
+ "E1 = g*t*p; #voltage generated in V\n",
+ "Q = d*F; #charge in C\n",
+ "C = (Q)/float(E1); #capacitance in F\n",
+ "\n",
+ "#result\n",
+ "print'strain = %3.5f'%e1;\n",
+ "print'charge = %3.1f'%(Q*10**12),'pC';\n",
+ "print'capacitance = %3.3d'%(C*10**12),'pf';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:7.11,Page No:421"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "hall angle 1.55 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "p = 0.00912; #resistivity in Ωm\n",
+ "B = 0.48; #flux density in Wb/m**2\n",
+ "RH = 3.55*10**-4; #hall coefficient in m**3/C\n",
+ "\n",
+ "#calculation\n",
+ "Ex = p; #Ex in terms of Jx in °\n",
+ "Ey = RH*B; #ey interms of Jx in °\n",
+ "x= Ex/float(Ey);\n",
+ "t = math.atan(x);\n",
+ "\n",
+ "print'hall angle %3.2f'%t,'°';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:7.12,Page No:421"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "voltage between contacts = 0.00256 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "p = 0.00912; #resistivity in Ωm\n",
+ "B = 0.48; #flux density in Wb/m**2\n",
+ "RH = 3.55*10**-4; #hall coefficient in m**3/C\n",
+ "I = 0.015; # current in A\n",
+ "l = 15*10**-3; #length in m\n",
+ "b = 10**-3; #breadth in m\n",
+ "\n",
+ "\n",
+ "#calculation\n",
+ "A = l*b; #area in m**2\n",
+ "Jx = I/float(A); #current density in A/m**2\n",
+ "Ey = RH*B*Jx; #Ey in V/m\n",
+ "V = Ey*I; #voltage between contacts in V\n",
+ "\n",
+ "#result\n",
+ "print'voltage between contacts = %5.5f'%V,'V';"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:7.13,Page No:432"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "poissons ratio = 1.6\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "Gf = 4.2; #guage factor of resistance \n",
+ "\n",
+ "#calculation\n",
+ "u =(Gf-1)/float(2); #poisson's ratio\n",
+ "\n",
+ "#result\n",
+ "print'poissons ratio = %1.1f'%u;"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:7.14,Page No:432"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "change in resistance = 48.00 mΩ\n",
+ "Note:Ans printing mistake in textbook\n",
+ "change in resistance = 48.00 mΩ\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "R = 120; #resistance in Ω\n",
+ "Gf = 2; #guage factor \n",
+ "s = 400*10**6; #elastic limit stress in N/m**2\n",
+ "E = 200*10**9; #modulus of elasticity in N/m**2\n",
+ "alpha = 20*10**-6; #resistance temperature coefficient in /°C\n",
+ "x = 1/float(10); #cahnge in stress \n",
+ "dt = 20; #change in temperature in °C\n",
+ "\n",
+ "#calculations\n",
+ "sc = s*x; #change in stress in N/m**2\n",
+ "e = sc/float(E); #strain \n",
+ "dR = Gf*e*R; #change in resistance in mΩ\n",
+ "dR1 = R*alpha*dt; #change in resistance in mΩ\n",
+ "\n",
+ "#result\n",
+ "print'change in resistance = %3.2f'%(dR*10**3),'mΩ';\n",
+ "print'Note:Ans printing mistake in textbook';\n",
+ "print'change in resistance = %3.2f'%(dR1*10**3),'mΩ';\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:7.15,Page No:433"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 25,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "change in length = 3.72e-06 m\n",
+ "force = 2.438 kN\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "L = 0.12; #length in m\n",
+ "A = 3.8*10**-4; #area in m**2\n",
+ "R = 220; #resistance in Ω\n",
+ "Gf = 2.2; #guage factor\n",
+ "dR = 0.015; #change in resistance in Ω\n",
+ "E = 207*10**9; #elasticity in N/m**2\n",
+ "\n",
+ "#calculations\n",
+ "dL = (dR*L)/float(R*Gf); #change in length in m \n",
+ "s = (E*dL)/float(L); \n",
+ "F = s*A; #force in kN \n",
+ "\n",
+ "#result\n",
+ "print'change in length = %2.2e'%dL,'m';\n",
+ "print'force = %3.3f'%(F*10**-3),'kN';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:7.16,Page No:444"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 26,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "strain = 594.5 microstrain\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "Rg = 100; #resistance in Ω\n",
+ "Rsh = 80000; #resistance in Ω\n",
+ "Gf = 2.1;\n",
+ "\n",
+ "#calculations\n",
+ "x = (Rg/float(Rg+Rsh)); #equivalent strain\n",
+ "eeq = x/(float(Gf)); #strain in microstrain\n",
+ "\n",
+ "#result\n",
+ "print'strain = %3.1f'%(eeq*10**6),'microstrain';\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:7.17,Page No:445"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 27,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "strain = 356.43 microstrain\n",
+ "Note:calculation mistake in text book,Rg value is taken wrong in calculating s\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "n = 4; #four arm bridge\n",
+ "Rg = 200; #resistance in Ω\n",
+ "Rsh = 100*10**3; #resistance in Ω\n",
+ "x = 140; #number of divisions\n",
+ "Gf = 2.0; #guage factor\n",
+ "\n",
+ "#calculation\n",
+ "eeff = Rg/float(n*Gf*(Rg+Rsh)); #effective strain\n",
+ "d = eeff/float(x); #1 division scale\n",
+ "s = float(d)*Rg; #strain when loaded\n",
+ "\n",
+ "#result\n",
+ "print'strain = %3.2f'%(s*10**6),'microstrain';\n",
+ "print'Note:calculation mistake in text book,Rg value is taken wrong in calculating s';\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:7.18,Page No:447"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 28,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "longitudinal stress = 70.01 MN/m**2\n",
+ "longitudinal stress = 146.2 MN/m**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "ex = 0.00016; #strain values in axial \n",
+ "ey = 0.00064; #strain values in circumferential direction\n",
+ "E = 200*10**9; #modulus of elasticity in N/,**2\n",
+ "u = 0.26; #poisson's ratio \n",
+ "\n",
+ "#calculation\n",
+ "sigmax = (E*(ex+(u*ey)))/float(1-(u**2)); #longitudinal stress in N/m**2\n",
+ "sigmay = (E*(ey+(u*ex)))/float(1-(u**2)); #hoop stress in N/m**2\n",
+ "\n",
+ "#result\n",
+ "\n",
+ "print'longitudinal stress = %3.2f'%(sigmax/10**6),'MN/m**2';\n",
+ "print'longitudinal stress = %3.1f'%(sigmay/10**6),'MN/m**2';\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:7.19,Page No:447"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 39,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "227272727.273\n",
+ "modulus of elasticity = 147.5797 GN/M**2\n",
+ "poissons ratio = 0.2727\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "A = 110*10**-6; #area in m**2\n",
+ "P = 25*10**3; #load in N\n",
+ "ex = 1540*10**-6; #strain values in axial direction\n",
+ "ey = -420*10**-6; #strain values in transvers direction\n",
+ "\n",
+ "#calculation\n",
+ "sigmax = P/float(A); #axial stress in N/M**2\n",
+ "E = sigmax/float(ex); #modulus of elasticity in N/M**2\n",
+ "u = (-ey*E)/float(sigmax); #poisson's ratio\n",
+ "\n",
+ "#result\n",
+ "print sigmax\n",
+ "print'modulus of elasticity = %3.4f'%(E*10**-9),'GN/M**2';\n",
+ "print'poissons ratio = %3.4f'%u;\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:7.21,Page No:450"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 55,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "emax = 6.73e-05\n",
+ "emin = -1.927e-05\n",
+ "sigmamax = 13.514 MN/m**2\n",
+ "sigmamin = 0.201 MN/m**2\n",
+ "maximum shear stress = 6.656 MN/m**2\n",
+ "location of principle planes = 0.29 °\n",
+ "location of principle planes = 106.85 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "e1 = 60*10**-6; #strain in microstrains\n",
+ "e2 = 48*10**-6; #strain in microstrain\n",
+ "e3 = -12*10**-6; #strain in microstrain\n",
+ "E = 200*10**9; #modulus of elsticity in N/m**2\n",
+ "u = 0.3;\n",
+ "\n",
+ "#calculation\n",
+ "x = (e1+e3)/float(2); #average of strains\n",
+ "a = math.sqrt(((e1-e2)**2)+((e2-e3)**2));\n",
+ "b = 1/math.sqrt(2);\n",
+ "y = a*b;\n",
+ "emax = x+y; #principle strains\n",
+ "emin = x-y; #principle strains\n",
+ "x1 = x/float(1-u);\n",
+ "y1 = y/float(1+u); \n",
+ "sigmamax = E*(x1+y1); #principle stress\n",
+ "sigmamin = E*(x1-y1); #principle stress\n",
+ "tmax = E*y1; #maximum shear stress in MN/m**2\n",
+ "k = ((2*e2)-e1-e3)/float((e1-e3));\n",
+ "theta = (math.atan(k)); #location of principle planes\n",
+ "theta1 = (math.atan(k))/float(2); #location of principle planes\n",
+ "theta2 = 180+((theta)*180/float(math.pi));\n",
+ "theta3 = theta2/float(2); #location of principle planes\n",
+ "\n",
+ "print'emax = %2.2e'%(emax);\n",
+ "print'emin = %2.3e'%(emin);\n",
+ "print'sigmamax = %3.3f'%(sigmamax*10**-6),'MN/m**2';\n",
+ "print'sigmamin = %3.3f'%(sigmamin*10**-6),'MN/m**2';\n",
+ "print'maximum shear stress = %3.3f'%(tmax*10**-6),'MN/m**2';\n",
+ "print'location of principle planes = %3.2f'%(theta1),'°';\n",
+ "print'location of principle planes = %3.2f'%(theta3),'°';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:7.22,Page No:454"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 56,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "sensitivity of load = 13.79 uV/kN\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "d = 0.06; #diameter in m\n",
+ "Rg = 120; #nominal resistance of each guage Ω\n",
+ "Gf = 2.0; #guage factor \n",
+ "v = 6; #supply voltage in V\n",
+ "E = 200*10**9; #modulus of elasticity in N/m**2\n",
+ "u = 0.3; #poisson's ratio\n",
+ "P = 1000; #load in N\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "A = (math.pi/float(4))*d*d;\n",
+ "s = P/float(A); #stress in N/m**2\n",
+ "e = s/float(E); #strain \n",
+ "x = Gf*e; #fraction change in resistence i.e dR/R\n",
+ "a = v/float(4);\n",
+ "y = 2*(1+u)*(x)*a; #output volatge in uV\n",
+ " \n",
+ "#result\n",
+ "print'sensitivity of load = %3.2f'%(y*10**6),'uV/kN';"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K._RAJPUT_CHAPTER_6.ipynb b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K._RAJPUT_CHAPTER_6.ipynb
new file mode 100644
index 00000000..4731f202
--- /dev/null
+++ b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.K._RAJPUT_CHAPTER_6.ipynb
@@ -0,0 +1,657 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 6:Instrument Transformers"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:6.1,Page No:367"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "actual tranformation ratio = 240.77\n",
+ "phase angle = 4.57 ° \n",
+ "maximum flux density in core = 0.0938 Wb/m**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "Np = 1; #number of primary turns\n",
+ "Ns = 240; #number of secondary turns\n",
+ "Is = 5; #secondary current in A\n",
+ "Re = 1.2; #external burden in Ω \n",
+ "mmf = 96; #magnetomotive force in AT\n",
+ "Ac = 1200*10**-6; #cross section area mm**2\n",
+ "f = 50; #frequency in Hz\n",
+ "\n",
+ "#calculation\n",
+ "Kt = Ns/float(Np); #turns ratio\n",
+ "Es = Is*Re; #voltage induced in secondary winding in V\n",
+ "Im = mmf/float(Np); #secondary current in A\n",
+ "Ip = math.sqrt(((Kt*Is)**2)+((Im)**2)); #primary current in A\n",
+ "Kact = Ip/float(Is); #actual transformation ratio \n",
+ "x = Im/float(Kt*Is); #tangential component\n",
+ "theta = math.atan(x); #phase angle \n",
+ "phimax = Es/float(4.44*f*Ns);\n",
+ "Bmax = phimax/float(Ac);\n",
+ "\n",
+ "#result\n",
+ "print'actual tranformation ratio = %3.2f'%Kact;\n",
+ "print'phase angle = %3.2f'%((theta*180)/float(math.pi)),'° ';\n",
+ "print'maximum flux density in core = %3.4f'%Bmax,'Wb/m**2';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:6.2,Page No:368"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "0.893028554975\n",
+ "ratio error at full load = -0.0450 %\n",
+ "phase angle = 0.051167 degrees\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "I0 = 1; #exciting current in A\n",
+ "Knom = 200; #current transformer ratio \n",
+ "Re = 1.1; #non inductive resistance in Ω \n",
+ "p = 0.45; #power factor \n",
+ "delta = 0;\n",
+ "Is = 5; #rated secondary winding current in A\n",
+ "\n",
+ "#calculations\n",
+ "alpha = 90-(((math.acos(p))*180)/float(math.pi));\n",
+ "Kt = Knom #since no turn compenasation\n",
+ "y = math.sin(((delta+alpha)*math.pi)/float(180));\n",
+ "Kact = Kt+((I0/float(Is))*(y)); #actual transformation ratio\n",
+ "r = ((Knom-Kact)/float(Kact))*100; #ratio error\n",
+ "k =math.cos(((delta+alpha)*math.pi)/float(180));\n",
+ "theta = (180/math.pi)*((I0*k)/float(Kt*Is)); #phase angle degreess\n",
+ "\n",
+ "#calculation\n",
+ "print k\n",
+ "print'ratio error at full load = %3.4f'%r,'%';\n",
+ "print'phase angle = %f'%theta,'degrees';\n",
+ "\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:6.3,Page No:369"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "flux in the core = 1.5766e-04 wb\n",
+ "ratio error = -3.846 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variuable declaration\n",
+ "Knom = 200; #nominal ratio\n",
+ "Np = 1; #number of primary turns\n",
+ "R = 1.4; #secondary impendance in Ω \n",
+ "L = 1.4; #iron loss in W\n",
+ "I = 5; #current in A\n",
+ "d = 0; #load angle when burden is pure resistive \n",
+ "mmf = 80; #magnetomotive force in A\n",
+ "f = 50;\n",
+ "\n",
+ "#calculations\n",
+ "Kt = Knom; #turns ratio\n",
+ "Ns = Kt*Np; #number of secondary turns\n",
+ "Es = I*R; #secondary induced voltage in V\n",
+ "phimax = Es/float(4.44*f*Ns); #flux in core Wb\n",
+ "Ep = Es/float(Kt); #primary induced voltage in V\n",
+ "Iw = L/float(Ep); #loss component of exciting current in A\n",
+ "Im = mmf/float(Np); #magnetising current\n",
+ "Kact = Kt+(((Im*math.sin(d))+(Iw*math.cos(d)))/float(Is)); #actual ratio \n",
+ "r = (Knom-Kact)/float(Kact); #ratio error in %\n",
+ "r1 = r*100;\n",
+ "\n",
+ "#result\n",
+ "print'flux in the core = %3.4e'%phimax,'wb';\n",
+ "print'ratio error = %3.3f'%r1,'%';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:6.4,Page No:370"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "ratio error = -5.57 %\n",
+ "phase angle =2.01 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "Np = 1; #number of primary turns\n",
+ "Ns = 250; #number of secondary turns\n",
+ "Rp = 1.4; #resistance of secondary circuit in Ω\n",
+ "Xs = 1.1; #reactance of secondary circuit in Ω\n",
+ "Is = 5; #current in secondary winding in A\n",
+ "mmf = 80; #magnetomotive force in A\n",
+ "L = 1.1; #iron loss in W\n",
+ "\n",
+ "#calculations\n",
+ "Kt = Ns/float(Np); #turns ratio\n",
+ "Knom = Kt; \n",
+ "Rs = math.sqrt((Rp**2)+(Xs**2)); #secondary circuit impedance\n",
+ "cosd = Rp/float(Rs); \n",
+ "sind = Xs/float(Rs);\n",
+ "Es = Is*Rs; #secondary induced voltage in V\n",
+ "Ep = Es/float(Ns); #primary induced voltage in V\n",
+ "Iw = L/float(Ep); #loss of component reffering to primary winding in A\n",
+ "Im = mmf/float(Np); #magnetising current in A\n",
+ "Kact = Kt+(((Im*sind)+(Iw*cosd))/float(Is)); #actual transformation ratio\n",
+ "r = ((Knom-Kact)/float(Kact))*100; #ratio error in %\n",
+ "theta = (180/math.pi)*(((Im*cosd)-(Iw*sind))/float(Kt*Is)); #phase angle degreess\n",
+ "\n",
+ "#result\n",
+ "print'ratio error = %3.2f'%r,'%';\n",
+ "print'phase angle =%3.2f'%theta,'°';\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:6.5,Page No:371"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "actual ratio = 317.10\n",
+ "primary current = 1585.49 A\n",
+ "reduction in secondary winding turns = 17\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "Np = 1; #number of primary windings\n",
+ "Ns = 300; #umber of secondary windings\n",
+ "Re = 1; #ammeter ressistance in Ω\n",
+ "Xe = 0.55; #reactance in Ω\n",
+ "Rs = 0.3; #resistance if secondary winding in Ω\n",
+ "Xs = 0.25; #reactance of secondary winding in Ω\n",
+ "mmf = 90; # mmf for magnetisation\n",
+ "mmfc = 45; #mmf for core loss \n",
+ "Is = 5; #current in A\n",
+ "\n",
+ "#calculations\n",
+ "R = Rs+Re; #total secondarycircuit resistance in Ω\n",
+ "X = Xs+Xe; #total secondarycircuit reactance in Ω\n",
+ "delta = math.atan(X/float(R)); #secondary circuit phase angle \n",
+ "c = math.cos(delta);\n",
+ "s = math.sin(delta);\n",
+ "Kt = Ns/float(Np); #turn ratio \n",
+ "Im = mmf/float(Np); #magnetising current in A\n",
+ "Iw = mmfc/float(Np); #loss component in A\n",
+ "Kact = Kt+(((Im*math.sin(delta))+(Iw*math.cos(delta)))/float(Is)); #actual ratio\n",
+ "Ip = Kact*Is; #primary current A\n",
+ "Knom = Kt;\n",
+ "y = (((Im*math.sin(delta))+(Iw*math.cos(delta)))/float(Is));\n",
+ "Kt1 = (Knom)-(y);\n",
+ "Ns1 = Kt1*Np; #secondary winding turns\n",
+ "r = Ns-Ns1; #reduction in secondary winding turns\n",
+ "\n",
+ "#result\n",
+ "print'actual ratio = %3.2f'%Kact;\n",
+ "print'primary current = %3.2f'%Ip,'A';\n",
+ "print'reduction in secondary winding turns = %3.0f'%r;"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:6.6,Page No:372"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "actual ratio 101.12\n",
+ "phase angle 0.641 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "Np = 1; #number of primary windings\n",
+ "Ns = 100; #number of secondary windings\n",
+ "Knom = 100; #nominal ratio\n",
+ "Re = 1.45; #external burden non inductive in Ω\n",
+ "Rs = 0.25; #winding resistance in Ω\n",
+ "I0 = 1.8; #current in A\n",
+ "l = 38.4; #lagging angle with secondary voltage reversed in °\n",
+ "Is = 1; #current in secondary winding in A\n",
+ "delta = 0;\n",
+ "\n",
+ "\n",
+ "#calculations\n",
+ "Kt = Ns/float(Np); #turn ratio\n",
+ "Rt = Re+Rs; #totaal secondary circuit resistance in Ω\n",
+ "alpha = 90-l;\n",
+ "x = math.cos(((delta+alpha)*math.pi)/float(180));\n",
+ "Kact = Kt+((I0/float(Is))*x); #actual ratio\n",
+ "y = math.cos(((delta+alpha)*math.pi)/float(180));\n",
+ "theta = (180/float(math.pi))*((I0*y/float(Kt*Is))); #phase angle in °\n",
+ "\n",
+ "#result\n",
+ "print'actual ratio %3.2f'%Kact;\n",
+ "print'phase angle %3.3f'%theta,'°';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:6.7,Page No:373"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 25,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "ratio error -0.87 %\n",
+ "phase angle 0.1948\n",
+ "ratio error 0.08 %\n",
+ "phase angle 0.5386 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "Np = 1; #number of primary windings\n",
+ "Ns = 200; #number of secondary winding\n",
+ "Kt = 200; #actual ratio\n",
+ "Im = 8; #magnetising current in A\n",
+ "Iw = 5; #loss component in A\n",
+ "cosphi = 0.8; # leading by\n",
+ "Knom = 200; #transformer is rated \n",
+ "cosphi1 = 0.8; #lagging by\n",
+ "Is = 5; #current in A\n",
+ "\n",
+ "#calculations\n",
+ "sinphi = math.sqrt((1**2)-(cosphi**2));\n",
+ "Kact = Kt+(((Im*sinphi)+(Iw*cosphi))/float(Is)); #actual ratio\n",
+ "er = ((Knom-Kact)/float(Kact))*100; #error ratio\n",
+ "theta = (180/float(math.pi))*(((Im*cosphi)-(Iw*sinphi))/float(Kt*Is)); #phase angle\n",
+ "sinphi1 = -math.sqrt((1**2)-(cosphi1**2));\n",
+ "Kact1 = Kt+(((Im*sinphi1)+(Iw*cosphi1))/float(Is)); #actual ratio\n",
+ "er1 = ((Knom-Kact1)/float(Kact1))*100; #ratio error\n",
+ "theta1 = (180/float(math.pi))*(((Im*cosphi1)-(Iw*sinphi1))/float(Kt*Is)); #phase angle\n",
+ "\n",
+ "#result\n",
+ "print'ratio error %3.2f'%er,'%';\n",
+ "print'phase angle %3.4f'%theta;\n",
+ "print'ratio error %3.2f'%er1,'%';\n",
+ "print'phase angle %3.4f'%theta1,'°';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": false
+ },
+ "source": [
+ "##Example:6.8,Page No:373"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "ratio error 100.87 %\n",
+ "phase angle 0.4074 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "Np = 1; #number of primary windings\n",
+ "Ns = 99; #number of secondary winding\n",
+ "Rs = 0.4; #secondary winding resistance in Ω\n",
+ "Xs = 0.35; #secondary winding reactance in Ω\n",
+ "Knom = 100; #ratio \n",
+ "mmf = 6; #magnetising mmf in AT\n",
+ "lmmf = 8; #loss mmf in AT\n",
+ "V = 20; #voltage in VA\n",
+ "\n",
+ "\n",
+ "#calculations\n",
+ "Kt = Ns/float(Np); #actual ratio\n",
+ "Im = mmf/float(Np); #magnetising current in A\n",
+ "Iw = lmmf/float(Np); #loss component in A\n",
+ "Re = V/float(Is**2); #external reistance burden in Ω\n",
+ "R = Rs+Re; #resistance of total seccondary circuit in Ω\n",
+ "#reactance is zero \n",
+ "Xe = 0;\n",
+ "X = Xs+Xe; #reactance of total secondary circcuit burden in Ω\n",
+ "delta = ((math.atan(X/float(R))*180)/float(math.pi)); #phase angle\n",
+ "c = math.cos((delta*math.pi)/float(180));\n",
+ "s = math.sin((delta*math.pi)/float(180));\n",
+ "Kact = Kt+(((Im*s)+(Iw*c))/float(Is)); #actual ratio\n",
+ "er = ((Knom-Kact)/float(Kact))*100; #error ratio\n",
+ "theta = (180/float(math.pi))*(((Im*c)-(Iw*s))/float(Kt*Is)); #phase angle\n",
+ "\n",
+ "#result\n",
+ "print'ratio error %3.2f'%Kact,'%';\n",
+ "print'phase angle %3.4f'%theta,'°';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": false
+ },
+ "source": [
+ "##Example:6.9,Page No:374"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "ratio error -1.198 %\n",
+ "phase angle 0.6531 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "Knom = 20; #nominal ratio of 100/5A\n",
+ "V = 20; #rated load in VA\n",
+ "Il = 0.18; #iron loss in W\n",
+ "Im = 1.4; #magnetising current in A\n",
+ "x = 4; #ratio of reactance to resistance \n",
+ "Ip = 100; #primary currnt widing in A\n",
+ "Is = 5; #current in secondary winding in A\n",
+ "\n",
+ "#calculations\n",
+ "Kt = Knom; #assuming the value of Kt\n",
+ "Ep = V/float(Ip); #voltage across primary winding in V\n",
+ "Iw = Il/float(Ep); #loss current of exciting current in A\n",
+ "delta = ((math.atan(1/float(x))*180)/float(math.pi)); #phase angle\n",
+ "c = math.cos((delta*math.pi)/float(180));\n",
+ "s = math.sin((delta*math.pi)/float(180));\n",
+ "Kact = Kt+(((Im*s)+(Iw*c))/float(Is)); #actual ratio\n",
+ "er = ((Knom-Kact)/float(Kact))*100; #error ratio\n",
+ "theta = (180/float(math.pi))*(((Im*c)-(Iw*s))/float(Kt*Is)); #phase angle\n",
+ "\n",
+ "#result\n",
+ "print'ratio error %3.3f'%er,'%';\n",
+ "print'phase angle %3.4f'%theta,'°';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example:6.10,Page No:382"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "phase angle error at no load -0.00156 °\n",
+ "Note:printing mistake in textbook,theta value is printed wrong\n",
+ "burden load in VA 15.34 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "Kt = 10; #ratio of 1000/100volts potentia meter \n",
+ "Rp = 86.4; #primary resistance in Ω\n",
+ "Rs = 0.78; #secondary resistance in Ω\n",
+ "Xp = 62.5; #primary reactance in Ω\n",
+ "Xs = 102; #total equivalent reactance in Ω\n",
+ "I0 = 0.03; #no-load current in A\n",
+ "cosphi = 0.42; #power factor \n",
+ "cosgamma = 1; #since power factor = 1\n",
+ "Vs = 100; #voltage in V\n",
+ "\n",
+ "\n",
+ "#calculations\n",
+ "\n",
+ "sinphi = math.sqrt(1-(cosphi**2));\n",
+ "Im = I0*sinphi; #magnetising current in A\n",
+ "Iw = I0*cosphi; #loss current in A\n",
+ "\n",
+ "#theta = ((((Is/Kt)*((X*cosgamma)-(Rp*singamma)))+(Iw*Xp)-(Im*Rp))/float(Kt*Vs));\n",
+ "#since Is =0 \n",
+ "\n",
+ "theta = (((Iw*Xp)-(Im*Rp))/float(Kt*Vs));\n",
+ "singamma = math.sqrt(1-(cosgamma**2));\n",
+ "\n",
+ "#burden in VA,theta1 = 0,thus ((((Is/Kt)*((X*cosgamma)-(Rp*singamma)))+(Iw*Xp)-(Im*Rp))/float(Kt*Vs))=0\n",
+ "#(((Is/Kt)*((X*cosgamma)-(Rp*singamma)))+(Iw*Xp)-(Im*Rp)) =0\n",
+ "#Is/Kt = ((Im*Rp)-(Iw*Xp)))/float(((X*cosgamma)-(Rp*singamma)))\n",
+ "#assume x = ((X*cosgamma)-(Rp*singamma)),y = (Iw*Xp)-(Im*Rp)\n",
+ "#Is = Kt*(y/x)\n",
+ "\n",
+ "x = ((Xs*cosgamma)-(Rp*singamma));\n",
+ "y = (Im*Rp)-(Iw*Xp);\n",
+ "Is = Kt*(y/float(x)); #current in A\n",
+ "l = Vs*Is; # burden load in VA \n",
+ "\n",
+ "#result\n",
+ "print'phase angle error at no load %3.5f'%theta,'°';\n",
+ "print'Note:printing mistake in textbook,theta value is printed wrong';\n",
+ "print'burden load in VA %3.2f'%l,'V'\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example:6.11,Page No:383"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "ratio error -0.7937 %\n",
+ "phase angle -0.3438 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declartion\n",
+ "Kt = 60.476; #turns ratio 3810/63 tranformer\n",
+ "Vs = 63; #secondary voltage in V\n",
+ "Rs = 2; #series resistance in Ω\n",
+ "Xs = 1; #reactance in Ω\n",
+ "R = 100; #resistance in Ω\n",
+ "X = 200; #reactance in Ω\n",
+ "\n",
+ "#calculations\n",
+ "\n",
+ "delta = ((math.atan(X/float(R))*180)/float(math.pi)); #phase angle\n",
+ "Z = math.sqrt((R**2)+(X**2)); #agnitude of impedance\n",
+ "\n",
+ "#Kact = Kt+(((Rs*c)+(Xs*s))/float(Vs/float(Is))); \n",
+ "#Vs/float(Is) = Z\n",
+ "\n",
+ "c = math.cos((delta*math.pi)/float(180));\n",
+ "s = math.sin((delta*math.pi)/float(180));\n",
+ "x =(Rs*c)+(Xs*s);\n",
+ "y = ((x*Kt)/float(Z));\n",
+ "Kact = Kt+y; #actual ratio\n",
+ "Knom = Kt; #nominal ration \n",
+ "er = ((Knom-Kact)/float(Kact))*100; #error ratio\n",
+ "theta = (180/float(math.pi))*(((Xs*c)-(Rs*s))/float(Z)); #phase angle\n",
+ "\n",
+ "\n",
+ "\n",
+ "#result\n",
+ "print'ratio error %3.4f'%er,'%';\n",
+ "print'phase angle %3.4f'%theta,'°';\n"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.k.Rajput5.ipynb b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.k.Rajput5.ipynb
new file mode 100644
index 00000000..8895e342
--- /dev/null
+++ b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/R.k.Rajput5.ipynb
@@ -0,0 +1,168 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#Chapter 5:Digital Instruments"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.1,Page No:338"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "frequency of the of the system = 4500.00\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "N = 45; #reading \n",
+ "t = 10*10**-3; #Gated period in ms\n",
+ "\n",
+ "#calculations\n",
+ "f = N/float(t);\n",
+ "\n",
+ "#result\n",
+ "print'frequency of the of the system = %3.2f'%f,'Hz';"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.2,Page No:339"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Resolution 0.0010\n",
+ "Resolution for full scale range of 10V = 0.01 V\n",
+ "possible error = 0.015 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "n = 3; #number of full digits on 3 1/2 digit display \n",
+ "fs = 1; #voltage in V\n",
+ "fs1 = 10; #voltage in V\n",
+ "r = 2; #voltage reading in V\n",
+ "fs3 = 5;\n",
+ "\n",
+ "#calculation\n",
+ "R = 1/float((10)**n); #resolution\n",
+ "R1 = R*fs; #resolution for full scale range of 1V\n",
+ "R2 = fs1*R; #resolution for full scale range of 10V\n",
+ "LSD =fs3*R; #digit in the least siginificant digit in V\n",
+ "e = (((0.5)/float(100))*(r))+LSD; #total possible error in V\n",
+ "\n",
+ "#result\n",
+ "print'Resolution %3.4f'%R;\n",
+ "print'Resolution for full scale range of 10V = %3.2f'%R2,'V';\n",
+ "print'possible error = %3.3f'%e,'V';\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 5.3,Page No:340"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Resolution = 0.0001 \n",
+ "There are 5 digit faces in 4 1/2 digt display ,so 16.95 would be displayed as 16.950\n",
+ "Resolution = 0.0001 \n",
+ "Hence 0.6564 will be displayed as 0.6564\n",
+ "Resolution = 0.0010 \n",
+ "Hence 0.6564 will be displayed as 0.656\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "n = 4; #numberof full digits \n",
+ "fs = 1; #full scale range of 1V\n",
+ "fs = 1; #full scale range of 10V\n",
+ "\n",
+ "\n",
+ "#calculation\n",
+ "R = 1/float((10)**n); #resolution\n",
+ "R1 = fs*R; #resolution on 1V in V\n",
+ "R2 = fs1*R; #resolution on 10V in V\n",
+ "\n",
+ "\n",
+ "#result\n",
+ "print'Resolution = %3.4f '%R;\n",
+ "print'There are 5 digit faces in 4 1/2 digt display ,so 16.95 would be displayed as 16.950';\n",
+ "print'Resolution = %3.4f '%R1;\n",
+ "print'Hence 0.6564 will be displayed as 0.6564';\n",
+ "print'Resolution = %3.4f '%R2;\n",
+ "print'Hence 0.6564 will be displayed as 0.656';\n"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/screenshots/r.k.rajput12_2.png b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/screenshots/r.k.rajput12_2.png
new file mode 100644
index 00000000..2cc93e75
--- /dev/null
+++ b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/screenshots/r.k.rajput12_2.png
Binary files differ
diff --git a/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/screenshots/r.k_rajput_2.png b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/screenshots/r.k_rajput_2.png
new file mode 100644
index 00000000..22f87a95
--- /dev/null
+++ b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/screenshots/r.k_rajput_2.png
Binary files differ
diff --git a/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/screenshots/r.krajput_2.png b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/screenshots/r.krajput_2.png
new file mode 100644
index 00000000..60b16536
--- /dev/null
+++ b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/screenshots/r.krajput_2.png
Binary files differ