Running OpenFAST with Simulink Type 4 Wind Turbine Generator Model

Dear @Jacky.Cheung,

I haven’t tried to understand the details of your Simulink model, but if you want the OpenFAST model to respond properly, you should set the generator torque, generator power, and blade-pitch inputs to the OpenFAST S-Function appropriately.

The time step (DT) set in the OpenFAST primary input (.fst) input file determines the rate at which the OpenFAST S-Function is called.

Best regards,

Dear Jason,

I have used the three-phase fault module to introduce a grid fault to the two-area power system, which the fault location is applied at the Bus 9.

The fault is applied at t = 45 and cleared at t = 45.15, which produce a transient oscillation in the electrical generator power and the generator speed.

Generator Power of the Synchronous Machine pu


Generator Speed of the Synchronous Machine pu

Since the generator power and torque is solely controlled by the OpenFAST, I am not able to introduce the transient oscillation to the wind turbine (since the OpenFAST only used as input to the simulink model).

Generator Power of Wind Turbine

As per my understanding that the purpose of the torque controller is for controlling the power and torque to achieve optimal operating point, may I know if I could introduce the transient to the wind turbine by the torque controller in the simulink model?

Thank you.

Best regards,
Jacky

Dear @Jacky.Cheung,

When VSContrl is set to 5 in ServoDyn, OpenFAST will receive the generator torque and pitch commands from Simulink. You can set the torque and pitch however you want (including the introduction of grid faults) and the OpenFAST wind turbine model will respond accordingly. You don’t need to specify only operating control actions.

Best regards,

Dear Jason,

I have tried to introduce the disturbance to the wind turbine by the torque controller.

I have used the wind as an input to the MATLAB function to calculate the optimal power of the wind turbine for the Generator Power of the Torque Controller. For the Generator Torque, I have used the
generator power (output of the OpenFAST) and divide the rotor speed [wr_pu] (output of the simulink generator module). In this case, I have successfully introduce to disturbance to the wind turbine and observed the disturbance in the output of the OpenFAST.

Meanwhile, I would like to change the input wind speed from a steady one to a random wind speed with an average wind speed of 13m/s. Is there any method to change it? For the use of Turbsim, I have tried to run the program and got a .wnd file. May I know how to use that as an input file to the Inflowind module in OpenFAST?

Thank you.

Best regards,
Jacky

Dear @Jacky.Cheung,

I would normally recommend outputting the TurbSim-formatted wind data (.bts) file by setting WrADFF = True in TurbSim, which you can select in InflowWind by setting WindType = 3.

Best regards,

Dear Jason,

Thanks for the information. I have built the .bts file and tried to let the InflowWind module read the wind profile, but I got the following error prompted in Simulink:


Error reported by S-function 'FAST_SFunc' in 'Full_system_with_OpenFAST_v4/Wind Turbine/Wind Turbine Type 4/FAST Nonlinear Wind Turbine/S-Function':
FAST_Solution0:CalcOutputs_And_SolveForInputs:SolveOption2:SolveOption2c_Inp2AD_SrvD:InflowWind_CalcOutput:CalcOutput:IfW_FFWind_CalcOutput [position=(9.2351, -0.3663, 41.16)  in wind-file coordinates]: FF wind array boundaries violated. Grid too small in Z direction (height (Z=41.16 m) is below the grid and no tower points are defined).
InflowWind_CalcOutput:InflowWind_GetSpatialAverage:CalcOutput:IfW_FFWind_CalcOutput [position=(26.333, 4.6584, 128.36)  in wind-file coordinates]: FF wind array boundaries violated. Grid too small in Z direction (Z=128.36 m is above the grid).

Please also refer to the TurbSim .inp file below:

---------TurbSim v2.00.* Input File------------------------
Example input file for TurbSim.
---------Runtime Options-----------------------------------
False     Echo            - Echo input data to <RootName>.ech (flag)
2318573   RandSeed1       - First random seed  (-2147483648 to 2147483647)
RANLUX    RandSeed2       - Second random seed (-2147483648 to 2147483647) for intrinsic pRNG, or an alternative pRNG: "RanLux" or "RNSNLW"
False     WrBHHTP         - Output hub-height turbulence parameters in binary form?  (Generates RootName.bin)
False     WrFHHTP         - Output hub-height turbulence parameters in formatted form?  (Generates RootName.dat)
False     WrADHH          - Output hub-height time-series data in AeroDyn form?  (Generates RootName.hh)
True	  WrADFF          - Output full-field time-series data in TurbSim/AeroDyn form? (Generates RootName.bts)
True      WrBLFF          - Output full-field time-series data in BLADED/AeroDyn form?  (Generates RootName.wnd)
False     WrADTWR         - Output tower time-series data? (Generates RootName.twr)
False     WrFMTFF         - Output full-field time-series data in formatted (readable) form?  (Generates RootName.u, RootName.v, RootName.w)
False     WrACT           - Output coherent turbulence time steps in AeroDyn form? (Generates RootName.cts)
True      Clockwise       - Clockwise rotation looking downwind? (used only for full-field binary files - not necessary for AeroDyn)
 0        ScaleIEC        - Scale IEC turbulence models to exact target standard deviation? [0=no additional scaling; 1=use hub scale uniformly; 2=use individual scales]

--------Turbine/Model Specifications-----------------------
13        NumGrid_Z       - Vertical grid-point matrix dimension
13        NumGrid_Y       - Horizontal grid-point matrix dimension
0.05      TimeStep        - Time step [seconds]
600       AnalysisTime    - Length of analysis time series [seconds] (program will add time if necessary: AnalysisTime = MAX(AnalysisTime, UsableTime+GridWidth/MeanHHWS) )
"ALL"     UsableTime      - Usable length of output time series [seconds] (program will add GridWidth/MeanHHWS seconds unless UsableTime is "ALL")
84.2876   HubHt           - Hub height [m] (should be > 0.5*GridHeight)
80.00     GridHeight      - Grid height [m]
80.00     GridWidth       - Grid width [m] (should be >= 2*(RotorRadius+ShaftLength))
0         VFlowAng        - Vertical mean flow (uptilt) angle [degrees]
0         HFlowAng        - Horizontal mean flow (skew) angle [degrees]

--------Meteorological Boundary Conditions-------------------
"SMOOTH"  TurbModel       - Turbulence model ("IECKAI","IECVKM","GP_LLJ","NWTCUP","SMOOTH","WF_UPW","WF_07D","WF_14D","TIDAL","API","USRINP","TIMESR", or "NONE")
"unused"  UserFile        - Name of the file that contains inputs for user-defined spectra or time series inputs (used only for "USRINP" and "TIMESR" models)
"1-Ed3"   IECstandard     - Number of IEC 61400-x standard (x=1,2, or 3 with optional 61400-1 edition number (i.e. "1-Ed2") )
"A"       IECturbc        - IEC turbulence characteristic ("A", "B", "C" or the turbulence intensity in percent) ("KHTEST" option with NWTCUP model, not used for other models)
"NTM"     IEC_WindType    - IEC turbulence type ("NTM"=normal, "xETM"=extreme turbulence, "xEWM1"=extreme 1-year wind, "xEWM50"=extreme 50-year wind, where x=wind turbine class 1, 2, or 3)
default   ETMc            - IEC Extreme Turbulence Model "c" parameter [m/s]
"PL"      WindProfileType - Velocity profile type ("LOG";"PL"=power law;"JET";"H2L"=Log law for TIDAL model;"API";"USR";"TS";"IEC"=PL on rotor disk, LOG elsewhere; or "default")
"unused"  ProfileFile     - Name of the file that contains input profiles for WindProfileType="USR" and/or TurbModel="USRVKM" [-]
84.2876   RefHt           - Height of the reference velocity (URef) [m]
12      URef            - Mean (total) velocity at the reference height [m/s] (or "default" for JET velocity profile) [must be 1-hr mean for API model; otherwise is the mean over AnalysisTime seconds]
default   ZJetMax         - Jet height [m] (used only for JET velocity profile, valid 70-490 m)
default   PLExp           - Power law exponent [-] (or "default")
default   Z0              - Surface roughness length [m] (or "default")

--------Non-IEC Meteorological Boundary Conditions------------
default   Latitude        - Site latitude [degrees] (or "default")
0.05      RICH_NO         - Gradient Richardson number [-]
default   UStar           - Friction or shear velocity [m/s] (or "default")
default   ZI              - Mixing layer depth [m] (or "default")
default   PC_UW           - Hub mean u'w' Reynolds stress [m^2/s^2] (or "default" or "none")
default   PC_UV           - Hub mean u'v' Reynolds stress [m^2/s^2] (or "default" or "none")
default   PC_VW           - Hub mean v'w' Reynolds stress [m^2/s^2] (or "default" or "none")

--------Spatial Coherence Parameters----------------------------
default   SCMod1           - u-component coherence model ("GENERAL", "IEC", "API", "NONE", or "default")
default   SCMod2           - v-component coherence model ("GENERAL", "IEC", "NONE", or "default")
default   SCMod3           - w-component coherence model ("GENERAL", "IEC", "NONE", or "default")
default   InCDec1          - u-component coherence parameters for general or IEC models [-, m^-1] (e.g. "10.0  0.3e-3" in quotes) (or "default")
default   InCDec2          - v-component coherence parameters for general or IEC models [-, m^-1] (e.g. "10.0  0.3e-3" in quotes) (or "default")
default   InCDec3          - w-component coherence parameters for general or IEC models [-, m^-1] (e.g. "10.0  0.3e-3" in quotes) (or "default")
default   CohExp           - Coherence exponent for general model [-] (or "default")

--------Coherent Turbulence Scaling Parameters-------------------
"C:/Yiwork_NREL/OffshoreWind/Turbsim/Test/EventData"  CTEventPath     - Name of the path where event data files are located
"Random"  CTEventFile     - Type of event files ("LES", "DNS", or "RANDOM")
true      Randomize       - Randomize the disturbance scale and locations? (true/false)
 1.0      DistScl         - Disturbance scale [-] (ratio of event dataset height to rotor disk). (Ignored when Randomize = true.)
 0.5      CTLy            - Fractional location of tower centerline from right [-] (looking downwind) to left side of the dataset. (Ignored when Randomize = true.)
 0.5      CTLz            - Fractional location of hub height from the bottom of the dataset. [-] (Ignored when Randomize = true.)
30.0      CTStartTime     - Minimum start time for coherent structures in RootName.cts [seconds]

====================================================
! NOTE: Do not add or remove any lines in this file!
====================================================

In the input file, I have only changed the mean velocity to 12 m/s. May I know the reason why the error prompted out? Is that related the the required hub height of the TurbSim wind profile not matching with the NERL 5MW Baseline model?

Thank you.

Best regards,
Jacky

Dear @Jacky.Cheung,

Similar questions have been asked before. You must ensure that all aerodynamic analysis nodes in the OpenFAST model reside within the wind domain (length/time, width, height) specified within TurbSim. Your hub height, grid height, and grid width in your TurbSim input file are not specified correctly for the NREL 5-MW baseline wind turbine.

Best regards,

Dear Jason,

Thanks for the information. I have changed the value of the hub height and grid dimension to fixed the error:

90   HubHt           - Hub height [m] (should be > 0.5*GridHeight)
170     GridHeight      - Grid height [m]
170     GridWidth       - Grid width [m] (should be >= 2*(RotorRadius+ShaftLength))

and I observed the turbulence in the wind output.

However, I got another problem regarding the interface with simulink model.

gen
ln my simulink model, I have tried to use the GenPwr as an input to the synchronous generator pu standard for connecting OpenFAST wind turbine to the grid. I am assuming that the GenPwr output of the OpenFAST model is mechanical power and I used this as an input to the synchronous machine pu standard to converting the mechanical power to electrical power. In this module, I also got the rotor speed, which the speed is different from the OpenFAST output. As per my understanding that the GenSpeed is representing the high speed shaft side since the OpenFAST also included the gearbox and drivetrain model, I am not sure if my model is accurately linking up the OpenFAST and simulink.

May I know my assumption on the mechnical power output of the OpenFAST is correct?
Regarding my model, do you have any suggestion for me to modify the model?

Thank you.

Best regards,
Jacky

Dear @Jacky.Cheung,

I can’t suggest modifications to your Simulink implementation, but I’ll just clarify that:

  • Indeed, the GenSpeed output of the ElastoDyn module of OpenFAST is the speed of the high-speed shaft.
  • The GenPwr output of the ServoDyn module of OpenFAST is the electrical power, not the mechanical power. Moreover, this output is simply passed through the OpenFAST S-Function because GenPwr is also an input to the S-Function from Simulink; OpenFAST does not really use the value for anything.
  • If you want the mechanical power, you can multiple GenTq (also an input to the S-Function) with GenSpeed. GenTq is used by OpenFAST to apply a torque to the generator, which will cause acceleration or deceleration of the shaft if the torque does not balance with the aerodynamic torque.

Best regards,