diff options
Diffstat (limited to 'Electronic_Instrumentation_and_Measurements')
21 files changed, 0 insertions, 9552 deletions
diff --git a/Electronic_Instrumentation_and_Measurements/Chapter10.ipynb b/Electronic_Instrumentation_and_Measurements/Chapter10.ipynb deleted file mode 100755 index 66963b37..00000000 --- a/Electronic_Instrumentation_and_Measurements/Chapter10.ipynb +++ /dev/null @@ -1,94 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:c81ea1dd6c9cc1e2e41ac05c3336a82a69ef851ca3e89f18fcee6fcbfb433811" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter10 - Special Oscilloscopes" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10.11.1 - page10-18" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# sampling rate\n", - "#Given data :\n", - "N=10.0 #number of cycles\n", - "f1=1*10**3 #in Hz\n", - "f2=100*10**3 # in Hz\n", - "sampling_period1=N/f1 # in seconds\n", - "sampling_frequency1=1/sampling_period1 # in Hz\n", - "print \"sampling frequency of 1 kHz signal is \", sampling_frequency1, \" samples/second\"\n", - "sampling_period2=N/f2 # in seconds\n", - "sampling_frequency2=1/sampling_period2 # in Hz\n", - "print \"sampling frequency of 100 kHz signal is \", sampling_frequency2,\" samples/second\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "sampling frequency of 1 kHz signal is 100.0 samples/second\n", - "sampling frequency of 100 kHz signal is 10000.0 samples/second\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example10.13.1 - page10-22" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# sampling rate\n", - "#Given data :\n", - "N=10.0 #number of cycles\n", - "f=1*10**3 #in Hz\n", - "sampling_period=N/f # in seconds\n", - "sampling_rate=1/sampling_period # in Hz\n", - "print \"sampling rate is \",sampling_rate,\" samples/second\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "sampling rate is 100.0 samples/second\n" - ] - } - ], - "prompt_number": 4 - } - ], - "metadata": {} - } - ] -}
\ No newline at end of file diff --git a/Electronic_Instrumentation_and_Measurements/Chapter11.ipynb b/Electronic_Instrumentation_and_Measurements/Chapter11.ipynb deleted file mode 100755 index d9ae373c..00000000 --- a/Electronic_Instrumentation_and_Measurements/Chapter11.ipynb +++ /dev/null @@ -1,105 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:ce9c4ba63f9ce316e76597a7788141e75bacb70902db486d65612d29b6d08c96" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 11 - Instrument Calibration" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 11.3.1 - page11-7" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# percentage of the reading and percentage of full scale\n", - "#Given data :\n", - "a=10 #scale reading\n", - "b=70 # full scale\n", - "error1=-(0.5/10)*100 # in %\n", - "print \"step 1\"\n", - "print \"error of reading \", error1, \" %\"\n", - "error2=-(0.5/100)*100 # in %\n", - "print \"error of full scale is \", error2, \" %\"\n", - "print \"step 2\"\n", - "error3=(2.5/70)*100 # in %\n", - "print \"error of reading is \", round(error3,2), \" %\"\n", - "error4=(2.5/100)*100 # in %\n", - "print \"error of full scale is\", error4, \" %\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "step 1\n", - "error of reading -5.0 %\n", - "error of full scale is -0.5 %\n", - "step 2\n", - "error of reading is 3.57 %\n", - "error of full scale is 2.5 %\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 11.3.2 - page11-9" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - " # wattmeter error and correction figure\n", - "#Given data :\n", - "P1=120.0 # in W\n", - "V=114.0 #in volts\n", - "I=1 #in A\n", - "P=V*I \n", - "error1=P-P1 # in W\n", - "print \"correction figure is \", error1, \" W\"\n", - "error2=(error1/P1)*100 # in %\n", - "print \"wattmeter error is \",error2,\" %\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "correction figure is -6.0 W\n", - "wattmeter error is -5.0 %\n" - ] - } - ], - "prompt_number": 7 - } - ], - "metadata": {} - } - ] -}
\ No newline at end of file diff --git a/Electronic_Instrumentation_and_Measurements/Chapter11_1.ipynb b/Electronic_Instrumentation_and_Measurements/Chapter11_1.ipynb deleted file mode 100755 index d9ae373c..00000000 --- a/Electronic_Instrumentation_and_Measurements/Chapter11_1.ipynb +++ /dev/null @@ -1,105 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:ce9c4ba63f9ce316e76597a7788141e75bacb70902db486d65612d29b6d08c96" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 11 - Instrument Calibration" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 11.3.1 - page11-7" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# percentage of the reading and percentage of full scale\n", - "#Given data :\n", - "a=10 #scale reading\n", - "b=70 # full scale\n", - "error1=-(0.5/10)*100 # in %\n", - "print \"step 1\"\n", - "print \"error of reading \", error1, \" %\"\n", - "error2=-(0.5/100)*100 # in %\n", - "print \"error of full scale is \", error2, \" %\"\n", - "print \"step 2\"\n", - "error3=(2.5/70)*100 # in %\n", - "print \"error of reading is \", round(error3,2), \" %\"\n", - "error4=(2.5/100)*100 # in %\n", - "print \"error of full scale is\", error4, \" %\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "step 1\n", - "error of reading -5.0 %\n", - "error of full scale is -0.5 %\n", - "step 2\n", - "error of reading is 3.57 %\n", - "error of full scale is 2.5 %\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 11.3.2 - page11-9" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - " # wattmeter error and correction figure\n", - "#Given data :\n", - "P1=120.0 # in W\n", - "V=114.0 #in volts\n", - "I=1 #in A\n", - "P=V*I \n", - "error1=P-P1 # in W\n", - "print \"correction figure is \", error1, \" W\"\n", - "error2=(error1/P1)*100 # in %\n", - "print \"wattmeter error is \",error2,\" %\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "correction figure is -6.0 W\n", - "wattmeter error is -5.0 %\n" - ] - } - ], - "prompt_number": 7 - } - ], - "metadata": {} - } - ] -}
\ No newline at end of file diff --git a/Electronic_Instrumentation_and_Measurements/Chapter12.ipynb b/Electronic_Instrumentation_and_Measurements/Chapter12.ipynb deleted file mode 100755 index 20148432..00000000 --- a/Electronic_Instrumentation_and_Measurements/Chapter12.ipynb +++ /dev/null @@ -1,56 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:35a41e7b4dbc1cdc77b9a35c5ee4f207fb6b4dc38c71b3e96011895ab456b780" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter12 - Recorders" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.5.1 - page12-7 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# chart speed\n", - "#Given data :\n", - "f=50.0 # frequency in Hz\n", - "period=1/f # in seconds\n", - "t=5 #in mm/cycle\n", - "chart_speed=t/period\n", - "print \"chart speed = \", chart_speed,\" mm/s\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "chart speed = 250.0 mm/s\n" - ] - } - ], - "prompt_number": 2 - } - ], - "metadata": {} - } - ] -}
\ No newline at end of file diff --git a/Electronic_Instrumentation_and_Measurements/Chapter12_1.ipynb b/Electronic_Instrumentation_and_Measurements/Chapter12_1.ipynb deleted file mode 100755 index 20148432..00000000 --- a/Electronic_Instrumentation_and_Measurements/Chapter12_1.ipynb +++ /dev/null @@ -1,56 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:35a41e7b4dbc1cdc77b9a35c5ee4f207fb6b4dc38c71b3e96011895ab456b780" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter12 - Recorders" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12.5.1 - page12-7 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# chart speed\n", - "#Given data :\n", - "f=50.0 # frequency in Hz\n", - "period=1/f # in seconds\n", - "t=5 #in mm/cycle\n", - "chart_speed=t/period\n", - "print \"chart speed = \", chart_speed,\" mm/s\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "chart speed = 250.0 mm/s\n" - ] - } - ], - "prompt_number": 2 - } - ], - "metadata": {} - } - ] -}
\ No newline at end of file diff --git a/Electronic_Instrumentation_and_Measurements/Chapter2.ipynb b/Electronic_Instrumentation_and_Measurements/Chapter2.ipynb deleted file mode 100755 index 3442a20e..00000000 --- a/Electronic_Instrumentation_and_Measurements/Chapter2.ipynb +++ /dev/null @@ -1,1549 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:95b9e0f83468dda84f2de4d99c5a704a6fadf8064c232b063678fd245192ca75" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter2 - Measurement Errors" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.3.1 - page : 2-8" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#precision of the 5th measurement\n", - "#given data :\n", - "X1=98.0 \n", - "X2=101.0\n", - "X3=102.0 \n", - "X4=97.0 \n", - "X5=101.0 \n", - "X6=100.0 \n", - "X7=103.0 \n", - "X8=98.0 \n", - "X9=106.0 \n", - "X10=99.0 \n", - "Xn_bar=(X1+X2+X3+X4+X5+X6+X7+X8+X9+X10)/10 \n", - "Xn=101 # value of 5th measurement\n", - "P=(1-abs((Xn-Xn_bar)/Xn_bar))*100 \n", - "print \"Precision of the 5th measurement, P = \", round(P,2), \" %\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Precision of the 5th measurement, P = 99.5 %\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.3.2.i - page : 2-10" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Absolute error\n", - "#given data :\n", - "Ae=80.0 # in V\n", - "Am=79.0 # in V\n", - "e=Ae-Am \n", - "print \"Absolute error, e = \", e, \" V\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Absolute error, e = 1.0 V\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.3.2.ii - page : 2-10" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Error\n", - "#given data :\n", - "Ae=80.0 # in V\n", - "Am=79.0 # in V\n", - "e=Ae-Am \n", - "error1=(e/Ae)*100 \n", - "print \"Error = \", error1, \" %\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Error = 1.25 %\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.3.2.iii - page : 2-10" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Relative accuracy\n", - "#given data :\n", - "Ae=80.0 # in V\n", - "Am=79.0 # in V\n", - "e=Ae-Am \n", - "error1=(e/Ae)*100 \n", - "A=(1-abs(e/Ae)) \n", - "print \"Relative Accuracy, A = \", A" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Relative Accuracy, A = 0.9875\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.3.2.iv - page : 2-10" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# % accuracy\n", - "#given data :\n", - "Ae=80.0 # in V\n", - "Am=79.0 # in V\n", - "e=Ae-Am \n", - "error1=(e/Ae)*100 \n", - "A=(1-abs(e/Ae)) \n", - "accuracy=A*100 \n", - "print \"Accuracy = \", accuracy, \" %\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Accuracy = 98.75 %\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.3.2.v - page : 2-10" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# % error\n", - "#given data :\n", - "Ae=80.0 # in V\n", - "Am=79.0 # in V\n", - "e=Ae-Am \n", - "f=100.0 #full scale deflection\n", - "error1=(e/Ae)*100 \n", - "A=(1-abs(e/Ae)) \n", - "accuracy=A*100 \n", - "P_error=(e/f)*100 \n", - "print \"% error = \", P_error, \" %\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "% error = 1.0 %\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.3.3 - page : 2-11" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Maximum error\n", - "#given data :\n", - "V1=100.0 # in V\n", - "V2=200.0 #in V\n", - "V=V2-V1 \n", - "A=0.25 #may be \u00b1 in %\n", - "max_error=(A/100)*V \n", - "print \"Maximum error = \u00b1 \", max_error, \" V\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Maximum error = \u00b1 0.25 V\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.3.4 - page : 2-12" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# sensitivity and deflection error\n", - "#given data :\n", - "C=4.0 # change in output in mm\n", - "M=8.0 # magnitude of input in ohm\n", - "S=C/M \n", - "print \"sensitivity, S = \", S, \" mm/ohm\"\n", - "D=M/C \n", - "print \"Deflection factor, D = \", D, \" ohm/mm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "sensitivity, S = 0.5 mm/ohm\n", - "Deflection factor, D = 2.0 ohm/mm\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.3.5 - page : 2-14" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Resolution\n", - "#given data :\n", - "V=200.0 # full scale reading in V\n", - "N=100.0 # number of divisions \n", - "Scale_div=V/N \n", - "R=(1.0/10)*Scale_div \n", - "print \"Resolution, R = \", R, \" V\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Resolution, R = 0.2 V\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.3.6 - page : 2-14" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Resolution\n", - "#given data :\n", - "V=9.999 # full scale read out in volt\n", - "c=9999.0 # range from 0 to 9999\n", - "R=(1/c)*V*10**3 \n", - "print \"Resolution, R = \", R, \" mV\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Resolution, R = 1.0 mV\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.6.1 - page : 2-23" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Magnitude and relative error\n", - "#given data :\n", - "R1=15.0 #ohm\n", - "E1=R1*5.0/100 # \u00b1 limiting error for R1\n", - "R2=33.0 #ohm\n", - "E2=R2*2.0/100 # \u00b1 limiting error for R2\n", - "R3=75.0 #ohm\n", - "E3=R3*5.0/100 # \u00b1 limiting error for R3\n", - "RT=R1+R2+R3 # ohm(in series)\n", - "ET=E1+E2+E3 #\u00b1limiting error for RT\n", - "print \"For series connection, magnitude is \", RT, \" ohm & limiting error is \u00b1 \", ET, \" ohm.\" \n", - "Epr=ET/RT*100 #%\n", - "print \"Percent relative error : \u00b1\", round(Epr,1),\" %\" \n", - "\n", - "# Answer is not accurate in the textbook." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "For series connection, magnitude is 123.0 ohm & limiting error is \u00b1 5.16 ohm.\n", - "Percent relative error : \u00b1 4.2 %\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.6.2 - page : 2-23" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Magnitude and relative error\n", - "#given data :\n", - "R1=36.0 #ohm\n", - "E1=5.0 # \u00b1 limiting error for R1\n", - "R2=75.0 #ohm\n", - "E2=5.0 # \u00b1 limiting error for R2\n", - "RT=(R1*R2)/(R1+R2) #ohm(in parallel)\n", - "EP1=E1+E2 # \u00b1 limiting error\n", - "EP2=((R1*E1)/(R1+R2))+((R2*E2)/(R1+R2)) \n", - "ET=EP1+EP2 \n", - "etm=(ET/100)*RT \n", - "print \"Magnitude of limiting error is \u00b1\", round(etm,2), \" ohm\"\n", - "print \"Percentage relative error is \u00b1\", ET, \" %\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Magnitude of limiting error is \u00b1 3.65 ohm\n", - "Percentage relative error is \u00b1 15.0 %\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.6.3 page : 2-24" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Limiting error\n", - "vr=40.0 #reading of voltmeter in volts\n", - "v=50.0 #rane in volts\n", - "va=50.0 #ammeeter reading in mA\n", - "i=125.0 #range in mA\n", - "fsd=2.0 #accurace in percentage in \u00b1\n", - "dv=(2.0/100)*v #limiting error of voltmeter\n", - "da=(2./100)*i #liming error of the ammeter in mA\n", - "erv=dv/vr #relative limiting error in voltmeter reading\n", - "eri=da/i #relative limiting error in ammeter reading\n", - "et=erv+eri \n", - "pet=et*100 #percentage limiting error of the power calcultaed\n", - "print \"Percentage limiting error of the power calcultaed is \u00b1 \",pet,\" %\"\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Percentage limiting error of the power calcultaed is \u00b1 4.5 %\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.6.4 - page : 2-25" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# limiting error\n", - "r1=120.0 # ohm\n", - "er1=0.5 #limiting error in resistance 1 in ohm \u00b1\n", - "r2=2 #in A\n", - "er2=0.02 #limiting error in amperes \u00b1\n", - "e1=er2/r2 #limiting error in current\n", - "e2=er1/r1 #limiting eror in resistance\n", - "et=(2*e1+e2) #total error\n", - "etp=et*100 #percentage limtimg error\n", - "print \"Percentage limiting error in the value of power dissipation is \u00b1\",round(etp,3)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Percentage limiting error in the value of power dissipation is \u00b1 2.417\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.6.5 - page : 2-25" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#magnitude and limiting error\n", - "r1=120 #in ohm\n", - "er1=0.1 #limiting error in resistance 1 in ohm \u00b1\n", - "r2=2700 #in ohm\n", - "er2=0.5 #limiting error in resistance 2 in ohm \u00b1\n", - "r3=470 #in ohm\n", - "er3=0.5 #limiting error in resistance 3 in ohm \u00b1\n", - "rxm=(r2*r3)/r1 #magnitude of unknown resistance in ohm\n", - "rxe=(er1+er2+er3) #error\n", - "er=(rxe*rxm)/100 #relative error \u00b1\n", - "print \"Magnitude of unknown resistance is \",rxm,\" kohm\"\n", - "print \"Relative limiting error is \u00b1\",er,\" ohm\"\n", - "print \"Guranteed value of resistance is between \",rxm-er, \" ohm to \" ,rxm+er,\" ohm\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Magnitude of unknown resistance is 10575 kohm\n", - "Relative limiting error is \u00b1 116.325 ohm\n", - "Guranteed value of resistance is between 10458.675 ohm to 10691.325 ohm\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.6.6 - page : 2-26" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# absolute error, % error, relative error, % accuracy and % error of full scale reading\n", - "#given data :\n", - "Ae=80.0 # in volt\n", - "Am=79 # in volt\n", - "fsd=100 #full scale reading in volt\n", - "e=Ae-Am \n", - "print \"Absolute error, e = \",e,\" V\"\n", - "error1=(e/Ae)*100 \n", - "print \"Error = \",error1,\" %\"\n", - "A=1-abs(e/Ae) \n", - "print \"Relative accuracy, A = \",A,\" %\"\n", - "p_accuracy=A*100 \n", - "print \"% accuracy = \",p_accuracy,\" %\"\n", - "error2=(e/fsd)*100 \n", - "print \"% error expressed as percentage of full scale reading = \",error2,\" %\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Absolute error, e = 1.0 V\n", - "Error = 1.25 %\n", - "Relative accuracy, A = 0.9875 %\n", - "% accuracy = 98.75 %\n", - "% error expressed as percentage of full scale reading = 1.0 %\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.6.7 - page : 2-27" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# limiting error\n", - "#given data :\n", - "fsd=100.0 # in V\n", - "A=1.0 # (+ve or -ve) in %\n", - "del_A=(A/100)*fsd \n", - "As=15.0 #in V\n", - "e1=del_A/As \n", - "e=e1*100 \n", - "print \"Limiting error, e = \",round(e,4),\" %\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Limiting error, e = 6.6667 %\n" - ] - } - ], - "prompt_number": 22 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.6.8 - page : 2-27 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# limiting value of current and % limiting error\n", - "#given data :\n", - "As=2.5 # in A\n", - "fsd=10 #full scale reading in A\n", - "A=1.5/100 \n", - "del_A=A*fsd \n", - "At1=As+del_A \n", - "At2=As-del_A \n", - "print \"Limiting value of current, At1 = \",At1,\" A\"\n", - "print \"Limiting value of current, At2 = \",At2,\" A\"\n", - "e=(del_A/As)*100 \n", - "print \"Percentage limiting error, e = \",e,\" %\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Limiting value of current, At1 = 2.65 A\n", - "Limiting value of current, At2 = 2.35 A\n", - "Percentage limiting error, e = 6.0 %\n" - ] - } - ], - "prompt_number": 23 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.7.1.i - page : 2-30" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ARITHEMATIC MEAN\n", - "import numpy\n", - "q=[49.7,50.1,50.2,49.6,49.7] #\n", - "AM= numpy.mean(q) #arithematic mean in mm\n", - "print \"Arithematic mean is \",AM\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Arithematic mean is 49.86\n" - ] - } - ], - "prompt_number": 57 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.7.1.ii - page : 2-30" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#deviation\n", - "import numpy\n", - "q=[49.7,50.1,50.2,49.6,49.7] #\n", - "AM= numpy.mean(q) #arithematic mean in mm\n", - "d=q-AM\n", - "print \"Deviations of each value are : \"\n", - "for dev in d:\n", - " print dev\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Deviations of each value are : \n", - "-0.16\n", - "0.24\n", - "0.34\n", - "-0.26\n", - "-0.16\n" - ] - } - ], - "prompt_number": 58 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.7.1.iii - page : 2-30" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#algebric sum of deviation\n", - "import numpy\n", - "q=[49.7,50.1,50.2,49.6,49.7] #\n", - "AM= numpy.mean(q) #arithematic mean in mm\n", - "d=q-AM\n", - "dtotal=sum(d)\n", - "print \"Algebric sum of deviation is\", round(dtotal,4)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Algebric sum of deviation is 0.0\n" - ] - } - ], - "prompt_number": 59 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.7.1.iv - page : 2-30" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#standard deviation\n", - "import numpy\n", - "q=[49.7,50.1,50.2,49.6,49.7] #\n", - "AM= numpy.mean(q) #arithematic mean in mm\n", - "d=q-AM\n", - "sigma=0\n", - "n=5 # no. of measurements\n", - "for dev in d:\n", - " sigma+=dev**2\n", - "sigma/=(n-1)\n", - "sigma**=(1.0/2)\n", - "print \"Standard Deviation is \",round(sigma,2)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Standard Deviation is 0.27\n" - ] - } - ], - "prompt_number": 60 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.7.2.i - page : 2-31" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ARITHEMATIC MEAN\n", - "import numpy\n", - "q=[101.2,101.4,101.7,101.3,101.3,101.2,101.0,101.3,101.5,101.1] #\n", - "AM= numpy.mean(q) #arithematic mean in mm\n", - "print \"Arithematic mean is \",AM,\" V\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Arithematic mean is 101.3 V\n" - ] - } - ], - "prompt_number": 61 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.7.2.ii - page : 2-31" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Deviation from mean\n", - "import numpy\n", - "q=[101.2,101.4,101.7,101.3,101.3,101.2,101.0,101.3,101.5,101.1] #\n", - "AM= numpy.mean(q) #arithematic mean in mm\n", - "d=q-AM\n", - "print \"Deviations of each value are : \"\n", - "for dev in d:\n", - " print dev\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Deviations of each value are : \n", - "-0.1\n", - "0.1\n", - "0.4\n", - "0.0\n", - "0.0\n", - "-0.1\n", - "-0.3\n", - "0.0\n", - "0.2\n", - "-0.2\n" - ] - } - ], - "prompt_number": 62 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.7.2.iii - page : 2-31" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#standard deviation\n", - "import numpy\n", - "q=[101.2,101.4,101.7,101.3,101.3,101.2,101.0,101.3,101.5,101.1] \n", - "AM= numpy.mean(q) #arithematic mean in mm\n", - "d=q-AM\n", - "sigma=0\n", - "n=10 # no. of measurements\n", - "for dev in d:\n", - " sigma+=dev**2\n", - "sigma/=(n-1)\n", - "sigma**=(1.0/2)\n", - "print \"Standard Deviation is \",round(sigma,2)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Standard Deviation is 0.2\n" - ] - } - ], - "prompt_number": 63 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.7.2.iv - page : 2-31" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#probable error\n", - "import numpy\n", - "q=[101.2,101.4,101.7,101.3,101.3,101.2,101.0,101.3,101.5,101.1] \n", - "AM= numpy.mean(q) #arithematic mean in mm\n", - "d=q-AM\n", - "sigma=0\n", - "n=10 # no. of measurements\n", - "for dev in d:\n", - " sigma+=dev**2\n", - "sigma/=(n-1)\n", - "sigma**=(1.0/2)\n", - "pe1=0.6745*sigma # Probable error of one reading\n", - "print \"Probable error of one reading is \",pe1,\" V\"\n", - "pm=pe1/(n-1)**(1.0/2)\n", - "print \"Probable error of mean is \",round(pm,5)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Probable error of one reading is 0.1349 V\n", - "Probable error of mean is 0.04497\n" - ] - } - ], - "prompt_number": 64 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.7.3.i - page : 2-32" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Arithmetic mean\n", - "#given data :\n", - "X1=147.2 # in nF\n", - "X2=147.4 # in nF\n", - "X3=147.9 # in nF\n", - "X4=148.1 # in nF\n", - "X5=148.1 # in nF\n", - "X6=147.5 # in nF\n", - "X7=147.6 # in nF\n", - "X8=147.4 # in nF\n", - "X9=147.6 # in nF\n", - "X10=147.5 # in nF\n", - "AM=(X1+X2+X3+X4+X5+X6+X7+X8+X9+X10)/10 \n", - "print \"Arithmetic mean, AM = \",AM,\" nF\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Arithmetic mean, AM = 147.63 nF\n" - ] - } - ], - "prompt_number": 77 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.7.3.ii - page : 2-32" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Average deviation\n", - "#given data :\n", - "n=10 \n", - "X1=147.2 # in nF\n", - "X2=147.4 # in nF\n", - "X3=147.9 # in nF\n", - "X4=148.1 # in nF\n", - "X5=148.1 # in nF\n", - "X6=147.5 # in nF\n", - "X7=147.6 # in nF\n", - "X8=147.4 # in nF\n", - "X9=147.6 # in nF\n", - "X10=147.5 # in nF\n", - "AM=(X1+X2+X3+X4+X5+X6+X7+X8+X9+X10)/n \n", - "d1=X1-AM \n", - "d2=X2-AM \n", - "d3=X3-AM \n", - "d4=X4-AM \n", - "d5=X5-AM \n", - "d6=X6-AM \n", - "d7=X7-AM \n", - "d8=X8-AM \n", - "d9=X9-AM \n", - "d10=X10-AM \n", - "Average_deviation=(abs(d1)+abs(d2)+abs(d3)+abs(d4)+abs(d5)+abs(d5)+abs(d6)+abs(d7)+abs(d8)+abs(d9)+abs(d10))/n \n", - "print \"Average deviation = \",Average_deviation,\" nF\"\n", - "# answer is wrong in book" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Average deviation = 0.289 nF\n" - ] - } - ], - "prompt_number": 79 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.7.3.iii - page : 2-32" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Standard deviation\n", - "#given data :\n", - "n=10 \n", - "X1=147.2 # in nF\n", - "X2=147.4 # in nF\n", - "X3=147.9 # in nF\n", - "X4=148.1 # in nF\n", - "X5=148.1 # in nF\n", - "X6=147.5 # in nF\n", - "X7=147.6 # in nF\n", - "X8=147.4 # in nF\n", - "X9=147.6 # in nF\n", - "X10=147.5 # in nF\n", - "AM=(X1+X2+X3+X4+X5+X6+X7+X8+X9+X10)/n \n", - "d1=X1-AM \n", - "d2=X2-AM \n", - "d3=X3-AM \n", - "d4=X4-AM \n", - "d5=X5-AM \n", - "d6=X6-AM \n", - "d7=X7-AM \n", - "d8=X8-AM \n", - "d9=X9-AM \n", - "d10=X10-AM \n", - "sigma=((d1**2+d2**2+d3**2+d4**2+d5**2+d6**2+d7**2+d8**2+d9**2+d10**2)/(n-1))**(1.0/2) \n", - "print \"Standard deviation = \",round(sigma,4),\" nF\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Standard deviation = 0.3057 nF\n" - ] - } - ], - "prompt_number": 82 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.7.3.iv - page : 2-32" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#: Probable error\n", - "#given data :\n", - "n=10 \n", - "X1=147.2 # in nF\n", - "X2=147.4 # in nF\n", - "X3=147.9 # in nF\n", - "X4=148.1 # in nF\n", - "X5=148.1 # in nF\n", - "X6=147.5 # in nF\n", - "X7=147.6 # in nF\n", - "X8=147.4 # in nF\n", - "X9=147.6 # in nF\n", - "X10=147.5 # in nF\n", - "AM=(X1+X2+X3+X4+X5+X6+X7+X8+X9+X10)/n \n", - "d1=X1-AM \n", - "d2=X2-AM \n", - "d3=X3-AM \n", - "d4=X4-AM \n", - "d5=X5-AM \n", - "d6=X6-AM \n", - "d7=X7-AM \n", - "d8=X8-AM \n", - "d9=X9-AM \n", - "d10=X10-AM \n", - "sigma=((d1**2+d2**2+d3**2+d4**2+d5**2+d6**2+d7**2+d8**2+d9**2+d10**2)/(n-1))**(1.0/2)\n", - "Pe1=0.6745*sigma # probable error of one reading\n", - "probable_error=Pe1/(n-1)**(1.0/2)\n", - "print \"Probable error of one reading = \",round(Pe1,4),\" nF\"\n", - "print \"Probable error of mean = \",round(probable_error,4),\" nF\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Probable error of one reading = 0.2062 nF\n", - "Probable error of mean = 0.0687 nF\n" - ] - } - ], - "prompt_number": 86 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.7.4.i - page : 2-34" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ARITHEMATIC MEAN\n", - "import numpy\n", - "q=[10.3,10.7,10.9,9.7,9.5,9.2,10.3,11.7] #\n", - "AM= numpy.mean(q) #arithematic mean in mm\n", - "print \"Arithematic mean is \",AM,\" kg/cm2\"\n", - "#answer is wrong in textbook\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Arithematic mean is 10.2875 kg/cm2\n" - ] - } - ], - "prompt_number": 65 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.7.4.ii - page : 2-34" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#average deviation\n", - "import numpy\n", - "n=8 # NO. OF MEASUREMENTS\n", - "q=[10.3,10.7,10.9,9.7,9.5,9.2,10.3,11.7] #\n", - "AM= numpy.mean(q) #arithematic mean in mm\n", - "d=q-AM # deviation\n", - "davg=sum(abs(d))/n # average deviation\n", - "print \"Average deviation = \",round(davg,4),\" kg/cm2\"\n", - "#answer is wrong in textbook" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Average deviation = 0.6156 kg/cm2\n" - ] - } - ], - "prompt_number": 66 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.7.4.iii - page : 2-34" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#standard deviation\n", - "import numpy\n", - "q=[10.3,10.7,10.9,9.7,9.5,9.2,10.3,11.7] #\n", - "AM= numpy.mean(q) #arithematic mean in mm\n", - "d=q-AM\n", - "sigma=0\n", - "n=8 # no. of measurements\n", - "for dev in d:\n", - " sigma+=dev**2\n", - "sigma/=(n-1)\n", - "sigma**=(1.0/2)\n", - "print \"Standard Deviation is \",round(sigma,4),\" kg/cm2\"\n", - "#answer is wrong in textbook\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Standard Deviation is 0.8184 kg/cm2\n" - ] - } - ], - "prompt_number": 95 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.7.4.iv - page : 2-34" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#probable error\n", - "n=8 # no. of measurements\n", - "q=[10.3,10.7,10.9,9.7,9.5,9.2,10.3,11.7] #\n", - "AM= numpy.mean(q) #arithematic mean in mm\n", - "d=q-AM\n", - "sigma=0\n", - "n=10 # no. of measurements\n", - "for dev in d:\n", - " sigma+=dev**2\n", - "sigma/=(n-1)\n", - "sigma**=(1.0/2)\n", - "pe1=0.6745*sigma # Probable error of one reading\n", - "print \"Probable error of one reading is \",round(pe1,4),\" kg/cm2\"\n", - "pm=pe1/(n-1)**(1.0/2)\n", - "print \"Probable error of mean is \",round(pm,4),\" kg/cm2\"\n", - "#answer is wrong in textbook\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Probable error of one reading is 0.4868 kg/cm2\n", - "Probable error of mean is 0.1623 kg/cm2\n" - ] - } - ], - "prompt_number": 67 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.8.1 - page : 2-34" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ARITHEMATIC MEAN ,median value ,standard deviation and variance\n", - "q=[25.5,30.3,31.1,29.6,32.4,39.4,28.9,30.0,33.3,31.4,29.5,30.5,31.7,33.0,29.2] #\n", - "AM= numpy.mean(q) #arithematic mean in mm\n", - "n=len(q) # no. of measurements\n", - "Q=q-AM\n", - "mv=sorted(q)[n/2] # get the median value from sorted q\n", - "d=q-AM\n", - "sigma=0\n", - "for dev in d:\n", - " sigma+=dev**2\n", - "sigma/=(n-1)\n", - "sigma**=(1.0/2) #standard deviation\n", - "V=sigma**2 #variance\n", - "print \"Arithematic mean is \",round(AM,4),\" V\"\n", - "print \"Median value is\",round(mv,1)\n", - "\n", - "print \"Standard Deviation is \",round(sigma,2)\n", - "\n", - "print \"Variance is \",round(V,0)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Arithematic mean is 31.0533 V\n", - "Median value is 30.5\n", - "Standard Deviation is 3.0\n", - "Variance is 9.0\n" - ] - } - ], - "prompt_number": 116 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.8.2 - page : 2-37" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ARITHEMATIC MEAN\n", - "#from __future__ import division\n", - "v=[10,11,12,13,14] #\n", - "f=[03,12,18,12,03] #\n", - "xn=[a*b for a,b in zip(v,f)]\n", - "am=sum(xn)/sum(f) # arithmetic mean\n", - "print \"Arithematic mean is \",am,\" V\"\n", - "dn=[x-am for x in v] # deviation\n", - "n_dn=[a*b for a,b in zip(f,dn)]\n", - "dn2=[a*b for a,b in zip(dn,dn)]\n", - "n_dn2=[a*b for a,b in zip(f,dn2)]\n", - "absn_dn=[abs(a) for a in n_dn]\n", - "mean_dev=sum(absn_dn)/sum(f)\n", - "print \"Mean deviation = \",mean_dev\n", - "sigma=(sum(n_dn2)/sum(f))**(1.0/2)\n", - "print \"Standard deviation is \", sigma\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Arithematic mean is 12.0 V\n", - "Mean deviation = 0.75\n", - "Standard deviation is 1.0\n" - ] - } - ], - "prompt_number": 46 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.8.3 - page : 2-37" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ARITHEMATIC MEAN ,median value ,standard deviation \n", - "import numpy\n", - "q=[29.2,29.5,29.6,30.0,30.5,31.4,31.7,32.4,33.0,33.3,39.4,28.9] #\n", - "AM= numpy.mean(q)#arithematic mean in mm\n", - "print \"Arithematic mean is \",round(AM,2)\n", - "mv=sorted(q)[int(len(q)/2-1)]\n", - "print \"Median value = \",mv\n", - "d=[x-AM for x in q]\n", - "d2=[x**2 for x in d]\n", - "sigma=(sum(d2)/(len(q)-1))**(1.0/2)\n", - "print \"Standard Deviation = \",round(sigma,3)\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Arithematic mean is 31.57\n", - "Median value = 30.5\n", - "Standard Deviation = 2.886\n" - ] - } - ], - "prompt_number": 97 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.8.4 - page:2-39" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Unknown resistor \n", - "#given data :\n", - "S=1000.0 # ohm/V\n", - "V=100.0 #in V\n", - "I=5*10**-3 # in A\n", - "# part (i)\n", - "R_app=(V/I)*10**-3 \n", - "print \"(i) Apparent Resistor, R_app = \",R_app, \" kohm\"\n", - "# part (ii)\n", - "V1=150 #in V\n", - "Rv=S*V1*10**-3 \n", - "Rx=Rv/6.5 #actual resistance in kohm\n", - "print \"(ii) Actual resistance is \",round(Rx,2),\" kohm.\"\n", - "# part(iii)\n", - "per=(Rx-R_app)/Rx*100 # in %\n", - "print \"(iii) Percentage error due to loading effect of voltmeter is \",round(per,1), \" %\" \n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i) Apparent Resistor, R_app = 20.0 kohm\n", - "(ii) Actual resistance is 23.08 kohm.\n", - "(iii) Percentage error due to loading effect of voltmeter is 13.3 %\n" - ] - } - ], - "prompt_number": 103 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.8.5 - page : 2-40" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# limiting error\n", - "#given data :\n", - "del_A=2.5 # may be +ve or-ve in %\n", - "As=400.0 \n", - "FSD=600.0 # in V\n", - "del_A1=(del_A/100)*FSD \n", - "e=(del_A1/As)*100 # in %\n", - "print \"Limiting error, e = \",e, \" %\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Limiting error, e = 3.75 %\n" - ] - } - ], - "prompt_number": 104 - } - ], - "metadata": {} - } - ] -}
\ No newline at end of file diff --git a/Electronic_Instrumentation_and_Measurements/Chapter2_1.ipynb b/Electronic_Instrumentation_and_Measurements/Chapter2_1.ipynb deleted file mode 100755 index 3442a20e..00000000 --- a/Electronic_Instrumentation_and_Measurements/Chapter2_1.ipynb +++ /dev/null @@ -1,1549 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:95b9e0f83468dda84f2de4d99c5a704a6fadf8064c232b063678fd245192ca75" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter2 - Measurement Errors" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.3.1 - page : 2-8" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#precision of the 5th measurement\n", - "#given data :\n", - "X1=98.0 \n", - "X2=101.0\n", - "X3=102.0 \n", - "X4=97.0 \n", - "X5=101.0 \n", - "X6=100.0 \n", - "X7=103.0 \n", - "X8=98.0 \n", - "X9=106.0 \n", - "X10=99.0 \n", - "Xn_bar=(X1+X2+X3+X4+X5+X6+X7+X8+X9+X10)/10 \n", - "Xn=101 # value of 5th measurement\n", - "P=(1-abs((Xn-Xn_bar)/Xn_bar))*100 \n", - "print \"Precision of the 5th measurement, P = \", round(P,2), \" %\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Precision of the 5th measurement, P = 99.5 %\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.3.2.i - page : 2-10" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Absolute error\n", - "#given data :\n", - "Ae=80.0 # in V\n", - "Am=79.0 # in V\n", - "e=Ae-Am \n", - "print \"Absolute error, e = \", e, \" V\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Absolute error, e = 1.0 V\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.3.2.ii - page : 2-10" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Error\n", - "#given data :\n", - "Ae=80.0 # in V\n", - "Am=79.0 # in V\n", - "e=Ae-Am \n", - "error1=(e/Ae)*100 \n", - "print \"Error = \", error1, \" %\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Error = 1.25 %\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.3.2.iii - page : 2-10" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Relative accuracy\n", - "#given data :\n", - "Ae=80.0 # in V\n", - "Am=79.0 # in V\n", - "e=Ae-Am \n", - "error1=(e/Ae)*100 \n", - "A=(1-abs(e/Ae)) \n", - "print \"Relative Accuracy, A = \", A" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Relative Accuracy, A = 0.9875\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.3.2.iv - page : 2-10" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# % accuracy\n", - "#given data :\n", - "Ae=80.0 # in V\n", - "Am=79.0 # in V\n", - "e=Ae-Am \n", - "error1=(e/Ae)*100 \n", - "A=(1-abs(e/Ae)) \n", - "accuracy=A*100 \n", - "print \"Accuracy = \", accuracy, \" %\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Accuracy = 98.75 %\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.3.2.v - page : 2-10" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# % error\n", - "#given data :\n", - "Ae=80.0 # in V\n", - "Am=79.0 # in V\n", - "e=Ae-Am \n", - "f=100.0 #full scale deflection\n", - "error1=(e/Ae)*100 \n", - "A=(1-abs(e/Ae)) \n", - "accuracy=A*100 \n", - "P_error=(e/f)*100 \n", - "print \"% error = \", P_error, \" %\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "% error = 1.0 %\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.3.3 - page : 2-11" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Maximum error\n", - "#given data :\n", - "V1=100.0 # in V\n", - "V2=200.0 #in V\n", - "V=V2-V1 \n", - "A=0.25 #may be \u00b1 in %\n", - "max_error=(A/100)*V \n", - "print \"Maximum error = \u00b1 \", max_error, \" V\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Maximum error = \u00b1 0.25 V\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.3.4 - page : 2-12" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# sensitivity and deflection error\n", - "#given data :\n", - "C=4.0 # change in output in mm\n", - "M=8.0 # magnitude of input in ohm\n", - "S=C/M \n", - "print \"sensitivity, S = \", S, \" mm/ohm\"\n", - "D=M/C \n", - "print \"Deflection factor, D = \", D, \" ohm/mm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "sensitivity, S = 0.5 mm/ohm\n", - "Deflection factor, D = 2.0 ohm/mm\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.3.5 - page : 2-14" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Resolution\n", - "#given data :\n", - "V=200.0 # full scale reading in V\n", - "N=100.0 # number of divisions \n", - "Scale_div=V/N \n", - "R=(1.0/10)*Scale_div \n", - "print \"Resolution, R = \", R, \" V\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Resolution, R = 0.2 V\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.3.6 - page : 2-14" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Resolution\n", - "#given data :\n", - "V=9.999 # full scale read out in volt\n", - "c=9999.0 # range from 0 to 9999\n", - "R=(1/c)*V*10**3 \n", - "print \"Resolution, R = \", R, \" mV\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Resolution, R = 1.0 mV\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.6.1 - page : 2-23" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Magnitude and relative error\n", - "#given data :\n", - "R1=15.0 #ohm\n", - "E1=R1*5.0/100 # \u00b1 limiting error for R1\n", - "R2=33.0 #ohm\n", - "E2=R2*2.0/100 # \u00b1 limiting error for R2\n", - "R3=75.0 #ohm\n", - "E3=R3*5.0/100 # \u00b1 limiting error for R3\n", - "RT=R1+R2+R3 # ohm(in series)\n", - "ET=E1+E2+E3 #\u00b1limiting error for RT\n", - "print \"For series connection, magnitude is \", RT, \" ohm & limiting error is \u00b1 \", ET, \" ohm.\" \n", - "Epr=ET/RT*100 #%\n", - "print \"Percent relative error : \u00b1\", round(Epr,1),\" %\" \n", - "\n", - "# Answer is not accurate in the textbook." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "For series connection, magnitude is 123.0 ohm & limiting error is \u00b1 5.16 ohm.\n", - "Percent relative error : \u00b1 4.2 %\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.6.2 - page : 2-23" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Magnitude and relative error\n", - "#given data :\n", - "R1=36.0 #ohm\n", - "E1=5.0 # \u00b1 limiting error for R1\n", - "R2=75.0 #ohm\n", - "E2=5.0 # \u00b1 limiting error for R2\n", - "RT=(R1*R2)/(R1+R2) #ohm(in parallel)\n", - "EP1=E1+E2 # \u00b1 limiting error\n", - "EP2=((R1*E1)/(R1+R2))+((R2*E2)/(R1+R2)) \n", - "ET=EP1+EP2 \n", - "etm=(ET/100)*RT \n", - "print \"Magnitude of limiting error is \u00b1\", round(etm,2), \" ohm\"\n", - "print \"Percentage relative error is \u00b1\", ET, \" %\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Magnitude of limiting error is \u00b1 3.65 ohm\n", - "Percentage relative error is \u00b1 15.0 %\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.6.3 page : 2-24" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Limiting error\n", - "vr=40.0 #reading of voltmeter in volts\n", - "v=50.0 #rane in volts\n", - "va=50.0 #ammeeter reading in mA\n", - "i=125.0 #range in mA\n", - "fsd=2.0 #accurace in percentage in \u00b1\n", - "dv=(2.0/100)*v #limiting error of voltmeter\n", - "da=(2./100)*i #liming error of the ammeter in mA\n", - "erv=dv/vr #relative limiting error in voltmeter reading\n", - "eri=da/i #relative limiting error in ammeter reading\n", - "et=erv+eri \n", - "pet=et*100 #percentage limiting error of the power calcultaed\n", - "print \"Percentage limiting error of the power calcultaed is \u00b1 \",pet,\" %\"\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Percentage limiting error of the power calcultaed is \u00b1 4.5 %\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.6.4 - page : 2-25" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# limiting error\n", - "r1=120.0 # ohm\n", - "er1=0.5 #limiting error in resistance 1 in ohm \u00b1\n", - "r2=2 #in A\n", - "er2=0.02 #limiting error in amperes \u00b1\n", - "e1=er2/r2 #limiting error in current\n", - "e2=er1/r1 #limiting eror in resistance\n", - "et=(2*e1+e2) #total error\n", - "etp=et*100 #percentage limtimg error\n", - "print \"Percentage limiting error in the value of power dissipation is \u00b1\",round(etp,3)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Percentage limiting error in the value of power dissipation is \u00b1 2.417\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.6.5 - page : 2-25" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#magnitude and limiting error\n", - "r1=120 #in ohm\n", - "er1=0.1 #limiting error in resistance 1 in ohm \u00b1\n", - "r2=2700 #in ohm\n", - "er2=0.5 #limiting error in resistance 2 in ohm \u00b1\n", - "r3=470 #in ohm\n", - "er3=0.5 #limiting error in resistance 3 in ohm \u00b1\n", - "rxm=(r2*r3)/r1 #magnitude of unknown resistance in ohm\n", - "rxe=(er1+er2+er3) #error\n", - "er=(rxe*rxm)/100 #relative error \u00b1\n", - "print \"Magnitude of unknown resistance is \",rxm,\" kohm\"\n", - "print \"Relative limiting error is \u00b1\",er,\" ohm\"\n", - "print \"Guranteed value of resistance is between \",rxm-er, \" ohm to \" ,rxm+er,\" ohm\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Magnitude of unknown resistance is 10575 kohm\n", - "Relative limiting error is \u00b1 116.325 ohm\n", - "Guranteed value of resistance is between 10458.675 ohm to 10691.325 ohm\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.6.6 - page : 2-26" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# absolute error, % error, relative error, % accuracy and % error of full scale reading\n", - "#given data :\n", - "Ae=80.0 # in volt\n", - "Am=79 # in volt\n", - "fsd=100 #full scale reading in volt\n", - "e=Ae-Am \n", - "print \"Absolute error, e = \",e,\" V\"\n", - "error1=(e/Ae)*100 \n", - "print \"Error = \",error1,\" %\"\n", - "A=1-abs(e/Ae) \n", - "print \"Relative accuracy, A = \",A,\" %\"\n", - "p_accuracy=A*100 \n", - "print \"% accuracy = \",p_accuracy,\" %\"\n", - "error2=(e/fsd)*100 \n", - "print \"% error expressed as percentage of full scale reading = \",error2,\" %\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Absolute error, e = 1.0 V\n", - "Error = 1.25 %\n", - "Relative accuracy, A = 0.9875 %\n", - "% accuracy = 98.75 %\n", - "% error expressed as percentage of full scale reading = 1.0 %\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.6.7 - page : 2-27" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# limiting error\n", - "#given data :\n", - "fsd=100.0 # in V\n", - "A=1.0 # (+ve or -ve) in %\n", - "del_A=(A/100)*fsd \n", - "As=15.0 #in V\n", - "e1=del_A/As \n", - "e=e1*100 \n", - "print \"Limiting error, e = \",round(e,4),\" %\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Limiting error, e = 6.6667 %\n" - ] - } - ], - "prompt_number": 22 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.6.8 - page : 2-27 " - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# limiting value of current and % limiting error\n", - "#given data :\n", - "As=2.5 # in A\n", - "fsd=10 #full scale reading in A\n", - "A=1.5/100 \n", - "del_A=A*fsd \n", - "At1=As+del_A \n", - "At2=As-del_A \n", - "print \"Limiting value of current, At1 = \",At1,\" A\"\n", - "print \"Limiting value of current, At2 = \",At2,\" A\"\n", - "e=(del_A/As)*100 \n", - "print \"Percentage limiting error, e = \",e,\" %\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Limiting value of current, At1 = 2.65 A\n", - "Limiting value of current, At2 = 2.35 A\n", - "Percentage limiting error, e = 6.0 %\n" - ] - } - ], - "prompt_number": 23 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.7.1.i - page : 2-30" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ARITHEMATIC MEAN\n", - "import numpy\n", - "q=[49.7,50.1,50.2,49.6,49.7] #\n", - "AM= numpy.mean(q) #arithematic mean in mm\n", - "print \"Arithematic mean is \",AM\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Arithematic mean is 49.86\n" - ] - } - ], - "prompt_number": 57 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.7.1.ii - page : 2-30" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#deviation\n", - "import numpy\n", - "q=[49.7,50.1,50.2,49.6,49.7] #\n", - "AM= numpy.mean(q) #arithematic mean in mm\n", - "d=q-AM\n", - "print \"Deviations of each value are : \"\n", - "for dev in d:\n", - " print dev\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Deviations of each value are : \n", - "-0.16\n", - "0.24\n", - "0.34\n", - "-0.26\n", - "-0.16\n" - ] - } - ], - "prompt_number": 58 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.7.1.iii - page : 2-30" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#algebric sum of deviation\n", - "import numpy\n", - "q=[49.7,50.1,50.2,49.6,49.7] #\n", - "AM= numpy.mean(q) #arithematic mean in mm\n", - "d=q-AM\n", - "dtotal=sum(d)\n", - "print \"Algebric sum of deviation is\", round(dtotal,4)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Algebric sum of deviation is 0.0\n" - ] - } - ], - "prompt_number": 59 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.7.1.iv - page : 2-30" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#standard deviation\n", - "import numpy\n", - "q=[49.7,50.1,50.2,49.6,49.7] #\n", - "AM= numpy.mean(q) #arithematic mean in mm\n", - "d=q-AM\n", - "sigma=0\n", - "n=5 # no. of measurements\n", - "for dev in d:\n", - " sigma+=dev**2\n", - "sigma/=(n-1)\n", - "sigma**=(1.0/2)\n", - "print \"Standard Deviation is \",round(sigma,2)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Standard Deviation is 0.27\n" - ] - } - ], - "prompt_number": 60 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.7.2.i - page : 2-31" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ARITHEMATIC MEAN\n", - "import numpy\n", - "q=[101.2,101.4,101.7,101.3,101.3,101.2,101.0,101.3,101.5,101.1] #\n", - "AM= numpy.mean(q) #arithematic mean in mm\n", - "print \"Arithematic mean is \",AM,\" V\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Arithematic mean is 101.3 V\n" - ] - } - ], - "prompt_number": 61 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.7.2.ii - page : 2-31" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Deviation from mean\n", - "import numpy\n", - "q=[101.2,101.4,101.7,101.3,101.3,101.2,101.0,101.3,101.5,101.1] #\n", - "AM= numpy.mean(q) #arithematic mean in mm\n", - "d=q-AM\n", - "print \"Deviations of each value are : \"\n", - "for dev in d:\n", - " print dev\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Deviations of each value are : \n", - "-0.1\n", - "0.1\n", - "0.4\n", - "0.0\n", - "0.0\n", - "-0.1\n", - "-0.3\n", - "0.0\n", - "0.2\n", - "-0.2\n" - ] - } - ], - "prompt_number": 62 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.7.2.iii - page : 2-31" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#standard deviation\n", - "import numpy\n", - "q=[101.2,101.4,101.7,101.3,101.3,101.2,101.0,101.3,101.5,101.1] \n", - "AM= numpy.mean(q) #arithematic mean in mm\n", - "d=q-AM\n", - "sigma=0\n", - "n=10 # no. of measurements\n", - "for dev in d:\n", - " sigma+=dev**2\n", - "sigma/=(n-1)\n", - "sigma**=(1.0/2)\n", - "print \"Standard Deviation is \",round(sigma,2)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Standard Deviation is 0.2\n" - ] - } - ], - "prompt_number": 63 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.7.2.iv - page : 2-31" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#probable error\n", - "import numpy\n", - "q=[101.2,101.4,101.7,101.3,101.3,101.2,101.0,101.3,101.5,101.1] \n", - "AM= numpy.mean(q) #arithematic mean in mm\n", - "d=q-AM\n", - "sigma=0\n", - "n=10 # no. of measurements\n", - "for dev in d:\n", - " sigma+=dev**2\n", - "sigma/=(n-1)\n", - "sigma**=(1.0/2)\n", - "pe1=0.6745*sigma # Probable error of one reading\n", - "print \"Probable error of one reading is \",pe1,\" V\"\n", - "pm=pe1/(n-1)**(1.0/2)\n", - "print \"Probable error of mean is \",round(pm,5)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Probable error of one reading is 0.1349 V\n", - "Probable error of mean is 0.04497\n" - ] - } - ], - "prompt_number": 64 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.7.3.i - page : 2-32" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Arithmetic mean\n", - "#given data :\n", - "X1=147.2 # in nF\n", - "X2=147.4 # in nF\n", - "X3=147.9 # in nF\n", - "X4=148.1 # in nF\n", - "X5=148.1 # in nF\n", - "X6=147.5 # in nF\n", - "X7=147.6 # in nF\n", - "X8=147.4 # in nF\n", - "X9=147.6 # in nF\n", - "X10=147.5 # in nF\n", - "AM=(X1+X2+X3+X4+X5+X6+X7+X8+X9+X10)/10 \n", - "print \"Arithmetic mean, AM = \",AM,\" nF\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Arithmetic mean, AM = 147.63 nF\n" - ] - } - ], - "prompt_number": 77 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.7.3.ii - page : 2-32" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Average deviation\n", - "#given data :\n", - "n=10 \n", - "X1=147.2 # in nF\n", - "X2=147.4 # in nF\n", - "X3=147.9 # in nF\n", - "X4=148.1 # in nF\n", - "X5=148.1 # in nF\n", - "X6=147.5 # in nF\n", - "X7=147.6 # in nF\n", - "X8=147.4 # in nF\n", - "X9=147.6 # in nF\n", - "X10=147.5 # in nF\n", - "AM=(X1+X2+X3+X4+X5+X6+X7+X8+X9+X10)/n \n", - "d1=X1-AM \n", - "d2=X2-AM \n", - "d3=X3-AM \n", - "d4=X4-AM \n", - "d5=X5-AM \n", - "d6=X6-AM \n", - "d7=X7-AM \n", - "d8=X8-AM \n", - "d9=X9-AM \n", - "d10=X10-AM \n", - "Average_deviation=(abs(d1)+abs(d2)+abs(d3)+abs(d4)+abs(d5)+abs(d5)+abs(d6)+abs(d7)+abs(d8)+abs(d9)+abs(d10))/n \n", - "print \"Average deviation = \",Average_deviation,\" nF\"\n", - "# answer is wrong in book" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Average deviation = 0.289 nF\n" - ] - } - ], - "prompt_number": 79 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.7.3.iii - page : 2-32" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Standard deviation\n", - "#given data :\n", - "n=10 \n", - "X1=147.2 # in nF\n", - "X2=147.4 # in nF\n", - "X3=147.9 # in nF\n", - "X4=148.1 # in nF\n", - "X5=148.1 # in nF\n", - "X6=147.5 # in nF\n", - "X7=147.6 # in nF\n", - "X8=147.4 # in nF\n", - "X9=147.6 # in nF\n", - "X10=147.5 # in nF\n", - "AM=(X1+X2+X3+X4+X5+X6+X7+X8+X9+X10)/n \n", - "d1=X1-AM \n", - "d2=X2-AM \n", - "d3=X3-AM \n", - "d4=X4-AM \n", - "d5=X5-AM \n", - "d6=X6-AM \n", - "d7=X7-AM \n", - "d8=X8-AM \n", - "d9=X9-AM \n", - "d10=X10-AM \n", - "sigma=((d1**2+d2**2+d3**2+d4**2+d5**2+d6**2+d7**2+d8**2+d9**2+d10**2)/(n-1))**(1.0/2) \n", - "print \"Standard deviation = \",round(sigma,4),\" nF\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Standard deviation = 0.3057 nF\n" - ] - } - ], - "prompt_number": 82 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.7.3.iv - page : 2-32" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#: Probable error\n", - "#given data :\n", - "n=10 \n", - "X1=147.2 # in nF\n", - "X2=147.4 # in nF\n", - "X3=147.9 # in nF\n", - "X4=148.1 # in nF\n", - "X5=148.1 # in nF\n", - "X6=147.5 # in nF\n", - "X7=147.6 # in nF\n", - "X8=147.4 # in nF\n", - "X9=147.6 # in nF\n", - "X10=147.5 # in nF\n", - "AM=(X1+X2+X3+X4+X5+X6+X7+X8+X9+X10)/n \n", - "d1=X1-AM \n", - "d2=X2-AM \n", - "d3=X3-AM \n", - "d4=X4-AM \n", - "d5=X5-AM \n", - "d6=X6-AM \n", - "d7=X7-AM \n", - "d8=X8-AM \n", - "d9=X9-AM \n", - "d10=X10-AM \n", - "sigma=((d1**2+d2**2+d3**2+d4**2+d5**2+d6**2+d7**2+d8**2+d9**2+d10**2)/(n-1))**(1.0/2)\n", - "Pe1=0.6745*sigma # probable error of one reading\n", - "probable_error=Pe1/(n-1)**(1.0/2)\n", - "print \"Probable error of one reading = \",round(Pe1,4),\" nF\"\n", - "print \"Probable error of mean = \",round(probable_error,4),\" nF\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Probable error of one reading = 0.2062 nF\n", - "Probable error of mean = 0.0687 nF\n" - ] - } - ], - "prompt_number": 86 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.7.4.i - page : 2-34" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ARITHEMATIC MEAN\n", - "import numpy\n", - "q=[10.3,10.7,10.9,9.7,9.5,9.2,10.3,11.7] #\n", - "AM= numpy.mean(q) #arithematic mean in mm\n", - "print \"Arithematic mean is \",AM,\" kg/cm2\"\n", - "#answer is wrong in textbook\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Arithematic mean is 10.2875 kg/cm2\n" - ] - } - ], - "prompt_number": 65 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.7.4.ii - page : 2-34" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#average deviation\n", - "import numpy\n", - "n=8 # NO. OF MEASUREMENTS\n", - "q=[10.3,10.7,10.9,9.7,9.5,9.2,10.3,11.7] #\n", - "AM= numpy.mean(q) #arithematic mean in mm\n", - "d=q-AM # deviation\n", - "davg=sum(abs(d))/n # average deviation\n", - "print \"Average deviation = \",round(davg,4),\" kg/cm2\"\n", - "#answer is wrong in textbook" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Average deviation = 0.6156 kg/cm2\n" - ] - } - ], - "prompt_number": 66 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.7.4.iii - page : 2-34" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#standard deviation\n", - "import numpy\n", - "q=[10.3,10.7,10.9,9.7,9.5,9.2,10.3,11.7] #\n", - "AM= numpy.mean(q) #arithematic mean in mm\n", - "d=q-AM\n", - "sigma=0\n", - "n=8 # no. of measurements\n", - "for dev in d:\n", - " sigma+=dev**2\n", - "sigma/=(n-1)\n", - "sigma**=(1.0/2)\n", - "print \"Standard Deviation is \",round(sigma,4),\" kg/cm2\"\n", - "#answer is wrong in textbook\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Standard Deviation is 0.8184 kg/cm2\n" - ] - } - ], - "prompt_number": 95 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.7.4.iv - page : 2-34" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#probable error\n", - "n=8 # no. of measurements\n", - "q=[10.3,10.7,10.9,9.7,9.5,9.2,10.3,11.7] #\n", - "AM= numpy.mean(q) #arithematic mean in mm\n", - "d=q-AM\n", - "sigma=0\n", - "n=10 # no. of measurements\n", - "for dev in d:\n", - " sigma+=dev**2\n", - "sigma/=(n-1)\n", - "sigma**=(1.0/2)\n", - "pe1=0.6745*sigma # Probable error of one reading\n", - "print \"Probable error of one reading is \",round(pe1,4),\" kg/cm2\"\n", - "pm=pe1/(n-1)**(1.0/2)\n", - "print \"Probable error of mean is \",round(pm,4),\" kg/cm2\"\n", - "#answer is wrong in textbook\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Probable error of one reading is 0.4868 kg/cm2\n", - "Probable error of mean is 0.1623 kg/cm2\n" - ] - } - ], - "prompt_number": 67 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.8.1 - page : 2-34" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ARITHEMATIC MEAN ,median value ,standard deviation and variance\n", - "q=[25.5,30.3,31.1,29.6,32.4,39.4,28.9,30.0,33.3,31.4,29.5,30.5,31.7,33.0,29.2] #\n", - "AM= numpy.mean(q) #arithematic mean in mm\n", - "n=len(q) # no. of measurements\n", - "Q=q-AM\n", - "mv=sorted(q)[n/2] # get the median value from sorted q\n", - "d=q-AM\n", - "sigma=0\n", - "for dev in d:\n", - " sigma+=dev**2\n", - "sigma/=(n-1)\n", - "sigma**=(1.0/2) #standard deviation\n", - "V=sigma**2 #variance\n", - "print \"Arithematic mean is \",round(AM,4),\" V\"\n", - "print \"Median value is\",round(mv,1)\n", - "\n", - "print \"Standard Deviation is \",round(sigma,2)\n", - "\n", - "print \"Variance is \",round(V,0)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Arithematic mean is 31.0533 V\n", - "Median value is 30.5\n", - "Standard Deviation is 3.0\n", - "Variance is 9.0\n" - ] - } - ], - "prompt_number": 116 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.8.2 - page : 2-37" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ARITHEMATIC MEAN\n", - "#from __future__ import division\n", - "v=[10,11,12,13,14] #\n", - "f=[03,12,18,12,03] #\n", - "xn=[a*b for a,b in zip(v,f)]\n", - "am=sum(xn)/sum(f) # arithmetic mean\n", - "print \"Arithematic mean is \",am,\" V\"\n", - "dn=[x-am for x in v] # deviation\n", - "n_dn=[a*b for a,b in zip(f,dn)]\n", - "dn2=[a*b for a,b in zip(dn,dn)]\n", - "n_dn2=[a*b for a,b in zip(f,dn2)]\n", - "absn_dn=[abs(a) for a in n_dn]\n", - "mean_dev=sum(absn_dn)/sum(f)\n", - "print \"Mean deviation = \",mean_dev\n", - "sigma=(sum(n_dn2)/sum(f))**(1.0/2)\n", - "print \"Standard deviation is \", sigma\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Arithematic mean is 12.0 V\n", - "Mean deviation = 0.75\n", - "Standard deviation is 1.0\n" - ] - } - ], - "prompt_number": 46 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.8.3 - page : 2-37" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#ARITHEMATIC MEAN ,median value ,standard deviation \n", - "import numpy\n", - "q=[29.2,29.5,29.6,30.0,30.5,31.4,31.7,32.4,33.0,33.3,39.4,28.9] #\n", - "AM= numpy.mean(q)#arithematic mean in mm\n", - "print \"Arithematic mean is \",round(AM,2)\n", - "mv=sorted(q)[int(len(q)/2-1)]\n", - "print \"Median value = \",mv\n", - "d=[x-AM for x in q]\n", - "d2=[x**2 for x in d]\n", - "sigma=(sum(d2)/(len(q)-1))**(1.0/2)\n", - "print \"Standard Deviation = \",round(sigma,3)\n", - "\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Arithematic mean is 31.57\n", - "Median value = 30.5\n", - "Standard Deviation = 2.886\n" - ] - } - ], - "prompt_number": 97 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.8.4 - page:2-39" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Unknown resistor \n", - "#given data :\n", - "S=1000.0 # ohm/V\n", - "V=100.0 #in V\n", - "I=5*10**-3 # in A\n", - "# part (i)\n", - "R_app=(V/I)*10**-3 \n", - "print \"(i) Apparent Resistor, R_app = \",R_app, \" kohm\"\n", - "# part (ii)\n", - "V1=150 #in V\n", - "Rv=S*V1*10**-3 \n", - "Rx=Rv/6.5 #actual resistance in kohm\n", - "print \"(ii) Actual resistance is \",round(Rx,2),\" kohm.\"\n", - "# part(iii)\n", - "per=(Rx-R_app)/Rx*100 # in %\n", - "print \"(iii) Percentage error due to loading effect of voltmeter is \",round(per,1), \" %\" \n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "(i) Apparent Resistor, R_app = 20.0 kohm\n", - "(ii) Actual resistance is 23.08 kohm.\n", - "(iii) Percentage error due to loading effect of voltmeter is 13.3 %\n" - ] - } - ], - "prompt_number": 103 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.8.5 - page : 2-40" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# limiting error\n", - "#given data :\n", - "del_A=2.5 # may be +ve or-ve in %\n", - "As=400.0 \n", - "FSD=600.0 # in V\n", - "del_A1=(del_A/100)*FSD \n", - "e=(del_A1/As)*100 # in %\n", - "print \"Limiting error, e = \",e, \" %\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Limiting error, e = 3.75 %\n" - ] - } - ], - "prompt_number": 104 - } - ], - "metadata": {} - } - ] -}
\ No newline at end of file diff --git a/Electronic_Instrumentation_and_Measurements/Chapter3.ipynb b/Electronic_Instrumentation_and_Measurements/Chapter3.ipynb deleted file mode 100755 index 987db16f..00000000 --- a/Electronic_Instrumentation_and_Measurements/Chapter3.ipynb +++ /dev/null @@ -1,734 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:212ce889d9f64f00c714723a9e3110b735cade9ea1d505fecd98a7e24257c63b" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter3 - Electromechanical Instruments" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.2.1 - page : 3-5" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Torque\n", - "#given data :\n", - "N=10 # turns\n", - "L=1.5*10**-2 # in m\n", - "I=1 # in mA\n", - "I*=10**-3 #A\n", - "B=0.5 # T\n", - "d=1*10**-2 # in m\n", - "Td=B*I*L*d*N # Nm\n", - "print \"Torque, Td = \", Td,\"Nm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Torque, Td = 7.5e-07 Nm\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.2. - page : 3-5" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# number of turns\n", - "#given data :\n", - "import math\n", - "theta=math.pi/2\n", - "I=5*10**-3 # in A\n", - "B=1.8*10**-3 # in Wb/m2\n", - "C=0.14*10**-6 # in Nm/rad\n", - "L=15*10**-3 # in m\n", - "d=12*10**-3 # in m\n", - "N=(C*theta)/(B*I*L*d)\n", - "print \"Number of turns, N = \", round(N),\"turns\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Number of turns, N = 136.0 turns\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.2.3 - page : 3-6" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# resistance\n", - "#given data :\n", - "Tc=240*10**-6 #in Nm\n", - "N=100 # Turns\n", - "L=40*10**-3 # in m\n", - "d=30*10**-3 # in m\n", - "B=1 #in Wb/m2\n", - "TdBYI=N*B*L*d\n", - "I=Tc/TdBYI\n", - "#voltage per division=I*(R/100)\n", - "R=100/I # ohm\n", - "R*=10**-3 # kohm\n", - "print \"Resistance, R = \", R,\"kohm\"\n", - "#UNIT IS GIVEN WRONG FOR THE ANSWER IN THE BOOK." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Resistance, R = 50.0 kohm\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.2.4 - page : 3-7" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# flux density and diameter\n", - "import math\n", - "#given data :\n", - "p=1.7*10**-8 #in ohm-m\n", - "V=100*10**-3 #in V\n", - "R=50 # in ohm\n", - "theta=120 #in degree\n", - "L=30 # in mm\n", - "d=25 # in mm\n", - "N=100\n", - "C=0.375*10**-6 # in Nm/degree\n", - "I=V/R # A\n", - "Td_By_B=I*L*10**-3*d*10**-3*N\n", - "Tc=C*theta # N-m\n", - "B=Tc/Td_By_B # in Wb/m2\n", - "print \"The flux density, B = \", B,\"Wb/m2\"\n", - "Rc=0.3*R\n", - "Lmt=2*(L+d)\n", - "a=(N*p*Lmt*10**-3*10**6)/Rc\n", - "D=(4/(math.pi*a))**(1.0/2)\n", - "print \"Diameter, D = \", round(D,1),\"m\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The flux density, B = 0.3 Wb/m2\n", - "Diameter, D = 10.1 m\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.4.1 - page : 3-11" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# shunt resistor\n", - "#given data :\n", - "Im=3*10**-3 # in A\n", - "Rm=100 # in ohm\n", - "I=150*10**-3 #in A\n", - "Rsh=(Im*Rm)/(I-Im)\n", - "print \"Shunt resistor, Rsh = \", round(Rsh,2),\"ohm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Shunt resistor, Rsh = 2.04 ohm\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.4.2 - page : 3-11" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# shunt resistormultiplying factor and resistance\n", - "#given data :\n", - "Rsh=300 #in ohm\n", - "Rm=1500 #in ohm\n", - "m=1+(Rm/Rsh)\n", - "print \"Multiplying factor, m = \",m\n", - "m1=40.0\n", - "Rsh1=Rm/(m1-1)\n", - "print \"The shunt resistor, Rsh1 = \", round(Rsh1,2),\"ohm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Multiplying factor, m = 6\n", - "The shunt resistor, Rsh1 = 38.46 ohm\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.5.1 - page : 3-13" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#given data :\n", - "Rm=100.0 # in ohm\n", - "Im=1.0\n", - "#for range 0-20 mA\n", - "I1=20.0\n", - "m=I1/Im\n", - "Rsh1=Rm/(m-1)\n", - "print \"The shunt resistor, Rsh1 = \", round(Rsh1,2),\"ohm\"\n", - "#for the range of 0-100 mA\n", - "I2=100.0\n", - "m=I2/Im\n", - "Rsh2=Rm/(m-1)\n", - "print \"The shunt resistor, Rsh2 = \", round(Rsh2,2),\"ohm\"\n", - "#for the range 0-200 mA\n", - "I3=200.0\n", - "m=I3/Im\n", - "Rsh3=Rm/(m-1)\n", - "print \"The shunt resistor, Rsh3 = \", round(Rsh3,2),\"ohm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The shunt resistor, Rsh1 = 5.26 ohm\n", - "The shunt resistor, Rsh2 = 1.01 ohm\n", - "The shunt resistor, Rsh3 = 0.5 ohm\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.6.1 - page : 3-15" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import numpy\n", - "from numpy.linalg import inv\n", - "#design\n", - "Rm=50.0 #in ohm\n", - "Im=2.0 #in mA\n", - "Im*=10**-3 # A\n", - "I1=2.0 #in A\n", - "I2=10.0 #in A\n", - "I3=15.0 #in A\n", - "#Let Rs=R1+R2+R3\n", - "A=numpy.array([[I1,I1,I1],[-Im,I2,I2],[Im,Im,-I3]])\n", - "B=numpy.array([[Im*Rm],[Im*Rm],[-Im*Rm]])\n", - "Ainv=inv(A)\n", - "X=numpy.dot(Ainv,B)\n", - "R1=X[0]\n", - "R2=X[1]\n", - "R3=X[2]\n", - "print \"Value of shunt resistors are : \"\n", - "print \"R1 is %f ohm, R2 is %.1e ohm & R3 is %.2e ohm\" %(round(R1,5), R2, R3)\n", - "# Answer is wrong in the textbook." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Value of shunt resistors are : \n", - "R1 is 0.039990 ohm, R2 is 3.3e-03 ohm & R3 is 6.67e-03 ohm\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.9.1 - page : 3-19" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Multiplier\n", - "#Given data :\n", - "Vin=20.0 #in volts\n", - "I_fsd=50.0*10 **-6 # in Farad\n", - "Rm=200.0 # in ohm\n", - "Rs=(Vin/I_fsd)-Rm # in ohm\n", - "Rs=Rs/10**3 # kohm\n", - "print \"The multiplier, Rs = \", Rs, \" kohm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The multiplier, Rs = 399.8 kohm\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.9.2 - page : 3-19" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Full scale deflection current\n", - "#given data :\n", - "Vin=10.0 # in V\n", - "Rs=200.0 #in kohm\n", - "Rm=400.0 # in ohm\n", - "I_fsd=Vin/((Rs*10 **3)+Rm) # A\n", - "I_fsd*=10**6 # micro A\n", - "print \"Full scale deflection current, I_fsd = \", round(I_fsd,1), \" micro A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Full scale deflection current, I_fsd = 49.9 micro A\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.10.1 - page : 3-22" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Multiplier\n", - "#given data :\n", - "V1=200.0 #in V\n", - "V2=100.0 #in V\n", - "V3=10.0 # in V\n", - "Rm=100.0 #in ohm\n", - "I_fsd=50*10 **-3 \n", - "#for the range 0-10V \n", - "Rt3=V3/I_fsd \n", - "Rs3=Rt3-Rm # ohm\n", - "print \"The multiplier, Rs3 = \", Rs3, \" ohm.\"\n", - "#for the range 0-100V\n", - "Rt2=V2/I_fsd \n", - "Rs2=Rt2-(Rm+Rs3) # ohm \n", - "print \"The multiplier, Rs2 = \", Rs2, \" ohm.\"\n", - "Rt1=V1/I_fsd \n", - "Rs1=Rt1-(Rm+Rs3+Rs2) \n", - "print \"The multiplier, Rs1 = \", Rs1, \" ohm.\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The multiplier, Rs3 = 100.0 ohm.\n", - "The multiplier, Rs2 = 1800.0 ohm.\n", - "The multiplier, Rs1 = 2000.0 ohm.\n" - ] - } - ], - "prompt_number": 33 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.11.1 - page : 3-23" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Multiplier\n", - "#given data :\n", - "Rm=200.0 #in ohm\n", - "I_fsd=150.0*10 **-6 # in A\n", - "S=1/I_fsd \n", - "V=50 #in V\n", - "Rs=(S*V)-Rm # ohm \n", - "Rs*=10**-3 # kohm\n", - "print \"Multiplier, Rs = \", round(Rs,2), \" kohm.\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Multiplier, Rs = 333.13 kohm.\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.11.2 - page : 3-24" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Accurate voltmeter reading\n", - "r1=50.0 # in kohms\n", - "r2=50.0 #in kohms\n", - "v=100.0 #in V\n", - "vr2=(r1/(r1+r2))*v # voltage in V\n", - "#case 1\n", - "s1=12000.0 #sensivity in ohm/V\n", - "rm1=r1*s1*10**-3 # in kohm\n", - "req=((rm1*r1)/(rm1+r1)) #equivalent resistance in ohm\n", - "v1=((req/(r1+req)))*v # voltmeter reading when sensivity is 12000 ohm/V\n", - "#case 2\n", - "s2=15000 #sensivity in ohm/V V\n", - "rm2=r1*s2*10**-3 # in kohm\n", - "req1=((rm2*r1)/(rm2+r1)) #equivalent resistance in ohm\n", - "v2=((req1/(r1+req1)))*v # voltmeter reading when sensivity is 15000 ohm/V\n", - "print \"Voltmeter reading when sensivity is 12000 ohm/V is \", round(v1,2), \" V\"\n", - "print \"Voltmeter reading when sensivity is 15000 ohm/V is \", round(v2,2), \" V. This voltmeter will measure the correct value.\"\n", - "# Answer in the textbook is not accurate" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Voltmeter reading when sensivity is 12000 ohm/V is 48.0 V\n", - "Voltmeter reading when sensivity is 15000 ohm/V is 48.39 V. This voltmeter will measure the correct value.\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.15.1 - page : 3-28" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#voltage\n", - "r1=25.0 # kohms\n", - "r2=5.0 #in kohms\n", - "v=30.0 #in V\n", - "# part(i)\n", - "vr2=(r2/(r1+r2))*v # voltage in V across 5 kohms resistance\n", - "Vactual=vr2 # V\n", - "print \"Voltage across 5 kohm Resistance is \", vr2, \" V.\"\n", - "#part (ii)\n", - "vr2=(r1/(r1+r2))*v # voltage in V across 5 kohm resistance\n", - "#case 1\n", - "s1=1.0 #sensivity in kohm/V\n", - "v1=10.0 # in V\n", - "rm1=v1*s1 #in kohm\n", - "req=((rm1*r2)/(rm1+r2)) # equivalent resistance in ohm\n", - "vrb1=((req/(r1+req)))*v # voltmeter reading when sensivity is 1 kohm/V\n", - "print \"Voltmeter reading when sensivity is 1 kohm/V is \",round(vrb1,2), \" V.\"\n", - "# part(iii)\n", - "#case 2\n", - "s2=20 #sensivity in kohm/V\n", - "v1=10 # in V\n", - "rm2=v1*s2 #in kohm\n", - "req1=((rm2*r2)/(rm2+r2)) #equivalent resistance in ohm\n", - "vrb2=((req1/(r1+req1)))*v # voltmeter reading when sensivity is 1 kohm/V\n", - "print \"Voltmeter reading when sensivity is 1 kohm/V is \",round(vrb2,2), \" V.\"\n", - "#part(iii) #error\n", - "er1=(Vactual-vrb1)/Vactual*100 #voltmeter 1 error in %\n", - "er2=(Vactual-vrb2)/Vactual*100 #voltmeter 2 error in %\n", - "print \"Voltmeter 1 error is \",round(er1,2),\" %\"\n", - "print \"Voltmeter 2 error is \",round(er2,1),\" %\"\n", - "#Answer is wrong in the textbook" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Voltage across 5 kohm Resistance is 5.0 V.\n", - "Voltmeter reading when sensivity is 1 kohm/V is 3.53 V.\n", - "Voltmeter reading when sensivity is 1 kohm/V is 4.9 V.\n", - "Voltmeter 1 error is 29.41 %\n", - "Voltmeter 2 error is 2.0 %\n" - ] - } - ], - "prompt_number": 20 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.15.2 - page : 3-29" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Shunt resistance\n", - "#Given data :\n", - "Im=1.0 # in mA\n", - "Rm=100.0 # in ohm\n", - "I=100.0 # in mA\n", - "Rsh=(Im*10**-3*Rm)/((I-Im)*10**-3) \n", - "print \"Shunt resistance, Rsh = \",round(Rsh,3),\" ohm.\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Shunt resistance, Rsh = 1.01 ohm.\n" - ] - } - ], - "prompt_number": 21 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.15.3 - page : 3-29" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Shunt resistance\n", - "#Given data :\n", - "Im=1.0 # in mA\n", - "P=100.0 # in kW\n", - "I=100.0 # in mA\n", - "Rm=(P)/(Im)**2 # ohm\n", - "Rsh=((Im*10**-3*Rm*10**3)/((I-Im)*10**-3))*10**-3 # ohm\n", - "print \"Shunt resistance, Rsh = \",round(Rsh,3), \" kohm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Shunt resistance, Rsh = 1.01 kohm\n" - ] - } - ], - "prompt_number": 22 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.15.4 - page : 3-29" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Shunt resistance\n", - "#given data :\n", - "Rsh=200.0 # in ohm\n", - "Rm=100.0 # in ohm\n", - "m=50.0 \n", - "Rsh=Rm/(m-1) # ohm\n", - "print \"The shunt resistance, Rsh = \", round(Rsh,2), \" ohm.\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The shunt resistance, Rsh = 2.04 ohm.\n" - ] - } - ], - "prompt_number": 23 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.15.5 - page : 3-30" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# shunt resistance\n", - "#Given data :\n", - "Im=1.0 # in mA\n", - "Rm=100.0 # in ohm\n", - "I=100.0 # in mA\n", - "Rsh=(Im*10**-3*Rm)/((I-Im)*10**-3) # ohm\n", - "print \"Shunt resistance, Rsh = \", round(Rsh,3), \" kohm.\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Shunt resistance, Rsh = 1.01 kohm.\n" - ] - } - ], - "prompt_number": 24 - } - ], - "metadata": {} - } - ] -}
\ No newline at end of file diff --git a/Electronic_Instrumentation_and_Measurements/Chapter3_1.ipynb b/Electronic_Instrumentation_and_Measurements/Chapter3_1.ipynb deleted file mode 100755 index 987db16f..00000000 --- a/Electronic_Instrumentation_and_Measurements/Chapter3_1.ipynb +++ /dev/null @@ -1,734 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:212ce889d9f64f00c714723a9e3110b735cade9ea1d505fecd98a7e24257c63b" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter3 - Electromechanical Instruments" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.2.1 - page : 3-5" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Torque\n", - "#given data :\n", - "N=10 # turns\n", - "L=1.5*10**-2 # in m\n", - "I=1 # in mA\n", - "I*=10**-3 #A\n", - "B=0.5 # T\n", - "d=1*10**-2 # in m\n", - "Td=B*I*L*d*N # Nm\n", - "print \"Torque, Td = \", Td,\"Nm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Torque, Td = 7.5e-07 Nm\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.2. - page : 3-5" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# number of turns\n", - "#given data :\n", - "import math\n", - "theta=math.pi/2\n", - "I=5*10**-3 # in A\n", - "B=1.8*10**-3 # in Wb/m2\n", - "C=0.14*10**-6 # in Nm/rad\n", - "L=15*10**-3 # in m\n", - "d=12*10**-3 # in m\n", - "N=(C*theta)/(B*I*L*d)\n", - "print \"Number of turns, N = \", round(N),\"turns\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Number of turns, N = 136.0 turns\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.2.3 - page : 3-6" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# resistance\n", - "#given data :\n", - "Tc=240*10**-6 #in Nm\n", - "N=100 # Turns\n", - "L=40*10**-3 # in m\n", - "d=30*10**-3 # in m\n", - "B=1 #in Wb/m2\n", - "TdBYI=N*B*L*d\n", - "I=Tc/TdBYI\n", - "#voltage per division=I*(R/100)\n", - "R=100/I # ohm\n", - "R*=10**-3 # kohm\n", - "print \"Resistance, R = \", R,\"kohm\"\n", - "#UNIT IS GIVEN WRONG FOR THE ANSWER IN THE BOOK." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Resistance, R = 50.0 kohm\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.2.4 - page : 3-7" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# flux density and diameter\n", - "import math\n", - "#given data :\n", - "p=1.7*10**-8 #in ohm-m\n", - "V=100*10**-3 #in V\n", - "R=50 # in ohm\n", - "theta=120 #in degree\n", - "L=30 # in mm\n", - "d=25 # in mm\n", - "N=100\n", - "C=0.375*10**-6 # in Nm/degree\n", - "I=V/R # A\n", - "Td_By_B=I*L*10**-3*d*10**-3*N\n", - "Tc=C*theta # N-m\n", - "B=Tc/Td_By_B # in Wb/m2\n", - "print \"The flux density, B = \", B,\"Wb/m2\"\n", - "Rc=0.3*R\n", - "Lmt=2*(L+d)\n", - "a=(N*p*Lmt*10**-3*10**6)/Rc\n", - "D=(4/(math.pi*a))**(1.0/2)\n", - "print \"Diameter, D = \", round(D,1),\"m\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The flux density, B = 0.3 Wb/m2\n", - "Diameter, D = 10.1 m\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.4.1 - page : 3-11" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# shunt resistor\n", - "#given data :\n", - "Im=3*10**-3 # in A\n", - "Rm=100 # in ohm\n", - "I=150*10**-3 #in A\n", - "Rsh=(Im*Rm)/(I-Im)\n", - "print \"Shunt resistor, Rsh = \", round(Rsh,2),\"ohm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Shunt resistor, Rsh = 2.04 ohm\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.4.2 - page : 3-11" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# shunt resistormultiplying factor and resistance\n", - "#given data :\n", - "Rsh=300 #in ohm\n", - "Rm=1500 #in ohm\n", - "m=1+(Rm/Rsh)\n", - "print \"Multiplying factor, m = \",m\n", - "m1=40.0\n", - "Rsh1=Rm/(m1-1)\n", - "print \"The shunt resistor, Rsh1 = \", round(Rsh1,2),\"ohm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Multiplying factor, m = 6\n", - "The shunt resistor, Rsh1 = 38.46 ohm\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.5.1 - page : 3-13" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#given data :\n", - "Rm=100.0 # in ohm\n", - "Im=1.0\n", - "#for range 0-20 mA\n", - "I1=20.0\n", - "m=I1/Im\n", - "Rsh1=Rm/(m-1)\n", - "print \"The shunt resistor, Rsh1 = \", round(Rsh1,2),\"ohm\"\n", - "#for the range of 0-100 mA\n", - "I2=100.0\n", - "m=I2/Im\n", - "Rsh2=Rm/(m-1)\n", - "print \"The shunt resistor, Rsh2 = \", round(Rsh2,2),\"ohm\"\n", - "#for the range 0-200 mA\n", - "I3=200.0\n", - "m=I3/Im\n", - "Rsh3=Rm/(m-1)\n", - "print \"The shunt resistor, Rsh3 = \", round(Rsh3,2),\"ohm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The shunt resistor, Rsh1 = 5.26 ohm\n", - "The shunt resistor, Rsh2 = 1.01 ohm\n", - "The shunt resistor, Rsh3 = 0.5 ohm\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.6.1 - page : 3-15" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import numpy\n", - "from numpy.linalg import inv\n", - "#design\n", - "Rm=50.0 #in ohm\n", - "Im=2.0 #in mA\n", - "Im*=10**-3 # A\n", - "I1=2.0 #in A\n", - "I2=10.0 #in A\n", - "I3=15.0 #in A\n", - "#Let Rs=R1+R2+R3\n", - "A=numpy.array([[I1,I1,I1],[-Im,I2,I2],[Im,Im,-I3]])\n", - "B=numpy.array([[Im*Rm],[Im*Rm],[-Im*Rm]])\n", - "Ainv=inv(A)\n", - "X=numpy.dot(Ainv,B)\n", - "R1=X[0]\n", - "R2=X[1]\n", - "R3=X[2]\n", - "print \"Value of shunt resistors are : \"\n", - "print \"R1 is %f ohm, R2 is %.1e ohm & R3 is %.2e ohm\" %(round(R1,5), R2, R3)\n", - "# Answer is wrong in the textbook." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Value of shunt resistors are : \n", - "R1 is 0.039990 ohm, R2 is 3.3e-03 ohm & R3 is 6.67e-03 ohm\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.9.1 - page : 3-19" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Multiplier\n", - "#Given data :\n", - "Vin=20.0 #in volts\n", - "I_fsd=50.0*10 **-6 # in Farad\n", - "Rm=200.0 # in ohm\n", - "Rs=(Vin/I_fsd)-Rm # in ohm\n", - "Rs=Rs/10**3 # kohm\n", - "print \"The multiplier, Rs = \", Rs, \" kohm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The multiplier, Rs = 399.8 kohm\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.9.2 - page : 3-19" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Full scale deflection current\n", - "#given data :\n", - "Vin=10.0 # in V\n", - "Rs=200.0 #in kohm\n", - "Rm=400.0 # in ohm\n", - "I_fsd=Vin/((Rs*10 **3)+Rm) # A\n", - "I_fsd*=10**6 # micro A\n", - "print \"Full scale deflection current, I_fsd = \", round(I_fsd,1), \" micro A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Full scale deflection current, I_fsd = 49.9 micro A\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.10.1 - page : 3-22" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Multiplier\n", - "#given data :\n", - "V1=200.0 #in V\n", - "V2=100.0 #in V\n", - "V3=10.0 # in V\n", - "Rm=100.0 #in ohm\n", - "I_fsd=50*10 **-3 \n", - "#for the range 0-10V \n", - "Rt3=V3/I_fsd \n", - "Rs3=Rt3-Rm # ohm\n", - "print \"The multiplier, Rs3 = \", Rs3, \" ohm.\"\n", - "#for the range 0-100V\n", - "Rt2=V2/I_fsd \n", - "Rs2=Rt2-(Rm+Rs3) # ohm \n", - "print \"The multiplier, Rs2 = \", Rs2, \" ohm.\"\n", - "Rt1=V1/I_fsd \n", - "Rs1=Rt1-(Rm+Rs3+Rs2) \n", - "print \"The multiplier, Rs1 = \", Rs1, \" ohm.\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The multiplier, Rs3 = 100.0 ohm.\n", - "The multiplier, Rs2 = 1800.0 ohm.\n", - "The multiplier, Rs1 = 2000.0 ohm.\n" - ] - } - ], - "prompt_number": 33 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.11.1 - page : 3-23" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Multiplier\n", - "#given data :\n", - "Rm=200.0 #in ohm\n", - "I_fsd=150.0*10 **-6 # in A\n", - "S=1/I_fsd \n", - "V=50 #in V\n", - "Rs=(S*V)-Rm # ohm \n", - "Rs*=10**-3 # kohm\n", - "print \"Multiplier, Rs = \", round(Rs,2), \" kohm.\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Multiplier, Rs = 333.13 kohm.\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.11.2 - page : 3-24" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Accurate voltmeter reading\n", - "r1=50.0 # in kohms\n", - "r2=50.0 #in kohms\n", - "v=100.0 #in V\n", - "vr2=(r1/(r1+r2))*v # voltage in V\n", - "#case 1\n", - "s1=12000.0 #sensivity in ohm/V\n", - "rm1=r1*s1*10**-3 # in kohm\n", - "req=((rm1*r1)/(rm1+r1)) #equivalent resistance in ohm\n", - "v1=((req/(r1+req)))*v # voltmeter reading when sensivity is 12000 ohm/V\n", - "#case 2\n", - "s2=15000 #sensivity in ohm/V V\n", - "rm2=r1*s2*10**-3 # in kohm\n", - "req1=((rm2*r1)/(rm2+r1)) #equivalent resistance in ohm\n", - "v2=((req1/(r1+req1)))*v # voltmeter reading when sensivity is 15000 ohm/V\n", - "print \"Voltmeter reading when sensivity is 12000 ohm/V is \", round(v1,2), \" V\"\n", - "print \"Voltmeter reading when sensivity is 15000 ohm/V is \", round(v2,2), \" V. This voltmeter will measure the correct value.\"\n", - "# Answer in the textbook is not accurate" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Voltmeter reading when sensivity is 12000 ohm/V is 48.0 V\n", - "Voltmeter reading when sensivity is 15000 ohm/V is 48.39 V. This voltmeter will measure the correct value.\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.15.1 - page : 3-28" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#voltage\n", - "r1=25.0 # kohms\n", - "r2=5.0 #in kohms\n", - "v=30.0 #in V\n", - "# part(i)\n", - "vr2=(r2/(r1+r2))*v # voltage in V across 5 kohms resistance\n", - "Vactual=vr2 # V\n", - "print \"Voltage across 5 kohm Resistance is \", vr2, \" V.\"\n", - "#part (ii)\n", - "vr2=(r1/(r1+r2))*v # voltage in V across 5 kohm resistance\n", - "#case 1\n", - "s1=1.0 #sensivity in kohm/V\n", - "v1=10.0 # in V\n", - "rm1=v1*s1 #in kohm\n", - "req=((rm1*r2)/(rm1+r2)) # equivalent resistance in ohm\n", - "vrb1=((req/(r1+req)))*v # voltmeter reading when sensivity is 1 kohm/V\n", - "print \"Voltmeter reading when sensivity is 1 kohm/V is \",round(vrb1,2), \" V.\"\n", - "# part(iii)\n", - "#case 2\n", - "s2=20 #sensivity in kohm/V\n", - "v1=10 # in V\n", - "rm2=v1*s2 #in kohm\n", - "req1=((rm2*r2)/(rm2+r2)) #equivalent resistance in ohm\n", - "vrb2=((req1/(r1+req1)))*v # voltmeter reading when sensivity is 1 kohm/V\n", - "print \"Voltmeter reading when sensivity is 1 kohm/V is \",round(vrb2,2), \" V.\"\n", - "#part(iii) #error\n", - "er1=(Vactual-vrb1)/Vactual*100 #voltmeter 1 error in %\n", - "er2=(Vactual-vrb2)/Vactual*100 #voltmeter 2 error in %\n", - "print \"Voltmeter 1 error is \",round(er1,2),\" %\"\n", - "print \"Voltmeter 2 error is \",round(er2,1),\" %\"\n", - "#Answer is wrong in the textbook" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Voltage across 5 kohm Resistance is 5.0 V.\n", - "Voltmeter reading when sensivity is 1 kohm/V is 3.53 V.\n", - "Voltmeter reading when sensivity is 1 kohm/V is 4.9 V.\n", - "Voltmeter 1 error is 29.41 %\n", - "Voltmeter 2 error is 2.0 %\n" - ] - } - ], - "prompt_number": 20 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.15.2 - page : 3-29" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Shunt resistance\n", - "#Given data :\n", - "Im=1.0 # in mA\n", - "Rm=100.0 # in ohm\n", - "I=100.0 # in mA\n", - "Rsh=(Im*10**-3*Rm)/((I-Im)*10**-3) \n", - "print \"Shunt resistance, Rsh = \",round(Rsh,3),\" ohm.\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Shunt resistance, Rsh = 1.01 ohm.\n" - ] - } - ], - "prompt_number": 21 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.15.3 - page : 3-29" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Shunt resistance\n", - "#Given data :\n", - "Im=1.0 # in mA\n", - "P=100.0 # in kW\n", - "I=100.0 # in mA\n", - "Rm=(P)/(Im)**2 # ohm\n", - "Rsh=((Im*10**-3*Rm*10**3)/((I-Im)*10**-3))*10**-3 # ohm\n", - "print \"Shunt resistance, Rsh = \",round(Rsh,3), \" kohm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Shunt resistance, Rsh = 1.01 kohm\n" - ] - } - ], - "prompt_number": 22 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.15.4 - page : 3-29" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Shunt resistance\n", - "#given data :\n", - "Rsh=200.0 # in ohm\n", - "Rm=100.0 # in ohm\n", - "m=50.0 \n", - "Rsh=Rm/(m-1) # ohm\n", - "print \"The shunt resistance, Rsh = \", round(Rsh,2), \" ohm.\" " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The shunt resistance, Rsh = 2.04 ohm.\n" - ] - } - ], - "prompt_number": 23 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.15.5 - page : 3-30" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# shunt resistance\n", - "#Given data :\n", - "Im=1.0 # in mA\n", - "Rm=100.0 # in ohm\n", - "I=100.0 # in mA\n", - "Rsh=(Im*10**-3*Rm)/((I-Im)*10**-3) # ohm\n", - "print \"Shunt resistance, Rsh = \", round(Rsh,3), \" kohm.\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Shunt resistance, Rsh = 1.01 kohm.\n" - ] - } - ], - "prompt_number": 24 - } - ], - "metadata": {} - } - ] -}
\ No newline at end of file diff --git a/Electronic_Instrumentation_and_Measurements/Chapter4.ipynb b/Electronic_Instrumentation_and_Measurements/Chapter4.ipynb deleted file mode 100755 index 66a0b7e3..00000000 --- a/Electronic_Instrumentation_and_Measurements/Chapter4.ipynb +++ /dev/null @@ -1,424 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:fc56911ca78177974b04004faec461a6b97c01b43d461299fb0cf06eea3ba6da" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter4 - Analog Electronic Volt-Ohm Milliammeters" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.2.1 - page : 4-4" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Peak amplitude\n", - "#given data :\n", - "E_rms=230.0 #in V\n", - "Ep=2**(1.0/2)*E_rms \n", - "print \"Peak amplitude, Ep = \", round(Ep,2), \" V.\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Peak amplitude, Ep = 325.27 V.\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.12.1 - page : 4-21" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Resistance\n", - "#given data :\n", - "import math\n", - "Rm=500.0 #in ohm\n", - "E_rms=50.0 # in V\n", - "E_dc=(2**(1.0/2)*E_rms)/(math.pi/2) \n", - "Im=1*10**-3 #in A\n", - "R=E_dc/Im \n", - "Rs=(R-Rm)*10**-3 \n", - "print \"The resistance, Rs = \", round(Rs,1), \" kohm.\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The resistance, Rs = 44.5 kohm.\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.14.1 - page : 4-25" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Percentage error\n", - "ff1=1.0 #form factor\n", - "r=1.11 #sine wave form factor\n", - "per=((r-ff1)/ff1)*100 #percentage error\n", - "print \"Percentage error is \", per, \" %\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Percentage error is 11.0 %\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.14.2 - page : 4-26" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#part (i)\n", - "# form factor\n", - "T1=3.0 #\n", - "T=range(0,4) \n", - "##Function for integration\n", - "def integrate(a,b,f):\n", - " # def function before using this\n", - " # eg. : f=lambda t:200**2*t**2\n", - " #a=lower limit;b=upper limit;f is a function\n", - " import numpy\n", - " N=1000 # points for iteration\n", - " t=numpy.linspace(a,b,N)\n", - " ft=f(t)\n", - " ans=numpy.sum(ft)*(b-a)/N\n", - " return ans\n", - "# Calculating Vrms\n", - "a=T[0]\n", - "b=T[3]\n", - "f=lambda t:200**2*t**2\n", - "Vrms=(1/T1*integrate(a,b,f))**(1.0/2) # V\n", - "# Calculating Vav\n", - "g=lambda t:200*t\n", - "Vav=1/T1*integrate(a,b,g) # V\n", - "ff=Vrms/Vav # form factor\n", - "print \"Form factor is \", round(ff,4)\n", - "# part (ii)\n", - "ff1=1.11 #form factor of sine wave\n", - "per=((ff1/ff)-1)*100 #percentage errpr\n", - "print \"Percentage error in meter indication is\", round(per,3), \" %\"\n", - "# Answer is not accurate in the textbook." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Form factor is 1.155\n", - "Percentage error in meter indication is -3.895 %\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.19.1 - page : 4-43" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Current\n", - "#Given data :\n", - "gm=0.005 #in mho\n", - "V1=1.5 #in V\n", - "rd=200.0*10**3 # in Ohm\n", - "Rd=15.0*10**3 #in ohm\n", - "Rm=75.0 #in ohm\n", - "I=(gm*V1*((Rd*rd)/(rd+Rd)))/((2*((Rd*rd)/(rd+Rd)))+Rm) # A\n", - "I*=10**3 # mA\n", - "print \"Current, I = \", round(I,2), \" mA\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Current, I = 3.74 mA\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.19.2 - page : 4-44" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Current\n", - "#Given data :\n", - "gm=0.005 #in mho\n", - "V1=[0.2,0.4,0.6,0.8,1.0] #in V\n", - "rd=200.0*10**3 # in Ohm\n", - "Rd=15.0*10**3 #in ohm\n", - "Rm=75.0 #in ohm\n", - "Im=[]\n", - "for v1 in V1:\n", - " Im.append(gm*(rd*Rd*v1/(rd+Rd))/(2.0*(rd*Rd/(rd+Rd))+Rm)*1000) # mA\n", - "#Im*=1000 # mA\n", - "print \"Voltage Current\"\n", - "i=0\n", - "for im in Im:\n", - " print V1[i],\" V \",round(Im[i],3),\" A\"\n", - " i+=1" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Voltage Current\n", - "0.2 V 0.499 A\n", - "0.4 V 0.997 A\n", - "0.6 V 1.496 A\n", - "0.8 V 1.995 A\n", - "1.0 V 2.493 A\n" - ] - } - ], - "prompt_number": 23 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.19.3 - page : 4-44" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Design\n", - "v1=100.0 # in V\n", - "v2=30.0 #in V\n", - "v3=103.0 # in V\n", - "v4=1.0 #in V\n", - "x=9.0 #assume input resistance in Mohm\n", - "r4=(v4/v3)*x*10**3 #in kohm\n", - "r3=(((v4/v1)*x*10**6)-(r4*10**3))*10**-3 #in kohm\n", - "r2=(((v4/v2)*x*10**6)-((r4+r3)*10**3))*10**-3 # in kohm\n", - "r1=9*10**6-((r2+r3+r4)*10**3) # in ohm\n", - "r1*=10**-6 # Mohm\n", - "print \"Resistance, R4 is \",round(r4,2),\" kohm.\"\n", - "print \"Resistance, R3 is \",round(r3,2),\" kohm.\"\n", - "print \"Resistance, R2 is \",r2,\" kohm.\"\n", - "print \"Resistance, R1 is \",r1,\" Mohm.\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Resistance, R4 is 87.38 kohm.\n", - "Resistance, R3 is 2.62 kohm.\n", - "Resistance, R2 is 210.0 kohm.\n", - "Resistance, R1 is 8.7 Mohm.\n" - ] - } - ], - "prompt_number": 26 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.19.4 - page : 4-51" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Current\n", - "#given data :\n", - "rd=150.0*10**3 # in ohm\n", - "Rm=50.0 # in ohm\n", - "Rs=1000.0*10**3 # in ohm\n", - "gm=0.0052 #in mho\n", - "rd1=rd/((gm*rd)+1) \n", - "V0=gm*((rd1*Rs)/(rd1+Rs))\n", - "R0=(2*Rs*rd1)/(Rs+rd1)\n", - "I=V0/(R0+Rm) # A\n", - "I*=10**3 # mA\n", - "print \"Curent, I = \", round(I,3),\" mA\"\n", - "# Answer in the textbook is not accurate." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Curent, I = 2.3 mA\n" - ] - } - ], - "prompt_number": 28 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.19.5 - page : 4-52" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Resistance\n", - "#given data :\n", - "V1=1.0 #in V\n", - "I=1.5*10**-3 #in A\n", - "rd=200.0*10**3 # in ohm\n", - "Rm=50.0 # in ohm\n", - "Rs=600.0*10**3 # in ohm\n", - "gm=0.005 #in mho\n", - "rd1=rd/((gm*rd)+1) \n", - "V0=gm*((rd1*Rs)/(rd1+Rs))*V1\n", - "R0=(2*Rs*rd1)/(Rs+rd1)\n", - "R_cal=(V0/I)-Rm-R0 \n", - "print \"Resistance , R_cal = \",round(R_cal,2),\" ohm\" \n", - "# answer is wrong in book" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Resistance , R_cal = 216.31 ohm\n" - ] - } - ], - "prompt_number": 29 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example q.3 - page : 4-73" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Current and voltage\n", - "rm=10.0 #in ohm\n", - "im=5.0 # in mA\n", - "i=1.0 # in A\n", - "v=5.0 #in A\n", - "ish=i-(im*10**-3) # in A\n", - "m=i/(im*10**-3) # ratio\n", - "rsh=rm/(m-1) #in ohm\n", - "vo=v/i #in V\n", - "rsh1=vo/(im) #in kohm\n", - "print \"Shunt resistance is \",round(rsh,2),\" ohm to measure current upto 1 A\"\n", - "print \"Shunt resistance is \", rsh1,\" kohm to measure voltage upto 5 V\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Shunt resistance is 0.05 ohm to measure current upto 1 A\n", - "Shunt resistance is 1.0 kohm to measure voltage upto 5 V\n" - ] - } - ], - "prompt_number": 30 - } - ], - "metadata": {} - } - ] -}
\ No newline at end of file diff --git a/Electronic_Instrumentation_and_Measurements/Chapter4_1.ipynb b/Electronic_Instrumentation_and_Measurements/Chapter4_1.ipynb deleted file mode 100755 index 66a0b7e3..00000000 --- a/Electronic_Instrumentation_and_Measurements/Chapter4_1.ipynb +++ /dev/null @@ -1,424 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:fc56911ca78177974b04004faec461a6b97c01b43d461299fb0cf06eea3ba6da" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter4 - Analog Electronic Volt-Ohm Milliammeters" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.2.1 - page : 4-4" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Peak amplitude\n", - "#given data :\n", - "E_rms=230.0 #in V\n", - "Ep=2**(1.0/2)*E_rms \n", - "print \"Peak amplitude, Ep = \", round(Ep,2), \" V.\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Peak amplitude, Ep = 325.27 V.\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.12.1 - page : 4-21" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Resistance\n", - "#given data :\n", - "import math\n", - "Rm=500.0 #in ohm\n", - "E_rms=50.0 # in V\n", - "E_dc=(2**(1.0/2)*E_rms)/(math.pi/2) \n", - "Im=1*10**-3 #in A\n", - "R=E_dc/Im \n", - "Rs=(R-Rm)*10**-3 \n", - "print \"The resistance, Rs = \", round(Rs,1), \" kohm.\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The resistance, Rs = 44.5 kohm.\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.14.1 - page : 4-25" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Percentage error\n", - "ff1=1.0 #form factor\n", - "r=1.11 #sine wave form factor\n", - "per=((r-ff1)/ff1)*100 #percentage error\n", - "print \"Percentage error is \", per, \" %\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Percentage error is 11.0 %\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.14.2 - page : 4-26" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#part (i)\n", - "# form factor\n", - "T1=3.0 #\n", - "T=range(0,4) \n", - "##Function for integration\n", - "def integrate(a,b,f):\n", - " # def function before using this\n", - " # eg. : f=lambda t:200**2*t**2\n", - " #a=lower limit;b=upper limit;f is a function\n", - " import numpy\n", - " N=1000 # points for iteration\n", - " t=numpy.linspace(a,b,N)\n", - " ft=f(t)\n", - " ans=numpy.sum(ft)*(b-a)/N\n", - " return ans\n", - "# Calculating Vrms\n", - "a=T[0]\n", - "b=T[3]\n", - "f=lambda t:200**2*t**2\n", - "Vrms=(1/T1*integrate(a,b,f))**(1.0/2) # V\n", - "# Calculating Vav\n", - "g=lambda t:200*t\n", - "Vav=1/T1*integrate(a,b,g) # V\n", - "ff=Vrms/Vav # form factor\n", - "print \"Form factor is \", round(ff,4)\n", - "# part (ii)\n", - "ff1=1.11 #form factor of sine wave\n", - "per=((ff1/ff)-1)*100 #percentage errpr\n", - "print \"Percentage error in meter indication is\", round(per,3), \" %\"\n", - "# Answer is not accurate in the textbook." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Form factor is 1.155\n", - "Percentage error in meter indication is -3.895 %\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.19.1 - page : 4-43" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Current\n", - "#Given data :\n", - "gm=0.005 #in mho\n", - "V1=1.5 #in V\n", - "rd=200.0*10**3 # in Ohm\n", - "Rd=15.0*10**3 #in ohm\n", - "Rm=75.0 #in ohm\n", - "I=(gm*V1*((Rd*rd)/(rd+Rd)))/((2*((Rd*rd)/(rd+Rd)))+Rm) # A\n", - "I*=10**3 # mA\n", - "print \"Current, I = \", round(I,2), \" mA\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Current, I = 3.74 mA\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.19.2 - page : 4-44" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Current\n", - "#Given data :\n", - "gm=0.005 #in mho\n", - "V1=[0.2,0.4,0.6,0.8,1.0] #in V\n", - "rd=200.0*10**3 # in Ohm\n", - "Rd=15.0*10**3 #in ohm\n", - "Rm=75.0 #in ohm\n", - "Im=[]\n", - "for v1 in V1:\n", - " Im.append(gm*(rd*Rd*v1/(rd+Rd))/(2.0*(rd*Rd/(rd+Rd))+Rm)*1000) # mA\n", - "#Im*=1000 # mA\n", - "print \"Voltage Current\"\n", - "i=0\n", - "for im in Im:\n", - " print V1[i],\" V \",round(Im[i],3),\" A\"\n", - " i+=1" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Voltage Current\n", - "0.2 V 0.499 A\n", - "0.4 V 0.997 A\n", - "0.6 V 1.496 A\n", - "0.8 V 1.995 A\n", - "1.0 V 2.493 A\n" - ] - } - ], - "prompt_number": 23 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.19.3 - page : 4-44" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Design\n", - "v1=100.0 # in V\n", - "v2=30.0 #in V\n", - "v3=103.0 # in V\n", - "v4=1.0 #in V\n", - "x=9.0 #assume input resistance in Mohm\n", - "r4=(v4/v3)*x*10**3 #in kohm\n", - "r3=(((v4/v1)*x*10**6)-(r4*10**3))*10**-3 #in kohm\n", - "r2=(((v4/v2)*x*10**6)-((r4+r3)*10**3))*10**-3 # in kohm\n", - "r1=9*10**6-((r2+r3+r4)*10**3) # in ohm\n", - "r1*=10**-6 # Mohm\n", - "print \"Resistance, R4 is \",round(r4,2),\" kohm.\"\n", - "print \"Resistance, R3 is \",round(r3,2),\" kohm.\"\n", - "print \"Resistance, R2 is \",r2,\" kohm.\"\n", - "print \"Resistance, R1 is \",r1,\" Mohm.\"\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Resistance, R4 is 87.38 kohm.\n", - "Resistance, R3 is 2.62 kohm.\n", - "Resistance, R2 is 210.0 kohm.\n", - "Resistance, R1 is 8.7 Mohm.\n" - ] - } - ], - "prompt_number": 26 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.19.4 - page : 4-51" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Current\n", - "#given data :\n", - "rd=150.0*10**3 # in ohm\n", - "Rm=50.0 # in ohm\n", - "Rs=1000.0*10**3 # in ohm\n", - "gm=0.0052 #in mho\n", - "rd1=rd/((gm*rd)+1) \n", - "V0=gm*((rd1*Rs)/(rd1+Rs))\n", - "R0=(2*Rs*rd1)/(Rs+rd1)\n", - "I=V0/(R0+Rm) # A\n", - "I*=10**3 # mA\n", - "print \"Curent, I = \", round(I,3),\" mA\"\n", - "# Answer in the textbook is not accurate." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Curent, I = 2.3 mA\n" - ] - } - ], - "prompt_number": 28 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4.19.5 - page : 4-52" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Resistance\n", - "#given data :\n", - "V1=1.0 #in V\n", - "I=1.5*10**-3 #in A\n", - "rd=200.0*10**3 # in ohm\n", - "Rm=50.0 # in ohm\n", - "Rs=600.0*10**3 # in ohm\n", - "gm=0.005 #in mho\n", - "rd1=rd/((gm*rd)+1) \n", - "V0=gm*((rd1*Rs)/(rd1+Rs))*V1\n", - "R0=(2*Rs*rd1)/(Rs+rd1)\n", - "R_cal=(V0/I)-Rm-R0 \n", - "print \"Resistance , R_cal = \",round(R_cal,2),\" ohm\" \n", - "# answer is wrong in book" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Resistance , R_cal = 216.31 ohm\n" - ] - } - ], - "prompt_number": 29 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example q.3 - page : 4-73" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Current and voltage\n", - "rm=10.0 #in ohm\n", - "im=5.0 # in mA\n", - "i=1.0 # in A\n", - "v=5.0 #in A\n", - "ish=i-(im*10**-3) # in A\n", - "m=i/(im*10**-3) # ratio\n", - "rsh=rm/(m-1) #in ohm\n", - "vo=v/i #in V\n", - "rsh1=vo/(im) #in kohm\n", - "print \"Shunt resistance is \",round(rsh,2),\" ohm to measure current upto 1 A\"\n", - "print \"Shunt resistance is \", rsh1,\" kohm to measure voltage upto 5 V\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Shunt resistance is 0.05 ohm to measure current upto 1 A\n", - "Shunt resistance is 1.0 kohm to measure voltage upto 5 V\n" - ] - } - ], - "prompt_number": 30 - } - ], - "metadata": {} - } - ] -}
\ No newline at end of file diff --git a/Electronic_Instrumentation_and_Measurements/Chapter5.ipynb b/Electronic_Instrumentation_and_Measurements/Chapter5.ipynb deleted file mode 100755 index 790db649..00000000 --- a/Electronic_Instrumentation_and_Measurements/Chapter5.ipynb +++ /dev/null @@ -1,171 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:fb80ed0ac7f61070ddb567219b6f89f7b3cc1db175d565fb219507a40eec868c" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter5 - Digital Voltmeters" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.10.1 - page5-25" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Resolution\n", - "#Given data :\n", - "n=4.0 # no. of full digits\n", - "R=1/10**n \n", - "print \"Resolution of voltmeter, R = \", R" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Resolution of voltmeter, R = 0.0001\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.10.2 - page5-26" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Resolution\n", - "#Given data :\n", - "n=5.0 # no. of full digits\n", - "R=1.0/10**n \n", - "print \"Resolution, R = %.5f\" %R" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Resolution, R = 0.00001\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.10.3 - page5-26" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Resolution\n", - "#Given data :\n", - "n=4.0 # no. of full digits\n", - "R=1/10**n \n", - "print \"Resolution, R = \", R" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Resolution, R = 0.0001\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.10.4 - page5-27" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import numpy\n", - "import math\n", - "#Voltage and time interval\n", - "#Given data :\n", - "t1=1.0 #sec\n", - "R=100.0 #kohm\n", - "C=1.0 #micro F\n", - "C*=10**-6 # F\n", - "Vin=1.0 #V\n", - "Vref=5.0 #V\n", - "def integrate(a,b,f):\n", - " # def function before using this\n", - " # eg. : f=lambda t:200**2*t**2\n", - " #a=lower limit;b=upper limit;f is a function\n", - " import numpy\n", - " N=1000 # points for iteration\n", - " t=numpy.linspace(a,b,N)\n", - " #ft=f(t)\n", - " ans=numpy.sum(f)*(b-a)/N\n", - " return ans\n", - "# Calculating output vl=oltage\n", - "a=0\n", - "b=t1\n", - "Vout=1/R/C*integrate(a,b,Vin) # V\n", - "print \"Voltage developed at the output after 1 sec is \",Vout,\" V\"\n", - "#Vout=Vref*t2/R/C & Vout=Vin*t1/R/C\n", - "t2=t1*Vin/Vref #sec\n", - "print \"Time interval t2 is \",t2,\" sec\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Voltage developed at the output after 1 sec is 10.0 V\n", - "Time interval t2 is 0.2 sec\n" - ] - } - ], - "prompt_number": 11 - } - ], - "metadata": {} - } - ] -}
\ No newline at end of file diff --git a/Electronic_Instrumentation_and_Measurements/Chapter5_1.ipynb b/Electronic_Instrumentation_and_Measurements/Chapter5_1.ipynb deleted file mode 100755 index 790db649..00000000 --- a/Electronic_Instrumentation_and_Measurements/Chapter5_1.ipynb +++ /dev/null @@ -1,171 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:fb80ed0ac7f61070ddb567219b6f89f7b3cc1db175d565fb219507a40eec868c" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter5 - Digital Voltmeters" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.10.1 - page5-25" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Resolution\n", - "#Given data :\n", - "n=4.0 # no. of full digits\n", - "R=1/10**n \n", - "print \"Resolution of voltmeter, R = \", R" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Resolution of voltmeter, R = 0.0001\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.10.2 - page5-26" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Resolution\n", - "#Given data :\n", - "n=5.0 # no. of full digits\n", - "R=1.0/10**n \n", - "print \"Resolution, R = %.5f\" %R" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Resolution, R = 0.00001\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.10.3 - page5-26" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Resolution\n", - "#Given data :\n", - "n=4.0 # no. of full digits\n", - "R=1/10**n \n", - "print \"Resolution, R = \", R" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Resolution, R = 0.0001\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5.10.4 - page5-27" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import numpy\n", - "import math\n", - "#Voltage and time interval\n", - "#Given data :\n", - "t1=1.0 #sec\n", - "R=100.0 #kohm\n", - "C=1.0 #micro F\n", - "C*=10**-6 # F\n", - "Vin=1.0 #V\n", - "Vref=5.0 #V\n", - "def integrate(a,b,f):\n", - " # def function before using this\n", - " # eg. : f=lambda t:200**2*t**2\n", - " #a=lower limit;b=upper limit;f is a function\n", - " import numpy\n", - " N=1000 # points for iteration\n", - " t=numpy.linspace(a,b,N)\n", - " #ft=f(t)\n", - " ans=numpy.sum(f)*(b-a)/N\n", - " return ans\n", - "# Calculating output vl=oltage\n", - "a=0\n", - "b=t1\n", - "Vout=1/R/C*integrate(a,b,Vin) # V\n", - "print \"Voltage developed at the output after 1 sec is \",Vout,\" V\"\n", - "#Vout=Vref*t2/R/C & Vout=Vin*t1/R/C\n", - "t2=t1*Vin/Vref #sec\n", - "print \"Time interval t2 is \",t2,\" sec\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Voltage developed at the output after 1 sec is 10.0 V\n", - "Time interval t2 is 0.2 sec\n" - ] - } - ], - "prompt_number": 11 - } - ], - "metadata": {} - } - ] -}
\ No newline at end of file diff --git a/Electronic_Instrumentation_and_Measurements/Chapter6.ipynb b/Electronic_Instrumentation_and_Measurements/Chapter6.ipynb deleted file mode 100755 index 82ed6e02..00000000 --- a/Electronic_Instrumentation_and_Measurements/Chapter6.ipynb +++ /dev/null @@ -1,123 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:3cc9d2c4c0d6a493cdaa2dbc9383ef800411a8ab69ddf373e977319372599f8f" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter6 - Digital Frequency Meter" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.17.1 - page6-26" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Desired gate time\n", - "#Given data :\n", - "r=0.1 #in Hz\n", - "D=1/r #in seconds\n", - "print \"The desired gate time, D = \", D,\" seconds\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The desired gate time, D = 10.0 seconds\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.17.2 - page6-27" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Error in measurement\n", - "f1=1.0 # in Mhz\n", - "f2=200.0 #in kHz\n", - "per=(200*10**-3)*100 # percentage error that printlay may indicate 4 micro seconds or 6 micro seconds\n", - "per1=(1/50.0)*100 #percentage error after 10 times improvement\n", - "print \"Display may indicate 4 us or 6 us, percentage error is \", per,\" %\"\n", - "print \"Percentage error after 10 times improvement is \", per1,\" %\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Display may indicate 4 us or 6 us, percentage error is 20.0 %\n", - "Percentage error after 10 times improvement is 2.0 %\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.17.3 - page6-27" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Measurement Accuracy\n", - "#Given data :\n", - "f=400.0 #Hz\n", - "time_accuracy=10**-8 # seconds\n", - "display_accuracy=1 #(+ve or -Ve)\n", - "t=10 # seconds\n", - "period=1/f*10**3 #ms\n", - "Accuracy= 1+((period)/10) #ms\n", - "print \"accuracy is \u00b1\",Accuracy,\" ms\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "accuracy is \u00b1 1.25 ms\n" - ] - } - ], - "prompt_number": 7 - } - ], - "metadata": {} - } - ] -}
\ No newline at end of file diff --git a/Electronic_Instrumentation_and_Measurements/Chapter6_1.ipynb b/Electronic_Instrumentation_and_Measurements/Chapter6_1.ipynb deleted file mode 100755 index 82ed6e02..00000000 --- a/Electronic_Instrumentation_and_Measurements/Chapter6_1.ipynb +++ /dev/null @@ -1,123 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:3cc9d2c4c0d6a493cdaa2dbc9383ef800411a8ab69ddf373e977319372599f8f" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter6 - Digital Frequency Meter" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.17.1 - page6-26" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Desired gate time\n", - "#Given data :\n", - "r=0.1 #in Hz\n", - "D=1/r #in seconds\n", - "print \"The desired gate time, D = \", D,\" seconds\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The desired gate time, D = 10.0 seconds\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.17.2 - page6-27" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Error in measurement\n", - "f1=1.0 # in Mhz\n", - "f2=200.0 #in kHz\n", - "per=(200*10**-3)*100 # percentage error that printlay may indicate 4 micro seconds or 6 micro seconds\n", - "per1=(1/50.0)*100 #percentage error after 10 times improvement\n", - "print \"Display may indicate 4 us or 6 us, percentage error is \", per,\" %\"\n", - "print \"Percentage error after 10 times improvement is \", per1,\" %\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Display may indicate 4 us or 6 us, percentage error is 20.0 %\n", - "Percentage error after 10 times improvement is 2.0 %\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6.17.3 - page6-27" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Measurement Accuracy\n", - "#Given data :\n", - "f=400.0 #Hz\n", - "time_accuracy=10**-8 # seconds\n", - "display_accuracy=1 #(+ve or -Ve)\n", - "t=10 # seconds\n", - "period=1/f*10**3 #ms\n", - "Accuracy= 1+((period)/10) #ms\n", - "print \"accuracy is \u00b1\",Accuracy,\" ms\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "accuracy is \u00b1 1.25 ms\n" - ] - } - ], - "prompt_number": 7 - } - ], - "metadata": {} - } - ] -}
\ No newline at end of file diff --git a/Electronic_Instrumentation_and_Measurements/Chapter7.ipynb b/Electronic_Instrumentation_and_Measurements/Chapter7.ipynb deleted file mode 100755 index de493fe2..00000000 --- a/Electronic_Instrumentation_and_Measurements/Chapter7.ipynb +++ /dev/null @@ -1,470 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:ea707a0cc7de0224e885823c97ef777e5b813dde41f39951ee0ed1ad37c83a74" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter7 - Low, High and Precise Resistance Measurements" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.5.1 - page7-24" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Resistance\n", - "#Given data :\n", - "R1=5.0 # in kohm\n", - "R2=7.0 # in kohm\n", - "R3=10.0 # in kohm\n", - "Rx=(R2*R3)/R1 \n", - "print \"Unknown resistance, Rx = \", Rx,\" kohm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Unknown resistance, Rx = 14.0 kohm\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.5.2 - page7-24" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Current\n", - "#Given data :\n", - "R1=1.5 # in kohm\n", - "R2=3.0 # in kohm\n", - "R3=5.0 # in kohm\n", - "R4=14.0 #in kohm\n", - "Rg=250.0 #in ohm\n", - "E=10.0 #in V\n", - "Vd=(E*R4)/(R2+R4) \n", - "Vc=(E*R3)/(R1+R3) \n", - "E_th=E*((R4/(R2+R4))-(R3/(R1+R3))) \n", - "R_th=((R1*R3)/(R1+R3))+((R2*R4)/(R2+R4)) \n", - "Ig=(E_th/((R_th*10**3)+Rg))*10**6 \n", - "print \"Current, Ig = \",round(Ig,2),\" micro A\"\n", - "# answer is wrong in book\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Current, Ig = 140.15 micro A\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.5.3 - page7-26" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Deflection\n", - "#Given data :\n", - "s=8 #sensivity in mm/micro A\n", - "R1=1.0 # in kohm\n", - "R2=5.0 # in kohm\n", - "R3=2.0 # in kohm\n", - "R4=10.0 #in kohm\n", - "Rg=150.0 #in ohm\n", - "E=6.0 #in V\n", - "r=10.0 # unbalance resistance in ohm\n", - "del_r=10.0 # in kohm\n", - "R4_1=((R4*10**3)+r)*10**-3 \n", - "Vd=(E*R4_1)/(R2+R4_1) \n", - "Vc=(E*R3)/(R1+R3) \n", - "E_th=E*((R4_1/(R2+R4_1))-(R3/(R1+R3))) \n", - "R_th=((R1*R3)/(R1+R3))+((R2*R4)/(R2+R4)) \n", - "Ig=(E_th/((R_th*10**3)+Rg))*10**6 \n", - "d=Ig*s #deflection in mm\n", - "print \"Deflection is \",round(d,1), \" mm\"\n", - "#answer is wrong in the textbook\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Deflection is 2.6 mm\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.5.4 - page7-28" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Current\n", - "#Given data :\n", - "R=500.0 #in ohm\n", - "Rg=150.0 # in ohm\n", - "del_r=10.0 # in ohm\n", - "E=6.0 #in V\n", - "E_th=(E*del_r)/(4*R) \n", - "R_th=R \n", - "Ig=(E_th/(R_th+Rg))*10**6 \n", - "print \"Current, Ig = \", round(Ig,3), \"micro A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Current, Ig = 46.154 micro A\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.5.5 page7-29" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Supply voltage\n", - "#Given data :\n", - "R=120.0 #in ohm\n", - "del_r=1.0 # in ohm\n", - "E_th=10*10**-3 #in V\n", - "E=(E_th*4*R)/del_r \n", - "print \"Supply voltage, E = \", E,\" V\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Supply voltage, E = 4.8 V\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.5.6 - page7-30" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Resistance\n", - "#Given data :\n", - "A=100.24 # in ohm\n", - "B=200.0 # in ohm\n", - "a=100.31 # in ohm\n", - "b=200.0 # in ohm\n", - "S=100.03 # in micro ohm\n", - "r=700.0 # in micro ohm\n", - "X=((A/b)*S)+(((r*b)/(r+a+b))*((A/B)-(a/b))) \n", - "print \"Unknown resistance, X = \", round(X,2), \"micro ohm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Unknown resistance, X = 50.09 micro ohm\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.5.7 - page7-31" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Deflection\n", - "#Given data :\n", - "R_ab=100.0 # in ohm\n", - "R_bc=500.0 # in ohm\n", - "R_cd=1000.0 # in ohm\n", - "R_da=200.0 # in ohm\n", - "V=10.0 \n", - "VRg=200. # in ohm\n", - "del_CD=10.0 # in ohm\n", - "V_bd=V*((R_ab/(R_ab+R_bc))-(R_da/(R_da+R_cd+del_CD))) \n", - "R_bd=(((R_ab*R_bc)/(R_ab+R_bc))+((VRg*(R_cd+del_CD))/(VRg+R_cd+del_CD))) \n", - "I_G=(V_bd/(R_bd+VRg)) \n", - "s=5 #sensivity in micro A/mm\n", - "dg=I_G*10**6*s #deflection in mm\n", - "print \"Deflection is \",round(dg,0),\" mm\"\n", - "#answer is wrong in the textbook" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Deflection is 153.0 mm\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.5.8 - page7-32" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#LIMITING VALUE OF RESISTANCE\n", - "P=100.0 #OHMS\n", - "Q=P \n", - "S=230.0 #IN ohm\n", - "DP=0.02 #ERROR IN PERCENTAGE\n", - "DS=0.01 #IN PERCENTAGE\n", - "R=(P/Q)*S #unknown resistance in ohms\n", - "dr=(DP+DP+DS) #relative limiting error in unknow resistance in percentage \u00b1\n", - "drm=(dr/100)*R #magnitude of error\n", - "R1=R+drm #in ohms\n", - "R2=R-drm #in ohms\n", - "print \"Limiting value of unknow resistance is \", R2, \" ohm to \", R1, \" ohm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Limiting value of unknow resistance is 229.885 ohm to 230.115 ohm\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.5.9 - page7-33" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Insulation resistance of cable\n", - "t=120.0 #in seconds\n", - "v1=300.0 #in volts\n", - "v2=100.0 #in volts\n", - "c=300.0 #capacitance in pf\n", - "r=t/(c)/math.log(v1/v2)#resistance in Mohm\n", - "print \"Resistance of cable is \", round(r,3),\" Mohm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Resistance of cable is 0.364 Mohm\n" - ] - } - ], - "prompt_number": 19 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.5.10 - page7-33" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Resistance \n", - "g=2000.0 #in ohms\n", - "s=10.0 #in kohm\n", - "q1=40.0 #divisions\n", - "q2=46.0 #divisions\n", - "r=((q1/q2)*((s*10**3)+(g)))-g #in ohms\n", - "print \"Unknown resistance is \",round(r,2),\" ohm\"\n", - "#answer is wrong in the textbook\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Unknown resistance is 8434.78 ohm\n" - ] - } - ], - "prompt_number": 21 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.5.11 - page7-34" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Resistance \n", - "t=200.0 # in V\n", - "i=0.5 #in A\n", - "ra=10.0 #in ohm\n", - "x=t/i #in ohm\n", - "r=x-ra #in ohm\n", - "print \"Unknown resistance is \",r,\" ohm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Unknown resistance is 390.0 ohm\n" - ] - } - ], - "prompt_number": 22 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.5.12 - page7-34" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Ammeter and voltmeter readings\n", - "t=200.0 # in V\n", - "i=0.5 #in A\n", - "ra=10.0 #in ohm\n", - "x=t/i #in ohm\n", - "r=x-ra #in ohm\n", - "sv=10 #sensivity in kohms / V\n", - "v=1000 #in V\n", - "rv=v*sv *10**-6 # in Mohm\n", - "rp=((rv*10**6)*r)/(rv*10**6+r) #in ohm\n", - "vr=((t*rp)/(ra+rp)) #voltmeter reading in V\n", - "vi=vr/rp #ammeter rading in A\n", - "print \"Voltmeter reading is \",round(vr,2),\" V\"\n", - "print \"Ammeter rading is \",round(vi,5),\" A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Voltmeter reading is 194.81 V\n", - "Ammeter rading is 0.51899 A\n" - ] - } - ], - "prompt_number": 27 - } - ], - "metadata": {} - } - ] -}
\ No newline at end of file diff --git a/Electronic_Instrumentation_and_Measurements/Chapter7_1.ipynb b/Electronic_Instrumentation_and_Measurements/Chapter7_1.ipynb deleted file mode 100755 index de493fe2..00000000 --- a/Electronic_Instrumentation_and_Measurements/Chapter7_1.ipynb +++ /dev/null @@ -1,470 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:ea707a0cc7de0224e885823c97ef777e5b813dde41f39951ee0ed1ad37c83a74" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter7 - Low, High and Precise Resistance Measurements" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.5.1 - page7-24" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Resistance\n", - "#Given data :\n", - "R1=5.0 # in kohm\n", - "R2=7.0 # in kohm\n", - "R3=10.0 # in kohm\n", - "Rx=(R2*R3)/R1 \n", - "print \"Unknown resistance, Rx = \", Rx,\" kohm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Unknown resistance, Rx = 14.0 kohm\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.5.2 - page7-24" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Current\n", - "#Given data :\n", - "R1=1.5 # in kohm\n", - "R2=3.0 # in kohm\n", - "R3=5.0 # in kohm\n", - "R4=14.0 #in kohm\n", - "Rg=250.0 #in ohm\n", - "E=10.0 #in V\n", - "Vd=(E*R4)/(R2+R4) \n", - "Vc=(E*R3)/(R1+R3) \n", - "E_th=E*((R4/(R2+R4))-(R3/(R1+R3))) \n", - "R_th=((R1*R3)/(R1+R3))+((R2*R4)/(R2+R4)) \n", - "Ig=(E_th/((R_th*10**3)+Rg))*10**6 \n", - "print \"Current, Ig = \",round(Ig,2),\" micro A\"\n", - "# answer is wrong in book\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Current, Ig = 140.15 micro A\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.5.3 - page7-26" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Deflection\n", - "#Given data :\n", - "s=8 #sensivity in mm/micro A\n", - "R1=1.0 # in kohm\n", - "R2=5.0 # in kohm\n", - "R3=2.0 # in kohm\n", - "R4=10.0 #in kohm\n", - "Rg=150.0 #in ohm\n", - "E=6.0 #in V\n", - "r=10.0 # unbalance resistance in ohm\n", - "del_r=10.0 # in kohm\n", - "R4_1=((R4*10**3)+r)*10**-3 \n", - "Vd=(E*R4_1)/(R2+R4_1) \n", - "Vc=(E*R3)/(R1+R3) \n", - "E_th=E*((R4_1/(R2+R4_1))-(R3/(R1+R3))) \n", - "R_th=((R1*R3)/(R1+R3))+((R2*R4)/(R2+R4)) \n", - "Ig=(E_th/((R_th*10**3)+Rg))*10**6 \n", - "d=Ig*s #deflection in mm\n", - "print \"Deflection is \",round(d,1), \" mm\"\n", - "#answer is wrong in the textbook\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Deflection is 2.6 mm\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.5.4 - page7-28" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Current\n", - "#Given data :\n", - "R=500.0 #in ohm\n", - "Rg=150.0 # in ohm\n", - "del_r=10.0 # in ohm\n", - "E=6.0 #in V\n", - "E_th=(E*del_r)/(4*R) \n", - "R_th=R \n", - "Ig=(E_th/(R_th+Rg))*10**6 \n", - "print \"Current, Ig = \", round(Ig,3), \"micro A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Current, Ig = 46.154 micro A\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.5.5 page7-29" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Supply voltage\n", - "#Given data :\n", - "R=120.0 #in ohm\n", - "del_r=1.0 # in ohm\n", - "E_th=10*10**-3 #in V\n", - "E=(E_th*4*R)/del_r \n", - "print \"Supply voltage, E = \", E,\" V\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Supply voltage, E = 4.8 V\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.5.6 - page7-30" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Resistance\n", - "#Given data :\n", - "A=100.24 # in ohm\n", - "B=200.0 # in ohm\n", - "a=100.31 # in ohm\n", - "b=200.0 # in ohm\n", - "S=100.03 # in micro ohm\n", - "r=700.0 # in micro ohm\n", - "X=((A/b)*S)+(((r*b)/(r+a+b))*((A/B)-(a/b))) \n", - "print \"Unknown resistance, X = \", round(X,2), \"micro ohm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Unknown resistance, X = 50.09 micro ohm\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.5.7 - page7-31" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Deflection\n", - "#Given data :\n", - "R_ab=100.0 # in ohm\n", - "R_bc=500.0 # in ohm\n", - "R_cd=1000.0 # in ohm\n", - "R_da=200.0 # in ohm\n", - "V=10.0 \n", - "VRg=200. # in ohm\n", - "del_CD=10.0 # in ohm\n", - "V_bd=V*((R_ab/(R_ab+R_bc))-(R_da/(R_da+R_cd+del_CD))) \n", - "R_bd=(((R_ab*R_bc)/(R_ab+R_bc))+((VRg*(R_cd+del_CD))/(VRg+R_cd+del_CD))) \n", - "I_G=(V_bd/(R_bd+VRg)) \n", - "s=5 #sensivity in micro A/mm\n", - "dg=I_G*10**6*s #deflection in mm\n", - "print \"Deflection is \",round(dg,0),\" mm\"\n", - "#answer is wrong in the textbook" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Deflection is 153.0 mm\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.5.8 - page7-32" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#LIMITING VALUE OF RESISTANCE\n", - "P=100.0 #OHMS\n", - "Q=P \n", - "S=230.0 #IN ohm\n", - "DP=0.02 #ERROR IN PERCENTAGE\n", - "DS=0.01 #IN PERCENTAGE\n", - "R=(P/Q)*S #unknown resistance in ohms\n", - "dr=(DP+DP+DS) #relative limiting error in unknow resistance in percentage \u00b1\n", - "drm=(dr/100)*R #magnitude of error\n", - "R1=R+drm #in ohms\n", - "R2=R-drm #in ohms\n", - "print \"Limiting value of unknow resistance is \", R2, \" ohm to \", R1, \" ohm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Limiting value of unknow resistance is 229.885 ohm to 230.115 ohm\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.5.9 - page7-33" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Insulation resistance of cable\n", - "t=120.0 #in seconds\n", - "v1=300.0 #in volts\n", - "v2=100.0 #in volts\n", - "c=300.0 #capacitance in pf\n", - "r=t/(c)/math.log(v1/v2)#resistance in Mohm\n", - "print \"Resistance of cable is \", round(r,3),\" Mohm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Resistance of cable is 0.364 Mohm\n" - ] - } - ], - "prompt_number": 19 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.5.10 - page7-33" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Resistance \n", - "g=2000.0 #in ohms\n", - "s=10.0 #in kohm\n", - "q1=40.0 #divisions\n", - "q2=46.0 #divisions\n", - "r=((q1/q2)*((s*10**3)+(g)))-g #in ohms\n", - "print \"Unknown resistance is \",round(r,2),\" ohm\"\n", - "#answer is wrong in the textbook\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Unknown resistance is 8434.78 ohm\n" - ] - } - ], - "prompt_number": 21 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.5.11 - page7-34" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Resistance \n", - "t=200.0 # in V\n", - "i=0.5 #in A\n", - "ra=10.0 #in ohm\n", - "x=t/i #in ohm\n", - "r=x-ra #in ohm\n", - "print \"Unknown resistance is \",r,\" ohm\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Unknown resistance is 390.0 ohm\n" - ] - } - ], - "prompt_number": 22 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7.5.12 - page7-34" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Ammeter and voltmeter readings\n", - "t=200.0 # in V\n", - "i=0.5 #in A\n", - "ra=10.0 #in ohm\n", - "x=t/i #in ohm\n", - "r=x-ra #in ohm\n", - "sv=10 #sensivity in kohms / V\n", - "v=1000 #in V\n", - "rv=v*sv *10**-6 # in Mohm\n", - "rp=((rv*10**6)*r)/(rv*10**6+r) #in ohm\n", - "vr=((t*rp)/(ra+rp)) #voltmeter reading in V\n", - "vi=vr/rp #ammeter rading in A\n", - "print \"Voltmeter reading is \",round(vr,2),\" V\"\n", - "print \"Ammeter rading is \",round(vi,5),\" A\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Voltmeter reading is 194.81 V\n", - "Ammeter rading is 0.51899 A\n" - ] - } - ], - "prompt_number": 27 - } - ], - "metadata": {} - } - ] -}
\ No newline at end of file diff --git a/Electronic_Instrumentation_and_Measurements/Chapter8.ipynb b/Electronic_Instrumentation_and_Measurements/Chapter8.ipynb deleted file mode 100755 index 6f6a09d7..00000000 --- a/Electronic_Instrumentation_and_Measurements/Chapter8.ipynb +++ /dev/null @@ -1,637 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:6fa810433d8fb0d04740abb66d2625b01a8af010ca4183a75eead5496aab3b33" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter8 - Inductance and Capacitance Measurements" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.5.1 - page : 8-22" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Percentage error \n", - "import math\n", - "r=10 #in ohm\n", - "f=1 #in MHz\n", - "c=65 #capacitance in pF\n", - "rsh=0.02 #in ohm\n", - "qact=((1/(2*math.pi*f*10**6*c*10**-12*r))) #actual q factor\n", - "qm=(1/(2*math.pi*c*10**-12*f*10**6*(r+rsh))) #measured q factor\n", - "per=((qact-qm)/qact)*100 #percentage error \n", - "print \"Percentage error is\",round(per,1),\" %\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Percentage error is 0.2 %\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.5.2 - page : 8-23" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Self capacitance and inductance\n", - "f1=2 #in MHz\n", - "c1=460 #in pF\n", - "f2=4 #in MHz\n", - "c2=100 #in pF\n", - "cd1=((c1-(4*c2))/3) #self capacitance in pF\n", - "x=((1/(2*math.pi*f1*10**6)))**2 \n", - "l=x/((c1+cd1)*10**-12) # in H\n", - "l*=10**6 # in micro H\n", - "print \"Self capacitance is \",cd1,\" pF\"\n", - "print \"Inductance is \",round(l,2),\" micro H\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Self capacitance is 20 pF\n", - "Inductance is 13.19 micro H\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.6.1 - page : 8-25" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Lx and Rx\n", - "#given data :\n", - "R1=560 # in kohm\n", - "R2=6.3 # in kohm\n", - "R3=120 # in kohm\n", - "Ci=0.01 # in micro F\n", - "Sensitivity=10 # in mm/micro A\n", - "del_r=1 # in ohm\n", - "Rx=(R2*R3)/R1 \n", - "print \"Unknown resistance, Rx = \",Rx,\" kohm\"\n", - "Lx=R2*10**3*R3*10**3*Ci*10**-6 \n", - "print \"Unknown inductance, Lx = \",Lx,\" H\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Unknown resistance, Rx = 1.35 kohm\n", - "Unknown inductance, Lx = 7.56 H\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.6.2 - page : 8-25" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Cx,Rx and D\n", - "#given data :\n", - "f=1000 #in Hz\n", - "R1=1.1 # in kohm\n", - "R2=2.2 # in kohm\n", - "C1=0.47 # in micro F\n", - "C3=0.5 # in micro F\n", - "Rx=(R2*C1)/C3 \n", - "print \"Unknown resistance, Rx = \", Rx,\" kohm\"\n", - "Cx=(R1*C3)/R2 \n", - "print \"Unknown capacitance, Cx = \", Cx, \" micro F\"\n", - "w=2*f*math.pi \n", - "D=w*Cx*10**-6*Rx*10**3 \n", - "print \"Dissipation factor, D = \", round(D,2)\n", - "#answer is wrong in the textbook\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Unknown resistance, Rx = 2.068 kohm\n", - "Unknown capacitance, Cx = 0.25 micro F\n", - "Dissipation factor, D = 3.25\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.6.3 - page : 8-26" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Unknown resistance and capacitance\n", - "r1=10 #in kohms\n", - "r2=50 #in kohms\n", - "r3=100 #in kohms\n", - "c3=100 #in micro F\n", - "rx=((r2*10**3*r3*10**3)/(r1*10**3))*10**-3 #unknown resistance in kohms\n", - "cx=((r1*10**3*c3*10**-6)/(r2*10**3))*10**6 # unknown capacitance in micro F\n", - "print \"unknown resistance is \",rx,\" kohm\"\n", - "print \"Unknown capacitance is \",cx,\" micro F\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "unknown resistance is 500.0 kohm\n", - "Unknown capacitance is 20.0 micro F\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.6.4 - page : 8-27" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Lx and Rx\n", - "#given data :\n", - "R1=600 # in ohm\n", - "R2=1000 # in ohm\n", - "R3=100 # in ohm\n", - "C1=1 # in micro F\n", - "Rx=(R2*R3)/R1 \n", - "print \"resistance, Rx = \",Rx,\" ohm\"\n", - "Lx=C1*10**-6*R2*R3 \n", - "print \"Inductance, Lx = \",Lx, \" H\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "resistance, Rx = 166 ohm\n", - "Inductance, Lx = 0.1 H\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.6.5 - page : 8-28" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#L3 and R3\n", - "#given data :\n", - "R1=10 # in kohm\n", - "R2=2 # in kohm\n", - "R4=1 # in kohm\n", - "C2=1*10**-6 # in micro F\n", - "w=3000 # in rad/sec\n", - "L3=(R1*10**3*R4*10**3*C2)/(1+((R2*10**3)**2*(C2**2)*w**2))\n", - "R3=R2*10**3*L3*C2*w**2 \n", - "print \"Unknown resistance is \",round(R3,0),\" ohm\"\n", - "print \"Inductance is \",round(L3,2),\" H\"\n", - "#resistance is calculated wrong in the textbook" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Unknown resistance is 4865.0 ohm\n", - "Inductance is 0.27 H\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.6.6 - page : 8-28" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Cx,Rx and D\n", - "#given data :\n", - "f=1000 #in Hz\n", - "R2=20000 # in ohm\n", - "R3=1.2*10**3 # in ohm\n", - "C3=300*10**-12 # in F\n", - "C4=0.05*10**-6 # in F\n", - "Rx=(R2*C3)/C4 # in ohm\n", - "print \"Unknown resistance, Rx = \",Rx, \" ohm\"\n", - "Cx=((R3*C4)/R2)*10**6 \n", - "print \"Unknown capacitance, Cx = \",Cx,\" micro F\"\n", - "w=2*f*math.pi \n", - "D=w*Cx*10**-6*Rx\n", - "print \"Dissipation factor, D = %.2E\" %D" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Unknown resistance, Rx = 120.0 ohm\n", - "Unknown capacitance, Cx = 0.003 micro F\n", - "Dissipation factor, D = 2.26E-03\n" - ] - } - ], - "prompt_number": 23 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.6.7 - page : 8-29" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Resistance and capacitance\n", - "#given data :\n", - "C2=106*10**-12 # in F\n", - "C4=0.6*10**-6 # in F\n", - "R4=1000/math.pi # in ohm\n", - "R3=250 # in ohm\n", - "R1=(C4/C2)*R3\n", - "print \" Resistance, R1 = %.2E\" %R1,\" ohm\"\n", - "C1=(R4/R3)*C2*10**6 \n", - "print \"Capacitance, C1 = \",round(C1*10**6),\" micro F\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Resistance, R1 = 1.42E+06 ohm\n", - "Capacitance, C1 = 135.0 micro F\n" - ] - } - ], - "prompt_number": 27 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.6.8 - page : 8-30" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Resistance and capacitance\n", - "#given data :\n", - "R1=3.1 # in kohm\n", - "C1=5.2 #in micro F\n", - "R2=25 #in kohm\n", - "R4=100 #in kohm\n", - "f=2.5*10**3 #in Hz\n", - "w=2*math.pi*f*10**-3 \n", - "R3=(R4/R2)*(R1+(1/(w**2*R1*C1**2))) \n", - "print \"Resistance, R3 = \",round(R3,1),\" kohm\"\n", - "C3=((R4/R2)-(R1/R3))*C1 \n", - "print \"Capacitance, C3 = \",round(C3,1), \"pF\"\n", - "# answer is wrong in book" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Resistance, R3 = 12.4 kohm\n", - "Capacitance, C3 = 19.5 pF\n" - ] - } - ], - "prompt_number": 31 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.6.9 - page : 8-31" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Inductance and capacitance\n", - "#given data :\n", - "F1=1.5 #in MHz\n", - "C1=650 #in pF\n", - "F2=3 #in MHz\n", - "C2=150 #in pF\n", - "Cd=(C1-(4*C2))/3 \n", - "print \"Capacitance, Cd = \",Cd, \"pF\"\n", - "L=(1/(4*math.pi**2*F1**2*((C1*10**-12)+(C2*10**-12))))*10**-6 \n", - "print \"Inductance, L = \",round(L,2),\" micro H\"\n", - "# Answer wrong in the textbook" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Capacitance, Cd = 16 pF\n", - "Inductance, L = 14.07 micro H\n" - ] - } - ], - "prompt_number": 35 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.6.10 - page : 8-32" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "# Q\n", - "#given data \n", - "rsh=0.02 \n", - "r=10 # in ohm\n", - "f=1 #in MHz\n", - "c=65 #in pF\n", - "L=(1/((2*math.pi*f*10**6)**2*c*10**-12))*10**3 \n", - "qact=((1/(2*math.pi*f*10**6*c*10**-12*r))) #actual q factor\n", - "qm=(1/(2*math.pi*c*10**-12*f*10**6*(r+rsh))) #measured q factor\n", - "per=((qact-qm)/qact)*100 #percentage error \n", - "print \"Percentage error is \",round(per,3), \" %\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Percentage error is 0.2 %\n" - ] - } - ], - "prompt_number": 40 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.6.11 - page : 8-32" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# capacitance\n", - "#given data :\n", - "F1=3 #in MHz\n", - "C1=400 #in pico-farad\n", - "F2=6 #in MHz\n", - "C2=120 #in pico-farad\n", - "Cd=(4*C2-C1)/3 \n", - "print \"Self capacitance, Cd = \",Cd, \" pF\"\n", - "# Answer wrong in the textbook." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Self capacitance, Cd = 26 pF\n" - ] - } - ], - "prompt_number": 45 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.6.12 - page : 8-33" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# capacitance\n", - "#given data :\n", - "F1=2.0 #in MHz\n", - "C1=450 #in pF\n", - "F2=5 #in MHz\n", - "C2=60 #in pF\n", - "ratio=F2/F1 \n", - "#1/sqrt(C2+Cd)=ratio/sqrt(C1+Cd)\n", - "Cd=(C1-(ratio**2*C2))/5.25 \n", - "print \"Self capacitance, Cd = \",round(Cd,2), \" pF\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Self capacitance, Cd = 14.29 pF\n" - ] - } - ], - "prompt_number": 48 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.6.13 - page : 8-33" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# capacitance\n", - "#given data :\n", - "F1=8 #in MHz\n", - "C1=120 #in pF\n", - "F2=12 #in MHz\n", - "C2=40 #in pF\n", - "ratio=F1/F2 \n", - "#1/sqrt(C2+Cd)=ratio/sqrt(C1+Cd)\n", - "Cd=((4*C1-9*C2)/5) \n", - "print \"Self capacitance, Cd = \", Cd,\" pF\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Self capacitance, Cd = 24 pF\n" - ] - } - ], - "prompt_number": 49 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Q.5 - page : 8-35" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Lx and Rx\n", - "#given data :\n", - "r1=28.5 #in ohm\n", - "L1=52.6 #in mH\n", - "R2=1.68 #in ohm\n", - "R3=80 #in ohm\n", - "R4=R3 # in ohm\n", - "Lx=(R3/R4)*L1 #inductance in mH\n", - "Rx=r1*(R3/R4)-R2 #in ohm\n", - "print \"Unknown resistance, Rx = \",Rx,\" ohm\"\n", - "print \"Unknown inductance, Lx = \", Lx,\" mH\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Unknown resistance, Rx = 26.82 ohm\n", - "Unknown inductance, Lx = 52.6 mH\n" - ] - } - ], - "prompt_number": 50 - } - ], - "metadata": {} - } - ] -}
\ No newline at end of file diff --git a/Electronic_Instrumentation_and_Measurements/Chapter8_1.ipynb b/Electronic_Instrumentation_and_Measurements/Chapter8_1.ipynb deleted file mode 100755 index 6f6a09d7..00000000 --- a/Electronic_Instrumentation_and_Measurements/Chapter8_1.ipynb +++ /dev/null @@ -1,637 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:6fa810433d8fb0d04740abb66d2625b01a8af010ca4183a75eead5496aab3b33" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter8 - Inductance and Capacitance Measurements" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.5.1 - page : 8-22" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Percentage error \n", - "import math\n", - "r=10 #in ohm\n", - "f=1 #in MHz\n", - "c=65 #capacitance in pF\n", - "rsh=0.02 #in ohm\n", - "qact=((1/(2*math.pi*f*10**6*c*10**-12*r))) #actual q factor\n", - "qm=(1/(2*math.pi*c*10**-12*f*10**6*(r+rsh))) #measured q factor\n", - "per=((qact-qm)/qact)*100 #percentage error \n", - "print \"Percentage error is\",round(per,1),\" %\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Percentage error is 0.2 %\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.5.2 - page : 8-23" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Self capacitance and inductance\n", - "f1=2 #in MHz\n", - "c1=460 #in pF\n", - "f2=4 #in MHz\n", - "c2=100 #in pF\n", - "cd1=((c1-(4*c2))/3) #self capacitance in pF\n", - "x=((1/(2*math.pi*f1*10**6)))**2 \n", - "l=x/((c1+cd1)*10**-12) # in H\n", - "l*=10**6 # in micro H\n", - "print \"Self capacitance is \",cd1,\" pF\"\n", - "print \"Inductance is \",round(l,2),\" micro H\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Self capacitance is 20 pF\n", - "Inductance is 13.19 micro H\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.6.1 - page : 8-25" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Lx and Rx\n", - "#given data :\n", - "R1=560 # in kohm\n", - "R2=6.3 # in kohm\n", - "R3=120 # in kohm\n", - "Ci=0.01 # in micro F\n", - "Sensitivity=10 # in mm/micro A\n", - "del_r=1 # in ohm\n", - "Rx=(R2*R3)/R1 \n", - "print \"Unknown resistance, Rx = \",Rx,\" kohm\"\n", - "Lx=R2*10**3*R3*10**3*Ci*10**-6 \n", - "print \"Unknown inductance, Lx = \",Lx,\" H\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Unknown resistance, Rx = 1.35 kohm\n", - "Unknown inductance, Lx = 7.56 H\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.6.2 - page : 8-25" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Cx,Rx and D\n", - "#given data :\n", - "f=1000 #in Hz\n", - "R1=1.1 # in kohm\n", - "R2=2.2 # in kohm\n", - "C1=0.47 # in micro F\n", - "C3=0.5 # in micro F\n", - "Rx=(R2*C1)/C3 \n", - "print \"Unknown resistance, Rx = \", Rx,\" kohm\"\n", - "Cx=(R1*C3)/R2 \n", - "print \"Unknown capacitance, Cx = \", Cx, \" micro F\"\n", - "w=2*f*math.pi \n", - "D=w*Cx*10**-6*Rx*10**3 \n", - "print \"Dissipation factor, D = \", round(D,2)\n", - "#answer is wrong in the textbook\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Unknown resistance, Rx = 2.068 kohm\n", - "Unknown capacitance, Cx = 0.25 micro F\n", - "Dissipation factor, D = 3.25\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.6.3 - page : 8-26" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Unknown resistance and capacitance\n", - "r1=10 #in kohms\n", - "r2=50 #in kohms\n", - "r3=100 #in kohms\n", - "c3=100 #in micro F\n", - "rx=((r2*10**3*r3*10**3)/(r1*10**3))*10**-3 #unknown resistance in kohms\n", - "cx=((r1*10**3*c3*10**-6)/(r2*10**3))*10**6 # unknown capacitance in micro F\n", - "print \"unknown resistance is \",rx,\" kohm\"\n", - "print \"Unknown capacitance is \",cx,\" micro F\"\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "unknown resistance is 500.0 kohm\n", - "Unknown capacitance is 20.0 micro F\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.6.4 - page : 8-27" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Lx and Rx\n", - "#given data :\n", - "R1=600 # in ohm\n", - "R2=1000 # in ohm\n", - "R3=100 # in ohm\n", - "C1=1 # in micro F\n", - "Rx=(R2*R3)/R1 \n", - "print \"resistance, Rx = \",Rx,\" ohm\"\n", - "Lx=C1*10**-6*R2*R3 \n", - "print \"Inductance, Lx = \",Lx, \" H\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "resistance, Rx = 166 ohm\n", - "Inductance, Lx = 0.1 H\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.6.5 - page : 8-28" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#L3 and R3\n", - "#given data :\n", - "R1=10 # in kohm\n", - "R2=2 # in kohm\n", - "R4=1 # in kohm\n", - "C2=1*10**-6 # in micro F\n", - "w=3000 # in rad/sec\n", - "L3=(R1*10**3*R4*10**3*C2)/(1+((R2*10**3)**2*(C2**2)*w**2))\n", - "R3=R2*10**3*L3*C2*w**2 \n", - "print \"Unknown resistance is \",round(R3,0),\" ohm\"\n", - "print \"Inductance is \",round(L3,2),\" H\"\n", - "#resistance is calculated wrong in the textbook" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Unknown resistance is 4865.0 ohm\n", - "Inductance is 0.27 H\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.6.6 - page : 8-28" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Cx,Rx and D\n", - "#given data :\n", - "f=1000 #in Hz\n", - "R2=20000 # in ohm\n", - "R3=1.2*10**3 # in ohm\n", - "C3=300*10**-12 # in F\n", - "C4=0.05*10**-6 # in F\n", - "Rx=(R2*C3)/C4 # in ohm\n", - "print \"Unknown resistance, Rx = \",Rx, \" ohm\"\n", - "Cx=((R3*C4)/R2)*10**6 \n", - "print \"Unknown capacitance, Cx = \",Cx,\" micro F\"\n", - "w=2*f*math.pi \n", - "D=w*Cx*10**-6*Rx\n", - "print \"Dissipation factor, D = %.2E\" %D" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Unknown resistance, Rx = 120.0 ohm\n", - "Unknown capacitance, Cx = 0.003 micro F\n", - "Dissipation factor, D = 2.26E-03\n" - ] - } - ], - "prompt_number": 23 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.6.7 - page : 8-29" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Resistance and capacitance\n", - "#given data :\n", - "C2=106*10**-12 # in F\n", - "C4=0.6*10**-6 # in F\n", - "R4=1000/math.pi # in ohm\n", - "R3=250 # in ohm\n", - "R1=(C4/C2)*R3\n", - "print \" Resistance, R1 = %.2E\" %R1,\" ohm\"\n", - "C1=(R4/R3)*C2*10**6 \n", - "print \"Capacitance, C1 = \",round(C1*10**6),\" micro F\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " Resistance, R1 = 1.42E+06 ohm\n", - "Capacitance, C1 = 135.0 micro F\n" - ] - } - ], - "prompt_number": 27 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.6.8 - page : 8-30" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Resistance and capacitance\n", - "#given data :\n", - "R1=3.1 # in kohm\n", - "C1=5.2 #in micro F\n", - "R2=25 #in kohm\n", - "R4=100 #in kohm\n", - "f=2.5*10**3 #in Hz\n", - "w=2*math.pi*f*10**-3 \n", - "R3=(R4/R2)*(R1+(1/(w**2*R1*C1**2))) \n", - "print \"Resistance, R3 = \",round(R3,1),\" kohm\"\n", - "C3=((R4/R2)-(R1/R3))*C1 \n", - "print \"Capacitance, C3 = \",round(C3,1), \"pF\"\n", - "# answer is wrong in book" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Resistance, R3 = 12.4 kohm\n", - "Capacitance, C3 = 19.5 pF\n" - ] - } - ], - "prompt_number": 31 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.6.9 - page : 8-31" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "#Inductance and capacitance\n", - "#given data :\n", - "F1=1.5 #in MHz\n", - "C1=650 #in pF\n", - "F2=3 #in MHz\n", - "C2=150 #in pF\n", - "Cd=(C1-(4*C2))/3 \n", - "print \"Capacitance, Cd = \",Cd, \"pF\"\n", - "L=(1/(4*math.pi**2*F1**2*((C1*10**-12)+(C2*10**-12))))*10**-6 \n", - "print \"Inductance, L = \",round(L,2),\" micro H\"\n", - "# Answer wrong in the textbook" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Capacitance, Cd = 16 pF\n", - "Inductance, L = 14.07 micro H\n" - ] - } - ], - "prompt_number": 35 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.6.10 - page : 8-32" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "# Q\n", - "#given data \n", - "rsh=0.02 \n", - "r=10 # in ohm\n", - "f=1 #in MHz\n", - "c=65 #in pF\n", - "L=(1/((2*math.pi*f*10**6)**2*c*10**-12))*10**3 \n", - "qact=((1/(2*math.pi*f*10**6*c*10**-12*r))) #actual q factor\n", - "qm=(1/(2*math.pi*c*10**-12*f*10**6*(r+rsh))) #measured q factor\n", - "per=((qact-qm)/qact)*100 #percentage error \n", - "print \"Percentage error is \",round(per,3), \" %\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Percentage error is 0.2 %\n" - ] - } - ], - "prompt_number": 40 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.6.11 - page : 8-32" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# capacitance\n", - "#given data :\n", - "F1=3 #in MHz\n", - "C1=400 #in pico-farad\n", - "F2=6 #in MHz\n", - "C2=120 #in pico-farad\n", - "Cd=(4*C2-C1)/3 \n", - "print \"Self capacitance, Cd = \",Cd, \" pF\"\n", - "# Answer wrong in the textbook." - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Self capacitance, Cd = 26 pF\n" - ] - } - ], - "prompt_number": 45 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.6.12 - page : 8-33" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# capacitance\n", - "#given data :\n", - "F1=2.0 #in MHz\n", - "C1=450 #in pF\n", - "F2=5 #in MHz\n", - "C2=60 #in pF\n", - "ratio=F2/F1 \n", - "#1/sqrt(C2+Cd)=ratio/sqrt(C1+Cd)\n", - "Cd=(C1-(ratio**2*C2))/5.25 \n", - "print \"Self capacitance, Cd = \",round(Cd,2), \" pF\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Self capacitance, Cd = 14.29 pF\n" - ] - } - ], - "prompt_number": 48 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8.6.13 - page : 8-33" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# capacitance\n", - "#given data :\n", - "F1=8 #in MHz\n", - "C1=120 #in pF\n", - "F2=12 #in MHz\n", - "C2=40 #in pF\n", - "ratio=F1/F2 \n", - "#1/sqrt(C2+Cd)=ratio/sqrt(C1+Cd)\n", - "Cd=((4*C1-9*C2)/5) \n", - "print \"Self capacitance, Cd = \", Cd,\" pF\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Self capacitance, Cd = 24 pF\n" - ] - } - ], - "prompt_number": 49 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Q.5 - page : 8-35" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Lx and Rx\n", - "#given data :\n", - "r1=28.5 #in ohm\n", - "L1=52.6 #in mH\n", - "R2=1.68 #in ohm\n", - "R3=80 #in ohm\n", - "R4=R3 # in ohm\n", - "Lx=(R3/R4)*L1 #inductance in mH\n", - "Rx=r1*(R3/R4)-R2 #in ohm\n", - "print \"Unknown resistance, Rx = \",Rx,\" ohm\"\n", - "print \"Unknown inductance, Lx = \", Lx,\" mH\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Unknown resistance, Rx = 26.82 ohm\n", - "Unknown inductance, Lx = 52.6 mH\n" - ] - } - ], - "prompt_number": 50 - } - ], - "metadata": {} - } - ] -}
\ No newline at end of file diff --git a/Electronic_Instrumentation_and_Measurements/Chapter9.ipynb b/Electronic_Instrumentation_and_Measurements/Chapter9.ipynb deleted file mode 100755 index e456daaf..00000000 --- a/Electronic_Instrumentation_and_Measurements/Chapter9.ipynb +++ /dev/null @@ -1,460 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:290842fdc6ea6a5700afb55423870096fe232348d5b6bc5d485c1317a3af57b3" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter9 - Cathode Ray Oscilloscope" - ] - }, - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Example 9.14.1 - page : 9-45" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# peak to peak voltage and rms voltage\n", - "vdv=1 # V/div\n", - "n=6.8 #no. of divisions\n", - "Vpp=vdv*n #peak to peak voltage in V\n", - "vrms=Vpp/(2*(2)**(1.0/2)) #rms voltage in V\n", - "print \"Peak to peak voltage is \",Vpp,\" V\"\n", - "print \"rms voltage is \",round(vrms,4),\" V\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Peak to peak voltage is 6.8 V\n", - "rms voltage is 2.4042 V\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.14.2 - page : 9-46" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Time interval\n", - "vdv=2 # V per division in micro seconds/div\n", - "n=2 #no. of divisions\n", - "Tint=vdv*n #peak to peak voltage in V\n", - "print \"Time interval is \",Tint,\" micro seconds\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Time interval is 4 micro seconds\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.14.3 - page : 9-46" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# period and frequency\n", - "vdv=2 #volts per division in micro seconds/div\n", - "n=12 #no. of divisions\n", - "Tp=vdv*n # period in micro seconds\n", - "f=1/(Tp*10**-3) #frequency in kHz\n", - "print \"Period is \",Tp,\" micro seconds\"\n", - "print \"Frequency is \",round(f,2),\" kHz\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Period is 24 micro seconds\n", - "Frequency is 41.67 kHz\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.14.4 - page : 9-47" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Peak to peak voltage and frequency\n", - "vdv1=0.5 #volts per division in V/div\n", - "nv=3 #no. of divisions\n", - "nh=4 #numbers of horizontal divisions\n", - "Vpp=vdv1*nv #peak to peak voltage in V\n", - "vdv2=2 # time division in micro seconds per divisions\n", - "Tp=vdv2*nh # period in micro seconds\n", - "f=1/(Tp*10**-3) #frequency in kHz\n", - "print \"Peak to peak voltage is \",Vpp,\" V\"\n", - "print \"Period is \",Tp,\" micro seconds\"\n", - "print \"Frequency is \",f,\" kHz\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Peak to peak voltage is 1.5 V\n", - "Period is 8 micro seconds\n", - "Frequency is 125.0 kHz\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.17.1 - page : 9-67" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#bandwidth\n", - "#given data :\n", - "Trs=12 #in micro sec\n", - "Trd=15 #in micro sec\n", - "Tro=(Trd**2-Trs**2)**(1.0/2) \n", - "K=0.35 # constant\n", - "BW=(K/Tro)*10**3 \n", - "print \"Bandwidth, BW =\",round(BW,2), \" kHz\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Bandwidth, BW = 38.89 kHz\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.17.2 - page : 9-68" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Rise time\n", - "#given data :\n", - "BW=10*10**6 # in Hz\n", - "tr=(0.35/BW)*10**9 \n", - "print \"Rise time, tr = \",tr, \" ns\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Rise time, tr = 35.0 ns\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.17.3 - page : 9-68" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# rise time\n", - "#given data :\n", - "Tro=10 #in micro sec\n", - "Trd=13 #in micro sec\n", - "Trs=(Trd**2-Tro**2)**(1.0/2) \n", - "print \"Actual rise time, Trs = \",round(Trs,2),\" ns\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Actual rise time, Trs = 8.31 ns\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.17.4 - page : 9-68" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Rise time\n", - "#given data :\n", - "Tro=10 #in micro sec\n", - "Trd=15 #in micro sec\n", - "Trs=(Trd**2-Tro**2)**(1.0/2)\n", - "print \"Actual rise time, Trs = \",round(Trs,2),\" ns\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Actual rise time, Trs = 11.18 ns\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.17.5 - page : 9-68" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Rise time\n", - "#given data :\n", - "Trs=12 #in micro sec\n", - "Trd=30 #in micro sec\n", - "BW=20*10**6 # in Hz\n", - "K=0.35 # constant\n", - "Tro=(K/BW)*10**9 \n", - "Trs=(Trd**2-Tro**2)**(1.0/2)\n", - "print \"Actual rise time, Trs = \",round(Trs,2),\" ns\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Actual rise time, Trs = 24.37 ns\n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.17.6 - page : 9-69" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# capacitance\n", - "#given data :\n", - "K=10 # constant\n", - "C2=35*10**-12 \n", - "C1=(C2/(K-1))*10**12 \n", - "print \"Capacitance, C1 = \",round(C1,2),\" pF\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Capacitance, C1 = 3.89 pF\n" - ] - } - ], - "prompt_number": 18 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.17.7 - page : 9-69" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# impedance of CRO\n", - "K=10 \n", - "vin=1 #vpp \n", - "vout=0.1 #in vpp\n", - "c1=2 # in pF\n", - "c2=c1*(K-1) #CAPACITANCE IN Pf\n", - "print \"Capacitance is \",c2,\" pF\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Capacitance is 18 pF\n" - ] - } - ], - "prompt_number": 19 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.17.8 - page : 9-70" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# sensivity\n", - "n=2 #divisions\n", - "f=50.0 #in MHz\n", - "t=(1/f)*10**3 #time in nanao seconds\n", - "mdv=t/4 #in ns/div\n", - "mtds=mdv*n # in ns/div\n", - "print \"Minimum time/div is \",mdv,\" ns/div\"\n", - "print \"Minimum time/div setting is \",mtds,\" ns/div\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Minimum time/div is 5.0 ns/div\n", - "Minimum time/div setting is 10.0 ns/div\n" - ] - } - ], - "prompt_number": 21 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.17.9 - page : 9-70" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# rise time\n", - "#given data :\n", - "Trs=21 #in micro-sec\n", - "K=0.35 # constant\n", - "BW=50*10**6 # in Hz\n", - "Tro=(K/BW)*10**9 \n", - "Trd=(Trs**2+Tro**2)**(1.0/2)\n", - "print \"Rise time, Tro = \",round(Trd,0),\" ns\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Rise time, Tro = 22.0 ns\n" - ] - } - ], - "prompt_number": 24 - } - ], - "metadata": {} - } - ] -}
\ No newline at end of file diff --git a/Electronic_Instrumentation_and_Measurements/Chapter9_1.ipynb b/Electronic_Instrumentation_and_Measurements/Chapter9_1.ipynb deleted file mode 100755 index 0dcd481b..00000000 --- a/Electronic_Instrumentation_and_Measurements/Chapter9_1.ipynb +++ /dev/null @@ -1,460 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:55d62edc09823ce69cb883c8ec8f5b8abe049583981245da7e91d5fefcb128cb" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter9 - Cathode Ray Oscilloscope" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.14.1 - page : 9-45" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# peak to peak voltage and rms voltage\n", - "vdv=1 # V/div\n", - "n=6.8 #no. of divisions\n", - "Vpp=vdv*n #peak to peak voltage in V\n", - "vrms=Vpp/(2*(2)**(1.0/2)) #rms voltage in V\n", - "print \"Peak to peak voltage is \",Vpp,\" V\"\n", - "print \"rms voltage is \",round(vrms,4),\" V\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Peak to peak voltage is 6.8 V\n", - "rms voltage is 2.4042 V\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.14.2 - page : 9-46" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Time interval\n", - "vdv=2 # V per division in micro seconds/div\n", - "n=2 #no. of divisions\n", - "Tint=vdv*n #peak to peak voltage in V\n", - "print \"Time interval is \",Tint,\" micro seconds\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Time interval is 4 micro seconds\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.14.3 - page : 9-46" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# period and frequency\n", - "vdv=2 #volts per division in micro seconds/div\n", - "n=12 #no. of divisions\n", - "Tp=vdv*n # period in micro seconds\n", - "f=1/(Tp*10**-3) #frequency in kHz\n", - "print \"Period is \",Tp,\" micro seconds\"\n", - "print \"Frequency is \",round(f,2),\" kHz\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Period is 24 micro seconds\n", - "Frequency is 41.67 kHz\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.14.4 - page : 9-47" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Peak to peak voltage and frequency\n", - "vdv1=0.5 #volts per division in V/div\n", - "nv=3 #no. of divisions\n", - "nh=4 #numbers of horizontal divisions\n", - "Vpp=vdv1*nv #peak to peak voltage in V\n", - "vdv2=2 # time division in micro seconds per divisions\n", - "Tp=vdv2*nh # period in micro seconds\n", - "f=1/(Tp*10**-3) #frequency in kHz\n", - "print \"Peak to peak voltage is \",Vpp,\" V\"\n", - "print \"Period is \",Tp,\" micro seconds\"\n", - "print \"Frequency is \",f,\" kHz\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Peak to peak voltage is 1.5 V\n", - "Period is 8 micro seconds\n", - "Frequency is 125.0 kHz\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.17.1 - page : 9-67" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#bandwidth\n", - "#given data :\n", - "Trs=12 #in micro sec\n", - "Trd=15 #in micro sec\n", - "Tro=(Trd**2-Trs**2)**(1.0/2) \n", - "K=0.35 # constant\n", - "BW=(K/Tro)*10**3 \n", - "print \"Bandwidth, BW =\",round(BW,2), \" kHz\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Bandwidth, BW = 38.89 kHz\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.17.2 - page : 9-68" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Rise time\n", - "#given data :\n", - "BW=10*10**6 # in Hz\n", - "tr=(0.35/BW)*10**9 \n", - "print \"Rise time, tr = \",tr, \" ns\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Rise time, tr = 35.0 ns\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.17.3 - page : 9-68" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# rise time\n", - "#given data :\n", - "Tro=10 #in micro sec\n", - "Trd=13 #in micro sec\n", - "Trs=(Trd**2-Tro**2)**(1.0/2) \n", - "print \"Actual rise time, Trs = \",round(Trs,2),\" ns\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Actual rise time, Trs = 8.31 ns\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.17.4 - page : 9-68" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Rise time\n", - "#given data :\n", - "Tro=10 #in micro sec\n", - "Trd=15 #in micro sec\n", - "Trs=(Trd**2-Tro**2)**(1.0/2)\n", - "print \"Actual rise time, Trs = \",round(Trs,2),\" ns\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Actual rise time, Trs = 11.18 ns\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.17.5 - page : 9-68" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# Rise time\n", - "#given data :\n", - "Trs=12 #in micro sec\n", - "Trd=30 #in micro sec\n", - "BW=20*10**6 # in Hz\n", - "K=0.35 # constant\n", - "Tro=(K/BW)*10**9 \n", - "Trs=(Trd**2-Tro**2)**(1.0/2)\n", - "print \"Actual rise time, Trs = \",round(Trs,2),\" ns\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Actual rise time, Trs = 24.37 ns\n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.17.6 - page : 9-69" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# capacitance\n", - "#given data :\n", - "K=10 # constant\n", - "C2=35*10**-12 \n", - "C1=(C2/(K-1))*10**12 \n", - "print \"Capacitance, C1 = \",round(C1,2),\" pF\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Capacitance, C1 = 3.89 pF\n" - ] - } - ], - "prompt_number": 18 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.17.7 - page : 9-69" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# impedance of CRO\n", - "K=10 \n", - "vin=1 #vpp \n", - "vout=0.1 #in vpp\n", - "c1=2 # in pF\n", - "c2=c1*(K-1) #CAPACITANCE IN Pf\n", - "print \"Capacitance is \",c2,\" pF\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Capacitance is 18 pF\n" - ] - } - ], - "prompt_number": 19 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.17.8 - page : 9-70" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "# sensivity\n", - "n=2 #divisions\n", - "f=50.0 #in MHz\n", - "t=(1/f)*10**3 #time in nanao seconds\n", - "mdv=t/4 #in ns/div\n", - "mtds=mdv*n # in ns/div\n", - "print \"Minimum time/div is \",mdv,\" ns/div\"\n", - "print \"Minimum time/div setting is \",mtds,\" ns/div\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Minimum time/div is 5.0 ns/div\n", - "Minimum time/div setting is 10.0 ns/div\n" - ] - } - ], - "prompt_number": 21 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9.17.9 - page : 9-70" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\n", - "# rise time\n", - "#given data :\n", - "Trs=21 #in micro-sec\n", - "K=0.35 # constant\n", - "BW=50*10**6 # in Hz\n", - "Tro=(K/BW)*10**9 \n", - "Trd=(Trs**2+Tro**2)**(1.0/2)\n", - "print \"Rise time, Tro = \",round(Trd,0),\" ns\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Rise time, Tro = 22.0 ns\n" - ] - } - ], - "prompt_number": 24 - } - ], - "metadata": {} - } - ] -}
\ No newline at end of file |