Study of Discharge Model in South-to-North Water Diversion Middle Route Project Based on Radial Basis Function Neural Network

The technology for water dispatch is very complex in South-to-North Water Diversion Middle Route Project, and it is necessary to take advantage of automation system for water delivery. The model for calculating flow rate is important to water dispatch, but traditional method often needs to rectify parameters manually. A model based on radial basis function neural network is established to describe the relationship between water level, gate opening and flux. The model uses the network to simulate the optimal function between water level, gate opening and flux coefficient, and calculates the flow rate by the coefficient. By taking the new method into South-to-North Water Diversion Middle Route Project and comparing the neural network model with traditional methods, the results show that the radial basis function neural network model has higher accuracy and efficiency


Introduction
South-to-North Water Diversion Middle Route Project (Middle Route Project) diverts water to Beijing and Tianjin cities, as well as Henan and Hebei provinces starting from Danjiangkou reservoir.The total length of the diversion canal is 1432km, and the main canal is 1277km long and Tianjin channel is 155km.Along the Middle Route Project there are 64 controlling gates and 97 water diversion gates.The joint dispatch for all the gates is in operation to achieve the smooth water supply in line with the water use discharge plan.On Dec.12th, 2014, Middle Route Project started its water supply.By the June 2015, around 700 million cubic meter water has been supplied to the cities and provinces along, effectively alleviated the water shortage in northern cities, especially the capital Beijing.The huge comprehensive benefits of Middle Route Project are being gradually revealed.
At present, domestic and international study of long-distance water dispatch technology have made many research achievements [1]- [8].However, regulating and operating condition of Middle Route Project is complex and still in the early stages of running through the water, so learning from experience is hard.Many other study of water dispatch specifically for Middle Route Project is improving in practice continuously.Middle Route Project is a linear project which has no regulating reservoirs but many water diversion gates which is difficult to dispatch.For such a complex project, model is used as a basic tool in the dispatch process.Moreover, water level, gate opening and flow rate are the three most important factors of water dispatch.When water demands of the users change, water dispatch model is used to analyze and calculate conveyance flow and gate opening to adjust the flow of water from current state to a new equilibrium state by regulating the controlling gates according to water regime.The traditional method uses hydraulics empirical formula to calculate where the empirical data is adopted for hydraulic parameters.This method does not automatically analyze the data, but needs technical personnel to calibrate hydraulic parameters regularly based on measured hydrological data and the maintenance unit to modify in associated software source code, which is inconvenient and time-consuming.
To solve the problems, by combining Middle Route Project, the paper proposed radial basis function neural network (RBFNN) modeling technique to create and revise calculation mode automatically along with constantly updated measured data.Meanwhile, the measured flow data are generally concentrated in smaller range after water delivery becoming stable, if we use the radial basis function neural network to fit the relation of water level, gate opening and flow rate directly, it may lower the generalization ability of the model might.Taking the above into consideration, the paper uses RBFNN to establish relation of water level, gate opening and flux coefficient, and analyze flow rate through hydrodynamic formula by flux coefficient, which can automatically model and improve the generalization ability.

Radial basis function neural network
Artificial Neural Network (ANN) is a mathematical model simulating biological neural network to process information and form a large-scale nonlinear dynamical system interconnecting a large number of neurons.With a strong self-learning ability, ANN has been widely used in forecasting, controlling, modeling and other fields [9]- [11].The most common neural network models are BP neural network and RBFNN.Although BP neural network algorithm is widely used, it has drawbacks such as easily stacked into minimal value, long training time and slow convergence [12]- [13].RBFNN is a nonlinear learning algorithm feedforward network of global convergence, with advantages such as high accuracy, fast learning and none local optimality problem [ 14]- [16].
RBFNN consists of input layer, hidden layer and output layer.Movement from input layer to hidden layer is nonlinear and movement from hidden layer to output layer is linear.Assuming the number of training sample sets is N , for any sample Y , X , " is an m-dimensional output vector.The number of neurons of input layer is n, output layer is m, and hidden layer is h.The output function of hidden layer is RBF, generally choice of Gauss function: where X is input vector, C is center of activation function, G is width, is Euclid norm.
Result of output layer can be expressed as: where j y is the j th component, ij w is the connecting weights from i th neuron in hidden layer to j th neuron in output layer, h represents the number of neurons in hidden layer.
It is using samples to train and calculate the coefficients of RBFNN including C , G and w .Detailed procedures as follows: (

1) K-means clustering method to determine center
Step 1: Select h samples randomly to be the RBF center, where h is the number of neurons in hidden layer.
Step 2: Calculate Euclidean distance between all input samples and centers, and classify all the samples into h types in accordance with the principles of nearest distance to center.
Step 3: Calculate the average mean of each type, and set the sample mean as the new center.
Step 4: Repeat step 2 and step 3 until the center mean of each type doesn't change anymore. (

2) Determine the width
Step 1: Calculate the distance between centers to find the maximum distance; Step 2: Calculate the width using the following formula: where max C is the maximum distance.
(3) Determine the connecting weight When the centers and width of the hidden layer are determined, the connecting weight can be obtained by least square method.
Step 1: The output matrix in hidden layer is calculated through Step 2: Suppose the connecting weight from each neuron of hidden layer to th j of output layer is , the result of N groups of th j neuron in output layer Step 3: Deviation from the ideal output Step 4: Using the least square method to make H minimum, and calculate j W :

Discharge model based on RBFNN
Based on hydraulics flow rate formula: where Flow rate formula can be simplified as : For controlling gates of Middle Route Project, the widths and bottom elevations are known, during the regulation, upstream water level, gate opening and flow rate can be obtained through automation system.
For specific controlling gate, the chamber width is fixed; flow coefficient m is function of gate opening and water level.Its upstream water level, gate opening and flow rate can be obtained during operation, and the integrated flux coefficient is calculated as follows: The RBFNN model can be established with gate opening, water level and flux coefficient, it consists of 3 layers.The number of neurons in input layer is 3, which corresponds to water level and gate opening respectively.The number of output neurons is 1 which is flux coefficient.The number of neurons in hidden layer can be obtained by trial calculation.Using known sample data, the network training can be achieved and a regression model can be established through RBFNN learning algorithms.Flux coefficient is calculated by RBFNN model, and then flow rate is calculated by function (7).

Case study
The 64 controlling gates of Middle Route Project deliver water to each water diversion gate smoothly through analysis of water balance and flow rate along during water dispatch.In this paper, the validity of the new model is verified by the example of Cihe controlling gate of Middle Route Project during a certain period.Cihe inverted siphon is first-grade project, of which main structure is designed as first-grade and affiliated project includes left and right bank diversion dikes of the channel.Cihe inverted siphon full-length is 579m, composed by inlet transition section, inlet overhaul gate chamber, pipe section, outlet controlling gate and overhaul gate chamber and outlet transition section.Cihe controlling gate is located in the inverted siphon outlet.The gate has 3 radial gates, each gate is 6m wide, and bottom elevation is 66.721m.The measured data of the gate of certain period is shown as follows:

ICIEA 2016
In order to facilitate the calculation the following formula can be used to normalize the input data.Since the value of integrated flux coefficient is already in the range of 0 and 1, there is no need to transform.max ' z z z (11) where ' z is the input data after normalization; z is the input data before normalization; max z represents the maximum data which could be design water level, design water depth or design flow rate.For the controlling gate above, its design water level is 73.88m, design water depth is 7.16m, and design flow rate is 165 m 3 /s.
The sample data for verification (not included in table 1) as follows: The paper compares the results of RBFNN model combining hydraulics (method 1) with the results by the neural network model based on water level, gate opening and measured flow rate(method 2) as well as the results by hydraulics methods.The results of analysis and comparison are shown below: Analysis of data in Table 3 as follows: 1. Compare the calculated flow rate with measured flow rate in Table 3 of each method, the average error of method 1 which is the model established in this paper is 8%, while the hydraulics method is 21% and method 2 is 28%.The error of the established model was significantly lower than the other two methods while the accuracy is much higher.The average error is calculated by using the following formula: where E is average error, q is measured flow, ' q is calculated flow, n is the number of samples for verification.
2. According to the calculation results of the 3rd, 4th, 5th, 6th, 8th row in test sample, average error of method 1 is 5%, method 2 is 5%, while hydraulics method is 28%, which shows the error of neural network calculation is significantly smaller than the hydraulic method.The output value of the samples is very close to the input value of training sample, indicating that the neural network has great data fitting ability.When the selected input data is within the range of training samples, we can get good effect of output reasoning.
3. According to the calculation results of the 1st and 2nd row in test sample, average error of method 1 is 4%, method 2 is 89%, while hydraulics method is 6%, of which the error of method 2 is the largest.The input range of the samples above is largely differentiated from that of the training sample, which indicates that the neural network has lower generalization ability.However, method 2 still achieved good reasoning effect, which indicates the method of fitting integrated flux coefficient by neural network can improve the generalization ability of the model.
4. Calculation error of the 7th row in test sample has the largest calculation error, average error value of hydraulics method is 25%, method 1 is 22%, and method 2 is 40%.The error is caused by the weak generalization ability that the gate opening of the training sample data are generally in the vicinity of 0.4m, while the opening of the data for the verification samples is 1.34m, the training ranges exist a large deviation.However, with the constant accumulation of sample data, ranges become wider, and the results will be more optimized.
5. Neural network model can automatically train and adjust model structure with updated sample data.Compared with the traditional hydraulics method, neural network can avoid modifying constant parameters in the source code, and it is adaptable, convenient, flexible, and saves human and financial resources for hydraulics parameter calibration.

Conclusions
With water diversion practice of Middle Route Project, this paper proposed discharge model based on RBFNN that fits the nonlinear function of water level, gate opening and flux coefficient through the neural network.The model uses hydraulics empirical formula to calculate water flow rate which is to play the advantages of high fitting accuracy and automatic modeling, and also improve generalization ability.The example showed that RBFNN model is of high accuracy, convenience and adaptability, having strong practical value and generalizing significance.
is gate bottom width, m; e is gate opening, m; H is front water depth, m.

Table 1 .
Data of water regime about Cihe gate

Table 2 .
Data for verification

Table 3 .
Analysis and Comparison