Next Article in Journal
Anti-Thermal Shock Binding of Liquid-State Food Waste to Non-Wood Pellets
Next Article in Special Issue
An Overview of Modelling Techniques and Control Strategies for Modular Multilevel Matrix Converters
Previous Article in Journal
Performance Enhancement of Nitrogen Dual Expander and Single Mixed Refrigerant LNG Processes Using Jaya Optimization Approach
Previous Article in Special Issue
Improved Predictive Control in Multi-Modular Matrix Converter for Six-Phase Generation Systems
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A State-Space Model of an Inverter-Based Microgrid for Multivariable Feedback Control Analysis and Design

by
Juan F. Patarroyo-Montenegro
*,
Jesus D. Vasquez-Plaza
and
Fabio Andrade
Sustainable Energy Center, University of Puerto Rico, Mayagüez, PR 00680, USA
*
Author to whom correspondence should be addressed.
Energies 2020, 13(12), 3279; https://doi.org/10.3390/en13123279
Submission received: 1 June 2020 / Revised: 20 June 2020 / Accepted: 22 June 2020 / Published: 25 June 2020
(This article belongs to the Special Issue Control Strategies for Power Conversion Systems)

Abstract

:
In this work, a synchronous model for grid-connected and islanded microgrids is presented. The grid-connected model is based on the premise that the reference frame is synchronized with the AC bus. The quadrature component of the AC bus voltage can be cancelled, which allows to express output power as a linear equation for nominal values in the AC bus amplitude voltage. The model for the islanded microgrid is developed by integrating all the inverter dynamics using a state-space model for the load currents. This model is presented in a comprehensive way such that it could be scalable to any number of inverter-based generators using inductor–capacitor–inductor (LCL) output filters. The use of these models allows designers to assess microgrid stability and robustness using modern control methods such as eigenvalue analysis and singular value diagrams. Both models were tested and validated in an experimental setup to demonstrate their accuracy in describing microgrid dynamics. In addition, three scenarios are presented: non-controlled model, Linear-Quadratic Integrator (LQI) power control, and Power-Voltage (PQ/Vdq) droop–boost controller. Experimental results demonstrate the effectiveness of the control strategies and the accuracy of the models to describe microgrid dynamics.

1. Introduction

With the increase in power generation using renewable energy sources, nowadays the concept of microgrids is becoming popular. The U.S. Department of Energy (DOE) defines a microgrid as “a group of interconnected loads and distributed energy resources within clearly defined electrical boundaries that acts as a single controllable entity with respect to the grid. A microgrid can connect and disconnect from the grid to enable it to operate in both grid-connected or island-mode” [1]. This concept gives a clear general view of the main characteristics of a microgrid. Moreover, it describes most of the technological challenges regarding microgrid integration. First, a microgrid must be composed of distributed generators that must be safely interconnected. Second, a microgrid should act as a single entity. This means that all generators must be synchronized to deliver active and reactive power according to microgrid requirements and operational mode. Finally, a microgrid may work directly connected to the main grid or work totally off grid. This implies that power quality must be guaranteed even if there is not a main grid with high inertia that indicates the reference voltage, frequency, and phase.
In a microgrid, multiple distributed generators (DG) and loads are connected to a point of common coupling (PCC) as shown in Figure 1. The loads connected to the microgrid may be supplied by the DGs or by a direct connection to the main grid. In addition, multiple energy storage units may be connected to the microgrid to increase the power availability and system reliability [2].
A microgrid requires the use of power electronics devices to perform the energy conversion from one voltage level to another. For example, for an AC microgrid, the energy storage system (ESS) requires the use of a bidirectional AC–DC converter that regulates the charge or discharge process depending on the available energy. Wind turbine generators require the use of AC–AC converters to transform the amplitude and frequency to standardized voltage levels in the microgrid. Solar photovoltaic (PV) generators require the use of a DC–AC converter to inject the maximum available energy to the microgrid. Loads such as residential homes and streetlights are connected to the microgrid’s common bus. The common bus may be connected to the main grid or disconnected to be operating in islanded mode. Each of the interconnections mentioned above are managed by one or more controllers to optimize the energy generation, guarantee adequate power quality, and to improve stability and robustness in the microgrid.
Optimal controllers for microgrids are aimed to achieve the best performance and/or stability margins by applying numerical optimization methods to the open-loop model. Some relevant works related to the optimal control applied to Voltage-Current (V-I) control level may be found in [3,4,5,6,7,8,9,10,11,12]. Most of these works use proportional–integral (PI) or proportional–resonant (PR) controllers with linear quadratic (LQ) control to compute an optimal state-feedback matrix that minimizes certain cost functions. Optimal LQ strategies for primary control are more difficult to implement since this kind of controllers require an open-loop model to apply numerical optimization methods.
In [13], the authors presented a small signal stability analysis for a single-phase droop controlled inverter connected to a stiff AC source. In this analysis, a resistive-inductive load is connected between the inverter and the stiff AC source. The expressions to compute the active power P and reactive power Q expressions are presented as follows:
P = 1 R 2 + X 2 ( RE 2 REV cos δ + XEV sin δ )
Q = 1 R 2 + X 2 ( XE 2 XEV cos δ REV sin δ )
where R and X are the real and imaginary components of the line impedance. E and V are the voltage amplitude of the inverter and stiff AC source, respectively. Finally, the phase difference between both generators is defined by δ . For small disturbances, the above equations can be linearized as follows:
Δ P = P E Δ E + P δ Δ δ
Δ Q = Q E Δ E + Q δ Δ δ .
The linearized expressions for P, Q, ω , and E are given by
Δ P = k pe Δ E + k pd Δ δ
Δ Q = k qe Δ E + k qd Δ δ
Δ ω = m Δ P
Δ E = n Δ Q
where k pe ,   k pd ,   k qe , and k qd are the constants resulting from evaluating the linearization function on the operating point ( δ e ,   E e ,   V e ) [13]. Equations (7) and (8) represent the droop control equations, where Δ ω ( s ) = s δ ( s ) is the frequency deviation around the operating point ω e . Using a low-pass filter with the cut-off frequency ω f and merging Equation (5) into (8), the following system is defined:
Δ δ ( s ) = m ω f s ( s + ω f ) ( k pe Δ E ( s ) + k pd Δ δ ( s ) )
Δ E ( s ) = n ω f s + ω f ( k qe Δ E ( s ) + k qd Δ δ ( s ) ) .
The analysis performed in [13] is used to determine the stability of a droop-controlled inverter connected to a stiff AC source. This is done by analyzing the resulting eigenvalues of the system generated by Equations (9) and (10). It can also be noticed that, for suitable values of m and n, the inverter frequency and voltage amplitude will converge to zero deviation from the operating point.
Following this work, Coelho et al. presented a similar small-signal stability analysis for the two parallel connected inverters sharing power between them [14]. In this work, a state-space representation of the entire linearized microgrid was developed in the dq frame. The entire system is described in (11):
Δ x · = A · Δ x
with Δ x = [ Δ ω 1 Δ E d 1 Δ E q 1 Δ ω 2 Δ E d 2 Δ E q 2 ] T . States Δ E di and Δ E qi are the in-phase and quadrature nominal voltage in the dq frame for the i-th inverter and Δ ω i is the frequency of each inverter. The state matrix A = M s + C s ( I s + E s Y s ) K s is composed of matrices that are dependent of the droop coefficients, the nominal voltages, and the nominal currents vector. Refer to [14] for a detailed definition of these matrices. Knowing the value of matrix A , the eigenvalues may be calculated to determine the stability and transient response of the entire system. The work by Coelho et al. provided an effective method for analyzing stability in microgrids using the droop method as a primary control strategy. However, this analysis does not consider the effects of the V-I control loop and does not allow to separate the droop controller and the system.
In [15], a complete microgrid was modeled using small-signal analysis. The V-I and power sharing control levels where integrated to analyze their influence on microgrid stability. The complete system was modeled in three different parts: inverter model, network model, and load model. In the inverter model, the V-I and primary droop control were considered together with the inductor–capacitor–inductor (LCL) output filter dynamics. In the network model, a network with m nodes and n resistive-inductive lines was considered. In the load model, a resistive-inductive load was modeled. Each of these models was written in such a way that the complete microgrid model may integrate them depending on the number of generators, network interconnections, and loads.
The complete model was analyzed using the root locus method. It was discovered that there were three different relevant clusters in the microgrid’s eigenvalues placement. This approach shows relevant information regarding microgrid stability using small signal analysis. However, the complete microgrid model relies entirely on the control topology and control constants. Generally, a dynamic system is modeled in such a way that the designer may easily couple it with a control strategy. However, in this approach, the control parameters are embedded into the microgrid model and changing them directly affects the analysis. Moreover, no formal stability analysis can be performed from an open-loop perspective because the microgrid model can only be developed considering the closed loop system.
Another important work regarding microgrid stability with droop controllers is presented in [16]. The author divides microgrid stability in three main categories: small signal stability, transient stability, and voltage stability. The small signal stability is mainly affected by the V-I and primary feedback controllers, where the control parameters affect system transient response and pole allocation. The use of feedback controllers with decentralized control methods such as droop control creates most of the small signal stability issues in islanded microgrids [16]. This stability can be improved by using robust and optimal control techniques, supplementary control loops, coordinated control, and stabilizers such as flywheels. Transient stability is mainly affected in islanded mode, were frequency and voltage amplitude may be affected without a connection to a stiff grid. Transient stability is analyzed by using Lyapunov function techniques and nonlinear system analysis [17]. In addition, transient stability can be addressed by using energy storage and load shedding methods which allow to sustain the entire system when a sudden power loss is detected. Finally, voltage stability may be caused by irregular behavior in reactive load sharing or the connection of induction motors. Voltage stability can be addressed by injecting reactive power into the microgrid and compensate the sudden voltage droop.
Another approach for stability analysis in droop controllers is performed in [18], where a dynamic phasor modeling (DPM) of the primary droop control of a microgrid was developed. The DPM allows to introduce additional terms on the imaginary axis to the mathematical model. This consideration makes the DPM of the inverter circuit more accurate than the conventional small signal analysis shown in [14]. A new active and reactive power model was developed, and its accuracy was compared to a complete order model and a small signal model. Results show adequate modeling in transient response and eigenvalue location. In addition, a virtual-frame droop control was tested with this model with more accurate results than in previous work. However, this model does not consider the V-I control loop and makes it difficult to analyze the coupling between the real and imaginary components of power, current, and impedances. This modeling could result more effective when analyzing transient responses in a complete microgrid.
In this document, a model for inverter-based grid-connected and islanded microgrids in a synchronous reference frame is presented. Both models were tested and validated in an experimental setup to demonstrate their accuracy in describing microgrid dynamics. Most of the approaches found in the literature developed the microgrid model based on the controller dynamics, which does not allow to perform an open-loop analysis such as singular value diagrams or obtaining stability margins. The aim of the proposed models is to allow designers to perform robustness and stability analysis techniques that require an open-loop model to be performed. In addition, the proposed models are able to be used to develop controllers that are based on numerical optimization methods such as linear quadratic controllers, Kalman filters, H -based controllers, model-predictive controllers, and others. The presented models are small-signal realizations that consider parameters such as frequency around the operating equilibrium point. Although the proposed models are developed for a microgrid based on inverter generators connected to a single point of common coupling (PCC), the methodology used to develop them may be used to expand the case study to more complex microgrids.
Three application scenarios are presented: non-controlled model, Linear-Quadratic Integrator (LQI) power control, and Power-Voltage (PQ/Vdq) droop–boost controller. Both controllers allow to perform stability and performance analysis methods which, unlike approaches found in the literature, can provide a wider perspective of the microgrid in islanded and grid-connected modes. Furthermore, the controlled open-loop model can be used to analyze the microgrid frequency response under disturbances in the process and noise in the sensors. The linear nature of the proposed controllers allows to compute modern controllers that rely on a precise model to obtain a controller that optimizes certain control objectives.
The following sections are divided as follows: Section 2 presents the mathematical development of the proposed models; and Section 3 presents the validation of the proposed model under three different scenarios. Finally, the discussion of results is presented in Section 4.

2. Microgrid Model

The proposed model for this research is obtained in two stages. First, the model of each inverter connected to the main grid is used to describe dynamics in grid-connected mode. This model is also used to develop the proposed control strategy. Then, the models of all inverters are integrated in a single state-space model to describe the microgrid dynamics in islanded mode.

2.1. Model of a Single Inverter Connected to the Main Grid

The circuit used to develop the proposed model in grid-connected mode is shown in Figure 2. The output of a three-phase inverter E is driven by a Pulsed-Width Modulated (PWM) signal, which is filtered using an inductor–capacitor–inductor (LCL) output filter. The inverter is connected to a stiff voltage source V that represents the main grid. Input inductor current, capacitor voltage, and output current are denoted by I l , V c , and I o , respectively.
The state-space model of this circuit for each phase in the ABC frame is given by
[ V · c I · l I · o ] [ 0 1 C 1 C 1 L i 0 0 1 L o 0 0 ] [ V c I l I o ] + [ 0 1 L i 0 ] E + [ 0 0 1 L o ] V g .
It is important to note that, in order to simplify the mathematical procedure, this model does not consider non-linear phenomenon such as the switching behavior in the insulated-gate bipolar transistors (IGBT), the voltage saturation in the DC bus, nor the unbalances caused by the deviation in its components. In addition, no phenomenon related to AC–AC conversion using power transformers is considered. The state-space model (13) is obtained using the dq transformation. The state-space model transformation to the dq frame is based on the Clarke transformation and the complete mathematical development may be found in [19]. The dq transformation is performed by assuming a constant angular frequency ω c , which corresponds to the nominal angular frequency of the main grid:
x · = A dq x + B 1 dq E dq + B 2 dq + V gdq
where E dq = [ E d E q ] T , V gdq = [ V gd V gq ] T , and:
x = [ V cd V cq I ld I lq I od I oq ] ;     A dq = [ 0 ω c 1 / C 0 1 / C 0 ω c 0 0 1 / C 0 1 / C 1 / L i 0 0 ω c 0 0 0 1 / L i   ω c 0 0 0 1 / L o 0 0 0 0 ω c 0 1 / L o 0 0 ω c   0 ] ;   B 1 dq = [ 0 0 0 0 1 / L i 0 0 1 / L i 0 0 0 0 ] ;   B 2 dq = [ 0 0 0 0 0 0 0 0 1 / L o 0 0 1 / L o ] .
The active and reactive power injected to V gdq are defined by
P = 3 2 ( V gd I od + V gq I oq )
Q = 3 2 ( V gq I d V gd I oq )
The dq frame is synchronized with the main grid by using a Phase-Locked Loop (PLL). Thus, V gd represents the nominal voltage peak amplitude of the main grid, V ¯ gd and V ¯ gq = 0 [19]. This is because the PLL increases the angular frequency ω until the q component of the three-phase signal becomes zero. Thus, the output of the state-space model is used to represent the active and reactive power received by V gdq as follows:
Y = [ P Q ] = 3 2 [ V ¯ gd 0 0 V ¯ gd ] [ I od I oq ] .
It is important to remark that the system in (13) must be discretized in order to implement it in a physical experiment using data acquisition devices and PWM control signals. To discretize it, the state must be augmented using a delay transfer function to account for the delay induced by the PWM output signal [20,21]. The resulting system is given by
[ X [ k + 1 ] E 1 [ k + 1 ] ] X T [ k + 1 ] = [ A ¯ dq B ¯ 1 dq 0 2 × 6 0 2 × 2 ] A T [ X [ k ] E 1 [ k ] ] X T [ k ] [ 0 6 × 2 I 2 × 2 ] B 1 T E dq [ k ] + [ B 2 dq 0 2 × 2 ] B 2 T V gdq [ k ]
where A ¯ dq and B ¯ 1 dq are the discrete-time state and input matrices. The auxiliary variable E 1 represents the delayed input and the discrete-time state vector in the dq frame is X [ k ] = [ V cd V cq I ld I lq I od I oq ] T .

2.2. Model of the Microgrid in Islanded Mode

The islanded microgrid model was used to assess the stability and robustness considering the interaction of multiple inverters connected in islanded mode to a single PCC. For the grid-connected mode, the state-space model (13) must be used for each generator individually. The circuit considered for the islanded microgrid model is shown in Figure 3. This circuit only considers interactions between inverter-based generators and the main grid from a single PCC. However, the methods proposed in this section may be used to integrate the proposed model into more complex microgrids. The integration of the proposed model with a microgrid with synchronous generators is out of the scope of this work.
Although, many types of loads may exist in microgrids, so the load is selected to be a resistive-inductive ( RL ) circuit because it allows to analyze the behavior of the active and reactive power. To obtain the complete microgrid model, the model for one phase of each inverter using (12) must be computed. Then, V g must be defined in terms of the output currents and load components as follows:
V g = L I · ot + R I ot
where I ot = j = 1 n I oj with n representing the number of generators. Equation (19) can be reformulated to describe the resistive-capacitive behavior in order to analyze loads such as LED lighting or AC–DC converters. Nonlinear loads with harmonic currents can be modeled as a disturbance in the complete model with a known bandwidth and frequency behavior. A complete microgrid model is obtained by substituting V g from (19) into the model of each inverter (12) and combining all the models. For example, for two generators with a common RL load, the microgrid model in islanded mode for one phase is given by (20):
[ V ˙ c 1 I ˙ l 1 I ˙ o 1 V ˙ c 2 I ˙ l 2 I ˙ o 2 ] = [ 0 1 / C 1   1 / C 1 0 0 0 1 / L i 1 0 0 0 0 0 L t 2 / L dt 0 ( RL RL t 2 ) / L dt   L / L dt 0 ( RL RL t 2 ) / L dt 0 0 0 0 1 / C 2 1 / C 2 0 0 0   1 / L i 2 0 0 L / L dt 0 ( RL RL t 1 ) / L dt L t 1 / L t 0 ( RL RL t 1 ) / L dt ] [ V c 1 I l 1 I o 1 V c 2 I l 2 I o 2 ] + [ 0 0 1 / L i 1 0 0 0 0 0 0 1 / L i 2 0 0 ] [ E 1 E 2 ]
where L dt = L ( L o 1 + L o 2 ) + L o 1 L o 2 , L t 1 = L + L o 1 , and L t 2 = L + L o 2 . For n inverters, replacing V g from (19) into each generator model (12) yields to a linear system with the differential equations for the output currents as shown in (21). Combining the solution of (21) with the model of each inverter (12), the complete microgrid model (22) for n inverters is obtained. The model in (22) is for each phase. However, it must be transformed to the dq frame using as in [19]:
[ I ˙ o 1 I ˙ o 2 I ˙ on 1 I ˙ on ] = [ ( L o 1 + L ) L L L L ( L o 2 + L ) L L L L ( L on 1 + L ) L L L L ( L on + L ) ] [ V c 1 RI t V c 2 RI t V cn 1 RI t V cn RI t ] = [ ϕ 11 ϕ 1 n ϕ n 1 ϕ nn ] [ V c 1 I l 1 I o 1 V cn I ln I on ]
[ V ˙ c 1 I ˙ l 1 I ˙ o 1 V ˙ cn I ˙ ln I ˙ on ] = [ A ˜ 1 0 2 × 3 0 2 × 3 ϕ 11 ϕ 12 ϕ 1 n 1 ϕ 1 n 0 2 × 3 A ˜ 2 0 2 × 3 ϕ 21 ϕ 22 ϕ 2 n 1 ϕ 2 n 0 2 × 3 0 2 × 3 A ˜ n ϕ n 1 ϕ n 2 ϕ nn 1 ϕ nn ] A μ G [ V c 1 I l 1 I o 1 V cn I ln I on ] X   μ G + [ B 1 0 3 × 1 0 3 × 1 B n ] B μ G [ E 1 E n ]
where:
A ˜ j = [ 0 1 / C j 1 / C j 1 / L j 0 0 ] ,   B j = [ 0 1 / L ij 0 ] T
with 1 j n . Elements ϕ jk represent the coefficients of each state variable properly arranged from the solution of (21).

3. Validation of the Proposed Models and Application Scenarios

The proposed models were validated in three scenarios:
  • Open-loop model validation;
  • Grid-connected LQI power controller;
  • Islanded PQ/Vdq LQI-based droop controller.
The open-loop model validation is used to assess the similarity between the mathematical model and the physical model. The grid connected LQI power controller is used to demonstrate the applicability of the model for a single inverter. Finally, the islanded PQ/Vdq LQI-based droop controller is used to assess the stability and performance of an entire microgrid in islanded mode.
For safety reasons, the open-loop model of the grid-connected and islanded microgrid were not validated in a real experiment. Instead, these models were validated using an OPAL-RT OP5700 Real-time simulator. The closed-loop models were validated using the setup shown in Figure 4. This setup uses four Danfoss 2.2 kVA inverters with LCL filters and four sensor boxes with voltage and current sensors from LEM International. These four inverters may be dynamically connected to the AC bus. The AC bus may also be dynamically connected or disconnected from the main grid using solid-state relays handled with a programmable logic controller (PLC). To implement the control algorithms, a dSPACE 1006 simulator was used to read the signals from the sensor boxes and send the 10 kHz PWM pulses via optical fiber.
For each scenario, the time responses of each inverter were compared with the mathematical model. In addition, the mathematical model and circuit responses were compared using the normalized root mean squared error (NRMSE) defined by [22]:
NRMSE = 100 × ( 1 y ref y y ref mean ( y ref ) ) .
where . indicates the Euclidian norm of a vector. Vectors y and y ref represent the time response of a measurement and its mathematical reference, respectively. The NRMSE varies between (bad fit) and 100% (perfect fit). The NRMSE is suitable for this validation because it considers the complete measurement during a specific interval of time. The NRMSE must be obtained for each state-variable and power measurement. It is expected to find certain discrepancies between both systems due to parasitic phenomenon and other neglectable nonlinear dynamics of the components that are not being considered in this work. However, parameters such as frequency response and transient response are expected to be similar in both systems [23]. To assess robustness and stability for the proposed model in each scenario, the Robust Control Toolbox from Matlab was used. The following robustness and stability analysis were performed:
  • Eigenvalue analysis: this analysis consists of plotting the eigenvalues of a multiple-input–multiple-output (MIMO) transfer function G ( z ) in the complex z plane to check whether they remain inside the unit circle. If some of the eigenvalues are located outside the unit circle, it means that the system or its variations are unstable by nature. Eigenvalue location may also provide information about transient response.
  • Stability margin analysis: the disk margin method is used for estimating structured robustness under multiplicative uncertainties for MIMO systems using negative feedback [24]. The disk-based margins are calculated considering all loop interactions. Results from this analysis provide a more conservative information about structured gain and phase margins.
  • Singular value diagrams (SVD): the singular value plot is commonly used to analyze the frequency response of MIMO systems [25]. This plot shows the frequency response of the maximum and minimum singular values of a MIMO transfer function G ( z ) . This way, some performance bounds may be established for the controlled closed-loop system.

3.1. Scenario 1: Open-Loop Models Validation

To demonstrate the effectiveness of the proposed models, a microgrid scenario with three inverter-based generators and an RL load was proposed. The parameter specifications for the microgrid are summarized in Table 1. To obtain the model of the microgrid in grid-connected mode, the component values were evaluated in (13) for each inverter. Sampling frequency was defined to be f s = 10   kHz according to the Shannon sampling theorem [26]. The three models were discretized and augmented with delay blocks using (18). This resulted in three independent models.
The complete microgrid model in islanded mode was obtained by merging the grid-connected models and using (21) and (22). The resulting model for one phase of the islanded microgrid with three generators and a common RL load is shown in (26). This model was transformed to the dq frame as in [19]. Component values from Table 1 were evaluated and the model was discretized. Finally, the discretized model was augmented to account for the PWM delay (18). This resulted in a state-space system (26) with six inputs, six outputs, and a state vector with 24 variables given by
X ¯ μ G = [ V c 1 d q I L 1 d q I o 1 d q E 11 d q V c 2 d q I L 2 d q I o 2 d q E 12 d q V c 3 d q I L 3 d q I o 3 d q E 13 d q ] T
where the subscript dq represents the direct and quadrature component and E 1 jdq represents the delayed input of inverter j:
[ V ˙ c 1 I ˙ l 1 I ˙ o 1 V ˙ c 2 I ˙ l 2 I ˙ o 2 V ˙ c 3 I ˙ l 3 I ˙ o 3 ] = [ 0 1 C 1 1 C 1 0 0 0 0 0 0 1 L i 1 0 0 0 0 0 0 0 0 L d 1 L d t 0 RL o 2 L o 3 L d t LL o 3 L d t 0 RL o 2 L o 3 L d t LL o 2 L d t 0 RL o 2 L o 3 L d t 0 0 0 0 1 C 2 1 C 2 0 0 0 0 0 0 1 L i 2 0 0 0 0 0 LL o 3 L d t 0 RL o 1 L o 3 L d t L d 2 L d t 0 RL o 1 L o 3 L d t LL o 1 L d t 0 RL o 1 L o 3 L d t 0 0 0 0 0 0 0 1 C 3 1 C 3 0 0 0 0 0 0 1 L i 3 0 0 LL o 2 L d t 0 RL o 1 L o 2 L d t LL o 1 L d t 0 RL o 1 L o 2 L d t L d 3 L d t 0 RL o 1 L o 2 L d t ] [ V c 1 I l 1 I o 1 V c 2 I l 2 I o 2 V c 3 I l 3 I o 3 ] + [ 0 0 0 1 L i 1 0 0 0 0 0 0 0 0 0 1 L i 2 0 0 0 0 0 0 0 0 0 1 L i 3 0 0 0 ] [ E 1 E 2 E 3 ]
where L dt = L ( L o 1 L o 2 + L o 1 L o 3 + L o 2 L o 3 + L o 1 L o 2 L o 3 ) , L d 1 = LL o 2 + L o 2 L o 3 + LL o 3 , L d 2 = LL o 1 + L o 1 L o 3 + LL o 3 , and L d 3 = LL o 1 + L o 1 L o 2 + LL o 2 .
Once an open-loop state-space model of the three-phase inverter-based generator was obtained, it was desired to analyze the performance, stability, and robustness characteristics such as phase margin, gain margin, eigenvalue structure, etc. Robustness and stability analyses were performed for the grid-connected and islanded models. To perform the robustness and stability analyses in grid-connected mode, the model of each inverter was analyzed separately. The discrete transfer function for the i-th inverter is given by
G i ( z ) = C ¯ dqi ( zI A ¯ dqi ) 1 B ¯ 1 dqi .
where A ¯ dqi , B ¯ 1 dqi , and C ¯ dqi are the discrete-time form of the i-th inverter state, input, and output matrices, respectively. The input is the control effort E dq and the output is the active and reactive power of the i-th inverter Y. Similarly, to perform a robustness and stability analysis in islanded mode, the following discrete-time transfer function of the microgrid is used:
G μ G ( z ) = C ¯ μ G ( zI A ¯ μ G ) 1 B ¯ μ G
where A ¯ μ G and B ¯ μ G are the discrete-time state and input matrices from the transformed to the dq frame. The microgrid output matrix is given by C ¯ μ G = diag ( C ¯ dq 1 ,   C ¯ dq 2 , , C ¯ dqn ) . The input is the control efforts and the output is the power vector of all the inverters of the microgrid.
To assess the robustness and stability under component variations, the Robust Control Toolbox from Matlab was used to generate instances of G μ G ( z ) and G i ( z ) with randomized variations in the components [23]. For these analyses, the components in the LCL filters were defined as uncertain elements with a uniform variation of 30% around nominal parameter values shown in Table 1. Although circuit components are not expected to be more than 20% deviated from their nominal values before being considered defective, the variation was selected to be around 30% in order to test for a worst-case manufacturing scenario or worst-case component deterioration. The distribution of uncertain elements was selected to be uniform in order to have the same probability of obtaining a certain deviation from the nominal value. This was to analyze the interactions between the extreme deviations including positive and negative values around the nominal point. Stability analyses found in the literature for V-I or primary control are based on varying one parameter at a time and observing the variations in the eigenvalues location [9,14,27,28,29,30]. Analyzing random variations in components gives a more conservative notion of stability and robustness because this method considers all the variations at the same time. Considering that a uniform deviation is used, 20 instances of each GμG(z) and Gi(z) were created based on parameter variations. Considering positive and negative deviations, this number of deviations will provide a mean deviation of 3% between each set of components, which is adequate for analyzing the sensitivity to parameter variations.
As the open-loop models do not contain any controller to regulate the current spikes nor phase deviations, this could cause inverters to trip or even having a safety issue if the models are validated in a physical experiment. Thus, their validation can only be performed using real-time simulation tools. To validate the accuracy of the mathematical model of an inverter connected to the main grid, the simulation of the circuit shown in Figure 2 was computed in parallel with its mathematical model G i ( z ) . Similarly, to validate the accuracy of the mathematical model of an islanded microgrid, the simulation of the microgrid scheme shown in Figure 3 was computed in parallel with its mathematical model G μ G ( z ) . For both validations (grid-connected and islanded mode), the same input signal was used on the mathematical model and the simulated circuit as shown in Figure 5. The three-phase reference generator produces step changes in amplitude in order to compare transient responses. Each inverter was simulated using an OPAL OP5700 real-time simulator with the ARTEMiS library for power electronics devices from Opal-RT Technologies™ [31]. The mathematical solver of this library runs accurate simulations of power electronics devices, such as the IGBT transistors used in three-phase inverters.

3.1.1. Grid-Connected Inverter Model

To validate the mathematical model (13), the LCL component values for Inverter 1 were used. Once the Inverter 1 model was validated, it was assumed that (13) was adequate in describing the dynamics of any grid-connected inverter such as Inverters 2 or 3.
For this experiment, the inverter output voltage E and main grid voltage V g started with the same nominal amplitude and phase. At t = 0.025   s , the inverter output amplitude was duplicated to a peak value of 240 2 and returned to the original value at t = 0.035   s . Figure 6 shows the active and reactive power values for the mathematical model and circuit. Zoomed views in Figure 6 show that active and reactive power for the mathematical model and circuit have similar dynamics. However, there are small high-frequency oscillations in the power of the circuit. These oscillations are generated by IGBT transistor switching at a frequency of 10   kHz .
Figure 7 shows the state vector waveforms in the dq frame and ABC frame. Zoomed views also show the current switching oscillations in the input inductor. However, state vector dynamics show similar behavior in steady state and during transient response.
The NRMSE value was also analyzed for the shared power and the state vector in the dq frame. Figure 8 shows that the fitting values are above 95% in all the state variables except the input inductor current, which is about 78% on the q component of the input inductor current. This is produced by the 10 KHz switching noise of the PWM signal, which was not considered in the proposed model. These results validate the accuracy of the proposed model for the grid-connected inverter.
Open-loop eigenvalues of nominals G 1 ( z ) , G 2 ( z ) , and G 3 ( z ) and their variations are shown in Figure 9. As seen in the zoomed view, the eigenvalues remain inside the unit circle, which implies that all the inverters were stable in grid-connected mode without a controller. However, after analyzing the stability margins, none of the open-loop models were closed-loop stable using unit feedback.
Singular value diagrams of the nominal G 1 ( z ) , G 2 ( z ) , and G 3 ( z ) and their variations are shown in Figure 10. According to these diagrams, frequency responses of Inverters 2 and 3 are similar, with variations on their resonant and crossover frequencies. Moreover, Inverter 1 has the fastest dynamics followed by Inverters 2 and 3, respectively.

3.1.2. Islanded Microgrid Model

For the islanded mode, the scenario was simulated using an OPAL OP5700 real-time simulator with the ARTEMiS library for power electronics devices [31]. The ARTEMiS library was used to perform accurate simulations that considered the switching behavior of power electronic devices. To validate the mathematical model, the LCL component values from Table 1 were used. For this experiment, the output voltage of the three inverters and the main grid started with the same nominal amplitude and phase. At t = 0.025   s , the inverters’ output amplitude was duplicated to a peak value of 240 2 and returned to the original value at t = 0.035   s . Figure 11 shows the active and reactive power waveforms for the mathematical model and circuit. State vector waveforms in the dq frame are shown in Figure 12 and in the ABC frame in Figure 13. The active and reactive power for the mathematical model and circuit have similar dynamics. As detailed in zoomed views, input inductor currents showed switching oscillations. These oscillations were caused by the IGBT transistors switching at a frequency of 10   kHz . However, state vector dynamics show similar behavior in steady state and during transient response.
The NRMSE value was also analyzed for the shared power and the state vector in the dq frame. Figure 14 shows that fitting values are above 98% in all the state variables except for the input inductor currents, which decrease due to the presence of the 10 kHz PWM switching. These results validate the accuracy of the proposed model for the islanded microgrid.
Open-loop eigenvalues of G μ G ( z ) and its variations are shown in Figure 15. All the eigenvalues remain inside the unit circle, which implies that the open-loop microgrid is stable in grid-connected mode without a controller. However, after analyzing stability margins, none of the open-loop models were closed-loop stable using a unit feedback. Finally, the singular value diagrams of the nominal G μ G ( z ) and its variations are shown in Figure 16. These diagrams show similar behavior compared to Figure 10. However, there is an additional response below 0   dB that is related to the RL load.

3.2. Scenario 2: Grid-Connected LQI Power Controller

The power controller for the grid-connected inverter was developed using (18) with the component values of Inverter 1 from Table 1. The control scheme is shown in Figure 17. To synchronize each inverter with the AC bus, a second order generalized integrator (SOGI-PLL) is implemented as shown in Figure 23.

3.2.1. LQI Controller

The LQI controller is designed to minimize the tracking error by computing the integral of the error vector ε = i ( Cx i r i ) . The augmented model that includes the tracking error is given by
[ X T [ k + 1 ] ε [ k + 1 ] ] X ¯ T [ k + 1 ] = [ A T 0 6 × 2 T s C I 2 × 2 ] A ¯ T [ X T [ k ] ε [ k ] ] X ¯ T [ k ] + [ B 1 T 0 2 × 2 ] B ¯ 1 T E dq [ k ] + [ 0 8 × 2 I 2 × 2 ] B ¯ int r [ k ] + [ B 2 T 0 2 × 2 ] B ¯ 2 T V gdq [ k ]
Defining the control law as E dq = K t X ¯ T , the closed-loop model is given by
X ¯ T [ k + 1 ] = ( A ¯ T B ¯ 1 T K t ) 1 X ¯ T [ k ] + B ¯ int r [ k ] + B ¯ 2 T V gdq [ k ]
To compute the LQI controller, the following cost function is defined:
J [ k 0 ] = k = k 0 T { ( C X ¯ T [ k ] r [ k ] ) T Q p ( C X ¯ T [ k ] r [ k ] ) + E dq T [ k ] R p E dq [ k ] }
where Qp and Rp are some positive-definite and semi-positive-definite weighting matrices, respectively. The output matrix results by the augmentation of (17):
C = 3 2 [ 0 0 0 0 V ¯ gd 0 0 0 0 0 0 0 0 0 0 V ¯ gd 0 0 0 0 ]
The LQI feedback matrix Kt is given by
K t = ( B ¯ 1 T T S p B ¯ 1 T + R p ) 1 B ¯ 1 T T S A ¯ T
where Sp is the solution to the algebraic Ricatti equation [32]:
S p = A ¯ T T S p ( A ¯ T B ¯ 1 T K t ) + C T Q p C

3.2.2. Performance Analysis

To identify the adequate values of Qp and Rp, a stability analysis was performed using open-loop singular value diagrams, closed-loop eigenvalue plots, and closed-loop step responses. It was desired that the closed-loop system reached a steady state in less than 0.005s with a damping ratio less than 0.7. The closed-loop eigenvalues are given by
λ { ( I + Λ ( z ) ) 1 } = λ { A ¯ T B ¯ T K t }
For illustration purposes, the discrete closed-loop eigenvalues were transformed into continuous time using z = e sT . Closed-loop eigenvalues were calculated for different values of q p in Q p = diag ( [ 1 1 1 1 100 100 1 1 q p q p ] ) and R p = r p I 2 × 2 . From the eigenvalue plot shown in Figure 18, it can be noticed that the eigenvalues with q p = 9000 are more suitable to fulfill design requirements.
The open-loop transfer function is given by
Λ ( z ) = K t ( zI A ¯ T ) 1 B ¯ 1 T
After selecting Q p , the singular value plot and the step-response plot were analyzed by varying r p . For this analysis, it was desired to attenuate the high-frequency noise in the power measurement. The high-frequency noise is considered a disturbance in the process since it is produced by the transistors. To attenuate the process noise, it is desired for the open-loop SVD bandwidth to be as high as possible without affecting the step-response requirements [25]. Figure 19 shows that a suitable response is achieved for r p = 0.0001. The resulting state-feedback matrix is given by
K t = [ 0.547 0.043 9.855 0.372 4.348 0.140 0.666 0.018 58.172 6.685 0.043 0.547 0.372 9.855 0.140 4.348 0.018 0.666 6.685 58.172 ]

3.2.3. Experimental Results

To assess the performance of the proposed model and to validate the closed-loop model, the experimental setup from Figure 4 was used. The experimental response was compared against the mathematical response of the closed-loop model under a step reference of 400 W and 400 VAr. As the closed-loop inputs from (30) include the grid voltage, the acquired voltage measurement from the power authority was transformed to the dq frame and was used as the input of the closed-loop mathematical model.
Experimental and mathematical values for the active and reactive power are shown in Figure 20. As the power measurement contains high-frequency noise generated by the PWM switching, a first-order low-pass filter with a bandwidth of ω c = 10   rad / s was used. Notice that, unlike classical droop controllers, this filter is only used for visualization purposes and is not included in the control loop.
Results from Figure 20 demonstrate that the performance of the proposed controller is adequate. Moreover, the NRMSE for the active power is 98.89% and 97.23% for the reactive power. This demonstrates that the mathematical closed-loop model and that the experimental results are alike.

3.3. Scenario 3: Islanded PQ/Vdq LQI-Based Droop–Boost Controller

To demonstrate the effectiveness and the applicability of the islanded model, a microgrid scenario with three inverter-based generators and two loads was proposed, as shown in Figure 21. Connection switches were located at the output of each inverter, at the input to each load, and at the point of connection with the main grid. Without loss of generality, all three inverters had the same LCL filter components to simplify the design procedure. However, the design procedure shown in this section is also suitable for microgrids with different LCL filter components. The parameter specification for the microgrid scenario is shown in Table 2.

3.3.1. Controller Design

The controller presented in this section is designed for each inverter independently. The control scheme for one inverter is shown in Figure 22. Each controller contains an internal LQI controller to regulate the output voltage Vcdq. The voltage reference of the LQI controller V cref is generated by the PQ/Vdq droop–boost controller according to the active and reactive power demanded by the load. The AC bus reference is set to nominal values such that V gref = [ V ¯ gd 0 ] .
To synchronize each inverter with the AC bus, a second order generalized integrator (SOGI-PLL) is implemented as shown in Figure 23 [33]. The output of the SOGI-PLL is used to perform the dq transformation of the input and output signals of the LQI controller. When the grid connection is lost, the operating frequency of the microgrid drops and the frequency restoration loop is activated. The frequency restoration loop integrates the frequency error and compensates the PLL operating frequency ω . This way, the microgrid frequency returns to nominal values in islanded mode. The expression of the output frequency of the SOGI-PLL with the proposed frequency restoration loop is given by
ω = V q ( K pP + K iP T s z 1 ) + ω c + F g K f T s z 1 ( ω ω c )
where F g is zero when the grid connection is lost and one when the grid is engaged. When synchronized, it may be assumed that V gq = 0 . Thus, in steady state ω ω c .

3.3.2. LQI Controller

Similar to Section 3.2.2, the LQI controller was designed using the augmented model (29). However, the output matrix is now defined to track the voltage error instead of output power as follows:
C = [ 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 ]
The selection of Qp and Rp was made following the same procedure shown in Section 3.2.2 with a desired settling time of 0.1 s and a damping ratio of 0.7. These matrices are given by Q p = 10 5 diag ( [ 1 1 1 1 1 1 1 1 10 8 10 8 ] ) and R p = I 2 × 2 . The resulting state-feedback matrix for the three inverters is given by
K t = 10 4   [ 7.348 1.514 245.1 3.75 245.2 3.182 18.1 0.065 31.59 0.008 1.514 7.348 3.175 245.1 3.182 245.2 0.065 18.1 0.008 31.59 ]

3.3.3. PQ/Vdq Droop–Boost Controller

The feedback control law for the PQ/Vdq droop–boost controller is given by
r = v ref K d X ¯ T
where:
K d = [ m 0 0 n ] D [ 0 0 0 0 3 2 V ¯ gd 0 0 0 0 0 0 0 0 0 0 3 2 V ¯ gd 0 0 0 0 ] C pq .
Notice that Cpq is the same output matrix used in (32). This is to represent the output power as the product C pq X ¯ T . Moreover, the matrix D is known as the droop–boost matrix, which droops Vcd with the active power and boosts Vq with reactive power. Vref is the voltage reference of the islanded microgrid.
To analyze the performance considering voltage and power dynamics, it was desired to integrate both Kt and Kd into a single state-feedback matrix KINV. Thus, the new feedback control law must integrate the LQI and the PQ/Vdq droop–boost control laws. The new feedback control law is defined by
U = [ E dq r ] = [ K t X ¯ T V ref K d X ¯ T ] = [ K t K d ] K INV X ¯ T + [ 0 2 × 2 I 2 × 2 ] B ¯ r V ref .
Evaluating (41) into (29) yields to the closed-loop model of the inverter connected to the main grid:
X ¯ T [ k + 1 ] = ( A ¯ T B ¯ U K INV ) 1 X ¯ T [ k ] + B ¯ U B ¯ r V ref [ k ] + B ¯ 2 T V gdq [ k ]
where B ¯ U = [ B ¯ 1 T    B ¯ int ] . To analyze the closed-loop microgrid, the islanded microgrid model is defined by using component values from Table 2 in (26). Then, the model is transformed to the dq frame using the transformation shown in [19]. Finally, the microgrid model is discretized and augmented with delay blocks for each input channel using (18). The resulting discrete microgrid model is given by
X ¯ μ G [ k + 1 ] = A ¯ μ Gd X ¯ μ G [ k ] + B ¯ μ Gd E μ G [ k ]
where A ¯ μ Gd and B ¯ μ Gd are the discrete-time form of A μ G and B μ G augmented with delay as follows:
A ¯ μ Gd = [ A ¯ μ G 11 B ¯ μ G 1 A ¯ μ G 12 0 6 × 2 A ¯ μ G 13 0 6 × 2 0 2 × 6 0 2 × 2 0 2 × 6 0 2 × 2 0 2 × 6 0 2 × 2 A ¯ μ G 21 0 6 × 2 A ¯ μ G 22 B ¯ μ G 2 A ¯ μ G 23 0 6 × 2 0 2 × 6 0 2 × 2 0 2 × 6 0 2 × 2 0 2 × 6 0 2 × 2 A ¯ μ G 31 0 6 × 2 A ¯ μ G 32 0 6 × 2 A ¯ μ G 33 B ¯ μ G 3 0 2 × 6 0 2 × 2 0 2 × 6 0 2 × 2 0 2 × 6 0 2 × 2 ] ; B ¯ μ Gd = [ B I 0 8 × 2 0 8 × 2 0 8 × 2 B I 0 8 × 2 0 8 × 2 0 8 × 2 B I ] ; B I = [ 0 6 × 2 I 2 × 2 ]
Matrices B ¯ μ Gi represent the discrete form of B μ G for the i-th inverter. Matrices A ¯ μ Gij are the 8 × 8 matrices that form the discrete form of A μ G as follows:
A ¯ μ G = [ A ¯ μ G 11 A ¯ μ G 12 A ¯ μ G 13 A ¯ μ G 21 A ¯ μ G 22 A ¯ μ G 23 A ¯ μ G 31 A ¯ μ G 32 A ¯ μ G 33 ]
The microgrid state-vector is defined by X ¯ μ G = [ X 1 E 11 X 2 E 12 X T 3 E 13 ] from (18). The input of the microgrid is defined by E μ G [ k ] = [ E dq 1 E dq 2 E dq 3 ] .
Following the same procedure, the discrete microgrid model is augmented with the integral of the tracking error for the LQI controller as in (29) as follows:
X ¯ μ GT [ k + 1 ] = A ¯ μ GT X ¯ μ GT [ k ] + B ¯ μ GT E μ G [ k ] + B ¯ int μ G r μ G [ k ]
where r μ G is the voltage reference of the LQI controller. Matrices A ¯ μ G d , B ¯ μ Gd , and B ¯ int μ G are given by
A ¯ μ G d = [ A ¯ μ G d 11 0 8 × 2 A ¯ μ G d 12 0 6 × 2 A ¯ μ G d 13 0 6 × 2 C T s I 2 × 2 0 2 × 6 0 2 × 2 0 2 × 6 0 2 × 2 A ¯ μ G d 21 0 6 × 2 A ¯ μ G d 22 B ¯ μ G 2 A ¯ μ G d 23 0 6 × 2 0 2 × 6 0 2 × 2 C T s I 2 × 2 0 2 × 6 0 2 × 2 A ¯ μ G d 31 0 6 × 2 A ¯ μ G d 32 0 6 × 2 A ¯ μ G d 33 B ¯ μ G 3 0 2 × 6 0 2 × 2 0 2 × 6 0 2 × 2 C T s I 2 × 2 ] 30 × 30 ;   B ¯ μ GT = [ B I 0 8 × 2 0 8 × 2 0 2 × 6 0 8 × 2 B I 0 8 × 2 0 2 × 6 0 8 × 2 0 8 × 2 B I 0 2 × 6 ] 30 × 6 B ¯ int μ G = [ B ¯ int 0 10 × 2 0 10 × 2 0 10 × 2 B ¯ int 0 10 × 2 0 10 × 2 0 10 × 2 B ¯ int ] 30 × 6 ;   r μ G = [ r 1 dq r 2 dq r 3 dq ] .
Equation (48) can be rewritten as
X ¯ μ GT [ k + 1 ] = A ¯ μ GT X ¯ μ GT [ k ] + B ¯ U μ G U μ G [ k ] ;   B ¯ U μ G = [ B ¯ μ GT B ¯ int μ G ] ; U μ G = [ E μ G r μ G ] T .
Then, following the same procedure for the grid-connected closed-loop model (44), the closed-loop microgrid model is defined by
X ¯ μ GT [ k + 1 ] = ( A ¯ μ GT B ¯ U μ G K μ G ) 1 X ¯ μ GT [ k ] + B ¯ U μ G B ¯ ref V ref [ k ] .
where:
K μ G = [ diag ( [ K t 1 K t 2 K t 3 ] ) diag ( [ K d 1 K d 2 K d 3 ] ) ] 12 × 30 ;   B ¯ ref = [ 0 6 × 2 I 2 × 2 I 2 × 2 I 2 × 2 ]
The closed-loop microgrid model (51) can now be used for analyzing the eigenvalue location and step response of an islanded microgrid using the PQ/Vdq droop–boost controller. The open-loop model can be used to analyze the singular value plot of the controlled microgrid to analyze the frequency response under disturbances.
For this experiment, the three inverters have the same rated power. However, for visualization purposes, the droop matrix relation was initially defined as D2 = 0.9D1, and D3 = 0.95D1. The droop matrix for Inverter 1 was defined as D 1 = d [ 1 0 0 1 ] . The closed-loop eigenvalues for the islanded microgrid for different values of d are shown in Figure 24. As d increases, the closed-loop eigenvalues tend to the right half plane indicating instability.
To analyze the transient response and frequency response, the singular value diagram is shown in Figure 25. It can be noticed that as d increases, the bandwidth of the open-loop response increases, which makes the system more susceptible to process noise. After analyzing the performance using the three different methods, the droop gains shown in Table 3 were selected:

3.3.4. Experimental Results

To assess the performance of the proposed model and to validate the closed-loop model, the experimental setup from Figure 4 was used. The experimental response was compared against the mathematical response of the closed-loop model under load changes. Step changes were analyzed in the mathematical model by generating two different closed-loop models (one for each total load value). Then, when Load 2 was connected in the experiment, that signal swapped the mathematical model and the state of the Load 1 mathematical model became the initial state of the mathematical model for Load 2. Experimental results for this experiment are presented in Figure 26.
It can be seen that although the power responses have slight discrepancies, the dynamic response is similar between the experiment and the mathematical simulation. These discrepancies are generated by deviations on the LCL components and the loads. Results from this experiment demonstrate the effectiveness of the proposed controller and the accuracy of the proposed model.

4. Discussion

In this work, a synchronous model for grid-connected and islanded microgrids is presented. Both models were tested and validated in an experimental setup to demonstrate their accuracy in describing microgrid dynamics. In addition, three scenarios were presented: non-controlled model, LQI power control, and PQ/Vdq droop–boost controller. Both controllers allow to perform stability and performance analysis methods which, unlike approaches found in the literature, can provide a wider perspective of the microgrid in islanded and grid-connected modes. Furthermore, the controlled open-loop model can be used to analyze the microgrid frequency response under disturbances in the process and noise in the sensors. Most of the approaches found in the literature develop the microgrid model based on the controller dynamics, which does not allow to perform open-loop analysis such as singular value diagrams or obtaining stability margins.
The limitations of the proposed models are based on the fact that these models do not include frequency dynamics as other approaches found in literature do. The frequency of the microgrid is assumed static and all inverters are assumed to be synchronized with the common AC bus. Thus, no frequency stability analysis can be performed for the islanded microgrid model. To perform this, the models must include linearized frequency dynamics and their effects on the reactive components of the microgrid. This is seen as a future research direction of this work. Moreover, the mathematical models assume small deviations from the operating point in the AC bus and do not consider certain non-linear dynamics such as transistor switching, DC bus saturation, nor unbalances. Thus, results may have a slight deviation for transient analysis.
The controllers developed in this work are different from the classical droop controller, where the frequency is reduced with the increase in active power and the amplitude is reduced with the reactive power. This implies that frequency does not have considerable distortion, preserving microgrid power quality. In addition, most of the control computations are linear, which allows to perform a stability analysis for state-space controllers. The power is assumed to be linear as the voltage in the AC bus must be close to the nominal values according to power authority regulations. However, further analysis must be done in order to integrate the proposed controllers with synchronous machines or inverters with classical droop controllers, which consider frequency dynamics.
It is important to remark that the proposed models and the application scenarios are intended to be a tool that help readers to implement non-classical power controllers and analyze their stability, robustness, frequency response, and dynamic response. In addition, the proposed models allow readers to implement linear modern controllers that rely on numerical methods such as LQR, Kalman filters, robust controllers and model predictive control. Furthermore, as the model includes the dynamics of power, it could be used to compute optimal control gains for the PQ-Vdq droop–boost controller. This could increase the robustness and stability of the islanded microgrid.
Finally, the methods presented to develop the proposed models can be used in similar approaches to extend the application scenarios to more complex scenarios where other types of generators are integrated. However, special considerations must be done to include the frequency dynamics in the mathematical model.

Author Contributions

Conceptualization, J.F.P.-M., J.D.V.-P. and F.A.; Formal analysis, J.F.P.-M.; Investigation, J.D.V.-P.; Methodology, J.F.P.-M., J.D.V.-P. and F.A.; Project administration, F.A.; Resources, F.A.; Validation, J.D.V.-P.; Writing—original draft, J.F.P.-M. and J.D.V.-P.; Writing—review & editing, J.F.P.-M. All authors have read and agree to the published version of the manuscript.

Funding

This research was funded by the United States Department of Energy, grant number DE-SC0020281.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Ton, D.T.; Smith, M.A. The U.S. Department of Energy’s Microgrid Initiative. Electr. J. 2012, 25, 84–94. [Google Scholar] [CrossRef]
  2. Lasseter, R.H. MicroGrids. In Proceedings of the 2002 IEEE Power Engineering Society Winter Meeting. Conference Proceedings (Cat. No.02CH37309), New York, NY, USA, 27–31 January 2002; Volume 1, pp. 305–308. [Google Scholar] [CrossRef]
  3. Marwali, M.N.; Keyhani, A. Control of distributed generation systems-Part I: Voltages and currents control. IEEE Trans. Power Electron. 2004, 19, 1541–1550. [Google Scholar] [CrossRef]
  4. Dirscherl, C.; Fessler, J.; Hackl, C.M.; Ipach, H. State-feedback controller and observer design for grid-connected voltage source power converters with LCL-filter. In Proceedings of the 2015 IEEE Conference on Control Applications (CCA), Sydney, Australia, 21–23 September 2015; pp. 215–222. [Google Scholar] [CrossRef]
  5. Majumder, R.; Chaudhuri, B.; Ghosh, A.; Majumder, R.; Ledwich, G.; Zare, F. Improvement of stability and load sharing in an autonomous microgrid using supplementary droop control loop. IEEE Trans. Power Syst. 2010, 25, 796–808. [Google Scholar] [CrossRef] [Green Version]
  6. Kabalan, M.; Singh, P. Optimizing a virtual impedance droop controller for parallel inverters. In Proceedings of the 2015 IEEE Power and Energy Society General Meeting, Denver, CO, USA, 26–30 July 2015. [Google Scholar] [CrossRef]
  7. Hasanzadeh, A.; Edrington, C.S.; Maghsoudlou, B.; Mokhtari, H. Optimal LQR-based multi-loop linear control strategy for UPS inverter applications using resonant controller. In Proceedings of the 2011 50th IEEE Conference on Decision and Control and European Control Conference, Orlando, FL, USA, 12–15 December 2011; pp. 3080–3085. [Google Scholar] [CrossRef]
  8. Khajehoddin, S.A.; Karimi-Ghartemani, M.; Ebrahimi, M. Optimal and Systematic Design of Current Controller for Grid-Connected Inverters. IEEE J. Emerg. Sel. Top. Power Electron. 2018, 6, 812–824. [Google Scholar] [CrossRef]
  9. Quan, X.; Wu, Z.; Dou, X.; Hu, M.; Huang, A.Q. Load Current Decoupling Based LQ Control for Three-Phase Inverter. IEEE Trans. Power Electron. 2018, 33, 5476–5491. [Google Scholar] [CrossRef]
  10. Sun, X.; Wong, L.K.; Lee, Y.S.; Xu, D. Design and Analysis of an Optimal Controller for Parallel Multi-Inverter Systems. IEEE Trans. Circuits Syst. II Express Br. 2006, 53, 56–61. [Google Scholar] [CrossRef]
  11. Babaei, M.; Qunais, T.; Abdelwahed, S. A linear quadratic tracking based voltage controller for VSI; MVDC shipboard power system application. In Proceedings of the 2017 IEEE Power & Energy Society General Meeting, Chicago, IL, USA, 16–20 July 2017; pp. 1–5. [Google Scholar] [CrossRef]
  12. Huerta, F.; Pizarro, D.; Cóbreces, S.; Rodríguez, F.J.; Girón, C.; Rodríguez, A. LQG servo controller for the current control of LCL grid-connected Voltage-Source Converters. IEEE Trans. Ind. Electron. 2012, 59, 4272–4284. [Google Scholar] [CrossRef]
  13. Coelho, E.A.A.; Cortizo, P.C.; Garcia, P.F.D. Small signal stability for single phase inverter connected to stiff AC system. In Proceedings of the Conference Record of the 1999 IEEE Industry Applications Conference. Thirty-Forth IAS Annual Meeting (Cat. No.99CH36370), Phoenix, AZ, USA, 3–7 October 1999; Volume 4, pp. 2180–2187. [Google Scholar] [CrossRef]
  14. Coelho, E.A.A.; Cortizo, P.C.; Garcia, P.F.D. Small-signal stability for parallel-connected inverters in stand-alone ac supply systems. IEEE Trans. Ind. Appl. 2002, 38, 533–542. [Google Scholar] [CrossRef]
  15. Pogaku, N.; Prodanović, M.; Green, T.C. Modeling, analysis and testing of autonomous operation of an inverter-based microgrid. IEEE Trans. Power Electron. 2007, 22, 613–625. [Google Scholar] [CrossRef] [Green Version]
  16. Majumder, R. Some aspects of stability in microgrids. IEEE Trans. Power Syst. 2013, 28, 3243–3252. [Google Scholar] [CrossRef]
  17. Andrade, F.; Cusido, J.; Romeral, L. Transient stability analysis of inverter-interfaced distributed generators in a microgrid system. In Proceedings of the 2011 14th European Conference on Power Electronics and Applications, Birmingham, UK, 30 August–1 September 2011; pp. 1–10. [Google Scholar]
  18. Guo, X.; Lu, Z.; Wang, B.; Sun, X.; Wang, L.; Guerrero, J.M. Dynamic Phasors-Based Modeling and Stability Analysis of Droop-Controlled Inverters for Microgrid Applications. IEEE Trans. Smart Grid 2014, 5, 2980–2987. [Google Scholar] [CrossRef] [Green Version]
  19. Pou, J. Modulation and Control of Three-Phase PWM Converters. Ph.D. Thesis, Dept. Elect. Eng., Univ. Politècnica de Catalunya, Terrassa, Spain, 2002. [Google Scholar]
  20. Zahniser, D.J.; Brenner, J.F. Signals and systems, by A.V. Oppenheim, A.S. Willsky, and I.T. Young. Prentice-Hall, Englewood Cliffs, New Jersey, 1983, 796 pages, hardbound, $37.95. Cytometry 1985, 6, 392. [Google Scholar] [CrossRef]
  21. Lu, M.; Wang, X.; Loh, P.C.; Blaabjerg, F.; Dragicevic, T. Graphical Evaluation of Time-Delay Compensation Techniques for Digitally Controlled Converters. IEEE Trans. Power Electron. 2018, 33, 2601–2614. [Google Scholar] [CrossRef]
  22. Shcherbakov, M.V.; Brebels, A.; Shcherbakova, N.L.; Tyukov, A.P.; Janovsky, T.A.; Kamaev, V.A. evich A survey of forecast error measures. World Appl. Sci. J. 2013, 24, 171–176. [Google Scholar] [CrossRef]
  23. Matlab. Robust Control Toolbox 2018; The Mathworks Inc.: Natick, MA, USA, 2018. [Google Scholar]
  24. Blight, J.D.; Lane Dailey, R.; Gangsaas, D. Practical control law design for aircraft using multivariable techniques. Int. J. Control 1994, 59, 93–137. [Google Scholar] [CrossRef]
  25. Maciejowski, J. Multivariable Feedback Design; Addison Wesley: Workingham, UK, 1989; Volume 1, ISBN 0201182432. [Google Scholar]
  26. Shannon, C.E. Communication in the Presence of Noise. Proc. IRE 1949, 37, 10–21. [Google Scholar] [CrossRef]
  27. Rey, J.M.; Marti, P.; Velasco, M.; Miret, J.; Castilla, M. Secondary Switched Control with no Communications for Islanded Microgrids. IEEE Trans. Ind. Electron. 2017, 64, 8534–8545. [Google Scholar] [CrossRef] [Green Version]
  28. Kukkola, J.; Hinkkanen, M.; Zenger, K. Observer-Based State-Space Current Controller for a Grid Converter Equipped With an LCL Filter: Analytical Method for Direct Discrete-Time Design. IEEE Trans. Ind. Appl. 2015, 51, 4079–4090. [Google Scholar] [CrossRef] [Green Version]
  29. Kukkola, J.; Hinkkanen, M. Observer-based state-space current control for a three-phase grid-connected converter equipped with an LCL filter. IEEE Trans. Ind. Appl. 2014, 50, 2700–2709. [Google Scholar] [CrossRef] [Green Version]
  30. Han, H.; Hou, X.; Yang, J.; Wu, J.; Su, M.; Guerrero, J.M. Review of Power Sharing Control Strategies for Islanding Operation of AC Microgrids. IEEE Trans. Smart Grid 2016, 7, 200–215. [Google Scholar] [CrossRef] [Green Version]
  31. OPAL-RT. OPAL-RT Solution For Micro-grid Applications Real Time Simulation; OPAL-RT Technologies: Montreal, QC, Canada, 2018. [Google Scholar]
  32. Lewis, F.L.; Vrabie, D.L.; Syrmos, V.L. Optimal Control; John Wiley & Sons, Inc.: Hoboken, NJ, USA, 2012; ISBN 9781118122631. [Google Scholar]
  33. Teodorescu, R.; Liserre, M.; Rodríguez, P. Grid Converters for Photovoltaic and Wind Power Systems; John Wiley & Sons, Ltd.: Chichester, UK, 2011; ISBN 9780470667057. [Google Scholar]
Figure 1. Microgrid general scheme.
Figure 1. Microgrid general scheme.
Energies 13 03279 g001
Figure 2. Three-phase generator connected to a voltage source.
Figure 2. Three-phase generator connected to a voltage source.
Energies 13 03279 g002
Figure 3. Complete islanded microgrid scheme with an RL load.
Figure 3. Complete islanded microgrid scheme with an RL load.
Energies 13 03279 g003
Figure 4. Photo of the experimental setup.
Figure 4. Photo of the experimental setup.
Energies 13 03279 g004
Figure 5. Proposed validation of the integrated state-space model of the inverter-based generator.
Figure 5. Proposed validation of the integrated state-space model of the inverter-based generator.
Energies 13 03279 g005
Figure 6. Power waveforms for the mathematical model and the circuit in grid-connected mode. (a) Active power; (b) reactive power.
Figure 6. Power waveforms for the mathematical model and the circuit in grid-connected mode. (a) Active power; (b) reactive power.
Energies 13 03279 g006
Figure 7. State-vector waveforms for the mathematical model and the circuit in grid-connected mode. (a) dq frame. (b) ABC frame.
Figure 7. State-vector waveforms for the mathematical model and the circuit in grid-connected mode. (a) dq frame. (b) ABC frame.
Energies 13 03279 g007
Figure 8. NRMSE for the state vector and shared power.
Figure 8. NRMSE for the state vector and shared power.
Energies 13 03279 g008
Figure 9. Eigenvalues of nominal G 1 ( z ) , G 2 ( z ) , and G 3 ( z ) and their variations.
Figure 9. Eigenvalues of nominal G 1 ( z ) , G 2 ( z ) , and G 3 ( z ) and their variations.
Energies 13 03279 g009
Figure 10. Singular values diagram for G1(z), G2(z), and G3(z) and their variations.
Figure 10. Singular values diagram for G1(z), G2(z), and G3(z) and their variations.
Energies 13 03279 g010
Figure 11. Power waveforms for the mathematical model and the circuit in islanded mode.
Figure 11. Power waveforms for the mathematical model and the circuit in islanded mode.
Energies 13 03279 g011
Figure 12. State-vector waveforms for the mathematical model and the circuit in islanded mode in the dq frame.
Figure 12. State-vector waveforms for the mathematical model and the circuit in islanded mode in the dq frame.
Energies 13 03279 g012
Figure 13. State-vector waveforms for the mathematical model and the circuit in islanded mode in the ABC frame.
Figure 13. State-vector waveforms for the mathematical model and the circuit in islanded mode in the ABC frame.
Energies 13 03279 g013
Figure 14. NRMSE for the state vector and shared power.
Figure 14. NRMSE for the state vector and shared power.
Energies 13 03279 g014
Figure 15. Eigenvalues of the nominal G μ G ( z ) and its variations.
Figure 15. Eigenvalues of the nominal G μ G ( z ) and its variations.
Energies 13 03279 g015
Figure 16. Singular values diagram for G μ G ( z ) and its variations.
Figure 16. Singular values diagram for G μ G ( z ) and its variations.
Energies 13 03279 g016
Figure 17. Control scheme for the grid-connected LQI power controller.
Figure 17. Control scheme for the grid-connected LQI power controller.
Energies 13 03279 g017
Figure 18. Closed-loop eigenvalues of the grid-connected inverter using the LQI power controller.
Figure 18. Closed-loop eigenvalues of the grid-connected inverter using the LQI power controller.
Energies 13 03279 g018
Figure 19. Performance analysis for the variations in q p . (a) Singular value plot; (b) step response.
Figure 19. Performance analysis for the variations in q p . (a) Singular value plot; (b) step response.
Energies 13 03279 g019
Figure 20. Comparison between the experimental and mathematical values for the active and reactive power under a step reference of 400 W and 400 Var. (a) Active power; (b) reactive power.
Figure 20. Comparison between the experimental and mathematical values for the active and reactive power under a step reference of 400 W and 400 Var. (a) Active power; (b) reactive power.
Energies 13 03279 g020
Figure 21. Islanded microgrid scheme with the RL loads.
Figure 21. Islanded microgrid scheme with the RL loads.
Energies 13 03279 g021
Figure 22. Control scheme for the PQ/Vdq controller.
Figure 22. Control scheme for the PQ/Vdq controller.
Energies 13 03279 g022
Figure 23. Modified SOGI-PLL.
Figure 23. Modified SOGI-PLL.
Energies 13 03279 g023
Figure 24. Closed-loop eigenvalues of the microgrid.
Figure 24. Closed-loop eigenvalues of the microgrid.
Energies 13 03279 g024
Figure 25. Singular values for multiple values of d.
Figure 25. Singular values for multiple values of d.
Energies 13 03279 g025
Figure 26. Step Response Comparison Between Physical Experiment and Mathematical Model. (a) Active Power for the Physical Experiment. (b) Reactive Power for the Physical Experiment. (c) Active Power for the Mathematical Model. (d) Reactive Power for the Mathematical Model.
Figure 26. Step Response Comparison Between Physical Experiment and Mathematical Model. (a) Active Power for the Physical Experiment. (b) Reactive Power for the Physical Experiment. (c) Active Power for the Mathematical Model. (d) Reactive Power for the Mathematical Model.
Energies 13 03279 g026
Table 1. Parameter specifications for the developed microgrid.
Table 1. Parameter specifications for the developed microgrid.
ParameterSymbolValue
Grid Voltage V 120   V RMS
DC Bus Voltage V dc 350   V
Grid Frequency f   ( ω c ) 60   Hz   ( 376.99   rad / s )
Output Inductance L o 1 , L o 2 , L o 3 1.8   mH ,   1.8   mH ,   3.6   mH
Input Inductance L i 1 , L i 2 , L i 3 1.8   mH ,   5.4   mH ,   3.6   mH
Filter Capacitance C 1 , C 2 ,   C 3 8.8   μ F
PWM Frequency f PWM 10   kHz
Sampling Period T s 100   μ s
Load 1 R 1 ,   L 1 171.43   Ω ,   0.46   H
Table 2. Parameter specifications for the microgrid scenario.
Table 2. Parameter specifications for the microgrid scenario.
ParameterSymbolValue
Grid Voltage V g 120   V RMS
DC Bus Voltage V dc 350   V
Grid Frequency f   ( ω c ) 60   Hz   ( 376.99   rad / s )
Output Inductance L o 1.8   mH
Input Inductance   L i 1.8   mH
Filter Capacitance C 8.8   μ F
PWM Frequency f PWM 10   kHz
Sampling Period T s 100   μ s
Load 1, Load 2 R 1 , L 1 171.43   Ω ,   0.46   H
Table 3. Selected droop gains.
Table 3. Selected droop gains.
Parametermn
Inverter 1 (D1)0.0280.03
Inverter 2 (D2)0.0320.032
Inverter 3 (D3)0.0330.031

Share and Cite

MDPI and ACS Style

Patarroyo-Montenegro, J.F.; Vasquez-Plaza, J.D.; Andrade, F. A State-Space Model of an Inverter-Based Microgrid for Multivariable Feedback Control Analysis and Design. Energies 2020, 13, 3279. https://doi.org/10.3390/en13123279

AMA Style

Patarroyo-Montenegro JF, Vasquez-Plaza JD, Andrade F. A State-Space Model of an Inverter-Based Microgrid for Multivariable Feedback Control Analysis and Design. Energies. 2020; 13(12):3279. https://doi.org/10.3390/en13123279

Chicago/Turabian Style

Patarroyo-Montenegro, Juan F., Jesus D. Vasquez-Plaza, and Fabio Andrade. 2020. "A State-Space Model of an Inverter-Based Microgrid for Multivariable Feedback Control Analysis and Design" Energies 13, no. 12: 3279. https://doi.org/10.3390/en13123279

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop