Dynamic Performance Enhancement of a Direct-Driven PMSG-Based Wind Turbine Using a 12-Sectors DTC

: This paper focuses on the performance analysis, modeling, and control of permanent magnet synchronous generator (PMSG)-based wind energy conversion. This work analyzes controllers for the machine-side converter (MSC) and grid-side converter (GSC) and presents a new direct torque control (DTC) scheme based on a 12-sectors polygonal DTC for variable speed control of the PMSG. The proposed method solves the drawbacks faced by conventional six-sectors DTC control. The proposed method utilizes 12 sectors of 30 ◦ each compared to 60 ◦ in the conventional 6-sectors DTC. The 12-sectors technique was applied to voltages and ﬂux vectors to increase the degrees of freedom for the selection of optimal vectors and, thus, reduce the torque ripple. This work analyzed the aforementioned DTC methods using MATLAB/Simulink, comparing the dynamic response of the proposed 12-sectors DTC with the conventional 6-sectors DTC control, and the results veriﬁed the effectiveness of the proposed DTC control.


Introduction
With the global climate problem becoming increasingly prominent, the demand for renewable energy resources is rising. Due to having lower operating costs than other green energy sources, wind energy is considered the most promising form of renewable energy [1].
The double-fed induction generator (DFIG) and the direct-drive permanent magnet synchronous generator (PMSG) are widely used for variable speed wind energy conversion systems (VS-WECS). The PMSG has many advantages and is considered a significant competitor to DFIG. The absence of a gearbox and its full decoupling from the grid, high power density, and easy control mechanism are the main benefits of using the PMSG in VS-WECS [1,2].
The PMSG is connected to the grid by means of a grid-side converter (GSC) and a machine-side converter (MSC). In terms of the control, different control techniques for PMSG-based wind power have been discussed in the literature. Direct torque control (DTC) and field-oriented control (FOC) are the most popular control strategies used in VS-WECS. These two control strategies have been studied and analyzed in previous research [3][4][5], which compared the performance of DTC and FOC based on the space vector modulation (SVM) technique. Prior work introduced an optimized DTC-PWM with constant switching frequency and a dead-time compensation [6].
Furthermore, a previous study introduced a simplified model predictive-DTC (MP-DTC) for PMSG [7], which significantly minimizes the computational effort [8,9]. Moreover, different types of sliding-mode control (SMC) applied to VS-WECS, such as second-order SMC, fuzzy SMC (F-SMC), and integral SMC (I-SMC), have previously been discussed [10][11][12][13]. The results were compared with conventional control strategies and indicated good control effects of the SMCs. order SMC, fuzzy SMC (F-SMC), and integral SMC (I-SMC), have previously been discussed [10][11][12][13]. The results were compared with conventional control strategies and indicated good control effects of the SMCs.
Reference [14] proposed a control strategy for the PMSG wind energy generation system based on vector control theory (VC) for the MSC and GSC. The results showed a good dynamic and steady-state performance. A new control for a grid-connected PMSG-based wind turbine structure was introduced in [15] by using the predictive controllers and state estimators. However, this method needs more parameter tuning efforts. The authors of [16] proposed a new adaptive perturb and observe (AD-PO) and hybrid P&O (HB-PO) for a grid-connected PMSG. A fast-tracking speed with low ripples was achieved using this strategy.
Another previous study proposed a direct power control (DPC) based on SMC for the grid-connected WECS [17] in which the active and reactive power compensation components were simply calculated without engaging the decomposition of positive-sequence voltage and negative-sequence stator current.
Another study proposed a new robust variable-step perturb-and-observe (RVS-P&O)-based MPPT algorithm [18]. The proposed approach was applied to a wind-turbinebased PMSG. The results showed the superiority of the robust variable-step P&O over the competing-based P&O techniques.
This paper focused on the performance analysis, modeling, and control of a PMSGbased WECS, introduced a mathematical model of the complete WECS, and analyzed the MSC and GSC controllers. The six-sectors DTC was applied to the MSC, and some drawbacks that affect system reliability and performance were noticeable, such as high ripples in the electromagnetic torque, current, and flux. To overcome this problem, a 12-sectors DTC control was proposed. This work used a DTC with 12 sectors of 30° each compared to 60° in the conventional 6-sectors DTC and, thus, the switching became more accurate. The proposed controller was verified on a PMSG-based VS-WECS. The simulations were carried out in the MATLAB/Simulink environment, and the characteristics of the PMSG for two different DTC algorithms are discussed and compared to satisfy the best topology in relation to torque, flux ripple calculations, and the spectrum analysis of the stator current.

WECS System Modeling
The system configuration of the PMSG-based WECS is presented in Figure 1. The system consisted of a direct-driven PMSG connected to the grid through a back-to-back (BTB) power converter. The BTB power converter had two converters, an MSC, which was designed to achieve the maximum power point tracking (MPPT), and a GSC, which was designed to stabilize the direct current (DC) link voltage at the rated value and control the reactive power.

Mechanical Model of a Wind Turbine
The aerodynamic mechanical power (P m ) as a function of the effective wind speed (v) can be described as follows [19,20]: where ρ is the air density (1.225 kg/m 3 ); C p is the coefficient of power conversion; r is the blade tip radius (m); λ is the tip speed ratio (TSR); β is the blade pitch angle in degrees. The coefficient C p is a function of (λ, β) and can be expressed as follows [20]: where ω m is the mechanical rotational speed of the PMSG; ω t is the turbine rotational speed; G r is the gear ratio (G r = 1, gearless PMSG); the coefficients c 1 to c 6 [20] are c 1 = 0.5176; c 2 = 116; c 3 = 0.4; c 4 = 5; c 5 = 21; c 6 = 0.0068. Assuming a single mass model of the drive train system, the mechanical equation of the wind turbine can be defined as follows: where T m is the turbine-driving torque (N·m); J eq is the total equivalent inertia of the turbine and generator (kg·m 2 ); B is the damping coefficient representing the turbine and generator rotational losses (N·m·s); T e is the electromagnetic torque of the generator (N·m). The complete block diagram of the dynamic model of the wind turbine is summarized in Figure 2.

PMSG Modeling
The dynamic model of the PMSG has been reviewed in previous research [21][22][23]. The equivalent circuit of PMSG in the d-q axis reference frame is shown in Figure 3. Based on that, the dynamic voltage equations, v q and v d , expressed in the d-q frame can be written as follows: where, v q , v d , i q , and i d are the d-q axis components of the stator voltages and currents, respectively; R is the stator resistance; L q and L d are the d-q axis inductance; ϕ f is the permanent flux linkage; ω e is the electrical rotating speed of the generator. In addition, the electromagnetic torque can be expressed as follows: where P is the number of pole pairs. The final dynamic model of the PMSG in the d-q reference frame can be expressed as follows: According to Equation (8), the block diagram of the dynamic model of the PMSG was derived as shown in Figure 4.

LCL Filter
Due to the fact of its compact size and better performance in the attenuation of switching ripples, the LCL filter has received significant attention, especially in high-power applications. However, the LCL configuration can lead to resonance and, thus, instability problems [24,25]. Therefore, to ensure stable operation, the controller parameters should be carefully designed.

Two-Level Converter with LCL Filter
A three-phase, two-level voltage source converter (VSCs) with an LCL filter is shown in Figure 5a, while Figure 5b presents the equivalent single-phase LCL filter. The LCL filter is composed of the converter-side inductance (L 1 ) and its parasitic resistance (R 1 ), the grid-side inductance (L 2 ) and its parasitic resistance (R 2 ), the filter capacitance (C f ), the capacitor series resistance, and any added damping resistance (R c ). V conv is the inverter output voltage, v s is the grid-side voltage, L s and R s are the inductance and resistance of the source impedance of the grid bus to the point of common coupling (PCC), respectively, and v pcc is the vector of the PCC phase voltage. The dynamic equations for the LCL filter can be written as follows: Rearranging the differential equations, the state-space model of the LCL filter can be written as follows: World Electr. Veh. J. 2022, 13, 123 Based on the previous mathematical model, the block diagram of the LCL filter was built as shown in Figure 6.

Filter Parameters Design
The parameter design of the LCL filter plays an essential role in transmitting highquality power to the grid. In this paper, the design framework of the LCL filter had three main determinants: 1.
The converter-side inductor was calculated based on the desired current ripple attenuation; 2.
The filter capacitance (C f ) was designed based on the filter's resonance frequency; 3.
The capacitor series resistance (R c ) was selected based on the required damping factor.
The ripple current (∆I Lmax ) was derived based on the worst case, where the maximum converter current ripple was obtained during the zero-crossing of the phase voltage [26,27], i.e., when the applied converter voltage varied from V DC 3 to − V DC 3 (see Figure 7): where f sw is the switching frequency and m is the inverter modulation factor. By selecting a maximum permissible current ripple (e.g., (∆I Lmax = 10%)), the required minimum converter-side inductor can be calculated according to the following equation: The capacitor (C f ) was designed with the assumption that the reactive power (Q) was less than α% of the rated power (P rat ), and α was a positive factor [28][29][30]: where v s is the stator RMS voltage, and ω g is the grid angular frequency. The filter capacitor can be calculated as follows: where C b is the base capacitance calculated based on the nominal values of the voltage (V nom ), power (p nom ), and frequency (ω nom ) and x is the percentage of the reactive power absorbed under rated conditions (e.g., x ≤ 5%): The grid-side inductor L 2 was selected according to the grid code requirements related to the harmonic current limits. It can be calculated based on the current ripple attenuation (δ). The current ripple attenuation was defined as the ratio of grid current (i 2 ) to the converter output current (i 1 ): To avoid resonance problems, the resonance frequency (f res ) should be in the range of 10 times the grid frequency (f g ) and one-half of the switching frequency (f sw ) [31]: where f res = ω res 2π ω res = Finally, adding a passive damping resistor (R c ) ensures a more stable operation of the LCL filter. According to previous work [31,32], the damping resistor was chosen as one-third of the impedance of the capacitors at resonant frequency:

Modeling of the DC Link
The DC link is represented as a shunt capacitance connected between the MSC and GSC as depicted in Figure 8.
Based on the maximum permissible voltage ripple, the DC-link capacitance can be selected. The voltage ripple (∆V DC ) depends on the DC-link capacitor size and switching frequency. The DC-link capacitor (C DC ) is expressed as follows [33]: where P nom is the nominal power of the voltage source converter (VSC), and f is the fundamental frequency of the AC power supply. In this work, the allowed DC-link voltage ripple was ∆V DC ≈ 5% of V DC .

Control of the GSC
The main purpose of a GSC controller is to stabilize the DC-link voltage and control the reactive power flowing from or to the grid, i.e., the unity power factor [34]. The active and reactive power can be controlled by the direct and quadratic current using grid voltageoriented control (VOC). On the VOC, the grid voltage is aligned to the d-axis, as depicted in Figure 9, allowing for decoupled control of the active and reactive power flowing between the GSC and the grid.
The detailed control structure of the VOC is shown in Figure 10. Two inner and outer loops were used to control the GSC. The outer loop was used to adjust the DC-link voltage and the reactive power for the grid side, while the inner loop was used to control the power at the grid side.
Assuming the LCL filter resonance frequency was much lower than the switching frequency, the LCL filter can be considered an RL filter [24,35]. Based on this approximation, the resistance and inductance of the modified model of the LCL filter can be expressed as: where R f and L f are the resistance and inductance of the equivalent RL filter, respectively.  Using the modified filter model, the voltage and current relationship between the grid and the converter output can be expressed as follows: where v dg and v qg are the dq-axis components of the grid voltages; i dg and i qg are the dq-axis components of the grid currents; v di and v qi are the dq-axis components of the converter voltages.
While decoupled active and reactive power control was performed by aligning the grid voltage to the d-axis (i.e., v qi = 0), the active and reactive power was solely related to the d-axis and q-axis current through the grid filter: where P grid and Q grid are the active and reactive powers of the grid-side converter, respectively. The DC-link voltage can be easily controlled through the d-axis current, i dg , as follows: Furthermore, the synchronous reference frame phase-locked loop (SRF-PLL) was used to calculate the grid-side phase angle (θ g ) and grid angular frequency (ω g ). As the d-axis grid voltage was aligned to the d-axis, the calculated angle was adjusted until the q-axis grid voltage became zero.
As previously mentioned, the GSC controller scheme was implemented with two current-control loops. Firstly, the d-axis current was used to regulate the DC-bus voltage. The difference between the reference and the measured values of the DC-link voltage was amplified by the PI regulator, resulting in the d-axis current reference (i re f gd ). Subsequently, the i gd was controlled to track the i re f gd through the PI regulator. A compensation (decoupling) was used to eliminate the coupling between the d-axis and q-axis current controls. Based on that, the output of the PI regulator was added to a compensation term and, thus, the d-axis reference voltage of the converter v md was obtained.
The second control loop was the reactive-power control loop, which was controlled through the q-axis current, i qg , see Figure 10. The q-axis current reference (i re f qg ) was calculated based on (28). A PI regulator was used to control the q-axis current (i gq) . Finally, the q-axis reference voltage of the converter (v mq ) was obtained by adding the output of the PI regulator to the compensation term. Once the reference voltages v mq and v md were obtained and transformed into the abc frame, the PWM pulses were generated and fed to the grid converter.

Conventional 6-Sectors DTC
DTC directly controls the stator flux and electromagnetic torque by selecting the appropriate converter state. A complete block diagram of the DTC is shown in Figure 11. As shown, the reference values for the stator flux and electromagnetic torque were compared to the estimated values to produce the error of the stator flux and torque, which were transferred to their respective hysteresis comparators.
The stator flux was controlled through a two-level hysteresis comparator, while the electromagnetic torque was controlled using a three-level hysteresis comparator as shown in Figure 12.
The hysteresis comparators generate the required hysteresis band of flux and torque, and then the optimal vector voltage is selected. In this case, the optimal vector voltage was generated by the MSC to track the required increase or decrease in the torque and flux variables.
As shown in Figure 12, the output of the torque hysteresis band controller is represented by the variable H Tem , which refers to increased (HT = 1), decreased (HT = −1), or constant (HT = 0), depending on the input.  Since the DTC keeps the amplitude of the stator flux vector at a near-constant value for fixed time intervals, and assuming that the stator resistance (R) voltage drop was neglected (i.e., the stator voltage remained constant), the stator voltage directly affected the stator flux according to the following equation: By selecting the right voltage vector (v i ) for each time interval (∆t), it is possible to estimate the flux (ϕ i ) and, thus, the electromagnetic torque can be calculated as a result of the equation presented below (34). The voltage vector plane was divided into six sectors, as shown in Figure 13, while the optimal voltage vector was selected based on the switching table shown in Table 1.

Torque and Flux Reference Values Definition
It is well known that the stator flux can be estimated through the voltage and current of the stator [1].
where ϕ sα and ϕ sβ are the αβ-axis components of the stator fluxes; v sα and v sβ are the αβ-axis components of the stator voltages; i sα and i sβ are the αβ-axis components of the stator currents, see Figure 9. Based on Equation (31), the magnitude (|ϕ s |) and angle position of the stator flux vector (θ s ) can be calculated as follows: The flux reference (ϕ ref ) was obtained using a lookup table. The lookup table provides the ϕ ref as a function of the speed (ω r ). In this work, the flux was assumed as a constant value, rated value (ϕ rated ), during the operation in the range of the nominal speed (ω nom ). Conversely, as the speed becomes higher than the base speed, the flux should be reduced: The torque reference is generated from the speed controller and then compared to the estimated torque. In this paper (see Section 5), the torque reference was assumed to be constant over a certain interval of time and modeled as a time step function. According to previous research [1,36], the electromagnetic torque can be estimated as follows:

Proposed 12-Sectors DTC of the PMSG
The main disadvantages of the conventional 6-sectors DTC are the variable switching frequency, the high-current total harmonic distortion (THD), the high torque ripples, and the problem of flux drop at low speeds [37,38].
Furthermore, in conventional DTC, two states of presented torque are not used (see Table 1). The voltage vectors V 1 and V 4 do not exist in the first sector, and that is right for the other sectors with different voltage vectors. This leads to inaccuracy in the torque and flux within a 60 • sector. In this paper, to overcome these drawbacks, a 12-sectors DTC is proposed, where the sector number is increased to 12 sectors of 30 • for each sector rather than 60 • . Table 2 shows the possible voltage vector combinations in the proposed 12-sectors DTC technique, where H Tem = 2,−2 (T ↑↑ , T ↓↓ ) represents a large increase and decrease in torque; H Tem = 1, −1 (T ↑ , T ↓ ) represents a small increase and decrease in torque; Hϕ = 1, −1 (ϕ ↑ , ϕ ↓ ) represents an increase and decrease in flux. The voltage vector plane was divided into 12 sectors, as illustrated in Figure 14.  Figure 14. Voltage vectors in the proposed 12-sectors DTC.
In this approach, a four-level hysteresis comparator was applied to the torque, and a two-level was used for the flux. The following conditions were used in the torque comparator: (37) where H Tem is the torque status signal; ∆T em is the difference between the reference and actual values of electromagnetic torque (∆T em = T em−re f − T em ); HB T is the hysteresis band of the torque.

Results and Discussion
To verify the proposed 12-sectors DTC control strategy, a MATLAB/Simulink-based simulation was carried out. The nominal parameters of the 3.5 kW system are listed in Table 3. In the simulation, the torque hysteresis band was selected as 5% T n , and the flux hysteresis band value was set at 2%ϕ. The DC-link was kept at approximately 1200 V. The sampling time of both DTC algorithms was 50 µs.
The reference torque was selected as a function of time, as depicted in Figure 15. As shown, for the conventional 6-sectors DTC and the proposed 12-sectors DTC, the simulated torque followed its reference well, with notable ripples. Conversely, the reference was reached quickly, i.e., settling time ≈ 810 µs for the 6-sectors DTC and ≈700 µs for the 12-sectors DTC. This confirms the advantages of the fast torque response of DTC techniques. Further, Figure 16 depicts the stator flux, which attracted its reference well. The trajectory of the stator flux vector is presented in Figure 17. From Figure 17, it is clear that the stator flux vector rotated with a constant magnitude and small oscillation.  However, the main drawback of DTC is the ripple in torque and flux due to the variable switching frequency. As shown in Figure 15, in the comparative results between the 6-sectors and 12-sectors DTCs, the dynamic responses were almost the same, but the torque and flux ripples during transient and steady-state were clearly reduced in the proposed 12-sectors method. Table 4 presents the ripples percentage of torque and flux at different reference torque values. As expected, both DTC algorithms had ripples in torque and flux, and it is clear that the 12-sectors DTC had the best performance, as the ripples were significantly reduced over a wide operation range. In the conventional 6-sectors DTC, and due to the fact that two states of the presented torque were not used, the torque control was ambiguous. This resulted in high ripples in the torque and flux, see Table 4.
Conversely, applying the 12-sectors strategy guaranteed that all voltage vectors were used and, therefore, the switching was more accurate and had a good dynamic response.
Further, using twelve 30 • sectors for voltage and flux vectors and applying the fourlevel hysteresis comparator (i.e., a large increase and decrease, a small increase and decrease in torque) provided additional degrees of freedom to select the optimal voltage vectors. This was mainly because the number of sectors was the most influential factor in reducing ripples and, hence, smooth operation.
The steady-state response of the stator voltages is presented in Figure 18. Figure 19 presents the stator flux sectors for both techniques, where the main difference is the sectors' division with respect to time.  To achieve a deeper analysis of the discussed DTC techniques, the fast Fourier transform (FFT) was applied to the stator currents in order to determine the current total harmonic distortion (THD). The results are presented in Figure 20, and they show that the THD of the stator current was 12.40% and 3.30% for the 6-sectors and 12-sectors DTC, respectively.
It is clear from the analysis that the 12-sectors DTC had the best performance and the least number of ripples when compared to the conventional 6-sectors DTC. The considerable simplicity, reduction in torque and flux ripples, good dynamic responses, and low THD of the 12-sectors controller verify its effectiveness. Conversely, due to the increase in the size of the switching table, the computational complexity was prominent when using the 12-sectors control scheme.

Conclusions
The dynamic modeling and control approach of a WECS with a variable-speed directdriven PMSG was presented in this paper. Through this, a new 12−sectors DTC control technique for PMSG-based wind turbines was proposed. The principle of the 6-sectors DTC control algorithm was first investigated, and, subsequently, the proposed DTC technique was presented in order to improve the performance and overcome the disadvantages of the conventional method. The simulations were carried out in the MATLAB/Simulink environment, and the characteristics of the PMSG for both the DTC algorithms were discussed and compared.
Compared to the conventional 6−sectors method, the proposed 12−sectors DTC showed more satisfactory performance with a considerable reduction in flux and torque ripples, good dynamic performance, low THD and, thus, the best output characteristics.
Future work can extend the current study by implementing the proposed control technique in an FPGA-based control system.