THD Reduction in Wind Energy System Using Type-4 Wind Turbine/PMSG Applying the Active Front-End Converter Parallel Operation

Strathprints is designed to allow users to access the research output of the University of Strathclyde. Unless otherwise explicitly stated on the manuscript, Copyright © and Moral Rights for the papers on this site are retained by the individual authors and/or other copyright owners. Please check the manuscript for details of any other licences that may have been applied. You may not engage in further distribution of the material for any profitmaking activities or any commercial gain. You may freely distribute both the url (https://strathprints.strath.ac.uk/) and the content of this paper for research or private study, educational, or not-for-profit purposes without prior permission or charge.


Introduction
Nowadays, the number of wind energy systems (WES) has increased dramatically, as evidence of this; in 2013, WES were installed in more than 80 countries, generating a power of 240 GW [1], in 2014, the generation reached a capacity of 369.9 GW [2], in 2015, a production of 432.883GW was generated [3].By the end of 2016 a global generation of 487 GW was installed [4], and in 2021 the installed capacity is expected to exceed 800 GW [5].Within the types of variable speed wind turbines (WT) there are three types: Type-2 (squirrel-cage induction generator (SCIG)), type-3 (double-fed induction generator (DFIG)) and type-4 (squirrel-cage induction generator (SCIG)/permanent magnet synchronous generator (PMSG) with full-scale back-to-back converter); in which, type-2 has a 10% variability in the rotor, type-3 has a 30% variability, and type-4 has 60% in the variability of the rotor speed [6].The type-3 (DFIG) wind turbine schemes constitute the majority of variable speed commerce applications; however, the type-4 WT with a PMSG (WT-PMSG) is an attractive and the best option since this is not directly connected to the grid, presenting advantages such as: High efficiency, commerce applications; however, the type-4 WT with a PMSG (WT-PMSG) is an attractive and the best option since this is not directly connected to the grid, presenting advantages such as: High efficiency, increased reliability, major variable speed operation, and low cost in maintenance and installation, due the absence of gearboxes [7].In the type-4 WT-PMSG installation the important aspects to prevent are associated problems with the wind-nature fluctuations.For example: The flicker generation is mainly caused by load flow changes, due to its continuous operation [8]; a power factor not unity, this characteristic happens as the modulation index of the back-to-back converter is not high [9].Voltage sags occur by the sudden changes in the rotor speed of the type-4 WT-PMSG and cause a decrement in the transferred power from the dc-link to the grid [10].A higher total harmonic distortion (THD) is mainly produced by the power converters switching, this results in serious pulsations in the type-4 WT-PMSG output power and in several power losses at the WES [11][12].All these problems can be mitigated through the full-scale back-to-back converter in the type-4 WT-PMSG scheme, and this generates the following advantages [13][14][15][16]: (i) Bidirectional power flow; (ii) adjustable dc-link voltage; (iii) a sinusoidal grid-side current with an exchange of active and reactive power.These advantages are possible because the generated whole power by the type-4 WT-PMSG on the AC grid is supplied through the back-to-back converter.
However, its implementation is very difficult, since this must handle very high powers of up to 6 MVA.Notwithstanding, the Active Front-End (AFE) converter topology provides a viable and efficient solution to improve the power transfer capacity and reliability of the WES quality; the AFE converter is generated by modifying a conventional back-to-back converter, from using a single voltage source converter (VSC) to use pVCS connected in parallel, as shown in Figure 1.As evidence, in [3] the authors describe the principal WT manufacturers, those in low voltage and medium voltage technologies are classified, generating power ratings of >3 MVA and <3 MVA, respectively.In the open literature there exists some research works that address the AFE converter topology applied to WES; for example, in [17] the authors analytically and experimentally present the control method for the current balance in an AFE power converter of 600 kVA, this is a very important topic in the parallel connection of power converters, however, the authors make the AFE converter analysis connecting only two VSCs in parallel, generating: A THD of 4.32% (three times higher than in our research work with THD of 1.23%); in addition, they use the space vector modulation for the switching of VSCs, which generates a more complex control if pVSC in parallel are connected.The main goal of this work is the AFE converter topology application for the THD reduction in a WES and the increase of power transfer between the WT and the AC grid; generating greater capability, efficiency, and reliability in the energy conversion at the WES.The main goal of this work is the AFE converter topology application for the THD reduction in a WES and the increase of power transfer between the WT and the AC grid; generating greater capability, efficiency, and reliability in the energy conversion at the WES.

Contributions from this Work
Energies 2018, 11, 2458 3 of 23 In this paper, the AFE converter topology applied in the THD reduction at WES is made.Through the AFE converter parallel topology the following advantages were possible: (i) Increased the converter power capacity.(ii) Minimized size of each VSC unit, which manages a portion of the total nominal power.(iii) A reduced ripple on the injected current, which improves the voltage quality at the Point of Common Coupling (PCC).(iv) An increased equivalent switching frequency, generating a smaller passive filter on the AC-side.(v) The possibility of THD Reduction at the WES, modifying the Digital sinusoidal pulse width modulation (DSPWM) switching signals in each VSC.
To verify the functionality and robustness of the proposed methodology, an AFE converter formed with three VSCs connected in parallel is incorporated, as shown in Figure 1.The WES simulation in Matlab-Simulink ® is analyzed, and the experimental laboratory tests using the concept of rapid control prototyping (RCP) and the real-time simulator Opal-RT ® is achieved.The obtained results show a WES prototyping that incorporates a type-4 wind turbine with a total output power of 6 MVA and a THD reduction of up to 5.5 times.
This paper is organized as follows: Section 2 details the modeling of the Type-4 WT-PMSG; first, the modeling power transfer control between the WT-PMSG and AFE converter is generated; subsequently, the modeling of the machine-side VSC control, DC-link control and the grid-side VSC control of the AFE converter is analyzed, and finally, the design of the AFE converter system parameters is presented.Section 3 presents the modeling of the DSPWM Technique Applied in the THD Reduction.Section 4 shows the simulated results of a study case for WES.Section 5 presents the real-time simulation results of a study case for WES using Opal-RT Technologies ® .Finally, in Section 6, the conclusions are presented.

Modeling of the Type-4 WT-PMSG
The AFE converter structure consists in two power electronics converters: A machine-side VSC (MSC) to provide power conversion between medium AC voltage and low DC voltage levels, and a grid-side VSC (GSC) to generate the voltages required by the consumers [18], for which, the next sections describe the control modeling of MSC and GSC and these are shown in Figure 2.

Contributions from this Work
In this paper, the AFE converter topology applied in the THD reduction at WES is made.Through the AFE converter parallel topology the following advantages were possible: (i) Increased the converter power capacity.(ii) Minimized size of each VSC unit, which manages a portion of the total nominal power.(iii) A reduced ripple on the injected current, which improves the voltage quality at the Point of Common Coupling (PCC).(iv) An increased equivalent switching frequency, generating a smaller passive filter on the AC-side.(v) The possibility of THD Reduction at the WES, modifying the Digital sinusoidal pulse width modulation (DSPWM) switching signals in each VSC.
To verify the functionality and robustness of the proposed methodology, an AFE converter formed with three VSCs connected in parallel is incorporated, as shown in Figure 1.The WES simulation in Matlab-Simulink ® is analyzed, and the experimental laboratory tests using the concept of rapid control prototyping (RCP) and the real-time simulator Opal-RT  is achieved.The obtained results show a WES prototyping that incorporates a type-4 wind turbine with a total output power of 6 MVA and a THD reduction of up to 5.5 times.
This paper is organized as follows: Section 2 details the modeling of the Type-4 WT-PMSG; first, the modeling power transfer control between the WT-PMSG and AFE converter is generated; subsequently, the modeling of the machine-side VSC control, DC-link control and the grid-side VSC control of the AFE converter is analyzed, and finally, the design of the AFE converter system parameters is presented.Section 3 presents the modeling of the DSPWM Technique Applied in the THD Reduction.Section 4 shows the simulated results of a study case for WES.Section 5 presents the real-time simulation results of a study case for WES using Opal-RT Technologies  .Finally, in Section 6, the conclusions are presented.

Modeling of the Type-4 WT-PMSG
The AFE converter structure consists in two power electronics converters: A machine-side VSC (MSC) to provide power conversion between medium AC voltage and low DC voltage levels, and a grid-side VSC (GSC) to generate the voltages required by the consumers [18], for which, the next sections describe the control modeling of MSC and GSC and these are shown in Figure 2.

Modeling of the Machine-Side VSC Control at AFE Converter
The MSC provides the rotor flux frequency control, thus enabling the rotor shaft frequency to optimally track wind speed [19].The time-domain relationship of the VSC AC-side is given by: where h is the MSC three-phase vector (a,b,c), L MSC is the PMSG armature inductance, R MSC is the PMSG stator phase resistance, v MSC and i MSC are the MSC voltage and current, respectively, v WT-PMSG is the generated WT-PMSG voltage.
Then, the dq reference frame model derived from the AC-side of the MSC, including the inductances cross-coupling, is described as: where ω rPMSG is the PMSG rotor angular velocity; λ mPMSG is the maximum flux linkage generated by the PMSG rotor magnets and transferred to the stator windings.
The generated MSC voltage is given by: where g is the dq components reference frame vector of the MSC, VDC is the DC-link voltage, m g MSC is the modulated index vector. Making , the presence of ω rPMSG L MSC in (2) indicates the coupled dynamics between i d MSC and i q MSC .To decouple these dynamics, the i q MSC vector signals are changed, based in the dq reference frame, i.e., where E d MSC (t) and E q MSC (t) are two additional control inputs.The MSC plant is obtained by substituting (4) into (3), subsequently, (3) is substituting into (2) generating a first order lineal system that, in Equation ( 5) is described.
Equation ( 5) in the time domain is represented; its representation in the frequency domain is shown in (6); which describes a decoupled and first-order linear system, controlled through Rewriting equation ( 6), the transfer function representing the MSC plant is given, i.e., Energies 2018, 11, 2458

of 23
With the purpose of tracking the i g MSC (s) reference commands in the loop, the proportional-integral (PI) compensators are used, obtaining: where kp g MSC and ki g MSC are the proportional and integral gains, respectively, α MSC =2.2/ τ MSC is the MSC bandwidth of the closed loop control and τ MSC is compensator response time.
Substituting Equation ( 8) into (7), the closed-loop transfer function ι g MSC (s) is formed: If in open loop the expression (9) tends to be ∞ when s = jω → 0 , this guarantees that, in closed loop the system will not have a phase shift delay.
Based on (9), the relation between the plant pole and the PI compensator zero is obtained through (10), generating the kp g MSC and ki g MSC control gains.
Compensator response time, τ MSC , in the range from 5 to 0.5 ms is selected, in this case a τ MSC = 2.2 ms is designated.

Modeling Power Transfer Control between the WT-PMSG and AFE Converter
In the WT-PMSG power transfer modeling the following power-speed characteristics are considered [20]: (i) The base angular velocity of the WT is determined by the base rotor angular velocity of the PMSG, ω WTb = ω rPMSGb ; (ii) the WES base power is determined by the WT-PMSG nominal power, P WESb = P WT-PMSGb ; iii) the output base power of the AFE converter is determined by the base WES power, P AFEb = P WESb ; this power is transferred from WT to PMSG through the electric torque, this is represented by: where T ePMSG is the PMSG electrical torque, L d MSC and L q MSC are the dq reference frame components of the PMSG armature inductance.
However, considering that the rotor has a cylindrical geometry, then it is established that, : Then, to realize the WT-PMSG variable speed control, it is necessary to generate the plant model that represents it.Therefore, in (13) the dynamic characteristics are shown as a time function so that it represents: where D is the PMSG viscous damping, H is the inertia constant (s), T mWT is the WT mechanical torque.
Energies 2018, 11, 2458 6 of 23 Equation ( 13) analyzes the WT-PMSG in the time domain; however, the WT-PMSG plant representation requires a transfer function to design the ω rPMSG control.By using Laplace transformation, the WT-PMSG plant in the frequency domain is represented, i.e., Equation ( 14) shows a multiple inputs single output system (MISO); however, because in steady state it is valid that T mWT ≈ T ePMSG , then, in the control design it is considered that T mWT = 0; generating a single input single output system (SISO), as shown in (15).
With the purpose of tracking the ω rPMSG reference commands in the closed-loop transfer function, the proportional-integral (PI) compensators are used.The feedback loop ι q rPMSG (s) is: where kp q rPMSG and ki q rPMSG are the proportional and integral gains, respectively.From ( 16), the relation between the plant pole and PI compensator zero is obtained and the control gains using the next expression are generated: where the subscript τ PMSG is the response time by the closed loop of the WT-PMSG first-order transfer function.This is selected according to the WT-PMSG transferred power and this must be at least ten times higher than τ MSC .

Modeling of the Grid-Side VSC Control of the AFE Converter
The GSC is used to keep the DC-link constant, transferring the generated power between the WT-PMSG and AC grid.The time-domain relationship of the VSC AC-side is given by: where l is the VSC three-phase vector (a,b,c ), L GSC and R GSC are the RL filter parameters through which the AFE converter is connected to the grid, v GSC and i GSC are the GSC voltage and current, respectively; v WES is the generated WES voltage.Then, from ( 18) the derived dq model is described as: where ω 0 is the WES angular frequency; the generated GSC voltages are given by: where k is the dq components reference frame vector of the grid-side VSC, m k GSC is the modulated index vector.
Energies 2018, 11, 2458 , the presence of ω 0 L GSC in (19) indicates the coupled dynamics between i d GSC and i q GSC .Decoupling these dynamics changes m d GSC and m q GSC , based in the dq reference frame, i.e., where E d GSC (t) and E q GSC (t) are two additional control inputs.The GSC plant is obtained by substituting ( 21) into (20), subsequently, ( 20) is substituting into (19) generating a first order lineal system, this in Equation ( 22) is described as: The frequency domain of the Equation ( 22) is shown in (23); which describes a decoupled, first-order, linear system, controlled through E k GSC (s).Also, Equation ( 23) represents the grid-side VSC plant.
With the purpose of tracking the i k GSC (s) reference commands in the closed loop, the proportional-integral (PI) compensators are used, obtaining: where kp k GSC and ki k GSC are the proportional and integral gains, respectively.The feedback loop ι k GSC (s) is: The relation between the plant pole and the PI compensator zero is obtained in (26), generating the kp k GSC and ki k GSC control gains and α GSC =2.2/ τ GSC is the GSC bandwidth of the closed-loop control.
where τ GSC is selected from 5 to 0.5 ms based on the transferred power.

The DC-Side Control of the AFE Converter
GSC improves the DC-link control.The time-domain relationship of the DC-link of the AFE converter is given by: The sum of currents entering the capacitor is: Energies 2018, 11, 2458

of 23
The functionality of the AFE converter requires that: The DC-link control is calculated through the stored energy in the capacitor, that is, where U DC is the stored energy in the capacitor and C DC is the DC-link capacitance.
Considering that U DC (s) ≈ P GSCref (s), and using the d reference frame component of grid-side VSC plant described in (22) the DC-link control is made, generating the active power control, that is: The reactive power control is made with the q reference frame component of the GSC plant described in (22), that is, where Q WES is the presented reactive power at the WES.
It is important to consider that, the subscript τ WES presented in (32) must be at least ten times higher than τ GSC .

System Parameters Design of the AFE Converter
The correct operation of the type-4 WT control depends on the precise design of the AFE converter parameters; thus, the element's values of the MSC are obtained from the WT-PMSG nominal power, P WT-PMSG , that is: the current is i MSC = (2/3)(P WT-PMSG /v MSC ); the machine-side impedance is Z MSCt = v MSC /i MSC , thus, the MSC works with 15% of the total WT-PMSG impedance, i.e., Z MSC = (0.15)ZMSCt ; from the WT-PMSG characteristics the following parameters are taken: L MSC , R MSG , D, H.The element's values of the GSC are obtained from the WES nominal power, but to achieve P WES = P WT-PMSG i GSC is generated using i MSC = (2/3)(P WES /v GSC ); the grid-side impedance is Z GSCt =v GSC /i GSC the GSC works with 15% of the total WES impedance, i.e.,: Z GSC = (0.15)ZGSCt ; therefore, L GSC is calculated with L GSC = Z GSC / ω 0 , the R GSC value varies according to the transferred power, in a range from 0.1 Ω to 0.5 Ω; the base WES capacitance C WES is calculated with C WES = 1/(Z GSC ω 0 ).Then, a better time response in the WES feedback is achieved, since the L MSC and R MSC values are used in (10), H and D values are used in (17), L GSC and R GSC values are used in (26), to obtain the system feedback gains.It is important to establish that from the generated active power by the GSC, v WES is kept constant in the presence of any perturbation; for which, it is essential to calculate the correct capacitance value that maintains the DC-link compensation.This is determined from the base DC-link capacitance, i.e., C DC = (3/8)C WES , determining the store energy in Equation (30).

Modeling of the DSPWM Technique Applied in the THD Reduction
Digital modulation techniques are the most generalized framework in the control of modern power electronics converters applications.Digital sinusoidal pulse width modulation (DSPWM) is a modulation technique created by the internal generation of the modulated and carrier signals using a digital controller [22].
THD reduction is achieved by modifying the DSPWM switching signals in each VSC.This is carried out by applying a different phase shift angle in each carrier signal of each VSC; the modulated signal angle is not changed.Then, the output signals (voltage or current) of each VSC are added.In this paper, the AFE converter is built with three VSC connected in parallel.Figure 3 shows the comparison between the modulated (without phase shift angle) and carrier (with phase shift angle) The correct phase shift angle between each carrier signal is established putting up different values of total phase shift angle at the WES, see Figure 2. The analysis is shown in Table 1.In Table 1 it is observed that the angle that generates a lower THD is 3/2; hence, this angle divides the number of VSCs placed in parallel, i.e., (33) where p is the number of VSC connected in parallel and p is the carrier signal phase shift angle of each VSC.The n-harmonics content is calculated through the Fourier series expansion, i.e., (34) In Table 1 it is observed that the angle that generates a lower THD is 3π/2; hence, this angle divides the number of VSCs placed in parallel, i.e., where p is the number of VSC connected in parallel and θ p is the carrier signal phase shift angle of each VSC.The n-harmonics content is calculated through the Fourier series expansion, i.e., where n is the harmonic number, MSC,GSC /a n MSC,GSC ) and C 0 = a 0 /2.The magnitude of each harmonic is calculated by, To calculate the THD in the AFE converter, the individually equivalent circuit of each three-phase VSC is analyzed.
A three-phase VSC equivalent circuit is shown in Figure 4.
Energies 2018, 11, 2458 10 of 22 The magnitude of each harmonic is calculated by, (36) To calculate the THD in the AFE converter, the individually equivalent circuit of each three-phase VSC is analyzed.
A three-phase VSC equivalent circuit is shown in Figure 4.
Using Kirchhoffʹs current law (KCL), the currents flowing towards the MSC or/and GSC node must be equal to the currents leaving the MSC or/and GSC node, i.e., (38) Replacing equation ( 38) in (37) gives line-to-line current of the MSC or/and GSC, i.e., (39) The three-phase VSC is represented by the next equation, Using Kirchhoff's current law (KCL), the currents flowing towards the MSC or/and GSC node must be equal to the currents leaving the MSC or/and GSC node, i.e., where v WT-PMSG represents the WT-PMSG voltage, v WES exemplifies the WES voltage, v MSC,GSC is the VSC AC-side output voltage of MSC or/and GSC, and Z h,l MSC,GSC is the AC-side filter of MSC or/and GSC.
The v MSC,GSC value depends on M h,l MSC,GSC signal modulation.The modulated and carrier signals implement the DSPWM technique of Figure 3; these have modulation frequencies of 60Hz (ω 0 ) and 7kHz (f ω), respectively.
The carrier signal is composed by an up-slope and a down-slope, calculated as, where C t1,t2p is the composed carrier signal, θ p is phase shift angle of each VSC, f ω is switching frequency of the carrier signal, t 1 is the time for the up-slope, t 2 is the time for the down-slope.Time t 1 for up-slope is: Time t 2 for down-slope is: Modulated signals in each VSC are described by the carrier signal time, that is: where h,l = a,b,c the VSC phases in MSC and GSC, respectively, and ϕ is the corresponding angle of each phase in the modulated signal.The comparison between modulated and carrier signals defines the DSPWM signal, its representation is: Multiplying the DSPWM signal and DC voltage amplitude generates the VSCs output voltage for each phase value in MSC and GSC, i.e., The WT-PMSG voltage v h WT−PMSG is generated by, where PMSG is the WT-PMSG amplitude voltage and φ is the corresponding angle of each phase in the three-phase WT-PMSG.
And the WES voltage v l WES is produced by, where WES is the AC grid amplitude voltage and φ WES is the corresponding angle of each phase in the three-phase WES grid.The output current in each VSC is calculated as, The harmonic content spectrum to obtain the THD is required.By using (35), (36), and (49) the spectrum is calculated as, For the harmonic content of the output current signal, the magnitude of the individual harmonics is calculated for each VSC connected in parallel to the MSC and GSC and these are added, i.e., where p is the number of VSCs placed in parallel and n is the number of harmonics.
The THD in the AFE converter output current is, where C 1p MSC,GSC is the fundamental harmonic magnitude and C np MSC,GSC is the n tth harmonic magnitude.Finally, the lower THD content in the output current of the AFE converter is generated when the output current signals of each VSC are added, i.e., Figure 5 shows the flow diagram that describes the generated method for a lower harmonic content, represented from Equations (33) to (55).
Finally, the lower THD content in the output current of the AFE converter is generated when the output current signals of each VSC are added, i.e., (55) Figure 5 shows the flow diagram that describes the generated method for a lower harmonic content, represented from Equations (33) to (55).

Simulation Results: Study Case for WES
In this paper, Matlab-Simulink ® (Matlab r2015b, Mathworks, Natick, MA, USA) and Opal-RT Technologies ® module (OP-5600) (Montreal, QC, Canada) are the main elements in the WES real-time simulation, since the OP-5600 module uses the rapid control prototyping (RCP) concept, which allows testing of the control law without the need for any programming code.
In Figure 2, the simulated WES is shown.It contains a WT-PMSG to supply the MSC, the AFE parallel converter and the infinite bus (considered as an ideal voltage source) to supply the GSC.The MSC and GSC are connected to WT-PMSG and the AC grid through RL filters, both converters are formed by three VSCs connected in parallel and each one is designed to possess a power and voltage of 2 MVA and 2.5 kV, respectively.The characteristics of the WT-PMSG are described in Table 2. To verify the correct WES operation in Figure 2, in Figure 6 the behavior of the WT mechanical torque and the PMSG electric torque are analyzed.
which allows testing of the control law without the need for any programming code.
In Figure 2, the simulated WES is shown.It contains a WT-PMSG to supply the MSC, the AFE parallel converter and the infinite bus (considered as an ideal voltage source) to supply the GSC.The MSC and GSC are connected to WT-PMSG and the AC grid through RL filters, both converters are formed by three VSCs connected in parallel and each one is designed to possess a power and voltage of 2 MVA and 2.5 kV, respectively.The characteristics of the WT-PMSG are described in Table 2. To verify the correct WES operation in Figure 2, in Figure 6 the behavior of the WT mechanical torque and the PMSG electric torque are analyzed.Figure 7 shows the generated current by the WT-PMSG, which is controlled through the MSC of the AFE parallel converter.Because the MSC is formed using the parallel connection of three VSCs, each VSC can handle one third of the total current generated by the WT; Figure 7a-c  Figure 7 shows the generated current by the WT-PMSG, which is controlled through the MSC of the AFE parallel converter.Because the MSC is formed using the parallel connection of three VSCs, each VSC can handle one third of the total current generated by the WT; Figure 7a-c illustrates the current in the ( 1), ( 2), and (3) VSCs, respectively, and in Figure 7d the MSC total current is shown.
While, the main MSC function is the rotor flux frequency control, generating the power conversion between medium AC voltage and low DC voltage levels, the most important GSC function is to keep the DC-link constant, transferring the generated power between the WT-PMSG and AC grid in the voltages required by the consumers.
Figure 8a shows that the DC-link remains constant at 5kV, because, when the MSC requires a reactive power exchange, due to the wind fluctuations of Figure 6a, the GSC restores the DC-Link, and at the same time injects the needed reactive power, as shown in Figure 8b.While, the main MSC function is the rotor flux frequency control, generating the power conversion between medium AC voltage and low DC voltage levels, the most important GSC function is to keep the DC-link constant, transferring the generated power between the WT-PMSG and AC grid in the voltages required by the consumers.
Figure 8a shows that the DC-link remains constant at 5kV, because, when the MSC requires a reactive power exchange, due to the wind fluctuations of Figure 6a, the GSC restores the DC-Link, and at the same time injects the needed reactive power, as shown in Figure 8b. Figure 7 shows the generated current by the WT-PMSG, which is controlled through the MSC of the AFE parallel converter.Because the MSC is formed using the parallel connection of three VSCs, each VSC can handle one third of the total current generated by the WT; Figure 7a-c illustrates the current in the ( 1), ( 2), and (3) VSCs, respectively, and in Figure 7d the MSC total current is shown.
While, the main MSC function is the rotor flux frequency control, generating the power conversion between medium AC voltage and low DC voltage levels, the most important GSC function is to keep the DC-link constant, transferring the generated power between the WT-PMSG and AC grid in the voltages required by the consumers.
Figure 8a shows that the DC-link remains constant at 5kV, because, when the MSC requires a reactive power exchange, due to the wind fluctuations of Figure 6a, the GSC restores the DC-Link, and at the same time injects the needed reactive power, as shown in Figure 8b.signal does not present any phase shift, generating the DSPWM signal in Figure 9c, this is applied to the first VSC connected in parallel in the GSC.In Figure 10, the DSPWM generation applied to the second VSC connected in parallel to the GSC is shown; in Figure 10a, a phase shift of π/2 (rad/s) in the carrier signal is observed.This is compared with the modulated signal of Figure 10b, originating the DSPWM with the phase shift of Figure 10c.Finally, in Figure 11, the DSPWM signal applied to the third VSC connected in parallel of the GSC is presented; in Figure 11a the carrier is observed with a phase shift of π (rad/s) with respect to the modulated signal of Figure 11b, generating the DSPWM of Figure 11c.
Figures 9-11 detail the applied DSPWM to each of the VSCs connected in parallel for the correct operation of the GSC, at the stability time from 4.5 to 4.509 ms.In Figure 9, it can be seen that both the carrier signal of Figure 9a and the modulated signal of Figure 9b start at the same time, i.e., the carrier signal does not present any phase shift, generating the DSPWM signal in Figure 9c, this is applied to the first VSC connected in parallel in the GSC.In Figure 10, the DSPWM generation applied to the second VSC connected in parallel to the GSC is shown; in Figure 10a, a phase shift of /2 (rad/s) in the carrier signal is observed.This is compared with the modulated signal of Figure 10b, originating the DSPWM with the phase shift of Figure 10c.Finally, in Figure 11, the DSPWM signal applied to the third VSC connected in parallel of the GSC is presented; in Figure 11a the carrier is observed with a phase shift of  (rad/s) with respect to the modulated signal of Figure 11b, generating the DSPWM of Figure 11c.the applied DSPWM to each of the VSCs connected in parallel for the correct operation of the GSC, at the stability time from 4.5 to 4.509 ms.In Figure 9, it can be seen that both the carrier signal of Figure 9a and the modulated signal of Figure 9b start at the same time, i.e., the carrier signal does not present any phase shift, generating the DSPWM signal in Figure 9c, this is applied to the first VSC connected in parallel in the GSC.In Figure 10, the DSPWM generation applied to the second VSC connected in parallel to the GSC is shown; in Figure 10a, a phase shift of /2 (rad/s) in the carrier signal is observed.This is compared with the modulated signal of Figure 10b, originating the DSPWM with the phase shift of Figure 10c.Finally, in Figure 11, the DSPWM signal applied to the third VSC connected in parallel of the GSC is presented; in Figure 11a the carrier is observed with a phase shift of  (rad/s) with respect to the modulated signal of Figure 11b, generating the DSPWM of Figure 11c.Figure 12 shows the electrical variables present at the GSC when the corresponding phase shift in the carriers of each VSC connected in parallel is performed, according to Equation (33). Figure 12a shows the (1) VSC current generated due to the phase shift at the carrier of Figure 9a; in which, a zoom in time is made from 9.9 to 10.1 s, observing the current magnitude and behavior in the presence of the reactive power exchange at Figure 8b. Figure 12b shows the (2) VSC current generated due the phase shift at the carrier of Figure 10a; Figure 12c shows the (3) VSC current generated due the phase shift at the carrier of Figure 11a; in Figures 12a-c, each current magnitude is 330 A, generating a total GSC current of 990 A, as seen in Figure 12d; Figure 12e details a zoom in time from 9.9 to 10.1 s, observing the generated voltage at the GSC, the magnitude of which corresponds to 2500 V.  Figure 12 shows the electrical variables present at the GSC when the corresponding phase shift in the carriers of each VSC connected in parallel is performed, according to Equation (33). Figure 12a shows the (1) VSC current generated due to the phase shift at the carrier of Figure 9a; in which, a zoom in time is made from 9.9 to 10.1 s, observing the current magnitude and behavior in the presence of the reactive power exchange at Figure 8b. Figure 12b shows the (2) VSC current generated due the phase shift at the carrier of Figure 10a; Figure 12c shows the (3) VSC current generated due the phase shift at the carrier of Figure 11a; in Figure 12a-c, each current magnitude is 330 A, generating a total GSC current of 990 A, as seen in Figure 12d; Figure 12e details a zoom in time from 9.9 to 10.1 s, observing the generated voltage at the GSC, the magnitude of which corresponds to 2500 V. Figure 12 shows the electrical variables present at the GSC when the corresponding phase shift in the carriers of each VSC connected in parallel is performed, according to Equation (33). Figure 12a shows the (1) VSC current generated due to the phase shift at the carrier of Figure 9a; in which, a zoom in time is made from 9.9 to 10.1 s, observing the current magnitude and behavior in the presence of the reactive power exchange at Figure 8b. Figure 12b shows the (2) VSC current generated due the phase shift at the carrier of Figure 10a; Figure 12c shows the (3) VSC current generated due the phase shift at the carrier of Figure 11a; in Figures 12a-c, each current magnitude is 330 A, generating a total GSC current of 990 A, as seen in Figure 12d; Figure 12e details a zoom in time from 9.9 to 10.1 s, observing the generated voltage at the GSC, the magnitude of which corresponds to 2500 V.  Finally, the current THD is shown in Figure 13; Figure 13a contents the THD without any phase shift between carriers of each VSC of the AFE converter, which corresponds to 6.8%.Please observe that, in Figure 13b, when the corresponding phase shift is performed in the carriers, the current THD is reduced to 1.239%, as specified in Table 1.The Figure 13 shows the harmonics magnitude reduction or even their elimination, once the phase shift between carriers has been made.The THD was reduced by approximately 5.5 times.Finally, the current THD is shown in Figure 13; Figure 13a contents the THD without any phase shift between carriers of each VSC of the AFE converter, which corresponds to 6.8%.Please observe that, in Figure 13b, when the corresponding phase shift is performed in the carriers, the current THD is reduced to 1.239%, as specified in Table 1.The Figure 13 shows the harmonics magnitude reduction or even their elimination, once the phase shift between carriers has been made.The THD was reduced by approximately 5.5 times.

Real Time Simulation Results: Study Case for WES using Opal-RT Technologies
To verify the robustness of the applied control in the AFE converter and the THD reduction at the WES, the grid of Figure 2 in real time using the Opal-RT Technologies is simulated; generating an RCP concept that tests the WES dynamics without the need for any programming code.Specifically, the VSC of the AFE converter is composed by the insulated gate bipolar transistor (IGBTs), these use a switching frequency of 7 kHz.Figure 14a shows the wind fluctuations generated by a rotor wind model developed by RISOE National Laboratory based on Kaimal spectra.Figure 14b contains the mechanical torque behavior generated by the wind turbine, and in response to the applied control at the MSC, the PMSG electric torque is able to follow the same behavior.

Real Time Simulation Results: Study Case for WES using Opal-RT Technologies ®
To verify the robustness of the applied control in the AFE converter and the THD reduction at the WES, the grid of Figure 2 in real time using the Opal-RT Technologies ® is simulated; generating an RCP concept that tests the WES dynamics without the need for any programming code.Specifically, the VSC of the AFE converter is composed by the insulated gate bipolar transistor (IGBTs), these use a switching frequency of 7 kHz.Figure 14a shows the wind fluctuations generated by a rotor wind model developed by RISOE National Laboratory based on Kaimal spectra.Figure 14b contains the mechanical torque behavior generated by the wind turbine, and in response to the applied control at the MSC, the PMSG electric torque is able to follow the same behavior.Finally, the current THD is shown in Figure 13; Figure 13a contents the THD without any phase shift between carriers of each VSC of the AFE converter, which corresponds to 6.8%.Please observe that, in Figure 13b, when the corresponding phase shift is performed in the carriers, the current THD is reduced to 1.239%, as specified in Table 1.The Figure 13 shows the harmonics magnitude reduction or even their elimination, once the phase shift between carriers has been made.The THD was reduced by approximately 5.5 times.

Real Time Simulation Results: Study Case for WES using Opal-RT Technologies
To verify the robustness of the applied control in the AFE converter and the THD reduction at the WES, the grid of Figure 2 in real time using the Opal-RT Technologies is simulated; generating an RCP concept that tests the WES dynamics without the need for any programming code.Specifically, the VSC of the AFE converter is composed by the insulated gate bipolar transistor (IGBTs), these use a switching frequency of 7 kHz.Figure 14a shows the wind fluctuations generated by a rotor wind model developed by RISOE National Laboratory based on Kaimal spectra.Figure 14b contains the mechanical torque behavior generated by the wind turbine, and in response to the applied control at the MSC, the PMSG electric torque is able to follow the same behavior.Figure 15a contains the current portion that handles the first VSC connected in parallel; as can be seen, as only three VSCs are connected in parallel, each one handles only a third of the total current generated by the MSC.The total current is presented in Figure 15b, and this is transferred by the WT-PMSG to the AC grid through the AFE converter.In Figure 15c, the generated voltage by the MSC is observed.It is important to mention that the main objective of the GSC is to support the constant DC-link in the presence of any disturbance (such as voltage/current variations due to wind fluctuations or reactive power exchanges by the behavior of the WT).This is evidenced in Figure 15d and is possible due to the applied control robustness.Figure 15e shows the GSC ability to exchange reactive power, that is, the ability of the injection/absorption of 6 MVA into the AC grid. Figure 15f contains the handled current portion by the first VSC connected in parallel at the GSC; similarly, as only three VSCs are connected in parallel, each one handles only a third of the total current generated by the GSC; the total current is presented in Figure 15g.Finally, in Figure 15h, the handled voltage by the GSC is observed, this is taken from the PCC attached to the AC grid.The THD of the handled total current by the GSC is generated through the OPAL-RT ® .The generated THD without phase shift between the carriers of each VSC connected in parallel corresponds to 8.85%.The produced THD once the phase shift between the carriers of each VSC is made corresponds to 2.18%, and the phase shift from equation ( 33) is calculated; therefore, it is demonstrated that making the WES real-time simulation and applying the phase shift between the carriers of each VSC, the THD can be reduced up to four times.Figure 15 presents the main electrical variables of the WES simulated in real time by OPAL-RT.Figure 15a contains the current portion that handles the first VSC connected in parallel; as can be seen, as only three VSCs are connected in parallel, each one handles only a third of the total current generated by the MSC.The total current is presented in Figure 15b, and this is transferred by the WT-PMSG to the AC grid through the AFE converter.In Figure 15c, the generated voltage by the MSC is observed.It is important to mention that the main objective of the GSC is to support the constant DC-link in the presence of any disturbance (such as voltage / current variations due to wind fluctuations or reactive power exchanges by the behavior of the WT).This is evidenced in Figure 15d and is possible due to the applied control robustness.Figure 15e shows the GSC ability to exchange reactive power, that is, the ability of the injection / absorption of 6 MVA into the AC grid. Figure 15f contains the handled current portion by the first VSC connected in parallel at the GSC; similarly, as only three VSCs are connected in parallel, each one handles only a third of the total current generated by the GSC; the total current is presented in Figure 15g.Finally, in Figure 15h, the handled voltage by the GSC is observed, this is taken from the PCC attached to the AC grid.The THD of the handled total current by the GSC is generated through the OPAL-RT  .The generated THD without phase shift between the carriers of each VSC connected in parallel corresponds to 8.85%.The produced THD once the phase shift between the carriers of each VSC is made corresponds to 2.18%, and the phase shift from equation (33) is calculated; therefore, it is demonstrated that making the WES real-time simulation and applying the phase shift between the carriers of each VSC, the THD can be reduced up to four times.Finally, it is important to mention that, the block -written to fileproduces the results of Figures 14 and 15 in the MATLAB-Simulink ® interface; this allows plotting the variables in MATLAB windows in order to have a better presentation.

Conclusions
In this paper, the AFE converter topology has been analyzed for the THD reduction in a WES.The WES has been formed by a WT-PMSG connected to the AC grid through an AFE converter.The AFE converter topology has been made from the use of a single VSC to use pVCS connected in parallel.
The effective THD reduction has been made through the variation in the DSPWM technique applied to each VSC, that is, applying a different phase shift angle at the carrier signals of each VSC connected in parallel, while the modulated signal angle has been kept constant.
To verify the robustness to the applied control, the WES control law has been simulated in real time using the Opal-RT Technologies ® , generating an RCP concept, which tests the WES dynamics without the need for any programming code.
The obtained results have shown a type-4 WT with total output power of 6MVA generates a THD reduction up to 5.5 times of the total WES current output by Fourier series expansion.

Figure 2
Figure 2 Modeling control of WES.Figure 2. Modeling control of WES.

Figure 2 .
Figure 2 Modeling control of WES.Figure 2. Modeling control of WES.

Figure 3
Figure 3 Digital sinusoidal pulse width modulation (DSPWM) signal applied to each voltage source converter (VSC) connected in parallel (phase a).

Figure 3 .
Figure 3. Digital sinusoidal pulse width modulation (DSPWM) signal applied to each voltage source converter (VSC) connected in parallel (phase a).

Figure 5
Figure 5 Flow diagram for the lower total harmonic distortion (THD) generation.Figure 5. Flow diagram for the lower total harmonic distortion (THD) generation.

Figure 5 .
Figure 5 Flow diagram for the lower total harmonic distortion (THD) generation.Figure 5. Flow diagram for the lower total harmonic distortion (THD) generation.

Figure 6
Figure 6 The behavior of the WT mechanical torque and the permanent magnet synchronous generator (PMSG) electric torque in the presence of wind fluctuations.(a) Wind fluctuations; (b) mechanical and electric torque.

Figure
Figure 6a details the wind fluctuations applied to the WT, which are generated in Matlab-Simulink  by a rotor wind model developed by RISOE National Laboratory based on Kaimal spectra.Figure 6b shows the behavior of the WT mechanical torque and the PMSG electric torque in the presence of wind fluctuations.It is possible to observe that the electric torque follows the mechanical torque behavior, due to the effective structure of the MSC closed-loop control.

Figure 6 .
Figure 6.The behavior of the WT mechanical torque and the permanent magnet synchronous generator (PMSG) electric torque in the presence of wind fluctuations.(a) Wind fluctuations; (b) mechanical and electric torque.

Figure
Figure 6a details the wind fluctuations applied to the WT, which are generated in Matlab-Simulink ® by a rotor wind model developed by RISOE National Laboratory based on Kaimal spectra.Figure 6b shows the behavior of the WT mechanical torque and the PMSG electric torque in the presence of wind fluctuations.It is possible to observe that the electric torque follows the mechanical torque behavior, due to the effective structure of the MSC closed-loop control.Figure7shows the generated current by the WT-PMSG, which is controlled through the MSC of the AFE parallel converter.Because the MSC is formed using the parallel connection of three VSCs, each VSC can handle one third of the total current generated by the WT; Figure7a-cillustrates the current in the (1), (2), and (3) VSCs, respectively, and in Figure7dthe MSC total current is shown.

22 Figure 7
Figure 6a details the wind fluctuations applied to the WT, which are generated in Matlab-Simulink ® by a rotor wind model developed by RISOE National Laboratory based on Kaimal spectra.Figure 6b shows the behavior of the WT mechanical torque and the PMSG electric torque in the presence of wind fluctuations.It is possible to observe that the electric torque follows the mechanical torque behavior, due to the effective structure of the MSC closed-loop control.Figure7shows the generated current by the WT-PMSG, which is controlled through the MSC of the AFE parallel converter.Because the MSC is formed using the parallel connection of three VSCs, each VSC can handle one third of the total current generated by the WT; Figure7a-cillustrates the current in the (1), (2), and (3) VSCs, respectively, and in Figure7dthe MSC total current is shown.

Figure 8
Figure 8 DC-Link and Reactive Power controlled by the grid-side VSC (GSC).(a) DC-link voltage; (b) exchange of reactive power in WES.

Figure 8
Figure 8 DC-Link and Reactive Power controlled by the grid-side VSC (GSC).(a) DC-link voltage; (b) exchange of reactive power in WES.

Figure 8 .
Figure 8. DC-Link and Reactive Power controlled by the grid-side VSC (GSC).(a) DC-link voltage; (b) exchange of reactive power in WES.

Figures 9 -
detail the applied DSPWM to each of the VSCs connected in parallel for the correct operation of the GSC, at the stability time from 4.5 to 4.509 ms.In Figure9, it can be seen that both the carrier signal of Figure9aand the modulated signal of Figure9bstart at the same time, i.e., the carrier

Figure 9
Figure 9 DSPWM signal applied to the control of the first VSC connected in parallel in GSC.(a) Carrier signal; (b) modulated signal; (c) DSPWM.

Figure 10 .
Figure 10.DSPWM signal applied to the control of the second VSC connected in parallel in GSC.(a) Carrier signal; (b) modulated signal; (c) DSPWM.

Figure 9 .
Figure 9. DSPWM signal applied to the control of the first VSC connected in parallel in GSC.(a) Carrier signal; (b) modulated signal; (c) DSPWM.

Figures 9- 11
detail the applied DSPWM to each of the VSCs connected in parallel for the correct operation of the GSC, at the stability time from 4.5 to 4.509 ms.In Figure9, it can be seen that both the carrier signal of Figure9aand the modulated signal of Figure9bstart at the same time, i.e., the carrier signal does not present any phase shift, generating the DSPWM signal in Figure9c, this is applied to the first VSC connected in parallel in the GSC.In Figure10, the DSPWM generation applied to the second VSC connected in parallel to the GSC is shown; in Figure10a, a phase shift of /2 (rad/s) in the carrier signal is observed.This is compared with the modulated signal of Figure detail the applied DSPWM to each of the VSCs connected in parallel for the correct operation of the GSC, at the stability time from 4.5 to 4.509 ms.In Figure9, it can be seen that both the carrier signal of Figure9aand the modulated signal of Figure9bstart at the same time, i.e., the carrier signal does not present any phase shift, generating the DSPWM signal in Figure9c, this is applied to the first VSC connected in parallel in the GSC.In Figure10, the DSPWM generation applied to the second VSC connected in parallel to the GSC is shown; in Figure10a, a phase shift of /2 (rad/s) in the carrier signal is observed.This is compared with the modulated signal of Figure

Figure 9
Figure 9 DSPWM signal applied to the control of the first VSC connected in parallel in GSC.(a) Carrier signal; (b) modulated signal; (c) DSPWM.

Figure 10 .
Figure 10.DSPWM signal applied to the control of the second VSC connected in parallel in GSC.(a) Carrier signal; (b) modulated signal; (c) DSPWM.

Figure 10 .
Figure 10.DSPWM signal applied to the control of the second VSC connected in parallel in GSC.(a) Carrier signal; (b) modulated signal; (c) DSPWM.

Figure 11 .
Figure 11.DSPWM signal applied to the control of the third VSC connected in parallel in GSC.(a) Carrier signal; (b) modulated signal; (c) DSPWM.

Figure12.
Figure12.Electrical variables generated by the GSC.(a) Zoom of the handled current at the (1) VSC; (b) the handled current at the (2) VSC; (c) the handled current at the (3) VSC; (d) total current; (e) zoom at the magnitude voltage.

Figure 11 .
Figure 11.DSPWM signal applied to the control of the third VSC connected in parallel in GSC.(a) Carrier signal; (b) modulated signal; (c) DSPWM.

Figure12.
Figure12.Electrical variables generated by the GSC.(a) Zoom of the handled current at the (1) VSC; (b) the handled current at the (2) VSC; (c) the handled current at the (3) VSC; (d) total current; (e) zoom at the magnitude voltage.

Figure 12 .
Figure 12.Electrical variables generated by the GSC.(a) Zoom of the handled current at the (1) VSC; (b) the handled current at the (2) VSC; (c) the handled current at the (3) VSC; (d) total current; (e) zoom at the magnitude voltage.

Figure13.
Figure13.THD present at the WES.(a) Without phase shift between carriers of each VSC; (b) with phase shift between carriers of each VSC.

Figure 14
Figure 14 Behavior of the WT mechanical torque and the PMSG electric torque in the presence of wind fluctuations simulated in the Opal-RT Technologies.(a) Wind fluctuations; (b) Mechanical and Electric torque.

Figure 13 .
Figure 13.THD present at the WES.(a) Without phase shift between carriers of each VSC; (b) with phase shift between carriers of each VSC.

Figure13.
Figure13.THD present at the WES.(a) Without phase shift between carriers of each VSC; (b) with phase shift between carriers of each VSC.

Figure 14
Figure 14 Behavior of the WT mechanical torque and the PMSG electric torque in the presence of wind fluctuations simulated in the Opal-RT Technologies.(a) Wind fluctuations; (b) Mechanical and Electric torque.

Figure 14 .
Figure 14.Behavior of the WT mechanical torque and the PMSG electric torque in the presence of wind fluctuations simulated in the Opal-RT Technologies ® .(a) Wind fluctuations; (b) Mechanical and Electric torque.

Figure 15
Figure15presents the main electrical variables of the WES simulated in real time by OPAL-RT ® .Figure15acontains the current portion that handles the first VSC connected in parallel; as can be seen, as only three VSCs are connected in parallel, each one handles only a third of the total current generated by the MSC.The total current is presented in Figure15b, and this is transferred by the WT-PMSG to the AC grid through the AFE converter.In Figure15c, the generated voltage by the MSC is observed.It is important to mention that the main objective of the GSC is to support the constant DC-link in the presence of any disturbance (such as voltage/current variations due to wind fluctuations or reactive power exchanges by the behavior of the WT).This is evidenced in Figure15dand is possible due to the applied control robustness.Figure15eshows the GSC ability to exchange reactive power, that is, the ability of the injection/absorption of 6 MVA into the AC grid.Figure15fcontains the handled current portion by the first VSC connected in parallel at the GSC; similarly, as only three VSCs are connected in parallel, each one handles only a third of the total current generated by the GSC; the total current is presented in Figure15g.Finally, in Figure15h, the handled voltage by the GSC is observed, this is taken from the PCC attached to the AC grid.The THD of the handled total current by the GSC is generated through the OPAL-RT ® .The generated THD without phase shift between the carriers of each VSC connected in parallel corresponds to 8.85%.The produced THD once the phase shift between the carriers of each VSC is made corresponds to 2.18%, and the phase shift from equation (33) is calculated; therefore, it is demonstrated that making the WES real-time simulation and applying the phase shift between the carriers of each VSC, the THD can be reduced up to four times.

Figure 15 .
Figure 15.Electrical variables generated at the WES simulated in the Opal-RT Technologies.(a) The handled current by the (1) VSC of MSC; (b) total current handled by the MSC; (c) voltage present at the MSC; (d) DC-Link voltage controlled by the GSC; (e) reactive Power controlled by the GSC; (f) the handled current by the (1) VSC of GSC; (g) total current handled by the GSC; (h) voltage present at the GSC.

Figure 15 .
Figure 15.Electrical variables generated at the WES simulated in the Opal-RT Technologies ® .(a) The handled current by the (1) VSC of MSC; (b) total current handled by the MSC; (c) voltage present at the MSC; (d) DC-Link voltage controlled by the GSC; (e) reactive Power controlled by the GSC; (f) the handled current by the (1) VSC of GSC; (g) total current handled by the GSC; (h) voltage present at the GSC.

Table 1 .
Analysis of different phase shift at the carrier signal.

Table 1 .
Analysis of different phase shift at the carrier signal.
Replacing equation (38) in (37) gives line-to-line current of the MSC or/and GSC, i.e.,