Stability Assessment of Current Controller with Harmonic Compensator for LCL-Filtered Grid-Connected Inverter under Distorted Weak Grid

: An assessment of the stability and performance of current controllers with harmonic compensators is presented for an inductive-capacitive-inductive (LCL)-ﬁltered grid-connected inverter under distorted weak grid conditions. By using two typical current control schemes which are the direct current controller with the capacitor current-based active damping and integral-resonant state feedback current controller, the closed-loop system stability and current control performance are investigated in the presence of both uncertain grid impedance and distorted grid. Even though the controller stability has been investigated under weak grid in several studies, the stability assessment of the entire current control scheme, including the harmonic resonant controllers, still needs a further comprehensive investigation. The system stability is analyzed by obtaining the movement of the closed-loop poles in the discrete-time domain when the grid impedance varies. To fully study the impact of distorted weak grid condition on the LCL ﬁlters, three LCL ﬁlter parameter sets giving the resonance frequency in different frequency bands are chosen for the purpose of evaluating the system robustness and grid-injected current quality. In order to support the presented theoretical analyses, comprehensive simulation and experimental results based on 32-bit DSP TMS320F28335 to control 2 kVA grid-connected inverter are presented in terms of grid current quality and control stability in the environment of both uncertain grid impedance and distorted grid. S.-J.Y.; K.-H.K.; K.-H.K.; funding acquisition, K.-H.K.


Introduction
Due to the fast-growing energy demand and environmental problems related with the conventional fossil fuel, the renewable energy sources from wind turbine or photovoltaic system are considered as promising alternatives for power generation in the global energy market. The progress of distributed power generation systems based on renewable energy sources is mainly facilitated by the development of power electronics technology. In general, in order to connect different kinds of renewable energy sources to the point of common coupling (PCC), power electronics converters should be employed as the interface between the renewable sources and main grid [1,2].
Commonly, the pulse width modulation (PWM) grid-connected inverters with a high switching frequency are widely used to deliver the power from the renewable energy resources to the grid. To achieve high-quality grid-injected currents which meet the stringent harmonic standard, harmonics around the switching frequency should be effectively filtered out. For this purpose, an inductive (L) filter with high inductance value can be used at the inverter output, providing the easiness in control design [3]. On the other hand, compared with an L filter, inductive-capacitive-inductive (LCL)-type filters are more attractive due to smaller physical size and better harmonic attenuation capability of highorder harmonics [4,5]. Nevertheless, the LCL filter introduces a resonant peak into the system, which may cause an output resonance problem [6][7][8][9]. To ensure a stable and reliable operation of the inverter system, a proper damping method should be considered either by the passive or active method. The study in [8] focuses on the stability problem of the LCL-filtered grid-connected inverters for a large set of grid impedance value, in which the inverter-side current is controlled by means of a proportional resonant (PR) control scheme. As discussed in this paper, the conventional active damping, which highly depends on the knowledge of hardware system, is ineffective under the grid inductor variation in weak grid condition. In addition to the resonance problem, other issues such as the grid harmonic distortion and grid impedance at PCC should be addressed to produce high-quality grid-injected inverter currents [10].
A passive method to damp the resonance peak caused by the LCL filter is to insert a resistor in series with the filter capacitor. This solution is simple and highly reliable, regardless of the change in the resonance frequency. However, the power dissipation in resistor is unavoidable and the high-frequency attenuation is affected [11].
To overcome this limitation, various active damping methods have been presented to ensure the system stability, which include the indirect current control, the partial-state feedback (e.g., capacitor current and capacitor voltage) control, and the full-state feedback control [12][13][14][15][16][17][18]. Generally, the current controllers are constructed by two typical approaches: the classical control approach (i.e., by transfer function) [12][13][14] and modern control approach (i.e., by state-space model) [15][16][17]. In the work of [12], the active damping based on the indirect current control method is achieved by the inverter-side current feedback with notch filter. In this study, the effectiveness of the notch filter-based active damping is investigated in detail by considering the control delay, filter parameters' variation, and grid impedance. However, in indirect current control method, the dynamic tracking performance is degraded due to the filter delay and small phase margin [19].
In the studies of [13,14], the virtual resistance is realized by partially feeding back the capacitor current and voltage, respectively. Then, the digital filters are brought in to enhance the system stability. However, the high-pass filter with the approximate derivative characteristic in [13] may amplify high-frequency noise, and the notch filter proposed in [14] is quite sensitive to the resonance frequency variation. In addition, both the control algorithms are more complicated than that of the proportional feedback.
As another approach, a full-state feedback scheme is presented in [15][16][17]. In these methods, the feedback control of the capacitor voltage and inverter-side current is used to actively damp the resonance phenomenon. The advantages of these control methods are that the design procedure is standard and straightforward, thereby getting rid of any trial and error. However, there are still some drawbacks such as the computational burden and limited harmonic compensation [18]. The multiloop control and full-state feedback control structures are known to have large flexibility and easiness in implementation [18,19].
The local nonlinear loads, AC machine drive, and saturated transformer often generate harmonic currents. The harmonic currents flow through the line impedance, causing distortion of the grid voltages at the PCC [20]. To ensure high-quality grid-injected currents even under distorted grid, several harmonic attenuation methods have been also presented with the above active damping methods, since the conventional proportional integral (PI) control method in the synchronous reference frame rotating with the fundamental grid frequency cannot effectively suppress the grid harmonic distortion. In order to eliminate the low-order disturbance caused by grid voltage harmonics, multiple harmonic compensation scheme is employed in [13,14]. Even though this scheme works well in the stiff grid, there exists a smaller control margin when the grid impedance increases. To achieve the attenuation of current harmonics as well as the robustness against the grid impedance uncertainty, an active damping method by using the sliding mode control for the reduced model of a grid-connected inverter is presented [21]. Another approach uses a model predictive control [22], the plug-in combination of the PR control and the repetitive control (RC) [23], or multiresonant control [24] to mitigate the harmonic currents caused by grid Appl. Sci. 2021, 11, 212 3 of 30 voltage distortion. A full-state feedback controller which augments the resonant harmonic controllers of the grid-side currents is also proposed in [15][16][17].
The dynamic interaction of the inverter system with the grid impedance may degrade the power quality. Cable overload, saturation, long radial distribution feeders, and temperature effects are all reasons for possible variation in the interfacing impedance seen by the inverter [9,20]. Therefore, the grid impedance should be considered in designing the controller parameters especially when the inverter system operates under the weak grid condition. Under weak grid condition, in which the grid impedance varies significantly, the performance of active damping as well as harmonic compensation is deteriorated severely, causing serious grid current harmonics or even system instability [5,25]. The analysis on the system stability is given for the grid-connected inverter connected to weak grid in [26]. The research on the instability problem of multi-inverter system operation in [27] demonstrates that the weak grid condition yields output current resonance. Other research work in [28] concentrates to the effect of weak grid in the voltage feedforward control scheme. Based on the impedance analysis method, the instability mechanism and unstable area caused by voltage feedforward control are clearly derived. The authors in [29] present a different approach to implement the resonant compensators by means of the disturbance rejection concept. A comprehensive assessment of the controller under weak grid is also presented; however, the presented scheme is experimentally evaluated only with the grid impedance of two times grid-side inductor.
This paper presents an assessment of the current controller stability and performance with harmonic compensators for an LCL-filtered inverter connected to distorted weak grid under the grid impedance variation. For this purpose, the effects of the grid impedance uncertainty on the locations of closed-loop poles are investigated under distorted grid by using two different control approaches. Since the controller stability has been investigated under uncertain grid impedance without considering the inherent contaminated harmonics in grid in several studies [27,28], the stability assessment of the entire current control structure including the harmonic resonant controllers needs a further comprehensive investigation for a stable inverter operation under distorted weak grid.
Two typical current controllers implementing both the active damping and grid harmonic compensation are selected to investigate their closed-loop system stabilities and current control performances under distorted weak grid conditions. The system stability analysis is accomplished by investigating the closed-loop poles in the discrete-time domain when the grid impedance varies. Furthermore, to support the stability analysis under weak grid condition, as well as to assess the current control performance, the PSIM (9.1, Powersim, Rockville, MD, USA) software-based simulation and experimental results are presented by using prototype three-phase grid-connected inverter under adverse grid conditions. The analytical assessment shows that a full-state feedback controller augmented with the internal resonant controllers for current harmonic compensation is preferable in view of large control margin. Moreover, this control can effectively deal with the issue of current harmonic attenuation and resonance damping, even in the presence of a significant grid impedance variation. Additionally, theoretical analysis and experiments verify that the low region LCL resonance frequency is more vulnerable to system stability than that of high region under weak grid. The main contributions of this paper are as follows: (1) The two typical current controllers with harmonic compensators for the LCL-filtered grid-connected inverter are implemented to analytically investigate their performances under distorted weak grid by means of the stability assessment tools and comprehensive evaluation results. (2) By the movement of closed-loop poles and disturbance rejection responses, the stability margin of each controller is well investigated. It is clearly addressed that the stability is weakened under the grid impedance variation by the addition of harmonic resonant controllers. The theoretical results are validated by simulation and experiments.
(3) The full-state feedback current control method with augmented harmonic resonant compensators has well proved its robustness for a wide range of grid impedance variations (up to 14 times of grid-side inductors in the high region) by theoretical analysis and evaluation results. (4) In order to validate the presented theoretical analyses, comprehensive simulation and experimental results based on 2 kVA grid-connected inverter are presented under the grid environment including both uncertain grid impedance and distorted harmonics.
This paper is organized as follows: Section 2 explains the system description and current controller designs. Section 3 presents the frequency response and closed-loop system stability under the grid impedance change and harmonic distortion. The simulation and experimental results are provided in Section 4 to validate the stability analysis. Finally, Section 5 concludes the paper. Figure 1 shows a configuration of an LCL-filtered grid-connected inverter connected to the weak grid, in which V DC denotes the DC-link voltage; R 1 , R 2 , L 1 , and L 2 are the filter resistances and filter inductances, respectively; C f is the filter capacitance, and L g is the grid inductance due to weak grid. When the grid impedance does not exist in Figure 1, inverter system can be expressed mathematically in the synchronous reference frame (SRF) as [15,16]:

System Model of Grid-Connected Inverter
T is the input vector, and e = [e q e d ] T is the grid voltage vector. In this equation, the superscript "q" and "d" denote the q-axis and d-axis variables, respectively, i 1 is the inverter-side current, i 2 is the grid-side current, v c is the capacitor voltage, v i is the inverter output voltage, and ω is the grid angular frequency. The system matrices A, B, C, and D are expressed as: The grid impedance is defined as jωL g . To follow the term in the conventional works, the term "the grid impedance" is used in this study. On the other hand, to simply represent the quantity, the grid impedance variation is denoted by L g variation.
A discretized model of the continuous-time inverter system in Equations (1) and (2) is obtained by using the zero-order hold (ZOH) method with the sampling time T s of 10 kHz as follows: where  The grid impedance is defined as jωLg. To follow the term in the conventional works, the term "the grid impedance" is used in this study. On the other hand, to simply represent the quantity, the grid impedance variation is denoted by Lg variation.
A discretized model of the continuous-time inverter system in Equations (1) and (2) is obtained by using the zero-order hold (ZOH) method with the sampling time Ts of 10 kHz as follows: In case that a lower sampling frequency is selected, higher-order discretization methods can be implemented as presented in [30]. Furthermore, the controllability and observability of system in Equations (4) and (5) are studied in the continuous-and discrete-time domain in [31,32], respectively.
For the stability assessment and performance comparison of two typical current controllers in an LCL-filtered grid-connected inverter connected to distorted weak grid, the direct grid current control with the capacitance current active damping [13], and integralresonant state feedback control are employed in the following subsections [15]. Figure 2 shows the direct current control based on the capacitor current damping for a three-phase inverter connected with the grid inductance Lg. In this scheme, the active damping is realized through the virtual resistance based on capacitance current to achieve stable grid current control loop. In Figure 2, the function of the proportional gain Kc is the same as the virtual resistance in capacitor branch for the purpose of restraining the resonance of the LCL filter.

Direct Current Control Based on Capacitor Current Damping
To track the grid current reference and compensate the grid disturbance in the orders of 3rd, 5th, and 7th harmonic components, this scheme implements the harmonic compensators at respective harmonics in the stationary frame [13]. In this study, this scheme is modified to include the resonant controllers for harmonic suppression in the orders of Configuration of a grid-connected inverter and a current control scheme.
In case that a lower sampling frequency is selected, higher-order discretization methods can be implemented as presented in [30]. Furthermore, the controllability and observability of system in Equations (4) and (5) are studied in the continuous-and discrete-time domain in [31,32], respectively.
For the stability assessment and performance comparison of two typical current controllers in an LCL-filtered grid-connected inverter connected to distorted weak grid, the direct grid current control with the capacitance current active damping [13], and integral-resonant state feedback control are employed in the following subsections [15]. Figure 2 shows the direct current control based on the capacitor current damping for a three-phase inverter connected with the grid inductance L g . In this scheme, the active damping is realized through the virtual resistance based on capacitance current to achieve stable grid current control loop. In Figure 2, the function of the proportional gain K c is the same as the virtual resistance in capacitor branch for the purpose of restraining the resonance of the LCL filter.

Direct Current Control Based on Capacitor Current Damping
To track the grid current reference and compensate the grid disturbance in the orders of 3rd, 5th, and 7th harmonic components, this scheme implements the harmonic compensators at respective harmonics in the stationary frame [13]. In this study, this scheme is modified to include the resonant controllers for harmonic suppression in the orders of 5th, 7th, 11th, and 13th harmonic components, in which the PR controllers for the fundamental and harmonic components are expressed as: G h (s) = ∑ h=5,7,11,13 K rh s 2 + hω 2 Appl. Sci. 2021, 11, 212 6 of 30 2 2 5,7,11,13 ( ) In addition, to improve the stability margin, zero compensation is introduced as [13]: The closed-loop transfer function of the entire system is presented as: where: ( ) and the superscript α and β denote the stationary variables, respectively. To ensure the system stability as well as good dynamic performance, the selected gains are obtained via an iterative process according to the design guideline in [13], and the closed-loop poles derived from (9) should be maintained in the stable region. Figure 3 represents the integral-resonant state feedback current control based on the linear quadratic regulator (LQR) for three-phase inverter connected with the grid inductance Lg. To ensure asymptotic reference tracking as well as disturbance rejection for the harmonics in the orders of 6th and 12th in the SRF, the integral and resonant control terms are augmented in the state feedback control. In the discrete-time state-space, the integral and resonant terms are expressed as [16,31]: Figure 2. Block diagram of the direct current control based on capacitor current damping.

Integral-Resonant State Feedback Control
In addition, to improve the stability margin, zero compensation is introduced as [13]: The closed-loop transfer function of the entire system is presented as: where: T and the superscript α and β denote the stationary variables, respectively. To ensure the system stability as well as good dynamic performance, the selected gains are obtained via an iterative process according to the design guideline in [13], and the closed-loop poles derived from (9) should be maintained in the stable region. Figure 3 represents the integral-resonant state feedback current control based on the linear quadratic regulator (LQR) for three-phase inverter connected with the grid inductance L g . To ensure asymptotic reference tracking as well as disturbance rejection for the harmonics in the orders of 6th and 12th in the SRF, the integral and resonant control terms are augmented in the state feedback control. In the discrete-time state-space, the integral and resonant terms are expressed as [16,31]:

Integral-Resonant State Feedback Control
where T is the reference current vector, and system matrices A ci , B ci , A ch , and B ch are expressed as: r Cx is the current error vector, is the reference current vector, and system matrices Aci, Bci, Ach, and Bch are expressed as: Figure 3. Block diagram of the LQR (linear quadratic regulator) -based integral-resonant state feedback current controller.
The state equations in (10) and (11) are augmented as: where is the entire state vector for the integral and resonant terms with By using Equations (4), (5) and (10)-(12), the entire system model is combined as follows: The state equations in (10) and (11) are augmented as: where x c = [x 0 x 6 x 12 ] T is the entire state vector for the integral and resonant terms with T for h = 6, 12, By using Equations (4), (5) and (10)-(12), the entire system model is combined as follows: where 0 m×n is the zero matrix with appropriate dimension. Considering the augmented system, the state feedback control is designed as: where K x K C is a set of state feedback gains with K C = K i K H . The detailed block diagram of the state feedback current controller augmented with the integral and resonant control terms is depicted in Figure 3, in which the closed-loop eigenvalues are obtained from: The full-state feedback control gain is systematically determined through the LQR approach by minimizing the discrete quadratic cost function as follows [15]: where is a positive semi-definite matrix, and R is a positive definite matrix.
To determine a gain matrix which minimizes the quadratic cost function, the symmetric weighting matrices are chosen with the relative importance of the state variables and expenditure of energy by control input signals. Since the augmentation of the control terms into the inverter systems causes the increase of the number of feedback gains, the LQR approach produces a systematical method to find the optimal gains of the current controller and to avoid laborious process for proper gain selections [33,34]. The numerical calculation to determine the gain matrix is accomplished offline with MATLAB. In this study, the weighting matrices Q and R are selected by an iterative selection process and verified by both the simulation and experimental results. Furthermore, to implement full-state feedback current controller, a full-state observer is employed in the stationary frame to estimate the system states without installing an extra sensing device [16].

Stability Analysis under Weak Grid
In this section, the influence of the grid impedance variation on the stability of threephase LCL-filtered inverter controlled by two presented current controllers (the direct grid current control method and the LQR-based integral-resonant state feedback control method) is investigated. Furthermore, the comprehensive assessments are conducted considering all possible filter parameter designs which are commonly classified according to the relative value of the resonance frequency (f R = ω R /2π) and critical frequency defined as 1/6 of the switching frequency. Particularly, three LCL filter designs can be considered: the LCL filter has the resonance frequency higher than the critical frequency, around the critical frequency, and lower than the critical frequency. The system stability is analyzed by investigating the closed-loop eigenvalues of the inverter system with two presented controllers under the grid impedance variation in distorted weak grid. Finally, the design guidelines for the presented current controllers are given to achieve both system dynamic performance and strong robustness under weak grid conditions. It is worth noting that other negative effects of weak grid such as unbalanced grid voltages or grid frequency variation are beyond the scope of this paper.

Frequency Response of LCL Filter under Grid Impedance Change
In this subsection, the influence of the grid impedance variation on the resonant frequency is presented. Considering that the series configuration of L 2 and L g is combined as L 2g = L 2 + L g , the transfer function from the inverter voltage to the grid-side current is obtained from Figure 2 as [5,30]: Appl. Sci. 2021, 11, 212 9 of 30 The LCL filter produces a resonance peak in frequency response which leads to an instability. The resonance frequency of the LCL filter is determined as: Whereas the resonance frequency in Equation (18) is given as a fixed parameter in stiff grid, it is represented as a function of the grid inductance L g under weak grid condition. In fact, as the grid inductance is increased, the resonance peak is shifted toward low frequency region. Thus, since the variation of L g is often uncertain and unpredictable, the damping method designed at a fixed frequency is not effective under weak grid condition.
To comprehensively analyze the performance of inverter system under the grid impedance variation, three LCL filter prototypes are designed to locate the resonance frequencies at three regions as given in Table 1, which are lower than the critical frequency (low region), around the critical frequency (critical region), and higher than critical frequency (high region). According to the criterion on selecting the resonance frequency of the LCL filter [3], the resonance frequencies in high region, critical region, and low region are selected as 2991 Hz, 2006 Hz, and 1158 Hz, respectively, with the critical frequency of 1667 Hz. Thus, it is obvious that the selected cases cover all possible LCL filter parameter designs. The grid impedance gradually increases in range of stiff grid (L g = 0 mH) to very weak grid (L g = 21 mH). Table 1. LCL (inductive-capacitive-inductive) filter parameters with grid impedance under weak grid.

Cases
LCL  Figure 4 shows the frequency responses of three LCL filter parameters without the grid impedance variation. Three different resonance frequencies are clearly shown with respect to the critical frequency.   Figure 5 shows the frequency responses when the grid inductance Lg is varied in the LCL filter parameter of Case 1. As the grid inductance is increased, the resonance frequency of the LCL filter is reduced and shifted toward the critical frequency. It is worthwhile to note that the LCL filter in Case 1 has the resonance frequency quite far from the Critical frequency(1667 Hz) Figure 4. Frequency responses of LCL filter parameters without grid impedance for Cases 1, 2, and 3. Figure 5 shows the frequency responses when the grid inductance L g is varied in the LCL filter parameter of Case 1. As the grid inductance is increased, the resonance frequency of the LCL filter is reduced and shifted toward the critical frequency. It is worthwhile to note that the LCL filter in Case 1 has the resonance frequency quite far from the critical frequency (high region). Even under severe weak grid condition, this resonance frequency is not shifted to the low region. On the contrary, the LCL filter in Case 2 represents that f R possibly moves from the high region to the low region depending on the value of L g . Finally, the LCL filter parameter set in Case 3 is also employed to validate the controllers under the low region.  Figure 5 shows the frequency responses when the grid inductance Lg is varied in the LCL filter parameter of Case 1. As the grid inductance is increased, the resonance frequency of the LCL filter is reduced and shifted toward the critical frequency. It is worthwhile to note that the LCL filter in Case 1 has the resonance frequency quite far from the critical frequency (high region). Even under severe weak grid condition, this resonance frequency is not shifted to the low region. On the contrary, the LCL filter in Case 2 represents that fR possibly moves from the high region to the low region depending on the value of Lg. Finally, the LCL filter parameter set in Case 3 is also employed to validate the controllers under the low region.

Closed-Loop Stability of Direct Grid Current Control with Active Damping under Grid Impedance Change
In this subsection, the impact of the grid impedance variation on the stability of direct grid current controller with capacitor current feedback active damping is discussed. The stability analysis of the closed-loop LCL-filtered inverter system is achieved by investigating the location of the closed-loop poles in the discrete-time domain. As shown in Equations (6) and (7), six gains are needed to be tuned in the direct grid current controller: the proportional gain at the fundamental frequency K p1 , and five resonant gains at the fundamental and selected harmonic frequencies K r1 , K r5 , K r7 , K r11 , and K r13 . The controller gains are selected in the stiff grid condition. Under weak grid, the closed-loop pole locations designed in the stiff grid move from the designed locations as L g is increased. Figure 6 shows the locations of the closed-loop poles for the direct grid current controller [13] under distorted grid and grid impedance variation as L g is increased from stiff grid to weak grid. The chosen LCL filter parameters produce the resonance frequencies higher than the critical frequency. To suppress the current harmonic distortion caused by distorted grid, the PR controllers are incorporated in the orders of 5th, 7th, 11th, and 13th in the stationary frame. In spite of large variation of L g , most of the closed-loop system poles remain in the stable region as is shown in Figure 6. On the other hand, the poles of the PR controllers in 11th and 13th orders move toward the stability boundary of the unit circle as L g is increased. Eventually, when L g is increased larger than 7 mH, the system operation becomes unstable. This fact indicates that this control method is very poor to mitigate the current harmonics in the presence of distorted grid and grid impedance variation. Figure 6 shows the locations of the closed-loop poles for the direct grid current controller [13] under distorted grid and grid impedance variation as Lg is increased from stiff grid to weak grid. The chosen LCL filter parameters produce the resonance frequencies higher than the critical frequency. To suppress the current harmonic distortion caused by distorted grid, the PR controllers are incorporated in the orders of 5th, 7th, 11th, and 13th in the stationary frame. In spite of large variation of Lg, most of the closed-loop system poles remain in the stable region as is shown in Figure 6. On the other hand, the poles of the PR controllers in 11th and 13th orders move toward the stability boundary of the unit circle as Lg is increased. Eventually, when Lg is increased larger than 7 mH, the system operation becomes unstable. This fact indicates that this control method is very poor to mitigate the current harmonics in the presence of distorted grid and grid impedance variation. To investigate the stability of this control scheme under different LCL filter selections, Figures 7 and 8 show the location of the closed-loop poles with different Cf values of 10 µF, and 30 µF, respectively, which produce the resonance frequencies around the critical frequency, and lower than the critical frequency. Similar to Figure 6, the resonant controllers are incorporated in the orders of 5th, 7th, 11th, and 13th in the stationary frame, and Lg is varied from 0 to 10 mH. As the resonance frequency is selected in low frequency region, the system is more vulnerable to the uncertainty in Lg as shown in these two figures. In Figure 7, one of the resonant controller poles in 11th and 13th leaves the stability To investigate the stability of this control scheme under different LCL filter selections, Figures 7 and 8 show the location of the closed-loop poles with different C f values of 10 µF, and 30 µF, respectively, which produce the resonance frequencies around the critical frequency, and lower than the critical frequency. Similar to Figure 6, the resonant controllers are incorporated in the orders of 5th, 7th, 11th, and 13th in the stationary frame, and L g is varied from 0 to 10 mH. As the resonance frequency is selected in low frequency region, the system is more vulnerable to the uncertainty in L g as shown in these two figures. In Figure 7, one of the resonant controller poles in 11th and 13th leaves the stability boundary before L g reaches 2 mH. In low resonance frequency region of the LCL filter in Figure 8, the resonant controller poles in 11th and 13th always remain outside of the stability region, which indicates that this control scheme fails to stabilize the system in the presence of the uncertainty of grid impedance under distorted grid.

Closed-Loop Stability of Integral-Resonant State Feedback LQR Control under Grid Impedance Change
In this section, the stability of the integral-resonant state feedback current controller is presented under distorted grid and the grid impedance variation for three-phase LCLfiltered inverter. The locations of the closed-loop poles in the discrete-time domain which are obtained from Equations (13) and (15) are used for the stability analysis. To attenuate the current harmonic distortion caused by distorted grid, the resonant controls in the orders of 6th and 12th in the SRF are augmented in the state model as in Equation (12). Figure 9 shows the locations of the closed-loop poles by this control when L g is gradually increased from stiff grid to weak grid. While most of the closed-loop system poles remain in the stable region in spite of large variation of L g , the poles of the 6th resonant controller move toward the stability boundary of the unit circle as L g is increased. However, as compared with Figure 6 which shows unstable poles at 10 mH of L g , Figure 9 shows that the system is only unstable when L g is increased beyond 14 mH. boundary before Lg reaches 2 mH. In low resonance frequency region of the LCL filter in Figure 8, the resonant controller poles in 11th and 13th always remain outside of the stability region, which indicates that this control scheme fails to stabilize the system in the presence of the uncertainty of grid impedance under distorted grid.    boundary before Lg reaches 2 mH. In low resonance frequency region of the LCL filter in Figure 8, the resonant controller poles in 11th and 13th always remain outside of the stability region, which indicates that this control scheme fails to stabilize the system in the presence of the uncertainty of grid impedance under distorted grid.    Figures 10 and 11 show the locations of the closed-loop poles with different C f values of 10 µF and 30 µF, respectively, when L g is varied from stiff grid to weak grid. These filter capacitors produce the resonance frequencies around the critical frequency, and lower than the critical frequency. Similarly, as the grid impedance increases, the poles of the 6th resonant controller move outside the unit circle. However, in the integral-resonant state feedback control, the stability limit is much extended since the instability occurs with larger value of L g than the direct grid current controller. As a result, the integral-resonant state feedback control can be regarded as more robust to uncertainty in the grid impedance change. In addition, it is confirmed that the current control is more likely to be unstable for small variation of L g as the resonance frequency of the LCL filter gets smaller.
ders of 6th and 12th in the SRF are augmented in the state model as in Equation (12). Figure 9 shows the locations of the closed-loop poles by this control when Lg is gradually increased from stiff grid to weak grid. While most of the closed-loop system poles remain in the stable region in spite of large variation of Lg, the poles of the 6th resonant controller move toward the stability boundary of the unit circle as Lg is increased. However, as compared with Figure 6 which shows unstable poles at 10 mH of Lg, Figure 9 shows that the system is only unstable when Lg is increased beyond 14 mH.  Figures 10 and 11 show the locations of the closed-loop poles with different Cf values of 10 µF and 30 µF, respectively, when Lg is varied from stiff grid to weak grid. These filter capacitors produce the resonance frequencies around the critical frequency, and lower than the critical frequency. Similarly, as the grid impedance increases, the poles of the 6th resonant controller move outside the unit circle. However, in the integral-resonant state feedback control, the stability limit is much extended since the instability occurs with larger value of Lg than the direct grid current controller. As a result, the integral-resonant state feedback control can be regarded as more robust to uncertainty in the grid impedance change. In addition, it is confirmed that the current control is more likely to be unstable for small variation of Lg as the resonance frequency of the LCL filter gets smaller.     To investigate the stability under different grid frequency, Figure 12 represents the location of the closed-loop poles for augmented integral-resonant state feedback LQR controller with L 1 = 1.7 mH, L 2 = 1.0 mH, and C f = 4.5 µF without the grid impedance under three different grid frequencies of 60, 55, and 50 Hz. As shown in this figure, the closed-loop poles are almost overlapped in each frequency value, and are maintained in the stable region regardless of the frequency change. To investigate the stability under different grid frequency, Figure 12 represents the location of the closed-loop poles for augmented integral-resonant state feedback LQR controller with L1 = 1.7 mH, L2 = 1.0 mH, and Cf = 4.5 µF without the grid impedance under three different grid frequencies of 60, 55, and 50 Hz. As shown in this figure, the closedloop poles are almost overlapped in each frequency value, and are maintained in the stable region regardless of the frequency change. The disturbance rejection response for the augmented integral-resonant state feedback LQR controller with L1 = 1.7 mH, L2 = 1.0 mH, and Cf = 4.5 µF from stiff grid to very weak grid is shown in Figure 13a. The disturbance rejection response also exposes the reason of the system instability when the grid impedance increases. As seen from Figure  13a, the bandwidth of the harmonic compensators is significantly reduced when the grid The disturbance rejection response for the augmented integral-resonant state feedback LQR controller with L 1 = 1.7 mH, L 2 = 1.0 mH, and C f = 4.5 µF from stiff grid to very weak grid is shown in Figure 13a. The disturbance rejection response also exposes the reason of the system instability when the grid impedance increases. As seen from Figure 13a, the bandwidth of the harmonic compensators is significantly reduced when the grid is weaker. Moreover, the high peak exceeds 0 dB when L g reaches 21 mH, which causes the instability in system. The interpretation from the frequency response shows the maximum stability margin of L g is 14 mH. Similar conclusions are inferred from Figure 13b,c, in which the maximum stability margins in the critical and low regions are 7 mH and 4 mH, respectively. The theoretical analysis will be validated by the simulation and experiment in the next section. The disturbance rejection response for the augmented integral-resonant state feedback LQR controller with L1 = 1.7 mH, L2 = 1.0 mH, and Cf = 4.5 µF from stiff grid to very weak grid is shown in Figure 13a. The disturbance rejection response also exposes the reason of the system instability when the grid impedance increases. As seen from Figure  13a, the bandwidth of the harmonic compensators is significantly reduced when the grid is weaker. Moreover, the high peak exceeds 0 dB when Lg reaches 21 mH, which causes the instability in system. The interpretation from the frequency response shows the maximum stability margin of Lg is 14 mH. Similar conclusions are inferred from Figure 13b,c, in which the maximum stability margins in the critical and low regions are 7 mH and 4 mH, respectively. The theoretical analysis will be validated by the simulation and experiment in the next section.  To summarize the stability analysis based on the closed-loop poles' location in the discrete-time domain, Figure 14 represents the stability comparison of two controllers under grid impedance variation for different LCL parameter sets. It is inferred from these results that as the resonance frequency is reduced, the stable boundary according to the grid impedance variation is also reduced. In the direct grid current controller in Figure  14a, the stability region is gradually reduced as the designed LCL resonance frequency is decreased from high to low region. The inverter system is stable in the region of Lg < 4 mH in Case 1, and in the region of Lg < 2 mH in Case 2. In Case 3, the direct grid current controller cannot stabilize the inverter system. On the other hand, the integral-resonant state feedback current controller in Figure 14b greatly extends the stability limit for three LCL filter cases. The inverter system is stable in the region of Lg < 14 mH in Case 1, in the region of Lg < 7 mH in Case 2, and in the region of Lg < 4 mH in Case 3. As a result, a To summarize the stability analysis based on the closed-loop poles' location in the discrete-time domain, Figure 14 represents the stability comparison of two controllers under grid impedance variation for different LCL parameter sets. It is inferred from these results that as the resonance frequency is reduced, the stable boundary according to the grid impedance variation is also reduced. In the direct grid current controller in Figure 14a, the stability region is gradually reduced as the designed LCL resonance frequency is decreased from high to low region. The inverter system is stable in the region of L g < 4 mH in Case 1, and in the region of L g < 2 mH in Case 2. In Case 3, the direct grid current controller cannot stabilize the inverter system. On the other hand, the integral-resonant state feedback current controller in Figure 14b greatly extends the stability limit for three LCL filter cases. The inverter system is stable in the region of L g < 14 mH in Case 1, in the region of L g < 7 mH in Case 2, and in the region of L g < 4 mH in Case 3. As a result, a relative stability is enhanced in the LCL filter design having high resonance frequency. Moreover, integral-resonant state feedback control has an improved relative stability than direct grid current control in view of the harmonic compensation and effective resonance damping. discrete-time domain, Figure 14 represents the stability comparison of two controllers under grid impedance variation for different LCL parameter sets. It is inferred from these results that as the resonance frequency is reduced, the stable boundary according to the grid impedance variation is also reduced. In the direct grid current controller in Figure  14a, the stability region is gradually reduced as the designed LCL resonance frequency is decreased from high to low region. The inverter system is stable in the region of Lg < 4 mH in Case 1, and in the region of Lg < 2 mH in Case 2. In Case 3, the direct grid current controller cannot stabilize the inverter system. On the other hand, the integral-resonant state feedback current controller in Figure 14b greatly extends the stability limit for three LCL filter cases. The inverter system is stable in the region of Lg < 14 mH in Case 1, in the region of Lg < 7 mH in Case 2, and in the region of Lg < 4 mH in Case 3. As a result, a relative stability is enhanced in the LCL filter design having high resonance frequency. Moreover, integral-resonant state feedback control has an improved relative stability than direct grid current control in view of the harmonic compensation and effective resonance damping.

System Configuration
In order to verify the theoretical analysis, the PSIM software-based simulations and experiments are carried out by using three-phase grid-connected inverter system. The system parameters are given in Table 2. Figure 15 shows the experimental configuration of the system. The overall system is composed of three-phase inverter connected to the grid through an LCL filter, a magnetic contactor for grid-connecting operations, and an AC power source to emulate three-phase grid voltages in the ideal as well as distorted grid conditions. The entire control algorithm is implemented on a 32-bit floating-point DSP TM320F28335 [35]. Additional inductances are employed to implement the grid impedance change. The sampling and inverter switching frequencies are chosen as 10 kHz. Figure 16 depicts the photograph of the experimental test setup. the system. The overall system is composed of three-phase inverter connected to the grid through an LCL filter, a magnetic contactor for grid-connecting operations, and an AC power source to emulate three-phase grid voltages in the ideal as well as distorted grid conditions. The entire control algorithm is implemented on a 32-bit floating-point DSP TM320F28335 [35]. Additional inductances are employed to implement the grid impedance change. The sampling and inverter switching frequencies are chosen as 10 kHz.     the system. The overall system is composed of three-phase inverter connected to the grid through an LCL filter, a magnetic contactor for grid-connecting operations, and an AC power source to emulate three-phase grid voltages in the ideal as well as distorted grid conditions. The entire control algorithm is implemented on a 32-bit floating-point DSP TM320F28335 [35]. Additional inductances are employed to implement the grid impedance change. The sampling and inverter switching frequencies are chosen as 10 kHz.

Simulation Results
To evaluate the current control performance of the direct current control and the integral-resonant full-state feedback current control under distorted weak grid condition, the simulation results are presented by using the control structure in Figures 2 and 3, and LCL filter parameters given in Table 1, in which different values of capacitor are used to produce different resonance frequencies of the LCL filter. Figure 17 shows the current control performance of the direct grid current controller with L 1 = 1.7 mH, L 2 = 1.0 mH, and C f = 4.5 µF under distorted grid voltages without grid impedance in Case 1. Figure 17a shows three-phase distorted grid voltages which contain the 5th, 7th, 11th, and 13th harmonics with the magnitude of 5% of the fundamental component. Figure 17b,c show grid-side three-phase current waveforms and the fast fourier transform (FFT) result for a-phase current with the harmonic limits specified by the grid interconnection regulation IEEE Std. 1547 [36]. As is clearly shown, the current harmonic distortion caused by distorted grid is well suppressed and the total harmonic distortion (THD) value of current is 3.59%, which represents that this controller effectively deals with the resonance of the LCL filter and low-order harmonic disturbance in grid voltages. the 5th, 7th, 11th, and 13th harmonics with the magnitude of 5% of the fundamental component. Figure 17b,c show grid-side three-phase current waveforms and the fast fourier transform (FFT) result for a-phase current with the harmonic limits specified by the grid interconnection regulation IEEE Std. 1547 [36]. As is clearly shown, the current harmonic distortion caused by distorted grid is well suppressed and the total harmonic distortion (THD) value of current is 3.59%, which represents that this controller effectively deals with the resonance of the LCL filter and low-order harmonic disturbance in grid voltages.  To demonstrate the influence of the grid impedance change in the direct grid current control scheme, Figure 18 shows the simulation result when L g is suddenly increased to 7 mH in Case 1 at 0.5 s under the same distorted grid condition. With this value of L g , the poles of the PR controllers in 11th and 13th orders for harmonic suppression are located outside of the unit circle. As a result, grid phase-currents are gradually oscillating, and eventually, the entire system becomes unstable. Figure 19 shows the simulation result for the direct grid current controller with L 1 = 1.7 mH, L 2 = 1.0 mH, and C f = 10 µF under distorted grid voltages without the grid impedance in Case 2. Decrease of the resonance frequency improves the harmonic suppression of the LCL filter. Thus, the grid current quality in Figure 19 is much improved as compared with Figure 17, producing only the THD of 2.54%. However, reducing the resonance frequency makes the inverter resonant controller to be more vulnerable to uncertain grid impedance.
To demonstrate the influence of the grid impedance change in the direct grid current control scheme, Figure 18 shows the simulation result when Lg is suddenly increased to 7 mH in Case 1 at 0.5 s under the same distorted grid condition. With this value of Lg, the poles of the PR controllers in 11th and 13th orders for harmonic suppression are located outside of the unit circle. As a result, grid phase-currents are gradually oscillating, and eventually, the entire system becomes unstable.  Figure 19 shows the simulation result for the direct grid current controller with L1 = 1.7 mH, L2 = 1.0 mH, and Cf = 10 µF under distorted grid voltages without the grid impedance in Case 2. Decrease of the resonance frequency improves the harmonic suppression of the LCL filter. Thus, the grid current quality in Figure 19 is much improved as compared with Figure 17, producing only the THD of 2.54%. However, reducing the resonance frequency makes the inverter resonant controller to be more vulnerable to uncertain grid impedance.   Figure 20 shows the simulation result of grid-side three-phase currents when Lg has a step change from 0 to 2 mH in Case 2 at 0.5 s with the same conditions and control parameters as Figure 19. Currents become unstable as soon as uncertain grid impedance is applied. Figures 19 and 20 show a strong agreement with the stability analysis in Figure   Figure 18. Simulation result for direct grid current controller with L 1 = 1.7 mH, L 2 = 1.0 mH, and C f = 4.5 µF under distorted grid voltages and L g = 7 mH in Case 1.  Figure 19 shows the simulation result for the direct grid current controller with L1 = 1.7 mH, L2 = 1.0 mH, and Cf = 10 µF under distorted grid voltages without the grid impedance in Case 2. Decrease of the resonance frequency improves the harmonic suppression of the LCL filter. Thus, the grid current quality in Figure 19 is much improved as compared with Figure 17, producing only the THD of 2.54%. However, reducing the resonance frequency makes the inverter resonant controller to be more vulnerable to uncertain grid impedance.   Figure 20 shows the simulation result of grid-side three-phase currents when Lg has a step change from 0 to 2 mH in Case 2 at 0.5 s with the same conditions and control parameters as Figure 19. Currents become unstable as soon as uncertain grid impedance is applied. Figures 19 and 20 show a strong agreement with the stability analysis in Figure   Figure 19. Simulation result for direct grid current controller with L 1 = 1.7 mH, L 2 = 1.0 mH, and C f = 10 µF under distorted grid voltages without grid impedance in Case 2. Figure 20 shows the simulation result of grid-side three-phase currents when L g has a step change from 0 to 2 mH in Case 2 at 0.5 s with the same conditions and control parameters as Figure 19. Currents become unstable as soon as uncertain grid impedance is applied. Figures 19 and 20 show a strong agreement with the stability analysis in Figure 7. Obviously, with the LCL filter designed at lower frequency band, the direct current controller including the PR compensators is more vulnerable to uncertain grid impedance.  To test the current control performance of the direct grid current controller with the LCL filter designed at the resonance frequency below the critical frequency, Figure 21 uses the test condition of L1 = 1.7 mH, L2 = 1.0 mH, and Cf = 30 µF under ideal grid voltages without the grid impedance in Case 3. Under the ideal grid voltages, this scheme provides To test the current control performance of the direct grid current controller with the LCL filter designed at the resonance frequency below the critical frequency, Figure 21 uses the test condition of L 1 = 1.7 mH, L 2 = 1.0 mH, and C f = 30 µF under ideal grid voltages without the grid impedance in Case 3. Under the ideal grid voltages, this scheme provides reasonable current waveforms without the harmonic resonant controllers incorporated in the orders of 5th, 7th, 11th, and 13th. However, as shown in Figure 21, as soon as the resonant controllers start at 0.5 s, the system instantly becomes unstable, which accords closely with the stability analysis given in Figure 8.  To test the current control performance of the direct grid current controller with the LCL filter designed at the resonance frequency below the critical frequency, Figure 21 uses the test condition of L1 = 1.7 mH, L2 = 1.0 mH, and Cf = 30 µF under ideal grid voltages without the grid impedance in Case 3. Under the ideal grid voltages, this scheme provides reasonable current waveforms without the harmonic resonant controllers incorporated in the orders of 5th, 7th, 11th, and 13th. However, as shown in Figure 21, as soon as the resonant controllers start at 0.5 s, the system instantly becomes unstable, which accords closely with the stability analysis given in Figure 8.  In order to validate the stability analyses of the integral-resonant state feedback controller shown in Figure 9 to Figure 13, the simulation results are presented. Figure 22 shows the simulation results for the integral-resonant state feedback controller with L1 = 1.7 mH, L2 = 1.0 mH, and Cf = 4.5 µF without the grid impedance in Case 1. Test grid voltages are the same as Figure 17a. As can be clearly observed in Figure 22, the grid currents are quite sinusoidal without negative impact from the distorted grid voltages, resulting in the THD value of 3.96%. In order to validate the stability analyses of the integral-resonant state feedback controller shown in Figures 9-13, the simulation results are presented. Figure 22 shows the simulation results for the integral-resonant state feedback controller with L 1 = 1.7 mH, L 2 = 1.0 mH, and C f = 4.5 µF without the grid impedance in Case 1. Test grid voltages are the same as Figure 17a. As can be clearly observed in Figure 22, the grid currents are quite sinusoidal without negative impact from the distorted grid voltages, resulting in the THD value of 3.96%.
The simulation results for the integral-resonant state feedback controller under the grid impedance change and distorted grid are shown in Figures 23 and 24 for the weak grid condition, in which all the conditions including the grid distortion are the same as Figure 17. The parameters of the current controller are properly designed under distorted grid condition and L g = 0. It is worth noting that the measured grid voltages in Figure 23a are different from Figure 17a since L g produces additional inductive voltage drop by the grid current as is shown in Figure 15. Clearly, the instability of the direct current controller is observed in Figure 18 with the same level of weak grid. On the contrary, the output currents of the full-state feedback controller in Figure 23a shows stable sinusoidal waveforms with the THD value reduced to 2.16%. The full-state feedback control is tested further under more severe weak grid conditions with L g increased to 14 mH in Figure 24. Though the voltages at the PCC contain more distorted harmonics due to the weak grid, the current controller can still produce stable high-quality injected currents with the THD of 2.09%. These results well match up the stability analysis given in Figure 9. In terms of current quality, the THD value of current is smaller as L g is increased. This complies well with the frequency responses in Figure 5, in which the resonance frequency of the LCL filter is smaller as L g is increased.  The simulation results for the integral-resonant state feedback controller under the grid impedance change and distorted grid are shown in Figures 23 and 24 for the weak grid condition, in which all the conditions including the grid distortion are the same as Figure 17. The parameters of the current controller are properly designed under distorted grid condition and Lg = 0. It is worth noting that the measured grid voltages in Figure 23a are different from Figure 17a since Lg produces additional inductive voltage drop by the grid current as is shown in Figure 15. Clearly, the instability of the direct current controller is observed in Figure 18 with the same level of weak grid. On the contrary, the output currents of the full-state feedback controller in Figure 23a shows stable sinusoidal waveforms with the THD value reduced to 2.16%. The full-state feedback control is tested further under more severe weak grid conditions with Lg increased to 14 mH in Figure 24. Though the voltages at the PCC contain more distorted harmonics due to the weak grid, the current controller can still produce stable high-quality injected currents with the THD of 2.09%. These results well match up the stability analysis given in Figure 9. In terms of current quality, the THD value of current is smaller as Lg is increased. This complies well with the frequency responses in Figure 5, in which the resonance frequency of the LCL filter is smaller as Lg is increased.  To investigate the stability and current control performance for larger variation of the grid impedance, Figure 25 shows the simulation result when Lg is increased to 21 mH in Case 1 under distorted grid. In this Case, the system loses the stability. From the simulation tests in Figures 18 and 25, it is confirmed that the use of the state feedback controller provides a more flexible option to design a current control of an LCL-filtered inverter system in the environment of uncertain grid impedance under distorted weak grid condition because the stability region is extended. To investigate the stability and current control performance for larger variation of the grid impedance, Figure 25 shows the simulation result when L g is increased to 21 mH in Case 1 under distorted grid. In this Case, the system loses the stability. From the simulation tests in Figures 18 and 25, it is confirmed that the use of the state feedback controller provides a more flexible option to design a current control of an LCL-filtered inverter system in the environment of uncertain grid impedance under distorted weak grid condition because the stability region is extended. The same integral-resonant state feedback control method is applied for the different set of the LCL parameters given in Case 2 with L1 = 1.7 mH, L2 = 1.0 mH, and Cf = 10 µF. Figure 26 shows the simulation results under distorted grid voltages without the effect of the grid impedance in Case 2. The grid current waveforms are satisfactory with the THD of 3.86%.   The same integral-resonant state feedback control method is applied for the different set of the LCL parameters given in Case 2 with L 1 = 1.7 mH, L 2 = 1.0 mH, and C f = 10 µF. Figure 26 shows the simulation results under distorted grid voltages without the effect of the grid impedance in Case 2. The grid current waveforms are satisfactory with the THD of 3.86%. Figure 27 shows the simulation results with an extra L g of 7 mH in Case 2 under the same voltage conditions of Figure 17a. As shown in Figure 10, the poles of the closedloop current control still remain inside the stable region when L g varies from 0 to 7 mH. As a result, high-quality sinusoidal grid-injected currents can be obtained, which well demonstrates the validity of the stability analysis. The THD value is much smaller than that of Figure 26 due to additional inductance. The same integral-resonant state feedback control method is applied for the different set of the LCL parameters given in Case 2 with L1 = 1.7 mH, L2 = 1.0 mH, and Cf = 10 µF. Figure 26 shows the simulation results under distorted grid voltages without the effect of the grid impedance in Case 2. The grid current waveforms are satisfactory with the THD of 3.86%.   Figure 10, the poles of the closed-loop current control still remain inside the stable region when Lg varies from 0 to 7 mH. As a result, high-quality sinusoidal grid-injected currents can be obtained, which well demonstrates the validity of the stability analysis. The THD value is much smaller than that of Figure 26 due to additional inductance.
The grid impedance is further increased under more severe weak grid level. Figure  28 shows the simulation results when Lg increases to 14 mH in Case 2. According to the analysis in Figure 10, the integral-resonant state feedback controller designed for the LCL parameter set of Case 2 shows unstable currents for this value of the grid impedance. As the final LCL parameter set, low region resonance frequency of Case 3 in Table 1 is considered, where L1 = 1.7 mH, L2 = 1.0 mH, and Cf = 30 µF are given. The state feedback current controller is designed for the given LCL filter set to produce a good grid-side current at the stiff grid condition as shown in Figure 29. However, as presented in Figure 11, low region resonance frequency of the LCL filter is extremely sensitive to uncertainty caused by the weak grid condition, causing the instability by only small grid impedance change.  The grid impedance is further increased under more severe weak grid level. Figure 28 shows the simulation results when L g increases to 14 mH in Case 2. According to the analysis in Figure 10, the integral-resonant state feedback controller designed for the LCL parameter set of Case 2 shows unstable currents for this value of the grid impedance.
As the final LCL parameter set, low region resonance frequency of Case 3 in Table 1 is considered, where L 1 = 1.7 mH, L 2 = 1.0 mH, and C f = 30 µF are given. The state feedback current controller is designed for the given LCL filter set to produce a good grid-side current at the stiff grid condition as shown in Figure 29. However, as presented in Figure 11, low region resonance frequency of the LCL filter is extremely sensitive to uncertainty caused by the weak grid condition, causing the instability by only small grid impedance change. Figure 30 demonstrates this situation, in which L g is suddenly increased from 3 mH to 7 mH in Case 3 at 0.5 s. While stable currents are observed with 3 mH of L g , the change to 7 mH of L g produces unstable grid currents.
From the performance assessment of two types of current controls with harmonic compensator, it is clearly confirmed that the state feedback controller is more flexible for an LCL-filtered inverter system in the environment of uncertain grid impedance and distorted grid. Furthermore, when the grid is subject to large impedance variation, high resonance frequency of the LCL filter is preferable since it extends much the stability margin under unexpected weak grid condition. As the final LCL parameter set, low region resonance frequency of Case 3 in Table 1 is considered, where L1 = 1.7 mH, L2 = 1.0 mH, and Cf = 30 µF are given. The state feedback current controller is designed for the given LCL filter set to produce a good grid-side current at the stiff grid condition as shown in Figure 29. However, as presented in Figure 11, low region resonance frequency of the LCL filter is extremely sensitive to uncertainty caused by the weak grid condition, causing the instability by only small grid impedance change.  As the final LCL parameter set, low region resonance frequency of Case 3 in Table 1 is considered, where L1 = 1.7 mH, L2 = 1.0 mH, and Cf = 30 µF are given. The state feedback current controller is designed for the given LCL filter set to produce a good grid-side current at the stiff grid condition as shown in Figure 29. However, as presented in Figure 11, low region resonance frequency of the LCL filter is extremely sensitive to uncertainty caused by the weak grid condition, causing the instability by only small grid impedance change.  From the performance assessment of two types of current controls with harmonic compensator, it is clearly confirmed that the state feedback controller is more flexible for an LCL-filtered inverter system in the environment of uncertain grid impedance and distorted grid. Furthermore, when the grid is subject to large impedance variation, high resonance frequency of the LCL filter is preferable since it extends much the stability margin under unexpected weak grid condition.

Current [A]
Instant of grid impedance change from 3 mH to 7 mH

Experimental Results
In this section, the experimental results are presented to evaluate the current control performance of the integral-resonant state feedback controller under the grid impedance change by using the experimental system in Figures 15 and 16. A programmable AC source is used to implement distorted grid voltages. Figure 31 shows the experimental results of the integral-resonant state feedback controller for Case 1 under distorted grid voltages in Figure 31a. Similar in the simulation, three-phase distorted grid voltages include the 5th, 7th, 11th, and 13th harmonics with the magnitude of 5% of the fundamental component. Figure 31b shows three-phase grid current waveforms and FFT result for a-phase grid-side current with the current reference of

Experimental Results
In this section, the experimental results are presented to evaluate the current control performance of the integral-resonant state feedback controller under the grid impedance change by using the experimental system in Figures 15 and 16. A programmable AC source is used to implement distorted grid voltages. Figure 31 shows the experimental results of the integral-resonant state feedback controller for Case 1 under distorted grid voltages in Figure 31a. Similar in the simulation, three-phase distorted grid voltages include the 5th, 7th, 11th, and 13th harmonics with the magnitude of 5% of the fundamental component. Figure 31b shows three-phase grid current waveforms and FFT result for a-phase grid-side current with the current reference of 4 A without the grid impedance. As expected, the disturbance caused by distorted grid is well suppressed, providing high-quality grid currents.
1.0 mH, and Cf = 30 µF under distorted grid voltages when Lg is changed from 3 mH to 7 mH in Case 3.

Experimental Results
In this section, the experimental results are presented to evaluate the current control performance of the integral-resonant state feedback controller under the grid impedance change by using the experimental system in Figures 15 and 16. A programmable AC source is used to implement distorted grid voltages. Figure 31 shows the experimental results of the integral-resonant state feedback controller for Case 1 under distorted grid voltages in Figure 31a. Similar in the simulation, three-phase distorted grid voltages include the 5th, 7th, 11th, and 13th harmonics with the magnitude of 5% of the fundamental component. Figure 31b shows three-phase grid current waveforms and FFT result for a-phase grid-side current with the current reference of 4 A without the grid impedance. As expected, the disturbance caused by distorted grid is well suppressed, providing high-quality grid currents.   However, the injected grid currents oscillate seriously when shown in Figure 34. This also accords closely with the stability ana the simulation in Figure 25. Figures 35-37 represent the experiment  Figure 31a. An external inductor is used to emulate the grid impedance as in Figure 15. Similar to the simulation in Figure 23, it is observed that the measured grid voltages are altered due to the inductive voltage drop by the grid current and L g . In addition, the harmonic rejection of the inverter is greatly enhanced with additional grid impedance.
However, the injected grid currents oscillate seriously when L g reaches 21 mH as shown in Figure 34. This also accords closely with the stability analysis in Figure 9 and the simulation in Figure 25. Figures 35-37 represent the experimental results of grid-side three-phase currents by the integral-resonant state feedback controller under the weak grid condition (L g = 0 to 14 mH) with L 1 = 1.7 mH, L 2 = 1.0 mH, and C f = 10 µF as the LCL parameters. The current controller is also designed by using the given LCL filter set at stiff grid condition with distorted grid voltage of the 5th, 7th, 11th, and 13th harmonics. Until L g increases to 14 mH, the inverter system maintains the stability, giving desirable grid currents. However, as L g becomes larger than 14 mH, the grid currents become unstable, which is well matched to the simulation results. Figures 38 and 39 represents the experimental results for Case 3 using L 1 = 1.7 mH, L 2 = 1.0 mH, and C f = 30 µF as the LCL parameters. This LCL filter has the resonance frequency smaller than the critical frequency. It is shown that only 7 mH of L g makes the inverter system unstable.
To evaluate the injected current quality by two control schemes in the simulation and experimental results, Table 3 represents the THD values in the simulation results and the current harmonic magnitudes in the experimental results for three cases of the LCL filter parameters with L g . Figures 32 and 33 show the experimental results of the integral-resonant state feedback controller when Lg = 7 mH and Lg = 14 mH are applied with the same conditions of Figure 31a. An external inductor is used to emulate the grid impedance as in Figure 15. Similar to the simulation in Figure 23, it is observed that the measured grid voltages are altered due to the inductive voltage drop by the grid current and Lg. In addition, the harmonic rejection of the inverter is greatly enhanced with additional grid impedance.  However, the injected grid currents oscillate seriously when Lg reaches 21 mH as shown in Figure 34. This also accords closely with the stability analysis in Figure 9 and the simulation in Figure 25. Figures 35-37 represent the experimental results of grid-side three-phase currents by the integral-resonant state feedback controller under the weak grid condition (Lg = 0 to 14 mH) with L1 = 1.7 mH, L2 = 1.0 mH, and Cf = 10 µF as the LCL parameters. The current controller is also designed by using the given LCL filter set at stiff grid condition with distorted grid voltage of the 5th, 7th, 11th, and 13th harmonics. Until Lg increases to 14 mH, the inverter system maintains the stability, giving desirable grid currents. However, as Lg becomes larger than 14 mH, the grid currents become unstable, which is well matched to the simulation results.   Lg increases to 14 mH, the inverter system maintains the stability, giving desirable grid currents. However, as Lg becomes larger than 14 mH, the grid currents become unstable, which is well matched to the simulation results.          Figures 38 and 39 represents the experimental results for Case 3 using L1 = 1.7 mH, L2 = 1.0 mH, and Cf = 30 µF as the LCL parameters. This LCL filter has the resonance frequency smaller than the critical frequency. It is shown that only 7 mH of Lg makes the inverter system unstable.   Figures 38 and 39 represents the experimental results for Case 3 using L1 = 1.7 mH, L2 = 1.0 mH, and Cf = 30 µF as the LCL parameters. This LCL filter has the resonance frequency smaller than the critical frequency. It is shown that only 7 mH of Lg makes the inverter system unstable.    To evaluate the injected current quality by two control schemes in the simulation and experimental results, Table 3 represents the THD values in the simulation results and the current harmonic magnitudes in the experimental results for three cases of the LCL filter parameters with Lg. Figure 39. Experimental result of grid-side currents for integral-resonant state feedback controller with L 1 = 1.7 mH, L 2 = 1.0 mH, and C f = 30 µF under distorted grid voltages and L g = 7 mH in Case 3.

Conclusions
This paper has presented an assessment of the stability and performance of current controllers with harmonic compensators for an LCL-filtered grid-connected inverter under distorted weak grid conditions. Two typical current controllers with both the active damping and grid harmonic compensation are selected to investigate the closed-loop system stability and current control performance under uncertainty of the grid impedance in weak grid conditions. The system stability is analyzed by investigating the discrete-time closed-loop poles when the grid impedance varies. The assessment of the stability and current control performance is carried out for three sets of LCL filter parameters in view of current harmonic attenuation and resonance damping in the presence of uncertain grid impedance and distorted grid. It is clearly demonstrated that the LCL parameter selection mainly affects the control robustness. The lower the resonance frequency of the LCL filter is, the tighter the control bandwidth and stability margin yield with respect to the grid uncertainties. Furthermore, since the grid is commonly distorted and the controller is equipped with harmonic resonant controllers, the control stability investigation in this condition is very important for a stable inverter operation.
In order to support the stability analysis of the current control schemes, the whole control algorithm is implemented on 32-bit DSP TMS320F28335 to control 2 kVA gridconnected inverter. Comprehensive simulation and experimental results are presented under distorted weak grid conditions to demonstrate theoretical analysis. Based on the presented results, it is confirmed that the state feedback controller is more flexible in the control of an LCL-filtered inverter in the environment of distorted grid and uncertain grid impedance. Furthermore, when the grid is subject to large grid impedance variation, the choice of high resonance frequency of the LCL filter is preferable since it extends much the stability margin of inverter system under unexpected weak grid condition.