Page 1 of 4

Beginner Guide for MATLAB Simulink and FAST

Posted: Mon Sep 09, 2013 1:51 am
by Giuseppe.Abbate
Hi all,
I've decided to write this little post just to make other life easier. :lol: I've just started a week ago using FAST simulator, and I had a couple of problem that are not related to the understanding of the material. In fact I had some problems in founding the correct materials/files for a beginner in wind turbine studies, as I am. I'll list the things that I have done:

1- Of course, download and install FAST.
2- Read the FAST User Guide, really well written. The guide explains how to interface FAST with Simulink, thing that can be done in a few minutes.

3- If you have no idea (like me) of how to control in simulink a wind turbine I suggest you the report
http://www.nrel.gov/docs/fy08osti/42437.pdf
It explains almost every single baseline controller for the wind turbine, and is really well written. The problem, in this case, is that the report refers to the CART turbine, that is a two bladed wind turbine, and it's almost impossible to find some of the input file that are needed to run the simulation (some are reported at the end of the document, but some are not). Reading in the forums I've found that a standard is the "5MW NREL wind turbine". For this turbine is possible to find every file about the structure. You can find all the needed files in:
wind.nrel.gov/public/ (ftp folder where you can find a lot of good stuff)
click on "jjonkman/"
click on "NRELOffshrBsline5MW/ "
Here there is the file "NRELOffshrBsline5MW_Onshore.zip" that contains all the file for the onshore version of the turbine.

4- After that you should read the document: http://www.nrel.gov/docs/fy09osti/38060.pdf that explains all the parameters about the 5MW NREL wind turbine, and has in the end the input file (the same of jjonkman's folder) and the parameters for the control. For simulating you should use the *.wnd file in the pages A-5, A-6 of the report 42437.
5- Following the direction of these two report you will be able to make your first torque controller and pitch controller.

Important: one important resource for these kind of documents is the link http://nrelpubs.nrel.gov/Webtop/ws/nich ... SearchForm where you can search all the documents that you need (just saying so because I had some problem in searching these reports).


Remark: with this post I surely don't want to complain about anything in this site, forum or documentation. It is just a post for the students like me that for the first time are studying a wind turbine control, and can have some problem in finding the correct material and the right files.
Anyway I would like to thank all the people in this forum that have created this great community where is possible to share and understand a lot about wind turbine.

Hope that someone can save time with this post :P
Giuseppe
MsC student in Aalborg University

Re: Beginner Guide for MATLAB Simulink and FAST

Posted: Mon Sep 09, 2013 3:43 pm
by Moises.Tellez
Hi Giuseppe. Thanks for your thread. It has served me very helpful. I am also a beginner in FAST. I have simulated the model of the Advanced Control Design for Wind Turbines technical report, in page 26, but I don´t know what delay you have to use in Transport Delay block. I wrote a thread where I explained this problem (viewtopic.php?f=4&t=898)

Regards.

Re: Beginner Guide for MATLAB Simulink and FAST

Posted: Thu Sep 12, 2013 6:18 am
by Giuseppe.Abbate
Moises.Tellez wrote:Hi Giuseppe. Thanks for your thread. It has served me very helpful. I am also a beginner in FAST. I have simulated the model of the Advanced Control Design for Wind Turbines technical report, in page 26, but I don´t know what delay you have to use in Transport Delay block. I wrote a thread where I explained this problem (viewtopic.php?f=4&t=898)

Regards.


Hi Moises. For the delay I've used the value 0.004. I've found it on an example file on this forum, and it worked. Unfortunately I still don't really understand the meaning of this delay, but I think it's just for the simulation.
I've attached my simulink file for basic control, and also the script for finding the parameters. Unfortunately the comments are in italian, but I hope that can be helpful to you in some way.

Regards
Giuseppe

I have some problem in uploading the attachment.

Re: Beginner Guide for MATLAB Simulink and FAST

Posted: Thu Sep 12, 2013 7:35 am
by Moises.Tellez
Hi Giussepe!. Thanks for your answer. I´ve already tried this delay of 0.004, but the results are not the same as using FAST in DOS. What step of simulation did you use with this delay?
The files that are uploaded to the forum must be a compressed format, like RAR.
If you want, you can send me the file to my email (p62telum@gmail.com)

Thanks.

Re: Beginner Guide for MATLAB Simulink and FAST

Posted: Thu Sep 12, 2013 7:44 am
by Giuseppe.Abbate
As DT I've used the default value 0.0125 in the primary input file. I'll send you an email with the rar archive because I cannot still upload it.
Anyway, I'm not comparing the results of my control in simulink with the ones used in the DOS version.

Regards!

Re: Beginner Guide for MATLAB Simulink and FAST

Posted: Tue Nov 05, 2013 2:15 pm
by Marshall.Buhl
I just want to say that seeing this dialogue makes me very happy. I've been very busy the last couple of months and am only just now getting caught up on the forums. When we set up this forum, one of our greatest hopes was that users would be willing to help each other, as you two have done. We at NREL just cannot always respond in a timely fashion.

Thanks, folks!

Re: Beginner Guide for MATLAB Simulink and FAST

Posted: Mon Feb 10, 2014 2:37 pm
by Ismail.Alizadeh
Hi,

First, thanks for the nice thread.
I've followed every single step in FAST USER's Guide but I cannot run even the simulink file. I'm getting the problem that S-Function 'FAST_SFunction' does not exits. A snapshot of the error message is attached.

When I'm asked to "Enter the name of the FAST input file to read", I entered C:\.......\NRELOffshrBsline5MW_Onshore.fst as an input file. After that data has been loaded and when I run the simulink, I got the error message.

I think the problem is in the FAST_SFunc block in Simulink that call FAST_SFunc file.

any hint?

Thanks in advance

Re: Beginner Guide for MATLAB Simulink and FAST

Posted: Tue Feb 11, 2014 3:27 am
by Giuseppe.Abbate
Hi,

I am not sure about it, but it seems that you have not added the correct folder in MATLAB as written in the FAST user's guide. Have you followed that guide (see page 35 and expecially 36 of the guide) before following my steps?

Have a nice day,
Giuseppe

Re: Beginner Guide for MATLAB Simulink and FAST

Posted: Tue Feb 11, 2014 9:40 am
by Bonnie.Jonkman
There are typically two things that could cause Simulink to say it can't find FAST_SFunc:
  • Your FAST_SFunc.mexw* file is not on the MATLAB search path, or
  • You're running 64-bit MATLAB and using FAST_SFunc.mexw32 (or vice versa: 32-bit MATLAB with FAST_SFunc.mexw64)
It looks like you've got the 32-bit version of the mex function in your current folder, so my guess is you're running a 64-bit version of MATLAB.

The FAST v7.02.00d-bjj archive on the web contains only the 32-bit compiled version. If you need a 64-bit version of the mex function, you can find it here: http://wind.nrel.gov/public/jjonkman/FA ... 2.00d-bjj/

Re: Beginner Guide for MATLAB Simulink and FAST

Posted: Mon Feb 24, 2014 12:34 pm
by Ismail.Alizadeh
Hi,

I forgot to thank you Bonnie. So sorry :(

The problem was that I'm using a 64-bit version of MATLAB, and the default S-Function file was in 32-bit.

Thanks again.

Re: Beginner Guide for MATLAB Simulink and FAST

Posted: Tue Mar 04, 2014 8:32 pm
by Yiqing.Xia
Hi ,friends
I read the paper <http://www.nrel.gov/docs/fy08osti/42437.pdf>. And in regin 2,the generator torque control,it said that :
Simulating this control, we use step winds to excite the FAST turbine model. These step
winds cause the turbine operating point to begin in Region 2, pass through Region 2½,
and end in Region 3. In the FAST model the only DOF switched on for this simulation is
generator speed. Figure 3.5 shows the resulting generator torque versus generator speed
for this simulation. In this plot, the red curve is the FAST simulated generator torque and
the blue curve is the targeted generator torque from these equations. The results are
identical, showing that we have implemented the desired controller in FAST.
I want to ask how to simulate the step wind. And there is an example of wind input file in the appendix A.
Where can I find the wind input file in a software? Because I always simulate the wind with TurbSim. Thank you very much.

Re: Beginner Guide for MATLAB Simulink and FAST

Posted: Wed Mar 05, 2014 7:19 am
by Jason.Jonkman
Dear Yiqing,

For simple wind time histories, such as step changs in the wind speed, AeroDyn's simple "hub-height" format wind data file can be used in place of wind files generated by TurbSim. Please find an example of such a file attached.

Best regards,

Re: Beginner Guide for MATLAB Simulink and FAST

Posted: Mon Jun 09, 2014 12:21 am
by Hamid.Hokmabady
Hello Guys;

I have a question about MATLAB Compiling; I'm sure that it is kind of a beginner one; but I want to know!
After compiling FAST using MATLAB we have a file by the name of *.mexw32 or *.mexw64; the question is; how should we use this file inside MATLAB or Simulink?

Regards

Re: Beginner Guide for MATLAB Simulink and FAST

Posted: Thu Jun 12, 2014 11:20 pm
by Jason.Jonkman
Dear Hamid,

The "Simulink Interface" chapter of the FAST User's Guide explains how to run FAST compiled as a mex-function for use within MATLAB/Simulink. The process explained in the "Simulink Interface" chapter applies to both the *.mexw32 and *.mexw64.

Best regards,

Re: Beginner Guide for MATLAB Simulink and FAST

Posted: Tue Sep 02, 2014 1:35 pm
by Augusto.Bustamante
Hi :)
I have a question regarding the Cart Model which is analyzed in http://www.nrel.gov/wind/pdfs/42437.pdf.

In page 29, they are indicated the parameters A, B and Bd like a constants not like a matrix which normaly comes after the linearization. Somebody knows which procedure was used to get these paremeters like constants?

Thank you for your time,

Regards