I have tried to implement a MATLAB version of the Example 05 within the ROSCO toolbox. I have wrote my own header file from the Fortran source code as MATLAB requires a .h file to be used with the loadlibrary function. The header file is as follows:
What I have basically done so far is ran the Python Example 5 script for the initial DLL call. I extract the inputs and outputs for this DLL call. I use the same inputs in MATLAB to check if I get the same output. However when I run my MATLAB script I am getting the ROSCO output of aviFAIL = -1. I have checked the DISCON.IN file and timestep to see if there are any values which would result in this error and there are no incorrect input values. The avcMSG error message I am getting is as follows:
ROSCO:SetParameters:CheckInputs:F_FlpCornerFreq(1)øÉÂ
Therefore would you kindly be able to advise on what the possible source is for this error message? The CornerFreq that I am using is greater than zero.
Hello Gerard,
Apologies for responding so late to your query. Although this problem can be approached in a couple of different ways like using a header file approach or by building a visual studio solution, I opted for manual conversion of source code from Fortran to MATLAB as I wanted to understand the controller algorithm.
I have the .m files for various functions used in the controller but I haven’t tested them yet due to some other work commitment.
I have replied to your email with more details.
Hello Gerard,
This is indeed a strange error to be receiving. I would suggest cross-referencing your DISCON.IN file with the read function in ROSCO here: github.com/NREL/ROSCO/blob/7e10 … s.f90#L233
Perhaps you have an extra line or are missing a line in your DISCON.IN file. For sanity’s sake, adding print statements and re-compiling ROSCO accordingly could help as well. For example, you could add: print *, CntrPar%F_FlpCornerFreq
here: github.com/NREL/ROSCO/blob/7e10 … s.f90#L576
to check if the parameters are what you expect.
Hopefully this points to the underlying error a bit better!
I recently tried using ROSCO (RoSCO-2.7.0) in matlab&simulink to simulate the control of IEA15MW semi-submersible WT. Unfortunately I ran into the following problem. I gave my matlab window display (.txt), runFAST.m, FAST_SFunc.mexw64, OpenFAST-Simulink_x64.dll, MoorDyn.dat. I noticed that when (CompMooring - Compute mooring system (switch) {0=None; 1=MAP++; 2=FEAMooring; 3=MoorDyn; When 4=OrcaFlex} )is set to 0, it can barely run, but in the simulation result, the data after 13.863s are all NaN except the time column. Do you have any suggestions or ideas?
In addition, I found Test_Cases without NREL5MW semi-submersible model. How should I add it to realize the control of NREL5MW semi-submersible WT with ROSCO.
The Matlab portions of the ROSCO repository are not as supported or tested as the Fortran/python portions. We typically refer users to the python examples.
Thank you for your prompt reply. I’m sorry if I didn’t make myself clear. First, when I was running ROSCO properly (CompMooring=3), I had the problem shown below. Uploading: Normal-1.jpg… Uploading: Normal-2.jpg…
I am now very confused about how to set up to normally simulate an IEA15MW semi WT with ROSCO. If you have any more suggestions or references, I would appreciate it.
I suggest running the model provided in Test_Cases/ from the command line and see how it differs from your setup.
There may be an issue with the controller in Simulink. The pitch looks like it’s changing too quickly. If you are able to reduce the pitch gains, I would try that.
Hi Daniel,
I recently tried to learn rosco controller, and I want to implement rosco controller into AeroDyn driver which is standalone version of aerodyn.
Before, I have tried to pass the logics of conventional NREL 5MW discon.dll controller into subroutines in AeroDyn driver and that works.
However, the advance rosco controller is more complicated and i can’t find a visual studio solution so it is difficult for me to implement rosco controller into AeroDyn driver in a simple way like legcy conventional NREL 5MW discon.dll.
Can you or someone else help me? How can I realize the implementation of ROSCO to AeroDyn driver.