SHORT TERM LOAD FORECASTING
USING NEURAL NETWORKS AND
FUZZY LOGIC
George G Karady
Arizona State University
06/2000 Short-term load forecasting 1
Short Term Load Forecasting
Content
Overview of Short term load forecasting
• Introduction
• Definitions and expected results
• Importance of Short-term load forecasting
• Impute data and system parameters required for load forecasting
• Concept
• Major load forecasting techniques
• Concept of STLF model Development
Statistical methods
• (Multiply liner regression,
• stochastic time series e.t.c)
06/2000 Short-term load forecasting 2
Short Term Load Forecasting
Content
Artificial Neural Networks
• Building block: a feed forward network
• Load forecasting engine
• Results
• Numerical example
Fuzzy logic and evolutionary programming
06/2000 Short-term load forecasting 3
Overview of Short Term
Load Forecasting (STLF)
06/2000 Short-term load forecasting 4
Introduction
The electrical load increases about 3-7%
per year for many years.
The long term load increase depends on
the population growth, local area
development, industrial expansion e.t.c.
The short term load variation depends on
weather, local events, type of day
(Weekday or Holiday or Weekend) e.t.c.
06/2000 Short-term load forecasting 5
Introduction
The building of a power plant requires:
• 10 years (Nuclear)
• 6 years (Large coal-fired)
• 3 years (combustion turbine)
The electric system planing needs the
forecast of the load for several years.
Typically the long term forecast covers a
period of 20 years
06/2000 Short-term load forecasting 6
Introduction
The planning of maintenance, scheduling
of the fuel supply etc. calls for medium
term load forecast .
The medium term load forecast covers a
period of a few weeks.
It provides the peak load and the daily
energy requirement
06/2000 Short-term load forecasting 7
Introduction
The number of generators in operation,
the start up of a new unit depends on the
load.
The day to day operation of the system
requires accurate short term load
forecasting.
06/2000 Short-term load forecasting 8
Introduction
Typically the short term load forecast
covers a period of one week
The forecast calculates the estimated load
for each hours of the day (MW).
The daily peak load. (MW)
The daily or weekly energy generation.
(MWh)
06/2000 Short-term load forecasting 9
Introduction
The utilities use three types of load
forecasting:
• Long term (e.g. 20 years)
• Medium term. (e.g. 3-8 weeks)
• Short term (e.g. one week)
This lecture presents the short term load
forecasting techniques
06/2000 Short-term load forecasting 10
Definitions and Expected Results
(Big picture)
The short term load forecasting provides
load data for each hour and cover a
period of one week.
The load data are:
• hourly or half-hourly peak load in kW
• hourly or half-hourly values of system
energy in kWh
• Daily and weekly system energy in kWh
06/2000 Short-term load forecasting 11
Definitions and Expected Results
(Big picture)
The short term load forecasting is
performed daily or weekly.
The forecasted data are continuously
updated.
Typical short-term, daily load forecast is
presented in the Table in the next page.
(Salt River Project, SRP)
06/2000 Short-term load forecasting 12
Definitions and Expected Results
(Big picture)
Typical short-term, daily load forecast from Salt
River Project. Hourly Load in MW
1/01/85
2153 2075 2001
2787 2677 2545
01/02/85
1930 1893 1893
2721 2613 2500
01/03/85
1892 1839 1835
2657 2526 2412
01/04/85
1856 1803 1806
2716 2620 2537
01/05/85
1793 1720 1672
2509 2314 2170
06/2000 Short-term load forecasting 13
Definitions and Expected Results
(Big picture)
Typical short-term, daily load forecast from Salt
River Project. Hourly Load in MW
1/01/85
2153 2075 2001
2787 2677 2545
01/02/85
1930 1893 1893
2721 2613 2500
01/03/85
1892 1839 1835
2657 2526 2412
01/04/85
1856 1803 1806
2716 2620 2537
01/05/85
1793 1720 1672
2509 2314 2170
06/2000 Short-term load forecasting 14
Importance of Short-term Load
Forecasting
Provide load data to the dispatchers for
economic and reliable operation of the
local power system.
The timeliness and accuracy of the data
affects the cost of operation.
• Example: The increase of accuracy of the
forecast by 1% reduced the operating cost
by L 10M in the British Power system in
1985
06/2000 Short-term load forecasting 15
Importance of Short-term Load
Forecasting
The forecasted data are used for:
• Unit commitment.
– selection of generators in operation,
– start up/shut down of generation to minimize
operation cost
• Hydro scheduling to optimize water release
from reservoirs
• Hydro-thermal coordination to determine the
least cost operation mode (optimum mix)
06/2000 Short-term load forecasting 16
Importance of Short-term Load
Forecasting
The forecasted data are used for:
• Interchange scheduling and energy purchase.
• Transmission line loading
• Power system security assessment.
– Load-flow
– transient stability studies
using different contingencies and the predicted
loads.
06/2000 Short-term load forecasting 17
Importance of Short-term Load
Forecasting
These off-line network studies:
• detect conditions under which the system is
vulnerable
• permit preparation of corrective actions
– load shedding,
– power purchase,
– starting up of peak units,
– switching off interconnections, forming islands,
– increase spinning and stand by reserve
06/2000 Short-term load forecasting 18
Impute Data and System
Parameters for Load Forecasting
The system load is the sum of individual
load.
The usage of electricity by individuals is
unpredictable and varies randomly.
The system load has two components:
• Base component
• Randomly variable component
06/2000 Short-term load forecasting 19
Impute Data and System
Parameters for Load Forecasting
The factors affecting the load are:
• economical or environmental
• time
• weather
• Unforeseeable random events
06/2000 Short-term load forecasting 20
Impute Data and System
Parameters for Load Forecasting
Economical or environmental factors
• Service area demographics (rural, residential)
• Industrial growth.
• Emergence of new industry, change of farming
• Penetration or saturation of appliance usage
• Economical trends (recession or expansion)
• Change of the price of electricity
• Demand side load management
06/2000 Short-term load forecasting 21
Impute Data and System
Parameters for Load Forecasting
The time constraints of economical or
environmental factors are slow,
measured in years.
This factors explains the regional variation
of the load model (New York vs. Kansas)
The load model depends on these slow
changing factors and has to be updated
periodically
06/2000 Short-term load forecasting 22
Impute Data and System
Parameters for Load Forecasting
Time Factors affecting the load
Seasonal variation of load (summer,
winter etc.). The load change is due to:
– Change of number of daylight hours
– Gradual change of average temperature
– Start of school year, vacation
Calls for a different model for each
season
06/2000 Short-term load forecasting 23
Impute Data and System
Parameters for Load Forecasting
Typical Seasonal Variation of Load
Summer peaking utility
06/2000 Short-term load forecasting 24
Impute Data and System
Parameters for Load Forecasting
Time Factors affecting the load
Daily variation of load. ( night, morning,etc)
06/2000 Short-term load forecasting 25
Impute Data and System
Parameters for Load Forecasting
Weekly Cyclic Variation
• Saturday and Sunday significant load reduction
• Monday and Friday slight load reduction
• Typical weekly load pattern:
06/2000 Short-term load forecasting 26
Impute Data and System
Parameters for Load Forecasting
Time Factors affecting the load
Holidays (Christmas, New Years)
• Significant reduction of load
• Days proceeding or following the holidays
also have a reduced load.
– Pattern change due to the tendency of prolonging
the vacation
06/2000 Short-term load forecasting 27
Impute Data and System
Parameters for Load Forecasting
Weather factors affecting the load
The weather affects the load because of
weather sensitive loads:
• air-conditioning
• house heating
• irrigation
06/2000 Short-term load forecasting 28
Impute Data and System
Parameters for Load Forecasting
Weather factors affecting the load
The most important parameters are:
• Forecasted temperature
• Forecasted maximum daily temperature
• Past temperature
Regional temperature in regions with
diverse climate
06/2000 Short-term load forecasting 29
Impute Data and System
Parameters for Load Forecasting
Weather Factors Affecting the Load
The most important parameters are:
• Humidity
• Thunderstorms
• Wind speed
• Rain, fog, snow
• Cloud cover or sunshine
06/2000 Short-term load forecasting 30
Impute Data and System
Parameters for Load Forecasting
Random Disturbances Effects on Load
Start or stop of large loads (steel mill,
factory, furnace)
Widespread strikes
Sporting events (football games)
Popular television shows
Shut-down of industrial facility
06/2000 Short-term load forecasting 31
Impute Data and System
Parameters for Load Forecasting
The different load forecasting techniques
use different sets of data listed before.
Two -three years of data is required for
the validation and development of a new
forecasting program.
The practical use of a forecasting
program requires a moving time window
of data
06/2000 Short-term load forecasting 32
Impute Data and System
Parameters for Load Forecasting
The moving time window of data
requires:
• Data covering the last 3-6 weeks
• Data forecasted for the forecasting period,
generally one week
06/2000 Short-term load forecasting 33
Impute Data and System
Parameters for Load Forecasting
The selection of long periods of historical
data eliminates the seasonal variation
The selection of short periods of historical
data eliminates the processes that are no
longer operative.
06/2000 Short-term load forecasting 34
Impute Data and System
Parameters for Load Forecasting
The forecasting is a continuous process.
The utility forecasts the load of its service
area.
The forecaster
• prepares a new forecast for everyday and
• updates the existing forecast daily
The data base is a moving window of data
06/2000 Short-term load forecasting 35
Major Load Forecasting
Techniques
Statisticalmethods
Artificial Neural Networks
Fuzzy logic
Evolutionary programming
Simulated Annealing and expert system
Combination of the above methods
06/2000 Short-term load forecasting 36
Major Load Forecasting
Techniques
The statistical methods will be discussed
briefly to explain the basic concept of the
load forecasting
This lecture concentrates on load
forecasting methods using neural
networks and fuzzy logic
06/2000 Short-term load forecasting 37
Concept of STLF Model
Development
Model selection
Calculation and update of model
parameters
Testing the model performance
Update/modification of the model if the
performance is not satisfactory
06/2000 Short-term load forecasting 38
Concept of STLF Model
Development
Model selection
• Selection of mathematical techniques that
match with the local requirements
Calculation and update of model
parameters
• This includes the determination of the constants and
• selection of the method to update the constants
values as the circumstance varies. (seasonal
changes)
06/2000 Short-term load forecasting 39
Concept of STLF Model
Development
Testing the model performance
• First the model performance has to be
validated using 2-3 years of historical data
• The final validation is the use of the model in
real life conditions. The evaluation terms
are:
– accuracy
– ease of use
– bad/anomalous data detection
06/2000 Short-term load forecasting 40
Concept of STLF Model
Development
Update/modification of the model if the
performance is not satisfactory
• Due to the changing circumstances (regional
gross, decline of local industry etc.) the
model becomes obsolete and inaccurate,
• Model performance, accuracy has to be
evaluated continuously
• Periodic update of parameters or the change
of model structure is needed
06/2000 Short-term load forecasting 41
Artificial Neural Networks
for STLF
06/2000 Short-term load forecasting 42
Artificial Neural Networks
for STLF
Several Artificial Neural Network (ANN)
based load forecasting programs have
been developed.
The following neural networks were
tested for load forecasting:
• Feed-forward type ANN
• Radial based ANN
• Recurrent type ANN
06/2000 Short-term load forecasting 43
Building Blocks of
a Feed Forward Network
A Feed forward Three-Layered
Perceptron Type ANN was selected to
demonstrate the short term load
forecasting technique.
The selected network forecasts:
• Hourly loads
• Peak load of the day
• Total load of the day.
06/2000 Short-term load forecasting 44
Building Blocks of
a Feed Forward Network
The forecasting with neural network will
be demonstrated using a feed forward
three-layered network to forecast the
peak load of the day.
The network has:
• one output: (load in kW)
• three input: (previous day max. load and
temperature, forecasted max. temperature)_
06/2000 Short-term load forecasting 45
Building Blocks of
a Feed Forward Network
The structure of the Feed Forward
Three-Layered Perceptron Type ANN is
presented on the next page.
The network contains:
• i = 1.. 3 input layer nodes
• j = 1…5 hidden layer nodes
• k=1 output layer nodes
06/2000 Short-term load forecasting 46
Artificial Neural Networks
for STLF
Y
w1 w2 w3 w4 w5
1 2 3 4 5
W11 W12 W25 W35
1 2 3
X1 X2 X3
06/2000 Short-term load forecasting 47
Building Blocks of
a Feed Forward Network
The inputs are:
• X1 previous day max. load
• X2 previous day max. temperature
• X3 forecasted max. temperature
Wij weight factor between input
and hidden layer
wj weight factor between hidden
layer and output
06/2000 Short-term load forecasting 48
Building Blocks of
a Feed Forward Network
A sigmoid function is placed in the nodes
(neurons) of the hidden layer and output
node.
The sigmoid equation for an arbitrary Z
function is:
1
1 e Z
Y output :maximum load
06/2000 Short-term load forecasting 49
Building Blocks of
a Feed Forward Network
Inputs Xi are multiplied by the
connection weights (Wij) and passed on to
the neurons in the hidden layer.
The weighted inputs (Xi*Wij) to each
neurons are added together and passed
through a sigmoid function.
Input of hidden layer neuron 1 is:
X1 W11 X2 W21 X3 W31
06/2000 Short-term load forecasting 50
Building Blocks of
a Feed Forward Network
The output Hj of the jth hidden layer
node is:
Hj 1
n
W X
i 1 ij j
1 e
06/2000 Short-term load forecasting 51
Building Blocks of
a Feed Forward Network
Inputs Hj are multiplied by the
connection weights (wk) and passed on to
the neurons in the output layer.
The weighted inputs (Hj*wk) to each
output neurons are added together and
passed through a sigmoid function.
Input of output neuron is:
H1 W1 H2 W2 H3 W3 H4 W4 H5 W5
06/2000 Short-term load forecasting 52
Building Blocks of
a Feed Forward Network
The output Y is:
Y 1
h
w H
j j
1 e j 1
06/2000 Short-term load forecasting 53
Training of the
Feed Forward Neural Network
The described neural network is trained
using historical data.
Typical data set contains 2-3 years of
load and weather data.
Error back propagation (BP) method is
used for the training.
During the learning the weights are
adjusted repeatedly.
06/2000 Short-term load forecasting 54
Training of the
Feed Forward Neural Network
The output produced by the ANN in
response to inputs are repeatedly
compared with the correct answers
Each time the weights are adjusted
slightly by beck-propagating the error at
the output layer through the ANN
Equations for the training are presented
in the next page
06/2000 Short-term load forecasting 55
Training of the
Feed Forward Neural Network
The equations used for the training are:
• Weight is between input and hidden layer:
n 1
Wij Y ( Yactual Y ) (1 Y ) H j
n
Wij
w j (1 H j ) X j
• Weight is between hidden layer and output:
w n1 w n Y ( Yactual Y ) (1 Y ) H j
j j
06/2000 Short-term load forecasting 56
Training of the
Feed Forward Neural Network
In the equations:
• Yactual is the true value of the output load
• is learning factor (0.3-0.8)
• n is the number of learning cycles
• Xj is the input value belongs to Yactual
A numerical example demonstrates the
use of neural forecasting method.
06/2000 Short-term load forecasting 57
Training of the
Feed Forward Neural Network
The over training has to be avoided using
the cross validation method:
• The training set is divided into two parts.
(Part 1 : two years data, Part 2: one year
data)
• Part 1 is used to train the network, by
passing the data through the network.
• Few hundred times pass represents a
training period.
06/2000 Short-term load forecasting 58
Training of the
Feed Forward Neural Network
The over training of the network has to
be avoided:
• Part 2 is used to check the effectiveness of
the training.
• After each training period the error is
calculated when the network is supplied by
the input data of Part 2.
• The increase of error indicates over training,
when the training has to be stopped
06/2000 Short-term load forecasting 59
Load Forecasting Engine
The EPRI developed a Load Forecasting
Engine using 24 Neural networks.
One network forecasts the load for each
hour of the day.
The networks are grouped into four (4)
categories depending on time of the day.
The categories have different inputs.
06/2000 Short-term load forecasting 60
Load Forecasting Engine
The construction of the engine shows the four
groups of neural networks.
06/2000 Short-term load forecasting 61
Load Forecasting Engine
The four categories are:
• Category 1. Nine neural networks. Forecasts
the load between 1-9AM .
• Category 2. Nine neural networks. Forecasts
the load between 10AM -2PM and 7 -10PM .
• Category 3. Four neural networks. Forecasts
the load between 3-6 PM .
• Category 4. Two neural networks. Forecasts
the load between 11-12 PM .
06/2000 Short-term load forecasting 62
Load Forecasting Engine
The inputs in four categories are:
• Category 1. Forecast for early morning
– general input
– load in the last three-four hours
– temperature in the last three-four hours
• Category 2. Forecast for off peak hours
– general input
– forecast temperature of previous hours
– yesterday’s load and temperature of hours close
to this hours
06/2000 Short-term load forecasting 63
Load Forecasting Engine
The inputs in four categories are:
• Category 3. Forecast for afternoon peak hours
– general input
– forecast temperatures of previous and feature
hours close to this hours.
– yesterday’s load and temperature of hours close
to this hours
• Category 4. Forecast for late night hours
– general input
– forecast temperatures for the four proceeding
hours
06/2000 Short-term load forecasting 64
Load Forecasting Engine
The general input variables are
• same hour load, temperature and humidity
of one day ago. (3)
• same hour load, temperature and humidity
of two days ago. (3)
• same hour load and temperature seven (7)
days ago (2)
06/2000 Short-term load forecasting 65
Load Forecasting Engine
The general input variables are
(continuation):
• same hour forecast temperature and relative
humidity of the next day (2)
• day of the week index (Sunday 01, Monday
02 etc.)
06/2000 Short-term load forecasting 66
Load Forecasting Engine
The load forecasting engine has one
output for the hourly load
The extended forecast uses the forecasted
values. E.g. The two-day ahead forecast
uses values obtained by the one-day
ahead forecast.
The forecast can be updated each hour
using the recent load and weather data
06/2000 Short-term load forecasting 67
Load Forecasting Engine
The weights in the neural network are
adjusted daily.
The retraining uses the actual load and
weather data of the past few days.
The retraining helps to follow the trends,
changes of weather patter e.t.c
06/2000 Short-term load forecasting 68
Load Forecasting For Holidays
The load during the holidays has
different patterns and is significantly
reduced.
The forecast is inaccurate because of the
small number of historical data.
The holiday is treated as
• Saturday if the shopping centers are open
• Sunday if the shopping centers are not open
06/2000 Short-term load forecasting 69
Hourly Weather Forecast
The weather service provides forecasts
for:
• daily maximum and minimum temperature
• daily maximum and minimum relative
humidity
• rain and fog
• maximum wind speed
No hourly data are provided.
06/2000 Short-term load forecasting 70
Hourly Weather Forecast
EPRI developed an hourly temperature
and humidity forecasting engine.
Single neural network with
• 28 inputs :
– hourly temperature of the previous day)
– high and low temperature of the two previous
day
• 24 outputs: expected hourly temperatures.
06/2000 Short-term load forecasting 71
Load Forecasting Results
06/2000 Short-term load forecasting 72
Load Forecasting Results
Comparison of forecasted and actual loads
06/2000 Short-term load forecasting 73
Load Forecasting Results
•Accuracy less than 3% for the next days forecast is
considered good
•The longer term forecast accuracy is less (7-8%)
06/2000 Short-term load forecasting 74
Appendix 1
Derivation of Learning
Algorithm
06/2000 Short-term load forecasting 75
Derivation of Learning
Algorithm
The output of the hidden and output layer and the error
function are:
1 1
H Y
j n h
W X w H
ij j j j
i1 j 1
1 e 1 e
1
E ( X 2 ,n Y ) 2
2
06/2000 Short-term load forecasting 76
Derivation of Learning
Algorithm
The update of the weight factors require iteration
dE dE
dw j dW i j
dw j dW i j
For the calculation of the derivative the following
substitutions are used
h
Y1 w H Y2 1 e Y1 u ( X 2 ,n Y )
j j
j 1
n
h1 W X h2 1 eh1
ij i
i1
06/2000 Short-term load forecasting 77
Derivation of Learning
Algorithm
After substitutions the equations are:
1 1 1
H
j I h1 h2
W X 1 e
ij i
i1
1 e
1 1 1
Y
J 1 e Y1 Y 2
w H
j j
j 1
1 e
1 1
E ( X 2 ,n Y ) 2 u 2
2 2
06/2000 Short-term load forecasting 78
Derivation of Learning
Algorithm
The derivation of the error function results in :
dE d 1 2 du du du
2 u dw u dw ( X 2 ,i Y ) dw
dw j du j j j
The derivative of the u function is:
du d dY
( X 2 ,i Y )
dw j dw j dw j
06/2000 Short-term load forecasting 79
Derivation of Learning
Algorithm
The derivative of the output function is:
dY
d
Y 2 2
1 dY 2 1 dY 2
1 dY 2
dw j dY 2 dw j Y 2 dw j (1 e ) dw j
Y1 2
1 dY 2 2 dY 2
2
Y
dw j dw j
J
w X
j i
1 e
0
06/2000 Short-term load forecasting 80
Derivation of Learning
Algorithm
The derivation of the auxiliary function Y2 gives:
w j H j
dY 2
d
dw j dY1
1 e Y1
dY1
dw j
e Y1
dY1
dw j
e
dY1
dw j
The derivative of Y1 function is:
dY1 d J
wj Hj Hj
dw j dw j 0
06/2000 Short-term load forecasting 81
Derivation of Learning
Algorithm
Substituting the results in the equations :
J
w H
j j
j0
e H
dE j
dw (X Y)
j dw 2, n 2
j J
w H
j j
j0
1 e
06/2000 Short-term load forecasting 82
Derivation of Learning
Algorithm
The rearrangement of the output equation results in :
J
w H
j j 1 Y
j 1 1
e 1
Y Y
The final equation for the update of dwj is:
(1 Y ) H
dE j
dw (X Y)Y 2
j dw 2, n Y
j
(X Y ) Y (1 Y ) H
2, n j
06/2000 Short-term load forecasting 83
Derivation of Learning
Algorithm
The derivative of the hidden layer function is:
dH j
d
h2 1 dh 2 1 2 dh 2 1 h1 2 dh 2
dw j dh 2 dWi j h 2 dWi j (1 e ) dWi j
1 dh 2 2 dh 2
2
Hj
dWi j dWi j
I
Wi j X
i
1 e 0
06/2000 Short-term load forecasting 84
Derivation of Learning
Algorithm
The derivation of the auxiliary function h2 gives:
W
1 e
Xj
dh 2 d dh1 h1 dh1
ij
dh1
h1
e e
dWi j dh1 dWi j dWi j dWi j
The derivative of h1 function is:
dh1 d I W X X
ij j
0
j
dWi j dWi j
06/2000 Short-term load forecasting 85
Derivation of Learning
Algorithm
Substituting the results in the equations :
I
W X
ij i
e i0 X
dE i
dW (X Y ) Y (1 Y )
ij dW 2n 2
ij I
W X
1 e i 0 i j i
06/2000 Short-term load forecasting 86
Derivation of Learning
Algorithm
The rearrangement of the output equation results in :
I
W X 1 H
ij i
i1 1 j
e 1
H H
j j
The final equation for the update of dWij is:
dE
dW (X Y ) Y (1 Y ) H (1 H ) X
ij dW 2n j j i
ij
06/2000 Short-term load forecasting 87
Derivation of Learning
Algorithm
Substituting the results in the equations which is used to
iterate the wj value :
dE k
Wikj1 Wikj dW Wikj
ij k
dWi j
Wikj ( X k ,n Y k ) Y k ( 1 Y k ) H k ( H k 1) X k
2 j j i
06/2000 Short-term load forecasting 88
Derivation of Learning Algorithm
The two training algorithms are:
w k 1
j w ( X Y ) Y (1 Y ) H
k
j
k
2n
k k k k
j
Wikj 1 Wikj ( X k ,n Y k ) Y k ( 1 Y k ) H k ( H k 1) X k
2 j j i
Wikj dw k ( H k 1) X k
j j i
06/2000 Short-term load forecasting 89