Modeling and Performance Improvement of Direct Power Control of Doubly-Fed Induction Generator Based Wind Turbine through Second-Order Sliding Mode Control Approach

: A second-order sliding mode (SOSM)-based direct power control (DPC) of a doubly-fed induction generator (DFIG) is introduced in this research paper. Firstly, the DFIG output powers are regulated with the developed SOSM controller-based DPC scheme. The Super Twisting Algorithm (STA) has been used to reduce the chattering phenomenon. The proposed strategy is a combination of the Lyapunov theory and metaheuristics algorithms, which has been considered to identify the optimal gains of the STA-SOSM controllers. The Lyapunov function method is employed to deﬁne the stability regions of the controller parameters. On the other hand, the metaheuristics algorithms are mainly employed to select the ﬁne controllers’ parameters from the predeﬁned ranges. A Thermal Exchange Optimization (TEO) method is used to compute the optimal gain parameters. To prove the superiority of the proposed TEO, its obtained results have been compared with those obtained by other algorithms, including particle swarm optimization, genetic algorithm, water cycle algorithm, grasshopper optimization algorithm and harmony search algorithm. Moreover, the results of the introduced TEO-based SOSM controller have been also compared with the Proportional-Integral (PI)-based vector control and the conventional sliding mode control-based DPC. Moreover, an empirical comparison is carried out to investigate the indication of every metaheuristics method by employing Friedman’s rank and Bonferroni tests. The main ﬁndings indicate the e ﬀ ectiveness of STA-SOSM control for system stability and power quality improvement. The ripples in the active and reactive powers are minimized and the harmonics’ distortions of stator and rotor currents are improved. Besides, the STA-SOSM controller shows a superior performance of control in terms of chattering phenomenon elimination.


Introduction
In recent years, the utilization of renewable energy sources has prompted a reduction in conventional fossil-fuel energy source dependency. Wind energy as a renewable source has gained considerable attention because it is clean and pollution-free. It has undoubtedly been the most growing source in terms of installed capacity. Wind Energy Conversion Systems (WECSs) are mainly based on with the Lyapunov theory for tuning the STA-SOSM controller. Concluding remarks are given in Section 5.

Wind Turbine Model
The WT is in charge of capturing wind energy and transforming it into kinetic energy. The harnessed mechanical power is expressed as [19]: The power conversion efficiency C p is a dimensionless coefficient, which is a function of the tip speed ratio and pitch angle. Based on the wind turbine characteristics, the power coefficient can be calculated from the following general expression [7]: where c 1 = 0.5176, c 2 = 116, c 3 = 0.4, c 4 = 5, c 5 = 21, c 6 = 0.0068 and λ i is defined as: The tip speed ratio is expressed as a relation between the blade tip speed and the wind speed. It is given by: If the wind speed is below the rated value, the power coefficient should remain at its maximum value by applying the Maximum Power Point Tracking (MPPT) strategy and deactivating the pitch control. If the wind speed exceeds its rated limit, the pitch mechanism is switched on to decrease the extracted mechanical power.

Doubly Fed Induction Generator Model
The mathematical representation of the DFIG model can be defined as follows [20]: V ds = R s i ds + dϕ ds dt − ω s ϕ qs V qs = R s i qs + dϕ qs dt + ω s ϕ ds V dr = R r i dr + dϕ dr dt − (ω s − ω m )ϕ qr V qr = R r i qr + dϕ qr dt + (ω s − ω m )ϕ dr , and ϕ ds = L s i ds + L m i dr ϕ qs = L s i qs + L m i qr ϕ dr = L r i dr + L m i ds ϕ qr = L r i qr + L m i qs (5) In this study, Stator Flux Orientation (SFO) is used to perform the power control of the DFIG. Supposing that the electrical grid is stable, the stator flux is constant. Besides, for high-power DFIGs, the stator resistance can be ignored due to its small value [21]. Therefore, according to the above presumptions, the stator voltages and fluxes can be written as follows [20]: ϕ ds = ϕ ds = L s i ds + L m i dr ϕ qs = 0 = L r i qs + L m i qr (7) Mathematics 2020, 8,2012 5 of 31 The stator power components and rotor voltages are expressed as [5,22]: L m L s V s i qr Q s = 3 2 V qs i ds + V ds i qs = 3 2 V 2 s ω s L s − L m L s V s i dr (8)        V dr = R r i dr + σL r di dr dt − σω r L r i qr V qr = R r i qr + σL r di qr dt + σω r L r i dr + L m L s ω r ϕ ds (9) where σ = L r − L 2 m /L s and ω r = ω s − ω m .

Grid-Side Converter and DC-Link Models
The GSC part is joined to the grid via an Inductance (L) capacitance (C) inductance (L) circuit (LCL)-filter to a better harmonic reduction of the grid currents. The mathematical model of the GSC in the dq frame is expressed as in Equation (10). At the fundamental frequency, an LCL-filter can be approximated to an L-filter [21]: where R T is the sum of the converter-side R i and grid-side R g resistors, and L T represents the sum of the converter-side L i and grid-side L g inductances.
The DC-link circuit, which connects the GSC and RSC components, can be modeled as follows [5,12]: (11) where i rdc is the current flowing between the DFIG rotor and the DC-link. From the voltage dynamics given by Equation (11), the DC-link voltage can be controlled via the direct grid current.

Problem Statement
The main objective for controlling the RSC circuit is to independently regulate the stator active and reactive powers. The nonlinear Super Twisting Algorithm (STA)-based Second-Order Sliding Mode (SOSM) control scheme is employed to directly calculate the required rotor control voltage without a need to use extra current control loops [11,14]. The proposed STA-based SOSM control scheme is depicted in Figure 1.
To track the stator power component references, the following sliding surfaces are selected: where e P s = P * s − P s and e Q s = Q * s − Q s denote the tracking errors between the set-point values and actual values of the active and reactive stator powers, respectively, c Q s and c P s and are positive parameters to be tuned. The integral terms are adopted to reinforce the transient response and minimize the steady-state error [11].  parameters to be tuned. The integral terms are adopted to reinforce the transient response and minimize the steady-state error [11]. According to Equations (8) and (9), the dynamics of the switching variables given in Equation (12)    are the perturbation terms related to the unmodeled dynamics, parameters' uncertainties and any external disturbance at the reactive and active powers loops, respectively [5].
In the DPC of the DFIG system, the stator power components are controlled by regulating parts of the converter voltage at RSC circuit. Therefore, the rotor converter voltages are selected to be the control output variables. From Equations (12) and (13), it can be deduced that: According to Equations (8) and (9), the dynamics of the switching variables given in Equation (12) are expressed as: where r 0 = 3 2 L m L s |V s |; r 1 = r 0 R r σL r ; r 2 = r 0 ; r 3 = r 0 1 σL r and r 4 = r 0 L m σL r L s ϕ s and η dr , η qr are the perturbation terms related to the unmodeled dynamics, parameters' uncertainties and any external disturbance at the reactive and active powers loops, respectively [5].
In the DPC of the DFIG system, the stator power components are controlled by regulating parts of the converter voltage at RSC circuit. Therefore, the rotor converter voltages are selected to be the control output variables. From Equations (12) and (13), it can be deduced that: It can be noted that the relative degree concerning s Q s is a first-order relative degree. Similarly, the relative degree with respect to s P s equals 1 as well. Consequently, the DPC scheme may be achieved by applying classical SMC or STA-SOSM approaches. Thus, the voltages to be forced to the rotor circuits components based on STA-SOSM controllers can be calculated as follows [19,23]: The last control laws contain the equivalent and super twisting terms. The main objective for super twisting terms is to ensure that the switching surfaces s Q s = 0 and s P s = 0 are attained in a finite time. Furthermore, the equivalent control terms V dr eq and V qr eq aim to make the system slide the sliding manifold. However, the equivalent control terms can be directly calculated by forcing ds Qs dt = ds Ps dt = 0. The proposed V dr STA and V qr STA voltages are defined as follows [24][25][26]: where λ Q s , α Q s , λ P s and α P s are positive control parameters to be designed, sgn(.) is the mathematical sign function and y Q s , y P s are the integral actions of the super twisting terms for the power control law components. From Equations (15) and (16), it can be deduced that the control laws applied to the rotor voltage dynamics are given by: Finally, the proposed DPC strategy based on the STA-SOSM approach, which is designed for active and reactive power regulation of the DFIG, is shown in Figure 2. Finally, the proposed DPC strategy based on the STA-SOSM approach, which is designed for active and reactive power regulation of the DFIG, is shown in Figure 2. Moreover, to make the DC-link voltage constant, the direct grid current is regulated thanks to a designed STA-based SOSM controller. The quadrature one can be utilized to control the reactive power exchange between the GSC and the grid [27].
The DC-link voltage dynamics (11) can be rearranged under the following form [12]: Moreover, to make the DC-link voltage constant, the direct grid current is regulated thanks to a designed STA-based SOSM controller. The quadrature one can be utilized to control the reactive power exchange between the GSC and the grid [27].
The DC-link voltage dynamics (11) can be rearranged under the following form [12]: and η dc denotes the perturbation term at the DC-link voltage loop. Let us define the dynamics of the DC-link voltage error as follows [22]: The time derivative of the sliding surface is as given: where u dc = D dc i dg − dV * dc dt is the new control input. Finally, the control input i * dg is given as: (21) where λ dc and α dc are positive control parameters to be designed, sgn(.) is the mathematical sign function, y dc is the integral action of the super twisting term for the DC-link voltage control law and D dc 0.
In high dimensional systems, the choice of the control parameters of the SOSM is a big challenge, where optimal gain parameters ensure the stability and robustness of the system and introduce a fast response. Control parameter adjustment with the classical manual trial-and-error method is a time-consuming procedure. Furthermore, the selection of SOSM coefficients based on other methods, such as Hurwitz stability analysis and linearization around the equilibrium point, can achieve stability of the control law but without ensuring that the obtained parameters are the optimal ones. To alleviate the selection of the control parameters of the SOSM control the thermal exchange optimization algorithm will be adopted to solve the tuning issue, in which the limitations of the control parameters are used as inequality constraints for the optimization problem. This leads to an increase in the tracking performance a system and eliminates the chattering problem.

Robustness and Operational Constraints
Lyapunov stability analysis of the DFIG-based wind converter dynamics leads to nonlinear constraints on the decision variables of the formulated control problem. The stator reactive power loop is considered for this analysis since the same methodology can be applied to the stator active one. By using the control law (17) and taking into account the time derivative of the slide surface as given in Equation (13), the dynamics of S Q s can be represented as follows [23,25]: Let us consider that the perturbation term η dr of the system (13) is globally bounded as follows: where Ψ Q s is a positive constant. Now, the following quadratic Lyapunov function is selected as a candidate function as follows: where ξ Q s = [ξ 1 ξ 2 ] T = s Q s 0.5 sgn s Q s y Q s T and L Q s > 0 is a positive definite matrix with the following form: The first time derivative of ξ Q s can be expressed as follows [17]: where Then, the time derivative of V Q s s Q s , y Q s along the trajectories of the system (16) is computed as: Using the bounds on the perturbation (23), it can be demonstrated that [25]: where the matrix Q Q s is expressed as: when this matrix is symmetric and positive definite, i.e., Q Q s = Q T Q s > 0, there exists a candidate Lyapunov function (24) satisfying dV Qs dt s Q s , y Q s ≤ 0 and the control system will reach to the origin in a finite time. So, to have Q Q s as a positive definite matrix, the range values of λ Q s and α Q s should respect the following nonlinear constraints: To have the stability condition related to the sliding variable s P s , the same methodology is adopted as for the stator reactive one. Similarly, the range values of λ P s and α P s are derived as follows: For the DC-link voltage dynamics, the limitations of the effective control parameters are determined as: where Ψ dc ≥ 0 is a positive constant.
Moreover, the stability conditions for the parameters of the grid current controllers where x can represent the d or q axis. For some constants Ψ i xg ≥ 0.

Control Problem Formulation
Although the convergence of the sliding surfaces can be guaranteed, an important question should be highlighted. This question is related to the selection of the optimal STA-SOSM controller's gains. Although we know that the gains λ n and α n for n ∈ {Q s , P s , V dc , i dg , i qg are positive, tuning these effective design parameters to obtain a high control performance for the studied DFIG system is a very hard task. Poor tuning of the gains may lead to deteriorating the system control performance. Moreover, the majority of the SMC parameters are adjusted with the manual trial-and-error method, which remains difficult and takes much time [28].
In this work, five STA-SOSM regulators for the external and inner-loops at the RSC and GSC circuits are taken into account for the optimization procedure. These nonlinear and robust regulators for the stator power component dynamics, DC-link voltage and grid current components are systematically designed and tuned thanks to the proposed TEO algorithm. However, more details about the TEO can be found in [20,29].
The decision variables of the formulated hard optimization problem are obviously the λ n and α n parameters for the designed STA-SOSM controllers (17) and (21). They are specified for the optimization process as: where S = x ∈ R 6 + , x low ≤ x ≤ x up denotes the bounded search space for the STA-SOSM controllers' tuning problem. For optimal control approaches, the objective functions are defined by popular performance criteria, such as Integral Absolute Error (IAE), Integral Square Error (ISE), Integral Time-weighted Absolute Error (ITAE) and Integral Time-weighted Square Error (ITSE). The targeted cost functions are optimized considering the time-domain constraints, such as the overshoot, steady-state error and rise and/or settling times [21,30]. To enhance the performance of the controller through a proper selection of SOSM parameters, the defined stability and robustness conditions in Equations (30)-(33) are forced as inequality constraints for the formulated optimization problem. Therefore, the adjusting problem associated with the STA-SOSM regulators of the DFIG is completely formulated as a constrained optimization problem as follows: where J m : R 6 + → R are the cost functions, g q : R 6 + → R are the problem's inequality constraints, δ dc , δ i dg , δ i qg , δ P s and δ Q s are the overshoots of the DC-link voltage, grid current components and stator power components, respectively. The terms δ max dc , δ max The optimization issue (35) is a multi-objective kind. Therefore, the weighted sum-based aggregation functions are adopted to hold these multiple costs. The objective function is defined using the IAE index as: where T denotes the total simulation time, w r ∈ {Q s , P s , V dc , i dg , i qg are the weighting coefficients satisfying r w r = 1 and e i (.) are the tracking errors defined e P s (

Thermal Exchange Optimization Algorithm
The thermal exchange optimization (TEO) method is an advanced algorithm devised by Newton's law of cooling [29]. In the TEO algorithm, every agent is considered as a cooling object. By contacting another object as an enclosure fluid, heat is transmitted and a thermal interchange happens between them. The new temperature of each agent is considered as a new position of the potential solution in the search space.
In the search space, at the k th iteration, every agent is defined by its temperature In order to reinforce the optimization abilities, the TEO method utilizes thermal memory (TM) to save some of the best chronological vectors and its related fitness. So, these saved resolution vectors are supplemented to the population and the same amount of existing worst agents is removed. After that, a growing order of solutions is saved based on its objective function values. The N pop saved agents are evenly parted into two sets of environment and cooling agents. The environment objects are denoted as T k 1 , T k 2 , . . . , T k N pop /2 while the cooling ones are T k Npop . Since the agent that has lower η can exchange temperature slightly, the proposed method developed a similar equation to estimate the value of η for each agent as given in (37): Value of the obejective function (object) Value of obejective function(worst object) As the iterations increase, the value t = k/N iter rises, resulting in upgrading the exploration technique. To reinforce the TEO method's exploration ability, Formula (38) is introduced to prevent enclosing in local optima and to renovate the environmental temperature: where c 1 and c 2 are the controlling variables chosen as 0 or 1, U{0, 1} is a uniformly random number, T k env,i is the former environmental temperature and (1 − t) is introduced to minimize the randomness by closing to the last iterations. When decreasing of the randomness is not required, the value of c 2 is set to zero.
The new temperatures for each object, i.e., either cooling objects or environmental ones, are updated as: In the TEO method, another equation is introduced to upgrade the exploration mechanism. Control input 0 ≤ pro ≤ 1 is adopted and decides whether a term of every cooling agent must be altered or not. For every agent, such an input is contrasted to Rand(i), i = 1, 2, . . . , N pop . If Rand(i) < pro, one term of the i th agent is selected indiscriminately and its value is renewed as [29]: where T (i,j) is the j th term of the i th object, T j,max and T j,min are the superior and lower limits of the j th term, respectively. The flowchart explains the introduced metaheuristics-based adjusting method of the SOSM regulators in the DFIG system, as shown in Figure 3.

Results and Discussion
This part introduces the simulations performed to investigate the effectiveness of the proposed

Results and Discussion
This part introduces the simulations performed to investigate the effectiveness of the proposed metaheuristics-based STA-SOSM controllers for the studied DFIG. The main components of the WECS are discussed, with a special focus on the control of electrical magnitudes at the RSC and GSC of DFIG systems, such as active/reactive powers and DC-link voltage. The proposed global metaheuristics-based STA-SOSM controller design was constructed through MATLAB/Simulink. The parameters of the studied DFIG-based WECS are listed in [21].

Convergence Rates
To investigate the effectiveness of the proposed metaheuristics, the introduced algorithms GA [31], PSO [32], HSA [33], WCA [34] and GOA [35] were executed with the same values for the common parameters, i.e., population size N pop = 50 and the maximum number of iterations N iter = 100. To find accurate values of the decision variables , the bounded search domain was set to x min ≤ x ∈ R 6 + ≤ 700 and x min is the minimum limit of the decision variables that is determined by Equations (30)- (33). Table 1 gives the optimization results of the problem (35). The bold and underline values represent the best convergence values for each index. It can be obviously noted that the introduced TEO and GA produce highly competitive solutions with the other methods. Table 2 lists the acquired parameters of the STA-SOSM regulators for each proposed optimization algorithm. In fact, these adjusted STA-SOSM regulators' parameters result in better transient and steady-state responses of the whole introduced methods. Besides, Figure 4 displays the convergence histories of the mean cost functions for four indices. Moreover, it is clear that the TEO method for the ISE and ITSE indices copes the other introduced algorithms in terms of speed and non-premature convergence. Figure 4a,c state that the TEO-based algorithm for the IAE and ITAE indices displays the better convergence as a second and third-order respectively after the GA one. These results confirm that the superiority of the TEO method is still in terms of exploitation and exploration mechanisms. The Box-and-Whisker plots of the mean objective function values are shown in Figure 5 and further prove the superiority of the proposed TEO-based tuning approach. state that the TEO-based algorithm for the IAE and ITAE indices displays the better convergence as a second and third-order respectively after the GA one. These results confirm that the superiority of the TEO method is still in terms of exploitation and exploration mechanisms. The Box-and-Whisker plots of the mean objective function values are shown in Figure 5 and further prove the superiority of the proposed TEO-based tuning approach.    Friedman's test provides the computed value 2 11.23 F   of the  -distribution. Since the computed score is greater than the statistical value, the null hypothesis is rejected. Furthermore, by applying the Iman-Davenport test [36], the null hypothesis is also rejected as the calculated value is greater than the critical value at the same significance level. These statistical results denote that there are significant differences between the effectiveness of the presented methods.

Bonferroni-Dunn's Test
However, a post-hoc Bonferroni-Dunn's test was applied to test whether or not the presented TEO method is significantly superior to another method [21]. The TEO and GA algorithms have the same performance. Therefore, this test was performed to investigate the differences between the TEO and other algorithms except for GA. The corresponding Critical Differences (CDs) of the reported algorithms at the confidence levels 95% and 90% are computed as  Figure 6 shows the representation of the Bonferroni-Dunn's test, taking into account that the TEO is a control method. The GOA and HSA methods violate the horizontal line of 95% significant level.

Friedman's Test
The mean values concerning the various optimization indices are classified to evaluate the most optimal one according to its average cost function. Besides, a statistical study based on Friedman and Bonferroni-Dunn's tests is executed by utilizing these mean values [21]. The average ranks for all the reported algorithms based on the considered criteria are summarized in Table 3. We can obviously observe that the introduced TEO method and GA have the lowest ranks as marked in the bold and underline in comparison with the rest of the algorithms. Friedman's test provides the computed value χ 2 F = 11.23 of the χ-distribution. Since the computed score is greater than the statistical value, the null hypothesis is rejected. Furthermore, by applying the Iman-Davenport test [36], the null hypothesis is also rejected as the calculated value is greater than the critical value at the same significance level. These statistical results denote that there are significant differences between the effectiveness of the presented methods.

Bonferroni-Dunn's Test
However, a post-hoc Bonferroni-Dunn's test was applied to test whether or not the presented TEO method is significantly superior to another method [21]. The TEO and GA algorithms have the same performance. Therefore, this test was performed to investigate the differences between the TEO and other algorithms except for GA. The corresponding Critical Differences (CDs) of the reported algorithms at the confidence levels 95% and 90% are computed as CD 0.05 = 3.17 and CD 0.1 = 2.88. Figure 6 shows the representation of the Bonferroni-Dunn's test, taking into account that the TEO is a control method. The GOA and HSA methods violate the horizontal line of 95% significant level. This indicates that the TEO method works at least remarkably better than the GOA and HSA methods at a 95% significance level over the solutions equality [37].

Elapsed Time Efficiency
According to the average elapsed times that were listed in Table 1, the Computational Time Efficiency (CTE) [38] for every method over the presented optimization index is listed in Table 4. In terms of computational time, it can be noted that the introduced TEO method achieved the secondbest average elapsed time, whereas the GOA metaheuristic achieved the best average elapsed time.

Reference Tracking Condition
The target of this scenario is to evaluate the behavior of the STA-SOSM and vector control-based PI strategies. The stator reactive power, DC-link voltage and THD of the stator and rotor currents are adopted for making a fair comparison. However, the gains obtained by the TEO algorithm are used. As shown in Figure 7a, for the two control strategies, the stator reactive power perfectly tracks their

Elapsed Time Efficiency
According to the average elapsed times that were listed in Table 1, the Computational Time Efficiency (CTE) [38] for every method over the presented optimization index is listed in Table 4. In terms of computational time, it can be noted that the introduced TEO method achieved the second-best average elapsed time, whereas the GOA metaheuristic achieved the best average elapsed time.

Reference Tracking Condition
The target of this scenario is to evaluate the behavior of the STA-SOSM and vector control-based PI strategies. The stator reactive power, DC-link voltage and THD of the stator and rotor currents are adopted for making a fair comparison. However, the gains obtained by the TEO algorithm are used. As shown in Figure 7a, for the two control strategies, the stator reactive power perfectly tracks their references values, for which the STA-SOSM controller introduces better performances in terms of overshoot damping, settling time and steady-state error decreasing. However, the PI controller presents a faster time response. It can be noted from Figure 7b that both controllers introduce a good tracking performance with a remarkable superiority of the STA-SOSM controller in terms of rise time, settling time and steady-state error decreasing. To further compare the performances of these two methods, the stator and rotor currents' harmonic spectra are compared. Figure 8 states that the THD of the stator current is better for the STA-SOSM strategy (THD = 0.28%) when compared to the PI controller one (THD = 0.77%). Furthermore, the THD of the rotor current for the STA-SOSM controller (THD = 0.32%) is less than obtained by the PI one (THD = 0.85%), as stated in Figure 9.

Parametric Mismatch Condition
Further tests of the impact of the DFIGs parameter variations on the dynamics performance of the control strategies will be presented. To this end, the proposed STA-SOSM and vector controlbased PI strategies are investigated. Figures 11-13 show the simulation results with variations in inductance and resistance values. For this test, the demonstrative figures will present the dynamical performances of the electromagnetic torque and DC-link voltage as well as the stator active and reactive powers for the STA-SOSM and the PI controllers at each scenario. Figure 11 presents the time-domain performances of the aforementioned control loops when the rotor inductance is augmented by 200% of its nominal value.

Parametric Mismatch Condition
Further tests of the impact of the DFIGs parameter variations on the dynamics performance of the control strategies will be presented. To this end, the proposed STA-SOSM and vector control-based PI strategies are investigated. Figures 11-13 show the simulation results with variations in inductance and resistance values. For this test, the demonstrative figures will present the dynamical performances of the electromagnetic torque and DC-link voltage as well as the stator active and reactive powers for the STA-SOSM and the PI controllers at each scenario. Figure 11 presents the time-domain performances of the aforementioned control loops when the rotor inductance is augmented by 200% of its nominal value.   In addition, Figure 12 shows the time domain performances of the control loops in case of the stator inductance variation. Figure 13 shows the time domain performances when more than one parameter are changed. We can clearly deduce that parameter deviations have a clear effect on the dynamic performances of electromagnetic torque, DC-link voltage and stator active/reactive powers In addition, Figure 12 shows the time domain performances of the control loops in case of the stator inductance variation. Figure 13 shows the time domain performances when more than one parameter are changed. We can clearly deduce that parameter deviations have a clear effect on the dynamic performances of electromagnetic torque, DC-link voltage and stator active/reactive powers when using the PI controller. In addition, the decoupling between the active and reactive powers is not ensured in this case, whereas the proposed TEO-tuned STA-SOSM approach is robust against parameter variations and the decoupling is perfectly ensured.

Grid Faults Condition
DFIGs are very sensitive to grid disturbances because of the direct connection of the stator winding to the grid. In WECSs, dip voltage is not acceptable. Therefore, the performance of the proposed controllers was examined under a dip voltage scenario. The grid voltage dips and the SPV scenarios were tested at the same time. The dynamic responses of the STA-SOSM controlled system and PI are presented in Figures 14-16. It can be noted from Figure 14 that the proposed control strategy can successfully mitigate the voltage dip, as the fluctuations in the electromagnetic torque, stator active and reactive powers during the voltage dips were relatively small and the attenuation speed was faster.
In the PI controller case, there are high amplitude fluctuations in the dynamic responses of the electromagnetic torque, stator active and reactive powers because of the voltage dip condition. However, the proposed STA-SOSM and PI controllers have approximately the same performance in the DC-link voltage response. Moreover, Figure 16 confirms the effectiveness of the proposed STA-SOSM, where the stator and rotor currents are within their predefined ranges. While the stator and rotor currents in case of the PI controller are completely distorted as shown in Figure 15. These results confirm the robustness and ability of the proposed TEO-tuned STA-SOSM controller to deal with voltage dip conditions. when using the PI controller. In addition, the decoupling between the active and reactive powers is not ensured in this case, whereas the proposed TEO-tuned STA-SOSM approach is robust against parameter variations and the decoupling is perfectly ensured.

Grid Faults Condition
DFIGs are very sensitive to grid disturbances because of the direct connection of the stator winding to the grid. In WECSs, dip voltage is not acceptable. Therefore, the performance of the proposed controllers was examined under a dip voltage scenario. The grid voltage dips and the SPV scenarios were tested at the same time. The dynamic responses of the STA-SOSM controlled system and PI are presented in Figures 14, 15 and 16. It can be noted from Figure 14 that the proposed control strategy can successfully mitigate the voltage dip, as the fluctuations in the electromagnetic torque, stator active and reactive powers during the voltage dips were relatively small and the attenuation speed was faster.
In the PI controller case, there are high amplitude fluctuations in the dynamic responses of the electromagnetic torque, stator active and reactive powers because of the voltage dip condition. However, the proposed STA-SOSM and PI controllers have approximately the same performance in the DC-link voltage response. Moreover, Figure 16 confirms the effectiveness of the proposed STA-SOSM, where the stator and rotor currents are within their predefined ranges. While the stator and rotor currents in case of the PI controller are completely distorted as shown in Figure 15. These results confirm the robustness and ability of the proposed TEO-tuned STA-SOSM controller to deal with voltage dip conditions.

Conclusions
This paper discussed and performed a proposed metaheuristics-tuned STA-based SOSM control scheme for the outer-and inner-loops at both RSC and GSC circuits of a DFIG-based WECS. The proposed strategy is a combination of the Lyapunov theory and metaheuristics algorithms, which aims to identify the optimal gains of the STA-SOSM controllers. The Lyapunov theory was used to determine the constraints and limitations of the gains of controllers. The uncertainty model and the external disturbance for stator powers and DC-link voltage dynamics were analyzed and taken into consideration. Then, the tuning issue associated with the STA-SOSM controllers was formulated as a constrained optimization problem, which was solved using the recent TEO algorithm. To investigate the significance of the introduced TEO-based method in attaining the minimum value of the cost function, a comparison study with well-known algorithms was implemented. The simulation results have shown that the introduced TEO-based STA-SOSM controllers have high performances and robustness to uncertainties and parameter mismatches as well as the attenuation of chattering phenomena in comparison with vector control-based PI controllers. The obtained results confirm that the introduced TEO-based algorithm is an appropriate method for regulating the DFIG system by methodically adjusting the unknown STA-SOSM controllers' parameters effectively.
The current research work is limited by considering that wind speed is fixed. Besides, the proposed method investigated a low voltage dip condition. Stability enhancement of the DFIG system under the previous concerns will be carried out in future work. This will be implemented through interactions among DFIGs with various control methods, such as fractional-order PI and adaptive gain SOSM controllers. Indeed, these methods deserve attention because they solve the difficulty of estimating the uncertainty upper bounds for WECSs.

Conclusions
This paper discussed and performed a proposed metaheuristics-tuned STA-based SOSM control scheme for the outer-and inner-loops at both RSC and GSC circuits of a DFIG-based WECS. The proposed strategy is a combination of the Lyapunov theory and metaheuristics algorithms, which aims to identify the optimal gains of the STA-SOSM controllers. The Lyapunov theory was used to determine the constraints and limitations of the gains of controllers. The uncertainty model and the external disturbance for stator powers and DC-link voltage dynamics were analyzed and taken into consideration. Then, the tuning issue associated with the STA-SOSM controllers was formulated as a constrained optimization problem, which was solved using the recent TEO algorithm. To investigate the significance of the introduced TEO-based method in attaining the minimum value of the cost function, a comparison study with well-known algorithms was implemented. The simulation results have shown that the introduced TEO-based STA-SOSM controllers have high performances and robustness to uncertainties and parameter mismatches as well as the attenuation of chattering phenomena in comparison with vector control-based PI controllers. The obtained results confirm that the introduced TEO-based algorithm is an appropriate method for regulating the DFIG system by methodically adjusting the unknown STA-SOSM controllers' parameters effectively.
The current research work is limited by considering that wind speed is fixed. Besides, the proposed method investigated a low voltage dip condition. Stability enhancement of the DFIG system under the previous concerns will be carried out in future work. This will be implemented through interactions among DFIGs with various control methods, such as fractional-order PI and adaptive gain SOSM controllers. Indeed, these methods deserve attention because they solve the difficulty of estimating the uncertainty upper bounds for WECSs. Grid voltages in dq reference frame i g(d,q) Grid currents in dq reference frame i r(d,q) Rotor currents in dq reference frame i s(d,q) Stator currents in dq reference frame L m Mutual inductance L r , L s Rotor and stator inductances P s Stator active power Q s Stator reactive power R r , R s Rotor and stator resistances V dc DC-link voltage V f (d,q) Grid converter voltage in dq reference frame V r(d,q) Rotor converter voltage in dq reference frame V s RMS phase voltages for the stator V s(d,q) Stator voltages in dq reference frame ω g Angular grid frequency ω m , ω s Rotor and stator angular frequencies Ω t Mechanical rotational speed ϕ dr , ϕ qr Rotor fluxes in dq reference frame ϕ ds , ϕ qs Stator fluxes in dq reference frame