FAST-Simulink tranform

I am a UC Davis student who is introducing myself to the functionality of the FAST system. I want to be able to run the FAST model inside of Simulink running either Matlab 7.14 or 2007a, and am continually finding compatibility issues even after following the prescribed changes as provided by the NREL pdfl. While I am getting the .mex error as discussed in the following link, [FAST S-Func MEXing process), I was wondering anybody was successfully able to get the crossover to work without having to recompile the code to alleviate the .mex error. For those who have had success in getting FAST to run within Simulink, I was wondering if I could get a mostly step-by-step procedure for doing the same.

Dear Adam,

The FAST_SFunc.mexw32 that is contained in wind.nrel.gov/public/jjonkman/FA … _2007a.zip should work with MATLAB v2007a (and newer) without recompiling. Is this the version you are using?

Best regards,

Jason,

Thanks for the FAST response, pardon the horrible pun. In response to your question I am using matlab v. 7.4, which does translate to 2007a so the new mex files do work. My problem is even more simplistic in that I cannot get a test file, such as test 13, to be configured correctly to run inside simulink regardless of the .mex issue. I have seen it work before and know that I will eventually run into that problem, but in terms of file setup, I am still having trouble from square one. If I could get more of a step-by-step approach for configuration based on the test 13 case included in the software, I think this will be enough of a base for then implementing the .mex solution and fully utilizing simulink.

Thanks.

Adam,

It’s difficult for me to help without knowing more about the problem you are running into.

The only change that must be made to test 13 to get the model to run in MATLAB/Simulink is to set ADAMSPrep to 1 in Test13.fst (the input file provided has ADAMSPrep set to 3). Have you made this change?

Are you following the other instructions from the “Simulink Interface” chapter of the FAST User’s Guide?

What error is MATLAB/Simulink giving you when you try to run the simulation?

Best regards,

Jason,

I am sorry it has taken me months to get back to you about the error. Now that I have a working computer and working errors I have enough information to ask for help. For some background: I have the path for the two .dll’s added to the pathway of the matlab file and I am working with Test13.fst with ADAMSPREP set to 1. Also the folder also contains Wind/AWT27/Shr12_30.wnd.

FAST certification Test #13: WindPACT 1.5 MW Baseline with many DOFs with VS and VP and FF turbulence.
Running FAST (v6.02c-jmj, 02-Feb-2007)-Compiled as S-Function for Simulink.

When I input the file into MATLAB’s prompt I do get the message that is compiles for the S-function but when I try and run the OpenLoop.mdl I get the following errors from the console and error output files.

[size=75]Error in ‘OpenLoop/FAST Nonlinear Wind Turbine/S-Function’ while executing FORTRAN MEX S-function ‘FAST_SFunc’, flag = 3 (output), at time 0.[/size]

FAST certification Test #13: WindPACT 1.5 MW Baseline with many DOFs with VS
and VP and FF turbulen

Heading of the aerodyn.ipt file :
1.5 MW baseline aerodynamic parameters for FAST certification test #13.

Could not find hub-height wind file:
“Wind\WP_Baseline\84m_12mps”

Could not find full-field wind file:
“Wind\WP_Baseline\84m_12mps.wnd”"

Could not find coherent turbulence wind parameter file:
“Wind\WP_Baseline\84m_12mps.ctp”"

Could not find 4D-wind parameter file:
“Wind\WP_Baseline\84m_12mps.fdp”"

Check your AeroDyn input for proper wind file name.


FATAL ERROR in Subroutine CheckWindType.
Error reading wind file name. Could not find HH, FF, 4D, or CT file.


0 warnings recorded in error.log file for this simulation.
1 errors recorded in error.log file for this simulation.

Simulation Error # 1
Simulation Time = 0 seconds.
Error detected in Subroutine CheckWindType.
Error reading wind file name. Could not find HH, FF, 4D, or CT file.

FATAL ERROR. SIMULATION ABORTED.

While I think this may be a file issue, any help would be appreciated.
Thanks

Dear Adam,

That error is from AeroDyn and is telling you that it cannot find any wind file with root name “84m_12mps” in the “Wind\WP_Baseline” directory. The wind file(s) to be used by AeroDyn, including a relative path to its(their) location, is input in AeroDyn’s primary input file, which for FAST certification test #13 is called Test13_AD.inp in FAST’s CertTest folder. FAST’s CertTest folder includes a Wind\WP_Baseline directory containing the wind files 84m_12mps.sum and 84m_12mps.wnd. Are you modeling Test13.fst from within the CertTest folder? If yes, are the wind files there? If not (e.g., because you copied Test13.fst and Test13_AD.inp to another folder), did you copy the wind files / directories to that folder also? You must ensure that all input files, including their relative paths, are correct.

I hope that helps.

Best regards,

Jason,

Thanks for the help from the previous post, working now on a windows machine. I was wondering if it was possible to get the make_SFunction or the .mex file from the above link work on another operating system. At this point I get back to the same error as above when trying to run FAST through MATLAB in mac osx matlab 2007a. I was wondering if this was possible since the mex file is designed for dos.

Thanks

Adam,

The FAST_SFunc.mexw32 only works on 32-bit Windows platforms (this is what the “w32” in the mex name stands for). This mex file will not work on a Mac OS X.

I don’t run a Mac myself, so, I can’t help you out much. But the post found here: [FAST S-Func MEXing process) describes how to compile the FAST_SFunc.mexw32 file. Hopefully with the information found in that post, as well as with the MATLAB documentation, you can learn what you need to in order to compile it for a Mac OS X. If you succeed, please post on what you find out so that you can help other users with similar problems.

Best regards,

Hi everyone,

I’m also trying to run FAST through a MacOSX Matlab version (R2013_a) did anyone get successfully finally? I am a industrial engineer student and I don’t have a lot of knowledge in programming either with Matlab, Fortran. I have some basics of C, python and web programming, do you think I can succeed trying to compile the "make_FAST_S_function? Any little help would be appreciable.

Thanks in advance.