Pitfalls of testing wind turbine control algorithms on nacelle test benches

The validation and certification of wind turbines (WT) on nacelle test benches (NTB) is becoming increasingly important in the development process. While for certifiers the advantage lies in controlled test execution, for development departments it lies in testing as many system components as possible in a quasi-final prototype. However, the question arises which practical conditions must be fulfilled so that statements can also be made about WT control. In addition to the errors induced by a mechanical Hardware in the Loop (mHiL) system, the dynamic interactions between the WT controller and the NTB controller applying the mHiL concept are of interest. This analytical work based on simulations aims to systematically investigate how realistic the control behavior of a WT operated on a NTB is. For this purpose, the nominal behavior of a WT is compared with the operation on a NTB under realistic conditions and the resulting differences are subsequently reproduced in a synthetic load case. Finally, the differences are analyzed in terms of system theory. It is found that a frequency-dependent distorted behavior caused by operating the WT on a NTB is responsible for strong deviations compared to the WT operation in field. In the controller configuration studied, gain amplifications up to 5.17dB\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$5.17\,\text{dB}$$\end{document} are identified. The distortion is not exclusively caused by the mHiL closed loop behavior, but results from the interaction of all subsystems in both control loops. Therefore, its behavior is identified as a function of the system and controller parameters of both the WT and the NTB.


Introduction
With the increasing demand for renewable energy, the interest in nacelle test benches (NTB) for certification and validation of wind turbines (WT) is increasing [10]. With their help, wind energy industry aims to test and validate an entire WT, both the physical components as well as the automation and control, under realistic operating conditions. For this purpose, a mechanical Hardware-in-the-Loop (mHiL) concept is used. In this case, a mHiL controller imposes real WT dynamic behavior on the NTB in such a way that the WT can be operated as in field tests [11]. In order to test and validate performant WT control systems using mHiL controlled NTB, the question of dynamic interactions of the coupled overall system arises. Furthermore, the test quality in the form of an explicit assessment of the similarity of field tests to mHiL tests is of interest. Only if uncertainties induced by mHiL based testing procedure are quantifiable, meaningful results concerning the WT controller can be derived.
Previous research has been performed from a mHiL point of view and questions regarding robustness and performance have been answered. However, research questions from a WT control perspective only have been insufficiently considered so far. This holds true not only to WT applications. The characteristics emulated by mHiL are evaluated primarily with respect to the tracking behavior from the reference WT and disturbance rejection, as the device under test (DUT) controller is often not known [3]. As a result, less attention is paid to the systematic closing of the entire control loop through the WT controller. Although in [4] the WT controller is considered in the mHiL controller design to explicitly account for the WT power curve, the capability of the test bench to analyze WT control algorithms is not investigated. The quality of DUT control in a power Hardware-in-the-Loop (pHiL) emulation is certainly considered, but not examined in more detail or in terms of system theory [13]. The problem of interacting pHiL and DUT controllers is adressed in [2] and circumvented with a much higher bandwidth of the pHiL controller. A distor- Fig. 1 Dynamic model of the controlled Wind Turbine [7] Fig. 2 Dynamic model of the controlled Wind Turbine emulated on a NTB via mHiL [3,9] K tion of results in HiL experiments in general, i.e. the error induced by the HiL control loop compared to the real experiment, is described in [6]. Here, the DUT does not have any control, so there is no branched control loop. Nevertheless, the difference to the real experiment is approximated with a dynamical model. In [3], a mHiL experiment finds excitation of low frequencies in a transient load case, while the DUT controller shows strong activity. A further explanation for this bias may be provided later in this work. An evaluation of a mHiL controller with respect to the possibility of validating WT torque controllers is given in [9]. The possibility of testing drive train damping controllers using the generator torque is established on the basis of the phase delay induced by the mHiL control loop. In this context, model reference control algorithms encounter stability problems.
In contrast to current research, this paper elaborates on the dynamic distortion of the closed-loop WT dynamics in a mHiL environment in order to evaluate the accuracy of the controller tests on the NTB. For this, a framework is introduced that allows to consider the distortion in an isolated manner, taking into account the control and system parameters in any nested couplings. Based on this, a brief parameter study is performed, which describes the influence of different controller and system parameters on the distortion and resulting testing quality. This paper is organized as follows. Sect. 2 first describes the underlying controloriented dynamic system models. Based on these models, Sect. 3 systematically examines the behavior of the nominal WT and the WT on a mHiL controlled NTB. Based on this, Sect. 4 relates those differences to the system parameters in a brief parameter study. Finally, Sect. 5 summarizes the results.
The simulative investigations rely on parameters of our research WT FVA-Gondel (NEG-Micon NM80) on the nacelle test bench at the Center for Wind Power Drives (CWD) of RWTH Aachen University [11].

System Models
In this section the underlying system dynamics are described based on [3,7]. For this purpose, a general distinction is made between the WT, shown in Fig. 1, and the emulated WT (eWT), shown in Fig. 2.
While the former is a description of a real WT reduced to its essential functions, the latter describes the operation of the very same turbine on a NTB. The WT consists of the controller, minimizing the error between the reference rotational speed ! 0 and the generator speed ! gen and also regulates the electrical power output P el by actuating the pitch angles Â and the generator torque T gen . Further, the WT consists of the plant with the wind speed v w , the aero-dynamic torque T aero and the rotational speed of the rotor ! bld . The eWT on the other side consists of a mHiL system, with the controlled WT as a reference model generating a reference generator speed ! gen-ref for the corresponding mHiL tracking controller. This tracking controller is used to emulate the dynamics of the WT in the actual generator speed ! gen-act , by actuating a motor torque T mot . All together the models consist of the WT and NTB structural dynamics, the aerodynamics and the WT and mHiL controllers, which are explained in detail in the following.

Structural Dynamics
The essential element of the WT is the drive train, which, at a given rotational speed !, describes the energy conversion of the power extracted from the wind P aero = T aero ! into electrical power P el = T gen !. The power is supplied by the aerodynamic torque T aero and dissipated by the generator torque T gen . In order to describe the first two torsional eigenfrequencies, the drive train is modeled as a torsional 3-mass oscillator. These masses represent the inertias of all three rotor blades in sum, the rotor blade hub and the generator. The corresponding rotational speeds are described as ! bld , ! hub and ! gen , respectively. It is to be clarified that this corresponds to a description reduced in the dynamic model order with physical surrogate parameters. The unmentioned inertia of the gearbox, for example, is distributed among these surrogate parameters. The drive train of the NTB is considered analogously to that of the WT, although the parameters are different as this drive train is stiffer and less inertial. Unlike the WT, the NTB drive train is driven by a motor torque T mot . The inertias of the NTB represent the motor, the flange and again the generator with the rotational speeds ! mot , ! flg and ! gen . The generator is used as an inertia at the NTB as well, since the nacelle of the wind turbine including the gearbox and the generator is present at the NTB drive train. Therefore, in the eWT a distinction has to be made between the virtual WT reference generator speed ! gen-ref and the physically present generator speed ! gen-act . Both drive trains are equipped with a gearbox that transforms the power to a higher generator speed level.
The dynamics of the WT tower is not considered in this work, since its behavior is not emulated on the NTB and it is not considered in the examined WT control loop [8].

Aerodynamics
The real-time aerodynamics simulation RAISE [12] is used to investigate the rotor behavior under realistic turbulent conditions. It computes the aerodynamic torque T aero-R , considering the inputs of the (low frequency) mean wind speed v w , the rotor speed ! bld and the pitch angles Â 1 to Â 3 . For the later investigation of synthetic load cases and the the-oretical system analysis a reduced aerodynamics model in form of a static map is used as well. This reduced model is able to process fast changes of the mean wind speed and may be linearized. Its torque T aero-cp is given by with the air density , the rotor radius R and the power coefficient c P .v w ; ! bld ; Â/ at the mean pitch angle Â.

Wind Turbine Controller
The WT plant is a multiple input, multiple output system, controlling the generator speed ! gen in closed loop and the electrical power P el in open loop, using the mean pitch angle Â and the generator torque T gen . Its control strategy based on [8] is presented in the following. A pitch controller actuates the pitch angles and thus influences the power applied to the system, while a torque controller actuates the generator torque and thus influences the power extracted from the system. The control strategy is divided into the partial load regime and the full load regime. In partial load, the goal is to extract the maximum possible power from the wind by keeping the pitch angles constant at an optimum Â opt . In full load regime, the rated values of generator speed ! gen and electrical power P el should not be exceeded. As a result the incoming power must be limited. Therefore, in partial load regime, only the torque controller is active, determining the generator torque based on a static map, resulting in the optimal torque T gen for a given ! gen . In full load regime, the generator torque increases proportional to ! −1 gen . Thus, the power is kept constant. The pitch angle regulates the generator speed ! gen as a PI controller with gain-scheduling and anti-windup, as the controller output is limited to Â 2 OE0 ı ; 90 ı . The pitch controller imposes a second-order dynamic on the generator speed in full-load regime with the free parameters eigenfrequency ! 'n and damping ratio ' . In [8], ! 'n = 0.6rads −1 and ' = 0.7 are used for a 5 MW-WT.

Nacelle Test Bench Controller
Since the NTB drive train dynamics differ from the WT drive train dynamics, the mHiL controllers main goal is to emulate the behaviour of the reference WT. Therefore, the mHiL controller tracks the generator speed ! gen-ref of the simulated reference WT. In the simplest case, a PI controller is used for this task. Further the controller is used to damp the drive trains eigenfrequencies, by feeding back the motor speed ! mot through a DT2 filter. The better the mHiL controller, the more accurately the eigenfrequencies

Investigation of the Distortion of the Dynamic Behavior
Due to the unavoidable non-ideal reference tracking behavior of the mHiL controller, the dynamic characteristics of the WT and the eWT inevitably differ. Those deviations are investigated as a dynamic distortion in the following both in simulation and in terms of system theory. The distortion is investigated in closed loop application. Since the main disturbance variable in the power operation of the WT also defining the operating point is the wind speed, the dynamics are examined with respect to the wind speed as a single input, multiple output (SIMO) system. The system outputs include all variables of interest, exemplary the manipulated and the controlled variables. It should be emphasized that the WT and mHiL controllers are part of the investigated systems WT and eWT. For the investigation, the WT controller is chosen comparatively fast compared to the literature with ! 'n = 1.2rads −1 to provoke misbehavior in mHiL operation.
K Fig. 4 WT and eWT in a synthetic frequency varying load case, showing the input v w , the manipulated variables OEÂ; T gen and the controlled variables OE! gen ; P el

Simulative Investigation
First, a realistic load case is shown using RAISE. Its behavior is then reproduced in synthetic load cases using the reduced aerodynamics given in (1). Fig. 3 shows the dynamical response of the WT and the eWT for the Extreme Operation Gust (EOG) [5] load case, which is a very transient standard load case used to test WT control. Therefore, a turbulent wind field in full load regime with a mean wind speed of v w = 14ms −1 is superimposed by an EOG in the range from 100 s to 110 s. Both systems show a qualitatively similar stable behavior of the controlled variables ! gen and P el before and after the EOG. The amplitude of the oscillation of the first eigenfrequency of the drive train at 2.45 Hz is less pronounced using the eWT, but it does not affect the macroscopic course. In the time frame about the EOG, manipulated and controlled variables differ macroscopically significantly from each other. The deviations as well as the time delay is comparatively high. On the one hand, the generator speed ! gen has a higher overshoot of 5% of the rated speed and a much longer settling On the other hand, the electrical power P el exhibits a stronger drop of 22% of the rated power during the EOG. The generator torque T gen behaves macroscopically similar to P el . The pitch angle Â is constrained in its rate especially in case of the eWT, whereby the dynamic properties imposed by the pitch controller are lost. This contributes to the higher overshoot of the generator speed and power loss. Overall, the load case considered cannot be tested properly on the NTB due to high deviations and different progressions of manipulated and controlled variables.

Load Case: Extreme Operation Gust
While the excessively strong deviations can be partly explained by the constraint on the pitch angle rate, the question arises why this constraint in the eWT compared to the WT took effect in the first place, i.e. why the same pitch controller in the eWT specifies a higher pitch angle rate.

Synthetic Load Case
Since the strong distortion shown in Fig. 3 occurs during a load case with a dynamic excitation, the behavior of the SIMO system as a function of the wind frequency is investigated in the following. Fig. 4 shows the behavior of the WT and the eWT in a synthetic frequency-varying load case using the reduced aerodynamics. The synthetic wind speed is determined by a sinusoidal oscillation with increasing frequency (chirp signal) superimposed on a constant operating point of 15 m s −1 . The excited frequency is rising linearly from 70 mHz to 280 mHz. The operating point is chosen with a higher wind speed compared to the load case before so that the mean pitch angle Â is less affected by the constraints of OE0 ı ; 90 ı . However, similar results can be produced at different operating points as well.
In the range from 100 s to 250 s, roughly 110 mHz to 220 mHz in the chirp signal, the distortion shown in Fig. 3 is reproduced. Both the overshoot of the generator speed ! gen and the drop of the power P el , as well as the constrained pitch rate P Â can be seen. The EOG lies within this range as its main frequency components are about 200 mHz. This frequency dependence of the distortion could explain why the nonlinear constraints during the EOG intervene more strongly in the eWT.

System Theoretical Investigation
In order to further analyze the simulative investigated frequency dependence, the distortion is analyzed using linear system theoretical analysis in the following. Thus, the frequency-dependent signal amplifications and phase shifts of both SIMO systems WT as well as eWT are considered. For this purpose, the system is linearized at various operating points using the Simulink Model Linearizer of the Simulink Control Design Toolbox [14]. It identifies linear relations between all inputs u, system states x and outputs y. Due to the complexity of the RAISE aerodynamics simulation, the reduced aerodynamical model (1) is used for linearization. The resulting configuration yields n = 9 states for the WT and n = 17 for the eWT, including the control algorithms. The operating point is given by a constant wind speed v w-op and the model is linearized in steady state. The resulting linearized SIMO model with m outputs can be represented in time discrete state space with the state space matrices A 2 R n n , B 2 R n 1 , C 2 R m n and D 2 R m 1 in the operating point op as well as the input u 2 R, the states x 2 R n and outputs y 2 R m at time instant k. Thus, a single input, single output (SISO) transfer function can be derived for each output, describing the behavior between the excitation by the dynamic wind speed v w around the operating point and the respective output. Fig. 5 accordingly shows the Bode plots obtained from the transfer functions to the pitch rate P Â , since P Â was limited by constraint in the previous load cases, at the operating point v w-op = 14ms −1 .
In the spectrum from about 120 mHz to 500 mHz, the previously determined higher gain amplification of the eWT is evident. At the same time, amplifications at frequencies above 500 mHz, including the eigenfrequencies of the WT Fig. 6 Bode plots of the dynamic distortion G Dist .z/ to the output P T gen at various wind speeds and the mHiL tracking behavior in comparison at 2.45 Hz and 4.54 Hz, tend to be damped. The phase delay is generally higher from about 130 mHz.

Dynamic Distortion
Since linear SISO systems are commutative, the transfer function of the eWT G eWT;i .z/ with output i, can be represented by G eWT;i .z/ = G Dist;i .z/ G WT;i .z/; (4) combining the transfer function of the WT G WT;i .z/ and a transfer function of the distortion G Dist;i .z/, that the emulation on the NTB entails. Therefore, the linearized distortion at output i caused by the emulation at a given operating point can be described as It should be emphasized that generally G Dist;i .z/ cannot be trivially encapsulated from the eWT by reshaping the functional diagram shown in Fig. 2 due to the nested crossconnections and the general high dynamic order. The distortion G Dist;i .z/ is therefore determined numerically and shows dependencies on the parameters of both subsystems WT and NTB as well as their control algorithms. Fig. 6 shows bode plots of the distortion of the generator torque rate P T gen at various wind speeds and the mHiL closed loop tracking behavior in comparison. This representation as a flock of bode plots illustrates in isolation the operating point and frequency dependent distortion. The generator torque rate is considered in contrast to the previous examples, as the pitch angle is held constant in partial load. Generally, it was found that the dynamic distortion G Dist;i .z/ is identical for the manipulated variables T gen and Â as well as their rates of change P T gen and P Â and the output variables ! gen and P el , as long as they are not held constant and therefore distorted at all. Further, identical distortions were found in partial load regime for wind speeds of 4, 8, 10 and 12 m s −1 . The previously determined damping and phase delay at higher frequent excitations can be seen as well as a gain and phase decrease starting at the first eigenfrequency of the NTB at 6.29 Hz. The emulation of the first eigenfrequency of the WT drive train at 2.45 Hz shows a strong dependence on the operating point. The overshoot at low frequencies is identified as depending on the operating point as well in the range from about 90 mHz to 600 mHz, with the overshoot drifting to higher frequencies as the wind speed increases. When the pitch controller is inactive, the increase is not depending on the operating point and occurs at low frequencies up to about 450 mHz. For the given configuration, an overshoot of 1.25 dB-5.17 dB 15.5%-81.3% occurs in the low frequency range. To put this in perspective, it can be seen that the distortion corresponds to the tracking behavior of the mHiL closed control loop as long as the pitch control is not active. Thereby, the assumption that the distortion of the overall system is identical to the tracking behavior of the mHiL controller, i.e. the additional dynamics of the eWT compared to the WT, seems reasonable at first. However, Fig. 6 shows that this is not the case if the control loop is closed through the pitch controller. From this it can be seen that even if the distortion is significantly influenced by the tracking behavior of the mHiL controller, a share of the distortion occurs due to the interaction of the overall system.
An explanation for the observed effects is elaborated in the following. A closed loop transfer function G CL is given by  [1]. Therefore, the distortion may be expressed as not showing the index i for the sake of simplicity. The two open-loop transfer functions G 0−WT and G 0−eWT are obtained by multiplying all respective partial transfer functions of the system. The forward path on the other hand depends on the selected output i. However, since linear SISO systems equal commutative multiplications of linear subsystems, the output-dependent part of the distortion can be removed from the equation. As an example, derived from Figs. 1 and 2, the forward path from the wind speed v w to the pitch angle Â is determined by with respective transfer functions for the submodules of the aerodynamics (G aero ), the WT drive train (G WT−DT ), the pitch controller (G Â ), the mHiL controller (G mHiL ) as well as the NTB drive train (G NTB-DT ). Substituting (8) into (7), the distortion for the pitch angle Â becomes Thus, the distortion depends on the output variable under consideration only insofar as the forward path from input to output variable depends upon G mHiL and G NTB-DT . Furthermore, it follows that the nonlinear gain scheduling of the pitch controller appears in both G 0−WT and G 0−eWT , which means that the linearized distortion is depending on the operating point, provided that the pitch controller is active.
In conclusion, it can be deduced that the distortion due to nonlinear submodules must generally be assumed to be operating point dependent. Furthermore, the interaction of the overall system is decisive for the distortion, see (7). Apart from the tracking behavior of the mHiL controller, the distortion also depends on the operating point and pitch controller. From this the conclusion can be drawn that the design of the mHiL system must be done with accurate WT plant and controller models, such that the distortion can be explicitly accounted for in the controller design.

Parameter Study
In this section, a brief parameter study is shown, which is intended to demonstrate the influences of control system parameters on the distortion and to derive consequences for WT and mHiL control. For this purpose, the previously identified increase in the low-frequency range is investigated. Starting from the distortion shown in Fig. 6, the system parameters considered relevant, listed in Table 1, are varied by˙20% and the corresponding distortions are put into relation. For this purpose, the following criteria are introduced: The frequency range in which the amplification in full load is at least 1 dB extends from f 1 to f 2 . The maximum amplification of the distortion and the mHiL tracking are described by K max and K mHiL−max , respectively. Convergence and stability in this context describe whether the simulation converges at all to be linearized and whether the resulting SIMO system is stable. Although both depends on the operating point, the statement is negated as soon as it does not converge or is not stable in at least one operating point.
A more performant WT controller with ! 'n = 1.44rads −1 (+20%) worsens the test quality with K max rising from 5.17 dB to 6.39 dB, while a correspondingly slow controller ! 'n = 0.96rads −1 (−20%) reduces the distortion to 4.08 dB. A higher damping ' shows a similar but less pronounced effect. The amplified range continues to drift towards higher frequencies to a small extent using the more performant WT controller, as can be seen in f 1 and f 2 . Above a certain performance, the WT dynamics do not even converge in some operating points. Instabilities in the linearized closed loop system were not found in the configurations shown in Table 1. As expected, the distortion is reduced by choosing a higher performance of the mHiL controller +20% ! −0.94 dB, −20% ! +1.52 dB in K max . Thereby, the relative rise and fall of the distortion K max is more pronounced compared to the maximum gain amplification K mHiL−max of the mHiL tracking itself. Again, this shows that the distortion is only partially described by the tracking behavior of the mHiL system.
All in all, for the mHiL closed control loop, the requirement can be derived to be as performant as possible compared to the WT controller, as both faster mHiL and slower WT closed loop dynamics reduce the distortion. Regardless of this, knowledge of the distortion allows it to be taken into account when evaluating mHiL experiments.

Conclusion
The analysis carried out systematically shows the distortion of the dynamic behavior of a controlled WT on a NTB. Depending on the load case and parameterization, strong deviations of about 22% in power output were determined. Especially due to the nonlinearities in the system, the error is amplified. The underlying distortion is identified as frequency dependent in simulation and subsequently investigated using system theory. Here, gain amplifications of up to 5.17 dB were identified in load case relevant frequency bands. Partially, the distortion results directly from the tracking behavior of the mHiL controlled NTB. However, it was shown that the entire control loop including the reference WT and its controller influences the distortion, with effects that only occur in the interaction of the full system. Furthermore, the distortion occurs independent from the specific output, the only decisive factor is whether the forward path depends on the mHiL controller and the NTB. Finally, the parameter study depicts the dependence of the distortion on the different system parameters. It confirms, that the mHiL control loop requires to be as performant as possible.
With the approach presented, the quality of WT controller tests on NTB can be evaluated and linearly approximated. The bias due to the mHiL concept can be determined in isolation and thus taken into account in the evaluation of the results. The presented analysis framework may also be applied to different mHiL systems, with the prerequisite that system knowledge of the DUT is available. As this study is based on a simple mHiL controller, the analysis might be significantly more complex for higher mHiL control methods. If knowledge of the DUT is not available, the tracking behavior of the mHiL controlled NTB alone is an indicator of the distortion. All in all, the results illustrate that controller tests on mHiL test benches must expect distortions that only occur in the combination of the mHiL controlled test bench and the DUT.
Funding The authors thank the Ministry of Economic Affairs, Industry, Climate Protection and Energy of the State of North Rhine-K Westphalia, Germany, for the financial support granted. They also thank their project partners for the support, which contributed to this project.
Funding Open Access funding enabled and organized by Projekt DEAL.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4. 0/.