You are on page 1of 11

MONTHLY ELECTRICITY DEMAND FORECAST USING FUZZY

LOGIC
By: Bhupinder Singh, Deputy Director, CEA [10-11-2009]
Keywords:
MED – Monthly Electricity Demand of Delhi
FLR – Fuzzy Logic Relationship
FLRG – Fuzzy Logic Relationship Group
ARMA – Auto regressive and moving average
ARIMA - Auto regressive integrated moving average
SARIMA- Seasonal Auto regressive Integrated moving average

1. INTRODUCTION

System Electric Demand forecasting plays a very important role in modern power system. It has
considerable importance in decision making in unit commitment, fuel allocation, maintenance
scheduling, off line network analysis and network planning etc. Accurate demand forecasting in
planning is a potential source of fund saving in electricity industry.

During last few decades, various approaches have been developed for time series forecasting.
Among them ARMA models and Box-Jenkins ARIMA, SARIMA etc model building approaches
are highly acknowledged. The classical time series methods can not deal with forecasting
problems in which the values of time series are in linguistic terms represented by fuzzy sets [11],
[23]. Therefore, Song and Chissom [18] presented the theory of fuzzy time series to overcome
this drawback of the classical time series methods. Based on the theory of fuzzy time series,
Song et al. presented some forecasting methods [16], [18], [19], [20] to forecast the enrollments
of the University of Alabama. In [1] Chen and Hsu and in [2], Chen presented a method to
forecast the enrollments of the University of Alabama based on fuzzy time series. It has the
advantage of reducing the calculation, time and simplifying the calculation process

In this paper, we present a practical comparison of our proposed method and existing fuzzy time
series forecasting methods to forecast the monthly demand for Delhi state from 2001-02 to 2008-
09. The proposed method gives the best forecasting accuracy rate for forecasting monthly
demand of Delhi State.

2. SOME BASIC CONCEPTS OF FUZZY TIME SERIES

There are number of definitions for fuzzy time series.

Definition 1: Imprecise data at equally spaced discrete time points are modeled as fuzzy
variables. The set of this discrete fuzzy data forms a fuzzy time series.

Definition 2: Chronological sequences of imprecise data are considered as time series with fuzzy
data .A time series with fuzzy data is referred to as fuzzy time series.

Definition 3: Let Y(t), (t = ..., 0,1,2,...) be the universe of discourse and Y(t) ⊆ R .

Assume that fi (t), i = 1,2,... is defined in the universe of discourse Y(t) and F(t) is a collection of f
(ti ),(i = ...,0,1,2,...) , then F(t) is called a fuzzy time series of Y(t), i = 1,2,....

Using fuzzy relation, we define F(t)= F(t −1)*R(t, t −1)where R(t, t −1) is a fuzzy relation and “*” is
the max–min composition operator, then F(t) is caused by F(t − 1) where F(t) and F(t −1) are
fuzzy sets. Let F(t) be a fuzzy time series and let R(t, t −1) be a first order model of F(t) . If R(t, t
−1)= R(t −1, t − 2) for any time t, then F(t) is called a time-invariant fuzzy time series. If R(t, t −1)is
dependent on time t, that is, R(t, t −1) may be different from R(t −1, t − 2) for any t, then F(t) is
called a time-variant fuzzy time series. In [19], Song et al. proposed the time-variant fuzzy time-
series model and forecasted the enrollments of the University of Alabama based on the model.

1
Different fuzzy time-series models have been proposed by following Song and Chissom’s
definition of fuzzy time-series. For example, there have been Song and Chissom’s time-invariant
model[7], Song and Chissom’s time-variant model, the Markov model[10] Chen’s model[3],
weighted model[15], etc.

3 DATA FOR ELECTRICITY DEMAND

In this section, we present a method to forecast the monthly Electricity Demand of Delhi state
based on fuzzy time series based on [9] and [10]. The historical monthly data for state of Delhi is
shown in Table I, [19].

TABLE 1
HISTORICAL MONTHLY ELECTRICITY DEMAND DATA OF DELHI STATE

YEAR Apr May Jun Jul Aug Sep Oct Nov Dec Jan Feb Mar
2001-02 2760 2995 3020 3010 3040 2989 2814 2645 2871 3118 2955 2605
2002-03 3165 3295 3312 3347 3231 2914 2853 2769 2905 3417 2926 2664
2003-04 2975 3023 3331 3389 3240 3108 2999 2850 3294 3306 3213 2947
2004-05 3158 3348 3336 3520 3280 3325 2960 2843 3064 3282 3138 2899
2005-06 3047 3239 3706 3624 3653 3722 3385 2908 3394 3516 3372 3133
2006-07 3515 3843 3692 4000 3888 3661 3701 2971 3059 3293 3021 3107
2007-08 3630 3950 3860 4140 4020 3830 3800 3110 3250 3520 3410 3240
2008-09 3509 3592 3901 4036 4019 3945 3682 2919 3182 3262 3105 2999

4 MODEL STEPS

The model includes the following steps:

(1) Define the universe of discourse and the intervals for the observations;
(2) Partition the universe based on the intervals;
(3) Define the fuzzy sets for the observations;
(4) Fuzzify the observations;
(5) Histogram Analysis of data
(6) Establish the Fuzzy Logic Relationship and Fuzzy Logic Relationship Group;
(7) Identify Third Order Fuzzy logic relation group
(8) Establish defuzzyfying Rules;
(9) Defuzzify using rules;
(10) Compute MSE of the forecast;

4.1 Universe Of Discourse Interval for the Observations

The interval length affects the formulation of fuzzy relationships, and the fuzzy relationships affect
the forecasting results. To capture proper fuzzy relationships, the determination of proper interval
lengths is critical in fuzzy time-series forecasting. A key point in choosing effective lengths of
intervals is that they should not be too large or small [6]. While the length of intervals is too large,
there will be no fluctuations in the fuzzy time series. On the other hand, when the length is too
small, the meaning of fuzzy time series will be diminished. Thus, the lengths should reflect at
least half the fluctuations in the time series. However, the fluctuations in fuzzy time series can be
represented by the absolute value of the first differences of any two consecutive data. Hence, the
average-based length is proposed.

The average-based fuzzy time-series model can be set to adjust the lengths of the intervals
determined during the early stages of forecasting, when the fuzzy relationships are formulated.

The following algorithm for average-based lengths is as follows.

2
1. Calculate all the absolute differences between Ai+1 and Ai (i = 1, ., n−1), as the first
differences and the average of the first differences.
2. Take one half the averages (in step 1) as the length.
3. According to the length (in step 2), determine the base for the length of intervals as
shown in Table 2
TABLE 2, BASE MAPPING TABLE

RANGE Base
0.1-1.0 0.1
1.1-10 1
11-100 10
101-1000 100

4. Round the length according to the determined based on the length of intervals.

4.2 Defining the universe of discourse and intervals

The universe of discourse for observations, U, is defined as [Dmin − D1,Dmax − D2], where Dmin
and Dmax is the minimum and maximum of known historical data, D1,D2 are two proper positive
numbers.

According to the MED for 2001-02 to 2008-09, we can see that Dmin = 2605 and Dmax = 4140.
Thus, the universe of discourse is defined as U = [2600, 4200]. Average-based length is
calculated:

(1). The first differences are calculated and the average of the first difference is 206.97.
(2). Take half the average as the length, which is 103.48
(3). Given the length chosen in step 2, the base for length of intervals is determined as 100 by
following Table. 2.
(4). Round the length by base 10, which makes 103.48 as 100. Therefore, 100 is chosen as the
length. Now average-based length is applied to Chen’s model. Then U can be partitioned into
equal-length intervals u1, ., u16, and the midpoints of these intervals are a1, . . . ,a16,
respectively, as shown in table 3

TABLE 3, FUZZY SET WITH BOUNDS AND MID VALUES

Mid point of
Designated
Fuzzy set Interval Fuzzy
mid-point
Interval
u1 [2600,2700] 2650 a1
u2 [2700,2800] 2750 a2
u3 [2800,2900] 2850 a3
u4 [2900,3000] 2950 a4
u5 [3000,3100] 3050 a5
u6 [3100,3200] 3150 a6
u7 [3200,3300] 3250 a7
u8 [3300,3400] 3350 a8
u9 [3400,3500] 3450 a9
u10 [3500,3600] 3550 a10
u11 [3600,3700] 3650 a11
u12 [3700,3800] 3750 a12
u13 [3800,3900] 3850 a13
u14 [3900,4000] 3950 a14
u15 [4000,4100] 4050 a15
A16 [4100,4200] 4150 a16

3
To demonstrate how average-based can assist forecasting in fuzzy time series, Monthly
Electricity Demand of Delhi (MED) is used as target. Use Chen’s model with average-based
length of interval to compute the FLR and FLRG.

Since weighted model gave better results than other model in terms of MSE[15]. Thus, weighted
model is used as the target model to compare the average-based model.

4.3 Defining fuzzy sets for observations

Each linguistic observation, A1 A2,… can be defined by the interval u1, . . . , u16, as follows:

A1 = 1/u1 + 0.5/u2 + 0/u3 + 0/u4 + . . . + 0/u16;


A2 = 0.5/u1 + 1/u2 + 0.5/u3 + 0/u4 + . . . + 0/u16;
A2 = 0 + 0.5/u2 + 1 + 0.5/u4 + . . . + 0/u16;
. . .
A15 = 0/u1 + 0/u2 + 0/u3 + 0/u4 + . . . + 0.5/u14 + 1/u15 + 0.5/u16;
A16 = 0/u1 + 0/u2 + 0/u3 + 0/u4 + . . . + 0/u14 + 0.5/u15 + 1/u16;

Membership values of fuzzy set Ai is either 0, 0.5 or 1 known as 3rd order FLRG’s membership.
The reason for fuzzyfying the historical MED data is to translate crisp values into fuzzy sets to get
a fuzzy time series.

4.4 Fuzzyfy Observations

Each MED can be translated into a fuzzy set and to facilitate the explanations that follow, some
MED and their corresponding fuzzy set Ai are listed in Table. 4.

Table 4, SOME FUZZY MED

FUZZY SET
Months of
MED linguistic
various years
variables
Apr 2001-02 2760 A2
May 2995 A4
Jun 3020 A5
Jul 3010 A5
Aug 3040 A5
Sep 2989 A4
Oct 2814 A3
Nov 2645 A1
Dec 2871 A3
Jan 3118 A6
Feb 2955 A4
Mar 2605 A1
. . . . . . . . .
Apr-2008-09 3509 A10
May 3592 A10
Jun 3901 A14
Jul 4036 A15
Aug 4019 A15
Sep 3945 A14
Oct 3682 A11
Nov 2919 A4
Dec 3182 A6
Jan 3262 A7
Feb 3105 A6
Mar 2999 A4

4
Based on the fuzzy set of table 4, the FLR’s are established as shown in Table 5.

4.5 Histogram Analysis of Data

A histogram analysis of the data is made to ascertain that all fuzzy set exist.

FIGURE 1. HISTOGRAM ANALYSIS

HISTOGRAMANALYSIS
16 1
4
14
1
2
12 1
1
1
0
10 8
8 6 6 6
6
4 4 4
4 3 3
2 2
2 1

0
A1 A2 A3 A4 A5 A6 A7 A8 A9 A1
0 A11 A1
2 A1
3 A1
4 A1
5A1
6
LINGUISTIC VARIABLES

If there is no data distributed in an interval, discard this linguistic interval. In the MED all linguistic
fuzzy sets are present as shown in figure 1
4.6 Establish the Fuzzy Logic Relationship and Fuzzy Logic Relationship Group

The fuzzy logic relationships of MED is shown in table 5

TABLE 5, FUZZY LOGIC RELATIONSHIPS

A2->A4, A4->A5, A5->A5, A5,-> A4, A4->A3,


A3->A1,
A1->A3, A3->A6, A6->A4, . . . . . A7->A6, A6-
>A4

The fuzzy logic relationship groups are constructed from FLRs of table 5 the as shown in table 6

TABLE 6. FUZZY LOGIC RELATIONSHIP GROUP

FUZZY
RELATIONSHIP GROUPS
SET
A1 A3 A6 A4
A2 A4
A3 A1 A6 A2 A7 A5
A4 A5 A3 A1 A9 A6 A8
A5 A5 A4 A8 A7 A6
A6 A4 A7 A8 A3 A10 A11
A7 A8 A4 A6 A12 A5 A10
A8 A8 A7 A10 A4 A6
A9 A4 A7
A10 A7 A8 A13 A9 A10 A14
A11 A11 A12 A14 A4
A12 A11 A8 A4 A6
A13 A11 A16 A12
A14 A13 A15 A11
A15 A13 A15 A14
A16 A15

5
4.7 IdentifyTthird Order Fuzzy Logic Relation Group

The third order fuzzy are segregated from table 6 The new set is made from table 7 fuzzy set,
having same fuzzy set, one higher or one lower fuzzy set

Table 7. Fuzzy Logic relationship Group

FLGR
FUZZY SET
aj aj+1 aj-1
A1 - - -
A2 - - -
A3 - - A2
A4 - A5 A3
A5 A5 A6 A4
A6 - A7 -
A7 - A8 A6
A8 A8 - A7
A9 - - -
A10 A10 - A9
A11 A11 A12 -
A12 - - A11
A13 - - A12
A14 - A15 A13
A15 A15 - A14
A16 - - A15

4.8 Establish Defuzzyfying Rules

Defuzzyfying /Forecasting is conducted on values for each month j using any one of the
following conditions on the 3rd order FLRG members of table 7.

where t j is the forecast for jth 3rd order FLGR

If only one relationship of linguistic variable exists, t j is mid value of data

If no relationship of linguistic variables exists in 3rd order, the original data is taken.

6
4.9 Defuzzify using Rules

The results of the forecast for 3rd order membership variables are defuzzified as per
rules framed in section 4.9. The forecast is shown in table 8.

Table 8. Results of the forecast

FORECAST APR MAY JUN JUL AUG SEP OCT NOV DEC JAN FEB MAR

2001-02 2760 2950 3048 3048 3048 2950 2750 2645 2750 3250 2950 2605
2002-03 3250 3250 3300 3300 3250 2950 2750 2769 2950 3417 2950 2664
2003-04 2950 3048 3300 3300 3250 3250 2950 2750 3250 3300 3250 2950
2004-05 3250 3300 3300 3500 3250 3300 2950 2750 3048 3250 3250 2750
2005-06 3048 3250 3650 3700 3700 3650 3300 2950 3300 3500 3300 3250
2006-07 3500 3750 3700 3950 3750 3700 3650 2950 3048 3250 3048 3250
2007-08 3700 3950 3750 4050 4000 3750 3650 3250 3250 3500 3410 3250
2008-09 3500 3500 3950 4000 4000 3950 3700 2950 3250 3250 3250 2950

4.10 Compute the MSE of the forecast

The average forecasting rate (AFER) and Mean square error (MSE) is used to compare
the forecasting results as shown below:-

where A I denote the actual MED I and FI denote the forecast for the month I

The MSE of the forecast gives a value = 0.148

7
4. COMPARISON OF MED FOR ACTUAL / FORECAST

Line graphs of actual and forecasted years are shown in figure 2 from the year 2001-02
to 2008-09
Figure 2. Comparison of results of the forecast

3500 8
*.Note: Line Graphs above depict Blue – Forecast Red - Actual
6. INTERPRETATION OF STUDY

a) Results of Study
There is very little error between the actual and forecast values. This is evident from the MSE
= 0.148. Therefore, it can be concluded that fuzzy logic has given excellent results and can
be used for forecasting

b) Drawbacks of Study
The third order fuzzy logic does not exhibit uniformity in membership. This could be attributed
to the monthly data being inconsistent. This inconsistency may be attributed to not taking into
account the power cuts properly. The accounting of power cuts is a very difficult process. The
inconsistency could be the effect of temperature variations in different months.

7 OVERCOMING DRAWBACKS

The drawbacks mentioned above were corrected by normalization process for each year.
The average forecast ratio of various months over the years was computed. This process is
called normalization1. The normalized ratios of various months were computed and further
normalized as shown in table 9. The peak demand forecast for 2011-12 as per 17th Electric
Power Survey of India for the state of Delhi is 6092 MW. The demand of 6092 MW is accounted
for the month of July having Average Forecast Normalised to unity and the demand for other months is
proportionally distributed for other months. The Demand for various months is shown in table 9.

Table 9, NORMALISATION OF DEMAND

MONTHS APR MAY JUN JUL AUG SEP OCT NOV DEC JAN FEB MAR

Average
Forecast 0.89 0.925 0.96 0.988 0.967 0.942 0.879 0.791 0.855 0.922 0.875 0.813
Normalised
Adjusted
0.901 0.937 0.972 1 0.979 0.953 0.889 0.801 0.866 0.933 0.886 0.823
To Unity

Demand-MW 5489 5706 5922 6092 5965 5808 5419 4877 5275 5684 5397 5012

The shape of monthly demand for the state of Delhi for the year 2011-12 is shown in figure 3

1
A fuzzy set is normalized if its largest membership value equals 1. One normalizes by dividing each
membership value by the largest membership in the set 1/(max*(t)

9
Figure 3, MONTHLY DEMAND OF DELHI
FINAL MONTHLY DEMANDOF DELHI IN20011-12
7000

6092

5965
5922

5808
5706

5684
5489
6000

5419

5397
5275

5012
DEMAND -MW

4877
5000

4000

3000

2000

1000

0
APR MAY J UN J UL AUG SEP OCT NOV DEC J AN FEB MAR
MONTHS

8 CONCLUSIONS

In this paper, we introduced average-based fuzzy time series model, where the data of historical
MED is adopted to illustrate the forecasting process. The forecasting results show that the
proposed model outperforms weighted model. The average-based models can thus be applied to
improve fuzzy time series forecasting. Furthermore, the average-based lengths are simple to
calculate. In summary, the proposed model is as simple as Chen’s method, but more accurate in
forecasting. The forecast results obtained from Fuzzy logic forecast has been modified using
normalization process and the resulting monthly demand for forecasting purposes has been
evolved. The outcome of the study highlights the following:-

(a) The maximum demand falls in the month of July


(b) The minimum demand falls in the month of November
(c) The ratio of minimum/maximum is 0.77
(d) The demand remains above 90% for six month between April to September

The results of the monthly demand using fuzzy logic and associated parameters derived above
and normalization process can be used for planning purposes which would result in potential
source of fund saving in electricity industry.

References
[1] Chen S. M. and Hsu C.-C. 2004. A new method to forecasting enrollments using fuzzy time series,
International Journal of Applied Science and Engineering, 2, 3: 234-244.
[2] Chen, S. M. 1996. Forecasting enrollments based on fuzzy time series. Fuzzy Sets and Systems, 81:
311-319.
[3] S. M. Chen, J. R. Hwang, “Temperature prediction using fuzzy time series”, IEEE Transactions on
Systems, Man, and Cybernetics-Part B: Cybernetics, Vol. 30, pp.263-275, 2000.
[4] S. M. Chen, “Forecasting enrollments based on high-order fuzzy time
series”, Cybernetics and Systems: An International Journal, Vol. 33: pp.1-16, 2002.
[5] K. Huarng, “Heuristic models of fuzzy time series for forecasting”, Fuzzy Sets and Systems, Vol. 123, pp.
369-386, 2002.
[6] K. Huarng, “Effective lengths of intervals to improve forecasting in fuzzy time series”, Fuzzy Sets and
Systems, Vol. 12, pp. 387-394, 2001.
[7] C. C. Hsu, S. M. Chen, “A new method for forecasting enrollments based on fuzzy time series”,
Proceedings of the Seventh Conference on Artificial Intelligence and Applications, Taichung, Taiwan,
Republic of China, pp. 17-22.
[8] J. R. Hwang, S. M. Chen, C. H. Lee, “Handling forecasting problems using fuzzy time series”, Fuzzy Sets
and Systems, Vol. 100, pp. 217-228, 1998.
[9] T. A. Jilani, S. M. A. Burney, “M-factor high order fuzzy time series forecasting for road accident data”, In
IEEE-IFSA 2007, World Congress, Cancun, Mexico, June 18-21, Forthcoming in Book series Advances in
Soft Computing, Springer-Verlag, 2007.
[10] T. A. Jilani, S. M. A. Burney, C. Ardil, “Multivariate high order fuzzy time series forecasting for car road
accidents”, International Journal of Computational Intelligence, Vol. 4, No. 1, pp.15-20., 2007.
[11] G. J. Klir, T. A. Folger, Fuzzy Sets, Uncertainty, and Information, Prentice-Hall, New Jersey, U.S.A,
1988.

10
[12] G. J. Klir, B. Yuan, Fuzzy Sets and Fuzzy Logic: Theory and Applications, Prentice Hall, New Jersey,
U.S.A, 2005.
[13] L. W. Lee, L. W. Wang, S. M. Chen, “Handling forecasting problems based on two-factors high-order
time series”, IEEE Transactions on Fuzzy Systems, Vol. 14, No. 3, pp.468-477, 2006.
[14] H. Li, R. Kozma, “A dynamic neural network method for time series prediction using the KIII model”,
Proceedings of the 2003 International Joint Conference on Neural Networks, 1: 347-352, 2003.
[15] S. Melike, Y. D. Konstsntin, “Forecasting enrollment model based on first-order fuzzy time series”, in
proc. International Conference on Computational Intelligence, Istanbul, Turkey, 2004.
[16] Q. Song, “A note on fuzzy time series model selection with sample autocorrelation functions”,
Cybernetics and Systems: An International Journal, Vol. 34, pp. 93-107, 2003.
[17] Q. Song, B. S. Chissom, “Fuzzy time series and its models”, Fuzzy Sets and Systems, Vol. 54, pp. 269-
277, 1993.
[18] Q. Song, B. S. Chissom, “Forecasting enrollments with fuzzy time series Part I”, Fuzzy Sets and
Systems, 54: 1-9.

11

You might also like