FAST8 Linearization

Hello Everybody,

It’s my first time to deal with FAST as a part of my master thesis so, May be I need time for well understanding.

I did the linearization process for NREL 5MW baseline onshore turbine using FAST8 but I need to make some modification on the linearized model.

FAST8 gives State space model in this form X’=AX+Bu Y=CX+DU, I did a modification to be in this form X’= AX+BU+BdU Y=CX+DU+DdU as in FAST 7 ( Speration between the disturbance and input ). I did other modification, the FAST linearized model which I got is only for one blade (1) input/ output parameters and I modified it for the 3 blades. or is there any option I can use to get the parameters for the 3 blades direct?
I attached here the two models ( FAST linearization model and my modified model ) in a word file Could you please check if my modified model is correct or not?

For the operating point in FAST8:-
1- How Can I modify the azimuth angel to linearize around it?
2- for the Horizontal wind speed disturbance, I modified it from InflowWind v3.01.* INPUT FILE but If I want to obain a wind speed as a ramp function changing with time what should I do?

After I got the linearized model, I checked it’ s stability using this matlab code (Just step input)
C=eye(size(A))
D=zeros(10,3)
sys=ss(A,Bd,C,D)
figure(1)
pzmap(sys)
grid on
axis equale
figure(2)
step(sys(1,1))

the model was unstable but after I adjust the number of linearization process NLinTimes and the intial value of the azimuth angle, the model becomes sometimes stable and sometimes unstable. So what should I do to get a stable linearized model from the first time?

Regards,
Taha
FAST.docx (19.4 KB)

Dear Taha,

A few comments:

  • It should be easy to separate “B” from a FAST v8 linearization process into separate input (B) and disturbance input (Bd) matrices by simply partitioning the “B” matrix output.
  • In your attachment you seem to want to separate the wind disturbance separately for each blade. I’m not sure why you’d want to do this and I don’t agree with your solution, as the wind disturbance that is part of the FAST v8 linearization process provides a uniform disturbance across the complete rotor disk (when the vertical shear is nonzero).
  • We typically recommend linearizing the FAST model at a sufficient number of azimuth steps around the rotor revolution. This is discussed in the following forum topic: Campbell diagram for 5MW turbine rotor (especially my posts dated Sep 22, 2016 and Dec 12, 2016).
  • It is easy to specify wind input to FAST v8 with ramps or step changes by using “uniform wind” files. See the documentation supplied with the InflowWind module for instructions: wind.nrel.gov/nwtc/docs/InflowWind_Manual.pdf. In older versions of FAST, the “uniform wind” files were called “hub-height” wind files and were entered in the AeroDyn input file instead of an InflowWind input file.

I hope that helps.

Best regards,

Dear Jason,

Thanks so much for your reply,
I want to separate the disturbance because I will use Disturbance accommodation control( DAC ) with the linearized model.
I have a question regarding to the measurement output for the blade root moments RootMxb1, RootMyb1, RootMzb. I need to measure them for the 3 blades, so it will be as I did in the word file for C and D matrices ( the same output for blade 2 and 3 as for blade 1 ) or not?

when I do the linearization I find this warning:-

FAST_Solution:FAST_AdvanceStates:ED_ABM4:ED_CalcContStateDeriv:SetCoordSy:Small angle assumption
violated in SUBROUTINE SmllRotTrans() due to a large blade deflection (ElastoDyn SetCoordSy). The
solution may be inaccurate. Simulation continuing, but future warnings from SmllRotTrans() will
be suppressed.

So please what is this warning meant?

Regards
Taha

Dear Taha,

As I said in my prior post, there should be no problem separating the “B” and “Bd” matrices via partitioning of the “B” matrix output through the FAST linearization process; however, I don’t agree with how you’ve modified the elements of the matrix to separate out the terms for each blade. Again, I don’t suggest modifying the elements of the matrix by hand; instead, you can include the blade-root moment outputs distinctly for each blade by adding them to the ElastoDyn input file before running the linearization analysis.

Warnings regarding a “small angle approximation violation,” warnings regarding “supersonic blades,” a simulation crash, or very large deflections that occur in the time series are good signs of a numerical instability. Without knowing more about your simulation settings, it’s hard to know that what the problem is. Please use “Search…” in the upper right of the forum to search for “small angle assumption” to see how we’ve solved similar problems in the past.

Best regards,

Dear Jason,
Thank you very much,

The linearized model is working well now, I solved the warning and I added the outputs for the other 2 blades in the ElastoDyn input file but is there any option also to add or remove the inputs so, I can use only the required inputs which I need.

I read about the interface between FAST and Simulink and I tried the 2 examples associated with FAST and it works good. but I want to use my linearized model as an input file for the simulink so, Please could you give more details How can I do this. I read in FAST 7 Technical report that (The ADAMS preprocessor and the linearization capability are not available in the FAST S-Function ), I don’t know How is it in FAST 8?

I have other question but not related to FAST, I don’t know if I can find help here or not.

It’s related to the lead-lag equation of motion for wind turbine blade ( Hinge-Spring model ), I derived the equation using the same process as in Wind Turbine Engineering Design book (M.Egglestopn & S.Stoddard ), After I got the linear solution, I compared it with the non linear solution in Simulink, I find that the frequency and the amplitude is approximately the same but the linear solution gives me pure periodic sine wave where the nonlinear solution not, I derived the equation again for the effect of gravity forces, I found the same problem again, So can you help me, How can I solve this problem or give me a document related to it.

Regards,
Taha Fouda

Dear Taha,

In FAST v8, it is not possible to choose only specific inputs to include in the linearized model. The only options are LinInputs = 0 for no inputs, LinInputs = 1 for the standard inputs, and LinInputs = 2 for all of the module-level inputs. Of course, you can simply ignore the columns in the B and D matrices that you don’t need.

I’m not really sure I understand your other questions.

Best regards,

Dear Jason,

Thank you. Please could you tell me How can I get the nonlinear equation of the linear model so I can do nonlinear Simulation and compare it with the linear Simulation, I am using FAST 8?

Regards,
Taha

Dear Taha,

I’m not really sure I understand your question, but the nonlinear equations are solved within FAST, so, you can always run FAST and compare the response against the linear solution.

Best regards,

Dear Jason,

Yes. this is that I want to do but I don’t know the procedure itself for doing this. I read FAST 8 guide and I am not able to find details about nonlinear simulation and comparing the response with the linear solution. So please could you tell me the steps of this procedure or more details?

I did the interface between FAST and Simulink and I tried the two samples attached with FAST. I have this error when I run Openloop.mdl:-

Invalid setting in ‘OpenLoop/FAST Nonlinear Wind Turbine/S-Function’ for parameter ‘FAST_Test18.fst’.
Error evaluating parameter ‘FAST_Test18.fst’ in ‘OpenLoop/FAST Nonlinear Wind Turbine/S-Function’
Undefined variable “FAST_Test18” or class “FAST_Test18.fst”

Regards,
Taha

Dear Taha,

To compare the nonlinear response with the linear response, the key thing to keep in mind is that the linear model is defined in terms of perturbations about the operating point e.g. y = y_op + dy for system outputs, so, you should either add the operating point value (y_op) to the output of the linear model or subtract the operating point value from the output of the nonlinear for comparison. See our TORQUE paper on the FAST v8 linearization process for more information: nrel.gov/docs/fy17osti/67015.pdf.

Recently another user on our forum posted some results of their comparison between the linear and nonlinear solution–you can use that topic for additional guidance: PROBLEMS TO VALIDATE LINEARIZATION WITH TORQUE CONTROL.

I’m sorry, but I’m not familiar with that error. Do you have a FAST primary input file named, “FAST_Test18.fst”?

Best regards,

Dear jason,

Thank you, I am trying to use the nonlinear model included with fast in openloop.mdl and compare the response with the linear model, I did it as shown here.

but I need to make some modification.

1- First I did modification for openloop.m to be only for test18.fst as shown
CertTest_Dir = ‘…..\CertTest’;

CertTest_TMax=[20, 20, 20, 70, 30, …
35, 70, 20, 40, 25, …
20, 20, 40, 0, 20, …
20, 70, 60, 60, 60, …
60, 60, 60, 60, 60, …
20 ];

FAST_InputFileName = '..\..\CertTest\Test18.fst';
TMax               = 60;

sim('OpenLoop.mdl',[0,TMax]); 

Is this right or not? .

2- after I run openloop.m in matlab, it didn’t show the last message about the time of simulation as normal is there a problem for this?

Run_OpenLoop


FAST (v8.16.00a-bjj, 27-Jul-2016)

Copyright (C) 2016 National Renewable Energy Laboratory

This program comes with ABSOLUTELY NO WARRANTY. See the “license.txt” file distributed with this
software for details.


Running FAST (v8.16.00a-bjj, 27-Jul-2016), compiled as a DLL S-Function for Simulink as a 64-bit
application using single precision
linked with NWTC Subroutine Library (v2.09.00, 23-Jul-2016)

Heading of the FAST input file:
FAST Certification Test #18: NREL 5.0 MW Baseline Wind Turbine (Onshore)

Running ElastoDyn (v1.04.00a-bjj, 26-Jul-2016).

Running AeroDyn (v15.03.00, 27-Jul-2016).

Running AirfoilInfo (v1.01.00a-bjj, 5-Apr-2016).

Running BEM (v1.02.00, 29-Jun-2016).

Running InflowWind (v3.03.00, 26-Jul-2016).
Opening InflowWind input file:
…..\CertTest\5MW_Baseline/NRELOffshrBsline5MW_InflowWind_12mps.dat

Running ServoDyn (v1.06.00a-bjj, 26-Jul-2016).

FAST_InitializeAll:SrvD_Init:ValidatePrimaryData:Yaw angle and rate are not commanded from Simulink model.
ValidatePrimaryData:Generator torque and power are not commanded from Simulink model.
ValidatePrimaryData:HSS brake is not commanded from Simulink model.
Timestep: 0 of 60 seconds.

FAST completed.

3- For the nonlinear S-Function. I need to use only the pitch controller and torque controller for the simulation. when I removed the other two inputs ( Yaw and High speed shaft ), I got an error that the Mux output (5 outputs) dosen’t match with S-function input (8 inputs). I need to go inside the S-function and remove the same inputs ( yaw and High speed shaft ). How can I do this?

Dear Taha,

I have not used the FAST-Simulink interface in years and I’m not an expert in the use of the sim function or what information is displayed to the screen; perhaps someone else on this forum can answer your first two questions. But if your OpenLoop model generates the same results as the same simulation run with the standalone FAST executable than you can be sure you’re running the Simulink model correctly.

Regarding your third question, there is no reason to remove the inputs you don’t need. Simply keep the FAST S-Function unchanged and use the same yaw and brake inputs in Simulink that the OpenLoop model uses (i.e. zeros); these inputs will be ignored by the FAST model unless you set YCMode = 4 or HSSBrMode = 4 in the ServoDyn primary input file.

I hope that helps.

Best regards,

Dear Jason,

Thank you,
I did the comparison between the linear and the nonlinear response but there is a big difference between the two results. this figure show the step response of generator speed with pitch angel of 2 degree. I don’t know why with linear response the speed go to minus and then settle at zero? I attached here a word file include the primary inputs I used for the linearization, Please could you check it If I am right or wrong. I linearized the model at 12 m/s Horizontal wind speed and 3.83 initial pitch angel and rotor speed 12.1 rpm.

Regards
Taha
Linearization.docx (20.5 KB)

Dear Taha,

I’m not sure I understand enough about what you are doing to comment. I’m assuming the yellow curve is generated using the nonlinear FAST model coupled to Simulink, where you force a step response? How do you generate the pink curve?

Best regards,

Dear Jason,

Yes, the yellow curve is the nonlinear response. the only input for the linear and the nonlinear model is the pitch angel. I step both by pitch angel of 2 degree. the comparison is done as shown in the second figure and the step input for the nonlinear Fast model is shown in the first figure.
the pink curve is the first output from the linear model ( Generator speed ).

Regards,
Taha


Dear Taha,

A few more comments/questions.

How are the A, B, C, and D matrices derived? You have blade degrees of freedom (DOFs) enabled in the rotating frame, but did you only linearize once? Did you apply the multi-blade coordinate (MBC) transformation? (If not, you’ll need to; alternatively, you can disable the blade DOFs in both the linear and nonlinear models.)

To compare the linear and nonlinear models, you’ll have to either subtract the operating point (OP) from the nonlinear model or add the OP to the linear model.

Best regards,

Dear Jason,
I derived the A,B,C and D matrix using FAST Simulation. you can take a look on the attached word file. it includes the FAST primary input files which I used for linearization and please let me know if I linearized right or wrong. I linearized 3 times. I didn’t apply the multi-blade coordinate (MBC) transformation. So please could you tell me How can I do that?

regards
Taha
Linearization.docx (20.5 KB)

Dear Taha,

The FAST primary input file you attached does not have linearization enabled, so, this doesn’t seem to be the correct file.

Regardless, if you have states in the rotating frame, I would normally expect that you’d linearize a sizeable number of times (e.g. 36 times, linearizing once every 10 degrees in azimuth angle, to get the full 360-degree periodic model). Then, you should apply the MBC tool (nwtc.nrel.gov/MBC) to transform the rotating states into the fixed frame and azimuth-average the transformed linear model to get linear time-invariant (LTI) matrices that you want to integrate within MATLAB Simulink. See the documentation supplied with MBC for more information. If you don’t have states in the rotating frame (i.e. by disabling the blade degrees of freedom), then you wouldn’t need to apply MBC.

Best regards,

Dear jason,

sorry, For 36 times, linearizing once every 10 degrees in azimuth angle, to get the full 360-degree periodic model
it should be like this:-

True Linearize - Linearization analysis (flag)
36 NLinTimes - Number of times to linearize (-) [>=1] [unused if Linearize=False]
10,20,30,40,…360 LinTimes - List of times at which to linearize (s) [1 to NLinTimes] [unused if Linearize=False]

regards
Taha

Dear Taha,

Your example would be true if your rotor was spinning at one revolution per 360 seconds, but you should scale LinTimes by the actual rotor speed you are linearizing about.

Best regards,