Tawatchai
Tingsanchali Chayanis
Manusthiparom
Water Engineering and Management Program, School of Civil Engineering,
Asian
Institute of Technology, P.O. Box 4 Klong Luang, Pathum Thani, Thailand 12120 Tel 662-5245557,
Fax 662-5162126, Email:
tawatch@ait.ac.th
Abstract: Flow in tidal rivers is greatly affected by tides and upland flood discharges. A neural network model with back-propagation algorithm (BPNN) is applied for forecasting hourly water levels and discharges in the Chao Phraya River at Bangkok Memorial Bridge (Station C4) which is located about 48 km from the river mouth. The considered river reach is from the river mouth at Fort Chula (km 1) to Bang Sai (km 112). The river flow is influenced by the effects of the upstream discharge at Bang Sai, the tide levels at Fort Chula and the local inflows along the river reach. The neural network model is trained and tested for three-hour ahead flood forecasting based on the observed hourly water level data during high stages in 1996, 1995 and 1992. The accuracy of flood forecast is evaluated by using a statistical performance index and is found to be very satisfactory.
Keywords: neural networks, back propagation, flood Forecasting, tidal rivers
In Bangkok, frequent floodings are usually caused by the combined effects of high upland discharge of the Chao Phraya River, high tides at the river mouth and heavy rainfall in the city. The present study is limited to the Chao Phraya River reach from Fort Chula (km 1) at the Chao Phraya river mouth up to Bang Sai gaging station (km 112). The study area is from Amphoe Bang Sai (km112) to Fort Chula (km1) at the mouth of the river (a reach length of about 112 km). This part of the river is considerably affected by tides. (see Figure 1 )
Hourly streamflow forecasting in tidal rivers has been carried out using various models such as the use of unsteady flow models. Recently, neural networks have been successfully applied to hydrology for flood forecasting (Tingsanchali and Gautam, 2000) and for river flow prediction (Karunanithi et al., 1994). A well known method of supervised learning of neural networks called Back-Propagation (BP) (Rumelhart et al., 1986) has been found effective in flood forecasting problems (Zhu and Fujita, 1994; Tingsanchali and Gautam, 2000). The main purpose of this study is to develop a neural network model for forecasting hourly discharges and water levels of the Chao Phraya River for three in advance at Bangkok Memorial Bridge. The Bangkok Memorial Bridge is situated about 48 km from the mouth of the Chao Phraya River.
Several algorithms of neural network model exist. However, back propagation which belongs to supervised learning algorithm that compares the actual output to the target or specified output and then readjust the weights backward in the network. The same input is specified to the network in the next iteration, so the actual output will be closer to the target output. One of the basic requirements of the BP training is that the transfer function be continuous and differentiable. The sigmoid logistic non-linear function which fulfills the above requirement is used with the value ranging between 0 to1.The standard back propagation training algorithm is as followed:

Fig. 1 Tidal reach of Chao Phraya
River considered in this study
(1) Initialize all weights and bias factors to small random values.
(2) Forward pass: Present input vector (I1, I2,…, Ino ) and specify the desired output (t1, t2,…, tn1)
(3) For layer m = 1,2,…,l: , according to Figure 2, we can compute
(1)
where
, tj = target value of neuron j in output layer, Oj,m=
output of neuron j in layer m, Nj,m= activation of neuron j in layer
m, qj,m
= bias value for neuron j in layer m , Wji,m = synaptic weight
between node j in layer m and node i in layer m-1
The output Oj,m of the
unit in the layer m is computed
using a sigmoid function as
(2)
(4) Compute the final output (
and compared with the desired output (t1, t2,… tn1).
If the difference is acceptable, the process is terminated and the system
has learned. Otherwise, continue to next step. When the number of epochs is
reached while the difference is not acceptable, the convergence is not attained.
One should try with a new set of initial values, or even modify the structure of
the network.
(5) Backpass: for layer m = l, l-1, l-2, …, 1, let dj,m = d for neuron j in layer m,
For output layer m
(3a)
For hidden layer m
(3b)
Fig. 2 Transfer of Input of Layer m-1 to
A Nodal Output of Layer m
To compute the weight increments:
(4)
where h = learning parameter,a = momentum constant, DWji,m (n) = weight change between node j in layer m and node i at n iteration, DWji,m (n+1) = weight change between node j in layer m and node i at n+1 iteration, Oi,m-1= Ii,m , n = number of iteration (n = 1,2,3,…).The new values of the weight is computed as
(5)
where Wji,m (n) = weight value between node j in layer m and node i at n iteration, Wji,m (n+1)= weight value between node j in layer m and node i at n+1 iteration
(6) Go to step 2.
In the neural network, the output node represents the water levels and discharges to be forecasted. The training time is directly dependent on the size of the network, the larger the network size, the longer the training time. The training process depends on number of input units, number of hidden units and convergence criteria. To make the problem simple, a neural network with three layers is used, i.e, input layer, hidden layer and output layer. A too small number or too large numbers of hidden nodes pose difficulty to the training. Therefore the determination of the hidden layers and nodes is made by the trial and error depending on the problem. The basic way in which back propagation is trained is that a set of input and corresponding output patterns is given in the training phase of back propagation. The system transfers the input to output based on initially randomly selected weights using the defined activation function. The system output is then compared with training set output and the difference between these two is what to be minimized in the so called “training phase” which is identical to “calibration” of the conceptual models. After training, the weights are kept unchanged and the neural network model is tested by applying it to other different sets of data. If the agreement is acceptable, the model is considered to be tested or verified. Otherwise more data is needed to train and test the model. The model is trained starting with some small randomly generated weights. After the predefined target error of 0.05 for 90% of all patterns is reached, the training process is stopped and the weights are saved. These weights and same NN architecture of the model are utilized in the testing phase.
The forecast is done in successive steps. A time step of one hour is used for each step. For a three-hour ahead forecast, there are three steps each for one-hour ahead forecast namely step1, step2 and step 3. The procedure for the three-hour ahead forecast is as follows:
Step 1. The one-hour ahead forecast is done according to Table 1 using the input data at present time t and previous time t-1 hour.
Step 2. The two-hour ahead forecast is done according to Table 1 using the forecast result of the first hour forecast in step 1 and the same input data as in step 1.
Step 3. The three-hour ahead forecast is done according to Table 1 using the forecast result of the second hour forecast in step 2 and the same input data as in step1.
The following data were used as input: the observed hourly water levels at Bang Sai(upstream end), the observed water levels at Fort Chula (downstream) and the estimated hourly local inflows along both sides of the Chao Phraya river. The lateral inflows which are the canal discharges from the Bangkok city into the Chao Phraya river are estimated from the discharges released through the gates along the sides of the river ( Manusthiparom, 2000). The observed hourly water levels at Station C4 were used as the target water levels in the BPNN model training (calibration) and testing (verification) for forecasting. The model training is carried out for the hourly flood levels and discharges at Station C4 in October 1998. The model testing was done using the data during the flood period at the same station in October 1996.
Table 1 Relationships for one, two and three-hour ahead of flood forecast
|
Step |
Functional Relationship |
Network Architect |
|
1. One-Hour Forecast |
W’(t+1) = f [B(t),B(t-1),F(t),F(t-1),U(t),U(t-1),D(t),D(t-1), W(t-1),W(t)] |
10-5-1 |
|
2. Two- Hour Forecast |
W’(t+2) = f [B(t),B(t-1),F(t),F(t-1),U(t),U(t-1),D(t),D(t-1), W(t-1),W(t),W’(t+1)] |
11-5-1 |
|
3. Three-Hour Forecast |
W’(t+3) = f [B(t),B(t-1),F(t),F(t-1),U(t),U(t-1),D(t),D(t-1), W(t-1),W(t),W’(t+1),W’(t+2)] |
12-5-1 |
In Table 1, W= flood level or discharge at Bangkok Memorial Bridge (station C4), B= flood level at Bangsai, F = flood level at Fort Chula, U and D = local inflow upstream and downstream of station C4, t = present time in hour, W’ = forecasted discharge or water level.
As the BPNN model uses Logistic
Activation Function which is an asymptotic function with its output lies in the
interval [0,1], the original data is linearly transformed to the interval
[0.05,0.95] before inputting to the network. The input data is processed as Xt'
=
where Xt is the actual value, a is the minimum value, A is the
maximum value and Xt' is the transform value. Output results are
transformed back into their original value by using the equation Xt =
.
A number of network architectures were tried. It is found that a three layer network is the most appropriate in terms of accuracy and computation time. By varying the time sets of the input nodes of the BPNN model, the use of present and past one-hour data for training the networks is found to yield significantly better accuracy than using only the input data of the present time. The past data of more than one hour are not used as the additional input because of increase in computational time and insignificant increase in accuracy. As shown in Table 1, the network 10-5-1 is selected for one-hour ahead flood forecasting. The networks 11-5-1 and 12-5-1 are selected for two-hour and three-hour ahead forecasting respectively (see Figure 3). The BPNN (12-5-1) model has twelve nodes in the input layer, five nodes in the hidden layer and one node in the output layer. The twelve nodes in the input layer represent the present and previous time step observed values of the upstream (Bangsai) and downstream (Fort Chula) hourly water levels, local inflows and the forecasted water levels of one-hour ahead and two-hour ahead from the BPNN networks (10-5-1) and (11-5-1). An output node represents the forecasted water level at Station C4 at time t+3 hours. For the three-hour ahead discharge forecasting the same BPNN (12-5-1) model is used except the observed and forecasted water levels at Station C4 are replaced by the corresponding discharges.
The formulation of the BPNN model for hourly water level and discharge forecasting at the Bangkok Memorial Bridge (station C4) is simple as the output is expressed as a function of the input hourly observed data namely the observed hourly water levels at the gaging stations at Bangsai, Bangkok Memorial Bridge (Station C4) and Fort Chula as well as the local inflows upstream and downstream of the station C4. For forecasting hourly discharge, the same neural network for water level forecast is used but the hourly water levels at station C4 is replaced by the hourly discharges at the same station. Due to the lack of observed hourly discharge data, the hourly observed discharges at station C4 are taken to be the same as that computed by the MIKE-11 model which is calibrated for the same period with a calibrated Manning n equal to 0.021. For one-hour, two-hour and three-hour ahead forecast, the model parameters are set for training procedures considering various flood periods in different years. The target error of 0.05 is set for all study cases. The value of learning parameter is set equal to 0.02 while the momentum rate is set equal to 0.95. The NN model performance was evaluated both qualitatively by visual comparison of the simulated and observed hydrographs and quantitatively using the performance statistical index namely the Model Efficiency Index (EI) according to Nash and Sutcliffe (1970). The model performance is found to be very satisfactory. By comparing the model results between different time sets of input data, it was found that the BPNN model trained for three-hour forecast with the input data at the present and past two hours give better results than that obtained by using only the hourly data at the present time. The results of forecasting three-hour ahead water levels and discharges from model testing are shown in Figure 4. The efficiency index for training and testing the BPNN model is found to decrease when the number of forecast hour increases. For training of the three-hour ahead forecast, the efficiency index ranges from 95 to 87 percent for water level forecast and 95 to 99 % for discharge forecast. Consequently for model testing, the efficiency index ranges from 92 to 80 percent for water level forecast and 96 to 89 percent for discharge forecast.
Fig.
3 Network architectures for three-hour ahead forecasting
Fig. 4
Comparison of three-hour ahead forecast of flood levels and discharges, model
testing with observed data, bangkok memorial bridge (station C4)
The BPNN model developed for one-hour, two-hour and three-hour ahead forecasts was found to perform very well in both training and testing. The efficiency index of flood forecasting for both water levels and discharges ranges from 87-99 % for model training to 80-96 % in model testing. It is important that the selection of the neural network architecture significantly influences the output performance of the model and the computational time. The model has the advantage that it requires only water level and discharge data as its input but not the topographical data. However, the forecast operation of the BPNN model is dominated by the current and past observed hourly water levels and discharge data. The neural network model can be applied with confidence to forecast hourly water levels and discharges for more time steps . Model training and testing need to repeat to accommodate changes in physical characteristics of river systems.