Skip to content

Fix power scaling in open_source_scada example + add README and sanity test#63

Open
kilojoules wants to merge 1 commit into
EUFLOW:mainfrom
kilojoules:fix-open-source-scada-units
Open

Fix power scaling in open_source_scada example + add README and sanity test#63
kilojoules wants to merge 1 commit into
EUFLOW:mainfrom
kilojoules:fix-open-source-scada-units

Conversation

@kilojoules
Copy link
Copy Markdown
Member

Summary

The observed power timeseries in
examples/cases/open_source_scada/outputs/observedPower.nc previously
contained power values multiplied by the rated-power numerical value in MW
(1.65), producing a hard cap at 2722.5 kW. This is inconsistent with the
Vestas V82 1.65 MW power curve packaged in plant_energy_turbine/,
which has a rated cap at 1650 kW.

This PR makes the dataset directly consistent with the packaged OEM curve
and adds documentation + a regression test.

What changes

  1. outputs/observedPower.nc — power values divided by 1.65. Hard cap
    restored to 1650 kW; bin-median agreement with OEM V82 curve within
    1–15% across operational wind speeds (e.g. WS=13 m/s: OEM 1650 kW,
    observed median 1644 kW). Attributes updated with units, source,
    and license.
  2. README.md — documents the source farm (Twin Groves, McLean County,
    IL; Invenergy), turbine type, time range, units, conventions, and the
    pre-PR scaling history.
  3. tests/sanity_open_source_scada.py — asserts max(power) ≤ rated
    and |bin-median - OEM| / OEM ≤ 0.20 across WS bins 5–13 m/s. Catches
    future regressions of the scaling bug.

Verification

$ python examples/cases/open_source_scada/tests/sanity_open_source_scada.py
Checking outputs/observedPower.nc ...
  max(power) = 1650000.0 W (rated = 1650000.0 W)
  WS= 5- 6: OEM= 226500 W  median= 193389 W  rel-err=0.15 [OK]
  WS= 7- 8: OEM= 634500 W  median= 544428 W  rel-err=0.14 [OK]
  WS=10-11: OEM=1394500 W  median=1297911 W  rel-err=0.07 [OK]
  WS=13-14: OEM=1650000 W  median=1644006 W  rel-err=0.00 [OK]
  NaN fraction (operational gaps): 0.20  (expect ~0.20)
Sanity check passed.

Why this matters

Without the fix, any downstream code that uses the packaged OEM curve to
reason about this case (e.g. power-curve inversion for inflow estimation,
or per-bin error metrics) silently produces nonsensical results because
the observed values are 65% higher than what the curve predicts at every
WS bin. After the fix, the example is directly usable as a real-onshore
SCADA benchmark with a known V82 turbine.

Notes

  • The fix is backward-compatible for anyone who had the old file: dividing
    by 1.65 reproduces the new values exactly. The README documents this so
    users with cached copies can recover.
  • The rotor_effective_velocity variable name is left unchanged for
    compatibility, but the README clarifies it is the raw nacelle-anemometer
    reading (no NTF correction applied).
  • License unchanged (MIT, inherited from the repository).

Test plan

  • sanity_open_source_scada.py passes after the fix
  • observedPower.nc opens cleanly with xarray
  • Bin-median power vs OEM PC matches within 15% across operational WS

…y test

The observed power timeseries in
examples/cases/open_source_scada/outputs/observedPower.nc previously contained
power values multiplied by the rated power numerical value in MW (1.65),
producing a hard cap at 2722.5 kW that is inconsistent with the
Vestas V82 1.65 MW power curve packaged in plant_energy_turbine/.

This commit:

1. Re-saves observedPower.nc with power values divided by 1.65, restoring
   a hard rated cap at 1650 kW and bin-median agreement with the OEM
   V82 power curve within 1-15% across operational wind speeds.

2. Adds a README.md documenting the source (Twin Groves Wind Farm, McLean
   County, Illinois, Invenergy), units, conventions, license, and the
   pre-PR scaling history.

3. Adds an executable sanity-check script
   (tests/sanity_open_source_scada.py) that asserts max(power) is at or
   below rated and that bin-median power agrees with the OEM curve to
   within 20% across WS bins 5-13 m/s. This catches regressions of the
   historical scaling bug.

After this change, the open_source_scada example is directly usable for
benchmarking flow models against a real onshore SCADA reference with a
publicly known turbine type.
@kilojoules
Copy link
Copy Markdown
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant