Wrong settings for yaw controll?

Hi there,

I am brand new to the work with FAST and very happy about the good documentation. Thanks a lot for that!

In the first step I tried to simulate some time series with the NREL 5 MW plant and default settings. In the documentation of the NREL 5 MW I found this:

[

But I want to test it with a yawing nacelle. Therefore I ran the simulation with different given options of YCMode in the ServoDyn.dat file:

[code]------- SERVODYN V1.02.* INPUT FILE --------------------------------------------
NREL 5.0 MW Baseline Wind Turbine for Use in Offshore Analysis. Properties from Dutch Offshore Wind Energy Converter (DOWEC) 6MW Pre-Design (10046_009.pdf) and REpower 5M 5MW (5m_uk.pdf)
---------------------- SIMULATION CONTROL --------------------------------------
False Echo - Echo input data to .ech (flag)
“default” DT - Communication interval for controllers (s)
---------------------- PITCH CONTROL -------------------------------------------
5 PCMode - Pitch control mode {0: none, 3: user-defined from routine PitchCntrl, 4: user-defined from Simulink/Labview, 5: user-defined from Bladed-style DLL} (switch)
0 TPCOn - Time to enable active pitch control (s) [unused when PCMode=0]
9999.9 TPitManS(1) - Time to start override pitch maneuver for blade 1 and end standard pitch control (s)
9999.9 TPitManS(2) - Time to start override pitch maneuver for blade 2 and end standard pitch control (s)
9999.9 TPitManS(3) - Time to start override pitch maneuver for blade 3 and end standard pitch control (s) [unused for 2 blades]
2 PitManRat(1) - Pitch rate at which override pitch maneuver heads toward final pitch angle for blade 1 (deg/s)
2 PitManRat(2) - Pitch rate at which override pitch maneuver heads toward final pitch angle for blade 2 (deg/s)
2 PitManRat(3) - Pitch rate at which override pitch maneuver heads toward final pitch angle for blade 3 (deg/s) [unused for 2 blades]
0 BlPitchF(1) - Blade 1 final pitch for pitch maneuvers (degrees)
0 BlPitchF(2) - Blade 2 final pitch for pitch maneuvers (degrees)
0 BlPitchF(3) - Blade 3 final pitch for pitch maneuvers (degrees) [unused for 2 blades]
---------------------- GENERATOR AND TORQUE CONTROL ----------------------------
5 VSContrl - Variable-speed control mode {0: none, 1: simple VS, 3: user-defined from routine UserVSCont, 4: user-defined from Simulink/Labview, 5: user-defined from Bladed-style DLL} (switch)
2 GenModel - Generator model {1: simple, 2: Thevenin, 3: user-defined from routine UserGen} (switch) [used only when VSContrl=0]
94.4 GenEff - Generator efficiency [ignored by the Thevenin and user-defined generator models] (%)
True GenTiStr - Method to start the generator {T: timed using TimGenOn, F: generator speed using SpdGenOn} (flag)
True GenTiStp - Method to stop the generator {T: timed using TimGenOf, F: when generator power = 0} (flag)
9999.9 SpdGenOn - Generator speed to turn on the generator for a startup (HSS speed) (rpm) [used only when GenTiStr=False]
0 TimGenOn - Time to turn on the generator for a startup (s) [used only when GenTiStr=True]
9999.9 TimGenOf - Time to turn off the generator (s) [used only when GenTiStp=True]
---------------------- SIMPLE VARIABLE-SPEED TORQUE CONTROL --------------------
9999.9 VS_RtGnSp - Rated generator speed for simple variable-speed generator control (HSS side) (rpm) [used only when VSContrl=1]
9999.9 VS_RtTq - Rated generator torque/constant generator torque in Region 3 for simple variable-speed generator control (HSS side) (N-m) [used only when VSContrl=1]
9999.9 VS_Rgn2K - Generator torque constant in Region 2 for simple variable-speed generator control (HSS side) (N-m/rpm^2) [used only when VSContrl=1]
9999.9 VS_SlPc - Rated generator slip percentage in Region 2 1/2 for simple variable-speed generator control (%) [used only when VSContrl=1]
---------------------- SIMPLE INDUCTION GENERATOR ------------------------------
9999.9 SIG_SlPc - Rated generator slip percentage (%) [used only when VSContrl=0 and GenModel=1]
9999.9 SIG_SySp - Synchronous (zero-torque) generator speed (rpm) [used only when VSContrl=0 and GenModel=1]
9999.9 SIG_RtTq - Rated torque (N-m) [used only when VSContrl=0 and GenModel=1]
9999.9 SIG_PORt - Pull-out ratio (Tpullout/Trated) (-) [used only when VSContrl=0 and GenModel=1]
---------------------- THEVENIN-EQUIVALENT INDUCTION GENERATOR -----------------
9999.9 TEC_Freq - Line frequency [50 or 60] (Hz) [used only when VSContrl=0 and GenModel=2]
9998 TEC_NPol - Number of poles [even integer > 0] (-) [used only when VSContrl=0 and GenModel=2]
9999.9 TEC_SRes - Stator resistance (ohms) [used only when VSContrl=0 and GenModel=2]
9999.9 TEC_RRes - Rotor resistance (ohms) [used only when VSContrl=0 and GenModel=2]
9999.9 TEC_VLL - Line-to-line RMS voltage (volts) [used only when VSContrl=0 and GenModel=2]
9999.9 TEC_SLR - Stator leakage reactance (ohms) [used only when VSContrl=0 and GenModel=2]
9999.9 TEC_RLR - Rotor leakage reactance (ohms) [used only when VSContrl=0 and GenModel=2]
9999.9 TEC_MR - Magnetizing reactance (ohms) [used only when VSContrl=0 and GenModel=2]
---------------------- HIGH-SPEED SHAFT BRAKE ----------------------------------
0 HSSBrMode - HSS brake model {0: none, 1: simple, 3: user-defined from routine UserHSSBr, 4: user-defined from Simulink/Labview, 5: user-defined from Bladed-style DLL} (switch)
9999.9 THSSBrDp - Time to initiate deployment of the HSS brake (s)
0.6 HSSBrDT - Time for HSS-brake to reach full deployment once initiated (sec) [used only when HSSBrMode=1]
28116.2 HSSBrTqF - Fully deployed HSS-brake torque (N-m)
---------------------- NACELLE-YAW CONTROL -------------------------------------
5 YCMode - Yaw control mode {0: none, 1: simple, 3: user-defined from routine UserYawCont, 4: user-defined from Simulink/Labview, 5: user-defined from Bladed-style DLL} (switch)
0 TYCOn - Time to enable active yaw control (s) [unused when YCMode=0]
0 YawNeut - Neutral yaw position–yaw spring force is zero at this yaw (degrees)
9.02832E+09 YawSpr - Nacelle-yaw spring constant (N-m/rad)
1.916E+07 YawDamp - Nacelle-yaw damping constant (N-m/(rad/s))
9999.9 TYawManS - Time to start override yaw maneuver and end standard yaw control (s)
2 YawManRat - Yaw maneuver rate (in absolute value) (deg/s)
0 NacYawF - Final yaw angle for override yaw maneuvers (degrees)
---------------------- TUNED MASS DAMPER ---------------------------------------
False CompNTMD - Compute nacelle tuned mass damper {true/false} (flag)
“NREL5MW_ServoDyn_TMD.dat” NTMDfile - Name of the file for nacelle tuned mass damper (quoted string) [unused when CompNTMD is false]
---------------------- BLADED INTERFACE ----------------------------------------
“ServoData\DISCON_win32.dll” DLL_FileName - Name/location of the dynamic library {.dll [Windows] or .so [Linux]} in the Bladed-DLL format (-) [used only with Bladed Interface]
0 NacYaw_North - Reference yaw angle of the nacelle when the upwind end points due North (deg) [used only with Bladed Interface]
0 Ptch_Cntrl - Record 28: Use individual pitch control {0: collective pitch; 1: individual pitch control} (switch) [used only with Bladed Interface]
0 Ptch_SetPnt - Record 5: Below-rated pitch angle set-point (deg) [used only with Bladed Interface]
0 Ptch_Min - Record 6: Minimum pitch angle (deg) [used only with Bladed Interface]
0 Ptch_Max - Record 7: Maximum pitch angle (deg) [used only with Bladed Interface]
0 PtchRate_Min - Record 8: Minimum pitch rate (most negative value allowed) (deg/s) [used only with Bladed Interface]
0 PtchRate_Max - Record 9: Maximum pitch rate (deg/s) [used only with Bladed Interface]
0 Gain_OM - Record 16: Optimal mode gain (Nm/(rad/s)^2) [used only with Bladed Interface]
0 GenSpd_MinOM - Record 17: Minimum generator speed (rpm) [used only with Bladed Interface]
0 GenSpd_MaxOM - Record 18: Optimal mode maximum speed (rpm) [used only with Bladed Interface]
0 GenSpd_Dem - Record 19: Demanded generator speed above rated (rpm) [used only with Bladed Interface]
0 GenTrq_Dem - Record 22: Demanded generator torque above rated (Nm) [used only with Bladed Interface]
0 GenPwr_Dem - Record 13: Demanded power (W) [used only with Bladed Interface]
---------------------- BLADED INTERFACE TORQUE-SPEED LOOK-UP TABLE -------------
0 DLL_NumTrq - Record 26: No. of points in torque-speed look-up table {0 = none and use the optimal mode parameters; nonzero = ignore the optimal mode PARAMETERs by setting Record 16 to 0.0} (-) [used only with Bladed Interface]
GenSpd_TLU GenTrq_TLU
(rpm) (Nm)
---------------------- OUTPUT --------------------------------------------------
True SumPrint - Print summary data to .sum (flag) (currently unused)
1 OutFile - Switch to determine where output will be placed: {1: in module output file only; 2: in glue code output file only; 3: both} (currently unused)
True TabDelim - Use tab delimiters in text tabular output file? (flag) (currently unused)
“ES10.3E2” OutFmt - Format used for text tabular output (except time). Resulting field should be 10 characters. (quoted string) (currently unused)
0 TStart - Time to begin tabular output (s) (currently unused)
OutList - The next line(s) contains a list of output parameters. See OutListParameters.xlsx for a listing of available output channels, (-)
“GenPwr” - Electrical generator power and torque
“GenTq” - Electrical generator power and torque
“YawMomCom” - Nacelle yaw moment command
“NTMD_XQ, NTMD_XQD”
“NTMD_YQ, NTMD_YQD”
END of input file (the word “END” must appear in the first 3 columns of this last OutList line)

[/code]

Only the option 5 user-defined from Bladed-style DLL enabled a yawing nacelle. Is that normal? I expected a yawing nacelle at least to the option 1 simple.

After the simulation with option 5 I noticed a wrong yaw position YawPzn (like in the graph above). The wind direction is constant with 0 deg, but the nacelle yaws anyways to about -3.5 deg. Most likely I did something wrong in the settings in the ServoDyn.dat file? Can anybody give me some tips how I can use a yaw controller or do I have to write my own with UserYawCont()?

Thanks for help.

[1] Jonkman, J.; et al.: Definition of a 5-MW Reference Wind Turbine for Offshore System Development, 02.2009

Dear Achim,

You shouldn’t select YCMode = 5 (user-defined yaw control from Bladed-style DLL) unless you’ve compiled your own Bladed-style DLL with your own yaw controller. You appear to be using the default NREL 5-MW Bladed-style DLL controller, which does not control yaw. (Instead, the default NREL 5-MW Bladed-style DLL controller always commands the yaw rate to be zero, and ServoDyn will treat this as a command to maintain the current yaw angle, which can lead to a small drift in the yaw angle over time.)

There is currently no implementation in ServoDyn for YCMode = 1 (simple), so, you shouldn’t select that either.

You can use the override yaw maneuvers (via ServoDyn input parameters TYawManS, YawManRat, and NacYawF) to force simple linear yaw ramps.

If you need more sophisticated yaw action than what is possible with the override yaw maneuvers, you will have to define your own yaw-control logic either in UserYawCont (YCMode = 3), Simulink (YCMode = 4), or a Bladed-style DLL (YCMode = 5).

I hope that helps.

Best regards,

Dear Jason,

thank you for your fast reply. In this case I have to find out how to compile FAST (makefile) with gfortran to specify the UserYawCont() in UserSubs.f90.

I already read the CompilingInstructions_FASTv8.pdf., downloaded and installed MinGW w64 for my windows 8 64 bit computer. I also downloaded the required dll’s and lib’s, described in the pdf and modified the makefile for 64bit with the appropriate path for the liblapack.lib etc.:

   # 32-bit or 64-bit?
#BITS = 32
BITS = 64


   # Location of source files for FAST, and its modules.

FAST_DIR     = ../Source

NWTC_Lib_DIR = $(FAST_DIR)/dependencies/NWTC_Library
NETLIB_DIR   = $(FAST_DIR)/dependencies/NetLib
ED_DIR       = $(FAST_DIR)/dependencies/ElastoDyn
SrvD_DIR     = $(FAST_DIR)/dependencies/ServoDyn
AD_DIR       = $(FAST_DIR)/dependencies/AeroDyn
IfW_DIR      = $(FAST_DIR)/dependencies/InflowWind
HD_DIR       = $(FAST_DIR)/dependencies/HydroDyn
SD_DIR       = $(FAST_DIR)/dependencies/SubDyn
MAP_DIR      = $(FAST_DIR)/dependencies/MAP
FEAM_DIR     = $(FAST_DIR)/dependencies/FEAMooring
MD_DIR       = $(FAST_DIR)/dependencies/MoorDyn
IceF_DIR     = $(FAST_DIR)/dependencies/IceFloe
IceD_DIR     = $(FAST_DIR)/dependencies/IceDyn

TMD_DIR      = $(SrvD_DIR)
DWM_DIR      = $(AD_DIR)
HD_DIR_Reg   = $(HD_DIR)
IfW_DIR_Reg  = $(IfW_DIR)
BIN_DIR      = ../bin

   # Names and locations of the Registry, MAP libraries, and instructions for linking with LAPACK.
   # You will probably need to change these for your system.

ifeq ($(OS),Windows_NT)
   Registry     = $(BIN_DIR)/Registry_win32.exe
   MAP_lib      = $(MAP_DIR)/MAP_x64.lib
   LAPACK_LINK  = -llapack -lblas -LC:/LAPACK/x64
   #MAP_lib      = $(MAP_DIR)/MAP_Win32.lib
   #LAPACK_LINK  = -llapack -lblas -LC:/LAPACK/win32
else
   Registry     = registry.exe
   MAP_lib      = $(MAP_DIR)/MAP.so
   LAPACK_LINK  = -llapack -lblas
endif


   # Name of compiler to use and flags to use.
FC      = gfortran

FFLAGS = -g -O0 -fbacktrace -ffree-line-length-none -x f95-cpp-input -fcheck=all

LDFLAGS = -O2 -m$(BITS) -fbacktrace


   # Name of compiler to use and flags to use.
#FC      = gfortran

#FFLAGS  = -O2 -m$(BITS) -fbacktrace -ffree-line-length-none -x f95-cpp-input
#LDFLAGS = -O2 -m$(BITS) -fbacktrace -Wl,--stack=999999999,--large-address-aware

#FFLAGS  = -O0 -m$(BITS) -fbacktrace -ffree-line-length-none -x f95-cpp-input -g -pg
#LDFLAGS = -O0 -m$(BITS) -fbacktrace -Wl,--stack=999999999,--large-address-aware -g -pg

#-DDOUBLE_PRECISION

# -mthreads
# some useful gfortran options:
#  -DFPE_TRAP_ENABLED
#  -Wl,--large-address-aware   # not necessary when $(BITS) is 64 (64-bit target)
#  -Wl,--stack=999999999       # not necessary when $(BITS) is 64
#  -Wconversion-extra -Wconversion
#  -fdefault-real-8 -fcheck=bounds,do,mem,pointer -std=f2003 -O0 -v -Wall
#  -pg                          # generate debugging info for debugger
# http://gcc.gnu.org/onlinedocs/gfortran/Option-Index.html#Option-Index
#
# makefile:
# --warn-undefined-variables



   # Destination and RootName for executable

OUTPUT_NAME = FAST
DEST_DIR    = ..\bin

But I don’t know the next step. Neither the command ggc makefile , gfortran makefile nor make in the command prompt does compile FAST.
Compilation_Error.png
As you see I am also new to use compilers. I am very grateful for more assistance.

Achim,

I answered your similar compiling question here: Compiling Fast v8 using gfortran

The command you need is mingw32-make