{
 "metadata": {
  "name": "J.B.Gupta Chapter 6"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": "Chapter 6 Extension of Instrument Range"
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 6.1,Page No 165"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math\n \n#variable declaration\nIm   = 50*10**-6;              #full scale deflection current in A\nRm   = 1000;                   #instrument resistance in \u03a9\nI    = 1;                      #total current to be measured in A\n \n#calculations\nRs   = (Rm/float((I/float(Im))-1));       #resistance of ammeter in \u03a9\n \n \n#result\nprint'resistance of ammeter shunt required Rs = %3.7f'%Rs,'\u03a9';\n \n ",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "resistance of ammeter shunt required Rs = 0.0500025 \u03a9\n"
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 6.2,Page No 165"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math\n \n#variable declaration\nRm    = 1;                                  #instrument resistance in \u03a9\nRse   = 4999;                               #series resistance in \u03a9\nV     = 250;                                #full-scale deflection voltage in V\nRs    = 0.002004;                           #Shunt resistance in \u03a9(Rs =1/float(499))\nI1    = 50;                                 #full-scale defelction current in A\n \n#calculations\nIm    = V/float(Rm+Rse);               #full-scale deflection current in A\nx     = 1/float(Rse);\nI     = Im*(1+(Rm/float(x)));          #current in A\nN     = I1/float(Im);          \nRsh   = Rm/float(N-1);                 #shunt resistance in \u03a9\n \n#result\nprint'full-scale defelction current in Im = %3.2f'%Im,'A';\nprint'current range of instrument when used as an ammeter with coil connected across shunt is I = %3.2f'%I,'A';\nprint'Shunt resistance for the instrument to give a full-scale deflection of 50A is Rsh = %3.2e'%Rsh,'\u03a9';\n \n ",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "full-scale defelction current in Im = 0.05 A\ncurrent range of instrument when used as an ammeter with coil connected across shunt is I = 250.00 A\nShunt resistance for the instrument to give a full-scale deflection of 50A is Rsh = 1.00e-03 \u03a9\n"
      }
     ],
     "prompt_number": 13
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 6.3,Page No 167"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math\n \n#variable declaration\nRm   = 10;                                             #instrument resistance in \u03a9\nIm   = 0.05;                                           #instrument current in A\nV    = 750;                                            #voltage  to be measured in V\nI    = 100;                                            #current to be measured in A\n \n#calculations\nR    = (V/float(Im))-Rm;                         #External resistance in \u03a9\nN    = I/float(Im);                              #power of shunt\nRs   = Rm/float(N-1);                            #resistance in \u03a9\n \n \n#result\nprint'external resistance to be connected in sereis to enable the instrument to measure voltage upto 750V is %3.1f'%R,'\u03a9';\nprint'shunt resistance required  %3.4f'%Rs,'\u03a9';",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "external resistance to be connected in sereis to enable the instrument to measure voltage upto 750V is 14990.0 \u03a9\nshunt resistance required  0.0050 \u03a9\n"
      }
     ],
     "prompt_number": 18
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 6.4,Page No 167"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math\n \n#variable declaration\nRm   = 5;                                     #instrument resistance in \u03a9\nIm   = 15*10**-3;                             #full scale defelection current in A\nI    =1;                                      #current to be measured in A\nV    = 10;                                    #voltage to be measured in V\n \n#calculations\nN    = I/float(Im);                              #power of shunt\nRs   = Rm/float(N-1);                            #resistance in \u03a9\nR    = (V/float(Im))-Rm;                         #series resistance in \u03a9\n \n \n#result\nprint'resistance to be connected in parallel to enable the instrument to measure current upto 1A is %3.4f'%Rs,'\u03a9';\nprint'shunt resistance required for full-scale defelction with 10v is %3.4f'%R,'\u03a9';\n ",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "resistance to be connected in parallel to enable the instrument to measure current upto 1A is 0.0761 \u03a9\nshunt resistance required for full-scale defelction with 10v is 661.6667 \u03a9\n"
      }
     ],
     "prompt_number": 21
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 6.5,Page No 167"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math\n \n#variable declaration\nRm  = 2;                                            #instrument coil resistance in \u03a9\nV   = 250;                                          #full-scale reading in V\nRs  = 5000;                                         #series resistance in \u03a9\nRsh = 2*10**-3;                                     #shunt resistance in \u03a9\n \n \n#calculations\nIm   = V/float(Rm+Rs);                  #current flowing through the instrument for full-scale deflection in A\nIs   = (Im*Rm)/float(Rsh);              #current through shunt resistance in A \nI    = Im+Is;                           #current range of instrument in A\n \n#result\nprint'current flowing through the instrument for full-scale deflection is %3.4f'%(Im*10**3),'mA';\nprint'current through shunt resistance is %3.2f'%Is,'A';\nprint'current range of instrumentis %3.1f'%I,'A'\n ",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "current flowing through the instrument for full-scale deflection is 49.9800 mA\ncurrent through shunt resistance is 49.98 A\ncurrent range of instrumentis 50.0 A\n"
      }
     ],
     "prompt_number": 29
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 6.6,Page No 168"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math\n \n#variable declaration\nRsh  = 0.02;                         #shunt resistance in \u03a9\nV    = 0.5;                          #potential difference across the shunt in V\nRm   = 1000;                         #resistance in \u03a9\nI1   = 10;                           #current in A\nI2   = 75;                           #current in A\nI    = 100;\t\t\t                 #current in A\nx    = 40;\t\t\t                 #deflection %\n \n#calculations\nIs    = V/float(Rsh);                       #current through shunt in A\nIm    = V/float(Rm);                        #current through ammeter for full-scale defelction in A\nV1    = I1*Rsh;                             #voltage across shunt for 10A in V\nR1    = V1/float(Im);\t\t\t            #resistance for the ammeter for a current of 10 A for full-scale defelction in \u03a9\nV2    = I2*Rsh;                             #voltage across shunt for 75A in V\nR2    = V2/float(Im);\t\t\t            #resistance for the ammeter for a current of 75 A for full-scale defelction in \u03a9\nI3    = I*(100/float(x));\t\t\t        #full-scale defelction current when 100 A gives 40% defelction\nV3    = I3*Rsh;                             #voltage across shunt for  250 A in V\nR3    = V3/float(Im);\t\t\t            #resistance for the ammeter for a current of 250 A for full-scale defelction in \u03a9\n\n\n#result\nprint'current through ammeter for full-scale defelction is %3.1f'% (Im*10**3),' A'\nprint'Resistance for the ammeter for a current of 10 A for full-scale defelction is %3.2f'%R1,' \u03a9';\nprint'Resistance for the ammeter for a current of 75 A for full-scale defelction is %3.2f'%R2,' \u03a9';\nprint'Resistance for the ammeter for a current of 250 A for full-scale defelction is %3.2f'%R3,' \u03a9';\n",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "current through ammeter for full-scale defelction is 0.5  A\nResistance for the ammeter for a current of 10 A for full-scale defelction is 400.00  \u03a9\nResistance for the ammeter for a current of 75 A for full-scale defelction is 3000.00  \u03a9\nResistance for the ammeter for a current of 250 A for full-scale defelction is 10000.00  \u03a9\n"
      }
     ],
     "prompt_number": 39
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 6.7,Page No 168"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math\n\n#variable declaration\nB        = 0.5;\t\t\t        #flux density of the magnetic field in Wb/m**2\nN        = 100;\t\t\t        #number of turns in coil\nl        = 0.04;\t\t         #length in m\nr        =0.03;\t\t\t         #width in m\nTc       = 120*10**-6;\t         #controlling torque in N-m\nv        = 1;  \t\t\t         #volts per division in V\nn        = 100;\t\t\t         #number of division on full-scale\nRm       = 0;\n\n#calculations\nI       = Tc/float(B*N*l*r);\t\t  #current for full-scale deflection in A\nV     = n*v;\t\t\t              #full-scale reading of instrument in V\nR     = (V/float(I))-Rm;\t\t\t  #External resistance required to be put in series with the coil in \u03a9\n\n#result\nprint'current for full-scale deflection is %3.4f'%I,'A';\nprint'External resistance required to be put in series with the coil is %3.3f'%R,' \u03a9';\n\n",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "current for full-scale deflection is 0.0020 A\nExternal resistance required to be put in series with the coil is 50000.000  \u03a9\n"
      }
     ],
     "prompt_number": 48
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 6.8,Page No 169"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "import math\n\n\n#variable decalaration\nRm        = 5;\t\t              #coil resistance in \u03a9\nRm1       = 0.00075;\t\t      #coil resistance in \u03a9\nIm        = 0.015;\t\t          #full-scale defelction current in A\nI         = 100; \t\t          #current to be measured in A\nT1        =  0.004;\t\t          #temperature coeficient of copper in \u03a9/\u03a9/\u00b0C\nT2        =  0.00015;\t\t      #temperature coeficient of manganin in \u03a9/\u03a9/\u00b0C\nT         =10; \t\t              #rise in temperature in \u00b0C\n#calculations\nN      = I/float(Im);\t\t         #multiplying power of shunt\nRs     = Rm/float(N-1);\t            #resistance of manganin shunt in \u03a9\nRc     = Rm*(1+(T1*T));\t            #coil resitance with 10\u00b0C in temperature in \u03a9\nRsh    = Rm1*(1+(T2*T));\t        #shunt resitance with 10\u00b0C in temperature in \u03a9\nIn     = (Rsh/float(Rc+Rsh))*100;\t#new instrument current in A\nr      = (In/float(Im))*100;\t\t#new instrument reading in A\ne      = ((r-I)/float(I))*100;\t\t#percentage error in %\n\n\n#result\nprint'percentage error %3.5f'%e,'%';",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "percentage error -3.71583 %\n"
      }
     ],
     "prompt_number": 83
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "",
     "language": "python",
     "metadata": {},
     "outputs": []
    }
   ],
   "metadata": {}
  }
 ]
}