Probabilistic forecasting ofpeak electricity demand
Rob J Hyndman
Joint work with Shu FanProbabilistic forecasting of peak electricity demand 1
Outline
1 The problem
2 The model
3 Forecasts
4 Challenges and extensions
5 Short term forecasts
6 Evaluating probabilistic forecasts
7 MEFM package
8 References and resources
Probabilistic forecasting of peak electricity demand The problem 2
The problem
We want to forecast the peak electricitydemand in a half-hour period in twenty yearstime.
We have fifteen years of half-hourly electricitydata, temperature data and some economicand demographic data.
The location is South Australia: home to themost volatile electricity demand in the world.
Sounds impossible?
Probabilistic forecasting of peak electricity demand The problem 3
The problem
We want to forecast the peak electricitydemand in a half-hour period in twenty yearstime.
We have fifteen years of half-hourly electricitydata, temperature data and some economicand demographic data.
The location is South Australia: home to themost volatile electricity demand in the world.
Sounds impossible?
Probabilistic forecasting of peak electricity demand The problem 3
South Australian demand data
Probabilistic forecasting of peak electricity demand The problem 4
South Australian demand data
Probabilistic forecasting of peak electricity demand The problem 4
Black Saturday→
The heatwave
Probabilistic forecasting of peak electricity demand The problem 5
The heatwave
Probabilistic forecasting of peak electricity demand The problem 5
The heatwave
Probabilistic forecasting of peak electricity demand The problem 5
South Australian demand data
Probabilistic forecasting of peak electricity demand The problem 6
SA State wide demand (summer 2015)
SA
Sta
te w
ide
dem
and
(GW
)
1.0
1.5
2.0
2.5
3.0
Oct Nov Dec Jan Feb Mar
South Australian demand data
Probabilistic forecasting of peak electricity demand The problem 6
Temperature data (Sth Aust)
Probabilistic forecasting of peak electricity demand The problem 7
Temperature data (Sth Aust)
Probabilistic forecasting of peak electricity demand The problem 8
Demand boxplots (Sth Aust)
Probabilistic forecasting of peak electricity demand The problem 9
Demand densities (Sth Aust)
Probabilistic forecasting of peak electricity demand The problem 10
Outline
1 The problem
2 The model
3 Forecasts
4 Challenges and extensions
5 Short term forecasts
6 Evaluating probabilistic forecasts
7 MEFM package
8 References and resources
Probabilistic forecasting of peak electricity demand The model 11
Predictorscalendar effectsprevailing and recent weather conditionsclimate changeseconomic and demographic changeschanging technology
Modelling framework
Semi-parametric additive models withcorrelated errors.Each half-hour period modelled separately foreach season.Variables selected to provide bestout-of-sample predictions using cross-validationon each summer.
Probabilistic forecasting of peak electricity demand The model 12
Predictorscalendar effectsprevailing and recent weather conditionsclimate changeseconomic and demographic changeschanging technology
Modelling framework
Semi-parametric additive models withcorrelated errors.Each half-hour period modelled separately foreach season.Variables selected to provide bestout-of-sample predictions using cross-validationon each summer.
Probabilistic forecasting of peak electricity demand The model 12
Monash Electricity Forecasting Model
y∗t = yt/yi
yt denotes per capita demand (minus offset) attime t (measured in half-hourly intervals);
yi is the average demand for quarter i where tis in quarter i.
y∗t is the standardized demand for time t.
log(yt) = log(yi) + log(y∗t )
log(yi) = f(GSP, price, HDD, CDD) + εi
log(y∗t ) = f(calendar effects, temperatures) + et
Probabilistic forecasting of peak electricity demand The model 13
Monash Electricity Forecasting Model
Probabilistic forecasting of peak electricity demand The model 14
Monash Electricity Forecasting Model
Probabilistic forecasting of peak electricity demand The model 14
Annual model
log(yt) = log(yi) + log(y∗t )
log(yi) = f(GSP, price, HDD, CDD) + εi
log(y∗t ) = f(calendar effects, temperatures) + et
log(yi) = log(yi−1) +∑j
cj(zj,i − zj,i−1) + εi
First differences modelled to avoidnon-stationary variables.Predictors: Per-capita GSP, Price, Summer CDD,Winter HDD.
Probabilistic forecasting of peak electricity demand The model 15
Annual model
log(yt) = log(yi) + log(y∗t )
log(yi) = f(GSP, price, HDD, CDD) + εi
log(y∗t ) = f(calendar effects, temperatures) + et
log(yi) = log(yi−1) +∑j
cj(zj,i − zj,i−1) + εi
First differences modelled to avoidnon-stationary variables.Predictors: Per-capita GSP, Price, Summer CDD,Winter HDD.
Probabilistic forecasting of peak electricity demand The model 15
Annual model
log(yt) = log(yi) + log(y∗t )
log(yi) = f(GSP, price, HDD, CDD) + εi
log(y∗t ) = f(calendar effects, temperatures) + et
log(yi) = log(yi−1) +∑j
cj(zj,i − zj,i−1) + εi
First differences modelled to avoidnon-stationary variables.Predictors: Per-capita GSP, Price, Summer CDD,Winter HDD.
zCDD =∑
summer
max(0, T − 17.5)T = daily mean
Probabilistic forecasting of peak electricity demand The model 15
Annual model
log(yt) = log(yi) + log(y∗t )
log(yi) = f(GSP, price, HDD, CDD) + εi
log(y∗t ) = f(calendar effects, temperatures) + et
log(yi) = log(yi−1) +∑j
cj(zj,i − zj,i−1) + εi
First differences modelled to avoidnon-stationary variables.Predictors: Per-capita GSP, Price, Summer CDD,Winter HDD.
zHDD =∑
winter
max(0,19.5− T)T = daily mean
Probabilistic forecasting of peak electricity demand The model 15
Annual model
SA summer cooling degree days
Year
scdd
2002 2004 2006 2008 2010 2012 2014
300
400
500
600
700
SA winter heating degree days
Year
whd
d
2002 2004 2006 2008 2010 2012 2014
600
650
700
750
800
850
Probabilistic forecasting of peak electricity demand The model 16
Annual model
Variable Coefficient Std. Error t value P value∆gsp.pc 2.02 5.05 0.38 0.711∆price −1.67 0.68 −2.46 0.026∆scdd 1.11 0.25 4.49 0.000∆whdd 2.07 0.33 0.63 0.537
GSP needed to stay in the model to allowscenario forecasting.
All other variables led to improved AICC.
Probabilistic forecasting of peak electricity demand The model 17
Annual model
Variable Coefficient Std. Error t value P value∆gsp.pc 2.02 5.05 0.38 0.711∆price −1.67 0.68 −2.46 0.026∆scdd 1.11 0.25 4.49 0.000∆whdd 2.07 0.33 0.63 0.537
GSP needed to stay in the model to allowscenario forecasting.
All other variables led to improved AICC.
Probabilistic forecasting of peak electricity demand The model 17
Annual model
Variable Coefficient Std. Error t value P value∆gsp.pc 2.02 5.05 0.38 0.711∆price −1.67 0.68 −2.46 0.026∆scdd 1.11 0.25 4.49 0.000∆whdd 2.07 0.33 0.63 0.537
GSP needed to stay in the model to allowscenario forecasting.
All other variables led to improved AICC.
Probabilistic forecasting of peak electricity demand The model 17
Annual model
Probabilistic forecasting of peak electricity demand The model 18
Year
Ann
ual d
eman
d
1.0
1.2
1.4
1.6
1.8
2.0
2002 2004 2006 2008 2010 2012 2014
ActualFitted
Monash Electricity Forecasting Model
log(yt) = log(yi) + log(y∗t )
log(yi) = f(GSP, price, HDD, CDD) + εi
log(y∗t ) = f(calendar effects, temperatures) + et
Calendar effects
“Time of summer” effect (a regression spline)Day of week factor (7 levels)Public holiday factor (4 levels)New Year’s Eve factor (2 levels)
Probabilistic forecasting of peak electricity demand The model 19
Monash Electricity Forecasting Model
log(yt) = log(yi) + log(y∗t )
log(yi) = f(GSP, price, HDD, CDD) + εi
log(y∗t ) = f(calendar effects, temperatures) + et
Calendar effects
“Time of summer” effect (a regression spline)Day of week factor (7 levels)Public holiday factor (4 levels)New Year’s Eve factor (2 levels)
Probabilistic forecasting of peak electricity demand The model 19
Monash Electricity Forecasting Model
log(yt) = log(yi) + log(y∗t )
log(yi) = f(GSP, price, HDD, CDD) + εi
log(y∗t ) = f(calendar effects, temperatures) + et
Calendar effects
“Time of summer” effect (a regression spline)Day of week factor (7 levels)Public holiday factor (4 levels)New Year’s Eve factor (2 levels)
Probabilistic forecasting of peak electricity demand The model 19
Monash Electricity Forecasting Model
log(yt) = log(yi) + log(y∗t )
log(yi) = f(GSP, price, HDD, CDD) + εi
log(y∗t ) = f(calendar effects, temperatures) + et
Calendar effects
“Time of summer” effect (a regression spline)Day of week factor (7 levels)Public holiday factor (4 levels)New Year’s Eve factor (2 levels)
Probabilistic forecasting of peak electricity demand The model 19
Fitted results (Summer 3pm)
Probabilistic forecasting of peak electricity demand The model 20
0 50 100 150
−0.
40.
00.
4
Day of summer
Effe
ct o
n de
man
d
Mon Tue Wed Thu Fri Sat Sun
−0.
40.
00.
4
Day of week
Effe
ct o
n de
man
d
Normal Day before Holiday Day after
−0.
40.
00.
4
Holiday
Effe
ct o
n de
man
d
Time: 3:00 pm
Monash Electricity Forecasting Model
log(yt) = log(yi) + log(y∗t )
log(yi) = f(GSP, price, HDD, CDD) + εi
log(y∗t ) = f(calendar effects, temperatures) + et
Temperature effectsAve temp across two sites, plus lags forprevious 3 hours and previous 3 days.Temp difference between two sites, plus lagsfor previous 3 hours and previous 3 days.Max ave temp in past 24 hours.Min ave temp in past 24 hours.Ave temp in past seven days.
Each function estimated using boosted regression splines.Probabilistic forecasting of peak electricity demand The model 21
Monash Electricity Forecasting Model
log(yt) = log(yi) + log(y∗t )
log(yi) = f(GSP, price, HDD, CDD) + εi
log(y∗t ) = f(calendar effects, temperatures) + et
Temperature effectsAve temp across two sites, plus lags forprevious 3 hours and previous 3 days.Temp difference between two sites, plus lagsfor previous 3 hours and previous 3 days.Max ave temp in past 24 hours.Min ave temp in past 24 hours.Ave temp in past seven days.
Each function estimated using boosted regression splines.Probabilistic forecasting of peak electricity demand The model 21
Monash Electricity Forecasting Model
log(yt) = log(yi) + log(y∗t )
log(yi) = f(GSP, price, HDD, CDD) + εi
log(y∗t ) = f(calendar effects, temperatures) + et
Temperature effectsAve temp across two sites, plus lags forprevious 3 hours and previous 3 days.Temp difference between two sites, plus lagsfor previous 3 hours and previous 3 days.Max ave temp in past 24 hours.Min ave temp in past 24 hours.Ave temp in past seven days.
Each function estimated using boosted regression splines.Probabilistic forecasting of peak electricity demand The model 21
Monash Electricity Forecasting Model
log(yt) = log(yi) + log(y∗t )
log(yi) = f(GSP, price, HDD, CDD) + εi
log(y∗t ) = f(calendar effects, temperatures) + et
Temperature effectsAve temp across two sites, plus lags forprevious 3 hours and previous 3 days.Temp difference between two sites, plus lagsfor previous 3 hours and previous 3 days.Max ave temp in past 24 hours.Min ave temp in past 24 hours.Ave temp in past seven days.
Each function estimated using boosted regression splines.Probabilistic forecasting of peak electricity demand The model 21
Monash Electricity Forecasting Model
log(yt) = log(yi) + log(y∗t )
log(yi) = f(GSP, price, HDD, CDD) + εi
log(y∗t ) = f(calendar effects, temperatures) + et
Temperature effectsAve temp across two sites, plus lags forprevious 3 hours and previous 3 days.Temp difference between two sites, plus lagsfor previous 3 hours and previous 3 days.Max ave temp in past 24 hours.Min ave temp in past 24 hours.Ave temp in past seven days.
Each function estimated using boosted regression splines.Probabilistic forecasting of peak electricity demand The model 21
Monash Electricity Forecasting Model
log(yt) = log(yi) + log(y∗t )
log(yi) = f(GSP, price, HDD, CDD) + εi
log(y∗t ) = f(calendar effects, temperatures) + et
Temperature effectsAve temp across two sites, plus lags forprevious 3 hours and previous 3 days.Temp difference between two sites, plus lagsfor previous 3 hours and previous 3 days.Max ave temp in past 24 hours.Min ave temp in past 24 hours.Ave temp in past seven days.
Each function estimated using boosted regression splines.Probabilistic forecasting of peak electricity demand The model 21
Monash Electricity Forecasting Model
log(yt) = log(yi) + log(y∗t )
log(yi) = f(GSP, price, HDD, CDD) + εi
log(y∗t ) = f(calendar effects, temperatures) + et
Temperature effectsAve temp across two sites, plus lags forprevious 3 hours and previous 3 days.Temp difference between two sites, plus lagsfor previous 3 hours and previous 3 days.Max ave temp in past 24 hours.Min ave temp in past 24 hours.Ave temp in past seven days.
Each function estimated using boosted regression splines.Probabilistic forecasting of peak electricity demand The model 21
Monash Electricity Forecasting ModelTemperature effects
6∑k=0
[fk,p(xt−k) + gk,p(dt−k)
]+ qp(x+t ) + rp(x−t ) + sp(xt)
+6∑j=1
[Fj,p(xt−48j) + Gj,p(dt−48j)
]xt is ave temp across two sites at time t;dt is the temp difference between two sites attime t;x+t is max of xt values in past 24 hours;x−t is min of xt values in past 24 hours;xt is ave temp in past seven days.
Probabilistic forecasting of peak electricity demand The model 22
Monash Electricity Forecasting ModelTemperature effects
6∑k=0
[fk,p(xt−k) + gk,p(dt−k)
]+ qp(x+t ) + rp(x−t ) + sp(xt)
+6∑j=1
[Fj,p(xt−48j) + Gj,p(dt−48j)
]xt is ave temp across two sites at time t;dt is the temp difference between two sites attime t;x+t is max of xt values in past 24 hours;x−t is min of xt values in past 24 hours;xt is ave temp in past seven days.
Probabilistic forecasting of peak electricity demand The model 22
Monash Electricity Forecasting ModelTemperature effects
6∑k=0
[fk,p(xt−k) + gk,p(dt−k)
]+ qp(x+t ) + rp(x−t ) + sp(xt)
+6∑j=1
[Fj,p(xt−48j) + Gj,p(dt−48j)
]xt is ave temp across two sites at time t;dt is the temp difference between two sites attime t;x+t is max of xt values in past 24 hours;x−t is min of xt values in past 24 hours;xt is ave temp in past seven days.
Probabilistic forecasting of peak electricity demand The model 22
Monash Electricity Forecasting ModelTemperature effects
6∑k=0
[fk,p(xt−k) + gk,p(dt−k)
]+ qp(x+t ) + rp(x−t ) + sp(xt)
+6∑j=1
[Fj,p(xt−48j) + Gj,p(dt−48j)
]xt is ave temp across two sites at time t;dt is the temp difference between two sites attime t;x+t is max of xt values in past 24 hours;x−t is min of xt values in past 24 hours;xt is ave temp in past seven days.
Probabilistic forecasting of peak electricity demand The model 22
Monash Electricity Forecasting ModelTemperature effects
6∑k=0
[fk,p(xt−k) + gk,p(dt−k)
]+ qp(x+t ) + rp(x−t ) + sp(xt)
+6∑j=1
[Fj,p(xt−48j) + Gj,p(dt−48j)
]xt is ave temp across two sites at time t;dt is the temp difference between two sites attime t;x+t is max of xt values in past 24 hours;x−t is min of xt values in past 24 hours;xt is ave temp in past seven days.
Probabilistic forecasting of peak electricity demand The model 22
Fitted results (Summer 3pm)
Probabilistic forecasting of peak electricity demand The model 23
10 20 30 40
−0.
4−
0.2
0.0
0.2
0.4
Temperature
Effe
ct o
n de
man
d
10 20 30 40
−0.
4−
0.2
0.0
0.2
0.4
Lag 1 temperature
Effe
ct o
n de
man
d
10 20 30 40
−0.
4−
0.2
0.0
0.2
0.4
Lag 2 temperature
Effe
ct o
n de
man
d
10 20 30 40
−0.
4−
0.2
0.0
0.2
0.4
Lag 3 temperature
Effe
ct o
n de
man
d
10 20 30 40
−0.
4−
0.2
0.0
0.2
0.4
Lag 1 day temperature
Effe
ct o
n de
man
d
10 15 20 25 30
−0.
4−
0.2
0.0
0.2
0.4
Last week average temp
Effe
ct o
n de
man
d
15 25 35
−0.
4−
0.2
0.0
0.2
0.4
Previous max temp
Effe
ct o
n de
man
d
10 15 20 25
−0.
4−
0.2
0.0
0.2
0.4
Previous min temp
Effe
ct o
n de
man
d
Time: 3:00 pm
Half-hourly models
log(y∗t ) = f(calendar effects, temperatures) + et
Data split into working/non-working days, andinto night/day/evening (6 subsets).Separate model for each half-hour period withineach subset (96 models).Same predictors used for all models in a subset.Predictors chosen by cross-validation on lasttwo summers.Each model is fitted to the data twice, firstexcluding the last summer and then excludingthe previous summer. Average out-of-sampleMSE calculated from omitted data.
Probabilistic forecasting of peak electricity demand The model 24
Half-hourly models
log(y∗t ) = f(calendar effects, temperatures) + et
Data split into working/non-working days, andinto night/day/evening (6 subsets).Separate model for each half-hour period withineach subset (96 models).Same predictors used for all models in a subset.Predictors chosen by cross-validation on lasttwo summers.Each model is fitted to the data twice, firstexcluding the last summer and then excludingthe previous summer. Average out-of-sampleMSE calculated from omitted data.
Probabilistic forecasting of peak electricity demand The model 24
Half-hourly models
log(y∗t ) = f(calendar effects, temperatures) + et
Data split into working/non-working days, andinto night/day/evening (6 subsets).Separate model for each half-hour period withineach subset (96 models).Same predictors used for all models in a subset.Predictors chosen by cross-validation on lasttwo summers.Each model is fitted to the data twice, firstexcluding the last summer and then excludingthe previous summer. Average out-of-sampleMSE calculated from omitted data.
Probabilistic forecasting of peak electricity demand The model 24
Half-hourly models
log(y∗t ) = f(calendar effects, temperatures) + et
Data split into working/non-working days, andinto night/day/evening (6 subsets).Separate model for each half-hour period withineach subset (96 models).Same predictors used for all models in a subset.Predictors chosen by cross-validation on lasttwo summers.Each model is fitted to the data twice, firstexcluding the last summer and then excludingthe previous summer. Average out-of-sampleMSE calculated from omitted data.
Probabilistic forecasting of peak electricity demand The model 24
Half-hourly models
log(y∗t ) = f(calendar effects, temperatures) + et
Data split into working/non-working days, andinto night/day/evening (6 subsets).Separate model for each half-hour period withineach subset (96 models).Same predictors used for all models in a subset.Predictors chosen by cross-validation on lasttwo summers.Each model is fitted to the data twice, firstexcluding the last summer and then excludingthe previous summer. Average out-of-sampleMSE calculated from omitted data.
Probabilistic forecasting of peak electricity demand The model 24
Half-hourly modelsx x1 x2 x3 x4 x5 x6 x48 x96 x144 x192 x240 x288 d d1 d2 d3 d4 d5 d6 d48 d96 d144 d192 d240 d288 x+ x− x dow hol dos MSE
1 • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • 1.0372 • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • 1.0343 • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • 1.0314 • • • • • • • • • • • • • • • • • • • • • • • • • • • • • 1.0275 • • • • • • • • • • • • • • • • • • • • • • • • • • • • 1.0256 • • • • • • • • • • • • • • • • • • • • • • • • • • • 1.0207 • • • • • • • • • • • • • • • • • • • • • • • • • • 1.0258 • • • • • • • • • • • • • • • • • • • • • • • • • • 1.0269 • • • • • • • • • • • • • • • • • • • • • • • • • 1.035
10 • • • • • • • • • • • • • • • • • • • • • • • • 1.04411 • • • • • • • • • • • • • • • • • • • • • • • 1.05712 • • • • • • • • • • • • • • • • • • • • • • 1.07613 • • • • • • • • • • • • • • • • • • • • • 1.10214 • • • • • • • • • • • • • • • • • • • • • • • • • • 1.01815 • • • • • • • • • • • • • • • • • • • • • • • • • 1.02116 • • • • • • • • • • • • • • • • • • • • • • • • 1.03717 • • • • • • • • • • • • • • • • • • • • • • • 1.07418 • • • • • • • • • • • • • • • • • • • • • • 1.15219 • • • • • • • • • • • • • • • • • • • • • 1.18020 • • • • • • • • • • • • • • • • • • • • • • • • • 1.02121 • • • • • • • • • • • • • • • • • • • • • • • • 1.02722 • • • • • • • • • • • • • • • • • • • • • • • 1.03823 • • • • • • • • • • • • • • • • • • • • • • 1.05624 • • • • • • • • • • • • • • • • • • • • • 1.08625 • • • • • • • • • • • • • • • • • • • • 1.13526 • • • • • • • • • • • • • • • • • • • • • • • • • 1.00927 • • • • • • • • • • • • • • • • • • • • • • • • • 1.06328 • • • • • • • • • • • • • • • • • • • • • • • • • 1.02829 • • • • • • • • • • • • • • • • • • • • • • • • • 3.52330 • • • • • • • • • • • • • • • • • • • • • • • • • 2.14331 • • • • • • • • • • • • • • • • • • • • • • • • • 1.523
Probabilistic forecasting of peak electricity demand The model 25
Half-hourly models
Probabilistic forecasting of peak electricity demand The model 26
6070
8090
R−squared
Time of day
R−
squa
red
(%)
12 midnight 6:00 am 9:00 am 12 noon 3:00 pm 6:00 pm 9:00 pm3:00 am 12 midnight
Half-hourly models
Probabilistic forecasting of peak electricity demand The model 26
Demand (January 2015)
Date in January
SA
dem
and
(GW
)
01
23
45
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31
ActualPredicted
Temperatures (January 2015)
Date in January
Tem
pera
ture
(de
g C
)
1020
3040
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31
temp_23090temp_23083
Half-hourly models
Probabilistic forecasting of peak electricity demand The model 26
Half-hourly models
Probabilistic forecasting of peak electricity demand The model 26
Half-hourly models
Probabilistic forecasting of peak electricity demand The model 26
Predictions adjusted forsaturated usage.
Outline
1 The problem
2 The model
3 Forecasts
4 Challenges and extensions
5 Short term forecasts
6 Evaluating probabilistic forecasts
7 MEFM package
8 References and resources
Probabilistic forecasting of peak electricity demand Forecasts 27
Peak demand forecasting
log(yt) = log(yi) + log(y∗t )
log(yi) = f(GSP, price, HDD, CDD) + εi
log(y∗t ) = f(calendar effects, temperatures) + et
Multiple alternative futures created:Calendar effects known;
Future temperatures simulated(taking account of climate change);
Assumed values for GSP, population and price;
Residuals simulated
Probabilistic forecasting of peak electricity demand Forecasts 28
Peak demand backcasting
log(yt) = log(yi) + log(y∗t )
log(yi) = f(GSP, price, HDD, CDD) + εi
log(y∗t ) = f(calendar effects, temperatures) + et
Multiple alternative pasts created:Calendar effects known;
Past temperatures simulated;
Actual values for GSP, population and price;
Residuals simulated
Probabilistic forecasting of peak electricity demand Forecasts 28
Peak demand backcasting
Probabilistic forecasting of peak electricity demand Forecasts 29
PoE (seasonal interpretation, summer)
Year
PoE
Dem
and
(tot
al)
2.4
2.6
2.8
3.0
3.2
3.4
3.6
3.8
2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015
10 %50 %90 %
●
●
●
●
● ●
●
●
●
●
●
●
●
●
Peak demand backcasting
log(yt) = log(yi) + log(y∗t )
log(yi) = f(GSP, price, HDD, CDD) + εi
log(y∗t ) = f(calendar effects, temperatures) + et
Multiple alternative pasts created:Calendar effects known;
Past temperatures simulated;
Actual values for GSP, population and price;
Residuals simulated
Probabilistic forecasting of peak electricity demand Forecasts 30
Peak demand forecasting
log(yt) = log(yi) + log(y∗t )
log(yi) = f(GSP, price, HDD, CDD) + εi
log(y∗t ) = f(calendar effects, temperatures) + et
Multiple alternative futures created:Calendar effects known;
Future temperatures simulated(taking account of climate change);
Assumed values for GSP, population and price;
Residuals simulated
Probabilistic forecasting of peak electricity demand Forecasts 30
Peak demand forecasting
Probabilistic forecasting of peak electricity demand Forecasts 31
Population
Year
000'
s pe
rson
s
2000 2005 2010 2015 2020 2025 2030 2035
1600
2000
baselowhigh
GSP
Year
$ m
illio
n
2000 2005 2010 2015 2020 2025 2030 2035
2000
035
000 base
lowhigh
Price
Year
c/kW
h
2000 2005 2010 2015 2020 2025 2030 2035
1520
2530
35
baselowhigh
Peak demand distribution
Probabilistic forecasting of peak electricity demand Forecasts 32
Seasonal POE levels (summer)
Year
PoE
Dem
and
2.0
2.5
3.0
3.5
4.0
4.5
2002 2005 2008 2011 2014 2017 2020 2023 2026 2029 2032 2035
●
●
●
● ●
●
●●
●
●
●
●
●
10 % POE50 % POE90 % POEActual annual maximum
Seasonal block bootstrapping
Conventional seasonal block bootstrap
Same as block bootstrap but with whole years as theblocks to preserve seasonality.But we only have about 10–15 years of data, so there is alimited number of possible bootstrap samples.
Double seasonal block bootstrap
Suitable when there are two seasonal periods (here wehave years of 151 days and days of 48 half-hours).Divide each year into blocks of length 48m.Block 1 consists of the first m days of the year, block 2consists of the next m days, and so on.Bootstrap sample consists of a sample of blocks whereeach block may come from a different randomly selectedyear but must be at the correct time of year.
Probabilistic forecasting of peak electricity demand Forecasts 33
Seasonal block bootstrapping
Conventional seasonal block bootstrap
Same as block bootstrap but with whole years as theblocks to preserve seasonality.But we only have about 10–15 years of data, so there is alimited number of possible bootstrap samples.
Double seasonal block bootstrap
Suitable when there are two seasonal periods (here wehave years of 151 days and days of 48 half-hours).Divide each year into blocks of length 48m.Block 1 consists of the first m days of the year, block 2consists of the next m days, and so on.Bootstrap sample consists of a sample of blocks whereeach block may come from a different randomly selectedyear but must be at the correct time of year.
Probabilistic forecasting of peak electricity demand Forecasts 33
Seasonal block bootstrapping
Conventional seasonal block bootstrap
Same as block bootstrap but with whole years as theblocks to preserve seasonality.But we only have about 10–15 years of data, so there is alimited number of possible bootstrap samples.
Double seasonal block bootstrap
Suitable when there are two seasonal periods (here wehave years of 151 days and days of 48 half-hours).Divide each year into blocks of length 48m.Block 1 consists of the first m days of the year, block 2consists of the next m days, and so on.Bootstrap sample consists of a sample of blocks whereeach block may come from a different randomly selectedyear but must be at the correct time of year.
Probabilistic forecasting of peak electricity demand Forecasts 33
Seasonal block bootstrapping
Conventional seasonal block bootstrap
Same as block bootstrap but with whole years as theblocks to preserve seasonality.But we only have about 10–15 years of data, so there is alimited number of possible bootstrap samples.
Double seasonal block bootstrap
Suitable when there are two seasonal periods (here wehave years of 151 days and days of 48 half-hours).Divide each year into blocks of length 48m.Block 1 consists of the first m days of the year, block 2consists of the next m days, and so on.Bootstrap sample consists of a sample of blocks whereeach block may come from a different randomly selectedyear but must be at the correct time of year.
Probabilistic forecasting of peak electricity demand Forecasts 33
Seasonal block bootstrapping
Conventional seasonal block bootstrap
Same as block bootstrap but with whole years as theblocks to preserve seasonality.But we only have about 10–15 years of data, so there is alimited number of possible bootstrap samples.
Double seasonal block bootstrap
Suitable when there are two seasonal periods (here wehave years of 151 days and days of 48 half-hours).Divide each year into blocks of length 48m.Block 1 consists of the first m days of the year, block 2consists of the next m days, and so on.Bootstrap sample consists of a sample of blocks whereeach block may come from a different randomly selectedyear but must be at the correct time of year.
Probabilistic forecasting of peak electricity demand Forecasts 33
Seasonal block bootstrapping
Conventional seasonal block bootstrap
Same as block bootstrap but with whole years as theblocks to preserve seasonality.But we only have about 10–15 years of data, so there is alimited number of possible bootstrap samples.
Double seasonal block bootstrap
Suitable when there are two seasonal periods (here wehave years of 151 days and days of 48 half-hours).Divide each year into blocks of length 48m.Block 1 consists of the first m days of the year, block 2consists of the next m days, and so on.Bootstrap sample consists of a sample of blocks whereeach block may come from a different randomly selectedyear but must be at the correct time of year.
Probabilistic forecasting of peak electricity demand Forecasts 33
Seasonal block bootstrapping
Conventional seasonal block bootstrap
Same as block bootstrap but with whole years as theblocks to preserve seasonality.But we only have about 10–15 years of data, so there is alimited number of possible bootstrap samples.
Double seasonal block bootstrap
Suitable when there are two seasonal periods (here wehave years of 151 days and days of 48 half-hours).Divide each year into blocks of length 48m.Block 1 consists of the first m days of the year, block 2consists of the next m days, and so on.Bootstrap sample consists of a sample of blocks whereeach block may come from a different randomly selectedyear but must be at the correct time of year.
Probabilistic forecasting of peak electricity demand Forecasts 33
Seasonal block bootstrapping
Probabilistic forecasting of peak electricity demand Forecasts 34
Actual temperatures
Days
degr
ees
C
0 10 20 30 40 50 60
1015
2025
3035
40
Bootstrap temperatures (fixed blocks)
Days
degr
ees
C
0 10 20 30 40 50 60
1015
2025
3035
40
Bootstrap temperatures (variable blocks)
Days
degr
ees
C
0 10 20 30 40 50 60
1015
2025
3035
40
Seasonal block bootstrapping
Problems with the double seasonal bootstrapBoundaries between blocks can introduce largejumps. However, only at midnight.Number of values that any given time in year isstill limited to the number of years in the dataset.
Probabilistic forecasting of peak electricity demand Forecasts 35
Seasonal block bootstrapping
Problems with the double seasonal bootstrapBoundaries between blocks can introduce largejumps. However, only at midnight.Number of values that any given time in year isstill limited to the number of years in the dataset.
Probabilistic forecasting of peak electricity demand Forecasts 35
Seasonal block bootstrapping
Variable length double seasonal blockbootstrap
Blocks allowed to vary in length between m−∆and m + ∆ days where 0 ≤ ∆ < m.
Blocks allowed to move up to ∆ days from theiroriginal position.
Has little effect on the overall time seriespatterns provided ∆ is relatively small.
Use uniform distribution on (m−∆,m + ∆) toselect block length, and independent uniformdistribution on (−∆,∆) to select variation onstarting position for each block.
Probabilistic forecasting of peak electricity demand Forecasts 36
Seasonal block bootstrapping
Variable length double seasonal blockbootstrap
Blocks allowed to vary in length between m−∆and m + ∆ days where 0 ≤ ∆ < m.
Blocks allowed to move up to ∆ days from theiroriginal position.
Has little effect on the overall time seriespatterns provided ∆ is relatively small.
Use uniform distribution on (m−∆,m + ∆) toselect block length, and independent uniformdistribution on (−∆,∆) to select variation onstarting position for each block.
Probabilistic forecasting of peak electricity demand Forecasts 36
Seasonal block bootstrapping
Variable length double seasonal blockbootstrap
Blocks allowed to vary in length between m−∆and m + ∆ days where 0 ≤ ∆ < m.
Blocks allowed to move up to ∆ days from theiroriginal position.
Has little effect on the overall time seriespatterns provided ∆ is relatively small.
Use uniform distribution on (m−∆,m + ∆) toselect block length, and independent uniformdistribution on (−∆,∆) to select variation onstarting position for each block.
Probabilistic forecasting of peak electricity demand Forecasts 36
Seasonal block bootstrapping
Variable length double seasonal blockbootstrap
Blocks allowed to vary in length between m−∆and m + ∆ days where 0 ≤ ∆ < m.
Blocks allowed to move up to ∆ days from theiroriginal position.
Has little effect on the overall time seriespatterns provided ∆ is relatively small.
Use uniform distribution on (m−∆,m + ∆) toselect block length, and independent uniformdistribution on (−∆,∆) to select variation onstarting position for each block.
Probabilistic forecasting of peak electricity demand Forecasts 36
Seasonal block bootstrapping
Probabilistic forecasting of peak electricity demand Forecasts 37
Actual temperatures
Days
degr
ees
C0 10 20 30 40 50 60
1015
2025
3035
40
Bootstrap temperatures (fixed blocks)
Days
degr
ees
C
0 10 20 30 40 50 60
1015
2025
3035
40
Bootstrap temperatures (variable blocks)
Days
degr
ees
C
0 10 20 30 40 50 60
1015
2025
3035
40
Seasonal block bootstrapping
Probabilistic forecasting of peak electricity demand Forecasts 37
Outline
1 The problem
2 The model
3 Forecasts
4 Challenges and extensions
5 Short term forecasts
6 Evaluating probabilistic forecasts
7 MEFM package
8 References and resources
Probabilistic forecasting of peak electricity demand Challenges and extensions 38
Challenges
Some judgmental adjustments are done toaccount for demand response activity.
We have a separate model for PV generationbased on solar radiation and temperatures. Butlimited PV data available, so PV adjustmentsare probably inaccurate.
Difficult to account for new technology such aslocal storage intended to flatten demand.
Climate change effect is assumed additive atall temperature levels — probably simplistic.
Probabilistic forecasting of peak electricity demand Challenges and extensions 39
Challenges
Some judgmental adjustments are done toaccount for demand response activity.
We have a separate model for PV generationbased on solar radiation and temperatures. Butlimited PV data available, so PV adjustmentsare probably inaccurate.
Difficult to account for new technology such aslocal storage intended to flatten demand.
Climate change effect is assumed additive atall temperature levels — probably simplistic.
Probabilistic forecasting of peak electricity demand Challenges and extensions 39
Challenges
Some judgmental adjustments are done toaccount for demand response activity.
We have a separate model for PV generationbased on solar radiation and temperatures. Butlimited PV data available, so PV adjustmentsare probably inaccurate.
Difficult to account for new technology such aslocal storage intended to flatten demand.
Climate change effect is assumed additive atall temperature levels — probably simplistic.
Probabilistic forecasting of peak electricity demand Challenges and extensions 39
Challenges
Some judgmental adjustments are done toaccount for demand response activity.
We have a separate model for PV generationbased on solar radiation and temperatures. Butlimited PV data available, so PV adjustmentsare probably inaccurate.
Difficult to account for new technology such aslocal storage intended to flatten demand.
Climate change effect is assumed additive atall temperature levels — probably simplistic.
Probabilistic forecasting of peak electricity demand Challenges and extensions 39
Implementation
Probabilistic forecasting of peak electricity demand Challenges and extensions 40
Our model is used for long-term forecasting in:
Victoria’s Vision 2030 energy plan;
all regions of the National Energy Market;
South Western Interconnected System(WA);
some local distributors.
Implementation
Probabilistic forecasting of peak electricity demand Challenges and extensions 40
Our model is used for long-term forecasting in:
Victoria’s Vision 2030 energy plan;
all regions of the National Energy Market;
South Western Interconnected System(WA);
some local distributors.
It is also used for short-termforecasting comparisons in:
all regions of theNational Energy Market.
Outline
1 The problem
2 The model
3 Forecasts
4 Challenges and extensions
5 Short term forecasts
6 Evaluating probabilistic forecasts
7 MEFM package
8 References and resources
Probabilistic forecasting of peak electricity demand Short term forecasts 41
Short-term forecasts
log(yt) = log(yi) + log(y∗t )
log(yi) = f(GSP, price, HDD, CDD) + εi
log(y∗t ) = f(calendar effects, temperatures) + et
Simulating temperatures and residuals is ok forlong-term forecasts because short-termdynamics wash out after a few weeks.
But short-term forecasts need to take accountof recent temperatures and recent residualsdue to serial correlation.
Short-term temperature forecasts are available.
Probabilistic forecasting of peak electricity demand Short term forecasts 42
Short-term forecasts
log(yt) = log(yi) + log(y∗t )
log(yi) = f(GSP, price, HDD, CDD) + εi
log(y∗t ) = f(calendar effects, temperatures) + et
Simulating temperatures and residuals is ok forlong-term forecasts because short-termdynamics wash out after a few weeks.
But short-term forecasts need to take accountof recent temperatures and recent residualsdue to serial correlation.
Short-term temperature forecasts are available.
Probabilistic forecasting of peak electricity demand Short term forecasts 42
Short-term forecasts
log(yt) = log(yi) + log(y∗t )
log(yi) = f(GSP, price, HDD, CDD) + εi
log(y∗t ) = f(calendar effects, temperatures) + et
Simulating temperatures and residuals is ok forlong-term forecasts because short-termdynamics wash out after a few weeks.
But short-term forecasts need to take accountof recent temperatures and recent residualsdue to serial correlation.
Short-term temperature forecasts are available.
Probabilistic forecasting of peak electricity demand Short term forecasts 42
Short-term forecasting model
log(yt) = log(yi) + log(y∗t )
log(yi) = f(GSP, price, HDD, CDD) + εi
log(y∗t ) = f(calendar effects, temperatures,
lagged demand) + et
Lagged demand inputs
Demand in last 3 hours and last 3 days;
Maximum demand in past 24 hours;
Minimum demand in past 24 hours;
Average demand in past 7 days
Each function is estimated using boosted regression splines.
Probabilistic forecasting of peak electricity demand Short term forecasts 43
Short-term forecasting model
log(yt) = log(yi) + log(y∗t )
log(yi) = f(GSP, price, HDD, CDD) + εi
log(y∗t ) = f(calendar effects, temperatures,
lagged demand) + et
Lagged demand inputs
Demand in last 3 hours and last 3 days;
Maximum demand in past 24 hours;
Minimum demand in past 24 hours;
Average demand in past 7 days
Each function is estimated using boosted regression splines.
Probabilistic forecasting of peak electricity demand Short term forecasts 43
GEFCom2012
Probabilistic forecasting of peak electricity demand Short term forecasts 44
GEFCom2012
Probabilistic forecasting of peak electricity demand Short term forecasts 44
Methods published inIJF, April 2014.
Outline
1 The problem
2 The model
3 Forecasts
4 Challenges and extensions
5 Short term forecasts
6 Evaluating probabilistic forecasts
7 MEFM package
8 References and resources
Probabilistic forecasting of peak electricity demand Evaluating probabilistic forecasts 45
Forecast accuracy measures
MAE: Mean absolute errorMSE: Mean squared errorMAPE: Mean absolute percentage error
å Good when forecasting a typical future value(e.g., the mean or median).
Probabilistic forecasting of peak electricity demand Evaluating probabilistic forecasts 46
Forecast accuracy measures
MAE: Mean absolute errorMSE: Mean squared errorMAPE: Mean absolute percentage error
å Good when forecasting a typical future value(e.g., the mean or median).
Probabilistic forecasting of peak electricity demand Evaluating probabilistic forecasts 46
Forecast accuracy measures
MAE: Mean absolute errorMSE: Mean squared errorMAPE: Mean absolute percentage error
å Good when forecasting a typical future value(e.g., the mean or median).
Probabilistic forecasting of peak electricity demand Evaluating probabilistic forecasts 46
Forecast accuracy measures
MAE: Mean absolute errorMSE: Mean squared errorMAPE: Mean absolute percentage error
å Good when forecasting a typical future value(e.g., the mean or median).
Probabilistic forecasting of peak electricity demand Evaluating probabilistic forecasts 46
Forecast accuracy measures
MAE: Mean absolute errorMSE: Mean squared errorMAPE: Mean absolute percentage error
å Good when forecasting a typical future value(e.g., the mean or median).
å Useless for evaluating forecast percentiles(probability of exceedance values) and forecastdistributions.
Probabilistic forecasting of peak electricity demand Evaluating probabilistic forecasts 46
Evaluating forecast distributions
Probabilistic forecasting of peak electricity demand Evaluating probabilistic forecasts 47
PoE (seasonal interpretation, summer)
Year
PoE
Dem
and
(tot
al)
2.4
2.6
2.8
3.0
3.2
3.4
3.6
3.8
2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015
10 %50 %90 %
●
●
●
●
● ●
●
●
●
●
●
●
●
●
Evaluating forecast distributions
Probabilistic forecasting of peak electricity demand Evaluating probabilistic forecasts 47
PoE (seasonal interpretation, summer)
Year
PoE
Dem
and
(tot
al)
2.4
2.6
2.8
3.0
3.2
3.4
3.6
3.8
2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015
10 %50 %90 %
●
●
●
●
● ●
●
●
●
●
●
●
●
●
12 out of 13 above 90% PoE
6 out of 13 above 50% PoE
2 out of 13 above 10% PoE
Forecast scoring
Probabilistic forecasting of peak electricity demand Evaluating probabilistic forecasts 48
0 1 2 3 4 5 6
Demand distribution
Demand (GWh)
Forecast scoring
Probabilistic forecasting of peak electricity demand Evaluating probabilistic forecasts 48
0 1 2 3 4 5 6
Demand distribution
Demand (GWh)
50%
50% PoE
Forecast scoring
Probabilistic forecasting of peak electricity demand Evaluating probabilistic forecasts 48
0 1 2 3 4 5 6
Demand distribution
Demand (GWh)
50%
50% PoE
Score for 50% PoE
Forecast scoring
Probabilistic forecasting of peak electricity demand Evaluating probabilistic forecasts 48
0 1 2 3 4 5 6
Demand distribution
Demand (GWh)
50%
50% PoE
Score for 50% PoEEquivalent toabsolute error
Forecast scoring
Probabilistic forecasting of peak electricity demand Evaluating probabilistic forecasts 49
0 1 2 3 4 5 6
Demand distribution
Demand (GWh)
Forecast scoring
Probabilistic forecasting of peak electricity demand Evaluating probabilistic forecasts 49
0 1 2 3 4 5 6
Demand distribution
Demand (GWh)
10%
10% PoE
Forecast scoring
Probabilistic forecasting of peak electricity demand Evaluating probabilistic forecasts 49
0 1 2 3 4 5 6
Demand distribution
Demand (GWh)
10%
10% PoE
Score for 10% PoE
Forecast scoring
Probabilistic forecasting of peak electricity demand Evaluating probabilistic forecasts 50
0 1 2 3 4 5 6
Demand distribution
Demand (GWh)
Forecast scoring
Probabilistic forecasting of peak electricity demand Evaluating probabilistic forecasts 50
0 1 2 3 4 5 6
Demand distribution
Demand (GWh)
75%
75% PoE
Forecast scoring
Probabilistic forecasting of peak electricity demand Evaluating probabilistic forecasts 50
0 1 2 3 4 5 6
Demand distribution
Demand (GWh)
75%
75% PoE
Score for 75% PoE
Forecast scoring
Let Qt(1), . . . ,Qt(99) be the PoEs of the forecastdistribution for probabilities 1%,. . . ,99%. Then thescore for observation y is
S(Qt(i), yt) =
{1
100 i(Qt(i)− yt) if yt < Qt(i)1
100(100− i)(yt − Qt(i)) if yt ≥ Qt(i)
Scores are averaged over all observed data foreach i to measure the accuracy of the forecastsfor each percentile.Average score over all percentiles gives thebest distribution forecast.Takes account of how far PoEs are exceeded.
Probabilistic forecasting of peak electricity demand Evaluating probabilistic forecasts 51
Forecast scoring
Let Qt(1), . . . ,Qt(99) be the PoEs of the forecastdistribution for probabilities 1%,. . . ,99%. Then thescore for observation y is
S(Qt(i), yt) =
{1
100 i(Qt(i)− yt) if yt < Qt(i)1
100(100− i)(yt − Qt(i)) if yt ≥ Qt(i)
Scores are averaged over all observed data foreach i to measure the accuracy of the forecastsfor each percentile.Average score over all percentiles gives thebest distribution forecast.Takes account of how far PoEs are exceeded.
Probabilistic forecasting of peak electricity demand Evaluating probabilistic forecasts 51
Forecast scoring
Let Qt(1), . . . ,Qt(99) be the PoEs of the forecastdistribution for probabilities 1%,. . . ,99%. Then thescore for observation y is
S(Qt(i), yt) =
{1
100 i(Qt(i)− yt) if yt < Qt(i)1
100(100− i)(yt − Qt(i)) if yt ≥ Qt(i)
Scores are averaged over all observed data foreach i to measure the accuracy of the forecastsfor each percentile.Average score over all percentiles gives thebest distribution forecast.Takes account of how far PoEs are exceeded.
Probabilistic forecasting of peak electricity demand Evaluating probabilistic forecasts 51
GEFCom2014
Probabilistic forecasting of demand, price,wind, and solar.
Rolling forecasts with incremental data updateon a weekly basis.
Forecasts submitted in the form of percentilesof future distributions.
Evaluation based on quantile scoring.
Prizes for student teams, and for best methods.
Winning methods to be published in the IJF.
Probabilistic forecasting of peak electricity demand Evaluating probabilistic forecasts 52
GEFCom2014
Probabilistic forecasting of demand, price,wind, and solar.
Rolling forecasts with incremental data updateon a weekly basis.
Forecasts submitted in the form of percentilesof future distributions.
Evaluation based on quantile scoring.
Prizes for student teams, and for best methods.
Winning methods to be published in the IJF.
Probabilistic forecasting of peak electricity demand Evaluating probabilistic forecasts 52
GEFCom2014
Probabilistic forecasting of demand, price,wind, and solar.
Rolling forecasts with incremental data updateon a weekly basis.
Forecasts submitted in the form of percentilesof future distributions.
Evaluation based on quantile scoring.
Prizes for student teams, and for best methods.
Winning methods to be published in the IJF.
Probabilistic forecasting of peak electricity demand Evaluating probabilistic forecasts 52
GEFCom2014
Probabilistic forecasting of demand, price,wind, and solar.
Rolling forecasts with incremental data updateon a weekly basis.
Forecasts submitted in the form of percentilesof future distributions.
Evaluation based on quantile scoring.
Prizes for student teams, and for best methods.
Winning methods to be published in the IJF.
Probabilistic forecasting of peak electricity demand Evaluating probabilistic forecasts 52
GEFCom2014
Probabilistic forecasting of demand, price,wind, and solar.
Rolling forecasts with incremental data updateon a weekly basis.
Forecasts submitted in the form of percentilesof future distributions.
Evaluation based on quantile scoring.
Prizes for student teams, and for best methods.
Winning methods to be published in the IJF.
Probabilistic forecasting of peak electricity demand Evaluating probabilistic forecasts 52
GEFCom2014
Probabilistic forecasting of demand, price,wind, and solar.
Rolling forecasts with incremental data updateon a weekly basis.
Forecasts submitted in the form of percentilesof future distributions.
Evaluation based on quantile scoring.
Prizes for student teams, and for best methods.
Winning methods to be published in the IJF.
Probabilistic forecasting of peak electricity demand Evaluating probabilistic forecasts 52
GEFCom2014Load forecasting provisional leaderboard
Probabilistic forecasting of peak electricity demand Evaluating probabilistic forecasts 53
Outline
1 The problem
2 The model
3 Forecasts
4 Challenges and extensions
5 Short term forecasts
6 Evaluating probabilistic forecasts
7 MEFM package
8 References and resources
Probabilistic forecasting of peak electricity demand MEFM package 54
MEFM package for R
Available on github:install.packages("devtools")library(devtools)install_github("robjhyndman/MEFM-package")
Package contents:seasondays The number of days in a seasonsa.econ Historical demographic & economic data for
South Australiasa Historical data for model estimationmaketemps Create lagged temperature variablesdemand_model Estimate the electricity demand modelssimulate_ddemand Temperature and demand simulationsimulate_demand Simulate the electricity demand for the next
season
Probabilistic forecasting of peak electricity demand MEFM package 55
MEFM package for R
Available on github:install.packages("devtools")library(devtools)install_github("robjhyndman/MEFM-package")
Package contents:seasondays The number of days in a seasonsa.econ Historical demographic & economic data for
South Australiasa Historical data for model estimationmaketemps Create lagged temperature variablesdemand_model Estimate the electricity demand modelssimulate_ddemand Temperature and demand simulationsimulate_demand Simulate the electricity demand for the next
season
Probabilistic forecasting of peak electricity demand MEFM package 55
MEFM package for R
Usagelibrary(MEFM)
# Number of days in each "season"seasondays
# Historical economic datasa.econ
# Historical temperature and calendar datahead(sa)tail(sa)dim(sa)
# create lagged temperature variablessalags <- maketemps(sa,2,48)dim(salags)head(salags)
Probabilistic forecasting of peak electricity demand MEFM package 56
MEFM package for R
# formula for annual modelformula.a <- as.formula(anndemand ~ gsp + ddays + resiprice)
# formulas for half-hourly model# These can be different for each half-hourformula.hh <- list()for(i in 1:48) {
formula.hh[[i]] <- as.formula(log(ddemand) ~ ns(temp, df=2)+ day + holiday+ ns(timeofyear, df=9) + ns(avetemp, df=3)+ ns(dtemp, df=3) + ns(lastmin, df=3)+ ns(prevtemp1, df=2) + ns(prevtemp2, df=2)+ ns(prevtemp3, df=2) + ns(prevtemp4, df=2)+ ns(day1temp, df=2) + ns(day2temp, df=2)+ ns(day3temp, df=2) + ns(prevdtemp1, df=3)+ ns(prevdtemp2, df=3) + ns(prevdtemp3, df=3)+ ns(day1dtemp, df=3))
}
Probabilistic forecasting of peak electricity demand MEFM package 57
MEFM package for R
# Fit all modelssa.model <- demand_model(salags, sa.econ, formula.hh, formula.a)
# Summary of annual modelsummary(sa.model$a)
# Summary of half-hourly model at 4pmsummary(sa.model$hh[[33]])
# Simulate future normalized half-hourly datasimdemand <- simulate_ddemand(sa.model, sa, simyears=50)
# economic forecasts, to be given by userafcast <- data.frame(pop=1694, gsp=22573, resiprice=34.65,
ddays=642)
# Simulate half-hourly datademand <- simulate_demand(simdemand, afcast)
Probabilistic forecasting of peak electricity demand MEFM package 58
MEFM package for Rplot(ts(demand$demand[,sample(1:100, 4)], freq=48, start=0),
xlab="Days", main="Simulated demand futures")
Probabilistic forecasting of peak electricity demand MEFM package 59
MEFM package for Rplot(ts(demand$demand[,sample(1:100, 4)], freq=48, start=0),
xlab="Days", main="Simulated demand futures")0.
61.
01.
4
Ser
ies
520.
51.
52.
5
Ser
ies
490.
51.
52.
5
Ser
ies
880.
61.
21.
8
0 50 100 150
Ser
ies
53
Days
Simulated demand futures
Probabilistic forecasting of peak electricity demand MEFM package 59
MEFM package for Rplot(demand$annmax, main="Simulated seasonal maximums",
ylab="GW")
Probabilistic forecasting of peak electricity demand MEFM package 60
MEFM package for Rplot(demand$annmax, main="Simulated seasonal maximums",
ylab="GW")
0 20 40 60 80 100
1.5
2.0
2.5
3.0
Simulated seasonal maximums
Index
GW
Probabilistic forecasting of peak electricity demand MEFM package 60
MEFM package for Rboxplot(demand$annmax, main="Simulated seasonal maximums",
xlab="GW", horizontal=TRUE)rug(demand$annmax)
Probabilistic forecasting of peak electricity demand MEFM package 61
MEFM package for Rboxplot(demand$annmax, main="Simulated seasonal maximums",
xlab="GW", horizontal=TRUE)rug(demand$annmax)
1.5 2.0 2.5 3.0
Simulated seasonal maximums
GW
Probabilistic forecasting of peak electricity demand MEFM package 61
MEFM package for Rplot(density(demand$annmax, bw="SJ"), xlab="Demand (GW)",
main="Density of seasonal maximum demand")rug(demand$annmax)
Probabilistic forecasting of peak electricity demand MEFM package 62
MEFM package for Rplot(density(demand$annmax, bw="SJ"), xlab="Demand (GW)",
main="Density of seasonal maximum demand")rug(demand$annmax)
1.5 2.0 2.5 3.0 3.5
0.0
0.4
0.8
1.2
Density of seasonal maximum demand
Demand (GW)
Den
sity
Probabilistic forecasting of peak electricity demand MEFM package 62
Outline
1 The problem
2 The model
3 Forecasts
4 Challenges and extensions
5 Short term forecasts
6 Evaluating probabilistic forecasts
7 MEFM package
8 References and resources
Probabilistic forecasting of peak electricity demand References and resources 63
References
å Hyndman, R.J. & Fan, S. (2010)“Density forecasting for long-term peak electricity demand”,IEEE Transactions on Power Systems, 25(2), 1142–1153.
å Fan, S. & Hyndman, R.J. (2012) “Short-term load forecastingbased on a semi-parametric additive model”.IEEE Transactions on Power Systems, 27(1), 134–141.
å Ben Taieb, S. & Hyndman, R.J. (2013) “A gradient boostingapproach to the Kaggle load forecasting competition”,International Journal of Forecasting, 29(4).
å Hyndman, R.J., & Fan, S. (2014).“Monash Electricity Forecasting Model”. Technical paper.robjhyndman.com/working-papers/mefm/
å Fan, S., & Hyndman, R.J. (2014). “MEFM: An R package imple-menting the Monash Electricity Forecasting Model.”github.com/robjhyndman/MEFM-package
Probabilistic forecasting of peak electricity demand References and resources 64
Some resourcesBlogs
robjhyndman.com/hyndsight/blog.drhongtao.com/
OrganizationsInternational Institute of Forecasters:forecasters.orgIEEE Working Group on Energy Forecasting:linkedin.com/groups/IEEE-Working-Group-on-Energy-4148276
BooksDickey and Hong (2014) Electric loadforecasting: fundamentals and best practices,OTexts. www.otexts.org/book/elf
Probabilistic forecasting of peak electricity demand References and resources 65
Some resourcesBlogs
robjhyndman.com/hyndsight/blog.drhongtao.com/
OrganizationsInternational Institute of Forecasters:forecasters.orgIEEE Working Group on Energy Forecasting:linkedin.com/groups/IEEE-Working-Group-on-Energy-4148276
BooksDickey and Hong (2014) Electric loadforecasting: fundamentals and best practices,OTexts. www.otexts.org/book/elf
Probabilistic forecasting of peak electricity demand References and resources 65
Some resourcesBlogs
robjhyndman.com/hyndsight/blog.drhongtao.com/
OrganizationsInternational Institute of Forecasters:forecasters.orgIEEE Working Group on Energy Forecasting:linkedin.com/groups/IEEE-Working-Group-on-Energy-4148276
BooksDickey and Hong (2014) Electric loadforecasting: fundamentals and best practices,OTexts. www.otexts.org/book/elf
Probabilistic forecasting of peak electricity demand References and resources 65
Some resourcesBlogs
robjhyndman.com/hyndsight/blog.drhongtao.com/
OrganizationsInternational Institute of Forecasters:forecasters.orgIEEE Working Group on Energy Forecasting:linkedin.com/groups/IEEE-Working-Group-on-Energy-4148276
BooksDickey and Hong (2014) Electric loadforecasting: fundamentals and best practices,OTexts. www.otexts.org/book/elf
Probabilistic forecasting of peak electricity demand References and resources 65
Some resourcesBlogs
robjhyndman.com/hyndsight/blog.drhongtao.com/
OrganizationsInternational Institute of Forecasters:forecasters.orgIEEE Working Group on Energy Forecasting:linkedin.com/groups/IEEE-Working-Group-on-Energy-4148276
BooksDickey and Hong (2014) Electric loadforecasting: fundamentals and best practices,OTexts. www.otexts.org/book/elf
Probabilistic forecasting of peak electricity demand References and resources 65
Some resourcesBlogs
robjhyndman.com/hyndsight/blog.drhongtao.com/
OrganizationsInternational Institute of Forecasters:forecasters.orgIEEE Working Group on Energy Forecasting:linkedin.com/groups/IEEE-Working-Group-on-Energy-4148276
BooksDickey and Hong (2014) Electric loadforecasting: fundamentals and best practices,OTexts. www.otexts.org/book/elf
Probabilistic forecasting of peak electricity demand References and resources 65
Some resourcesBlogs
robjhyndman.com/hyndsight/blog.drhongtao.com/
OrganizationsInternational Institute of Forecasters:forecasters.orgIEEE Working Group on Energy Forecasting:linkedin.com/groups/IEEE-Working-Group-on-Energy-4148276
BooksDickey and Hong (2014) Electric loadforecasting: fundamentals and best practices,OTexts. www.otexts.org/book/elf
Probabilistic forecasting of peak electricity demand References and resources 65