{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Ch-8 : Thyristors "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Page No. 210 Example 8.1."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "We have,\n",
      "                  V1 = Vm*sin(theta)\n",
      "Therefore,\n",
      " Firing angel, theta =0.01\n",
      "    Conduction angle = 180 - theta = 179.99\n",
      "Average voltage, Vav = (Vm/2pi) * (1+cos(theta))\n",
      "              Vav = 70.03 V\n",
      "Average current,  Iav = Vav / RL =0.70 A\n",
      "Power output = Vav*Iav = 49.04 W\n",
      "The time during which the SCR remains OFF is\n",
      "       t = 1.67 ms\n"
     ]
    }
   ],
   "source": [
    "from math import asin,pi,cos\n",
    "Vm=220.\n",
    "V1=110.\n",
    "RL=100.\n",
    "print \"We have,\"\n",
    "print \"                  V1 = Vm*sin(theta)\"\n",
    "print \"Therefore,\"\n",
    "x=asin(V1/Vm)*pi/180\n",
    "print \" Firing angel, theta =%0.2f\"%x\n",
    "ca=180-x\n",
    "print \"    Conduction angle = 180 - theta = %0.2f\"%ca\n",
    "print \"Average voltage, Vav = (Vm/2pi) * (1+cos(theta))\"\n",
    "Vav = (Vm/(2*pi))*(1+cos(x*pi/180))\n",
    "print \"              Vav = %0.2f V\"%Vav\n",
    "Iav=Vav/RL\n",
    "print \"Average current,  Iav = Vav / RL =%0.2f A\"%Iav\n",
    "po=Vav*Iav\n",
    "print \"Power output = Vav*Iav = %0.2f W\"%po\n",
    "print \"The time during which the SCR remains OFF is\"\n",
    "t=1./(2*6*50)\n",
    "t1=t*10**3\n",
    "print \"       t = %0.2f ms\"%t1"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Page No. 211 Example 8.2."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "For an SCR full wave rectifier,\n",
      "            Vdc = (Vm/pi)*(1+cos(theta))\n",
      "Therefore,    theta =0.02\n",
      "For 50Hz, T = 20 ms for 360\n",
      "Therefore      t = (20*10**3/360)*63.34 = 1.07e-03 ms\n",
      "Load current,    Iav = Vav / RL = 15.00 A\n"
     ]
    }
   ],
   "source": [
    "from math import sqrt,pi,acos\n",
    "Vdc=150.\n",
    "Vm=230*sqrt(2)\n",
    "RL=10.\n",
    "print \"For an SCR full wave rectifier,\"\n",
    "print \"            Vdc = (Vm/pi)*(1+cos(theta))\"\n",
    "x=acos(((Vdc*pi)/Vm)-1)*pi/180\n",
    "print \"Therefore,    theta =%0.2f\"%x\n",
    "print \"For 50Hz, T = 20 ms for 360\"\n",
    "t = (20./360)*x\n",
    "print \"Therefore      t = (20*10**3/360)*63.34 = %0.2e ms\"%t\n",
    "Iav=Vdc/RL\n",
    "print \"Load current,    Iav = Vav / RL = %0.2f A\"%Iav"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Page No. 212 Example 8.3."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "As the supply voltage is 400 sin 314t, Vm = 400 V\n",
      "Peak inverse voltage(PIV) = sqrt(3)*Vm =692.82 V\n",
      "RMS value of current = 20 V\n",
      "Average value of current, Iav = RMS value/form factor =18.00 A\n",
      "Power rating of the SCR(kW) = PIV * Iav =12.47 kW\n"
     ]
    }
   ],
   "source": [
    "from math import sqrt\n",
    "Vm=400\n",
    "PIV=sqrt(3)*Vm\n",
    "print \"As the supply voltage is 400 sin 314t, Vm = 400 V\"\n",
    "print \"Peak inverse voltage(PIV) = sqrt(3)*Vm =%0.2f V\"%PIV\n",
    "RMS=20\n",
    "ff=1.11\n",
    "Iav=round(RMS/ff)\n",
    "print \"RMS value of current = 20 V\"\n",
    "print \"Average value of current, Iav = RMS value/form factor =%0.2f A\"%Iav\n",
    "pr=PIV*Iav\n",
    "pr1=pr*10**-3\n",
    "print \"Power rating of the SCR(kW) = PIV * Iav =%0.2f kW\"%pr1"
   ]
  }
 ],
 "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.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
