diff options
Diffstat (limited to 'Electric_Power_Distribution_System_Engineering_by_T._Gonen/ch11.ipynb')
-rwxr-xr-x | Electric_Power_Distribution_System_Engineering_by_T._Gonen/ch11.ipynb | 606 |
1 files changed, 606 insertions, 0 deletions
diff --git a/Electric_Power_Distribution_System_Engineering_by_T._Gonen/ch11.ipynb b/Electric_Power_Distribution_System_Engineering_by_T._Gonen/ch11.ipynb new file mode 100755 index 00000000..3fce23ef --- /dev/null +++ b/Electric_Power_Distribution_System_Engineering_by_T._Gonen/ch11.ipynb @@ -0,0 +1,606 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:12638b4b6feef6ce42affa16d2293ad388bb21932c76952667badfebd6be692b" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 11 : Distribution System Reliability" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.1 Page No : 598" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "Rsys = 0.99 #Minimum Acceptable System Reliabilty\n", + "n = 15.; #Number of identical Components\n", + "\n", + "# Calculations\n", + "q = (1-Rsys)/n; #Probability of component failure\n", + "Ri = 1-q; #Approximate value of the component reliability\n", + "\n", + "# Results\n", + "print 'The Approximate Value of The component reliability is %g'%(Ri)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Approximate Value of The component reliability is 0.999333\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.2 Page No : 606" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Variables\n", + "L = 4.; #Total Length of the cable\n", + "Lov = 3.; #Length of Overhead Cable\n", + "Lu = L-Lov; #Length of Underground Cable\n", + "Nct = 2.; #Number of circuit terminations\n", + "T = 10.; #No of years for which the record is shown\n", + "\n", + "Fov = 2.; # Faults Per Mile of the Over Head Cable\n", + "Fu = 1.; #Faults Per Mile of The Underground cable\n", + "\n", + "Ct = 0.3/100 # Cable Termination Fault Rate\n", + "\n", + "#Repair Time\n", + "Tov = 3.; #Over Head\n", + "Tu = 28.; #Underground\n", + "Tct = 3.; #Cable Termination\n", + "\n", + "# Calculations\n", + "lamdaFDR = (Lov*Fov/T)+(Lu*Fu/T)+(2*Ct); #Total Annual Fault Rate\n", + "rFDR = ((Tov*Lov*Fov/T)+(Tu*Lu*Fu/T)+(2*Ct*Tct))/lamdaFDR; #Annual Fault Restoration Time\n", + "mFDR = 8760-rFDR; #Annual Mean Time of Failure\n", + "UFDR = rFDR*100/(rFDR+mFDR); #Unavailability of Feeder\n", + "AFDR = 100-UFDR; #Availability of Feeder\n", + "\n", + "# Results\n", + "print 'a) The Total Annual Fault Rate is %g faults per year'%(lamdaFDR)\n", + "print 'b) The Annual Fault Restoration Time is %g hours per fault per year'%(rFDR)\n", + "print 'c) Unavailability of the feeder is %g percent'%(UFDR)\n", + "print 'd) Availability of the feeder is %g percent'%(AFDR)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) The Total Annual Fault Rate is 0.706 faults per year\n", + "b) The Annual Fault Restoration Time is 6.54108 hours per fault per year\n", + "c) Unavailability of the feeder is 0.0746698 percent\n", + "d) Availability of the feeder is 99.9253 percent\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.3 Page No : 608" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "#Annual average Fault rates\n", + "Fm = 0.08;\n", + "Fl = 0.2;\n", + "\n", + "\n", + "#Average Repair Times\n", + "Rm = 3.5; #Main\n", + "Rl = 1.5; #Lateral\n", + "Rs = 0.75; #Manual Sections\n", + "\n", + "# Dismath.tances of the Lateral Feeders of A,B, and C respectively\n", + "Lla = 2.;\n", + "Llb = 1.5;\n", + "Llc = 1.5;\n", + "\n", + "# Dismath.tances of the Main Feeders of A,B, and C respectively\n", + "Lma = 1.;\n", + "Lmb = 1.;\n", + "Lmc = 1.;\n", + "\n", + "# Calculations\n", + "TFm = (Lma*Fm)+(Lmc*Fm)+(Lmb*Fm); #Annual Fault of the Main Sections\n", + "\n", + "def SusInt(y): \n", + " return TFm+(Fl*y)\n", + "\n", + "#Sustained Interruption Rates for A,B and C\n", + "IrA = SusInt(Lla);\n", + "IrB = SusInt(Llb);\n", + "IrC = SusInt(Llc);\n", + "\n", + "#Annual Repair time for A,B and C\n", + "rA = ((Lma*Fm*Rm)+(Lmb*Fm*Rs)+(Lmc*Fm*Rs)+(Lla*Fl*Rl))/IrA;\n", + "rB = ((Lma*Fm*Rm)+(Lmb*Fm*Rm)+(Lmc*Fm*Rs)+(Llb*Fl*Rl))/IrB;\n", + "rC = ((Lma*Fm*Rm)+(Lmb*Fm*Rm)+(Lmc*Fm*Rm)+(Llc*Fl*Rl))/IrC;\n", + "\n", + "# Results\n", + "print 'i The Annual Sustained Interruption Rates for:'\n", + "print 'Customer A : %g faults per year'%(IrA)\n", + "print 'Customer B : %g faults per year'%(IrB)\n", + "print 'Customer C : %g faults per year'%(IrC)\n", + "print 'ii The Average Annual Repair Time Restoration Time for:'\n", + "print 'Customer A : %g hours per fault per year'%(rA)\n", + "print 'Customer A : %g hours per fault per year'%(rB)\n", + "print 'Customer A : %g hours per fault per year'%(rC)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i The Annual Sustained Interruption Rates for:\n", + "Customer A : 0.64 faults per year\n", + "Customer B : 0.54 faults per year\n", + "Customer C : 0.54 faults per year\n", + "ii The Average Annual Repair Time Restoration Time for:\n", + "Customer A : 1.5625 hours per fault per year\n", + "Customer A : 1.98148 hours per fault per year\n", + "Customer A : 2.38889 hours per fault per year\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.4 Page No : 612" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "# Variables\n", + "Ri = 0.85;\n", + "\n", + "def relp(y,z):\n", + " return 1-((1-(Ri**y))**z) #Equal Parallel Combination\n", + "\n", + "def rels(y,z):\n", + " return (1-((1-Ri)**y))**z #Equal Series Combination\n", + "\n", + "# Calculations\n", + "#Case 1: 4 elements in series\n", + "\n", + "Req1 = rels(1,4);\n", + "\n", + "#Case 2: Two Comination of 4 elements in series, parallel to each other\n", + "\n", + "Req2 = relp(4,2);\n", + "\n", + "#Case 3 : ((two elements in series) #(two elements in series))in series with ((two elements in series) #(two elements in series))\n", + "\n", + "#Two Segments\n", + "R1 = relp(2,2);\n", + "R2 = relp(2,2);\n", + "Req3 = R1*R2;\n", + "\n", + "#Case 4 : (two elements in parallel)in series with ((three elements in series) #(three elements in series))\n", + "\n", + "#Two Segments\n", + "R1 = relp(1,2);\n", + "R2 = relp(3,2);\n", + "Req4 = R1*R2;\n", + "\n", + "#Case 5, 4 groups of (2 elements in parallel) connected in series to each other\n", + "Req5 = rels(2,4);\n", + "\n", + "# Results\n", + "print 'The Equivalent System reliability for:'\n", + "print 'a) Configuration A : %g'%(Req1)\n", + "print 'b) Configuration B : %g'%(Req2)\n", + "print 'c) Configuration C : %g'%(Req3)\n", + "print 'd) Configuration D : %g'%(Req4)\n", + "print 'e) Configuration E : %g'%(Req5)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Equivalent System reliability for:\n", + "a) Configuration A : 0.522006\n", + "b) Configuration B : 0.771522\n", + "c) Configuration C : 0.851917\n", + "d) Configuration D : 0.831951\n", + "e) Configuration E : 0.912992\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.5 Page No : 614" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#To Design the system to meet the given Equivalent System Reliability\n", + "#Page 614\n", + "\n", + "# Variables\n", + "#Individual System Reliabilities\n", + "Ra = 0.8;\n", + "Rb = 0.95;\n", + "Rc = 0.99;\n", + "Rd = 0.90;\n", + "Re = 0.65;\n", + "\n", + "# Calculations\n", + "#When All Are Connected in Series\n", + "\n", + "Req = Ra*Rb*Rc*Rd*Re; #Equivalent System Reliability\n", + "\n", + "Rr = 0.8; #Required\n", + "\n", + "Rae = Rr/(Rb*Rc*Rd);\n", + "\n", + "#Since Connecting the elements in parallel will increase their reliability\n", + "def rel(Ri,y,):\n", + " return (1-((1-Ri)**y)) #Equal Only Parallel Combination\n", + "\n", + "#Since Connecting the elements in parallel will increase their reliability\n", + "#Conditions to Find The Number of Elements to be used\n", + "for i in range(1,11):\n", + " L = i; #Number of Time Element A is used\n", + " R1 = rel(Ra,i);\n", + " X = R1-Rae;\n", + " if(abs(X)+X == 0):\n", + " continue;\n", + " else:\n", + " break;\n", + "\n", + "for i in range(1,11):\n", + " M = i; #Number of Time Element E is used\n", + " R2 = rel(Re,i);\n", + " X = R2-Rae;\n", + " if(abs(X)+X == 0):\n", + " continue;\n", + " else:\n", + " break;\n", + "\n", + "print 'a) The Equivalent system Reliability is %g'%(Req)\n", + "print 'b) One Each of B,C and D all connected in series are connected in serieswith the series combination of XComination of\\\n", + " %g elements of A, \\nAll Connected in Parallel)and YComination of %g elements of E, \\nAll Connected in Parallel) to\\\n", + " achieve %g Equivalent System Realibility'%(L,M,Rr)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) The Equivalent system Reliability is 0.440154\n", + "b) One Each of B,C and D all connected in series are connected in serieswith the series combination of XComination of 2 elements of A, \n", + "All Connected in Parallel)and YComination of 3 elements of E, \n", + "All Connected in Parallel) to achieve 0.8 Equivalent System Realibility\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.6 Page No : 614" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#To Find The Probability on the reliability of transformers\n", + "#Page 614\n", + "\n", + "# Variables\n", + "#Reliabilities of The Three Transformers\n", + "Pa = 0.9;\n", + "Pb = 0.95;\n", + "Pc = 0.99;\n", + "\n", + "#Faliures of Three Transformers\n", + "Qa = 1-Pa;\n", + "Qb = 1-Pb;\n", + "Qc = 1-Pc;\n", + "\n", + "# Calculations\n", + "#Probability of NO Transformer Failing\n", + "Pnf = Pa*Pb*Pc;\n", + "\n", + "PfA = Qa*Pb*Pc #Probability of Transformer A Failing\n", + "PfB = Pa*Qb*Pc #Probability of Transformer B Failing\n", + "PfC = Pa*Pb*Qc #Probability of Transformer C Failing\n", + "\n", + "PfAB = Qa*Qb*Pc #Probability of Transformer A and B Failing\n", + "PfBC = Pa*Qb*Qc #Probability of Transformer B and C Failing\n", + "PfCA = Qa*Pb*Qc #Probability of Transformer C and A Failing\n", + "\n", + "Pf = Qa*Qb*Qc; #Probability of All Transformers failing\n", + "\n", + "# Results\n", + "print 'a) Probability of No Transformer Failing is %g'%(Pnf)\n", + "print 'b'\n", + "print 'Probability of Transformer A Failing is %g'%(PfA)\n", + "print 'Probability of Transformer B Failing is %g'%(PfB)\n", + "print 'Probability of Transformer C Failing is %g'%(PfC)\n", + "print 'c'\n", + "print 'Probability of Transformers A and B Failing is %g'%(PfAB)\n", + "print 'Probability of Transformers B and C Failing is %g'%(PfBC)\n", + "print 'Probability of Transformers C and A Failing is %g'%(PfCA)\n", + "print 'd) Probability of All Three Transformers Failing is %g'%(Pf)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) Probability of No Transformer Failing is 0.84645\n", + "b\n", + "Probability of Transformer A Failing is 0.09405\n", + "Probability of Transformer B Failing is 0.04455\n", + "Probability of Transformer C Failing is 0.00855\n", + "c\n", + "Probability of Transformers A and B Failing is 0.00495\n", + "Probability of Transformers B and C Failing is 0.00045\n", + "Probability of Transformers C and A Failing is 0.00095\n", + "d) Probability of All Three Transformers Failing is 5e-05\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.7 Page No : 619" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#To Determine Probabilities Using Markovian Principle\n", + "#Page 619\n", + "\n", + "# Variables\n", + "#Conditional Probabilites Present Future\n", + "Pdd = 2./100; #Down Down\n", + "Pud = 5./100; #Up Down\n", + "Pdu = 1-Pdd; #Down up\n", + "Puu = 1-Pud; #Up Up\n", + "\n", + "# Calculations\n", + "P = [[Pdd,Pdu],[Pud,Puu]]; #Transition Matrix\n", + "\n", + "# Results\n", + "print 'a The Conditional Probabilites for'\n", + "print 'Transformers Down in Present and Down in Future is %g'%(Pdd)\n", + "print 'Transformers Down in Present and Up in Future is %g'%(Pdd)\n", + "print 'Transformers Up in Present and Down in Future is %g'%(Pdd)\n", + "print 'Transformers Up in Present and Up in Future is %g'%(Pdd)\n", + "print 'b The Transition Matrix is',\n", + "print (P)\n", + "print 'c The Transition Diagram can be viewed with the result file attached to this code'\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a The Conditional Probabilites for\n", + "Transformers Down in Present and Down in Future is 0.02\n", + "Transformers Down in Present and Up in Future is 0.02\n", + "Transformers Up in Present and Down in Future is 0.02\n", + "Transformers Up in Present and Up in Future is 0.02\n", + "b The Transition Matrix is [[0.02, 0.98], [0.05, 0.95]]\n", + "c The Transition Diagram can be viewed with the result file attached to this code\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.8 Page No : 620" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#To Determine the Conditional Outage Probabilites\n", + "#Page 620\n", + "\n", + "# Calculations\n", + "#Conditional Outage Probabilites From The Table Given\n", + "P11 = 40./100;\n", + "P12 = 30./100;\n", + "P13 = 30./100;\n", + "P21 = 20./100;\n", + "P22 = 50./100;\n", + "P23 = 30./100;\n", + "P31 = 25./100;\n", + "P32 = 25./100;\n", + "P33 = 50./100;\n", + "\n", + "#Transition Matrix\n", + "P = [[P11,P12,P13],[P21,P22,P23],[P31,P32,P33]];\n", + "\n", + "print \"a The Conditional Outage Probabilites for:\"\n", + "print \"Presently Outaged Feeder is 1, Next Outaged Feeder is 1 is %g\"%(P11)\n", + "print \"Presently Outaged Feeder is 1, Next Outaged Feeder is 2 is %g\"%(P12)\n", + "print \"Presently Outaged Feeder is 1, Next Outaged Feeder is 3 is %g\"%(P13)\n", + "print \"Presently Outaged Feeder is 2, Next Outaged Feeder is 1 is %g\"%(P21)\n", + "print \"Presently Outaged Feeder is 2, Next Outaged Feeder is 2 is %g\"%(P22)\n", + "print \"Presently Outaged Feeder is 2, Next Outaged Feeder is 3 is %g\"%(P23)\n", + "print \"Presently Outaged Feeder is 3, Next Outaged Feeder is 1 is %g\"%(P31)\n", + "print \"Presently Outaged Feeder is 3, Next Outaged Feeder is 2 is %g\"%(P32)\n", + "print \"Presently Outaged Feeder is 3, Next Outaged Feeder is 3 is %g\"%(P33)\n", + "print \"b Transition Matrix is\"\n", + "print (P)\n", + "print \"c The Transition figure is print layed in the result file attached to this code\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a The Conditional Outage Probabilites for:\n", + "Presently Outaged Feeder is 1, Next Outaged Feeder is 1 is 0.4\n", + "Presently Outaged Feeder is 1, Next Outaged Feeder is 2 is 0.3\n", + "Presently Outaged Feeder is 1, Next Outaged Feeder is 3 is 0.3\n", + "Presently Outaged Feeder is 2, Next Outaged Feeder is 1 is 0.2\n", + "Presently Outaged Feeder is 2, Next Outaged Feeder is 2 is 0.5\n", + "Presently Outaged Feeder is 2, Next Outaged Feeder is 3 is 0.3\n", + "Presently Outaged Feeder is 3, Next Outaged Feeder is 1 is 0.25\n", + "Presently Outaged Feeder is 3, Next Outaged Feeder is 2 is 0.25\n", + "Presently Outaged Feeder is 3, Next Outaged Feeder is 3 is 0.5\n", + "b Transition Matrix is\n", + "[[0.4, 0.3, 0.3], [0.2, 0.5, 0.3], [0.25, 0.25, 0.5]]\n", + "c The Transition figure is print layed in the result file attached to this code\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.9 Page No : 624" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import array\n", + "\n", + "# Variables\n", + "P = array([[0.6,0.4],[0.3,0.7]]); #One Step Transition Matrix\n", + "\n", + "Po = array([0.8,0.2]); #Initial State Probability Vector\n", + "\n", + "# Calculations\n", + "#Funtion to determine the Vector of State Probability\n", + "def VSP(y): \n", + " return (Po*(P**y))\n", + "\n", + "P1 = VSP(1); #Vector of State Probability at Time t1\n", + "P4 = VSP(4); #Vector of State Probability at Time t4\n", + "P8 = VSP(8); #Vector of State Probability at Time t8\n", + "\n", + "# Results\n", + "print 'a The Vector of State Probability at time t1 is',\n", + "print (P1)\n", + "print 'a The Vector of State Probability at time t4 is',\n", + "print (P4)\n", + "print 'a The Vector of State Probability at time t8 is',\n", + "print (P8)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a The Vector of State Probability at time t1 is [[ 0.48 0.08]\n", + " [ 0.24 0.14]]\n", + "a The Vector of State Probability at time t4 is [[ 0.10368 0.00512]\n", + " [ 0.00648 0.04802]]\n", + "a The Vector of State Probability at time t8 is [[ 1.34369280e-02 1.31072000e-04]\n", + " [ 5.24880000e-05 1.15296020e-02]]\n" + ] + } + ], + "prompt_number": 16 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file |