<?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">SGRE</journal-id><journal-title-group><journal-title>Smart Grid and Renewable Energy</journal-title></journal-title-group><issn pub-type="epub">2151-481X</issn><publisher><publisher-name>Scientific Research Publishing</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.4236/sgre.2019.105009</article-id><article-id pub-id-type="publisher-id">SGRE-92570</article-id><article-categories><subj-group subj-group-type="heading"><subject>Articles</subject></subj-group><subj-group subj-group-type="Discipline-v2"><subject>Earth&amp;Environmental Sciences</subject><subject> Engineering</subject></subj-group></article-categories><title-group><article-title>
 
 
  Simulating Annealing PLL for Autonomous Microgrid Systems
 
</article-title></title-group><contrib-group><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Ehab</surname><given-names>H. E. Bayoumi</given-names></name><xref ref-type="aff" rid="aff1"><sub>1</sub></xref></contrib></contrib-group><aff id="aff1"><label>1</label><addr-line>Electrical and Electronics Engineering Department, University of Swaziland, Kwaulsini, Swaziland</addr-line></aff><pub-date pub-type="epub"><day>16</day><month>05</month><year>2019</year></pub-date><volume>10</volume><issue>05</issue><fpage>141</fpage><lpage>154</lpage><history><date date-type="received"><day>14,</day>	<month>April</month>	<year>2019</year></date><date date-type="rev-recd"><day>20,</day>	<month>May</month>	<year>2019</year>	</date><date date-type="accepted"><day>23,</day>	<month>May</month>	<year>2019</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>
 
 
  The Phase Locked Loop controller parameters are the key-point that affects the dynamic performance of the autonomous microgrid. They have to be optimally tuned to guarantee enhanced overall system stability. In this paper, two-microgrid plant with their associate PWM inverter connected to the ac main grid and the load is used as an example to demonstrate the capabilities of the proposed system. The Phase Locked Loop controller is designed and tuned using the Simulating Annealing algorithm. This algorithm is used to select the Phase Locked Loop PI controller gains with optimal percentage overshoot, rise time and settling time. The controller is tested during the transition between grid-connected and autonomous operation and in reverse order. The controller is compared with Ziegler and Nichols P and PI controllers. It shows the effectiveness and the extraordinary control response of the proposed control technique with respect to percentage overshoot, rise time and settling time control parameters compared to the conventional one.
 
</p></abstract><kwd-group><kwd>Simulating Annealing</kwd><kwd> PI Controllers</kwd><kwd> Microgrid Operations</kwd></kwd-group></article-meta></front><body><sec id="s1"><title>1. Introduction</title><p>Distributed generation (DG) resources are gaining a rapid growth connection to the utility grid, due to many factors including economics profits, environmental problems, global warming, gas emission, and tax encouragements [<xref ref-type="bibr" rid="scirp.92570-ref1">1</xref>]. Microgrids are reliable, due to their capability to island. It provides their customers with the power source to be supplied when the main ac grid is disconnected. Moreover, the microgrid should be adopted to be added to another microgrid sources and functions appropriately without any exceptional proposal [<xref ref-type="bibr" rid="scirp.92570-ref2">2</xref>]. Stability analysis for PWM-inverter microgrid is one of the apprehensions to function at the distribution level of the utility grid [<xref ref-type="bibr" rid="scirp.92570-ref3">3</xref>] [<xref ref-type="bibr" rid="scirp.92570-ref4">4</xref>] [<xref ref-type="bibr" rid="scirp.92570-ref5">5</xref>] [<xref ref-type="bibr" rid="scirp.92570-ref6">6</xref>] [<xref ref-type="bibr" rid="scirp.92570-ref7">7</xref>]. Although, active-power/frequency and reactive-power/voltage drop controls have been introduced to permit the microgrid sources to share power and preserve stability without the necessity for fast communications [<xref ref-type="bibr" rid="scirp.92570-ref1">1</xref>].</p><p>Phase locked loop (PLL) is used for synchronization [<xref ref-type="bibr" rid="scirp.92570-ref8">8</xref>]. There are some challenges in designing these PLLs. Some of them are: tuning the PLL gain parameters, its negative effects on the controller response, and coupling effects and interaction between itself and the system impedance [<xref ref-type="bibr" rid="scirp.92570-ref9">9</xref>] [<xref ref-type="bibr" rid="scirp.92570-ref10">10</xref>]. PLLs regularly engage a P or PI controller as the loop filter [<xref ref-type="bibr" rid="scirp.92570-ref11">11</xref>]. The classical controller has a limited potential to alleviate disturbance in PLL control loop which may exist due to a weak design or polluted grid. To develop the disturbance rejection ability of PLLs, cascading extra filters such as the moving average filter (MAF) [<xref ref-type="bibr" rid="scirp.92570-ref12">12</xref>] and the notch filters [<xref ref-type="bibr" rid="scirp.92570-ref13">13</xref>] may improve their functioning. But those filters diminish the dynamic performance of PLL as their target is to minimize their bandwidth. Another method is anticipated in [<xref ref-type="bibr" rid="scirp.92570-ref14">14</xref>] , which uses a lead compensator, an effective approach to obtain both high dynamic performance and excellent disturbance rejection. Adaptive Fuzzy is proposed in [<xref ref-type="bibr" rid="scirp.92570-ref15">15</xref>] to obtain fast and robust PLL system.</p><p>Evolutionary computations with stochastic search techniques assured to be a more brilliant method which affords a robust technique to resolve the controller parameters problem. The evolutionary computation for controller parameters identification is applied in many applications. Genetic algorithm (GA) is used to find out the controller parameters of the BLDC motor [<xref ref-type="bibr" rid="scirp.92570-ref16">16</xref>]. An evolutionary algorithm based on Particle Swarm Optimization (PSO) with weighting factors has been introduced for induction motor controllers’ parameters [<xref ref-type="bibr" rid="scirp.92570-ref17">17</xref>]. It should be noted that even the most successful nature-inspired optimization techniques, such as GA and PSO, are also sensitive to the increase of the problem difficulty and dimensionality, due to their stochastic type [<xref ref-type="bibr" rid="scirp.92570-ref18">18</xref>]. In previous years, more awareness is provided to bacterial foraging optimization (BFO) which has a powerful foundation for engineering applications. A few models have been achieved to signify bacterial foraging performances and use it for solving different challenges [<xref ref-type="bibr" rid="scirp.92570-ref19">19</xref>]. It solved these engineering challenges effectively.</p><p>In this paper, the simulating annealing (SA) technique is used to select the PLL PI-controller gains with a minimal percentage overshoot, rising time and settling time. These control parameters are having sensitive values that affect the dynamic performance of the autonomous microgrid. They have to be optimally adjusted to assure great improvement in the overall system stability. It organized as follows: Section 2 introduces the microgrid proposed system description. The problem formulation is given in Section 3. It includes inverter-main grid model, PLL model and system control methodology. In Section 4, the SA proposed technique is introduced. Results are given in Section 5. Finally, conclusions are presented in Section 6.</p></sec><sec id="s2"><title>2. System Description</title><p>The overall block diagram for proposed autonomous microgrid system is given in <xref ref-type="fig" rid="fig1">Figure 1</xref>. It is consisting of two dc microgrids each is feeding a PWM inverter. Both are connected to the load and the main ac grid through transmission lines, transformers and circuit breaker. The two microgrids is connected to the main grid through circuit breaker, therefore it is certainly islanded by opening this circuit breaker (CB). In the islanding mode, the microgrids will continue serving the loads without any interruption. The two microgrids are able to resynchronize with the main grid when the islanding condition is cancelled.</p></sec><sec id="s3"><title>3. Problem Formulation</title><p>The proposed control block diagram is shown in <xref ref-type="fig" rid="fig2">Figure 2</xref>. The idea is based on frequency and phase detection using the phase-locked loop (PLL) combined with the traditional control for active power to frequency drop and reactive power to voltage drop of the microgrid systems.</p><p>a) Inverter-main grid model</p><p>The inverter-main grid model is illustrated in <xref ref-type="fig" rid="fig3">Figure 3</xref>. The phase ac voltages at the terminal of the PWM inverter is V i ∠ δ i and the terminal bus that is connected to the main ac grid is V t ∠ δ t . Their phase angles ( δ i , δ t ) are calculated with respect to the main grid sinusoidal waveform at the nominal frequency. The two busses are connected via a transformer and a transmission line, the overall impedance for them will j X = j X T r a n s + j X T L 2 .</p><p>b) Phase-locked loop model</p><p>The Block diagram for the PLL is illustrated in <xref ref-type="fig" rid="fig4">Figure 4</xref>. The concept is: the three-phase voltage (abc) are transformed into two phase-voltage (αβ) and then into two dc voltages (dq). The d-voltage component is the input to the PLL loop. The angle δ p is the estimate output of the phase angle given by the PLL loop. The V<sub>d</sub> can be expressed by:</p><p>V d = − V t sin ( δ t − δ p ) (1)</p><p>As ( δ t − δ p ) is too small, Equation (1) can be rewritten:</p><p>V d = − V t ( δ t − δ p ) (2)</p><p>The PLL frequency can be also expressed as:</p><p>δ ˙ p = ω p (3)</p><p>The loop filter for the PLL can be represented either by a P [<xref ref-type="bibr" rid="scirp.92570-ref1">1</xref>] controller or PI controller [<xref ref-type="bibr" rid="scirp.92570-ref20">20</xref>].</p><p>c) System control methodology</p><p>The main control goals are to adjust the terminal bus voltage magnitude and the active power provided to the ac main grid P<sub>Gen</sub>. The mathematical model describes the control idea of the autonomous microgrid system is given in [<xref ref-type="bibr" rid="scirp.92570-ref1">1</xref>]. Which can be summarized by the following equations and described in <xref ref-type="fig" rid="fig5">Figure 5</xref>:</p><p>m ˙ = K m ( V s e t − V t )</p><p>θ ˙ = K θ ( P s e t − P G e n )</p><p>x ˙ = K 3 ( δ t − δ p )</p><p>δ ˙ p = ω p</p><p>0 = V i − m V d c V b a s e (4)</p><p>0 = P s e t − ( P o − R ω p )</p><p>0 = θ − ( δ i − δ p )</p><p>0 = x − ( ω p − K 4 θ )</p><p>0 = P G e n − V d c I i n v P b a s e</p><p>where,</p><p>m : the modulation index of the PWM inverter</p><p>K m : PWM inverter constant for integral control</p><p>V s e t : voltage constant follow a droop characteristic that is function on the grid power</p><p>θ : the phase angle difference between the inverter angle and the PLL angle</p><p>K θ : active power constant for integral control</p><p>P s e t : active power depend on droop characteristic</p><p>P o : nominal active power output of the microgrid</p><p>R : droop constant</p><p>V d c : dc voltage output from the PWM inverter</p><p>I i n v : PWM inverter output current</p><p>V b a s e : per-unit base voltage for the dc bus and PWM inverter</p><p>P b a s e : per-unit base active power for the dc bus and PWM inverter</p><p>In [<xref ref-type="bibr" rid="scirp.92570-ref1">1</xref>] the mathematical model in Equation (4) is used and implemented as seen in <xref ref-type="fig" rid="fig5">Figure 5</xref>. The loop filter employed in method (1) was P-controller as illustrated in <xref ref-type="fig" rid="fig5">Figure 5</xref>. In the second method the loop filter used was PI-controller and the block diagram is simplified as shown in <xref ref-type="fig" rid="fig6">Figure 6</xref> [<xref ref-type="bibr" rid="scirp.92570-ref20">20</xref>].</p></sec><sec id="s4"><title>4. Proposed Control Technique</title><p>In <xref ref-type="fig" rid="fig6">Figure 6</xref>, there are two controllers one for the PLL and the other for the active power. A PI controller is used for the PLL loop, while a P controller is used for the active power loop. The gains for both controllers are tuned via evolutionary methods based on simulating annealing techniques. The tuned gains are guaranteed high-quality control responses for these controllers in regard of optimizing the control response parameters; minimum over-shot, rise-time and settling time control.</p><p>a) Simulating Annealing</p><p>Simulated Annealing (SA) is a straightforward efficient optimization technique presented in [<xref ref-type="bibr" rid="scirp.92570-ref21">21</xref>]. The function to be optimized in SA is called the energy, E(x), of the state x, and at the same point, the computational temperature (T), is dropped throughout the process. SA is an iterative trail algorithm that preserves a single candidate solution at any time [<xref ref-type="bibr" rid="scirp.92570-ref22">22</xref>]. Moreover, the main benefit of using SA is its capability to prevent being stuck in local optima. SA has been examined and showed a well performance in a variety of single-objective and multi-objective optimization application [<xref ref-type="bibr" rid="scirp.92570-ref23">23</xref>] [<xref ref-type="bibr" rid="scirp.92570-ref24">24</xref>].</p><p>The SA is used to optimize P and PI controller parameters of the active power and the PLL respectively. It is a multi-objective optimization problem as three step response parameters are simultaneously adjusted. In the proposed system, SA will accept a transition that leads to a decrease in all objectives (overshoot, rise time and settling time) or a decrease in one of the objectives if other objectives are not changed. SA will also accept a transition from state S<sub>1</sub> to S<sub>2</sub> if S<sub>2</sub> does not dominate S<sub>1</sub> with a probability of e − Δ f / T , where Δ f = f ( S 2 ) − f ( S ) , and T is the temperature parameter which is being reduced over time during the process in order to decrease the possibility of accepting such transitions. The SA proposed approach for the PI-controller gains selection is summarized in flowchart shown in <xref ref-type="fig" rid="fig7">Figure 7</xref>.</p></sec><sec id="s5"><title>5. Results</title><p>The microgrid proposed system in <xref ref-type="fig" rid="fig1">Figure 1</xref> is used to demonstrate and test the dynamic behavior of the components of this system. All the ac quantities used in this system is articulated in per-unit values. The base values are given in <xref ref-type="table" rid="table1">Table 1</xref>.</p><p>In the proposed system, the set values for different elements are shown in <xref ref-type="table" rid="table2">Table 2</xref>.</p><table-wrap id="table1" ><label><xref ref-type="table" rid="table1">Table 1</xref></label><caption><title> Base value used in the proposed system</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >Quantity</th><th align="center" valign="middle" >Base value</th><th align="center" valign="middle" >Description</th></tr></thead><tr><td align="center" valign="middle" >Power</td><td align="center" valign="middle" >100 kVA</td><td align="center" valign="middle" >Is used for the inverter and the grid</td></tr><tr><td align="center" valign="middle" >Voltage</td><td align="center" valign="middle" >240 V</td><td align="center" valign="middle" >DC bus and the inverter</td></tr></tbody></table></table-wrap><table-wrap id="table2" ><label><xref ref-type="table" rid="table2">Table 2</xref></label><caption><title> Set values of the proposed system</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >Element</th><th align="center" valign="middle" >Value</th></tr></thead><tr><td align="center" valign="middle" >Plant 1 power set point</td><td align="center" valign="middle" >0.7 pu (70 kW)</td></tr><tr><td align="center" valign="middle" >Plant 2 power set point</td><td align="center" valign="middle" >0.6 pu (60 kW)</td></tr><tr><td align="center" valign="middle" >Load power</td><td align="center" valign="middle" >1.7+ j 0.6 pu</td></tr><tr><td align="center" valign="middle" >Grid voltage</td><td align="center" valign="middle" >1 pu</td></tr></tbody></table></table-wrap><p>The parameters of the two-PWM inverters and the PLL used in [<xref ref-type="bibr" rid="scirp.92570-ref1">1</xref>] are given <xref ref-type="table" rid="table3">Table 3</xref>. The controller parameters selected by SA is illustrated in <xref ref-type="table" rid="table4">Table 4</xref>.</p><p>The main test is implemented as given in [<xref ref-type="bibr" rid="scirp.92570-ref1">1</xref>] on the proposed system, the test scenario is as follows:</p><p>1) The CB connected to the grid is initially closed.</p><p>2) The two microgrids plants supply 1.3 pu of the active power demand by the load.</p><p>3) The remaining 0.4 pu active power is drawn from the main grid.</p><p>4) At t = 1 sec, the CB is opens and the total load has to be supplied by the two-microgrids plants.</p><p>5) At t = 7 sec, the CB is signaled to close, but closing is prevented until the voltage magnitude across the CB contacts reduces to the threshold 0.05 pu<sup>3</sup>.</p><p>6) At t = 13.01 sec, the CB contacts are closed.</p><p>This test scenario is done for three PLL cases, case (1) is for PLL P-controller as in [<xref ref-type="bibr" rid="scirp.92570-ref1">1</xref>] and case two for PLL PI-controller designed by Ziegler and Nichols, and the proposed technique in case (3) is for PLL SAPI-controller in which the maximum overshot, rising time, and settling time parameters of the controlled parameter response is minimized.</p><p>Tuning the PLL controller parameters is a vital process in autonomous microgrid plants as it will reflects on many parameters response in these systems, as power, current and voltage. In this paper, the up given test scenario is done, and the results are given in Figures 8-11. <xref ref-type="fig" rid="fig8">Figure 8</xref> shows the power delivered by each PWM inverters in the three-cases. In <xref ref-type="fig" rid="fig8">Figure 8</xref>(a) it shows the power delivered by the two plants, up is plant 1 and down is plant 2. Note that, Plant 1 has a higher set point than Plant 2. Therefore, the overshoot in Plant 1 for case (1) and case (2) is higher than in Plant 2 as shown in <xref ref-type="fig" rid="fig8">Figure 8</xref>(b) and <xref ref-type="fig" rid="fig8">Figure 8</xref>(c). Although, in the proposed technique (case (3)), the both plants have dead beat responses. Based on <xref ref-type="fig" rid="fig8">Figure 8</xref> result, a comparison between overshoot, rise-time and settling-time parameters for the three-cases are given in <xref ref-type="table" rid="table5">Table 5</xref>. Based on this comparison the proposed technique case is the best compared to the other two cases.</p><table-wrap id="table3" ><label><xref ref-type="table" rid="table3">Table 3</xref></label><caption><title> PWM inverters and PLL parameters</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >Parameters</th><th align="center" valign="middle" >Value</th></tr></thead><tr><td align="center" valign="middle" >K<sub>3</sub></td><td align="center" valign="middle" >20</td></tr><tr><td align="center" valign="middle" >K<sub>4</sub></td><td align="center" valign="middle" >10</td></tr><tr><td align="center" valign="middle" >K<sub>5</sub></td><td align="center" valign="middle" >20</td></tr><tr><td align="center" valign="middle" >R</td><td align="center" valign="middle" >0.4</td></tr><tr><td align="center" valign="middle" >X</td><td align="center" valign="middle" >0.2 pu</td></tr><tr><td align="center" valign="middle" >V<sub>set</sub></td><td align="center" valign="middle" >1 pu</td></tr><tr><td align="center" valign="middle" >Vdc</td><td align="center" valign="middle" >480 V</td></tr></tbody></table></table-wrap><table-wrap id="table4" ><label><xref ref-type="table" rid="table4">Table 4</xref></label><caption><title> SA controllers’ parameters for PLL and active power</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >Parameters</th><th align="center" valign="middle" >Value</th></tr></thead><tr><td align="center" valign="middle" >K<sub>3</sub></td><td align="center" valign="middle" >9.67</td></tr><tr><td align="center" valign="middle" >K<sub>4</sub></td><td align="center" valign="middle" >18.89</td></tr><tr><td align="center" valign="middle" >K<sub>5</sub></td><td align="center" valign="middle" >9.52</td></tr></tbody></table></table-wrap><table-wrap id="table5" ><label><xref ref-type="table" rid="table5">Table 5</xref></label><caption><title> Control index-parameters comparison based on <xref ref-type="fig" rid="fig8">Figure 8</xref></title></caption><table><tbody><thead><tr><th align="center" valign="middle"  rowspan="2"  >Plant number</th><th align="center" valign="middle"  rowspan="2"  >Controller Type</th><th align="center" valign="middle"  colspan="3"  >Control index-parameters</th></tr></thead><tr><td align="center" valign="middle" >Maximum overshoot (%)</td><td align="center" valign="middle" >Rise time (sec)</td><td align="center" valign="middle" >Settling time (sec)</td></tr><tr><td align="center" valign="middle"  rowspan="3"  >Plant 1 CB open</td><td align="center" valign="middle" >PLL P-controller</td><td align="center" valign="middle" >27.3</td><td align="center" valign="middle" >0.252</td><td align="center" valign="middle" >1.457</td></tr><tr><td align="center" valign="middle" >PLL PI-controller</td><td align="center" valign="middle" >11.05</td><td align="center" valign="middle" >0.215</td><td align="center" valign="middle" >0.982</td></tr><tr><td align="center" valign="middle" >PLL SAPI-controller</td><td align="center" valign="middle" >2.05</td><td align="center" valign="middle" >0.162</td><td align="center" valign="middle" >0.213</td></tr><tr><td align="center" valign="middle"  rowspan="3"  >Plant 1 CB close</td><td align="center" valign="middle" >PLL P-controller</td><td align="center" valign="middle" >25</td><td align="center" valign="middle" >0.231</td><td align="center" valign="middle" >1.41</td></tr><tr><td align="center" valign="middle" >PLL PI-controller</td><td align="center" valign="middle" >10</td><td align="center" valign="middle" >0.212</td><td align="center" valign="middle" >0.972</td></tr><tr><td align="center" valign="middle" >PLL SAPI-controller</td><td align="center" valign="middle" >1.98</td><td align="center" valign="middle" >0.159</td><td align="center" valign="middle" >0.208</td></tr><tr><td align="center" valign="middle"  rowspan="3"  >Plant 2CB open</td><td align="center" valign="middle" >PLL P-controller</td><td align="center" valign="middle" >22.1</td><td align="center" valign="middle" >0.243</td><td align="center" valign="middle" >1.402</td></tr><tr><td align="center" valign="middle" >PLL PI-controller</td><td align="center" valign="middle" >9.56</td><td align="center" valign="middle" >0.187</td><td align="center" valign="middle" >0.971</td></tr><tr><td align="center" valign="middle" >PLL SAPI-controller</td><td align="center" valign="middle" >1.92</td><td align="center" valign="middle" >0.129</td><td align="center" valign="middle" >0.195</td></tr><tr><td align="center" valign="middle"  rowspan="3"  >Plant 2CB close</td><td align="center" valign="middle" >PLL P-controller</td><td align="center" valign="middle" >21.11</td><td align="center" valign="middle" >0.241</td><td align="center" valign="middle" >1.398</td></tr><tr><td align="center" valign="middle" >PLL PI-controller</td><td align="center" valign="middle" >9.23</td><td align="center" valign="middle" >0.181</td><td align="center" valign="middle" >0.962</td></tr><tr><td align="center" valign="middle" >PLL SAPI-controller</td><td align="center" valign="middle" >1.89</td><td align="center" valign="middle" >0.127</td><td align="center" valign="middle" >0.194</td></tr></tbody></table></table-wrap><p>The PLL frequency deviation for the two microgrid PWM inverters in the three cases is illustrated in <xref ref-type="fig" rid="fig9">Figure 9</xref>. The PLL SAPI-controller gives the best response from the three selected control parameters (percentage of maximum overshoot, rise time and settling time).</p><p>Moreover, the proposed technique in <xref ref-type="fig" rid="fig8">Figure 8</xref>, and <xref ref-type="fig" rid="fig9">Figure 9</xref> are characterized by a deadbeat response which reflects the effectiveness realization of the proposed SAPI-controller designed in this paper.</p><p><xref ref-type="fig" rid="fig1">Figure 1</xref>0 presents the microgrid Plant 1 PWM inverter angle with respect to synchronous reference in the three cases. It also shows that the PLL angle strictly tracks the terminal bus angle. The differences between these quantities is provides obviously in <xref ref-type="fig" rid="fig1">Figure 1</xref>1. It has been shown that the PLL SAPI-controller is the best and the fast to derive this difference to zero. Although, when the CB is closes, the subsequent phase shift in the PWM inverter terminal bus voltage</p><p>produces a spike in the angle difference across the PWM inverter and the transformer. That spike in angle difference is similar to spike in active power P<sub>gen</sub> detected in <xref ref-type="fig" rid="fig8">Figure 8</xref>. In practice, the transformer inductance would limit most of these spikes.</p></sec><sec id="s6"><title>6. Conclusions</title><p>Autonomous microgrid is being rapidly connected to the utility grid at the distribution level. For enhancing and improving the microgrid dynamic performance,</p><p>the active load needs to be synchronized with it. The phase locked loop (PLL) is used for this purpose. The main challenge in designing the PLL is tuning the gains for PLL active loop filter. In this paper, an example of two microgrids connected to the utility grid and the load is proposed. The dynamic model of the proposed system is given. The interaction between the dynamics of PWM inverter of any of the microgrid and the PLL can introduce oscillations. The gain selection of the PLL PI control is done by simulating annealing (SA) technique that granted minimal overshoot, rise time and settling time. The proposed PLL SAPI-controller provides and extraordinary response with these features. Results confirm the effectiveness of the proposed PLL controller to enrich the system dynamics and acts as a platform for autonomous microgrid systems.</p></sec><sec id="s7"><title>Conflicts of Interest</title><p>The author declares no conflicts of interest regarding the publication of this paper.</p></sec><sec id="s8"><title>Cite this paper</title><p>Bayoumi, E.H.E. (2019) Simulating Annealing PLL for Autonomous Microgrid Systems. Smart Grid and Renewable Energy, 10, 141-154. https://doi.org/10.4236/sgre.2019.105009</p></sec></body><back><ref-list><title>References</title><ref id="scirp.92570-ref1"><label>1</label><mixed-citation publication-type="other" xlink:type="simple">Hiskens, I.A. and Fleming, E.M. (2008) Control of Inverter-Connected Source in Autonomous Microgrids. American Control Conference, Seattle, 11-13 June 2008, 586-590. https://doi.org/10.1109/ACC.2008.4586555</mixed-citation></ref><ref id="scirp.92570-ref2"><label>2</label><mixed-citation publication-type="other" xlink:type="simple">Kroposki, B., et al. (2008) Making Microgrids Work. IEEE Power and Energy Magazine, 6, 40-53. https://doi.org/10.1109/MPE.2008.918718</mixed-citation></ref><ref id="scirp.92570-ref3"><label>3</label><mixed-citation publication-type="other" xlink:type="simple">Raju, E. and Jain, T. (2017) Robust Optimal Centralized Controller to Mitigate the Small Signal Instability in an Islanded Inverter Based Microgrid with Active and Passive Loads. International Journal of Electrical Power &amp; Energy Systems, 90, 225-236. https://doi.org/10.1016/j.ijepes.2017.02.011</mixed-citation></ref><ref id="scirp.92570-ref4"><label>4</label><mixed-citation publication-type="other" xlink:type="simple">Han, H., Hou, X., Yang, J., Wu, J., Su, M. and Guerrero, J.M. (2016) Review of Power Sharing Control Strategies Forislanding Operation of AC Microgrids. IEEE Transactions on Smart Grid, 7, 200-215. https://doi.org/10.1109/TSG.2015.2434849</mixed-citation></ref><ref id="scirp.92570-ref5"><label>5</label><mixed-citation publication-type="other" xlink:type="simple">Chandorkar, M., Divan, D. and Adapa, R. (1993) Control of Parallel-Connected Inverters in Standalone AC Supply Systems. IEEE Transactions on Industry Applications, 29, 136-143. https://doi.org/10.1109/28.195899</mixed-citation></ref><ref id="scirp.92570-ref6"><label>6</label><mixed-citation publication-type="other" xlink:type="simple">Olivares, D., Mehrizi-Sani, A., Etemadi, A.H., Ca&amp;ntilde;izares, C.A., Iravani, R., Kazerani, M., Hajimiragha, A.H., Gomis-Bellmunt, O., Saeedifard, M., Palma-Behnke, R., et al. (2014) Trends in Microgrid Control. IEEE Transactions on Smart Grid, 5, 1905-1919. https://doi.org/10.1109/TSG.2013.2295514</mixed-citation></ref><ref id="scirp.92570-ref7"><label>7</label><mixed-citation publication-type="other" xlink:type="simple">Tsikalakis, A. and Hatziargyriou, N. (2011) Centralized Control for Optimizing Microgrids Operation. Proceedings of the IEEE Power and Energy Society General Meeting, San Diego, 24-29 July 2011, 1-8. https://doi.org/10.1109/PES.2011.6039737</mixed-citation></ref><ref id="scirp.92570-ref8"><label>8</label><mixed-citation publication-type="other" xlink:type="simple">Hassan, M.A., Worku, M.Y. and Abido, M.A. (2018) Optimal Design and Real Time Implementation of Autonomous Microgrid Including Active Load. Energies Journal, 11, 1109. https://doi.org/10.3390/en11051109</mixed-citation></ref><ref id="scirp.92570-ref9"><label>9</label><mixed-citation publication-type="other" xlink:type="simple">Dong, D., Wen, B., Boroyevich, D., Mattavelli, P. and Xue, Y. (2015) Analysis of Phase-Locked Loop Low-Frequency Stability in Three-Phase Grid-Connected Power Converters Considering Impedance Interactions. IEEE Transactions on Industrial Electronics, 62, 310-321. https://doi.org/10.1109/TIE.2014.2334665</mixed-citation></ref><ref id="scirp.92570-ref10"><label>10</label><mixed-citation publication-type="other" xlink:type="simple">Svensson, J. (2001) Synchronization Methods for Grid-Connected Voltage Source Converters. IEEE Proceedings of Generation Transmission and Distribution, 148, 229-235. https://doi.org/10.1049/ip-gtd:20010101</mixed-citation></ref><ref id="scirp.92570-ref11"><label>11</label><mixed-citation publication-type="other" xlink:type="simple">Golestan, S., Monfared, M., Freijedo, F. and Guerrero, J. (2013) Advantages and Challenges of a Type-3 PLL. IEEE Transactions on Power Electronics, 28, 4985-4997.  
https://doi.org/10.1109/TPEL.2013.2240317</mixed-citation></ref><ref id="scirp.92570-ref12"><label>12</label><mixed-citation publication-type="other" xlink:type="simple">Golestan, S., Ramezani, M., Guerrero, J.M., Freijedo, F.D. and Monfared, M. (2014) Moving Average Filter Based Phase-Locked Loops: Performance Analysis and Design Guidelines. IEEE Transactions on Power Electronics, 29, 2750-2763.  
https://doi.org/10.1109/TPEL.2013.2273461</mixed-citation></ref><ref id="scirp.92570-ref13"><label>13</label><mixed-citation publication-type="other" xlink:type="simple">Espin, F.G., Figueres, E. and Garcera, G. (2012) An Adaptive Synchronous Reference-Frame Phase-Locked Loop for Power Quality Improvement in a Polluted Utility Grid. IEEE Transactions on Industrial Electronics, 59, 2718-2731.  
https://doi.org/10.1109/TIE.2011.2166236</mixed-citation></ref><ref id="scirp.92570-ref14"><label>14</label><mixed-citation publication-type="other" xlink:type="simple">Freijedo, F.D., Yepes, A.G., Lopez, O., Vidal, A. and Gondoy, J.D. (2011) Three Phase PLLs with Fast Postfault Retracking and Steady-State Rejection of Voltage Unbalance and Harmonics by Means of Lead Compensation. IEEE Transactions on Power Electronics, 26, 85-97. https://doi.org/10.1109/TPEL.2010.2051818</mixed-citation></ref><ref id="scirp.92570-ref15"><label>15</label><mixed-citation publication-type="other" xlink:type="simple">Hamed, H.A., Abdou, A.F., El-Kholy, E.E. and Bayoumi, E.H.E. (2016) Adaptive Cascaded Delayed Signal Cancelation PLL Based Fuzzy Controller under Grid Disturbances. IEEE 59th International Midwest Symposium on Circuits and Systems, Abu Dhabi, 16-19 October 2016, 1-4.  
https://doi.org/10.1109/MWSCAS.2016.7870061</mixed-citation></ref><ref id="scirp.92570-ref16"><label>16</label><mixed-citation publication-type="other" xlink:type="simple">Xia, C., Guo, P., Shi, T. and Wang, M. (2004) Speed Control of Brushless DC Motor Using Genetic Algorithm Based Fuzzy Controller. 2004 International Conference on Intelligent Mechatronics and Automation, Chengdu, 26-31 August 2004.</mixed-citation></ref><ref id="scirp.92570-ref17"><label>17</label><mixed-citation publication-type="other" xlink:type="simple">Bayoumi, E.H.E. and Soliman, H.M. (2007) PID/PI Tuning for Minimal Overshoot of Permanent-Magnet Brushless DC Motor Drive Using Particle Swarm Optimization. Electromotion Scientific Journal, 14, 198-208.</mixed-citation></ref><ref id="scirp.92570-ref18"><label>18</label><mixed-citation publication-type="other" xlink:type="simple">Kennedy, J. and Eberhart, R.C. (2001) Swarm Intelligence. Morgan Kaufmann, San Francisco.</mixed-citation></ref><ref id="scirp.92570-ref19"><label>19</label><mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Bayoumi</surname><given-names> E.H.E. </given-names></name>,<etal>et al</etal>. (<year>2010</year>)<article-title>Parameter Estimation of Cage Induction Motors Using Cooperative Bacteria Foraging Optimization</article-title><source> Electromotion Scientific Journal</source><volume> 17</volume>,<fpage> 247</fpage>-<lpage>260</lpage>.<pub-id pub-id-type="doi"></pub-id></mixed-citation></ref><ref id="scirp.92570-ref20"><label>20</label><mixed-citation publication-type="other" xlink:type="simple">Surprenant, M., Hiskens, I. and Venkataramanan, G. (2011) Phase Locked Loop Control of Inverters in a Microgrid. IEEE Energy Conversion Congress and Exposition, Phoenix, 17-22 September 2011, 667-672.  
https://doi.org/10.1109/ECCE.2011.6063833</mixed-citation></ref><ref id="scirp.92570-ref21"><label>21</label><mixed-citation publication-type="other" xlink:type="simple">Kirkpatrick, S., Gelatt Jr., C.D. and Vecchi, M.P. (1983) Optimization by Simulated Annealing. Sciences Journal, 220, 671-680.  
https://doi.org/10.1126/science.220.4598.671</mixed-citation></ref><ref id="scirp.92570-ref22"><label>22</label><mixed-citation publication-type="other" xlink:type="simple">Vega-Rodriguez, M.A., Gomez-Pulido, J.A., Alba, E., Vega-Perez, D., Priem-Mendes, S. and Molina, G. (2007) Evaluation of Different Metaheuristics Solving the RND Problem. Workshops on Applications of Evolutionary Computation, Valencia, 11-13 April 2007, 101-110. https://doi.org/10.1007/978-3-540-71805-5_11</mixed-citation></ref><ref id="scirp.92570-ref23"><label>23</label><mixed-citation publication-type="other" xlink:type="simple">Jaraiz-Simon, M.D., Gomez-Pulido, J.A., Vega-Rodriguez, M.A. and Sanchez-Perez, J.M. (2013) Simulated Annealing for Real-Time Vertical-Handoff in Wireless Networks. International Work-Conference on Artificial Neural Networks, Tenerife, 12-14 June 2003, 198-209. https://doi.org/10.1007/978-3-642-38679-4_19</mixed-citation></ref><ref id="scirp.92570-ref24"><label>24</label><mixed-citation publication-type="other" xlink:type="simple">Huang, K.-Y. and Hsieh, Y.-H. (2011) Very Fast Simulated Annealing for Pattern Detection and Seismic Applications. IEEE International Geoscience and Remote Sensing Symposium, Vancouver, 24-29 July 2011, 499-502.  
https://doi.org/10.1109/IGARSS.2011.6049174</mixed-citation></ref></ref-list></back></article>