Dear All
I am doing a parameter optimization by using MATLAB command “fmincon”. In the calculation of cost function, I run the simulink model of FAST-SC with a set of parameters by using command “sim” to get the outputs which will be used to calculate the cost function. I run the “fmincon” command with debug mode and I found that I can not run the simulink model at the second time as the MATLAb will crash. I deleted the “clear all” command in Simsetup.m as I need to use the parameters I obtained in the last step. I am wondering how to fix this as I really want to run the simulink model at every step to find the optimized parameters.
By the way, I think FAST-SC is the same as FAST v6 in the operation of simulation. Because I found that, no matter in FAST-SC or FAST v6, after I run the simulink model, I need to use “clear all” command before I do the simulation next time. Otherwise, the MATLAB will crash. I do not no why but it is really frustrating as I forget to clear all sometimes. I am wondering if there is some mathod to overcome this? I use MATLAB 2015a.
Best
XING WEI
Dear Xing,
I don’t think there is an easy solution in FAST v6 for fixing the issue requiring you to “clear all” before running a subsequent simulation of the coupled FAST-Simulink tool. The problem is related to how data is stored in FAST v6. However, if you upgrade to FAST v8, you shouldn’t need to issue “clear all”. I suggest upgrading to FAST v8. Most of the functionality of the old FAST-SC e.g. the ability to model TMDs has been incorporated in FAST v8.
Best regards,
Dear Jason
Thank you for your advice. I have downloaded FAST 8 and start to use it. While I find some problems with TMD section it incorporated. I have reviewed the TMD input file finding that I can specify the stiffness and damping coefficient there. I am wondering if it possible to import TMD stiffness coefficient, damping coefficient and external force in simulink model which is like FAST-SC has provided. Because I want to use external force to import the force to control TMD in simulink model so I am wondering if it is possible in FAST 8?
Best
XING WEI
Dear Xing,
Unfortunately, the ability to provide actuate the TMD through Simulink is not yet a standard feature of FAST v8. But I’m sure this feature would be possible to add through customization of the source code.
Best regards,
Dear Jason,
Recently, I am doing a parameter multiobjective optimization for wind turbines by using MATLAB function “gamultiobj”. The optimization needs multiple iterations calcution. Each calculation for cost function requires calling the OpenFAST simulink model to work out the operating data of turbines. I encountered the problem that MATLAB would crash every time it ran for a long time (about 24-30 hours) and no crash report or error window was provided. I would like to know whether there is a limit on the maximum running time in FAST SFunction, or what exit mechanisms are there.
Sincerely,
ziyang
Dear @Chenzi.Yang,
I’m not aware of specific hard limits to OpenFAST maximum running time and I’m not sure what is causing your MATLAB to crash. Can you clarify if you are running a single OpenFAST simulation for 24-30 hours or is it just that MATLAB is running multiple shorter OpenFAST simulations within a 24-30 hour time period?
Best regards,
Dear Jason,
In my case, the MATLAB is running multiple 800s OpenFAST simulations within a 24-30 hour time period. Each OpenFAST simulation is well completed after 800s.
Best regards
Dear @Chenzi.Yang,
Sounds similar to the issue discussed in the following forum topic: question about running in MATLAB. Does that help?
Best regards,
Dear Jason,
The issue you provide is nearly same as mine. But I can’t find effective solution to it. These days, I upadate my OpenFAST version to the newest but the problem still exists. I have contacted MATLAB technical support and they suspect it is a problem with OpenFAST when it needs to be called multiple times over a long period of time to generate results.
Best regards
Dear @Chenzi.Yang,
Have you tracked the memory usage as MATLAB runs? Is it growing with each successive execution of OpenFAST? This would imply a memory leak–something in OpenFAST not being deallocated properly.
Best regards,
Dear Jason,
When OpenFAST is successfully executed each time, the memory usage does not continue to increase… Since I called it in the sub function of MATLAB script, the memory would be freed after the sub function call.
Best regards
Dear @Chenzi.Yang,
If the memory usage is not increasing as additional OpenFAST simulations are executed, there is no memory leak, so, I’m not sure what else would trigger MATLAB to crash. I’m not sure what to suggest next.
Best regards,