Propagation Direction, where it is stored and how could be imported to simulink

Dear all
I want to provide some inputs to my linear state-space model of the wind turbine in order to test it. Although I know how to import horizontal component of wind turbine to the model, I wonder how can I find the data corresponding to the other inputs(i.e. vertical power law shear and propagation direction).

In the above model, I’ve been able to import the horizontal wind speed (which would be stored in the “OutData” matrix if you had mentioned “Wind1VelX” in the “outlist” routine of InflowWind file) through “From Workspace” block to the model, but I don’t know where is the data which must be given to the model as the other components of wind.
In this case I’ve used a turbulent wind of “USRINP” type and specified its file in the InflowWind file while “WindType” variable in the inflowWind equals to 2.

I would really appreciate if someone could help me solve this problem.

Sincerely,
Hooman Asgari

Dear Hooman,

The time-averaged wind propagation and vertical power-law shear profile are specified in the InflowWind input file, but are not directly output from FAST, and so, are not included in the OutData array.

You can calculate the local instantaneous wind direction by outputting WindVelY, along with WindVelX, and using both in the calculation…

You could also output from InfloWind the local velocities at multiple heights in order to calculate the instantaneous wind shear.

Of course, if you want the time-averaged shear and wind direction, you’ll have to implement the time averaging.

Best regards,

Dear Dr.Jonkman,
Thanks for your reply.

I constructed time vector of propagation direcrtion using this equation: propagation direction = - arctan(Wind1VelY/Wind1VelX) and passed it to my model. Is it correct?

However, when I did a comparison between the outputs of my model and those of the open loop model generated by FAST v8 in Simulink, I saw that the outputs of these models are totally different Even the wind speed components were different. Would you please help me diagnose the problem?

(The blue line shows my state-space linearized model and the yellow one represents result of the system produced by FAST)
comparison: Wind velocity directed along X axis

comparison: Wind velocity directed along Y axis

Sincerely,
Hooman Asgari

Dear Hooman,

I’m sorry, but I’m not sure I understand what you are doing to comment.

Best regards,

Dear Dr.Jonkman,

Actually, I’m trying to validate my model. To do so, I’ve compared the responses of my system with those of the model which is generated by FAST(in the “open loop.mdl” file). In the previous post, the first image showed my model on the right side and “open loop FAST” on the left side.

The Outputs of both systems are:

'IfW Wind1VelX, (m/s)'
'IfW Wind1VelY, (m/s)'
'IfW Wind1VelZ, (m/s)'
'SrvD BlPitchC1, (deg)'
'SrvD BlPitchC2, (deg)'
'SrvD BlPitchC3, (deg)'
'SrvD GenTq, (kN·m)'
'SrvD GenPwr, (kW)'
'ED LSSTipPxa, (deg)'
'ED LSSTipVxa, (rpm)'
'ED BldPitch2, (deg)'
'ED TipALxb1, (m/s^2)'
'ED TipALyb1, (m/s^2)'
'ED TwstDefl1, (deg)'
'ED TwstDefl2, (deg)'
'ED TwstDefl3, (deg)'
'ED RootMxb2, (kN·m)'
'ED RootMyb2, (kN·m)'
'ED RootMzb2, (kN·m)'
'ED LSShftFys, (kN)'
'ED LSShftFzs, (kN)'
'ED LSSTipMys, (kN·m)'
'ED LSSTipMzs, (kN·m)'
'ED YawBrTDxp, (m)'
'ED YawBrTDyp, (m)'
'ED QD2_TSS1, (m/s^2)'
'ED QD2_B1E1, (m/s^2)'
'ED YawBrMxn, (kN·m)'
'ED YawBrMyn, (kN·m)'
'ED YawBrMzn, (kN·m)'
'ED HSShftV, (rpm)'
'ED TwHt2ALzt, (m/s^2)'

My question is: Why the outputs of my system is different with those of FAST, even in the measured wind speed?
My state-space model contains MBC average matrices as the state-space matrices. Linearisation is done around an operation point in the full load region of WindPACT 1.5MW, at a 20m/s wind speed.

Sincerely,
Hooman Asgari

Dear Hooman,

The Simulink image you uploaded is a bit too blurry for me to interpret. So, are you taking the Wind1VelX and Wind1VelY output from the FAST S-Function and using it to calculate the horizontal wind speed and wind direction inputs to the linear model, and then comparing the linearization output with the output of the FAST S-Function?

My understanding is that you are calculating the wind direction as

-ATAN(Wind1VelY/Wind1VelX)

It would be better to use

-ATAN2(Wind1VelY,Wind1VelX)

to get the full 360-degree range. Are you calculating the horizontal wind speed as

SQRT( Wind1VelX^2 + Wind1VelY^2 )

?

Best regards,

Dear Dr.Jonkman,

Sorry, in this post I’ve attached the simulink file.

Yes, I take “Wind1VelX” and “Wind1VelY” from the “OutData” array to calculate horizontal wind Speed and wind Direction. Here is how I’ve obtained them:
for horizontal wind speed:

Horizontal_windSpeed = sqrt(OutData(:,2).^2 + OutData(:,3).^2);
//second, third and fourth columns of "OutData" array show Wind1VelX, Wind1VelY, Wind1VelZ, respectively

and for the wind direction:

wind_direction_rad = -atan2(OutData(:,3),OutData(:,2));
windDirection = rad2deg(wind_direction_rad);

Then I gave them as the inputs to the state space model using “simin” block. I also set the other inputs equal to zero(even the third input, since I still don’t know how to calculate it).

In order to compare the results, first I transferred the outputs of my model using a “simout” block, then subtracted each of the outputs form its corresponding output in the “OutData” array. For example, to see how accurate the ‘IfW Wind1VelX, (m/s)’ (first column in the “simout” array) has been calculated, I wrote this code:

figure
plot(OutData(:,1),20 + simout(:,1) - OutData(:,2))
// plot the difference vs time. OutData(:,1) contains time
//linearization has been done in a 20 m/s wind speed 

below figure, which is the result of running this code, clearly shows this inaccuracy:

This inaccuracy even gets worse when we look at the other components of the wind, i.e Wind1VelY and Wind1VelZ. When I plotted the measured y-directed wind in the FAST and my model both in the same plot, I saw that my model has obviously done a wrong calculation. And I don’t know whats wrong with it:
(blue: FAST, orange: my model)

This is the content of “DescOutput” array, which shows the outputs of my model(simout)

'IfW Wind1VelX, (m/s)'
'IfW Wind1VelY, (m/s)'
'IfW Wind1VelZ, (m/s)'
'SrvD BlPitchC1, (deg)'
'SrvD BlPitchC2, (deg)'
'SrvD BlPitchC3, (deg)'
'SrvD GenTq, (kN·m)'
'SrvD GenPwr, (kW)'
'ED LSSTipPxa, (deg)'
'ED LSSTipVxa, (rpm)'
'ED BldPitch2, (deg)'
'ED TipALxb1, (m/s^2)'
'ED TipALyb1, (m/s^2)'
'ED QD2_TSS1, (m/s^2)'
'ED QD2_B1E1, (m/s^2)'
'ED HSShftV, (rpm)'
'ED TwHt2ALzt, (m/s^2)'

Sincerely,
Hooman Asgari
OpenLoop.rar (10.5 KB)

Dear Hooman,

OK, thanks for the clarification. I see a couple problems e.g.:

  • Unless you’ve changed the linear state-space matrices, the second input should be the vertical power-law shear exponent and the third input should be the wind direction; you seem to have swapped these inputs.
  • The wind-direction input to the linear state-space model should have the units of radians, not degrees.

I hope that helps.

Best regards,

Dear Dr.Jonkman,

Thank you for reminding my fault! I fixed this mistake and now the answers have evidently been improved. Yet there still exists a little mismatch in the x and y components. Furthermore, I wonder why my model’s output for the z component is zero!

I did the comparison of the two models using this wind input:

! This hub-height wind-speed file was generated by TurbSim (v2.00.07a-bjj, 14-Jun-2016) on 28-Nov-2017 at 15:02:36.
!
! The requested statistics for this data were:
!    Mean Total Wind Speed =   20.000 m/s
!
!
!   Time  HorSpd  WndDir  VerSpd  HorShr  VerShr  LnVShr  GstSpd
!  (sec)   (m/s)   (deg)   (m/s)     (-)     (-)     (-)   (m/s)
   0.000   19.30    2.07   -0.21   0.000   0.143   0.000    0.00
  15.000   19.87   -0.17    0.65   0.000   0.143   0.000    0.00
  30.000   18.29    5.70    0.87   0.000   0.143   0.000    0.00
  45.000   18.33   -0.73   -0.61   0.000   0.143   0.000    0.00
  60.000   20.67    0.11   -0.28   0.000   0.143   0.000    0.00
  75.000   23.35   -1.72   -0.27   0.000   0.143   0.000    0.00
  90.000   20.00    1.00   -0.24   0.000   0.143   0.000    0.00
 105.000   20.28    1.34    0.21   0.000   0.143   0.000    0.00
 120.000   20.27   -2.03   -0.60   0.000   0.143   0.000    0.00
 135.000   19.25   -0.81   -0.02   0.000   0.143   0.000    0.00
 150.000   17.52    3.74    0.88   0.000   0.143   0.000    0.00
 165.000   20.96   -0.57   -0.50   0.000   0.143   0.000    0.00
 180.000   21.10   -1.08   -0.09   0.000   0.143   0.000    0.00
 195.000   21.78   -1.20   -0.88   0.000   0.143   0.000    0.00
 210.000   20.85    2.05    0.39   0.000   0.143   0.000    0.00

For the second input of my model, I’ve used a constant block with the amount of 0.143

The attachment contains comparison of the outputs.

Sincerely,
Hooman Asgari
wind components.rar (68.1 KB)

Dear Hooman,

In the X-direction, it looks like there is a one time-step offset between the nonlinear and linear models. I’m not sure about the Y-direction, but perhaps the time shift is contributing to the error. Of course, the linear model will usually have some error as it is only an approximation of the nonlinear model. in the Z-direction, there is no input to the linear model that sets the Z-component of the wind, so, the linear output will always be zero.

Best regards,

Dear Dr.Jonkman

In the “.fst” file, I’d enabled the linearization. By reason, the outputs of the models should accurately coincide with each other. I think the only difference is just that in my model, MBC_Avg matrices have been used as the state-space matrices.

For the second input,i.e. vertical power-law shear exponent, what is the appropriate input that I must use? I’ve used “vertical shear” for it. Isn’t it wrong?
Besides, according to this part of your reply:

So this means that this linear model can never measure the Z-component of the wind? Doesn’t the second input (vertical power-law shear exponent) provide any helpful data for constructing this component of the wind?

Sincerely,

Dear Hooman,

The inputs to the linear model are always the perturbations about the operating point. Your operating point includes a shear exponent of 0.2, so to match that, the shear perturbation input should be zero, not 0.2.

The vertical shear only changes how the horizontal component of wind changes with elevation above the ground; the vertical shear does not influence the vertical (Z-component) of the wind speed.

Best regards,

Dear Dr.Jonkman,
Now I think I’ve got the concept correctly. Thanks for your kind clarification.
Sincerely,
Hooman Asgari