**2. Dynamic Model**

The equivalent circuit of the GCI is given in Figure 1 in the abc frame. The system was connected to the grid with respective grid resistance and inductance values. The dynamic model could be rewritten as either stationary or in the synchronously rotating dq frame, according to the given equivalent circuit.

**Figure 1.** Equivalent circuit of the GCI in the abc frame.

The three-phase electrical variables, such as current, voltage, etc., could be indicated in several different types of reference frames [41,42]. Two orthogonal, synchronously rotating components in the dq frame are sufficient if a balanced system representation is required. However, they are insufficient in the case of an unbalanced system representation, and respective positive- and negative-sequence components must be presented.

The dynamical model could be arranged in the orthogonal frame of reference associated with positive and negative symmetrical components of the grid voltage, where positive sequence (dq)+ frames are composed of balanced voltages, while unbalanced voltage components generate negative sequence (dq)− frames, as is given in Figure 2.

**Figure 2.** Orthogonal (dq)+ and (dq)− frames of references.

The current equation in symmetrical (dq)+ and (dq)− frames can be written as

$$\mathrm{L\_g\frac{di\_g}{dt}} = \mathbf{v\_s} - \mathbf{R\_g}\mathbf{i\_g} + \mathrm{Li\_g} - \mathbf{v\_{g'}} \tag{1}$$

where

$$\mathbf{i\_g^T} = \begin{bmatrix} \mathbf{i\_{gd}^+} & \mathbf{i\_{gq}^-} & \mathbf{i\_{gd}^-} & \mathbf{i\_{gq}^-} \end{bmatrix}, \mathbf{v\_g^T} = \begin{bmatrix} \mathbf{v\_{gd}^+} & \mathbf{v\_{gq}^+} & \mathbf{v\_{gd}^-} & \mathbf{v\_{gq}^-} \end{bmatrix}, \mathbf{v\_s^T} = \begin{bmatrix} \mathbf{v\_{sd}^+} & \mathbf{v\_{sq}^+} & \mathbf{v\_{sd}^-} & \mathbf{v\_{sq}^-} \end{bmatrix},\tag{2}$$

$$\mathbf{L\_{\mathcal{G}}} = \text{diag}\left[ \begin{array}{cccccc} \mathbf{L\_{\mathcal{G}}} & \mathbf{L\_{\mathcal{G}}} & \mathbf{L\_{\mathcal{G}}} & \mathbf{L\_{\mathcal{G}}} \end{array} \right], \mathbf{R\_{\mathcal{G}}} = \text{diag}\left[ \begin{array}{cccccc} \mathbf{R\_{\mathcal{G}}} & \mathbf{R\_{\mathcal{G}}} & \mathbf{R\_{\mathcal{G}}} & \mathbf{R\_{\mathcal{G}}} \end{array} \right],\tag{3}$$

$$\mathbf{L} = \begin{bmatrix} 0 & \omega\_{\mathbf{g}} \mathbf{L}\_{\mathbf{g}} & 0 & 0 \\ \omega\_{\mathbf{g}} \mathbf{L}\_{\mathbf{g}} & 0 & 0 & 0 \\ 0 & 0 & 0 & \omega\_{\mathbf{g}} \mathbf{L}\_{\mathbf{g}} \\ 0 & 0 & \omega\_{\mathbf{g}} \mathbf{L}\_{\mathbf{g}} & 0 \end{bmatrix},\tag{4}$$

The terms ig and vg, represent the grid currents and voltages in the synchronously rotating dq frame. The term vs is the GCI output voltage. The terms Rg and Lg represent the grid resistances and inductances. All diagonal elements of the Lg and Rg matrix for the symmetrical systems are equal. The meaning of the +/− superscripts are for (dq)+ and (dq)− rotating frames, respectively. The d/q subscript refers to dq rotating frames. The term ω<sup>g</sup> is the grid electrical speed. The rotating frame is aligned with the d axis, and vq = 0. The line currents are assumed to be measured, and the GCI-output generated voltage is known. The GCI circuit can be written as is given below:

$$\frac{d\mathbf{d}\_{\mathbf{g}}}{dt} = \mathbf{L}\_{\mathbf{g}}^{-1}\mathbf{v}\_{\mathbf{s}} - \mathbf{L}\_{\mathbf{g}}^{-1}\mathbf{R}\_{\mathbf{g}}\mathbf{i}\_{\mathbf{g}} + \mathbf{L}\_{\mathbf{g}}^{-1}\mathbf{L}\mathbf{i}\_{\mathbf{g}} - \mathbf{L}\_{\mathbf{g}}^{-1}\mathbf{v}\_{\mathbf{g}\prime} \tag{5}$$

$$\varepsilon\_{\mathfrak{g}} = \mathbf{i}\_{\mathfrak{g}}^{\text{ref}} - \mathbf{i}\_{\mathfrak{g}'} \tag{6}$$

where ε<sup>g</sup> <sup>T</sup> = ε+ gd <sup>ε</sup><sup>+</sup> gq ε<sup>−</sup> gd ε<sup>−</sup> gq is the error of control performance. If Equation (5) is inserted into the derivative of Equation (6), the error dynamics can be given as

$$\frac{d\mathbf{d}\varepsilon\_{\rm g}}{d\mathbf{t}} = \frac{d\mathbf{l}\_{\rm g}^{\rm ref}}{d\mathbf{t}} - \mathbf{L}\_{\rm g}^{-1}\mathbf{v}\_{\rm s} + \mathbf{L}\_{\rm g}^{-1}\mathbf{R}\_{\rm g}\mathbf{i}\_{\rm g} - \mathbf{L}\_{\rm g}^{-1}\mathbf{L}\mathbf{i}\_{\rm g} + \mathbf{L}\_{\rm g}^{-1}\mathbf{v}\_{\rm g} \tag{7}$$

The closed-loop error equation is given as follows:

$$\frac{d\varepsilon\_{\rm g}}{dt} + \mathbf{k}\_{\rm g}\varepsilon\_{\rm g} = 0,\tag{8}$$

The term kg <sup>T</sup> <sup>=</sup> diag k+ gd <sup>k</sup><sup>+</sup> gq k<sup>−</sup> gd k<sup>−</sup> gq is a positive controller gain. The error of control performance ε<sup>g</sup> is defined by asymptotic convergence to zero. The definition of convergence speed is dependent on the value of kg coefficients. If Equation (7) is inserted into Equation (8), applied generated voltages to the GCI are written as follows:

$$\mathrm{L}\_{\mathrm{g}}^{-1}\mathrm{v}\_{\mathrm{s}} = \frac{\mathrm{d}\mathrm{i}\_{\mathrm{g}}^{\mathrm{ref}}}{\mathrm{d}\mathrm{t}} + \mathrm{L}\_{\mathrm{g}}^{-1}\mathrm{R}\_{\mathrm{g}}\mathrm{i}\_{\mathrm{g}} - \mathrm{L}\_{\mathrm{g}}^{-1}\mathrm{Li}\_{\mathrm{g}} + \mathrm{L}\_{\mathrm{g}}^{-1}\mathrm{v}\_{\mathrm{g}} + \mathrm{k}\_{\mathrm{6}}\varepsilon\_{\mathrm{6}}.\tag{9}$$

The grid inductance base value, Lg, is insensitive to disturbances. Thus, voltages applied for the GCI are written as below:

$$\mathbf{v\_s}^{\text{ref}} = \underbrace{\mathbf{L\_g}(\frac{\mathbf{d\_g^{\text{ref}}}}{\mathbf{d}\mathbf{t}} + \mathbf{L\_g}^{-1}\mathbf{R\_g}\mathbf{i\_g} - \mathbf{L\_g}^{-1}\mathbf{Li\_g} + \mathbf{L\_g}^{-1}\mathbf{v\_{g'}})}\_{\mathbf{t\_g}} + \mathbf{L\_g}\mathbf{k\_{\mathcal{G}}}\mathbf{c\_{\mathcal{G'}}}\tag{10}$$

The terms fg <sup>T</sup> = f + gd f + gq f − gd f − gq are nonlinear, and an accurate determination of grid and GCI parameters is required to define these terms; this is impractical and fg is considered as a disturbance.

Necessary and sufficient conditions for asymptotic stability of the control structure must satisfy the following conditions of the Lyapunov candidate function:

$$\mathbf{V}(0) = 0, \text{ V} > 0 \text{ and } \dot{\mathbf{V}} < 0,\tag{11}$$

The term V is the Lyapunov candidate function. The Lyapunov function and time derivative of the Lyapunov function can be selected, as given below, to prove the asymptotic stability:

$$\mathbf{V} = \frac{1}{2} \varepsilon\_{\mathbf{g}'}^2 \frac{\mathbf{dV}}{\mathbf{dt}} = \varepsilon\_{\mathbf{g}} \frac{\mathbf{d} \varepsilon\_{\mathbf{g}}}{\mathbf{dt}},\tag{12}$$

The first condition for Lyapunov stability is satisfied for V(0) = 0 The second condition for Lyapunov stability (V > 0) is valid for all real ε values. Finally, the third condition ( . V < 0) can be satisfied by inserting Equation (8) into the time derivative of the Lyapunov candidate function.

$$\frac{d\mathbf{V}}{dt} = -\varepsilon\_{\mathfrak{E}} \mathbf{k}\_{\mathfrak{E}} \varepsilon\_{\mathfrak{E}'} \tag{13}$$

It is obvious from Equation (13) that the time derivative of the Lyapunov candidate function is negative for positive, definite kg values. Thus, necessary and sufficient conditions for the asymptotic stability of the controller structure are satisfied.

#### *2.1. First-Order Low-Pass Filter Disturbance Observer*

The term fg can be estimated by modifying the voltage equations. If Equation (8) is inserted into Equation (9), determination of the grid voltage is possible to enforce the desired control performance in the current loop. The disturbance terms are considered as bounded, and are defined by . fg = 0 with unknown initial conditions [43]. System inputs and outputs (vs and ig) are considered to be known or measured.

$$\mathbf{f\_g} = \mathbf{v\_s} - \mathbf{L\_g} \frac{\mathbf{d\_g}}{\mathbf{d}t},\tag{14}$$

The first-order low-pass filter DOb is applied to Equation (14) in the s domain, as is given below:

$$\hat{\mathbf{f}}\_{\mathfrak{G}} = \mathbf{T} \left( \mathbf{v}\_{\mathfrak{s}} - \mathrm{sL}\_{\mathfrak{G}} \mathbf{i}\_{\mathfrak{G}} \right), \tag{15}$$

where T<sup>T</sup> <sup>=</sup> diag! <sup>g</sup><sup>+</sup> d s+g<sup>+</sup> d g+ q s+g<sup>+</sup> q g− d s+g− d g− q s+g− q " .

The term s is the Laplace operator. The coefficients gd and gq are the cut-off frequency gains. To simplify the implementation of the DOb, Equation (15) can be rewritten as is given below.

$$\mathbf{\hat{f}\_{\mathcal{S}}} = \mathbf{T} \left( \mathbf{v\_{s}} - \mathbf{L\_{\mathcal{S}}} \mathbf{i\_{\mathcal{S}}} \right) + \mathbf{g} \mathbf{L\_{\mathcal{S}}} \mathbf{i\_{\mathcal{S}}} \tag{16}$$

where <sup>g</sup> <sup>=</sup> diag g+ <sup>d</sup> <sup>g</sup><sup>+</sup> <sup>q</sup> g<sup>−</sup> <sup>d</sup> g<sup>−</sup> q . The block diagram of the DOb could be drawn as is given in Figure 3.

**Figure 3.** Disturbance observer (DOb) block diagram.

The final grid current error equations are given by

$$\frac{d\varepsilon\_{\rm{\rm{\rm{\varepsilon}}}}}{dt} + \mathbf{k}\_{\rm{\rm{\rm{\varepsilon}}}}\varepsilon\_{\rm{\rm{\varepsilon}}} = \mathbf{f}\_{\rm{\rm{\rm{\varepsilon}}}} - \mathbf{\hat{f}}\_{\rm{\rm{\rm{\varepsilon}}}} \tag{17}$$

It can be stated from Equation (17) that the right-hand-side tends towards zero, as is given below. The optimal selection of the low-pass filter parameter is to set [T] = diag[1] in the frequency range in which disturbance is expected. The bandwidth of the DOb should be as high as possible, so the disturbance error can converge to zero in a wide range of frequencies. The DOb compensation error will converge to zero in practical terms with a proper selection of the cut-off frequency [43]. This estimated disturbance plays a very critical role in the controller structure as a feed-forward term, and does not influence the stability of the closed-loop controller structure with the properly selected cut-off frequencies. Because of the effectiveness of the feed-forward disturbance term, the integral action is not required in the closed-loop structure. Therefore, the proportional controller with a positive definite kg value is sufficient for the controller error to converge to zero in a finite time. As a result, the proposed controller structure is more robust and simple, compared to conventional PI controllers, as it estimates and feeds forward the disturbance terms without the integral part of the controller.

#### *2.2. Instantaneous Power Equations*

The instantaneous powers associated with unbalanced current and voltage components can be written in the following form [44], with multiplication of the double-frequency oscillating components.

$$
\begin{bmatrix} \mathbf{P(t)} \\ \mathbf{Q(t)} \end{bmatrix} = \begin{bmatrix} \mathbf{P\_{\mathcal{G}0}} \\ \mathbf{Q\_{\mathcal{G}0}} \end{bmatrix} + \begin{bmatrix} \mathbf{P\_{\kappa 2}} \\ \mathbf{Q\_{\kappa 2}} \end{bmatrix} \cos(2\omega\_{\mathbf{\mathcal{S}}}\mathbf{t}) + \begin{bmatrix} \mathbf{P\_{\kappa 2}} \\ \mathbf{Q\_{\kappa 2}} \end{bmatrix} \sin(2\omega\_{\mathbf{\mathcal{S}}}\mathbf{t}),\tag{18}
$$

where

$$
\begin{bmatrix} P\_{\rm g0} \\ Q\_{\rm g0} \end{bmatrix} = 1.5 \begin{bmatrix} \mathbf{v}\_{\rm gd}^{+} & \mathbf{v}\_{\rm gq}^{+} & \mathbf{v}\_{\rm gd}^{-} & \mathbf{v}\_{\rm gd}^{-} \\ \mathbf{v}\_{\rm gq}^{+} & -\mathbf{v}\_{\rm gd}^{+} & \mathbf{v}\_{\rm gq}^{-} & -\mathbf{v}\_{\rm gd}^{-} \end{bmatrix} \begin{bmatrix} \mathbf{i}\_{\rm gd}^{+} \\ \mathbf{i}\_{\rm gq}^{+} \\ \mathbf{i}\_{\rm gd}^{-} \\ \mathbf{i}\_{\rm gq}^{-} \end{bmatrix}, \tag{19}
$$

$$
\begin{bmatrix} P\_{\rm sc2} \\ Q\_{\rm sc2} \end{bmatrix} = 1.5 \begin{bmatrix} \mathbf{v}\_{\rm gd}^{-} & \mathbf{v}\_{\rm gq}^{-} & \mathbf{v}\_{\rm gd}^{+} & \mathbf{v}\_{\rm gq}^{+} \\ \mathbf{v}\_{\rm gq}^{-} & -\mathbf{v}\_{\rm gd}^{-} & \mathbf{v}\_{\rm gq}^{+} & -\mathbf{v}\_{\rm gd}^{+} \end{bmatrix} \begin{bmatrix} \mathbf{i}\_{\rm gd}^{+} \\ \mathbf{i}\_{\rm gq}^{+} \\ \mathbf{i}\_{\rm gd}^{-} \\ \mathbf{i}\_{\rm gd}^{-} \end{bmatrix}, \tag{20}
$$

$$
\begin{bmatrix} P\_{\rm ss2} \\ Q\_{\rm ss2} \end{bmatrix} = 1.5 \begin{bmatrix} \mathbf{v}\_{\rm gq}^{-} & -\mathbf{v}\_{\rm gd}^{-} & -\mathbf{v}\_{\rm gq}^{+} & \mathbf{v}\_{\rm gd}^{+} \\ -\mathbf{v}\_{\rm gd}^{-} & -\mathbf{v}\_{\rm gq}^{-} & \mathbf{v}\_{\rm gd}^{+} & \mathbf{v}\_{\rm gq}^{+} \end{bmatrix} \begin{bmatrix} \mathbf{i}\_{\rm gd}^{+} \\ \mathbf{i}\_{\rm gq}^{+} \\ \mathbf{i}\_{\rm gd}^{-} \\ \mathbf{i}\_{\rm gq}^{-} \end{bmatrix} \tag{21}
$$

The terms, Pg0 and Qg0 are fundamental instantaneous P and Q components, which consist of positive- and negative-sequence power equations, while the terms Psc2-Pss2 and Qsc2-Qss2 are four pulsating terms, which are the result of asymmetrical network conditions. The maximum four variables ( i + gd i + gq i − gd i − gq ) could be controlled to achieve the Pg0 and Qg0 requirements and compensate for the Psc2-Pss2 and Qsc2-Qss2 oscillating components. Thus, P and Q oscillations cannot be compensated for simultaneously in positive- and negative-sequence dq frames [44]. It is necessary to calculate an appropriate set of current references to ensure a constant value of P is absorbed or injected by the GCI under balanced and unbalanced voltage conditions. These Pg0 and Qg0 requirements and the Psc2-Pss2 oscillation compensation can be addressed by using the following expression:

$$
\begin{bmatrix} P\_{\rm g0} \\ Q\_{\rm g0} \\ P\_{\rm sc2} \\ P\_{\rm sc2} \end{bmatrix} = 1.5 \begin{bmatrix} \mathbf{v}\_{\rm gd}^{+} & \mathbf{v}\_{\rm gq}^{+} & \mathbf{v}\_{\rm gd}^{-} & \mathbf{v}\_{\rm gq}^{-} \\ \mathbf{v}\_{\rm gq}^{+} & -\mathbf{v}\_{\rm gd}^{+} & \mathbf{v}\_{\rm gq}^{-} & -\mathbf{v}\_{\rm gd}^{-} \\ -\mathbf{v}\_{\rm gd}^{-} & \mathbf{v}\_{\rm gq}^{-} & \mathbf{v}\_{\rm gd}^{+} & \mathbf{v}\_{\rm gq}^{+} \\ \mathbf{v}\_{\rm gq}^{-} & -\mathbf{v}\_{\rm gd}^{-} & -\mathbf{v}\_{\rm gd}^{+} & \mathbf{v}\_{\rm gd}^{+} \end{bmatrix} \begin{bmatrix} \mathbf{i}\_{\rm gd}^{+} \\ \mathbf{i}\_{\rm gq}^{+} \\ \mathbf{i}\_{\rm gd}^{-} \\ \mathbf{i}\_{\rm gq}^{-} \end{bmatrix} \tag{22}
$$

Equation (22) defines how positive-sequence grid current controllers achieve P and Q requirements, while negative-sequence current controllers can compensate for the P oscillations depending on the negative-sequence current injection strategy.

The proposed scheme is depicted in Figure 4. If zero i − gd and i − gd references are chosen, injected currents towards the grid are sinusoidal; this supports power quality requirements. If a zero Psc2-Pss2 reference selection is selected, double-frequency oscillating power components can be compensated for by injecting negative-sequence currents towards the grid. The proportional current controllers are sufficient to track the desired current requirements with accurately estimated disturbance terms. The block diagram in Figure 3 is used to estimate disturbance terms. An online Second Order Generalized Integrator (SOGI)-based symmetrical component estimation is achieved with the method given in [33]. PLL structures separately calculate the symmetrical voltage phase and angle. It is assumed that symmetrical component decomposition of the voltage and currents is perfectly estimated, and an accurate PLL voltage phase and angle estimation is achieved.

**Figure 4.** Proposed controller structure.

#### **3. Simulation Results**

Figure 5 depicts the simulation circuit implemented in MATLAB/Simulink using the SimPowerSystem tool. The GCI was connected to a transmission system, and all necessary parameters for the simulation are given in Table 1. Four different simulations were implemented to validate the proposed controller structure. The first simulation demonstrated the deteriorated current and power waveforms under unbalanced voltage conditions with the positive-sequence controller, without enabling the negative-sequence controller (Simulation A). The dual-current controller with the enabled negative-sequence current controller enforced negative-sequence currents to zero in the second simulation (Simulation B). The third simulation enforced double-frequency Psc2-Pss2 power oscillations to zero. In addition, the dynamic performance of positive-sequence controllers was demonstrated by applying appropriate dq current steps (Simulation C). Finally, the fourth simulation compared the performance of conventional PI controllers to DOb-based current controllers (Simulation D).



The DC voltage was kept constant at 750 V to reduce the harmonic stress in the currents, which meant RESs were connected to the DC bus, and could inject required power to the grid at any instant of the simulation. Reference of i + gd was kept at 75 A, meaning that the injection of currents were applied towards the grid. Reference of i + gq was kept at 0 A to ensure a zero reactive power injection. The applied steps at different instants of Simulation A and B were given as follows:

0.20–0.27 s: 30% unbalanced voltage condition was generated on phase-A in the grid. 0.30–0.35 s: i<sup>+</sup> gd reference step was applied from 75 to 150 A. 0.38–0.43 s: i<sup>+</sup> gq reference step was applied from 0 to 50 A.

**Figure 5.** Simulation circuit.

Figure 6 shows the first simulation results (Simulation A) with the disabled negative-sequence controller. A 30% unbalanced voltage on phase-A between 0.20 and 0.27 s was applied, which is shown in Figure 6a. Sinusoidal grid currents (Figure 6b) show that the sinusoidal shape deteriorated without the negative-sequence current controller. Figure 6c shows the respective dq axis current references that changed Pg and Qg properly. Respective i + gd and i + gq step-response tests are shown in Figure 6d. The performance criteria was satisfied with the DOb-based current controllers without any steady-state error or overshoot. Double-grid frequency power oscillations exist under unbalanced voltages, and could be dissipated by injecting negative-sequence currents. Figure 7 shows the uncontrolled i − gd and i<sup>−</sup> gq currents and the resultant oscillation Pss2 and Psc2 components that were the root cause of double-frequency oscillations.

**Figure 6.** Simulation A results without dual positive- and negative-sequence controllers: (**a**) grid voltage (V) (red: phase-A, blue: phase-B, green: phase-C); (**b**) grid currents (A) (red: phase-A, blue: phase-B, green: phase-C); (**c**) Pg (kW) and Qg (kVAr); and (**d**) positive-sequence dq axis currents (A).

**Figure 7.** Simulation A results without dual positive- and negative-sequence controllers: (**a**) Pss2 (kW) and Psc2 (V) components, and (**b**) i<sup>−</sup> gd (A) and i<sup>−</sup> gq (A).

Similarly, Figure 8 shows the second simulation results (Simulation B) with dual positive- and negative-sequence current controller results. The negative-sequence controller was only enabled when an unbalanced voltage existed in the grid because it was observed in simulations that enabling the negative-sequence controller in balanced voltage conditions unnecessarily deteriorated the dynamic performance of the overall system [45]. Thus, a simple logic condition was added in the simulation to enable or disable the negative-sequence controller, depending on the negative-sequence voltage level. Figure 8b shows the balanced grid current sets with a zero negative-sequence grid current injection. Figure 8c shows that double-frequency P oscillations still existed due to the Pss2 and Psc2 components.

**Figure 8.** Simulation B results with dual positive- and negative-sequence controllers: (**a**) grid voltage (V) (red: phase-A, blue: phase-B, green: phase-C); (**b**) grid currents (A) (red: phase-A, blue: phase-B, green: phase-C); and (**c**) Pg (kW) and Qg (kVAr).

Figure 9a shows the positive-sequence currents, where the performance of the current trajectory was satisfied. Figure 9b shows fgd and the estimated ˆ f + gd. The term f + gd was calculated with dynamic equations and compared with ˆ f + gd. The mean value of <sup>ˆ</sup> f + gd was equal to f + gd, which proved that the term ˆ f + gd was accurately estimated. Similarly, Figure 9c shows both the parameters f + gq and the estimated <sup>ˆ</sup> f + gq, pointing out that the term ˆ f + gq was accurately estimated.

**Figure 9.** Simulation B results with dual positive- and and negative-sequence controllers: (**a**) positive-sequence dq axis currents (A), (**b**) f<sup>+</sup> gd and <sup>ˆ</sup> f + gd (V), and (**c**) f<sup>+</sup> gq and <sup>ˆ</sup> f + gq (V).

Negative-sequence current components were enforced to zero at the instant of unbalanced voltage conditions, and deteriorated grid current waveforms were dissipated, as shown in Figure 8b. Double-frequency power oscillations could not be removed without an appropriate injection of negative-sequence currents. Figure 10a shows that the negative-sequence currents could be controlled at zero references. Figure 10b,c shows the negative sequence of the parameters f − gd − f − gq and the estimated ˆ f − gd <sup>−</sup> <sup>ˆ</sup> f − gq. The mean values of the estimated components were equal to the calculated terms, which proved that the estimated terms were accurately estimated.

**Figure 10.** Simulation B results with dual positive- and negative-sequence controllers: (**a**) negative sequence dq axis currents (A), (**b**) f− gd and <sup>ˆ</sup> f − gd (V), and (**c**) f<sup>−</sup> gq and <sup>ˆ</sup> f − gq (V).

Figures 11–13 show the third simulation results for dissipating the Psc2-Pss2 power oscillations (Simulation C). External PI controllers with a reference of Psc2 − Pss2 = 0 were enabled, as shown in Figure 4. A 30% unbalanced voltage was generated between 0.2 and 0.27 s (Figure 11a). Similar to for Simulation B, the negative-sequence controller was enabled at predefined unbalanced voltage levels. The reference value of i + gd was kept at 75 A, and i + gq was kept at zero. Figure 11c shows that double-frequency P oscillations were dissipated under the unbalanced voltage operation, and that P and Q could be independently controlled under balanced conditions.

**Figure 11.** Simulation C results with external Pss2-Psc2 controllers: (**a**) grid voltage (V) (red: phase-A, blue: phase-B, green: phase-C); (**b**) grid currents (A) (red: phase-A, blue: phase-B, green: phase-C); and (**c**) Pg (kW) and Qg (kVAr).

**Figure 12.** Simulation C results with external Pss2-Psc2 controllers: (**a**) grid voltage (V); (**b**) grid currents (A); and (**c**) positive-sequence dq axis currents (A).

**Figure 13.** Simulation C results with external Pss2-Psc2 controllers: (**a**) P (kW) and Q (kVAr), (**b**) grid currents (A).

Figure 12 shows that positive-sequence currents could follow their respective references at the instant of the unbalanced voltage generation. Figure 12b,c shows that the calculated fg and estimated ˆ f + <sup>g</sup> terms were equal, which meant that <sup>ˆ</sup> f + gd and <sup>ˆ</sup> f + gq were accurately estimated.

The oscillating components Psc2-Pss2 were enforced to zero with external PI controllers. PI controller gains could easily be determined with trial and error methods (Kp = 1.1 and KI = 5.2). It can be noted from Equation (22) that oscillating Psc2 and Pss2 components could be compensated for by internal i − gd and i − gq controllers, respectively. Double-frequency oscillations were removed on P by enforcing the Psc2-Pss2 components to zero, as can be seen in Figure 13a, and Figure 13b shows the resultant injected i− gd and i<sup>−</sup> gq components.

Finally, the proposed DOb-based current controller was compared with the conventional PI controller. The performance comparison seemed to be equivalent under a balanced operation, depending on the controller's proportional and integral gains. In addition, it is difficult to comment whether either the conventional PI or proposed DOb-based current controller was better in performance under balanced voltage conditions. However, the DOb-based current controller showed a better dynamic performance, and did not cause any steady-state error in positive-sequence currents under unbalanced voltage conditions; this is shown in previous plots (Figures 11 and 12). The conventional PI controller resulted in steady-state current and power errors under unbalanced voltage conditions. This problem is also stated in [45], in that symmetrical decomposition methods degrade dynamic performance and may cause steady-state errors in PI controllers. It was shown in Simulation D that the aforementioned problem exists in constructed simulation platforms with kp = 20 and kı = 5 values. The dynamic performance seemed equivalent under a balanced operation; steady-state error plots under an unbalanced voltage operation are demonstrated in Figure 14. Figure 14a,b shows that the i + gd and i + gq components could not follow the respective trajectories under an unbalanced operation, and if a longer unbalanced voltage operation was applied, the steady-state error would have slowly increased

to unacceptable values. A similar behavior also existed in the P component, as shown in Figure 14c.

**Figure 14.** Simulation D results with the conventional PI controller: (**a**) i + gd (A), (**b**) i + gq (A), and (**c**) P (kW).

#### **4. Conclusions**

The objective of this paper was to investigate a novel current controller that was based on a low-pass filter DOb, to provide a precise control of currents under unbalanced grid voltage conditions for a grid-tied inverter. The GCI was modeled in the symmetrical synchronous reference frames, and estimated disturbance parameters were fed to current controllers. P and Q were defined by using the instantaneous power theory, and double-frequency Pss2 and Psc2 pulsations were removed under a full propagation cycle. PI and proposed DOb-based proportional current controllers were compared, and it was demonstrated that conventional PI controllers may cause steady-state errors under an asymmetrical grid voltage operation. Numerical simulation results also proved that the methods applied were able to compensate for the double-frequency power oscillations for the grid-tied inverter application, which means that the objective was achieved. The proposed current controller seems to be a valid alternative solution for GCIs under unbalanced conditions. Hopefully, the results presented will form a basis for diagnosis methods regarding the control techniques of GCIs under unbalanced network conditions. Due to the fact that the study was limited to the simulation results, instead the effect of real components, more research is certainly needed.

**Author Contributions:** Emre Ozsoy and Sanjeevikumar Padmanaban developed the proposed control strategy for the grid-connected system under distorted conditions. Emre Ozsoy, Sanjeevikumar Padmanaban, Lucian Mihet-Popa, Fiaz Ahmad, Rasool Akhtar and Asif Sabanovic were involved in further development of the study and in the implementation strategy. Sanjeevikumar Padmanaban, Lucian Mihet-Popa, Viliam Fedák and Asif Sabanovic contributed expertise in the grid-connected system for the verification of theoretical concepts and validation of obtained results. All authors contributed to and were involved in framing the final version of the full research article in its current form.

**Conflicts of Interest:** The authors declare no conflict of interest.

#### **References**


© 2017 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
