A Theoretical Concept of Decoupled Current Control Scheme for Grid-Connected Inverter with L-C-L Filter

This paper proposes a nonlinear decoupled current control scheme for a grid-connected inverter with LCL filter. Decoupling the active and reactive current control channels is one of the main demands in the control of inverters. For inverters with an L filter, the decoupling can be achieved by a proper feed-forward of grid voltages. However, the coupling of channels is a complex issue for converters with LCL filters. The resonance mode of the LCL filter may cause instability, which adds more complexity to the analysis. In this paper, state equations of the system are provided, which highlight the coupling between active and reactive currents injected into the grid. Accordingly, a non-linear control scheme is proposed which effectively decouples the channels and dampens the resonant modes of the LCL filter. The stability of the proposed control method is verified by the Lyapunov criterion. Independency of the system stability to the grid-impedance is another feature of the proposed approach. Moreover, only grid-side currents are needed for implementation of the proposed scheme, avoiding the need for additional current sensors for the output capacitor and grid-side inductor. For accurate modelling of the inverter, the computation and PWM sampling delays are included in the controller design. Finally, various case studies are provided that verify the performance of the proposed approach and the stability of the system.


Introduction
Voltage source converters (VSCs) are widely used in modern power systems for the integration of renewable energies, distributed power generation, energy storage systems, electric vehicle chargers, high and medium voltage transmission systems, hybrid AC/DC microgrids, motor derive systems, DC homes, etc. [1,2]. Apart from significant benefits coming from the usage of VSCs, their switching-based operation yields to harmonically polluted output voltages, which consequently creates harmonic currents injected into the grid. International standards have provided restrictions on the harmonic content, which are normally satisfied by adding harmonic filters in the output of the inverters. For this purpose, standard types of L and LCL filters are well defined in the literature [3]. Comparing filters, the LCL-filter is superior in terms of filter size, weight, and harmonic attenuation performance [4]. Using an LCL-filter is more common in high power applications, in which the switching frequency is lowered to reduce switching losses and VSC cost. However, the controller design in the presence of an LCL filter is more complicated, which is discussed in this paper.
In most applications, the control of DC-link voltage and reactive power are implemented in the control structure of the VSCs. In this structure, the concept of cascaded a control loop scheme is employed, in which the DC-link voltage and reactive power control loops are outer loops, and the control loops of the output currents are inner loops. Using an LCL filter introduces two challenges in the current control loop: (i) introducing resonant modes of an LCL filter, which impairs the stability of the whole converter system, and (ii) strong coupling between active and reactive currents, which impairs their independent control. In the following, the existing solutions for both challenges are provided.

Damping the Resonant Modes
Appearing resonant modes in the system is the first challenge introduced by employing LCL-filters. In the existing studies, two general approaches have been proposed for damping the resonance modes: (i) passive damping (PD) and (ii) active damping (AD). In the PD method, an extra series or parallel resistor is added to the filter elements. This damping method is simple; however, it increases power loss. Alternatively, AD methods dampen resonant modes by employing proper control algorithms, which are efficient and cost effective [2]. Various AD methods have been presented in literature, which are generally categorized into two groups of (i) filter-based (single loop) and (ii) feedback-based (multi loop) methods [5].
In filter-based methods, only grid-side or inverter-side current is measured, and the resonant modes are dampened using proper control schemes. This method is called the single loop cascade control method [6][7][8]. The filter-based methods are usually implemented by a notch filter with the characteristic frequency equal to the resonant frequency. This method does not demand an extra sensor, which makes it cost effective. However, its performance, stability margin, and robustness are not acceptable, and the dependency of the scheme on the resonant mode frequency and the variation of the filter parameters intensifies the mentioned deficiencies [5,9]. Meanwhile, the bandwidth of the control feedback should be low enough and should be reduced to about 1/10 of the resonance frequency [10]. This is a large deficiency, especially in systems with low-resonance frequency. In feedback-based methods, in addition to using the state variable of grid-side current, other state variables are used in the control loop, which is known as the multi loop method. In this method, the output capacitor current [11][12][13], the output capacitor voltage [14], the inverter-side current [15,16], and combination of multiple states [4,17,18] are utilized as inner loop feedback signals. Among the different feedback signals, capacitor current and inverter-side current provide superior stability characteristics for resonance damping with simple implementation.
Further to the filter-based and feedback-based methods, predictive control [19][20][21][22], robust control [23][24][25], adaptive control [26,27], and predictive adaptive robust control [28] have also been presented in the literature. However, the complexity of the schemes has limited the practical implementation of these control schemes.

Decoupling of Active and Reactive Powers
Knowing that the DC-linked voltage control of grid-connected inverters is performed via the active current control channel, and reactive power injection is achieved by the reactive current control channel, the decoupling of the active and reactive current channels is a necessary demand to improve the system's overall performance and independent control of the active and the reactive powers [25]. In an inverter with an L filter, the decoupling between active and reactive power in a synchronous dq frame is achieved by feed-forward signals into the current control loop. In inverters with an LCL filter, the control system is a multi-input-multi-output (MIMO) system (2 input-2 output) with tight coupling between channels; a simple feed-forward scheme cannot provide sufficient decoupling for the system [29]. Further to the above-mentioned importance of decoupling, the potential instability issue is another aspect which necessitates the channels decoupling for MIMO systems [29]. In other words, the strong coupling between channels in MIMO systems may cause instability of the system and should be avoided. To tackle this issue, a pre-controller based on the multivariable control theory is used to decrease coupling, which makes the system column or row dominant. However, the pre-controller cannot guarantee complete decoupling [29].
To compare the different existing approaches, Table 1 is provided. In this table, the available methods in the literature are compared considering different aspects, including (i) decoupled control of active and reactive currents, (ii) stability margin and resonance damping capability, (iii) the number of needed sensors, and (iv) complexity and order of controller. Also, the proposed method is included in this table, and the results of comparison show the superiority of the proposed method compared to existing methods. It should be mentioned that all characteristics of the proposed method, indicated in Table 1, are demonstrated in theory and simulation throughout the rest of the paper. As a conclusion for the above propositions, to the best of the authors knowledge, there is a lack of a suitable control scheme which simultaneously considers both demands of (i) damping the resonant modes and (ii) the decoupling of active and reactive powers for inverters with an LCL filter. Keeping the number of sensors at minimum is another required criterion. This paper proposes a non-linear control method for a grid-connected inverter with an LCL filter that satisfies both requirements. In the proposed scheme, the minimum number of sensors is used since only grid-side currents are measured directly, and inverter-side currents and capacitor voltages are estimated using a reduced-order Luenberger observer. Having less sensors, in addition to cost reduction, can improve system reliability. Furthermore, a new scheme is presented to determine the phase margin (PM) of current control loop. The computational and PWM delays are included in the in tuning of current control loops.
Based on the above explanations, the objectives of the paper are as follows: • the decoupling of active and reactive current channels and corresponding independent control of active and reactive powers; • effective damping of resonant modes caused by an LCL-filter; • using the minimum number of sensors, leading to cost reduction and improved system reliability; • developing a parameter-tuning approach for the studied MIMO system using wellknown criteria of phase and gain margin; • consideration of computational and PWM delays in the control loop and controller parameters tuning.
This paper is organized as follows: the next section presents the modeling of the VSCs with an LCL filter in a dq reference frame; in Section 3, the proposed current controller is explained as well as an estimation of LCL filter-state variables and explanation of DC-link voltage and reactive power control loops; in Section 4, a phase margin determination scheme is presented, which provides a systematic method for tuning the proposed current control parameters; performance of the final controlled system in different situations is evaluated through different case studies in Section 5; finally, Section 6 concludes the paper.  Figure 1 shows the single line diagram of a three-phase grid-connected VSC with an LCL filter [30,31]. In this figure, the grid is modelled by its Thevenin equivalent. The dynamic equations of the system including AC part and DC link is presented:

Modeling of Grid Connected Inverter with LCL Filter
All parameters are depicted in Figure 1.
with an LCL filter in a dq reference frame; in Section 3, the proposed current controller is explained as well as an estimation of LCL filter-state variables and explanation of DC-link voltage and reactive power control loops; in Section 4, a phase margin determination scheme is presented, which provides a systematic method for tuning the proposed current control parameters; performance of the final controlled system in different situations is evaluated through different case studies in Section 5; finally, Section 6 concludes the paper. Figure 1 shows the single line diagram of a three-phase grid-connected VSC with an LCL filter [30,31]. In this figure, the grid is modelled by its Thevenin equivalent. The dynamic equations of the system including AC part and DC link is presented:

Modeling of Grid Connected Inverter with LCL Filter
All parameters are depicted in Figure 1. To remove the nonlinearity on the left-hand side of the DC-link voltage dynamic Equation (4), the energy stored in the DC link capacitor, = . , is used as an alternative variable [32]. Then, (4) can be rewritten as: Using a phase-locked loop (PLL) for extraction of angular frequency of ( ) , and applying Park transformation to the state equations of (1) and (5) yields: = − · + ( − ) To remove the nonlinearity on the left-hand side of the DC-link voltage dynamic Equation (4), the energy stored in the DC link capacitor, W c = 1 2 C dc .v 2 c , is used as an alternative variable [32]. Then, (4) can be rewritten as: Using a phase-locked loop (PLL) for extraction of angular frequency of v g(abc) , and applying Park transformation to the state equations of (1) and (5) yields: In the equations, (i Id , i Iq ) and (i gd , i gq ) are currents flowing through inductors L 1 and L 2 , respectively; (v cd , v cq ) are voltages across the output filter capacitor, (v Id , v Iq ) are inverter terminal voltages, and (v gd , v gq ) are PCC voltages, all in dq frame. Also, P L−ins is a nonlinear term which shows the instantaneous power absorbed by the elements of the LCL filter. For practical applications, the following assumptions can be considered [4]: • v gq is zero because the PCC voltage is used as PLL input; • the resistances of the filters are negligible, which represents the worst possible case of stability, • the P L−ins is negligible knowing its small amplitude and zero average value.
As a result, the DC-link voltage dynamic equation can be rewritten as: Also, the injected active and reactive power into the grid at the PCC are shown in (14) and (15), respectively. Figure 2 shows the general cascade control structure of the grid-connected inverter adopted as a base structure in this paper. As shown in Figure 2, the DC-link voltage and reactive power control loops are the outer loops in the cascade structure, and the current control loops are the inner loops. In this figure, "d" and "q" current control channels are not separated because of high coupling between the dynamic of i gd and i gq , as given in (6). According to (13) and (15), i gd and i gq can be used for control of the reactive power (Q s ) and DC-link voltage, and are considered input control variables, respectively, and are assumed as input control variables for the DC-link voltage and reactive power. Higher bandwidth of the current control loops compared to those of DC-link voltage and reactive power control loops is necessary in use of this cascade control structure [33]. Thus, the establishment of the proper current control loop is the primary task in the control of a grid-connected inverter, which is discussed comprehensively in this paper. By specifying the current control loop parameters, controller design of the DC-link voltage and the reactive power is the next step for control of the grid-connected inverter.

Output Current Control
Modeling of a three-phase grid-connected inverter with an LCL filter in dq frame results in a 2-inputs-2-outputs transfer function from inverter terminal voltages to gridside currents, as given in (16) in which ( , ) are the control inputs, ( , ) are outputs, and the G matrix is the nondiagonal transfer function. Meanwhile, modeling of the system in an ABC frame results in a single input-single output transfer function for each phase of the system. In this re-

Output Current Control
Modeling of a three-phase grid-connected inverter with an LCL filter in dq frame results in a 2-inputs-2-outputs transfer function from inverter terminal voltages to grid-side currents, as given in (16), in which (v Id , v Iq ) are the control inputs, (i gd , i gq ) are outputs, and the G matrix is the non-diagonal transfer function. Meanwhile, modeling of the system in an ABC frame results in a single input-single output transfer function for each phase of the system. In this regard, the frequency characteristics of a single LCL filter and the system in (16) are different, as shown in Figure 3. The resonance mode of the system is evident in both frequency characteristics.

Output Current Control
Modeling of a three-phase grid-connected inverter with an LCL filter in dq frame results in a 2-inputs-2-outputs transfer function from inverter terminal voltages to gridside currents, as given in (16) in which ( , ) are the control inputs, ( , ) are outputs, and the G matrix is the nondiagonal transfer function. Meanwhile, modeling of the system in an ABC frame results in a single input-single output transfer function for each phase of the system. In this regard, the frequency characteristics of a single LCL filter and the system in (16) are different, as shown in Figure 3. The resonance mode of the system is evident in both frequency characteristics.
(a) (b) Figure 3. Frequency characteristics of (a) single phase LCL filter and (b) the system in dq frame (transfer function in (16)).
Considering the transfer function in (16), there is a tight coupling between two channels (channel 1: input 1 to output 1, channel 2: input 2 to output). Figure 4 shows the Gershgorin band graph of (16) with the parameter values of Table 2, which shows that the system is not column and row dominant. Also, based on the MIMO control system theory, the independent control design for channel 1 and channel 2 may lead to instability of the overall system, regardless of the resonance mode being dampened [29]. The high order of the system and the existence of the resonance mode are other factors that increase the difficulty of the current controller design.   (16)).
Considering the transfer function in (16), there is a tight coupling between two channels (channel 1: input 1 to output 1, channel 2: input 2 to output). Figure 4 shows the Gershgorin band graph of (16) with the parameter values of Table 2, which shows that the system is not column and row dominant. Also, based on the MIMO control system theory, the independent control design for channel 1 and channel 2 may lead to instability of the overall system, regardless of the resonance mode being dampened [29]. The high order of the system and the existence of the resonance mode are other factors that increase the difficulty of the current controller design.   (16) with the parameter values of Table 3. Based on the multivariable control theory, it is possible to decrease the coupling between channels in MIMO systems using a pre-controller such that the system becomes dominantly diagonal (column dominant or row dominant). However, it is not possible to completely remove the coupling and make the system diagonal using the mentioned precontroller. To remove the coupling terms completely, a non-linear control scheme is proposed in this paper, which simultaneously damps the resonance modes. This controller is based on the back-stepping method, which is categorized as a state-feedback approach. To start the controller design with this method, two variables are defined as = − + and = + , and an error variable vector is also defined as given by (17): where,  (16) with the parameter values of Table 3.
Based on the multivariable control theory, it is possible to decrease the coupling between channels in MIMO systems using a pre-controller such that the system becomes dominantly diagonal (column dominant or row dominant). However, it is not possible to completely remove the coupling and make the system diagonal using the mentioned pre-controller. To remove the coupling terms completely, a non-linear control scheme is proposed in this paper, which simultaneously damps the resonance modes. This controller is based on the back-stepping method, which is categorized as a state-feedback approach. To start the controller design with this method, two variables are defined as , and an error variable vector is also defined as given by (17): where, The reference vector values are given in (19) which are obtained by solving the state Equations According to the above definitions, the error state equations of the system are as given by (20)- (25).
The proposed controller drives e 5 and e 6 to zero, independently, which indicates that i gd and i gq are forced to their reference values with no coupling and interaction. The details of the proposed scheme are provided in the following subsections.

Proposed Active Current Control
To drive i gd , as an active current, into i re f gd , e 5 has to be forced to zero through proper selection of control variables. To do so, the term k 1 e 5 is added or subtracted to or from the right-hand side of de 5 /dt in (24), as shown in (26).
By defining the new variable of Z 1 as (27), (26) is rewritten as (28) The derivative of Z 1 is named V 1 in the rest of the paper, as given in (29).
Substituting de 5 /dt and de 6 /dt from (24)-(25) into (29), and defining the intermediate variable of u 1 = de 3 /dt, (29) is rewritten as: If Z 1 is enforced to zero, based on (28), de 5 /dt will be equal to −k 1 e 5 ; and then, for a positive value of k 1 , e 5 will go to zero exponentially. To do so, the positive definite Lyapunov function V h1 is defined as follows: The derivative of (31) is given in (32). Substituting (28) and (30) into (32) results in (33).
Accordingly, selecting the positive values for k 1 and k 2 guarantees the force of e 5 and Z 1 to zero based on the Lyapunov stability theorem [34]. Now, V desired 1 in (34) is added and subtracted to the right-hand side of (30) as: Now, the new variable of Z 2 is defined as given in (37).
The derivative of Z 2 is also as given in (39).
From the above discussions, it is concluded that in order to drive e 5 to zero, Z 1 and Z 2 should also move to zero. For this purpose, another positive definite Lyapunov function V h2 is defined as shown in (40).
The derivative of the Lyapunov function V h2 with respect to the time is as given in (41).
Therefore, if dZ 2 /dt is equal to −Z 1 − k 3 Z 2 , then, based on (39), is achieved by selecting n 1 as (43) Equation (42) is equal to (44) Therefore, according to (44) and based on the Lyapunov theorem, all variables of e 5 , Z 1 , and Z 2 move exponentially to zero. Deriving e 5 to zero exponentially indicates the independent tracking of the reference value of i re f gd from other variables, especially without any interaction with the reactive current dynamics. The resonance modes are also dampened. Moreover, the poles of the control system, related to the active current i gd control channel, are equal to k 1 , k 2 , and k 3 , which are the control parameters in (43). The poles are pure real with zero imaginary part which indicates complete damping of resonance mode.
Finally, the input control variable v Id is as given in (45).
in which, n 1 can be further simplified from (43) to (46). where,

Proposed Reactive Current Control
The method for control of i gq is similar to that of i gd , with a difference that the process begins with Equation of de 6 /dt in (20) and (25). For the sake of brevity, the details of the controller design process are not elaborated here. By performing a similar procedure for i gq , the final input control variable is as given by (53).
Using the control input of v Iq in (53) leads to the derivative of the new defined positive definite function of (61) As follows, where, Based on the Lyapunov theorem and considering (61) and (62), all variables of e 6 , Y 1 , and Y 2 move exponentially to zero. Deriving e 6 to zero exponentially means the independent tracking of the reference value of i re f gq from other variables, especially without any interaction with the active current dynamics. Also, the resonance mode is dampened properly.
Moreover, the poles of the control system, related to reactive current i gq control channel, are equal to m 1 , m 2 , and m 3 which are the control parameters in (54) and (55). The poles are pure real with zero imaginary part which means complete damping of the resonance mode.

DC-Link Voltage Controller
As the DC-link voltage control is not the concern of this paper, the conventional DC-link voltage control scheme is presented in this subsection for the ease of reference. As shown in (13), both i gd and P dc affect the dynamics of the DC-link voltage. To remove the dynamic dependency to P dc , it is a commonly used strategy to add P dc as a feed-forward to the control system [32]. Thus, i gd is the variable which is solely used for control of DC-link energy. Equation (65) where, (K p ; K i ) are proportional and integral gains of the PI controller, respectively.
Using the reference value of i re f gd in (65), the closed loop transfer function of the DC-link energy loop is as given by (66).
With reference to (66), the fast step response, high system bandwidth, zero steady state error, and proper robustness in presence of uncertainties in the system parameters are achieved by a proper setting of (K p ; K i ) values.

Reactive Power Controllers
As the reactive power control is not the concern of this paper, the conventional reactive power control scheme is presented in the subsection for the ease of reference. To control reactive power, i gq is the control operator. Equation (67) where, H is defined as given in (68).
Accordingly, H tends to zero; and therefore, Q s becomes equal to Q re f s . The first term in right hand side of (67) is a feed-forward controller to speed up the tracking of the reactive power reference.

Proposed Observer for Estimation of State Variables of the LCL Filter
To obtain proper performance using the active damping methods, it is necessary to feedback all the state variables of the LCL filter such as the proposed controller in (45) and (53). This requirement demands the sensors for measuring all state variables, which is not cost effective. However, the need of the mentioned sensors is effectively resolved by using state variable estimation methods. Namely, measuring the grid current (i g ) makes the overall system observable, and the filter capacitor voltage and the inverter current can be effectively estimated. Analysis of the state equations of a single phase LCL filter in static frame, given by (69), shows that measuring i g makes the system fully observable.
Accordingly, i g is measured directly and using a reduced-order Luenberger (ROL) observer, v c and i I are estimated. A second-order observer for estimation of v c and i I of each phase is utilized in this paper. Details of the Luenberger observer design procedure can be found in [35], which is not elaborated for the sake of brevity. According to the observer design procedure, the bandwidth of the observer should be selected higher than that of the main closed loop-controlled system.
Based on the discussions presented in the above subsections, the complete block diagram of the proposed controller is as depicted in Figure 5. Accordingly, tends to zero; and therefore, becomes equal to . The first term in right hand side of (67) is a feed-forward controller to speed up the tracking of the reactive power reference.

Proposed Observer for Estimation of State Variables of the LCL Filter
To obtain proper performance using the active damping methods, it is necessary to feedback all the state variables of the LCL filter such as the proposed controller in (45) and (53). This requirement demands the sensors for measuring all state variables, which is not cost effective. However, the need of the mentioned sensors is effectively resolved by using state variable estimation methods. Namely, measuring the grid current ( ) makes the overall system observable, and the filter capacitor voltage and the inverter current can be effectively estimated. Analysis of the state equations of a single phase LCL filter in static frame, given by (69), shows that measuring makes the system fully observable.
Accordingly, is measured directly and using a reduced-order Luenberger (ROL) observer, and are estimated. A second-order observer for estimation of and of each phase is utilized in this paper. Details of the Luenberger observer design procedure can be found in [35], which is not elaborated for the sake of brevity. According to the observer design procedure, the bandwidth of the observer should be selected higher than that of the main closed loop-controlled system.
Based on the discussions presented in the above subsections, the complete block diagram of the proposed controller is as depicted in Figure 5.

Proposed Procedure for Tuning the Proposed Controller
According to (44) and (62), an increase of the controller parameters values ( − and − ) increases the bandwidth of the current control loop. However, due to the time delay imposed by computations and PWM sampling in the current control loop, the loop PM and the stability are affected. Therefore, the controller parameters should be selected carefully to obtain the desired stability margin and bandwidth.

Proposed Procedure for Tuning the Proposed Controller
According to (44) and (62), an increase of the controller parameters values (k 1 − k 3 and m 1 − m 3 ) increases the bandwidth of the current control loop. However, due to the time delay imposed by computations and PWM sampling in the current control loop, the loop PM and the stability are affected. Therefore, the controller parameters should be selected carefully to obtain the desired stability margin and bandwidth.

Proposed Scheme for Phase Margin Determination
It was shown previously that the control structure of a grid-connected VSC with an LCL type filter in the dq frame is a MIMO system. In order to evaluate the stability margin of the system, PM and the gain margin are required. However, the PM concept is used for SISO systems, and there is no accurate and straightforward mechanism to determine the PM of a non-SISO system. In this subsection, a proposed scheme for PM determination is presented, which uses the advantage of decoupling the control channels of i gd and i gq channels in the proposed control scheme.
The proposed controller of Figure 5 is a type of state feedback controller, and Figure 6a shows its simplified diagram for control of i gd channel. Therefore, the well-known PM determination method used for the SISO system cannot be applied here. However, if the gain matrix of state feedback (K) is combined with system state space equations, the single signal u can be considered as feedback signal. Thus, the new system will be a SISO system, and the PM of the system can be evaluated accordingly.

Proposed Scheme for Phase Margin Determination
It was shown previously that the control structure of a grid-connected VSC with an LCL type filter in the dq frame is a MIMO system. In order to evaluate the stability margin of the system, PM and the gain margin are required. However, the PM concept is used for SISO systems, and there is no accurate and straightforward mechanism to determine the PM of a non-SISO system. In this subsection, a proposed scheme for PM determination is presented, which uses the advantage of decoupling the control channels of and channels in the proposed control scheme.
The proposed controller of Figure 5 is a type of state feedback controller, and Figure  6a shows its simplified diagram for control of channel. Therefore, the well-known PM determination method used for the SISO system cannot be applied here. However, if the gain matrix of state feedback ( ) is combined with system state space equations, the single signal can be considered as feedback signal. Thus, the new system will be a SISO system, and the PM of the system can be evaluated accordingly.

Proposed Approach for Controller Parameters Tuning
Using the proposed method, the PM and tolerable time delay in current control loop ( ) are determined for the studied system of Table 2. For the sake of simplicity, the values of all control parameters are considered the same ( = = ) and PM, , and bandwidth of the and control loops are determined for the different values of the control parameter . It can be observed that an increase in control parameter decreases and increases the bandwidth ( ). The total time delay in the control loop due to computations and PWM sampling is = 1/ . Indeed, the control parameter should be selected such that is greater than . Considering < 50 μs and = 10 kHz (according to system parameters in Table 3), the total time delay in the current control loop is = 100 μs. Therefore, the controller parameter is selected as = 1500, which results in = 57 , considering in the control loop, and current loop bandwidth = 980 rad/s. Accordingly, the PI controller parameters for the DC-link voltage and the reactive power controller are selected as = = 300, and = 1500. Using the selected , and , PM of the DC-link voltage and the reactive power control loops are about 70 and 90 respectively. Also, the DC-link voltage and the reactive power control loop bandwidths are selected at = = 300 rad/s, which is about five times lower than that of the current control loop.

Proposed Approach for Controller Parameters Tuning
Using the proposed method, the PM and tolerable time delay in current control loop (T td ) are determined for the studied system of Table 2. For the sake of simplicity, the values of all control parameters are considered the same (ρ = k i = m i ) and PM, T td , and bandwidth of the i gd and i gq control loops are determined for the different values of the control parameter ρ. It can be observed that an increase in control parameter ρ decreases T td and increases the bandwidth (W b−curr ). The total time delay in the control loop due to computations and PWM sampling is T d = 1/ f sw . Indeed, the control parameter ρ should be selected such that T td is greater than T d .
Considering T c < 50 µs and f s = 10 kHz (according to system parameters in Table 3), the total time delay in the current control loop is T d = 100 µs. Therefore, the controller parameter is selected as ρ = 1500, which results in PM = 57 o , considering T d in the control loop, and current loop bandwidth W b−curr = 980 rad/s. Accordingly, the PI controller parameters for the DC-link voltage and the reactive power controller are selected as k p = k q = 300, and k I = 1500. Using the selected k p , k I and k q , PM of the DClink voltage and the reactive power control loops are about 70 o and 90 o respectively. Also, the DC-link voltage and the reactive power control loop bandwidths are selected at W b−v dc = W b−Q = 300 rad/s, which is about five times lower than that of the current control loop.

Case Study and Simulation Results
To verify the performance of the proposed control scheme, at first, the frequency characteristic of the closed loop system is shown in Figure 7. In comparison with the frequency characteristic of an open loop system in Figure 3b, it is evident that the resonance mode of the controlled system has been damped completely. Furthermore, different simulation case studies are provided in this section. The switching frequency and the sampling rate both are 10 kHz, and the computational time in each sample is considered 100 µs in a simulated system. The parameter values of the system and controllers are presented in Table 3.

Case Study and Simulation Results
To verify the performance of the proposed control scheme, at first, the frequency characteristic of the closed loop system is shown in Figure 7. In comparison with the frequency characteristic of an open loop system in Figure 3b, it is evident that the resonance mode of the controlled system has been damped completely. Furthermore, different simulation case studies are provided in this section. The switching frequency and the sampling rate both are 10 kHz, and the computational time in each sample is considered 100 µs in a simulated system. The parameter values of the system and controllers are presented in Table 3. In this section, three cases are studied: (i) the converter is connected to an ideal grid with zero impedance, without any uncertainty in the system parameters, (ii) the converter is connected to the grid through non-zero impedance, and (iii) the grid impedance is nonzero, and there is uncertainty in the parameters of the system.
In the following, the description of the operating condition in the scenarios are provided. At first, is 30 kW, is 10 kVAr, and the desired DC-link voltage is 1000 V. To show the dynamic results, the following changes are applied to the operating point.

Converter Is Connected to an Ideal Grid (Zero Impedance)
In this case, the grid Thevenin impedance is considered negligible ( = 0). The results of the simulation are presented in Figure 8, indicating that both the DC-link voltage and the reactive power smoothly track their reference values. Also, the changes of and have a negligible effect on each other. This confirms that the coupling between the active and reactive power channels is effectively removed. The minor coupling observed in the simulation results of Figure 8 is due to the time delay and observer operation in the control loop. In this section, three cases are studied: (i) the converter is connected to an ideal grid with zero impedance, without any uncertainty in the system parameters, (ii) the converter is connected to the grid through non-zero impedance, and (iii) the grid impedance is non-zero, and there is uncertainty in the parameters of the system.
In the following, the description of the operating condition in the scenarios are provided. At first, P dc is 30 kW, Q re f is 10 kVAr, and the desired DC-link voltage is 1000 V. To show the dynamic results, the following changes are applied to the operating point.

Converter Is Connected to an Ideal Grid (Zero Impedance)
In this case, the grid Thevenin impedance is considered negligible (z s = 0). The results of the simulation are presented in Figure 8, indicating that both the DC-link voltage and the reactive power smoothly track their reference values. Also, the changes of P dc and Q re f have a negligible effect on each other. This confirms that the coupling between the active and reactive power channels is effectively removed. The minor coupling observed in the simulation results of Figure 8

Converter Is connected to a Non-Ideal Grid (Non-Zero Impedance)
In this part, the converter is connected to a non-ideal grid with = 0.4 mH which corresponds to ≈ 22. Accordingly, the resonance frequency of the system is changed to 662 Hz. The scenarios and the applied reference commands are the same to those of the previous sub-section. The simulation results are presented in Figure 9. As expected, the non-zero grid impedance has a negligible effect on the performance of the proposed control scheme. According to the results, the fast response, the high stability margin of the system, with negligible coupling between the active and reactive power channels, are achieved by using the proposed control scheme. As shown in Figure 9c, the changes of the active and reactive power affect the grid voltage, which consequently results in a small coupling (slightly more than the previous cases).

Converter Is connected to a Non-Ideal Grid (Non-Zero Impedance)
In this part, the converter is connected to a non-ideal grid with L s = 0.4 mH which corresponds to SCR ≈ 22. Accordingly, the resonance frequency of the system is changed to 662 Hz. The scenarios and the applied reference commands are the same to those of the previous sub-section. The simulation results are presented in Figure 9. As expected, the non-zero grid impedance has a negligible effect on the performance of the proposed control scheme. According to the results, the fast response, the high stability margin of the system, with negligible coupling between the active and reactive power channels, are achieved by using the proposed control scheme. As shown in Figure 9c, the changes of the active and reactive power affect the grid voltage, which consequently results in a small coupling (slightly more than the previous cases). Appl

Converter Is Connected to a Non-Ideal Grid (Non-Zero Impedance) Considering Uncertainties in the Filter Impedances
In this subsection, the robustness of the proposed controller in the presence of uncertainties in the system parameters is evaluated. It is supposed that there is 20% uncertainty in the filter inductances, i.e., their values are = 0.9 mH and = 0.48 mH, whereas the controller is designed for = 1.1 mH and = 0.6 mH. The grid inductance is also considered = 0.4 mH. The simulation results are presented in Figure 10. The fast and proper dynamic response of the system are concluded from the results. Similar to the previous subsections, there is a negligible interaction between the active and the reactive power control channels (slightly more than the previous cases) due to the time delay, observer operation, grid impedance, and uncertainty in the control loop.

Converter Is Connected to a Non-Ideal Grid (Non-Zero Impedance) Considering Uncertainties in the Filter Impedances
In this subsection, the robustness of the proposed controller in the presence of uncertainties in the system parameters is evaluated. It is supposed that there is 20% uncertainty in the filter inductances, i.e., their values are L 1 = 0.9 mH and L 2 = 0.48 mH, whereas the controller is designed for L 1 = 1.1 mH and L 1 = 0.6 mH. The grid inductance is also considered L s = 0.4 mH. The simulation results are presented in Figure 10. The fast and proper dynamic response of the system are concluded from the results. Similar to the previous subsections, there is a negligible interaction between the active and the reactive power control channels (slightly more than the previous cases) due to the time delay, observer operation, grid impedance, and uncertainty in the control loop.

Conclusions
This paper has presented a nonlinear control scheme for decoupling the output active and reactive current controls of a grid-connected VSC with LCL type filters and damping its resonance mode. The system is an LTI-MIMO system with two-inputs-two-outputs in the dq frame. The system has a resonance mode, and there is a solid coupling between the active and reactive current channels. The proposed controller decouples the channels and

Conclusions
This paper has presented a nonlinear control scheme for decoupling the output active and reactive current controls of a grid-connected VSC with LCL type filters and damping its resonance mode. The system is an LTI-MIMO system with two-inputs-two-outputs in the dq frame. The system has a resonance mode, and there is a solid coupling between the active and reactive current channels. The proposed controller decouples the channels and damps the resonance mode of the LCL filter effectively. Also, a simple scheme was presented to determine the PM of the current control loops. Then, using the presented PM determination method and considering the time delay in the control loop, parameters of the controller are tuned to reach the proper bandwidth and stability margin. To minimize the number of sensors, an ROL observer is employed in which only the grid current was measured directly and the other state variables of the LCL filter were estimated. The performance of the proposed controller in different perspectives was demonstrated through various simulations.
Author Contributions: M.A.G. and S.F.Z. wore the paper. M.A.G. provided the idea and simulated the hypothesis. S.F.Z. analyzed the results and helped the simulation of the main idea. S.P. and F.B. discussed the results and edited the paper. All authors have read and agreed to the published version of the manuscript.