You are on page 1of 13

JOURNAL OF COMPUTER SCIENCE AND ENGINEERING, VOLUME 15, ISSUE 2, OCTOBER 2012

50

Neurofuzzy system for short term Electric Load forecasting


Oyedoja, kayode. O., Olanloye, D. Odunayo., and Obiyemi, Obiseye. O

Abstract Load forecasting models are used to predict the load consumption demand in order to increase or decrease the power generated and thus minimize the operating costs of producing electricity. Besides conventional classical models, models based on artificial intelligence have been proposed in the literature. This study presents a short term electric load forecasting model using an adaptive neurofuzzy inference system (ANFIS). The input-output pairs used are historical electricity load measure on hourly bases for a week period during various seasons of the year. Results and forecasting performance obtained revealed the effectiveness of the proposed approach and shows that it is possible to build a high accuracy model with less historical data using a hybrid artificial intelligence network that integrates neural network and fuzzy logic. Keywords: Short term load forecasting, ANFIS, Matlab, neural network, fuzzy logic
Oyedoja, K.O is with the Technical Education Department, Emmanuel Alayande College of Education, Oyo, Oyo state, Nigeria. Olanloye, D.O is with the Department of Computer Science, Emmanuel Alayande College of Education, Oyo, Oyo state, Nigeria. Obiyemi, O.O is with the Electrical/Electronic Engineering Department, Osun State University, Osogbo, Nigeria.

1.

INTRODUCTION medium term load forecasting (MTLF), and 110years for long term load forecasting (LTLF). Accurate load forecasting holds a great saving potential for electric utility corporations. Savings are realized when load forecasting is used to control operations and decisions such as dispatch, unit commitment, fuel allocation and off line network analysis [3]. The accuracy of load forecasts has a significant effect on power system operations, as economy of operations and control of power systems maybe quite sensitive to forecasting errors. Load forecasting resulted in increase positive and negative operating cost errors [4].

Load forecasting is a central and integral process in the planning and operation of electric utilities. It involves the accurate prediction of both the magnitudes and geographical locations of electric load over the different periods (usually hours) of the planning horizon. The basic quantity of interest in load forecasting is typically the hourly total system load, forecasting load is also concerned with the prediction of hourly, daily, weekly and monthlyvalues ofthe system load, peak system load and the system energy[1]. Load forecasting can also be classified in terms of the planning horizons duration [2] up to 1 day for short term load forecasting (STLF), 1 day to 1 year for

2012 JCSE www.Journalcse.co.uk

JOURNAL OF COMPUTER SCIENCE AND ENGINEERING, VOLUME 15, ISSUE 2, OCTOBER 2012

51

Based on their capabilities to approximate the non linear continuous functions, to identify complex systems, recognize and solving optimization tasks e.t.c, neutral network, fuzzy logic and neurofuzzy approaches have been successfully applied in several scientific and engineering fields. In power system planning however, several model based on neutral network have been proposed for short term electric load forecasting, they enhanced their ability to learn and construct a highly non linear mapping throughout a set of input-output data pair [5,6]. The work of [7] focused on the application of non linear system identification technique for short term load forecasting. They used fixed size least squares support vector machines for non linear estimation in WARX model. Artificial neutral network model for short term load forecasting provide errors when there are speedy fluctuations in load and temperature. To overcome difficulties and to have a good model, fuzzy adaptive inference and similarity which takes into account the effect of humidity and temperature have been employed [8]. In this approach, fuzzy adaptive inference is employed to adjust the load curves on selected similar days and results obtained show a good prediction with a small mean absolute percentage error (MAPE). Hybrid intelligent system takes advantage of neutral networks and fuzzy logic have been used to forecast medium and long term energy demand of a complicated electrical system [9]. With the proposed approach, the authors try to search recurrent relationships in historical data that allows the prediction of energy demand for certain number of years. This paper considers in particular, the application of intelligent system to the modeling and forecasting of short term load,with reference to hourly, weekly and annual load data. With the emergence of new deregulated electricity markets, forecasting of electricity unit price has also become an important application for intelligent system [10]. Though price forecasting is not the focus of this paper, the study is however aims to model and forecast short term load using adaptive neurofuzzy inference system in Matlab environment.

This paper is organized in three parts. Part 2 presents a brief study of manual, statistical and artificial intelligence approaches used for load forecasting. Adaptive Neurofuzzy Inference System [ANFIS] structure is presented in part 3. Results of proposed model structure for load forecasting of weekly load consumption and discussion are shown in part 4 followed by the conclusion of the research. 2.0 APPROACHES TO LOAD FORECASTING

There are three major approaches to load forecasting, these include manual, statistical and artificial intelligence. 2.1 MANUAL APPROACH

This is the approach in which the operator uses his or her experience and intuition to obtain a good guess of the load demand. This approach is inefficient, non effective and time taking; it is prone to too much error. These limitations render this method not appropriate for load forecasting. 2.2 STATISTICAL APPROACH

This is the approach that depends largely on historical data of electric load consumption. This approach usually requires a mathematical model that represents load as function of different factors such as time of the day, weather and customer class. It involves the use of historical data and produces instant result. Statistical packages are readily available, although expensive. The historical data used by this approach may not always be available especially in the developing countries. Load behavior experiences sudden change which statistical method cannot always cope with. Therefore, this approach is not most appropriate for use in STELF. Statistical approach includes multiple linear regression (MPL), adaptive models, general exponential smoothing, stochastic time series and state space methods. 2.3 ARTIFICIAL INTELLIGENCE (AI) APPROACH

2012 JCSE www.Journalcse.co.uk

JOURNAL OF COMPUTER SCIENCE AND ENGINEERING, VOLUME 15, ISSUE 2, OCTOBER 2012

52

Artificial intelligence approach tends to be flexible and can handle complexity and non linearity. In this paper, this approach is subdivided into four major parts. AI approach includes the expert system, neural network, genetic algorithm and fuzzy logic.

2.3.1

EXPERT SYSTEM

genetics which combines the notion of survival of the fittest, random and yet structured search and parallel evaluation of the points in the search space. GA accommodate all the facets of soft computing, namely uncertainty, imprecision, non-linearity, and robustness. GA can be used to provide a good set of initial weights for the Neural Network (NN), or can be used to fully train the NN or to find the optimal network structure [18] 2.3.4 FUZZY LOGIC

These methods incorporate rules and procedures used by experts. Expert systems are heuristic models, which can usually take into account quantitative and qualitative factors in software which will then automatically be able to predict without human assistance. Several techniques were proposed since the 80s. A typical approach is to try to emulate the reasoning of a human operator. One possible method for creating a human expert prediction is to search the historical database on the day that best fits the target day, taking account of factors that characterize it. The values of the corresponding load recorded to date are then taken as the basis for forecasting [11,12,13,14]. An expert system can be an automated version of this kind of research process. Moreover, the expert system can refine its results taking more explicitly, taking into account external factors and daily usage patterns. 2.3.2 NEURAL NETWORK

Fuzzy logic is a generalization of the usual Boolean logic used for digital circuit design [19]. An input under Boolean logic takes on a truth-value of 0 or 1. Under fuzzy logic an input has associated with it a certain qualitative ranges. Fuzzy logic allows one to (logically) deduce outputs from fuzzy inputs. In this sense, fuzzy logic is one of a number of techniques for mapping inputs to outputs (i.e. curve fitting). Among the advantages of fuzzy logic are the absence of a need for a mathematical model mapping inputs to outputs and the absence of a need for precise (or even noise free) inputs. With such generic conditioning rules, properly designed fuzzy logic systems can be very robust when used for forecasting. 3 NEUROFUZZY MODEL

Based on learning strategies, neural network methods for load forecasting can be classified into two groups. The first one is a supervised neural network that adjusts its weights according to the error between pre-tested and desired output. The second are methods based on unsupervised learning algorithm. Generally, methods based on supervised learning algorithm like a feed forward multilayer perception are used [15, 16]. 2.3.3 GENETIC ALGORITHM

Genetic algorithms (GAs) have recently received much attention as robust stochastic search algorithms for various problems [17]. This class of methods is based on the mechanism of natural selection and natural

Neurofuzzy modeling refers to the way of applying various learning techniques developed in the neural network literature to fuzzy inference system (FIS). The basic structure of a FIS is shown in Fig. 1 which consists of three conceptual components: A rule base, which contains a selection of fuzzy rules; a database which defines the membership function (MF) used in the fuzzy rules; and a reasoning mechanism, which performs the inference procedure upon the rules and a given condition to derive a reasonable output conclusion. A FIS implements a nonlinear mapping from its input space to an output space. A FIS can utilize human expertise by storing its essential components in a rule base and database, and perform fuzzy reasoning to infer the overall output value. The derivation of if-then rules and corresponding membership functions depends heavily on the prior knowledge of the system

2012 JCSE www.Journalcse.co.uk

JOURNAL OF COMPUTER SCIENCE AND ENGINEERING, VOLUME 15, ISSUE 2, OCTOBER 2012

53

under consideration. However there is no systematic way to transform the experience of the knowledge of human experts to the knowledge base of a FIS. On the other hand, artificial neural network [ANN] learning mechanisms do not rely on human expertise. Because of the highly parallel structure of an ANN, it is hard to extract structured knowledge from either the weights or the configuration of the ANN. The weights of the ANN represent the coefficients of the hyperplane that partitions the input space into two regions with different output values. If one can visualize the hyperplane structure from the training data then the subsequent learning procedures in an ANN can be reduced. On the contrary, a prior knowledge is usually obtained from the human experts and it is most appropriate to express the knowledge as a fuzzy if-then rules.

To a large extent, the drawbacks of these two approaches seem to be complementary. Therefore it is possible to consider building an integrated system combining the concept of FIS and ANN modeling. A common way to apply a learning algorithm to a FIS is to represent it in a special ANN architecture. However the conventional ANN learning algorithms (e.g gradient descent) cannot be applied directly to such a system as the function of the inference system or by not using the standard neural leaning algorithm. In this paper a class of adaptive networks [20] that act as a fundamental framework for adaptive fuzzy inference system is employed. The procedure of developing a FIS using the framework is called adaptive neurofuzzy inference system (ANFIS).

INPUT

Knowledge Base database Fuzzification interface decision making unit rule base OUTPUT

defuzzification interface

Fig. 1: Fuzzy inference system

3.1

Adaptive Neuro-Fuzzy Inference System (ANFIS)

The selection of a FIS is the major concern while designing an ANFIS to model a specific target system. Various types of FIS are reported in the literature [21,22,23] and each is

characterized by their consequent parameters only. The current work used a Takagi-SugenoKang fuzzy (TSK) inference system [23] since the conclusion of a fuzzy rule is constituted by a weighted linear combination, and parameters can be estimated by a simple least squares error method.

2012 JCSE www.Journalcse.co.uk

JOURNAL OF COMPUTER SCIENCE AND ENGINEERING, VOLUME 15, ISSUE 2, OCTOBER 2012

54

Fig .2 The general ANFIS architecture

Consider that the FIS has two inputs x1 and x2 and one output y. Fig.2 shows an ANFIS architecture when each input (x1 and x2 ) is assigned two membership functions. For the first order TSK model, a typical rule set with two fuzzy if-then rules can be expressed as:
Rule 1 : IF ( x1 is A1 ) AND ( x2 is B1 ), THEN f1 p1 x1 q1 x2 r1
Rule 2 : IF ( x1 is A2 ) AND ( x2 is B2 ), THEN f1 p2 x1 q2 x2 r2

(1)

where x1(or x2) is the input to the node i; Ai(or Bi) is a linguistic fuzzy set associated with this 2 node. O1,iis the membership functions (MFs) grade of a fuzzy set and it specifies the degree to which the given input x1(or x2) satisfies the quantifier. MFs can be functions that are Gaussian, generalized bell shaped, triangular and trapezoidal shaped functions. A generalized bell shaped function can be selected within this MFs and it is described as:
Ai ( X 1 )
1 X ci 1 1 ai
2bi

(2)

(4)

where A1, A2and B1, B2are the membership functions for the input x1and x2 respectively.p1, q1, r1and p2, q2, r2are the parameters of the output function. The functioning of the ANFIS is as follows [24,25] Layer 1: Calculate Membership Value for Premise Parameter Every node in this layer produces membership grades of an input parameter. The node output

where ai, bi, ci are the parameter sets which changes the shapes of the membership function degree with maximum value equal to 1 and minimum value equal to 0. Layer 2: Firing Strength of Rule Every node in this layer, labeled , whose output is the product of all incoming signals:
O2,i wi Ai ( x1 ) Bi ( x1 ) for i 1,2

Ol , i Ai ( x1 ) for i 1, 2 or Ol , i Bi 2 ( x1 ) for i 3, 4

(5)

(3)

2012 JCSE www.Journalcse.co.uk

JOURNAL OF COMPUTER SCIENCE AND ENGINEERING, VOLUME 15, ISSUE 2, OCTOBER 2012

55

Layer 3: Normalize Firing Strength th The i node of this layer, labeled N, calculates the normalized firing strength as, _ Wi O2,i W i i 1, 2 (6) w1 w2 Layer 4: Consequent Parameters Every node i in this layer is an adaptive node with a node function,

O4,1 W i f i W ( pi x1 qi x 2 ri )

(7)

where i is the normalized weighting factor of the th th iw rule, fi is the output of the i rule and pi, qi and riare the consequent parameter sets. Layer 5: Overall Output The single node in this layer is a fixed node labeled , which computes the overall output as the summation of all incoming signals:

It starts with initial MFs, in terms of type and number, and the rule base that can be designed intuitively. ANFIS applies a hybrid learning method for updating the FIS parameters. It utilizes the gradient descent approach to finetune the premise parameters that define MFs. It applies the least-squares method to identify the consequent parameters that define the coefficients of each output equation in the Sugeno-type fuzzy rule base. The training process continues till the desired number of training steps (epochs) or the desired root mean square error (RMSE) between the desired and the generated output is achieved. In addition to the training data, the validation data are also optionally used for checking the generalization capability of FIS. 4.0 SHORT TERM LOAD FORECASTING WITH ANFIS

Overall output O5,i

W
_ i

fi

Wf W
i i i

i i

(8)

ANFIS requires a training data set of desired input/output pair (x1, x2xm, y) depicting the target system to be modeled. ANFIS adaptively maps the inputs (x1, x2xm) to the outputs (y) through MFs, the rule base and the related parameters emulating the given training data set.

Datasets for power load consumption measured hourly for weeks were obtained for different seasons of the year. Fig. 3 shows a sample plot of a data series. The power demand shows some fluctuation during each day, depicting that the demand during weekends is different from workdays. For a good prediction of load series, building of a model must take into account the monthly and seasonal variations as well as various factors affecting the load such as weather fluctuation.

2012 JCSE www.Journalcse.co.uk

JOURNAL OF COMPUTER SCIENCE AND ENGINEERING, VOLUME 15, ISSUE 2, OCTOBER 2012

56

Fig.3: Load data measured hourly for a week In order to model the weekly data series, we use an ANFIS network with six inputs and one output as shown in Fig. 4. The inputs are directly extracted from the normalized weekly data series y(t) such that:

Input [ y (t 1), y (t 2), y(t 3), y(t 4) y (t 5), y(t 6)] Output [ y(t )]

Fig.4: Schematic structure of the ANFIS network

2012 JCSE www.Journalcse.co.uk

JOURNAL OF COMPUTER SCIENCE AND ENGINEERING, VOLUME 15, ISSUE 2, OCTOBER 2012

57

Fig.5: Fan-out diagram of the ANFIS network Fig. 5 shows the fan-out diagram of the ANFIS network model. Datasets were selected and grouped into training, testing and checking data sets. Each data sets consists of 160 input/output pairs. Figure 6 below show the training data sets.

Fig.7: Training error Fig.6: Training data set The ANFIS network was trained for various numbers of epochs, with loaded training dataset. Fig. 7,show the error value as the training proceeds. The error value reduces as the number of epoches increases.The trained network is then tested with testing data sets. The result of the testing is shown in Fig. 8. It confirms the acceptability of the ANFIS model as suitable for
2012 JCSE www.Journalcse.co.uk

JOURNAL OF COMPUTER SCIENCE AND ENGINEERING, VOLUME 15, ISSUE 2, OCTOBER 2012

58

short term load forecasting at hourly rate. Fig. 9 shows the final input membership function combination rules used by the trained network.The final membership function for each output is shown in Fig. 10. Fig. 11,shows a 3-D surface

5.0 Conclusion. In this sudy, we have built a short term electric load consumption forecasting model using Adaptive NeurofuzzyInference System (ANFIS). The obtained model has been tested with testing and checking data sets and the results has proven the acceptability of the model for hourly forecasts. The model needs to be tested on-line and tuned to seasonal and weather conditions.

Fig.8: Result of test on the trained network visualization of the membership function combination rules between some inputs.

Fig.9: Rules for the trained network.

2012 JCSE www.Journalcse.co.uk

JOURNAL OF COMPUTER SCIENCE AND ENGINEERING, VOLUME 15, ISSUE 2, OCTOBER 2012

59

Fig. 10: Membership functions of the trained network


2012 JCSE www.Journalcse.co.uk

JOURNAL OF COMPUTER SCIENCE AND ENGINEERING, VOLUME 15, ISSUE 2, OCTOBER 2012

60

Fig. 11: Rule surfaces

References [1] Gross, G. and Galiana, F.D.,(1987), Short term load forecasting. Proceedings of the IEEE,Vol.75, pp1558-1573. [2] Srinivasan,D. and Lee, M.A., (1995), Survey of hybrid fuzzy approaches to electric load forecasting.Proceedings of the IEEE international conference on systems, Man and

cybernetics, Vol. 5, Vancouver, BC, pp 40044008. [3] Bunn,D.W. and Farmer,E.D., (1985), Review of Short-term forecasting methods in the ElectricPower Industry (New York Wiley), pp 13-30. [4] Haida, T., and Muto,S., (1994), Regression based peak load forecasting using a transformationtechnique. IEEE Transactions on Power System, Vol.9, pp1788-1794.

2012 JCSE www.Journalcse.co.uk

JOURNAL OF COMPUTER SCIENCE AND ENGINEERING, VOLUME 15, ISSUE 2, OCTOBER 2012

61

[5] Lee, K.Y., Chat, Y.T. and Park, J.A. (1992), Short term load forecasting using an artificial neuralnetwork. IEEE Transactions on Power System, volume 7 No 1, PP 124 132 [6] Charturvedi, D.K.; Mohan, M,; Singh, R.K. and Kalra P.K. (2004). Improved generalized neuronmodel for short term load forecasting. International Journal on soft computing.A fusionof Foundations,Methodologies and Applications. Springer-Verlag, Heidelberg, Vol. 8, No 1, PP. 10 18 [7]Espinoza, M.J.; Suykens, A.K; Belmans, R and DeMoor,B. (2007),Electric load forcasting using Kernel Based modeling for non linear system identification. IEEE control system Magazine. Pp43-57. [8] Amit,J,; Srinivas,.R.,andRauta, R (2009), Short Term lord forecasting using fuzzy Adaptiveinference and similarity. World congress on nature and Biologically inspired computing (NaBIC2009), Coimbatore India. Pp1743-1748. [9] Zargham, H; Kavehnia, F; Asakari, M. andGanbariyan,M.(2007),Time-seriesLoad Modelling andLoad forecasting using NeuroFuzzy Techniques, 9thInternational conference Electrical Power Quality and Utilisation, Barcelona 9-11 October. [10] Tang, W.K, Wong,M.H, Wong, Y.K and Chung, T.S (1998),Lord forecasting by Fuzzy neural networks inBox-Jerkins modelling, Procedure of IEEE conference on systems, man and cyberneties, Vol.2 Pp1738-1743. [11] Ku-Long, Ho,; Yuan-Yih, Hisu,; Chuan-Fu Chen,; Tzong-En,Lee,; Chih-Chien, Lian,; TsauShin, Lai,; and Kung-Keng,Chen (1990), shortterm load forecasting of Taiwan Power System using aknowledge based expert system, IEEE Transactions on Power System . Vol.5 Pp12141221. [12] Rahman, S. and Hazim, O. (1996), Load forecasting for multiple sites: Development of an expertsystem based techniques, Electric Power System Research, Vol.39. Pp161-169. [13] Rahman, S and Bhatnagar, R (1988), An expert system based algorithm for short-term loadforecast, IEEE Trans. Power System Vol.3 No.2 Pp392-399. [14] Hwan, K.J and Kim,G.W. (2001), A shortterm load forecasting expert system, proceedings

of the fifth Russian-Korean International Symposium on Science and Technology. Pp112116. [15] Desouky, A.A. and Elkateb, M.M. (2000), Hybrid adaptive techniques for electric-load forecastusing ANN and ARIMA, IEEE Proceedings of Generation, Transmission and Distribution , Vol.147, No.4 Pp213-217. [16] Hippert, H.S,; Pedreira, C.E and Souza, R.C, (2001), Neural networks for short term loadforecasting: A review and evaluation, IEEE Transaction Power system. Vol.6 No.1 Pp44-55. [17] EL-Naggar,K.M and AL-Rumal, K.A (2005),Electric load forecasting using genetic basedalgorithm, optimal filter estimator and least error squares technique: Comparative Study. Transactions on Engineering computing and Technology Vol.6, 138-142. [18] Haque, M.T and Kashtiban, A.M. (2005), Application of neural networks in power systems: A review Transactions on Engineering computing and Technology Journal. Vol6.Pp5357. [19] Feinberg, E.A and Genelthliou, D (2006), Load forecasting: chapter12, Available from http://www.ams.sunysb.edu. [20] Brown, M. and Harris, C (1994), Neurofuzzy Adaptive modelling and control, Holden Day, Oakland, Calif. [21] Mamdani, E.h and Assilian, S (1975), An experiment in linguistic synthesis with a fuzzy logiccontroller, International Journal of Manufacturing studies, Vol.7,No.1. pp1-13 [22] Tsukamoto, Y.(1979),An approach to fuzzy reasoning method, in Advances in fuzzy set Theory and Application, in ( M.M. Gupta, R.K. Ragade and R.R. Yager); North-Holand, New York. PP137-149. [23] Takagi, Tand Sugeno,M (1985),Fuzzy Identification of Systems and Its application to Modellingand Control, IEEE Transactions On System Man Cybernetics Vol15. No.1 Pp 116132 [24] Jang, J.S.R. (1993), ANFIS: Adaptive network based fuzzy inference system, IEEE Transactions on System Man Cybernetics, Vol.23 No.3 Pp 665-685 [25] Jang, J.S.R and Sun, C.T (1995), Neurofuzzy Modelling and Control, Proceedings of the IEEE, Vol. 83, No.3, Pp378-406

2012 JCSE www.Journalcse.co.uk

JOURNAL OF COMPUTER SCIENCE AND ENGINEERING, VOLUME 15, ISSUE 2, OCTOBER 2012

62

AUTHORS PROFILE

Oyedoja, K.O. received is B.Eng., M.Eng., in Electrical Engineering from University of Ilorin, Nigeria, Msc in Industrial and Production Engineering from University of Ibadan, Nigeria, respectively. At present, he is with the Department of Technical Education, EACOED, Oyo, Oyo State, Nigeria and working towards his Ph.D. His research interests are Artificial intelligent, Digital signal Processing, Neural Network, fuzzy logic, Matlab, etc. Olanloye, D.O. received is B.sc in Computer Science from University of Agriculture,Abeokuta and Msc in Computer Science from Nnabiazkwe University,Akwa respectively. At present, he is with the Department of Computer Science, EACOED, Oyo, Oyo State, Nigeria and working towards his PhD. His research interests are Artificial intelligent, Neural Network, fuzzy logic, Matlab, etc. Obiyemi O.O. received the B.Eng. and M.Eng. Degrees in Electrical Engineering from the University of Ilorin, Nigeria in 2006 and 2010 respectively. He joined the Department of Electrical and Electronic Engineering, Osun State University in 2010 and He is currently working towards the Ph.D degree from the Department of Electrical and Electronic Engineering, University of Ilorin, Nigeria.

2012 JCSE www.Journalcse.co.uk