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.
- MATLAB version 9.1 (R2016b) or later, or
- GNU Octave version 5.x or later
- MP-Test version 7.1 or later
Installation and use of WY-Wind-Model requires familiarity with the basic operation of MATLAB or Octave, including setting up your MATLAB/Octave path.
-
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.
-
Add the following directories to your MATLAB/Octave path:
<WYWIND>/lib
<WYWIND>/lib/t
where
<WYWIND>
is used to denote the path to themp-element
directory you cloned or unzipped in step 1. -
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:
>> test_wy_wind
t_wy_wind_date2pidx....ok
t_wy_wind_pidx2date....ok
t_wy_wind..............ok
t_wy_wind_model........ok
All tests successful (136 of 136)
Elapsed time 0.07 seconds.
-
Create a WY-Wind-Model object, with models for sites 2, 6, and 15 from the 16-site NPCC model:
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.
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.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).
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.
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.
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.
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'
.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.
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.
np_all
— number of periods in raw wind datanw_all
— number of wind sites in raw data (16 forwind_data_npcc.mat
)np
— number of periods of interest (e.g. for planning horizon)nw
— number of wind sites of interestnpd
— number of periods per day (typically 24, for hourly data)nb
— number of bins used for wind model inputs for MOSTwidx
— (nw x 1
) vector of indices of wind sites of interestpidx
— scalar period index for raw historical wind datapidx1
— scalar period index of first period of horizon of interest, relative to first period of raw historical wind datadt
— 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 tonp_all
periods,nw_all
sites, a particularnpd
, and a starting date/time (dt0
)log_wind_data
— (np_all x nw_all
) matrix equal tolog10(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
- number of bins (
model
— struct with fields:type
— type of wind speed model- 0 = based on raw_wind_speed in m/s
- 1 = based on log(raw_wind_speed + 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 datear1
— (nw_all x 1
) vector of AR1 coefficients for individual sitesols
— (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 sitesar1_total
— scalar AR1 coefficient for total windols_total
—1 x 9
vector of OLS estimation parameters for total windvar_wnr_total
— scalar variance for total wind
ws
— wind speed quantity, units depend on the type of the model
-
wind_cap_npcc.mat — wind site installed capacities for NPCC
wind_cap
- (1 x 16
) matrix of installed capacities in MW
-
wind_data_npcc.mat — raw historical wind speed data from NPCC
npd
- number of periods per day, namely 24, since data is hourlydt0
- 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)
-
wind_model_npcc.mat — type 1 model for the 16 sites in NPCC
model
- struct with model parameters for 16 sites based on wind_data_npcc.mat
-
wind_power_curve_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
-
wy_wind_model — constructor, creates a WY-Wind-Model object from a MAT-file containing a
model
struct, optionally selecting a subset of the sites indexed bywidx
, and/or providing a specific power curve for conversion from speed to powerwm = 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
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
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
wsf = wm.forecasts(pidx1, ws0, np, bins)
-
speed2power — converts wind speed data to wind power, expressed as fraction of installed capacity
wp = wm.speed2power(ws)
-
display — called to display object on command line
wm
-
wy_wind_trans_probs — generates transition probabilities for MOST from the model
tp = wy_wind_trans_probs(model, np, bins)
-
wy_wind_realizations — generates realizations from the model, or extracts them from the historical data, given the starting period and the number of periods desired
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)
-
wy_wind_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
wsf = wy_wind_forecasts(model, widx, pidx1, ws0, np, bins)
-
wy_wind_speed2power — converts wind speed data to wind power, expressed as fraction of installed capacity, based on provided power curve
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)
-
wy_wind_date2pidx — converts a date vector to a raw period index
pidx = wy_wind_date2pidx(npd, dt0, dt)
-
wy_wind_pidx2date — converts a raw period index to date vector
dt = wy_wind_pidx2date(npd, dt0, pidx)
-
wy_wind_power_curve_data — loads a power curve table from a file
s2p = wy_wind_power_curve_data() s2p = wy_wind_power_curve_data(idx) s2p = wy_wind_power_curve_data(idx, fname)
The following functions are included in order to eliminate any dependence on the Statistics Toolbox.
-
mvnrnd_nst — replacement for
mvnrnd()
based onrandn()
.r = mvnrnd_nst(mu, sigma, n)
-
normcdf_nst — replacement for
normcdf()
based onerfc()
.pout = normcdf_nst(xin, mu, sigma)
-
norminv_nst — replacement for
norminv()
based onerfcinv()
.xout = norminv_nst(pin)
- wy_wind_bins — returns number of bins and bin boundaries given a bin
specification
bins
[nb, bin_bounds] = wy_wind_bins(bins)
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
WY-Wind-Model is distributed under the 3-clause BSD license.
- 1.0 — Jun 13, 2022
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.