{ "metadata": { "name": "", "signature": "sha256:c30652f9881ee18245a1635c17c8cb6587983fc4f38ea35cc91611c084543096" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 18: Unsymmetrical Fault Calculations" ] }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 18.2, Page Number: 429" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "from pylab import *\n", "import cmath\n", "import math\n", "\n", "#Variable declaration:\n", "Ir = cmath.rect(100,30*math.pi/180) #current in phase R(A)\n", "Iy = cmath.rect(50,300*math.pi/180) #current in phase Y(A)\n", "Ib = cmath.rect(30,180*math.pi/180) #current in phase B(A)\n", "\n", "\n", "#Calculation:\n", "a = cmath.rect(1,120*math.pi/180)\n", "I0 = 1/3*(Ir+Iy+Ib) #A\n", "I1 = 1/3*(Ir+a*Iy+a**2*Ib) #A\n", "I2 = 1/3*(Ir+a**2*Iy+a*Ib) #A\n", "In = Ir+Iy+Ib #A\n", "\n", "\n", "#Result:\n", "print \"The positive, negative and zero sequence currents in the R-line are\"\n", "print \"I0 = (\",round(abs(I0),2),round(rad2deg(angle(I0)),2),\") A\"\n", "print \"I1 = (\",round(abs(I1),2),round(rad2deg(angle(I1)),1),\") A\"\n", "print \"I2 = (\",round(abs(I2),2),round(rad2deg(angle(I2)),2),\") A\"\n", "print \"Return current in the neutral wire is\"\n", "print \"In =(\",round(abs(In),2),round(rad2deg(angle(In)),1),\") A\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The positive, negative and zero sequence currents in the R-line are\n", "I0 = ( 27.29 4.69 ) A\n", "I1 = ( 57.98 43.3 ) A\n", "I2 = ( 18.97 24.96 ) A\n", "Return current in the neutral wire is\n", "In =( 81.88 4.7 ) A\n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 18.3, Page Number: 430" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "from pylab import *\n", "import cmath\n", "import math\n", "\n", "#Variable declaration:\n", "Ir = 12+6j #current in phase A(A)\n", "Iy = 12-12j #current in phase Y(A)\n", "Ib = -15+10j #current in phase B(A)\n", "\n", "\n", "#Calculation:\n", "a = cmath.rect(1,120*math.pi/180)\n", "#Red phase\n", "Ir0 = 1/3*(Ir+Iy+Ib) #A\n", "Ir1 = 1/3*(Ir+a*Iy+a**2*Ib) #A\n", "Ir2 = 1/3*(Ir+a**2*Iy+a*Ib) #A\n", "\n", "#Yellow phase:\n", "Iy0 = Ir0 #A\n", "Iy1 = a**2*Ir1 #A\n", "Iy2 = a*Ir2 #A\n", "\n", "\n", "#Blue phase:\n", "Ib0 = Ir0 #A\n", "Ib1 = a*Ir1 #A\n", "Ib2 = a**2*Ir2 #A\n", "\n", "\n", "#Result:\n", "print \"The sequence currents of red phase are:\"\n", "print \"Ir0 =\",Ir0.real+round(Ir0.imag,2)*1j,\"A\"\n", "print \"Ir1 =\",round(Ir1.real,2)+round(Ir1.imag,2)*1j,\"A\"\n", "print \"Ir2 =\",round(Ir2.real,2)+round(Ir2.imag,2)*1j,\"A\"\n", "print \"\\nThe sequence currents of red phase are:\"\n", "print \"Iy0 =\",Iy0.real+round(Iy0.imag,2)*1j,\"A\"\n", "print \"Iy1 =\",round(Iy1.real,2)+round(Iy1.imag,1)*1j,\"A\"\n", "print \"Iy2 =\",round(Iy2.real,1)+round(Iy2.imag,2)*1j,\"A\"\n", "print \"\\nThe sequence currents of red phase are:\"\n", "print \"Ib0 =\",Ib0.real+round(Ib0.imag,2)*1j,\"A\"\n", "print \"Ib1 =\",round(Ib1.real,2)+round(Ib1.imag,2)*1j,\"A\"\n", "print \"Ib2 =\",round(Ib2.real,2)+round(Ib2.imag,2)*1j,\"A\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The sequence currents of red phase are:\n", "Ir0 = (3+1.33j) A\n", "Ir1 = (10.85+10.13j) A\n", "Ir2 = (-1.85-5.46j) A\n", "\n", "The sequence currents of red phase are:\n", "Iy0 = (3+1.33j) A\n", "Iy1 = (3.35-14.5j) A\n", "Iy2 = (5.7+1.13j) A\n", "\n", "The sequence currents of red phase are:\n", "Ib0 = (3+1.33j) A\n", "Ib1 = (-14.2+4.33j) A\n", "Ib2 = (-3.8+4.33j) A\n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 18.4, Page Number: 430" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "from pylab import *\n", "import cmath\n", "import math\n", "\n", "#Variable declaration:\n", "Er0 = 100 #zero sequence voltage of phase R(V)\n", "Er1 = 200-100j #positive sequence voltage of phase R(V)\n", "Er2 = -100 #negative sequence voltage of phase R(V)\n", "\n", "#Calculation:\n", "a = cmath.rect(1,120*math.pi/180)\n", "Er = Er0+Er1+Er2 #V\n", "Ey = Er0+a**2*Er1+a*Er2 #V\n", "Eb = Er0+a*Er1+a**2*Er2 #V\n", "\n", "\n", "#Result:\n", "print \"The phase voltages are:\"\n", "print \"Er =\",(round(abs(Er),2),round(rad2deg(angle(Er)),2)),\"V\"\n", "print \"Ey =\",(round(abs(Ey)),round(rad2deg(angle(Ey)),2)),\"V\"\n", "print \"Eb =\",(round(abs(Eb),2),round(rad2deg(angle(Eb)),1)),\"V\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The phase voltages are:\n", "Er = (223.61, -26.57) V\n", "Ey = (213.0, -99.9) V\n", "Eb = (338.59, 66.2) V\n" ] } ], "prompt_number": 4 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 18.5, Page Number: 431" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "from pylab import *\n", "import cmath\n", "import math\n", "\n", "#Variable declaration:\n", "Er0 = 0.5-0.866j #zero sequence components of red phase(V)\n", "Er1 = 2+0j #positive sequence components of red phase(V)\n", "Er = 3+0j #phase R voltage(V)\n", "\n", "#Calculation:\n", "a = cmath.rect(1,120*math.pi/180)\n", "Er2 = Er-(Er0+Er1) #negative sequence voltage of red phase(V)\n", "Ey = Er0+a**2*Er1+a*Er2 #phase Y voltage(V)\n", "Eb = Er0+a*Er1+a**2*Er2 #phase B voltage(V)\n", "\n", "#Result:\n", "print \"The negative sequence component of red phase is\"\n", "print \"Ir2 = (\",round(abs(Er2)),round(rad2deg(angle(Er2))),\") V\"\n", "print \"\\nThe phase voltages are:\"\n", "print \"Iy = (\",round(abs(Ey)),round(rad2deg(angle(Ey))),\") V\"\n", "print \"Ib = (\",round(abs(Eb)),round(rad2deg(angle(Eb))),\") V\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The negative sequence component of red phase is\n", "Ir2 = ( 1.0 60.0 ) V\n", "\n", "The phase voltages are:\n", "Iy = ( 3.0 -120.0 ) V\n", "Ib = ( 0.0 120.0 ) V\n" ] } ], "prompt_number": 5 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 18.6, Page Number: 431" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "\n", "\n", "#Variable declaration:\n", "In = 12 #current from neutral to ground(A)\n", "\n", "\n", "\n", "#Calculation:\n", "I0 = In/3 #A\n", "\n", "\n", "#Result:\n", "print \"The zero phase sequence components in phases are\",I0,\"A each\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The zero phase sequence components in phases are 4.0 A each\n" ] } ], "prompt_number": 6 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 18.7, Page Number: 432" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "import cmath\n", "import math\n", "\n", "#Variable declaration:\n", "#(i) Before removal of fuses.\n", "Iri = cmath.rect(90,0) #phase R current(A)\n", "Iyi = cmath.rect(90,math.pi/180*240) #phase Y current(A)\n", "Ibi = cmath.rect(90,math.pi/180*120) #phase B current(A)\n", "\n", "#(ii) After removal of fuses.\n", "Irii = 90+0j #A\n", "Iyii = 0 #A\n", "Ibii = 0 #A\n", "\n", "\n", "#Calculation:\n", "a = cmath.rect(1,120*math.pi/180)\n", "#(i) Before removal of fuses.\n", "#Since the system is balanced, it will have only positive sequence currents.\n", "Ir1i = Iri #A\n", "Iy1i = Iyi #A\n", "Ib1i = Ibi #A\n", "\n", "\n", "\n", "#(ii) After removal of fuses.\n", "#The sequence currents in the three lines will be:\n", "Ir0ii = 1/3*(Irii+Iyii+Ibii) #A\n", "Iy0ii = Ir0ii #A\n", "Ib0ii = Ir0ii #A\n", "\n", "Ir1ii = 1/3*(Irii+Iyii+Ibii) #A\n", "Iy1ii = a**2*Ir1ii #A\n", "Ib1ii = a*Ir1ii #A\n", "\n", "Ir2ii = 1/3*(Irii+a**2*Iyii+a*Ibii) #A\n", "Iy2ii = a*Ir2ii #A\n", "Ib2ii = a**2*Ir2ii #A\n", "\n", "#Result:\n", "print \"(i) Before removal of fuses, the symmetrical components are:\"\n", "print \"\\tIr1 = (\",round(abs(Ir1i)),round(rad2deg(angle(Ir1i))),\") A\"\n", "print \"\\tIy1 = (\",round(abs(Iy1i)),360+round(rad2deg(angle(Iy1i))),\") A\"\n", "print \"\\tIb1 = (\",round(abs(Ib1i)),round(rad2deg(angle(Ib1i))),\") A\"\n", "print \"\\n(ii) After the removal of fuses, the symmetrical components are:\"\n", "print \"\\tIr0 = (\",round(abs(Ir0ii)),round(rad2deg(angle(Ir0ii))),\") A\"\n", "print \"\\tIr1 = (\",round(abs(Ir1ii)),round(rad2deg(angle(Ir1ii))),\") A\"\n", "print \"\\tIr2 = (\",round(abs(Ir2ii)),round(rad2deg(angle(Ir2ii))),\") A\"\n", "print \"\\n\\tIy0 = (\",round(abs(Iy0ii)),round(rad2deg(angle(Iy0ii))),\") A\"\n", "print \"\\tIy1 = (\",round(abs(Iy1ii)),360+round(rad2deg(angle(Iy1ii))),\") A\"\n", "print \"\\tIy2 = (\",round(abs(Iy2ii)),round(rad2deg(angle(Iy2ii))),\") A\"\n", "print \"\\n\\tIb0 = (\",round(abs(Ib0ii)),round(rad2deg(angle(Ib0ii))),\") A\"\n", "print \"\\tIb1 = (\",round(abs(Ib1ii)),round(rad2deg(angle(Ib1ii))),\") A\"\n", "print \"\\tIb2 = (\",round(abs(Ib2ii)),360+round(rad2deg(angle(Ib2ii))),\") A\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "(i) Before removal of fuses, the symmetrical components are:\n", "\tIr1 = ( 90.0 0.0 ) A\n", "\tIy1 = ( 90.0 240.0 ) A\n", "\tIb1 = ( 90.0 120.0 ) A\n", "\n", "(ii) After the removal of fuses, the symmetrical components are:\n", "\tIr0 = ( 30.0 0.0 ) A\n", "\tIr1 = ( 30.0 0.0 ) A\n", "\tIr2 = ( 30.0 0.0 ) A\n", "\n", "\tIy0 = ( 30.0 0.0 ) A\n", "\tIy1 = ( 30.0 240.0 ) A\n", "\tIy2 = ( 30.0 120.0 ) A\n", "\n", "\tIb0 = ( 30.0 0.0 ) A\n", "\tIb1 = ( 30.0 120.0 ) A\n", "\tIb2 = ( 30.0 240.0 ) A\n" ] } ], "prompt_number": 7 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 18.8, Page Number: 433" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "import cmath\n", "import math\n", "\n", "#Variable declaration:\n", "Ir1 = cmath.rect(200,0) #positive phase sequence component of current(A)\n", "Ir2 = cmath.rect(100,60*math.pi/180) #negative phase sequence component of current(A)\n", "In = cmath.rect(300,300*math.pi/180) #current in the neutral conductor(A)\n", "\n", "\n", "#Calculation:\n", "a = cmath.rect(1,120*math.pi/180)\n", "Ir0 = 1/3*In #Zero phase sequence current in R-line(A)\n", "Ir = Ir0+Ir1+Ir2 #Current in the R-line(A)\n", "Iy = Ir0+a**2*Ir1+a*Ir2 #Current in the Y-line(A)\n", "Ib = Ir0+a*Ir1+a**2*Ir2 #Current in the B-line(A)\n", "\n", "#Result:\n", "print \"Current in the R-line is\"\n", "print \"\\tIr = (\",round(abs(Ir)),round(rad2deg(angle(Ir))),\") A\"\n", "print \"Current in the Y-line is\"\n", "print \"\\tIy = (\",round(abs(Iy)),round(rad2deg(angle(Iy))),\") A\"\n", "print \"Current in the B-line is\"\n", "print \"\\tIb = (\",round(abs(Ib)),round(rad2deg(angle(Ib))),\") A\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Current in the R-line is\n", "\tIr = ( 300.0 0.0 ) A\n", "Current in the Y-line is\n", "\tIy = ( 300.0 -120.0 ) A\n", "Current in the B-line is\n", "\tIb = ( 0.0 180.0 ) A\n" ] } ], "prompt_number": 8 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 18.9, Page Number: 434" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "import cmath\n", "import math\n", "\n", "#Variable declaration:\n", "Ir = cmath.rect(10,0) #current in line R(A)\n", "Iy = cmath.rect(10,180*math.pi/180) #current in line Y(A)\n", "Ib = cmath.rect(0,0) #current in line B(A)\n", "\n", "\n", "#Calculation:\n", "a = cmath.rect(1,120*math.pi/180)\n", "#For R-line:\n", "Ir0 = 1/3*(Ir+Iy+Ib) #zero sequence component of Ir(A)\n", "Ir1 = 1/3*(Ir+a*Iy+a**2*Ib) #positive sequence component of Ir(A)\n", "Ir2 = 1/3*(Ir+a**2*Iy+a*Ib) #negative sequence component of Iy(A)\n", "\n", "#For Y-line:\n", "Iy0 = Ir0 #zero sequence component of Ir(A)\n", "Iy1 = a**2*Ir1 #positive sequence component of Ir(A)\n", "Iy2 = a*Ir2 #negative sequence component of Iy(A)\n", "\n", "#For B-line:\n", "Ib0 = Ir0 #zero sequence component of Ir(A)\n", "Ib1 = a*Ir1 #positive sequence component of Ir(A)\n", "Ib2 = a**2*Ir2 #negative sequence component of Iy(A)\n", "\n", "\n", "#Result:\n", "print \"The sequence components of R-line are:\"\n", "print \"\\tIr0 = (\",round(abs(Ir0),2),round(rad2deg(angle(Ir0))),\") A\"\n", "print \"\\tIr0 = (\",round(abs(Ir1),2),round(rad2deg(angle(Ir1))),\") A\"\n", "print \"\\tIr0 = (\",round(abs(Ir2),2),round(rad2deg(angle(Ir2))),\") A\"\n", "print \"The sequence components of Y-line are:\"\n", "print \"\\tIy0 = (\",round(abs(Iy0),2),round(rad2deg(angle(Iy0))),\") A\"\n", "print \"\\tIy1 = (\",round(abs(Iy1),2),round(rad2deg(angle(Iy1))),\") A\"\n", "print \"\\tIy2 = (\",round(abs(Iy2),2),round(rad2deg(angle(Iy2))),\") A\"\n", "print \"The sequence components of B-line are:\"\n", "print \"\\tIb0 = (\",round(abs(Ib0),2),round(rad2deg(angle(Ib0))),\") A\"\n", "print \"\\tIb1 = (\",round(abs(Ib1),2),round(rad2deg(angle(Ib1))),\") A\"\n", "print \"\\tIb2 = (\",round(abs(Ib2),2),round(rad2deg(angle(Ib2))),\") A\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The sequence components of R-line are:\n", "\tIr0 = ( 0.0 90.0 ) A\n", "\tIr0 = ( 5.77 -30.0 ) A\n", "\tIr0 = ( 5.77 30.0 ) A\n", "The sequence components of Y-line are:\n", "\tIy0 = ( 0.0 90.0 ) A\n", "\tIy1 = ( 5.77 -150.0 ) A\n", "\tIy2 = ( 5.77 150.0 ) A\n", "The sequence components of B-line are:\n", "\tIb0 = ( 0.0 90.0 ) A\n", "\tIb1 = ( 5.77 90.0 ) A\n", "\tIb2 = ( 5.77 -90.0 ) A\n" ] } ], "prompt_number": 9 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 18.10, Page Number: 435" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "import cmath\n", "import math\n", "\n", "#Variable declaration:\n", "Rrb = 10 #resistance of branch RB(ohm)\n", "Rry = 20 #resistance of branch RY(ohm)\n", "Rby = 5 #resistance of branch BY(ohm)\n", "Er = cmath.rect(-100,0) #voltage across BY(V)\n", "Ey = cmath.rect(100,60*math.pi/180) #voltage across BR(V)\n", "Eb = cmath.rect(100,-60*math.pi/180) #voltage across RY(V)\n", "\n", "#Calculation:\n", "a = cmath.rect(1,120*math.pi/180)\n", "IR = Er/Rby #Current in in branch BY(A)\n", "IY = Ey/Rrb #Current in in branch RB(A)\n", "IB = Eb/Rry #Current in in branch RY(A)\n", "\n", "#Sequence currents in resistors:\n", "IR0 = 1/3*(IR+IY+IB) #Zero sequence component of IR(A)\n", "IR1 = 1/3*(IR+a*IY+a**2*IB) #Positive sequence component of IR(A)\n", "IR2 = 1/3*(IR+a**2*IY+a*IB) #Negative sequence component of IR(A)\n", "\n", "IY0 = IR0 #Zero sequence component of IY(A)\n", "IY1 = a**2*IR1 #Positive sequence component of IY(A)\n", "IY2 = a*IR2 #Negative sequence component of IY(A)\n", "\n", "IB0 = IR0 #Zero sequence component of IB(A)\n", "IB1 = a*IR1 #Positive sequence component of IB(A)\n", "IB2 = a**2*IR2 #Negative sequence component of IB(A)\n", "\n", "#Sequence currents in supply lines:\n", "Ir = IB-IY #Line current in R-line(A)\n", "Iy = IR-IB #Line current in Y-line(A)\n", "Ib = IY-IR #Line current in R-line(A)\n", "\n", "Ir0 = 1/3*(Ir+Iy+Ib) #Zero sequence component of Ir(A)\n", "Ir1 = 1/3*(Ir+a*Iy+a**2*Ib) #Positive sequence component of Ir(A)\n", "Ir2 = 1/3*(Ir+a**2*Iy+a*Ib) #Negative sequence component of Ir(A)\n", "\n", "\n", "#Result:\n", "print \"The sequence components of R-line are:\"\n", "print \"\\tIR0 = (\",round(abs(IR0),2),round(rad2deg(angle(IR0)),1),\") A\"\n", "print \"\\tIR1 = (\",round(abs(IR1),2),round(rad2deg(angle(IR1))),\") A\"\n", "print \"\\tIR2 = (\",round(abs(IR2),2),round(rad2deg(angle(IR2)),1),\") A\"\n", "print \"\\nThe sequence components of Y-line are:\"\n", "print \"\\tIY0 = (\",round(abs(IY0),2),round(rad2deg(angle(IY0)),1),\") A\"\n", "print \"\\tIY1 = (\",round(abs(IY1),2),round(rad2deg(angle(IY1))),\") A\"\n", "print \"\\tIY2 = (\",round(abs(IY2),1),round(rad2deg(angle(IY2)),1),\") A\"\n", "print \"\\nThe sequence components of B-line are:\"\n", "print \"\\tIB0 = (\",round(abs(IB0),2),round(rad2deg(angle(IB0)),1),\") A\"\n", "print \"\\tIB1 = (\",round(abs(IB1),2),360+round(rad2deg(angle(IB1))),\") A\"\n", "print \"\\tIB2 = (\",round(abs(IB2),1),round(rad2deg(angle(IB2)),1),\") A\"\n", "print \"\\nThe Sequence currents in supply lines are:\"\n", "print \"\\tIr0 = (\",round(abs(Ir0),2),round(rad2deg(angle(Ir0))),\") A\"\n", "print \"\\tIr1 = (\",round(abs(Ir1),1),round(rad2deg(angle(Ir1))),\") A\"\n", "print \"\\tIr2 = (\",round(abs(Ir2),2),round(rad2deg(angle(Ir2)),1),\") A\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The sequence components of R-line are:\n", "\tIR0 = ( 4.41 160.9 ) A\n", "\tIR1 = ( 11.67 180.0 ) A\n", "\tIR2 = ( 4.41 -160.9 ) A\n", "\n", "The sequence components of Y-line are:\n", "\tIY0 = ( 4.41 160.9 ) A\n", "\tIY1 = ( 11.67 60.0 ) A\n", "\tIY2 = ( 4.4 -40.9 ) A\n", "\n", "The sequence components of B-line are:\n", "\tIB0 = ( 4.41 160.9 ) A\n", "\tIB1 = ( 11.67 300.0 ) A\n", "\tIB2 = ( 4.4 79.1 ) A\n", "\n", "The Sequence currents in supply lines are:\n", "\tIr0 = ( 0.0 0.0 ) A\n", "\tIr1 = ( 20.2 -90.0 ) A\n", "\tIr2 = ( 7.64 109.1 ) A\n" ] } ], "prompt_number": 10 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 18.11, Page Number: 437" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "import cmath\n", "import math\n", "\n", "#Variable declaration:\n", "I = 20 #current in each line(A)\n", "\n", "\n", "#Calculation:\n", "a = cmath.rect(1,120*math.pi/180)\n", "#Let R, Y and B be the supply lines. When fuse in the \n", "#line B is removed, the various line currents are :\n", "Ir = cmath.rect(I,0) #A\n", "Iy = cmath.rect(I,math.pi) #A\n", "Ib = cmath.rect(0,0) #A\n", "\n", "#For R-line:\n", "Ir0 = 1/3*(Ir+Iy+Ib) #zero sequence component of Ir(A)\n", "Ir1 = 1/3*(Ir+a*Iy+a**2*Ib) #positive sequence component of Ir(A)\n", "Ir2 = 1/3*(Ir+a**2*Iy+a*Ib) #negative sequence component of Iy(A)\n", "\n", "#For Y-line:\n", "Iy0 = Ir0 #zero sequence component of Ir(A)\n", "Iy1 = a**2*Ir1 #positive sequence component of Ir(A)\n", "Iy2 = a*Ir2 #negative sequence component of Iy(A)\n", "\n", "#For B-line:\n", "Ib0 = Ir0 #zero sequence component of Ir(A)\n", "Ib1 = a*Ir1 #positive sequence component of Ir(A)\n", "Ib2 = a**2*Ir2 #negative sequence component of Iy(A)\n", "\n", "\n", "#Result:\n", "print \"The sequence components of R-line are:\"\n", "print \"\\tIr0 = (\",round(abs(Ir0),2),round(rad2deg(angle(Ir0))),\") A\"\n", "print \"\\tIr0 = (\",round(abs(Ir1),2),round(rad2deg(angle(Ir1))),\") A\"\n", "print \"\\tIr0 = (\",round(abs(Ir2),2),round(rad2deg(angle(Ir2))),\") A\"\n", "print \"\\nThe sequence components of Y-line are:\"\n", "print \"\\tIy0 = (\",round(abs(Iy0),2),round(rad2deg(angle(Iy0))),\") A\"\n", "print \"\\tIy1 = (\",round(abs(Iy1),2),360+round(rad2deg(angle(Iy1))),\") A\"\n", "print \"\\tIy2 = (\",round(abs(Iy2),2),round(rad2deg(angle(Iy2))),\") A\"\n", "print \"\\nThe sequence components of B-line are:\"\n", "print \"\\tIb0 = (\",round(abs(Ib0),2),round(rad2deg(angle(Ib0))),\") A\"\n", "print \"\\tIb1 = (\",round(abs(Ib1),2),round(rad2deg(angle(Ib1))),\") A\"\n", "print \"\\tIb2 = (\",round(abs(Ib2),2),360+round(rad2deg(angle(Ib2))),\") A\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The sequence components of R-line are:\n", "\tIr0 = ( 0.0 90.0 ) A\n", "\tIr0 = ( 11.55 -30.0 ) A\n", "\tIr0 = ( 11.55 30.0 ) A\n", "\n", "The sequence components of Y-line are:\n", "\tIy0 = ( 0.0 90.0 ) A\n", "\tIy1 = ( 11.55 210.0 ) A\n", "\tIy2 = ( 11.55 150.0 ) A\n", "\n", "The sequence components of B-line are:\n", "\tIb0 = ( 0.0 90.0 ) A\n", "\tIb1 = ( 11.55 90.0 ) A\n", "\tIb2 = ( 11.55 270.0 ) A\n" ] } ], "prompt_number": 11 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 18.12, Page Number: 438" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "from pylab import *\n", "import cmath\n", "from sympy import *\n", "\n", "\n", "#Variable declaration:\n", "Zr = 5-10j #impedance connected to line R(ohm)\n", "Zy = 6+5j #impedance connected to line Y(ohm)\n", "Zb = 3+15j #impedance connected to line B(ohm)\n", "VRY = cmath.rect(3300,0) #line RY voltage(V)\n", "\n", "\n", "#Calculation:\n", "a = cmath.rect(1,120*math.pi/180)\n", "VYB = a**2*VRY #line YB voltage(V)\n", "\n", "#Let VR, VY, and VB be the voltages across impedances in R, Y and B\n", "#phases respectively and IR, IY, and IB the resulting line currents.\n", "IR, IY,IB,IR0,IR1,IR2, = symbols('IR IY IB IR0 IR1 IR2')\n", "\n", "#IR+IY+IB = 0\n", "IR0 = 0; IY0 = 0; IB0 = 0;\n", "VR = Zr*(IR0+IR1+IR2) #V\n", "VY = Zy*(a**2*IR1+a*IR2) #V\n", "VB = Zb*(a*IR1+a**2*IR2) #V\n", "#solving the equations:\n", "IR11 = solve(VR-VY-VRY,IR1)[0]\n", "VY = Zy*(a**2*IR11+a*IR2)\n", "VB = Zb*(a*IR11+a**2*IR2)\n", "IR22 = solve(VY-VB-VYB,IR2)[0]\n", "\n", "VR = Zr*(IR0+IR1+IR22)\n", "VY = Zy*(a**2*IR1+a*IR22)\n", "IR11 = solve(VR-VY-VRY,IR1)[0]\n", "IR = IR11+IR22 #A\n", "\n", "\n", "#Result:\n", "print \"The line current IR is (\",round(abs(IR)),round(-rad2deg(cmath.phase(IR)),1),\") A\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The line current IR is ( 241.0 -18.5 ) A\n" ] } ], "prompt_number": 12 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 18.13, Page Number: 440" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "import cmath\n", "import math\n", "\n", "#Variable declaration:\n", "R = 1 #resistance of each load(ohm)\n", "magVRY = 200 #line RY voltage(V)\n", "magVBR = 400 #line BR voltage(V)\n", "magVYB = 346 #line YB voltage(V)\n", "\n", "\n", "#Calculation:\n", "a = cmath.rect(1,120*math.pi/180)\n", "#This is a case of a balanced star-connected load supplied\n", "#from an unbalanced 3-phase supply.\n", "\n", "#Now,\n", "\n", "# (2)**22 = (1 + 1\u00b775 cos(theta))**2 + (1\u00b775 sin(theta))**2\n", "# theta = math.acos(4-1+3*1)/3.5\n", "theta = math.pi/2\n", "# alpha = math.acos(1+1.75*math.cos(theta))\n", "alpha = 60*math.pi/180\n", "\n", "#As the phase sequence is RYB, therefore, various line voltages are :\n", "VRY = cmath.rect(200,math.pi) #V\n", "VYB = cmath.rect(346,theta) #V\n", "VBR = cmath.rect(400,-alpha) #V\n", "\n", "#The current in any phase (or line) is equal to phase voltage \n", "#divided by resistance in that phase.\n", "IR = VRY/(1*3**0.5) #A\n", "IY = VYB/(1*3**0.5) #A\n", "IB = VBR/(1*3**0.5) #A\n", "\n", "#Sequence components in red phase are :\n", "IR0 = 1/3*(IR+IY+IB) #A\n", "IR1 = 1/3*(IR+a*IY+a**2*IB) #A\n", "IR2 = 1/3*(IR+a**2*IY+a*IB) #A\n", "\n", "\n", "#Result:\n", "print \"The magnitude of current in any phase is:\"\n", "print \"\\tIR0 = (\",round(abs(IR0)),round(rad2deg(angle(IR0))),\") A\"\n", "print \"\\tIR1 = (\",round(abs(IR1),1),round(rad2deg(angle(IR1))),\") A\"\n", "print \"\\tIR2 = (\",round(abs(IR2),2),round(rad2deg(angle(IR2))),\") A\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The magnitude of current in any phase is:\n", "\tIR0 = ( 0.0 -90.0 ) A\n", "\tIR1 = ( 176.3 -169.0 ) A\n", "\tIR2 = ( 66.63 30.0 ) A\n" ] } ], "prompt_number": 13 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 18.14, Page Number: 449" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "\n", "\n", "#Variable declaration:\n", "MVAg = 10 #MVA rating of generator\n", "Vg = 11 #voltage rating of generator(kV)\n", "Zg1 = 1.2j #Positive sequence impedance of generator(ohm)\n", "Zg2 = 0.9j #Negative sequence impedance of generator(ohm)\n", "Zg0 = 0.4j #Zero sequence impedance of generator(ohm)\n", "Zf1 = 1.0j #Positive sequence impedance of feeder(ohm)\n", "Zf2 = 1.0j #Negative sequence impedance of feeder(ohm)\n", "Zf0 = 3.0j #Zero sequence impedance of feeder(ohm)\n", "\n", "\n", "\n", "#Calculation:\n", "#Suppose the fault is occured on the red phase. \n", "#Taking red phase as the reference,\n", "ER = Vg*1000/3**0.5 #Phase e.m.f. of R-phase(V)\n", "\n", "#(i)The total impedance to any sequence current is given by\n", "#the sum of generator and feeder impedances to that sequence current.\n", "Z1 = Zg1+Zf1 #ohm\n", "Z2 = Zg2+Zf2 #ohm\n", "Z0 = Zg0+Zf0 #ohm\n", "\n", "#For a line-to-ground fault,\n", "#I1 = I2 = I0\n", "I0 = ER/(Z1+Z2+Z0) #A\n", "IR = 3*I0 #fault current(A)\n", "\n", "#(ii)Line-to-neutral voltage of R-phase,\n", "VR = ER-I0*(Zg1+Zg2+Zg0) #V\n", "\n", "#Result:\n", "print \"(i) The magnitude of fault current is\",round(IR.imag)*1j,\"A\"\n", "print \"(ii) Line to neutral voltage at the generator terminal is\",round(abs(VR)),\"V\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "(i) The magnitude of fault current is (-0-2540j) A\n", "(ii) Line to neutral voltage at the generator terminal is 4234.0 V\n" ] } ], "prompt_number": 14 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 18.15, Page Number: 450" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "\n", "\n", "#Variable declaration:\n", "Vg = 11000 #voltage rating of the alternator(V)\n", "MVAg = 10 #MVA rating of generator\n", "X0 = 0.05 #zero sequence reactance(p.u)\n", "X1 = 0.15 #positive sequence reactance(p.u)\n", "X2 = 0.15 #negative sequence reactance(p.u)\n", "\n", "#Calculation:\n", "#Taking red phase as the reference, let its phase e.m.f. be\n", "ER = 1 #p.u\n", "\n", "#Line-to-ground fault: \n", "#Suppose the fault occurs on the red phase.\n", "#I1 = I2 = I0\n", "I0 = ER/(1j*(X0+X1+X2))\n", "IR = 3*I0 #fault current(A)\n", "\n", "#Three phase fault: \n", "#the fault current (say Ish) is limited by the positive sequence reactance only.\n", "Ish = ER/(1j*X1) #fault current(A)\n", "r = IR/Ish #ratio of the two fault currents\n", "\n", "\n", "#Result:\n", "print \"The ratio of two fault currents is\",round(abs(r),3)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The ratio of two fault currents is 1.286\n" ] } ], "prompt_number": 15 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 18.16, Page Number: 450" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "\n", "#Variable declaration:\n", "Vg = 11 #voltage rating of the alternator(kV)\n", "MVAg = 25 #MVA rating of generator\n", "X0 = 0.05 #zero sequence reactance(p.u)\n", "X1 = 0.2 #positive sequence reactance(p.u)\n", "X2 = 0.2 #negative sequence reactance(p.u)\n", "Xn = 0.3 #neutral to ground reactance(ohm)\n", "\n", "\n", "#Calculation:\n", "#Assume that the fault occurs on the red phase.\n", "#Taking red phase as the reference, let its phase e.m.f. be \n", "ER = 1 #p.u.\n", "#First of all, convert the reactance Xn into p.u.\n", "Xnp = Xn*MVAg*1000/(Vg**2*1000) #p.u\n", "#For a line-to-ground fault,\n", "#I1 = I2 = I0\n", "I0 = ER/(X1+X2+X0+3*Xnp) #p.u\n", "IR = 3*I0 #fault current(p.u)\n", "IRa = MVAg*10**6/(3**0.5*Vg*1000) * IR #fault current in amperes\n", "\n", "\n", "\n", "#Result:\n", "print \" The fault current for a single line to ground fault is\",round(IRa),\"A\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " The fault current for a single line to ground fault is 6190.0 A\n" ] } ], "prompt_number": 16 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 18.17, Page Number: 451" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "\n", "#Variable declaration:\n", "V = 10.4 #voltage between the lines(kV)\n", "X0 = 0.2j #zero sequence reactance(p.u)\n", "X1 = 0.6j #positive sequence reactance(p.u)\n", "X2 = 0.5j #negative sequence reactance(p.u)\n", "\n", "\n", "#Calculation:\n", "#Taking red phase as the reference, its phase e.m.f. is :\n", "ER = round(V*1000/3**0.5) #Phase e.m.f. of R-phase(V)\n", "IF = 3**0.5*ER/(X1+X2) #fault current(A)\n", "\n", "\n", "#Result:\n", "print \"The fault current is\",round(abs(IF),1),\"A\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The fault current is 9453.8 A\n" ] } ], "prompt_number": 17 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 18.18, Page Number: 451" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "\n", "#Variable declaration:\n", "X0 = 0.05j #zero sequence reactance(p.u)\n", "X1 = 0.08j #positive sequence reactance(p.u)\n", "X2 = 0.07j #negative sequence reactance(p.u)\n", "\n", "\n", "\n", "#Calculation:\n", "#Taking red phase as the reference, let its phase e.m.f. be \n", "ER = 1 #p.u\n", "#For a double line-to-ground fault,\n", "#IF = IY+IB\n", "IF = -3*X2*ER/(X1*X2+X2*X0+X2*X0) #fault current(A)\n", "\n", "\n", "#Result:\n", "print \"The fault current is\",round(IF.imag,1)*1j,\"p.u\"\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The fault current is 16.7j p.u\n" ] } ], "prompt_number": 18 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 18.19, Page Number: 452" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "\n", "#Variable declaration:\n", "MVAg = 20 #MVA rating of generator\n", "V = 11 #voltage rating of generator(V)\n", "X1 = 20 #positive sequence reactance of generator(%)\n", "X2 = 10 #negative sequence reactance of generator(%)\n", "X0 = 15 #zero sequence reactance of generator(%)\n", "Xn = 5 #generator 1 neutral reactance(%)\n", "\n", "#Calculation:\n", "ER = V*1000/3**0.5 #V\n", "#The % reactances in Fig. 18.19b can be converted into ohmic values as under:\n", "x1 = X1*V**2*10/(MVAg*1000) #ohm\n", "x2 = X2*V**2*10/(MVAg*1000) #ohm\n", "x0 = X0*V**2*10/(MVAg*1000) #ohm\n", "IR = 3*ER/(x1+x2+x0)*(-1j) #ohm\n", "\n", "\n", "#Result:\n", "print \"Fault current is\",round(IR.imag)*1j,\"A\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Fault current is (-0-6998j) A\n" ] } ], "prompt_number": 19 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 18.20, Page Number: 453" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "from sympy import *\n", "\n", "\n", "#Variable declaration:\n", "IF1 = 2000 #3 phase fault current(A)\n", "IF2 = 2600 #line-to-line fault(A)\n", "IF0 = 4200 #line-toground fault(A)\n", "MVAg = 50 #MVA rating of the generator\n", "V = 11 #voltage rating of the generator(V)\n", "\n", "#Calculation:\n", "#Let X1 = positive sequence reactance,\n", "# X2 = negative sequence reactance,and\n", "# X0 = zero sequence reactance of the alternator.\n", "X1,X2,X0 = symbols('X1 X2 X0')\n", "Eph = V*1000/3**0.5 #phase voltage(V)\n", "X11 = solve(Eph/X1-IF1)[0] #positive sequence reactance(ohm)\n", "X22 = solve(3**0.5*Eph/(X11+X2)-IF2,X2)[0] #negative sequence reactance(ohm)\n", "X00 = solve(3*Eph/(X11+X22+X0)-IF0)[0] #zero sequence reactance(ohm)\n", "\n", "\n", "#Result:\n", "print \"The positive sequence reactance is\",round(X11,3),\"ohm\"\n", "print \"The negative sequence reactance is\",round(X22,3),\"ohm\"\n", "print \"The zero sequence reactance is\",round(X00,3),\"ohm\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The positive sequence reactance is 3.175 ohm\n", "The negative sequence reactance is 1.055 ohm\n", "The zero sequence reactance is 0.306 ohm\n" ] } ], "prompt_number": 20 } ], "metadata": {} } ] }