1. Introduction
For many nations, maintaining an energy mix with a wide diversity of sources is a necessary key to achieve energy independence, which allows nations to avoid import energetics (such as fuel and electric power transmission from neighboring countries). Import energetics create risky situations when the global energy supply chain fails, which will be relevant as the demand increases again as activities resume under the “new normality” resulting from the COVID–19 global pandemic [
1]. In addition, unexpected fails in transport routes [
2] affect the population and local economy, causing price volatility in consumer goods and running the risk of black-outs in countries dependent on external sources. Wind energy is a solution for any country with potential for generating this type of energy. The use of electronic power converters in wind generation systems among other features allows the use of AC machines in variable speed systems [
3]. Some of the most significant applications are in Permanent Magnet Synchronous Generators (PMSGs), whose scheme uses an electronic converter to perform the power and speed control, as well as to interconnect to the grid, operating at variable power and speed instead of working synchronized to the grid [
3]. Another example is the Doubly Fed Induction Generator (DFIG) that is studied in this work, where the stator is directly connected to the grid, and the control is done with a “back to back” converter connected to the rotor and the grid. This scheme takes advantage of the wide slip range of the machine, which most manufacturers design to be around 30% above the synchronous speed (hypersynchronous operation) and 30% below the synchronous speed (subsynchronous operation) [
4]. The back-to back converter allows the implementation of a vector control scheme to control the speed and generated power of the machine using the rotor voltages and currents. These particular characteristics are applied when it is required to inject power through the rotor during subsynchonous operation or to generate power through the rotor during hypersynchronous operation, where the maximum injected or extracted power is commonly 30% of the rated power [
4]. The electronic converters used in these kinds of schemes often suffer from harmonic distortion, impacting the overall THD of the wind generation system, with harmonic components injected to the grid by the Grid Side Converter (GSC). Recent standards and codes implemented in different countries are aimed at renewable energy sources, demanding they operate with high power quality. Some codes regulate the harmonic content and establish a maximum THD on voltages and currents delivered by these sources. One of these is the standard IEEE 519–2014 [
5] and its section for renewable energy sources. In addition, a standard for distributed systems IEEE 1547–2018 [
6] outlines a maximum permissible distortion and harmonic levels. Additionally, standards such as the IEC 61000–4–30 define methods to perform measurements of the power quality [
7]. Another trend in Wind Generation Systems (WGS) used in distributed generation is the ability to regulate the grid voltage by injecting reactive power to the grid [
8]. The GSC is part of a “back to back” converter in the WGS, and it is shown by
Figure 1. This system uses a Doubly Fed Induction Generator (DFIG), where the converter is designed with a proposed maximum active power (rated) 30% of the rated power of the DFIG [
3,
4].
The semiconductors used in power electronic converters such as Insulated Gate Bipolar Transistor (IGBT) require the introduction of a dead time to avoid shoot-through currents to the DC link caused by the turn off time of these semiconductors [
9]. The dead time introduces distortion to the output voltages and currents, manifesting as crossover distortion and trimming on the peaks and valleys of the sinusoidal current [
10].
In addition, there is an interaction of the converters with voltage harmonics present in the grid voltages [
11]. Vector control schemes implementing conventional Proportional Integral controllers (PI) are unable to mitigate the distortion on the converter currents [
12]. This is due to the classical PI type controllers used in vector control schemes having a poor performance when tracking time-varying signals [
13]. In [
14], PI+Resonant controllers were presented in the synchronous reference frame (
dq) implementing ideal resonant functions, which are difficult to implement in economic Digital Signal Processor-based controllers, whose limited bit resolution may cause numerical errors, which can lead to numerical instability or deviation in the tracking frequency of the controller. Additionally, a variation on the grid frequency with respect to the tracking frequency may result in an abrupt decrease in the ability to track and compensate the harmonics on the inverter currents [
15].
The need for tracking and compensating current harmonics, which are time-varying signals, discard many techniques from classical control. Among the options that have been proposed to solve this problem, there are some based on nonlinear control techniques, such as those based on sliding mode control (SMC), predictive control, and hysteresis band current controllers, among others [
16,
17,
18]. In addition, some control schemes using Proportional+Resonant (PR) controllers in the stationary (
αβ) were proposed [
15], where the fundamental frequency is also tracked with a resonant controller. In the case of implementation with SMC, THD levels lower than 5% can be achieved; however, the implementations carried out show that this control presents a high frequency ripple, which is usually above 2 kHz, which is caused by the sliding nature of this type of controller when tracking a reference [
19]. This oscillation is often referred to as “chattering” [
18]. More advanced schemes of SMC (second order sliding modes, such as “supertwisting”) manage to mitigate this effect without it disappearing completely. Additionally, the mathematical complexity of SMC increases, which makes tuning this type of controllers difficult. Control techniques such as hysteresis band and predictive observers [
20,
21] are characterized by strong electromagnetic emissions due to the high amplitude current ripple required by these techniques to ensure its convergence. Other control algorithms based on nonlinear control techniques often involve the use of transcendental functions in its calculations [
16,
17,
19], creating a greater processing load to the DSP with the numerical approximations required by these transcendental functions, and executed through a variable number of clock cycles.
Additionally, a reactive power control loop was added to this scheme, allowing the GSC to generate and inject reactive power to the grid; this controller is used in conjunction with the reactive power control of the GIDA, which is implemented in the machine control loops to control the total reactive power of the wind generation system [
22]. Such implementation allows the operator of the power grid to regulate and stabilize the voltage of the grid using the reactive power from the turbine, commanding the wind turbine to inject reactive power into the grid when the voltage is below its rated value or consume reactive power when the grid voltage is above its rated value. In other words, through a variation from a lagging power factor to a leading power factor, the system fulfills simultaneously the power generation function as well as the functions of a Synchronous Static Compensator (STATCOM) [
8].
In this work, a non-ideal resonant controller with a defined bandwidth is used to compensate for deviations in the line frequency when placed in parallel to the Proportional–Integral (PI) current controller of the GSC on the synchronous reference frame (
dq). The resonant controller tracks the harmonic frequencies, while the PI controller tracks the reference corresponding to the fundamental of current and controls the voltage of the DC link in the back-to-back converter. In [
14], besides of the use of ideal resonant controllers, a method for tuning these controllers is absent, and in [
15], the convergence of the tuning method relies on the extra poles from an LCL filter, considering a PR controller with its respective degrees of freedom. The presented work shows a method for tuning the PI+Resonant controller considering a simple L filter and the delays introduced by the converter and discretization from the A/D converters. The implementation was carried out in a Digital Signal Processor (DSP), where the digital resonant controllers are implemented in the form of an Infinite Impulse Response (IIR), which is characterized by consuming very little processing time and resources from the DSP requiring simple arithmetic operations by the algorithm. This is because the DSP architecture was conceived to perform this type of operations efficiently, using instruction segmentation known as “pipeline” [
23], allowing it to execute the calculations of multiple discrete transfer functions, and using a small and fixed number of clock cycles as well as single cycle instructions.
2. Grid-Side Converter Model
The back to back converter is shown in
Figure 1; it is composed of two three-phase converters with six switches connected by a DC link. The present work focuses on the GSC; therefore, the analyzed model corresponds to this converter, which is connected to the grid through an L filter. The GSC operates as a voltage source, where the filter voltage drop is equal to the voltage difference between the converter and grid. By knowing the filter model, it is possible to control the current between the GSC and the grid, allowing the transfer of active power or generating reactive power between the converter and the grid. To implement the GSC control structure, it is necessary to find the converter dynamic model, which is determined by [
24]:
where
vCa,
vCb, and
vCc are the voltages at the three-phase output of the GSC,
rl and
L are the resistance and inductance of the filter, respectively,
iCa,
iCb, and
iCc are the GSC currents, and
vSa,
vSb, and
vSc are the voltages in the transformer secondary, which are expressed by:
where
and
are the peak values on the transformer secondary voltage, and
ωs is the angular frequency of the grid. A vector control scheme is used, which requires a model of the converter in the synchronous reference frame (
dq) [
25]. To do this, a transformation of the equations system (1) from a three-phase reference frame to a synchronous reference frame is done, using the Park transform expressed by (3).
Considering that the synchronous reference frame (
dq) rotates at the same angular speed as the voltage vector, the voltage vector is oriented with the
d axis, so that the projection of the voltage vector is
y
. With these considerations, the dynamic model of the converter in the synchronous reference frame is expressed by:
where
vCd,
vCq,
id, and
iq, are the converter voltages and currents in the synchronous reference frame, respectively. The terms
eq and
ed are introduced to the system to perform the decoupling of the coordinate axes.
The implementation of a decoupling structure is shown in
Figure 1, where the terms (5) introduced on the current loop this structure are known as “Feedforward” [
12]. Adding (5) to (4) the decoupled equation system gives:
Applying the Laplace transform to each of the decoupled parts of Equation (6), the resulting transfer functions of the converter currents are expressed in (7) and (8). The transfer functions include a time delay
Td, which is introduced by the conversion time of the A/D converters of the digital signal processor (DSP) as well as the delay introduced by the converter by the PWM modulation. The inclusion of this delay is necessary to guarantee convergence on the calculations in the design procedure of the resonant gains of the controller.
To model the DC link external loop, a relation between the DC side and the grid side is established, according to
Figure 2, where said power can be approximately the same, when the converter losses are neglected. Previous works use only the capacitor model to establish the DC bus transfer function [
12]. However, a transfer function can also be established around the permanent regime set point to obtain a better rejection of perturbations from the load.
The DC bus voltage equation is obtained approximating between the instantaneous power of the DC bus and the grid active power.
Considering that a control oriented in the
d axis is implemented, the terms in the orthogonal axis
q are equal to zero; with this consideration, a small signal analysis is done in (9) to obtain:
where the set point on the permanent regime is given by the nominal bus voltage
VDC and the inverter nominal current
IL of the DC link,
VSd is the line voltage, and
ICd is the nominal current on the
d axis. In (10), these set point variables are considered constants; for the small signal variables, the output current variation
and the grid voltage variation
are considered disturbances. The small signal component of the bus voltage
and the grid-side current
are the output and input respectively, applying the Laplace transform to (10). The resulting transfer function is:
3. Harmonic Analysis in the dq Synchronous Reference Frame
The current harmonics in three-phase converters are due to the insertion of dead times in the semiconductors, switching signals to avoid shoot-through currents in the legs of the converter, also from the interaction of the converter with voltage harmonics. The introduction of dead times produces symmetric distortion that is observed as interruptions in the waveform of the inverter currents on the grid side; this is reflected in odd harmonics appearing, whose frequencies are adjacent to multiples of 6, that is (1 + 6
k) (where
k is a positive integer), which are positive sequence harmonics, and negative sequence harmonics with frequencies on orders of (1 − 6
k) [
10]. In the harmonics caused by the distortion in the grid voltage, the most common type of distortion is symmetric; therefore, odd harmonics are also present [
11]. For its analysis, harmonic functions are shown in its Euler form.
Expressing the Park transformation as the operator
, and applying it to the harmonic vectors to obtain equivalent vectors in the synchronous reference frame:
In the current loop, the resulting functions are the product of the addition of each pair of frequencies when shifted as a result of the transformation and are expressed by the functions:
From this analysis, it is observed that the adjacent of harmonics (1 + 6k) and (6k − 1) shift their frequencies to 6k and their amplitudes are added. When the current control is realized in the synchronous reference frame (dq), the vector components of the current fundamental appear as continuous signals in the (dq) axes, and the ripple on these signals corresponds to the current harmonics (14).
4. Reactive Power Control of the Grid-Side Converter
Current codes on wind generation systems require these systems to operate with a near unity power factor (
fp), considering both reactive power and harmonic content [
6]. In other cases, it is required for the system to be able to control the reactive power, meaning that the system can either consume reactive power obtaining a lagging
fp = 0.9, or to inject reactive power to the grid, achieving a leading power factor to help regulate the grid voltage [
8]. A structure for controlling the GSC reactive power is added to the control loops of the converter, which is used to generate the current reference
based on the balance of reactive power consumed by the stator of the DFIG
Qs and the required total reactive power
QT.
From the PQ theory [
25], the power relations in the synchronous reference frame (
dq) are described by:
To obtain the current references in an oriented control scheme, the consideration (
and
) is used. The power Equation (16) for the reactive power becomes
, which depends only on the
q component of the current. Taking this into account the current reference
is:
5. PI+Resonant Current Controller
The proposed PI+Resonant controller is implemented in the synchronous reference frame, unlike [
26], where a similar scheme is realized in the stationary reference frame αβ. In the proposed implementation, the PI part of the controller is responsible for monitoring the fundamental currents and controlling of the voltage on the DC bus, while the resonant controllers track the equivalent harmonic components of the reference currents
and
. A typical resonant controller has the form shown in (18) [
27].
The controller in (18) is an ideal form of this type of controller; however, as shown in [
28], the implementation of this controller is not suitable in digital systems because of the limited numerical precision these systems have; for this reason, the proposed controllers have the form:
This form allows its practical implementation and introduces a damping factor ξ in this controller to provide stability against the numerical instability caused by the numerical resolution; also, the added bandwidth is useful: when a shift occurs on the grid frequency, the controller will maintain tracking. The proposed transfer function of the PI+Resonant controller for both axes is:
where
ωs is the grid frequency, multiplied by the index
n to designate the equivalent harmonic in the synchronous reference frame,
ξ is the damping factor of the resonant controller, and
KRn.
5.1. PI Controller Tuning for Current and Voltage Control Loops
Considering that each resonant controller tracks two harmonic frequencies, according to the analysis in
Section 2, the PI controller should work on the fundamental component of the current, with a constant reference on the synchronous reference frame
dq. In [
12], the design of the controller is done considering a fixed overshoot and making crossover frequency
ωc the inverse of the time constant of the plant. The calculations in the cited work were obtained from the Bode plot, where
ωc is the point where the open-loop transfer function gain (21) is unitary (0 dB).
A variation to this method is to consider a different crossover frequency
ωc and a phase margin (
PM) according to the desired overshoot level [
29]. Equation (22) corresponds to the point with unity gain, while (23) corresponds to the phase margin at that point.
Substituting the current loop transfer functions (8) and the PI part of the controller (17) in (22) and (23), they form a system of equations which is solved for
Kp and
Ki obtaining (24) and (25).
where
. The values of
ωic and
PMic are proposed considering the desired speed response of the control loop, where the current loop is designed with a crossover frequency one decade below the switching frequency
ωsw and above the fundamental frequency of the grid
ωs,
ωs <
ωic < 0.1
ωsw. The gains of the voltage loop controller are obtained starting from the closed-loop current transfer function:
A crossover frequency
ωVCDc is chosen to be at least one decade below the crossover frequency of the current loop,
ωVCDc < 0.1
ωic, and a proposed phase margin
PMVCD, which is usually of π/3 depending on the desired transient response. The resulting equations are
where
. The design characteristics of the controller are selected considering the desired response speed of the control of the current loops and the voltage loop within the criteria presented above. The values obtained for the controllers are shown by
Table 1, as well phase margins and crossover frequencies, where a frequency response ten times above the frequency of the fundamental was chosen. The voltage loop controller was proposed so that the recovery time from a transient is approximately one cycle of the voltage period. The diagram of Bode is shown by
Figure 3.
5.2. Resonant Controller Design
The compensated equivalent harmonics in the synchronous reference frame are those with a frequency 6000 times the fundamental frequency. There are different design methods for Proportional+Resonant (PR) type controllers. In [
27], a modification of the Ziegler Nichols method is used. In [
15,
30], the gains are obtained by adjusting the distance to the critical point; this is the method used for designing the proposed PI+Resonant controller. When the tuning is done by adjusting the distance to the critical point (−1, j0), the stability of the control loop must be verified; this is accomplished using the Nyquist stability criteria for systems with delay [
31]. The previously obtained gains of
Kp and
Ki are used to limit the degrees of freedom of the controller, to easily obtain a range of values of each resonant controller
KRn, maintaining the current loop in steady state, where the critical point is not encircled. Next, the sensitivity function of the system is used.
The calculation of the resonant controller gains is carried out using a Nyquist graph, considering a minimum distance
η0 to the critical point:
Setting
η0 = 0.1 and
ξ = 0.01 and taking into account a measured delay of 300 μs, the analysis is performed for each frequency. The
KRn values that present the best response, for each of the equivalent harmonic frequencies, in the
dq reference frame are shown in
Table 2.
Figure 4 shows the Nyquist plot of the PI+Resonant controller for the 6th harmonic, where the corresponding trajectories are observed at different gains; in this case, for the gain
Kr = 150, it is observed that the path encloses the critical point. Therefore, a value of
Kr = 100 is selected, verifying that the minimum distance is maintained η
0 at this point.
With the analysis of simulated and experimental results with a classical PI controller on the converter, it was found that harmonics higher than the 24th have an amplitude less than 0.5% of the fundamental, so its contribution to increase the overall harmonic distortion in the current (THDi) has little impact. In addition, amplitudes below 0.5% in the harmonics >24 are compliant with the standard 1547–2018. For this reason, the resonant controllers were designed for odd harmonics up to order 24, excluding the zero-order ones.