Problems in Running GetMats and MBC3

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

Syed.Muzaher
Posts: 51
Joined: Mon Aug 28, 2017 4:17 pm
Organization: University of Paderborn
Location: Germany

Problems in Running GetMats and MBC3

Postby Syed.Muzaher » Tue Sep 05, 2017 2:28 pm

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.
Best regards
Syed Shah

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

Re: Problems in Running GetMats and MBC3

Postby Jason.Jonkman » Wed Sep 06, 2017 12:58 am

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,
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

Syed.Muzaher
Posts: 51
Joined: Mon Aug 28, 2017 4:17 pm
Organization: University of Paderborn
Location: Germany

Re: Problems in Running GetMats and MBC3

Postby Syed.Muzaher » Wed Sep 06, 2017 5:31 pm

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 (viewtopic.php?f=30&t=1873&p=9602&hilit=mbc3+fast8#p9602) and updated my GetMats_f8.m and findBladeTriplets.m files as u advised to Taha.

Best regards
Best regards
Syed Shah

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

Re: Problems in Running GetMats and MBC3

Postby Jason.Jonkman » Thu Sep 07, 2017 1:20 am

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,
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

Syed.Muzaher
Posts: 51
Joined: Mon Aug 28, 2017 4:17 pm
Organization: University of Paderborn
Location: Germany

Re: Problems in Running GetMats and MBC3

Postby Syed.Muzaher » Thu Sep 07, 2017 4:11 am

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
Attachments
MBC.zip
MBC source code
(16.22 KiB) Downloaded 57 times
Best regards
Syed Shah

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

Re: Problems in Running GetMats and MBC3

Postby Jason.Jonkman » Fri Sep 08, 2017 11:51 am

Dear Syed,

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

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

Syed.Muzaher
Posts: 51
Joined: Mon Aug 28, 2017 4:17 pm
Organization: University of Paderborn
Location: Germany

Re: Problems in Running GetMats and MBC3

Postby Syed.Muzaher » Mon Sep 11, 2017 5:04 pm

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}.
Attachments
Test14_ElastoDyn.txt
Estrodyn file
(12.45 KiB) Downloaded 51 times
Test14.txt
fast input file
(6 KiB) Downloaded 50 times
Test14Lin_files.zip
Linereized files
(123.53 KiB) Downloaded 54 times
Best regards
Syed Shah

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

Re: Problems in Running GetMats and MBC3

Postby Jason.Jonkman » Tue Sep 12, 2017 9:18 am

Dear Syed,

OK, I was able to reproduce your error. It turns out there is one small bug on the version uploaded to https://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,
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

Syed.Muzaher
Posts: 51
Joined: Mon Aug 28, 2017 4:17 pm
Organization: University of Paderborn
Location: Germany

Re: Problems in Running GetMats and MBC3

Postby Syed.Muzaher » Wed Sep 13, 2017 7:05 am

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.
Best regards
Syed Shah

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

Re: Problems in Running GetMats and MBC3

Postby Jason.Jonkman » Wed Sep 13, 2017 1:20 pm

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,
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

Syed.Muzaher
Posts: 51
Joined: Mon Aug 28, 2017 4:17 pm
Organization: University of Paderborn
Location: Germany

Re: Problems in Running GetMats and MBC3

Postby Syed.Muzaher » Wed Sep 13, 2017 1:27 pm

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

Lasse.Meyer
Posts: 5
Joined: Tue Apr 17, 2018 6:59 am
Organization: Superior School Kiel (Fachhochschule Kiel)
Location: Germany

Re: Problems in Running GetMats and MBC3

Postby Lasse.Meyer » Mon Aug 13, 2018 12:57 pm

Dear Mr Jonkman

when I tried to do the modal analysis through mbc3, I get the same error:
Error in GetMats (line 56)
RotSpeed = str2num( line(55:68) ); % in (rad/s)


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,
Attachments
optoffshr_modal.1.lin.txt
(172.3 KiB) Downloaded 32 times
Lasse Meyer
Student Offshore Construction (B.Eng. - Fachhochschule Kiel)

Kiel, Germany

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

Re: Problems in Running GetMats and MBC3

Postby Jason.Jonkman » Mon Aug 13, 2018 3:11 pm

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: https://github.com/OpenFAST/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


Return to “Controls”

Who is online

Users browsing this forum: No registered users and 1 guest