Modeling and Maximum Power Point Tracking Control of Wind Generating Units Equipped with Permanent Magnet Synchronous Generators in Presence of Losses

This paper focuses on the modeling of wind turbines equipped with direct drive permanent magnet synchronous generators for fundamental frequency power system simulations. Specifically, a procedure accounting for the system active power losses to initialize the simulation starting from the load flow results is proposed. Moreover, some analytical assessments are detailed on typical control schemes for fully rated wind turbine generators, thereby highlighting how active power losses play a fundamental role in the effectiveness of the wind generator control algorithm. Finally, the paper proposes analytical criteria to design the structure and the parameters of the regulators of the wind generator control scheme. Simulations performed with Digsilent Power Factory validated the proposed procedure, highlighting the impact of active power losses on the characterization of the initial steady state and that the simplifying assumptions done in order to synthesize the controllers are consistent with the complete modeling performed by the aforementioned power system simulator.


Introduction
The evolution of the electricity production scenario changed the operating conditions of the electricity system itself providing, on one side, benefits related to distributed generation from renewables [1,2] but, on the other, issues in terms of quality, security and reliability of power generation and delivery related to the stochastic behavior of the prime energy source [3][4][5]. The strong presence of power electronic devices in renewable energy sources (RES) like photovoltaic or wind power plants makes them suitable and flexible enough to act as supporters for the electricity system operation [6,7], as they can provide some of the ancillary services that in the past needed the installation of dedicated devices [8,9]. For these reasons, numerous grid code requirements of various electricity system operators all over the world are beginning to require large renewable plants to act as providers of ancillary services. Examples of this can be found in the Italian, German, French and Canadian technical regulations [10][11][12][13]. As a consequence, both the increasing number of RES installations integrated into large-scale electrical power systems and the necessity of enhancing their performances in order to meet the standard requirements illustrate the need for the development of adequate modeling of such units and effective control systems [14].
From this point of view, wind turbine generator (WTG) controllers are much more demanding, due to the presence of many different devices (turbine, gearbox, shaft, electric machine, power electronic converters, controllers and so on) and configurations. From a power system modeling point of view, to evaluate the impact of high wind power penetrations on electrical power systems, there is the necessity to incorporate WTG models into already existing software packages that perform all the typical power system analyses (e.g., load flow calculation, root mean square (RMS) transients, electromagnetic (EMT) transients, short circuit analysis and so on). To reach this goal, many different papers have been published in the literature specifying the assumptions that have to be made in order to make such models effective with respect to the results one wants to obtain and consistent with the modeling of the remaining part of the power system (see [15][16][17] for details). To this extent, the first problem to be solved is related to the calculation of the initial conditions for a dynamic simulation starting from the load flow results of the power system. This aspect has been addressed in [18], under the hypothesis of a lossless system, but, to the best of our knowledge, the initialization problem is still unsolved if active power losses occur. The losses issue has been addressed in [19] and more recently in [20]. In [19], a control scheme for a back-to-back supplied induction generator is proposed in order to minimize the overall system losses, whereas in [20], the authors focused on evaluating how the maximum power point moves if one accounts for them and proposed a new maximum power point tracking (MPPT) iterative method.
However, neither [19] nor [20] discussed the problem of the dynamic system initial condition calculation in the presence of active power losses. From the control system standpoint, different solutions have been studied in the literature accounting for both traditional and innovative approaches. In this last case, two of the most widely employed nonlinear control techniques, i.e., feedback linearization (FBL) and sliding modes (SM) have been employed respectively in [21][22][23]. In [22], the attention is concentrated on the control of the machine side converter (MSC) and the application of the particle swarm optimization for the MPPT, while in [21] a unified control scheme for both the machine and grid side converter (GSC) is presented. The problem of model and parametric uncertainties typical of model-based control techniques like FBL is overcome in [23] with a method able to handle disturbances. However, whereas references [21,22] suffer from robustness problems, the control strategy proposed in [23] is very demanding in terms of the design of the WTG controller.
For this reason, in many applications, WTGs are still equipped with controllers designed on the basis of classical, proportional integral derivative (PID)-based controllers. In particular, modeling and control concepts for the doubly fed induction generator (DFIG) are presented in [24,25]; both of them propose a nested control structure where each controller consists of a classical proportional integral (PI) structure, but they do not give evidence of the impact of the losses in the control scheme. Furthermore, while reference [24] does not provide any guidelines on how to choose the controller parameters, reference [25] states that an analytical derivation of the transfer function required to assign the system closed loop poles is not practical and so moves toward a reduced order model.
The other widely employed wind turbine concept is the direct drive synchronous generator (DDSG) consisting of either a permanent magnet synchronous generator (PMSG) or an electrically excited one. Such a structure is addressed in [26][27][28], but, again, no reference is made to the losses problem both from the steady-state modeling and from the controller design point of view. Moreover, reference [26] focuses on the supervisory reactive power control that produces the reference signals for the lower hierarchical level controller, reference [27] provides a small signal stability analysis and reference [28] presents three possible control strategies according to three different control aims, i.e., the unity power factor, the constant stator voltage and the maximum torque. However, in all the cases, a criterion to choose the controller parameters is missing. This aspect has been addressed for the only case of the GSC controller in [29] and some numerical tests appear in [30], but without a comprehensive dissertation related to the PMSG model.
As a consequence of this very complex and varied literature framework, the aim of the present paper is that of filling the following gaps:

•
Defining a methodology to manage the initialization of WTG models in the presence of power system losses; • Proposing a control scheme that allows tracking the maximum power point even in the presence of losses; • Providing a detailed analyses on the structure of the controllers and analytical criteria to choose their parameters according to the system's desired dynamic behavior.
The paper is organized as follows. Section 2 proposes a review of the power system model of a fully rated WTG equipped with a PMSG, while Section 3 is dedicated to the problem of the system initialization in the presence of active power losses. Section 4 proposes an application of the procedure defined in Section 3 and provides some analytical results to highlight the error committed by neglecting active power losses. In Section 5, a detailed description of the overall machine control scheme is proposed, while in Section 6 criteria to properly define the parameters of the different unit controllers are detailed. Finally, Section 7 is dedicated to the validation of the procedure described in Section 6, followed by some conclusive remarks in Section 8.

Power System Model
One of the two most employed strategies to integrate the power coming from a wind plant into the electric system is that of using a PMSG connected to the grid by means of two power electronic converters (as depicted in Figure 1) [15,16]. • Defining a methodology to manage the initialization of WTG models in the presence of power system losses; • Proposing a control scheme that allows tracking the maximum power point even in the presence of losses; • Providing a detailed analyses on the structure of the controllers and analytical criteria to choose their parameters according to the system's desired dynamic behavior.
The paper is organized as follows. Section 2 proposes a review of the power system model of a fully rated WTG equipped with a PMSG, while Section 3 is dedicated to the problem of the system initialization in the presence of active power losses. Section 4 proposes an application of the procedure defined in Section 3 and provides some analytical results to highlight the error committed by neglecting active power losses. In Section 5, a detailed description of the overall machine control scheme is proposed, while in Section 6 criteria to properly define the parameters of the different unit controllers are detailed. Finally, Section 7 is dedicated to the validation of the procedure described in Section 6, followed by some conclusive remarks in Section 8.

Power System Model
One of the two most employed strategies to integrate the power coming from a wind plant into the electric system is that of using a PMSG connected to the grid by means of two power electronic converters (as depicted in Figure 1) [15,16]. The first one (from now on MSC) is typically adopted in order to extract the maximum power from the wind turbine and to control the voltage (Vm) at the machine terminals. The second one (from now on GSC) controls the voltage on the DC link (vDC) and the reactive power (Qg) delivered to the distribution network.
In order to define a suitable control architecture to follow the abovementioned goals, it is necessary to derive a mathematical model of the system to be controlled.

Wind Turbine Model
As is well known, in power system simulations wherein the electrical behavior of the wind system is the main point of interest, a simplified modeling of the wind turbine rotor is normally used. Such a model consists of the following algebraic relation between wind speed and the extracted mechanical power: where PWT is the power extracted from the wind in p.u. on the electric machine base Sb; ρ is the air density (kg/m 3 ); A is the area covered by the rotor (m 2 ), θ is the pitch angle of rotor blades (deg), vw is the wind speed at hub height upstream the rotor (m/s); and ω is the turbine angular speed in p.u. on the base of the rated machine speed ωn. cp is the performance coefficient or power coefficient depending on the pitch angle θ and on the tip speed ratio, defined as: The first one (from now on MSC) is typically adopted in order to extract the maximum power from the wind turbine and to control the voltage (V m ) at the machine terminals. The second one (from now on GSC) controls the voltage on the DC link (v DC ) and the reactive power (Q g ) delivered to the distribution network.
In order to define a suitable control architecture to follow the abovementioned goals, it is necessary to derive a mathematical model of the system to be controlled.

Wind Turbine Model
As is well known, in power system simulations wherein the electrical behavior of the wind system is the main point of interest, a simplified modeling of the wind turbine rotor is normally used. Such a model consists of the following algebraic relation between wind speed and the extracted mechanical power: where P WT is the power extracted from the wind in p.u. on the electric machine base S b ; ρ is the air density (kg/m 3 ); A is the area covered by the rotor (m 2 ), θ is the pitch angle of rotor blades (deg), v w is the wind speed at hub height upstream the rotor (m/s); and ω is the turbine angular speed in p.u. on the base of the rated machine speed ω n . c p is the performance coefficient or power coefficient depending on the pitch angle θ and on the tip speed ratio, defined as: where R is the rotor radius. The performance coefficient's typical shape is depicted in Figure 2 [31].
where R is the rotor radius. The performance coefficient's typical shape is depicted in Figure 2 [31]. From Figure 2 it can be observed that for an assigned value of the pitch angle, there exists only one value of the tip speed ratio that maximizes the performance coefficient. As a consequence, for any wind speed, there exists only one turbine angular speed ω* that allows extracting the maximum power PWT* from the wind. Therefore, to maximize the unit power production, the following control curve (MPPT curve) can be defined as [32]: where , λ p opt is the optimal tip speed ration at null pitch angle corresponding to the maximum Moreover, increasing the pitch angle will result in a reduction of the power extracted from the wind. As a consequence, this feature is typically used to avoid over-synchronous speeds and is implemented in the so-called pitch angle controller (see [15,16] for details). The working principle of the pitch controller is the following: when the electric machine angular speed exceeds a specified threshold, the controller changes the value of the pitch angle in order to reduce the power extracted from the wind. Since the pitch control works only for over-synchronous speeds, an anti-wind up limiter locks the pitch angle to 0 for sub-synchronous speeds.
The machine stator voltage amplitude, Vm, is set according to the desired machine speed in the so-called "constant V/f" regulation mode. In other words, the per unit stator voltage amplitude is equal to the per unit machine speed until the stator rated voltage (1 p.u.). For speed values higher than 1 p.u., the stator voltage reference is kept to 1 p.u. To summarize, the machine stator voltage reference can be defined as: In accordance with Equations (3) and (4), for a given wind speed the machine angular speed, the power extracted from the primary source and the machine voltage amplitude are uniquely defined. From Figure 2 it can be observed that for an assigned value of the pitch angle, there exists only one value of the tip speed ratio that maximizes the performance coefficient. As a consequence, for any wind speed, there exists only one turbine angular speed ω* that allows extracting the maximum power P WT * from the wind. Therefore, to maximize the unit power production, the following control curve (MPPT curve) can be defined as [32]: where λ p,opt is the optimal tip speed ration at null pitch angle corresponding to the maximum performance coefficient (c p,opt ). Moreover, increasing the pitch angle will result in a reduction of the power extracted from the wind. As a consequence, this feature is typically used to avoid over-synchronous speeds and is implemented in the so-called pitch angle controller (see [15,16] for details). The working principle of the pitch controller is the following: when the electric machine angular speed exceeds a specified threshold, the controller changes the value of the pitch angle in order to reduce the power extracted from the wind. Since the pitch control works only for over-synchronous speeds, an anti-wind up limiter locks the pitch angle to 0 for sub-synchronous speeds.
The machine stator voltage amplitude, V m , is set according to the desired machine speed in the so-called "constant V/f " regulation mode. In other words, the per unit stator voltage amplitude is equal to the per unit machine speed until the stator rated voltage (1 p.u.). For speed values higher than 1 p.u., the stator voltage reference is kept to 1 p.u. To summarize, the machine stator voltage reference can be defined as: In accordance with Equations (3) and (4), for a given wind speed the machine angular speed, the power extracted from the primary source and the machine voltage amplitude are uniquely defined.

Permanent Magnet Synchronous Generator Model
Describing the machine in a Park-oriented frame [33] with the passive sign convention from a mechanical point of view and the active sign convention from the electrical one, the stator electric equations (in p.u. on the machine basis) are as follows [3]: where R s is the stator resistance, v md(q) is the direct (quadrature) axis component of the machine voltage, i sd(q) is the direct (quadrature) axis component of the current outgoing from the machine (see Figure 1) and φ sd(q) is the direct (quadrature) axis component of the machine linkage. The magnetic stator equations are the following: where x d , x q and ψ are the stator direct and quadrature axis reactances at rated frequency and the permanent magnet flux respectively. Finally, the electromagnetic torque (T e ) is given by: and the motion equation states that: where H is the WTG inertia constant.

Machine Side Converter Model
The MSC can be considered as a voltage source V s , whose axis components v sd and v sq can be adjusted acting on the pulse width modulation (PWM) inverter parameters. This voltage is related to the machine one according to the following relationships: where R and L are the connection cable resistance and inductance. Finally, the PWM modulating index m a and phase angle δ can be obtained as follows: where V DC is the DC link voltage.

Grid Side Converter Model
Assuming that the GSC can be modeled as an ideal voltage source (i.e., with no delays and no switching and state losses) and that the connection between the converter and the main network is represented as an R-L series impedance (accounting for cables, transformer and the series section of the filters), then, the system portion between the GSC and the network can be represented with the equivalent circuit of Figure 3. the filters), then, the system portion between the GSC and the network can be represented with the equivalent circuit of Figure 3. Describing the system in a Park reference frame [33] rotating at the network angular frequency ωe (expressed in p.u. on the rated angular frequency ωg), the Kirchhoff voltage law applied to the mesh depicted in Figure 3 states that: where (in p.u. on the machine basis): • RT and LT are the connection resistance and the inductance, respectively; • ved(q) is the direct (quadrature) axis components of the voltage at the AC terminals of the GSC; • vgd(q) is the direct (quadrature) axis components of the grid voltage and • igd(q) is the direct (quadrature) axis components of the current flowing in the connection.

Initialization of Fundamental Frequency Simulations Starting from Load-Flow Calculation
All the fundamental frequency simulations start from an equilibrium point deriving from a load flow calculation. As a consequence, it is necessary to derive a procedure that allows finding out the system equilibria starting from the load flow output, i.e., to initialize the variables of a wind power plant. Such a procedure has been studied in [18] for a lossless system.
Calculating the initial conditions of a dynamic model from load flow data means obtaining the inputs and the states of the system starting from the system outputs. Therefore, the description and modeling of the components of the wind power plant have to start from the grid connection point. Moreover, when calculating the initial conditions, the system is assumed to be at steady state. Therefore, the equations presented in the previous sections will be used for zeroing all the time derivatives. However, the procedure derived in [18] assumes that the system losses (i.e., electrical machine, transformer, cables and so on) are negligible. This means that if one applies this algorithm to a system where such losses are different from zero, the calculated solution will not result in an equilibrium point from which the simulation can start.
The present section proposes a modification of the initialization procedure described in [18] in order to account for the system losses.
With reference to the notations of Figure 3, the load flow calculation exposes the initial values (indicated with the subscript "0") of the grid active power Pg0, of the reactive power Qg0 and of the voltage phasor Vg0 at the machine bus. Starting from these values, the initialization problem can be split into two parts regarding the portion of the system between the AC terminals of the GSC and the external network connection (from now on network side portion) and the one between the wind turbine and the AC terminals of the MSC (from now on machine side portion). Figure 3. Equivalent circuit of the grid side converter, the connection system and the main network.

Network Side Portion
Describing the system in a Park reference frame [33] rotating at the network angular frequency ω e (expressed in p.u. on the rated angular frequency ω g ), the Kirchhoff voltage law applied to the mesh depicted in Figure 3 states that: (11) where (in p.u. on the machine basis): • R T and L T are the connection resistance and the inductance, respectively; • v ed(q) is the direct (quadrature) axis components of the voltage at the AC terminals of the GSC; • v gd(q) is the direct (quadrature) axis components of the grid voltage and is the direct (quadrature) axis components of the current flowing in the connection.

Initialization of Fundamental Frequency Simulations Starting from Load-Flow Calculation
All the fundamental frequency simulations start from an equilibrium point deriving from a load flow calculation. As a consequence, it is necessary to derive a procedure that allows finding out the system equilibria starting from the load flow output, i.e., to initialize the variables of a wind power plant. Such a procedure has been studied in [18] for a lossless system.
Calculating the initial conditions of a dynamic model from load flow data means obtaining the inputs and the states of the system starting from the system outputs. Therefore, the description and modeling of the components of the wind power plant have to start from the grid connection point. Moreover, when calculating the initial conditions, the system is assumed to be at steady state. Therefore, the equations presented in the previous sections will be used for zeroing all the time derivatives. However, the procedure derived in [18] assumes that the system losses (i.e., electrical machine, transformer, cables and so on) are negligible. This means that if one applies this algorithm to a system where such losses are different from zero, the calculated solution will not result in an equilibrium point from which the simulation can start.
The present section proposes a modification of the initialization procedure described in [18] in order to account for the system losses.
With reference to the notations of Figure 3, the load flow calculation exposes the initial values (indicated with the subscript "0") of the grid active power P g0 , of the reactive power Q g0 and of the voltage phasor V g0 at the machine bus. Starting from these values, the initialization problem can be split into two parts regarding the portion of the system between the AC terminals of the GSC and the external network connection (from now on network side portion) and the one between the wind turbine and the AC terminals of the MSC (from now on machine side portion).

Network Side Portion
For the network side portion, the initialization problem consists of finding the values of v gd0 , i gd0 , i gq0 , v ed0 , v eq0 . Choosing the Park initial angle such that the network voltage V g has only a direct axis component [33], it thus follows that: and: which allows finding the initial values of the current axis components, as: Inserting now Equations (12) and (14) into Equation (11) and nullifying the time derivatives, one can finally calculate the initial values of the axis components of the voltage at the AC terminals of the GSC.

Machine Side Portion
For the machine side portion, the initialization problem consists of finding the values of v sd0 , v sq0 , i sq0 , i sd0 , ω 0 , P WT0 , v w0 . Neglecting the two converter losses, the active power P s0 delivered at the AC terminals of the MSC can be calculated as: It should be observed that, if one wants to account also for the converter losses, an empirical correction to the resistances R and R T can be done without affecting the procedure (see [34] for details). The power P s0 can be expressed as: and, if one inserts Equation (6) into Equation (5) and Equation (5) into Equation (9) and nullifies all the time derivatives (to account for the steady-state condition), it is possible to write the following steady state equations: Moreover, assuming that the initial point is characterized by a speed belonging to the range [ω min , ω max ], the MPPT curve coincides with the second of Equation (3), therefore: The active power balance between the wind turbine and the AC terminals of the MSC allows writing: Finally, after some algebraic manipulations, Equation (4) becomes: Equations (16), (17), (19) and (20) originate an algebraic nonlinear system of five equations in five unknown variables (v sd0 , v sq0 , i sd0 , i sq0 , ω 0 ) that can be solved numerically.
Finally, the application of Equation (18) provides the initial value of the wind turbine power, while the corresponding wind speed can be defined by solving Equation (1). If the initial value of the machine angular speed falls out of the range [ω min , ω max ], then Equation (18) is no longer valid; as a consequence, the procedure has to be modified setting P WT0 equal to P max and assigning v w0 independently (as described in [18]).
In this case, the set of equations that allows the discovery of the solution is Equations (16), (17), (19) and (20) simply by substituting P WT0 with P max .

Application of the Proposed Initialization Procedure
In order to provide an application of the proposed methodology and to highlight the impact of power losses on the system equilibrium point, an initial condition calculation is proposed on two MVA wind generating units. The electrical machine main parameters are reported in Table 1 [20]. Moreover, the following numerical data are assumed (see Figure 1): • The connection between the machine and the machine side converter is characterized by resistance R = 0.05 p.u. and an inductance L = 0.05 p.u. (on the machine basis) • The connection between the GSC and the external network has an equivalent resistance R t = 0.005 p.u. and an equivalent inductance L t = 0.05 p.u. (on the machine basis).
The power system is assumed to be operated in a load flow condition characterized by unitary voltage magnitude on the grid side bus-bar, a power production equal to 1.6 MW (0.8 p.u. on machine power base) and null reactive power production at the point of interconnection with the grid (i.e., V g = 1 p.u., P g = 0.8 p.u. and Q g = 0 p.u.). The results obtained applying the proposed methodology to the present test case are summarized in Table 2. The comparison of the proposed approach with the one described in [18] is presented in Table 2 which also reports the results of the lossless initial conditions calculations.
As one can notice, active power losses affect all the variables characterizing the system steady state. In particular, the error on the wind speed evaluation is around 3%, while the error on the wind power is around 6.9%. Moreover, the most important result is that the loss-accounted system is initialized with a wind speed equal to 8.66 m/s (obtained by the lossless initialization), and the maximum power produced by the wind turbine is equal to 0.8 p.u., which is not consistent with the load flow results, as the active power delivered at the grid bus is going to be lower than 0.8 p.u. due to the losses. This means that using a lossless initialization as the starting point for a dynamic simulation will result in an undesired initial transient.

Fully Rated Converter Wind Generator Unit Control Scheme
As outlined in [28], the controllers of both MSC and GSC normally have a nested-loop structure with a fast inner current loop, controlling the stator dor q-axis currents, combined with outer slower loops that pursue the control aims described in the previous section (i.e., extracting the maximum power from the wind turbine and controlling the voltage at the machine terminals for the MSC controller and regulating the voltage on the DC link and the reactive power delivered to the main network for the GSC one). The aim of this section is to describe the overall wind generator architecture that accounts for the system power losses before detailing an effective regulator synthesis in Section 6.

Machine Side Converter Controller
The voltage channel takes its reference signal from Equation (4) and typically implements a structure of the kind depicted in Figure 4, where the output of the machine voltage regulator R Vm becomes the reference signal for the direct axis stator current regulator (the block MIN is the minimum selector representing Equation (4)). As one can notice, active power losses affect all the variables characterizing the system steady state. In particular, the error on the wind speed evaluation is around 3%, while the error on the wind power is around 6.9%. Moreover, the most important result is that the loss-accounted system is initialized with a wind speed equal to 8.66 m/s (obtained by the lossless initialization), and the maximum power produced by the wind turbine is equal to 0.8 p.u., which is not consistent with the load flow results, as the active power delivered at the grid bus is going to be lower than 0.8 p.u. due to the losses. This means that using a lossless initialization as the starting point for a dynamic simulation will result in an undesired initial transient.

Fully Rated Converter Wind Generator Unit Control Scheme
As outlined in [28], the controllers of both MSC and GSC normally have a nested-loop structure with a fast inner current loop, controlling the stator d-or q-axis currents, combined with outer slower loops that pursue the control aims described in the previous section (i.e., extracting the maximum power from the wind turbine and controlling the voltage at the machine terminals for the MSC controller and regulating the voltage on the DC link and the reactive power delivered to the main network for the GSC one). The aim of this section is to describe the overall wind generator architecture that accounts for the system power losses before detailing an effective regulator synthesis in Section 6.

Machine Side Converter Controller
The voltage channel takes its reference signal from Equation (4) and typically implements a structure of the kind depicted in Figure 4, where the output of the machine voltage regulator RVm becomes the reference signal for the direct axis stator current regulator (the block MIN is the minimum selector representing Equation (4)). The torque channel aims at extracting the maximum power from the wind source. This is achieved by means of the MPPT function described in Equation (3); it should be noted that, once that curve is available, there is no need to measure the wind speed in order to know the optimal power that can be extracted from the wind for each turbine speed. In the literature, two main possible uses for this curve have been proposed: • Type I: the MPPT curve input is the actual turbine speed and produces the reference signal for the power to be produced by the PMSG [24][25][26][30][31][32][33][34] (see Figure 5).  The torque channel aims at extracting the maximum power from the wind source. This is achieved by means of the MPPT function described in Equation (3); it should be noted that, once that curve is available, there is no need to measure the wind speed in order to know the optimal power that can be extracted from the wind for each turbine speed. In the literature, two main possible uses for this curve have been proposed:

•
Type I: the MPPT curve input is the actual turbine speed and produces the reference signal for the power to be produced by the PMSG [24][25][26][30][31][32][33][34] (see Figure 6). • Type II: The control accounts for the inverse MPPT curve input and feeds it with the PMSG active power producing the reference signal for the speed controller R W (see e.g., [28,35]), as depicted in Figure 5. In Type II configuration, the output of the speed controller feeds an active power controller R P ; in both cases, the output of the power controller becomes the reference signal for the quadrature axis current regulator.
Energies 2017, 10, 102 10 of 24 • Type II: The control accounts for the inverse MPPT curve input and feeds it with the PMSG active power producing the reference signal for the speed controller RW (see e.g., [28,35]), as depicted in Figure 6. In Type II configuration, the output of the speed controller feeds an active power controller RP; in both cases, the output of the power controller becomes the reference signal for the quadrature axis current regulator.
Nevertheless, in both Type I and Type II configurations, the system is obliged to work at a point whereby the active power Ps produced by the PMSG follows the MPPT curve, which is not feasible, unless one neglects the losses in the electric machine. This section details how to account for power system losses by introducing some corrections in the classical control scheme. Inserting now Equation (6) into Equation (5), and Equation (5) Then, the following power balance can be easily obtained: This balance can be written at a steady state, neglecting the rotor saliency as: Equation (23) means that the power coming from the wind equals the active power available at the machine terminals plus the losses in the stator windings and in the cable connection. Both the control schemes appearing in Figures 5 and 6 imply that Ps follows the MPPT curve; thus, assuming that the desired working point is in the range in which the MPPT curve is increasing (i.e., the pitch controller is not active), with the same notations used in Section 2, it is possible to write the following power balance: , ( , ,0) 2 The only solution for Equation (24) is in the case that the term ( ) s R R + is equal to zero since the meaning of the left-hand side of Equation (24) is, by definition, the maximum value of the wind power minimum selector representing Equation (4)). The torque channel aims at extracting the maximum power from the wind source. This is achieved by means of the MPPT function described in Equation (3); it should be noted that, once that curve is available, there is no need to measure the wind speed in order to know the optimal power that can be extracted from the wind for each turbine speed. In the literature, two main possible uses for this curve have been proposed: • Type I: the MPPT curve input is the actual turbine speed and produces the reference signal for the power to be produced by the PMSG [24][25][26][30][31][32][33][34] (see Figure 5).  Nevertheless, in both Type I and Type II configurations, the system is obliged to work at a point whereby the active power P s produced by the PMSG follows the MPPT curve, which is not feasible, unless one neglects the losses in the electric machine. This section details how to account for power system losses by introducing some corrections in the classical control scheme. Inserting now Equation (6) into Equation (5), and Equation (5) into Equation (9), one obtains: Then, the following power balance can be easily obtained: This balance can be written at a steady state, neglecting the rotor saliency as: Equation (23) means that the power coming from the wind equals the active power available at the machine terminals plus the losses in the stator windings and in the cable connection. Both the control schemes appearing in Figures 5 and 6 imply that P s follows the MPPT curve; thus, assuming that the desired working point is in the range in which the MPPT curve is increasing (i.e., the pitch controller is not active), with the same notations used in Section 2, it is possible to write the following power balance: Energies 2017, 10, 102

of 24
The only solution for Equation (24) is in the case that the term (R s + R) is equal to zero since the meaning of the left-hand side of Equation (24) is, by definition, the maximum value of the wind power P WT .
From a physical point of view, this means that it is not possible to deliver to the AC terminals of the electric machine the maximum power that can be extracted from the wind, as this would imply that the original source (the wind) generates a greater amount of power in order to compensate for the losses.
A possible solution to this problem consists in modifying the control system to account also for power losses, as depicted in Figure 7 (a Type II scheme is presented as an example). However, it is not possible to know exactly the loss amount, due to possible errors in the current measurements, imperfect knowledge of the machine stator winding and cable resistances and impossibility to estimate properly eventual losses due to friction or air resistance. The meaning of Equation (24) suggests that what is necessary is to provide an upper bound for such losses, in order to avoid the situation in which the controller requires the wind turbine to produce more than what is physically possible. A possible solution to this problem consists in modifying the control system to account also for power losses, as depicted in Figure 7 (a Type II scheme is presented as an example). However, it is not possible to know exactly the loss amount, due to possible errors in the current measurements, imperfect knowledge of the machine stator winding and cable resistances and impossibility to estimate properly eventual losses due to friction or air resistance. The meaning of Equation (24) suggests that what is necessary is to provide an upper bound for such losses, in order to avoid the situation in which the controller requires the wind turbine to produce more than what is physically possible.

Grid Side Converter Controller
As far as the GSC is concerned, it is necessary to characterize the DC link transients. The DC link voltage vDC dynamic equation states that: As the power coming from the PMSG tracks, the maximum power point, Equation (25), suggests the possibility of using the power injected into the grid to regulate the DC link voltage. As a consequence, one can set up a regulator that accepts as input the error on this voltage and produces the reference signal for the power Pg*. Now, recalling Equation (13), this signal can be translated into a request for the direct axis current igd* simply by dividing by the amplitude of the point of interconnection voltage Vg. The reactive power channel is much simpler as the set point for the reactive power to be delivered to the grid; it can be translated into a request for the quadrature axis current igq*, recalling again Equation (13). The architecture of the GSC regulators is depicted in Figure 8.

Grid Side Converter Controller
As far as the GSC is concerned, it is necessary to characterize the DC link transients. The DC link voltage v DC dynamic equation states that: As the power coming from the PMSG tracks, the maximum power point, Equation (25), suggests the possibility of using the power injected into the grid to regulate the DC link voltage. As a consequence, one can set up a regulator that accepts as input the error on this voltage and produces the reference signal for the power P g *. Now, recalling Equation (13), this signal can be translated into a request for the direct axis current i gd * simply by dividing by the amplitude of the point of interconnection voltage V g . The reactive power channel is much simpler as the set point for the reactive power to be delivered to the grid; it can be translated into a request for the quadrature axis current i gq *, recalling again Equation (13). The architecture of the GSC regulators is depicted in Figure 8.
consequence, one can set up a regulator that accepts as input the error on this voltage and produces the reference signal for the power Pg*. Now, recalling Equation (13), this signal can be translated into a request for the direct axis current igd* simply by dividing by the amplitude of the point of interconnection voltage Vg. The reactive power channel is much simpler as the set point for the reactive power to be delivered to the grid; it can be translated into a request for the quadrature axis current igq*, recalling again Equation (13). The architecture of the GSC regulators is depicted in Figure 8.

Criteria for the Synthesis of the Wind Turbine Generator Regulators
In this section, some guidelines will be provided in order to support the choice of the structure and parameters of the controllers for both the MSC (Section 6.1) and the GSC (Section 6.2). From now on, the Laplace transform of any time domain quantity will be indicated with the same symbol as the time domain function for the sake of readability.

Machine Side Converter Regulator Synthesis
As outlined in the previous section, the MSC controller presents a nested structure, whose inner (and faster) loop is the current one, which consists of two regulators accepting as input the error on the direct (quadrature) axis current and producing as output the suitable values of the MSC AC side voltages. In order to derive structure and parameters of such regulators, it is possible recalling Equation (21); defining now two fictitious inputs w sd and w sq as follows: This implies that two decoupled relationships hold between such inputs and the axis currents: This way it is possible to construct two scalar regulators R d and R q that accept as input the error on the direct and quadrature axis current, respectively, and produce as output the signals w sd and w sq , as follows: where k P and k I are their proportional and integral gains, respectively. As a consequence, the dynamic properties of the resulting system can be investigated by examining the following transfer function: Energies 2017, 10, 102 13 of 24 whose poles are the solution of: The solution of Equation (30) belongs to the left half plane for any positive value of k P and k I , thus guaranteeing the stability of the current loop. Moreover, the solution of Equation (30) allows to choose k P and k I according to the desired transient behavior of the axis currents (i.e., placing the poles). The real inputs v sd and v sq can be obtained starting from w sd and w sq , thereby solving Equation (26), as shown in Figure 9. The reference signal for the quadrature axis current is provided by an active power regulator RP, as shown in Figures 5 and 6; in order to define an effective structure for such a regulator, one has to consider the scheme depicted in Figure 10. As the inner current control loop is typically faster, to synthesize a possible active power regulator, one can assume that the action of the quadrature axis current controller is instantaneous, i.e., Moreover, neglecting the rotor saliency and recalling Equation (7), e s q T i = ψ , in the hypothesis of no active power losses in Equations (16) and (17), the active power s P can be written as: Finally, supposing that the angular speed transient is much slower than the active power one, the scheme depicted in Figure 10 can be simplified into the one of Figure 11; choosing a PI structure for the active power controller, the closed loop transfer function becomes: The reference signal for the quadrature axis current is provided by an active power regulator R P , as shown in Figures 5 and 6; in order to define an effective structure for such a regulator, one has to consider the scheme depicted in Figure 10. The reference signal for the quadrature axis current is provided by an active power regulator RP, as shown in Figures 5 and 6; in order to define an effective structure for such a regulator, one has to consider the scheme depicted in Figure 10. As the inner current control loop is typically faster, to synthesize a possible active power regulator, one can assume that the action of the quadrature axis current controller is instantaneous, i.e., Moreover, neglecting the rotor saliency and recalling Equation (7), e s q T i = ψ , in the hypothesis of no active power losses in Equations (16) and (17), the active power s P can be written as: Finally, supposing that the angular speed transient is much slower than the active power one, the scheme depicted in Figure 10 can be simplified into the one of Figure 11; choosing a PI structure for the active power controller, the closed loop transfer function becomes: As the inner current control loop is typically faster, to synthesize a possible active power regulator, one can assume that the action of the quadrature axis current controller is instantaneous, i.e., Moreover, neglecting the rotor saliency and recalling Equation (7), T e = ψi sq , in the hypothesis of no active power losses in Equations (16) and (17), the active power P s can be written as: (32) Finally, supposing that the angular speed transient is much slower than the active power one, the scheme depicted in Figure 10 can be simplified into the one of Figure 11; choosing a PI structure for the active power controller, the closed loop transfer function becomes: where k PP and k PI are the proportional and integral gains of the active power controller, respectively. In accordance with Equation (33), any positive value of k PP and k PI will lead the system to be asymptotically stable. It is also possible to place the pole of Equation (33) acting on the proportional and integral gains. The reference signal for the active power can be provided either by the MPPT block (Type I) or by a speed controller (Type II); in this latter case, the synthesis of such a controller can be achieved assuming negligible active power losses and instantaneous action of the active power controller, i.e., In this case, the control scheme depicted in Figure 6 becomes the one of Figure 12, whose closed loop transfer function is: where kPw and kIw are the proportional and integral gains of the PI speed controller respectively. Once again, any positive value of kPw and kIw will provide an asymptotically stable closed loop system, while the prescribed transient behavior can be achieved by tuning kPw and kIw in order to obtain the desired values for the poles of Equation (35).  (34)).
The reference signal for the direct axis current is provided by a voltage regulator RVm, as shown in Figure 4; in order to define an effective structure for this regulator, one has to consider the scheme I sq =I* sq P* s P s P s X Figure 11. Simplified active power control loop for the synthesis of the regulator.
The reference signal for the active power can be provided either by the MPPT block (Type I) or by a speed controller (Type II); in this latter case, the synthesis of such a controller can be achieved assuming negligible active power losses and instantaneous action of the active power controller, i.e., P s (t) = P * s (t) (34) In this case, the control scheme depicted in Figure 5 becomes the one of Figure 12, whose closed loop transfer function is: ω(s) = k Pw s + k Iw 2Hs 2 + k Pw s + k Iw ω * (s) + s 2Hs 2 + k Pw s + k Iw P WT (s) (35) where k Pw and k Iw are the proportional and integral gains of the PI speed controller respectively. Once again, any positive value of k Pw and k Iw will provide an asymptotically stable closed loop system, while the prescribed transient behavior can be achieved by tuning k Pw and k Iw in order to obtain the desired values for the poles of Equation (35). The reference signal for the active power can be provided either by the MPPT block (Type I) or by a speed controller (Type II); in this latter case, the synthesis of such a controller can be achieved assuming negligible active power losses and instantaneous action of the active power controller, i.e., In this case, the control scheme depicted in Figure 6 becomes the one of Figure 12, whose closed loop transfer function is: where kPw and kIw are the proportional and integral gains of the PI speed controller respectively. Once again, any positive value of kPw and kIw will provide an asymptotically stable closed loop system, while the prescribed transient behavior can be achieved by tuning kPw and kIw in order to obtain the desired values for the poles of Equation (35).  Let us now summarize the procedure to define the control parameters of the MSC regulator: (i) choose the values of k P and k I using Equation (30); (ii) choose the values of k PP and k PI by means of Equation (33) accounting for assumption Equation (31) (i.e., the amplitude of the pole of Equation (33) must be much smaller than the amplitudes of the poles of Equation (30); (iii) define the values of k Pw and k Iw in accordance with Equation (35), ensuring that the dynamics of the power loop are faster than the dynamics of the speed one (to meet condition of Equation (34)).
The reference signal for the direct axis current is provided by a voltage regulator R Vm , as shown in Figure 4; in order to define an effective structure for this regulator, one has to consider the scheme depicted in Figure 10. The amplitude of the machine voltage is given by: where the axis components are related to the axis currents by means of Equation (5). Nevertheless, Equation (36) defines a nonlinear function, it is possible to consider a first-order Taylor expansion centered in the initial balance point defined in the initialization procedure. To this extent, in the following for any quantity y the variation ∆y with respect to the initial equilibrium point y 0 will be considered. As a consequence, Equation (36) becomes: and, recalling Equations (5) and (6), it is possible to obtain: which, in the Laplace domain, becomes: having defined: The equivalent block scheme of the simplified machine voltage dynamics is depicted in Figure 13.
and, recalling Equations (5) and (6), it is possible to obtain: which, in the Laplace domain, becomes: having defined: The equivalent block scheme of the simplified machine voltage dynamics is depicted in Figure 13. Supposing that the direct axis current loop is instantaneous, (i.e., ) it is possible to derive: The parameters of the machine voltage regulator have to be defined in order to guarantee the Supposing that the direct axis current loop is instantaneous, (i.e., i sd (t) = i sd * (t)) it is possible to derive: The parameters of the machine voltage regulator have to be defined in order to guarantee the asymptotic stability of the system for any initial working point. It should be observed that, given the wind power P WT0 , the solution of the nonlinear algebraic system consisting of Equations (16), (17), (19) and (20) allows to uniquely define the initial working point; as a consequence, the following algorithm can be set up: • Choose a couple of parameters k Pvm and k Ivm ; • For any value of P WT0 belonging to the range [P WTmin , P WTmax ], determine the corresponding initial working point; • Evaluate v md0 and v mq0 with Equations (5) and (6) (42) with smaller amplitude (i.e., the one that dictates the dynamic behavior of the voltage loop) is (in modulus) sufficiently smaller than the roots of Equation (30) to guarantee that the current loop is much faster than the voltage one.
To illustrate the proposed procedure, one can refer again to the machine with the data appearing in Table 1. Choosing k P = 0.1 and k I = 10, the current loop has two complex conjugate poles s 1,2 = −27 ± 45j. Now, selecting k Pvm = 5 and k Ivm = 2.5, the real part of the voltage loop poles are plotted in Figure 14 as a function of P WT , highlighting both the stability of the system and the different timeframe of the two loops' action.  (42) with smaller amplitude (i.e., the one that dictates the dynamic behavior of the voltage loop) is (in modulus) sufficiently smaller than the roots of Equation (30) to guarantee that the current loop is much faster than the voltage one.
To illustrate the proposed procedure, one can refer again to the machine with the data appearing in Table 1. Choosing kP = 0.1 and kI = 10, the current loop has two complex conjugate poles s1,2 = −27 ± 45j. Now, selecting kPvm = 5 and kIvm = 2.5, the real part of the voltage loop poles are plotted in Figure  14 as a function of PWT, highlighting both the stability of the system and the different timeframe of the two loops' action.

Grid Side Converter Regulator Synthesis
Also, the GSC controller present a nested structure with an inner current control loop whose regulators can be designed in the same way as for the MSC.
Recalling Equation (11), two scalar regulators can be defined, one for igd and one for igq; furthermore, defining the following two quantities: and: and indicating with xgd and xgq the regulator outputs, the system to be controlled is described by the following decoupled equations:

Grid Side Converter Regulator Synthesis
Also, the GSC controller present a nested structure with an inner current control loop whose regulators can be designed in the same way as for the MSC.
Recalling Equation (11), two scalar regulators can be defined, one for i gd and one for i gq ; furthermore, defining the following two quantities: and: x gq = v eq − v gq + ω e L T i gd (44) and indicating with x gd and x gq the regulator outputs, the system to be controlled is described by the following decoupled equations: and: This way it is possible to construct two PI regulators R gd and R gq that accept as input the error on the direct and quadrature axis current, respectively, and produce as output the signals x sd and x sq , as for the MSC controller. As a consequence, indicating with k Pg and k Ig the proportional and integral gains of R gd and R gq , the dynamic properties of the resulting system can be investigated by examining the following transfer function: whose poles have a negative real part for any positive value of k Pg and k Ig . The reactive power control can be addressed simply by recalling Equation (14), which allows to transform the reference signal for the reactive power exchange into a request of quadrature axis current (see Figure 8).
The DC link voltage v DC regulator synthesis can be done recalling Equation (25); in neglecting the active power losses, it is clear that for any change in wind speed, and therefore in the power P s , it is possible to keep the DC link voltage constant acting on the power P g . Completing the scheme of Figure 8 it is possible to achieve the control scheme of Figure 15. for the MSC controller. As a consequence, indicating with kPg and kIg the proportional and integral gains of Rgd and Rgq, the dynamic properties of the resulting system can be investigated by examining the following transfer function: whose poles have a negative real part for any positive value of kPg and kIg. The reactive power control can be addressed simply by recalling Equation (14), which allows to transform the reference signal for the reactive power exchange into a request of quadrature axis current (see Figure 8).
The DC link voltage vDC regulator synthesis can be done recalling Equation (25); in neglecting the active power losses, it is clear that for any change in wind speed, and therefore in the power Ps, it is possible to keep the DC link voltage constant acting on the power Pg. Completing the scheme of Figure 8 it is possible to achieve the control scheme of Figure 15. Supposing that the current loop is instantaneous and a PI controller for RVDC is chosen, it is possible to obtain the following transfer function: Once again, it is possible to choose the parameters of the current controllers assigning the poles of Equation (47) and then the parameters of the DC voltage regulator using Equation (49), thus Supposing that the current loop is instantaneous and a PI controller for R VDC is chosen, it is possible to obtain the following transfer function: where k PDC and k IDC are respectively the proportional and integral gains of the DC voltage PI controller. The examination of Equation (48) leads to the conclusion that for any step variation of P s , it is possible to keep the DC voltage constant for any value of the gains, as: Once again, it is possible to choose the parameters of the current controllers assigning the poles of Equation (47) and then the parameters of the DC voltage regulator using Equation (49), thus ensuring that the voltage loop is sufficiently slower than the current one.

Overall Control System Structure and Summary of the Developed Criteria
The WTG overall control scheme is depicted in Figure 16, also including the pitch angle controller and the shaft model (see [15,16] for details). The GSC and its controller are depicted in the block "inverter DC/AC including V DC control and Q control", whose detailed structure appears in Figure 8. As far as the MSC controller is concerned, details on the voltage and power controllers are provided respectively in Figures 4 and 7, while the inner current control loops are depicted in Figure 9.  Figures 4 and 7, while the inner current control loops are depicted in Figure  9. Place the poles of the speed control loop zeroing the denominator of Equation (35) such that the speed dynamics are sufficiently slower than the active power one in order to meet Equation (34).
The voltage channel of the MSC controller can be designed as follows: • Place the poles of the inner control loop according to Equation (30); • Place the pole voltage control loop with the procedure described in Section 6.1.
The GSC controller parameters can be chosen as follows: • Place the poles of the inner control loop zeroing the denominator of Equation (47).

•
Place the poles of the DC voltage control loop zeroing the denominator of Equation (49) such that the DC voltage dynamics are sufficiently slower than the current one.

•
The choice of the Park reference frame such that the network voltage Vg has only a direct axis component [33] creates an algebraic link between the reactive power and the quadrature axis current; therefore, the reactive power dynamics are the same as the quadrature axis current. The power channel of the MSC controller can be designed as follows: • Place the poles of the inner control loop according to Equation (30); • Place the poles of the active power control loop zeroing the denominator of Equation (33) such that the power dynamics are sufficiently slower than the current one in order to meet Equation (31); • Place the poles of the speed control loop zeroing the denominator of Equation (35) such that the speed dynamics are sufficiently slower than the active power one in order to meet Equation (34).
The voltage channel of the MSC controller can be designed as follows: • Place the poles of the inner control loop according to Equation (30); • Place the pole voltage control loop with the procedure described in Section 6.1.
The GSC controller parameters can be chosen as follows: • Place the poles of the inner control loop zeroing the denominator of Equation (47).

•
Place the poles of the DC voltage control loop zeroing the denominator of Equation (49) such that the DC voltage dynamics are sufficiently slower than the current one.

•
The choice of the Park reference frame such that the network voltage V g has only a direct axis component [33] creates an algebraic link between the reactive power and the quadrature axis current; therefore, the reactive power dynamics are the same as the quadrature axis current.

Simulations to Validate the Controller Synthesis and the Proposed Simplified Schemes
The aim of the present section is to provide some simulative support to the regulator design provided in the previous sections. In order to account for a detailed and reliable representation of the power system, the PMSG model has been implemented in Digsilent Power Factory ® (14.1, DigSILENT Gmbh, Gomaringen, Germany) [35]. For this purpose, the dynamic models of the MSC and GSC controllers have been implemented in Power Factory, in accordance with the equations detailed in Section 5. Therefore, the validation is performed by comparing the results provided by the Digsilent Power Factory full model and the ones obtained applying the simplified schemes that have allowed the derivation of analytical criteria for the choice of the controller parameters. The simplified linear scheme has also been implemented in Power Factory and its run supplied by the same references of the complete model. Table 3 summarizes the parameters used for the regulators, defined on the basis of the criteria described in the previous section. The numerical values of the machine voltage and current controllers have been specified in the previous section, while the parameters of the grid side current controllers are the same as the machine current ones. This choice means the following:

•
The poles of the machine currents loop are −27 ±45j; while the poles of the active power and of the speed loops are respectively −1.6 and −0.017 ±0.05j. With these values, the dynamics of the three loops act on different time frames, thus meeting the requirements of Equations (31) and (34).

•
The poles of the grid current loops are −544 and −115, while the poles of the DC voltage one are −0.02 ±0.02j, which ensures that its dynamics are much slower than the current one.
The model is initialized with a wind speed corresponding to an active power production equal to 0.55 p.u. (1.1 MW). Then, two consecutive wind speed variations are provided ( Figure 17): the first one is triggered at 5 s and increases the wind speed up to 8.4 m/s, while the second one occurs at 300 s and brings the wind speed to 15 m/s, activating the pitch controller.
In accordance with this wind speed profile, the machine undertakes a dynamic that involves all the regulators designed in the previous section. The wind speed variation provokes a variation of the rotational speed of the turbine with a corresponding activation of the speed regulator. The speed is changed acting on the power regulator that correctly provides an increase of the wind generator active power production. Finally, the power dynamics on the MSC activate the DC voltage regulator that allows for an increase in the active power delivered to the grid. The speed dynamic is reported in Figure 18, where the speed reference variation is provided by the MPPT block of the system. The blue curve is the speed profile obtained by the complete model of the system, while the red one is the one provided by the simplified block scheme proposed in Figure 12.
the speed loops are respectively −1.6 and −0.017 ±0.05j. With these values, the dynamics of the three loops act on different time frames, thus meeting the requirements of Equations (31) and (34).  The poles of the grid current loops are −544 and −115, while the poles of the DC voltage one are −0.02 ±0.02j, which ensures that its dynamics are much slower than the current one.
The model is initialized with a wind speed corresponding to an active power production equal to 0.55 p.u. (1.1 MW). Then, two consecutive wind speed variations are provided ( Figure 17): the first one is triggered at 5 s and increases the wind speed up to 8.4 m/s, while the second one occurs at 300 s and brings the wind speed to 15 m/s, activating the pitch controller. In accordance with this wind speed profile, the machine undertakes a dynamic that involves all the regulators designed in the previous section. The wind speed variation provokes a variation of the rotational speed of the turbine with a corresponding activation of the speed regulator. The speed is changed acting on the power regulator that correctly provides an increase of the wind generator active power production. Finally, the power dynamics on the MSC activate the DC voltage regulator that allows for an increase in the active power delivered to the grid. The speed dynamic is reported in Figure 18, where the speed reference variation is provided by the MPPT block of the system. The blue curve is the speed profile obtained by the complete model of the system, while the red one is the one provided by the simplified block scheme proposed in Figure 12. The first transient is characterized by a final steady state within the limits of the MPPT speed curve, while the second is associated with the activation of the speed limitation at 1.2 p.u. As one can notice, the simplified dynamics are very close to the real one in both conditions, stating that the control scheme of Figure 12 can be used to synthesize the speed regulator parameters. Figure 19 compares the dynamics of active power Ps considering the complete control scheme, blue line, the simplified one of Figure 11, red line, and the time evolution of the power reference signal as dictated by the speed controller, black line (the three curves are basically overlapping so that it is almost impossible to distinguish them). The fact that the blue line is coincident with the red one leads to the conclusion that the equivalent scheme of Figure 11 is a good approximation of the real model. Moreover, as it is not possible to distinguish between the power time profile and its reference signal in a timeframe of about 500 s, one can conclude that the active power loop dynamics are much faster than the speed one. This can be confirmed through examining Figure 18 where the speed dynamics are much slower. This is consistent with previous assumptions. The current waveform is not reproduced here since it is much faster than the power one.
Another verification that has been performed is related to the machine voltage regulation loop, The first transient is characterized by a final steady state within the limits of the MPPT speed curve, while the second is associated with the activation of the speed limitation at 1.2 p.u. As one can notice, the simplified dynamics are very close to the real one in both conditions, stating that the control scheme of Figure 12 can be used to synthesize the speed regulator parameters. Figure 19 compares the dynamics of active power P s considering the complete control scheme, blue line, the simplified one of Figure 11, red line, and the time evolution of the power reference signal as dictated by the speed controller, black line (the three curves are basically overlapping so that it is almost impossible to distinguish them). The fact that the blue line is coincident with the red one leads to the conclusion that the equivalent scheme of Figure 11 is a good approximation of the real model. Moreover, as it is not possible to distinguish between the power time profile and its reference signal in a timeframe of about 500 s, one can conclude that the active power loop dynamics are much faster than the speed one. This can be confirmed through examining Figure 18 where the speed dynamics are much slower. This is consistent with previous assumptions. The current waveform is not reproduced here since it is much faster than the power one.   Another verification that has been performed is related to the machine voltage regulation loop, comparing the time profile obtained by the simplified linear scheme of Figure 13 with the actual machine voltage time profile obtained by the complete model. Figure 20 depicts the simplified and real machine voltage profile as well as the machine voltage reference provided to the controllers. As one can notice, the two profiles are slightly different but similar enough to provide a good approximation to apply the criteria for the regulator synthesis.   Finally, Figure 21 reports the dynamics of the DC link voltage obtained with the full model and with the simplified linear block scheme of Figure 12. Once again, there are some deviations between the simplified dynamic and the real one; nevertheless, the settling time and the overall behavior

Conclusions
The aim of the present study was to provide an analytical procedure for the calculation of the initial condition of a wind generator unit provided with a permanent magnet DDSG accounting for power system losses and to define some analytical criteria for the definition of the various parameters of the wind generator regulators necessary for its proper operation. In the literature, the problem of the initialization of a wind generating unit is discussed and developed under the assumption of a lossless system, since power losses increase the complexity of the resulting algebraic system. Nevertheless, power losses can have a sensible impact on the system initial conditions and also on the design of an effective control strategy. In the paper, a detailed model of the wind generator has been proposed and the solution of the initial condition problem has been fully described. The impact of power system losses on the results obtained were evaluated in comparison with a traditional lossless approach. Furthermore, the problem of providing analytical criteria to choose both the structures and the parameters of the system controllers has not been widely discussed in the literature. For this reason, the present paper has proposed a detailed characterization of the control strategy of a WTG equipped with a PMSG and provided a simplified representation of the system useful to design the parameters of the various system regulators.
Simulations performed with Digsilent Power Factory software highlighted the good response of the defined regulation system, thus assessing the effectiveness of the approximations done to synthesize the controllers. Further development of this research will include the possible application of nonlinear and decoupled control techniques to the WTG in order to provide a more effective and robust control of the system also capable to integrate frequency support logics (such as synthetic inertial controllers) and active power curtailment.
Author Contributions: Marco Invernizzi and Renato Procopio developed the theoretical approaches Section 3 implemented and tested by Andrea Bonfiglio in Section 3. Federico Delfino and Renato Procopio made the definition of the control scheme of Section 5 and together with Andrea Bonfiglio defined the simplified structure for the regulator design. Dynamic simulation were carried out by Andrea Bonfiglio.