OpenFAST / openfast

Main repository for the NREL-supported OpenFAST whole-turbine and FAST.Farm wind farm simulation codes.
http://openfast.readthedocs.io
Apache License 2.0
666 stars 452 forks source link

InflowWind output for pitch control #1908

Open vicemora opened 9 months ago

vicemora commented 9 months ago

Hello everyone! I'm willing to design a reinforcement-learning-based controller for the blade pitch angle. For the states' definition, I need the wind velocity at each timestep, and I'm using an FF binary to represent the wind. For a more realistic approach, I think I'm going to need to get the wind velocity as the wind turbines do in real life. Is there such a way to get kind of the mesaure of a wind sensor in OpenFAST? Exploring the output list, I found these variables. I think they are what I'm looking for, but I'm not sure:

Captura de pantalla 2023-11-30 201914

I have no idea what being defined by sensors means; I can't use them directly. Can you suggest me either a way to "activate" these outputs or any recommendation to get the "state of the wind" at each time step? 

jjonkman commented 9 months ago

Dear @vicemora,

InflowWind module output parameters WindMeas1 etc. are available if you've enabled the LIDAR functionality within InflowWind; otherwise, these outputs are not avialable.

InflowWind has other sensors for outputting ambient wind named Wind1VelX etc. if you haven't enabled the LIDAR functionality.

Can you clarify what you mean when you refer to, "I'm going to need to get the wind velocity as the wind turbines do in real life"? What effects are looking for? Tower influence? Induction? Relative velocity between wind and structure?

Best regards,

vicemora commented 9 months ago

Dear  @jjonkman  Thanks I did not notice the lidar parameter. I think it is a new section in the OpenFAST inflow file because it isn't within the InflowWind documentation.

For the second part, Wind1VelX gives the X velocity component of the wind at a certain point (defined by the user) as a time series output. In the default configuration of the model I'm using, that point is set at the hub.

However, when you want a RL-based controller, the approach is to train the controller in a simulated environment, and then the trained controller could be implemented in a real environment. In this project I'm not going to implement it in a real environment. However, for the training, I want the way I get the wind velocity in OpenFAST (to define the state) to be consistent with the way the wind is measured by a sensor in a real wind turbine.

To clarify what I mean with that "consistency" concept:

Imagine that the turbine within the simulation is experiencing a certain "wind space." And imagine there is a way for a real wind turbine to experience that exact "wind space." Either the simulated wind turbine or the real one is experiencing the same wind conditions. The consistency I'm looking for is that the value measured by the wind velocity sensor of the real wind turbine and the wind velocity that I get in the simulation in that step are similar or equivalent.

With this consistency, one can expect that the controller could be reproducible in real experiments. And that is the reason I think using Wind1VelX is not the most appropriate way to do so. Because it is the velocity value of a point you defined, it might work, but for me, it doesn't seem like a reliable way to ensure reproducibility in an implementation.

I'm not pretending to measure the wind velocity in OpenFAST in the same way it is measured in the real life. I'm just looking for an equivalent way to represent the wind velocity you would measure in real life, but within the simulation. So that, my work in could be perceived with certain reliability to reproducing experiments.

Because of that, I was thinking about using the WindMeas 1. I had never used it, and I don't know if it will work as I'm expecting it to. But It sounds like the way to create that consistency I'm looking for. If you can help me with advices/recomendation/documentation It will be helpful. As I stated, the wind sensors sound like a way to create that consistency but I do not know If I'm in the right way. If you know about another way to creat that consistency I was talking about, please let me know.

jjonkman commented 9 months ago

Dear @vicemora,

The LiDAR functionality you are referring was a new addition to the InflowWind module introduced within OpenFAST v3.5 within the following pull request: https://github.com/OpenFAST/openfast/pull/1464. This functionality enables you to extract the ambient wind in a way that a LiDAR would measure it with line-of-site projection of the wind velocity and impact of structural motions. However, it does not include the effects of rotor induction.

Is the type of "real" sensor you had in mind? Do you need to consider the effect of rotor induction, if so, at what location?

Best regards,