Static Voltage Stability Analysis of an Islanded Microgrid Using Energy Function

This paper presents a new method for voltage analysis for islanded microgrids using the energy function method and a new technique based on an auxiliary function to allocate intermittent sources. The energy function allows the direct stability evaluation of the system operating points, taking into account the variation of loads, the intermittence of the photovoltaic, and the charging/discharging of energy storage systems under pre-defined conditions. The auxiliary function is applied as a planning tool, defining the weak system areas, where photovoltaics and energy storage systems can be allocated. The results show the voltage stability assessment’s effectiveness using the energy function and the improvement of the system stability condition when allocating the intermittent sources in the microgrid area indicated by the auxiliary function technique.


I. INTRODUCTION
The growing concern related to the depletion of fossil fuels, the environmental effects of greenhouse gas emissions, and the low efficiency in transmitting large blocks of energy over long distances gave support to a new concept of energy systems, the microgrids. Microgrids are active low voltage or medium voltage AC or DC distribution systems [1] containing distributed generators and Energy Storage Systems (ESSs) that can operate connected to the main grid or in islanded mode [2]- [6]. Distributed generators technologies include wind turbines, photovoltaics (PVs), microturbines, combustion turbines, cogeneration, fuel cells, and reciprocating engines. Typical energy storage systems are batteries, flywheels, and supercapacitors [7]. Distributed Generators and energy storage systems are connected to the grid via AC or DC/AC inverters since these units are either DC sources or operate at a variable frequency [8], [9]. During islanded operation, dispatchable distributed generators commonly assume droop characteristics to achieve an appropriate The associate editor coordinating the review of this manuscript and approving it for publication was Fabio Massaro .
share of load demand while regulating the system frequency and voltage [10], [11].
Voltage stability issues in a microgrid have been investigated by many researchers in the recent past, mainly in the context of load variation, renewable generation intermittency and energy storage system operation. For instance, the work in [12] analyzes the effects on voltage stability related to microgrid fault and multi-induction motors starting with different time intervals, different mechanical loads, and various capacity combinations. In [13], a voltage stability index for the islanded microgrid is proposed based on catastrophe theory and takes into consideration the intermittence of wind turbine generation and frequency deviation. In that work, the islanded microgrid is divided into clusters, and the index is applied to each system bus. The group whose bus presents a minimum stability index is identified as critical. The integration of distributed generators, which significantly changes the features of power flows and voltage profiles, poses new challenges. Voltage stability problems in distribution systems are now getting serious and drawing increasing [14].
As with transmission systems, the P-V and Q-V curves are tools for assessing the voltage stability in VOLUME 8, 2020 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ microgrids [15]- [18]. The former shows the system's maximum loadability; the latter, the amount of reactive power reserve at the system buses. It is worth noting that the voltage collapse problem is associated with the system's inability to maintain adequate reactive power support in the buses. These curves are obtained by employing a continuation power flow method. The system loadability limit corresponds to a saddlenode or limit-induced bifurcation point [19].
Voltage stability aspects such as quantifying how far the system operating point is from the voltage collapse point (distance from instability) and defining methods to increase the voltage stability margin are fundamental for the islanded microgrid planning and operation. To the best of the authors' knowledge, using the energy function methodology to assess voltage stability in microgrid has not been much exploited in the literature. The majority of the papers have addressed this topic in transmission systems [20], [21]. Initially, direct methods based on energy function were used for transient stability analysis [22], [23]. In this context, the energy expression is obtained from the set of differential equations that models the system dynamics. Only in the middle 1980s, the energy function method was employed for assessing voltage stability [24]- [26]. The energy function for steady-state voltage stability assessment is based on the static model of the power system, which can be represented by the set of algebraic equations that describe the power flow problem. In the long term voltage stability approach, the energy function measure corresponds to the difference of the potential energy between the conventional power flow solution (operating solution) and an alternative power flow solution (low voltage solution). At the collapse point, the operating solution and a particular low voltage solution (critical solution) coalesces. Thus, the system energy measure related to these two solutions is equal to zero at the critical loading point, and the system experiences a loss of stability [27].
Furthermore, the planned allocation of distributed generators can improve voltage stability. Optimum distributed generators placement considering minimization of losses, enhancement of voltage stability, and improved the voltage profile is analyzed in [28]. The authors in [29] apply a methodology based on Moth-Flame Optimization Algorithm and the loss sensitivity factor to determine the optimal locations and sizes of renewable distributed generation sources to simultaneously minimize the power loss, improve the voltage profile, and enhance the voltage stability. In [30], modal analysis and continuous power flow are used to solve distributed generators' optimal placement and sizing problems. This paper proposes a novel approach for assessing the static voltage stability of microgrids based on energy function. The distance to voltage collapse of an islanded microgrid operating point is quantified employing an energy function that was initially developed for the steady-state voltage stability assessment of bulk power systems. This work shows that the energy method can be well adapted to monitor the microgrid security margin, which is not possible through a P-V curve, mainly in the context of the islanded operation of a microgrid, due to the fast change of the operating points, as a result of the penetration of intermittent sources and load variation. Besides, the high computational effort demanded by the continuation power flow may not be appropriate to monitor the voltage stability level if multiple scenarios are analyzed. This work also introduces a methodology based on an auxiliary energy function to define the placement of intermittent energy sources and energy storage systems within the islanded microgrid. The robustness level of the islanded microgrid buses is measured by applying the auxiliary function; the areas identified as vulnerable are chosen to allocate the generation and storage systems. It is shown that the system security margin is improved when this methodology is adopted. Here, proper power flow problem formulation is carried out for the energy function calculation, since inherent characteristics of an islanded microgrid are taken into consideration, such as the lack of a swing bus, droop controls of the inverter-based distributed generators, the predominance of the resistance of the lines over the reactance, and frequency and voltage deviation.
The remainder of this paper is organized as follows. Section II describes the theoretical aspects of the performed analyzes: islanded operation of a microgrid; power flow formulation for an islanded microgrid; voltage security measure using an energy function, and evaluation of the robustness level of the islanded microgrid buses by applying the auxiliary function. Simulation results are presented and discussed in Section III. Section IV concludes the work.

A. MICROGRID OPERATION UNDER ISLANDED MODE
Distributed generators are connected to the grid by an inverter-based interface [31]. This paper assumes two possible control modes for the operation of the inverters during the islanded condition: • PQ control mode: the inverter is used to supply a pre-specified value of active and reactive powers; • Voltage Source Inverter (VSI) control mode: the active and reactive powers injected by the inverters depend on the system loading. The VSI mode is used for dispatchable generators (such as microturbines). Since the frequency and voltage are dependent upon the demand, the active and reactive powers generated at the unit (P gk and Q gk , respectively) are given by droop control equations, as depicted in (1) and (2), which assumes that the distributed generators have an inductive output impedance [31]: where f is the system's frequency and f ref is the frequency at no load; V k is the terminal voltage, whereas V kref is the voltage at no load; m k and n k are the droop coefficients that represent the share of active and reactive powers of the inverter in Bus k. Renewable sources like photovoltaics systems are controlled by PQ mode, and hence, they are considered negative power loads. The energy storage systems are integrated with photovoltaics. The purpose of installing energy storage in parallel with photovoltaic is that these sources' peak generation may coincide with the low-demand. Thus, the energy must be stored during low demand and discharged during high demand.

B. POWER FLOW FORMULATION FOR MICROGRID UNDER ISLANDED OPERATION
Typically, the power flow solution, i.e., the operating point of a system, is obtained by employing the conventional iterative Newton-Raphson method. However, the power flow algorithm formulation for an islanded microgrid must consider the operating characteristics of these systems [32], [33]: • the lack of a swing bus; which implies that the system frequency modifies at each update of the operating point, as well as the admittance matrix, since the reactance is dependent on the frequency; • the low X /R ratio (where X and R stand for the line reactance and resistance, respectively); which makes the P/θ and Q/V couplings no longer guaranteed, therefore compromising the Newton-Raphson method; • the droop control features of the dispatchable distributed generators. In this context, the authors in [32] propose a power flow methodology that classifies the system buses into three types: PQ, PV and VF. For a PQ bus, the active and reactive powers are known; a PV bus has pre-specified active power and voltage magnitude. In a VF bus, the active and reactive powers are dependent on the bus voltage magnitude and the system frequency. Summarily, the modified power flow problem considers the following in its formulation [32].
1) The variable vector is given by: where θ is the vector of voltage angles, V is the vector of voltage magnitudes (except Bus 799, which is declared an additional variable due to the absence of the swing bus); f is the system frequency, V 799 is the voltage magnitude of Bus 799. Conventionally, at the initialization of the iterative process, the system voltages are set to 1 0 • p.u, and f is assigned 1 p.u..
3) The vector with the power mismatch equations (mismatch vector) is given by: where vectors P and Q contain the scheduled values for the active and reactive powers of the system buses (VF and PQ buses). For a particular Bus K , P k and Q k are defined by Vectors Pc and Qc contain the calculated values for the active and reactive powers described by the conventional power flow equations. P tot and Q tot are given by: Q tot = Q load + Q loss (8) where P load is the total active power demand; P loss is the active power loss in the system; Q load is the total reactive load, and Q loss is the reactive power loss. P sys and Q sys are defined by: where d is the number of VSI buses. The Jacobian matrix for the system of power mismatch equations given by (4) corresponds to: The power flow formulation described in the previous items is adopted in this work (details on the partial derivatives of the Jacobian matrix can be found in [32]). The variables increments ( x) are calculated using the Levenberg-Marquardt method [33]: where λ is a damping factor, and I is the eye matrix. This technique is applied to overcome convergence problems in the Newton-Raphson method due to the low X /R ratio. Finally, the variable vector is calculated by: At the end of each iteration of the Newton-Raphson method, the nodal admittance matrix Y is updated, just like f . In this paper, a microgrid comprising microturbines, photovoltaics and energy storage systems is analyzed in the islanding condition. For this sake, this work implements a power flow formulation based on [32] and [33], as previously described, considering only PQ and VF buses. The formulation takes into consideration the intermittence of the renewable sources and the charging and discharging of batteries.
The buses associated with microturbines, which operate in the VSI control mode, are assumed to be VF types. Besides, when a VSI bus exceeds its power limits, the generation is set to its limit value.
Load buses are considered PQ type, with active power demand (P load ) and reactive power demand (Q load ). The renewable generation is regarded as a negative load, with active (P PV ) and reactive powers (Q PV ), respectively. Batteries in discharging mode supply pre-specified active power P bat and count as negative load as well. On the other hand, under-charging mode, P bat is added up to P load . Thus, for a particular PQ bus K associated with a photovoltaic and battery, P load is redefined as:

C. LOAD MODEL
For a static load model, active and reactive power as a function of voltage and frequency can be described using exponential equations [32]: where P LK 0 and Q LK 0 are the active and reactive power of Bus k, respectively; α and β are the active and reactive power exponents, respectively; kpf and kqf are the frequency sensitivity parameters of the load model. Information about α, β, k pf and k qf parameters can be found in [32].

D. ASSESSING THE VOLTAGE STABILITY CONDITION OF AN ISLANDED MICROGRID THROUGH AN ENERGY FUNCTION
The nonlinearities of the power flow equations imply multiple solutions, and the voltage collapse phenomenon is associated with their mechanisms [34]. An operating system point refers to the operable power flow solution. Other power flow solutions are alternative solutions that present low voltage magnitude in a single bus or single connected group of buses; they are identified as low voltage solutions. The energy function for steady-state voltage stability analysis corresponds to the difference of the potential energy between the operable solution (X s ) and a low voltage solution (X u ). At the collapse point, the power flow operable solution merges with a particular low voltage solution, identified as a critical low voltage solution. So, at this point, the energy function value related to these power flow solutions is zero. The energy function expression is described by the path independent integral given by [21] v X s , where ν is a scalar value that stands for the system energy measure; X s = (θ s , V s ) and X u = (θ u , V u ); n is the number of system buses; f and g are the active and reactive power mismatch equations, respectively: where G ij and B ij are related to the real and imaginary parts of the nodal admittance matrix Y , respectively. The evaluation of (17) results in Note that when X u is the critical low voltage solution, the value of ν (20) is close to zero near the collapse point, since X u and X s are very close to each other in the state space.
In this work, the stability condition of an islanded microgrid operating point is assessed using (20), with X s = (θ s , V s ) and x u = (θ u , V u ), where X u must be related to the critical low voltage solution.
The critical low voltage solution is associated with the system critical bus [21], which is typically the one where the voltage collapse starts, spreading around its neighborhood. So, before calculating the low voltage solution of interest for each operating point, it is necessary to identify the critical bus. The system's critical bus is determined through the tangent vector technique [21] as described next.

E. CRITICAL BUS DETERMINATION
The tangent vector, TV, for a particular operating point is given by 201008 VOLUME 8, 2020 where P 0 and Q 0 correspond to the initial active and reactive power injections at the system buses. The tangent vector entries are then sorted at an order of absolute magnitude. The most critical bus is the one related to the largest absolute entry on the tangent vector.

F. CRITICAL LOW VOLTAGE SOLUTION CALCULATION
In this paper, the critical low voltage solution is determined based on the methodology described in [21]. The steps are depicted next and assume that the operable power flow solution -X s = (θ s , V s ) -was obtained previously. 1) Define the critical bus using the TV technique, as described in Section II.E. 2) Considering Bus R the critical bus, obtain the low voltage solution associated with Bus R -X u = (θ u , V u ) -by applying the formulation described in Section II.B, but with the following initialization and step control for variables increment: • V u k = V s k ,for k = 1, · · · , n and k = R, where n is the number of buses; • V u R is set to a flat value; where ρ implements step control in variables increment. The values V u R = 0.4 p.u. and ρ = 0.1 were used in the analysis performed in this work. The step control prevents the power flow solution from escaping the attraction well of the low voltage solution associated with the critical bus.

G. MEASURING THE ROBUSTNESS LEVEL OF THE BUSES IN AN ISLANDED MICROGRID
The robustness level for voltage stability of each Bus i of a power system can be measured by the auxiliary function described by [35] where ϑ i is a scalar value that represents the robustness level of Bus i. Simulations in power systems showed that buses with higher robustness levels have more significant reactive power reserves than those with lower levels. Remember that the voltage collapse problem is associated with the system's inability to maintain adequate reactive power support in the buses. This way, the buses with lower values of ϑ i (22) are more vulnerable to voltage collapse than those with higher values.
In this work, the robustness level of each bus of an islanded microgrid is measured using (22), with X s = (θ s , V s ) and  X u = (θ u , V u ). G ij and B ij are related to the updated matrix Y . Also, studies on the location for renewable distributed generators and energy storage systems are conducted with the help of the auxiliary function (22) enhance the energy measure of the islanded microgrid operating points.

A. SYSTEM DESCRIPTION
Tests were carried out in the IEEE 37-node test feeder (Fig. 1), which is assumed to operate islanded from the main grid. More information about the IEEE 37 node test feeder can be found in [36]. The analysis is performed within 24 hours, taking 10-minute intervals, which leads to a total of 144 operating points.
The photovoltaic generation at each point is obtained from the unit generation curve for a 24h period, as depicted in Fig. 2. Loads are represented by Fig. 3 which is multiplied by the system load demand.
In the base case, the system has three dispatchable generators (microturbines) located at Buses 799, 729, and 725. The droop coefficients for these units are m = 0.015 Hz/kW and n = 0.200 kV/Var.
The following considerations are made: • only the positive sequence of the lines are taken into account;  • the spot loads are regarded as the average of the three phases; • the p.u. values are calculated in the single-phase nominal base of the system.

B. ENERGY MEASURE AT THE BASE CASE
Initially, the system energy measure is determined for the base case, for a 24 period with 10-minute intervals, by applying the following steps: 1) Obtain the operable power flow solution, X s = (θ s , V s ), as described in SectII.B; 2) Obtain the critical low voltage solution, X u = (θ u , V u ), as described in SectII.F; 3) Calculate the energy measure applying (20), using X s = (θ s , V s ) and X u = (θ u , V u ), as described in Section II.D. Note that, for this analysis, photovoltaic generation and energy storage systems are not considered. Fig. 4 shows the energy measure for different operating points in a 24h period, with 10-minute intervals.
It can be observed that at all points ν = 0, i.e., at no point there is a risk of voltage collapse. Although, it can also be noted that the system energy measure decreases under heavy load (18:00h < t < 22:00h). Thus, in this particular period, it can be concluded that the system, as a whole, is less robust.

C. IMPACT OF UNPLANNED PVS ALLOCATION OVER THE ENERGY MEASURE
Without any a priori evaluation, photovoltaics units are allocated at Buses 724 and 742 (microturbines continue at Buses 799, 729, and 735). At its maximum generation, renewable penetration represents 30% of the total active power supplied to the loads. The system energy measure is calculated following the steps described in the previous section.
The energy curves for the base case and the unplanned PV allocation scenario are depicted in Fig. 5. Comparing the two scenarios one can conclude that there is no significant difference them. In other words, the unplanned allocation of the photovoltaic did not contribute to enhancing the stability condition of the islanded microgrid.

D. PLANNING THE PVs ALLOCATION WITH THE HELP THE AUXILIARY FUNCTION
The previous section showed that the unplanned allocation of the photovoltaics did not improve the energy measure of the operating points. Here, the photovoltaic allocation is planned based on the robustness profile of the system buses. In this technique, the robustness level of each bus is obtained, and the renewable sources are allocated in the less robust buses. The following steps are performed to achieve the robustness profile.
1) At the base case (only microturbines in the islanded microgrid), identify the operable power flow solution, X s = (θ s , V s ) associated with the smallest energy measure (worst case).
2) Obtain the critical low voltage solution, X u = (θ u , V u ), as described in SectII.F. 3) For each Bus i calculate the robustness level ϑ i using (22), with X s = θ s , V s and X u = (θ u , V u ), as described in Section II.G. Table 1 shows the robustness level of the islanded microgrid buses. The heat map of Fig. 6

E. IMPACT OF PLANNED PVs ALLOCATION OVER THE ENERGY MEASURE
Based on the robustness evaluation of the system buses described in the previous section, photovoltaics systems are allocated in two buses from the critical area: 711 and 710. The system energy measure is calculated for this scenario, following the steps described in Section II.D. Fig. 7 shows the energy measure for the proposed configurations: the base case with photovoltaics at Buses 710 and 711 (planned allocation).
Comparing the planned allocation's energy profile to the one related to the base case, one can conclude that, along the period of maximum renewable generation, the system energy measure is improved, so the system stability condition. The allocation of the same PV units in Buses 724 and 742 (unplanned allocation) did not alter the system energy profile, as shown in Fig.5. Notice, however, that the planned allocation of the distributed generation does not contemplate the heavy load hours. During this period, the system presents a smaller energy measure and the lower voltage limit is exceeded, as depicted in Fig. 8.
To mitigate this problem, photovoltaic is associated with an energy storage system (PVs-ESS). The next section describes the results of this scenario

F. IMPACT OF PLANNED PVS-ESS ALLOCATION OVER THE ENERGY MEASURE
Due to the photovoltaic systems' intermittency, their maximum generation does not coincide with the heavy load period, as shown in Fig. 2 and Fig. 3. For this reason, photovoltaics are associated with batteries. During the heavy load period, the energy storage system operates under discharging mode. On the other hand, the charging of the energy storage system occurs during the lower loading level. As proposed in [37] and depicted next, the batteries charging/discharging schedule may be given through the voltage limits: • the batteries are charged when there is photovoltaic generation; the bus voltage is higher than 0.94 p.u. (which features generation greater than demand) and the energy storage system has the state of charge (SOC) below the maximum (SOC max ); • the batteries are discharged if the bus voltage is less than 0.94 p.u. and the SOC is above the minimum (SOC min ). Table 2 shows the parameters of the energy storage system. Fig. 9 depicts the charging (negative values) and discharging (positive values) operation. From 7:00h to 10:00h, the battery VOLUME 8, 2020   is charged; at the peak load (when the system energy measure is smallest, as shown in Fig. 9), the battery is discharged, supplying power to the system. Fig. 10 shows the system energy measure for the configurations comprising PVs-ESSs and solely photovoltaics at Buses 710 and 711 and the base case.
From Fig 10, it can be noted that at the peak load point (soon after 20h), the PV-ESSs arrangement could improve energy measure, which means a better system stability condition. In addition, the voltage level increased as well, as shown in Fig. 11. Also, Fig. 10 reveals that the energy measure pattern during the ESSs charging phase (between 7h and 10h) did not suffer accentuated deviation.
The simulations showed that the energy function method could be adapted to monitor the system stability condition of an islanded microgrid, handling the inherent aspects to its operation, such as intermittent generation, load variation, droop control of dispatchable sources, charging and discharging of batteries, voltage and frequency deviation, and nodal admittance matrix update. The energy function measure is not only useful for showing proximity to voltage collapse, but also to quantify the robustness of the whole system in terms of voltage stability. The energy measure enabled the comparative analysis of the stability condition during the islanded microgrid operation under three different configurations -with no intermittent generation, photovoltaic generation, and photovoltaic combined with storage system (Sections III.C, III.E, and III.F).
The results showed that the auxiliary function method could identify the less robust buses in the microgrid (Section III.C), and that the placement of the renewable generation in that area could improve the system's stability condition as a whole (Sections III.E and III.F). In contrast, the unplanned allocation did not yield any contribution.
The energy based methods employed here for the stability analysis were combined with the TV. Notice that the critical low voltage solution at each operating point was identified through this technique. Together, the techniques (TV and energy base methods) quickly provided the necessary information for the microgrid stability assessment.

IV. CONCLUSION
This paper presents an energy-based static voltage stability analysis of an islanded microgrid comprising microturbines and photovoltaic generation integrated with batteries. The energy methodology uses two particular tools: an energy function and an auxiliary function derived from the former. These functions were initially defined for bulk power systems, and are based on their static model, represented by the algebraic equations of the power flow problem.
The use of the energy function and auxiliary function requires calculating two power flow solutions at each point of analysis: the conventional power flow solution and an alternative solution, identified as a critical low voltage solution. Here, to adapt the energy tools for studying a microgrid under islanded condition, a proper power flow formulation is carried out. This system's characteristics must be taken into consideration, such as droop control of dispatchable sources, intermittent generation of renewable resources, charging and discharging of batteries, voltage and frequency deviation, and nodal admittance matrix update.
System security in terms of long term voltage stability is assessed for successive operating points along 24 hours through the energy function. The energy measure associated with each point describes a curve that expresses the energy pattern (or voltage security pattern) for the system. Also, the allocation of renewable generation is planned with the help of an auxiliary function derived from the energy function. Through the auxiliary function, the robustness level for each bus of the microgrid is calculated. The system buses' robustness profile indicates the microgrid's weak area, where photovoltaics and energy storage systems are placed aiming to enhance the system energy pattern.
The work showed that the energy methodology could be well adapted for the static voltage stability assessment of an islanded microgrid. More specifically, the energy function can be used to monitor the stability condition of the system's operating points. Also, the robustness evaluation through the auxiliary function proved to be efficient for planning the allocation of the renewable generation.