Development of ANN model for discharge prediction and optimal design of sharp-crested triangular plan form weir for maximum discharge using linked ANN–optimization model


 Triangular plan form weirs are advantageous over a normal weir in two ways. Within the limited channel width, use of such a weir increases the crest length and hence for a given head, increases the discharge and for a given discharge, reduces the head in comparison with a normal weir. In a previous study, researchers proposed an empirical equation to compute the discharge coefficient of a triangular plan form weir. The prediction error on the discharge coefficient was ±7% from the line of agreement. In the present study, an ANN model has been utilized to train randomly selected 70% data, with 15% tested and validation made for the remaining 15% data. The model predicts the discharge coefficient with a prediction error in the range of ±2.5% from the line of agreement, thereby decreasing the prediction error in Cd by 64%. Also, the sensitivity analysis of the developed ANN model has been performed for all the parameters (weir height, skew weir length and flow depth) involved in the study and the weir height was found to be the most sensitive parameter. Furthermore, the linked ANN–optimization model has been developed to find the optimal values of design parameters of a triangular plan form weir for maximum discharge.


INTRODUCTION
Weirs are widely used as flow diversion and flow measuring devices particularly in irrigation engineering. The alignment of a weir with respect to the channel axis plays an important role in influencing the discharge characteristics. Based on the alignment, weirs can be classified into three categories, namely, normal weir, side weir, and triangular plan form weir. In normal weirs, the channel axis is perpendicular to the weir axis; whereas, in side weirs, the channel axis is parallel to the weir axis. The triangular plan form weir is the generalized form of normal weir and side weir in which the channel axis is inclined to the weir axis (Figures 1 and 2).
The main advantage of using a triangular plan form weir is that it reduces the head required for higher discharge within the limited channel width. Moreover, in this weir type, the effective weir length increases beyond the channel width. Consequently, it reduces the water head and increases the efficiency of the weir. The discharge Q over a normal weir is usually expressed as: where C d ¼ discharge coefficient; B ¼ effective weir length; g ¼ acceleration due to gravity; and h ¼ head on weir.
Labyrinth weirs, which are similar to triangular plan form weirs, having one or multiple folds and of various plan forms viz., triangular, trapezoidal, rectangular etc., are also used in practice. Taylor   Aichel () proposed the following equation for discharge over a sharp-crested skew weir: where θ ¼ weir angle. In this study, Aichel related the discharge coefficient for a skew weir (C d ) to the corresponding discharge coefficient of a normal weir (C DN ) of identical geometry and the results were presented in tabular form     Table 1.

ARTIFICIAL NEURAL NETWORKS
Artificial neural networks (ANNs) are computational models inspired by the central nervous system: particularly, the brain. ANNs are used as nonlinear statistical data mod-

Feed-forward step
In this step, received information from the input layer is transmitted in the forward direction to the next layer (i.e., the hidden layer). The summation of all incoming inputs at each neuron in the hidden layer can be mathematically expressed as: where Net j ¼ input received by the j th neuron of the hidden layer, W ij ¼ associated weight for the connection from the i th neuron of the input layer to the j th neuron of the hidden layer, n 1 ¼ number of neurons in the input layer, b 0 ¼ bias weight and x i ¼ value of the i th neuron in the input layer.
The input received by the j th neuron of the hidden layer (Net j ) is then transformed using the nonlinear sigmoid activation function to get the output, y j . The sigmoid function is a widely used activation function for hydrological modeling (Dawson & Wilby ). Mathematically, it can be expressed as: where α is the slope parameter of the sigmoid activation function.

Back-propagation step
In this step, the weights are initialized to start the training and a back-propagation algorithm is used to minimize the total error function. In the minimization process, the total error computed for the training data set at the output layer where e is the vector of network errors at the output layer and g is the gradient. J is the Jacobian matrix which contains the first derivatives of the network errors with respect to the weights and biases. If e 1 , e 2 , e 3 , … , e N are the network errors ¼ e i ¼ (C dðActualÞ ; i À C dðPredictedÞ ; i) 2 , w 1 , w 2 , w 3 , … , w n are the network weights and b 1 , b 2 , b 3 , … , b m are the network biases then the Jacobian matrix J can be represented as: J ¼ @e 1 @w 1 @e 1 @w 2 Á Á Á @e 1 @w n @e 1 @b 1 @e 1 @b 2 Á Á Á @e 1 @b m @e 2 @w 1 @e 2 @w 2 Á Á Á @e 2 @w n @e 2 @b 1 @e 2 @b 2 Á Á Á @e 2 @b m The Levenberg-Marquardt algorithm is a combination of the Gauss-Newton algorithm and gradient descent algorithm. The iterative updating of LM is similar to a Newtonlike updating and can be expressed as: Equation (11) can be rewritten as: When μ ¼ 0, Equation (11) becomes: For larger values of μ, the LM algorithm behaves like the gradient descent algorithm. In the training of ANN models, the LM algorithm starts with larger μ value to ensure global convergence and then quickly shifts towards the Gauss- R can be defined as follows: where N ¼ total number of patterns; C dA,i ¼ actual value         Figure 12. The R value using Equation (14) was found to be equal to 0.9617, whereas using the ANN model it is equal to 0.9927. Also, the MSE between the actual and the predicted discharge coefficients using Kumar et al.'s approach was found to be equal to 3.695 × 10 À4 whereas using the ANN model it is equal to 7.155 × 10 À5 . A comparison between the statistical parameters of both the models is summarized in Table 3. Based on the comparison data, it can be concluded    Table 4.
Based on these results, it can be concluded that weir height (w) is the most and weir length (L) is the least sensitive Prediction error in C d from the line of agreement ±7% ±2.5% parameter in the developed ANN model. Also, the ANN model appears to be robust even for significantly large perturbations of ±10% in input parameters.

LINKED ANN-OPTIMIZATION MODEL FOR OPTIMAL DESIGN
In this study, a linked ANN-optimization model has been developed to find the optimal values of design parameters of a weir, namely, weir length (L), weir height (w) and flow depth (h) for which the discharge Q is maximum. The developed linked ANN-optimization framework is comprised of two modelsan optimization model and an ANN model. In the optimization model, an objective function is formulated and then minimized using a constrained nonlinear minimization algorithm. The objective function is formulated in such a way that the minimum of this function will correspond to the maximum discharge. Mathematically, the objective function for the optimization model can be represented as: Subject to: where, q ¼ vector of weir parameters (L, w and h) q l ¼ lower bound on vector q q u ¼ upper bound on vector q.
The discharge Q in Equation (16) is a function of L, w, h and C d . In order to calculate C d , the optimization model is    carried out by perturbing the input parameters and the weir height was found to be the most sensitive parameter.
The ANN model appears to be robust even for a large random error level up to 10% in the input parameters. Furthermore, the linked ANN-optimization model has been developed to find the optimal design parameters of a weir for maximum discharge. Based on the performance results and sensitivity analysis of the developed ANN model, it can be concluded that the ANN model can be efficiently utilized to predict the discharge coefficient of a sharp-crested triangular plan form weir. Also, the linked ANN-optimization model can be utilized for optimal design of a weir for maximum discharge.

CONFLICT OF INTEREST
On behalf of all the authors, the corresponding author states that there is no conflict of interest.