Optimal parameters of inverter-based microgrid to improve transient response

Received Jun 14, 2019 Revised Sep 29, 2019 Accepted Oct 4, 2019 The inertia issues in a microgrid can be improved by modifying the inverter control strategies to represent a virtual inertia simulation. This method employs the droop control strategy commonly used to share the power of a load among different power sources in the microgrid. This paper utilizes a modified droop control that represents this virtual inertia and applies an optimization algorithm to determine the optimal parameters and improve transient response. The results show better control when different variations are presented in the loads, leading the microgrid to have a better control of the operation. The optimization method applied in this research allows improvement to the transient response, thus avoiding unnecessary blackouts in the microgrid.


INTRODUCTION
As the power demand continues to increase, new power sources are needed to supply electricity to the large power-consuming centers. However, conventional sources are finite and produce an unfavorable impact on the environment. Microgrids are good options as they are small-scale power systems close to the load centers and include distributed generation sources (DGs) for implementing renewable energies [1,2]. Moreover, they are designed to meet energy demand in optimal conditions and work as isolated or gridconnected systems [3]. Therefore, in recent years, the use of renewable sources [4] in microgrids [5] has been a good option to reduce unfavorable impacts on the network [6,7].
Renewable sources are used in microgrids to optimize the power supply and reduce the cost of electricity production [8,9]. Two of the most used renewable energies are photovoltaic panels [10,11] and wind turbines. These types of power sources require power electronics such as inverters [12][13][14] to interconnect with the microgrids [15]; thus, the inverter control must be properly adjusted to avoid undesired transient responses [16]. Power sharing among different power sources in an isolated or islanded microgrid is possible by employing traditional droop control strategy [17,18].
Primary frequency regulation (PFR) with these inverters depends on the real power-frequency (P-w) droop and inertia of the power sources. An important fact for the transient response in inverter-based microgrids is that the inverters, as compared with the synchronous generators, have no rotating masses and low inertia. This is a disadvantage when the microgrid operates in isolated mode, because the lack of inertia would allow even a small disturbance causes instability. Recent investigations have proposed the virtual inertia concept to  [3,19]. This concept consists in the representation of the synchronous machine behavior (synchro-converters) to transient events by means of an adequate control of inverters. The virtual inertia simulation can be performed by modifications in the loops of the droop control as proposed in [3] to detect unfavorable frequency conditions for the microgrid.
Modification of the droop control loop is programmed with a function that makes modifications to the programmed slopes of the inverters by considering the values of power, frequency, and voltage. Thus, simulating virtual inertia in the microgrid helps modulate transient events and avoids unnecessary power outages, especially when the microgrid is decoupled from the conventional system. The function is composed of parameterization constants that according to [3] are responsible for the performance of the modified control loop. From a technical point of view, modification of the droop control loop offers great benefits to generation systems by decreasing the time of power outages, saving operating costs, and quickly restoring operations after the occurrence of transient events with load or generation shedding. However, even more important than the technical benefits are the social benefits provided by a control scheme of this type, which greatly improves the reliability of the system in cases where the supply of energy is increasingly vital for people.
In this paper, the objective is to add the modified control loop to the droop slopes of the synchronous generators and the inverters of the microgrid in order to identify the parameterization constants that offers the best response to transient events by using optimization algorithms. The concept of inertia and its importance for systems to transient events will be presented in Section 2. The concept and results of the modified droop control loop implementation will be discussed in Section 3. The procedure for calculating parameterization constants by optimization methods is shown in Section 4 and the results and analysis are included in Section 5. Finally, the summary and conclusions of the paper are presented in Section 6.

INERTIA AND TRANSIENT RESPONSE OF THE MICROGRID
Starting from the concept of stability in power systems, it is important to consider the effect of inertia, which is associated with opposition to the change in movement of rotating elements such as synchronous generators [20]. The physical principle governing the oscillatory behavior of a synchronous generator is presented in (1): In this simplified oscillation equation, the term dw/dt represents the velocity variation and, hence, the frequency of a generator and which depends inversely on the inertia constant J. Therefore, as long as a generator has greater inertia, the changes in its velocity given by imbalances between the generated power (Pmech) and the demanded power (Pe) will be less significant. Inertia of the generators is associated with the rotor mass, which being in motion, has the capacity to store kinetic energy and supply momentary power to minimize the impact of transient events. This helps the networks formed with large generators to be robust and offer greater resistance to synchronism loss during disturbances.
In microgrids, the inertia related to the inverters is considerably smaller than in the conventional network [21], because the sources are of small size and some have no rotating elements [22]. Therefore, stability of isolated microgrids depends mainly on a PFR strategy to maintain a reliable power supply. Droop control performs the important task of supporting the PRF during transient events, assigning to each source a required amount of power as a function of the assigned droop slope. Figure 1 presents the distribution of load among sources by means of the strategy described, where the greater the droop slope the lower the power that a source can assume during a transient event.
In the case of inverters, the droop slope can be modified dynamically to obtain different responses to the disturbances in a microgrid by means of control techniques. This provides benefits to maintain stability and power balance, when dealing with large-scale transient events related to greater power variations with lower frequency deviations. Figure 2 shows that by decreasing the droop slope, it is possible to simulate inertia in the system allowing the inverters to supply more power during adverse events. Table 1 shows the Response of the system interconnection to abnormal frequencies In accordance with IEEE Standard Std. 1547 [23] and amendment 1 [24], when the frequency is outside the ranges presented in Table 1, the network must be disconnected within the indicated clearance time.

DROOP CONTROL AND MODIFIED LOOP
Traditional droop control consists of obtaining a frequency reference for each generator according to the assigned slope and real power variations as shown in (2). In this equation, the term represents the generator reference frequency i, is the rated frequency, is the droop slope assigned to generator i, , is the nominal real power of the generator i, and is the measured real power of the generator i: In this way, machines with an assigned droop slope will vary their power delivery in proportion to the frequency reference, thus avoiding problems of participation between generators. Modified droop control is a dynamic modification of the droop slope ( ) to variations of the frequency over time that exceed a set limit. This modification is done by a potential function with parameterization constants k1 and k2, which according to the observations presented in [3], define the proper behavior of the control loop. Modification is applied to the droop slopes of the inverters with the aim of providing transient support to frequency events (virtual inertia simulation). Figure 3 shows the modified droop control proposed by [3]. In this case, the slope (m) will be modified by the function : 1 (| / |) 2 when the comparator finds that df/dt > C, decreasing its value to allow greater variations of real power with lower frequency variations. Figure 4 shows the slopes (m) for different values of the constants k1 and k2, according to df/dt.

OPTIMIZATION OF PARAMETRIZATION CONSTANTS
The modified loop improves the traditional droop control response by implementing a function for the dynamic modification of the slope of the generators. However, the results were obtained by considering a random parameterization constants k1 and k2, which indicates that the response could be optimized and further improved to provide more reliable support to the PFR. The methodology for optimizing the result of the modified control loop is described below. The function used to modify the slope is: where: and The term wi is the frequency deviation corresponding to the maximum power change Pi,max that the inverters can withstand at rated power. According to [3], the recommendations for the selection of parameterization constants are taken:  The choice of k1 depends on the maximum rate of change of frequency and inverter output power limit.  Amount of inertia added virtually to the system increases with an increase in k1. A lower value of k1 results in more peak overshoot in frequency, whereas a higher value of k1 results in oscillations in frequency.


Minimum droop gain can be chosen to prevent the inverter from exceeding its maximum power limit.  A lower value of k2 results in a lower value of droop constant (mi) and, hence, more variation in output power from an inverter.
Considering that the objective is to minimize the maximum frequency deviation in the microgrid, the objective function is defined as indicated below: where: Measured frequency (Hz) ∆ , Maximum deviation of admissible frequency in the microgrid (Hz) Optimization algorithms such as simulated annealing (SA), hill climbing (HC), and hill climbing stochastic (HCS) are used to determine the parametrization constants. The codes have been programmed in MATLAB and set to interact with the Simulink simulation tool in order to reduce the maximum frequency deviation from the transient events considered. The three algorithms are applied to each operation case and the results are compared to obtain the parameterization constants k1 and k2 that allow the smallest frequency deviation in the microgrid.   Figure 5 shows the SA used to find the parameterization constants. The first step corresponds to defining the initial random solution and the objective function. The second step is used to estimate the initial temperature for the algorithm. The third step is implemented to generate a new solution for the algorithm and is required for the search of new solutions. Then, the new solution is tested and evaluated to identify it as a valid solution. The last steps are repeated until good solutions are found or the algorithm reaches a maximum number of iterations. Figure 1. Structure of the simulated annealing (SA) algorithm [25] The parameters that the algorithm requires are defined as follows: initial temperature To = 10Fo (10 times the initial fitness of the objective function); cooling speed L (T) = 1; decrease factor of temperature α = 70%; mean μ = 0.01; standard deviation σ = 0.01; and final temperature Tf ≤ 1e −6 (criterion of completion of the algorithm). Figure 6 shows the HC algorithm used to find the parameterization constants. The first step corresponds to defining the random solution to be evaluated by the algorithm and the objective function. The second step in this algorithm is used to generate new solutions to be evaluated. The third step corresponds to the evaluation of this new solution and to identify if a new better solution is found. Once the evaluation is performed, a selection of the best solution is performed and updated in a storage database. Finally, the process is repeated until reaching the number of iterations initially defined. The parameters that the algorithm requires are defined as follows: mean μ = 0.01; standard deviation σ = 0.01; and end criterion Figure 7 presents the HCS algorithm used to find the parameterization constants. The first step defines the random solution to evaluate as the first population and the objective function. The second step is used to generate new solutions and the third step performs the evaluations. Then, if the new solution is accepted as a valid solution, then it is stored in the database. If this new solution is not accepted by the algorithm, then a new part of the algorithm evaluates the use of a random solution. Finally, the process is repeated until reaching the number of iterations initially defined. The parameters that the algorithm requires are defined as follows: mean μ = 0.01, standard deviation σ = 0.01, stochastic variation with uniform distribution among (0,1), and end criterion (| f (xk) -f (x(k-1)) | ≤ 1e−4.

RESULTS AND ANALYSIS
For the analysis of the modified droop control loop, the simulation is performed in the MATLAB-Simulink® tool, which represents the response of each source before the transient events, while importing energy (case 1), exporting energy (case 2), and with losing power from generation (case 3). The diagram of the microgrid is presented in Figure 8.  Table 2 presents the three cases evaluated in the simulations, where the power of the load and the grid changes to create different scenarios.  Figure 9 shows the results when the microgrid is importing power from the power grid and a tripping event left the microgrid working in isolated mode. This event causes a loss of 1100 kW that must be supplied immediately by the sources remaining in the microgrid. Thus, Figure 9(a) shows the response of frequency in the microgrid, Figure 9(b) presents the frequency variation, Figure 9(c) includes the graph that represents the power supplied by synchronous generators, Figure 9(d) illustrates the power supplied by inverters, and Figure 9(e) represents the droop slope variation.

Initial operating condition Case 1: Power grid is shutdown while microgrid was importing power
The frequency changes approximately 5 Hz/s with traditional droop control while a variation of 3.8 Hz/s is reached with modified droop control. The parameterization constants used in this case were (k1 = 3 e−6; k2 = 0.10). Considering the recommendations of the IEEE Std. 1547 standard [23], with the traditional droop control scheme, the sources would be disconnected after two seconds, during which the frequency value remains the same or lower than 49.5 Hz. However, with the modified control scheme, it could be maintained in service until the secondary regulation system, AGC, or unit dispatch brings the frequency back to 50 Hz.
The results show that the inverters do not have slow electromechanical modes as do synchronous generators. As a result, the inverters increase their power quickly to meet the excess load left by disconnection from the conventional system. Figure 9(d) shows that the modified control mode, unlike the traditional one, admits a greater power delivered by the inverters (modifying droop slope, as seen in Figure 9(e)) up to 1200 kW and maintains the generators with a power supply close to 600 kW in order to remain close to the point of power balance, thus avoiding greater variations in the frequency of the microgrid.  Figure 10 shows the results when the microgrid is isolated while exporting energy to the network. This event causes a loss of 630 kW of load and causes an approximate frequency variation of 3.3 Hz/s with traditional droop control while a variation of 2.5 Hz/s is reached with modified droop control. The parameterization constants used in this case were (k1 = 3 e−6; k2 = 0.50). Thus, Figure 10(a) shows the response of frequency in the microgrid, Figure 10(b) presents the frequency variation, Figure 10(c) includes the graph that represents the power supplied by synchronous generators, Figure 10 Figure 10(d) shows how the inverters rapidly reduce the energy transferred to the microgrid as a result of the loss of load caused by the isolation of the conventional power system. Similar to Case 1, it is appreciated that the synchronous generators decrease their energy production more slowly than the inverters. However, again the modified scheme presents a better performance, decreasing the production of energy up to a value that remains closer to the power balance. The performance of modified droop control is higher than traditional droop control. However, performance can be improved to allow a more reliable operation of the microgrid.  Figure 11 shows the results when the microgrid is isolated and a power source of 550 kW is disconnected, causing a more critical frequency droop up to 49.2 Hz. This frequency value lasts more time under the traditional droop control and a modified droop control parameterization is used as (k1 = 3e−6; k2 = 0.50). Thus, Figure 11(a) shows the response of frequency in the microgrid, Figure 11(b) presents the frequency variation, Figure 11(c) includes the graph that represents the power supplied by synchronous generators, Figure 11(d) illustrates the power supplied by inverters, and Figure 11(e) represents the droop slope variation.

Case 3: Loss of generation in the microgrid
In this case, after inverter 1 shuts down, the three remaining sources have to meet all loads of the microgrid. The main response is now on inverter 2, which must act quickly to avoid synchronous machines move critically away from the point of load balance. From previous results, it is observed that the modified droop control offers a better response than the traditional control. However, in the same way as in previous cases, the modified droop control can be improved by the optimal selection of parameterization constants.  Figure 11. Results for the case 3, with a loss of generation in the microgrid: (a) response of frequency, (b) frequency variation, (c) power supplied by synchronous generators, (d) power supplied by inverters, and (e) droop slope variation

Event simulations Case 1
In Table 3, the values of the constants k1 and k2 for the parameterization of the modified droop control of case 1, with which the minimum value of the objective function was obtained, and the previously established stop criteria. This stop criterion was defined considering a cooling temperature Tf ≤ 1e −6 in the case of SA algorithm, and difference of magnitudes (| f (xk) -f (x(k-1)) | ≤ 1e -4 ) for HC and HCS. 7.35 (*) ------* The maximum error obtained is presented between the results of the HC and HCS algorithms. The error is calculated as absolute, taking as a real value the minimum value obtained (0.0646). Figure 12 presents the results for the modified droop control when the case 1 is presented. Figure 12(a) shows the optimized response of frequency in the microgrid, Figure 12(b) presents the optimized frequency variation, Figure 12(c) includes the graph of the optimized power supplied by synchronous generators, Figure 12(d) illustrate the optimized power supplied by inverters, and Figure 12(e) represents the optimized droop slope variation. According to the results, the minimum value obtained for the objective function is 0.0646 and this is reached by the HCS algorithm at a stopping criterion of 0. The results of implementing the modified droop control with the optimal parameters obtained for the transient event of case 1 are presented. The parameters used for this simulation are: k1 = 12.58e−6 and k2 = 0.0113. Figure 12(a) shows that the frequency drop is lower for the optimized parameters during the transient event, reaching a minimum value of 49.5 Hz (for 5 ms) and subsequently settling in a value around 49.8 Hz with a oscillation close to ± 0.05 Hz. In the same way, the performance of the modified droop control allows the synchronous generators to remain even closer to the power balance point around 530 kW with an oscillation close to ± 20 kW, corresponding to 3.8% of the total power. For inverters, the optimized parameters will allow a slightly higher one compared with the traditional scheme or the randomly parameterized scheme, but always maintaining the drop slope assigned to the inverters within the operating limit (minimum slope of −2e−6 rad/s/W, see Table 1) as shown Figure 12(d). These results show that the optimal parameterization allows an adequate response to transient events in the microgrid. However, once the event has been attended to by the secondary frequency regulation, the modified control scheme will be automatically disabled and the droop slope will be returned to its value established for the normal operation of the system.

Case 2
In Table 4, the values of the constants k1 and k2 for the parameterization of the modified droop control of case 1 are presented, with which the minimum value of the objective function was obtained, and the previously established stop criteria. 7.3500* ------*The maximum error obtained is presented between the result of the algorithm HC and HCS. The error is calculated as absolute, taking as a real value the minimum value obtained (0.0691). Figure 13 presents the results for the modified droop control when the case 2 is presented. Figure 13(a) shows the optimized response of frequency in the microgrid, Figure 13(b) presents the optimized frequency variation, Figure 13(c) includes the graph of the optimized power supplied by synchronous generators, Figure 13(d) illustrate the optimized power supplied by inverters, and Figure 13(e) represents the optimized droop slope variation. According to the results, the minimum value obtained for the objective function is 0.0691 and is reached by the HC algorithm at the stopping criterion of 3.912e−8. The parameters used for this simulation are k1 = 12.71e−6 and k2 = 0.0078. Similar to case 1, this case 2 shows that the optimal parameterization of the modified droop control scheme improves the frequency response to   Table 5 shows the values of the constants k1 and k2 for the parameterization of the modified droop control of case 3, with which the minimum value of the objective function was obtained, and the previously established stop criteria. Figure 14 presents the results for the modified droop control when the Case 3 is presented. Figure 14(a) shows the optimized response of frequency in the microgrid, Figure 14(b) presents the optimized frequency variation, Figure 14(c) includes the graph of the optimized power supplied by synchronous generators, Figure 14(d) illustrate the optimized power supplied by inverters, and Figure 14(e) represents the optimized droop slope variation. According to the results, the minimum value obtained for the objective function is 0.0652 and is reached by the HC algorithm in the stopping criterion of 3.313e−12.
Below are the results of implementing the modified droop control with the optimal parameters obtained for the transient event of case 3, when k1 = 12.99e −6 and k2 = 0.0004.
Finally, in case 3, we can appreciate the adequate performance of the modified droop control with the optimized adjustment parameters k1 and k2. In Figure 14(a), it can be seen that the maximum frequency drop obtained under the optimized control is 49.6 Hz (for 100 ms) and then set to 49.9 Hz with an oscillation close to ±0.01 Hz. Synchronous generators have a smaller deviation with respect to the point of load balance, placing their power delivery around 530 kW with an oscillation close to ±10 kW, corresponding to 2% of the total power. For the inverter that has remained in operation after the transitory event, it can be seen that the droop slope reached the minimum value established for −2 rad/s/W. From these results, it can be indicated that the optimization of the parameters offers an adequate transitory response from the generation sources, accomplishing the task of moving away considerably from a critical state for the stability of the microgrid in terms of frequency. 47.53 (*) ------(*) The maximum error obtained is presented between the result of the algorithm HC and SA. The error is calculated as absolute, taking as a real value the minimum value obtained (0.0652).

CONCLUSIONS
This paper presented the application of an optimization algorithm to determine the optimal parameters of a modified droop control that represents this virtual inertia in microgrids in order to improve transient response. The results showed that the method allowed to obtain parameterization constants that are adequate to improve the performance of the modified droop control. The optimization algorithms showed adequate performance in obtaining the parameterization constants and reduced the objective function (which represents a frequency index) to a value far from the critical conditions of stability. Besides, it can be concluded that the virtual inertia simulation scheme, articulated by the modified droop control implemented, is based on the dynamic variation of the droop slopes assigned to the inverters, which facilitates the ability of them to rapidly reduce or deliver their power, during the transient events that occur in the microgrid. Likewise, although it has not been addressed in this work, according to the authors of [3] and [25], energy storage systems for the use of the modified control scheme during transitory events can be reduced, thus optimizing implementation costs in microgrids. The parameterization constants obtained in this work are of a static nature; that is, they have been calculated for one transient event at a time and apply only for that event. Therefore, a much more suitable control scheme should consider the real-time selection of the parameterization constants in such a way that the control is automatically adapted to different cases.