diff options
Diffstat (limited to 'Industrial_Instrumentation/Chapter_1.ipynb')
-rw-r--r-- | Industrial_Instrumentation/Chapter_1.ipynb | 567 |
1 files changed, 294 insertions, 273 deletions
diff --git a/Industrial_Instrumentation/Chapter_1.ipynb b/Industrial_Instrumentation/Chapter_1.ipynb index ee337d56..d0854801 100644 --- a/Industrial_Instrumentation/Chapter_1.ipynb +++ b/Industrial_Instrumentation/Chapter_1.ipynb @@ -1,412 +1,433 @@ { "metadata": { - "name": "Chapter_1" - }, - "nbformat": 2, + "name": "", + "signature": "sha256:6ba3160044fd56988f5c5098ab622aa22c3eae2ec5a701c2274f1da18b060ff5" + }, + "nbformat": 3, + "nbformat_minor": 0, "worksheets": [ { "cells": [ { - "cell_type": "markdown", + "cell_type": "markdown", + "metadata": {}, "source": [ "<h1>Chapter 1: Temperature<h1>" ] - }, + }, { - "cell_type": "markdown", + "cell_type": "markdown", + "metadata": {}, "source": [ "<h3>Example 1.1, Page Number: 53<h3>" ] - }, + }, { - "cell_type": "code", - "collapsed": false, + "cell_type": "code", + "collapsed": false, "input": [ - "'''Temperature Conversion'''", - "", - "#variable declaration", - "c=-40.0 #Temp in degree Celcius", - "", - "#calculations", - "k=c+273", - "F=((9.0/5.0)*c)+32.0", - "R=((9.0/5.0)*c)+492.0", - "", - "#Result", - "print('\\nK=%d\u00b0K' %k)", - "print('\\nF=%d\u00b0F' %F)", + "\n", + "\n", + "#variable declaration\n", + "c=-40.0 #Temp in degree Celcius\n", + "\n", + "#calculations\n", + "k=c+273\n", + "F=((9.0/5.0)*c)+32.0\n", + "R=((9.0/5.0)*c)+492.0\n", + "\n", + "#Result\n", + "print('\\nK=%d\u00b0K' %k)\n", + "print('\\nF=%d\u00b0F' %F)\n", "print('\\nR=%d\u00b0R' %R)" - ], - "language": "python", + ], + "language": "python", + "metadata": {}, "outputs": [ { - "output_type": "stream", - "stream": "stdout", + "output_type": "stream", + "stream": "stdout", "text": [ - "", - "K=233\u00b0K", - "", - "F=-40\u00b0F", - "", + "\n", + "K=233\u00b0K\n", + "\n", + "F=-40\u00b0F\n", + "\n", "R=420\u00b0R" ] } - ], + ], "prompt_number": 1 - }, + }, { - "cell_type": "markdown", + "cell_type": "markdown", + "metadata": {}, "source": [ "<h3> Example 1.2, Page Number: 53<h3>" ] - }, + }, { - "cell_type": "code", - "collapsed": false, + "cell_type": "code", + "collapsed": false, "input": [ - "'''percentage Accuracy and Error'''", - "", - "#varable Declaration", - "span=1000.0 #given value of span in \u00b0C", - "accuracy=1.0/100.0 #1% accuracy", - "", - "#calculations", - "err=span*accuracy", - "max_scale=1200.0", - "Range_instr=max_scale+span", - "meter_reading=700.0", - "per_of_err=(err/meter_reading)*100.0", - "", - "#result", - "print('(a)\\nAs error can be either positive or negative') ", - "print('\\n the probable error at any point on the scale =\u00b1 %d\u00b0C'%err)", - "print('\\n(b)\\nRange of the Instrument = %d\u00b0C'%Range_instr)", + "\n", + "\n", + "#varable Declaration\n", + "span=1000.0 #given value of span in \u00b0C\n", + "accuracy=1.0/100.0 #1% accuracy\n", + "\n", + "#calculations\n", + "err=span*accuracy\n", + "max_scale=1200.0\n", + "Range_instr=max_scale+span\n", + "meter_reading=700.0\n", + "per_of_err=(err/meter_reading)*100.0\n", + "\n", + "#result\n", + "print('(a)\\nAs error can be either positive or negative') \n", + "print('\\n the probable error at any point on the scale =\u00b1 %d\u00b0C'%err)\n", + "print('\\n(b)\\nRange of the Instrument = %d\u00b0C'%Range_instr)\n", "print('\\n(c)\\nPercentage of Error = \u00b1 %.2f%% '%per_of_err)" - ], - "language": "python", + ], + "language": "python", + "metadata": {}, "outputs": [ { - "output_type": "stream", - "stream": "stdout", + "output_type": "stream", + "stream": "stdout", "text": [ - "(a)", - "As error can be either positive or negative", - "", - " the probable error at any point on the scale =\u00b1 10\u00b0C", - "", - "(b)", - "Range of the Instrument = 2200\u00b0C", - "", - "(c)", + "(a)\n", + "As error can be either positive or negative\n", + "\n", + " the probable error at any point on the scale =\u00b1 10\u00b0C\n", + "\n", + "(b)\n", + "Range of the Instrument = 2200\u00b0C\n", + "\n", + "(c)\n", "Percentage of Error = \u00b1 1.43% " ] } - ], + ], "prompt_number": 10 - }, + }, { - "cell_type": "markdown", + "cell_type": "markdown", + "metadata": {}, "source": [ "<h3>Example 1.3, Page Number: 54<h3>" ] - }, + }, { - "cell_type": "code", - "collapsed": false, + "cell_type": "code", + "collapsed": false, "input": [ - "'''Two wire RTD'''", - "", - "#variable declaration", - "resi_per_leg=5.0 # lead wire resistance per leg in Ohm", - "temp_coeff=0.385 # Temperature coefficient of Pt 100 RTD in ohms/\u00b0C", - "", - "#calculation", - "R_due_to_leadwires=2*resi_per_leg", - "err=R_due_to_leadwires/temp_coeff", - "err =round(err,0)", - "temp_obj=200.0", - "temp_measured=temp_obj+err", - "per_of_err=((temp_measured-temp_obj)/temp_obj)*100.0", - "", - "#Result", - "print('(a)\\nThe contribution of 10 ohms lead wire resistance')", - "print('to the measurement error = %d\u00b0C' %err)", + "\n", + "\n", + "#variable declaration\n", + "resi_per_leg=5.0 # lead wire resistance per leg in Ohm\n", + "temp_coeff=0.385 # Temperature coefficient of Pt 100 RTD in ohms/\u00b0C\n", + "\n", + "#calculation\n", + "R_due_to_leadwires=2*resi_per_leg\n", + "err=R_due_to_leadwires/temp_coeff\n", + "err =round(err,0)\n", + "temp_obj=200.0\n", + "temp_measured=temp_obj+err\n", + "per_of_err=((temp_measured-temp_obj)/temp_obj)*100.0\n", + "\n", + "#Result\n", + "print('(a)\\nThe contribution of 10 ohms lead wire resistance')\n", + "print('to the measurement error = %d\u00b0C' %err)\n", "print('\\n(b)\\nPercentage of Error = %d%%' %per_of_err)" - ], - "language": "python", + ], + "language": "python", + "metadata": {}, "outputs": [ { - "output_type": "stream", - "stream": "stdout", + "output_type": "stream", + "stream": "stdout", "text": [ - "(a)", - "The contribution of 10 ohms lead wire resistance", - "to the measurement error = 26\u00b0C", - "", - "(b)", + "(a)\n", + "The contribution of 10 ohms lead wire resistance\n", + "to the measurement error = 26\u00b0C\n", + "\n", + "(b)\n", "Percentage of Error = 13%" ] } - ], + ], "prompt_number": 3 - }, + }, { - "cell_type": "markdown", + "cell_type": "markdown", + "metadata": {}, "source": [ "<h3>Example 1.4, Page Number: 54<h3>" ] - }, + }, { - "cell_type": "code", - "collapsed": false, + "cell_type": "code", + "collapsed": false, "input": [ - "'''Thermocouple temperature measurement'''", - "", - "#variable declaration", - "temp=2.022 #Millivolt corresponds to reference junction temp 50\u00b0C", - "millivolt_cor=37.325 #Millivolt corresponds to reference junction temp 900\u00b0C", - "", - "#calculation", - "op=millivolt_cor-temp", - "", - "#result", + "\n", + "\n", + "#variable declaration\n", + "temp=2.022 #Millivolt corresponds to reference junction temp 50\u00b0C\n", + "millivolt_cor=37.325 #Millivolt corresponds to reference junction temp 900\u00b0C\n", + "\n", + "#calculation\n", + "op=millivolt_cor-temp\n", + "\n", + "#result\n", "print('Millivolt output available = % .3f' %op)" - ], - "language": "python", + ], + "language": "python", + "metadata": {}, "outputs": [ { - "output_type": "stream", - "stream": "stdout", + "output_type": "stream", + "stream": "stdout", "text": [ "Millivolt output available = 35.303" ] } - ], + ], "prompt_number": 4 - }, + }, { - "cell_type": "markdown", + "cell_type": "markdown", + "metadata": {}, "source": [ "<h3>Example 1.5, Page Number: 54<h3>" ] - }, + }, { - "cell_type": "code", - "collapsed": false, + "cell_type": "code", + "collapsed": false, "input": [ - "'''Hot junction temperature of thermocouple'''", - "", - "#variable declaration", - "millivolt_cor=2.585 #Millivolt corresponds to reference junction temp 50\u00b0C", - "pot_reading=30.511 #reading on pot", - "", - "#calculation", - "corrected_millivolt=pot_reading+millivolt_cor", - "", - "#result", + "\n", + "\n", + "#variable declaration\n", + "millivolt_cor=2.585 #Millivolt corresponds to reference junction temp 50\u00b0C\n", + "pot_reading=30.511 #reading on pot\n", + "\n", + "#calculation\n", + "corrected_millivolt=pot_reading+millivolt_cor\n", + "\n", + "#result\n", "print('Temperature correspond to %.3f mV from the table = 600\u00b0C' %corrected_millivolt)" - ], - "language": "python", + ], + "language": "python", + "metadata": {}, "outputs": [ { - "output_type": "stream", - "stream": "stdout", + "output_type": "stream", + "stream": "stdout", "text": [ "Temperature correspond to 33.096 mV from the table = 600\u00b0C" ] } - ], + ], "prompt_number": 5 - }, + }, { - "cell_type": "markdown", + "cell_type": "markdown", + "metadata": {}, "source": [ "<h3>Example 1.6, Page Number: 54<h3>" ] - }, + }, { - "cell_type": "code", - "collapsed": false, + "cell_type": "code", + "collapsed": false, "input": [ - "'''Caliberation of an instrument'''", - "", - "#variable Declarion", - "ref_jun=100.0 #reference junction temp.", - "mV_100=0.645 #voltage at 100\u00b0C", - "mV_1000=9.585 #voltage at 1000\u00b0C", - "mV_1200=11.947 #voltage at 1200\u00b0C", - "", - "#calculation", - "op1=mV_1000-mV_100", - "op2=mV_1200-mV_100", - "", - "#result", - "print('Millivolt to be fed checking 1000 C = %.3f mV'%op1)", + "\n", + "\n", + "#variable Declarion\n", + "ref_jun=100.0 #reference junction temp.\n", + "mV_100=0.645 #voltage at 100\u00b0C\n", + "mV_1000=9.585 #voltage at 1000\u00b0C\n", + "mV_1200=11.947 #voltage at 1200\u00b0C\n", + "\n", + "#calculation\n", + "op1=mV_1000-mV_100\n", + "op2=mV_1200-mV_100\n", + "\n", + "#result\n", + "print('Millivolt to be fed checking 1000 C = %.3f mV'%op1)\n", "print('\\nMillivolt to be fed checking 1200 C = %.3f mV'%op2)" - ], - "language": "python", + ], + "language": "python", + "metadata": {}, "outputs": [ { - "output_type": "stream", - "stream": "stdout", + "output_type": "stream", + "stream": "stdout", "text": [ - "Millivolt to be fed checking 1000 C = 8.940 mV", - "", + "Millivolt to be fed checking 1000 C = 8.940 mV\n", + "\n", "Millivolt to be fed checking 1200 C = 11.302 mV" ] } - ], + ], "prompt_number": 6 - }, + }, { - "cell_type": "markdown", + "cell_type": "markdown", + "metadata": {}, "source": [ "<h3>Example 1.7, page Number: 55<h3>" ] - }, + }, { - "cell_type": "code", - "collapsed": false, + "cell_type": "code", + "collapsed": false, "input": [ - "'''Wall temperature measurement'''", - "", - "#variable declaration", - "E_rec_pyro=0.95*0.85 #Energy received by pyrometer", - "", - "#calculation", - "T=1100.0/E_rec_pyro", - " ", - "#result", + "\n", + "#variable declaration\n", + "E_rec_pyro=0.95*0.85 #Energy received by pyrometer\n", + "\n", + "#calculation\n", + "T=1100.0/E_rec_pyro\n", + " \n", + "#result\n", "print('Pyrometer reading T = %.2f\u00b0C'%T)" - ], - "language": "python", + ], + "language": "python", + "metadata": {}, "outputs": [ { - "output_type": "stream", - "stream": "stdout", + "output_type": "stream", + "stream": "stdout", "text": [ "Pyrometer reading T = 1362.23\u00b0C" ] } - ], + ], "prompt_number": 7 - }, + }, { - "cell_type": "markdown", + "cell_type": "markdown", + "metadata": {}, "source": [ "<h3>Example 1.8, Page Number: 55<h3>" ] - }, + }, { - "cell_type": "code", - "collapsed": false, + "cell_type": "code", + "collapsed": false, "input": [ - "'''Thermocouple output'''", - "", - "#(a)", - "", - "#variable declaration", - "hot1_mV=41.29 # Millivolt corresponds to hot junction temp ", - "cold1_mV=2.022 # Millivolt corresponds to cold junction temp ", - "", - "#calculation", - "op1=hot1_mV-cold1_mV", - "", - "#(b)", - "", - "#variable declaration", - "hot2_mV=33.096 #Millivolt corresponds to hot junction temp ", - "cold2_mV=2.585 #Millivolt corresponds to cold junction temp ", - "#calculation", - "op2=hot2_mV-cold2_mV", - "", - "#(c)", - "", - "#variable declaration", - "hot3_mV=11.947 #Millivolt corresponds to hot junction temp ", - "cold3_mV=0.299 #Millivolt corresponds to cold junction temp ", - "#calculation", - "op3=hot3_mV-cold3_mV", - "", - "#result", - "print('(a)\\nOutput Millivolt = %.3f'%op1)", - "print('\\n(b)\\nOutput Millivolt = %.3f'%op2)", - "print('\\n(c)\\nAs the wrongly formed thermocouples at J1 and J2 will always oppose')", - "print('the main millivolt output, the net output will be lower than normal value.')", + "\n", + "\n", + "#(a)\n", + "\n", + "#variable declaration\n", + "hot1_mV=41.29 # Millivolt corresponds to hot junction temp \n", + "cold1_mV=2.022 # Millivolt corresponds to cold junction temp \n", + "\n", + "#calculation\n", + "op1=hot1_mV-cold1_mV\n", + "\n", + "#(b)\n", + "\n", + "#variable declaration\n", + "hot2_mV=33.096 #Millivolt corresponds to hot junction temp \n", + "cold2_mV=2.585 #Millivolt corresponds to cold junction temp \n", + "#calculation\n", + "op2=hot2_mV-cold2_mV\n", + "\n", + "#(c)\n", + "\n", + "#variable declaration\n", + "hot3_mV=11.947 #Millivolt corresponds to hot junction temp \n", + "cold3_mV=0.299 #Millivolt corresponds to cold junction temp \n", + "#calculation\n", + "op3=hot3_mV-cold3_mV\n", + "\n", + "#result\n", + "print('(a)\\nOutput Millivolt = %.3f'%op1)\n", + "print('\\n(b)\\nOutput Millivolt = %.3f'%op2)\n", + "print('\\n(c)\\nAs the wrongly formed thermocouples at J1 and J2 will always oppose')\n", + "print('the main millivolt output, the net output will be lower than normal value.')\n", "print('Output mV<%.3f'%op3)" - ], - "language": "python", + ], + "language": "python", + "metadata": {}, "outputs": [ { - "output_type": "stream", - "stream": "stdout", + "output_type": "stream", + "stream": "stdout", "text": [ - "(a)", - "Output Millivolt = 39.268", - "", - "(b)", - "Output Millivolt = 30.511", - "", - "(c)", - "As the wrongly formed thermocouples at J1 and J2 will always oppose", - "the main millivolt output, the net output will be lower than normal value.", + "(a)\n", + "Output Millivolt = 39.268\n", + "\n", + "(b)\n", + "Output Millivolt = 30.511\n", + "\n", + "(c)\n", + "As the wrongly formed thermocouples at J1 and J2 will always oppose\n", + "the main millivolt output, the net output will be lower than normal value.\n", "Output mV<11.648" ] } - ], + ], "prompt_number": 8 - }, + }, { - "cell_type": "markdown", + "cell_type": "markdown", + "metadata": {}, "source": [ "<h3>Example 1.9, Page Number: 56<h3>" ] - }, + }, { - "cell_type": "code", - "collapsed": false, + "cell_type": "code", + "collapsed": false, "input": [ - "'''electtronic temperature transmitter'''", - "", - "#variable declaration", - "Rl_ind=250.0 #load resistor for indicator", - "Rl_rec=250.0 #load resistor for recorder", - "load_allowable=600.0 #allowable load with load independency", - "", - "#calculation", - "load_connected= Rl_ind+Rl_rec", - "max_load_controller=load_allowable-load_connected", - "op_cont=600.0", - "total=Rl_ind+Rl_rec+load_allowable", - "extra_load=total-op_cont", - "", - "#result", - "print('(a)\\nThe max load to the controller = %d ohms'%max_load_controller)", - "print('\\n(b)\\nExtra Load = %d ohms'%extra_load)", - "print('\\nAdditional Power Supply voltage required = 10 V')", + "\n", + "\n", + "#variable declaration\n", + "Rl_ind=250.0 #load resistor for indicator\n", + "Rl_rec=250.0 #load resistor for recorder\n", + "load_allowable=600.0 #allowable load with load independency\n", + "\n", + "#calculation\n", + "load_connected= Rl_ind+Rl_rec\n", + "max_load_controller=load_allowable-load_connected\n", + "op_cont=600.0\n", + "total=Rl_ind+Rl_rec+load_allowable\n", + "extra_load=total-op_cont\n", + "\n", + "#result\n", + "print('(a)\\nThe max load to the controller = %d ohms'%max_load_controller)\n", + "print('\\n(b)\\nExtra Load = %d ohms'%extra_load)\n", + "print('\\nAdditional Power Supply voltage required = 10 V')\n", "print('\\nMinimum Power Supply Voltage = 34 ')" - ], - "language": "python", + ], + "language": "python", + "metadata": {}, "outputs": [ { - "output_type": "stream", - "stream": "stdout", + "output_type": "stream", + "stream": "stdout", "text": [ - "(a)", - "The max load to the controller = 100 ohms", - "", - "(b)", - "Extra Load = 500 ohms", - "", - "Additional Power Supply voltage required = 10 V", - "", + "(a)\n", + "The max load to the controller = 100 ohms\n", + "\n", + "(b)\n", + "Extra Load = 500 ohms\n", + "\n", + "Additional Power Supply voltage required = 10 V\n", + "\n", "Minimum Power Supply Voltage = 34 " ] } - ], + ], "prompt_number": 9 } - ] + ], + "metadata": {} } ] }
\ No newline at end of file |