Beginner Guide for MATLAB Simulink and FAST

Provide feedback, request enhancements, and get help with wind-turbine computer-aided engineering tools.

Moderators: Bonnie.Jonkman, Jason.Jonkman

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

Re: Beginner Guide for MATLAB Simulink and FAST

Postby Jason.Jonkman » Tue Sep 02, 2014 2:13 pm

Dear Augusto,

The example on page 29 of Alan's controls report is a simple model with 1 state (rotor speed perturbation), 1 input (collective pitch angle perturbation), and 1 disturbance (wind speed perturbation). The FAST linearization process returns 2 states for every DOF enabled, so, with the generator-azimuth DOF enabled, the result is a 2-state model (rotor azimuth angle perturbation and rotor speed perturbation). But as Alan Wright explains in the last paragraph on section 4.1.2 , Alan removes the rotor azimuth angle perturbation as a state. This effectively eliminates the 1st column from A and the first equation, leaving only a single equation with scalar values of A, B, and Bd.

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

Elham.Tofighi
Posts: 20
Joined: Thu Jan 01, 2015 9:25 pm
Organization: University of Newcastle
Location: Australia
Contact:

Re: Beginner Guide for MATLAB Simulink and FAST

Postby Elham.Tofighi » Sun Feb 01, 2015 7:49 pm

Hello,

I am starting to work with FAST and specifically the Simulink model of Baseline Controller - I read the related manuals and instructions but still have problem with running the simulink file.
First of all, which FAST/Simulink version is now compatible with MATLAB2014 or 2013?
I mean I have the files from NREL's website:
wind.nrel.gov/public/ (ftp folder )
"jjonkman/"
"NRELOffshrBsline5MW/ "
"NRELOffshrBsline5MW_Onshore.zip"

1- Is there specific MATLAB version that should be used to work with this files?
2- Are the current FAST 8 and FAST 7 versions that are available at NREL's download section compatible too run the 5MW turbine model?

I already downloaded the current FAST versions and I am using FAST 7 version files as samples for baseline controller/simulink files.
I am using MATLAB2014 and MATLAB 2013 -

In FAST Manual - page 35/36 there are instructions on how to run the Simulink sample - here it says ( first transfer files Simsetup.m and Openloop.mdl from simulinkSamples folder the directory containing the primary input file of a FAST model that you want to use).

3- Does this mean that I should copy these files (Simsetup.m and Openloop.mdl) to the same folder (CertTest)?
4- Should I also put the Read_FAST_Input. and FAST_SFunc.dll in the same folder (CertTest)?? if not where should these files be?
5- should all of these files be in the same root directory (or folder) as the software FAST is?

** my windows/MATLAB is 64-bits . SO I added the 64-bit version of the FAST_SFunc but I still get the Error and my MATLAB shuts down
** I tried to put the (0,[],[],9) in S_Func block settings but still the MATLAB shuts down.

Any comments?
School of Electrical Engineering and Computer Science
University of Newcastle
Callaghan NSW 2308, Australia
Cell: +61 410 944 021
Skype: elham.map

Mehdi.Baghaee
Posts: 112
Joined: Tue Oct 04, 2011 12:38 pm
Organization: self
Location: Iran

Re: Beginner Guide for MATLAB Simulink and FAST

Postby Mehdi.Baghaee » Thu Feb 12, 2015 5:06 pm

Dear Elham,
These are my experiences using FAST and ADAMS interfacing with Simulink,
The FAST and ADAMS versions developed files in NREL is based on 32bit system, it means that you will need 32bit windows to install the 32bit version of Matlab to use them.
I have worked with Matlab 2010b it works well.
You should copy those files(Simsetup.m and Openloop.mdl) to your current working folder.

Best regards,
Mehdi,

Bonnie.Jonkman
Posts: 573
Joined: Thu Nov 10, 2005 10:51 am
Organization: Envision Energy USA
Location: Colorado
Location: Boulder, CO
Contact:

Re: Beginner Guide for MATLAB Simulink and FAST

Postby Bonnie.Jonkman » Tue Feb 17, 2015 9:37 am

Elham,

FAST v8 allows you to run the 5MW model without modifying source code, however, we have not yet released the FAST v8 S-Function for Simulink. (It should be ready for release in the very near future).

FAST v7 as distributed does not run the 5MW models. The primary reason is that the Bladed-style DLL controller requires a separate compilation. If you want to run the 5MW model in Simulink, you'll have to recompile FAST_SFunc using the appropriate source files for the Bladed Interface.

If you set your Matlab path variable, you should not have to move any files. See, for instance, the Simulink_CertTest.m file in the CertTest directory of FAST v7. Your Matlab path needs to know the directory location of FAST_SFunc.mexw* and the directory location of the Simulink model you are trying to run.

Please note that FAST_SFunc.dll (on Windows) is FAST_SFunc.mexw32 for 32-bit versions of Matlab and FAST_SFunc.mexw64 for 64-bit version of Matlab. There are some slightly updated instructions for the Simulink interface in the Addendum to the FAST User's Guide.
Bonnie Jonkman

Envision Energy USA, 2016-
National Renewable Energy Laboratory, 2003-2016

Elham.Tofighi
Posts: 20
Joined: Thu Jan 01, 2015 9:25 pm
Organization: University of Newcastle
Location: Australia
Contact:

Re: Beginner Guide for MATLAB Simulink and FAST

Postby Elham.Tofighi » Sat Feb 21, 2015 7:13 pm

Dear Bonnie,

Thank you very much for your comments.

However, I am now a bit more confused!
1- So, how do I work with the files for 5MW WT at (http://wind.nrel.gov/public/jjonkman/NR ... Bsline5MW/) ? what FAST version is compatible ?
2- Should I use the current version of FAST 7 or 8?
3- should I download the FAST from (http://wind.nrel.gov/public/jjonkman/FAST/)?
4-how can I have access to the source files for making the S-function?

Please let me know your comments.
School of Electrical Engineering and Computer Science
University of Newcastle
Callaghan NSW 2308, Australia
Cell: +61 410 944 021
Skype: elham.map

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

Re: Beginner Guide for MATLAB Simulink and FAST

Postby Jason.Jonkman » Mon Feb 23, 2015 9:51 am

Dear Elham,

The FAST models of the NREL 5-MW turbine available from (http://wind.nrel.gov/public/jjonkman/NR ... Bsline5MW/) are compatible with FAST v7.02.00d-bjj. But these models rely on the use of a Bladed-style DLL controller, which is not compiled with FAST v7.02.00d-bjj by default. If you wish to run FAST v7.02.00d-bjj compiled with the Bladed-style DLL controller, you can find that here: http://wind.nrel.gov/public/jjonkman/FA ... erface.exe. Updated NREL 5-MW models compatible with FAST v8 are distributed within the CertTest directory of the FAST v8 archive: https://nwtc.nrel.gov/FAST8. The Bladed-style DLL controller is compiled with FAST v8 by default.

The interface between FAST v8 and Simulink has not yet been publicly released yet, so if you wish to apply Simulink, you should currently use FAST v7. We will be releasing an updated version of FAST v8 with a Simulink interface soon.

The source files for compiling the Simulink S-Function with FAST v7 are available in the FAST v7 archive: https://nwtc.nrel.gov/FAST7.

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

Amir.Adibzadeh
Posts: 2
Joined: Fri Apr 24, 2015 1:30 am
Organization: Amirkabir University of Techhnology
Location: Iran

Re: Beginner Guide for MATLAB Simulink and FAST

Postby Amir.Adibzadeh » Sat Apr 25, 2015 7:51 am

Dear Admin

When I run OpenLoop.mdl, an error appears in both Command windows and Simulink, saying some files of *.dat and *.ipt are missing. These files are available in CetTest folder. When I add this folder path into MATLAB, the error insists. Please let me know how I can get rid of these error messages.

BR,
Amir

Bonnie.Jonkman
Posts: 573
Joined: Thu Nov 10, 2005 10:51 am
Organization: Envision Energy USA
Location: Colorado
Location: Boulder, CO
Contact:

Re: Beginner Guide for MATLAB Simulink and FAST

Postby Bonnie.Jonkman » Tue Apr 28, 2015 10:03 am

Which directory is your current MATLAB directory? And what is the name of the FAST input file you are telling Simulink to use?

The MATLAB path is useful for finding your model files and MATLAB scripts as well as any DLLs that are necessary (FAST_SFunc.mex* and, if you are using FAST v8, FAST_Library*.DLL and MAP_*.DLL). However, FAST does not use the MATLAB path, so you have to explicitly state where the FAST input file is located (use an absolute path or specify it relative to your current MATLAB directory). Once you do that, all of the files listed in the primary FAST input file should be specified relative to the location of the input file in which they are specified. (Which basically means if you leave all the input files from the CertTest case where they were originally in the FAST archive, you need only to properly specify the name of the primary FAST input file.)
Bonnie Jonkman

Envision Energy USA, 2016-
National Renewable Energy Laboratory, 2003-2016

Amir.Adibzadeh
Posts: 2
Joined: Fri Apr 24, 2015 1:30 am
Organization: Amirkabir University of Techhnology
Location: Iran

Re: Beginner Guide for MATLAB Simulink and FAST

Postby Amir.Adibzadeh » Thu Apr 30, 2015 9:28 am

Dear Bonnie

I followed what you said and it is now working well. Many many thanks for your reply.

BR,

Amir

Srinivasa.Sudharsan
Posts: 39
Joined: Mon Jun 08, 2015 10:59 pm
Organization: thiagarajar college of engineering
Location: India

Re: Beginner Guide for MATLAB Simulink and FAST

Postby Srinivasa.Sudharsan » Mon Jun 22, 2015 11:23 pm

Hi Bonnie:
Again a basic doubt ... I basically need to test my controller for wind turbine. I have designed that in SIMULINK. In FAST 7 you have a simulink block in Green with openloop.mdl. So i used that for simulink and carefully followed the instruction in a pdf by yourself.It successfully ran. For FAST 8 I have there is no such block to interface as s_fuction in simulink. Then how can i run FAST 8.,does it works only with fortran compilers, is there a way to interface the 5MW baseline model in SIMULINK for testing my controller and how can i visualise my results. does the versions above FAST 8(ie 03,09 etc..) could be run only in fortran compilers and visual studios ?

Bonnie.Jonkman
Posts: 573
Joined: Thu Nov 10, 2005 10:51 am
Organization: Envision Energy USA
Location: Colorado
Location: Boulder, CO
Contact:

Re: Beginner Guide for MATLAB Simulink and FAST

Postby Bonnie.Jonkman » Tue Jun 23, 2015 9:56 pm

Hi, Srinivasa.

The FAST v8 interface for Simulink was first released in version 8.10.00 (March 2015). It wasn't available in earlier versions. You can download it here: https://nwtc.nrel.gov/fast8/. The Simulink interface in FAST v8 has changed somewhat from FAST v7, so please read the Guide to Changes in FAST v8.
Bonnie Jonkman

Envision Energy USA, 2016-
National Renewable Energy Laboratory, 2003-2016

Srinivasa.Sudharsan
Posts: 39
Joined: Mon Jun 08, 2015 10:59 pm
Organization: thiagarajar college of engineering
Location: India

Re: Beginner Guide for MATLAB Simulink and FAST

Postby Srinivasa.Sudharsan » Wed Jun 24, 2015 10:22 am

thank you very much bonnie ji !!! it was very useful!!!

Ali.Elyaakoubi
Posts: 94
Joined: Wed Oct 21, 2015 8:43 am
Organization: abdelmalek Essaadi University
Location: MOROCCO

Re: Beginner Guide for MATLAB Simulink and FAST

Postby Ali.Elyaakoubi » Fri Oct 30, 2015 4:59 am

Hello everyone,
I am a new user of FAST. In fact, I would like to implement a control strategy on this tools but I found some difficulties to install it despite that I have read the documentation .
The first problem in the Intel visual Fortran composer Xe 2013 ( I don’t found it in the net). I have installed Intell parallel Xe 2013 and Microsoft visual basic 2013. When I opened VB >new project no visual fortran found in the list.
Can you help please what I do or how I do to install IVF 2013 XE
I will be very grateful with your help

Bonnie.Jonkman
Posts: 573
Joined: Thu Nov 10, 2005 10:51 am
Organization: Envision Energy USA
Location: Colorado
Location: Boulder, CO
Contact:

Re: Beginner Guide for MATLAB Simulink and FAST

Postby Bonnie.Jonkman » Fri Oct 30, 2015 2:16 pm

You don't need the exact compiler we used. If you need to compile the Fortran code, you use most of the recent versions of Intel Visual Fortran or gfortran.

Which version of FAST are you using? If you are using FAST 8, the easiest way to open the Visual Studio project is to look for it in the <FAST8>/Compiling/VisualStudio directory. If you've installed the compiler, you should be able to just double-click on the .vfproj file to open it.

However, since this is in a thread for Simulink, I assume you are trying to use the FAST interface to Simulink. If you're implementing a control strategy in Simulink, you may not have to compile FAST at all.
Bonnie Jonkman

Envision Energy USA, 2016-
National Renewable Energy Laboratory, 2003-2016

Ali.Elyaakoubi
Posts: 94
Joined: Wed Oct 21, 2015 8:43 am
Organization: abdelmalek Essaadi University
Location: MOROCCO

Re: Beginner Guide for MATLAB Simulink and FAST

Postby Ali.Elyaakoubi » Sat Oct 31, 2015 4:31 am

Thank you very much for your reply Prof Jonkman
I would like to use the new version (V8)
So as you say the intel visual fortran ( 2013 and more) is the easy way to compile it. can In fact i am not found this version exactely.
I ask you if i can install parallel studio Xe 2013 and a version of microsoft visual basic or a simple version of intel fortran enough, and if you can tell me please how i can launch it. Realy this thing disturbed me.

In this time I would like just to implement a strategy of control on FATS model of a 6 KW Wind turbine. But in the future I hope include the flexibility on my model, If you can help me.
I am read on “ Simulation for Wind Turbine Generators—With FAST and MATLAB-Simulink Modules” M. Singh, E. Muljadi, J. Jonkman, and V. Gevorgian, that it needed a cript matlab called “Simsetup.m” that calls the input.fst but I don’t found this script in the archive of FAST version 8


Thank you for your help


Return to “Computer-Aided Engineering Software Tools”

Who is online

Users browsing this forum: No registered users and 1 guest