{
 "metadata": {
  "name": "",
  "signature": "sha256:a5275b4f1bdd430cf4ed3e203b7e975d86c74b17fe608ee8e07ebac2f3a39a9f"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 22: Protection of Alternators and Transformers"
     ]
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 22.1, Page Number: 529"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "from sympy import *\n",
      "\n",
      "#Variable declaration:\n",
      "MVA = 10                         #MVA rating of alternator\n",
      "V = 6.6                          #voltage rating of alternator(V)\n",
      "X = 10                           #per phase reactance of lternator(%)\n",
      "Iop = 175                         #operating current(A)\n",
      "\n",
      "\n",
      "#Calculation:\n",
      "Vph = V*1000/3**0.5                   #phase voltage(kV)\n",
      "I = round(MVA*10**6/(3**0.5*V*1000))      #full load current(A)\n",
      "\n",
      "#Let the reactance per phase be x ohms.\n",
      "r,x = symbols('r x')           #r = earthing resistance required to leave 10% of\n",
      "                                #the winding unprotected\n",
      "x1 = solve(3**0.5*x*I/(6.6*1000)*100-10,x)[0]\n",
      "X1 = x1*0.1                     #Reactance of 10% winding\n",
      "E = Vph*0.1                    #E.M.F. induced in 10% winding\n",
      "Zf = (X1**2+r**2)**0.5\n",
      "Ief = E/Zf                     #Earth-fault current due to 10% winding\n",
      "\n",
      "#When this fault current becomes 175 A, the relay will trip\n",
      "r1 = solve(Ief-175,r)[1]               #A\n",
      "\n",
      "\n",
      "\n",
      "#Result:\n",
      "print \"Required value of earth resistance is\",round(r1,3),\"ohm\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Required value of earth resistance is 2.177 ohm\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 22.2, Page Number: 530"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "from sympy import *\n",
      "\n",
      "#Variable declaration:\n",
      "MVA = 10                         #MVA rating of alternator\n",
      "V = 6.6                          #voltage rating of alternator(V)\n",
      "CR = 1000/5                      #current ratio of CT\n",
      "Rn = 7.5                         #resistance of star-point to earth(ohm)\n",
      "Iop = 0.5                        #operating current of the relay(A)\n",
      "\n",
      "\n",
      "\n",
      "#Calculation:\n",
      "#Let x % of the winding be unprotected.\n",
      "x = symbols('x')\n",
      "Vph = V*1000/3**0.5                   #phase voltage(kV)\n",
      "If = 1000/5*Iop              #minimum fault current which will operate the relay(A)\n",
      "E = Vph*x/100                 #E.M.F. induced in x% winding(V)\n",
      "Ief = E/Rn                      #Earth fault current which x% winding will cause(A)\n",
      "#This current must be equal to 100 A.\n",
      "x1 = solve(Ief-If,x)[0]\n",
      "\n",
      "\n",
      "#Result:\n",
      "print \"Percentage of unprotected winding is\",round(x1,2),\"%\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Percentage of unprotected winding is 19.68 %\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 22.3, Page Number: 530"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "from sympy import *\n",
      "\n",
      "#Variable declaration:\n",
      "MVA = 10                         #MVA rating of alternator\n",
      "V = 6.6                          #voltage rating of alternator(V)\n",
      "CR = 1000/5                      #current ratio of CT\n",
      "Rn = 6                         #resistance of star-point to earth(ohm)\n",
      "Iop = 0.75                        #operating current of the relay(A)\n",
      "\n",
      "\n",
      "#Calculation:\n",
      "#Let x % of the winding be unprotected.\n",
      "x = symbols('x')\n",
      "Vph = V*1000/3**0.5                   #phase voltage(kV)\n",
      "If = 1000/5*Iop              #minimum fault current which will operate the relay(A)\n",
      "E = Vph*x/100                 #E.M.F. induced in x% winding(V)\n",
      "Ief = E/Rn                      #Earth fault current which x% winding will cause(A)\n",
      "#This current must be equal to 100 A.\n",
      "x1 = solve(Ief-If,x)[0]\n",
      "\n",
      "\n",
      "#(ii) Let r2 = the minimum earthing resistance required to \n",
      "#provide protection for 90% of stator winding. \n",
      "#Then, 10% winding would be unprotected\n",
      "x2 = 10                                 #%\n",
      "r2 = Vph*x2/If*0.01                     #ohm\n",
      "\n",
      "\n",
      "#Result:\n",
      "print \"(i) The percentage of each of the stator windings is\",round(x1,1),\"%\"\n",
      "print \"(ii)The minimum resistance to provide protection for 90% of\"\n",
      "print \"    the stator winding is\",round(r2,2),\"ohm\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(i) The percentage of each of the stator windings is 23.6 %\n",
        "(ii)The minimum resistance to provide protection for 90% of\n",
        "    the stator winding is 2.54 ohm\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 22.4, Page Number: 531"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "from sympy import *\n",
      "\n",
      "#Variable declaration:\n",
      "MVA = 10                         #MVA rating of alternator\n",
      "V = 6.6                          #voltage rating of alternator(V)\n",
      "CR = 1000/5                      #current ratio of CT\n",
      "s = 20                          #earth-fault setting(%)\n",
      "Iop = 0.75                        #operating current of the relay(A)\n",
      "\n",
      "\n",
      "#Calculation:\n",
      "#Since 85% winding is to be protected, 15% would be unprotected\n",
      "r = symbols('r')            #earthing resistance reqd. to leave 15% of winding unprotected(ohm)\n",
      "x = 15                                 #%\n",
      "Ifl = MVA*10**6/(3**0.5*V*1000)       #Full load current(A)\n",
      "IF = s*Ifl/100                    #Minimum fault current which will operate the relay\n",
      "Vu = x/100*V*1000/3**0.5             #Voltage induced in 15% of winding(kV)\n",
      "Ief = Vu/r                        #Earth fault current which 15% winding will cause(A)\n",
      "#This current must be equal to IF.\n",
      "r1 = solve(Ief-IF,r)[0]              #ohm\n",
      "\n",
      "\n",
      "#Result:\n",
      "print \"The value of earthing resistor is\",round(r1,2),\"ohm\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The value of earthing resistor is 3.27 ohm\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 22.5, Page Number: 538"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "\n",
      "#Variable declaration:\n",
      "r1 = 220/11000                        #voltage ratio of transformer\n",
      "r2 = 600/5                 #current ratio of protective transformer on 220V side\n",
      "\n",
      "\n",
      "#Calculation:\n",
      "#Suppose that line current on 220 V side is 600 A\n",
      "\n",
      "Ipd = 5                  #Phase current of delta connected CTs on 220V side(A)\n",
      "Ild = 3**0.5*Ipd         #Line current of delta connected CTs on 220 V side(A)\n",
      "\n",
      "#This Ild will flow through the pilot wires.\n",
      "Ips = 5*3**0.5           #Phase current of star connected CTs on 11,000 V side(A)\n",
      "\n",
      "#Now, using this relation: Primary apparent power = Secondary apparent power\n",
      "I = 3**0.5*220*600/(3**0.5*11000)           #A\n",
      "r3 = I/Ips                     #Turn-ratio of CTs on 11000 V side\n",
      "\n",
      "\n",
      "#Result:\n",
      "print \"Turn-ratio of CTs on 11000 V side is (\",round(r3,3),\": 1 )\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Turn-ratio of CTs on 11000 V side is ( 1.386 : 1 )\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 22.6, Page Number: 538"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "\n",
      "#Variable declaration:\n",
      "r1 = 0.4/11                        #line voltage(in kV) ratio of transformer\n",
      "r2 = 500/5                   #current ratio of protective transformer\n",
      "\n",
      "\n",
      "#Calculation:\n",
      "#Suppose the line current on 400 V side is 500 A.\n",
      "Ipd = 5                     #Phase current of delta connected CTs on 400 V side(A)\n",
      "Ild = Ipd*3**0.5            #Line current of delta connected CTs on 400 V side(A)\n",
      "#This Ild will flow through the pilot wires.\n",
      "Ips = 5*3**0.5             #Phase current of star-connected CTs on 11000 V side(A)\n",
      "\n",
      "#Primary apparent power = Secondary apparent power\n",
      "I = 3**0.5*400*500/(3**0.5*11000)             #A\n",
      "r3 = I/Ips\n",
      "\n",
      "\n",
      "#Result:\n",
      "print \" The ratio of the protective transformers on 11kV side is\",round(r3,3),\"i.e, 10.5:5\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " The ratio of the protective transformers on 11kV side is 2.099 i.e, 10.5:5\n"
       ]
      }
     ],
     "prompt_number": 1
    }
   ],
   "metadata": {}
  }
 ]
}