<?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">EPE</journal-id><journal-title-group><journal-title>Energy and Power Engineering</journal-title></journal-title-group><issn pub-type="epub">1949-243X</issn><publisher><publisher-name>Scientific Research Publishing</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.4236/epe.2014.612037</article-id><article-id pub-id-type="publisher-id">EPE-50894</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>
 
 
  Optimal Power Flow in Electrical Microgrids
 
</article-title></title-group><contrib-group><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>eredia</surname><given-names>Ramírez Francisco Andrés</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref><xref ref-type="corresp" rid="cor1"><sup>*</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Johann</surname><given-names>Hernandez</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref><xref ref-type="corresp" rid="cor1"><sup>*</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Edwin</surname><given-names>Rivas Trujillo</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref><xref ref-type="corresp" rid="cor1"><sup>*</sup></xref></contrib></contrib-group><aff id="aff1"><addr-line>Universidad Distrital Francisco José de Caldas, Bogotá, Colombia</addr-line></aff><author-notes><corresp id="cor1">* E-mail:<email>jahernandezm@udistrital.edu.co(ERFA)</email>;<email>jahernandezm@udistrital.edu.co(JH)</email>;<email>jahernandezm@udistrital.edu.co(ERT)</email>;</corresp></author-notes><pub-date pub-type="epub"><day>27</day><month>10</month><year>2014</year></pub-date><volume>06</volume><issue>12</issue><fpage>449</fpage><lpage>458</lpage><history><date date-type="received"><day>4</day>	<month>August</month>	<year>2014</year></date><date date-type="rev-recd"><day>2</day>	<month>September</month>	<year>2014</year>	</date><date date-type="accepted"><day>15</day>	<month>September</month>	<year>2014</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>
 
 
  This paper presents in the first place, the state of art relating to the methods to solve optimal power flows (OPF) and its application in electrical microgrids. Afterwards, a mathematical algorithm based on the gradient method is proposed for the application of OPF in a low power microgrid, in order to improve the voltages profiles and consequently reduce the active power losses. Finally, the proposed algorithm is implemented in a low power microgrid to demonstrate the effectiveness of the method.
 
</p></abstract><kwd-group><kwd>Optimal Power Flow</kwd><kwd> Microgrid</kwd><kwd> Gradient Method</kwd><kwd> Profile Voltages</kwd><kwd> Reduction of Losses</kwd></kwd-group></article-meta></front><body><sec id="s1"><title>1. Introduction</title><p>An optimal power flow (OPF) consists of solving equations which characterize an electrical power system (active and reactive power of each node) adjusting the control variables values (voltages or powers) in order to optimize a specific system parameter, represented by one target function [<xref ref-type="bibr" rid="scirp.50894-ref1">1</xref>] . A system usually includes state variables (unknown quantities) and independent variables (unknown data). Control variables can be any of the independent variables in the system, and are selected depending on the purpose of the analysis.</p><p>The target function of a power system for the OPF study is determined depending on the parameter which is going to be optimized or improved; some typical parameters are as follows [<xref ref-type="bibr" rid="scirp.50894-ref2">2</xref>] :</p><p>&#183; Minimizing the generation cost</p><p>&#183; Minimizing transmission losses of active power</p><p>&#183; Minimizing transmission losses of reactive power</p><p>&#183; Minimizing the interruption costs by flows</p><p>&#183; Minimizing the reprogramming number of controls</p><p>&#183; Minimizing pollutant emissions of thermal generators</p><p>In order to improve the features of power systems and reduce line losses, in recent years, the electrical microgrids have appeared. Electrical microgrids are small electrical systems that may have autonomous management of power generation and energy distribution, which can function in a dependent or independent way from the electrical grid and also with the potential implementation of renewable energy sources [<xref ref-type="bibr" rid="scirp.50894-ref3">3</xref>] .</p><p>To enhance features and achieve an optimal performance in electrical microgrids, authors as [<xref ref-type="bibr" rid="scirp.50894-ref4">4</xref>] - [<xref ref-type="bibr" rid="scirp.50894-ref8">8</xref>] have implemented OPF in various mathematical algorithms.</p><p>This paper presents a state of art regarding the mathematical methods which have been implemented in the analysis of OPF and its application in electrical microgrids. Subsequently, a mathematical algorithm based on the gradient method is proposed for the solution of OPF in low power microgrids, in order to improve the profiles voltages and consequently reduce the active power losses. Finally, the application results of the gradient method in a low power microgrid with photovoltaic generation are presented.</p></sec><sec id="s2"><title>2. State of Art</title><p>An OPF solution provides information regarding to planning, economic programming, system control and the distribution of future expansion [<xref ref-type="bibr" rid="scirp.50894-ref9">9</xref>] . Sections 2.1 and 2.2 present a compilation of the most relevant research on OPF analysis methods in power systems and its application in electrical microgrids.</p><sec id="s2_1"><title>2.1. Optimal Power Flow Methods</title><p>These mathematical methods have been developed for over 40 years, starting with classical mathematical optimization techniques [<xref ref-type="bibr" rid="scirp.50894-ref9">9</xref>] - [<xref ref-type="bibr" rid="scirp.50894-ref11">11</xref>] , and more recently reaching genetic and artificial intelligence algorithms [<xref ref-type="bibr" rid="scirp.50894-ref4">4</xref>] [<xref ref-type="bibr" rid="scirp.50894-ref6">6</xref>] [<xref ref-type="bibr" rid="scirp.50894-ref9">9</xref>] [<xref ref-type="bibr" rid="scirp.50894-ref12">12</xref>] [<xref ref-type="bibr" rid="scirp.50894-ref13">13</xref>] . OPF mathematical methods are shown in <xref ref-type="fig" rid="fig1">Figure 1</xref> and <xref ref-type="fig" rid="fig2">Figure 2</xref>.</p><p>This section presents the most important contributions in OPF methods.</p><fig id="fig1"  position="float"><label><xref ref-type="fig" rid="fig1">Figure 1</xref></label><caption><title> OPF methods (Classic optimization)</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/3-6201721x5.png"/></fig><fig id="fig2"  position="float"><label><xref ref-type="fig" rid="fig2">Figure 2</xref></label><caption><title> OPF methods (Heuristic)</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/3-6201721x6.png"/></fig><p>In the year of 1968 H. W. Dommel and W. F. Tinney introduced the concept of OPF in power systems. The Authors present a solution method for OPF using the Newton method with an optimal adjustment of the control parameters through the gradient method; this is done with the purpose of reducing losses of a three-node system [<xref ref-type="bibr" rid="scirp.50894-ref10">10</xref>] .</p><p>In 1973 A. M. H. Rashed and D. H. Kelly presented a mathematical algorithm to minimize losses implementing a combination of Lagrange multipliers and Newton’s method, replacing the Jacobian for one Hessian matrix. The proposed method has a faster convergence, requiring fewer steps compared to other methods [<xref ref-type="bibr" rid="scirp.50894-ref14">14</xref>] .</p><p>In 1993 Yu-Chi Wu, et al. introduced a method to resolve OPF in order to optimize an economic dispatch. The study combines an algorithm based on the interior point method, justifying that the methods proposed years ago did not meet the requirements of large-scale power systems. The authors concluded that the method provided robust and accurate results [<xref ref-type="bibr" rid="scirp.50894-ref15">15</xref>] .</p><p>Subsequently, in 1995 J. Kennedy and R. Eberhart conducted a research in optimization of nonlinear functions using the “Particle Swarm Optimization” (PSO) method. Thus, the authors state that this method could be used to solve a myriad of problems, including the OPF in power systems [<xref ref-type="bibr" rid="scirp.50894-ref12">12</xref>] .</p><p>In the year of 2001 C.A. Roa-Sep&#250;lveda and B.J. Pavez-Lazo introduced an OPF method to resolve the economic dispatch problem based on linear Programming. This method is applied to tow IEEE systems of six and thirty nodes without considering the losses; finally, they concluded that OPFs could be solved without a Jacobian matrix, contributing to determine any objective function [<xref ref-type="bibr" rid="scirp.50894-ref7">7</xref>] .</p><p>In 2004 A. EL-Dib, et al. focused their research in an application (PSO) to figure out OPF as optimization problems. The authors argue that these studies are the basis to determine the voltage stability and the maximum system power [<xref ref-type="bibr" rid="scirp.50894-ref13">13</xref>] .</p><p>In 2006 R. Mageshvaran, et al. presented three different techniques to solve OPF (PSO, CPSO, HDE), proposing useful and encouraging solutions, that were verified in Matlab. The objective of the research was the development of new techniques that allow a better operation; this was done with the purpose of ensuring an economic generation and also meeting the demand of active and reactive power through simple and efficient algorithms [<xref ref-type="bibr" rid="scirp.50894-ref9">9</xref>] .</p><p>In the year of 2008 J. M. L&#243;pezLezema and L. A. GallegoPareja developed an algorithm to solve OPF, employing the gradient method for achieving reduction of active power losses in power systems. In their research the authors reduced the quantity of iterations by means of the adjustment parable method [<xref ref-type="bibr" rid="scirp.50894-ref11">11</xref>] .</p><p>In 2012 C. H. Fujisawa, et al. concentrated their research on direct current OPF with losses and into alternating current; they further presented the mathematical characteristics of each one and their respective advantages and disadvantages. The authors determined that the alternating current method is the most interesting model, since it solves problems through an iterative process and applying various methods of linear programming [<xref ref-type="bibr" rid="scirp.50894-ref16">16</xref>] .</p><p>In Section 2.2 are exposed OPF applications in power systems, specifically in electrical microgrids.</p></sec><sec id="s2_2"><title>2.2. Optimal Power Flow Applied to Electrical Microgrids</title><p>The implementation of OPF in electrical microgrids started years ago at first, to control the optimal power dispatch [<xref ref-type="bibr" rid="scirp.50894-ref8">8</xref>] [<xref ref-type="bibr" rid="scirp.50894-ref11">11</xref>] and subsequently to achieve the loss minimization in power systems [<xref ref-type="bibr" rid="scirp.50894-ref4">4</xref>] [<xref ref-type="bibr" rid="scirp.50894-ref5">5</xref>] .</p><p>In 2009 E. Sortomme and M. A. El-Sharkawi conducted studies in a microgrid through the Particle Swarm Optimization (PSO); this was done in order to achieve an optimal dispatch of controllable loads and effectively use the storage energy devices that microgrids contain. The authors emphasized that the research was a preliminary study where they concluded that peak loads were reduced in 10 MV, generating an economic improvement of 14% [<xref ref-type="bibr" rid="scirp.50894-ref8">8</xref>] .</p><p>In the year 2010 P. Wan and M. D. Lemmon considered an optimization algorithm for distributed event to solve OPF in microgrids. The optimization was performed by simulations in Sim Power System (Matlab) implementing the microgrid model: CERTS. In this study the authors reduced the error by the algorithm and conclude that through the method the optimization problem in microgrids could be solved [<xref ref-type="bibr" rid="scirp.50894-ref6">6</xref>] .</p><p>In 2013 E. Dall’Anese, et al. applied several OPF to electrical microgrids in order to minimize losses and the cost of the energy supplied by distributed generation (small energy sources capable of supplying user demand), this was done by SDR techniques (Semidefinite Programming), which the possibility of obtaining the optimal solution for the microgrid [<xref ref-type="bibr" rid="scirp.50894-ref5">5</xref>] .</p><p>In 2013 Yoash Levron, Josep M. Guerrero and Yuval Beck introduced a solution for OPF that considered a microgrid with energy storage. The authors claim that classical solutions of OPF were not adapted for the microgrid analysis, in particular due to the presence of distributed generation and of the storage devices. The Optimal Power Flow developed by authors considered the limitations of the storage devices and those of the microgrid regarding to the voltages, currents and powers [<xref ref-type="bibr" rid="scirp.50894-ref4">4</xref>] .</p></sec></sec><sec id="s3"><title>3. Algorithm Based on the Gradient Method</title><p>In order to analyze electrical microgrids by OPF, a mathematical algorithm is proposed based on the gradient method, based upon the study developed in [<xref ref-type="bibr" rid="scirp.50894-ref10">10</xref>] . <xref ref-type="fig" rid="fig3">Figure 3</xref> shows the proposed flowchart of an OPF solved by the gradient method.</p><p>The mathematical algorithm is based on partial derivatives and has the property to be modified to analyze any structure in the microgrid (isolated or interconnected with the grid).</p><p>In Section 3.1 the general way of formulating an OPF is shown. Afterwards, in Section 3.2 the specific methodology proposed for the formulation and solution of an OPF is explained, which is based on the gradient method with the purpose of improving the voltage profiles and reducing active power losses in electrical microgrids.</p><fig id="fig3"  position="float"><label><xref ref-type="fig" rid="fig3">Figure 3</xref></label><caption><title> Flow diagram of an OPF based on the gradient method</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/3-6201721x7.png"/></fig><sec id="s3_1"><title>3.1. Obtaining the Probability Density Functions</title><p>According to [<xref ref-type="bibr" rid="scirp.50894-ref10">10</xref>] , the OPF is based on Equation (1).</p><disp-formula id="scirp.50894-formula1560"><label>(1)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/3-6201721x8.png"  xlink:type="simple"/></disp-formula><p>where (x) are state variables and (u) control variables [<xref ref-type="bibr" rid="scirp.50894-ref17">17</xref>] :</p><disp-formula id="scirp.50894-formula1561"><graphic  xlink:href="http://html.scirp.org/file/3-6201721x9.png"  xlink:type="simple"/></disp-formula><disp-formula id="scirp.50894-formula1562"><graphic  xlink:href="http://html.scirp.org/file/3-6201721x10.png"  xlink:type="simple"/></disp-formula><p>The control variables can be adjusted without altering the equality and inequality. Therefore, the problem of OPF is to adjust the control variables u in order to optimize a specific parameter of the system represented by the objective function f(x, u) [<xref ref-type="bibr" rid="scirp.50894-ref10">10</xref>] .</p><p>The equality restrictions g(x, u) of Equation (1), correspond to the active and reactive power of the system nodes equations:</p><disp-formula id="scirp.50894-formula1563"><label>(2)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/3-6201721x11.png"  xlink:type="simple"/></disp-formula><p>Finally, the inequality restrictions are the minimum and maximum allowed values for the control variables.</p></sec><sec id="s3_2"><title>3.2. Gradient Method for Improving the Voltage Profiles and Reducing Active Power Losses in a Microgrid</title><p>Improving the voltage profiles and reducing losses in the microgrid helps to improve performance, to enhance the useful life of the conductors, to improve energy quality and reduce system costs [<xref ref-type="bibr" rid="scirp.50894-ref18">18</xref>] .</p><p>Control variables are defined as generation nodes voltages and Slack as it look for improving the system voltages profiles.</p><p>In a power system, slack power node is not specified, because the node assumes the losses of the system [<xref ref-type="bibr" rid="scirp.50894-ref6">6</xref>] . Consequently, the microgrid losses are minimized when the powers of the nodes are kept constant and when the power generation of the Slack is minimized.</p><p>According to the previous idea, function f(x, u) is going to be the Slack node power of the microgrid. Equality restrictions g(x, u) of Equation (1) will be the typical power equations which define each node in a power system [<xref ref-type="bibr" rid="scirp.50894-ref19">19</xref>] :</p><disp-formula id="scirp.50894-formula1564"><label>(3)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/3-6201721x12.png"  xlink:type="simple"/></disp-formula><disp-formula id="scirp.50894-formula1565"><label>(4)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/3-6201721x13.png"  xlink:type="simple"/></disp-formula><p>The inequality restrictions (5) are the minimum and maximumvoltages allowed on themicrogrid. Considering that the proposed OPF is particularly for low voltage microgrids and also that for the Colombian case, this levels are 120/208 with limits of +5% (126) y −10% (108) [<xref ref-type="bibr" rid="scirp.50894-ref20">20</xref>] :</p><disp-formula id="scirp.50894-formula1566"><label>(5)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/3-6201721x14.png"  xlink:type="simple"/></disp-formula><p>Finally, Equation (6) represents the formulation of an OPF to improve the voltage profiles and reduce the active power losses in a low voltage electrical microgrid.</p><disp-formula id="scirp.50894-formula1567"><label>(6)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/3-6201721x15.png"  xlink:type="simple"/></disp-formula><p>where</p><disp-formula id="scirp.50894-formula1568"><graphic  xlink:href="http://html.scirp.org/file/3-6201721x16.png"  xlink:type="simple"/></disp-formula></sec><sec id="s3_3"><title>3.3. Mathematical Algorithm for OPF Based on the Gradient Method for an Electrical Microgrid</title><p>In [<xref ref-type="bibr" rid="scirp.50894-ref10">10</xref>] , they are based on an equation named Lagrangian (7) to solve OPF, which has a Lagrange multiplier λ.</p><disp-formula id="scirp.50894-formula1569"><label>(7)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/3-6201721x17.png"  xlink:type="simple"/></disp-formula><p>If minimun necessary conditions or Karush Kunh-Tucker conditions are applied to Equation (7) [<xref ref-type="bibr" rid="scirp.50894-ref11">11</xref>] , the systems of Equations (8), (9) and (10) are obtained. Optimal microgrid solution is determined by solving the equations system.</p><disp-formula id="scirp.50894-formula1570"><label>(8)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/3-6201721x18.png"  xlink:type="simple"/></disp-formula><disp-formula id="scirp.50894-formula1571"><label>(9)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/3-6201721x19.png"  xlink:type="simple"/></disp-formula><disp-formula id="scirp.50894-formula1572"><label>(10)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/3-6201721x20.png"  xlink:type="simple"/></disp-formula><p>The gradient in (9) measures the sensitivity of the objective function with regard to the changes in control variables. Originating at an opposite direction to the gradient, a minimum feasible point with a lower function value is reached [<xref ref-type="bibr" rid="scirp.50894-ref11">11</xref>] . Repeating this process leads to the optimal solution of a system.</p><p>The new control values are updated by (11) to continue the iterations until the error will reduce to a minimum.</p><disp-formula id="scirp.50894-formula1573"><label>(11)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/3-6201721x21.png"  xlink:type="simple"/></disp-formula><p>In Equation (11), the variable is the value that determines the step size that should result from the algorithmin the opposite directionto the gradient. If a low value for c is chosen, a convergence is ensured, however it makes that a lot of iterations be necessary. Instead, if a high value for c is chosen, it will produce oscillations around the optimum [<xref ref-type="bibr" rid="scirp.50894-ref10">10</xref>] .</p></sec></sec><sec id="s4"><title>4. Case of Study</title><sec id="s4_1"><title>4.1. Electrical Microgrid Proposed</title><p><xref ref-type="fig" rid="fig4">Figure 4</xref> shows the proposed microgrid for the case of study. This system is proposed for its simplicity and the presence of an unconventional generator. The microgrid has a power of 800 w, which is fed by the main grid and a photovoltaic generator, which to a specific temperature and irradiance generates 450 w (interconnected microgrid).</p><p>In order to illustrate the improvements in the system with the OPF, <xref ref-type="fig" rid="fig5">Figure 5</xref> shows the losses of active power before (13.1589) and after (11.7640) the application of the algorithm.</p></sec><sec id="s4_2"><title>4.2. Application of the Algorithm and Results</title><p>The mathematical algorithm of the proposed OPF was developed in Matlab, selecting different values for the</p><fig id="fig4"  position="float"><label><xref ref-type="fig" rid="fig4">Figure 4</xref></label><caption><title> Microgrid for the case of study</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/3-6201721x22.png"/></fig><fig id="fig5"  position="float"><label><xref ref-type="fig" rid="fig5">Figure 5</xref></label><caption><title> Microgrid losses before and after the OPF implementation</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/3-6201721x23.png"/></fig><p>step size (c = 0.1, c = 0.3 and c = 1.38) with an error tolerance of 0.0001 (ε = 0.0001).</p><p>The mathematical algorithm minimizes the difference between the power generated by the grid and the photovoltaic panel, so that losses are minimized. The results show that there is a range of values that minimizes microgrid losses, which is shown in (12). This occurs because the rate of change of the voltage decreases each iteration, until the point where a change in the control variables exerts a change in the power of the Slack node.</p><disp-formula id="scirp.50894-formula1574"><label>(12)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/3-6201721x24.png"  xlink:type="simple"/></disp-formula><p>The results with different step sizes were the following (<xref ref-type="table" rid="table1">Table 1</xref>):</p><p>As shown in <xref ref-type="table" rid="table1">Table 1</xref>, the number of iterations required to reach the optimum of the system depends on the size of step (c) chosen. Selecting a value c = 0.1 the algorithm meets the limit of error in 22 iterations; however, if this value increases to 0.3, iterations will be reduced to 8. If the step size increases highly (c = 1.38), the algorithm will present a premature convergence with only 4 iterations generating oscillations.</p></sec><sec id="s4_3"><title>4.3. Voltage Profiles and Active Power Losses</title><p>In order to verify the obtained results in the microgrid, an analysis of profile voltages and system losses was realized by means of power flows through the Newton-Raphson method in Power System Analysis Toolbox (PSAT) by Matlab. The results are represented by <xref ref-type="fig" rid="fig6">Figure 6</xref> and <xref ref-type="fig" rid="fig7">Figure 7</xref>.</p><p>To examine the voltage profiles in the microgrid, power flows for different cases which can be present in the system were realized, considering the limits in Equation (8), subsequently comparing graphically with the optimal values found with the OPF.</p><p>The cases mentioned above are shown in <xref ref-type="table" rid="table2">Table 2</xref>. The voltage profiles of the microgrid are illustrated in</p><table-wrap id="table1" ><label><xref ref-type="table" rid="table1">Table 1</xref></label><caption><title> Results with different step sizes</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >Step Size</th><th align="center" valign="middle" >Iterations</th><th align="center" valign="middle" >Voltage FV</th><th align="center" valign="middle" >Range</th><th align="center" valign="middle" >Active Power Losses</th></tr></thead><tr><td align="center" valign="middle" >0.1</td><td align="center" valign="middle" >22</td><td align="center" valign="middle" >121.1844</td><td align="center" valign="middle" >118.5917</td><td align="center" valign="middle" >11.7640</td></tr><tr><td align="center" valign="middle" >0.3</td><td align="center" valign="middle" >8</td><td align="center" valign="middle" >121.1862</td><td align="center" valign="middle" >118.6264</td><td align="center" valign="middle" >11.7640</td></tr><tr><td align="center" valign="middle" >1.38</td><td align="center" valign="middle" >4</td><td align="center" valign="middle" >121.1540</td><td align="center" valign="middle" >118.2228</td><td align="center" valign="middle" >11.8089</td></tr></tbody></table></table-wrap><fig id="fig6"  position="float"><label><xref ref-type="fig" rid="fig6">Figure 6</xref></label><caption><title> Microgrid voltage profiles</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/3-6201721x25.png"/></fig><fig id="fig7"  position="float"><label><xref ref-type="fig" rid="fig7">Figure 7</xref></label><caption><title> Microgrid active power losses</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/3-6201721x26.png"/></fig><table-wrap id="table2" ><label><xref ref-type="table" rid="table2">Table 2</xref></label><caption><title> Case of study for voltage profiles in the microgrid</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >CASE 1 (V1 = 126, V2 = 108)</th><th align="center" valign="middle" >CASE 14 (V1 = 120, V2 = 114.5)</th></tr></thead><tr><td align="center" valign="middle" >CASE 2 (V1 = 125.5, V2 = 108.5)</td><td align="center" valign="middle" >CASE 15 (V1 = 120, V2 = 115)</td></tr><tr><td align="center" valign="middle" >CASE 3 (V1 = 125, V2 = 109)</td><td align="center" valign="middle" >CASE 16 (V1 = 120, V2 = 115.5)</td></tr><tr><td align="center" valign="middle" >CASE 4 (V1 = 124.5, V2 = 109.5)</td><td align="center" valign="middle" >CASE 17 (V1 = 120, V2 = 116)</td></tr><tr><td align="center" valign="middle" >CASE 5 (V1 = 124, V2 = 110)</td><td align="center" valign="middle" >CASE 18 (V1 = 120, V2 = 116.5)</td></tr><tr><td align="center" valign="middle" >CASE 6 (V1 = 123.5, V2 = 110.5)</td><td align="center" valign="middle" >CASE 19 (V1 = 120, V2 = 117)</td></tr><tr><td align="center" valign="middle" >CASE 7 (V1 = 123, V2 = 111)</td><td align="center" valign="middle" >CASE 20 (V1 = 120, V2 = 117.5)</td></tr><tr><td align="center" valign="middle" >CASE 8 (V1 = 122.5, V2 = 111.5)</td><td align="center" valign="middle" >CASE 21 (V1 = 120, V2 = 118)</td></tr><tr><td align="center" valign="middle" >CASE 9 (V1 = 122, V2 = 112)</td><td align="center" valign="middle" >CASE 22 (V1 = 120, V2 = 118.5)</td></tr><tr><td align="center" valign="middle" >CASE 10 (V1 = 121.5, V2 = 112.5)</td><td align="center" valign="middle" >CASE 23 (V1 = 120, V2 = 119)</td></tr><tr><td align="center" valign="middle" >CASE 11 (V1 = 121, V2 = 113)</td><td align="center" valign="middle" >CASE 24 (V1 = 120, V2 = 120)</td></tr><tr><td align="center" valign="middle" >CASE 12 (V1 = 120.5, V2 = 113.5)</td><td align="center" valign="middle" >CASE 25 &#211;PTIMAL (V1 = 121.1959, V2 = 118.5686)</td></tr><tr><td align="center" valign="middle" >CASE 13 (V1 = 120, V2 = 114)</td><td align="center" valign="middle" ></td></tr></tbody></table></table-wrap><p><xref ref-type="fig" rid="fig7">Figure 7</xref>. In this figure, the flattening of the curve (black straight) with the optimal voltage values determined by the OPF can be observed (Case 25).</p><p>The analysis of losses was performed in the same way that the voltage profiles, executing various power flows for cases described on <xref ref-type="table" rid="table2">Table 2</xref> and comparing with the resulting values of the OPF. As <xref ref-type="fig" rid="fig7">Figure 7</xref> shows, the losses decrease when the optimal voltages are applied (V1 = 121.1844 v and V2 = 118.5517) compared to normal operating conditions (V1 = 120 v and V2 = 120 v). The black dot indicates the maximum reduction of system losses.</p></sec></sec><sec id="s5"><title>5. Conclusions</title><p>The state of art concerning the OPF and its application in microgrids, reveals that despite of the significant development in this field, the studies developed in microgrids (isolated or interconnected) with photovoltaic generation has not been investigated in a substantial way.</p><p>An OPF can improve parameters in microgrids as voltage profiles and thus the active power losses. These factors take a leading role in the efficiency, quality, and reliability of an electric system.</p><p>Due to the ability to change of the proposed OPF, this method can be applied to low voltage electrical microgrids. In addition, the implemented mathematical algorithm has a lower complexity, compared to methods based on genetic and artificial intelligence algorithms.</p><p>The proposed algorithm reduces the active power losses and improves the voltage profiles with a minimal error. Additionally, the method ensures the convergence, which can be improved by modifying the step size c of the algorithm.</p><p>By changing the equation of the objective function, the proposed method can optimize or improve any parameter into an electrical microgrid considering that math is the same for all conditions.</p></sec></body><back><ref-list><title>References</title><ref id="scirp.50894-ref1"><label>1</label><mixed-citation publication-type="other" xlink:type="simple">Antonio, G.E. (2003) Sistemas El&amp;#233;ctricos de Potencia. Pearson Education, Madrid.</mixed-citation></ref><ref id="scirp.50894-ref2"><label>2</label><mixed-citation publication-type="other" xlink:type="simple">Fernandez, G., Cesar, J., Lopez, F. and Smith, E. (2011) Modelo de flujo optimo de carga utilizando tecnicas de optimizacion. Universidad Centroamericana “Jos&amp;#233; Simeon Ca&amp;#241;as”.</mixed-citation></ref><ref id="scirp.50894-ref3"><label>3</label><mixed-citation publication-type="other" xlink:type="simple">Lee, Y.-D., Chang, Y.-R., Chan, C.-M. and Ho, Y.-H. (2012) Preliminary Implementation of Microgrid with Photovoltaic and Microturbine of Stand Alone Operation. Industry Applications Society Annual Meeting, Las Vegas, 7-11 October 2012, 1-9.</mixed-citation></ref><ref id="scirp.50894-ref4"><label>4</label><mixed-citation publication-type="other" xlink:type="simple">Levron, Y., Guerero, J.M. and Beck, Y. (2013) Optimal Power Flow in Microgrids with Energy Storage. IEEE Transactionon on Power System, 28, 3226-3234.</mixed-citation></ref><ref id="scirp.50894-ref5"><label>5</label><mixed-citation publication-type="other" xlink:type="simple">Dall′Anese, E., Zhu, H. and Giannakis, G.B. (2013) Distributed Optimal Power Flow for Smart Microgrids. IEEE Transactions on Smart Grid, 4.</mixed-citation></ref><ref id="scirp.50894-ref6"><label>6</label><mixed-citation publication-type="other" xlink:type="simple">Pu, W. and Lemmon, M.D. (2010) Optimal Power Flow in Microgrids Using Evente-Triggered Optimization. American Control Conference (ACC), Baltimore, 30 June-2 July 2010, 2521-2526.</mixed-citation></ref><ref id="scirp.50894-ref7"><label>7</label><mixed-citation publication-type="other" xlink:type="simple">Roa-Sepulveda, B.J. and Pavez-Lazo, C.A. (2001) A Solution to the Optimal Flow Using Simulated Annelating. IEEE Porto Power Tech Conference.</mixed-citation></ref><ref id="scirp.50894-ref8"><label>8</label><mixed-citation publication-type="other" xlink:type="simple">Sortomme, E. and El-Sharkawi, M.A. (2009) Optimal Power Flow for a System of Microgrids. Power Systems Conference and Exposition, Seattle, 15-18 March 2009, 1-5.</mixed-citation></ref><ref id="scirp.50894-ref9"><label>9</label><mixed-citation publication-type="other" xlink:type="simple">Magashvaran, R., Raglend, I.J., Yuvaraj, V., Rizwankhan, P.G., Vijayakumar, T. and Sudheera (2006) Implementation of Non-Traditional Optimization Techniques (PSO, CPSO, HDE) for the Optimal Load Flow Solution. TENCON 2008—2008 IEEE Region 10 Conference, Hyderabad, 19-21 November 2008, 1-6.</mixed-citation></ref><ref id="scirp.50894-ref10"><label>10</label><mixed-citation publication-type="other" xlink:type="simple">Dommel, H.W. and Tinney, W.F. (1968) Optimal Power Flow Solution. IEEE Transactionon on Power Apparatus and System, October 1968, 1866-1876.</mixed-citation></ref><ref id="scirp.50894-ref11"><label>11</label><mixed-citation publication-type="other" xlink:type="simple">Lopez Lezema, J.M. and Gallego Pareja, L.A. (2008) Flujo de Potencia &amp;#243;ptimo Usando el M&amp;#233;todo del Gradiente Para la Reducci&amp;#243;n de P&amp;#233;rdidas en Sistemas de Potencia. Ingeniería y Ciencia, 4, 71-85.</mixed-citation></ref><ref id="scirp.50894-ref12"><label>12</label><mixed-citation publication-type="other" xlink:type="simple">Kennedy, J. and Eberhart, R. (1995) Particle Swarm Optimization. Purde School of Engineering and Techology, IEEE International Conference on Neural Networks, 4, 1942-1948.</mixed-citation></ref><ref id="scirp.50894-ref13"><label>13</label><mixed-citation publication-type="other" xlink:type="simple">El-Dib, A.A., Youssef, H.K.M., El-Metwally, M.M. and Osman, Z. (2004) Load Flow Solution Using Hybrid Particle Swarm Optimization. IEEE International Conference on Electrical, Electronic and Computer Engineering, Cairo, 5-7 September 2004, 742-746.</mixed-citation></ref><ref id="scirp.50894-ref14"><label>14</label><mixed-citation publication-type="other" xlink:type="simple">Kelly, D.H. and Rashed, A.M.H. (1973) Optimal Load Flow Solution Using Lagrangian Multiplier and Hessian Matrix. IEEE Power Engineering Society, IEEE PES Winter Meeting, New York, 28 January-2 February 1973.</mixed-citation></ref><ref id="scirp.50894-ref15"><label>15</label><mixed-citation publication-type="other" xlink:type="simple">Wu, Y.C., Debs, A.S. and Marsten, R.E. (1993) A Non-Linear Programming Approach Based on an Interior Point Method for Optimal Power Flows. Planning Operation and Control of Today’s Electric Power System.</mixed-citation></ref><ref id="scirp.50894-ref16"><label>16</label><mixed-citation publication-type="other" xlink:type="simple">Fujisawa, C.H., Carvalho, M.F., Azecedo, A.T., Soares, S., Santos, E.P. and Ohishi, T. (2012) Optimal Power Flow Models Using Network Flow Method. 6th IEEE/PES Transmission and Distribution: Latin America Conference and Exposition (T &amp; D-LA), Montevideo, 3-5 September 2012, 1-7.</mixed-citation></ref><ref id="scirp.50894-ref17"><label>17</label><mixed-citation publication-type="other" xlink:type="simple">Zhu, J.Z. (2009) Optimization of Power System Operation. IEEE Press Editorial Board, Hooken.</mixed-citation></ref><ref id="scirp.50894-ref18"><label>18</label><mixed-citation publication-type="other" xlink:type="simple">Mora, H. and Alexander, J. (2012) Metodología Para el An&amp;#225;lisis T&amp;#233;cnico de la Masificaci&amp;#243;n de Los Sistemas Fotovoltaicos Como Opci&amp;#243;n de Generaci&amp;#243;n Distribuida en Redes de Baja Tensi&amp;#243;n. Doctoral Thesis, Universidad Nacional De Colombia.</mixed-citation></ref><ref id="scirp.50894-ref19"><label>19</label><mixed-citation publication-type="other" xlink:type="simple">Duncan, G. (2004) Sistemas de Potencia: Analisis y Dise&amp;#241;o. Ciencias E Ingenierías.</mixed-citation></ref><ref id="scirp.50894-ref20"><label>20</label><mixed-citation publication-type="other" xlink:type="simple">NTC 1340 (2004) Electrot&amp;#233;cnia, Tensiones y Frecuencias Nominales en Sistemas de Energia El&amp;#233;ctrica en Redes de Servicio Público. Norma T&amp;#233;cnica Colombiana.</mixed-citation></ref></ref-list></back></article>