wy-wind-model

Wind model for use by MATPOWER Optimal Scheduling Tool

https://github.com/matpower/wy-wind-model

Science Score: 41.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 3 DOI reference(s) in README
  • Academic publication links
  • Committers with academic emails
    1 of 1 committers (100.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.0%) to scientific vocabulary
Last synced: 10 months ago · JSON representation ·

Repository

Wind model for use by MATPOWER Optimal Scheduling Tool

Basic Info
  • Host: GitHub
  • Owner: MATPOWER
  • License: other
  • Language: MATLAB
  • Default Branch: main
  • Size: 1.5 MB
Statistics
  • Stars: 1
  • Watchers: 2
  • Forks: 1
  • Open Issues: 0
  • Releases: 0
Created over 4 years ago · Last pushed over 3 years ago
Metadata Files
Readme Changelog License Citation

README.md

WY-Wind-Model

by Wooyoung Jeon, Ray Zimmerman, Alberto J. Lamadrid L., and Tim Mount

WY-Wind-Model provides a wind model for use by the MATPOWER Optimal Scheduling Tool (MOST), which is part of MATPOWER. It generates wind forecasting profiles and associated transition probabilities according to a pre-determined bin structure and time horizon. Wind forecasting profiles are generated based on an econometric model that consists of an OLS component capturing a seasonal effect and a time-series component capturing the dynamics in the residual. The uncertainty required for forecasting is implemented by a var-cov matrix of white noise residuals of the time-series model, which enables it to reflect the correlation between different wind sites. WY-Wind-Model also provides wind realization profiles, generated either from actual realization data or from an econometric model.

System Requirements

Installation

Installation and use of WY-Wind-Model requires familiarity with the basic operation of MATLAB or Octave, including setting up your MATLAB/Octave path.

  1. Clone the repository or download and extract the zip file of the WY-Wind-Model distribution from the WY-Wind-Model project page to the location of your choice.

  2. Add the following directories to your MATLAB/Octave path:

    • <WYWIND>/lib
    • <WYWIND>/lib/t

    where <WYWIND> is used to denote the path to the mp-element directory you cloned or unzipped in step 1.

  3. At the MATLAB/Octave prompt, type test_wy_wind to run the test suite and verify that WY-Wind-Model is properly installed and functioning. The result should resemble the following: ```

    testwywind twywinddate2pidx....ok twywindpidx2date....ok twywind..............ok twywind_model........ok All tests successful (136 of 136) Elapsed time 0.07 seconds. ```

Usage

  • Create a WY-Wind-Model object, with models for sites 2, 6, and 15 from the 16-site NPCC model: matlab widx = [2;6;15]; wm = wy_wind_model('wind_model_npcc', widx);

  • Generate transition probabilities for MOST for a 24 period horizon with 4 wind scenarios in each period. matlab tp = wm.transition_probs(24, 4);

  • Load the original NPCC historical wind speed data (raw wind speeds in m/s) and convert it to log(raw_wind_speed+1), since that is what this model is based on. matlab s = load('wind_data_npcc'); log_wind_data = log10(s.wind_data + 1);

  • Extract a 48-hour wind speed realization for the 3 sites of interest from the original NPCC historical data, beginning at noon on June 1, 2005 (data starts at 1am on Jan 1, 2004). matlab pidx1 = wy_wind_date2pidx(24, [2004 1 1 1 0 0], [2005 6 1 12 0 0]); wsr = wm.realizations(pidx1, 48, log_wind_data);

  • Generate a 24-hour wind speed realization from the model for the 3 sites of interest, beginning at the same hour. matlab wsr = wm.realizations(pidx1, 24);

  • Convert the wind speed realizations to wind power realizations, expressed as fractions of installed capacity, using the default (multi-turbine) power curve. matlab wpr = wm.speed2power(wsr);

  • Generate a 24-hour wind speed forecast from the model for the 3 sites of interest, beginning at the same hour, using 4 bins to represent the forecast distribution. matlab ws0 = log_wind_data(pidx1-1, widx); wsf = wm.forecasts(pidx1, ws0, 24, 4);

  • Convert the wind speed forecasts to wind power realizations, expressed as fractions of installed capacity, using the 4th power curve (off-shore) defined in 'wind_power_curve_EIC.txt'. matlab s2p = wy_wind_power_curve(4, 'wind_power_curve_EIC.txt'); wm = wy_wind_model('wind_model_npcc', [2;6;15], s2p); wpf = wm.speed2power(wsf);

  • See ex_wy_wind_simulation.m for an example of using WY-Wind-Model to generate inputs for a receding horizon simulation.

Documentation

The primary sources of documentation for WY-Wind-Model are this section of this README file and the built-in help command. As with the built-in functions and toolbox routines in MATLAB and Octave, you can type help followed by the name of a command or M-file to get help on that particular function.

Notation

  • np_all — number of periods in raw wind data
  • nw_all — number of wind sites in raw data (16 for wind_data_npcc.mat)
  • np — number of periods of interest (e.g. for planning horizon)
  • nw — number of wind sites of interest
  • npd — number of periods per day (typically 24, for hourly data)
  • nb — number of bins used for wind model inputs for MOST
  • widx — (nw x 1) vector of indices of wind sites of interest
  • pidx — scalar period index for raw historical wind data
  • pidx1 — scalar period index of first period of horizon of interest, relative to first period of raw historical wind data
  • dt — 1 x 6 standard Matlab date vector [yr, mo, day, hr, min, sec], specifying a specific period in the raw historical wind data, yr = 4-digit year, mo = month-of-year (1-12), day = day-of-month (1-31), hr = hour-of-day (0-23), min = minute (0-59), sec = second (0-59)
  • wind_data - (np_all x nw_all) matrix of wind speeds (in m/s), corresponding to np_all periods, nw_all sites, a particular npd, and a starting date/time (dt0)
  • log_wind_data — (np_all x nw_all) matrix equal to log10(wind_data + 1)
  • bins — bin specification, supplied as either:
    • number of bins (nb), or
    • (1 x nb-1) vector of bin boundaries (standard deviation coefficients), where initial -Inf and final +Inf are assumed, but not included
  • model — struct with fields:
    • type — type of wind speed model
      • 0 = based on rawwindspeed in m/s
      • 1 = based on log(rawwindspeed + 1)
    • npd - number of periods per day (24 for hourly model)
    • dt0 - Matlab date vector corresponding to first period of data from which model was created, pidx1 for forecasts and realizations created from the model are w.r.t. this date
    • ar1 — (nw_all x 1) vector of AR1 coefficients for individual sites
    • ols — (nw_all x 9) matrix of OLS estimation parameters for individual sites:
      [C CY1 SY1 CY2 SY2 CD1 SD1 CD2 SD2]
    • var_wnr — (nw_all x nw_all) covariance matrix for individual sites
    • ar1_total — scalar AR1 coefficient for total wind
    • ols_total1 x 9 vector of OLS estimation parameters for total wind
    • var_wnr_total — scalar variance for total wind
  • ws — wind speed quantity, units depend on the type of the model

Data Files

  • windcapnpcc.mat — wind site installed capacities for NPCC

    • wind_cap - (1 x 16) matrix of installed capacities in MW
  • winddatanpcc.mat — raw historical wind speed data from NPCC

    • npd - number of periods per day, namely 24, since data is hourly
    • dt0 - Matlab date vector with date/time for first period in data, namely [2004 1 1 1 0 0] for 1am on Jan 1, 2004.
    • wind_data - (26303 x 16) matrix of wind speeds in m/s corresponding to:
    • 16 sites (ny1–ny9, ne1–ne7)
    • 3 years (2004, 2005, 2006) (8760 * 3 + 24 -1 = 26303)
      • beginning at 2004-01-01 1:00 (1am)
      • ending at 2006-12-31 23:00 (11pm)
  • windmodelnpcc.mat — type 1 model for the 16 sites in NPCC

    • model - struct with model parameters for 16 sites based on winddatanpcc.mat
  • windpowercurve_EIC.txt — power curve lookup tables

    • col 1 is wind speeds in m/s from 0 to 30
    • cols 2–6 contain 5 power curves as follows, expressed as fraction of installed capacity:
      1 = IEC1, 2 = IEC2, 3 = IEC3, 4 = offshore, 5 = multi-turbine

Object Interface

  • wywindmodel — constructor, creates a WY-Wind-Model object from a MAT-file containing a model struct, optionally selecting a subset of the sites indexed by widx, and/or providing a specific power curve for conversion from speed to power matlab wm = wy_wind_model(model_fname) wm = wy_wind_model(model_fname, widx) wm = wy_wind_model(model_fname, widx, s2p)

  • transition_probs — generates transition probabilities to use with MOST from the model matlab tp = wm.transition_probs(np, bins)

  • realizations — generates realizations from the model, or extracts them from the historical data, given the starting period and the number of periods desired matlab wsr = wm.realizations(pidx1, np) wsr = wm.realizations(pidx1, np, wind_data)

  • forecasts — generates forecasts of wind speed bin means from the model, for use with MOST, given the starting period, initial wind speed, number of periods desired, and the bin specification matlab wsf = wm.forecasts(pidx1, ws0, np, bins)

  • speed2power — converts wind speed data to wind power, expressed as fraction of installed capacity matlab wp = wm.speed2power(ws)

  • display — called to display object on command line matlab wm

Function Interface

  • wywindtrans_probs — generates transition probabilities for MOST from the model matlab tp = wy_wind_trans_probs(model, np, bins)

  • wywindrealizations — generates realizations from the model, or extracts them from the historical data, given the starting period and the number of periods desired matlab wsr = wy_wind_realizations(model, widx, pidx1, np) wsr = wy_wind_realizations(wind_data, widx, pidx1, np) wsr = wy_wind_realizations(log_wind_data, widx, pidx1, np)

  • wywindforecasts — generates forecasts of wind speed bin means from the model, for use with MOST, given the starting period, initial wind speed, number of periods desired, and the bin specification matlab wsf = wy_wind_forecasts(model, widx, pidx1, ws0, np, bins)

  • wywindspeed2power — converts wind speed data to wind power, expressed as fraction of installed capacity, based on provided power curve matlab wp = wy_wind_speed2power(ws, s2p) wp = wy_wind_speed2power(ws, idx) wp = wy_wind_speed2power(ws, s2p, ws_type) wp = wy_wind_speed2power(ws, idx, ws_type)

Other Functions

Utility Functions

  • wywinddate2pidx — converts a date vector to a raw period index matlab pidx = wy_wind_date2pidx(npd, dt0, dt)

  • wywindpidx2date — converts a raw period index to date vector matlab dt = wy_wind_pidx2date(npd, dt0, pidx)

  • wywindpowercurvedata — loads a power curve table from a file matlab s2p = wy_wind_power_curve_data() s2p = wy_wind_power_curve_data(idx) s2p = wy_wind_power_curve_data(idx, fname)

Statistics Toolbox Replacement Functions

The following functions are included in order to eliminate any dependence on the Statistics Toolbox.

  • mvnrnd_nst — replacement for mvnrnd() based on randn(). matlab r = mvnrnd_nst(mu, sigma, n)

  • normcdf_nst — replacement for normcdf() based on erfc(). matlab pout = normcdf_nst(xin, mu, sigma)

  • norminv_nst — replacement for norminv() based on erfcinv(). matlab xout = norminv_nst(pin)

Other Function (used internally)

  • wywindbins — returns number of bins and bin boundaries given a bin specification bins matlab [nb, bin_bounds] = wy_wind_bins(bins)

Citing WY-Wind-Model

We request that publications derived from the use of the WY-Wind-Model explicitly acknowledge that fact by citing the following.

W. Jeon, R. D. Zimmerman, A. J. Lamadrid L., and T. D. Mount (2022). WY-Wind-Model [Software]. Available: https://github.com/MATPOWER/wy-wind-model doi: 10.5281/zenodo.6574118

License

WY-Wind-Model is distributed under the 3-clause BSD license.

Release History

  • 1.0 — Jun 13, 2022

Acknowledgments

This material is based upon work supported in part by the National Science Foundation under Grant No. 1809830. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the funding agencies.


Owner

  • Name: MATPOWER Development
  • Login: MATPOWER
  • Kind: organization

Citation (CITATION)

We request that publications derived from the use of WY-Wind-Model
explicitly acknowledge that fact by citing the following.

  W. Jeon,  R. D. Zimmerman, A. J. Lamadrid L., and T. D. Mount (2022).
  WY-Wind-Model [Software].
  Available: https://github.com/MATPOWER/wy-wind-model
  doi: 10.5281/zenodo.6574118

GitHub Events

Total
Last Year

Committers

Last synced: over 2 years ago

All Time
  • Total Commits: 51
  • Total Committers: 1
  • Avg Commits per committer: 51.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 1
  • Committers: 1
  • Avg Commits per committer: 1.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Ray Zimmerman r****0@c****u 51
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: over 2 years ago

All Time
  • Total issues: 1
  • Total pull requests: 2
  • Average time to close issues: 18 days
  • Average time to close pull requests: 11 days
  • Total issue authors: 1
  • Total pull request authors: 1
  • Average comments per issue: 1.0
  • Average comments per pull request: 0.5
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • rdzman (1)
Pull Request Authors
  • rdzman (2)
Top Labels
Issue Labels
Pull Request Labels
bug (1)

Dependencies

.github/workflows/continuous-integration.yml actions
  • MATPOWER/action-configure-matlab v1 composite
  • MATPOWER/action-install-octave-linux v1 composite
  • MATPOWER/action-install-octave-macos v1 composite
  • actions/checkout v3 composite
  • matlab-actions/setup-matlab v1 composite