{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter5 Line Commutated converters"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 5.1,Pg.no15"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "cosine of the firing angle=C= 0.79\n",
      "firing angle of the converter=A= 37.81 degrees\n",
      "AC terminal power=Pac= 58.83 KW\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "from math import pi\n",
    "Edc=440                                       #dc terminal voltage of the thyristor in volts\n",
    "E2=415                                        #input voltage of the thyristor in volts\n",
    "Id=100                                        #dc motor current in amps\n",
    "C=Edc/(1.35*E2)\n",
    "C=round(C,2)\n",
    "print 'cosine of the firing angle=C=',C\n",
    "A=math.acos(C)*180/pi\n",
    "A=round(A,2)\n",
    "print 'firing angle of the converter=A=',A,'degrees'\n",
    "Pac=1.05*1.35*E2*Id/1000                     #Ac terminal power in Kilo watts\n",
    "Pac=round(Pac,2)\n",
    "print 'AC terminal power=Pac=',Pac,'KW'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 5.2,Pg.no15"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "AC line current of the thyristor=I2= 163.4 amperes\n",
      "effective reactance of the thyristor=Xt= 0.15 ohms\n",
      "cosine value of the commutational angle=C= 0.96\n",
      "commutation angle=CA= 16.2602047083 degrees\n",
      "Inductive voltage regulation=IVR= 0.02\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "from math import sqrt\n",
    "Id=200                                                     #rated dc current in amperes\n",
    "I2=0.817*Id                                                #AC line current in amperes\n",
    "print 'AC line current of the thyristor=I2=',I2,'amperes'\n",
    "E2=415                                                     #AC line voltage in volts\n",
    "Xt=0.06*E2/I2                                              #effective reactance of the thyristor in ohms\n",
    "Xt=round(Xt,2)\n",
    "print 'effective reactance of the thyristor=Xt=',Xt,'ohms'\n",
    "C=1-((Id*Xt)/(E2*sqrt(3)))                                 #cosine value of the commutational angle\n",
    "C=round(C,2)\n",
    "print 'cosine value of the commutational angle=C=',C\n",
    "CA=math.acos(C)*180/pi\n",
    "print 'commutation angle=CA=',CA,'degrees'\n",
    "IVR=(1-C)/2                                                #inductive voltage regulation\n",
    "IVR=round(IVR,3)\n",
    "print 'Inductive voltage regulation=IVR=',IVR"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 5.3,Pg.no16"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "maximum value of dc voltage=Emax2= 586.9 volts\n",
      "rms current through the device=Irms= 56.82 amps\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "from math import sqrt,pi\n",
    "E2=415 #input voltage in volts\n",
    "Edc=1.17*E2          #dc terminal voltage in volts \n",
    "Emax2=sqrt(2)*E2     #maximum value of dc voltage\n",
    "Z=2                  #total impedance in ohms\n",
    "Emax2=round(Emax2,2)\n",
    "print 'maximum value of dc voltage=Emax2=',Emax2,'volts'\n",
    "Irms=Emax2*sqrt(pi/3+sqrt(3)/4)/(2*pi*Z)\n",
    "Irms=round(Irms,2)\n",
    "print 'rms current through the device=Irms=',Irms,'amps'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 5.4,Pg.no 17"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "cosine of the firing angle=C= 0.82\n",
      "firing angle of the converter=A= 34.92 degrees\n",
      "dc power delivered by the converter=Pdc= 92 KW\n",
      "AC terminal power=Pac= 96.6 KVA\n",
      "AC line current=Iac= 134.39 amps\n",
      "Branch current through the device=Ib= 116.0 amps\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "from math import sqrt,pi\n",
    "Edc=460    #dc terminal voltage of the thyristor in volts\n",
    "E2=415     #input voltage of the thyristor in volts\n",
    "Id=200     #dc motor current in amps\n",
    "C=Edc/(1.35*E2)\n",
    "C=round(C,2)\n",
    "print 'cosine of the firing angle=C=',C\n",
    "A=math.acos(C)*180/pi\n",
    "A=round(A,2)\n",
    "print 'firing angle of the converter=A=',A,'degrees'\n",
    "Pdc=Edc*Id/1000       #dc power delivered by the converter in kilo Watts\n",
    "print 'dc power delivered by the converter=Pdc=',Pdc,'KW'\n",
    "Pac=1.05*Pdc           #Ac terminal power in KVA\n",
    "print 'AC terminal power=Pac=',Pac,'KVA'\n",
    "Iac=Pac*1000/(sqrt(3)*E2)\n",
    "Iac=round(Iac,2)\n",
    "print 'AC line current=Iac=',Iac,'amps'\n",
    "Ib=0.58*Id              #Branch current through the device in amps\n",
    "print 'Branch current through the device=Ib=',Ib,'amps'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 5.5,Pg.no 17"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "cosine value of the commutational angle=C= 0.96\n",
      "effective reactance of the thyristor=Xt= 0.19 ohms\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "from math import pi,sqrt\n",
    "Id=150                  #rated dc current in amperes\n",
    "E2=415                  #AC line voltage in volts\n",
    "Emax=sqrt(2)*E2\n",
    "C=math.cos(16*pi/180)       #cosine value of the commutational angle\n",
    "C=round(C,2)\n",
    "print 'cosine value of the commutational angle=C=',C\n",
    "Xt=(1-C)*E2*sqrt(3)/Id  #effective reactance of the thyristor in ohms\n",
    "Xt=round(Xt,2)\n",
    "print 'effective reactance of the thyristor=Xt=',Xt,'ohms'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 5.6,Pg.no 18"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "AC load current=Id= 63.81 amps\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "from math import sqrt,pi\n",
    "E2=230                 #AC line voltage in volts\n",
    "Emax=sqrt(2)*E2   \n",
    "C=math.cos(13*pi/180)       #cosine value of the commutational angle\n",
    "Xt=0.16                #effective reactance of the thyristor in ohms\n",
    "Id=(1-C)*E2*sqrt(3)/Xt    #AC load current in amperes\n",
    "Id=round(Id,2)\n",
    "print 'AC load current=Id=',Id,'amps'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 5.7,Pg.no 18"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Average value of dc voltage=Edc= 96.6 volts\n",
      "Effective value of voltage=Eeff= 160.27 volts\n",
      "Load current=Id= 9.66 amps\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "from math import sqrt,pi\n",
    "E2=230                                      #input voltage in volts\n",
    "Emax=sqrt(2)*E2                             #maximum value of dc voltage\n",
    "A=pi/6\n",
    "Edc=Emax*(1+math.cos(A))/(2*pi)\n",
    "Edc=round(Edc,2)\n",
    "print 'Average value of dc voltage=Edc=',Edc,'volts'\n",
    "Eeff=Emax*sqrt((pi-A)/(4*pi)+(math.sin(2*A)/(8*pi)))\n",
    "Eeff=round(Eeff,2)\n",
    "print 'Effective value of voltage=Eeff=',Eeff,'volts'\n",
    "R=10                                        #total impedance in ohms\n",
    "Id=Edc/R\n",
    "Id=round(Id,2)\n",
    "print 'Load current=Id=',Id,'amps'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 5.8,Pg.no 19"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "dc output voltage=Edc= 161.79 volts\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "from math import sqrt,pi\n",
    "E2=415                     #input voltage in volts\n",
    "Emax=sqrt(2)*E2            #maximum value of dc voltage\n",
    "A=pi/6                     #triggering angle in degrees\n",
    "Edc=Emax*math.cos(A)/pi    #dc output voltage in volts\n",
    "Edc=round(Edc,2)\n",
    "print 'dc output voltage=Edc=',Edc,'volts'"
   ]
  }
 ],
 "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
}
