INTRODUCTION
Flood forecasting is one of the most important tasks of the reservoirs management systems. The magnitude of economic losses associated with floods highlights the importance of flood management. An efficient flood alarm system may significantly improve public safety and mitigate economical damages caused by inundations. Flood forecasting is undoubtedly a challenging field of operational hydrology and a huge literature has been developed in years (Xiong et al., 2001; Gopakumar and James, 2002; Chau et al., 2005; Tayfur and Singh, 2006); in particular, the rainfallrunoff relationship has been recognized to be nonlinear. Although conceptual models allow a deep understanding of the hydrological processes, their calibration requires to collect a great amount of information regarding the physical properties of the watershed under study (for example, characteristics of terrain and river networks, rainfall and runoff), which may be expensive and very time consuming. Sophisticated physical models may not be ideal for realtime forecasting due to the huge data requirement and the associated long computation time for model calibration. Since flood warning systems do not aim at providing an explicit knowledge of the rainfallrunoff process and the main concern is making accurate and timely predictions at appropriate locations, a simple blackbox model is then preferred for identifying a direct mapping between inputs and outputs (Corani and Guariso, 2004). Furthermore, the inherently nonlinear relationships between input and output variables complicate attempts to forecast stream flow events. There is thus a need for improvement in forecasting techniques.
In recent years, many nonlinear approaches, such as the artificial neural networks,
fuzzy logic and genetic algorithm approaches have been used in solving flood
forecasting problems. Over the last decades, Artificial Neural Networks (ANNs)
have been increasingly used in hydrological forecasting (Maier and Dandy, 2000);
furthermore, their computational speed in simulating and forecasting is very
welcomed in real time operations. Dawson and Wilby (1998) discussed the application
of ANNs to flow forecasting in two floodprone catchments in England using hourly
hydrometric data. Liong et al. (2000) achieved to get a high degree
of accuracy with ANNs for river stage forecasting in Bangladesh. Ni and Xue
(2003) established an ANN model based on RadialBasisFunction (RBF) for flood
risk ranking at five safety polders in Yangtze River, China. Bhattacharya and
Solomatine (2005) built water leveldischarge relationship models with an ANN
and a M5 model tree on the river Bhagirathi in India. Based on casual meteorological
parameters, Ahmad and Simonovic (2005) applied ANNs for predicting the peak
flow, timing and shape of runoff hydrograph for the Red River in Manitoba, Canada.
Chau (2006) adopted a particle swarm optimization model to train an ANN model
to predict water levels in Shing Mun River of Hong Kong with different lead
times on the basis of upstream gauging stations. Tareghian and Kashefipour (2006)
developed an ANN model to forecast daily runoff for Karoon River in Iran. Dawson
et al. (2006) used ANNs to predict Tyear flood events and the index
flood for 850 catchments across the UK. Wu and Chau (2006) employed a genetic
algorithm based Artificial Neural Network (ANNGA) for flood forecasting in
a channel reach of the Yangtze River in China. Pang et al. (2007) developed
a Nonlinear Perturbation Model (NLPM) based on ANN, defined as NLPMANN, for
the purpose of improving the rainfallrunoff forecasting efficiency and accuracy.
Chang et al. (2007) presented a systematic investigation of the three
common types of ANNs for MultiStepAhead (MSA) flood forecasting for two watersheds
in Taiwan.
Since Zadeh (1965) publication regarding an extension of the classical fuzzy
set theory, the fuzzy method has been widely used in many fields of applications,
such as pattern recognition, data analysis, system control, etc. (Kruse et
al., 1994; Klir et al., 1997; Theodoridis and Koutroumbas, 1999).
Hundecha et al. (2001) demonstrated that a Fuzzy Logic (FL) approach
could be used to simulate actual component hydrologic processes in areas where
sufficient data were available to model these processes physically. Ozelkan
and Duckstein (2001) proposed a fuzzy conceptual rainfallrunoff framework to
deal with parameter uncertainties of conceptual rainfallrunoff models. Cheng
et al. (2002) combined a fuzzy optimal model with a genetic algorithm
to solve multiobjective rainfallrunoff Xinanjiang model calibration in the
Shuangpai reservoir. Luchetta and Manetti (2003) used a fuzzy clustering approach
to forecast a real time hydrological model in the Padule di Fucecchio basin
in middlenorth of Italy. Mahabir et al. (2003) applied FL to forecast
seasonal runoff for the Lodge and Middle Creek basins, Canada. Blazkova and
Beven (2004) used FL to estimate flood frequency by continuous simulation of
subcatchments rainfalls and discharges for a dam site in a large catchment
in the Czech Republic. Vernieuwe et al. (2005) described the catchment’s
response to rainfall input through fuzzy relationships for Zwalm River in Belgium.
Rao and Srinivas (2006) tested a fuzzy clustering for regionalization of watersheds
with 245 gauging stations data in Indiana.
The main objective focused in this paper is to model the daily reservoir discharge inflow (e.g., flood events) using the Computation Intelligence Tools (i.e., fuzzy logic and artificial neural networks) with the results obtained from these sophisticated methods being compared with the traditional linear regression model and the corresponding measured values. From where, the suitable methods for predicting the flood peak for the short (e.g., 1day ahead) and long (e.g., 4days ahead) periods would be introduced.
Artificial Neural Network (ANN): ANNs have gained popularity in a large array of engineering applications where conventional analytical methods show inferior performance. ANNs have shown a good potential to efficiently model complex inputoutput relationships where the presence of nonlinearity and inconsistent noisy data adversely affects other approaches (Deka and Chandramouli, 2005).
ANNs have an ability to capture a relationship from given patterns and hence
this makes them suitable for employment in the solution of largescale complex
problems, such as pattern recognition, nonlinear modeling, classification, association
and control. In applications, a three layerfeed forward type of artificial
neural network is commonly considered. In a feed forward ANN, the input quantities
(x_{i}) are fed into the input layer neurons that, in turn, pass them
on to the hidden layer neurons (z_{i}) after multiplication by connection
weights (v_{ij}) (Fig. 1). A hidden layer neuron adds
up the weighted input received from each input neuron (x_{i}v_{ij})
and associates it with a bias (b_{j}) (i.e., net_{j}
= ∑x_{i}v_{ij} + b_{j}). The result (net_{j})
is then passed on through a nonlinear transfer function (activation function)
to produce an output i.e., sigmoid function; f (net_{j}) = [1/ (1+e^{netj})].
The output neurons do the same operation as does a hidden neuron. The back propagation
algorithm finds the optimal weights by minimizing a predetermined error function
(E) of the following form (ASCE Task Committee, 2000):
Where:
y_{i} 
= 
Component of a network output vector 
Y; t_{i} 
= 
Component of a target output vector 
T; n 
= 
No. of output neurons 
P 
= 
No. of training patterns 

Fig. 1: 
Schematic representation of ANN architecture 
In the back propagation algorithm, the optimal weights would generate an output
vector Y = (y_{1}, y_{2},..., y_{n}) as close as possible
to the target values of the output vector T = (t_{1}, t_{2},...,
t_{n}) with a preselected accuracy. The back propagation algorithm
employs the gradientdescent method, along with the chain rule of differentiation,
to modify the network weights as (ASCE Task Committee 2000):
Where:
v_{ij} 
= 
Weight from ith neuron in the previous layer to the jth neuron
in the current layer 
δ 
= 
Learning rate 
The network learns by adjusting the biases and weights that link its neurons.
Before training begins, a network’s weights and biases are set equal to small random values. Also, due to the nature of the sigmoid function used in the back propagation algorithm, all external input and output values before passing them into a neural network are normalized. Without standardization and normalization, large values input into an ANN would require extremely small weighting factors to be applied and this could cause a number of problems (Dawson and Wilby, 1998).
Artificial neural network contains three distinctive modes: Training, cross
validation and testing. In the training mode, the training datasets consisting
of inputoutput patterns are presented to the network. The weights are found
through an iterative process, in which the back propagation learning algorithm
is used to find the weights such that the difference between the given outputs
and the outputs computed by the network is sufficiently small. While training,
it is a usual practice that the training datasets are further subdivided into
two sets, training and cross validation sets, according to data availability.

Fig. 2: 
Schematic representation of fuzzy system 
During the training patterns, Mean Square Error (MSE) of training and cross
validation datasets are monitored together to find the optimal termination point
for training. This check avoids overtraining. After training, the network is tested with
the testing dataset to determine how accurately the network can simulate the
inputoutput relationship.
Fuzzy Logic (FL): A general fuzzy system has basically four components,
fuzzification, fuzzy rule base, fuzzy output engine and defuzzification (Fig.
2). Fuzzification converts each piece of input data to degrees of membership
by a lookup in one or more several membership functions. The key idea in fuzzy
logic, in fact, is the allowance of partial belongings of any object to different
subsets of the universal set instead of belonging to a single set completely.
Partial belonging to a set can be numerically described by a membership function, which takes on values between 0 and 1 inclusive. This intuitive approach is used rather commonly because it is simple and derived from the innate intelligence and understanding of human beings. Fuzzy membership functions may take on many forms, like triangular, trapezoidal, Gaussian and generalized bell membership functions.
The fuzzy rule base contains rules that include all possible fuzzy relations
between inputs and outputs. These rules are expressed in the IFTHEN format.
In the fuzzy approach, there are no mathematical equations and model parameters.
All the uncertainties, nonlinear relationships, or model complications are included
in the descriptive fuzzy inference procedure in the form of IFTHEN statements.
There are basically two types of rule systems, namely, Mamdani and Sugeno (Jantzen,
1999). Depending upon a problem under consideration, a user can choose the appropriate
rule system. According to the Sugeno rule system, the consequent part of the
fuzzy rule is expressed as a mathematical function of the input variable and
such a system is more appropriate for neurofuzzy systems (Sen, 1998; Jantzen,
1999). In the Mamdani rule system, however, the consequent part of the fuzzy
rule is also expressed as verbally.
The fuzzy inference engine takes into account all the fuzzy rules in the fuzzy rule base and learns how to transform a set of inputs to the corresponding outputs. To do so, it uses either min or prod activation operators. The activation of a rule is the deduction of the conclusion, possibly reduced by its firing strength. The prod activation (multiplication) scales the membership curves, thus preserving the initial shape, rather than clipping them as the min activation does.
Jantzen (1999) pointed out that both methods, in general, work well. In order
to have a good understanding of the methodology, let consider a simple case
presented in Fig. 3, where there are two input variables X
and Y (Fig. 3a, b) and one output variable
Z (Fig. 3c). For this simple system the following fuzzy rules
are assumed:
If X is low and Y is low then z is high; if X is high and Y is high then Z is low
As can be seen from Fig. 3a, X = 20 is a part of low and
high subsets with the different degrees of membership to be 0.8 and 0.2, respectively.
Similarly, Y = 30 is a part of low and high subsets with 0.4 and 0.6 degrees
of membership, respectively (Fig. 3b). The fuzzy inference
engine will consider the previous rules and by min activation find the fuzzy
output set of high from the first rule with 0.4 firing strength (this value
would be 0.32 by prod activation) and output set of low from the second rule
with 0.2 firing strength (this value would be 0.12 by prod activation) (Fig.
3c). It should be noted that inference produces not a crisp output value
but assigns whole fuzzy output subsets to the output variable (Fig.
3c).

Fig. 3: 
Schematic representation of fuzzy inferencing: (a) X = 20,
(b) Y = 30 and (c) fuzzy output sets for Z 
The next subprocess in inference is the composition subprocess where all
of the fuzzy subsets assigned to the output variable are combined together to
form a single subset for the output variable. For this purpose, there are basically
two composition methods including: Maximization (max) and summation (sum). In
max composition, the combined output fuzzy subset is constructed by taking the
pointwise maximum over all of the fuzzy subsets assigned to the output variable
by the inference rule. In sum composition, the combined output fuzzy subset
is constructed by taking the pointwise sum over all of the fuzzy subsets. Consequently,
in sum composition it is sometimes possible to obtain truth values greater than
one. Note that the sum composition must be followed by the Center of Gravity
(COG) defuzzification method (Jantzen, 1999). Figure 4a and
b present combined fuzzy output subsets derived by the max
and sum compositions for the previous example, respectively.
Defuzzification is a process by which a solution set is converted into a single crisp value. The fuzzy logic solution set is in the form of a function, relating the value of the result to the degree of membership. The entire range of possible solutions may be contained in the fuzzy solution set. Defuzzification is also a process to extract an easily comprehensible answer from the set. The Center Of Gravity (COG), Bisector Of Area (BOA), the smallest, median and largest maxima methods are some of commonly used defuzzification methods.
Study area: Data used in this study were taken from the Dez watershed,
southwest of Iran. This watershed covers about 21720 km^{2}, which lies
between longitudes 48°10 and 50°21 east and latitudes 31°34 and
34°7 north. At the end of the mountainous part of this watershed the Dez
dam is located as one of the main reservoir dams in Iran (Fig.
5).

Fig. 4: 
Schematic representation of (a) max composition and BOA defuzzification
and (b) sum composition and COG defuzzification 

Fig. 5: 
Dez dam and watershed and selected stations 
The main variable parameters affecting the discharge entering to a reservoir
dam from a watershed and suitable to use for the statistical models are usually
discharges from the tributaries of river, precipitation and evaporation. Precipitation
and evaporation data collected from the synoptic stations and discharge data
from the hydrometric stations located at the upstream of dam were used to forecast
the Dez dam reservoir inflow. For input parameters, four rain gauges, two evaporation
gauges and eight discharge gauging stations were selected from a lot of stations,
which are distributed in the Dez watershed. The Talezang gauging station data
was intended as the output data and the Dez dam reservoir inflow indication
(Fig. 5). The original data consists of 6 years (19931999),
which 1363 inputoutput pairs were intended for training set and 313 and 314
dataset were used for validation and test set, respectively.
Evaluation criteria for model performance: The performance of the predictions
resulting from training, validation and testing is evaluated by the following
measures for goodnessoffit: RMSE (root mean square error) and CC (coefficient
of correlation):
Where, subscripts m and p = measured and predicted discharge, respectively;
n = total number of data pairs considered; =
mean value of the measured and predicted data, respectively, a = a coefficient
which relates the predicted and measured values and for better model performance
this coefficient should be close to unity. RMSE furnishes a quantitative indication
of the model error in units of the variable, with the characteristic that larger
errors receive greater attention than smaller ones. The qualitative evaluation
of the model performance is made in terms of the coefficient of correlation
between the measured and simulated data.
Another important criterion of the model performance for flood forecasting is to predict the peak flood as accurate as possible. These evaluation criteria were applied to compare the considered models.
Models development and evaluation: The developed ANN and FL models were
calibrated and tested for prediction of 1 to 4days ahead reservoir inflow.
Traditionally, linear black box models of ARMAX are frequently used in time
series modeling. In discrete time, these models have a form where the model’s
response at time t depends linearly on the data points at preceding time (t1,
t2, etc.). In this study, the following model similar in concept to time series
model structure is assumed and applied for flood forecasting based on past daily
rainfall, evaporation and stream flow data. The following equation is assumed
as the main and general function for the dam discharge inflow:
where, Q_{Tal }(t+i) is the discharge in Talezang station (immediate station at the upstream
of Dez dam) at time t+i, which i is 1,2,3,4; R(t) is daily rainfall at the synoptic
stations 1 to 4 at time t. E(t) is daily evaporation at the synoptic stations
1 and 2 at time t; Q(t) is stream flow data at the hydrometric stations 1 to
8 at time t.
RESULTS AND DISCUSSION
FL model calibration and validation: In order to apply fuzzy logic to
predict reservoir inflow, a sensitivity analysis was performed for the fuzzy
logic operator AND and for the methods of implication, aggregation and defuzzification.
The results of changing a single operator or method while the rest of the model
was held constant were compared with the results from the baseline model. Based
on this sensitivity analysis, the AND operator product and the implication method
minimum were found to perform better. The model was found to be relatively less
sensitive to the method of aggregation, in that operators, maximum and summation
demonstrated the same result. The model results were most sensitive to the method
of defuzzification. The largest of maxima method produced better results than
the centroid, bisector and the median of maxima methods. Based on this, a prototype
model configuration was developed: using product for the AND operator; minimum
for the implication method; maximum for the aggregation method and the largest
of maxima method for the defuzzification method. Furthermore, 3, 4, 6 and 9
linguistic terms were applied for each input, which fuzzy logic model with 4
linguistic terms, low, median, high and very high, showed the best sequel. The
inputoutput variables were then fuzzified using different types of fuzzy membership
functions. The triangular, trapezoidal, a simple Gaussian, twosided Gaussian,
generalized bell, Sigmoidal, pi curves membership functions were applied in
this study and a simple Gaussian membership function showed the best results
which can be expressed as:
c and σ parameters must be determined during the calibration period. In
order to define the fuzzy rules, the two wellknown fuzzy inference systems,
Mamdani and TakagiSugeno were also used. The constructed FL model predicted
the reservoir inflow at 1 day ahead with 93.2 and 65.2% correlations with the
measured data using Mamdani and TakagiSugeno fuzzy inferences, respectively,
which shows the superiority of Mamdani over the TakagiSugeno fuzzy inference.
As it can be seen in Table 1, fuzzy logic models can predict
the reservoir inflow at 1 to 4dayahead with more than 87% correlations for
validation period. According to Eq. 5 the FL model generally
underestimated the flood discharges.
ANN model training and testing: For training of the ANN by the generalized data rule, dataset comprising 1363 inputs and the corresponding desired output were constructed. Two separate datasets including 313 and 314 datasets were used for model validating and testing. The ASCE Task Committee (2000) reported that ANNs are not very capable at extrapolation. Thus, in the present study, care was taken to have the training data include the highest as well as the lowest values, i.e., the two extreme input patterns.
The Alyuda Neurointeligence software was deployed and ideal network architecture
was found through a number of trial and errors. In order to train the network,
Quick Back propagation, Conjugate gradient descent, QuasiNewton, limited memory
QuasiNewton, LevenbergMarquardt, batch propagation, Incremental Back propagation
were applied and the Quick Back propagation demonstrated the best results. Training
pattern was completed with a 0.7 learning rate and 15000 iterations. Furthermore,
three activation functionslinear, sigmoid and hyperbolic tangent were used
and the sigmoid activation function, which can be expressed as the following
equation revealed the best results:
As it can be seen in Table 2, training of the ANN model was
successfully accomplished with e.g., a CC = 0.97 and RMSE = 2.45 m^{3}
sec^{–1} for prediction of 1dayahead reservoir inflow.
Table 1: 
FL model results for 1 to 4dayahead reservoir inflow 

Table 2: 
ANN model results for 1 to 4dayahead reservoir inflow 

Table 3: 
LR model results for 1 to 4dayahead reservoir inflow 

Table 2 also shows that for the long period prediction (e.g.,
3 and 4days ahead) the accuracy of the model was slightly declined. The values
of a coefficient in Table 2 show that the relationship line
between the predicted and measured values has almost coincided with the line
of (Y = X).
Linear regression model calibrating and validating: Because the basic
characteristics of the Dez watershed have remained unaltered in years, there
exists a certain correlation between the upstream and downstream conditions.
A linear regression model is the simplest and welldeveloped representation
of a casual, timeinvariant relationship between an input and output function.
Hence a linear regression model was developed as the benchmark for models comparison
in flood forecasting. As it can be implied from Table 3 in
calibration period, linear regression performed poorly but the result accuracy
of validation period is fairly good (e.g., for 1dayahead reservoir inflow
forecasts, CC = 0.897 and RMSE = 4.73).
Table 13 shows that the ANN and regression
models generally predict the reservoir inflow for 14 dayahead satisfactorily.
Another consequence acquired from this study was that for all 1 to 4dayahead
forecasts, the ANN model was generally superior in the reservoir inflow (the
a values were close to unity, Table 2) in comparison with
the FL model (Table 1). The FL model generally underestimates
the reservoir inflow. According to the RMSE evaluate function, for the longer
period of time forecasting (e.g., 3 and 4day ahead) the FL model showed the
better results in comparison with the corresponding results obtained from the
ANN model, in particular for the validating and testing patterns (Table
1, 2). Therefore, for the short period of flood forecasting
it seems that the ANN model performed better than the FL model. However, the
important point is that if the models would able to predict the peak discharge
as accurate as possible. To evaluate how powerful models are in predicting the
peak discharge, two observed floods during 4/13/1996 to 4/29/1996 and 4/4/1998
to 4/18/1998 were shown in Fig. 6 and 7
for short and long periods of time prediction respectively. As it can be seen
in these figures, ANN and LR models could estimate and predict the flood hydrograph
with a fairly good accuracy for 1 and 3dayahead. The calculated errors were
3 and 4.5% for 1dayahead discharge prediction for ANN and regression models,
respectively.

Fig 6: 
Predicted and measured flood hydrograph for 1dayahead forecasts 

Fig 7: 
Predicted and measured flood hydrograph for 3dayahead forecasts 
The underestimation stream flow prediction of FL model can be also seen in
Fig. 6 with the error being about 26%. The error in peak discharge estimation
by the regression model was about 0.2% for 3daysahead flood predictions. Whereas,
the corresponding values for ANN and FL models were 9.3 and 6.0%, respectively.
These results show that the FL model was able to predict the peak discharge
only for the long period of time flood predictions.
CONCLUSIONS
The main goal of this study was to evaluate the application of fuzzy logic and artificial neural network models for prediction of reservoir inflow in order to control and manage occurring floods. The application results demonstrated that ANNs can predict the reservoir inflow for 1dayahead, especially in training period (CC =
0.970, RMSE = 2.45) better than FL (CC = 0.932, RMSE = 2.92) and LR (CC = 0.902, RMSE = 3.65) models. As the prediction time go ahead, FL model showed the better results and ANN model results slightly declined. Another result acquired from this study was that for all 1 to 4dayahead forecasts, ANN model generally estimated the flow relatively well, while FL model underestimated the reservoir inflow. According to the errors calculated for peak discharge predictions, it can be finally concluded that the ANN and regression models are more suitable than the FL model for the short term of time flood predictions, e.g., 1day ahead. The FL model performed slightly better than the ANN model for the long term, e.g., 4days ahead, flood discharge predictions.