FAST8 Linearization

This forum if for discussing controls. Questions about how to implement controls in FAST are more appropriate to the CAE Tools forum.

Moderator: Bonnie.Jonkman

Taha.Fouda
Posts: 44
Joined: Thu Jun 22, 2017 1:51 am
Organization: DLR Institiue of Flight Systems
Location: Germany

FAST8 Linearization

Postby Taha.Fouda » Fri Jun 23, 2017 11:54 am

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
Attachments
FAST.docx
(19.38 KiB) Downloaded 217 times

Jason.Jonkman
Posts: 4223
Joined: Thu Nov 03, 2005 4:38 pm
Location: Boulder, CO
Contact:

Re: FAST8 Linearization

Postby Jason.Jonkman » Sat Jun 24, 2017 6:15 am

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: viewtopic.php?f=3&t=1056 (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: https://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,
Jason Jonkman, Ph.D.
Senior Engineer | National Wind Technology Center (NWTC)

National Renewable Energy Laboratory (NREL)
15013 Denver West Parkway | Golden, CO 80401
+1 (303) 384 – 7026 | Fax: +1 (303) 384 – 6901
nwtc.nrel.gov

Taha.Fouda
Posts: 44
Joined: Thu Jun 22, 2017 1:51 am
Organization: DLR Institiue of Flight Systems
Location: Germany

Re: FAST8 Linearization

Postby Taha.Fouda » Sat Jun 24, 2017 8:57 pm

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

Jason.Jonkman
Posts: 4223
Joined: Thu Nov 03, 2005 4:38 pm
Location: Boulder, CO
Contact:

Re: FAST8 Linearization

Postby Jason.Jonkman » Mon Jun 26, 2017 12:55 pm

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,
Jason Jonkman, Ph.D.
Senior Engineer | National Wind Technology Center (NWTC)

National Renewable Energy Laboratory (NREL)
15013 Denver West Parkway | Golden, CO 80401
+1 (303) 384 – 7026 | Fax: +1 (303) 384 – 6901
nwtc.nrel.gov

Taha.Fouda
Posts: 44
Joined: Thu Jun 22, 2017 1:51 am
Organization: DLR Institiue of Flight Systems
Location: Germany

Re: FAST8 Linearization

Postby Taha.Fouda » Thu Jun 29, 2017 2:01 pm

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

Jason.Jonkman
Posts: 4223
Joined: Thu Nov 03, 2005 4:38 pm
Location: Boulder, CO
Contact:

Re: FAST8 Linearization

Postby Jason.Jonkman » Thu Jun 29, 2017 5:02 pm

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,
Jason Jonkman, Ph.D.
Senior Engineer | National Wind Technology Center (NWTC)

National Renewable Energy Laboratory (NREL)
15013 Denver West Parkway | Golden, CO 80401
+1 (303) 384 – 7026 | Fax: +1 (303) 384 – 6901
nwtc.nrel.gov

Taha.Fouda
Posts: 44
Joined: Thu Jun 22, 2017 1:51 am
Organization: DLR Institiue of Flight Systems
Location: Germany

Re: FAST8 Linearization

Postby Taha.Fouda » Thu Jul 06, 2017 1:41 am

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

Jason.Jonkman
Posts: 4223
Joined: Thu Nov 03, 2005 4:38 pm
Location: Boulder, CO
Contact:

Re: FAST8 Linearization

Postby Jason.Jonkman » Thu Jul 06, 2017 6:24 am

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,
Jason Jonkman, Ph.D.
Senior Engineer | National Wind Technology Center (NWTC)

National Renewable Energy Laboratory (NREL)
15013 Denver West Parkway | Golden, CO 80401
+1 (303) 384 – 7026 | Fax: +1 (303) 384 – 6901
nwtc.nrel.gov

Taha.Fouda
Posts: 44
Joined: Thu Jun 22, 2017 1:51 am
Organization: DLR Institiue of Flight Systems
Location: Germany

Re: FAST8 Linearization

Postby Taha.Fouda » Thu Jul 06, 2017 7:15 am

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

Jason.Jonkman
Posts: 4223
Joined: Thu Nov 03, 2005 4:38 pm
Location: Boulder, CO
Contact:

Re: FAST8 Linearization

Postby Jason.Jonkman » Thu Jul 06, 2017 9:16 am

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: http://www.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: viewtopic.php?f=30&t=1867.

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,
Jason Jonkman, Ph.D.
Senior Engineer | National Wind Technology Center (NWTC)

National Renewable Energy Laboratory (NREL)
15013 Denver West Parkway | Golden, CO 80401
+1 (303) 384 – 7026 | Fax: +1 (303) 384 – 6901
nwtc.nrel.gov

Taha.Fouda
Posts: 44
Joined: Thu Jun 22, 2017 1:51 am
Organization: DLR Institiue of Flight Systems
Location: Germany

Re: FAST8 Linearization

Postby Taha.Fouda » Wed Jul 12, 2017 1:13 am

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.
Untitled.png
Untitled.png (64.65 KiB) Viewed 4093 times


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?

Jason.Jonkman
Posts: 4223
Joined: Thu Nov 03, 2005 4:38 pm
Location: Boulder, CO
Contact:

Re: FAST8 Linearization

Postby Jason.Jonkman » Wed Jul 12, 2017 6:38 am

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,
Jason Jonkman, Ph.D.
Senior Engineer | National Wind Technology Center (NWTC)

National Renewable Energy Laboratory (NREL)
15013 Denver West Parkway | Golden, CO 80401
+1 (303) 384 – 7026 | Fax: +1 (303) 384 – 6901
nwtc.nrel.gov

Taha.Fouda
Posts: 44
Joined: Thu Jun 22, 2017 1:51 am
Organization: DLR Institiue of Flight Systems
Location: Germany

Re: FAST8 Linearization

Postby Taha.Fouda » Sat Jul 15, 2017 12:38 pm

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
Attachments
Linearization.docx
(20.51 KiB) Downloaded 90 times
Gen.jpg
Gen.jpg (92.4 KiB) Viewed 4062 times

Jason.Jonkman
Posts: 4223
Joined: Thu Nov 03, 2005 4:38 pm
Location: Boulder, CO
Contact:

Re: FAST8 Linearization

Postby Jason.Jonkman » Sat Jul 15, 2017 2:57 pm

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,
Jason Jonkman, Ph.D.
Senior Engineer | National Wind Technology Center (NWTC)

National Renewable Energy Laboratory (NREL)
15013 Denver West Parkway | Golden, CO 80401
+1 (303) 384 – 7026 | Fax: +1 (303) 384 – 6901
nwtc.nrel.gov

Taha.Fouda
Posts: 44
Joined: Thu Jun 22, 2017 1:51 am
Organization: DLR Institiue of Flight Systems
Location: Germany

Re: FAST8 Linearization

Postby Taha.Fouda » Sun Jul 16, 2017 12:30 am

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
Attachments
sim.jpg
sim.jpg (84.02 KiB) Viewed 4057 times
SIM1.jpg
SIM1.jpg (139 KiB) Viewed 4057 times


Return to “Controls”

Who is online

Users browsing this forum: No registered users and 1 guest