{ "metadata": { "name": "", "signature": "sha256:753590086967c8fe303e9fb46c959fc704437382516c05f043082b94c3ead7f2" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 6 : Design Considerations of Secondary Systems" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 6.1 Page No : 296" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math \n", "from sympy import Symbol,solve\n", "from scipy.misc import derivative\n", "\n", "# Variables\n", "NC = 24.; #Number Of Customers Per Block\n", "\n", "#We get the Total Annual Cost from the releveant equations as\n", "# TAC = 239.32 + (3.1805*ST) + (3492/ST) + (28170/ST**2) + (0.405*ASL) + (17018/ASL) + (1.134*ASD) + (8273/ASD)\n", "\n", "#We know split the above equation into 3 different parts according to factors ST,ASD,ASL\n", "\n", "#Variable Values of the Factors\n", "ST = Symbol('ST');\n", "ASD = Symbol('ASD');\n", "ASL = Symbol('ASL');\n", "\n", "#Functions to Find the TAC corresponding to the Respective Factors\n", "\n", "def TransSize(y): \n", " return 239.52 + (3.1805*y) + (3492./y) + (28170./(y**2))\n", "def SDwire(y): \n", " return (1.134*y)+(8273./y)\n", "def SLwire(y): \n", " return (0.405*y)+(17018./y)\n", "\n", "#Total Annual Costs of the respective Factors\n", "TACST = TransSize(ST);\n", "TACASD = SDwire(ASD);\n", "TACASL = SLwire(ASL);\n", "\n", "#Partially Differentiating wrt ASD we get\n", "#Y1 = derivative(TACASD);\n", "#X1 = roots(Y1[1]);\n", "X1 = [-85.413198,85.413198]\n", "ASD = X1[0]; #Calculated Value\n", "ASDstd = 105.500;\n", "ASDstd1 = 133.1;\n", "\n", "#Partially Differentiating wrt ASL we get\n", "#Y2 = derivative(TACASL);\n", "#X2 = solve(Y2[1]);\n", "X2 = [-204.9872,204.9872 ]\n", " \n", "ASL = X2[0]; #Calculated Value\n", "ASLstd = 211.600; \n", "ASLstd1 = 250.;\n", "\n", "#Partially Differentiating wrt ST we get\n", "#Y3 = derivative(TACST);\n", "#X3 = solve(Y3[1]);\n", "X3 = [39.346541,-19.673271 + 7.9480914j, -19.673271 - 7.9480914j, 0 ]\n", "ST = round(X3[0]); #Calculated Value\n", "STstd = 50.;\n", "\n", "#Total Annual Cost of the Calculated parameters\n", "TAC = TransSize(ST)+SDwire(ASD)+SLwire(ASL);\n", "#Calculation Mistake in The Text Book\n", "\n", "#Total Annual Cost of the First Higher standard Parameters\n", "TACstd = TransSize(STstd)+SDwire(ASDstd)+SLwire(ASLstd);\n", "#Total Annual Cost of the Second Higher standard Parameters\n", "TACstd1 = TransSize(STstd)+SDwire(ASDstd1)+SLwire(ASLstd1);\n", "\n", "#Total Fixed Charges per Year\n", "TACFC = ((75+(2.178*STstd))+(5.4+(0.405*ASLstd))+(15.12+(1.134*ASD))+(144));\n", "#Total Operating Charges per Year\n", "TACOC = ((0.0225*STstd)+(0.98*STstd)+(28170/(STstd**2))+(3492/STstd)+(17018/ASLstd)+(8273/ASDstd));\n", "\n", "#Values Might Vary from those in the text due to high precision\n", "\n", "#Fixed Charges Per Customer Per Month\n", "FC = TACFC/(NC*12);\n", "\n", "#Variable Costs Per Customer per month\n", "VOC = TACOC/(NC*12);\n", "\n", "# Results\n", "print 'a) The Most Economical SD Size is %g kmil and the nearest larger standard AWG wire size is %g kmil'%(ASD,ASDstd)\n", "print 'b) The Most Economical SL Size is %g kmil and the nearest larger standard AWG wire size is %g kmil'%(ASL,ASLstd)\n", "print 'c) The Most Economical Distribution Transformer Size is %g kmil and the nearest larger standard transformer\\\n", " size is %g kVA'%(ST,STstd)\n", "print 'd) The Total Annual Cost Per Block for the theoretically most economical sizes of equipment is %g dollars'%(TAC)\n", "print 'e) The Total Annual Cost Per Block for the nearest larger standard comercial sizes of equipment is %g dollars'%(TACstd)\n", "print 'f) The Total Annual Cost Per Block for the nearest larger transformer size and for\\\n", " the second larger sizes of ASD and ASL is %g dollars'%(TACstd1)\n", "print 'g) Fixed Charges per Customer per Month is %g dollars'%(FC)\n", "print 'h) The Variable Operating Costs Per Customer Per Month is %g dollars'%(VOC)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "a) The Most Economical SD Size is -85.4132 kmil and the nearest larger standard AWG wire size is 105.5 kmil\n", "b) The Most Economical SL Size is -204.987 kmil and the nearest larger standard AWG wire size is 211.6 kmil\n", "c) The Most Economical Distribution Transformer Size is 39 kmil and the nearest larger standard transformer size is 50 kVA\n", "d) The Total Annual Cost Per Block for the theoretically most economical sizes of equipment is 111.862 dollars\n", "e) The Total Annual Cost Per Block for the nearest larger standard comercial sizes of equipment is 843.83 dollars\n", "f) The Total Annual Cost Per Block for the nearest larger transformer size and for the second larger sizes of ASD and ASL is 862.067 dollars\n", "g) Fixed Charges per Customer per Month is 1.17104 dollars\n", "h) The Variable Operating Costs Per Customer Per Month is 1.00721 dollars\n" ] } ], "prompt_number": 4 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 6.2 Page No : 304" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math \n", "from numpy import matrix,multiply\n", "#To determine the co-effcient matrix for a unbalanced load\n", "#Page 304\n", "\n", "# Variables\n", "Dab = 12.;\n", "Dan = 12.;\n", "Dbn = 24.;\n", "Daa = 12*0.01577;\n", "Dbb = Daa;\n", "Dnn = Daa;\n", "\n", "# Calculations\n", "def Coeff(y,z):\n", " return (2*(10**-7))*math.log(y/z) #function to find the elements of the co-efficient matrix\n", "\n", "#Part A of the question cannot be found using Scilab, Hence from the equation obtained in part A we can numerically compute the Co- Efficient Matrix\n", "\n", "CM = matrix([[Coeff(Dan,Daa),Coeff(Dan,Dab)],[Coeff(Dbn,Dab),Coeff(Dbn,Dbb)],[Coeff(Dnn,Dan),Coeff(Dnn,Dbn)]]);\n", "\n", "# Results\n", "print ' Part A cannot be resulted by this code%( hence from the equations obtained in Part A Co-Efficient Matrix is Obtained as'\n", "print (multiply(CM,(10**7)))\n", "print ' * 10**-7 Wb*T/m'\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " Part A cannot be resulted by this code%( hence from the equations obtained in Part A Co-Efficient Matrix is Obtained as\n", "[[ 8.29929176 0. ]\n", " [ 1.38629436 9.68558612]\n", " [-8.29929176 -9.68558612]]\n", " * 10**-7 Wb*T/m\n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 6.4 Page No : 308" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math \n", "from numpy import matrix\n", "from numpy.linalg import inv\n", "\n", "# Variables\n", "#Primary Voltage\n", "V1 = 7272*(1j*math.pi*0/180);\n", "\n", "#Secondary Voltages\n", "Ea = 120*(1j*math.pi*0/180);\n", "Eb = 120*(1j*math.pi*0/180);\n", "\n", "#Impedances\n", "Za = 0.8+(1j*0.6);\n", "Zb = 0.8+(1j*0.6);\n", "\n", "n = 60; #Turns Ratio\n", "\n", "# Calculations\n", "def angle(y): \n", " return math.degrees(math.atan(y.imag/y.real))\n", "\n", "#Substituting the values we get the following equations\n", "#121.2 = Ia*(0.8857 + j0.6846) + Ib*(0.03279 + j0.03899)\n", "#121.2 = Ia*(-0.03279 - j0.03899) + Ib*(-0.88574 + j0.50267)\n", "\n", "#For Convenience We segregate them as\n", "Z1 = (0.8857+(1j*0.6846));\n", "Z2 = (0.03279+(1j*.03899))\n", "Z3 = (-0.03279-(1j*.03899))\n", "Z4 = (-0.88574+(1j*.50267))\n", "\n", "Z = matrix([[Z1,Z2],[Z3,Z4]]); #Impedance matrix\n", "V = matrix([[121.2],[121.2]]); #Voltage Matrix\n", "I = inv(Z)*V; #Current Matrix\n", "\n", "#Secondary Currents\n", "Ia = I[0];\n", "Ib = I[1];\n", "\n", "In = -Ia-Ib; #Secondary neutral Currents\n", "\n", "#Secondary Voltages\n", "Va = Za*Ia;\n", "Vb = -1*Zb*Ib;\n", "\n", "#Secondary Voltage Resulmath.tant\n", "Vab = Va+Vb;\n", "\n", "# Results\n", "print 'a The Secondary Currents are:'\n", "print 'Ia = %g/_%g A'%(abs(Ia),angle(Ia))\n", "print 'Ib = %g/_%g A'%(abs(Ib),180+angle(Ib))\n", "print 'b) The Secondary Neutral Current = %g/_%g A'%(abs(In),angle(In))\n", "print 'c The Secondary Voltages are:'\n", "print 'Va = %g/_%g V'%(abs(Va),angle(Va))\n", "print 'Vb = %g/_%g V'%(abs(Vb),angle(Vb))\n", "print 'd) The Resulmath.tant Secondary Voltage Vab is %g/_%g V'%(abs(Vab),angle(Vab))\n", "\n", "#In the TextBook Note That Zb has been taken wrong in the calculattion of Vb\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "a The Secondary Currents are:\n", "Ia = 109.376/_-34.7812 A\n", "Ib = 124.295/_210.235 A\n", "b) The Secondary Neutral Current = 126.208/_82.0057 A\n", "c The Secondary Voltages are:\n", "Va = 109.376/_2.08869 V\n", "Vb = 124.295/_67.1048 V\n", "d) The Resulmath.tant Secondary Voltage Vab is 197.222/_36.9266 V\n" ] } ], "prompt_number": 4 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 6.5 Page No : 310" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math \n", "\n", "# Variables\n", "N = 19.; #Number Transformers\n", "St = 500.; #Load on each transformer in kVA\n", "L = 5096+(1j*3158); #Load\n", "Vlf = 114.; #Favourable Voltage\n", "Vlt = 111.; #Tolerable Volatage\n", "Vb = 125.; #Base Voltage\n", "\n", "# Calculations\n", "#Per Unit Tolerable and favourable voltages\n", "puVlf = Vlf/Vb;\n", "puVlt = Vlt/Vb;\n", "\n", "ZM = 0.181+(1j*0.115); #The Positive Sequence Impedance\n", "ZTi = 0.0086+(1j*0.0492); #Transformer Impedance for 500kVA\n", "ZT = 2*ZTi; #Transformer Impedance for 1000kVA\n", "\n", "AAF = N*St/abs(L); #Actual Application Factor\n", "\n", "# Results\n", "print 'a) The Lowest favourable Voltage is %g pu and The Lowest tolerable voltage is %g pu'%(puVlf,puVlt)\n", "print 'b) There Are No buses in Table 6-5%( for the first contingency outage which satisfy the necessary condition'\n", "print 'c For Second Contingency Outage'\n", "print '1) Less than Favourable Voltage are B,C,J,K,R and S'\n", "print '2) Less than Tolerable Voltage are B,C,J,K.'\n", "print 'd) ZM/ZT = %g and 1/2)*ZM/ZT = %g respectively.'%(abs(ZM)/abs(ZT),((1./2)*abs(ZM)/abs(ZT)))\n", "print 'The Actual Application Factor is %g'%(AAF)\n", "print 'Therefore the Design of this network is sufficient'\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "a) The Lowest favourable Voltage is 0.912 pu and The Lowest tolerable voltage is 0.888 pu\n", "b) There Are No buses in Table 6-5%( for the first contingency outage which satisfy the necessary condition\n", "c For Second Contingency Outage\n", "1) Less than Favourable Voltage are B,C,J,K,R and S\n", "2) Less than Tolerable Voltage are B,C,J,K.\n", "d) ZM/ZT = 2.14675 and 1/2)*ZM/ZT = 1.07338 respectively.\n", "The Actual Application Factor is 1.58461\n", "Therefore the Design of this network is sufficient\n" ] } ], "prompt_number": 5 } ], "metadata": {} } ] }