Professional Documents
Culture Documents
net/publication/278036847
CITATIONS READS
0 322
1 author:
Paulin Jacquot
École Polytechnique
22 PUBLICATIONS 120 CITATIONS
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
All content following this page was uploaded by Paulin Jacquot on 12 June 2015.
April 3, 2015
1 Introduction
The python module loadFromWeather.py module is designed to forecast
scenarios for electricity load for use in stochastic unit commitment. The
scenarios depend on the error made on the forecast. They should give a set
of potential behaviors of the actual load, with associated probability. Since
load highly depends on the weather, this program is designed to use the
weather forecast to compute the potential scenarios for the load.
2 Input data
2.1 Weather forecast database
The weather forecast database can be given either in q pickle or an excel
file. It contains for each entry, in this order :
1
For instance, one line of the excel file will be :
7 3/30/2007 BDL 3/31/2007 7 29 20 7
The file path will be given as an option forecast database filename
or will be given as an argument to the main function.
1/4/2011 9 3296.8 3385 48.29 49.43 −0.49 −0.65 55.5956.10 0.00 −0.51 26
2.3 Zones
One can proceed several different zones in the same time, for instance Con-
necticut and New Hampshire. One can link the zones to master zones. The
zone data is provided in a .dat file and whose name is given by the option
zones filename, and each entry contains the zone name and its masterzone
name, separated by a space.
2
3 Parameters
3.1 Scenarios parameters
One has to specify the different parameters that are used to generate the
scenarios. This is done in a file which name is defined by the option
loadFromWeather params filename, that contains the following :
• the day part separators (dps), that is, the cutting hours that will divide
the day in sub-periods, on a 0 basis, that is the first dps should be 0
and the last 23. For instance this line will be 0 11 23 if we want to
separate mornings and after-noon.
• the distribution cutting point ( DistrCutPts) for each day part limit,
that are used to generate the scenarios path for each category within
the error points, and for each error sub-segment defined by the cat-
egory bounds. For instance, 11 0.0 0.5 1.0 will give two segments
and two scenario skeleton points for noon, for each error category.
• the category bounds CatBounds that are used to sub-segment the data
according to the error distribution function, in the day part category.
These are breakpoints for the CDF of the error, so the first breakpoint
must be 0.0 and the last must be 1.0. For example, CatBounds 0.0
0.5 1.0 will give two equally weighted error categories data for each
day part.
• the coefficients given to the temperature and to the dew point value
in the weather forecast
3
• for each range, date of beginning and date of end.
As an example :
summer 3 0.5 0.5 2010−5−15 2010−5−15 2010−5−17 2010−06−10
4 Options
4.1 Kick-out date
For any day after this date, the module will generate load scenarios. It can
be either given as a parameter or changed in the option kickout date. Its
default value is none, which means that all days in the data 2.2 will be used.
The date has to be given in the format yyyy-mm-dd.
5 Drive everything
The module drive everything.py load the data and runs every modules
that is needed to pre-treat the data and have the parameters ready before
launching loadFromWeather.py. In the following order :
4
• forecats[location][date day][hour] = [temperature, dew point,
wind speed]
5.2 Segmenter
The segmenter will cluster the data days given in data from 2.2 according
to the temperature at a certain hour or the average (see option 4.3). The
number of segments for each period of the year is given by the parameters
in 3.2.
The segmenter first compute the temperature limits corresponding to
the break points given in 3.2. It then creates, for each master zone and each
data range, a list of the days belonging to each segment. According to the
value of option 4.2, the ”kick-out day” itself or all days following it won’t
be taken into account.
The segmenter writes three types of file that will be used :
• a .load file for each zone and each segment that contains the load
data 2.2 that has been clustered in this segment
• a .forecasts file, for each zone and each segment that contains the
weather 2.1
• a .segnames file for each zone that contains the names of the segments
followed by the coefficients given to temperature and dew point value
in the segmentation, e.g. summer segment0 0.5 0.5.
5
5.4 Zone rules
As in the wednesday rule transformation , we aggregate the datas for differ-
ent zones into a smaller number of masterzones. The module zonerules.py
computes and writes the coefficients of the transformation matrix and their
inverse in .zonerules and .invzonerules files, for each segment and each
zone.
5.5 Epifit
The Epifit.py module first get the weather data, and the load data trans-
formed with 5.3 and 5.4, into sorted dictionaries , for each master zone,
segment and zone and days.
For each master zone and segment, the module solves the epi-spline
problems to get a regression of the load according to weather forecast. The
epi-splines coefficients are computed using the data for all days and seg-
ments.
The module writes, for each master zone and each segment :
• a .Epicoeff pickle file that contains the coefficients that define the
epi-spline for this master zone and segment
• a .Eload that contains the expected load from the weather forecast
with this epi-spline, for each hour of each day belonging to the seg-
ment and masterzone, after applying the inverse zone and wednesday
transformations from 5.3 and 5.4
• a .Errors that contains the error between the expected load computed
and the actual load, for each hour of each day belonging to the segment
and masterzone. The errors are kept in the wednesday and masterzone
format.
6
days in the data into error subsets according to the error computed in 5.5
for each day part separator hour.
It then computes new epi-splines coefficients for each zone, segment and
error category, which lead to a new estimated load, and new errors regarding
to these estimations. It then can compute the distribution function of the
error in each error category.
With the inverse of the distribution function, the cutting points given in
3.1 for each day part separator hour provide different ranges of the error. In
each error category and each error range, we can compute the conditional
expected value of the error with this distribution function.
Finally, looping on the nodes of the tree, we write the resulting loads cor-
responding to each scenario s in a file scen s zone name scengen out.dat.
For each day, we make a plot of all the scenarios computed, and we write
a summary file summary.dat containing the number of scenarios and their
probabilities .