Problems in Running GetMats and MBC3

Dear All,
Can anyone help me please with the following.

I need to design a controller for wind turbine and in order to do it, I have linearized the wind turbine model around some points in FAST8. After obtaining the linerization file, i need to do mbc transform. but when i run “GetMats” in MATLAB it gives error as follows,

"
GetMats

ENTER:

Name of FAST linearization output file to process
(omit the .lin extension when entering the name)
<---------------------------------------------------
< LinearTest1

Running Eigenanalysis.m using “LinearTest1.lin”
Please wait…
Index exceeds matrix dimensions.

Error in GetMats (line 56)
RotSpeed = str2num( line(55:68) ); % in (rad/s)

"

I was wondering if somebody can help me to resolve the issue. Additionally “GetMats_f8” is working fine.

Dear Syed,

The MATLAB script GetMats.m is provided for the old linearization functionality of FAST v7. GetMats_f8.m was added to support the linearization functionality of FAST v8, where the linearization output (*.lin) files have a different format. It sounds like GetMats_f8.m is working for you.

Best regards,

Dear Jason,
Thank you for your quick response.

My questions are then,

1: are the Avg A, Avg B, Avg C,Avg D matrices produced by the GetMats_f8 are the the avg matrices after the MBC transformation has been applied to A,B,C,D matrices??

if not

Then can you give me any idea or tip about how to perform MBC transformation because I need to do MBC transformation for the system of matrices I get from linearization?

2: plus i am not able to run mbc3 for the system matrices i got by FAST8, it gives this error.

"
Running mbc3 (v1.00.00a-gbir, 15-Oct-2008)

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

"
PS 1: after runing GetMats_f8.m, in my matlab workspace i get this ‘NRotTripletOutput = 0 , RotTripletIndicesOutput = []’

PS 2: i have gone through this post (http://forums.nrel.gov/t/fast8-linearization/1651/27) and updated my GetMats_f8.m and findBladeTriplets.m files as u advised to Taha.

Best regards

Dear Syed,

No, the azimuth-averaged matrices AvgAMat etc. computed by GetMats_f8.m do not consider MBC3. To apply MBC3, call mbc3.m after calling GetMats_f8.m.

I would not expect you to receive an error regarding RotTripletIndicesOutput if you’ve applied the bug fix I gave to Taha.

Best regards,

Dear Jason,
Thank you for answering my questions.

I need your help to check the get GetMats_f8.m and mbc3 codes. Because it is giving me this error continuously.

"
Running mbc3 (v1.00.00a-gbir, 15-Oct-2008)

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

"
I guess the problem is GetMats_f8.m. As it is not creating correct values of the variables, ‘‘NRotTripletOutput and RotTripletIndicesOutput’’ it gives the value 0 and to them respectivly.

I am attaching the m files. I will really appreciate if you can have a quick look at the files.

Best regards
MBC.zip (16.2 KB)

Dear Syed,

Can you send my your linearization output (*.lin) file so that I can test it myself?

Best regards,

Dear Jason,

Please find the linearized files In the attachment. additionally i am attaching the the FAST input file and the Elestrodyn input file as well.

I used {wind type, 1=steady with wind speed of 18m/s}.
Test14_ElastoDyn.txt (12.4 KB)
Test14.txt (6 KB)
Test14Lin_files.zip (124 KB)

Dear Syed,

OK, I was able to reproduce your error. It turns out there is one small bug on the version uploaded to github.com/old-NWTC/MBC/blob/ma … Triplets.m. On line 12, “size” should be changed to “length”. With this minor change, the script runs as expected. We’ll get this changed on github soon. In the meantime, let me know if that works for you.

By the way, I noticed that you are linearizing your FAST model with zero rotor speed. In this case, you only have one azimuth angle and do not need to linearize 36 times.

Best regards,

Dear Jason,
Thank you for your help and quick response.
After making change on line 12 of findBladeTriplets.m, mbc3 runs.

But I have notices some mismatches between “.lin” files and the variables produced by GetMats_f8 and mbc3 in MATLAB workspace, those variables are as follows:
NRotTripletCntrlInpt = 1, NRotTripletOutput = 2, NRotTripletStates = 2 and RotTripletIndicesStates = [4 5 6; 7 8 9]

But if you see in the “.lin” files this should be like RotTripletIndicesStates = [4 5 6; 7 8 9; 13 14 15; 16 17 18] plus NRotTripletCntrlInpt and NRotTripletOutput, should be 3 and 6 respectively. I am not sure about NRotTripletStates what it should be according to the .lin files I sent u.

Did you notice it as well or i am getting the logic behind it totally wrong? kindly shed some light on it.

ps: sorry i forget to send you the .lin flies in which i have some rotor speed, that zero you mentioned in previous message was by mistake.

Dear Syed,

The output of MBC3 is correct.

NRotTripletCntrlInput = 1 corresponds to a single set of 3 inputs, one for each blade.

NRotTripletOutput = 2 corresponds to two sets of 3 outputs, two for each blade.

RotTripletIndicesStates actually only counts the degrees of freedom, not their first derivatives. (Perhaps RotTripletIndicesDOFs would have been a better variable name?)

Best regards,

Dear Jason,
Thank you for your help and clearing my doubts.
Best regards

Dear Mr Jonkman

when I tried to do the modal analysis through mbc3, I get the same error:

This error remains also if I change “size” to “length” in line 12 of the “findBladeTriplets.m”

I used FAST 8 and tried the Getmatsf8 script.

Do You have any further idea, how I could solve the problem?

Best regards,
optoffshr_modal.1.lin.txt (172 KB)

Dear Lasse,

I’m not sure I understand–what error you are getting? You’re quote refers to line 56 of the old GetMats.m file (which cannot read in linearization output files from FAST v8), but you say you are using GetMats_f8.m. Please clarify.

Have you tried using the MBC3 tool that was recently updated: github.com/OpenFAST/mbc?

Best regards,