yaw control,yaw rate, power generation, wind vane

Hello every one,
Recelently,I have been using the FAST v8, to do yaw control in Test18.fst.

FAST Certification Test #18: NREL 5.0 MW Baseline Wind Turbine (Onshore)

In servodyn,the corresponding code is set as

--------------------- NACELLE-YAW CONTROL ------------------------------------- 4 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)) 9999.9 TYawManS - Time to start override yaw maneuver and end standard yaw control (s) 0.5 YawManRat - Yaw maneuver rate (in absolute value) (deg/s) 0 NacYawF - Final yaw angle for override yaw maneuvers (degrees)

in ElastoDyn

True YawDOF - Yaw DOF (flag) 0 NacYaw - Initial or fixed nacelle-yaw angle (degrees)
The pitch and generator and torque control are

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) 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)
The input wind file is wind type 2 uniform shown as below

Here are some of my questions:
(1) yaw rate form simulink can not be use;
(2)nacelle position follow the wind direction, the power decrease compared with the situation when the nacelle position is constant 0.
(3)wind wane is the angle between the nacelle and the wind direction, I am not quite understand the direction Coordinate system relationship in FAST.
Here are some simulation resuls
(1) when the yaw rate is set to be 0 , the nacelle still follow the wind direction

(2)when the nacelle position is set to be 0 and follow the wind direction the power comparision is as below:red line is the nacelle position is set to be 0, and the purple line is the line when nacelle position follow the wind direction. The power instead of increading ,but decrease

however The generator speed is the same line
I don’t know if someing was wrong

the simulation input wind speed and direction is as follows

Dear Wenting.Chen,

Here are my answers to your questions:

(1) You should set the yaw position command (YawPosCom) and yaw rate command (YawRateCom) with one of the following approaches: (a) YawPosCom is the time-integral of YawRateCom, (b) YawPosCom is zero with variable YawRateCom, or (c) YawRateCom is zero with variable YawPosCom. Each of these settings results in a different yaw actuator transfer function. See the “Nacelle Yaw Control” section of the “Controls” chapter of the old FAST User’s Guide (nwtc.nrel.gov/system/files/FAST.pdf) for more information.

(2) The nacelle-yaw angle is defined above positive z in ElastoDyn and ServoDyn, but the wind-direction is defined about negative z in InflowWind. So, you should set them to have opposite signs if you want ideal yaw control.

(3) See (2).

Best regards,

Dear Jason.Jonkman,

  Thank you for your advice,  follow your directions, I first set the yaw pisition is the intigration of yaw rate. Then, I change the yaw direction target. Here are some point: (1) the wind direction in input file is pisitive value. However, in simulink the wind direction comes from 'atan( "Wind1VelY"/"Wind1VelX")' considering its direction the value is negative. (2) the yaw position follow the negative value, then  the power trend is right. Finally, the yaw controll function initially reallized.

  The advice helps a lot, thank you very much.

  Yours Sincerely!