Dynamic modeling and transient stability analysis of distributed generators in a microgrid system

Received Aug 17, 2020 Revised Feb 1, 2021 Accepted Mar 4, 2021 Increasing the penetration level of distributed generation units as well as power electronic devices adds more complexity and variability to the dynamic behaviour of the microgrids. For such systems, studying the transient modelling and stability is essential. One of the major disadvantages of most studies on microgrid modelling is their excessive attention to the steady state period and the lack of attention to microgrid performance during the transient period. In most of the research works, the behaviour of different microgrid loads has not been studied. One of the mechanisms of power systems stability studies is the application of state space modelling. This paper presents a mathematical model for connected inverters in microgrid systems with many variations of operating conditions. Nonlineal tools, phase-plane trajectory analysis, and Lyapunov method were employed to evaluate the limits of small signal models. Based on the results of the present study, applying the model allows for the analysis of the system when subjected to a severe transient disturbance such as loss of large load or generation. Studying the transient stability of microgrid systems in the standalone utility grid is useful and necessary for improving the design of the microgrid’s architecture.


INTRODUCTION
Intelligent microgrids integrate different energy resources, especially renewable ones, to provide dependable and efficient operations while being connected to the grid or islanding mode. It can ensure an uninterrupted reliable flow of power and economic and environmental benefits while minimizing the energy loss through transmission over long distances. Local power generation and storage systems make the operation of grid and critical facilities possible independent of the public utility when necessary, thus eliminating blackouts. New technologies provide the option of automatic fixing in case of necessity and anticipate power disturbances [1]- [4]. Microgrids can also feed the public utility when power demand and cost are the highest by supplying electricity from renewable sources. Thus, the use of intelligent power interfaces between the renewable source and the grid is required. These interfaces have a final stage consisting of dc/ac inverters, which can be classified into current source inverters (CSIs) and voltage-source inverters (VSIs). Although CSIs are commonly used to inject current into the grid, for island or autonomous operation, VSIs are needed to maintain voltage stability [5]- [10]. Moreover, a system without master control of inverters is advantageous where every inverter is able to change voltage and frequency of the microgrid in function of the PQ power into the microgrid. Besides, the fault of an inverter does not cause the collapse of the microgrid. In fact, each inverter could act as a plug-and-play entity to make expanding the microgrid system easier. Although the relationship between inverters is not necessary for the stability of the microgrid, it can be used to improve its performance [11]- [14]. Fast and flexible control of active and reactive power is an important requirement during the steady state and transient operation of the microgrid. A microgrid can experience low voltage instability when all distributed generation units are rotary machines with slow response speeds. Most of existing DG module technologies require power electronics converters as the intermediate interface in order to be connected to the network. A power electronics converter equipped with a quick control strategy can dynamically improve the microgrid stability by adjusting the instantaneous and reactive power, thereby increasing voltage quality and reducing the risk of angle instability. Due to different dynamics of distributed generator types compared to large power plants, the presence of distributed generation affects the dynamic characteristics of the grid. For this reason, modeling and controlling the behavior of these generators require careful consideration. This is more important in microgrids such that because of their small capacity, a distributed generation source can supply a significant percentage of load and its dynamic behavior greatly affects voltage and frequency control [15]- [17]. In [18] discusses the low voltage hybrid AC-DC microgrids power flow in islanding operation. The model simulation of hybrid AC-DC microgrid model have been carried out in two different cases, power flow from DC to AC sub microgrids and power flow from AC to DC sub microgrids. The result of the simulation shows that the model has a good response to power changes conditions.
In [19]- [21], appropriate simulation models and methods for investigating the dynamics of microgrids in transient stability have been developed. In the mentioned study, the aim is to investigate the interaction of microgrids in connected and islanded operation modes. All the components of the microgrids are modeled with sources, loads, lines, and power electronic interfaces.
This paper works with both lineal and nonlineal tools. It uses phase-plane trajectory analysis and a method of Lyapunov to determine large variations in the systems. It is suggested that the new proposed model be utilized to analyze the system when it is subject to a severe transient disturbance, such as the loss of large loads or generation. In this paper, first, the mathematical model of the microgrid and basic equations are presented. Then, the system is described. The next step is the study of stability of Lyapunov. Finally, some simulations are presented. Figure 1 presents a microgrid system in a stand-alone mode based on parallel connected inverters. It is assumed that the system is a balanced three-phase circuit. Each generator has a power DC renewable source, a DC/AC inverter, and a low pass filter and it is managed by two control loops. An inner loop is used to regulate the output voltage and current and the outer loop is used to share and trade-off the PQ power in the microgrid without communication between generators. This model does not consider the dynamics of the inner loop because it is of high frequency type [22]- [24]. For systems with two inverters connected, the signals can be represented as (1), (2):

MATHEMATICAL MODEL
Where Vi is nominal set points of d-axis output voltage, is the power angle of the i'th generator, ، +1 is the power angle between i and i+1'th generators, vdi and vqi are output voltages of the i-th islanded-inverter distributed in d-axis and q-axis respectively. The derived power angle between both generators can be defined by (4): i ω is stator supply angular frequency.
The PQ controller uses an artificial droop control scheme with average signals P and Q, which are obtained using the low-pass filter, that can be expressed as (5), (6): where, 0 and V0 are system rated speed and voltage, P and Q are active and reactive average power respectively, also Kp and Kv are droop coefficients.
The cut-off frequency ( f  ) used in (7) and (8) is a decade lower than frequency of the microgrid.
That, Pi and Qi are instantaneous power. If (7) and (8) are replaced in (5) and (6), It is possible to rewrite the curve droop equation and the low pass filter in the time domain as in (11), and (12): For primary and end inverters connected (with index i): where, Ri and Xi are resistor and inductance of i'th generator, also Xi,i+1.is line inductance between i and i+1'th inverters.
Replacing (13) and (14) in (11) and (12), we will have: For inner inverter connected (with index m): Replacing (17) and (18) in (11) and (12), we will have: Figure 2 show the circuit diagram of the microgrid systems in the stand-alone mode considered in this paper. This system has two inverters connected and the assumption is based on small signal modeling.

STUDY SYSTEM
It is assumed that According to (4), (15), and (16), we get: The system shown in Figure 2 has the parameters presented in Table 1 The equilibrium points can be obtained if they make all the derivatives of the system equal to zero: Mathematical software was used to solve (32) and find the equilibrium points. An equilibrium point in the range of the state variables X5 is shown by (33) The stability of the equilibrium point, X0, can be determined via linearization [25], [26] through the Jacobian matrix of ( ) at the equilibrium point. The values of matrix A are:

STABILITY OF LYAPUNOV
Variations in the angle, active power, and frequency of the first generator were analyzed and a negligible variation in the voltage was found. The second generator is an infinite bus with fixed frequency and voltage (X1=Y1, X2=Y2, X3=314 rad/s, X4=Y3, X5=230 v). The set of equations for the single generator is given by (36): For Lyapunov stability analysis, it is convenient to transfer the stable equilibrium point to the origin by the transformation Z=Y-Y0. Thus, (36) becomes: This study assumes that the system is working in the stable equilibrium point and there is a large variation in the angle (Z1). The voltage magnitude is constant. By working with the reduced model, we will have: The phase portrait shown in Figure 3 can also be used to analyze whether all the trajectories between 3 and -3 move towards the equilibrium point at the origin. By assuming that Is a variable gradient method for constructing a Lyapunov function [27], [28] and if it is applied to (16), the Lyapunov function is: The region of asymptotic stability is shown in Figure 4.

SIMULATION RESULTS
The proposed microgrid is simulated in order to show the behavior of the systems, their equilibrium points, and the stability of the microgrid in general when there are possible changes in parameters. Figures 5 to 8 show the state variables of the systems. In this case, it is assumed that all the DG and impedance parameters given in Table 1 are involved. There are no faults during the operation. The simulation is repeated with a different line inductance values (0.157  , 1  , and 1.57  ).
These figures have been carried out for verification of the nonlinear model of studied islandedinverter-based microgrid system using the proposed generalized modelling approach. The time-domain simulation results have been obtained by solving a nonlinear differential-algebraic system of equations using numerical integration methods. According to Figure 5 when the system begins, the angle between V1 and V2 is zero. It has a transient response and it reaches steady point. As the line impedance increases, the overshoot of angle decreases due to the damping of the oscillations.    Figure 19 illustrate that during the time of disturbance, the angle between V1 and V2 oscillates due to changes in the voltage of the second bus. But the microgrid is recovered after the disturbance. According to Figures 20 and 21, it is observed that in the presence of voltage sag, the active power of both DG units are changed. But according to Figures 22 and 23, reactive power of DG2 reduced more than DG1, which indicates a direct dependence between voltage and reactive power.

CONCLUSION
In this paper, a nonlinear state-space model of a microgrid was presented. The model included the most important dynamics. This modeling method could be extended to n-generators. The model was analyzed by means of both stability study of Lyapunov function and root locus plot. A general methodology to find a valid Lyapunov function for nonlinear stability analysis was presented. By using that Lyapunov function, the region of asymptotic stability can be determined. These tools will allow designing microgrid systems with loads, generators, and storage systems, hence global stability of the system.