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

Add infrastructure for passing in external forecasts #44

Draft
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

misi9170
Copy link
Collaborator

This pull request adds capabilities to the HerculesADInterface and HerculesHybridADInterface so that forecasts can be included in the received measurements. These come through the "external_signals" channel of the Hercules dictionary, which are in turn read in from a csv file.

To demonstrate the behavior, I've also updated the tests, and added a mock controller HybridSupervisoryControllerBaseline_ForecastDemo that takes the same control action as HybridSupervisoryControllerBaseline but also prints out any received forecasts. The idea is that an as-yet-undeveloped controller needs to receive forecasts, this will be the template.

Before merger, this _ForecastDemo controller will be removed or replaced with something more functional.

I am yet to develop an example that fully shows the new capability, but I will try to add that in the coming days.

@genevievestarke , @christiannvaughn , @paulf81 just tagging you here so that you see developments.

@misi9170 misi9170 added the new-feature A new feature label Dec 10, 2024
@misi9170
Copy link
Collaborator Author

misi9170 commented Jan 8, 2025

I've now added an example to demonstrate the way that the HybridSupervisoryControllerBaseline_ForecastDemo can receive information from an external file (where the forecast is stored).

In examples/demo_forecasting/, there is a file called construct_time_series_inputs.py. Running this generates an example external time series file for hercules, called hercules_time_series_input.csv. This generates a random forecast of the wind speed based over the next 5 time steps, based on the true wind speed, with an arbitrary covariance matrix used to generated normal random variables. These are recorded (for each time step) as forecast_ws_mean_0, ... , forecast_ws_mean_4. Standard deviations are also recorded as forecast_ws_std_0, etc.

For example, in the right-hand side plot, for "real" time step zero, the gray line are the predicted mean wind speeds for the current time step and the next four time steps; the gray shading is the associated 1 standard deviation band; and red dashed line is the true wind speed that occurs in the following steps. The 1 standard deviation bounds are not accurate or based on actual data, they are simply meant to show that this kind of probabilistic information can be used if desired.
image

The controller then reads in and prints these forecast inputs before discarding them and reverting to feedback-based control.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature A new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant