Sie sind auf Seite 1von 6

International Journal of Computer Information Systems, Vol. 3, No.

3, 2011

Comparison of ANFIS and Curve Fitting Model for Prediction of Monsoonal Precipitation
Priti Singla, Dharminder Kumar, H M Rai and Sanjay Singla
AbstractThis paper presents a comparative study of adaptive Neuro Fuzzy Technique and statistical curve fitting to forecast monsoonal precipitation at Hisar, Haryana, India. Daily data of 40 years(Jan 1970-Dec 2010) is taken as research data that comprises of the input data as Maximum Temperature , Minimum Temperature, Average vapor pressure, Relative Humidity, Wind Speed, Bright Sun Shine Hours, Pan Evaporation, and a single output Precipitation(mm). Different models are studied for different training, checking and testing data set to forecast the monsoonal precipitation at hisar. Result shows that ANFIS model is much more effective to use with root mean squared error 8.70836e-006 as compared to curve fitting model with root mean squared error 3.394 e-001. However the confidence level achieved for ANFIS Model is 95% approximately.

period coinciding with the growing season of rabi crops. Each phase of agricultural activity from preparatory tillage to plant growth, harvest and storage is influenced by weather elements (Rainfall, temperature, humidity, sunshine & radiation and wind etc) directly or indirectly. The healthy growth and yield of crops depend upon certain optimum conditions of weather. 1.1 Area Under Study Hisar, the west central most district of Haryana, is located between 280 59 to 290 49 N latitude; 750 11 to 76 0 18 E Longitude with elevation ranging between 200-215 m above MSL.

Index Terms ANFIS, Average Vapor Pressure, Monsoonal Precipitation, Pan Evaporation, Statistical Curve Fitting. 1. INTRODUCTION

griculture is highly dependent on weather all over the world but is more dependent in tropical monsoon country like India. Several technologies have been developed to provide valuable information to farmers to get the maximum benefit. Rainfall in India is dependent in differing degrees on the Southwest (SW) and Northeast monsoons, on shallow cyclonic depressions and disturbances and on violent local storms which form regions where cool humid winds of the sea meet hot dry winds from the land. Most of the rainfall in India takes place under the influence of Southwest monsoon (SWM) between June to September. Amount of annual Rainfall in Haryana ranges between below 400 mm (south-western parts) to 1200 mm (northern parts-Shivalik foothills) with 25 to 45 per cent coefficient of variation. Above 80 per cent of this rainfall is received during monsoon season (July to September) which coincides with the growing season of Kharif crops. On an average around 300 mm of rains are received during this period in the south-western (SW) region and above 750 mm in the northern most region with coefficient of variation ranging between 45 to 55 per cent. Only 10 to 15 per cent of the annual rainfall is received during October to March
Priti Singla is Ph D Scholar in Suresh Gyan Vihar University, Jaipur, India. (pritisingla04@gmail.com) Prof. Dharminder Kumar is in department of Computer Science & Engg, GJUST, Hisar, Haryana, India (dr_dk_kumar_02@yahoo.com) H M Rai is with N C College of Engineering, Isarana, Panipat, Haryana, India. (hmrai1943@gmail.com)). Sanjay Singla is with Om Institute of Technology & Management, Hisar, Haryana, India. (phone: +919729376850; e-mail: san_jay23@yahoo.com).

Fig. 1: Continental location of Hisar, Haryana, India [Niwas et al. ,(2006)]. 1.2 Details about input and output parameters as climatic features of Hisar: 1. Temperature: Hisar is warmer during month of May and June and cooler during Jan, Feb. and December months. The highest mean weakly max temp was 40.90C on 22nd Standard Meteorological Week (SMW), whereas lowest mean weekly max temp was 19.50C on 2ndSMW. Highest mean weekly min temp was 26.7 0C on 29thSMW and lowest mean weekly min temp was 4.40C on 2nd SMW. 2. Humidity: Range of Relative humidity varies from 5 to 100 per cent at Hisar. The driest months of the year are April and May since the lowest relative humidity is recorded during this period. It increases with the onset of monsoon which normally occur in the first week of July and decreases with the withdrawal of monsoon after midSeptember. During winter months, relative humidity remains significantly high.
ISSN 2229 5208

Special Issue

Page 18 of 69

International Journal of Computer Information Systems, Vol. 3, No. 3, 2011 3. Pan Evaporation: During the summer months Pan Evaporation is above 12 mm/day. While in rainy and winter seasons, average value of Pan Evaporation is lowest around 6.8 and 4.0 mm/day, respectively. 4. Rainfall: Average yearly value of Rainfall at hisar is 455mm with 27 rainy days(A day which has rain >= 2.5 mm).The average span of SW monsoon season extended around 70 days with shortest span of 37 days(1999) and longest 97 days (2008) [Singh et al. , (2010)] 2. DATA ANALYSIS We are considering the variables MAX TEMP C, MIN TEMP C, Average Vapor Pressure (mm)M, RH(%), Bright Sunshine Hours, Pan Evaporation (mm) as input variables and Local Monsoonal Precipitation (mm) as output variable which depends upon input variables. The data of every year South West monsoon seasons i.e. the time from onset till withdrawal of monsoon which generally occurs from June to September of every year from 1970-2010. We consider this input and output variable as raw data shown in table 1. In order to make it normalized so that each value comes under the range of [0,1] we will use standard normalization function which is
Temp 0.984357 0.909091 0.937131 0.703955 0.66706 0.850059 0.698052 0.317296 0.200708 0.342385 0.571133 0.306966 0.50915 0.413223 0.714286 1.00059 0.457497 0.633117 0.709858 0.574085 0.630165 0.320248 0.550472 0.579988 0.485537 Vapor Pressure 10.52857 12.22857 12.97143 11.65714 12.2 9.2 11.42857 11.71429 10.8 18.63571 17.54286 16.57857 14.22857 20.37143 21.84286 21.52857 21.59286 23.22857 19.57143 30.28571 23.71429 29.42857 33 20.71429 32.42857 19.42857 26 3.314286 2.971429 2.757143 3.8 6.171429 5.614286 7.528571 6.933333 7.814286 70 0.5 20 0 55 3.3 44.3 46.3 0

Table 2: Sample Normalized Data


Vapor pressure 0.384983 0.319889 0.518302 0.548971 0.795579 0.718592 0.711081 1.00025 0.873817 0.71734 0.717966 0.821867 0.780557 0.942041 0.831255 0.331155 0.386235 0.290471 0.205974 5.01E-05 0.538331 0.667268 0.639728 0.645361 0.788694 Rel Humid 0.994501 0.983393 0.76122 0.59459 0.683459 0.694568 0.772328 0.305765 0.216896 0.527938 0.750111 0.827872 0.455732 0.477949 0.672351 1.000056 0.416852 0.833426 0.577927 0.8001 0.938958 0.461286 0.916741 0.411297 0.666796 Pan Evap 0.394906 0.49576 0.582409 0.697467 0.31678 0.667637 0.544056 0.34732 0.095186 0.309678 0.194619 0.134959 0.261382 0.174733 0.258541 0.279848 0.055413 0.021321 1.42E-05 0.103709 0.339508 0.284109 0.474453 0.415266 0.502862 Precipitation 0.679545 0.386364 0 0 0.0875 0.003409 0.215909 0.473864 0.25 0.059091 0.443182 0.723864 0 0.005682 0 0.215909 0.795455 0.005682 0.227273 0 0.625 0.0375 0.503409 0.526136 0

norm( xi )

Where norm (xi) is normalized value of variable xi Min is the minimum value of xi for all i. Max is the maximum value of xi for all i. This normalized data, shown in table 2, is separated according to Standard Meteorological Week (SMW) and is collected to divide into three parts as follows: 1. Training Data Set (24 years) 60% 2. Checking Data Set to avoid model over fitting(8 years) 20% 3. Testing data Set (8 years ) 20% This data is uploaded and a Fuzzy inference system is created in ANFIS editor (MatLab) to predict Local Monsoonal Precipitation (mm). Table 1: Sample Raw Data
Rel Humid 34.42857 34.14286 28.42857 24.14286 26.42857 26.71429 28.71429 16.71429 14.42857 22.42857 28.14286 30.14286 20.57143 21.14286 26.14286 34.57143 Pan Evap 6.728571 7.742857 8.614286 9.771429 5.942857 9.471429 8.228571 6.25 3.714286 5.871429 4.714286 4.114286 5.385714 4.514286 5.357143 5.571429 Precipitation 59.8 34 0 0 7.7 0.3 19 41.7 22 5.2 39 63.7 0 0.5 0 19

xi min max min

Temp 15.62857 14.9 15.17143 12.91429 12.55714 14.32857 12.85714 9.171429 8.042857 9.414286 11.62857 9.071429 11.02857 10.1 13.01429 15.78571

18.62143 17.87857 20.14286 20.49286 23.30714 22.42857 22.34286 25.64286 24.2 22.41429 22.42143 23.60714 23.13571 24.97857 23.71429 18.00714

3. METHODOLOGY The proposed analysis is based on ANFIS model applied on 40 years of meteorological data of Hisar which contains MAX TEMP C, MIN TEMP C, Average Vapor Pressure (mm)M, RH(%), Bright Sunshine Hours, Pan Evaporation (mm) and Local Monsoonal Precipitation (mm). We will first load the input data in ANFIS editor using Matlab and predict rainfall and then using various curve fitting model we will numerically compare the results. General Frame work of proposed study is shown in figure 2. 3.1 Architecture of fuzzy inference system In order to understand what ANFIS model actually is, we will consider a Fuzzy Inference System with two input x,y

Special Issue

Page 19 of 69

ISSN 2229 5208

International Journal of Computer Information Systems, Vol. 3, No. 3, 2011


Start

Setting ANFIS Editor

Model Over fitting Test Setting Phase

Input Desired Epoch No. Training of Fuzzy Inference System Input Testing Data Testing Data Analysis

Fig. 3. A two-rule two-input fuzzy inference System [Jang , (1993)]

Numerical Output and Comparison

Fig..2: General Framework of Proposed Study and a single output z. we also assume that there are two fuzzy if-then rules which are: Rule 1: if x is A1 and y is B1 then f 1 p1x q1 y r1 Rule 2: if x is A2 and y is B2 then
f2 p2 x q2 y r2
x

Layer 1

Layer 2

Layer 3

Layer 4

Layer 5

x y
A1

w1

A2

w1
w1

When The overall output is the weighted average of each rules crisp output induced by the rules firing strength (minimum of the degrees of match with the premise part) and output membership functions then the model is called Tsukamoto Fuzzy Model (Tsukamoto, 1979). If overall fuzzy output is derived by applying max operation to the qualified fuzzy outputs (each of which is equal to the minimum of firing strength and the output membership function of each rule) then it becomes Mamdani Fuzzy Model. Various schemes have been proposed to choose the final crisp output based on the overall fuzzy output; some of them are centroid of area, bisector of area, mean of maxima, maximum criterion, etc (Lee, 1990). Takagi and Sugenos fuzzy if-then rules are used when the output of each rule is a linear combination of input variables plus a constant term, and the final output is the weighted average of each rules output (Jang, 1993). In our experiment, we one single output which can be taken as lenear combination of input parameters therefore in our proposed study we will use Type 3 of fuzzy inference System i.e. Takagi and Sugenos fuzzy Model which is nothing but ANFIS model (Figure 3). 3.2 Adaptive network based fuzzy inference system (ANFIS) ANFIS implements a Takagi Sugeno fuzzy inference system and it has five layers as shown in Figure 4. Layer 1: Every node in this layer O1,i , (i 1, 4) is membership degree of
Ai , (i 1, 2) and Bi 2 , (i 3, 4)
.

B1

y
B2

N w2

w2
w1 x y

Fig. 4. ANFIS Architecture [Sugeno et al. ,(1988)] Layer 3: Its nodes O3, i are represented by N, Normalized Firing Strength. Layer 4: its nodes O4, i are calculated as:
O4,i wi . fi

Where wi is normalized firing strength from layer 3. And the set {pi, qi , ri } is Lenaer parameter set called consequent parameter of this adaptive node. Layer 5: This is a single node layer . Overall Output:
f O5,1 wi . fi i wi . fi i wi i

and it

gives the degree to which x (or Y) satisfy A1 , A2 (orB1 , B2 ) . Layer2: Its nodes O2, i are represented by output represents the firing strength of a rule. Each node

This Adaptive network is equivalent to Sugeno Fuzzy Model. To find the values of non- linear premises parameters {a, b, c} and linear consequences parameter {pi, qi , ri } we will use various Hybrid Learning Algorithms. The hybrid optimization method is a combination of leastsquares and back-propagation gradient descent method. Hybrid Learning Algorithms are different way of hybridization of SD or GD and LSE. We will choose any of
ISSN 2229 5208

Special Issue

Page 20 of 69

International Journal of Computer Information Systems, Vol. 3, No. 3, 2011 them according to the available computing data and performance level required. In Hybridization of SD and LSE, We will first distinguish lenear and non linear parameters and then each iteration of SD we update non lenear parameters {a, b, c}, Followed by LSE to identify lenear parameters {p, q, r}. 3.3. Statistical curve fitting methods Statistical methods are those methods that use observations from past looking for repetitions of same patterns in the future. Let us consider the output variable, the variable to be forecasted i.e. Precipitation be represented by a single column vector Y and the set of input variables temperature (dry-wet), Vapor pressure, Relative Humidity, Pan Evaporation (mm) etc be represented by a multidimensional vector X where X=(X1, X2, X3, , Xn) where n is the total number of input variables. We can always find a relation between X and Y variables like [Bogenschutz et al.]: Y= D + C1 x1+C2x2+ C3 X3 +.+Cn Xn Where C1, C2, C3,, Cn and D all are constants.(may be negative or zero). In this study, we will make use of matlab tool to fit and plot a multidimensional surface on the same data (Table 3) used to forecast precipitation by ANFIS model. 4. EXPERIMENT AND ANALYSIS 4.1. ANFIS Setup According to tools and format available in MatLab we will setup a network in Anfis editor in mainly two stages Sugeno ANFIS Setup and Training of ANFIS Model 4.1.1. SUGENO ANFIS setup model To design a network using ANFIS editor, we will first load input data shown in table 3 in ANFIS editor separated as training, checking and testing data set. Then we generate FIS using Grid partitioning method. ANFIS information is: No. of input 4 No. of output 1 No. of input mfs: 5 3 3 5 Architecture of ANFIS network ( 5 3 3 5 1 ) designed is shown in figure 5. 4.1.2. TraIning of anfis model Training of ANFIS model is done using hybrid optimization method with error tolerance level 0.00001 for 40 epochs (figure 6). Once the training is done, our ANFIS model is always ready for the prediction. During this training, ANFIS will learn the whole pattern among different input in various year and within each year itself. RMSE with 0.0001 error tolerance and 40 epochs is 8.70836e-006 Input output surface view with sample input [NaN NaN 0.26 0.12] is shown in figure 7, Where Nan is the value that varies according to the variable which is plotted as input. Finally, the model is plotted against testing data set and the graph shown in figure 8 that compares between Predicted FIS output and Testing Data Set.
Special Issue

Figure 5: Architecture of ANFIS network ( 5 3 3 5 1)

Fig. 6. Training of ANFIS Hybrid model with 40 epochs

Fig. 7. Surface View with Reference input: [NaN NaN 0.5002 0.5]

Page 21 of 69

ISSN 2229 5208

International Journal of Computer Information Systems, Vol. 3, No. 3, 2011

Fig. 8. Comparison of Predicted and Observed Value Figure 9: Default Output, Lenear Model 4.2 CURVE FITTING In MatLab, to fit a multidimensional surface the command available is rstool(x, y). rstool is response surface tool which fit and plot a multidimensional surface. rstool (x, y, model, alpha) is a polynomial fit to (x,y) data. Where X is multidimensional input vector, Y is single output column that contains the variable to be forecasted, The confidence level for predictions is 100(1 - alpha) %. The default value for alpha is 0.05, which produces 95% (= (100(1-0.05) %) confidence level. The default model is linear. Other model can be one of the following: Interaction it contains constants ci, linear terms xi , and their lenear cross products xi xj terms. Quadratic it can have constants ci, linear terms xi , their lenear cross products xi xj terms and squared terms xi2. Pure quadratic - it includes constants ci, linear terms xi, and squared terms xi2. In our Experiment, we have first loaded the input data as X vector (4 x n) whose first column is the data of TEMP C , second column Average Vapor Pressure (mm), third column is Relative Humidity (%) and forth column is Pan Evaporation (mm) and the output is loaded as Y, a column matrix containing the data of Local Monsoonal Precipitation (mm) . List of input and output vector is given in table 4. Then we plot a multidimensional surface using the command rstool(x, y) and set the model as lenear (shown in fig. 9), Pure Quadratic (fig. 10), Full Quadratic (fig 11), Interaction (fig 12) and got the following results (Table 5). X1 X2 X3 X4 Y1 Table 3: List of Input Variables TEMP C AVP(mm) RH(%) Pan Evaporation (mm) Local Monsoonal Precipitation (mm)

Figure 10: Pure Quadtratic model

Figure 11: Full quadtraic model

Table 4: Results of Multi Dimensional Surface Plot Model Output deviation Lenear .10491 Pure Quadratic .24476 Full quadratic .34646 Interaction .20094

Figure 12: Interactive Model We can observe that that Output deviations in the predicted rainfall, is lowest in lenear model as compare to other models, Therefore we will select linear model. And got the curve fitted as below:
ISSN 2229 5208

Special Issue

Page 22 of 69

International Journal of Computer Information Systems, Vol. 3, No. 3, 2011


y 0.80021 0.059745 x1 0.15918 x2 0.27851x3 0.50302 x4 .

However, RMSE in this plot is 0.33939. 5. CONCLUSION In this study, we apply Adaptive Neuro Fuzzy Inference System (ANFIS) for Local Monsoonal Precipitation prediction in Hisar using input data of relative humidity, temperature, pressure and rainfall. Moreover, we use the statistical curve fitting method to predict monsoonal rainfall using various models like lenear, quadratic and interactive models described in later sections. Limitation of this study is that it can predict a multivariate analysis in which we have a single output whose membership function is either lenear or constant. ANFIS is relatively new in Hisar to predict Monsoonal Precipitation as most of the researchers use various statistical and probabilistic method t find the distribution if rainfall using meteorological data. The aims of this paper is to present a comparative study of these statistical method and hybridization of neuro fuzzy methods.. The results shows that applications of multivariate Adaptive Neuro Fuzzy Inference System (ANFIS) provide better results with root mean squared error 8.70836e-006 as compared to curve fitting model with root mean squared error 3.394 e-001. 6. REFERENCE [1] R. Niwas, S. Singh and D. Singh, A text book on Agriculture meteorology, 2006 [2] J. Eitzinger, S. Singh and D. Singh, Impact of climate change and variability on agriculture- Experience from Europe and India, Journal of Agro meteorology, 11(special issue), pp. 24-32, 2009. [3] S. Singh, D. Singh, Shekhar and C. Rao, Agro climatic Features of Hisar Region, Technical Bulletin # 18, Dept. of Agril Meteorology, CCS HAU Hisar, pp 6-10, 2010. [4] J S T Jang, C. T. Sun and E. Mizutani, Neuro Fuzzy and Soft Computing, Prentice Hall International, Inc., chapter 12 , pp 335-368, 2004. [5] J S R Jang, ANFIS: Adaptive-Network-Based Fuzzy Inference System, IEEE Transactions on Systems, Man and Cybernetics, 23 (3), pp. 665-685, 1993. [6] Sivarao, Peter Brevern, N. S. M. El-Tayeb and V. C. Vengkatesh. GUI Based ANFIS Modelling: BackPropagation Optimization Method for CO2 Laser Machining, International Journal of Intelligent Information Technology Application, 2940, 191-198, 2009. [7] Mathworks MATLAB Fuzzy Logic Tool Box, version 2.2.12, Sep. 2010. [8] C. C. Lee, Fuzzy logic in control systems: fuzzy logic controller. Part I, IEEE Transaction of System, Man and Cybernetics 20, 2, pp. 404418, 1990. [9] Gholam Abbas, F. G., M. Mousavi and M H Nokhandan, Annual Rainfall Forecasting by usin Mamdani Fuzzy Inference System, Research Journal of Environmental Sciences, 3 (4), pp. 400-413, 2009. [10] M. Sugeno, G.T. Kang, Structure identification of
Special Issue

fuzzy model, Fuzzy sets and systems, 28, pp. 15-33, 1988. [11] C.T. Sun, Rule base structure identification in an adaptive network based fuzzy inference system, IEEE transactions on fuzzy Systems, 2(1), pp. 64-73, 1994. [12] Y. Tsukamoto, T. Takagi and M. Sugeno, Fuzzification of LAleph1 and its application to control, in Proceedings of the IEEE International Conference on Cybernetics and Society, Tokyo, 1978 [13] P. A. Bogenschutz, S. K. Krueger and K Khairoutdinov, Assumed Probability Density Functions for Shallow and Deep Convection, Journal of Advance Model Earth Systems, 2(10). BIOGRAPHIES Priti Singla was born on 4th October, 1977. She has done M.SC. Applied Mathematics (Gold Medalist) from Guru Jambheshwar University of Science and Technology in 1999 and M.Tech (CSE) in 2005. She is pursuing Ph.D. under Title Soft computing approach for meteorological weather forecasting under the able guidance of Dr. H.M. Rai. Her area of interest is Operation Research, Statistics, Numerical Methods, Fuzzy Systems, Discrete Mathematics etc. Prof. Dharminder Kumar received his Ph.D in the area of Computer Science in Computer Networks. He is recipient of Gold Medal at his Masters degree. Currently he is heading the Faculty of Engineering and Technology as Dean and also the department of Computer Science & Engineering as Chairman, GJUST, Hisar, India. He has been engaged in teaching & research since last 22 years. H.M.Rai was born on 1st August, 1943. He received the B.Sc. Engg. (Electrical), from Punjab University in 1963. M.E. from University of Roorkee in 1966 and PhD from Regional Engineering College, Kurukshetra University in 1992. He joined as lecturer in REC,Kurukshetra in 1966. From there he retired as Professor in 2003. He has published a number of Technical papers and Text Books. His area of interest is Electrical Drives, Management Technology, Energy Systems, Instrumentation and control. At present he is Professor at NCCE Israna, Panipat. Sanjay Singla was born on 24th February 1978. He is M.Tech (CSE), Ph.D. (CSE) Pursuing in Automatic generation of software test cases using Soft computing. His area of interest is Software Engineering, DBMS, Operating Systems, and Programming Languages etc. Presently he is Associate Professor and Head, Om Institute of Technology & Management , Hisar.

Page 23 of 69

ISSN 2229 5208

Das könnte Ihnen auch gefallen