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:
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:
The linearized expressions for P, Q,
, and E are given by
where
and
are the constants resulting from evaluating the linearization function on the operating point
[
13]. Equations (7) and (8) represent the droop control equations, where
is the frequency deviation around the operating point
. Using a low-pass filter with the cut-off frequency
and merging Equation (5) into (8), the following system is defined:
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):
with
. States
and
are the in-phase and quadrature nominal voltage in the
dq frame for the
i-th inverter and
is the frequency of each inverter. The state matrix
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
, 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, -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.
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]:
where
indicates the Euclidian norm of a vector. Vectors
and
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 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
. 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
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
where the subscript
dq represents the direct and quadrature component and
represents the delayed input of inverter j:
where
,
,
, and
.
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
where
,
, and
are the discrete-time form of the
i-th inverter state, input, and output matrices, respectively. The input is the control effort
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:
where
and
are the discrete-time state and input matrices from the transformed to the
dq frame. The microgrid output matrix is given by
. 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
and
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 G
i(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
. 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
. 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
and main grid voltage
started with the same nominal amplitude and phase. At
, the inverter output amplitude was duplicated to a peak value of
and returned to the original value at
.
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
.
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
,
, and
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
,
, and
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
, the inverters’ output amplitude was duplicated to a peak value of
and returned to the original value at
.
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
. 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
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
and its variations are shown in
Figure 16. These diagrams show similar behavior compared to
Figure 10. However, there is an additional response below
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
. The augmented model that includes the tracking error is given by
Defining the control law as
, the closed-loop model is given by
To compute the LQI controller, the following cost function is defined:
where Q
p and R
p are some positive-definite and semi-positive-definite weighting matrices, respectively. The output matrix results by the augmentation of (17):
The LQI feedback matrix K
t is given by
where S
p is the solution to the algebraic Ricatti equation [
32]:
3.2.2. Performance Analysis
To identify the adequate values of Q
p and R
p, 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
For illustration purposes, the discrete closed-loop eigenvalues were transformed into continuous time using
Closed-loop eigenvalues were calculated for different values of
in
and
. From the eigenvalue plot shown in
Figure 18, it can be noticed that the eigenvalues with
are more suitable to fulfill design requirements.
The open-loop transfer function is given by
After selecting
, the singular value plot and the step-response plot were analyzed by varying
. 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
= 0.0001. The resulting state-feedback matrix is given by
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
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 V
cdq. The voltage reference of the LQI controller
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
.
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
where
is zero when the grid connection is lost and one when the grid is engaged. When synchronized, it may be assumed that
. Thus, in steady state
.
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:
The selection of Q
p and R
p 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
and
. The resulting state-feedback matrix for the three inverters is given by
3.3.3. PQ/Vdq Droop–Boost Controller
The feedback control law for the PQ/Vdq droop–boost controller is given by
where:
Notice that Cpq is the same output matrix used in (32). This is to represent the output power as the product . 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 K
t and K
d into a single state-feedback matrix K
INV. 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
Evaluating (41) into (29) yields to the closed-loop model of the inverter connected to the main grid:
where
. 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
where
and
are the discrete-time form of
and
augmented with delay as follows:
Matrices
represent the discrete form of
for the
i-th inverter. Matrices
are the
matrices that form the discrete form of
as follows:
The microgrid state-vector is defined by from (18). The input of the microgrid is defined by .
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:
where
is the voltage reference of the LQI controller. Matrices
,
, and
are given by
Equation (48) can be rewritten as
Then, following the same procedure for the grid-connected closed-loop model (44), the closed-loop microgrid model is defined by
where:
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 D
2 = 0.9D
1, and D
3 = 0.95D
1. The droop matrix for Inverter 1 was defined as
. 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.