Optimized Control for PMSG Wind Turbine Systems under Unbalanced and Distorted Grid Voltage Scenarios

: Wind energy is one of the fastest growing energies due to its feasible cost and environment friendly nature, where there is no emission of waste or greenhouse gases emission. Wind energy systems should be connected to the electric utility to avoid the effects of the intermittent nature of these sources. One of the main problems of the utility integration of wind turbines is the unbalanced voltage of the utility grid. Many efforts have been made to remedy the effects of the unbalanced grid voltage connected with the electric utility. This research points out the need for more accurate and robust controllers, such as those mentioned in this paper. A novel combination strategy is presented in this paper to overcome the inherent imbalance in the electric utility voltages when used in combination with a permanent magnet synchronous generator (PMSG). This novel technique is designed to adapt the positive sequence of the dq -axis of the output current from the PMSG to extract the maximum power available from a wind turbine. Meanwhile, the negative sequence component is used to improve the quality of the output current from a wind turbine. A current controller is introduced in the grid side converter to compensate for the effects of the 2nd and 6th components of the output currents. Using these controllers reduces all dominant components in the output currents from wind turbines and permits a robust tracker for the maximum power available. A detailed simulation and experimental studies are introduced in this paper to show the controller operation under different operating conditions. The simulation and experimental results from the novel proposed strategy show its superiority in fully remedying the effect of unbalanced grid voltages.


Introduction
The increase in world population has, in turn, caused greater use of energy, especially electrical energy, as an engine of the economy and as an impeller of industrial development of new technologies, and as a resource used in the daily life of people. Continuous exploitation on a large scale of natural resources is one of the big factors that has caused environmental problems to increase [1,2]. Therefore, there is a need to use renewable energies that are becoming increasingly well known, such as wind and solar energies [3,4]. These generation means are clean and eco-friendly, and for this reason, the use of these types of energy has increased in the last years, and their inclusion in the electric power systems has become a topic of interest in the present [5]. With continuous developments in wind turbines and their control, the cost of generating electric energy is decreasing substantially year by year, which can be proven by the substantial increase in the use of wind turbines in many places around the world and the continuous increase in the capacity installed around the world.
However, the unwise determination of the LC filters interconnected between the wind turbine and the electric utility may not permit any reduction possibility of THD of the output currents, which may cause severe instability and failure problems for the wind turbine integration with the electric utility. The inaccurate values of the LCL filter components also may cause the generation of more poles that can further negatively affect the integration of the wind turbine with the electric utility. Moreover, the wind speed variation changes the speed of rotation, which will definitely change the frequency generated from the wind turbine. It can also change the placement of the harmonic components, which imposes a limitation on the LCL filter because it has limited or fixed bandwidth [21]. Using the harmonic mitigation controller with the help of the proportional integrator can help overcome this problem and increase the bandwidth of the operation of the wind turbines [22]. This method can suppress harmonic currents but cannot reduce the noise robustness of the system. Next, it is possible to use a proportional-resonant (PR) controller to remove the harmonic components of a specific frequency [23,24]. Still, it is important to have several PR controllers, equal to the number of harmonics that should be eliminated. There is a possibility that the system becomes unstable if the bandwidth is exceeded. A method of reducing the harmonic current of a specific frequency by redirecting the harmonic voltage has been proposed by [17]. Still, there is a problem that a detection circuit is additionally required, and computation is complicated. Moreover, when the electrical utility voltage becomes unbalanced, the grid current also becomes unbalanced, which may cause resonance and oscillations at the point of integration of the wind turbine with the electric utility.
Another study was introduced in the literature using a sliding mode (SM) controller [25] to reduce the DC-link voltage oscillations that substantially reduce the harmonic contents in the current and voltage. Based on the comparison study between the SM and PI controllers, the results showed improved performance with the use of the SM controllers in normal and abnormal operations [25]. Unbalanced or distorted electric utility grid voltage generates abnormal grid currents. If the utility grid voltage is unbalanced, a ripple component equal to twice the utility grid frequency (120 Hz) occurs in the DC-link voltage. To remove the DC-link voltage ripple, a separation of the negative and positive components of the dq-axis of the supply currents and each component should be controlled separately [26][27][28].
The main contribution of this paper is the ability to extract the grid voltages and currents of positive, negative, 5th, and 7th-order components without affecting the components' magnitudes or their phase delay. After separating these components, the positive Moreover, the wind speed variation changes the speed of rotation, which will definitely change the frequency generated from the wind turbine. It can also change the placement of the harmonic components, which imposes a limitation on the LCL filter because it has limited or fixed bandwidth [21]. Using the harmonic mitigation controller with the help of the proportional integrator can help overcome this problem and increase the bandwidth of the operation of the wind turbines [22]. This method can suppress harmonic currents but cannot reduce the noise robustness of the system. Next, it is possible to use a proportionalresonant (PR) controller to remove the harmonic components of a specific frequency [23,24]. Still, it is important to have several PR controllers, equal to the number of harmonics that should be eliminated. There is a possibility that the system becomes unstable if the bandwidth is exceeded. A method of reducing the harmonic current of a specific frequency by redirecting the harmonic voltage has been proposed by [17]. Still, there is a problem that a detection circuit is additionally required, and computation is complicated. Moreover, when the electrical utility voltage becomes unbalanced, the grid current also becomes unbalanced, which may cause resonance and oscillations at the point of integration of the wind turbine with the electric utility.
Another study was introduced in the literature using a sliding mode (SM) controller [25] to reduce the DC-link voltage oscillations that substantially reduce the harmonic contents in the current and voltage. Based on the comparison study between the SM and PI controllers, the results showed improved performance with the use of the SM controllers in normal and abnormal operations [25]. Unbalanced or distorted electric utility grid voltage generates abnormal grid currents. If the utility grid voltage is unbalanced, a ripple component equal to twice the utility grid frequency (120 Hz) occurs in the DC-link voltage. To remove the DC-link voltage ripple, a separation of the negative and positive components of the dq-axis of the supply currents and each component should be controlled separately [26][27][28].
The main contribution of this paper is the ability to extract the grid voltages and currents of positive, negative, 5th, and 7th-order components without affecting the components' magnitudes or their phase delay. After separating these components, the positive and negative components of the grid-side currents are regulated by using PI-current controllers, which are tuned for each component separately. The proposed method eliminates the grid side's unbalanced and distorted current components without needing to add hardware compared to the previous methods. Moreover, a detailed mathematical analysis for the PMSG and the back-to-back PWM converter is introduced in detail for reducing the 5th and 7th harmonics. The proposed system introduces a separate controller for each harmonic, and the active and reactive are controlled separately. The maximum power available from the wind turbine is also tracked. The results obtained from the simulation study coincide with the similar ones obtained from the experimental study in both normal and abnormal operating conditions. The outstanding results of harmonic reduction in the output current with a full separation of active and reactive power and the maximum power tracking control prove the superiority of the proposed wind turbine utility integration.
The proposed method's novelty lies in its comprehensive and integrated approach, combining novel strategies for power extraction optimization, output current quality enhancement, and mitigation of grid voltage distortions. By addressing these key aspects, the method offers a unique and effective solution to improve the performance and stability of PMSG-based wind energy systems. The experimental validation and comparison with existing literature further demonstrate the novelty and superiority of the proposed method in fully remedying the effects of unbalanced grid voltages and achieving optimal power extraction.
Furthermore, the proposed method introduces robust controllers tailored for PMSG control. These controllers effectively compensate for specific output current components, such as the 2nd and 6th harmonic components, resulting in reduced dominant components in the output currents. By minimizing the impact of harmonic distortions, the method enhances the robustness and stability of the system, leading to higher power quality and improved overall performance.
Additionally, the method incorporates a current controller in the grid side converter, further mitigating the effects of unbalanced grid voltages. By compensating for specific output current components, such as the 2nd and 6th harmonic components, the method ensures the reduction of dominant harmonic contents, thereby improving the quality of the output current from the wind turbine.
The paper is organized into several sections to provide a comprehensive understanding of the research on permanent magnet synchronous generator (PMSG) control in wind energy systems. In Section 2, the dynamics of wind turbines are discussed, covering the principles of wind energy conversion and power generation. This section establishes the foundation for understanding the behavior and characteristics of wind turbines. Moving forward, Section 3 presents the mathematical model of the PMSG, including the equations and parameters used to represent the system. This model serves as the basis for the subsequent control strategy development. Section 4 delves into the system control aspect, where a novel combination strategy is introduced. This strategy focuses on adapting the positive sequence of the dq-axis output current to maximize power extraction while utilizing the negative sequence component to improve the quality of the output current. In Section 5, the experimental results are presented. This section outlines the experimental setup and methodology used to validate the proposed control strategy and provides a detailed analysis of the obtained results under various operating conditions. Finally, Section 6 concludes the paper by summarizing the main findings and contributions of the research, highlighting the superiority of the proposed strategy in addressing unbalanced grid voltages.

Wind Turbine Dynamics
All types of wind turbines work on the same principles regardless of their type or size, where they convert the kinetic energy stored in the wind into mechanical energy on the shaft of the electric generator. The market shows two main types of wind turbines: the horizontal axis and vertical axis wind turbines. Horizontal axis wind turbines are more widely used than vertical axis wind turbines due to their better performance, and the wide range of sizes where they can be designed from fractional kW size to several MW Sustainability 2023, 15, 9552 5 of 21 size, meanwhile vertical axis wind turbines have limited size due to some engineering problems [29]. The relation between electric power generated and the wind speed can be obtained from Equation (1) [30]: where ρ is the air density at the place where the turbine is installed, R is the length of the turbine blades, υ is the average linear wind speed, β is the pitch angle, and C P (λ, β) is the turbine power coefficient, a specific parameter for each generator dependent on the linear speed relationship between the rotational speed of the blades and the tip speed ratio (λ). The power coefficient limit is established according to the Betz law at 59.3% in the case of horizontal axis turbines. Based on (1), it is possible to calculate the mechanical torque on the turbine axis as shown in (2) [31]: The power coefficient (C P ) is a parameter that converts the wind's kinetic energy into mechanical rotational energy. Usually, this coefficient is determined from experimental curves for each turbine. A mathematical model has been developed to obtain a generalized form of the coefficient presented in (3) and (4) and a set of proposed values for the coefficients C 1 through C 6 [32]. Figure 2 shows a typical set of C P curves as a function of the linear speed ratio for different pitch angle values for a horizontal axis turbine [23,33,34]: horizontal axis and vertical axis wind turbines. Horizontal axis wind turbines are more widely used than vertical axis wind turbines due to their better performance, and the wide range of sizes where they can be designed from fractional kW size to several MW size, meanwhile vertical axis wind turbines have limited size due to some engineering problems [29]. The relation between electric power generated and the wind speed can be obtained from Equation (1) [30]: where ρ is the air density at the place where the turbine is installed, R is the length of the turbine blades, is the average linear wind speed, β is the pitch angle, and CP (λ, β) is the turbine power coefficient, a specific parameter for each generator dependent on the linear speed relationship between the rotational speed of the blades and the tip speed ratio (λ). The power coefficient limit is established according to the Betz law at 59.3% in the case of horizontal axis turbines. Based on (1), it is possible to calculate the mechanical torque on the turbine axis as shown in (2) [31]: The power coefficient (CP) is a parameter that converts the wind's kinetic energy into mechanical rotational energy. Usually, this coefficient is determined from experimental curves for each turbine. A mathematical model has been developed to obtain a generalized form of the coefficient presented in (3) and (4) and a set of proposed values for the coefficients C1 through C6 [32]. Figure 2 shows a typical set of CP curves as a function of the linear speed ratio for different pitch angle values for a horizontal axis turbine [23,33,34]: In (2), it appears that the mechanical power on the turbine axis is directly proportional to CP. In Figure 2, it becomes evident that for certain pitch angle conditions (β), only a single value of the linear velocity relation (λ) guarantees the maximum value for CP. Considering that the length of the blades is uniform and constant, the linear speed ratio is defined according to (5).  In (2), it appears that the mechanical power on the turbine axis is directly proportional to C P . In Figure 2, it becomes evident that for certain pitch angle conditions (β), only a single value of the linear velocity relation (λ) guarantees the maximum value for C P . Considering that the length of the blades is uniform and constant, the linear speed ratio is defined according to (5).
where ω r is the angular velocity of the propeller shaft.

Mathematical Model of PMSG
The choice of utilizing a permanent magnet synchronous generator (PMSG) in wind energy systems offers several advantages over other generator types such as squirrel cage induction generators (SCIG) and doubly fed induction generators (DFIG). Firstly, PMSGs have a higher power density compared to SCIGs and DFIGs, meaning that they can generate more power for a given size and weight. This is due to the absence of rotor windings in PMSGs, allowing for a more compact and lightweight design. Additionally, PMSGs have a higher efficiency since they eliminate the need for rotor power conversion and the associated losses present in DFIGs. PMSGs also provide a wider operating range, allowing for better performance in low wind speed conditions where other generator types may struggle. Furthermore, PMSGs exhibit superior grid compatibility as they are not reliant on slip rings or power electronics for control, resulting in reduced maintenance and increased system reliability. Overall, the advantages of using PMSGs in wind energy systems include higher power density, improved efficiency, wider operating range, and enhanced grid compatibility, making them a favorable choice over SCIGs and DFIGs.
The PMSG is made up of the following main elements: a rotor with permanent magnets and a stator with a three-phase or poly-phase winding. The rotor magnets form a constant magnetic field which is not possible to modify, unlike the traditional synchronous machine in which the amplitude of the rotor field is modified by modifying the value of the direct current. In the synchronous machine, it is considered that in the steady-state, the stator field and the rotor rotate at synchronous speed. In this way, the frequency and voltages of the generator are set. If the PMSG has N p pole pairs, then the rotor's rotation speed can be expressed by Equation (6): ω r : Angular frequency in the rotor in (rad/s) f e : Electric frequency of the stator in (Hz) N p : Number of pole pairs. Due to the high number of pole pairs in current machines, it is possible to eliminate speed multiplier boxes in this type of electrical machine. One of the advantages of this situation is that maintenance is reduced, mechanical losses of the gearbox are eliminated, and electrical losses in the rotor are eliminated because the excitation circuit of traditional synchronous machines is eliminated. On the other hand, there is a higher cost of the magnets and a loss of control over the amplitude of the rotor field.
The electromagnetic model of the PMSG for one of its phases is shown in Figure 3 [33]. The three-phase per phase equation that relates voltages to currents and magnetic fluxes for the PMSG is described in Equation (7) [35]: ustainability 2023, 15, x FOR PEER REVIEW 7 of 23 This expression makes it possible to obtain a model oriented in the same direction as the stator's magnetic field vector. For this, the Park transformation is applied to the phase equations. This model in the dq axes has the advantage of simplifying the control model since the voltages and currents in the dq axes do not depend on the time in the steadystate condition. On the dq axes the PMSG equations oriented with the rotor flux vector are This expression makes it possible to obtain a model oriented in the same direction as the stator's magnetic field vector. For this, the Park transformation is applied to the phase equations. This model in the dq axes has the advantage of simplifying the control model since the voltages and currents in the dq axes do not depend on the time in the steady-state condition. On the dq axes the PMSG equations oriented with the rotor flux vector are shown in Equations (8) and (9) [36]: where L ds and L qs are the synchronous reactance in direct and quadrature axes of the synchronous machine. Furthermore, the concatenated fluxes as a function of the inductances and the flux created by the permanent magnets of the rotor m, can be expressed as: If the expressions of the magnetic flux are replaced in Equations (10) and (11), the following equations on dq axes of the stator voltage can be obtained.
These equations can also be expressed in a simplified form as follows: v qs (t) = R s i qs (t) + L qs d dt i qs (t) + e qs (t) (15) where e ds (t) = −ω e L qs i qs (t) (16) e qs (t) = ω e (L ds i ds (t) + λ m ) (17) They are the direct and quadrature axes components of the electromotive force (emf) of the synchronous generator. From these expressions, the electromagnetic power can be defined, which is developed by the machine, as a function of the dq components per rms phase, as shown in the following expression.
Replacing the components of the emf of the generator in dq axes which are shown in Equation (18) with the values obtained from Equations (16) and (17), the electromagnetic power can be obtained from the following equation.
Since the torque is defined as T = P/ω r , then the expression for the PMSG electromagnetic torque in dq axes is given by the following expression [37]: From the mechanical point of view, the PMSG is coupled to a rotational mechanical system (wind turbine) so that the mechanical system is modeled by the following expression. where: T m : Mechanical torque applied in (Nm) B m : Coefficient of friction (Ns/rad) J eq : Total equivalent inertia of the turbine and generator in (Ns 2 /rad).

System Control
The wind energy conversion system used in this study consists of the PMSG, the turbine blades, drive train, and back-to-back converters. The connection of two VSCs with the back-to-back topology consists of two three-phase bridges connected to the DC-link. The biggest advantage of this topology is the operation in the four quadrants, being able to maintain the transit of bidirectional energy, in this particular case between the grid and the PMSG generator. The mechanical torque input to the blade is converted into electric energy through PMSG with the help of the machine-side converter (MSC). The MSC will pass the electric power to the DC-link and the electric power will be supplied from the DC-link to the electric utility through the grid-connected converter (GSC) as shown in Figure 1 [38][39][40]. Important properties of this configuration are the regulation of the voltage of the continuous bus, low harmonic content, the possibility of the correction of the power factor, and approximately sinusoidal current waveforms. Next, the conventional control strategies, based on PI loops, used for the MSC and the GSC, are presented.

Generator Side Control
In this step of controlling energy production, the synchronous permanent magnet generator must produce a torque that is opposite to that generated by the turbine at its maximum power point. The MSC is responsible for controlling the production of this torque and also the level of reactive power extracted from the generator connected to the wind turbine. MPPT is performed by controlling ω r to respond to changes in v, to maintain the operation at λ opt (optimal speed ratio), according to (2). Controlling the speed of the machine will be achieved by controlling the turbine pitch angle, β. Meanwhile, the control of the electromagnetic torque is used to control the rotational speed of the PMSG according to (22). The control of the direct axis current i sd , must be carried out from the definition of a null reference, so that the decoupling term that disturbs i sq is eliminated. In this way, there is no need for feedforward compensation of stator currents. The block diagram of the MSC showing the operational logic is shown in Figure 4.

Grid-Side Control
The d-q representation of the asymmetric three-phase voltages of the electric utility, (v a , v b , v c ) can be divided into positive and negative components as shown in the following equations [41]: The term e jω e t v p dqg rotates counterclockwise, and indicates the positive sequence, while the term e −jω e t v n dqg rotates counter-clockwise and indicates a negative sequence. The network voltage equation in the dq-axis system: Applying Equations (23)- (25) and developing the equations in terms of positive and negative sequences:

Grid-Side Control
The d-q representation of the asymmetric three-phase voltages of the electric utility, ( , , ) can be divided into positive and negative components as shown in the following equations [41]: The term rotates counterclockwise, and indicates the positive sequence, while the term − rotates counter-clockwise and indicates a negative sequence. The network voltage equation in the dq-axis system: Applying Equations (23)- (25) and developing the equations in terms of positive and negative sequences: By using the positive and negative components of the grid voltage that were obtained from (26) and (27), and similarly the current, the apparent power can be calculated by the following equation [34]: By using the positive and negative components of the grid voltage that were obtained from (26) and (27), and similarly the current, the apparent power can be calculated by the following equation [34]: S s = (e jω e t v p dqg + e −jω e t v n dqg )(e jω e t i p dqg + e −jω e t i n dqg ) From the general equation of apparent power S = P + jQ, extract the active (P) and reactive (Q) power: P g (t) = P 0 + P gc2 cos(2ω e t) + P gs2 sin(2ω e t) Q g (t) = Q 0 + Q gc2 cos(2ω e t) + Q gs2 sin(2ω e t) in which: The power can be represented in the matrix form, such as: According to Equation (32) the currents can be expressed by the following equation: By making Q * 0 , P * gs2 , P * gc2 = 0, the currents obtained are the positive and negative sequence i dq reference currents, as a function of the reference power generated, developed in Equation (33), and thus we obtain: in which: When the grid voltage is distorted, the grid-side converter emits a distorted current and becomes another harmonic current source. To remove the 5th and 7th components from the current of electric utility, which are the problem, an additional harmonic current controller should be used to remove any other harmonic components in the electric utility current. The dominant harmonics shown in the electric utility current are mainly from the 5th and 7th components and for this reason each one of these components is equated to zero for fully effective elimination of these components as shown in the following equations [42]: To control the positive, negative, 5th, and 7th harmonic components, a nested-loop current controller is used to control the active and reactive power of the utility grid by controlling the positive components of q and d-axes of electric utility current, respectively. Meanwhile, the 120 Hz and 360 Hz current components are controlled by adding six current controllers for the negative sequence and harmonic components. These components should be set at zero value to ensure a balanced sine wave current is supplied to the electric utility. Figure 5 shows the positive, negative, 5th, and 7th voltage sequence components of the unbalanced voltage in a synchronous reference frame. The vector consists of four rotating frames rotating in positive speed ω g , and rotating with the negative speed −ω g , and rotating with the negative speed −5 ω g , and rotating with the positive speed 7 ω g . Figure 6 shows the detailed layout of the control strategy used for the system under study, in which, the positive, negative, 5th, and 7th harmonic components are extracted from the voltage and current of the electric utility having both unbalanced and harmonic components. The phase angle required for coordinate transformation is calculated using the positive component of the grid voltage as shown in Figure 5. The harmonic detection in Figure 5 is implemented by using two fourth-order band-pass filters (PBF) for the αβ grid current components. Using the stationary frame αβ has the advantage of extracting the 5th and 7th order harmonics without phase delay. The fundamental component of the electric utility αβ currents is estimated and then subtracted from the total currents to extract the 5th and 7th order harmonics. In the case of extracting the voltage and currents' positive and negative components, the grid αβ currents are transformed into synchronous rotating reference frames dq in which the positive and negative components are extracted as shown in Figure 7.
To control the positive, negative, 5th, and 7th harmonic components, a nested-loop current controller is used to control the active and reactive power of the utility grid by controlling the positive components of q and d-axes of electric utility current, respectively. Meanwhile, the 120 Hz and 360 Hz current components are controlled by adding six current controllers for the negative sequence and harmonic components. These components should be set at zero value to ensure a balanced sine wave current is supplied to the electric utility. Figure 5 shows the positive, negative, 5th, and 7th voltage sequence components of the unbalanced voltage in a synchronous reference frame. The vector consists of four rotating frames rotating in positive speed ωg, and rotating with the negative speed −ωg, and rotating with the negative speed −5 ωg, and rotating with the positive speed 7 ωg.  Figure 6 shows the detailed layout of the control strategy used for the system under study, in which, the positive, negative, 5th, and 7th harmonic components are extracted from the voltage and current of the electric utility having both unbalanced and harmonic components. The phase angle required for coordinate transformation is calculated using the positive component of the grid voltage as shown in Figure 5. The harmonic detection in Figure 5 is implemented by using two fourth-order band-pass filters (PBF) for the αβ grid current components. Using the stationary frame αβ has the advantage of extracting the 5th and 7th order harmonics without phase delay. The fundamental component of the electric utility αβ currents is estimated and then subtracted from the total currents to extract the 5th and 7th order harmonics. In the case of extracting the voltage and currents' positive and negative components, the grid αβ currents are transformed into synchronous rotating reference frames dq in which the positive and negative components are extracted as shown in Figure 7.    To minimize the negative sequence current and the harmonic components, dq-axis currents are selected for controlling each component individually. PI controllers of the current are used to control the undesirable components to zero to completely remove the harmonic contents in the electric utility currents.
The Naslin polynomial technique was used [43] to determine the values of the PI gains of the PI controllers for the PI controller used for the internal current loop of the GSC. Table 1 shows the gains of the PI controller used for positive, negative, 5th, and 7th of the d and q-axis current controllers.

Experimental Results
The experimental validation of the proposed control system was conducted using a testbed setup, as illustrated in Figure 8. The testbed consists of several key components, including the permanent magnet synchronous generator (PMSG), three-phase back-to-back converters, and an induction motor acting as a prime mover to emulate the mechanical power generated by wind turbines.

Experimental Results
The experimental validation of the proposed control system was conducted using a testbed setup, as illustrated in Figure 8. The testbed consists of several key components, including the permanent magnet synchronous generator (PMSG), three-phase back-toback converters, and an induction motor acting as a prime mover to emulate the mechanical power generated by wind turbines.  Table 2 provides an overview of the performance parameters of the PMSG used in the experimental setup. To facilitate the control and operation of the system, a PWM converter was constructed in the laboratory using SK40GB 123 SEMIKRON IGBT modules. These modules, along with a switch driver, were recommended for optimal performance. The experimental work employed a switching frequency of 10 kHz, with a sampling time of 0.6 ms.  Figure 8. Experimental setup of the PMSG system. Table 2 provides an overview of the performance parameters of the PMSG used in the experimental setup. To facilitate the control and operation of the system, a PWM converter was constructed in the laboratory using SK40GB 123 SEMIKRON IGBT modules. These modules, along with a switch driver, were recommended for optimal performance. The experimental work employed a switching frequency of 10 kHz, with a sampling time of 0.6 ms. The central control board plays a crucial role in the setup and includes a digital signal processor (DSP), signal conditioning, protection circuits, isolation circuits between the power converters, and control circuits. The DSP unit, specifically a TMS320F28335, facilitates communication between the DSP and various system peripherals such as the incremental encoder and digital-to-analog converter (DAC). The DAC enables data acquisition and interaction with an oscilloscope interface for communication with a computer.
The controllers employed in the experimental setup, including the DC-link voltage controller, grid-side converter (GSC) controller, motor-side converter (MSC) controller, and phase-locked loop (PLL) controller, are implemented on the DSP units. These controllers play essential roles in ensuring the stable operation and coordination of the system components.
The proposed testbed setup consists of a 3 kW PMSG coupled with a three-phase squirrel cage induction generator, which is further coupled with a motor drive. This configuration allows for precise control of the mechanical power transmitted to the PMSG, thereby emulating the variations inherent in wind turbines. The chosen setup size is suitable for experimental validation while representing the characteristics and performance requirements of practical wind energy systems. Figure 9 presents the experimental results obtained when the wind speed varied within the range of 7 to 12 (m/s). The plot consists of three subplots, representing the wind speed, generator speed, and system power, respectively, from top to bottom. In Figure 9a, we observe the changes in wind speed over time. As the wind speed fluctuates, the control system responds by adjusting the generator reference speed to maintain optimal performance. The control strategy employed in the experiment aims to track the maximum power point based on the optimal tip-speed ratio. Consequently, the generator reference speed is adapted accordingly, allowing the system to extract the maximum available power from the wind turbine.   Figure 10a displays the distorted voltage waveform, highlighting the presence of harmonics and other irregularities. Similarly, Figure 10b shows the distorted current waveform resulting from the unbalanced conditions of the utility grid voltage. These distortions in the voltage and current signals can significantly impact the performance and stability of the wind energy system. Figure 10c illustrates the time variation of the DC-link voltage. The trace reveals notable variations in the DC-link voltage, which can exacerbate the harmonic contents of the output currents. This observation underscores the importance of controlling and stabilizing the DC-link voltage to mitigate harmonic distortions.
Moving on to Figure 11, the distorted three-phase current waveforms are depicted. These distortions are primarily caused by the harmonic contents and unbalanced conditions of the utility grid voltage. The irregularities in the current waveforms further emphasize the challenges posed by unbalanced and distorted grid conditions. Figure 12 showcases the grid side current components when using conventional current controllers. Figure 12a presents the positive sequence components, while Figure 12b depicts the negative current generated by the unbalanced voltage when transformed to the dq synchronous coordinate system. Notably, a ripple component with a frequency of twice the system frequency (120 Hz) is visible. Figure 12c,d exhibits the grid d and q-axis currents corresponding to the 5th and 7th harmonic components. The current, converted to the dq synchronous coordinate system, reveals a pulsation component with a frequency six times that of the system frequency.  To ensure efficient power extraction, Figure 9b demonstrates how the generator reference speed closely follows the optimal tip-speed ratio as the wind speed varies. By dynamically adjusting the generator reference speed, the control system optimizes power production and maintains a high level of energy conversion efficiency. Figure 9c provides insights into the behavior of the generator power in response to changes in wind and generator speeds. As the wind speed varies, the generator power exhibits a corresponding response, following the fluctuations in wind speed and generator speed. This relationship highlights the dynamic nature of the system, where the power output is continuously adjusted to match the prevailing wind conditions and ensure maximum power extraction from the wind turbine.
These experimental results depicted in Figure 9 validate the effectiveness of the proposed control strategy. The ability of the system to adapt the generator reference speed based on the optimal tip-speed ratio allows for efficient power tracking and enhances the overall performance of the wind energy system. The close alignment between wind speed, generator speed, and system power demonstrates the successful integration of the control strategy, enabling optimal power extraction under varying wind conditions. Figure 10 provides insights into the voltage and current distortions observed in the utility grid. Figure 10a displays the distorted voltage waveform, highlighting the presence of harmonics and other irregularities. Similarly, Figure 10b shows the distorted current waveform resulting from the unbalanced conditions of the utility grid voltage. These distortions in the voltage and current signals can significantly impact the performance and stability of the wind energy system.      Moving on to Figure 11, the distorted three-phase current waveforms are depicted. These distortions are primarily caused by the harmonic contents and unbalanced conditions of the utility grid voltage. The irregularities in the current waveforms further emphasize the challenges posed by unbalanced and distorted grid conditions.    Figure 12 showcases the grid side current components when using conventional current controllers. Figure 12a presents the positive sequence components, while Figure 12b depicts the negative current generated by the unbalanced voltage when transformed to the dq synchronous coordinate system. Notably, a ripple component with a frequency of twice the system frequency (120 Hz) is visible. Figure 12c,d exhibits the grid d and q-axis currents corresponding to the 5th and 7th harmonic components. The current, converted to the dq synchronous coordinate system, reveals a pulsation component with a frequency six times that of the system frequency.  In contrast, Figure 13 demonstrates the effect of the proposed compensation method on addressing the unbalanced and harmonic components. By tuning the proportionalintegral (PI) controller gains effectively, the three-phase grid current waveforms become pure sinusoidal, reflecting the successful compensation for grid disturbances. In contrast, Figure 13 demonstrates the effect of the proposed compensation method on addressing the unbalanced and harmonic components. By tuning the proportional-integral (PI) controller gains effectively, the three-phase grid current waveforms become pure sinusoidal, reflecting the successful compensation for grid disturbances.  Figure 14 displays the dq-axis current components, including positive, negative, and harmonic components, when the proposed controller is applied to mitigate the effects of unbalanced and distorted utility grid voltages. Figure 14a presents the positive sequence current components, while Figure 14b-d shows the reduction of negative sequence currents to zero, validating the effectiveness of the proposed compensation strategy. Figure 15a-c showcases the continuously varying wind speed, voltage, and current waveforms when the compensation technique is applied in the presence of unbalanced and distorted grid voltage conditions. Notably, controlling the negative component of the grid current to a value close to zero reduces the ripple component in the current transformed to the synchronous coordinate system. The robustness of the proposed control strategy is evident from the negligible impact of speed variations on the grid current.   Figure 14 displays the dq-axis current components, including positive, negative, and harmonic components, when the proposed controller is applied to mitigate the effects of unbalanced and distorted utility grid voltages. Figure 14a presents the positive sequence current components, while Figure 14b-d shows the reduction of negative sequence currents to zero, validating the effectiveness of the proposed compensation strategy.      When applying the proposed method, the experimental results, the three-phase grid current is almost balanced despite the grid voltage imbalance and distortion. It is confirmed that the current grid control of the grid-connected PMSG wind turbine system significantly reduced the current negative sequence components and the harmonic components.
The selected novel combination strategy developed in this research paper to address the issue of unbalanced voltage in the utility grid when using a permanent magnet synchronous generator (PMSG) in wind energy systems has several notable effects and advantages compared to existing literature.
1. Maximized power extraction: The proposed strategy aims to maximize power extraction from the wind turbine. By adapting the positive sequence of the dq-axis output current, it ensures the efficient utilization of available power from the wind turbine. This effect is crucial in enhancing the overall performance and energy yield of the wind energy system. 2. Improved output current quality: Another effect of the novel strategy is the improvement in the quality of the output current. By utilizing the negative sequence component, the strategy helps mitigate the effects of unbalanced grid voltages, resulting in a more stable and higher quality output current. This improvement is vital in achiev- When applying the proposed method, the experimental results, the three-phase grid current is almost balanced despite the grid voltage imbalance and distortion. It is confirmed that the current grid control of the grid-connected PMSG wind turbine system significantly reduced the current negative sequence components and the harmonic components.
The selected novel combination strategy developed in this research paper to address the issue of unbalanced voltage in the utility grid when using a permanent magnet synchronous generator (PMSG) in wind energy systems has several notable effects and advantages compared to existing literature.

1.
Maximized power extraction: The proposed strategy aims to maximize power extraction from the wind turbine. By adapting the positive sequence of the dq-axis output current, it ensures the efficient utilization of available power from the wind turbine. This effect is crucial in enhancing the overall performance and energy yield of the wind energy system.

2.
Improved output current quality: Another effect of the novel strategy is the improvement in the quality of the output current. By utilizing the negative sequence component, the strategy helps mitigate the effects of unbalanced grid voltages, resulting in a more stable and higher quality output current. This improvement is vital in achieving grid compatibility and minimizing disturbances caused by unbalanced grid conditions. 3.
Enhanced robustness: The proposed strategy introduces robust controllers specifically designed for PMSG control. These controllers compensate for the effects of specific output current components, such as the 2nd and 6th components. By reducing these dominant components in the output currents from wind turbines, the strategy enhances the robustness of the system and improves overall power quality.

4.
Superiority over existing methods: In comparison with existing literature, the novel combination strategy stands out due to its ability to fully remedy the effects of unbalanced grid voltages. The detailed simulation and experimental studies conducted in this research demonstrate the effectiveness of the proposed strategy under various operating conditions. The obtained results showcase the superiority of the strategy in achieving power extraction optimization and high-quality output currents.

Conclusions
This paper presents a novel technique that effectively addresses the harmonic components and unbalance in utility grid currents. The harmonic content in the output current is primarily caused by distortions and unbalance in the electric utility voltages. To mitigate these issues, superior controllers are employed to remedy the effects of distorted and unbalanced utility grid voltages. Specifically, two controllers are utilized to reduce the 5th and 7th harmonic components in the utility grid currents. Additionally, a controller is introduced to separately regulate the reactive and active power flow from the proposed system.
Extensive simulations are conducted to validate the exceptional performance of the proposed controllers. Moreover, an experimental setup is implemented, utilizing a TMS320F28335 DSP, to further validate the simulation results. The results obtained from both the simulation and experimental studies exhibit a high degree of correlation, demonstrating the improved harmonic content in the electric utility currents and highlighting the superiority of the proposed controllers.
Comparisons are made with existing literature where alternative techniques were employed, as well as with the results obtained when the proposed control strategy was not utilized. These comparisons emphasize the substantially superior performance of the proposed converter. The main achievement of this study lies in the significant reduction of the 5th and 7th harmonic components in the electric utility currents, ultimately improving the quality of the power transmitted to the electrical utility grid, even when dealing with highly distorted voltages.
The successful reduction of harmonic content and improvement in power quality showcased in this study contribute to advancing the field of wind energy systems. The proposed technique holds promise for enhancing the integration of renewable energy sources, specifically permanent magnet synchronous generators (PMSGs), into utility grids by addressing issues of harmonic distortion and unbalance.
While the proposed method offers several advantages and has shown promising results, it is important to acknowledge certain limitations that may impact its utilization. These limitations include:

1.
Complexity of implementation: Implementing the proposed method may require a sophisticated control system and specialized hardware. This could potentially increase the complexity and cost of the wind energy system.

2.
Dependence on accurate system modeling: The effectiveness of the method relies on accurate modeling of the wind turbine system, including the PMSG and its associated components. Any inaccuracies or uncertainties in the system model could affect the performance of the method. Data Availability Statement: The data supporting the findings of this article are available upon reasonable request from the authors.

Conflicts of Interest:
The authors declare no conflict of interest.