{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter13 Choppers and Transportation system Application"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 13.1,Pg.no.43"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "time constant=t= 4.0 milliseconds\n",
      "Discontinuous condition starts from Td= 332.5 microseconds\n",
      "Output voltage=Eo= 88.0 volts\n",
      "Average current=Iav= 264.0 amp\n",
      "Maximum current=Imax= 330.85 amp\n",
      "Minimum current=Imin= 199.87 amp\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "from math import exp\n",
    "E=220.0           #dc supply voltage in volts\n",
    "El=22.0           #Load voltage in volts\n",
    "Ton=1000.0        #conducting period in microseconds\n",
    "T=2500.0          #Total timeperiod in microseconds\n",
    "L=1.0             #inductance in milliHenry\n",
    "R=0.25          #resistance in ohms\n",
    "t=L/R           #time constant in milliseconds\n",
    "print 'time constant=t=',t,'milliseconds'\n",
    "A=0.133\n",
    "Td=A*T          #Discontinuous condition starts at\n",
    "print 'Discontinuous condition starts from Td=',Td,'microseconds'\n",
    "Eo=0.4*E        #output voltage in volts\n",
    "print 'Output voltage=Eo=',Eo,'volts'\n",
    "Iav=(Eo-El)/R   #Average current in amps\n",
    "print 'Average current=Iav=',Iav,'amp'\n",
    "Imax=((E*(1-exp(-Ton/(t*1000))))/(R*(1-exp(-T/(t*1000)))))-(El/R)\n",
    "Imax=round(Imax,2)\n",
    "print 'Maximum current=Imax=',Imax,'amp'\n",
    "Imin=((E*(exp(Ton/(t*1000))-1))/(R*(exp(T/(t*1000))-1)))-(El/R)\n",
    "Imin=round(Imin,2)\n",
    "print 'Minimum current=Imin=',Imin,'amp'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 13.2,Pg.no.44"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Conduction period=Ton= 0.75 ms\n",
      "Total time period=T= 1.0 ms\n",
      "Blocking period=Toff= 0.25 ms\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "f=1.0          #operating frequency in KHZ\n",
    "E=220.0        #dc supply voltage in volts\n",
    "El=165.0       #Load voltage in volts\n",
    "Ton=El/(E*f)   #conduction period in ms\n",
    "print 'Conduction period=Ton=',Ton,'ms'\n",
    "T=1/f          #total time period in ms\n",
    "print 'Total time period=T=',T,'ms'\n",
    "Toff=T-Ton     #blocking period in ms\n",
    "print 'Blocking period=Toff=',Toff,'ms'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 13.3,Pg.no.44"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Load capacitance required for optimum frequency=C= 75.0 microfarad\n",
      "Inductance parameters=L1=L2= 0.53 milliHenry\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "from math import pi\n",
    "E=220.0       #dc supply voltage in volts\n",
    "Toff=200.0    #blocking period in microseconds\n",
    "Il=50.0         #load current in amps\n",
    "C=pi*Toff*Il/(2*E)      #capacitance for optimum frequency in microfarad\n",
    "C=75.0\n",
    "print 'Load capacitance required for optimum frequency=C=',C,'microfarad'\n",
    "L1=Toff**2*10**-3/C     #inductance required in milliHenry\n",
    "L2=L1\n",
    "L1=round(L1,2)\n",
    "print 'Inductance parameters=L1=L2=',L1,'milliHenry'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 13.4,Pg.no.45"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Conduction period=Ton= 200.0 microseconds\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "E=220.0         #dc supply voltage in volts\n",
    "El=660.0        #Load voltage in volts\n",
    "Toff=100.0      #blocking period in microseconds\n",
    "Ton=(El/E-1)*Toff      #Conduction period in microseconds\n",
    "print 'Conduction period=Ton=',Ton,'microseconds'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 13.5,Pg.no.45"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Average voltage in the circuit=Eav= 53.0 volts\n",
      "Conduction period=Ton= 1.2 ms\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "f=200.0       #chopper frequency in HZ\n",
    "E=220.0       #dc supply voltage in volts\n",
    "Iav=100.0     #Average current in the circuit in amps\n",
    "Ra=0.02     #Armature resistance in ohms\n",
    "Rf=0.01     #Field resistance in ohms\n",
    "Ebav=50     #Average value of the Back emf in volts\n",
    "Eav=Iav*(Ra+Rf)+Ebav       #Average voltage in the circuit in volts\n",
    "print 'Average voltage in the circuit=Eav=',Eav,'volts'\n",
    "Ton=Eav*1000/(E*f)         #conduction period in ms\n",
    "Ton=round(Ton,2)\n",
    "print 'Conduction period=Ton=',Ton,'ms'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 13.6,Pg.no.46"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Rotor resistance referred to stator=R= 5.2 ohms\n",
      "Motor torque=MT= 662.4 Snc . Watts\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "f=200.0         #chopper frequency in HZ\n",
    "T=1000/f      #total time period in ms\n",
    "Toff=4.0        #Blocking period in ms\n",
    "Ton=T-Toff    #conduction period in ms\n",
    "R1=2.0          #R1 in ohms\n",
    "R2=4.0          #R2 in ohms\n",
    "R=((R1*Ton)+(R1+R2)*Toff)/T        #rotor resistance referred to stator in ohms\n",
    "print 'Rotor resistance referred to stator=R=',R,'ohms'\n",
    "V=415.0       #stator voltage in volts\n",
    "s=0.02        #slip of the motor\n",
    "MT=V**2*s/R    #motor torque in Syn . Watts\n",
    "MT=round(MT,2)\n",
    "print 'Motor torque=MT=',MT,'Snc . Watts'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 13.7,Pg.no.46"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "R2=1.5*R1\n",
      "the above condition satisfies when Ton= Toff\n",
      "Chopper frequency=f= 250.0 hz\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "#R1=rotor resistance before introduction of control\n",
    "#R2=rotor resistance after introduction of control \n",
    "print 'R2=1.5*R1'\n",
    "R2=((R1*Ton)+(R1+R1)*Toff)/T     #rotor resistance referred to stator in ohms\n",
    "print 'the above condition satisfies when Ton= Toff'\n",
    "T=4          #total time period in ms\n",
    "f=1000/T     #chopper frequency in hz\n",
    "f=round(f,1)\n",
    "print 'Chopper frequency=f=',f,'hz'"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
