Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Department of Industrial Engineering and Center of Excellence for Intelligent Based Experimental Mechanics, College of Engineering, University of Tehran, Iran
Department of Industrial Engineering, University of Tafresh, Iran
c
Department of Industrial Engineering, Sharif University of Technology, Iran
b
a r t i c l e
i n f o
Keywords:
Hybrid
Adaptive network based fuzzy inference
system
Computer simulation
Improvement
Time series
Electricity consumption
a b s t r a c t
This paper presents a hybrid adaptive network based fuzzy inference system (ANFIS), computer simulation and time series algorithm to estimate and predict electricity consumption estimation. The difculty
with electricity consumption estimation modeling approach such as time series is the reason for proposing the hybrid approach of this study. The algorithm is ideal for uncertain, ambiguous and complex estimation and forecasting. Computer simulation is developed to generate random variables for monthly
electricity consumption. Various structures of ANFIS are examined and the preferred model is selected
for estimation by the proposed algorithm. Finally, the preferred ANFIS and time series models are
selected by GrangerNewbold test. Monthly electricity consumption in Iran from 1995 to 2005 is considered as the case of this study. The superiority of the proposed algorithm is shown by comparing its results
with genetic algorithm (GA) and articial neural network (ANN). This is the rst study that uses a hybrid
ANFIS computer simulation for improvement of electricity consumption estimation.
2009 Elsevier Ltd. All rights reserved.
Signicance
This is the rst study that presents a hybrid simulation-adaptive network fuzzy inference system (ANFIS) for improvement of
electricity consumption estimation. The unique features of the proposed algorithm are two fold. First, ANFIS is ideal for complex and
uncertain data because it is composed of both ANN and fuzzy systems. Second Monte Carlo simulation is used to generate input
variables whereas the conventional methods use deterministic
data. The superiority of the proposed algorithm is shown by comparing its results with time series, genetic algorithm (GA) and ANN.
1. Introduction
There have been several studies on ANN and neuro-fuzzy models
in different cases (Baylar, Hanbay, & Ozpolat, 2008; aydas,
Hasalk, & Ekici, 2009; Dogantekin, Yilmaz, Dogantekin, Avci, &
Sengur, 2008; Huang, Kang, Chu, Chien, & Chang, 2009; Khajeh,
Modarress, & Rezaee, 2008; Subasi, Serdar Yilmaz, & Binici, 2008;
Wang & Chen, 2008).2 ANN is congured for a specic application,
such as pattern recognition, function approximation, data classica-
* Corresponding author.
E-mail address: aazadeh@ut.ac.ir (A. Azadeh).
1
Member of Young Researcher Club of Azad University of Tafresh.
2
As there are numerous papers, only some of ESWA papers are cited.
0957-4174/$ - see front matter 2009 Elsevier Ltd. All rights reserved.
doi:10.1016/j.eswa.2009.02.081
Karunasinghea & Liong, 2006; Nayak, Sudheer, Rangan, & Ramasastri, 2004; Niskaa, Hiltunen, Karppinen, Ruuskanen, & Kolehmainena, 2004; Oliveira & Meira, 2006; Tseng, Yu, & Tzeng, 2002).
Other aim is to used computer simulation as an overlapping approach with ANFIS. However, this study uses computer simulation
to generate random variables to be used in ANFIS, whereas previous studies only use available raw data for ANFIS. Moreover, the
integration of ANFIS and simulation is proposed as an alternative
forecasting approach in this study and it is compared with ANFIS
and time series.
Computer simulation has excellent capabilities such as proper
description of system behavior, scenario analysis and forecasting
capabilities. Numerous studies have been conducted in domain of
ANFIS or computer simulation; however, this is the rst study that
integrates ANFIS and simulation for forecasting electricity consumption to be used in the proposed algorithm of this paper. In
addition, in context of forecasting, simulation is an attractive tool
because it allows generation of random variables, which could dene the complex behavior of input data for forecasting problems.
Simulation could help in modeling of past data to be used for electricity demand process with relatively low cost.
Electricity, as a resource of energy, with its ever growing role in
world economy, and its multi-purpose application in production
and consumption has gained special attention. Through the development of societies and growth of economical activities, electricity
becomes more effective on corporations and their services. Corporations use electricity as a production factor. Also, families directly
or indirectly rely on electricity. Thus, energy consumption determines their and societys economical welfare. A major application
is the estimation of electricity consumption, which reveals the consumption growth in the forthcoming years.
This paper is organized as follows. In the next section, ANFIS is
described. After introducing one of the most famous conventional
models (ARIMA model), the importance of data preprocessing is
explained and different data preprocessing methods are proposed.
An algorithm3 for estimation and prediction with ANFIS is also
developed in Section 5. The results are shown in Section 6.
2. The hybrid algorithm
The ANFIS model with preprocessed data (ANFISW) and ANFIS
model without preprocessed data (ANFISWO) are considered to
determine the impact of preprocessing on ANFIS. Moreover, the
raw data is simulated by computer simulation to identify its probability distribution and the mean of probability distribution is then
used as input data for ANFIS. This is of course repeated for each
month. The advantage of simulated-based is to foresee if the stochastic nature of data has any impact on future demand estimation. Except ANFIS, the best time series model for the data set is
also identied. This is done to compare the best ANFIS model
against the best conventional time series model.
This algorithm has the following general basic steps:
Step 1: Collect data set in all available previous periods. Then, the
stationary assumption should be studied for both ANFISW
model and time series models. If the models are not
covariance stationary, the most suitable preprocessing
method should be selected and applied to the model. In
addition, simulated data must be generated with com-
3
In this algorithm, three basic models are selected in which two of them are ANFIS
models and the last is time series model. Two ANFIS models are ANFIS model with
preprocessing (ANFISW) and ANFIS model without preprocessing (ANFISWO). The
most suitable ANFIS model is then compared with time series model with the aid of
GrangerNewbold test. Preferred time series model is selected from linear or
nonlinear models. McleodLi test is used for this.
11109
12
X
12
i1
212 4096
2.1. ANFIS
The fuzzy inference process we have been referring to so far is
known as Mamdanis fuzzy inference method, the most common
methodology (Mamdani & Assilian, 1975). The so-called Takagi
Sugeno method of fuzzy inference introduced in 1985 (Sugeno,
1985). It is similar to the Mamdani method in many respects.
The rst two parts of the fuzzy inference process, fuzzifying the inputs and applying the fuzzy operator, are exactly the same. The
main difference between Mamdani and TakagiSugeno method is
11110
Up Lyt hq Let
with
Up L 1 U1 L . . . Up L
Uq L 1 h1 L . . . hq Lq
Xt
a1 X t1 Z 1
if X t1 < d
t1
2
a2 X t1 Z t1 if X t1 P d
Furthermore, the proposed algorithm ts the best linear or nonlinear model to the data set. This is quite important because most
studies assume that linear time series such as ARIMA provide the
best t.
2.3. Data preprocessing
In time series methods creating a covariance stationary4 process
is one of the basic assumptions. Also, using preprocessed data is
more useful in most heuristic methods which require the investigation of stationary assumption for the models (Zhang & Hu, 1998). If
the models are not covariance stationary, the most suitable preprocessed method should be dened and applied. In forecasting models,
a preprocessing method should have the capability of transforming
the preprocessed data in to its original scale (called post processing).
Therefore, in time series forecasting method, appropriate preprocessing method should have two main properties. It should make
the process stationary and must have the post processing capability.
The most useful preprocessed methods are studied in the sections.
2.3.1. Normalization
There are different normalization algorithms which are Min
Max Normalization, Z-Score Normalization and Sigmoid Normalization. The MinMax normalization scales the numbers in a data
set to improve the accuracy of the subsequent numeric computations. Tseng et al. (2002), Nayak et al. (2004), Niskaa et al.
(2004), Karunasinghea and Liong (2006), Oliveira and Meira
(2006), Gareta et al. (2006), Aznarte et al. (2007), and Jain and
Kumar (2007) used this method in their articles to estimate time
series functions using heuristic approach.
If xold, xmax, xmin, xold are the original, maximum and minimum
values of the raw data, respectively and x0max ; x0min are the maximum and minimum of the normalized data, respectively, then
the normalization of xold called x0 new can be obtained by the following transformation function:
x0new
xold xmin 0
xmax x0min x0min
xmax xmin
xnew
xold mean
std
xnew 1e
1ea
a xold mean
std
4
By denition, an ARIMA model is covariance stationary if it has a nite and timeinvariant mean and covariance.
11111
Tseng et al. used this method in their article to estimation time series functions using heuristic approach (Tseng et al., 2002). The following transformation should be applied for the method:
yt xt xt1
Industry in Iran (including transmission and distribution) published by the TAVANIR management organization (19922005).
As simulated data is important for us, the related process discussed
at rst.
However, for the rst difference of the logarithm method the transformation is adjusted as follows:
For this purpose, the distribution function of each month is calculated and then by using the related function for each month, the
average value of that month is obtained. By this way, instead of
using the deterministic value for each month we have its average
value from the probable distribution the real value belongs to.
When the distribution of each month is found, the amount of the
square error and p-value of that distribution is also returned.
An example of the selected distribution functions for each
month is shown in Table 1. The selected distribution functions
are selected from a series of distribution functions according to
their p-values and square errors. Table 2 shows an example of such
selection for the period of 3/2001 to 6/2001 (see Fig. 1).
10
Let rxz denote the sample correlation coefcient between {xt} and
{zt}. Granger and Newbold show that r xz = 1 r 2xz H 10:5 has
a t-distribution with H 1 degrees of freedom. Thus, if rxz is statistically different from zero, model 1 has a larger mean square error
(MSE) than model 2 if rxz is positive and model 2 has a larger MSE
than model 1 if rxz is negative.
2.6. Error estimation methods
There are four basic error estimation methods which are listed
below:
Table 1
Electricity consumption distribution for each month in 2001.
Date
Distribution
3/2001
4/2001
5/2001
6/2001
7/2001
8/2001
9/2001
10/2001
11/2001
12/2001
1/2002
2/2002
Table 2
Distribution functions for 3/2001 to 6/2001.
Month
Distribution function
Square error
p-value
3/2001
Uniform
Erlang
Exponential
Normal
Triangular
Gamma
Lognormal
0.077
0.153
0.153
0.100
0.099
0.160
0.249
0.045
0.038
0.038
>0.15
<0.01
<0.01
<0.01
4/2001
Uniform
Erlang
Exponential
Normal
Triangular
Gamma
Lognormal
0.138
0.225
0.225
0.082
0.074
0.245
0.348
>0.15
<0.01
<0.01
>0.14
>0.15
<0.01
<0.01
5/2001
Uniform
Erlang
Exponential
Normal
Triangular
Gamma
Lognormal
0.046
0.144
0.144
0.025
0.002
0.150
0.257
<0.01
<0.01
<0.01
>0.14
>0.15
<0.01
<0.01
6/2001
Uniform
Erlang
Exponential
Normal
Triangular
Gamma
Lognormal
0.123
0.225
0.225
0.093
0.061
0.233
0.308
<0.01
<0.01
<0.01
>0.15
0.124
<0.01
<0.01
MAE
MSE
RMSE
Pn
t1
jxt x0t j
Pn
t1
xt x0 2
n
rP
n
0 2
MAPE
t1
xt x
11
Pn xt x0
x
t1
All methods, except MAPE have scaled output. MAPE method is the
most suitable method to estimate the relative error because input
data used for the model estimation, preprocessed data and raw data
have different scales (Azadeh, Ghaderi, & Sohrabkhani, 2007;
Azadeh, Ghaderi, Tarverdian et al., 2007). Therefore, MAPE is used
as the major reference in this study.
3. The case study
The proposed algorithm is applied to 130 set of data which are
the monthly consumption in Iran from April 1994 to February
2005. Detailed information can be obtained from Electric Power
11112
Step1
Collect data set in all available previous periods
Is the
process
stationary?
Yes
Step 2
Step 3
Step 4
Step 5
Select the preferred ARIMA model by Box-pierce Qstatistic test, AIC, SBC and defined as L1 .
Run Granger-Newbold test for
comparison of the ANFIS *and Time
Series with actual data
Select the preferred
nonlinear model and
called NL1 and
Defined as Time Series
Yes
McLeod-LI
Test
No
Using these results, the average values for each month is simulated by Visual Slam (Enlin, 1995). The selected distribution functions for each month is then generated 1000 times to obtain steady
state. An example of the Visual Slam network can be seen in Fig. 2.
The outputs of the simulation are the average and standard deviation of daily consumption values. Then, the upper and lower limits
are constructed by l 3r. Next, the daily results are multiplied by
the number of days in per month and consequently monthly consumption values are obtained.
3.2. Step 1
It can be seen from Fig. 3a that raw data has a trend. As removing the trend is needed for more precise estimation in time series
11113
3.3.1. Normalization
All three methods of normalization are used to preprocess the
data, but as can be seen in Fig. 3bd, in which the normalized consumption data are shown the trend of data cannot be removed by
any of the normalization methods. Therefore normalization is not
suitable for preprocessing the data set.
3.3. Step 2
The 130 rows of data are divided into 118 training data set and
12 test data set. Also, the 129 preprocessed data are divided into
117 training data set and 12 test data set.
18000000
0.016
16000000
0.014
14000000
0.012
12000000
0.01
10000000
0.008
8000000
0.006
6000000
0.004
4000000
0.002
2000000
0
1 9 17 25 33 41 49 57 65 73 81 89 97 105 113 121 129
0
1
3.5
0.8
0.6
2.5
0.4
0.2
1.5
1
0.5
-0.2
0
-0.5
11
21
31
41
51
61
71
81
91
101
111
121
131
13
25
37
49
61
73
85
97
109
121
-0.4
-0.6
-1
-1.5
-0.8
-2
-1
2500000
0.08
2000000
0.06
1500000
0.04
1000000
0.02
500000
0
-500000
12
23
34
45
56
-1000000
67
78
89
100
111 122
11
21
31
41
51
61
71
81
91
101
111 121
-0.02
-0.04
-1500000
-2000000
-0.06
-2500000
-0.08
-3000000
-0.1
11114
0.3
ACF
0.2
PACF
0.1
0
1
11
13
15 17
19 21 23 25 27
29
31 33
35
-0.1
Test Months
Actual data
ANFISIMW monthly electricity
consumption estimation
Electricity Consumption(Kwh)
18000000
16000000
14000000
12000000
10000000
8000000
6000000
4000000
2000000
0
20000000
18000000
16000000
14000000
12000000
10000000
8000000
6000000
4000000
2000000
0
Fe
5)
00
)
n(2
J a 0 04
c(2 )
De 0 04
v(2
No 04)
0
t(2
)
Oc 0 04
p(2 )
Se 0 04
g(2 )
4
Au
00
)
l(2
J u 0 04
)
n(2
J u 0 04
y (2
Ma 04)
0
r(2
)
Ap 0 04
r(2
Ma 0 04)
b(2
Fe
Electricity Consumption(Kwh)
MAPE
0.036
0.025
0.045
0.021
0.015
0.025
0.035
0.039
0.025
0.026
5)
00
n(2 4)
Ja
0
0
c(2 )
De
4
00
v(2
No 04)
0
t(2
Oc 004)
p(2
Se 004)
g(2
Au
4)
00
l(2
Ju
4)
00
n(2 4)
Ju
00
y(2 )
4
Ma
00
r(2
Ap
4)
00
r(2 )
04
(20
Ma
Model
1
2
3
4
5
6
7
8
9
10
b
Fe
Table 3
Architecture of the 10 models and networks error.
20000000
18000000
16000000
14000000
12000000
10000000
8000000
6000000
4000000
2000000
0
b(
20
ar 04 )
(2
Ap 004
)
r(
M 200
ay 4 )
(2
Ju 00
n( 4 )
20
Ju 04
l (2 )
Au 00
g( 4 )
2
Se 00
p( 4 )
20
O 04
ct
)
(
N 200
ov
4)
(2
De 00
c( 4)
2
Ja 004
n(
20 )
05
)
-0.4
-0.3
Electricity Consumption(KWh)
-0.2
Test Months
Test months
Actual data
Actual data
Y-1
20000000
15000000
10000000
5000000
0
5)
00
n (2
Ja
4)
00
c(2
De
4)
00
v(2
No
4)
00
t(2
Oc
4)
00
p(2
Se
4)
00
g(2
Au
4)
00
l(2
Ju
4)
00
n (2
Ju
4)
00
y(2
Ma
4)
00
r (2
Ap
4)
00
r(2
Ma
4)
00
b(2
Fe
Electricity Consumption(KWh)
Test Months
Input layer
input
membership
function layer
Output
Layer
Actual data
ANFISIMWO monthly electricity
consumption estimation
Fig. 9. The comparison of ANFISIMW output with test actual data.
11115
ARIMA (1,1)
ARIMA (1,(1,12))
AR (2, MA(12))
0.009
0.201
0.008
0.235
0.174
0.009
0.616
0.003
0.235
0.008
0.122
0.076
0.879
0.149
0.757
1,3 (0.85)
7.2
(0.51)
11.5
(0.41)
648
640
15.6 (0.00)
25.005
(0.00)
31.35
(0.05)
623
620
Q(12)
(0.00)
AIC
SBC
8.94 (0.07)
16.04
(0.05)
21.4
(0.11)
632
625
3.4. Step 3
For fuzzy regression models, ACF approach is used to select input variables among 12 lags. According to Fig. 4, yt is the function
of consumption in the 1th lag in preprocessed data. Similarly, yt is
the function of consumption in the 1th and 12th lags in raw data.
Input variables are selected for simulated data with ACF too.
3.4.1. Estimation of electricity consumption by ANFISW
In order to get the best ANFIS for the estimation of electricity
consumption, 10 models are tested to nd the best architecture.
The MAPE values of the mentioned models are shown in Table 3.
Gaussian and bell shaped membership functions are becoming
increasingly popular for specifying fuzzy sets as they are nonlinear
and smooth and their derivatives are continuous. Gradient methods can be used easily for optimizing their design parameters. In
present study, Gaussian membership function5 is considered as
term membership function. Therefore, 5th model is selected for estimating the electricity consumption.
The comparison of ANFISW output with test actual data is
shown in Fig. 5. Fig. 6 shows structure of fth model.
3.4.2. Estimation of electricity consumption by ANFISWO
With similar approach, model with 0.05 MAPE value is selected
for estimating the electricity consumption. The comparison of ANFISWO with actual data is shown in Fig. 7. Figs. 8 and 9 show the
comparison of actual data with and ANFISIMW and ANFISIMWO,
respectively.
3.4.3. Estimation of electricity consumption by time series model
In order to nd the preferred time series model appropriate ARIMA model must be estimated. The preferred ARIMA model is selected by aid of GrangerNewbold test. Then By using the result
of this model, McLeodLi test is applied. The result of this test
shows that nonlinear time series must be used or not. The following sections show that ARIMA model is sufcient for the case
study. Moreover, pervious researches show that linear time series
is the most ideal for our case study (Zhu, 1998).
Gauss x; r; c e
xc2
2r2
0.885
2.02 (0.72)
8.5
(0.41)
12.1
645
642
Table 5
The McleodLi test results.
LjungBox Q-statistic
Q(4)5
Q(8)
Q(12)
1.4(0.846)
7.3(0.5)
11.2(0.51)
20000000
18000000
16000000
14000000
12000000
10000000
8000000
6000000
4000000
2000000
0
)
05
20
)
n(
Ja
04
20
c(
)
De
04
20
v(
No 0 4)
0
t(2
)
Oc 00 4
2
p(
)
Se
04
20
g(
A u 0 4)
0
l(2
)
Ju
04
20
)
n(
J u 00 4
2
y(
Ma 0 4)
0
r(2
)
A p 00 4
r(2
Ma 0 4)
20
b(
Fe
3.4.3.1. ARIMA model. To nd the best time series model preprocessed approach is used. Fig. 4 shows ACF and PACF charts, respectively. The theoretical ACF of a pure MA(q) process cuts off to zero
at lag q and theoretical ACF of an AR(1) models decays geometrically. Examination of Fig. 4 suggests that neither of these specications seems appropriate for the electricity consumption. The ACF
does not decay geometrically and it is suggestive of an AR(2) process or a process with both autoregressive and moving average
4.66 (0.33)
11.642
(0.17)
18.13
(0.501)
639
631
Electricity Consumption(Kwh)
A0
A1
A2
B1
B2
Q(4)
Q(8)
AR (1)
Test months
Actual data
ARIMA Monthly Electricity
Consumption Estimation
Fig. 10. The comparison of ARIMA output with actual data.
11116
Table 6
The MAPE estimation of the models.
ANFISW model
ANFISWO model
ANFISIMW model
ANFISIMWO model
0.103
0.015
0.05
0.019
0.07
20000000
18000000
16000000
14000000
12000000
10000000
8000000
6000000
4000000
2000000
0
6)
00
n(2
Ja
5)
00
c(2
De
5)
00
v(2
No
5)
00
t(2
Oc
5)
00
p (2
Se
)
05
20
g(
Au
5
00
l(2
Ju
5)
00
n(2
Ju
)
05
20
y(
Ma
5)
00
r (2
Ap
5)
00
r(2
Ma
)
05
20
b(
Fe
MAPE
ARIMA model
Table 7
The MAPE estimation of the proposed algorithm versus GA and ANN.
MAPE
Genetic algorithm
0.014
0.0156
0.0155
3.5. Step 4
5. Conclusion
10^ ANFISxi xi 1
24
Q T
s
P
k1
rk
PT
r 2k
ytk y
y y
tk1 t
T
2
yt y
t1
1=T
y
T
P
yt
t1
Under the null hypothesis that all values of rk = 0, Q is asymptotically v2 distributed with s degrees of freedom. The intuition behind
the use of statistic is that high sample autocorrelations lead to large
values of Q. certainly; a white noise process (in which all autocorrelation should be zero) would have Q value of zero. If the calculated
value of Q exceeds the appropriate value in a v2 table, the null signicant autocorrelations can be rejected.
References
Azadeh, A., Ghaderi, S. F., Tarverdian, S., & Saberi, M. (2006). Integration of articial
neural networks and genetic algorithm to predict electrical energy
consumption. In Proceeding of the 32nd annual conference of the IEEE industrial
electronics society IECON06. Paris, France: Conservatoire National des Arts and
Metiers.
Azadeh, A., Ghaderi, S. F., & Sohrabkhani, S. (2007). Forecasting electrical
consumption by integration of neural network, time series and ANOVA.
Applied Mathematics and Computation, 186(2), 17531761.
Azadeh, A., Ghaderi, S. F., Tarverdian, S., & Saberi, M. (2007). Integration of articial
neural networks and genetic algorithm to predict electrical energy
consumption. Applied Mathematics and Computation, 2, 17311741.
Aznarte, J. L., Sanchez, J. M. B., Lugilde, D. N., Fernandez, C. D. L., Guardia, C. D., &
Sanchez, F. A. (2007). Forecasting airborne pollen concentration time series
with neural and neuro-fuzzy models. Expert Systems with Applications, 32(4),
12181225.
Baylar, A., Hanbay, D., & Ozpolat, E. (2008). An expert system for predicting aeration
performance of weirs by using ANFIS. ESWA, 35(3), 12141222.
Box, G. E. P., & Jenkins G. M. (1970). Time series analysis: Forecasting and control. San
Francisco: 7 Holden Day (Rev. ed. 1976).
aydas, U., Hasalk, A., & Ekici, S. (2009). An adaptive neuro fuzzy inference system
(ANFIS) model for wire EDM. Expert Systems with Applications, 36(3), 6135
6139.
Chiang, W. C., Urban, T. L., & Baldridge, G. W. (1996). A neural network approach to
mutual fund net asset value forecasting, Omega. International Journal of
Management Science, 24, 205215.
Cybenko, G. (1989). Approximation by superpositions of a sigmoidal function.
Mathematics of Control, Signals and Systems, 2, 303314.
Dogantekin, E., Yilmaz, M., Dogantekin, A., Avci, E., & Sengur, A. (2008). A robust
technique based on invariant moments ANFIS for recognition of human
parasite eggs in microscopic images. ESWA, 35(3), 728738.
Enlin, M. (1995). Use of principal component analysis in selecting plants for
uoride. Chinese Journal of Ecology, 14(3).
Gareta, R., Romeo, L. M., & Gil, A. (2006). Forecasting of electricity prices with neural
networks. Energy Conversion and Management, 47, 17701778.
Ghiassi, M., Saidane, H., & Zimbra, D. K. (2005). A dynamic articial neural network
model for forecasting time series events. International Journal of Forecasting, 21,
341362.
11117