OpenFAST / openfast

Main repository for the NREL-supported OpenFAST whole-turbine and FAST.Farm wind farm simulation codes.
http://openfast.readthedocs.io
Apache License 2.0
654 stars 447 forks source link

Confusion about linearized state-space model #1632

Closed Bing008 closed 9 months ago

Bing008 commented 1 year ago

Dear all, I'm working on the wind turbine model linearization now. I have read the theoretical paper and some posted questions in the discussion forum about the linearization process of OpenFAST. But I still have a major confusion about how to set the initial state and input of the linear state space model. Below is the main setting when I perform the linearization (NREL 5.0 MW Baseline Wind Turbine) : -I used OpenFAST with the input file attached below to linearize the NREL 5MW Onshore turbine in Region 2 about an 6 m/s wind speed. -The linearization options CalcSteady is true; TrimCase is 2; TrimTol is 0.0001; TrimGain is 100; NLinTimes is 36. -In the ServoDyn input file, the following sets were used: PCMode=0; VSContrl=1; VS_RtTq=43093.55; VS_RtGnSp=VS_Rgn2K=VS_Rgn2K=999e-9. -2 DOFs were activated: GenDOF, and TwFADOF1 (first fore-aft mode); that is a total of 4 continuous states.

The linearization was performed successfully at 36 azimuth steps using GenTq trimming. The MBC transformation was performed by fx_mbc3 script afterward for the 36 output linearization file, and the resulting averaged A, B, C, D matrices for the state space model.

A Simulink model was then built with the state-space matrices and the response of the system was simulated. The simulink model is shown in the figure below. There is no input or state in the rotation frame, so inverse MBC transition is not included in the model. The output was observed by executing the simulation. image

The encountered issues are the following: (1) The output of the state-space model is not steady state. Fig. (1) shows the result for 100s calculation. The rotor speed and generator speed slowly decrease over time. The TTDspFA is the same. Fig. (2) shows the result for 10000s calculation. The rotor speed and generator speed decrease more. The TTDspFA is also. But after 800s, the TTDspFA is periodic steady. I am not sure whether these results are correct. image image

(2) I expect the output to be steady or periodically steady at the start of the calculation. So I use the initial states and inputs from the linear output file of OpenFAST at first azimuth (i.e. u_op and x_op data at first azimuth). Is this correct? Or should I use other initial states and inputs?

I’m sorry for the lengthy post, I wanted to make sure that everything is clear. I appreciate the help and am extremely thankful.

Bing008 commented 1 year ago

(3) There is another result that also bothers me. I noticed that the GenTq in outputfile (*.out) for the case mentioned above. But the GenTq is 0 in every time step. I am very confused why this value is always zero. Under the 6 m/s wind speed and 0 pitch angle condition. The GenTq should be a value greater than zero to be able to stabilize.

By the way, I am not new to OpenFAST but new to the linearization function. So I'm sorry I might be asking something that lacks common sense.

jjonkman commented 1 year ago

Dear @Bing008,

Just a few comments:

When you linearize a model with GenDOF enabled, you should remove the generator azimuth state from the linear model before use. (In your case, your 4 state model will become 3 states.) This has been discussed several times on our forum, e.g., see: https://forums.nrel.gov/t/fast-linearization-v7/1680.

Please also note that the states, inputs, and outputs of the linearized model represent perturbations about the operating point (op). That is;

dxdot = A dx + B du dy = C dx + D du

To compare linear and nonlinear solutions, you must add the perturbation back, i.e.: x = x_op + dx u = u_up + du y = y_op + dy

If your inputs (du) and initial states (dx) to your linear model are both zero, then the response of your linear model (dxdot, dy) will also be zero.

Best regards,

ietqlw commented 9 months ago

Dear @jjonkman,

I found a confusing phenomenon during OpenFAST linearization.

When I enable both Variable speed generator DOF and Drivetrain rotational-flexibility DOF, the sensitity of generator torque to "ED Second time derivative of Variable speed generator DOF (internal DOF index = DOF_GeAz), rad/s" is -1.930157185050000e-05.

When I enable Variable speed generator DOF with Drivetrain rotational-flexibility DOF disabled, the sensitity of generator torque to "ED Second time derivative of Variable speed generator DOF (internal DOF index = DOF_GeAz), rad/s" is -2.219550724349999e-06.

It is easy to understand the value of -2.219550724349999e-06 = gearbox ratio/drivetrain inertia. But The value of -1.930157185050000e-05 confused me a lot.

I used to think whether or not enable Drivetrain rotational-flexibility DOF would not largely affect the sensitities. I performed the simulation under different wind speeds, and found that the value of -1.930157185050000e-05 did not vary with wind speeds. Please help me with the confusion.

Best regards,

jjonkman commented 9 months ago

Dear @ietqlw,

When the drivetrain DOF is enabled, the element of the input (B) matrix relating generator acceleration relative to the low-speed shaft (that is, ED Second time derivative of Variable speed generator DOF) and generator torque relative to the high-speed shaft should equal -GBRatio/(GenInerGBRatio^2) = -1/(GenInerGBRatio), where GenIner*GBRatio^2 is the generator inertia expressed relative to the low-speed shaft.

Best regards

ietqlw commented 9 months ago

Dear @jjonkman,

Your answer is very clear. Thank you very much for your kind reply.

Best regards,

ietqlw commented 3 months ago

Dear @ietqlw,

When the drivetrain DOF is enabled, the element of the input (B) matrix relating generator acceleration relative to the low-speed shaft (that is, ED Second time derivative of Variable speed generator DOF) and generator torque relative to the high-speed shaft should equal -GBRatio/(GenInerGBRatio^2) = -1/(GenInerGBRatio), where GenIner*GBRatio^2 is the generator inertia expressed relative to the low-speed shaft.

Best regards

Dear @jjonkman,

Thank you very much for your patient answer. Could you please tell me the case when the drivetrain DOF is disabled? I used to think that the element of the input (B) matrix relating generator acceleration relative to the low-speed shaft and generator torque relative to the high-speed shaft should equal GBRatio/(GenIner_GBRatio^2+RotIner) . As for NREL 5MW wind turbine, the value should be -2.219550724349999e-06 whether other flexible DOFs are enabled or not. However, the linearization result shows that the value will be different from-2.219550724349999e-06 if I enable flexible DOFs such as FlapDOF1. Could you please help me analyze the reason?

Best regards,

liangwen qi

jjonkman commented 3 months ago

Dear @ietqlw,

I agree with your formulation if the rotor and drivetrain are completely rigid. However, if the rotor is flexible, then a step change in generator torque will result in deformation of the blades in addition to a change in generator acceleration, and this effect will be represented within the linearized matrices generated by OpenFAST.

Best regards,