<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article  PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd"><article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article"><front><journal-meta><journal-id journal-id-type="publisher-id">JPEE</journal-id><journal-title-group><journal-title>Journal of Power and Energy Engineering</journal-title></journal-title-group><issn pub-type="epub">2327-588X</issn><publisher><publisher-name>Scientific Research Publishing</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.4236/jpee.2017.58003</article-id><article-id pub-id-type="publisher-id">JPEE-78287</article-id><article-categories><subj-group subj-group-type="heading"><subject>Articles</subject></subj-group><subj-group subj-group-type="Discipline-v2"><subject>Engineering</subject></subj-group></article-categories><title-group><article-title>
 
 
  Matlab Code to Assess the Reliability of the Smart Power Distribution System Using Monte Carlo Simulation
 
</article-title></title-group><contrib-group><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Tawfiq</surname><given-names>M. Aljohani</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Mohammed</surname><given-names>J. Beshir</given-names></name><xref ref-type="aff" rid="aff2"><sup>2</sup></xref></contrib></contrib-group><aff id="aff2"><addr-line>University of Southern California, Los Angeles, California, USA</addr-line></aff><aff id="aff1"><addr-line>Department of Electrical Engineering, Taibah University, Medina, KSA</addr-line></aff><pub-date pub-type="epub"><day>27</day><month>07</month><year>2017</year></pub-date><volume>05</volume><issue>08</issue><fpage>30</fpage><lpage>44</lpage><history><date date-type="received"><day>June</day>	<month>8,</month>	<year>2017</year></date><date date-type="rev-recd"><day>Accepted:</day>	<month>August</month>	<year>7,</year>	</date><date date-type="accepted"><day>August</day>	<month>10,</month>	<year>2017</year></date></history><permissions><copyright-statement>&#169; Copyright  2014 by authors and Scientific Research Publishing Inc. </copyright-statement><copyright-year>2014</copyright-year><license><license-p>This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/</license-p></license></permissions><abstract><p>
 
 
  Reliability of power systems is a key aspect in modern power system planning, design, and operation. The ascendance of the smart grid concept has provided high hopes of developing an intelligent network that is capable of being a self-healing grid, offering the ability to overcome the interruption problems that face the utility and cost it tens of millions in repair and loss. In this work, we develop a MATLAB code to examine the effect of the smart grid applications in improving the reliability of the power distribution networks via Monte Carlo Simulation approach. The system used in this paper is the IEEE 34 test feeder. The objective is to measure the installations of the Automatic Reclosers (ARs) as well as the Distributed Generators (DGs) on the reliability indices, SAIDI, SAIFI, CAIDI and EUE, and make comparisons with results from a previous study done by the authors using another approach. The MATLAB code should provide close results to the output of the previous research to verify its effectiveness.
 
</p></abstract><kwd-group><kwd>Monte Carlo Simulation</kwd><kwd> Matlab Code for Power Systems Reliability</kwd><kwd> Power System Reliability</kwd><kwd> Distributed Generators</kwd><kwd> Auto Reclosers</kwd><kwd> Reliability Indices</kwd><kwd> Smart Grid</kwd></kwd-group></article-meta></front><body><sec id="s1"><title>1. Introduction</title><p>The application of Monte Carlo simulation (MCS) is a corner-stone in the sensitivity and quantitative probabilistic analysis. Among many of its great virtues is its powerful ability to accurately evaluate the reliability of the electrical grid, which allowed several studies to emerge in this arena. The deterministic approach in assessing the reliability of the power systems is criticized for not being sensitive to the stochastic nature of the grid as well as to customer demands and components failures, which may lead to either an overinvestment or catastrophic consequences. Therefore, the need for probabilistic evaluation of the electrical system behavior has been emphasized in the most recent decade. MCS, as a process of simulation, is strictly random and can be divided into two main types; sequential and non-sequential (random) Monte Carlo methods. The sequential MCS simulates the system operation as an up-and-down, where a system operating cycle is obtained by combining all the cycles of the system components in chronological order. This usually requires more computational efforts than the other approach, the non-sequential MCS, which simulates the system with a higher efficiency by choosing intervals randomly, yet cannot simulate the chronological aspect of the system behavior. The MCS process is central in the stochastic simulation using random variables, where it can simulate the electrical components considering the grid’s behavior with the goal of evaluating its expected reliability parameters [<xref ref-type="bibr" rid="scirp.78287-ref1">1</xref>] [<xref ref-type="bibr" rid="scirp.78287-ref2">2</xref>] . It also provides distribution information for the load point indices, system indices, and the energy not served costs [<xref ref-type="bibr" rid="scirp.78287-ref3">3</xref>] [<xref ref-type="bibr" rid="scirp.78287-ref4">4</xref>] .</p><p>The goal of this work is to apply the Monte Carlo technique on the IEEE 34-node test system, shown in <xref ref-type="fig" rid="fig1">Figure 1</xref>, to evaluate the reliability of the distribution network using the applications of the smart grid concept considering different case scenarios. Specifically, we consider the impact of the automatic reclosers (ARs) as well as the distributed generators on the system with the optimal placement of the ARs on the feeder, as MCS helps in building an artificial history for each component operation for a simulation time, which was set in this work to be 2000 years. The work aims to compare the results obtained using MCS with results obtained previously for the same test system using another approach [<xref ref-type="bibr" rid="scirp.78287-ref5">5</xref>] . The work also seeks to produce a sufficient MATLAB code that can be used to perform MCS analysis and provide the famous reliability indices SAIDI, SAIFI, CAIDI, EUE, and ASAI for any study-scale electrical test systems. The results should reflect the definition of the smart grid that identifies the ability of a sys- tem for a self-healing, self-interrupting of faults [<xref ref-type="bibr" rid="scirp.78287-ref6">6</xref>] . Reference [<xref ref-type="bibr" rid="scirp.78287-ref7">7</xref>] shows diffe-</p><fig id="fig1"  position="float"><label><xref ref-type="fig" rid="fig1">Figure 1</xref></label><caption><title> The IEEE 34-node test feeder</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/3-1770356x2.png"/></fig><p>rent emerging technologies of the auto-reclosers that are now available in the industry.</p></sec><sec id="s2"><title>2. Monte Carlo Study</title><sec id="s2_1"><title>2.1. Concept of MCS</title><p>A Monte Carlo Simulation’s Matlab code was developed at the University of Southern California by the authors of this paper to achieve the purpose of this study. The code can be found in Appendix of this work. The input data utilized in this work represents a real system data taken from reference [<xref ref-type="bibr" rid="scirp.78287-ref1">1</xref>] , which was also used in the reliability study done by the authors in [<xref ref-type="bibr" rid="scirp.78287-ref5">5</xref>] . The distribution system reliability in overall is evaluated using load point indices and system indices, which are the average failure rate (λ<sub>i</sub>), average outage time (r), and the average annual unavailability (U). The method considered in the coding is the time-se- quential MCS, which models the system recognizing the chronological order as the incidents occur on the system through the simulation time. An artificial history is generated using the random number generator which produces a uniform random number (between 0 and 1) for each component in the test system for the goal of providing a sequence of the operating-repairing cycle for it.</p><disp-formula id="scirp.78287-formula53"><graphic  xlink:href="http://html.scirp.org/file/3-1770356x3.png"  xlink:type="simple"/></disp-formula><disp-formula id="scirp.78287-formula54"><graphic  xlink:href="http://html.scirp.org/file/3-1770356x4.png"  xlink:type="simple"/></disp-formula><p>We simulated the IEEE test system using the famous two-state Markov model shown in <xref ref-type="fig" rid="fig2">Figure 2</xref> for all the non-source components in the feeder. The process is highly random in nature as we do not know for sure when, where and which component in the system will fail first with the fact that the behavior will be different from one component to another, including the type and number of failures as well as the time between a failure and restoration of a component. This fact contributes to the virtue of MCS as a powerful tool to model these real behavior patterns in a simulated time for the sake of producing average reliability values for a system when considering major design changes, such the integration of smart grid technologies in its infrastructure. The Markov model has two states; either up which for the operating condition of the components, or down for the failing state. The up-state is also referred as TTF (time-to-fail) while the down-state referred as TTR (time-to-repair/replace). It is noted that both TTR and TTF are random in nature. The process from up to down is known as the</p><fig id="fig2"  position="float"><label><xref ref-type="fig" rid="fig2">Figure 2</xref></label><caption><title> The two-state model of a component</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/3-1770356x5.png"/></fig><p>failure process for a component due to contingency event that would take it out of operation. MCS randomly sample the up and down states for each element in the feeder which generates a simulated sequence for the component’s history of operation and failure. This helps in producing an overall conclusion about the system behavior in general, and to identify the component that is prone to outages in particular. <xref ref-type="fig" rid="fig3">Figure 3</xref> illustrates the concept of TTR and TTF for a component in any system. These times can be represented by random variables and simulated using gamma, exponential, normal, lognormal and Poisson distributions [<xref ref-type="bibr" rid="scirp.78287-ref7">7</xref>] [<xref ref-type="bibr" rid="scirp.78287-ref8">8</xref>] .</p></sec><sec id="s2_2"><title>2.2. MCS Simulation Process</title><p>References [<xref ref-type="bibr" rid="scirp.78287-ref2">2</xref>] [<xref ref-type="bibr" rid="scirp.78287-ref6">6</xref>] [<xref ref-type="bibr" rid="scirp.78287-ref9">9</xref>] provided guidance on the MCS process that was utilized in this work. The process can be simply briefed as follow:</p><p>1) Generate a random value for each of the component using the random number generator. The variable obtained for each component take the value between (0, 1) with equal likelihood.</p><p>2) Determine the component in the grid with the minimum TTF.</p><p>3) Convert the generated values into TTF, TTR for each component in the system. Determine the outage duration for each failed load point indices.</p><p>4) Generate a new random number for the failed component and convert it into a new TTF. If the simulation time is less than a year then return to step 2. Otherwise, go to step 7.</p><p>5) Calculate the number and duration of failures for each load point per year.</p><p>6) Calculate the average value of the load point failure rate and duration for the sample years.</p><p>7) Calculate SAIDI, SAIFI and system indices and record the average values of the results.</p><p>8) Return to step 2 if the simulation time is less than the specified total simulation years. Otherwise, record the results as final outcomes and end the simulation.</p></sec></sec><sec id="s3"><title>3. Modeling the Test System in Matlab Considering Smart Grid Technologies</title><sec id="s3_1"><title>3.1. Case 1(A): Installation of One Automatic Recloser (AR) in the Feeder</title><p>The results of modeling the test system in our MATLAB code are provided in <xref ref-type="table" rid="table1">Table 1</xref>. The application of the smart grid technologies on the reliability of the</p><fig id="fig3"  position="float"><label><xref ref-type="fig" rid="fig3">Figure 3</xref></label><caption><title> The operating/failure time of a component</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/3-1770356x6.png"/></fig><table-wrap id="table1" ><label><xref ref-type="table" rid="table1">Table 1</xref></label><caption><title> Results of installing one automatic recloser to the test system</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >Case Description</th><th align="center" valign="middle" >SAIFI</th><th align="center" valign="middle" >SAIDI</th><th align="center" valign="middle" >CAIDI</th><th align="center" valign="middle" >ASAI</th><th align="center" valign="middle" >EUE (kW/yr)</th></tr></thead><tr><td align="center" valign="middle" >Base Case (no AR)</td><td align="center" valign="middle" >15.23</td><td align="center" valign="middle" >6.80</td><td align="center" valign="middle" >0.4466</td><td align="center" valign="middle" >0.9992</td><td align="center" valign="middle" >10,709</td></tr><tr><td align="center" valign="middle" >Add AR [832 - 858]</td><td align="center" valign="middle" >12.83</td><td align="center" valign="middle" >5.89</td><td align="center" valign="middle" >0.4595</td><td align="center" valign="middle" >0.9993</td><td align="center" valign="middle" >9248</td></tr><tr><td align="center" valign="middle" >Add AR [858 - 834]</td><td align="center" valign="middle" >13.02</td><td align="center" valign="middle" >5.89</td><td align="center" valign="middle" >0.4523</td><td align="center" valign="middle" >0.9993</td><td align="center" valign="middle" >9265</td></tr><tr><td align="center" valign="middle" >Add AR [834 - 860]</td><td align="center" valign="middle" >12.90</td><td align="center" valign="middle" >6.25</td><td align="center" valign="middle" >0.4846</td><td align="center" valign="middle" >0.9992</td><td align="center" valign="middle" >9845</td></tr><tr><td align="center" valign="middle" >Add AR [860 - 836]</td><td align="center" valign="middle" >12.94</td><td align="center" valign="middle" >6.20</td><td align="center" valign="middle" >0.4791</td><td align="center" valign="middle" >0.9992</td><td align="center" valign="middle" >9763</td></tr><tr><td align="center" valign="middle" >Add AR [834 - 842]</td><td align="center" valign="middle" >14.02</td><td align="center" valign="middle" >6.50</td><td align="center" valign="middle" >0.4639</td><td align="center" valign="middle" >0.9992</td><td align="center" valign="middle" >10,224</td></tr></tbody></table></table-wrap><p>distribution feeder is weighed based on the outcomes (of using the sequential Monte Carlo) that show the impact of the smart grid applications (the auto- recloser in this case) versus the conventional (main) scheme of the test system in <xref ref-type="fig" rid="fig1">Figure 1</xref>. As shown in <xref ref-type="fig" rid="fig4">Figure 4</xref>, the installation of an automatic recloser will yield a reduction in both SAIDI and SAIFI as to the scenario of having the regular system. The best improvement is when we consider this automatic recloser to be installed between nodes 832 - 858 in the electrical feeder, where we noticed a 13.82% improvement in SAIDI [from 6.80 to 5.89 hours/year], 15.76% for SAIFI [from 15.23 to 12.83 occurrence/year] and 13.64% for EUE [from 10,709 to 9248 kW/year]. The improvement in the reliability indices is a result of the fact that the auto-recloser would have the virtue of isolating the fault and restore the service to the healthy parts of the feeder, which also contribute to the quick identification of the faulted area which eventually reduces the repair hours. These two factors significantly improve the reliability indices overall and save much of energy, money, and efforts to the utilities.</p><p><xref ref-type="fig" rid="fig4">Figure 4</xref> shows the impact of the installation of one automatic recloser on the test feeder considering different scenarios and locations, while <xref ref-type="fig" rid="fig5">Figure 5</xref> shows a line graph for the reduction in energy not served index per each option considered. By making a comparison between the results obtained from the analytical method and brute force in the study done by the authors in [<xref ref-type="bibr" rid="scirp.78287-ref5">5</xref>] , and the ones obtained using this MCS MATLAB code, we find a very close effect for the installation of the automatic recloser in each option provided in the table. For example, we notice that there is 4.5% difference in the obtained SAIDI in both studies; the analytical method provided us with 9.32% reductions while MCS show a 13.82% for installing the automatic sectionalizing device between nodes 832 - 858 particularly. The difference in percentage goes little higher in SAIFI but still under acceptable margins, where there is a difference of 7% only in the two studies. The same also applies for EUE, which its concept was obtained mainly from the Lawrence Berkeley National laboratory [<xref ref-type="bibr" rid="scirp.78287-ref10">10</xref>] , where there is only a 4.3% difference between the percentages of improvement in both techniques. These results tell us that both methods are efficient and provided similar outcomes regarding evaluating the reliability of the given system after applying the smart grid applications.</p><fig id="fig4"  position="float"><label><xref ref-type="fig" rid="fig4">Figure 4</xref></label><caption><title> SAIFI and SAIDI results for case 1(A)</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/3-1770356x7.png"/></fig><fig id="fig5"  position="float"><label><xref ref-type="fig" rid="fig5">Figure 5</xref></label><caption><title> EUE for case study 1(A)</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/3-1770356x8.png"/></fig></sec><sec id="s3_2"><title>3.2. Case 1(B): Installation of Two-Automatic Recloser (AR) in the Feeder</title><p>We want to examine in our work the effect of the installation of two automatic reclosers and try to identify if such move will yield more improvement and cost savings. In this case study, we modified the test system to include an automatic recloser in between nodes 832 - 858, and then model the modified system to investigate any further improvements in the reliability indices if we want to add another AR in the test system. <xref ref-type="table" rid="table2">Table 2</xref> shows the obtained results for this case study, with the reliability indices for each scenario when we model using the MATLAB code that we built for the purpose of our work. The best option clearly is to install the second AR in between 834 - 860, where this option will yield in 21.85% improvement in SAIDI from the base case where no ARs are considered. Also in this option, SAIFI witness 22.06% decrease from the baseline scenario. This significant reduction in the interruption/year is contributed to the system’s ability to isolate the faulted area of the feeder once an outage occurs, and be able to restore service and maintain it for the healthy part of the feeder. The virtues</p><table-wrap id="table2" ><label><xref ref-type="table" rid="table2">Table 2</xref></label><caption><title> The results of modeling the test system with two ARs</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >Case Description</th><th align="center" valign="middle" >SAIFI</th><th align="center" valign="middle" >SAIDI</th><th align="center" valign="middle" >CAIDI</th><th align="center" valign="middle" >EUE (kW)</th></tr></thead><tr><td align="center" valign="middle" >Add AR [834 - 860]</td><td align="center" valign="middle" >11.87</td><td align="center" valign="middle" >5.314</td><td align="center" valign="middle" >0.4474</td><td align="center" valign="middle" >8361</td></tr><tr><td align="center" valign="middle" >Add AR [860 - 836]</td><td align="center" valign="middle" >12.30</td><td align="center" valign="middle" >5.541</td><td align="center" valign="middle" >0.4504</td><td align="center" valign="middle" >8707</td></tr><tr><td align="center" valign="middle" >Add AR [834 - 842]</td><td align="center" valign="middle" >12.18</td><td align="center" valign="middle" >5.450</td><td align="center" valign="middle" >0.4472</td><td align="center" valign="middle" >8565</td></tr><tr><td align="center" valign="middle" >Add AR [832 - 888]</td><td align="center" valign="middle" >12.76</td><td align="center" valign="middle" >5.79</td><td align="center" valign="middle" >0.4587</td><td align="center" valign="middle" >9065</td></tr><tr><td align="center" valign="middle" >Add AR [842 - 844]</td><td align="center" valign="middle" >12.61</td><td align="center" valign="middle" >5.64</td><td align="center" valign="middle" >0.4476</td><td align="center" valign="middle" >8869</td></tr></tbody></table></table-wrap><p>of modeling the system using MCS is its ability to offer the best location for the ARs considering the artificial data it made for each component of up and down history. <xref ref-type="fig" rid="fig6">Figure 6</xref> shows the results of different scenarios for the installation of a second AR using our MCS MATLAB code, comparing them with the baseline case of having no AR at all in the system.</p></sec><sec id="s3_3"><title>3.3. Case 2: Installation of 1 MW DG Unit on the Feeder</title><p>We emphasize in this work that the DG units are considered great tools to enhance the reliability of the distribution grid, by providing the energy to the distribution feeder during the islanding scenario when a major outage hits an electrical network. Previous studies have extensively covered the integration of the DG units in the distribution grid [<xref ref-type="bibr" rid="scirp.78287-ref11">11</xref>] [<xref ref-type="bibr" rid="scirp.78287-ref12">12</xref>] [<xref ref-type="bibr" rid="scirp.78287-ref13">13</xref>] [<xref ref-type="bibr" rid="scirp.78287-ref14">14</xref>] . References [<xref ref-type="bibr" rid="scirp.78287-ref15">15</xref>] [<xref ref-type="bibr" rid="scirp.78287-ref16">16</xref>] investigate the ability of DG units to operate parts of the electrical infrastructures as microgrids during major outages. In our work, we investigate modeling a 1MW distributed generator, connected to node 890, where around 30% of the customers are connected. The DG unit could be sized based on the need, whereas in this feeder, a 1 MW DG unit provides approximately the same benefits that could be added by the installation of a higher MW capacity DG unit as the demand on that load point is 1.7 MW. We model different case scenarios when connecting a DG unit to the system to find reliability benefits of installing the DG units along with the ARs, and the results for these scenarios are shown in <xref ref-type="table" rid="table3">Table 3</xref>. The results of the base case illustrate the need for the automatic reclosers/CBs when we install a DG to the distribution system; otherwise, there would be no benefit since a fault on that feeder will certainly block the connection of the DG units during outages (<xref ref-type="fig" rid="fig7">Figure 7</xref> and <xref ref-type="fig" rid="fig8">Figure 8</xref>).</p><p>The best option will be the installation of one automatic recloser between nodes 852 - 832 will improve SAIDI by 60.15%, a change from 6.80 to 2.71 hours/year. SAIFI will experience a great reduction as well from 15.23 to 6.07 occurrence/year, accounting around 60% in improvement as well. In the case of any contingency event, the DG unit will provide the system the ability to operate as a small microgrid, providing service to the unaffected parts of the feeder and improving the system indices. It is worth mentioning that the results using MCS show similar reduction percentage for SAIDI when modeling the same system using the analytical technique and the software that is based on brute force me-</p><fig id="fig6"  position="float"><label><xref ref-type="fig" rid="fig6">Figure 6</xref></label><caption><title> SAIFI and SAIDI for case TWO ARs</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/3-1770356x9.png"/></fig><fig id="fig7"  position="float"><label><xref ref-type="fig" rid="fig7">Figure 7</xref></label><caption><title> SAIFI and SAIDI for 1 MW DG unit</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/3-1770356x10.png"/></fig><fig id="fig8"  position="float"><label><xref ref-type="fig" rid="fig8">Figure 8</xref></label><caption><title> EUE index when considering 1 MW DG unit</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/3-1770356x11.png"/></fig><table-wrap id="table3" ><label><xref ref-type="table" rid="table3">Table 3</xref></label><caption><title> Results obtained for installing 1MW DG unit</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >Case Description</th><th align="center" valign="middle" >SAIFI</th><th align="center" valign="middle" >SAIDI</th><th align="center" valign="middle" >CAIDI</th><th align="center" valign="middle" >EUE (kW)</th></tr></thead><tr><td align="center" valign="middle" >Base case + one DG (no switch)</td><td align="center" valign="middle" >15.23</td><td align="center" valign="middle" >6.80</td><td align="center" valign="middle" >0.4466</td><td align="center" valign="middle" >10,709</td></tr><tr><td align="center" valign="middle" >Add AR [852 - 832]</td><td align="center" valign="middle" >6.07</td><td align="center" valign="middle" >2.71</td><td align="center" valign="middle" >0.4465</td><td align="center" valign="middle" >9097</td></tr><tr><td align="center" valign="middle" >Add AR [854 - 852]</td><td align="center" valign="middle" >6.81</td><td align="center" valign="middle" >2.94</td><td align="center" valign="middle" >0.4319</td><td align="center" valign="middle" >9099</td></tr><tr><td align="center" valign="middle" >Add AR [830 - 854]</td><td align="center" valign="middle" >7.60</td><td align="center" valign="middle" >3.11</td><td align="center" valign="middle" >0.4094</td><td align="center" valign="middle" >9442</td></tr><tr><td align="center" valign="middle" >Add AR [828 - 830]</td><td align="center" valign="middle" >7.69</td><td align="center" valign="middle" >3.06</td><td align="center" valign="middle" >0.3987</td><td align="center" valign="middle" >9498</td></tr><tr><td align="center" valign="middle" >Add AR [888 - 890]</td><td align="center" valign="middle" >14.13</td><td align="center" valign="middle" >6.61</td><td align="center" valign="middle" >0.4243</td><td align="center" valign="middle" >10,512</td></tr></tbody></table></table-wrap><p>thod, where there less than 6% in the difference between the reliability indices in the two studies.</p></sec></sec><sec id="s4"><title>4. Conclusions</title><p>Monte Carlo technique is one of the most powerful, efficient methods to evaluate the reliability of the power distribution grids. In this work, we simulate the IEEE 34 node test system using the MSC technique, through a MATLAB code that was written by the authors of this paper and shown in Appendix A of this work. After modeled the IEEE feeder, shown in <xref ref-type="fig" rid="fig1">Figure 1</xref>, we made a comparison with a previous study done on the same system but with using another approach. Based on the results, we found that the MCS provided similar results with those obtained using analytical technique [<xref ref-type="bibr" rid="scirp.78287-ref5">5</xref>] and DISREL, an intelligent based program that builds on the brute force concept. The study using the developed MCS MATLAB code shows the impact of the smart grid technologies in improving the reliability indices of the test feeder.</p><p>The study shows different scenarios of applying the auto reclosers and the DG units in various parts of the feeder. Furthermore, the automatic reclosers, once installed optimally in the grid as proposed by the software, significantly improve the reliability of the power distribution network by isolating the healthy parts of the system automatically, which maintain the service to a substantial number of customers and reduce the repair time. The distributed generators, although dated back to the late 1970’s, are now considered to be one of the applications that define the smart grid concept. The results of integrating them in the distribution feeder show the advantages of using reliable, assumed dispatchable, DG units near load center. Along with the installation of the automatic recloser, the DGs provide the opportunity of operating the distribution grid as a microgrid, allowing service to continue to parts in the network, something will be greatly admired especially during major outages and blackouts. Also, the study provided in this work shows the amount of energy (in kW) that is saved for the utility in this real life test feeder, through the EUE index which measures the reduction in the energy-not-served for each case option. Also, the comparison of these results with that one obtained previously on the same test feeder using the same real-life inputs shows the MCS MATLAB code we developed is effective, and serves as a tool that can be used in evaluating the reliability of distribution feeders when applying small modifications only. That reflects the difference from the test system used in this study.</p></sec><sec id="s5"><title>Cite this paper</title><p>Aljohani, T.M. and Beshir, M.J. (2017) Matlab Code to Assess the Reliability of the Smart Power Distribution System Using Monte Carlo Simulation. Journal of Power and Energy Engineering, 5, 30-44. https://doi.org/10.4236/jpee.2017.58003</p></sec><sec id="s6"><title>Appendix: The Developed Matlab Monte Carlo Simulation Code</title><p>clear;</p><p>N = 33; % number of components</p><p>lambda = [0.3979; 0.8209; 0.7666; 0.1206; 0.8577; ...</p><p>0.2586; 0.7049; 0.2429; 0.3521; 0.8118; ...</p><p>0.1850; 0.5135; 0.3920; 0.7194; 0.6776; ...</p><p>0.2065; 0.3197; 0.3226; 0.8566; 0.3348; ...</p><p>0.8950; 0.8833; 0.6400; 0.0412; 0.0518; ...</p><p>0.9458; 0.2257; 0.7303; 0.2191; 0.0101; ...</p><p>0.7205; 0.1289; 0.1327];</p><p>MTTR = [0.3546; 0.6970; 0.8490; 0.8724; 0.0411; ...</p><p>0.2098; 0.7382; 0.7379; 0.1978; 0.4534; ...</p><p>0.2299; 0.0704; 0.3979; 0.8555; 0.6809; ...</p><p>0.2954; 0.8536; 0.7195; 0.3405; 0.0495; ...</p><p>0.0174; 0.7846; 0.2554; 0.6597; 0.8496; ...</p><p>0.2965; 0.2238; 0.0066; 0.0684; 0.4306; ...</p><p>0.7953; 0.7759; 0.9673];</p><p>power = [0 55 0 16 0 0 0 5 34 0 0 4 40 7 45 15 146 82 ...</p><p>0 67 9 405 45 83 0 0 4 0 32 0 28 2 0 450];</p><p>users = ceil(power/2)-1;</p><p>%% failure history</p><p>duration = 1000; % years</p><p>interuption = 0;</p><p>outage_time = 0;</p><p>maxT = 0;</p><p>for i = 1:N</p><p>[downT{i},upT{i}] = failure_history2(lambda(i),MTTR(i),duration);</p><p>cur = max(upT{i}(1:end));</p><p>if (maxT &lt; cur)</p><p>maxT = cur;</p><p>end</p><p>interuption = interruption + length(downT{i})-1;</p><p>outage_time = outage_time + sum(upT{i}-downT{i});</p><p>% figure;</p><p>line(1:length(downT{i}),downT{i});</p><p>line(1:length(downT{i}),upT{i},’color’,’r’,’Marker’,’.’);</p><p>end</p><p>% INDEXES calculation</p><p>average_interuption = interuption/duration;</p><p>average_outage_time = outage_time/duration;</p><p>customers_num = sum(users);</p><p>total_power = sum(power);</p><p>SAIFI = average_interuption*customers_num/customers_num;</p><p>SAIDI = average_outage_time*customers_num/customers_num;</p><p>CAIDI = SAIDI/SAIFI;</p><p>ASAI = (customers_num*8760 - average_outage_time*customers_num)/ (customers_num*8760);</p><p>EUE = average_outage_time*total_power; % kW*hour</p><p>disp(‘-------------------------------’);</p><p>disp(‘Step 1’);</p><p>disp([‘SAIFI ‘ num2str(SAIFI)]);</p><p>disp([‘SAIDI ‘ num2str(SAIDI)]);</p><p>disp([‘CAIDI ‘ num2str(CAIDI)]);</p><p>disp([‘ASAI ‘ num2str(ASAI)]);</p><p>disp([‘EUE ‘ num2str(EUE)]);</p><p>%% Step2 switches</p><p>switch_834_lines = [20 21 22 31 32];</p><p>switch_832_lines = [17 18 19 30 23 24 25 switch_834_lines];</p><p>switch_834_elements = [19 20 21 30 31];</p><p>switch_832_elements = [switch_834_elements 18 22 23 24 25 29 32];</p><p>interaptionXcustomer_number = 0;</p><p>interaptionXcustomer_duration = 0;</p><p>unservedEnergy = 0;</p><p>cur_t = 0;</p><p>while cur_t &lt; maxT</p><p>% find next failure time</p><p>min_t = (duration + 1)*24*365;</p><p>fail_line_number = 0;</p><p>for i = 1:N</p><p>clear indx;</p><p>indx = find(downT{i} &gt; cur_t);</p><p>if (~isempty(indx))</p><p>indx = indx(1);</p><p>if (downT{i}(indx) &lt; min_t)</p><p>min_t = downT{i}(indx);</p><p>fail_line_number = i;</p><p>n = indx;</p><p>cur_outage_time = upT{i}(indx) − downT{i}(indx);</p><p>end</p><p>end</p><p>end</p><p>cur_t = upT{fail_line_number}(n);</p><p>in_switch_834 = ~isempty(find(switch_834_lines == fail_line_number));</p><p>customer_834 = sum(users(switch_834_elements));</p><p>power_834 = sum(power(switch_834_elements));</p><p>in_switch_832 = ~isempty(find(switch_832_elements == fail_line_number));</p><p>customer_832 = sum(users(switch_832_elements));</p><p>power_832 = sum(power(switch_832_elements));</p><p>% interaption calculation</p><p>if (~in_switch_832)</p><p>interaptionXcustomer_number = interaptionXcustomer_number + customers_num;</p><p>interaptionXcustomer_duration = interaptionXcustomer_duration + customers_num*cur_outage_time;</p><p>unservedEnergy = unservedEnergy + total_power*cur_outage_time;</p><p>else</p><p>if (in_switch_834)</p><p>interaptionXcustomer_number = interaptionXcustomer_number + customer_834;</p><p>interaptionXcustomer_duration = interaptionXcustomer_duration + customer_834*cur_outage_time;</p><p>unservedEnergy = unservedEnergy + power_834*cur_outage_time;</p><p>else</p><p>interaptionXcustomer_number = interaptionXcustomer_number + customer_832;</p><p>interaptionXcustomer_duration = interaptionXcustomer_duration + customer_832*cur_outage_time;</p><p>unservedEnergy = unservedEnergy + power_832*cur_outage_time;</p><p>end</p><p>end</p><p>end</p><p>% INDEXES calculation</p><p>SAIFI = interaptionXcustomer_number/customers_num/duration;</p><p>SAIDI = interaptionXcustomer_duration/customers_num/duration;</p><p>CAIDI = SAIDI/SAIFI;</p><p>ASAI = (customers_num*8760 − interaptionXcustomer_duration/duration)/ (customers_num*8760);</p><p>EUE = unservedEnergy/duration; % kW*hour</p><p>disp(‘-------------------------------’);</p><p>disp(‘Step 2’);</p><p>disp([‘SAIFI ‘ num2str(SAIFI)]);</p><p>disp([‘SAIDI ‘ num2str(SAIDI)]);</p><p>disp([‘CAIDI ‘ num2str(CAIDI)]);</p><p>disp([‘ASAI ‘ num2str(ASAI)]);</p><p>disp([‘EUE ‘ num2str(EUE)]);</p><p>%% Step 3 switches from Step 2 and DGs</p><p>switch_834_lines = [20 21 22 31 32];</p><p>switch_832_lines = [17 18 19 30 23 24 25 switch_834_lines];</p><p>switch_834_elements = [19 20 21 30 31];</p><p>switch_832_elements = [switch_834_elements 18 22 23 24 25 29 32];</p><p>interaptionXcustomer_number = 0;</p><p>interaptionXcustomer_duration = 0;</p><p>unservedEnergy = 0;</p><p>cur_t = 0;</p><p>while cur_t &lt; maxT</p><p>% find next failure time</p><p>min_t = (duration + 1)*24*365;</p><p>fail_line_number = 0;</p><p>for i = 1:N</p><p>clearindx;</p><p>indx = find(downT{i} &gt; cur_t);</p><p>if (~isempty(indx))</p><p>indx = indx(1);</p><p>if (downT{i}(indx) &lt; min_t)</p><p>min_t = downT{i}(indx);</p><p>fail_line_number = i;</p><p>n = indx;</p><p>cur_outage_time = upT{i}(indx) − downT{i}(indx);</p><p>end</p><p>end</p><p>end</p><p>cur_t = upT{fail_line_number}(n);</p><p>in_switch_834 = ~isempty(find(switch_834_lines == fail_line_number));</p><p>customer_834 = sum(users(switch_834_elements));</p><p>power_834 = sum(power(switch_834_elements));</p><p>in_switch_832 = ~isempty(find(switch_832_elements == fail_line_number));</p><p>customer_832 = sum(users(switch_832_elements));</p><p>power_832 = sum(power(switch_832_elements));</p><p>customer_800 = customers_num-customer_832;</p><p>power_800 = total_power-power_832;</p><p>% interaption calculation</p><p>if (~in_switch_832)</p><p>interaptionXcustomer_number = interaptionXcustomer_number + customer_800;</p><p>interaptionXcustomer_duration = interaptionXcustomer_duration + customer_800*cur_outage_time;</p><p>unservedEnergy = unservedEnergy + power_832*cur_outage_time;</p><p>else</p><p>if (in_switch_834)</p><p>interaptionXcustomer_number = interaptionXcustomer_number + customer_834;</p><p>interaptionXcustomer_duration = interaptionXcustomer_duration + customer_834*cur_outage_time;</p><p>unservedEnergy = unservedEnergy + power_834*cur_outage_time;</p><p>else</p><p>interaptionXcustomer_number = interaptionXcustomer_number + customer_832;</p><p>interaptionXcustomer_duration = interaptionXcustomer_duration + customer_832*cur_outage_time;</p><p>unservedEnergy = unservedEnergy + power_832*cur_outage_time;</p><p>end</p><p>end</p><p>end</p><p>% INDEXES calculation</p><p>SAIFI = interaptionXcustomer_number/customers_num/duration;</p><p>SAIDI = interaptionXcustomer_duration/customers_num/duration;</p><p>CAIDI = SAIDI/SAIFI;</p><p>ASAI = (customers_num*8760 − interaptionXcustomer_duration/duration)/ (customers_num*8760);</p><p>EUE = unservedEnergy/duration; % kW*hour</p><p>disp(‘-------------------------------’);</p><p>disp(‘Step 3’);</p><p>disp([‘SAIFI ‘ num2str(SAIFI)]);</p><p>disp([‘SAIDI ‘ num2str(SAIDI)]);</p><p>disp([‘CAIDI ‘ num2str(CAIDI)]);</p><p>disp([‘ASAI ‘ num2str(ASAI)]);</p><p>disp([‘EUE ‘ num2str(EUE)]);</p></sec><sec id="s7"><title>Abbreviations and Acronyms</title><p>IEEE: Institute of Electrical and Electronics Engineering.</p><p>AR: Automatic Recloser.</p><p>SAIDI: System Average Interruption Duration Index.</p><p>DG: Distributed Generation.</p><p>CAIDI: Customer Average Interruption Duration Index.</p><p>U: Annual Unavailability Time.</p><p>EUE: Expected Un-served Energy.</p><p>R: Annual Outage Time.</p><p>λ: Failure Rate of an Electrical Component.</p><p>TTR: Mean Time to Repair.</p><p>TTF: Mean Time to Fail.</p><p>MCS: Monte Carlo Simulation.</p></sec></body><back><ref-list><title>References</title><ref id="scirp.78287-ref1"><label>1</label><mixed-citation publication-type="other" xlink:type="simple">Brown, R.E. (2009) Electric Power Distribution Reliability. 2nd Edition, Marcel Dekker, New York.</mixed-citation></ref><ref id="scirp.78287-ref2"><label>2</label><mixed-citation publication-type="other" xlink:type="simple">Billinton, R. and Allan, R.N. (1996) Reliability Evaluation of Engineering Systems: Concepts and Techniques. 2nd Edition, Plenum Publishing Corporation, New York.  
https://doi.org/10.1007/978-1-4899-1860-4</mixed-citation></ref><ref id="scirp.78287-ref3"><label>3</label><mixed-citation publication-type="other" xlink:type="simple">Goel, L. and Billinton, R. (1994) Determination of Reliability Worth for Distribution System Planning. IEEE Transactions on Power Delivery, 9, 1577-1583.  
https://doi.org/10.1109/61.311207</mixed-citation></ref><ref id="scirp.78287-ref4"><label>4</label><mixed-citation publication-type="other" xlink:type="simple">Billinton, R. and Li, W. (1994) Reliability Assessment of Electric Power Systems Using Monte Carlo Methods. Plenum Publishing Corporation, New York.  
https://doi.org/10.1007/978-1-4899-1346-3</mixed-citation></ref><ref id="scirp.78287-ref5"><label>5</label><mixed-citation publication-type="other" xlink:type="simple">Aljohani, T. and Beshir, M. (2017) Distribution System Reliability Analysis for Smart Grid Applications. Smart Grid and Renewable Energy, 8, 240-251.  
https://doi.org/10.4236/sgre.2017.87016</mixed-citation></ref><ref id="scirp.78287-ref6"><label>6</label><mixed-citation publication-type="other" xlink:type="simple">Faulin, J. (2010) Simulation Methods for Reliability and Availability of Complex Systems. Springer, London. https://doi.org/10.1007/978-1-84882-213-9</mixed-citation></ref><ref id="scirp.78287-ref7"><label>7</label><mixed-citation publication-type="other" xlink:type="simple">Florida Electric Cooperatives Association (2012) Improving Network Reliability with Reclosers. http://www.feca.com/RecloserTechnology.pdf</mixed-citation></ref><ref id="scirp.78287-ref8"><label>8</label><mixed-citation publication-type="other" xlink:type="simple">United States Department of Energy Office of Electricity Delivery and Energy Reliability. http://energy.gov/oe/technology-development/smart-grid</mixed-citation></ref><ref id="scirp.78287-ref9"><label>9</label><mixed-citation publication-type="other" xlink:type="simple">Billinton, R. and Wang, P. (1999) Teaching Distribution System Reliability Evaluation Using Monte Carlo Simulation. IEEE Transactions on Power Systems, 14, 397-403. https://doi.org/10.1109/59.761856</mixed-citation></ref><ref id="scirp.78287-ref10"><label>10</label><mixed-citation publication-type="other" xlink:type="simple">Lawrence Berkeley National Laboratory, Environmental Energy Technologies Division (2003) A Framework and Review of Customer Outage Costs: Integration and Analysis of Electric Utility Outage Cost Surveys. Lawrence Berkeley National Laboratory, Envi-ronmental Energy Technologies Division, Berkeley.</mixed-citation></ref><ref id="scirp.78287-ref11"><label>11</label><mixed-citation publication-type="other" xlink:type="simple">Li, F. and Sabir, N. (2008) Monte Carlo Simulation to Evaluate the Reliability Im-provement with DG Connected to Distribution Systems. Proceedings of the 8th WSEAS International Conference on Electric Power System, High Voltages, Electric Ma-chines.</mixed-citation></ref><ref id="scirp.78287-ref12"><label>12</label><mixed-citation publication-type="other" xlink:type="simple">Chowdhury, A., Agarwal, S.K. and Koval, D. (2003) Reliability Modeling of Distributed Generators in Conventional Distribution Systems Planning and Analysis. IEEE Trans-actions on Industry Applications, 39.</mixed-citation></ref><ref id="scirp.78287-ref13"><label>13</label><mixed-citation publication-type="other" xlink:type="simple">Chowdhury, A. and Koval, D. (2009) Power Distribution System Reliability: Practical Methods and Applications. John Wiley and Sons, New Jersey.  
https://doi.org/10.1002/9780470459355</mixed-citation></ref><ref id="scirp.78287-ref14"><label>14</label><mixed-citation publication-type="other" xlink:type="simple">Mozina, C.J. (2013) Impact of Smart Grids and Green Power Generation on Distribution Systems. IEEE Transactions on Industry Applications, 49, 1079-1090.  
https://doi.org/10.1109/TIA.2013.2253292</mixed-citation></ref><ref id="scirp.78287-ref15"><label>15</label><mixed-citation publication-type="other" xlink:type="simple">Piagi, P. and Lasseter, R.H. (2006) Autonomous Control of Microgrids. The IEEE Power Engineering Society Meeting, Montreal, 18-22 June 2006.  
https://doi.org/10.1109/PES.2006.1708993</mixed-citation></ref><ref id="scirp.78287-ref16"><label>16</label><mixed-citation publication-type="other" xlink:type="simple">Lasseter, R.H. (2011) Smart Distribution: Coupled Microgrids. Proceedings of the IEEE, 99, 1074-1082. https://doi.org/10.1109/JPROC.2011.2114630</mixed-citation></ref></ref-list></back></article>