Comparative Study between Flatness-Based and Field-Oriented Control Methods of a Grid-Connected Wind Energy Conversion System

: Wind energy is an alternative to meet the growing energy demand. Control of wind turbines should help the reliability and stable operation of the power grid. Furthermore, they should respect the technical requirements according to the grid codes to inject the wind energy into the grid. In this paper, a well-known ﬁeld-oriented control (FOC) method and a new control method based on the ﬂatness properties (FBC) are presented and compared. These control methods are applied to a wind energy conversion system (WECS), which connects a variable-speed wind turbine (WT) based on a permanent magnet synchronous generator (PMSG) to the grid via a back-to-back converter. The main aim of both control methods is to extract the maximum power from the wind. For this purpose, the mathematical model of each subsystem, i.e., WT, PMSG, and electrical grid, is presented. To evaluate and to compare the dynamic behavior of the high-power wind energy conversion system, it is modeled and the control strategies are developed using SimPowerSystems Toolbox in MATLAB. The simulation results obtained in the time domain show that the FBC performs better at managing the energy in the studied system. Indeed, the proposed FBC is a high bandwidth control method with only one closed-loop control, which leads to a high dynamic performance. Therefore, that strategy can be used to provide ancillary services such as frequency control and spinning reserves according to the grid codes.


Introduction
Wind energy is an alternative to meet the growing energy demand and to protect the environment [1]. The Global Wind Energy Council has reported a global capacity of 651 GW with 60.4 GW of new installations in 2019 and an expectation of growth of more than 100 GW in annual installations over the next decade [2,3]. Research on the wind power industry started to improve in the last century where the variable-speed wind turbine (WT) with a full-scale frequency converter was used in distributed power generation systems [4][5][6][7][8]. The variable-speed WTs, the most common type of wind energy conversion systems (WECSs), are able to extract more power than the fixed-speed WTs can [9]. In this system, the utilization of PMSGs has more advantages in comparison with induction generators such as high efficiency and reliability. Therefore, PMSGs have become a more attractive solution for use in variable-speed wind turbine applications [10,11]. Indeed, the WT with the PMSG is an efficient configuration for variable-speed WTs. Some advantages of this configuration are dc excitation elimination, less maintenance cost, and high powerto-weight ratio. To connect the WT to the network, a full-scale converter is employed, which provides a wide operation range and more produced power [9]. To control the system, it was shown that the system is flat at first, and then the appropriate trajectories should be generated and be planned on the components of the output variable vector of the system. Based on the research in the field of modern control, the FBC is expected to offer some advantages such as rejection of perturbations and robustness in comparison with the other methods [24]. In the next section, the overall structure of the model is presented. The FOC method is explained in Section 3 and the FBC method is presented in Section 4, where the system is divided by two subsystems and the proper outputs are chosen for each subsystem. The time domain simulation results for a 5 MW WT obtained in MATLAB-SimPowerSystems are presented, compared, and analyzed in Section 5. Figure 1 shows the structure of the wind energy conversion system. It consists of a WT and a PMSG, which is connected to the grid via a back-to-back converter. In the following, the model of each part is presented.

Wind Turbine Model
Different models have been proposed for wind turbines by researchers. In [28], a nonlinear model for a WT including the dynamics of the drivetrain was developed with emphasis on the modeling of the backlash phenomenon. In this paper, a simple common model is presented for the wind turbine. The aerodynamic power converted by the wind turbine depends on the power coefficient Cp, as presented in Equation (1) [29].
where is the air density (1.225 kg/m 3 ), stands for the radius of the rotor blade in (m), represents the wind speed in (m/s), λ is the tip speed ratio (TSR) of the rotor blade, and β represents the blade pitch angle in (deg). The TSR is calculated by Equation (2) [30].
where Ω is the angular speed of the wind turbine shaft in (rad/s). The power coefficient is given by expression (3) [31,32]: (λ , β) = 0.5176 116 λ − 0.4β − 5 + 0.0068λ In this equation, λi is calculated by Equation (4). λ = 1 λ + 0.08 β − 0 0.035 β + 1 (4) Figure 1. Structure of the wind energy conversion system. Figure 1 shows the structure of the wind energy conversion system. It consists of a WT and a PMSG, which is connected to the grid via a back-to-back converter. In the following, the model of each part is presented.

Wind Turbine Model
Different models have been proposed for wind turbines by researchers. In [28], a nonlinear model for a WT including the dynamics of the drivetrain was developed with emphasis on the modeling of the backlash phenomenon. In this paper, a simple common model is presented for the wind turbine. The aerodynamic power converted by the wind turbine depends on the power coefficient C p , as presented in Equation (1) [29].
where ρ is the air density (1.225 kg/m 3 ), R stands for the radius of the rotor blade in (m), V wi represents the wind speed in (m/s), λ is the tip speed ratio (TSR) of the rotor blade, and β represents the blade pitch angle in (deg). The TSR is calculated by Equation (2) [30]. λ = R Ω gen V wi (2) where Ω gen is the angular speed of the wind turbine shaft in (rad/s). The power coefficient is given by expression (3) [31,32]: In this equation, λ i is calculated by Equation (4).

Model of Permanent Magnet Synchronous Generator (PMSG)
The usual model of the PMSG is obtained by considering only the fundamental harmonic of the flux distribution in the air gap of the machine [5]. To define easily the control strategy of the system, the analytical model of the PMSG related to the rotor reference is given in Equation (5). In this equation, V ds and V qs are d-q axis voltages, I ds and I qs represent d-q axis currents, L d and L q stand for d-q axis inductances, R s is the stator phase resistance, and ψ f represents the magnet flux linkage [5]. The electromagnetic torque is expressed by Equation (6) [29].

Voltage Source Converter (VSC)
As it can be seen in Figure 1, the VSC is composed of two back-to-back three-phase IGBT bridges. Each one contains six switches. Neglecting the power losses in the converters and using the notation of Figure 2, the DC bus is modeled by Equation (7), in which P WT and P dc are the WT output active power and the power delivered to the network, respectively.
Therefore, the input current of the grid-side converter, I 2 , is calculated by Equation (8).
In the next sections, two methods are explained to control the DC-bus voltage and each bridge.

Model of Permanent Magnet Synchronous Generator (PMSG)
The usual model of the PMSG is obtained by considering only the fundamental harmonic of the flux distribution in the air gap of the machine [5]. To define easily the control strategy of the system, the analytical model of the PMSG related to the rotor reference is given in Equation (5). In this equation,  and  are d-q axis voltages,  and  represent d-q axis currents,  and  stand for d-q axis inductances,  is the stator  phase resistance, and represents the magnet flux linkage [5].

Voltage Source Converter (VSC)
As it can be seen in Figure 1, the VSC is composed of two back-to-back three-phase IGBT bridges. Each one contains six switches. Neglecting the power losses in the converters and using the notation of Figure 2, the DC bus is modeled by Equation (7), in which PWT and Pdc are the WT output active power and the power delivered to the network, respectively.
Therefore, the input current of the grid-side converter, I2, is calculated by Equation (8).
In the next sections, two methods are explained to control the DC-bus voltage and each bridge.

Model of the Electrical Grid
The dynamic model of the electrical grid can be expressed by Equation (9), where and are the filter inductance and resistance, respectively, and present the d-q components of the grid voltage, and stand for the d-q components of the inverter output voltage, and are the d-q axis components of the current measured on the grid, and is the fundamental frequency [2].

Model of the Electrical Grid
The dynamic model of the electrical grid can be expressed by Equation (9), where L g and R g are the filter inductance and resistance, respectively, V gd and V gq present the d-q components of the grid voltage, V id and V iq stand for the d-q components of the inverter output voltage, I gd and I gq are the d-q axis components of the current measured on the grid, and w g is the fundamental frequency [2].
The active and reactive powers injected to the grid are written as follows [17]: After developing the mathematical model of the system, two different control methods, a field-oriented control (FOC) and a flatness-based control (FBC) method, are explained in the following.

Field-Oriented Control Method
The converter connected to the stator of the machine controls the rotation speed of the generator and hence its torque. The used converter in the grid side ensures the DC-bus control and the active and reactive power management between the generator and the grid. This interface provides a nearly complete decoupling between the grid and the generator. To control the active power, the authors of [33] studied a method based on turbine stabilityconstrained available wind power. However, in this paper, the Maximum Power Point Tracking (MPPT) mode is studied, in which the wind speed is lower than the nominal speed V wi−nom , which corresponds to the nominal power of the PMSG. In this operation mode, the angular speed Ω of the WT axis is controlled to follow the optimum value Ω opt at which the power captured by the WT is maximum (as shown in Figure 3) and the pitch angle is equal to zero [34]. It should be mentioned that in overspeed operation mode, the pitch angle is controlled such that the power extracted from the wind is limited to its nominal value. For this purpose, different techniques have been proposed in the literature such as neuro-estimators, PI-controllers, and independent pitch control [35,36]. In the following, the principle of each power converter ( Figure 1) control approach is explained.
The converter connected to the stator of the machine controls the rotation speed of the generator and hence its torque. The used converter in the grid side ensures the DCbus control and the active and reactive power management between the generator and the grid. This interface provides a nearly complete decoupling between the grid and the generator. To control the active power, the authors of [33] studied a method based on turbine stability-constrained available wind power. However, in this paper, the Maximum Power Point Tracking (MPPT) mode is studied, in which the wind speed is lower than the nominal speed , which corresponds to the nominal power of the PMSG. In this operation mode, the angular speed Ω of the WT axis is controlled to follow the optimum value Ω at which the power captured by the WT is maximum (as shown in Figure 3) and the pitch angle is equal to zero [34]. It should be mentioned that in overspeed operation mode, the pitch angle is controlled such that the power extracted from the wind is limited to its nominal value. For this purpose, different techniques have been proposed in the literature such as neuro-estimators, PI-controllers, and independent pitch control [35,36]. In the following, the principle of each power converter ( Figure 1) control approach is explained.

Wind Generator Control Method
The principle of the field-oriented control method is nowadays a standard way to control wind generators [5,37]. The control structure of the generator-side converter is shown in Figure 4. It consists of rotation speed control and the dq components of the generator stator current, which are explained in detail.

Wind Generator Control Method
The principle of the field-oriented control method is nowadays a standard way to control wind generators [5,37]. The control structure of the generator-side converter is shown in Figure 4. It consists of rotation speed control and the dq components of the generator stator current, which are explained in detail.

Rotation Speed Control
As mentioned above, the speed rotation is controlled to extract the maximum power existing in the wind turbine. The reference of the speed is obtained by the curves presented in Figure 3. The speed rotation control is carried out by a PI controller, which generates a reference value for the electromagnetic torque.

Stator's Current Control
To control the dq components of the PMSG current, the reference values should be defined first. For this purpose, the reference value of the d-component of the current, Isdref, is set to zero. This allows the reduction in the ohmic losses. Therefore, the electromagnetic torque expressed in Equation (6) is simplified as Equation (11).
It was noted that the output of the speed controller is considered as the reference

Rotation Speed Control
As mentioned above, the speed rotation is controlled to extract the maximum power existing in the wind turbine. The reference of the speed is obtained by the curves presented in Figure 3. The speed rotation control is carried out by a PI controller, which generates a reference value for the electromagnetic torque.

Stator's Current Control
To control the dq components of the PMSG current, the reference values should be defined first. For this purpose, the reference value of the d-component of the current, I sd-ref , is set to zero. This allows the reduction in the ohmic losses. Therefore, the electromagnetic torque expressed in Equation (6) is simplified as Equation (11).
It was noted that the output of the speed controller is considered as the reference value for the electromagnetic torque. Therefore, the q-component of the current, I sq-ref , is obtained using the output of the controller and Equation (11). Equation (12) presents the reference value of the dq components of the current.
PI regulators are employed to control the dq components of the PMSG current, as shown in Equation (13).
It is clear that the dynamics of the inner control loop (stator current) should be faster than that of the outer speed loop. Figure 4 shows the block diagram of the explained wind generator control strategy.

Energy Management between the PMSG and the Grid
Energy management between the PMSG and the Grid includes two separated control loops, and each loop contains an inner current control one. More precisely, the outer loops control the DC-bus voltage and the reactive power, while the concerned inner loops control the d-component and the q-component of the grid current, respectively. The control block diagram is shown in Figure 5.  The active and reactive power can be estimated, as presented in Equation (10), by neglecting the power losses in the converters. To deliver the produced power to the grid, a Phase-Locked Loop (PLL) should be used to synchronize the output voltage of the inverter with the grid's frequency. Figure 6 presents the PLL block diagram. The PLL imposes the voltage to zero, which allows the decoupling of active and reactive power as written in (14). The active and reactive power can be estimated, as presented in Equation (10), by neglecting the power losses in the converters. To deliver the produced power to the grid, a Phase-Locked Loop (PLL) should be used to synchronize the output voltage of the inverter with the grid's frequency. Figure 6 presents the PLL block diagram. The PLL imposes the V gq voltage to zero, which allows the decoupling of active and reactive power as written in (14).
Processes 2022, 10, 378 7 of 20 poses the voltage to zero, which allows the decoupling of active and reactive power as written in (14). By neglecting the power losses in the grid-side converter, the relationship between the active power exchanged between the grid and the DC bus is given by Equation (15).
where is the input current of the inverter. In the following, the control strategy that manages the energy between the PMSG and the Grid is explained in detail.

DC-Bus Voltage and Reactive Power Control
In order to ensure that the DC-bus voltage, Vdc, follows its reference, Vdc-ref, which is fixed at 4700 V, a PI controller is used. The same type of regulator is utilized to control the reactive power. The reference value of the reactive power is defined online depending on the grid conditions during the time. Therefore, the reactive power may be injected to the grid or be absorbed from the grid. Therefore, the controllers of the outer loops are presented by Equation (16). By neglecting the power losses in the grid-side converter, the relationship between the active power exchanged between the grid and the DC bus is given by Equation (15).
where I 2 is the input current of the inverter. In the following, the control strategy that manages the energy between the PMSG and the Grid is explained in detail.

DC-Bus Voltage and Reactive Power Control
In order to ensure that the DC-bus voltage, V dc , follows its reference, V dc-ref , which is fixed at 4700 V, a PI controller is used. The same type of regulator is utilized to control the reactive power. The reference value of the reactive power is defined online depending on the grid conditions during the time. Therefore, the reactive power may be injected to the grid or be absorbed from the grid. Therefore, the controllers of the outer loops are presented by Equation (16).

Grid's Currents Control
As it is shown in Equation (16), the d-axis current reference I gd−re f is obtained by the output of the DC-bus regulator, and the q-axis current reference I gq−re f is generated by the output of reactive power regulator. Again, a simple PI regulator can control the dq components of the grid's current. Equation (17) presents outputs of the controllers.

Flatness-Based Control
The property of flatness can be used to design control algorithms. A dynamic system is flat if and only if the state and control variables of the system can be written as functions of the flat output and its derivatives [38,39]. Mathematically, a system defined by: . x = f (x, u) (x R n and u R m are state and the input vector, respectively) is considered to be differentially flat if an output y R m can be found in the form of (18) such that the state and the input vectors be written like Equation (19) [38,39]. with rank (ϕ) = m, rank (ζ) = m, and rank (φ) = n. Generally, the control structure consists of a feedforward and a feedback part. As flatness allows for calculating the control inputs as functions of only the flat outputs, it can be used to design the feedforward part even for nonlinear systems. Therefore, to control a system, the appropriate output variables should be chosen first, and then the reference trajectories should be planned on them to calculate the control variable components.
To prove that the system is flat, it is divided by two subsystems, and it is shown that both subsystems are flat.

Wind Generator Control Method
Choosing the flux ψ d and the rotation speed Ω as the flat outputs of the first subsystem, the state variables of the system can be obtained from the mechanical and flux equation, as shown in Equation (21).
The control variables can also be written as Equation (21) using the model of the PMSG. .
Therefore, the first subsystem is flat. To generate the reference trajectories of the system outputs, the optimum speed Ω opt obtained from (2) is used. The optimum speed is calculated by replacing λ by λ opt , where λ opt is the optimum TSR at which the power coefficient is maximum C p−max . Therefore, the optimal speed is taken into account to generate the reference trajectory of Ω. To control the dynamics of the output variables, a second-order filter is put on the references' trajectories.
Concerning the second output variable, the constant flux linkage produced by the permanent magnets ψ f is considered as the reference value of ψ d . Therefore, an online and an offline reference trajectory is designed for the system outputs, Ω and ψ d , respectively.
In order to ensure tracking of the system outputs toward their own reference trajectories, ψ dre f and Ω re f , a state feedback controller is used such as Equation (22). . .
The integral components are introduced to ensure a zero static error in the steady state and to compensate effects introduced by modeling errors. Substituting .. Ω and . ψ d obtained by the regulators in Equation (22) leads to the calculation of the control variables. These control variables are used to generate the switching signals of the wind turbine-side AC/DC converter.
To design the controller parameters, it is mentioned that Equation (22) has a cubic (first equation) and a quadratic (second equation) equation form where the variable is the error between the system output variable and their respective references. More precisely, Equation (22) can be written as Equation (23)  This contains a third-order and a second-order equation. An optimum choice for the parameters of the first one (third-order equation) is obtained by the factor theorem with pre-specified root locations in order to obtain a behavior close to that of the second-order. Therefore, the characteristic polynomial P(s) deduced from Equation (23) will be: The equivalent of Equations (23) and (24) leads to the calculation of the controller parameters, which are shown in Equations (25) and (26).
ξ Ω and ω Ω represent the damping ratio and the cut-off pulsations of the speed loop, respectively. These values are chosen to ensure a well-damped response and an appropriate fast transient response. In the same way, the parameters of the flux loop controller (the second relation of Equation (22)) are obtained as: Again, ξ ψ d and ω ψ d represent the damping ratio and the cut-off pulsations of the flux loop, respectively. Figure 7 shows the block diagram of the explained control method for the wind generator.

Energy Management between the PMSG and the Grid
As mentioned before, the grid-side converter is controlled such that the DC-bus voltage and the reactive power can be managed. Therefore, these two variables, i.e., the DCbus voltage and the reactive power , are considered as vector components of the second subsystem output. By substituting I2 from Equation (8) in Equation (15), and by using Equation (14), the state variables of the second subsystem, Igd and Igq, can be written as functions of the subsystem flat outputs, as presented by Equation (27).
In addition, and , the d-q components of the inverter output voltage, are chosen as the control variables of the second subsystem, which can be written as functions of second subsystem flat outputs and their derivatives. They are expressed by Equation (28).

Energy Management between the PMSG and the Grid
As mentioned before, the grid-side converter is controlled such that the DC-bus voltage and the reactive power can be managed. Therefore, these two variables, i.e., the DC-bus voltage V dc and the reactive power Q g , are considered as vector components of the second subsystem output. By substituting I 2 from Equation (8) in Equation (15), and by using Equation (14), the state variables of the second subsystem, I gd and I gq , can be written as functions of the subsystem flat outputs, as presented by Equation (27).
In addition, V id and V iq , the d-q components of the inverter output voltage, are chosen as the control variables of the second subsystem, which can be written as functions of second subsystem flat outputs and their derivatives. They are expressed by Equation (28).
Therefore, the second subsystem is also flat. Before controlling the output variables V dc and Q g , the reference values should be defined. The same values explained in the third section are considered as the reference values to let everyone compare the behavior of the system under the two control methods. It should be mentioned that a filter may be applied to the system outputs to force the system to follow a desired dynamic. Furthermore, this can protect the system against the rapid changes in system variables. A state feedback controller shown in Equation (29) guarantees the output tracking of the defined reference.
The same method explained in Section 4.1 is used to calculate the controllers' parameters. By substituting the outputs of controllers of Equation (29), δ v = .. V dc and δ q = . Q g , in Equation (28), the control variables of the second subsystem are calculated. The inverse park transformation and well-known PWM are used to finally generate the switching signals of the inverter. Figure 8 shows the block diagram of the control method applied to the second subsystem.
Processes 2022, 10, x FOR PEER REVIEW 11 of 22 park transformation and well-known PWM are used to finally generate the switching signals of the inverter. Figure 8 shows the block diagram of the control method applied to the second subsystem.

Simulation Results and Discussion
To validate the applied control methods, FOC and FBC, and to be able to compare the system performance with the applied control strategies, the system presented in Figure 1 is modeled in a SimPowerSystems environment in Matlab with the parameters listed in Table 1. It presents the wind turbine, the PMSG, the DC bus, and the filter parameters.

Simulation Results and Discussion
To validate the applied control methods, FOC and FBC, and to be able to compare the system performance with the applied control strategies, the system presented in Figure 1 is modeled in a SimPowerSystems environment in Matlab with the parameters listed in Table 1. It presents the wind turbine, the PMSG, the DC bus, and the filter parameters.
As it can be seen from Figure 5 or Figure 8, the energy conversion system is connected to the grid through a 1.56/33 KV transformer. Figure 9 displays a three-phase set of line-to-neutral voltages for the primary side of the transformer. To compare the dynamic performance of the conventional (FOC) and the proposed (FBC) control methods with this connection, a positive wind speed step variation from 9 m/s to 11 m/s and a negative one from 11 m/s to 8 m/s are applied to the system at t = 2 s and t = 4 s, respectively. Two parameters are measured then for the output variables: settling time and overshoot.  = 4700 V and = 0 VAR). It should be mentioned that the wind turbine is controlled to extract the maximum power from the wind for both control methods. Therefore, the reference value for the rotation speed is generated by the MPPT strategy by using Figure 3 for each wind speed. In the studied case, this reference value has a positive step change from almost 10.6 RPM to 12.9 RPM and a negative step change from 12.9 RPM to 9.4 RPM. Although the rotation speed is well regulated with both methods, the machine speed controlled by the FOC method has a significant overshoot during the wind speed variations. The overshoot measured for the FOC is more than 40%, while there is not any overshoot by using the FBC method. Furthermore, the second method (FBC) has a lower settling time, which means the system controlled by the flatness-based method is faster than the other one. Indeed, the dynamics of the output variables are managed and controlled by a second-order filter put on the references' trajectories in the FBC method. This leads to control of the output variables in the transient states, as well as the steady state. Therefore, the overshoot and the settling time can be designed favorably, which is the advantage of the FBC in comparison with the FOC. Furthermore, the system output follows perfectly its planned reference trajectory, which proves that the controller parameters are well calculated.   Figures 10 and 11 show the rotation speed of the PMSG obtained with FBC and FOC methods, respectively, in which reference values of the DC-bus voltage and reactive power remain constant (V dcre f = 4700 V and Q gre f = 0 VAR). It should be mentioned that the wind turbine is controlled to extract the maximum power from the wind for both control methods. Therefore, the reference value for the rotation speed is generated by the MPPT strategy by using Figure 3 for each wind speed. In the studied case, this reference value has a positive step change from almost 10.6 RPM to 12.9 RPM and a negative step change from 12.9 RPM to 9.4 RPM. Although the rotation speed is well regulated with both methods, the machine speed controlled by the FOC method has a significant overshoot during the wind speed variations. The overshoot measured for the FOC is more than 40%, while there is not any overshoot by using the FBC method. Furthermore, the second method (FBC) has a lower settling time, which means the system controlled by the flatness-based method is faster than the other one. Indeed, the dynamics of the output variables are managed and controlled by a second-order filter put on the references' trajectories in the FBC method. This leads to control of the output variables in the transient states, as well as the steady state. Therefore, the overshoot and the settling time can be designed favorably, which is the advantage of the FBC in comparison with the FOC. Furthermore, the system output follows perfectly its planned reference trajectory, which proves that the controller parameters are well calculated.
The active power (and mechanical power) curves of the system during the wind speed variations are presented in Figures 12 and 13 for the system that is controlled by the FBC and FOC method, respectively. The simulation results show again that the system controlled by the FBC method has faster dynamics in comparison with the second one. More precisely, the settling time of the active power is almost 0.18 s with the FBC, while it is almost equal to 0.25 s with the FOC. Furthermore, the overshoot of the response is equal to 5% and 30% for the FBC and FOC, respectively. Indeed, the dynamics of the active power is indirectly controlled in the FBC. Therefore, it is expected that the dynamics of this variable is faster with a lower overshoot. Nevertheless, the efficiency of the system is almost the same for both control methods in steady states. That is because of the effectiveness of the controllers in both systems. change from 12.9 RPM to 9.4 RPM. Although the rotation speed is well regulated with both methods, the machine speed controlled by the FOC method has a significant overshoot during the wind speed variations. The overshoot measured for the FOC is more than 40%, while there is not any overshoot by using the FBC method. Furthermore, the second method (FBC) has a lower settling time, which means the system controlled by the flatness-based method is faster than the other one. Indeed, the dynamics of the output variables are managed and controlled by a second-order filter put on the references' trajectories in the FBC method. This leads to control of the output variables in the transient states, as well as the steady state. Therefore, the overshoot and the settling time can be designed favorably, which is the advantage of the FBC in comparison with the FOC. Furthermore, the system output follows perfectly its planned reference trajectory, which proves that the controller parameters are well calculated.  The active power (and mechanical power) curves of the system during the wind speed variations are presented in Figures 12 and 13 for the system that is controlled by the FBC and FOC method, respectively. The simulation results show again that the system controlled by the FBC method has faster dynamics in comparison with the second one. More precisely, the settling time of the active power is almost 0.18 s with the FBC, while it is almost equal to 0.25 s with the FOC. Furthermore, the overshoot of the response is equal to 5% and 30% for the FBC and FOC, respectively. Indeed, the dynamics of the active power is indirectly controlled in the FBC. Therefore, it is expected that the dynamics of this variable is faster with a lower overshoot. Nevertheless, the efficiency of the system is almost the same for both control methods in steady states. That is because of the effectiveness of the controllers in both systems. The active power (and mechanical power) curves of the system during the wind speed variations are presented in Figures 12 and 13 for the system that is controlled by the FBC and FOC method, respectively. The simulation results show again that the system controlled by the FBC method has faster dynamics in comparison with the second one. More precisely, the settling time of the active power is almost 0.18 s with the FBC, while it is almost equal to 0.25 s with the FOC. Furthermore, the overshoot of the response is equal to 5% and 30% for the FBC and FOC, respectively. Indeed, the dynamics of the active power is indirectly controlled in the FBC. Therefore, it is expected that the dynamics of this variable is faster with a lower overshoot. Nevertheless, the efficiency of the system is almost the same for both control methods in steady states. That is because of the effectiveness of the controllers in both systems.  Relating to the second subsystem (grid-side converter that connects the DC bus to the grid), the DC-bus voltage and the reactive power should be controlled. Relating to the second subsystem (grid-side converter that connects the DC bus to the grid), the DC-bus voltage and the reactive power should be controlled. Figures 14 and 15 show the DC-bus voltage control obtained with FBC and FOC methods, respectively. Although the DC-bus voltage, Vdc, is controlled well with both methods, the effect of wind speed variations on DC-bus voltage is much less with the FBC in comparison with the FOC. This is due to the faster dynamics of the PMSG, which is controlled by the FBC as mentioned above. It is mentioned that the reference value of the DC-bus voltage, Vdcref, is fixed to 4700 V.   Figures 14 and 15 show the DC-bus voltage control obtained with FBC and FOC methods, respectively. Although the DC-bus voltage, V dc , is controlled well with both methods, the effect of wind speed variations on DC-bus voltage is much less with the FBC in comparison with the FOC. This is due to the faster dynamics of the PMSG, which is controlled by the FBC as mentioned above. It is mentioned that the reference value of the DC-bus voltage, V dcref , is fixed to 4700 V. Relating to the second subsystem (grid-side converter that connects the DC bus to the grid), the DC-bus voltage and the reactive power should be controlled. Figures 14 and 15 show the DC-bus voltage control obtained with FBC and FOC methods, respectively. Although the DC-bus voltage, Vdc, is controlled well with both methods, the effect of wind speed variations on DC-bus voltage is much less with the FBC in comparison with the FOC. This is due to the faster dynamics of the PMSG, which is controlled by the FBC as mentioned above. It is mentioned that the reference value of the DC-bus voltage, Vdcref, is fixed to 4700 V.  For a better evaluation of the control performance of the DC-bus voltage, as well as modeling the DC-bus voltage variation due to the low-voltage ride-through (LVRT), a positive and a negative step variation are applied to the DC-bus voltage reference, V dcref . Figures 16 and 17 show the DC-bus voltage control obtained with FBC and FOC methods, respectively. As can be seen, although the DC-bus voltage is controlled well with both control strategies, the first one does not contain any overshoot, while utilizing the second one leads to a 25% overshoot. Furthermore, the FBC method results in a faster response. The settling time with FBC is 70 ms, while it is almost 450 ms with FOC. As with the first subsystem (PMSG side), the dynamics of the output variables are managed and controlled by a second-order filter put on the references' trajectories in the FBC method. Furthermore, the dynamics of the PMSG is faster in the FBC method, which leads to a better control of the DC-bus voltage in both the transient and steady state. For a better evaluation of the control performance of the DC-bus voltage, as well as modeling the DC-bus voltage variation due to the low-voltage ride-through (LVRT), a positive and a negative step variation are applied to the DC-bus voltage reference, Vdcref. Figures 16 and 17 show the DC-bus voltage control obtained with FBC and FOC methods, respectively. As can be seen, although the DC-bus voltage is controlled well with both control strategies, the first one does not contain any overshoot, while utilizing the second one leads to a 25% overshoot. Furthermore, the FBC method results in a faster response. The settling time with FBC is 70 ms, while it is almost 450 ms with FOC. As with the first subsystem (PMSG side), the dynamics of the output variables are managed and controlled by a second-order filter put on the references' trajectories in the FBC method. Furthermore, the dynamics of the PMSG is faster in the FBC method, which leads to a better control of the DC-bus voltage in both the transient and steady state.   For a better evaluation of the control performance of the DC-bus voltage, as well as modeling the DC-bus voltage variation due to the low-voltage ride-through (LVRT), a positive and a negative step variation are applied to the DC-bus voltage reference, Vdcref. Figures 16 and 17 show the DC-bus voltage control obtained with FBC and FOC methods, respectively. As can be seen, although the DC-bus voltage is controlled well with both control strategies, the first one does not contain any overshoot, while utilizing the second one leads to a 25% overshoot. Furthermore, the FBC method results in a faster response. The settling time with FBC is 70 ms, while it is almost 450 ms with FOC. As with the first subsystem (PMSG side), the dynamics of the output variables are managed and controlled by a second-order filter put on the references' trajectories in the FBC method. Furthermore, the dynamics of the PMSG is faster in the FBC method, which leads to a better control of the DC-bus voltage in both the transient and steady state.   Figures 18 and 19 show the three-phase set of the system current, which is injected to the grid during the mentioned test. The effect of the smaller overshoot and settling time of the DC-bus voltage and the active power in the system controlled by the FBC is clear on the line currents. As it can be seen, the current behavior in the first case (system controlled by FBC) in the transient state is better than that of the second one (system controlled by FOC). Again, this is result of the better control dynamics of the system with the FBC method. The zoomed injected currents into the grid are presented in Figure 20.  Figures 18 and 19 show the three-phase set of the system current, which is injected to the grid during the mentioned test. The effect of the smaller overshoot and settling time of the DC-bus voltage and the active power in the system controlled by the FBC is clear on the line currents. As it can be seen, the current behavior in the first case (system controlled by FBC) in the transient state is better than that of the second one (system controlled by FOC). Again, this is result of the better control dynamics of the system with the FBC method. The zoomed injected currents into the grid are presented in Figure 20. Figure 17. Response of DC-bus voltage to step variation obtained with FOC method. Figures 18 and 19 show the three-phase set of the system current, which is injected to the grid during the mentioned test. The effect of the smaller overshoot and settling time of the DC-bus voltage and the active power in the system controlled by the FBC is clear on the line currents. As it can be seen, the current behavior in the first case (system controlled by FBC) in the transient state is better than that of the second one (system controlled by FOC). Again, this is result of the better control dynamics of the system with the FBC method. The zoomed injected currents into the grid are presented in Figure 20.  Concerning the reactive power, two tests are carried out to show the performance of the control methods. To study the dynamic behavior, the system response to reactive power reference variations from 1 MVAr to 2 MVAr and from 2 MVAr to 0 MVAr obtained by the FBC and FOC method is presented in Figures 21 and 22, respectively. These figures show that the dynamics of the reactive power variation in the system with both control methods are almost the same. These results are predictable as the reactive power is controlled independently. More precisely, the reactive power is injected directly into Concerning the reactive power, two tests are carried out to show the performance of the control methods. To study the dynamic behavior, the system response to reactive power reference variations from 1 MVAr to 2 MVAr and from 2 MVAr to 0 MVAr obtained by the FBC and FOC method is presented in Figures 21 and 22, respectively. These figures show that the dynamics of the reactive power variation in the system with both control methods are almost the same. These results are predictable as the reactive power is controlled independently. More precisely, the reactive power is injected directly into the electrical network with infinite dynamics. Concerning the reactive power, two tests are carried out to show the performance of the control methods. To study the dynamic behavior, the system response to reactive power reference variations from 1 MVAr to 2 MVAr and from 2 MVAr to 0 MVAr obtained by the FBC and FOC method is presented in Figures 21 and 22, respectively. These figures show that the dynamics of the reactive power variation in the system with both control methods are almost the same. These results are predictable as the reactive power is controlled independently. More precisely, the reactive power is injected directly into the electrical network with infinite dynamics.          In Sections 3 and 4, it is mentioned that the reference value of the reactive power is defined online depending on the grid conditions. Therefore, the reactive power may be injected into the grid or be absorbed from the grid. To display the reactive power control ability in all situations, Figures 23 and 24 show the control of the reactive power where the system is controlled by FBC and FOC, respectively. It can be seen clearly that the reactive power is well controlled by both control methods. Tables 2 and 3 compare and summarize the settling time and overshoot values measured from the simulation results for the mentioned system variables. It is noted that values measured for the DC-bus voltage are obtained for a direct step variation on its reference.
As a result, although both control strategies are efficient at managing the energy in the studied system, the FBC has better performances, especially in the transient state when the wind speed varies. This is proven by the simulation results for the worst case where the wind varies abruptly.    Tables 2 and 3 compare and summarize the settling time and overshoot values measured from the simulation results for the mentioned system variables. It is noted that values measured for the DC-bus voltage are obtained for a direct step variation on its reference. As a result, although both control strategies are efficient at managing the energy in the studied system, the FBC has better performances, especially in the transient state when the wind speed varies. This is proven by the simulation results for the worst case where   Table 3. Overshoot comparison of some variables of the system controlled by FBC and FOC methods.

Conclusions
In this paper, a nonlinear control method called flatness-based control (FBC) is proposed for application to a wind energy conversion system based on a permanent magnet synchronous generator (PMSG). This variable-speed PMSG is connected to the grid via a back-to-back converter. The aim of this paper is to compare the system behavior with the conventional field-oriented control (FOC) method in which the maximum power is extracted from the wind. To compare the behavior of the system, the simulation results of the mathematical model of the system obtained by MATLAB/SimPowerSystems are presented. The results prove the effectiveness of both control methods to manage the energy in the studied system. However, the FBC performs better, especially in the transient state when the wind speed varies. More precisely, it is shown that the high bandwidth control method with only one closed-loop control based on the flatness properties results in less settling time and less overshoot in comparison with the FOC for the controlled variables, i.e., rotation speed of the PMSG and DC-bus voltage. In addition, the dynamic performance that is controlled by a filter put on the planned references trajectories in the FBC method can manage the output, control, and state variables in the transient states, as well as the steady states, taking into account the different constraints. Therefore, this method can be used to control the pitch angle of the wind turbine and to enhance the Primary Frequency Control (PFC) capability, as well as Low-Voltage Ride-Through (LVRT) capability, of an offshore wind farm connected to the grid.