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)