Running OpenFAST with Simulink

Dear all,

I am currently working on the electromechanical behavior of the wind turbine under several transiet condition, such as electrical fault in grid network and turbulent wind. I have designed a power system model with the Simulink and would like to examine the behavior of the wind turbine with OpenFAST.

To start with OpenFAST on Simulink, I have tried to execute the Run Open Loop in Simulink. After the trial run of the OpenLoop, I have several question on the execution on Simulink:

1. Execution of OpenFAST on Simulink

I have tried to execute the ‘5MW_OC4Semi_WSt_WavesWN’ test case on simulink and I am not sure whether the result log is match with the execution in command prompt as I observed some different log. Please refer to the output log below:

>> Run_OpenLoop

 **************************************************************************************************
 OpenFAST

 Copyright (C) 2023 National Renewable Energy Laboratory
 Copyright (C) 2023 Envision Energy USA LTD

 This program is licensed under Apache License Version 2.0 and comes with ABSOLUTELY NO WARRANTY.
 See the "LICENSE" file distributed with this software for details.
 **************************************************************************************************

 OpenFAST-Unversioned from e8ec53f9c7f9d3f6a13bfb61dba12a0ca04d8a2f
 Compile Info:
  - Compiler: Intel(R) Fortran Compiler 2021
  - Architecture: 64 bit
  - Precision: single
  - OpenMP: No
  - Date: Mar 14 2023
  - Time: 13:38:57
 Execution Info:
  - Date: 03/15/2023
  - Time: 22:48:12+0800

 OpenFAST input file heading:
     FAST Certification Test #25: NREL 5.0 MW Baseline Wind Turbine with OC4-DeepCwind semi
     configuration, for use in offshore analysis

 Running ElastoDyn.
 Nodal outputs section of ElastoDyn input file not found or improperly formatted.
 Running AeroDyn.
 AD15 Nodal Outputs: Nodal output section of AeroDyn input file not found or improperly formatted.
 Skipping nodal outputs.
 Warning: Turning off Unsteady Aerodynamics because polar has constant data. (node 1, blade 1)
 Warning: Turning off Unsteady Aerodynamics because polar has constant data. (node 2, blade 1)
 Warning: Turning off Unsteady Aerodynamics because polar has constant data. (node 3, blade 1)
 Warning: Turning off Unsteady Aerodynamics because polar has constant data. (node 4, blade 1)
 Warning: Turning off Unsteady Aerodynamics because polar has constant data. (node 1, blade 2)
 Warning: Turning off Unsteady Aerodynamics because polar has constant data. (node 2, blade 2)
 Warning: Turning off Unsteady Aerodynamics because polar has constant data. (node 3, blade 2)
 Warning: Turning off Unsteady Aerodynamics because polar has constant data. (node 4, blade 2)
 Warning: Turning off Unsteady Aerodynamics because polar has constant data. (node 1, blade 3)
 Warning: Turning off Unsteady Aerodynamics because polar has constant data. (node 2, blade 3)
 Warning: Turning off Unsteady Aerodynamics because polar has constant data. (node 3, blade 3)
 Warning: Turning off Unsteady Aerodynamics because polar has constant data. (node 4, blade 3)
 Running InflowWind.
 Running HydroDyn.
  Generating incident wave kinematics and current time history.
  Reading in WAMIT output with root name
  "C:\Users\Ming\Desktop\OpenFAST_20230127\openfast-3.4.0\openfast-3.4.0\reg_tests\r-test\glue-code
  s\openfast\5MW_OC4Semi_WSt_WavesWN/../5MW_Baseline/HydroData/marin_semi".
  Computing radiation impulse response functions and wave diffraction forces.
  Calculating second order difference-frequency force using the full quadratic transfer function.
  Calculating second order sum-frequency force using the full quadratic transfer function.
 Running MoorDyn (v2.0.0, 2022-12-08).
    This is MoorDyn v2, with significant input file changes from v1.
    Copyright: (C) 2022 National Renewable Energy Laboratory, (C) 2019 Matt Hall
    Parsing MoorDyn input file:
    C:\Users\Ming\Desktop\OpenFAST_20230127\openfast-3.4.0\openfast-3.4.0\reg_tests\r-test\glue-cod
    es\openfast\5MW_OC4Semi_WSt_WavesWN/NRELOffshrBsline5MW_OC4DeepCwindSemi_MoorDyn.dat
    Created mooring system:  3 lines, 6 points, 0 rods, 0 bodies.
    Finalizing initial conditions using dynamic relaxation.

t=2  FairTen 1: 8.67045E+05, 1, 2
t=4  FairTen 1: 9.76411E+05, 8.67045E+05, 1
t=6  FairTen 1: 1.02465E+06, 9.76411E+05, 8.67045E+05
t=8  FairTen 1: 9.87921E+05, 1.02465E+06, 9.76411E+05
t=10  FairTen 1: 1.00205E+06, 9.87921E+05, 1.02465E+06
t=12  FairTen 1: 1.00744E+06, 1.00205E+06, 9.87921E+05
t=14  FairTen 1: 1.00105E+06, 1.00744E+06, 1.00205E+06
t=16  FairTen 1: 9.84904E+05, 1.00105E+06, 1.00744E+06
t=18  FairTen 1: 1.02081E+06, 9.84904E+05, 1.00105E+06
t=20  FairTen 1: 9.98939E+05, 1.02081E+06, 9.84904E+05
t=22  FairTen 1: 9.90994E+05, 9.98939E+05, 1.02081E+06
t=24  FairTen 1: 1.00537E+06, 9.90994E+05, 9.98939E+05
t=26  FairTen 1: 1.00102E+06, 1.00537E+06, 9.90994E+05
t=28  FairTen 1: 1.00011E+06, 1.00102E+06, 1.00537E+06
t=30  FairTen 1: 9.99080E+05, 1.00011E+06, 1.00102E+06
t=32  FairTen 1: 1.00605E+06, 9.99080E+05, 1.00011E+06
t=34  FairTen 1: 9.93077E+05, 1.00605E+06, 9.99080E+05
t=36  FairTen 1: 1.00215E+06, 9.93077E+05, 1.00605E+06
t=38  FairTen 1: 1.00483E+06, 1.00215E+06, 9.93077E+05
t=40  FairTen 1: 9.96028E+05, 1.00483E+06, 1.00215E+06
t=42  FairTen 1: 1.00005E+06, 9.96028E+05, 1.00483E+06
t=44  FairTen 1: 1.00083E+06, 1.00005E+06, 9.96028E+05
t=46  FairTen 1: 1.00198E+06, 1.00083E+06, 1.00005E+06
t=48  FairTen 1: 9.96932E+05, 1.00198E+06, 1.00083E+06
t=50  FairTen 1: 1.00376E+06, 9.96932E+05, 1.00198E+06
t=52  FairTen 1: 9.99020E+05, 1.00376E+06, 9.96932E+05
    Fairlead tensions converged to 1 0x0.07fff4df77520p-1022fter 52 seconds.
    MoorDyn initialization completed.
 Running ServoDyn.
 Running ServoDyn Interface for Bladed Controllers (using Intel Visual Fortran for Windows/Matlab).
 Using legacy Bladed DLL interface.

 FAST_InitializeAll:SrvD_Init:ValidatePrimaryData:Yaw angle and rate are not commanded from
 Simulink model.
 ValidatePrimaryData:Pitch angles are not commanded from Simulink model.
 ValidatePrimaryData:Generator torque and power are not commanded from Simulink model.
 ValidatePrimaryData:HSS brake is not commanded from Simulink model.
 ValidatePrimaryData:Airfoil control is not commanded from Simulink model.
 ValidatePrimaryData:Cable control is not commanded from Simulink model.

  Time: 0 of 5 seconds.

Time: 1 of 5 seconds.  Estimated final completion at 22:48:39.

Time: 2 of 5 seconds.  Estimated final completion at 22:48:36.

Time: 3 of 5 seconds.  Estimated final completion at 22:48:35.

Time: 4 of 5 seconds.  Estimated final completion at 22:48:35.

Time: 5 of 5 seconds.  Estimated final completion at 22:48:35.

  OpenFAST completed.

May I know if the execution is correct?

2. Input of the OpenLoop Model

I noticed that the are 7 input in the OpenLoop model of the Simulink, which looks like a controller. I guess these are input parameter of the Fast_SFunc to simulate the mechanical behaviour of the turbine model?

3. Output of the FAST_SFunc
After I have executed the model on Simulink, I got a list of data which stored in a .outb file. May I know if there is any full list of the output data for my referecne?
Also, I noticed that there are some Matlab Toolbox that allow users to consolidate and plot the simulation result. Is there any documentation about the usage of the Toolbox?

Thank you so much for offering help.

Best regards,
Jacky Cheung

Dear @Jacky.Cheung,

Here are my responses to your questions:

  1. The simulation appears to have run as expected, with typical warnings and no fatal errors.

  2. Inputs to the OpenFAST S-Function from Simulink are the commands expected to be set from the controller (blade pitch, generator torque, nacelle yaw, etc.).

  3. The time-series outputs written to the file are those you’ve selected in the OutList of each module. A summary of this output list is written to the OpenFAST summary (.sum) file if you’ve output that by setting SumPrint = True in the OpenFAST primary (.fst) input file.

There is a high-level description of the MATLAB toolbox and detailed description of some of the core functions in the ReadMe.md file (GitHub - OpenFAST/matlab-toolbox: Collection of Matlab tools developed for use with OpenFAST); beyond that; each script has documentation on its use at the top.

A script to read the time series binary output data into MATLAB is available here: matlab-toolbox/ReadFASTbinary.m at main · OpenFAST/matlab-toolbox · GitHub.

Best regards,