Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smooth output of FlorisStandin to prevent oscilations in closed-loop response #90

Merged
merged 5 commits into from
Mar 25, 2024

Conversation

misi9170
Copy link
Collaborator

@misi9170 misi9170 commented Mar 18, 2024

The FlorisStandin is a steady-state model standing in for a the dynamic AMR-Wind model. We (@genevievestarke ) have been finding that this can lead to poor performance in simple closed-loop controllers, which I think is because the plant model essentially has infinite bandwidth, which, when combined with an infinite bandwidth controller (such as the wind farm power tracking controller implemented in WHOC, which is essentially a proportional controller), appears to lead to a closed-loop system that is marginally stable---see below, which comes from running the wind farm power tracking example in WHOC with the wind speed at 11m/s, rather than 8m/s.

wf-power-tracking-plot_smoothing0

To solve this issue, this PR "smooths" the output from the FlorisStandin model by applying a first order filter to the output power to give the open-loop system a finite bandwidth; this dampens oscillations in the closed-loop system (or removes oscillations entirely). This damping is artificial, in the sense that it is not a direct output from FLORIS; however, any real system with dynamics will have a finite bandwidth, so this update makes the FlorisStandin slightly more realistic. The level of smoothing is controllable with the smoothing_coefficient, which users can set between 0 (no smoothing) and 1 (as the smoothing_coefficient approaches 1, smoothing becomes very heavy).

Using the default smoothing_coefficient (0.5) now results in the following (note that Open Loop and Closed Loop control appear similar (both able to achieve the farm setpoint) here because, at 11m/s, there is sufficient resource for the Open Loop controller to achieve the demanded setpoint also. This is not a characteristic of the change to FlorisStandin).

wf-power-tracking-plot_smoothing1

Other notes

This pull request additionally updates the FlorisStandin to be compatible with the latest changes in FLORIS v4.

@misi9170 misi9170 marked this pull request as ready for review March 18, 2024 23:06
@misi9170 misi9170 added enhancement New feature or request bug Something isn't working labels Mar 18, 2024
@genevievestarke
Copy link
Collaborator

What testing script did you use for these figures? I'm running into some floris/flasc version issues with WHOC at the moment, so I might need to update something somewhere

@misi9170
Copy link
Collaborator Author

misi9170 commented Mar 25, 2024

What testing script did you use for these figures? I'm running into some floris/flasc version issues with WHOC at the moment, so I might need to update something somewhere

I ran the wind farm power tracking control example in WHOC, which generates these figures when it concludes (using this python file)

On the FLASC/FLORIS versioning issues; sorry about that; you should comment out the line
from flasc.wake_steering.lookup_table_tools import get_yaw_angles_interpolant in whoc/controllers/lookup_based_wake_steering_control.py. I need to fix that issue.

@genevievestarke
Copy link
Collaborator

Ah, ok, great, I'm getting the same plots as you now!

Copy link
Collaborator

@genevievestarke genevievestarke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, and runs for me with the same results!

@misi9170 misi9170 merged commit e552a8b into NREL:develop Mar 25, 2024
6 checks passed
@misi9170 misi9170 deleted the feature/floris-filter-output branch March 25, 2024 20:33
@misi9170 misi9170 mentioned this pull request Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants