Add FLORIS based wind-speed estimator to FLASC#228
Add FLORIS based wind-speed estimator to FLASC#228paulf81 merged 7 commits intoNatLabRockies:developfrom
Conversation
There was a problem hiding this comment.
Overall this looks good @paulf81 --- I just added some requests for clarity around the ws3 value and a suggestion on requiring power to be specified in kW.
I also took the liberty of consolidating the example notebook a bit---hopefully that's ok. It'd be good for you to take a look at it and make sure you're happy with the update.
flasc/utilities/floris_tools.py
Outdated
| ws0 = 0 | ||
| ws1 = float(np.interp(rated_power * 0.1, pow_pc, ws_pc)) | ||
| ws2 = float(np.interp(rated_power * 0.9, pow_pc, ws_pc)) | ||
| ws3 = ws2 + 1.0 |
There was a problem hiding this comment.
What does ws3 represent, physically? The others are fairly intuitive, but I don't follow the meaning of ws3?
There was a problem hiding this comment.
In the wind-up version, ws3 is the wind speed at which the lower quartile of the data in the bin exceeds the max power threshold, let's say "completing" the transition into region 3
| ws_est_gain_y = [0, 1, 1, -1] | ||
|
|
||
| ws_est_gain = np.interp(df_scada["ws_{:03d}".format(ti)], ws_est_gain_x, ws_est_gain_y) | ||
| ws_est_gain = np.clip(ws_est_gain, 0, 1) |
There was a problem hiding this comment.
Maybe similar to the comment above about ws3, it seems strange to define a gain value of -1 for the ws3 entry and then clip any interpolated value back to 0? Would that be equivalent to setting ws3 closer to ws2 and then setting the last value of ws_est_gain_y to 0?
There was a problem hiding this comment.
Yes, I think in our case this would be equivalent
There was a problem hiding this comment.
I've now added some comments describing the wind speeds ws0, ws1, ws2, ws3.
| This will be especially useful in model fitting to avoid any error on un-waked turbines. | ||
|
|
||
| Args: | ||
| df_scada (pd.DataFrame | FlascDataFrame): Pandas DataFrame with the SCADA data. |
There was a problem hiding this comment.
How strictly do we enforce that df_scada's power should be specified in kW? Presumably, if the power is not in kW, the approach will fail?
There was a problem hiding this comment.
That's true, I think we only recommend it. I guess it will fail very badly at least, but we could think about adding some tests that power is in kW. Any values in excess of 20,000 would be a clue?
There was a problem hiding this comment.
Yeah, I'm trying to think whether any other procedures in FLASC assume that power is in kW. Possibly not, since we are often dividing a power by a reference power, so the units cancel out. But maybe there are other places on floris_tools.py where we make this assumption.
examples_artificial_data/04_floris_tuning/01_wind_speed_estimator.ipynb
Outdated
Show resolved
Hide resolved
Your changes are good, thanks! |
|
Thanks @misi9170 ! |
Add FLORIS based wind-speed estimator to FLASC
Feature or improvement description
This PR adds a wind speed estimator based on measured power, and the expected power curve in FLORIS, to estimate the wind speed. The approach is modeled on the estimator based on data in @aclerc 's wind-up, in which the estimator blends between using power in the wind-ranges where power can be mapped to wind speed (below rated and above cut-in), and blends to using wind speed outside that range. The difference is that the power curve is taken directly from FLORIS. This approach will be useful when using FLASC to model-fit FLORIS, by ensuring that wind speeds can be selected which exactly reproduce the observed power, reducing a "noise" source of error unrelated to wakes.
Impacted areas of the software
floris_tools.py
Todo: