Advanced Fuzzy 12 DTC Control of Doubly Fed Induction Generator for Optimal Power Extraction in Wind Turbine System under Random Wind Conditions

: A wind turbine (WT)-based doubly fed induction generator (DFIG) is the most often used generator in the wind conversion system market due to its advantages such as the ability of operating under variable wind speed and its high performance. However, nonlinear dynamical and parameter uncertainties of the DFIG make the controller design of this kind of system a challenging work. Thus, in this study, a novel control strategy was proposed to design the desired system dynamics, to highlight the efﬁcacy of the proposed system, and to improve the performance of the closed-loop system. The proposed controller combines the twelve-sector direct torque control (12-DTC) and the fuzzy controller with modiﬁed rules to solve the limitations and shortcomings of the usual methods for the WT-DFIG system. All operation modes, successively and continually, were considered to reﬂect the true operation of WT-DFIG system subject to random wind speeds. The aims of this work was to ensure an optimal operation of the wind generator, extracting maximum power in the zone II of the WT characteristic, and limiting this power in its maximum value in the case (zone III), to transmit the power generated by the DFIG to the grid-side with minimum losses in the disturbances related to DFIG. Extensive numerical simulations were performed under MATALB/Simulink, where the proposed fuzzy twelve direct torque control (F12-DTC) was compared with conventional nonlinear controls: conventional DTC (C-DTC) and 12-DTC. The simulation results demonstrated clearly that the proposed one had the highest performance and robustness, with a signiﬁcant reduction in rotor ﬂux and electromagnetic torque ripples and better-generated power quality with low currents’ THD over the conventional strategies (C-DTC and 12-DTC).


Introduction
The massive penetration of wind generation in the energy market is supported by the problems caused by pollution and their consequences such as climate change and lung diseases. The aim of most researchers and companies is to reduce the installation and production costs of renewable energy systems. [1,2]. The doubly fed induction generator (DFIG) is widely used for wind energy conversion systems (WECS), occupying the majority of the wind energy market due to its advantages such as the ability of operating under variable wind speeds and its high performance. This induction machine is connected to the AC grid by its stator and via reduced size static power converters in its rotor, where it is able to be driven by variable speed. It allows to offer a decoupled active and reactive power control over a large range [3]. However, the direct grid connection of the stator makes this kind of conversion system more sensible to grid disturbances. Moreover, the non-linearity of the wind speed, the non-linear dynamics, and the uncertainties of DFIG parameters make the controller design of this kind of system a challenging work.
Wind turbine control technologies are classified according to the kind of control actuator used as: yaw control, pitch control, and generator torque control; both of the last types are discussed and studied in this article [2]. Linear and nonlinear control methods have been largely investigated in the literature and industry to address the aforementioned issues. Field-oriented control (FOC), conventional direct torque, and power controls (C-DTC/DPC) [3][4][5][6] are the basics of the DFIG control. The principal of C-DTC is the direct control of torque and flux by selecting voltage vector without using PWM block modulation nor PI regulators nor a coordinate transformer [6]. This technique is characterized by simplicity, high performance, and quick response drives as advantages compared to FOC [6]. In the opposite, C-DTC suffers from some drawbacks as variable switching frequency, important flux and torque ripples, and high-current total harmonic distortion (THD). Those disadvantages limit its use for WECSs, where the high-energy quality is necessary. Therefore, many researchers have introduced different modifications and strategies to improve the C-DTC applied to different electrical machines. An important number of research works interested in improving C-DTC applied to the induction motors [7]; although, some researchers have reported improved DTC applied to induction generators (squirrel cage induction generator and DFIG) for WECSs [8]. In order to eliminate the most important DTC drawbacks related to the variable switching frequency, a strategy called Space Vector Modulation DTC (SVM-DTC) was introduced in 1992 for induction motor drive [9]. This technique has been used a second time to control WT-DFIG [10][11][12][13], and the results of this strategy showed good performance: less torque and flux ripples and a low current THD with fewer switching losses. However, the SVM-DTC requires system parameters and a precise design of the PI controller. Additionally, PWM block modulation is required. Moreover, another method named predictive control is investigated in different works. It has been introduced as an adaptive model predictive control for a yaw system of variable speed wind turbines in [14], while it has been introduced as a predictive DPC in [15] and, in [16][17][18], as a predictive-DTC (P-DTC) for WT-DFIG in order to mitigate the ripples issues. The P-DTC mentioned in [16,17] is based on predicting the next variations in flux and torque; the predicted variables are utilized to select the optimal vector, while rotor voltages are applied at a constant sampling time [18]. The results showed a reduction in torque and rotor flux ripples. The sliding mode control can also improve the C-DTC; this technique is used instead of the conventional switching table and hysteresis regulators [19,20]. The simulation results showed a small reduction in rotor flux ripples and currents' THD.
Besides the modifications of conventional control strategies and the combination with different techniques, some authors have used a strategy based on the multi-level converter instead of the classical ones [21,22]. This method is characterized by the delivered power maximization with the C-DTC drawback mitigation. In [21], a multi-level-DTC (ML-DTC) was applied to control the WT-DFIG system, and the results indicated good performances under random condition; however, complexity and switching losses issues appeared. Although, the strategy is based on 21 rotor voltage vectors instead of 8, 12 sectors instead of 6, and over 180 rules instead of 9 with three-and five-level hysteresis regulators instead of two and three levels. All those modifications in SVM-DTC, P-DTC, sliding-mode-DTC (SM-DTC), and ML-DTC techniques increase the complexity of the control system and lose one of the C-DTC benefits: its simplicity. Recently, researchers in [23][24][25][26][27] have proposed to use the same principal of C-DTC, hysteresis regulators, and switching table but reducing the size of each sector from 60 • to 30 • , which will increase the number of sectors from 6 to 12 and will rise the degrees of freedom for the selection of the rotor voltage vector.  Thus, the switching table will be modified with more rules; this will improve the control  accuracy, while keeping the simplicity of the control system. Nowadays, artificial intelligence (AI) such as artificial neural networks (ANN) and fuzzy logic controllers (FLC) are investigated to improve DTC applied to WT-DFIG systems. Those techniques are mathematical methods published in scientific articles over decades and are widely used for nonlinear systems. In [28], the authors introduced an ANN to improve DTC applied to DFIG. The simulation results showed improvements by reducing flux and torque ripples, but the development of an optimal ANN is random, which hinders the performance of this strategy [7]. The FLC was first introduced in mathematics by L. Zadeh. It is an excellent simple tool for non-linear functions, and it is used in different scientific fields. In [29][30][31], the FLC was introduced to improve direct torque control (F-DTC) applied to the wind conversion-DFIG system, where the results showed an important reduction in rotor flux and electromagnetic torque ripples with generated current's THD. However, the authors in [30,31] treated only the sub-synchronous mode under a small range of time, which is similar to the induction generator study. Moreover, the authors did not present the powers and the generated currents' evolutions, while the main point of WECS is the generator-delivered power to supply the AC grid.
In this study, a novel control strategy was proposed to design the desired system dynamics, to highlight the efficacy of the proposed system, and, then, to improve the performance of the closed-loop system. The proposed controller combines the new twelvesector methodology direct torque control (12-DTC) and a fuzzy logic controller with modified rules. The FC's member functions (MFs, WT-DFIG system restrictions, and drawbacks were addressed by modifying the fuzzy rules using numerical tests. All the WT-DFIG system operation modes (sub-synchronous, super-synchronous, synchronous modes, and over-speed) were considered, successively and continually, to reflect the true operation of the WT-DFIG system subject to random wind speed. The objectives of the present work were to ensure an optimal operation of the wind generator, extracting maximum power in region II of the WT characteristic and limiting this power in its maximum value in the case (region III), and to transmit the power generated by the DFIG to the grid-side with minimum loses of the disturbances related to DFIG. A comparative analysis of rotor flux and electromagnetic torque ripples of the proposed F12-DTC and the conventional controls, C-DTC and 12-DTC, was carried out and is presented in the results section. The main novel contributions reported in this study are summarized as:

•
A novel-control-strategy-based non-linear modified fuzzy 12-sector-DTC (F12-DTC) was applied to the rotor side of the DFIG driven by WT under random and wide ranges of the wind profile. The new F12-DTC is investigated to solve the problem of ripples under the three DFIG operation modes and the over-speed.

•
The novel approach aims directly at the causes of ripples and generated current distortions, the hysteresis regulators, and the switching table, which were replaced by the fuzzy logic controller.

•
The fuzzy controller was designed based on 12 sectors instead of 6 sectors, which extends the freedom degrees of the rotor voltage vector selection. The FC's member numerical tests were used to modify functions and fuzzy rules, in order to overcome the WT-DFIG system's constraints and drawbacks.

•
The treatment of all operation modes of the DFIG (sub-synchronous, super-synchronous, synchronous modes, and the over-speed) operates in a successive and continuous way, where during sub, super, and synchronous operating modes, the power is optimized using the MPPT algorithm, and, during the over-speed, the power is limited at its value using the pitch angle control. • A graphical and analytical comparison was made between the proposed F12-DTC and both C-DTC and 12-DTC in order to show the significant improvement in the proposed strategy. The results of comparison confirmed the good performance of the proposed F12-DTC, where the rotor flux and electromagnetic ripples and the generated currents' THD were significantly reduced, especially under the super-synchronous mode and the over-speed.

Materials and Methods
The overall WECS consists of a wind-turbine-driven DFIG associated with AC/DC and DC/AC power converters.

Wind Turbine Model
The following relation gives the mechanical power; it is a function of wind speed, blade radius, air density, and the power coefficient [32,33]: The speed ration and the power coefficient are given by: The turbine torque and the tip-speed ration are given by: The mechanical torque and the mechanical speed are described by the following equations: 2.2. The Working Zones of Wind Turbine System Figure 1 presents the operational zones of a variable-speed wind turbine. Zone I is an area where wind speed is very low, and the WT is cut-out. Zone II: when the wind speed is greater to the cut-in speed, the MPPT algorithm is used to extract the maximum amount of power (β = 0 • ). Pitch angle control (Zone III) is used when wind speed becomes greater than the nominal wind speed. The system limits the output power at its nominal amount by adjusting the pitch angle. Zone IV: the DFIG rotor is disengaged from the turbine when the maximum wind speed is attained, interrupting the power production [6].

Maximum Power Point Tracking Algorithm
The WT power characteristic in the second zone had a non-linear curve and a parabolic shape, which permits the pitch angle to be zero and the power coefficient to reach its maximum value [33,34]. The DFIG's speed was tied to a reference from the MPPT algorithm for maximum wind power tracking, as shown in Figure 2. The electromagnetic torque reference was expressed as follows [8,34]:

Maximum Power Point Tracking Algorithm
The WT power characteristic in the second zone had a non-linear curve and a parabolic shape, which permits the pitch angle to be zero and the power coefficient to reach its maximum value [33,34]. The DFIG's speed was tied to a reference from the MPPT algorithm for maximum wind power tracking, as shown in Figure 2. The electromagnetic torque reference was expressed as follows [8,34]:

Pitch Angle Control
To protect the electrical generator system, the blade angle control limits the delivered power to its nominal value when the wind speed exceeds the nominal value (the overspeed). However, the extraction power maximization means that the power produced is

Maximum Power Point Tracking Algorithm
The WT power characteristic in the second zone had a non-linear curve and a parabolic shape, which permits the pitch angle to be zero and the power coefficient to reach its maximum value [33,34]. The DFIG's speed was tied to a reference from the MPPT algorithm for maximum wind power tracking, as shown in Figure 2. The electromagnetic torque reference was expressed as follows [8,34]:

Pitch Angle Control
To protect the electrical generator system, the blade angle control limits the delivered power to its nominal value when the wind speed exceeds the nominal value (the overspeed). However, the extraction power maximization means that the power produced is

Pitch Angle Control
To protect the electrical generator system, the blade angle control limits the delivered power to its nominal value when the wind speed exceeds the nominal value (the overspeed). However, the extraction power maximization means that the power produced is regulated; therefore, the PI regulator ensures the generation of torque reference, as presented in Figure 3 [6].
Sustainability 2021, 13, x FOR PEER REVIEW 6 of 25 regulated; therefore, the PI regulator ensures the generation of torque reference, as presented in Figure 3 [6].

DFIG Modelling
The DFIG is modelled by voltage and magnetic equations. These equations are rewritten in d-q frames rotating at the synchronous pulsation as given in Equations (9) The DFIG magnetic flux equations in the d-q synchronous frame are given by:

Conventional Direct Torque Control Description
Over decades, the C-DTC has been used to control WT-DFIG systems. It is based on direct torque and flux regulation by selecting the optimal voltage vector, without measuring speed, flux, or torque, in order to make the rotor flux rotate and obtain the required

DFIG Modelling
The DFIG is modelled by voltage and magnetic equations. These equations are rewritten in d-q frames rotating at the synchronous pulsation as given in Equations (9) and (10) [20,[31][32][33]: The DFIG magnetic flux equations in the d-q synchronous frame are given by:

Conventional Direct Torque Control Description
Over decades, the C-DTC has been used to control WT-DFIG systems. It is based on direct torque and flux regulation by selecting the optimal voltage vector, without measuring speed, flux, or torque, in order to make the rotor flux rotate and obtain the required torque demand. The only measurements used are the DC voltage and the machine rotor side currents.
The rotor flux is evaluated from its components in α-β axes [31,33]: The torque is calculated using the flux components and the rotor currents components in the rotor frame [31,33]: The rotor flux angle θ r is given by: The rotor flux space is split into six sectors (60 • each). The errors are converted into digital numbers (1, 0, or −1) by using hysteresis regulators. The switching vector of the voltage source inverter is selected using the flux sector and the outputs hysteresis bands of flux and torque. The optimal voltage vector is chosen based on the switching table, which is presented in Table 1 [30].

Direct-Torque-Control-Based Twelve Sectors Applied to WT-DFIG System
The direct-torque-control-based twelve sectors methodology has been introduced to control doubly fed induction machines for both motor and generator operations without any driving in [23] and to control DFIG driven by WT in [24]. In these references, researchers analyzed the performances for variable mechanical speed dealing only with the subsynchronous mode, where the super-synchronous and synchronous modes and the overspeed were not investigated to show DFIG's benefits in terms of performance improvement. Moreover, an important improvement to the 12-DTC is introduced in the present section.
The 12-DTC control based on C-DTC principal used the same equations to estimate the required parameters: the rotor flux, the electromagnetic torque, and the rotor flux sector. The electromagnetic torque and rotor flux errors were digitalized using two-and five-level hysteresis bands, respectively, as presented in Figures 4 and 5, instead of the two-and three-level hysteresis of C-DTC. In order to increase the control precision for the vector selection, the sectors number was increased from 6 to 12, of 30 • each sector instead of 60 • . Each sector n (n = 1, 2, 3, . . . , 12) is defined by the Equation (15), and the sectors and the rotor voltage vectors are presented in Figure 6.
Sustainability 2021, 13, x FOR PEER REVIEW 8 of 25    The optimal vector selection was based on the 12-DTC switching table, which is presented in Table 2. This last uses three inputs: the digital values of errors (HTem and Hφr) and the rotor flux sector. In order to understand the fundamental idea of the selection process, the DTC principal was investigated, where the development of the electromagnetic torque and the rotor flux equations give Equation (16) [35]: The optimal vector selection was based on the 12-DTC switching table, which is presented in Table 2. This last uses three inputs: the digital values of errors (H Tem and H ϕr ) and the rotor flux sector. In order to understand the fundamental idea of the selection process, the DTC principal was investigated, where the development of the electromagnetic torque and the rotor flux equations give Equation (16) [35]: The stator flux (|ϕ s |) has a constant magnitude because the DFIG is connected directly to an infinite AC grid (ideal grid) by its stator. From this fact (|ϕ s | = cst) and Equation (16), the variations in electromagnetic torque were due to the variation in the rotor flux magnitude (|ϕ r |) and the angle between the rotor flux and the stator flux (γ). Therefore, to obtain a fast response with accuracy, the rotor flux magnitude must be kept as constant possible, and the angle between the rotor flux and the stator flux must be controlled using the accurate vector. The fundamental idea is explained further in Figure 6.
On the other side, the null voltage vectors (V 0 and V 7 ) that concern H Tem = 0 (when the torque must be maintained) were added compared to the switching table used in [23,24] to have more control precision. In Figure 6, the variation in torque and flux was influenced by the voltage vectors in different manners. Each arrow defines the behavior of each vector: ↑↑ important increase, ↑ normal increase, ↓↓ important decrease, and ↓ normal decrease in torque or flux ↑↑, ↓↓ important or normal increase/decrease depending on the time of application.
The studied system controlled by the 12-DTC is presented in Figure 7. Table 2. Switching table of the 12-DTC for WT-DFIG system. Figure 7. The 12-DTC applied to wind turbine DFIG system.

Proposed Controller Design Process of the Proposed F12-DTC
As described above, the C-DTC and 12-DTC are based on the hysteresis regulators and the switching table, which cause important rotor flux ripples and electromagnetic ripples and high generated current THD. Therefore, the proposed novel approach was aimed directly to replace the hysteresis regulators and the switching table of the conventional controls by one fuzzy logic controller (FLC). This latter component was introduced in order to minimize all ripples and to reduce generated current harmonics, based on the FLC, which is an artificial intelligence tool that calculates quickly and instantly the opti-

Proposed Controller Design Process of the Proposed F12-DTC
As described above, the C-DTC and 12-DTC are based on the hysteresis regulators and the switching table, which cause important rotor flux ripples and electromagnetic ripples and high generated current THD. Therefore, the proposed novel approach was aimed directly to replace the hysteresis regulators and the switching table of the conventional controls by one fuzzy logic controller (FLC). This latter component was introduced in order to minimize all ripples and to reduce generated current harmonics, based on the FLC, which is an artificial intelligence tool that calculates quickly and instantly the optimal vector. However, the hysteresis regulator does not change the digital error until the error reaches the hysteresis band, which creates a delay in the response. Moreover, there are four tools: two different hysteresis regulators, the sector selector, and the switching table, but the proposed control used only one tool (FLC), which improves the dynamic system.
The design process of the proposed fuzzy twelve direct torque control (F12-DTC) was based on the principal of the 12-DTC control system, and it requires several steps. Firstly, the methodology of twelve sectors was used instead of six, which highly increased the selection freedom on the flux area. Secondly, the FLC was adopted based on twelve-sector methodology and direct torque control to design the desired system dynamics and to highlight the efficiency of the proposed system.

Remark 1.
The FLC was designed after several numerical tests to obtain optimal fuzzy rules and optimal inputs and outputs of member functions. For the studied system, the rotor flux error, e ϕr , the torque error, e Tem , and the rotor flux angle, θ r , were the inputs of the fuzzy controller. The output was the selected rotor voltage vector V j (j: 0, . . . , 7).

Fuzzification
The first step of the proposed F12-DTC process consisted in converting the system inputs into fuzzy sets, using fuzzy linguistic terms and membership functions. The fuzzification process was inspired from the behavior of both five-and two-level hysteresis regulators for the torque and flux error inputs, and it was inspired from the sector selector for the rotor flux angle input. The fuzzification sconvert the three inputs into variables using MFs:

Fuzzification
The first step of the proposed F12-DTC process consisted in converting the system inputs into fuzzy sets, using fuzzy linguistic terms and membership functions. The fuzz ification process was inspired from the behavior of both five-and two-level hysteresi regulators for the torque and flux error inputs, and it was inspired from the sector selecto for the rotor flux angle input. The fuzzification sconvert the three inputs into variable using MFs:  Figure 9.
MFs of the rotor flux angle are twelve linguistic variables: θ 1 , …, θ 12 ; they are formed by triangular MFs, as illustrated in Figure 10.
The FLC output of the selected rotor voltage vector Vj are represented by sharp tri angular MFs, as presented Figure 11.

Fuzzy Rules
The fuzzy rules are inspired from the switching table of the DTC-based twelve sector methodology. Every condition that is used in the switching table is one rule that is based on the AND operator, in order to have a similar mission of one condition. However, there are three inputs. The first input was divided into 3 MFs (inspired from the two-level hysteresis regulator); the second input was divided into 5 MFs (inspired from the five-level hysteresis regulator); and the third input was divided into 12 MFs (inspired from the twelve sectors of the sector selector). Therefore, it must be 180 rules (3*5*12) to cover all possibilities that can be in any moment of the system operation.
After the inputs are fuzzified, an appropriate rule-base should be developed using the inputs and the outputs. An example of one rule process (the first that presented in Table 3): IF (e φr is NL) AND (e Tem is N) AND (θ is θ 1 ) THEN (Vn will be V5).
This step consists in the development of a suitable rules set; those rules will be designed using the input and output variables and MFs based on the <If condition and the conclusion>. A Mamdani-type fuzzy inference system was used to perform the fuzzy logic switching controller, and the fuzzy rules were developed using the inputs and outputs. Those rules are presented in Table 3. There are 180 rules based on MFs for three inputs

Fuzzy Rules
The fuzzy rules are inspired from the switching table of the DTC-based twelve sector methodology. Every condition that is used in the switching table is one rule that is based on the AND operator, in order to have a similar mission of one condition. However, there are three inputs. The first input was divided into 3 MFs (inspired from the two-level hysteresis regulator); the second input was divided into 5 MFs (inspired from the five-level hysteresis regulator); and the third input was divided into 12 MFs (inspired from the twelve sectors of the sector selector). Therefore, it must be 180 rules (3*5*12) to cover all possibilities that can be in any moment of the system operation.
After the inputs are fuzzified, an appropriate rule-base should be developed using the inputs and the outputs. An example of one rule process (the first that presented in Table 3): IF (e φr is NL) AND (e Tem is N) AND (θ is θ 1 ) THEN (Vn will be V5).
This step consists in the development of a suitable rules set; those rules will be designed using the input and output variables and MFs based on the <If condition and the conclusion>. A Mamdani-type fuzzy inference system was used to perform the fuzzy logic switching controller, and the fuzzy rules were developed using the inputs and outputs. Those rules are presented in Table 3. There are 180 rules based on MFs for three inputs (3*5*12), using the AND operator. The fuzzy rules surfaces were performed under Matlab

Fuzzy Rules
The fuzzy rules are inspired from the switching table of the DTC-based twelve sector methodology. Every condition that is used in the switching table is one rule that is based on the AND operator, in order to have a similar mission of one condition. However, there are three inputs. The first input was divided into 3 MFs (inspired from the two-level hysteresis regulator); the second input was divided into 5 MFs (inspired from the five-level hysteresis regulator); and the third input was divided into 12 MFs (inspired from the twelve sectors of the sector selector). Therefore, it must be 180 rules (3 × 5 × 12) to cover all possibilities that can be in any moment of the system operation.
After the inputs are fuzzified, an appropriate rule-base should be developed using the inputs and the outputs. An example of one rule process (the first that presented in Table 3): IF (e ϕr is NL) AND (e Tem is N) AND (θ is θ 1 ) THEN (V n will be V 5 ).
This step consists in the development of a suitable rules set; those rules will be designed using the input and output variables and MFs based on the <If condition and the conclusion>. A Mamdani-type fuzzy inference system was used to perform the fuzzy logic switching controller, and the fuzzy rules were developed using the inputs and outputs. Those rules are presented in Table 3. There are 180 rules based on MFs for three inputs (3 × 5 × 12), using the AND operator. The fuzzy rules surfaces were performed under Matlab Fuzzy Toolbox, as illustrated in Figure 12.

Defuzzification
Defuzzification consists in combining rules and converting the resulting fuzzy sets into real values. The small of maximum (SoM) method was used, which calculates the MF's value. The FLC calculates the selected vector V j (j: 0, . . . , 7), which will be applied to the inverter. Therefore, the V j is converted to commutation signals for inverter (Sa, Sb, and Sc) by a Boolean expression (0 or 1).
The general structure of the proposed F12-DTC applied to WT-DFIG system connected to the AC grid is presented in Figure 13. inability 2021, 13, x FOR PEER REVIEW 14 of 25 Figure 13. Description scheme of fuzzy twelve direct torque control applied to wind conversion-DFIG system.

Simulation Results and Discussion
Simulation tests of the proposed fuzzy twelve direct torque control (F12-DTC) applied to DFIG driven by a wind turbine were performed under MATLAB/Simulink. This work was done using random behavior of wind speed, allowing all DFIG's operation modes in a continuous and successive manner: sub, super, and synchronous modes with the case of over-speed. The system parameters used in simulation are presented in Table  4 [36]. This section is divided into two parts: 4.1. Robustness and tracking tests of references for random profile of the set-points and 4.2. Obtained results summary with comparison.

Simulation Results and Discussion
Simulation tests of the proposed fuzzy twelve direct torque control (F12-DTC) applied to DFIG driven by a wind turbine were performed under MATLAB/Simulink, the simulation scheme is presented in Appendix A. This work was done using random behavior of wind speed, allowing all DFIG's operation modes in a continuous and successive manner: sub, super, and synchronous modes with the case of over-speed. The system parameters used in simulation are presented in Table 4 [36]. This section is divided into two parts: Section 4.1. Robustness and tracking tests of references for random profile of the set-points and Section 4.2. Obtained results summary with comparison.

Robustness and Tracking Tests of References for a Random Profile of The Set-Points
The performance and good quality of the proposed control were carried out in such a manner as to recreate some limitations that reflect the real behavior of the wind. The wind speed can be modelled by a variable function, driving the DFIG in all its operation modes (synchronous, super-synchronous, sub-synchronous, and the over-speed modes). The wind speed and the DFIG mechanical speed are given in Figure 14. The MPPT technique ensures the tracking of the maximum power by generating the electromagnetic torque reference instantaneously at its maximum value in region II of the WT-characteristic, as given in Figure 1, in order to be used for tracking by the proposed control strategy (F12-DTC). However, in region III, the pitch angle control will ensure the generation of the optimal electromagnetic torque reference, where the extraction of the optimal power in this region is limited to the maximal value of the DFIG output power, which is the rated power value. A good tracking of the electromagnetic torque and rotor flux references with fewer ripples and low generated currents THD will ensure an optimal generated power with better quality, which will supply the AC grid. The MPPT set the power coefficient at its maximum value (C p-max = 0.49) and the speed ratio λ to its optimal value (λ opt = 9) during the operation modes of zone II (MPPT zone, Figure 2). By contrast, the pitch angle control varied the WT blade angle and the speed ratio during the over-speed mode, in order to limit the DFIG speed, the electromagnetic torque, and the generated power at their maximum values, as illustrated in Figures 14-16.
The electromagnetic torque (T em ) evolution depends on the mechanical speed, and it follows its reference very well, as presented in Figure 16. This ensure the optimal power extraction. The rotor flux also follows its reference with a constant value of 1.2 Wb with low ripples, as shown in Figure 17. In the plane (α, β), it takes a circular shape with a constant amplitude (1.2 Wb), as presented in Figure 18. In both modes: sub and super-synchronous, the flux components (ϕ rα , ϕ rβ ) take a sinusoidal form, whereas, during the synchronous mode, the flux components (ϕ rα , ϕ rβ ) are continuous, as illustrated in Figure 19.

Robustness and Tracking Tests of References for a Random Profile of The Set-Points
The performance and good quality of the proposed control were carried out in such a manner as to recreate some limitations that reflect the real behavior of the wind. The wind speed can be modelled by a variable function, driving the DFIG in all its operation modes (synchronous, super-synchronous, sub-synchronous, and the over-speed modes). The wind speed and the DFIG mechanical speed are given in Figure 14. The MPPT technique ensures the tracking of the maximum power by generating the electromagnetic torque reference instantaneously at its maximum value in region II of the WT-characteristic, as given in Figure 1, in order to be used for tracking by the proposed control strategy (F12-DTC). However, in region III, the pitch angle control will ensure the generation of the optimal electromagnetic torque reference, where the extraction of the optimal power in this region is limited to the maximal value of the DFIG output power, which is the rated power value. A good tracking of the electromagnetic torque and rotor flux references with fewer ripples and low generated currents THD will ensure an optimal generated power with better quality, which will supply the AC grid. The MPPT set the power coefficient at its maximum value (Cp-max = 0.49) and the speed ratio λ to its optimal value (λopt = 9) during the operation modes of zone II (MPPT zone, Figure 2). By contrast, the pitch angle control varied the WT blade angle and the speed ratio during the over-speed mode, in order to limit the DFIG speed, the electromagnetic torque, and the generated power at their maximum values, as illustrated in Figures 14-16.
The electromagnetic torque (Tem) evolution depends on the mechanical speed, and it follows its reference very well, as presented in Figure 16. This ensure the optimal power extraction. The rotor flux also follows its reference with a constant value of 1.2 Wb with low ripples, as shown in Figure 17. In the plane (α, β), it takes a circular shape with a constant amplitude (1.2 Wb), as presented in Figure 18. In both modes: sub and supersynchronous, the flux components (φrα, φrβ) take a sinusoidal form, whereas, during the synchronous mode, the flux components (φrα, φrβ) are continuous, as illustrated in Figure  19.            The evolution of the generated currents I s(abc) had a sinusoidal form with a constant frequency (50 Hz), as presented in Figure 20. These currents supply the AC-grid directly without any filters.
The evolution of the rotor currents I r(abc) had a sinusoidal form during sub and supersynchronous modes and the over-speed mode, with variable amplitude and variable frequency due to the rotor pulsation; otherwise, it depended on the DFIG slip. In the synchronous mode (null slip, s = 0), the I r(abc) were direct current (DC), as shown in Figure 21.
The generated active power at the DFIG stator in all operation modes is illustrated in Figure 22. Its negative sign indicates the generator operation. Therefore, the DFIG always supplies the AC-grid by its stator. The evolution of the generated currents I s(abc) had a sinusoidal form with a constant frequency (50 Hz), as presented in Figure 20. These currents supply the AC-grid directly without any filters.
The evolution of the rotor currents I r(abc) had a sinusoidal form during sub and supersynchronous modes and the over-speed mode, with variable amplitude and variable frequency due to the rotor pulsation; otherwise, it depended on the DFIG slip. In the synchronous mode (null slip, s = 0), the I r(abc) were direct current (DC), as shown in Figure 21.
The generated active power at the DFIG stator in all operation modes is illustrated in Figure 22. Its negative sign indicates the generator operation. Therefore, the DFIG always supplies the AC-grid by its stator.     In Figure 23, the rotor active power is presented, where all DFIG modes can be clearl illustrated:    In Figure 23, the rotor active power is presented, where all DFIG modes can be clearl illustrated: In Figure 23, the rotor active power is presented, where all DFIG modes can be clearly illustrated:

•
The positive sign of the rotor active power indicates the sub-synchronous mode, where the DFIG absorbs energy from the AC-grid by its rotor.

•
The synchronous mode is characterized by positive rotor active power, with a low value because it is dissipated in the rotor resistances.

•
In the super-synchronous mode and the over-speed case, the rotor active power is characterized by a negative sign, where the rotor generates active power to the AC grid.
The WT-DFIG system produces energy by its stator and rotor in two modes (the supersynchronous and over-speed modes), which characterized the most important advantages of this generator. value because it is dissipated in the rotor resistances.

•
In the super-synchronous mode and the over-speed case, the rotor active power is characterized by a negative sign, where the rotor generates active power to the AC grid.
The WT-DFIG system produces energy by its stator and rotor in two modes (the super-synchronous and over-speed modes), which characterized the most important advantages of this generator.

Obtained Results Summary with Comparison
To show the improvement in the proposed control over other proposed methods in the literature [6,23,24,[29][30][31], a comparison between the C-DTC, 12-DTC, and the proposed F12-DTC was made and is presented in Table 5 and Figures 24 and 25a-d. The rotor flux zooms are presented in Figure 24. Under the sub-synchronous mode, the φ r was equal to: (1.200 ± 0.002) Wb, which means reductions of 77.27% and 41.17% in ripples compared to C-DTC and 12-DTC, respectively. Under the super-synchronous mode, reductions of 61.36% and 43.33% in φ r ripples compared to C-DTC and 12-DTC, respectively, were observed. Under the over-speed mode, a reduction of 12.5% was observed compared to C-DTC, and, finally, under the synchronous mode, improvements of 76.19% and 37.5% were noticed compared to C-DTC and 12-DTC, respectively.
The electromagnetic torque ripples are presented in Figure 25. (a) Under the subsynchronous mode, the T em was equal to (−36.65 ± 0.09) N.m, which means reductions of 84.48% and 80.43% in torque ripples compared to C-DTC and 12-DTC, respectively. (b) Under the super-synchronous mode, a reductions of 85.93% and 82.69% in torque ripples were observed compared to C-DTC and 12-DTC, respectively. (c) Under the over-speed mode, a reductions of 69.92% and 39.39% were noticed compared to C-DTC and 12-DTC, respectively. Finally, (d) under the synchronous mode, an improvement of 83% in ripples compared to both C-DTC and 12-DTC was observed. Those results showed better improvement compared to both C-DTC and 12-DTC. The treatment of all operation modes under random wind speed behavior in a continuous and successive manner has not been taken into account in all references [23][24][25][26][27][28][29][30][31], which have treated the DTC in a general way.

Obtained Results Summary with Comparison
To show the improvement in the proposed control over other proposed methods in the literature [6,23,24,[29][30][31], a comparison between the C-DTC, 12-DTC, and the proposed F12-DTC was made and is presented in Table 5 and Figures 24 and 25a-d. The rotor flux zooms are presented in Figure 24. Under the sub-synchronous mode, the ϕ r was equal to: (1.200 ± 0.002) Wb, which means reductions of 77.27% and 41.17% in ripples compared to C-DTC and 12-DTC, respectively. Under the super-synchronous mode, reductions of 61.36% and 43.33% in ϕ r ripples compared to C-DTC and 12-DTC, respectively, were observed. Under the over-speed mode, a reduction of 12.5% was observed compared to C-DTC, and, finally, under the synchronous mode, improvements of 76.19% and 37.5% were noticed compared to C-DTC and 12-DTC, respectively.
The electromagnetic torque ripples are presented in Figure 25. (a) Under the subsynchronous mode, the T em was equal to (−36.65 ± 0.09) N.m, which means reductions of 84.48% and 80.43% in torque ripples compared to C-DTC and 12-DTC, respectively. (b) Under the super-synchronous mode, a reductions of 85.93% and 82.69% in torque ripples were observed compared to C-DTC and 12-DTC, respectively. (c) Under the overspeed mode, a reductions of 69.92% and 39.39% were noticed compared to C-DTC and 12-DTC, respectively. Finally, (d) under the synchronous mode, an improvement of 83% in ripples compared to both C-DTC and 12-DTC was observed. Those results showed better improvement compared to both C-DTC and 12-DTC. The treatment of all operation modes under random wind speed behavior in a continuous and successive manner has not been taken into account in all references [23][24][25][26][27][28][29][30][31], which have treated the DTC in a general way.      Table 5 presents the electromagnetic torque ripples and rotor flux ripples during the three DFIG operating modes and the overspeed case, as well as the rate of improvement in torque and flux-ripple reduction controlled by the proposed F12-DTC compared to both C-DTC and 12-DTC. As shown in this table, the ripples of both torque and flux are important in the studied system controlled by C-DTC and 12-DTC compared to the proposed F12-DTC. However, they were less with 12-DTC over the C-DTC. Therefore, the reduction rate of ripples was very significant in the case of the proposed F12-DTC. The average rate of improvement in torque-ripple reduction controlled by the proposed F12-DTC compared to C-DTC was s 80.83%, and it was also important compared to the 12-DTC by 71.37%, where this was later less compared to C-DTC. On the other hand, the average rate of flux-ripple reduction controlled by the proposed F12-DTC compared to C-DTC was 56.83%, and it was less important compared to 12-DTC by 30.5%. These results confirmed the high performance of the proposed F12-DTC over the C-DTC and the 12-DTC.
In fact, the important ripples of both the rotor flux and the electromagnetic torque have a direct influence on the degradation of the power quality that is injected to the electrical AC grid as well as the increase in energy losses (in the converters and the generator), which will degrade the efficiency of the global system. In addition, these ripples have an influence on the turbine, the gear box, and the DFIG; they will have more mechanical vibrations, and these will increase the mechanical failures, which decreases the system life-time. Additionally, the generated currents injected to the AC grid must have a good quality. Therefore, the harmonics measurement is required in the power generation system, in order to analyze the quality instantly, as cited in [37]. Accordingly, the fast Fourier transform (FFT) analysis was made with the generated currents in order to determine the current THD. The results are presented in Figure 26, and they show a low THD (<1.8%) keeping a constant frequency of the AC grid (50 Hz).

Conclusions
In the present study, a novel control strategy was proposed to design the desired system dynamics, to highlight the efficacy of the proposed system, and to improve the performance of the closed-loop system. The proposed controller combines the new twelvesector methodology direct torque control (12-DTC) and a fuzzy logic controller with modified rules to solve the WT-DFIG system constraints and the drawbacks faced by the conventional methods. All DFIG operation modes were considered to reflect the true operation subject to a random wind speed. The real wind had a random behavior, which can drive DFIG under all its operating modes (sub, super, and synchronous modes); all these modes with the over-speed case were treated in this work. The high performances of the proposed F12-DTC method applied to the DFIG driven-by-WT system were established and compared with the C-DTC with 6 and 12 sectors. The simulation results showed clearly satisfactory performance with a considerable reduction in torque and flux ripples, good dynamic responses, and a low THD (<1.8%) of the generated current with a constant grid frequency of 50 Hz. In future works, we intend to focus on the implementation of the proposed F12-DTC strategy and the application of other AI techniques.