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

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

Re: FAST8 Linearization

Postby Jason.Jonkman » Mon Jul 17, 2017 6:27 am

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,
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 » Mon Jul 17, 2017 7:15 am

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
Attachments
Linearization.docx
(20.51 KiB) Downloaded 54 times

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

Re: FAST8 Linearization

Postby Jason.Jonkman » Mon Jul 17, 2017 7:38 am

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 (https://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,
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 » Mon Jul 17, 2017 9:39 am

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

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

Re: FAST8 Linearization

Postby Jason.Jonkman » Mon Jul 17, 2017 9:47 am

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,
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 » Mon Jul 17, 2017 6:51 pm

Dear Jason

Thank you. I did MBC and I run mbc3.m but I got this error

**ERROR: the number of colmn vectors in RotTripletIndicesOutput must equal 3, the num of blades

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

Re: FAST8 Linearization

Postby Jason.Jonkman » Tue Jul 18, 2017 6:12 am

Dear Taha,

I'm not sure why you are receiving this error, but I searched and other people on this forum have received the same error and resolved it, see:
viewtopic.php?f=4&t=475&p=7887 and viewtopic.php?f=4&t=1232&p=8751.

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 » Tue Jul 18, 2017 1:13 pm

Dear Jason,

Sorry, I cannot reach why I have this error. but as written in one of the forum you show me in the previous comment, I have these values.

>> size(RotTripletIndicesOutput)

ans =

0 0

>> size(DescOutput)

ans =

13

I am not sure if my linearization process was going right or wrong. So please could you take a look for the attached file if I did it right or wrong. and correct me for the value of (LinTimes). I want to linearize at region 3 with steady wind 18 m/s. rotor speed 12.1 rpm.

Regards
Taha
Attachments
Linearization Taha.zip
(12.21 KiB) Downloaded 44 times

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

Re: FAST8 Linearization

Postby Jason.Jonkman » Wed Jul 19, 2017 4:24 pm

Dear Taha,

It looks like you linearization should include 3 outputs for each blade: RootMxb1-3, RootMyb1-3 and RootMzb1-3. Are these outputs in your linearization output file?

I'm not sure I understand your question regarding LinTimes, but you are still not linearizing every 10 degrees for 12.1 rpm.

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 20, 2017 2:00 am

Dear Jason,

Yes, I have 3 outputs for each blade in my linearized output file.

as the rotor is spinning by 12.1 rpm = 72,6 degree/sec so the time required for every 10 degree azimuth is approximately 0.14 sec.

I adjusted Lintimes to be like this:-
36 NLinTimes

0.14,0.28,0.42,0.56,0.7,0.84,0.98,1.12,1.26,1.4,1.54,1.68,1.82,1.96,2.1,2.24,2.38,2.52,2.66,2.8,2.94,3.08,3.22,3.36,3.5,3.64,3.78,3.92,4.06,4.2,4.34,4.48,4.62,4.76,4.9,5.04 LinTimes

and this gives me 36 linearized output files but I don't know How can I upload more than 1 linearized file in Getmatf8.m.

actually, I started again with Generator degree of freedom and generator speed output, so I don't need to make MBC and I added the operating points values to the linearized model. the response of the linearized model becomes nearly to FAST non linear but the nonlinear response always periodic ( oscillate around the generator speed ) I don't why?

Then I added more degree of freedoms but in this case I have to do MBC and it gives me the error I mentioned before . I cleared RotTripletIndicesOutput and I think this can be wrong but just obtain MBC matrices but in this case I need to do the inverse of MBC for the output but I don't know which m file can do that?

Regards,
taha

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

Re: FAST8 Linearization

Postby Jason.Jonkman » Thu Jul 20, 2017 6:31 am

Dear Taha,

Yes, your LinTimes look correct (although I would start outputting the linearized solution after all start-up transients have died out e.g. by setting the first LineTimes to be 60.14 rather than 0.14). On line 17 of GetMats_f8.m is an example showing how MBC3 can be used to process two linearization outputs; you can easily change this to your 36 files.

I'm not sure I can comment on the periodic behavior of the nonlinear model without knowing more about your simulation set-up.

I don't know why you are getting the error. I suggest stepping through the MATLAB script as it executes to debug.

NREL hasn't provided the scripts to perform the inverse MBC, but these should not be difficult to implement yourself.

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 22, 2017 7:16 am

Dear Jason,

Thank you, I did the linearization and I adjusted Lintimes as you said then I changed line 17 in Getmat_f8.m from 2 linearized input to 36 input files but when I run it , it gives me NAzimStep = 12 not 36. I attached here Getmat_f8.m and mbc3.m, Please could you check them and let me know if there is something wrong.

Actually I don't have mechanical background and it's my first time to deal with FAST, So please could you give me a hint How can I do the inverse of MBC for the output?

Regards,
Taha
Attachments
GetMat.rar
(103.84 KiB) Downloaded 32 times

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

Re: FAST8 Linearization

Postby Jason.Jonkman » Tue Jul 25, 2017 6:41 am

Dear Taha,

I briefly reviewed your GetMats_f8.m file and found several typos on line 17, plus several other changes on other lines. I've corrected these in the attached update. Running this version produces mostly correct results.

By mostly correct, I noticed that the corrected GetMats_f8.m file generated incorrect values for NRotTripletOutput and RotTripletIndicesOutput. The output was NRotTripletOutput = 0 and RotTripletIndicesOutput = [ ]. However, the correct result should be NRotTripletOutput = 3 and RotTripletIndicesOutput = [2,3,4;5,6,7;8,9,10]. I asked Bonnie Jonkman--who originally developed GetMats_f8.m while working at NREL, but now works at Envision Energy--about this, and she traced the problem back down to a bug in the findBladeTriplets.m file included with MBC3. She has now corrected this bug in the updated version of MBC3 available from here: https://github.com/old-NWTC/MBC.

The inverse MBC transformation is described in Eq. (4) in the User's Guide to MBC3 that is provided with the source code.

GetMats_f8_JJ.m.txt
Corrected GetMats_f8.m File
(7.31 KiB) Downloaded 52 times

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 » Thu Jul 27, 2017 1:59 am

Dear Jason,

Thank you and sorry for bothering you. when I run findBladeTriplets.m, I need to enter these two parameters ( rotFrame,Desc ) which I didn't get them from Getmatf8.m.
regards,
Taha

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

Re: FAST8 Linearization

Postby Jason.Jonkman » Thu Jul 27, 2017 6:33 am

Dear Taha,

The "rotFrame" variables (separate variables for States/x, CntrlInpts/u, and Output/y) are contained with the "data" structure. There are separate "Desc" variables also for States, CntrlInpt, and Output.

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


Return to “Controls”

Who is online

Users browsing this forum: No registered users and 1 guest