Dear @Jason.Jonkman,
I’m trying to linearize the NREL 5MW onshore wind turbine in Region 2 for control purpose using OpenFast v3.0.0. I want to verify if everything is well done before going to the control part.
For the linearization, I used the following input parameters:
Linearize = True, CalcSteady = True, YCMode = 0 and PCMode = 0.
TrimCase = 2 as suggested in Fast User’s Guide for Region 2.
TrimTol = 0.005 and TrimGain = 1000.
VSContrl = 0 as you have suggested in the following post Learizing Baseline 5MW Wind Turbine with FAST - #28 by Jason.Jonkman .
GenTiStr = True and TimGenOn > TMax as you have suggested in this post Linearization OpenFAST Region 2 - #2 by Jason.Jonkman .
WindType = 1 and HWindSpeed = {4, 6, 9} m/s
RotSpeed: You mentioned in the Fast User’s Guide that “During Region 2 trim (TrimCase = 2), the solution computation may also become unstable if your desired rotor speed is below the rotor speed that results in the maximum power coefficient at a given wind speed and rotor collective blade pitch angle. In this case, the only way to obtain a successful trim solution is to increase your desired rotor speed condition“. Therefore, I deduced the rotor speed Omega_Opt (rad/s) that corresponds to the maximum power coefficient (by considering a tip-speed ratio TSR_Opt = 7.55, a rotor radiusR=63 mand the chosen mean wind speedv = 4, 6 or 9 m/s) from the following formula TSR_Opt = Omega_Opt * R / v. Afterwards, I have chosen a desired rotor speed RotSpeed (rpm) = (Omega_Opt * 60/(2 Pi)) + 0.5.
Using the above parameters, I obtained the results in the following folder Linearization - Google Drive . I included for each chosen wind speed, the OpenFast input and output files, with plots of the outputs: RotSpeed, Torque and Power of the linearized model.
Next, in order to validate the linearized model, I used Simulink (with the following parameters for the NL model: PCMode = 4, VSContrl = 4, GenTiStr = True, TimGenOn = 0,GenTiStp = True, TimGenOf = TMax + 50) to compare the OpenLoop Linear vs NL models (Simulink Figures below) response, using a perturbation on the generator torque that begins after 20 s with different amplitudes as follows: dTg = {0, 50, 100, 150, 200, 1000} N.mand wind disturbance dv = 0. The results corresponding to each wind speed are included in the same google drive in the folder named “Lin_vs_NL“.
I have the following questions:
- Can you please confirm the input parameters being used?
- Is the method used to compute
RotSpeedcorrect ? If not, how to choose the value of RotSpeed in Region 2 ?
- What is a good disturbance amplitude
dTg for the generator torque that can be used to compare the Linear vs NL model responses for validation of the linearized model? And when should it be applied (I used 20s)? Using a value dTg = 0returns approximately the same outputs, dTg = {50, 100, 150, 200}returns results with a drop in the outputs of the linear model but it seems to be still acceptable, but using dTg = 1000 Nmleads a large drop in the outputs of the linear model.
- Is the drop observed in the linear model outputs, especially for the rotor speed, normal?
Thank you in advance.
Regards.
Dear @Jason.Jonkman,
Thank you for your responses.
Regarding your responses 1 and 2, I increased TrimGain to 4000 instead of 1000, and I removed the + 0.5 rpm from the equation used to compute RotSpeed.
Concerning your response 3, I’m using the following procedure to obtain the linearized LTI model:
-
PLTV model is obtained by simulating the nonlinear model at the given steady wind speed for multiple azimuth angles (36).
-
PLTV model is transformed into a weakly PLTV model using the MBC transformation to transform states, inputs and outputs into a nonrotating frame.
-
LTI system is obtained by azimuth-averaging the weakly PLTV system, then eliminating the generator azimuth state.
However, I realized that in the simulation, I was adding the operating point to the outputs corresponding to the azimuth average using a lookup table having as input the rotor position, instead of using the mean value of the operating point of each output. Using the mean (over 36 azimuth angles) of the operating point, I obtained the following rotor speed output for a mean wind speed HWindSpeed = 6 m/s and without any input perturbations (dTg = 0, dv = 0):
Can I consider that this LTI response matches that of the NL model response? Or they should match perfectly?
Best Regards.
Dear @Bilal.Tout,
Thanks for the update.
Regarding (1) and (2), are you getting better convergence of rotor speed when you compute the steady-state solution?
Regarding (3), with zero input perturbations, the response of the LTI model should be zero for the output perturbations. In this case, the linearized solution should match the steady-state solution. So, I don’t understand why the linear and nonlinear models are not matching because the steady-state solution should be the converged nonlinear solution.
Best regards,
Dear @Jason.Jonkman,
I tried increasing TrimGain to 4000, 5000 and even 10000, but this did not yield better results in terms of convergence to a steady-state operating point.
Consequently, I maintained TrimGain = 1000, but I decreased TrimTol from 0.005 to 0.0001 for a mean wind speed 6 m/s, so I obtained the results I added to the drive link Linearization - Google Drive under the folder TrimTol_0.0001.
The output RotSpeed, Torque and Power obtained from the linearization process are as follows:
Question 1: Can I consider now that the convergence to the steady state solution is well achieved?
Next I compared linear and NL model responses with generator torque perturbations dTg = {0, 50, 100, 1000} N.m introduced using a step block in Simulink with a final value time of 200s(time when the perturbation begins).
With zero input perturbation (dTg = 0), I obtained the following results of Rotor speed and Power:
Question 2: Can I consider that the linear and NL responses match now for zero input perturbations?
Finally, using a non zero perturbation of the generator torque (dTg = {50, 100, 1000} N.m), results in the Drive link Linearization - Google Drive , returns results with a drop in the outputs of the linear model which increases as the perturbation amplitude increases. For instance, results when dTg = 100 N.m are the following:
Question 3: Is this drop in output normal, since we are moving away from the linearization operating point? Or is there a problem that leads to this drop ?
Best Regards.
Dear @Bilal.Tout,
Regarding (1), does increasing TrimGain result in faster convergence? Regardless, your results with a smaller TrimTol look more converged.
Regarding (2), what is causing the oscillation in rotor speed and power in the linear model without input perturbations? I would not expect this after azimuth-averaging.
Regarding (3), it looks like the linear and nonlinear models agree well soon after the 100 Nm perturbation, but then the linear solution diverges and I’m not sure why. Do the linear and nonlinear models agree better with a smaller input perturbation?
Best regards,
Dear @Jason.Jonkman,
Regarding (1), using TrimTol = 0.0001, increasing TrimGain (> 1000) yields faster convergence, especially for high wind speeds (6, 9). However, significant increases in TrimGain (5000, 10000 for wind speeds 4, 6 respectively) yield unstable outputs. I included the corresponding results in the folder “Variable_TrimGain“ Linearization - Google Drive .
Regarding (2), oscillations in the rotor speed and power outputs happen because of the use of look up tables in the linear model in Simulink based on the rotor position (azimuth angle) to add the corresponding output operating point. If I remove these look up tables and use instead the “mean of the operating point over the 36 azimuth angle”, I obtained the following output rotor speed and power (mean wind speed v_m = 4 and perturbation dTg = 0):
Question 1: Do these results correspond to the expected behavior?
Regarding (3), first I compared linear and NL models using smaller input perturbation (dTg = 1 Nm), I obtained the following results:
It can be observed that even if the difference btw the linear and the NL outputs is smaller for small input perturbations, however, there is still a slow divergence of the linear outputs from the NL responses.
This divergence is similar to a ramp (integrator behavior of the linearized system when step input is used). Therefore, I tested using an impulse input perturbation instead of the step input. When applying an impulse perturbation of amplitude dTg = 1000 N.m I obtained the following rotor speed and power outputs:
Now, it can be observed that results of the open-loop linear and NL models match and the divergence in the outputs of the linear model is eliminated.
Question 2: Can I now consider that the resulting linear model is valid?
Thank you very much for your help.
Best Regards.
Dear @Bilal.Tout,
Regarding TrimGain, that all makes sense.
Regarding the oscillations in rotor speed, can you clarify what the source of this oscillation is in the nonlinear model? From your steady-state trim solution, it looks like the rotor speed is tending towards a fixed mean value, which I would expect and is what you would obtain after azimuth-averaging.
I agree that an input perturbation every time step is equivalent to an input step, so if your nonlinear model uses an impulse, you should use the equivalent in the linear model.
After the impulse, I’m seeing a lot of oscillation in the output of the linear model that damps out quickly, but I don’t see the same in the nonlinear model, which is odd. But again, I’m not sure why where the oscillation in the nonlinear model is coming from.
Best regards,
Dear @Jason.Jonkman,
Regarding step and impulse inputs, I always compare linear and nonlinear models using the same inputs (of course, taking into account y = yop + dy for the nonlinear model, and dy for the linear model).
Regarding the oscillations in the rotor speed in the NL model, if I zoom in as shown in the following figure:
We can see that the observed oscillations in the rotor speed output of the NL model are actually a periodic behavior that repeats three times per rotor revolution (every 13.1 seconds for a rotor speed of 4.58 rpm).
Doesn’t the NL model exhibit periodic behavior even with a uniform wind (4 m/s in my case) and no imposed disturbance due to the dynamics of the rotating blades? Isn’t that the reason of the oscillations that appear in the output rotor speed of the NL model?
Best regards.
Dear @Bilal.Tout,
For the NREL 5-MW baseline turbine, or other rotors with 3 or more blades, I would expect periodicity in the blade response under gravity, shear, and inflow skew, but I would expect these would mostly average out in the fixed frame for outputs like the rotor speed. Is this coming from shear or skew in the inflow? Does the 3P effect go away if you eliminate shear or skew?
Best regards,
Dear @Jason.Jonkman,
Sorry for bothering you, but I got a little bit confused.
Does this expectation
apply even if MBC is not used for the NL model output while comparing it to the linear model outputs? Is the rotor speed considered to be in the fixed frame?
Regards.
Dear @Bilal.Tout,
I’m not sure I fully understand your response. I presume you are not applying MBC to the nonlinear model. And MBC only applies to variables unique to each blade; MBC does not transform the rotor speed variable.
Even though the rotor is rotating, I would consider the rotor speed itself a variable that is expressed in the fixed frame of reference.
Best regards,
Dear @Jason.Jonkman,
Thank you for your fast answer.
If I have understood correctly, even if the MBC transformation is applied to the outputs of the nonlinear model, this does not affect the rotor speed, since the latter is considered to be in the fixed frame of reference. For this reason, you would expect the rotor speed to show no oscillations if I eliminate shear or skew.
Can you please tell me which variables in the input files I should change to verify that shear and skew are eliminated?
Regards.
Dear @Bilal.Tout,
Shear would be specified in the InflowWind input file. Presumably you are using WindType = 1 in InflowWind, in which case you should set PLExp = 0 to eliminate shear.
Skew can result from wind direction (PropagationDir in InflowWind) relative to the nacelle-yaw angle (NacYaw in ElastoDyn) or from shaft tilt (ShftTilt in ElastoDyn) and tower deflection. The latter (tower deflection) effect may be negligible, but you could set PropagationDir = NacYaw = ShftTilt = 0deg and keep the nacelle from yawing with YawDOF = FALSE in ElastoDyn.
Best regards
Dear @Jason.Jonkman,
I modified the parameters as you suggested to eliminate shear and skew (PLExp = 0, PropagationDir = NacYaw = ShftTilt = 0deg, YawDOF = FALSE) and I also set Gravity = 0, but there is still a 3P component in RotSpeed as as follows:
I then tried setting the AeroDyn parameter TwrPotent = 0 instead of 1 while keeping the values you suggested to eliminate shear and skew (PLExp = 0, PropagationDir = NacYaw = ShftTilt = 0deg, YawDOF = FALSE) and gravity = 0, which gave me the following RotSpeed result:
If I use Gravity = 9.80665 and ShftTilt = -5 (default values for NREL 5MW onshore), while keeping TwrPotent = 0, I get the following result:
It can be observed that the amplitudes of the oscillations decrease significantly when TwrPotent = 0, and the 3P component almost disappears if TwrPotent = 0 with the parameters you suggested for shear and skew.
Does these results match what you expected for the RotSpeed of the NL model?
Best Regards.
Dear @Bilal.Tout,
I’m glad you were able to determine that the 3P excitation of the rotor speed was mainly driven by the upwind tower influence. That makes sense.
I presume this is not captured by your linear model, hence the difference.
Best regards,
Dear @Jason.Jonkman ,
Thank you for your valuable help.
Is it normal that the linear model did not catch this behavior (upwind tower influence) ?
Regards.
Dear @Bilal.Tout,
The effect of tower potential flow is likely quite localized, so, to resolve it in linearization, you’d likely need a fine resolution of azimuth steps. Regardless, azimuth averaging, would average out the effect anyway.
Best regards,
Dear @Jason.Jonkman,
I am planning to linearize the NREL 5 MW offshore wind turbine mounted on spar and semisubmersible platforms. First, I want to start with simple cases, such as linearizing in Region 2 with only GenDOF = True.
I am planning to design a gain-scheduled controller, which requires linearizing the model at various wind speeds. Based on the OpenFAST documentation, my initial approach is to set CalcSteady=True and TrimCase=2. I also need to establish initial values for the rotor speed at each operating point. For that, I found at NREL 5-MW reference turbine - #4 by Jason.Jonkman a table with the reference values used in Figure 9-1 from the NREL 5 MW report.
However, I also found that due to changes over time in the AeroDyn module, the values shown in the aforementioned table differ slightly from those obtained with more recent versions of AeroDyn. This issue is discussed here.
So, is it possible to use the data from WindSpeedRelationships.txt (2.27 KB) to perform a linearization analysis, or is it not precise enough to create a controller based on it?
Thanks in advance.
Best regards,
Ignacio
Dear @Ignacio.Lopez,
The operating points from the original NREL 5-MW specifications report are likely quite representative of those that would be obtained with newer versions of OpenFAST, and these are likely sufficient for controller design, but I suppose that depends on the accuracy and specificity you need. You could always recompute the operating points by running separate time-domain simulations at each wind speed you want to linearize about and see where the responses with the controller enabled settle out. In addition to the version of FAST / OpenFAST being used, enabling/disabling structural degrees of freedom (e.g., with and without rotor flexibility) would also impact the operating points.
Best regards,