Wind Turbine Structural Load Reduction by Linear Single Model Predictive Control

A new model-based predictive controller (MPC), specially oriented to facilitate its practical implementation, is presented. This controller is devoted to reduce the structural load in the drive train or/and the rotor of a wind turbine. It keeps its complexity and computational load low, by using a single linear internal model throughout the full range of use. To validate the new approach, the performance of two versions of such a controller is compared to the baseline case. Specifically, the implemented controllers are focused on mitigating the torsional vibrations that appear in the drive-train during turbine operation for wind speeds above rated. First, numerical simulations are used to study the potential performance. Then, the proposed methodology is put into practice by using rapid prototypes of the real-time controllers applied to a specifically designed Hardware-in-the-Loop (HiL) simulator of wind turbines. This HiL simulator realistically reproduces the performance of the National Renewable Energy Laboratory (NREL) 5 MW wind turbine. In order to confirm the practical applicability of such MPC algorithms, the electronic platform mounted on the rapid-prototyping system has a similar -or inferior- computational power than the industrial control platforms used in the actual wind turbines. Anyway, the computational burden is analyzed in detail.


I. INTRODUCTION
Wind energy extraction is a technique that has gained importance in recent years and still expects to grow significantly in the near future. On the other hand, the search for safer, larger [1] and more profitable facilities in the medium and long term has made the control system one of the essential components of modern wind turbines (WT). The control helps to reduce both manufacturing and maintenance costs, given that it can provide direct load reductions, expands the extracted energy, and allows efficient integration of system improvements, such as additional sensors, for example.
Model-based predictive control (MPC) is an advanced control technique that has provided very good results for decades in many industrial applications [2]. This technique includes, in addition to other elements, the real-time solution of a problem of optimal control of finite-horizon with restrictions. This makes MPC a very powerful tool for managing multiple The associate editor coordinating the review of this manuscript and approving it for publication was Feifei Bu . input and output systems, including restrictions and future predictions of disturbance and reference in its formulation. However, the computational burden and convergence issues pose an important challenge to the practical implementation of such kind of controllers on wind turbines [3], given the reliability conditions that such installations must comply with. Thus, for almost two decades, there have been numerous academic contributions related to the application of MPC to wind turbines (see, e.g., [4]- [6] and references therein).
The highly nonlinear nature of the aerodynamics of a WT is one of its most notable features. This forces either to linearize the behavior for multiple points of operation [7]- [9], resulting in Multiple internal linear models for the MPC (MMPC), or to use a non-linear simplified model [10], [11], resulting in a non-linear model predictive controller (NMPC). Unfortunately, both options have serious implementation problems, if we consider the technical limitations of the available control platforms and the safety margins currently required for these machines. On the one hand, applying MMPC linear techniques obliges to design multiple VOLUME 8, 2020 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ controllers, for the different points of operation, each one with a different internal model. Moreover, it is necessary to keep active, in parallel, at least an important part -the state observer-of all those controllers during execution, to ensure a smooth transition from one to the other, while the turbine goes through the whole operational range. Besides, the effective wind must be fast and confidently estimated on-line, in order to soundly decide the transition instants. Such computational parallelism significantly increases the processor load and the risk of stability problems. Besides, the accuracy with which the set of linear models replicates the behavior of the actual turbine and, therefore, the quality of the prediction and the obtained controller performance may be quite limited. In fact, a recent application study [12] presents results only slightly better than those obtained by a baseline controller. However, the MPC advantages referred to impose restrictions on parameters of execution -for example, structural loads-and to allow the addition of new sensors are maintained.
On the other hand, using the NMPC methodology forces us to solve on-line a non-convex optimization problem that implies a much higher computational load -at least, if the internal model collects enough degrees of freedom-and, more importantly, whose convergence -in a reasonable number of iterations-is not guaranteed in advance. That compel us again to face the equilibrium between computational load and performance: If we limit the first, limiting the maximum number of iterations -accepting, therefore, a quasi-optimal solution-and/or waiving a certain number of degrees of freedom in the simplified non-linear internal model, we also limit the second. In this way, there are numerous reference works -see, e. g., [11]-, devoted to the study of the potential of this type of controllers and based exclusively on numerical simulations, that demonstrate a great potential performance, but that openly recognize the impossibility of implementation on the current industrial control platforms. More recently, there have been interesting efforts -see [13], [14]-in order to enable the practical implementation of NMPC applied to WT.
In addition, it results very difficult to formally ensure the control stability in advance for both kinds of controllers. At best, it is necessary to impose restrictions on the terminal states, which usually limits the performance to be achieved. Therefore, it is often assumed sufficient to choose a prediction horizon long enough to avoid stability problems -see [15]-. Hence, even if a sound real-time practical implementation of the NMPC -see [16]-is achieved, it is proving difficult to bring it to the WT in practice.
Last, but not least, there is the fact that, at present, the control system of the angle of attack (pitch) of the turbine blades, used for wind above the nominal, appears classified in the certification protocols of the WT as a safety system, since it is very important for the structure and its environment. That, among other reasons, makes it extremely difficult to convince a manufacturer to implement a controller other than the very robust and mature gain-scheduled proportional-integral pitch controllers. However, the vast majority of the mentioned approaches use the pitch as the main MPC manipulated variable, forcing the manufacturers to do a very strong bet, considering the implementation aspects mentioned above.
At this point, we ask ourselves: Would it be possible to propose an MPC which, by using a Single linear internal Model (SMPC) in the whole operational WT range, will exploit the potentials of such controllers in order to improve substantially some important aspect of the WT operation, in practice?
This work is dedicated to answer such a question by trying to reduce significantly the load on the rotor and shaft of the WT, by using only the generator torque as manipulated variable. The prediction model will not include any non-linear element, that leaves out of our control the aerodynamic part of the WT, which will be managed by an external baseline loop. In section II, the modeling of a WT is described. Section III presents the SMPC proposal (internal model, cost function, and stability proof) and also describes the design of two versions of the new controller. In section IV, the potential performance of the controlled system is analyzed by using numerical simulations. Section V is devoted to describing the Hardware-in-the-Loop (HiL) Simulator for the NREL 5MW WT and the testbed for the real-time (RT) control experiments. The practical implementation of the SMPC versions in RT is developed in section VI. Finally, section VII concludes the paper with a summary and an outlook to future work.

II. MODELING THE WIND TURBINE
The model of a generic variable-speed WT based on a permanent-magnet synchronous generator (PMSG) with a full-rated converter (FRC) is described conceptually in Figure 1. The WT considered in this study is the NREL 5 MW [17] baseline with parameters in Appendix A. The main subsystems are described below one by one.

A. WT REDUCED AERODYNAMIC MODEL
The wind field produces an effect on the rotor that may be computed by aeroelastic simulators such as FAST [18] by using the blade element momentum method. Such a task has to be carried out iteratively and, in this way, no explicit expression can be obtained to describe the effect from each element of the three-dimensional field on the rotor. Anyway, by using data obtained from steady-state aeroelastic simulations and physical fundamentals, a simplified aerodynamic closed-form model may be derived, where the wind field is reduced to one-dimensional effective wind speed V W . 98396 VOLUME 8, 2020 Thus, the aerodynamic torque applied on the rotor with radius R is expressed as where ρ is the air density, β the pitch angle, λ is the tip speed ratio, ω rot the angular speed of the rotor and C p the effective power coefficient, implemented as a look-up table and extracted from steady-state simulations of the NREL 5MW turbine with WT_Perf [19].

B. MECHANICAL MODEL
In earlier works, a two-mass model has been usually utilized to describe the WT mechanical system -see e.g. [20]-. Such a model assumes that the blades are rigid and takes into account only the shaft flexibility. Nevertheless, the blades are also flexible and WT shaft torsional vibrations can be started directly by exciting the drive-train mode or, indirectly, by exciting the blade in-plane symmetrical mode. Hence, a three-mass model taking into account both modes -see [21], [22]-has been implemented in this work. The blade in-plane dynamics were also described as a torsional system. In this way, the three masses correspond to the inertia of the effective flexible part of the blades J bl , the inertia of the rigid part of the blades and the hub J hub and the inertia of the generator J gen . The first two masses are joined by the effective blades stiffness K bl and the second and third by the total stiffness of the low and high-speed shafts, K sh . The inputs to such a mechanical model are the torque implemented by the generator T em and the aerodynamic torque applied by the WT rotor T aero . The dynamic equations referred to the low-speed shaft (LSS) are where N gear is the ratio of the ideal gearbox, D bl , D sh are the damping coefficients, θ rot , θ hub , θ gen represent torsional angles and ω rot , ω hub , ω gen the angular speeds for the three inertias, respectively. In this model, J bl , J hub and K bl are unknown parameters, but they may be obtained, if the natural frequencies of torsional vibration, f 1 and f 2 , are known, given that -see [23], [24] -.
The vibration frequencies (5) were obtained by conducting a spectral analysis of the LSS torque in FAST when a turbulent wind, generated with Turbsim [25], reaches the rotor. The frequency of the blade in-plane symmetrical mode is 4 Hz. and the drive-train mode is 1.7 Hz. Given that J rotor = J bl + J hub = 3.5446e7 kg.m 2 -see [17]-, substituting in (5) and solving for J bl , J hub , and K bl , yield the following: J bl = 3.1265e7 kg.m 2 , J hub = 4.1812e6 kg.m 2 and K bl = 1.3483e9 N.m/rad. All the mentioned three-mass model parameters may be consulted in Appendix A.

C. ELECTRICAL MODEL
The WT electrical system consists of a back-to-back Voltage Source Converter (VSC) and a Permanent Magnet Synchronous Generator (PMSG). Such VSC is implemented by ideal switches and the PMSG is described in the rotor reference frame by the classical expressions T em = 3 2 p ψ m i sq + L sd − L sq i sd i sq (8) with L sd and L sq being the d-and q-axis self-inductances, R s the stator winding resistance, i sd , v sd and i sq , v sq the d-and q-axis currents and voltages, respectively, ψ m the flux of the rotor permanent magnets, p is the number of pole pairs and ω gen the generator mechanical angular speed. All the electrical model parameters have realistic values for this kind of generator, extracted from [26], [27], and are included in Appendix A.

D. BASELINE CONTROL SYSTEM
For above-rated wind speed (region III), the rotor speed is regulated by varying the pitch angle to adjust the aerodynamic torque. A baseline gain-scheduled PI controller as described in [17] is used for this purpose. On the other hand, the generator torque reference T * em is manipulated to obtain the rated power P rated , that is T * em = P rated /ω gen .

E. WT TOWER MODEL
When an MPC manages the pitch control, the simultaneous attenuation of the tower fore-aft vibrations is also commonly considered. However, since pitch cannot be managed in this case, it is unrealistic to consider the attenuation of tower VOLUME 8, 2020 vibrations by using exclusively the generator torque control. Therefore, this task should be left to the pitch control loop. On the other hand, including the tower dynamics in the simulation scenario would include the effect of such vibrations on the apparent incident wind speed and, therefore, on the aerodynamic torque. However, such vibrations are of relatively low frequency (about 0.25 Hz. for the 5 MW NREL WT) and, therefore, they are not going to suppose any problem for the estimation that our controllers make of the aerodynamic torque. Henceforth, we have considered that the inclusion of the tower dynamics will not alter in any way the performance of the analyzed controllers, and, for the sake of clarity, we will not take it into account.

III. CONTROLLER DESIGN A. MPC BASIC BACKGROUND
MPC is a control technique with many variants, distinguished by the internal model used to predict the evolution of the system. Here, a rather general MPC problem formulation is presented -see e.g. [28]-. At each time step, the MPC controller optimizes the future evolution of the system during a finite horizon while respecting some constraints. Such an optimization problem may be stated as where N is the prediction horizon and the system dynamics are described as the discrete-time model (10). The cost function (9) is composed of a stage cost J(y,u) and a terminal cost V f (x N ). The states and inputs are constrained x k ∈ X ⊆ R n , u k ∈ U ⊆ R v , containing X and U the origin in their interior. Finally, v k and d k are the measured and unmeasured disturbance input vectors, respectively. The solution of the problem (9) gives an optimal input and state sequences, but only the first element of the optimal input sequence is applied to the plant, discarding the rest. At the next sampling time, the whole process is repeated, creating a receding horizon scheme. On the other hand, given that the initial state x(0) is usually not completely measured, an observer is used to estimate it, thus obtaininĝ x(0). The optimal input sequence, obtained by solving (9), has M different values -control horizon-, being 1≤ M ≤ N .

B. SMPC PROPOSAL FOR WIND TURBINES
As it is well known, the transmission train is one of the elements with more susceptibility to failure over the life of a WT [29]. Besides, with the current tendency to install increasingly larger turbines -more flexible- [30] and in locations more inaccessible and subject to disturbances of excitation -offshore-, the interest focused on this problem increases. Therefore, the reduction of loads in the transmission train of the turbine is the primary goal of this proposal.
Anyway, although eliminating torsional vibrations on the shaft is the main target of the control, the flexibility of the MPC allows us to consider other objectives as well, such as reducing the structural load on the blades and balancing the relationship between mechanical and electrical disturbances, in the context of the generator. Since it is the functional zone where the mentioned structural loads normally appear with more virulence, we will limit the study to the area above the nominal wind velocity (region III), although it would not be problematic to extend the study to other regions. For example, in region II -below the nominal wind speed-the rotor speed ω rot should be also -plus the T LSS torque-set as a control target. The reference of ω rot maybe, following the classical WT control approach -see e.g. reference [31]the one that seeks to achieve the maximum generated power: ω rot_ref = V w λ opt /R, being λ opt the optimal tip speed ratio of the turbine.
The main contribution of this work is to pose an MPC with a single linear internal model (SMPC) aided, if necessary, by exogenous -not included in the optimization problemelements, which may contain auxiliary non-linear models. In particular, the only -for the entire region III-internal model for the MPC is the mechanical description given by (2)-(4), plus the simplified dynamical model of the generator, assumed as a first-order differential equation being T lag the generator time constant, extracted from the observed behavior of the electrical model given by (6)-(8). By using a common -see, e. g, [20]-adjustment for the torque control loop gains, we obtain that T lag = 0.1 s. which results normal -even conservative-for generators of this size. Thus, now the general discrete-time model (10) becomes a discrete-time linear model obtained from (2)-(4) and (11): Equation (12) presents the single linear internal model used by our SMPC. Note that such a model is not obtained by linearization, since it leaves out the non-linear part of the WT model, described by (1). So, we limit ourselves to include the three-mass model for the mechanical part, plus the simplified model for the dynamics of the electrical part. Such an electrical part is obtained by observing the behavior of the electrical model of the generator in closed-loop (torque control). Further details about the model (12) are described in Appendix B.
Initially, such an internal model has two inputs, namely, the aerodynamic torque T aero , applied by the WT rotor on the shaft, and the generator torque reference T * em . The admissible outputs of interest are the rotor speed ω rot , the torsional torque in the low-speed transmission shaft, referred to the area before the gearbox, T LSS , the torque shown on the flexible part of the blades T blades , the generator speed ω gen , the generator torque T em and P mec , an auxiliary output that may be used to stabilize the generated mechanical power P m = T em ω gen -see Appendix B for further details-In order to formulate explicitly the MPC optimization problem, the nature of the aforementioned signals must be defined. The generator torque reference T * em is the manipulated variable (MV) u and the aerodynamic torque T aero is considered as a disturbance -see subsection III. D-. The generator speed is the only measured output and the minimization of T LSS is the main control goal, to reduce the torsional vibrations. However, we may also try, as partial control targets and/or constraints, T blades , -to limit the load on the blades-and P mec -to balance the dynamic transfer of vibrations between the mechanical and electrical parts of the wind turbines. Finally, the generator torque T em must be constrained. As it is recommended in [17], the generator torque may exceed 10% of its nominal value at most.
In this way, we have proposed, considering (9), that where Q and R are weight matrices that penalize the deviation from the output targets (r) and the input increments, respectively. Besides, a hard constraint is imposed to unmeasured output T em < T em_max = 47402.91 N.m. Note 1: In practice, measures of T em -via generator currents-and P m -via electrical power delivered to the network by the grid-side controller-are available, but both of them usually have a high level of electromagnetic noise, making them counterproductive to the stability of the state observer. Therefore, they are considered as unmeasured outputs (UO) in this MPC formulation.
As can be deduced from the previous approach, the turbine control remains divided into two independent loops. One of them, the baseline pitch loop, is responsible for maintaining the ω gen at its nominal value. The other uses the generator torque to reduce the loads, while its effect on the electrical power provided to the network is restricted. Such restriction is important, given that the proposed MV (T * em ) has a direct impact on the extracted power. Therefore, when eliminating vibrations in the mechanical part, they may be -or maybe not-transferred to the electrical part. Such behavior is not simple, since ω gen , the other component of the mechanical power, is stabilized by the same controller. Hence, the study and subsequent restriction of this effect (commitment between mechanical and electrical vibration) is one of the main points of interest of the study carried out.
Note 2: The first of the aforementioned loops is implemented following the standard baseline gain-scheduled PI methodology -see e.g. [31]-. In this way, the main responsibility for the safety of the wind turbine continues to fall into highly contrasted methods. However, it should be noted that, although both loops are independent, they maintain a constant indirect interaction with each other. For example, given that the main target of our SMPC controller consists of minimizing T LSS , T em is reduced when it occurs an increase in T aero , to avoid torsion in the shaft, which could later provoke mechanical oscillations. Such reduction on T em will cause an additional increase -greater than that would take place if we did not have the vibration control working-in ω gen , to which the pitch controller must react. Besides, how well the pitch loop responds will, in turn, affect the disturbance, since the pitch affects T aero . On the other hand, if we do nothing to prevent torsion -or if the controller fails to do so-, the subsequent mechanical vibration on the shaft would also affect ω gen and, again, the pitch control.
In this way, it is clear that it cannot be known, in advance, whether the effect of one loop on the other one will be positive or negative, because it depends on how well each one does its work. However, it is important to be attentive to that indirect interaction, and even consider coordinated adjustments of the aggressiveness and robustness of both control loops -see section IV.C-.

C. STABILITY PROOF
To analyze the stability of an MPC controller, the system behavior needs to be studied on the infinite horizon, even in the case that such controller is only defined on a finite horizon -see e.g. [32]-. This assumption has led to the known as dual-mode MPC, where a terminal controller is assumed to start controlling the system once the final state of the prediction is reached. The cost associated with such a controller is the terminal cost V f (x N ) presented in (9). How the terminal controller, cost and constraint will need to be set in order to ensure stability depends on the type of plant and the constraints imposed. If the plant is linear, asymptotically stable, and has only control constraints, but no state constraints, the terminal controller may simply be u(k) = 0 for k > N (regulator problem). Now, the cost function (13) over an infinite horizon looks exactly like (9), if the terminal cost is where the solving of matrix Lyapunov equation -see [33]- provides the terminal weight matrixQ, given A, C, and Q. Besides, it is well known thatQ ≥ 0 if Q ≥ 0 and A has all its eigenvalues inside the unit disc. Furthermore, in this case, imposing a terminal constraint results unnecessarily. Thus, by using a terminal cost, given by (14)-(15), in expression (9) and a weight definite positive matrix Q in (13), the SMPC controller stability may be guaranteed in advance.

D. SMPC VERSIONS
Two different versions of the proposed SMPC controller have been developed in this work. Such versions differ in the way VOLUME 8, 2020 used to manage the aerodynamic torque T aero , which appears as a disturbance input to the internal model:

1) VERSION 1: AERODYNAMIC TORQUE AS MD
T aero is considered here as a measured disturbance (MD) when designing the controller and estimated separately using a one-mass physical model for the drive-train -see [34]-: being J and D the drivetrain inertia moment and damping coefficient, respectively. It is a well-known method [35] that goes through obtaining the derivative of the rotor speed ω rot = ω gen /N gear by means of the measured generator speed ω gen . This confronts us to filtering issues and its drawbacks, especially those provoked by the delays -see Figure 2-. On the other hand, to supply robustness to the controller, two unmeasured disturbances inputs have also been added, representing the T aero and T em estimation errors, T aero (UD1) and T em (UD2), respectively. Such errors are estimated internally through the state observer (Kalman filter) incorporated into the SMPC controller. In order to do so, the plant model used by the observer is augmented to incorporate the disturbance models. Specifically, an integrator is used for T aero (offset-free) and a static gain for T em , to maintain the state observability. Thus, observing (12) 2) VERSION 2: AERODYNAMIC TORQUE AS UD Now, T aero is directly declared as an unmeasured disturbance (UD1) input to the internal model. In this way, the state observer obtains the whole T aero, and the external disturbance estimator in Figure 2 is removed. The disturbance model used for T aero in version 1 -integrator-is maintained, but with the scale factor correspondently increased -see Appendices B and C for further details-. Thus, in model (12), now: Again, a certain estimation delay is inevitable and we are faced again with the compromise between estimation speed and sensitivity to the measurement noise of ω gen .

E. SMPC IMPLEMENTATION
The internal model is discretized (by ZOH) and the discrete-time SMPC controllers implemented, by using a sampling frequency of 80 Hz., standard for this application. The prediction time is just 1 second, selected by considering the vibration frequencies f 1 and f 2 , obtained in section II. B. In this way, the prediction horizon is N = 80 for the implementation of both controller versions. Finally, the control horizon is M = 20 in order to maintain the computation effort limited.

IV. POTENTIAL SMPC PERFORMANCE (NUMERICAL SIMULATIONS RESULTS)
As stated in the introductory section, one guideline of the present work focuses on the practical implementation of these SMPC controllers on the automation platforms commonly used in WT nowadays. In this way, the complexity and related computational load of such controllers are kept at a minimum, while maintaining its robustness and reliability sufficiently high. Besides, we should take into account important practical aspects of the implementation, such as delay (computational, I/O devices, transport,. . . ) and noise (quantification and/or electromagnetic). Although, indeed, several such aspects (quantification noise, delays in sensors and actuators, modeling errors . . . ) may (and we do) be considered in studies based on numerical simulations, other aspects are more difficult to characterize.
Therefore, the control performance study splits into two parts. On the first one, the maximum potential of the two versions of the proposed controller is analyzed by using numerical simulations, including well-known effects such as quantification noise and delay of sensors, actuators, and computation. It will also include the robustness to modeling errors, focusing on incremental changes in the moments of inertia J bl and J hub , due to the accumulation of ice/insects/dirt in the rotor. Such a well-known effect has important consequences in the WT dynamical behavior that must be taken into account since they constitute the main problem that presents the classic methods for the attenuation of this type of vibrations, like the Band Pass Filter-dampers -see e.g. [22]-.
In this way, the potential performance study is devoted to seeing how far the attenuation of the mechanical vibrations can go and the price that would be paid. Such an approach is common in works of this kind -see e.g. [11]-. Therefore, it is not a ''realistic'' adjustment of the MPC, especially because of the disturbances that are introduced in the generated power. It is precisely for this reason, and also to reduce the sensitivity to measurement noise, that more relaxed (''realistic'') SMPC settings are used afterward -section VI-. Therefore, the power disturbances are then much lower, no more than about 10% of the nominal. However, as expected, the control performance is also correspondingly reduced. Alternatively, we could have used the P mec output to balance the mechanical and electrical disturbances -further explanations in Appendix B-. All the SMPC settings may be consulted in Appendix C. Both studies are focused, as usual [11], on the one hand, on the reduction of extreme load in gust events and, on the other hand, on the fatigue load under turbulence conditions.

A. EXTREME LOADS
Hub height time series have been created with extreme operation gusts according to IEC standard [36] at V rated + 2 m/s = 13.2 m/s (Gust down) and V out = 25 m/s (Gust up). The performance of the two SMPC versions and the baseline controller are compared for such inputs in Figures 3 and 4, respectively. More precisely, the effective wind speed in the rotor (V w ), blades pitch angle (β), rotor speed (ω rot ), generator torque (T em ), low-speed shaft torsion torque (T LSS ) and generated mechanical power (T em ω gen ) are depicted. The mechanical power is calculated by simply multiplying the generator speed by the generator torque. Thus, the observed rated power will be the product of the generator rated torque and rated speed that can be found in Table 3 of Appendix A.
The obtained reduction on the extreme loads on the torsional torque on the low-speed axis and the corresponding vibrations on the drivetrain is very apparent; visually on Figures 3-4, and numerically -maximum (Max) and standard (σ ) deviations (% reduction to baseline)-, in Table 1. Only the transient saturation on the MV (T em ) impedes for a few seconds the compensation of the torsional vibrations.
In addition, in order to check the robustness to modeling errors, incidental increments on the mass of the WT rotor, has been considered. Specifically, changes on J bl and J hub inducing a 10 % alteration on the natural frequencies of the mechanical system have been introduced in the  WT model -but not in the SMPC internal model-and the related results added to the comparison. The robustness of such controllers is apparently very high -see Table 1-, given that the performance of the controlled system has been only very slightly altered by the important increments introduced on the rotor mass. In fact, the SMPC performances, obtained with a 10 % internal model error, are even better. This effect is due to the slower dynamics of the plant -bigger inertia in the WT rotor-and the corresponding smaller impact of the T aero estimation delays, which constitutes here the main implementation problem.
However, the perturbations on the generated power, when the SMPC is active, have been importantly incremented, given that the MV affects directly such power. Therefore, the SMPC control effort must be penalized and a trade-off between the mechanical and electrical stability should be reached.

B. FATIGUE LOADS
To evaluate the fatigue load reduction, a set of A-type turbulent wind fields according to IEC 61400-1 [36] in full-load operation region (mean wind speeds of 14, 18 and 24 m/s., and 18 %, 17 % and 15 % of turbulence, respectively) generated with Turbsim [25] has been applied to the simulation environment. In order to illustrate the dynamic behavior of VOLUME 8, 2020 the controlled system, the simulation results are presented in Figure 5 for a 15 % turbulence wind with a mean speed of 24 m/s. Again, the shaft torsion reduction and the related increment in the power perturbations -given the intense control action-obtained by the SMPC controllers are evident. Anyway, the low-frequency behavior of the rotor (ω rot ) and pitch angle (β) are almost unaltered -see additional comments on subsection IV.C-.
Besides, the lifetime damage equivalent loads (DEL) for the T LSS were calculated on the basis of a rain flow counting with Wohler exponent of 4, typical for steel generator shafts [37]. The T LSS standard (σ ) deviation (percentage reduction to baseline) and power mean increase (Mean POW) were computed and also presented in Table 2. Perceptual reductions in the fatigue load of the transmission train up to 85-90 % are henceforth possible. Besides, the robustness of the SMPC controllers to the parameter uncertainty on the turbine model is also demonstrated by observing the results obtained with a 10 % internal model error in the main torsional natural frequencies -see also Table 2 -.

C. OTHER ASPECTS AND CONCLUSIONS
Finally, other important aspects of SMPC controllers performance are analyzed and some conclusions are drawn.
Firstly, to clarify the important issue stated in Note 2 of section III.B, the effect that the SMPC controllers have on the generator speed and the pitch of the blades is now analyzed in detail. The same test presented in Figure 5, but for a shorter time interval -for better visualization-, comparing the baseline case with the SMPC UD version, is depicted in Figure 6. In such a figure it can be clearly seen how, effectively, the action of the SMPC eliminates much of the  high-frequency vibration from the generator speed and, more importantly, also from the actual angle of attack of the blades, resulting in a collateral reduction of the fatigue of blade actuators. Therefore, it appears that the reduction of load on the drivetrain also enhances the performance of the standard pitch control loop.
On the other hand, by monitoring the additional state of the extended model, assigned to the unmeasured disturbance in the SMPC UD version, the estimation that the internal Kalman filter makes of the aerodynamic torque is obtained. Such signal, the output of the external estimator of the MD version -see Figure 2-, and the aerodynamic torque that is effectively applied to the turbine model are compared in Figure 7. Both estimators work reasonably well, although there is a greater delay in the MD version. Nevertheless, since the performance results obtained by both versions are very similar, it seems that such incremental error in the T aero estimation of the MD version is largely corrected by means of the additional T aero input (UD1) -see Figure 2-.
We may conclude that both SMPC versions have the potential to significantly reduce the load on the drive train, helping, in turn, the pitch control. However, we must be careful with the increase in electrical instability that appears in the generated power, as a consequence of the intense control effort. Finally, the results do not justify the use of the  MD version, as opposed to the more compact UD version. Anyway, all these observations should be confirmed in a more realistic scenario for control implementation and test.

V. REAL-TIME EXPERIMENTAL PLATFORM
Real-time Hardware-in-the-Loop (HiL) simulation is a state of the art technique for achieving highly realistic laboratory testing of both power (e.g. inverters, motors) and control equipment. On the other hand, Rapid Control Prototyping (RCP) is a very efficient method to develop, optimize, and test new control strategies in a real environment quickly without manual programming. Combining both methodologies allows the design of experimental platforms that are increasingly used and valued in several fields of engineering -see e.g. [22], [38] and [39]-.
The real-time (RT) control experiments are implemented on the platform shown in Figure 8. It is composed conceptually by two elements: a WT HiL Simulator, that reproduces the scaled behavior of the 5 MW NREL turbine on a mechanically coupled motor-generator set, and a rapidprototyping system, devoted to put the turbine controllers into action and analyze their computational burden. The WT HiL Simulator uses RT software to compute the previously described aerodynamic and mechanical turbine models and, then, an electric motor to impose the resulting action on the generator shaft. On the other hand, the RT Controller Prototype implements the pitch, the generator, and the gridside converter controllers. The block diagram explaining such a platform is presented in Figure 9 and the hardware specifications are included in Appendix A.
The real-time experimental platform for WT control experiments is based on the MathWorks R programming environment. Specifically, it uses the automatic code generation tools (Matlab Coder R and Simulink Coder R ) to generate the source code for the controllers (to be executed deterministically in Target 2) and the NREL 5 MW WT models (to be executed in real-time in Target 1), from the same Simulink R block diagrams already utilized in the numerical simulation phase. Previously, the drivers of the used input-output devices have been added to such diagrams and the SMPCs settings changed -see section VI and Appendices B and C-. Such source code is compiled on the Host-PC and the real-time executables sent over an Ethernet network to the targets. Finally, Simulink Real-Time R tools are used for the synchronized RT execution on both targets, as well as the monitoring and control of the experiments from the Host-PC.

VI. REALISTIC SMPC PERFORMANCE (REAL-TIME CONTROL EXPERIMENTS RESULTS)
Now, the practical applicability of the SMPC controllers is examined in detail by implementing them in the Real-Time experimental platform described in section V. Such platform reproduces, realistically and with high repeatability, the behavior of the system under test. In fact, the WT aerodynamic torque is applied on the axis of a real generator, whose torque is controlled in real-time by means of a real-time prototype of the SMPC controllers proposed in section III.
Note 3: The SMPC controllers will relax their aggressiveness -and performance-in the real-time control experiments, given some aspects of the implementation of the controller prototypes. Especially, the generated power stability and the impact of the measurement noise will now be taken into account. In fact, the differences in the reached performances, observed between the simulation (potential) and RT experimentation (realistic) scenarios, may also be considered as a contribution of the present work. All the SMPC settings may be consulted in Appendix C.
A. EXTREME LOADS The same experiments described in section IV have been implemented on the experimental platform. Nevertheless, both control and state observer setups have been relaxed to reduce the perturbations on the generated VOLUME 8, 2020 power -see comments on subsection IV.A-and attain an even more robust behavior for the controlled system. Table 1 presents the experimental results in a comparative numerical way. The dynamic response to extreme loads are still importantly improved with respect to the baseline control. Indeed, the SMPC UD version reaches up to 40-50 % load reduction.

B. FATIGUE LOADS
The responses to the 15 % turbulent wind of mean speed of 24 m/s, are now displayed in Figure 10. Table 2 presents the obtained improvements in a comparative numerical way, where results obtained with a 10 % error in the internal model of the SMPC versions are included to study again the controllers' robustness. Now, the performance has been reduced by limiting the control action, thus avoiding excessive instability in the electrical part of the system. Nevertheless, about one-third of the torsional load on the transmission train is still eliminated, without a notable increase in the instability of the generated power. In order to verify in practice such assertion, the electric power delivered to the grid by the Unidrive Regen unitsee section V and Figures 8 and 9-has been monitored. Thus, in Figure 11, the reads, obtained from the mentioned equipment during the bench tests corresponding to Figure 10, are presented. It can be clearly seen that there is hardly any increase in electrical stability when the SMPC controls are active.
At this point, it seems interesting to perform a frequency analysis on the signals of interest presented in Figures 10 and 11. Therefore, the Fast Fourier Transforms (FFT) of such signals have been calculated and  presented in Figure 12. In that figure, it may be seen that the effects of the torsional vibrations on pitch angle, generator speed, and low-speed shaft torque are greatly attenuated. It may also be seen that the power of some frequency components is increased to some extent in the generator torque (MV) and, correspondingly, in the generated mechanical power. However, we may also see that, on the other side of the DC bus -figure 1-, the frequency components of the generated electrical power, supplied to the grid by the three controllers on comparison, are very similar.

C. COMPUTATIONAL BURDEN
The real-time controllers have been implemented on an Intel Core2 Duo E8400 3GHz industrial computer, equipped with Simulink Real-Time R kernel. The KWIK algorithm -see [40]-has been used to solve the optimization quadratic problem. The SMPC version MD has been executed in multirate mode, using one core to the external T aero estimator (800 Hz) and the other to the SMPC controller (80 Hz). The maximum computation delays here were 1,50e-5 s. and 2,82e-5 s., respectively, corresponding to a maximum number for iterations of 6 (4,32e-5 s., maximum accumulated delay). On the other hand, the more compact version UD has been executed in only one core (80 Hz.), giving a maximum computational delay of 3,41e-5 s with 4 iterations at most. In both cases, the computational burden does not reach 0.4 %, and, therefore, the corresponding delay is negligible.
Such computational load measures have been obtained from data collected during the real-time execution by the Profiler application -see [42]-of Real-Time Simulink R . The execution times are calculated from data stored by routines added to the code. Besides, the distribution, in execution cycles, of the load among the different cores of the processor is also provided.

VII. CONCLUSIONS
In this paper, a new MPC approach dedicated to reduce the structural load of wind turbines has been proposed. A single linear internal MPC model captures in sufficient detail the dynamic behavior of the mechanical and electrical parts of the wind turbine. This allows the simplification of the practical implementation and proof of stability for such controllers. Two versions, without disturbance previewing ability, of the controller have been designed and their potential performance explored, using numerical simulations, for the above-rated wind speed operational region. The torsional load reduction may be very high, improving by the way the standard pitch controller performance. Then, a wind turbine Hardware-in-the-loop simulator has been implemented to confirm the behavior of the controlled system in a realistic setup and real-time scenario. The experimental results support that no less than a third of the torsional load of the shaft may be eliminated, without causing instability in the generated electrical power and without entailing an important computational load/delay for a modest control platform. Finally, both controllers had turned out to be sufficiently robust to internal model errors and measurement noise. A LIDAR-assisted controller version, gifted with disturbance previewing, and the extension to other operational regions are put forward as future work.

APPENDIX A IMPLEMENTATION PARAMETERS
See Table 3 and 4 here.

APPENDIX B SMPC DISCRETE-TIME PLANT MODEL
From expressions (2)-(4) and (11), the plant model representation in continuous-time state-space form is (19), where the algebraic components are shown in (20), at the bottom of the next page.ẋ = A c x + B c u + B cp u p y = C c x + D c u + D cp u p (19) Observe that the output P mec may be used to penalize the fluctuations appeared in the mechanical power P m = T em ω gen , given that P mec =T em ω gen +ω gen T em =T em (ω gen + ω gen ) +ω gen (T em + T em ) = 2T emωgen + (T em ω gen +ω gen T em ) = 2P m + P m (21)   where first-order Taylor series expansion is used to get an approximate linear representation of P m : =T em ω gen +ω gen T em (22) In this way, the fluctuations in the mechanical power ( P m ) may be penalized by assigning a reference 2P m to the P mec output. Observe also that this is valid for the whole region 3.
On another note, when a vector of unmeasured input disturbances d are considered, an input disturbance model should be chosenẋ (23) where A id , B id , C id, and D id are constant state-space matrices, x id is a vector of input disturbance model states and w id is a vector of dimensionless white noise inputs, with zero mean and unit variance. Now, the two versions of the SMPC controller -see subsection III. D.-are considered: A. SMPC VERSION 1: T aero AS MEASURED DISTURBANCE In this case, two unmeasured disturbance inputs have been added. An integrator is used for T aero (offset-free) and a static gain for T em , so we have -see expression (17)- and the continuous-time state-space prediction model iṡ where d is obtained from the model (23) and: G 1 and G 2 are gains representing the estimated magnitudes for the unmeasured disturbances.

B. SMPC VERSION 2: T aero AS AN UNMEASURED DISTURBANCE
Now, the whole T aero is considered an unmeasured disturbance. An integrator is again used for T aero (offset-free) and a static gain for T em , so we have and the continuous-time state-space prediction model is noẇ where d is obtained from the model (23) and: The gain G 3 is now incremented with respect to G 1 to cover the complete range of T aero .
Finally, the models (23), (25) and (28), with model parameter values presented in Table 3 -in Appendix A-and settings described in Appendix C, are discretized by using the being: x = ω rot (θ rot − θ hub ) ω hub θ hub − θ gen N gear ω gen T em T u = T * em , u p = T aero , y = ω rot T LSS T blades ω gen T em P mec zero-order hold method with a sampling period T = 0.0125 s. (typical f = 80 Hz.). In this way, matrices A, B, B v , B d , C, D, D v, and D d in the discrete-time model (12) are obtained.

APPENDIX C SMCP CONTROLLERS SETTINGS A. STATE OBSERVER IMPLEMENTATION
The SMPC uses a discrete-time state observer to estimate de unmeasured states and predict how the manipulated variable changes will affect future plant outputs. The state observer combines the plant model, described in Appendix B, with additional output disturbance and measurement noise models: x e (k + 1) = A e x e (k) + B e u e (k) y e (k) = C e x e (k) + D e u e (k) (30) being: where x(k) is the initial plant model state vector, x id (k) the input disturbance model state, u(k) the manipulated plant input, and v(k) the measured disturbance model input. w id (k), w od (k), and w n (k) are white noise inputs for input and output disturbances and measurement noise models, respectively. All the white noise inputs are supposed independents, each with zero mean and unity covariance. All terms are defined in discrete-time.
In order to maintain the state observability, in our case, both output disturbance and measurement noise models are simply defined as static gains. In this way, being A, B, B v , B d , C, D, D v and D d extracted from plant model (12) -see also Appendix B-. A idk , B idk , C idk and D idk are the discrete-time matrices obtained by discretizing (ZOH method) the input unmeasured disturbance model (23), by using expressions (26) and (29) for the SMPC controller version 1 and 2, respectively. Finally, D odk and D nk are the static gains used as output disturbance and measurement noise models. Additional independent white noise signals w u (k) and w v (k) with zero mean and identity covariance are added to inputs u(k) and v(k). Then, the u(k) and v(k) are set to zero and the effect of the stochastic inputs on the controller estates x e (k) and measured plant output y me (k) is obtained by x e (k + 1) = A e x e (k) + B e w(k) y me (k) = C me x e (k) + D me w(k) where w T (k) = w T u (k) w T v (k) w T id (k) w T od (k) w T n (k) (34) being C me and D me the rows and columns of observer parameters C e and D e from (32) corresponding to measured plant outputs and measured disturbance inputs.
Finally, the Matlab R kalman command -see [41]-is used to calculate the Kalman estimator gains. Inputs for such command are the state observer matrices A e , C me from expressions (32)- (33)  By observing equations (12) and (13), we have used the following weight matrices for the stage cost function J(y, u), penalizing the deviation of T LSS from its nominal value (Q) and the increments in T * em (R):  (36) being diag a diagonal matrix. As exposed previously, the only control target is T LSS , the rest of the weights have been set to a very small non-zero value in order to improve the numerical stability of the matrix calculations. All the weights are divided by their scale factors. Then, the terminal weight matrixQ for the terminal cost function V f (x N ) -see equations (9) and (14)-is obtained by solving matrix Lyapunov equation (15), by using Matlab R dlyap command -see [41]-, with A and C obtained from equations (12) and Q from (36) as inputs.
Finally, the adjustable gains involved in the disturbance and measurement noise models have been the following: G 1 = 6e 6 , G 2 = 4.7e 2 , G 3 = 6e 8 , D odk = 5, and D nk = 1. Specifically, G 1 , G 2, and G 3 are part of the input disturbance models for both controller versions defined in expressions (23)- (29) of Appendix B. D odk and D nk are the static gains used as output disturbance and measurement noise models in (30)-(32).

C. SMPC SETTINGS FOR THE REALISTIC PERFORMANCE STUDY
In this case, the SMPC settings have been relaxed -see e.g. Note 3 in section VI-: On the other hand, now the adjustable gains involved in the disturbance and measurement noise models have been the following: G 1 = 6e 5 , G 2 = 4.7e 1 , G 3 = 6e 7 , D odk = 0.5, and D nk = 10.
It can be seen that, for the realistic adjustment used on the real-time experimental platform, the weight associated with the deviation of the T LSS output from the null reference value has been reduced -see Q matrix-. The weight applied in the cost function to the rate of the variable manipulated has been increased -see R matrix-. This makes the control action less aggressive. Thus, the controlled system increases its robustness, although it loses performance. On the other hand, we have decreased the gains of the unmeasured input disturbance model and increased the gain of the measurement noise model. In this way, the controller responds less to prediction errors and we make the state estimation, made by the Kalman filter, less sensitive to the measurement noise. In return, it makes its operation slower, further damaging the performance obtained by the control system.