01-Load Forecasting

Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

07/09/2022

Course Structure
Power system Planning and operation

EE 467
Power System Planning & Operation Planning Operational planning Operation

Load Forecasting (LF) • Long-term load


forecasting • Short-term load
• Automatic generation
control
• Generation expansion
forecasting • Optimal power flow
Prof. Mohamed Abido • Unit commitment
• Transmission expansion • System security
• Economic dispatch
• Maintenance scheduling • State estimation
1
2

1 2

Power System Planning & Operation Contents


• Definition
• What to forecast? Why?
• Forecast Process
• Forecast types
Demand/Load Forecasting • Data Required for STLF
• Forecasting Methods
– Time Series Methods
– Linear Regression Methods
• Forecast Accuracy
3 4

3 4

Demand/Load Forecasting Forecasting/Prediction


Forecasting is a tool used for predicting future Forecast the next number in the following:
demand based on past demand information.

a) 3.7, 3.7, 3.7, 3.7, 3.7, ? 3.7


What is
demand b) 2.5, 4.5, 6.5, 8.5, 10.5, ? 12.5
forecasting?
c) 5.0, 7.5, 6.0, 4.5, 7.0, 9.5, 8.0, 6.5, ? 9.0

c) 25, 32, 24, 28, 26, 27, ? Quiz


Many Answers
5 6

5 6

1
07/09/2022

Forecasting Forecasting
Possible Forecasting are: Possible Forecasting are:
a) 25, 32, 24, 28, 26, 27, ? 27 (simple average) a) 25, 32, 24, 28, 26, 27, ? 27 (simple average)
b) 25, 32, 24, 28, 26, 27, ? 26.25 (average of last 4 values) b) 25, 32, 24, 28, 26, 27, ? 26.25 (average of last 4 values)
c) 25, 32, 24, 28, 26, 27, ? 27 (average of last 3 values) c) 25, 32, 24, 28, 26, 27, ? 27 (average of last 3 values)
d) 25, 32, 24, 28, 26, 27, ? 26.83 (weigh. ave of last 3 values) d) 25, 32, 24, 28, 26, 27, ? 26.83 (weigh. ave of last 3 values)
e) 25, 32, 24, 28, 26, 27, ? 26 (simple average excluding 32) e) 25, 32, 24, 28, 26, 27, ? 26 (simple average excluding 32)
f) 25, 32, 24, 28, 26, 27, ? 28 (increase of last 2 values) f) 25, 32, 24, 28, 26, 27, ? 28 (increase of last 2 values)
g) 25, 32, 24, 28, 26, 27, ? 26 (increase/decrease) g) 25, 32, 24, 28, 26, 27, ? 26 (increase/decrease)
h) 25, 32, 24, 28, 26, 27, ? 30 (considering other factors) h) 25, 32, 24, 28, 26, 27, ? 30 (considering other factors)
7 8

7 8

Forecasting Key issues in forecasting


Possible Forecasting are: • Forecasts are rarely perfect!
a) 25, 32, 24, 28, 26, 27, 27 (simple average) 1
• Forecast are more accurate for shorter than longer time
b) 25, 32, 24, 28, 26, 27, 26.25 (average of last 4 values) periods.
c) 25, 32, 24, 28, 26, 27, 27 (average of last 3 values) • The longer the forecast horizon the worst might be the
d) 25, 32, 24, 28, 26, 27, 26.833 (weighted average of last 3 values)
e) 25, 32, 24, 28, 26, 27, 26 (simple average excluding 32)
forecast error.
f) 25, 32, 24, 28, 26, 27, 28 (increase of last 2 values) 2 • A forecast is only as good as the information included in
g) 25, 32, 24, 28, 26, 27, 26 (increase/decrease)
3
the forecast (Historical data)
h) 25, 32, 24, 28, 26, 27, 30 (considering other factors)
• Sophisticated forecasting techniques do not mean better
1: Level, [Time series model (moving average)] forecasts
2: Trend, [Linear regression model]
3: Causal, [Linear regression model considering other factors]
9
• Every forecast should include an estimate of error 10

9 10

Electric Load Forecasting Electric Load Forecasting: Key Factors


• The electrical load increases about 3-7% per year for many Electric Load Forecasting
years. This necessitates load forecasting.
• The utilities use three types of load forecasting:
– Long-term (e.g. 20+ years)
– Medium term. (e.g. 3–8 weeks) Long-term Medium-term Short-term
Load Forecasts
– Short-term (e.g. one week)
• Historical data • Historical data
• Economy (GDP)
• Max/Min monthly • Weather Factors
• Demand growth temperature
Short term forecasts Medium forecasts Long term forecasts • Electriciity price
• Population growth • Main events
(one hour to a week) (a month up to a year) (over one year) • Holidays and special days
• Demographics • Addition of new loads
• Seasonal variations • Seasonal variation
• Energy generation mix
Quantitative Qualitative • maintenance • Daily variation
• Technology advancement requirements
methods Methods • Weekly cycle
11 12

11 12

2
07/09/2022

Electric Load Forecasting: Objectives What to forecast?


Electric Load Forecasting Three values have to be forecasted for proper planning:
1. Peak Demand (MW).
2. Energy Consumption (MWH)
3. Shape of Load Duration Curve (LDC)
Long-term Medium-term Short-term Load Curve Load Duration Curve

• Generation expansion • Fuel supply Scheduling


• Maintenance operations • Economic dispatch
• Transmission expansion
• Plan major tests and • Unit commitment
• Maintenance scheduling commissioning events
• Great saving
• Future investments • Determine outage times
of plants and major • Secure operation
• Inter-tie tariff setting pieces of equipment
13 14

13 14

What to forecast? How To Develop a Forecast


Peak Demand (MW): To determine: 1. Set down the basic facts about the past trends and forecasts.
• The required generation capacity.
2. Determine causes of changes in past demand trends.
• Size of Units for capital cost investment and reliability calculations (Economy, Population, Life-style, Weather .. Etc.)
Energy Consumption (MWH): To determine:
3. Determine causes of differences between previous forecasts
• Fuel cost
and actual behavior. (Identify the core causes of differences)
• Operation and maintenance (O&M) costs
• Company’s revenue 4. Determine factors likely to affect the future demand.
Load Duration Curve (LDC): To determine: 5. Make the forecast for some future period and provide the
• Reliability calculations measure of its accuracy and reliability.
• Tariff structure 6. Revise forecasts when necessary.
15 16

15 16

Forecasting Steps Long-Term Forecast


• What needs to be forecasted? • The building of a power plant requires:
–Level of detail, time horizon required – 10 years (Nuclear)
• What data is available to evaluate? – 6 years (Large coal-fired)
–Identify needed data & whether it’s available – 3 years (combustion turbine)
• Select and test the forecasting model The electric system planning studies needs the load
–Cost, ease of use & accuracy forecast for several years.
• Generate the forecast • Typically, the long-term forecast covers a period of
20+ years
• Monitor forecast accuracy over time
18

17 18

3
07/09/2022

Medium-Term Forecast Short-Term Forecast


• Helps in determining: -
• The planning of maintenance, scheduling of the
fuel supply … etc. • The number of generators in operation
• The start up of a new unit
• Covers a period of few weeks.
• The short-term load forecasting provides load data of
• It provides: each day in one week time.
» The peak load in (MW) • The load data are:
» The daily energy requirement in (MWH) –Hourly or half-hourly peak load in MW
–Hourly or half-hourly values of system energy in MWh
–Daily and weekly system energy in MWh
19 20

19 20

Short-Term Forecast Importance of Short-term Load Forecasting (STLF)


• The short-term load forecasting is performed daily or weekly. • Provide load data to the dispatchers for economic and reliable operation.
• The timeliness and accuracy of the data affects the cost of operation.
• The day-to-day operation of the system requires accurate short-
– Example: The increase of accuracy of the forecast by 1% reduced the operating cost
term load forecasting. by £ 10M in the British Power system in 1985
• The forecasted data are continuously updated. • The forecasted data are used for:
• An example of STLF is shown. – Unit commitment.
• selection of generators in operation,
Time 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 • start up/shut down of generation to minimize operation cost
1/1/85 24 27 26 26 27 26 26 27 28 28 29 30 31 32 33 33 32 31 31 31 29 29 29 29
– Hydro scheduling to optimize water release from reservoirs
1/2/85 28 28 28 28 28 28 28 28 28 31 33 36 37 39 40 38 35 35 35 34 33 34 32 33
– Hydro-thermal coordination to determine least cost operation mode (optimum mix)
1/3/85
1/4/85
31
28
32
29
33
27
28
30
29
28
28
28 Can you forecast
29
27
32
29
33
28
31
31
32
32
35
33
35
33
35
36
36
37
35
36
31
36
31
36
29
36
34
36
31
38
31
39
32
36
30
37 – Interchange scheduling and energy purchase.
– Transmission line loading
1/5/85
1/6/85
36
36
38
34
40
34
40
34
41
35
39
35
38
35for 1/9/85?
39
36
39
36
40
34
41
34
43
37
45
40
45
42
46
43
44
42
40
39
39
40
37
38
36
40
37
39
36
39
37
40
35
37 – Power system security assessment.
1/7/85 37 38 39 38 37 36 35 36 38 40 42 44 46 47 48 43 38 38 37 37 36 33 37 37 • Load-flow
1/8/85 35 32 32 31 29 32 33 32 31 32 35 40 42 42 45 43 40 38 40 39 39 38 38 36 • Transient stability studies
21 22

21 22

Input Data Sources for STLF Importance of STLF

Weather Real-time data base System Operator


Historical Load &
& Measured load • Economic load dispatch
weather data Forecast
• Hydro-thermal coordination
• System security assessment

Generators
STLF STLF • Unit commitment
• Strategic bidding
• Cost effective-risk management
Load Serving Entities
• Load scheduling
EMS • Optimal bidding

Information display 23 24

23 24

4
07/09/2022

Data and System Parameters for Load Forecasting Data and System Parameters for Load Forecasting
• The factors affecting the load are:
2) Time Factors
1. Economical or environmental
2. Time • Seasonal variation of
3. Weather load (summer,
4. Unforeseeable random events winter etc.). The load
change is due to:
1) Economical or environmental factors
– Service area demographics (rural, residential) – Change of number of
– Industrial growth daylight hours
– Emergence of new industry, change of farming – Gradual change of
– Penetration or saturation of appliance usage average temperature
– Economical trends (recession or expansion) – Start of school year,
– Change of the price of electricity vacation
– Demand side load management
25
Kingdom Load Variation 26

25 26

Data and System Parameters for Load Forecasting Data and System Parameters for Load Forecasting
2) Time Factors (Contd.)
2) Time Factors (Contd.)
• Weekly Cyclic Variation
– Week-end days have significant load reduction • Daily variation of load components. (night, morning, etc)
– Typical weekly load pattern:
• Holidays and Major
Is this curve for a load in KSA? events
– Significant reduction of
load
– Days proceeding or
following the holidays
also have a reduced
load.
27 28

27 28

Data and System Parameters for Load Forecasting Data and System Parameters for Load Forecasting
3) Weather factors 4) Random factors
• The weather affects the load because of weather sensitive loads:
• Start or stop of large loads (steel mill, factory, furnace)
– air-conditioning
– house heating • Widespread strikes
– Irrigation • Sporting events (football games)
• The most important parameters are:
– Humidity • Popular television shows
– Thunderstorms • Shut-down of industrial facility
– Wind speed
– Rain, fog, snow
– Cloud cover or sunshine 29 30

29 30

5
07/09/2022

Data and System Parameters for Load Forecasting Short-Term Load Forecasting (STLF)
• The different load forecasting types 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
• The forecasting is a continuous process.
Forecasting Methods
• The utility forecasts the load of its service area.
• The forecaster
– prepares a new forecast for every day
– updates the existing forecast daily
31 32

31 32

Forecasting Methods Choice of Forecasting Technique


• Qualitative • Choosing forecasting technique is not a trivial task.
–use management judgment, expertise, and opinion to • It depends on nature of load variations.
predict future demand • Before choosing a particular method, a basic understanding of
how a load behaves is essential.
• Quantitative • If on the basis of historical data and good judgment, simple
–Time series methods extrapolation appears to be sufficient, it should be used.
•statistical techniques that use historical demand data to • Choosing the best technique requires good judgment and
predict future demand knowledge of advantages and disadvantages of various
–Regression methods available methods.
•attempt to develop a mathematical relationship between • Once a method is chosen its effectiveness must always be
demand and factors that cause its behavior reevaluated.
33 34

33 34

Forecasting Process Forecasting Methods


1. Identify the 2. Collect historical data 3. Plot data and identify
purpose of forecast patterns

6. Check forecast 5. Develop/compute 4. Select a forecast


accuracy with one or forecast for period of model that seems
more measures historical data appropriate for data

7. Is accuracy
of forecast
No 8b. Select new forecast
model or adjust
Time Series Methods
acceptable? parameters of existing
model
Yes
9. Adjust forecast based on 10. Monitor results and
8a. Forecast over measure forecast
additional qualitative
planning horizon accuracy
information and insight
35 36

35 36

6
07/09/2022

Time Series Patterns Time Series


• Assume that what has occurred in the past will continue to
occur in the future
• Relate the forecast to only one factor - time
• Methods include
– Naïve Forecasting
– Simple Mean
– Moving Average
– Weighted Moving Average
– Exponential Smoothing
– Adjusted exponential smoothing
38

37 38

Forecasting Methods Time Series: Moving Average Methods


• Naive forecast
–Demand in the current period is used as next
period’s forecast
Time Series with • Simple moving average
–Stable demand with no pronounced behavioral
Moving Average patterns
• Weighted moving average
–Weights are assigned to most recent data
39 40

39 40

Moving Average: Naïve Approach Moving Average: Simple Moving Average


σ𝑛−1
𝑖=0 𝐷𝑡−𝑖
LOAD
FORECAST 𝐹𝑡+1 = 𝑀𝐴𝑛 = , 𝑡≥𝑛
MONTH
Jan
PER MONTH
120 -
𝑛
Feb 90 120 Where
Mar
Apr
100
75
90
100
Ft +1 = Dt Ft+1 = forecast for next period, t+1
May 110 75
June 50 110 Where Dt-i = actual demand for (t – i ) period
July 75 50
Aug 130 75 Ft+1 = forecast for next period, t+1 n = number of periods in the moving average
Sept 110 130
Oct 90 110 Dt = actual demand for present period, t Example
Nov - 90
𝐷𝑡 +𝐷𝑡−1 +𝐷𝑡−2 +𝐷𝑡−3 𝐷4 +𝐷3 +𝐷2+𝐷1
If n = 4, 𝐹𝑡+1 = , and if t = 4, 𝐹5 =
4 4
41 42

41 42

7
07/09/2022

Simple Moving Average: Example Simple Moving Average: Example


You are a power system operator and want to forecast the load of a
distribution feeder for days 4-6 using a 3-period moving average. Day Load (MW) Forecast (MW)
1 4 NA
Day Load (MW) Forecast (MW) 2 6 NA
1 4 3 5 NA
2 6 4 3 (4+6+5)/3=5
3 5 5 7
4 3 6
5 7
6

43 44

Simple Moving Average: Example Simple Moving Average: Example

Day Load (MW) Forecast (MW) Day Load (MW) Forecast (MW)
1 4 NA 1 4 NA
2 6 NA 2 6 NA
3 5 NA 3 5 NA
4 3 (4+6+5)/3=5 4 3 (4+6+5)/3=5
5 7 (6+5+3)/3=4.67 5 7 (6+5+3)/3=4.67
6 6 (5+3+7)/3=5

45 46

Moving Average: Simple Moving Average Moving Average: Simple Moving Average
𝐷𝑡 +𝐷𝑡−1 +𝐷𝑡−2
If n= 3, 𝐹𝑡+1 =
ORDERS 3
MONTH PER MONTH FORECAST
ORDERS MOVING
Jan 120 ? MONTH PER MONTH AVERAGE
Feb 90 ? Jan 120 – Example
Mar
Apr
100
75
?
?
Find the forecast if Feb
Mar
90
100

– 𝑭𝟒 =
𝑫𝟑 + 𝑫𝟐 + 𝑫𝟏 𝟏𝟎𝟎 + 𝟗𝟎 + 𝟏𝟐𝟎
= = 𝟏𝟎𝟑. 𝟑
May 110 ? Apr 75 103.3 𝟑 𝟑
June 50 ? a) n=3 May
June
110
50
88.3
95.0
….
July 75 ?
? July 75 78.3 ….
Aug 130
Sept 110 ? b) n=5 Aug
Sept
130
110
78.3
85.0 ….
Oct 90 ? Oct 90 105.0 𝑫𝟏𝟎 + 𝑫𝟗 + 𝑫𝟖 𝟗𝟎 + 𝟏𝟏𝟎 + 𝟏𝟑𝟎
Nov ---- ? Nov - 110.0 𝑭𝟏𝟏 = = = 𝟏𝟏𝟎
𝟑 𝟑

47 48

47 48

8
07/09/2022

Moving Average: Simple Moving Average Moving Average: Smoothing Effects


𝐷𝑡 +𝐷𝑡−1 +𝐷𝑡−2 +𝐷𝑡−3 +𝐷𝑡−4 n = 5 gives smoother forecasting than n = 3 case
If n= 5, 𝐹𝑡+1 = 5 • A smaller n makes 150 –
ORDERS MOVING the forecast more
125 – 5-month
MONTH PER MONTH AVERAGE
Jan 120 –
Example Responsive
𝑫𝟓 + 𝑫𝟒 + 𝑫𝟑 + 𝑫𝟐 + 𝑫𝟏
Feb 90 – 𝑭𝟔 = 100 –
𝟓
Mar 100 – 𝟏𝟏𝟎 + 𝟕𝟓 + 𝟏𝟎𝟎 + 𝟗𝟎 + 𝟏𝟐𝟎

Orders
– = = 𝟗𝟗
Apr
May
75
110 – 𝟓 • A larger n makes 75 –

….
June
July
50
75
99.0
85.0
the forecast more 50 – 3-month
….
Aug 130 82.0
Sept 110 88.0 …. Stable/Smooth 25 –
Actual

Oct 90 95.0 𝑫𝟏𝟎 + 𝑫𝟗 + 𝑫𝟖 + 𝑫𝟕 + 𝑫𝟔


𝑭𝟏𝟏 =
Nov - 91.0 𝟑 0– | | | | | | | | | | |
𝟗𝟎 + 𝟏𝟏𝟎 + 𝟏𝟑𝟎 + 𝟕𝟓 + 𝟓𝟎 Jan Feb Mar Apr May June July Aug Sept Oct Nov
= = 𝟗𝟏
𝟓 Month
49 50

49 50

Weighted Moving Average Weighted Moving Average Example


𝑛−1
Find the forecast of November considering the weights given and
𝐹𝑡+1 = 𝑊𝑀𝐴𝑛 = ෍ 𝑊𝑖 𝐷𝑡−𝑖 , 𝑡≥𝑛 3 periods moving average. MONTH WEIGHT DATA
𝑖=0
August 17% 130
Where
September 33% 110
Ft+1 = forecast for next period, t+1 October 50% 90
Dt-i = actual demand for (t – i ) period
n = number of periods in the moving average
Wi = the weight for period i, Wi [0 – 1], & σ𝑖 𝑊𝑖 = 1.0 Solution
WMAn adjusts moving average method to more closely reflect data fluctuations 𝑭𝟒 = 𝑾𝑴𝑨𝟑 = 𝟎. 𝟓𝑫𝟑 + 𝟎. 𝟑𝟑𝑫𝟐 + 𝟎. 𝟏𝟕𝑫𝟏
Example = 𝟎. 𝟓 × 𝟗𝟎 + 𝟎. 𝟑𝟑 × 𝟏𝟏𝟎 + 𝟎. 𝟏𝟕 × 𝟏𝟑𝟎 = 𝟏𝟎𝟑. 𝟒
If n = 3, 𝐹𝑡+1 = 𝑊0 𝐷𝑡 + 𝑊1 𝐷𝑡−1 + 𝑊2 𝐷𝑡−2 , where W0, W1, W2, are the weights
51 52

51 52

Forecasting Methods Exponential Smoothing


Ft +1 =  Dt + (1 - )Ft
where:
Ft +1 = forecast for next period

Exponential Smoothing Dt = actual demand for present period


Ft = previously determined forecast for present period
 = weighting factor or smoothing constant, [0 – 1]
• If  = 0.20, then Ft +1 = 0.20 Dt + 0.80 Ft
• If  = 0, then Ft +1 = 0 Dt + 1 Ft = Ft , Forecast does not reflect recent data
• If  = 1, then Ft +1 = 1 Dt + 0 Ft = Dt , Forecast based only on most recent data
• Ft +1 =  Dt + (1 - )Ft =  Dt + (1 - ) [ Dt-1 + (1 - ) Ft-1]
=  Dt +  (1 - ) Dt-1 + (1 - )2 Ft-1]
It is a weighted Moving Average!!!
53 54

53 54

9
07/09/2022

Exponential Smoothing: Example Exponential Smoothing: Example


For the data shown, FORECAST, Ft + 1
(a) Find F2, F3, and F13. Consider the smoothing constant  = 0.3 PERIOD MONTH DEMAND ( = 0.3) ( = 0.5)
1 Jan 37 – –
(b) Find the forecast for all periods considering  = 0.3 and  = 0.5 2 Feb 40 37.00 37.00
PERIOD MONTH DEMAND Solution 3 Mar 41 37.90 38.50
1 Jan 37
2 Feb 40
F2 =  D1 + (1 - ) F1 4 Apr 37 38.83 39.75
Which value of 
5 May 45 38.28 38.37
3
4
Mar
Apr
41
37
= (0.30)(37) + (0.70)(37) = 37
6 Jun 50 40.29 41.68 gives better results?
5 May 45 7 Jul 43 43.20 45.84
6 Jun 50 F3 =  D2 + (1 - ) F2 8 Aug 47 43.14 44.42
7 Jul 43
9 Sep 56 44.30 45.71
8 Aug 47 = (0.30)(40) + (0.70)(37) = 37.9
9 Sep 56 10 Oct 52 47.81 50.85
10 Oct 52 11 Nov 55 49.06 51.42
11 Nov 55 F13=  D12 + (1 - ) F12 12 Dec 54 50.84 53.21
12 Dec 54 13 Jan – 51.79 53.61
= (0.30)(54) + (0.70)(50.84) = 51.79
55 56

55 56

Exponential Smoothing: Example Exponential Smoothing


 = 0.3 gives smoother forecasting than  = 0.5 case This method has the following advantages
• A smaller  70 –

makes the 60 – Actual  = 0.50 • Averaging method


forecast more
50 –
Stable/Smooth
40 –
• Weights most recent data more strongly
Orders

 = 0.30
• A larger  makes 30 – • Reacts more to recent changes
the forecast 20 –
more
10 –
• Widely used and more accurate method
responsive | | | | | | | | | | | | |
0–
1 2 3 4 5 6 7 8 9 10 11 12 13 Can We Improve It Further?
Month
57 58

57 58

Adjusted Exponential Smoothing Adjusted Exponential Smoothing Example


For the data shown, find AF3 and AF13. Consider the smoothing
AFt +1 = Ft +1 + Tt +1 constant  = 0.5 and trend factor  = 0.3.
where
AF = Trend-adjusted exponentially smoothed forecast Solution:
F = exponentially smoothed forecast as before
T3 =  (F3 - F2) + (1 - ) T2
(Ft +1 =  Dt + (1 - )Ft)
= (0.30)(38.5 - 37.0) + (0.70)(0) = 0.45
T = exponentially smoothed trend factor AF3 = F3 + T3 = 38.5 + 0.45 = 38.95
Tt +1 = (Ft +1 - Ft) + (1 - ) Tt
T13 =  (F13 - F12) + (1 - ) T12
where
= (0.30)(53.61 - 53.21) + (0.70)(1.77) = 1.36
Tt = the last period trend factor
AF13= F13 + T13 = 53.61 + 1.36 = 54.96
 = trend factor,   [0 – 1]
59 60

59 60

10
07/09/2022

Adjusted Exponential Smoothing: Example Adjusted Exponential Smoothing: Example


FORECAST TREND ADJUSTED Adjusted forecast is more accurate and closer to the actual values
PERIOD MONTH DEMAND Ft +1 Tt +1 FORECAST AFt +1
70 –
1 Jan 37 37.00 – – Adjusted forecast ( = 0.30)
2 Feb 40 37.00 0.00 37.00 60 –
Actual
3 Mar 41 38.50 0.45 38.95
50 –
4 Apr 37 39.75 0.69 40.44
5 May 45 38.37 0.07 38.44

Demand
40 –
6 Jun 50 41.68 1.04 42.72
7 Jul 43 45.84 1.97 47.82 30 – Forecast ( = 0.50)
8 Aug 47 44.42 0.95 45.37
20 –
9 Sep 56 45.71 1.05 46.76
10 Oct 52 50.85 2.28 53.13
10 –
11 Nov 55 51.42 1.76 53.19
12 Dec 54 53.21 1.77 54.98 0– | | | | | | | | | | | | |
1 2 3 4 5 6 7 8 9 10 11 12 13
13 Jan – 53.61 1.36 54.96
Period
61 62

61 62

Forecasting Methods Linear Regression

Linear Regression Methods

63 64

63 64

Linear Regression Linear Regression Example


Approximate the data to a line σ 𝒙𝒚 − 𝒏 ഥ𝒙 ഥ𝒚 For the data shown,
y = a + bx 𝒃=
σ 𝒙𝟐 − 𝒏 ഥ𝒙𝟐
where 𝒂=ഥ
𝒚−𝒃ഥ
𝒙 (a) Find the linear regression.
a = intercept of y
b = slope of the line
x = time period Where (b) Find F13.
y = forecast for demand for period x
n = number of periods
Steps
1- Calculate 𝒙ഥ 𝒂𝒏𝒅 𝒚ഥ σ𝒙

𝒙= = 𝒎𝒆𝒂𝒏 𝒐𝒇 𝒙 𝒗𝒂𝒍𝒖𝒆𝒔
2- Calculate 𝒙𝒚 𝒂𝒏𝒅 𝒙𝟐 𝒏
3- Calculate b and a σ𝒚
ഥ=
𝒚 = 𝒎𝒆𝒂𝒏 𝒐𝒇 𝒚 𝒗𝒂𝒍𝒖𝒆𝒔
4- Calculate the forecast at any period 𝒙 𝒏
65 66

65 66

11
07/09/2022

Linear Regression Example (cont.) Linear Regression Example (cont.)


Solution 70 –
n = 12
60 –
σ 𝒙 𝟕𝟖 Actual
ഥ=
𝒙 = = 𝟔. 𝟓
𝒏 𝟏𝟐 50 –

Demand
σ 𝒚 𝟓𝟓𝟕 40 –
ഥ=
𝒚 = = 𝟒𝟔. 𝟒𝟐
𝒏 𝟏𝟐
30 – Linear trend line
σ 𝒙𝒚 − 𝒏 ഥ𝒙 ഥ𝒚 𝟑𝟖𝟔𝟕 − 𝟏𝟐 × 𝟔. 𝟓 × 𝟒𝟔. 𝟒𝟐
𝒃= = = 𝟏. 𝟕𝟐
σ 𝒙𝟐 − 𝒏 𝒙ഥ𝟐 𝟔𝟓𝟎 − 𝟏𝟐 × 𝟔. 𝟓𝟐 20 –

ഥ−𝒃𝒙
𝒂=𝒚 ഥ = 𝟒𝟔. 𝟒𝟐 − 𝟏. 𝟕𝟐 × 𝟔. 𝟓 = 𝟑𝟓. 𝟐 10 –
(a) Linear trend line: y = 35.2 + 1.72 x | | | | | | | | | | | | |
0– 1 2 3 4 5 6 7 8 9 10 11 12 13
(b) Forecast for period 13 y = 35.2 + 1.72  13 = 57.56 units Period
67 68

67 68

Seasonal Adjustments Seasonal Adjustment: Example


With seasonal (repetitive) increase/decrease in demand, use The demand per quarter is given as shown,
seasonal factor to adjust forecast. If Di is the total demand in a (a) Find the seasonal factor of each quarter
season, Seasonal factor, Si, is calculated as follows
𝐷𝑖 (b) Forecast for year 2005 using Linear trend line
𝑆𝑖 = (c) Use the seasonal adjustment to forecast for each
σ𝐷
Steps quarter of year 2005
1. Calculate the average demand per season Year Q1 Q2 Q3 Q4
2. Calculate the seasonal factor for each season
2002 12.6 8.6 6.3 17.5
3. Calculate the forecast as usual
4. Adjust the forecast by multiplying the forecast by the seasonal 2003 14.1 10.3 7.5 18.2
factors. 2004 15.3 10.6 8.1 19.6
69 70

69 70

Seasonal Adjustment Example Seasonal Adjustment Example


Solution Year Q1 Q2 Q3 Q4 Total x (Period) y (Demand) xy x2
(a) Seasonal factors n=3
1 45 45 1
Season 1 (Quarter 1) 2002 12.6 8.6 6.3 17.5 45
σ𝒙 𝟔 2 50.1 100.2 4
The seasonal factor, S1, is 2003 14.1 10.3 7.5 18.2 50.1 ഥ=
𝒙 = =𝟐
𝒏 𝟑 3 53.6 160.8 9
𝐷1 42.0
𝑆1 = = = 0.28 2004 15.3 10.6 8.1 19.6 53.6 Total 6 148.7 306 14
σ 𝐷 148.7 σ 𝒚 𝟏𝟒𝟖. 𝟕
Total 42 29.5 21.9 55.3 148.7 ഥ=
𝒚 = = 𝟒𝟗. 𝟓𝟕
Season 2 (Quarter 2) 𝒏 𝟑
The seasonal factor, S2, is σ 𝒙𝒚 − 𝒏 ഥ𝒙 ഥ𝒚 𝟑𝟎𝟔 − 𝟑 × 𝟐 × 𝟒𝟗. 𝟓𝟕
𝐷2 29.5 𝒃= = = 𝟒. 𝟐𝟗
𝑆2 = = = 0.20 σ 𝒙𝟐 − 𝒏 𝒙ഥ𝟐 𝟏𝟒 − 𝟑 × 𝟐𝟐
σ 𝐷 148.7
ഥ−𝒃𝒙
𝒂=𝒚 ഥ = 𝟒𝟗. 𝟓𝟕 − 𝟒. 𝟐𝟗 × 𝟐 = 𝟒𝟏
Season 3 (Quarter 3) Season 4 (Quarter 4)
The seasonal factor, S3, is The seasonal factor, S4, is (b) Linear trend line: y = 41 + 4.29 x
𝐷4 55.3
𝑆3 =
𝐷3
=
21.9
= 0.15 𝑆4 = = = 0.37 Forecast for 2005 F4 = y = 41 + 4.29  4 = 58.16
σ 𝐷 148.7 σ 𝐷 148.7 71
72

71 72

12
07/09/2022

Seasonal Adjustment Example Forecasting Methods


(c) Forecast for each quarter of year 2005
For Q1: SF1 = (S1) (F4) = (0.28)(58.2) = 16.30
For Q2: SF2 = (S2) (F4) = (0.20)(58.2) = 11.64
For Q3: SF3 = (S3) (F4) = (0.15)(58.2) = 8.73 Forecast Accuracy
For Q4: SF4 = (S4) (F4) = (0.37)(58.2) = 21.53

73 74

73 74

Forecast Accuracy Forecast Accuracy


• Forecasts are rarely perfect Forecast error:
• Need to know how much we should rely on our chosen It is the difference between forecast and actual demand. The
forecasting method forecast accuracy can be evaluated by the following measures.
• Measuring forecast error:
➢ MAD (Mean absolute deviation)
et = Dt – Ft
• Note that over-forecasts = negative errors and under-forecasts ➢ MSE (Mean squared error)
= positive errors
• It was estimated that an increase of operating cost associated
with a 1% increase of forecast error was 10 million £/year in UK ➢ MAPD (Mean absolute percent deviation)
76

75 76

Mean Absolute Deviation (MAD) Mean Squared Error (MSE)


σ 𝐷𝑡 − 𝐹𝑡 σ 𝑒𝑡 Here, the large forecast errors are heavily penalized
𝑀𝐴𝐷 = =
𝑛 𝑛
Where σ𝑛𝑡=1 𝐷𝑡 − 𝐹𝑡 2 σ𝑛𝑡=1 𝑒𝑡2
t = period number 𝑀𝑆𝐸 = =
𝑛 𝑛
Dt = demand in period t Where
Ft = forecast for period t et = forecast error for period t
Et = forecast error for period t n = number of periods of evaluation
n = total number of periods
| | = absolute value
77 78

77 78

13
07/09/2022

Mean Absolute Percent Deviation (MAPD) Forecast Accuracy: Example


PERIOD DEMAND, Dt
For the data shown, calculate the
1 37
Here the accuracy is given as a percentage of the total forecast using the following methods: 2 40
demand a) Exponential smoothing ( = 0.30) 3 41
4 37
σ 𝐷𝑡 − 𝐹𝑡 σ 𝑒𝑡 b) Exponential smoothing (= 0.50) 5 45
𝑀𝐴𝑃𝐷 = =
σ 𝐷𝑡 σ 𝐷𝑡 c) Linear trend line 6 50
7 43
d) Compare the accuracy of these 8 47
methods using MAD, MSE, MAPD 9 56
10 52
11 55
12 54
79 80

79 80

Forecast Accuracy: Example Forecast Accuracy: Example


Solution: (a) Exponential smoothing ( = 0.30) Solution: (b) Exponential smoothing ( = 0.50)
Accuracy Measures 1 (MAD) Accuracy Measures 1 (MAD)
Period Dt Ft et = Dt – Ft σ 𝐷𝑡 − 𝐹𝑡 Period Dt Ft et = Dt – Ft σ 𝐷𝑡 − 𝐹𝑡
𝑀𝐴𝐷 = 𝑀𝐴𝐷 =
1 37 – – 𝑛 1 37 – – 𝑛
n = 11, |Dt – Ft | = 53.41 n = 11, |Dt – Ft | = 44.43
2 40 37 3 2 40 37 3
MAD = 4.86 MAD = 4.04
3 41 37.9 3.1 3 41 38.5 2.5
4 37 38.83 -1.83 Accuracy Measures 2 (MSE) 4 37 39.75 -2.75 Accuracy Measures 2 (MSE)
5 45 38.28 6.72 σ𝑛𝑡=1 𝑒𝑡2 5 45 38.37 6.63 σ𝑛𝑡=1 𝑒𝑡2
𝑀𝑆𝐸 = 𝑀𝑆𝐸 =
6 50 40.29 9.71 𝑛 6 50 41.68 8.32 𝑛
n = 11, σ 𝑒𝑡2= 376.06 n = 11, σ 𝑒𝑡2= 271.36
7 43 43.2 -0.2 MSE = 34.19 7 43 45.84 -2.84 MSE = 24.67
8 47 43.14 3.86 8 47 44.42 2.58
Accuracy Measures 3 (MAPD) Accuracy Measures 3 (MAPD)
9 56 44.3 11.7 σ 𝐷𝑡 − 𝐹𝑡
9 56 45.71 10.29 σ 𝐷𝑡 − 𝐹𝑡
10 52 47.81 4.19 𝑀𝐴𝑃𝐷 = × 100 10 52 50.85 1.15 𝑀𝐴𝑃𝐷 = × 100
σ 𝐷𝑡 σ 𝐷𝑡
11 55 49.06 5.94  Dt = 520, |Dt – Ft | = 53.41 11 55 51.42 3.58  Dt = 520, |Dt – Ft | = 44.43
12 54 50.84 3.16 MAPD = 10.27% 12 54 53.21 0.79 MAPD = 8.54%
81 82

81 82

Forecast Accuracy: Example Comparison of Forecasts


Solution: (c) Linear trend line (y = 35.2 + 1.72 x) FORECAST METHOD MAD MSE MAPD
Accuracy Measures 1 (MAD)
Period Dt Ft et = Dt – Ft σ 𝐷𝑡 − 𝐹𝑡
1 37 – – 𝑀𝐴𝐷 =
𝑛
Exponential smoothing (= 0.30) 4.86 34.18 10.27%
n = 11, |Dt – Ft | = 27.4
2 40 38.64 1.36
MAD = 2.49
3 41 40.36 0.64 Exponential smoothing (= 0.50) 4.04 24.67 8.54%
4 37 42.08 -5.08 Accuracy Measures 2 (MSE)
𝑛
5 45 43.80 1.20 σ𝑡=1 𝑒𝑡2
𝑀𝑆𝐸 = Linear trend line 2.49 9.46 5.27%
6 50 45.52 4.48 𝑛
n = 11, σ 𝑒𝑡2= 104.02
7 43 47.24 -4.24 MSE = 9.46
8 47 48.96 -1.96
Accuracy Measures 3 (MAPD)
9 56 50.68 5.32
10 52 52.40 -0.40 𝑀𝐴𝑃𝐷 =
σ 𝐷𝑡 − 𝐹𝑡
σ𝐷
× 100 Which method would you prefer?
𝑡
11 55 54.12 0.88  Dt = 520, |Dt – Ft | = 27.4
12 54 55.84 -1.84 MAPD = 5.27%
83 84

83 84

14
07/09/2022

85

85

15

You might also like