1 Introduction

The growing demand for electrical energy combined with environmental challenges created by fossil fuels has forced society to investigate and develop alternative renewable and clean energy sources [1]. Wind power is one of the fastest growing renewable energy sources in the world, and it will be one of the major contributors to low-carbon power grids [2]. A large part of installed or under-construction wind energy conversion systems uses doubly fed induction generators (DFIGs) because of their remarkable advantages, such as variable speed operation, active and reactive power control, low rating converter, reduction of mechanical stress and noise, and satisfactory overall efficiency [3, 4]. This generator can be easily controlled using two pairs of converters. One converter is located on the grid side and the other is positioned on the generator rotor side for feeding the generator rotor.

Several methods, such as, direct torque control (DTC) [5], filed-oriented control (FOC) [6], direct power control [7], backstepping control [8], intelligent control [9], and nonlinear control [10,11,12], can be used to control the asynchronous generator and generate active/reactive power.

Traditional control methods, such as field-oriented control using a proportional-integral (PI) controller [13, 14], require precise gain tuning and exact knowledge of system parameters. However, both requirements are difficult to achieve in real operation. Many control strategies, such as neural networks (NNs) [10], sliding mode control (SMC) [11], fuzzy logic technique (FLT) [9], DTC, and DPC [3, 5, 7], have been proposed to overcome these drawbacks of traditional FOC strategies. Two hysteresis comparators and one lookup table have been used to replace the pulse width modulation technique and traditional PI controller in DTC and DPC techniques. The DPC control and the DTC technique strategy can effectively reduce the total harmonic distortion (THD) of the stator current compared with the traditional FOC strategy. Meanwhile, the use of traditional hysteresis comparator in DTC and DPC strategies produces ripples in both torque and rotor flux of the DFIG-based wind turbine.

Therefore, a robust control technique is ideal to overcome these problems. The traditional SMC technique is a robust and nonlinear control method that can address uncertainties [15,16,17,18]. Accordingly, the control mechanism is immune to parameter changes and unknown interference that can cause uncertainty. However, the traditional SMC controller can produce oscillations called chattering phenomenon [19], which can disturb the operation and stability of the system, due to the discontinuous component of the control law. Chattering causes mechanical vibrations, oscillations of currents and powers, and undesirable electromagnetic interference [20, 21]. Different solutions have been proposed in recent years to improve traditional SMC controllers in the case of DFIG-based wind turbine systems by reducing chattering while maintaining or improving the robustness and finite-time convergence of conventional SMC controllers. These enhancement techniques use different ideas, such as development of a new reaching law [22, 23], use of artificial intelligence techniques to adapt the gain of the switching function [24,25,26], and combination of the traditional SMC and a perturbation observer [27, 28]. However, high-order sliding mode control (HOSMC) is an ideal alternative to reduce chattering. Second-order sliding mode techniques, such as twisting, super twisting, and suboptimal, have been widely used in different systems [29,30,31,32,33].

Other techniques, such as synergetic [34], third-order sliding mode [35], and terminal synergetic [36] controls, have been suggested to compensate for limitations of traditional SMC techniques and reduce chattering problems. Among the solutions that have been proposed to improve the performance and effectiveness of classical methods, we use fractional calculus due to its excellent results in reducing active power fluctuations of the asynchronous generator [37]. Compared with other strategies, fractional calculus is more robust, simpler, and easier to accomplish. On the one hand, fractional-order PI controllers are used to control reactive and active powers of the DFIG-based wind turbine system [38]. On the other hand, fractional-order proportional-integral derivative (FOPID) is a controller with superior control performance over the traditional PID controller because of its extra real parameters δ and μ, which can provide an additional degree of freedom as well as obtain faster response time and higher robustness to parameter variations [39, 40].

A new nonlinear method based on a combination of three different methods (fractional calculus, STSMC technique, and particle swarm optimization), is proposed to control the asynchronous generator (DFIG) and reduce fluctuations of both current and effective power. An STSMC controller based on a fractional-order proportional-integral (FOPI) sliding surface and a smooth function is used in this work to control the DFIG-based wind energy system.

This proposed FOPI-STSMC controller is used to control the speed of the wind turbine, extract the maximum power, and regulate stator reactive and active powers exchanged between the DFIG and the grid. The choice of optimal parameters of the proposed FOPI-STSMC controllers for controlling the DFIG-based wind turbine is very difficult. The PSO algorithm is utilized to overcome this problem and optimize all control parameters while improving the performance of the proposed nonlinear method and reducing current and active power ripples of the DFIG-based wind turbine.

The performance of the proposed FOPI-STSMC controller based on the PSO algorithm was compared with that of the traditional SMC technique using MATLAB/SIMULINK software. The results showed that the proposed FOPI-STSMC based on the PSO algorithm considerably reduces chattering and stator current and active power oscillations while preserving the robustness and acceptable performance of the conventional SMC controller.

Therefore, the main contributions of this work are presented as follows:

  1. 1.

    A new FOPI-STSMC controller based on the PSO algorithm is proposed to reduce undulations of active power, reactive power, and stator current of the DFIG-based wind turbine.

  2. 2.

    The proposed FOPI-STSMC controllers based on the PSO algorithm minimize the tracking error for active and reactive powers toward references of the DFIG-based wind turbine system.

  3. 3.

    The indirect FOC strategy based on FOPI-STSMC controllers minimizes total harmonic distortion (THD) of the stator current and active power of DFIG-based wind power systems.

  4. 4.

    The proposed FOPI-STSMC controller based on the PSO algorithm is more robust than the classical SMC strategy.

The remainder of this work is organized as follows. Wind turbine system models, including the DFIG model using Park transformations, are introduced in Sect. 2. The overall control structure of the rotor side is presented in Sect. 3. The traditional sliding mode control method is assessed in Sect. 4. The concept of the super twisting sliding mode controller is discussed in Sect. 5. The concept of fractional-order proportional-integral controller is examined in Sect. 6. The indirect FOC strategy with the proposed nonlinear controllers using the PSO algorithm is reviewed in Sect. 7. The concept of the PSO algorithm is considered in Sect. 8. Finally, the results of this study are drawn in Sect. 9.

2 Modeling of wind turbine system

2.1 Wind turbine model

The power captured by the wind turbine can be expressed as follows [2, 3]:

$$P_{{\text{t}}} = 0.5\begin{array}{*{20}l} \rho \\ \end{array} \begin{array}{*{20}l} \pi \\ \end{array} R^{2} C_{{\text{p}}} \left( {\lambda ,\beta } \right)\begin{array}{*{20}l} {V^{3} } \\ \end{array} ,$$
(1)

where ρ is the air density, R is the blade length, V is the wind speed, and Cp is the power coefficient. The Cp model is expressed as follows [3]:

$$C_{{\text{p}}} \left( {\lambda ,\beta } \right) = \frac{46}{{100}}\left( {\frac{151}{{\lambda_{i} }} - \frac{58}{{100}}\beta - \frac{2}{1000}\beta^{2.14} - 13.2} \right){\text{e}}^{{\frac{ - 18.4}{{\lambda_{i} }}}} ,$$
(2)
$$\lambda_{i} = \frac{1}{\lambda + 0.02\beta } - \frac{0.003}{{\beta^{3} + 1}},$$
(3)
$$\lambda = \frac{{R\begin{array}{*{20}l} {\Omega_{t} } \\ \end{array} }}{V}.$$
(4)

The aerodynamic torque developed by the turbine is a function of the turbine speed Ωt and expressed as follows:

$$T_{{{\text{aer}}}} = \frac{1}{{2\begin{array}{*{20}l} {\Omega_{t} } \\ \end{array} }}\rho \begin{array}{*{20}l} \pi \\ \end{array} R^{2} C_{{\text{p}}} \left( {\lambda ,\beta } \right)\begin{array}{*{20}l} {V^{3} } \\ \end{array} .$$
(5)

If we neglect the friction, elasticity, and energy losses in the gearbox, then the mechanical transmission can be modeled as follows:

$$\left\{ {\begin{array}{*{20}l} {T_{{\text{m}}} = \frac{{T_{{{\text{aer}}}} }}{G}} \\ {\Omega_{{\text{m}}} = \begin{array}{*{20}l} G \\ \end{array} \Omega_{t} } \\ \end{array} } \right.,$$
(6)

where G is the gearbox ratio, and Tm and Ωm are the torque and the speed of the gearbox high-speed shaft (generator side), respectively.

The mechanical motion equation is expressed as follows:

$$J_{{{\text{tot}}}} \frac{{{\text{d}}\Omega_{{\text{m}}} }}{{{\text{d}}t}} = T_{{\text{m}}} - T_{{{\text{em}}}} - \begin{array}{*{20}l} f \\ \end{array} \Omega_{{\text{m}}} ,$$
(7)

where Jtot is the moment of inertia of rotating parts, f is the total friction coefficient, and Tem is the torque produced by DFIG.

2.2 DFIG model

DFIG stator–rotor voltage equations in the dq frame are expressed as follows [3, 13, 14]:

$$\left\{ {\begin{array}{*{20}l} {V_{{{\text{ds}}}} = R_{{\text{s}}} I_{{{\text{ds}}}} + \frac{{{\text{d}}\phi_{{{\text{ds}}}} }}{{{\text{d}}t}} - w_{{\text{s}}} \phi_{{{\text{qs}}}} \begin{array}{*{20}l} {} & {} \\ \end{array} } \\ {V_{{{\text{qs}}}} = R_{{\text{s}}} I_{{{\text{qs}}}} + \frac{{{\text{d}}\phi_{qs} }}{{{\text{d}}t}} + w_{{\text{s}}} \phi_{{{\text{ds}}}} \begin{array}{*{20}l} {} & {} \\ \end{array} } \\ {V_{{{\text{dr}}}} = R_{{\text{r}}} I_{{{\text{dr}}}} + \frac{{{\text{d}}\phi_{{{\text{dr}}}} }}{{{\text{d}}t}} - \left( {w_{{\text{s}}} - w_{{\text{r}}} } \right)\phi_{{{\text{qr}}}} } \\ {V_{{{\text{qr}}}} = R_{{\text{r}}} I_{{{\text{qr}}}} + \frac{{{\text{d}}\phi_{{{\text{qr}}}} }}{{{\text{d}}t}} + \left( {w_{{\text{s}}} - w_{{\text{r}}} } \right)\phi_{{{\text{dr}}}} } \\ \end{array} } \right.,$$
(8)

where Rs and Rr denote the stator and rotor resistance, respectively; Is and Ir denote the stator and rotor current, respectively; and ws and wr represent the stator and rotor angular frequency, respectively.

Stator and rotor flux linkages in the dq frame are calculated as follows:

$$\left\{ {\begin{array}{*{20}l} {\phi_{{{\text{ds}}}} = L_{{\text{s}}} I_{{{\text{ds}}}} + MI_{{{\text{dr}}}} } \\ {\phi_{{{\text{qs}}}} = L_{{\text{s}}} I_{{{\text{qs}}}} + MI_{{{\text{qr}}}} } \\ {\phi_{{{\text{dr}}}} = L_{{\text{r}}} I_{{{\text{dr}}}} + MI_{{{\text{ds}}}} } \\ {\phi_{{{\text{qr}}}} = L_{{\text{r}}} I_{{{\text{qr}}}} + MI_{{{\text{qs}}}} } \\ \end{array} } \right.,$$
(9)

where Ls and Lr represent the stator and rotor inductance, respectively, and M denotes the magnetizing inductance.

Stator active and reactive powers are expressed as follows:

$$\left\{ {\begin{array}{*{20}l} {P_{{\text{s}}} = V_{{{\text{ds}}}} I_{{{\text{ds}}}} + V_{{{\text{qs}}}} I_{{{\text{qs}}}} } \\ {Q_{{\text{s}}} = V_{{{\text{qs}}}} I_{{{\text{ds}}}} - V_{{{\text{ds}}}} I_{{{\text{qs}}}} } \\ \end{array} } \right..$$
(10)

We assume that the stator resistance is zero and the stator flux is constant and orientated along the d-axis [3, 17, 18]. Stator voltage equations can be simplified in this case as follows:

$$\left\{ {\begin{array}{*{20}l} {V_{{{\text{ds}}}} = \frac{{{\text{d}}\phi_{{{\text{ds}}}} }}{{{\text{d}}t}} = 0} \\ {V_{{{\text{qs}}}} = V_{{\text{s}}} = w_{{\text{s}}} \phi_{{{\text{ds}}}} } \\ \end{array} } \right..$$
(11)

Stator reactive and active powers are simplified when (11) and (9) are substituted in (10) as follows:

$$\left\{ {\begin{array}{*{20}l} {P_{{\text{s}}} = - \frac{M}{{L_{{\text{s}}} }}V_{{\text{s}}} I_{{{\text{qr}}}} \begin{array}{*{20}l} {\begin{array}{*{20}l} {} & {} \\ \end{array} } & {} \\ \end{array} } \\ {Q_{{\text{s}}} = - \frac{M}{{L_{{\text{s}}} }}V_{{\text{s}}} I_{{{\text{dr}}}} + \frac{{V_{{\text{s}}}^{2} }}{{w_{{\text{s}}} L_{{\text{s}}} }}} \\ \end{array} } \right..$$
(12)

Similarly, using (11) and (9), the rotor voltage equations can be simplified as follows:

$$\left\{ {\begin{array}{*{20}l} {V_{{{\text{dr}}}} = R_{{\text{r}}} I_{{{\text{dr}}}} + \sigma L_{{\text{r}}} \frac{{{\text{d}}I_{{{\text{dr}}}} }}{{{\text{d}}t}} - \sigma L_{{\text{r}}} w_{{\text{r}}} I_{{{\text{qr}}}} \begin{array}{*{20}l} {\begin{array}{*{20}l} {} & {} \\ \end{array} } & {} & {} \\ \end{array} } \\ {V_{{{\text{qr}}}} = R_{{\text{r}}} I_{{{\text{qr}}}} + \sigma L_{{\text{r}}} \frac{{{\text{d}}I_{{{\text{qr}}}} }}{{{\text{d}}t}} + \sigma L_{{\text{r}}} w_{{\text{r}}} I_{{{\text{dr}}}} + w_{{\text{r}}} \frac{M}{{L_{{\text{s}}} }}\phi_{{\text{s}}} } \\ \end{array} } \right.,$$
(13)

where

$$\sigma = 1 - \frac{{M^{2} }}{{L_{{\text{r}}} L_{{\text{s}}} }}.$$
(14)

DFIG is typically controlled by adjusting components of the voltage vector in a traditional FOC approach with a rotor current controller using direct (simple) and indirect (complex) FOC strategies.

We will focus on the second type of FOC strategy in this work because of its characteristics and advantages. The indirect FOC strategy provides a faster dynamic response than the first type. This method for controlling the asynchronous generator will be discussed in the next section.

3 Rotor-side converter control

The main purpose of the rotor-side converter (RSC) is to control active and reactive powers injected into the grid via the stator of the DFIG [3]. The classic technique called stator flux-oriented control is used to achieve this objective and guarantee independent control of the active power via the q-axis rotor current Iqr and the reactive power via the d-axis rotor current Idr. In the traditional indirect FOC strategy, two control loops are used in each axis, the first loop (outer loop) to control active/reactive power and the second (inner loop) to control Iqr/Idr current [13, 18]. Meanwhile, the indirect FOC strategy presents a simple structure and implementation process. Four PI controllers were used in this strategy to control active and reactive powers of the DFIG-based wind turbine. This strategy provides more harmonic distortion of the current compared with DTC and DPC strategies.

The diagram of the traditional indirect FOC strategy of the DFIG-based wind turbine system is shown in Fig. 1. Reference signals represent the active and reactive powers. Notably, the reference signal for the active power obtained from the MPPT method ensures that the reference active power value is related to any variable wind speed. The reference value of the reactive power is made to zero in this work.

Fig. 1
figure 1

Traditional indirect FOC strategy

Active and reactive power ripples are serious problems of the classical indirect FOC method that can be very detrimental to the DFIG-based wind power because of the use of traditional PI controllers.

Several artificial intelligence methods, such as neural networks, genetic algorithm, PSO algorithm, and fuzzy logic, have been used to improve the performance and effectiveness of the traditional indirect FOC method because of their accuracy.

Nonlinear methods, such as traditional sliding mode control, can also be utilized due to their durability and insensitivity to uncertainty caused by parameter changes and unknown interferences. The traditional sliding mode control is explained in the next part.

4 Sliding mode control strategy

In robust techniques, traditional SMC method is widely used in control of electric machines. This method was proposed by Utkin in 1977 [16, 41, 42]. Robustness is the ultimate advantage of the traditional SMC controller. This strategy is simple and easy to implement. However, its major drawback is the chattering phenomenon caused by discontinuous control action [19, 21]. The SMC strategy is used in many areas, such as electronics, machine control, wind power, and signal.

The control vector in the traditional SMC method is expressed as follows:

$$V_{{{\text{dq}}}} = V_{{{\text{dq}}}}^{{{\text{eq}}}} + V_{{{\text{dq}}}}^{n} .$$
(15)

The equivalent control vector Veq can be expressed as follows [43]:

$$\left\{ {\begin{array}{*{20}l} {V_{{{\text{qr}}}}^{{{\text{eq}}}} = - \frac{{2L_{{\text{r}}} L_{{\text{s}}} \sigma }}{{3MV_{{\text{s}}} }}\dot{P}_{{\text{s}}}^{*} + R_{{\text{r}}} I_{{{\text{qr}}}} + gw_{{\text{s}}} \sigma L_{{\text{r}}} I_{{{\text{dr}}}} + g\frac{{MV_{{\text{s}}} }}{{L_{{\text{s}}} }}} \\ {V_{{{\text{dr}}}}^{{{\text{eq}}}} = - \frac{{2L_{{\text{r}}} L_{{\text{s}}} \sigma }}{{3MV_{{\text{s}}} }}\dot{Q}_{{\text{s}}}^{*} + R_{{\text{r}}} I_{{{\text{dr}}}} - gw_{{\text{s}}} \sigma L_{{\text{r}}} I_{{{\text{qr}}}} + \frac{{\sigma L_{{\text{r}}} V_{{\text{s}}} }}{{w_{{\text{s}}} M}}} \\ \end{array} } \right..$$
(16)

Vndq is the switching term that can be defined by the following equation:

$$V_{{{\text{dq}}}}^{n} = - K \cdot {\text{sat}}\left( {S_{{{\text{dq}}}} } \right),$$
(17)

where K determines the ability to overcome chattering.

The traditional SMC method will exist only if the following condition is met:

$$S \cdot \dot{S} < 0.$$
(18)

The diagram of the traditional sliding mode control strategy of the DFIG-based wind turbine system is shown in Fig. 2.

Fig. 2
figure 2

Traditional sliding mode control strategy

A neural sliding mode controller (NSMC) was proposed to improve traditional SMC strategy [10]. The NSMC strategy was proposed to reduce ripples in the current, flux, active power, and torque of the DFIG compared with the classical PI controller. A second-order sliding mode controller (SOSMC) was designed to regulate stator active and reactive powers of the DFIG-based wind turbine [11]. SOSMC and neural network (NN) controllers are combined to control the DFIG using a two-level space vector modulation (TLSVM) inverter [12].

In this paper, a super twisting sliding mode control-based FOPI controller was proposed to control active and reactive powers of the DFIG-based variable speed wind turbine system.

5 STSMC concept

High-order sliding mode (HOSM) algorithms have been developed to reduce or eliminate the chattering phenomenon without degrading the satisfactory robustness of the conventional SMC due to uncertainties and external disturbances. The second-order version of HOSM algorithms, such as twisting, suboptimal, and super twisting algorithms, aim to converge the sliding surface S and its derivative (dS/dt) to zero within a finite time. We chose the super twisting algorithm in this work because of its advantages. Unlike the first two methods (twisting and suboptimal), the super twisting algorithm (STA) only uses the value of the sliding surface S and does not require its derivative. The STA control law is defined as follows [33]:

$$U = U_{1} (t) + U_{2} (t),$$
(19)
$$\dot{U}_{1} = \left\{ {\begin{array}{*{20}l} { - U} & {{\text{if}}\;\left| U \right| > U_{M} } \\ { - \eta \begin{array}{*{20}l} {{\text{sign}}} \\ \end{array} \begin{array}{*{20}l} {(S)} \\ \end{array} } & {{\text{if}}\;{\text{not}}} \\ \end{array} } \right.,$$
(20)
$$U_{2} = \left\{ {\begin{array}{*{20}l} { - \zeta \left| {S_{0} } \right|^{\gamma } \begin{array}{*{20}l} {{\text{sign}}} \\ \end{array} (S)} & {{\text{if}}\left| U \right| > S_{0} } \\ { - \zeta \left| S \right|^{\gamma } \begin{array}{*{20}l} {{\text{sign}}} \\ \end{array} (S)} & {\text{if not}} \\ \end{array} } \right.,$$
(21)

where η, ζ, and γ must satisfy the following inequalities:

$$\left\{ {\begin{array}{*{20}l} {\eta > \frac{{C_{0} }}{{K_{m} }}} & {if} & {0 < \gamma < 0.5} \\ {\zeta^{2} > \frac{{4C_{0} K_{M} (\eta + C_{0} )}}{{K_{m}^{2} K_{m} (\eta + C_{0} )}}} & {if} & {\gamma = 0.5} \\ \end{array} } \right.,$$
(22)

where S0, C0, Km, and KM are positive constants.

The simplified version of the STSMC algorithm when S0 →  is expressed as follows:

$$\left\{ {\begin{array}{*{20}l} {U = - \zeta \left| S \right|^{\gamma } {\text{sign}}(S) + U_{1} } \\ {\dot{U}_{1} = - \eta \cdot s{\text{ign}}(S)\begin{array}{*{20}l} {} & {} \\ \end{array} } \\ \end{array} } \right..$$
(23)

The chattering problem can be reduced further by replacing the sign function with a smooth function, which can be expressed as.

$${\text{smooth}}(S) = \frac{S}{\left| S \right| + \varsigma },$$
(24)

where ς is a positive coefficient.

6 FOPI controller concept

Traditional PID controllers may be insufficient for complex systems. A fractional-order controller is introduced as an alternative to the traditional PID controller to improve the performance. The FOPID controller (PIδDμ) in the time domain is expressed as follows [44,45,46,47,48]:

$$u(t) = K_{{\text{p}}} e(t) + K_{{\text{i}}} D^{ - \delta } e(t) + K_{{\text{d}}} D^{\mu } e(t),$$
(25)

where e(t) is the error signal; u(t) is the control signal; Kp is the proportional constant gain; Ki is the integral constant gain; Kd is the differential constant gain; δ and μ are the non-integer-order integral and differential terms, respectively.

Dα is the generalized fractional derivative/integral operator of fractional α. Riemann–Liuville description is commonly used to depict a fraction operator. The fraction operator is defined as follows [44, 45]:

$${}_{a}\begin{array}{*{20}l} {D{}_{t}^{\alpha } } \\ \end{array} f(t) = \frac{1}{\Gamma (n - \alpha )}\frac{{{\text{d}}^{n} }}{{{\text{d}}t^{n} }}\left[ {\int_{a}^{t} {\frac{f(\tau )}{{(t - \tau )^{\alpha - n + 1} }}{\text{d}}\tau } } \right],$$
(26)

where n is an integer that satisfies the condition n − 1 < α < n, Г(.) is the Euler gamma function, and a and t are the limits of integration. Laplace transform of (26) under zero initial conditions is expressed as follows:

$$L\left\{ {{}_{a}\begin{array}{*{20}l} {D{}_{t}^{\alpha } } \\ \end{array} f(t)} \right\} = \int_{0}^{\infty } {{\text{e}}^{ - st} } {}_{a}\begin{array}{*{20}l} {D{}_{t}^{\alpha } } \\ \end{array} f(t)\begin{array}{*{20}l} {{\text{d}}t} \\ \end{array} = s^{\alpha } F(s).$$
(27)

The FOPID controller’s transfer function using (25) and (27) can be expressed as follows:

$$G(s) = \frac{U(s)}{{E(s)}} = K_{{\text{p}}} + K_{{\text{i}}} s^{ - \delta } + K_{{\text{d}}} s^{\mu } .$$
(28)

We selected the FOPI structure Kd = 0, which is a general form of the PI controller, in this work.

Finally, four FOPI-STSMC controllers (one per loop) are used to control DFIG currents and powers effectively.

7 Proposed indirect FOC strategy

The complementary use of FOPI and STSMC controllers is proposed to improve the performance of the traditional indirect FOC strategy. Although the proposed indirect FOC strategy with FOPI-STSMC algorithm and the traditional indirect FOC strategy work under similar principles, FOPI-STSMC controllers are used to replace traditional PI controllers of the indirect FOC strategy.

Figure 3 presents the principle of the proposed indirect FOC strategy with the FOPI-STSMC algorithm of the DFIG-based wind power system. Major advantages of the designed indirect FOC strategy with the proposed FOPI-STSMC controllers based on the PSO algorithm are minimized current, reactive and active power undulations, simple structure, and robust control technique. On the other hand, the proposed control strategy in this work is different of the published work in [29], wherein this work, three different methods have been proposed in principle for controlling the asynchronous generator, which are as follows: traditional sliding mode control, fractional-order terminal SMC strategy, and super twisting fractional-order terminal sliding mode controller. All of these proposed methods are different in principle from the method proposed in this work. In our work, three different methods (STSMC, FOPI, and PSO) were combined to obtain a more robust nonlinear method.

Fig. 3
figure 3

Proposed indirect FOC strategy

7.1 Design of the proposed MPPT technique

Maximum power point tracking (MPPT) can be applied to maximize the wind power captured by the turbine at different wind speeds. Tip speed ratio (TSR) method is based on the adjustment of the turbine speed and typically used to maintain the TSR at its maximum and allow the extraction of the maximum power [3, 32]. A FOPI-STSMC controller is developed and optimized to obtain the reference torque that the DFIG must develop, guarantee precise and robust speed control, and achieve an accurate MPPT technique.

The reference speed of a turbine in the traditional MPPT technique is expressed as follows:

$$\Omega_{{\text{m}}}^{*} = \frac{{\lambda_{{{\text{opt}}}} V}}{R}.$$
(29)

Equation (29) shows that the reference speed is related to each wind speed, tip speed ratio, and radius of the turbine.

We consider the following mechanical speed error:

$$e(\Omega_{{\text{m}}} ) = \Omega_{{\text{m}}}^{*} - \Omega_{{\text{m}}} .$$
(30)

The sliding surface used in this investigation is the same as that of the FOPI structure in Eq. (34) and more flexible than that of the conventional PI controller structure because of its additional tuning parameter (fractional integral order δ). The fractional sliding surface S is expressed as follows:

$$S(\Omega_{{\text{m}}} ) = K_{{{\text{p1}}}} e(\Omega_{{\text{m}}} ) + K_{i1} D^{ - \delta 1} e(\Omega_{{\text{m}}} ).$$
(31)

Using the definition of the STSMC controller, Eqs. (23), the FOPI-STSMC control law of the mechanical speed, which guarantees MPPT operation, is expressed as follows:

$$\left\{ \begin{gathered} T_{{{\text{em}}}}^{*} = - \zeta_{1} \left| {S(\Omega_{{\text{m}}} )} \right|^{0.5} {\text{smooth}}\left( {S(\Omega_{m} )} \right) + T_{1} \hfill \\ T_{1} = - \int {\eta_{1} {\text{smooth}}\left( {S(\Omega_{{\text{m}}} )} \right){\text{d}}t} \hfill \\ \end{gathered} \right.,$$
(32)

where Tem* is the output of the FOPI-STSMC speed controller that represents the electromagnetic torque the DFIG should generate.

Figure 4 shows the block diagram of the proposed MPPT control with the designed FOPI-STSMC controller. The proposed technique is a simple and robust algorithm.

Fig. 4
figure 4

Block diagram of the MPPT technique

7.2 Design of the active power controller

The stator active power control consists of two FOPI-STSMC controllers connected in cascade. One controller is used for the active power and the other is utilized for the q-axis rotor current Iqr. We defined the following active power and current errors to calculate the two FOPI-STSMC controllers:

$$e(P_{{\text{s}}} ) = P_{{\text{s}}}^{*} - P_{{\text{s}}} ,$$
(33)
$$e(I_{{{\text{qr}}}} ) = I_{{{\text{qr}}}}^{*} - I_{{{\text{qr}}}} .$$
(34)

Fractional sliding surfaces chosen for the two FOPI-STSMC controllers are expressed as follows:

$$S(P_{{\text{s}}} ) = K_{{{\text{p2}}}} e(P_{{\text{s}}} ) + K_{{{\text{i2}}}} D^{ - \delta 2} e(P_{{\text{s}}} ),$$
(35)
$$S(I_{{{\text{qr}}}} ) = K_{{{\text{p3}}}} e(I_{{{\text{qr}}}} ) + K_{{{\text{i3}}}} D^{ - \delta 3} e(I_{{{\text{qr}}}} ).$$
(36)

On the basis of Eq. (23), the respective FOPI-STSMC control laws of the active power and the current Iqr are expressed as follows:

$$\left\{ \begin{gathered} I_{{{\text{qr}}}}^{*} = \begin{array}{*{20}l} {\left( { - \zeta_{2} \left| {S(P_{{\text{s}}} )} \right|^{0.5} {\text{smooth}}\left( {S(P_{{\text{s}}} )} \right) + I_{1} } \right)\begin{array}{*{20}r} \hfill {\begin{array}{*{20}l} {\left( {\frac{{ - L_{{\text{s}}} }}{{MV_{{\text{s}}} }}} \right)} \\ \end{array} } \\ \end{array} } \\ \end{array} \hfill \\ I_{1} = - \int {\eta_{2} {\text{smooth}}\left( {S(P_{{\text{s}}} )} \right)\begin{array}{*{20}l} {{\text{d}}t} \\ \end{array} } \hfill \\ \end{gathered} \right.,$$
(37)
$$\left\{ \begin{gathered} V_{{{\text{qr}}}}^{*} = - \zeta_{3} \left| {S(I_{qr} )} \right|^{0.5} {\text{smooth}}\left( {S(I_{{{\text{qr}}}} )} \right) + V_{1} \hfill \\ V_{1} = - \int {\eta_{3} {\text{smooth}}\left( {S(I_{{{\text{qr}}}} )} \right)\begin{array}{*{20}l} {{\text{d}}t} \\ \end{array} } \hfill \\ \end{gathered} \right.,$$
(38)

where Iqr* and Vqr* are outputs of FOPI-STSMC controllers of the active power and the current Iqr, respectively.

7.3 Design of the reactive power controller

As in the case of active power, the reactive power control axis contains two FOPI-STSMC controllers connected in cascade, one controller is used for the reactive power and the other is utilized for the d-axis rotor current Idr. The two errors at the input of controllers are expressed as follows:

$$e(Q_{{\text{s}}} ) = Q_{{\text{s}}}^{*} - Q_{{\text{s}}} ,$$
(39)
$$e(I_{{{\text{dr}}}} ) = I_{{{\text{dr}}}}^{*} - I_{{{\text{dr}}}} .$$
(40)

Fractional sliding surfaces are expressed as

$$S(Q_{{\text{s}}} ) = K_{{{\text{p4}}}} e(Q_{{\text{s}}} ) + K_{{{\text{i4}}}} D^{ - \delta 4} e(Q_{{\text{s}}} ),$$
(41)
$$S(I_{{{\text{dr}}}} ) = K_{{{\text{p5}}}} e(I_{{{\text{dr}}}} ) + K_{{{\text{i5}}}} D^{ - \delta 5} e(I_{{{\text{dr}}}} ).$$
(42)

The two FOPI-STSMC control laws developed for the reactive power and the d-axis rotor current Idr are expressed as follows:

$$\left\{ {\begin{array}{*{20}l} {I_{{{\text{dr}}}}^{*} = - \begin{array}{*{20}l} {\left( {\zeta_{4} \left| {S(Q_{{\text{s}}} )} \right|^{0.5} \begin{array}{*{20}l} {{\text{smooth}}} \\ \end{array} \begin{array}{*{20}l} {\left( {S(Q_{{\text{s}}} )} \right)} \\ \end{array} + I_{2} } \right)} \\ \end{array} \begin{array}{*{20}l} {\left( {\frac{{ - L_{{\text{s}}} }}{{Mw_{{\text{s}}} }}} \right)} \\ \end{array} + \frac{{V_{{\text{s}}} }}{{Mw_{{\text{s}}} }}} \\ {I_{2} = - \int {\eta_{4} } \begin{array}{*{20}l} {{\text{smooth}}} \\ \end{array} \begin{array}{*{20}l} {\begin{array}{*{20}l} {\begin{array}{*{20}l} {\begin{array}{*{20}l} {\left( {S(Q_{s} )} \right)\begin{array}{*{20}l} {{\text{d}}t} \\ \end{array} } \\ \end{array} } & {} \\ \end{array} } & {} & {} & {} \\ \end{array} } & {} & {} & {} \\ \end{array} } \\ \end{array} } \right.,$$
(43)
$$\left\{ {\begin{array}{*{20}l} {V_{{{\text{dr}}}}^{*} = - \zeta_{5} \left| {S(I_{{{\text{dr}}}} )} \right|^{0.5} \begin{array}{*{20}l} {{\text{smooth}}} \\ \end{array} \left( {S(I_{{{\text{dr}}}} )} \right) + V_{2} } \\ {V_{2} = - \int {\eta_{5} \begin{array}{*{20}l} {{\text{smooth}}} \\ \end{array} } \begin{array}{*{20}l} {\left( {S(I_{{{\text{dr}}}} )} \right)} \\ \end{array} \begin{array}{*{20}l} {{\text{d}}t} \\ \end{array} \begin{array}{*{20}l} {} & {} & {} & {} \\ \end{array} } \\ \end{array} } \right.,$$
(44)

where Idr* and Vdr* are outputs of FOPI-STSMC controllers of the reactive power and the current Idr, respectively.

Because there are five FOPI-STSMC controllers with multiple parameters to tune, the PSO algorithm is used to find the best values of those parameters.

8 Concept of particle swarm optimization algorithm

Kennedy and Eberhart [49] proposed the PSO algorithm in the mid-1990s as a heuristic search strategy. PSO is based on the simulation of social behavior and movement of members in a flock of birds or school of fish searching for food sources. The PSO algorithm operates as follows: each particle (candidate solution) moving through the search space looks for promising regions on the basis of its previous experiences and those of its neighbor particles [49,50,51,52]. The new position of each particle of the population is calculated at each iteration as follows:

$$\left\{ {\begin{array}{*{20}l} {v_{i}^{k + 1} = wv_{i}^{k} + c_{1} r_{1} \left( {{\text{Pbest}}_{i}^{k} - X_{i}^{k} } \right) + c_{2} r_{2} \left( {{\text{Gbest}}_{i}^{k} - X_{i}^{k} } \right)} \\ {r_{1} ,r_{2} \in \left[ {0,1} \right]\begin{array}{*{20}l} {\begin{array}{*{20}l} {} & {\begin{array}{*{20}l} {{\text{are}}} & {{\text{random}}} \\ \end{array} } \\ \end{array} } & {{\text{numbers}}} \\ \end{array} } \\ \end{array} } \right.,$$
(45)
$$X_{i}^{k + 1} = X_{i}^{k} + v_{i}^{k + 1} ,$$
(46)

where Gbestik is the global best solution and Pbestik is the personal best solution.

Control parameters of the PSO algorithm for optimizing parameters of the five FOPI-STSMC controllers are listed in Table 1.

Table 1 PSO algorithm parameters

The objective function to be optimized in this work is formulated using integral absolute error (IAE), which is the sum of absolute errors of currents, powers, and speeds. IAE is expressed as follows:

$${\text{IAE}} = \int_{0}^{\infty } {\left( {\begin{array}{*{20}l} {\begin{array}{*{20}l} {\left| {\Delta I_{{{\text{qr}}}} } \right|} \\ \end{array} + \left| {\Delta I_{{{\text{dr}}}} } \right| + \left| {\Delta P_{{\text{s}}} } \right| + \left| {\Delta Q_{{\text{s}}} } \right| + \begin{array}{*{20}l} {\left| {\Delta \Omega_{{\text{m}}} } \right|} \\ \end{array} } \\ \end{array} } \right)\begin{array}{*{20}l} {{\text{d}}t} \\ \end{array} } ,$$
(47)

Where \(\begin{gathered} \Delta I_{{{\text{qr}}}} = \, I_{{{\text{qr}}}}^{*} - \, I_{{{\text{qr}}}} , \, \Delta I_{{{\text{dr}}}} = \, I_{{{\text{dr}}}}^{*} - \, I_{{{\text{dr}}}} , \, \Delta P_{{\text{s}}} = \, P_{{\text{s}}}^{*} - \, P_{{\text{s}}} \hfill \\ \Delta Q_{{\text{s}}} = \, Q_{{\text{s}}}^{*} - \, Q_{{\text{s}}} ,\;\;{\text{and}}\;\Delta \Omega_{{\text{m}}} = \, \Omega_{{\text{m}}}^{*} - \, \Omega_{{\text{m}}} . \hfill \\ \end{gathered}\).

9 Simulation results

A WECS is created through the MATLAB/Simulink software and several simulations were carried out under different wind speeds to verify the performance of FOPI-STSMC controllers used to control the turbine speed and the active/reactive power injected into the grid.

Figure 5 illustrates the profile of the wind speed imposed for these simulations. Numerical values of parameters of the wind turbine, DFIG, and grid-side converter (GSC) are listed in Tables 2 and 3.

Fig. 5
figure 5

Proposed wind profile

Table 2 Parameters of a 2.4 MW wind turbine
Table 3 Parameters of the DFIG generator and GSC

9.1 Tracking tests

We compared the performance of the indirect FOC strategy with the proposed FOPI-STSMC controller based on the PSO algorithm with that of the conventional sliding mode control to verify its effectiveness. Figure 6a shows that the MPPT control is working properly because the turbine speed closely follows its reference. Figure 6b presents that the speed obtained by the proposed control strategy is closer to its reference than that obtained by the SMC strategy.

Fig. 6
figure 6

a Speed tracking performance; b zoom in the speed tracking performance

Figures 7a and 8a illustrate that the active and reactive powers follow their references under both the indirect FOC strategy with the proposed FOPI-STSMC controller and the sliding mode control. However, Figs. 7b and 8b show the zoom on the active and reactive power, it is clear that there is a reduction in the power ripples obtained by the proposed control strategy. This result is expected since the proposed FOPI-STSMC controller can considerably reduce more and more the phenomenon of chattering compared to traditional strategy.

Fig. 7
figure 7

a The active stator power; b zoom in the active stator power

Fig. 8
figure 8

a Reactive stator power; b zoom in the reactive stator power

Figures 9a and 10a show the shape of the stator current injected into the grid by the DFIG stator. It is clear that the shape of the injected current varies proportionally with the variation of the wind speed. These results show that the MPPT technique works very well.

Fig. 9
figure 9

a Stator current obtained by the SMC strategy; b zoom in the stator current

Fig. 10
figure 10

a Stator current obtained by the proposed strategy; b zoom in the stator current

Figures 9b and 10b show a zoom of the shape of the stator current. The currents obtained by the proposed control strategy have sinusoidal shapes without undulations, which implies clean energy, without harmonics, injected into the grid.

Figure 11 shows that the DC-link voltage is fixed and follows its reference very well at 1150 V. A classic PI controller is used to control this voltage and the power factor of the grid given its acceptable performance. The THD value of the output current is shown in Figs. 12 and 13 for both methods. The results demonstrated that the designed indirect FOC with PSO-STSMC controller based PSO technique obtains a lower value for the THD of stator current compared to the SMC method. The indirect FOC strategy with proposed PSO-STSMC controllers reduced the value of THD of stator current by about 99.29% compared to the traditional SMC method.

Fig. 11
figure 11

DC link voltage

Fig. 12
figure 12

THD of stator current (SMC)

Fig. 13
figure 13

THD of stator current (proposed strategy)

9.2 Robustness tests

In real operation, the DFIG parameters can be affected by several factors, such as temperature, saturation of magnetic materials, frequency variation, harmonics, etc. However, DFIG control performance should not change too much when DFIG parameters change.

To simulate a robustness test, the new parameters of the DFIG are defined as follows:

$$R_{{\text{r}}} ^{\prime} = \, 2 \times R_{{\text{r}}} , \, R_{{\text{s}}} ^{\prime} = \, 2 \times R_{{\text{s}}} , \, L_{{\text{r}}} ^{\prime} = \, L_{{\text{r}}} \div 2, \, L_{{\text{s}}} ^{\prime} = \, L_{{\text{s}}} \div 2, \, M^{\prime} = \, M \div 2$$

Figures 14a and 15a show that the active and reactive power obtained by the two controllers follow their references. However, as shown in Figs. 14b and 15b, the presence of chattering is clearly visible in the case of the SMC controller compared to the case of the proposed FOPI-STSMC controller based on PSO algorithm. These results show also that the proposed FOPI-STSMC controller did not degrade the robustness of the classic SMC controller, but reduced considerably the phenomenon of chattering. In addition, the presence of an additional parameter (integral order δ), due to the fractional integrator, can increase the flexibility and performance of the proposed FOPI-STSMC controller compared to the traditional SMC controller. On the other hand, Figs. 16 and 17 show that the stator currents have good sinusoidal shapes without ripples, which implies clean energy without harmonics injected into the grid.

Fig. 14
figure 14

a The stator active power; b zoom in the stator active power

Fig. 15
figure 15

a The stator reactive power; b zoom in the stator reactive power

Fig. 16
figure 16

a The stator current obtained by the SMC strategy; b zoom in the stator current

Fig. 17
figure 17

a The stator current obtained by proposed strategy; b zoom in the stator current

THD values of the output current of the proposed and traditional control methods are shown in Figs. 18 and 19, respectively. The proposed indirect FOC technique with FOPI-STSMC controller based on the PSO technique reduced the THD value of the stator current by about 97.92% compared with the traditional SMC method. This result is expected given that the proposed FOPI-STSMC controller can significantly reduce the phenomenon of chattering compared with the traditional SMC strategy.

Fig. 18
figure 18

THD value of the stator current (SMC)

Fig. 19
figure 19

THD value of the stator current (proposed strategy)

The THD of the current of the proposed method and some controls used in previous studies is listed in Table 4. We note that the proposed indirect FOC strategy based on PSO-STSMC algorithms obtained significantly lower percentages of the THD of the stator current than some of the published control strategies. Hence, the proposed indirect FOC strategy based on PSO-FOPI-STSMC algorithms in this study provides a sinusoidal current with satisfactory characteristics in terms of undulations and percentages of the THD, thereby extending the life of devices and minimizing the cost of maintenance.

Table 4 Comparison of the designed control strategy and some published strategies in terms of the THD value

10 Conclusion

The proposed FOPI-STSMC controller based on the PSO algorithm is used in this study to regulate the power injected into the grid by a wind turbine equipped with DFIG. Although the proposed controller is based on the structure of the super twisting controller, it uses a fractional-order PI-type sliding surface to improve its flexibility.

Five controllers are designed and optimized by the PSO method to validate the performance of the indirect FOC strategy with the proposed FOPI-STSMC controller, guarantee the MPPT operation, and control active and reactive powers injected into the grid by the DFIG.

The simulation results showed that the proposed FOPI-STSMC controller ensures accurate power control and considerably reduces the chattering phenomenon, which is the main problem of the conventional SMC controller. Furthermore, the proposed intelligent nonlinear controller is more robust than the classical SMC strategy.

The following conclusions can be drawn from this study:

  1. 1.

    The proposed indirect FOC strategy based on the FOPI-STSMC controllers and PSO algorithm was confirmed using numerical simulation.

  2. 2.

    The designed intelligent and robust nonlinear controller minimizes undulations of the reactive/active power, torque, and current of the DFIG-based wind power.

  3. 3.

    The designed robust indirect FOC strategy reduces the harmonic distortion of the stator current compared with other techniques in the literature.

Future investigations can improve the wind power quality produced by the DFIG-based wind power system by integrating a robust controller, such as a third-order sliding mode controller based on the PSO algorithm. The performance and complexity of the controller will be evaluated by comparing the results with those of classical methods in the literature and the designed method in this work.