You are on page 1of 60

Sh

Short‐Term Load Forecasting
T L dF i

Dr SN Singh, Professor
Department of Electrical Engineering
Indian Institute of Technology Kanpur
Email: snsingh@iitk ac in
Email: snsingh@iitk.ac.in
Basic Definition of Forecasting

Forecasting is a problem of determining the future values of a 
time series from current and past values
time series from current and past values.

Past measurements Forecasted values

• one step ahead
• two step ahead
• Multiple step ahead

Time sampling can be in  
sec, min, hours, days,   Short term forecast
months and years  Medium term forecast
 Long term forecast
Role of Forecasting in Electric Power System

Before Deregulation of Electric Power System
Only Load Demand forecasting is carried
‐ Economic operation and Unit commitment  
‐ Maintenance and planning  of power system   

After Deregulation of Electric Power System

Monopolistic
Motivation:
 Creating competition 
among the suppliers
 Leaving choices to the 
Deregulated Market buyers 
Role of Forecasting in Electric Power System
….Contd.

Electricity Market Operation
Energy, 
Energy ISO’
ISO’s
GENCO’s/Suppliers
Ancillary Services, and 
Transmission
Forecasting Market Forecast
‐ Load Day ahead
D h d • Load
‐ Price • Price
‐ Wind Power
Bids
Hour ahead Bids
Real Time
S h d l
Schedules
Bidding  Schedules Market Operation
Bidding 
strategies/Risk  • SCUC
strategies/Risk 
Management • A S Auction
Management
Markets • Cong. Mgmt.
• Trans. Pricing
T Pi i
Market Bidding Process

Day ahead 
Day ahead
bidding for day 2

Hour‐ahead
Hour ahead 
bidding for day 2

Day 1 Real Day 2


time

Market
clearing for
day 2

Day‐ahead Forecast (24+6hrs)
Important Tools 
1. Load Forecast
2. Price Forecast
3. Operating Reserve Margin Forecast
Operating Reserve Margin Forecast
4. Wind Forecast

System Operator Point of View:
Planning Problems:
l bl
Due to uncertainty, unlike conventional generators, wind power generation 
cannot be included into ELD and UC problems.

Operational:
Frequency control, Voltage control, Power Quality, Ancillary services 
provision.
provision

Wind power producer point of view:
Bidding in day ahead adjustment and settling Electricity Markets to
Bidding in day ahead, adjustment and settling Electricity Markets to 
maximize profits/minimize their imbalance costs.
Factors Influencing the Forecast  Variable

Time Factor
• Hour in a day
Hour in a day
• Day of the Week
• Holiday

Type of Customer
• Domestic loads
Load Demand • Commercial loads
• Industrial loads

Weather Parameters
• Temperature
• Humidity
• Sky cover
• Sun shine
• Wind Speed & 
Direction
Effect of Time Factor
4
x 10
3.2

2.8
mand (MW)

2.6
Load Dem

2.4

2.2

First Week Second Week


1.8
0 24 48 72 96 120 144 168 192 216 240 264 288 312 336
Time sample
Dependency on Weather Parameter:
Temperature
4
x 10
5
4
x 10
ad Demand (MW)

5
4

3 4.5

2 4
Loa

Load Demand (MW)


1
0 1000 2000 3000 4000 5000 6000 7000 8000 9000 3.5

3
40

2.5
20
Temp (oC)

2
0
1.5
-10 -5 0 5 10 15 20 25 30 35 40
-20 Temp (oC)
0 1000 2000 3000 4000 5000 6000 7000 8000 9000
Time sample
Factors Influencing Electricity Market Price

Load Demand

Network 
Congestion

Electricity Reserve
Market Clearing Price
g Margin

Fuel Prices 

Available 
Hydro Generation
Price vs. Load Demand

9000 300
8000
W)

250
load demand (MW

7000

6000 200

CP ($/MWh)
5000 150
4000

MC
100
3000
0 1000 2000 3000 4000 5000 6000
time samples (hrs) 50

0
300 3000 4000 5000 6000 7000 8000 9000
aring price ($/MWh )

load demand (MW)

200

100
Market Clea

100
80

MCP ($/MWh)
60

0 40
0 1000 2000 3000 4000 5000 6000
time samples (hrs) 20
2400 2450 2500 2550 2600 2650
time samples (hrs)
Factors Influencing Wind Power Generation

Wind Speed
Wind Speed

Wind 
Wind
Direction
Wind Power
Wind Turbine
Wind Turbine
Layout

Terrain 
Wind speed and wind power time series
30
m/s)
Wind Speed (m

20

10

0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
4
x 10
200
Power (MW)

150

100
Wind P

50

0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
Time sample 4
x 10
Wind Speed vs. Wind Power scatter plot

180

160

140

120
nd Power (MW)

100

80
Win

60

40

20

0
0 5 10 15 20 25
Wind Speed (m/s)
Forecasting Approaches
Linear Regression Models : The forecast value is linearly dependent on 
the past historical values of the time series. (AR, ARMA, ARIMA, GARCH, etc.)

AR(p):  Autoregressive model of order p

ARMA(p,q): Autoregressive Moving  Average 
ARMA(p,q): Autoregressive Moving Average
model of order (p,q).

MA(q): Moving Average model of order q


MA(q):  Moving Average model of order q
Generalized AutoRegressive Conditional
Heteroskedasticity (GARCH)
The general process for a GARCH model involves three
steps.
t

• The first is to estimate a best-fitting


g autoregressive
g model;
• secondly, compute autocorrelations of the error term and
• lastly, test for significance.

GARCH models are used by financial professionals in


several arenas including trading, investing, hedging and
d li
dealing.
Forecasting Approaches (Contd..)
ARIMA: Autoregressive Integrated  Fractional‐ARIMA:
Moving Average Model
This type of models are employed when 
This type of models are employed when
ARIMA is a generalized form of ARMA 
time series exhibits long memory.
model. It is applied when time series has 
some non‐stationary behavior (do not  F‐ARIMA model is a special case of 
vary about a fixed mean)
vary about a fixed mean).  ARIMA(p d q) process
ARIMA(p,d,q) process.
Where parameter d assumes fractionally 
continuous values in the range (‐0.5, 0.5).
Correlation Analysis
Finding the appropriate values of p and q  can be facilitated by Partial Auto 
Correlation Functions (PACF) and Auto‐Correlation Functions (ACF).

If Mean of a Time series is given  :

and Variance is given by :

Then auto‐correlation at lag ‘k’ is given by :
Example in Matlab :  AR(1)
AR(1) x t=  x t-1+e, with
AR(1): ith  =0.8
08

e=randn(100,1); 10

x=zeros(100,1);
5

AR((1)
x(1)=e(1);
x(1) e(1);
alpha=0.8; 0
for i=2:100
-5
x(i)=alpha*x(i‐1)+e(i); 0 20 40 60 80 100
1
end
subplot(3,1,1) 0.5
plot(x); ACF
0
title('AR(1) {t} \alpha{ {t
title('AR(1): x_{t}=\alpha{x_{t‐
1}+e}, with \alpha{=0.8}'); -0.5
0 5 10 15 20 25
subplot(3,1,2); Lag
1
autocorr(x,25,[],2);
subplot(3,1,3); 0.5
PACF

parcorr(x,25,[],2);
0

-0.5
0 5 10 15 20 25
Lag
Example in Matlab :  AR(2)
AR(2): xt= 1x t-1+ 2x t-2+e,
+e with  1=1.5,
1=1 5  2=-0.75
=-0 75
10
e=randn(100,1);
5
x=zeros(100,1);

A R (2)
x(1)=e(1); x(2)=e(2);
x(1)=e(1); x(2)=e(2); 0

alpha1=1.5; alpha2 = ‐0.75;  -5

for i=3:100, x(i)=alpha1*x(i‐ -10
1)+alpha2*x(i‐2)+e(i); end 0 10 20 30 40 50 60 70 80 90 100
1
subplot(3,1,1)
plot(x); 0.5

title('AR(2): x_{t}=\alpha_{1}x_{t‐
A CF 0
1}+\alpha {2}x {t‐2}+e
1}+\alpha_{2}x_{t 2}+e, with 
with
\alpha{1}=1.5, \alpha_{2}=‐0.75');
-0.5
subplot(3,1,2); 0 5 10 15 20 25
Lag
autocorr(x,25,[],2); 1

subplot(3,1,3); 0.5

parcorr(x,25,[],2);
P A CF

-0.5

-1
0 5 10 15 20 25
Lag
Example in Matlab :  MA(1)

MA(1): x t= x t-1+e, with =0.8


4
e=randn(101,1); 2
theta=‐0.8;

MA(1)
0
x=e(2:101,1)‐theta*e(1:100,1); -2
subplot(3,1,1) -4
0 10 20 30 40 50 60 70 80 90 100
plot(x); 1
title('MA(1): x_{t}=\theta{x_{t‐
1}+e}, with \theta{=0.8}'); 0.5

ACF
subplot(3,1,2);
0
autocorr(x,25,[],2);
subplot(3,1,3); -0.5
0 5 10 15 20 25
Lag
parcorr(x,25,[],2); 1

0.5
PACF

-0.5
0 5 10 15 20 25
Lag
Example in Matlab :  MA(2)

MA(2): x t=et-1et-1-2et-2
5

e=randn(102,1); 0

MA(2)
theta1=‐1.5; theta2=‐0.8; 
-5
x=e(3:102,1) ‐ theta1*e(2:101,1) ‐
theta2*e(1:100,1); -10
0 10 20 30 40 50 60 70 80 90 100
subplot(3,1,1);
1
plot(x);
title('MA(2): x_{t}=e_{t}‐ 0.5

ACF
\theta_{1}e_{t‐1}‐\theta_{2}e_{t‐2} );
0
subplot(3,1,2);
-0.5
autocorr(x(20:end),20,[],2); 0 2 4 6 8 10 12 14 16 18 20
Lag
subplot(3,1,3); 1

parcorr(x(20:end) 20 [] 2);
parcorr(x(20:end),20,[],2); 0.5
PACF

-0.5
0 2 4 6 8 10 12 14 16 18 20
Lag
Example in Matlab :  ARMA(2,1)

10
clear all;
close all;
close all; 5

ARMA(2,1)
e=2*randn(300,1); 0

x=zeros(300,1); -5

x(1)=e(1); x(2)=e(2); -10
0 50 100 150 200 250 300
alpha1=0.9; alpha2 = ‐0.3; 
l h 1 09 l h 2 03
theta1= 0.5; 1
for i=3:300
0.5
x(i)=alpha1*x(i‐1)+
() p ( ) ACF
F
alpha2*x(i‐2)+ 0
e(i)‐theta1*e(i‐1) ; 
-0.5
end 0 5 10 15 20 25 30
Lag
subplot(3 1 1)
subplot(3,1,1)
1
plot(x);
subplot(3,1,2); 0.5
PACF

autocorr(x(25:end),30,[],2);
P

0
subplot(3,1,3);
parcorr(x(25:end),30,[],2); -0.5
0 5 10 15 20 25 30
Lag
ACF and PACF for casual Time series models

AR(p) MA(q) ARMA(p,q)

ACF Tails off Cuts off after lag q Tails off

PACF Cuts off after lag p


Cuts off after lag p Tails off Tails off
Estimation of Model Parameters
After choosing p and q the model can be fitted by linear  least squares 
regression to find the model parameters which minimize the error terms.
State-Space Models
Consider a univariate AR(p) process:

This could be written in state-space form


as,

state
equation

observation equation
Limitations of Linear Regression Models

As they are linear models, they cannot capture the non‐linear 
y , y p
relation between the independent and dependent variable.

The forecasting error increases rapidly with the increase in look‐
ahead time.

The model parameters have to be updated very frequently.
Forecasting Approaches        …..contd
Non‐Linear Regression models:

Artificial Neural Networks (ANN): are well established in function approximation, 
many variants of NNs are employed in the field of forecasting problem. Like FFNN, 
RNN, RBF, WNN.

Network
Parameters

+

Back‐Propagation  Algorithm,  Evolutionary based Optimization methods like GA, 
PSO are also applied for network training
PSO are also applied for network training.
Input variables are selected using ACF and PACF.
Other Methods..
Other Methods..

‐ Fuzzy Logic
Fuzzy Logic

‐ Adaptive Neuro‐Fuzzy Inference System (ANFIS)
‐ D
Data Mining techniques like clustering and Support 
t Mi i t h i lik l t i dS t
Vector Machines (SVM) based classification and 
Regression models
‐ Wavelet pre‐filtering based ANN and Fuzzy models.
Benchmark Models
Measure of Errors

Then,
AWNN : Architecture
Continuous Wavelet Transforms 
• A wavelet is a small wave which grow and decays essentially in a limited 
time period.

• Should satisfy two basic properties

and
Training Algorithm
Case study: Load Forecasting
4
x 10
3.5
and (MW)
3

25
2.5
Load Dema

1.5
0 100 200 300 400 500 600 700 800 900 1000

0.5
ACF
F

-0.5
0 24 48 72 96 120 144 168 192
Lag
g
1

0.5
PACF

0
P

-0.5

-1
0 24 48 72 96 120 144 168 192
Lag
Cross correlation between Load and Temp.
4
x 10
5

Load ((MW) 4

1
0 1000 2000 3000 4000 5000 6000 7000 8000
40

30

20
mp (0C)

10
Tem

-10
0 1000 2000 3000 4000 5000 6000 7000 8000
0.8

0.6

0.4
XCF

0.2

-0.2
-100 -80 -60 -40 -20 0 20 40 60 80 100
Lag
Input lag hours selected for Load Forecasting

Load Terms

Temp. Terms

Temp. 
time 
series

Load 
time 
series

Epochs:  (input, output) pairs 
AWNN
Hour ahead load forecast
4
x 10
3.4

3.2

3
mand (MW)

2.8

2.6
Load Dem

2.4

2.2

1.8
0 24 48 72 96 120 144 168 192 216
Hour

=  0.6905 
Forecast MAPE
hour
24 h
24‐hours ahead Forecast
h dF 1
2
0.9551
1.5191
3 1.9664
4 4 2.2592
x 10 5 2.4768
35
3.5
Sun Tue Sat Sun 6 2.5779
Sat Mon Wed Thu Fri
7 2.6639
8 2.6883
ad Demand ((MW)

3 9 2.6556
10 2 6816
2.6816
11 2.7565
2.5 12 2.8146
13 2.8640
14 2.8843
Loa

2 15 2.8949
16 2.9113
17 2.9190
1.5 18 2.9096
0 24 48 72 96 120 144 168 192 216 19 2 8514
2.8514
time samples 20 2.8290
21 2.8039
22 2.7618
23 2.7373
24 2.7447

Average 2.5886
Case study: Price Forecasting

300

250

200
CP ($/MWh)

150 1
MC

100
0.5
50

A CF
0
0 1000 2000 3000 4000 5000 6000 0
time samples (hrs)

-0.5
0 50 100 150 200 250 300
100
Lag

80
MCP ($/MWh)

60

40

20
2400 2450 2500 2550 2600 2650
time samples (hrs)
300

250
h)

200
MCP($/MW

150

100

50

0
Price 
0 1000 2000 3000
time samples (hrs)
4000 5000 6000
Terms
10000
load demand (MW)

8000

6000
Load 
4000
Terms
2000
0 1000 2000 3000 4000 5000 6000
time samples (hrs)
1

0.5
XCF

-0.5

-1
-200 -150 -100 -50 0 50 100 150 200
Lag
Price Forecasting Results
1‐hr ahead Price Forecast  (MAPE = 8.4355)
200 Forecast MAPE
hour
150 1 8.1130 
MCP ($/MWh))

2 10.6029 
3 11.9206 
100 4 12.7485 
5 13.2603 
6 13.8258 
50
7 14 0576
14.0576 
8 14.2544 
0 9 14.2845 
0 24 48 72 96 120 144 168 180 10 14.2799 
time samples (hrs) 11 14.2896 
12 14.2922 
24‐hr ahead Price Forecast
h h d 13 14.2737 
200 14 14.3819 
15 14.5195 
16 14.4968 
150
17 14.5853 
Wh)
MCP ($/MW

18 14.7405 
100 19 14.9456 
20 15.1473 
21 15.3574 
50 22 15.5360 
23 15 7343
15.7343 
24 15.9714
0
0 24 48 72 96 120 144 168 192 216
time samples (hrs) Average 13.9841
Wind Speed Time Series
25

20
peed
15
wind sp

10

0
0 1000 2000 3000 4000 5000 6000 7000 8000 9000
time samples

20

15
eed
wind spe

10

0
3000 3100 3200 3300 3400 3500 3600 3700 3800 3900 4000
time samples
Schematic Block Diagram for Wind Speed Forecasting
Multiresolution Analysis of Wind Speed 
Time Series
Time Series
S7 10
5
0
5
D7

0
-5
5
D6

0
-5
5
D5

0
-5
5
D4

0
-5
5
D3

0
-5
5
D2

0
-5
5
5
d SeriesD1

0
-5
20
10
wind

0
0 1000 2000 3000 4000 5000 6000 7000 8000
time (hours)
ACF’s of Decomposed Wind Speed Time Series
1
S7
0

-1
1
D7

-1
1
D6

-1
1
D5

-1
1
D4

-1
1
D3

-1
1
D2

-1
1
D1

-1
0 100 200 300 400 500 600
Lag
Network Architecture and Input Lag Hours

Decomposed
D d I
Input Lag‐hours
L h N
Network
k Architecture
A hi
Signal
AWNN FFNN
S7 1‐14,157‐159,285‐287
1 14,157 159,285 287 20‐2‐1
20 21 20‐3‐1
20 31
D7 1‐12,76‐83,167‐169 19‐2‐1 19‐3‐1
D6 1‐10,41‐44,84‐86 17‐2‐1 17‐3‐1
D5 1 6 21 23 44 47
1‐6,21‐23,44‐47 13 2 1
13‐2‐1 13 3 1
13‐3‐1
D4 1‐3,11‐13,23‐25,48,72 11‐2‐1 11‐3‐1
D3 1,2,5,6,12,60,72 7‐2‐1 7‐3‐1
D2 3,6,9,15 4‐2‐1 4‐3‐1
D1 1,2,5,22 4‐2‐1 4‐3‐1
Wind Power Forecast

Wind 
d
Speed 

Wind Farm
highly stochastic  
random  
non‐stationary.

rated speed

put
Power outp
Wind speed

Cut‐in speed Wind P

Manufacturer curve
Wind Power Forecasting: Time Horizon
Very Short‐Term Forecasting : Up to 2‐3 h in steps of 10min. or 15min.
‐Turbine control 
‐Real time participation in electricity market
‐Real time participation in electricity market.

Short‐Term Forecasting : Up to 24h in steps of 1h.
‐ Hour ahead bidding
Hour ahead bidding
‐ Intraday market
‐ Day‐ahead market
‐ Unit commitment and Economic dispatch
‐ Ancillary services management
ll
‐ Day‐ahead reserve setting

Medium Term Forecasting ( With NWP inputs): up to 72h in steps of 1h.
g( p ) p p
• In addition to the above mentioned benefits 
• Maintenance planning of wind farms
• Wind farm and storage device Coordination
Wind farm and storage device Coordination
• Congestion management
• Maintenance planning of network lines. 50
Wind Power Forecasting: Approaches

NWP  Wind Speed at 
forecasts Physical  WP 
WP
1) Hub height
Model Forecast

Manufacturer curve

NWP forecasts
Statistical 
2) Wind speed
Model WP  Forecast
Wind power
Wind power

Available historical 
measurements. ARX,  ARMAX, NN, Fuzzy, ANIF
A Two stage approach for Wind Power Forecast

Historical  Wind speed 
measurements of
measurements of  forecasts
AWNN
wind speed. 

Wind speed FFNN
WP  Forecast
Wind 
power
Autocorrelation Analysis of Wind Series
Sample Autocorrelation Function Sample Autocorrelation Function
1 1
S a m p l e A u t o c o r r e la t i o n

S a m p le A u t o c o r r e laa t io n
0.5 0.5

0 0

-0.5
0 20 40 60 80 100 120 140 160 180 200 0 20 40 60 80 100 120 140 160 180 200
Lag Function
Sample Autocorrelation Sample Autocorrelation
Lag Function
1 1
S a m p le A u t o c o r r e l a t i o n

S a m p le A u t o c o r r e la t io n
0.5 0.5

0 0

-0.5 -0.5
0 20 40 60 80 100 120 140 160 180 200 0 20 40 60 80 100 120 140 160 180 200
Lag Lag
ag
Hour Ahead Forecast of Wind Speed
12

10
peed
wind sp

AWNN
6 FFNN
Actual
4
1 5 9 13 17 21 24
hours
30‐hours ahead Wind Speed Forecast
18
actual
16
forecast by AWNN
14 forecast by FFNN

12
ed (m/s)

10
wind spee

0
0 30 60 90 120 150 180 210 240 270 300
time (hours)
Comparative Performance

4.5

4
MAE of AWNN

3.5
MAE off FFNN

3 MAE of NR

2.5 MAE of PER


errors

2 RMSE of AWNN

RMSE of FFNN
1.5

RMSE of NR
1
RMSE of PER
05
0.5

0
0 5 10 15 20 25 30
look-ahead time (hours)
Percentage Improvement
90
MAE over PER
RMSE over PER
80
MAE over NR
perrc entage im pprov em ent

RMSE over NR
70

60

50

40

30
0 5 10 15 20 25 30
look-ahead time (hours)
Wind speed to Wind Power Transformation

Wind 
Wi d FForecasted
t d
speed wind speed

FFNN 

Wind 
Wind
power wind power
Forecast

FFNN Inputs:  
wind speed {0, 1, 2} lag hours and from 
wind power series {1 2 3 4 5 6} lag hours
wind power series {1, 2, 3, 4, 5, 6} lag hours.
Error Distributions and Forecasting Ability
80
Occurencee of errors(% )

60

40
100

% o f t im e s w it h in t h e e rro r m a rg in (% )
20
7.5%
0 90 12.5%
-100 -50 0 50 100
Error(% of Pinst)
80
1‐hr ahead forecast error distributions
70
%)

30
O c c u re n c e o f e rro rs (%

60
20
50

10
40
0 5 10 15 20 25 30
0 look-ahead time (hours)
-100 -50 0 50 100
Error(% of Pinst)

30th ‐hr ahead forecast error distributions