**1. Introduction**

Extinction and environmental concerns regarding the use of fossil fuels for power generation have shifted the attention of scientists towards Renewable Energy (RE). Among all RE resources, wind power generation has recorded significant growth in the last decade. With energy saving ambitions, by 2030 wind power will be able to supply 29.1% of the electricity needed worldwide and 34.5% by 2050 [1,2]. Energy quality is a significant feature in grid-connected converters, and wind power generators have a high influence on the stability and security of the power grid. To meet the required results, WT systems

must be continuously developed and their performance improved. In recent years, DFIG based WT have become a well-known and widely installed due to their high efficiency, variable speed operation (±33% around the synchronous speed), four quadrant active and reactive power capability, less power losses, small converter rating (around 30% of generator rating), reduced mechanical stress and hence minimized pulsating power and torque [3–6].

Since the DFIG stator and the grid are connected directly, during unbalanced grid voltage conditions a negative sequence is added to stator flux, resulting in a flow of large negative sequential currents in the rotor and stator causing second-order harmonic fluctuating power and electromagnetic torque [7,8]. From both the Rotor Side Converter (RSC) and Grid Side Converter (GSC), active power fluctuations flow through DC-linked capacitors as shown in Figure 1. resulting in voltage ripples in the DC-link capacitor as well as significant second-order harmonic currents in the DC-capacitor [9], which affect the DC-capacitor causing high power losses and increased operational temperature which may evaporate the electrolyte faster making their lifespan shorter. In addition, fluctuations in torque can cause wear and tear of mechanical parts such as the shaft and gear box [10]. Further, a comparison of the high and low frequency ripple currents shows that ripple currents with low frequency are more detrimental [11,12]. Hence, voltage ripples and converter DC-linked capacitor with large low frequency currents under unbalanced conditions are the most serious issues of DFIG [8,9]. Under the unbalanced condition the DC-voltage control in GSC differs slightly from the GSC for the DFIG, because the DC-voltage ripples are not only caused by the unbalanced grid voltage, but also by RSC fluctuating active power. These two disturbances i.e., active power fluctuation of RSC and unbalanced grid voltage, should be rejected by GSC to ensure a constant DC-voltage.

**Figure 1.** Active power flow in a DFIG wind turbine.

Numerous control strategies have been presented to decrease the voltage ripple for GSC controllers under unbalanced voltage conditions. To regulate negative sequence current and positive currents at the same time dual current control methods were designed [9,13–15]. Grid voltage and the desired power ensure the calculation of negative and positive reference currents. By setting of the references multiple control targets are available, like constant DC voltage, constant electromagnetic power, constant stator power and balanced stator currents [14,15]. The GSC fluctuating active power output must be equal to that of RSC under unbalanced conditions. Then the GSC reference current depends on the RSC fluctuating active power [9,14]. Consequently, implementation of dual current control method is not applicable in modular structural wind power converters. Another method to reduce voltage ripples during unbalance grid voltage conditions is feed-forward control which comprising RSC DC-current feed-forward control [16–19] and grid voltage feedforward control [20,21]. Feed-forward control for RSC DC-current reduces the impact of fluctuating RSC active power while feed-forward control for grid voltage reduces the impact on DC-capacitor due to unbalanced grid voltages. The feed-forward technique control performance may be degraded by the control delay, which results in an addition of high-frequency noise to the feed-forward term. Moreover, additional hardware of the load current detection may require detecting the DC current of the RSC [17,18]. An alternate approach is used to ge<sup>t</sup> rid of additional detection circuits, whereby the RSC real-time active power is calculated by GSC based on rotor voltage reference and rotor current [16,19] which require integration of both the RSC controller and GSC controller into a single controller. This integration results in loss of the modular structure of DFIG converters. For high maintenance and reliability, DFIG converter exhibits modularity which is not achieved in this technique Automatic generation control employed with inertia support for load frequency control was analyzed in an interconnected multigeneration wind power system [22]. For mitigation of subsynchronous resonance, a non-linear damping controller was designed using a partial feed-back linearization technique in series compensated DFIG-based wind farms [23]. To mitigate subsynchronous resonance (SSR) oscillations, doubly fed induction generator (DFIG) supplemental control is used [24], in which a supplemental signal is introduced into the control loop of the DFIG voltage source converter. Furthermore, two-degree-of -freedom along with a damping control loop is used [25] to mitigate SSR which is caused by induction generator effects and thus enhance the system stability. In [26] two SSR oscillation mitigating strategies were compared, which generate supplementary damping control signal; integrated on the rotor side converter and grid side converter. A hybrid scheme for enhancing fault ride through capability of DFIG under symmetric and asymmetric faults was presented [27], comprising an energy storage system, break chopper and switch type fault current limiter.

The main contributions of this paper may be summarized as follows:


The remaining paper is organized as follows: in Section 2, detailed modeling of DFIG is discussed. The proposed WTs model is explained in Section 3. The proposed API and PR+RHC controllers are designed in Section 4. Results and discussion are presented in Section 5. The paper is concluded in Section 6.

#### **2. Modeling of DFIG**

The configuration of a DFIG-based wind turbine is illustrated in Figure 1. The stator and grid voltage are directly linked to each other while the rotor and back-to-back converter are interfaced, comprising a GSC common DC-link and a RSC [28]. The generator output power is controlled by the RSC while GSC ensures the stability of the DC-link voltage irrespective of the direction and magnitude of the rotor power [29]. At the wind turbine the terminal grid active power *PO* is equal to the sum of the stator active power *Ps* and the grid active power *Pg*. The current and power reference directions

are shown in Figure 1. The equivalent circuit of DFIG is shown in a *dq*-synchronous reference frame in Figure 2.

**Figure 2.** Equivalent circuit of the DFIG in the *dq*-synchronous reference frame.

The DFIG mathematical model is analyzed in the *dq* reference frame and is defined by Equations (1) to (6) [30,31]:

$$\begin{aligned} \upsilon\_{sd} &= r\_s i\_{sd} + \frac{d\psi\_{sd}}{dt} - \omega\_c \psi\_{sq} \\ \upsilon\_{sq} &= r\_s i\_{sq} + \frac{d\psi\_{sq}}{dt} + \omega\_c \psi\_{sd} \end{aligned} \tag{1}$$

$$\begin{cases} \upsilon\_{rd}' = r\_r' i\_{rd}' + \frac{d\psi\_{nl}'}{dt} - \omega\_{sl}\psi\_{rq}'\\ \upsilon\_{rq}' = r\_r' i\_{rq}' + \frac{d\psi\_{rq}'}{dt} - \omega\_{sl}\psi\_{rd}' \end{cases} \tag{2}$$

$$
\omega\_{\rm sl} = \omega\_{\rm c} - \omega\_{\rm r}'\tag{3}
$$

$$\begin{aligned} \psi\_{sd} &= L\_s i\_{sd} + L\_m i'\_{rd} \\ \psi\_{sq} &= L\_s i\_{sq} + L\_m i'\_{rq} \end{aligned} \qquad \tag{4}$$

$$\begin{aligned} \psi\_{rd}' &= L\_r' \dot{i}\_{rd}' + L\_m \dot{i}\_{sd} \\ \psi\_{rq}' &= L\_r' \dot{i}\_{rq}' + L\_m \dot{i}\_{sq} \end{aligned} \tag{5}$$

$$\begin{cases} L\_s = L\_{sl} + L\_m \\ L'\_r = L'\_{rl} + L\_m \end{cases} \tag{6}$$

where *Vsd*, *Vsq* and *<sup>V</sup>rd*, *Vrq* are the stator and rotor voltages in the *dq* reference frame, *rs* and *rr* are the stator and rotor per phase electrical resistances, *isd*, *isq* and *<sup>i</sup>rd*, *irq* are stator and rotor currents in the *d*-*q* reference frame, *ψsd*, *ψsq* and *ψrd*, *ψrq* are stator and rotor fluxes in the *dq* reference frame, *Ls*, *Lr* and *Lm* are stator, rotor and magnetizing per phase inductances, *Lsl* and *Lrl* are stator and rotor leakage inductance, *ωe* and *ωr* are the synchronous and rotor speeds.

The magnetic flux in the stator in *d* and *q* axis is determined by Equation (7) and it is assumed that all magnetic fluxes are aligned with the *d* axis:

$$\begin{aligned} \psi\_{sq} &= 0 \quad \text{and} \quad \frac{d\psi\_{sq}}{dt} = 0\\ \psi\_s &= \psi\_{sd} = L\_m i\_{ms} \text{ and } \frac{d\psi\_{sq}}{dt} = 0 \end{aligned} \tag{7}$$

The DFIG stator active and reactive power are computed for rotor side after simplification as:

$$P\_s = -\frac{3}{2} \frac{L\_m}{L\_s} v\_s i\_{rq}'\tag{8}$$

$$Q\_s = \frac{3}{2} \frac{L\_m}{L\_s} v\_s \left(\frac{v\_s}{\left(\omega\_c L\right)\_m} - \dot{i}\_{rd}'\right) \tag{9}$$

From Equations (8) and (9), one observes that the active and reactive powers can be controlled by the quadrature components of rotor current, considering the constant voltage. The converter controls the active and reactive powers of the DFIG stator, where 1 − *<sup>L</sup>*2*m*/*LsLr* and *ims* is the magnetizing current.

The GSC block diagram uses current loops to *id* and *iq*, having *i*∗*d* as reference from the DC-link. Since *i*∗*q* = 0, the converter operates at a unity power factor. The reference signal generator produces the current reference (*i*<sup>∗</sup>*d*, *i*∗*q* ), from Equations (10) and (11):

$$P\_{ref} = \frac{3}{2} [v\_d i\_d^\*] \tag{10}$$

$$Q\_{ref} = \frac{3}{2} \left[ v\_q i\_d^\* \right] \tag{11}$$

## **3. Proposed Model**

An overview of the control structure of a wind turbine system (WTS) [4,32,33] is shown in Figure 3. For maximum power extraction, the generator is controlled by a power converter, thereafter electrical parameters are generated based on generator and control algorithm while the generator torque *ωm* is obtained from the turbine model [30].

**Figure 3.** Control schematics for a DFIG wind turbine.

The electric and control models are classified into grid side and generator side as shown in Figure 3. The generator side control deals with two parameters, generator current and the duty cycle. DC-linked voltage alone with these two parameters is used to model generator side converters using the following Equations (12) and (13):

$$V\_{\mathfrak{s}\_{dq}} = D\_{d\eta} \times V\_{\mathrm{DC}} \tag{12}$$

$$I\_{dc} = D\_d \times I\_{s\_d} \times D\_q \times I\_{s\_q} \tag{13}$$

where *D* is the duty ratio, *VDC* is the DC-link voltage, *IDC* is the current flow into DC link, *Is* is the stator current *Vs* is the stator voltage.

Based on the vector control of generator the control algorithm implemented here is for maximum power extraction. The control structure works in the following sequence: first in the reference current generation phase, the rotor's rotational speed is measured which is used to generate the reference torque from the maximum power/torque curve based on the turbine design and characteristic. Using this reference torque, a reference current signal is generated for the generator-side converter in the *dq* frame. In the current control loop phase, an error signal is generated by comparing the generated reference current and the measured current in the *dq* reference frame, which then generate a voltage reference for the converter by feeding through Proportional Integral (PI) controllers. In the modulation phase, the resulting reference voltages should be converted into a duty ratio for the generator side converter, and finally this will result in a PWM switching signal for the converter as shown in Figure 4.

**Figure 4.** Modulation of generator-side converter in proposed model.

The converter model on the grid-side is elaborated by three differential Equations (14)–(16), which use the voltage of the grid and the resistance and inductance of the grid-side filter as input:

$$L\_f \frac{di\_{\mathbb{S}d}}{dt} + R\_f i\_{\mathbb{S}d} = \omega L\_f i\_{\mathbb{S}q} + V\_{conv\_d} - V\_{grid\_d} \tag{14}$$

$$L\_f \frac{di\_{\mathbb{g}q}}{dt} + R\_f i\_{\mathbb{g}q} = -\omega L\_f i\_{\mathbb{g}d} + V\_{conv\_q} - V\_{grid\_q} \tag{15}$$

$$\mathcal{L}\_{\rm DC} \frac{dV\_{\rm DC}}{dt} = i\_{\rm DC} - k \left( i\_{\mathcal{S}d} D\_d + i\_{\mathcal{S}q} D\_q \right) \tag{16}$$

where the *k* value is dependent on the transformation technique used to convert *abc* values to *dq* values. The *k* value must be 1 is when using a normalized Clarke transformation and in case of a non-normalized transformation *k* = 3/2. Further, *VDC* is the DC-link voltage, *ig* is the grid current, *Rf* is the filter resister, *D* is the duty cycle, *CDC* is the DC-linked capacitor, *Lf* is inductance of filter and *Vgrid* is the voltage of grid.

In the *dq* reference frame the grid-side converter is controlled with the grid voltage. The reactive power which is transferred to the grid is controlled by *igq* . Similarly, by maintaining the DC-linked voltage real power transferred to the grid is regulated by *igd* current. Both the generator-side as well as the grid-side controller have the same limiting algorithms and modulation techniques.

## **4. Controller Design**

## *4.1. API Controller*

Control of traditional processes always depends on creating a mathematical model of the required system. An expert system was established to mimic the behavior of a skilled human operator for those processes too complex to be mathematically modeled in real time. Fuzzy logic controller (FLC) engines use as expert system paradigm for automatic process control. In addition, intuition and heuristics knowledge are also included into the system. This feature ranked FLC high in application where the existing models are ill defined, complex and not adequately reliable. FLC can mainly be classified into four main parts: fuzzifier, rules, inference engine and de-fuzzifier [34] as illustrated in Figure 5:

**Figure 5.** Fuzzy controller architecture.

#### *4.2. Fuzzy PI Controller*

The PI controller comprising constant integral and proportional gain *ki* and *kp*, respectively. Control scheme performance is enhanced by adaption of gain with respect to error. This distinguish feature of adaption can be achieved by applying fuzzy rules as illustrated in Table 1:


**Table1.**Fuzzyrules.

Gaussian Member function (GMF) is applied here in the rules that needs two parameters i.e., center *ci* and *σi* standard variance or deviation as:

$$\mu(\mathbf{x}) = \exp\left(-\frac{1}{2}\left(\frac{\mathbf{x}\_{i-c\_i}}{\sigma\_i}\right)^2\right) \tag{17}$$

Mathematical description of PI controller is illustrated as:

$$
\upsilon\_{\rm dc}^\*/\dot{\imath}\_{\rm sd}^\*/\dot{\imath}\_{\rm sq}^\*(PI) = k\_{\rm p}c(t) + k\_{\rm i} \int e(t)dt\tag{18}
$$

where *<sup>v</sup>*<sup>∗</sup>*dc*/*i*<sup>∗</sup>*sd*/*i*<sup>∗</sup>*sq* is output of the controller, *ki* and *kp* is integral and proportional gain respectively and *e*(*t*) is input of controller, furthermore PI controller gains are constant in the preceding equation that requires adaptation with respect to electrical fault perturbation, parameter uncertainties, load variation and load disturbances.

$$
\sigma\_{\rm dc}^\* / i\_{\rm sd}^\* / i\_{\rm sq}^\* (\text{Flux} y) = F\_1 k\_1 e(t) + F\_2 k\_2 \int e(t) dt\tag{19}
$$

where *kp* and *ki* results in fuzzy controller's output *F*1 and *F*2 respectively, and *k*1 and *k*2 are learning rates constant for *kp* and *ki* respectively as mentioned in Figure 6.

**Figure 6.** Adaptive PI controller.

A comparison of FLC-based adaptive PI control with PI conventionally tuned control as benchmark is provided in [35]. The gain for integral and proportional constant are calculated for the operating conditions by linearizing the system for numerous control loops.

#### *4.3. Proportional Resonant Controller with Hormonic Compensator (PR+HC)*

A PR controller has distinguished integration features. Due to the action of integration of frequencies near and around the resonance frequency; phase shift and static error do not occur in a PR controller. Although high order filters are used to obtain optimized current waves at the grid side during unbalanced grid conditions, in practical applications the current wave is not exactly the normal one, but has time varying elements of grid voltage with small deviations which result in poor THD of the feed-in current, but it is demanded in most grid standards [36,37] that the grid connected devices should be operated within certain frequencies range. To meet grid standards by improving the current quality a harmonic compensator is employed along with the PR controller as shown in Figure 7.

**Figure 7.** Combined structure of PR with harmonic compensator.

The PR controller consists of two parts i.e., proportional and resonant part, expressed by Equation (20) below:

$$G\_{PR}(s) = K\_p + K\_i \left(\frac{S}{S^2 + \omega^2}\right) \tag{20}$$

Here, *ω* is a resonant frequency. Due to the high gain at narrow band at the resonant frequency, PR can eliminate steady-state error. *Ki* is the time constant integral which is related to band width, and

*Kp* is proportional gain determines the phase of band width and gain of margin [38]. The harmonic compensator is parallelized with the PR controller for the sake of quality of grid current [39]. Harmonic compensators can be mathematically expressed as:

$$G\_{\rm HC}(\mathbf{s}) = \sum\_{\rm h=3,5,7,\dots} G\_{\rm HC}^{\rm h}(\mathbf{s}) \tag{21}$$

Here, *<sup>G</sup>hHC*(*s*) is resonant controller with *hth* order, where "*h*" is harmonic order. However, particularly

$$G\_{\rm HC}^{\rm h}(s) = \frac{k\_i^{\rm h} \, s}{s^2 + (h\omega)^2} \tag{22}$$

where, *khi*is the gain of particular order resonant controller.

#### **5. Results and Discussion**

To verify the proposed control strategies, a MATLAB/Simulink-based simulation have been carried out. The nominal parameters of the 2 MW system are listed in Table A1 (Appendix A). Control strategies (PI, API and PR+RHC) were simulated and compared under different conditions, i.e., rated, single-phase fault, two-phase fault, under-voltage, and over-voltage fault. The faults are applied for 200 ms which occurs from 1 s and cleared at 1.2 s, whereas the grid-side voltage was dropped and raised to 50% of its normal values in the under- and over-voltage cases, respectively. The performance of PI controller and proposed PR control strategy is evaluated by considering the following parameters: DC-linked voltage *Vdc*, stator voltage *Vs*, active current component *Id*, reactive current component *Iq*, grid current Ig, rotor current *Ir*, rotor real power *Pr*, rotor voltage *Vr*, electro-magnetic torque *Tem*, stator real power *Ps*, stator reactive power *Ps*\_*react*. Finally, THD and control performance measures are calculated to examine the controller's performance.

## *5.1. Rated Voltage*

Conventional (PI) and Proposed (API & PR+RHC) control strategies are analyzed considering rated voltages. Figure 8a illustrates the DC-linked voltage responses of all control strategies; the PR+RHC and API controller responses are robust, faster and stabilize quickly, whereas the PI controller takes 1.3 s to attains stability. The API controller updates its parameters adoptively to minimize errors abruptly. The PR+RHC, due to the harmonic compensation, effectively tracks the reference, compared to PI. Figure 8b shows the rated stator voltage waveform for all control schemes. Figure 8c–e shows *Id* for PI, API and PR+RHC control schemes, where both the designed controllers currents are efficiently tracking the reference currents. They have stable, robust, and chatter-free responses. The API and PR+RHC strategy responses for the rotor current are stable and less oscillatory with respect to the PI response as presented in Figure 8f. *Iq* is depicted in Figure 8g and the *Ig* response is illustrated for all controllers in Figure 8h. The API and PR+RHC response is faster and globally convergent. In case of *Ps* and *Pr* the API and (PR+RHC) controller responses are stable and robust, which reduces the acoustic noise, reduces stress on both drive trains and mechanical components which is a desired requirement as shown in Figure 8i,j. The *Tem* response is observed in Figure 8k, which shows minimum oscillation or almost stable responses for the API and PR+RHC control schemes, something that could be harmful from a mechanical view point. Figure 8l describes the *Ps*\_*react* response which is quite stable and ripple less, which is desired in proposed control strategies. The rotor voltage response shows that API and PR+RHC strategies' responses are stable and less oscillatory with respect to the PI response as shown in Figure 8m. The performance indices of all the control schemes are evaluated in Tables 2–4 for *Vdc*, *Id*, *Iq*, respectively. Three control measuring parameters, i.e., Integral Absolute Error (IAE), Integral Square Error (ISE) and Integral Time-weighted Absolute Error (ITAE) are calculated for all controllers which precisely compare their performances. The performance of a controller is based on its minimum value, where the smaller the value of parameters, the better the controller performance. In all three

parameters API and PR+RHC controllers' values are the minimum compared with the PI controller, which proves the robust performance of the proposed controllers. Finally, the control schemes (PI, API & PR+RHC) are further investigated using FFT analysis of the grid current, which shows that the proposed API and PR+RHC strategies' grid currents are more robust and less harmonic with THD 0.02% and 0.06% respectively, as compared to 0.07% THD of the PI controller as shown in Figure 8n–p.

**Figure 8.** *Cont.*

**Figure 8.** Comparison of PI and Proposed API and PR+RHC controllers responses under rated voltage, considering: (**a**) Dc-link voltage *Vdc*; (**b**) Stator voltage *Vs*; (**<sup>c</sup>**–**<sup>e</sup>**) Active component of current *Id*; (**f**) Rotor current *Ir*; (**g**) Reactive component *Iq*; (**h**) Grid current *Ig*; (**i**) Stator active power *Ps*; (**j**) Rotor active power *Pr*; (**k**) Electromagnetic torque *Tem*; (**l**) Stator reactive power *Psreact*; (**m**) Rotor voltage *Vr*; (**n**) PR+RHC controller THD; (**o**) PI controller THD; (**p**) API controller THD.


**Table 2.** Performance evaluation of designed control strategies for *Vdc*.

Notes: IAE: Integral Absolute Error, ISE: Integral Square Error, ITAE: Integral of Time-Weighted Absolute Error.


**Table 3.** Performance evaluation of designed control strategies for *Id*.

Notes: IAE: Integral Absolute Error, ISE: Integral Square Error, ITAE: Integral of Time-Weighted Absolute Error.

**Table 4.** Performance evaluation of designed control strategies for *Iq*.


Notes: IAE: Integral Absolute Error, ISE: Integral Square Error, ITAE: Integral of Time-Weighted Absolute Error.
