Validation of Yaw-rate control in DRC

Dear all,

I meet some problem when I trying to validate the Yaw-rate control in DRC.
At the first, I want to reproduce the bandwidth test in deliverable report No.D2.1 from CL-Windcon(shows blow).
Ref: [url]http://www.clwindcon.eu/wp-content/uploads/2017/03/CL-Windcon-D2.1-Wind-turbine-controllers.pdf[/url]


In the calculation, I use compiled DLL of DRC and input the defult DISCON.IN parameter file of NREL5MW wind turbine to DRC controller.
As the result, I obatained a very stranger time series of yaw angel shows blow. (Yaw-rate control been activeted in DISCON.IN, and IPC has been turned off)

As you see, the yaw angel smoothly change to about -4 deg while wind direction stayed 0 deg. And I get the same result when I turned yaw control off in DISCON.IN.

I checked all setting in DISCON.IN and OpenFAST(v2.3.0) but still have no idea about this problem.
So, I come here to ask if someone has same experience in DRC or face with similar problem as me and/or knows how to solve it.

I list the DISCON.IN file and ServoDyn file that I used in my calculation here.

Thanks in advance and Best Regards,
SONG

<DISCON.IN>

[code]! Turbine: NREL 5MW fixed bottom wind turbine
! NJA - Might want to make a more formal header for this

!------- DEBUG ------------------------------------------------------------
0 ! LoggingLevel - 0 = write no debug files, 1 = write standard output .dbg-file, 2 = write standard output .dbg-file and complete avrSWAP-array .dbg2-file

!------- CONTROLLER FLAGS -------------------------------------------------
1 ! F_LPFType - 1 = first-order low-pass filter, 2 = second-order low-pass filter, filtering generator speed and pitch control signals, [rad/s]
0 ! F_NotchType - 0 = disable, 1 = enable: notch on the measured generator speed
0 ! IPC_ControlMode - Turn Individual Pitch Control (IPC) for fatigue load reductions (pitch contribution) 0 = off / 1 = (1P reductions) / 2 = (1P+2P reductions)
1 ! VS_ControlMode - Generator torque control mode in above rated conditions, 0 = constant torque / 1 = constant power
1 ! Y_ControlMode - Yaw control mode: (0 = no yaw control, 1 = yaw rate control, 2 = yaw-by-IPC)

!------- FILTERS ----------------------------------------------------------
1.570796326 ! F_LPFCornerFreq - Corner frequency (-3dB point) in the low-pass filters
0 ! F_LPFDamping - Damping coefficient if F_FilterType = 2, unused otherwise
0 ! F_NotchCornerFreq - Natural frequency of the notch filter, [rad/s]
0 0 ! F_NotchBetaNumDen - These two notch damping values (numerator and denominator, resp) determines the width and depth of the notch [-]

!------- BLADE PITCH CONTROL ----------------------------------------------
14 ! PC_GS_n - Amount of gain-scheduling table entries
0.00000 0.03491 0.06981 0.10472 0.13963 0.17453 0.20944 0.24435 0.27925 0.31416 0.34907 0.38397 0.41888 0.45379 ! PC_GS_angles - Gain-schedule table: pitch angles
-0.018827 -0.014292 -0.011517 -0.009645 -0.008296 -0.007278 -0.006483 -0.005844 -0.005320 -0.004882 -0.004511 -0.004192 -0.003916 -0.003673 ! PC_GS_KP - Gain-schedule table: pitch controller kp gains
-0.008069 -0.006125 -0.004936 -0.004133 -0.003555 -0.003119 -0.002778 -0.002505 -0.002280 -0.002092 -0.001933 -0.001797 -0.001678 -0.001574 ! PC_GS_KI - Gain-schedule table: pitch controller ki gains
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ! PC_GS_KD - Gain-schedule table: pitch controller kd gains
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ! PC_GS_TF - Gain-schedule table: pitch controller tf gains (derivative filter)
1.5707 ! PC_MaxPit - Maximum physical pitch limit, [rad].
-0.087266 ! PC_MinPit - Minimum physical pitch limit, [rad].
0.13962 ! PC_MaxRat - Maximum pitch rate (in absolute value) in pitch controller, [rad/s].
-0.13962 ! PC_MinRat - Minimum pitch rate (in absolute value) in pitch controller, [rad/s].
122.90957 ! PC_RefSpd - Desired (reference) HSS speed for pitch controller, [rad/s].
0.0 ! PC_FinePit - Record 5: Below-rated pitch angle set-point, [rad]
0.003490658 ! PC_Switch - Angle above lowest minimum pitch angle for switch [rad]
0 ! Z_EnableSine - Enable/disable sine pitch excitation, used to validate for dynamic induction control, will be removed later [-]
0.0349066 ! Z_PitchAmplitude - Amplitude of sine pitch excitation [rad]
0 ! Z_PitchFrequency - Frequency of sine pitch excitation [rad/s]

!------- INDIVIDUAL PITCH CONTROL -----------------------------------------
0.087266 ! IPC_IntSat - Integrator saturation (maximum signal amplitude contribution to pitch from IPC), [rad]
1E-8 0 ! IPC_KI - Integral gain for the individual pitch controller: first parameter for 1P reductions, second for 2P reductions [-]
0.436332313 0 ! IPC_aziOffset - Phase offset added to the azimuth angle for the individual pitch controller, [rad].
2.5 ! IPC_CornerFreqAct - Corner frequency of the first-order actuators model, to induce a phase lag in the IPC signal. Set 0 to disable. [rad/s]

!------- VS TORQUE CONTROL ------------------------------------------------
0.944 ! VS_GenEff - Generator efficiency mechanical power → electrical power, this should match the efficiency defined in the generator properties! [-]
43093.55 ! VS_ArSatTq - Above rated generator torque PI control saturation, [Nm]
150000.0 ! VS_MaxRat - Maximum torque rate (in absolute value) in torque controller, [Nm/s].
48000.00 ! VS_MaxTq - Maximum generator torque in Region 3 (HSS side), [Nm].
0.0 ! VS_MinTq - Minimum generator (HSS side), [Nm].
91.2109 ! VS_MinOMSpd - Optimal mode minimum speed, cut-in speed towards optimal mode gain path [rad/s]
2.33228 ! VS_Rgn2K - Generator torque constant in Region 2 (HSS side), [N-m/(rad/s)^2]
5.0E+06 ! VS_RtPwr - Wind turbine rated power [W]
43093.55 ! VS_RtTq - Rated torque, [Nm].
120.113 ! VS_RefSpd - Rated generator speed [rad/s]
1 ! VS_n - Number of generator PI torque controller gains
-4200 ! VS_KP - Proportional gain for generator PI torque controller, used in the transitional 2.5 region, [1/(rad/s) Nm]
-2100 ! VS_KI - Integral gain for generator PI torque controller, used in the transitional 2.5 region, [1/rad Nm]

!------- WIND SPEED ESTIMATOR ---------------------------------------------
63.0 ! WE_BladeRadius - Blade length [m]
4 ! WE_CP_n - Amount of parameters in the Cp array
14.571319658214513 42.809556250371465 2.456512501523107 0.003127994078720 ! WE_CP - Parameters that define the parameterized CP(lambda) function
20 ! WE_Gamma - Adaption gain of the wind speed estimator algorithm [m/rad]
97 ! WE_GearboxRatio - Gearbox ratio, >=1 [-]
4.0469564E+07 ! WE_Jtot - Total drivetrain inertia, including blades, hub and casted generator inertia to LSS [kg m^2]
1.225 ! WE_RhoAir - Air density [kg m^-3]

!------- YAW CONTROL ------------------------------------------------------
1.745329252 ! Y_ErrThresh - Yaw error threshold. Turbine begins to yaw when it passes this. [rad^2 s]
0.17453 ! Y_IPC_IntSat - Integrator saturation (maximum signal amplitude contribution to pitch from yaw-by-IPC), [rad]
1 ! Y_IPC_n - Number of controller gains (yaw-by-IPC)
-0.064 ! Y_IPC_KP - Yaw-by-IPC proportional controller gain Kp
-0.0008 ! Y_IPC_KI - Yaw-by-IPC integral controller gain Ki
0.6283185 ! Y_IPC_omegaLP - Low-pass filter corner frequency for the Yaw-by-IPC controller to filtering the yaw alignment error, [rad/s].
1.0 ! Y_IPC_zetaLP - Low-pass filter damping factor for the Yaw-by-IPC controller to filtering the yaw alignment error, [-].
0.00000 ! Y_MErrSet - Yaw alignment error, set point [rad]
1.0 ! Y_omegaLPFast - Corner frequency fast low pass filter, 1.0 [Hz]
0.016667 ! Y_omegaLPSlow - Corner frequency slow low pass filter, 1/60 [Hz]
0.0034906 ! Y_Rate - Yaw rate [rad/s]

!------- TOWER FORE-AFT DAMPING -------------------------------------------
-1 ! FA_KI - Integral gain for the fore-aft tower damper controller, -1 = off / >0 = on [rad s/m] - !NJA - Make this a flag
0.1 ! FA_HPF_CornerFreq - Corner frequency (-3dB point) in the high-pass filter on the fore-aft acceleration signal [rad/s]
0.087266 ! FA_IntSat - Integrator saturation (maximum signal amplitude contribution to pitch from FA damper), [rad]
[/code]

<NRELOffshrBsline5MW_Onshore_ServoDyn_DRC.dat>

------- SERVODYN v1.05.* 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 <RootName>.ech (flag)
"default"     DT           - Communication interval for controllers (s) (or "default")
---------------------- 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, 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))
  9999999.9   TYawManS     - Time to start override yaw maneuver and end standard yaw control (s)
          1   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)
"NRELOffshrBsline5MW_ServoDyn_TMD.dat"    NTMDfile     - Name of the file for nacelle tuned mass damper (quoted string) [unused when CompNTMD is false]
False         CompTTMD     - Compute tower tuned mass damper {true/false} (flag)
"NRELOffshrBsline5MW_ServoDyn_TMD.dat"    TTMDfile     - Name of the file for tower tuned mass damper (quoted string) [unused when CompTTMD is false]
---------------------- BLADED INTERFACE ---------------------------------------- [used only with Bladed Interface]
"ServoData\DISCON_DRC_x64.dll"    DLL_FileName - Name/location of the dynamic library {.dll [Windows] or .so [Linux]} in the Bladed-DLL format (-) [used only with Bladed Interface]
"DISCON.IN"    DLL_InFile  - Name of input file sent to the DLL (-) [used only with Bladed Interface]
"DISCON"      DLL_ProcName - Name of procedure in DLL to be called (-) [case sensitive; used only with DLL Interface]
"default"     DLL_DT       - Communication interval for dynamic library (s) (or "default") [used only with Bladed Interface]
false         DLL_Ramp     - Whether a linear ramp should be used between DLL_DT time steps [introduces time shift when true] (flag) [used only with Bladed Interface]
     9999.9   BPCutoff     - Cuttoff frequency for low-pass filter on blade pitch from DLL (Hz) [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]
          1   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 <RootName>.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
END of input file (the word "END" must appear in the first 3 columns of this last OutList line)
---------------------------------------------------------------------------------------

Dear SONG,

I know that there was a bug in ServoDyn associated with yaw commands from a DISCON DLL. A pull request (github.com/OpenFAST/openfast/pull/456) submitted after the release of OpenFAST v2.3 provided a fix, which is included in OpenFAST v2.4. I would first suggest upgrading to OpenFAST v2.4 and see if that fixes your problem.

What do you mean by “DRC”?

Best regards,

Dr. Jonkman,

Thank you for you quick reply, I’ll try OpenFAST v2.4 to see if it fix this issue.
The DRC means “TUDelft Data Driven Control” (https://github.com/TUDelft-DataDrivenControl/DRC_Fortran).

Best regards,
SONG