Determination Discharge Capacity of Triangular Labyrinth Side Weir Using Multi-layer Neural Network (ann-mlp)

Side weirs are used in open channels to control flood and the flow passing through it. Discharge capacity is one of the crucial hydraulic parameters of side weirs. The aim of this study is to determine the effect of the intended dimensionless parameters on predicting the discharge coefficient of triangular labyrinth side weir. MAPE, RMSE, and R 2 statistic indexes have been used to assess the accuracy of the results. The results of the examinations indicate that using MLP model along with simultaneous use of dimensionless parameters for the purposes of estimating discharge coefficient: the ratio of water behind the weir to the channel width (h/b), ratio of weir crest length to weir height (L/W), relative Froude number (F=V/ " (gy)) and vertex angle (ô), offered the best results (MAPE= 0.67, R 2 = 0.99, RMSE = 0.009) in comparison with other models.


INTRODuCTION
Side weirs are amongst hydraulic structures used for varied purposes in water transfer systems, irrigation networks, drainage, surface water collection systems, sewers and wastewater discharge ducts, and water and sewerage treatment plants.Diverting surplus discharge in rivers and channels is among other applications of side weirs.Moreover they are constantly and widely used for specific impounding of rivers or channels.The flow in the weirs is a spatially varied flow (Borghei, 2011).A spatially varied flow is a type of permanent flow in which the flow intensity increases or decreases in the channel along the flow direction.When the flow is a spatially varied flow it decreases along the path as discharge decreases, which is basically a diverted flow (DeMarchi G, 1934).Labyrinth and normal side weirs are among different types of weirs.Labyrinth weirs are constructed in a spiral manner so that they will create a larger weir crest length in comparison with the normal weirs.This increases the passing discharge in comparison to a normal weir with similar head and similar side space.Labyrinth side weirs are used as a structure to better overflow the flow in larger containers and it allows the overflow threshold to increase when the water is at its maximum level.Labyrinth weirs could be sharp-crested and broad-crested and normal weirs are built in varied shapes such as rectangle, triangle, trapezium, circle, and … (Kumar et al., 2011;Wormleaton and Tang, 2002;Emiroglu and Baylar, 2005).DeMarchi (1934) solved the dynamic equation of discharge-decreasing spatially varied flow for the first time in 1934 for rectangular horizontal channels when the friction can be overlooked with the premise that the energy is constant along the weir.Subramanya and Awasthy (1972) studied the general differential equation of spatially varied flows with decreasing discharge in a horizontal rectangular channel and presented a number of equation for discharge coefficient for the sharp-crested side weirs through conducting a series of experiments on subcritical and supercritical flows.They also measured the velocity profiles and demonstrated that the rectangular side weir will have a significant effect on velocity distribution near the weir.
Considering the complexity of engineering problems and growing engineering studies, new methods called soft calculation were significantly used during recent decade which showed more efficient and more accurate to solve complicated and difficult engineering issues.Emiroglu et al. (2009) were able to obtain the discharge coefficient of triangular weirs through using (ANFIS) fuzzy neural network.The discharge coefficient is dependent on the geometrical parameters of the main channel and the weir in the model presented by them .Kisi et al. (2012) were able to obtain the discharge over the triangular weir through using neural network (ANN).The upstream weir Froude number, the weir length, the main channel width, the weir height, the angle of the apex of the triangular weir, and the upstream water height were the parameters affecting the discharge coefficient in their study .Bilhan et al. (2010) succeeded in developing the neural network(ANN) method and obtaining the discharge coefficient of rectangular weirs through other neural network models.These models include: FFNN and RBNN models.Dursun et al. (2012) conducted their studies on elliptical weirs and were able to obtain an equation for discharge coefficient in such weirs.They utilized the (ANFIS) fuzzy neural network in their examinations and compared the results with that of other methods .
Multi-layer neural network (ANN-MLP) is one of the methods taken in to use in water hydraulic engineering during recent years.One of the benefits of this method which can be pointed out is the desirable performance of it in analyzing complex flows (Kisi, 2008;Bonakdari et al., 2011;Baghalian et al., 2012;Donmez, 2011;Huai et al., 2013).
The main purpose of the present study is to predict discharge coefficient through using the MLP method.The factors influencing the determination of discharge coefficient were first specified through using sensitivity analysis in order to fulfill the purpose of this study.Six models are then presented considering each of these dimensionless parameters.And then the discharge coefficient has been predicted through training and testing the MLP network for each of the presented models.RMSE, MAPE, and R 2 statistical parameters were finally used to compare the six above-mentioned models.The best and most effective parameters in predicting the discharge coefficient will be introduced at the end.

Experimental Model (Kumar et al, (2011))
Present study used Kumar et al, (2011) experimental data to estimate discharge coefficient.A horizontal rectangular channel with 12 meter length, 0.28 m width and 0.41 meter height was used in the experiments.The weir used was a triangle located 11 meter away from channel entrance.Water height over weir crest was measured by point gages having ±0.1 mm accuracy.To create edge flow over the weir, air conditioning pits were used.Network walls and wave preventers were structured to eliminate the vertex and water surface disturbance.Table 1 shows the parameters used in present study.

Multi-Layer Neural Network
The Multi-layer neural network is considered one of the soft computing methods.One of the benefits of this method which can be pointed out is the desirable performance of it in analyzing complex flows.Also the nonlinear models of current can also be studied through this method.The basis of the process in this method is training and learning processes.The components of the structure of artificial neural network(ANN) include: hidden layers, hidden units and hidden neurons, input layer, output layer ( Yang and Chang, 2005;Smith, 1993).
The flexible structure of artificial neural network (ANN) makes it capable of modeling complex and nonlinear patterns between input and output data.The capability to estimate the accurate results is done through using input data on the basis of training and learning process.What is meant by training the neural network is to obtain the weights (w) of the network.Also classifying different types of ANN is done based on the methods of obtaining the weights and also the utilized transfer functions.One of the various types of neural network which is used frequently is Multilayer Perceptron (MLP).An MLP feed forward includes an input layer, one or more hidden layers and an output layer (Figure 2).Each layer is made up of a number of neurons the number of neurons in the input and output layers are equal to the number of inputs and outputs of the under-study issue respectively.Various types of functions could be considered as sigmoid function, hyperbolic tangent was used as activation function in the hidden layers in this study.Levenberg-Marquardt method was used for training of ANN (Melesse et al., 2011;Van Maanen et al., 2010).Back-propagation algorithm, which is one of the most beneficial algorithms, is used in this method in order to figure out the weights and bias of the neural network.This algorithm minimizes the difference between the observed outputs from the experimental studies and the ANN model outputs very quickly through determining weights and bias.
The modeling and simulation of ANN-Multilayer Perceptron (MLP) was written by matlab programming language in this study.In order to analyze and solve a neural network which has two hidden layers and in order to determine the number of the existing neurons in each layer, trial and error method was used.The functions and equations which are analyzed for the output layer are linear, ( Bilgil and  The way the trial and error method works is that various runs are taken in order to determine the number of neurons of the layers of the neural network in case the number of the neurons are not equal in the first and the second layer and then the RMSE error is determined for each of them separately and the state which has the least amount of error will be selected as the base for modeling ANN.These parameters (model 1-6) are placed in the first layer of the neural network as the input parameters.The neural network will be trained through a number of these parameters within the middle layer in the following stage so that they could gain their optimum structure and after reaching the already-determined stopping point, the training process will stop.As said earlier the purpose of the structured neural network is to estimate the discharge coefficient.

METHOD
Through examining the studies conducted in the field of discharge coefficient it could generally be states that the dependent C d parameter is dependent on the ratio of water behind the weir to the channel width (h/b), the ratio of the weir crest length to the water height behind the weir (L/h), the ratio of the weir crest height to the weir height (L/w), the approximate Froude number (F=V/"(gy)), and the vertex angle (è) independent dimensionless parameters.Therefore the six models could be presented as below through using the presented dimensionless parameters.It could be seen that model number 1 includes all the presented dimensionless parameters and models 2 to 5 examine the effect of not considering each of the presented dimensionless parameters.
In order to verify the accuracy of the estimated model, at each step of model development, the results of analysis of MLP for each model is based on the criteria of coefficient of determination

Examining the Results
All the equations in the center of the line of this sections present the discharge coefficient through using the experimental data presented by Kumar et al. (2011) and the MLP method for each of the presented models which consider different factors influential on predicting the discharge coefficient.Figure 3 shown the correlation analysis between the discharge coefficient obtained from the MLP model and the experimental data in the training state for different models.
It could be seen with regard to the presented graphs that all six models have been trained generally well and the performance of both networks is satisfactory regarding predicting the discharge coefficient with R 2 variables close to 1. However models 1 and 4 have presented relatively better results in comparison with the other models with highest R 2 values which are 0.9953 and 0.9946 respectively.It could also be seen that the values predicted by these models present relatively similar results to those obtained by the experiments in almost most of the states.The process for predicting the discharge coefficient is not the same in states which the influential parameters are considered as model 4 in such a manner that the predicted values predict the results to be lesser or greater than the actual values in different points but as it could be seen, the results presented by this model are fairly accurate to the extent where the relative error presented by this model is approximately 0.67%.
Figure 3 also shown that model 1 presents better results in comparison with the rest of the models (models 2, 3, 5, and 6).It could be seen that the process of predicting discharge coefficient in this model is almost similar to that of model 4 in such a manner that the largest relative error of prediction is nearly 0.82% in this model.Therefore it could be stated that not considering the ration of the weir crest height to the water height behind the weir ratio (L/h) does not have a significant impact on the process of predicting discharge coefficient.Model 3 presented most of the discharge-coefficient prediction results to be larger than the actual value.In such a manner that the values predicted by this model have a relative error of approximately 1.19% in some points.Therefore, it could be stated with regard to the presented explanations that not considering the Froude number (F) parameter has a significant effect

Fig. 3: Comparing estimated discharge coefficient with experimental result in training state
on the results of predicting the discharge coefficient.Like model 3, model 5 does not predict the results with an acceptable level of accuracy either.In addition to predicting the results with greater values in comparison to the actual values, like model 3, this model predicts some values to be lesser than the actual values in some points.With regard to the relatively high degree of the relative error of these predictions, it could be stated that not considering the weir crest length to the weir length ratio (L/w) in predicting discharge coefficient decreases the prediction accuracy.Model 6 predicts discharge coefficient with an acceptable level of accuracy with a relative error of approximately 0.84%.Model 2 does not predict the results accurately either and it has a relative error of almost 1.12% in some points.Figure 4 shown the relative error presented by each of the models in predicting discharge coefficient.Carefully examining this Figure could lead to the conclusion that, model 4 has the best performance in predicting discharge coefficient of the weir flow.
Therefore it could be stated with regard to the presented explanations that the height above the weir to the channel width ratio (h/b), the weir crest length to the weir height ration (L/W), and the approximate Froude number (F=V/"(gy)) parameters have a significant role in predicting discharge coefficient and not considering each of them decreases the prediction accuracy of the models significantly.In addition to the mentioned parameters, the vertex angle (è) plays a role in predicting discharge coefficient as well.However as it was seen in models number 2 and 3, mot considering this parameters has no significant effect on predicting discharge coefficient and increases the value of the relative error in comparison with when this parameter is considered.With regard to the presented explanations on different models predicting discharge coefficient, Table 2 presents the prediction results of each of the models quantitatively through using different statistical indexes in training state.
The MAPE index is the first index which is presented for the purposes of examining the accuracy of the presented models.MAPE shows the different between the predicted values and the actual values as a percentage of the actual variables.It could be seen that the worst MAPE value was presented by model 3 which is almost 1.19%.It could also be seen that the value of this parameter is not great for any of the models.According to table two, model 4 has the least MAPE value which is almost 0.67% and it presents better results in comparison to the rest of the models with regard to this index.The RMSE index which expresses the root mean-square error has also been used to quantitatively examine the models.This index considers the weight of large errors more through exponentiation of the different between the predicted and actual values.It could be seen with regard to the table that the RMSE value is the least for model 4 in comparison to the other models.The data which were not used in the model prediction are used in this section to examine the accuracy of the presented models.The statistical   3 are used to examine the accuracy of each of the models in the testing state.
The value of MAPE presented by different models in the testing phase is also relatively good with the maximum value of this index which is approximately 1.62%.In this state, model 4 presents the least value of MAPE as well which is equal to 1.14% in comparison to the other models.The RMSE value which considers the root mean square of error presents the accuracy of models through considering the larger weights for larger errors.The closest this index is to zero the more accurate the model will and as it could be seen the value of this index is better in both states for model 4 in comparison with the rest of the models.Models 1 and 4 predict discharge coefficient fairly well will regard to the presented explanations however if we would like to select a model, it could be stated that model 4 presents better results.

CONCLuSION
There are varied methods such as using weirs for controlling flood.The weir can be located along the channel length or in the side as a side weir.The weir crest length to the water height behind the weir ratio, the weir crest length to the weir height ratio, the height of the water behind the weir to the channel width, the approximate Froude number, and the vertex angle dimensionless parameters were used in this study to predict the discharge coefficient of a weir located along the channel length.Six models were presented through considering the presented dimensionless parameters and sensitivity analysis of the different models to not using each of the varied dimensionless parameters.The examinations indicated that when all presented dimensionless parameters are used except for the weir crest length to the height of the water behind the weir (model 4) for the purposes of predicting the discharge coefficient, we will have the best results in comparison with the rest of the states.Although model 6, which does not consider the water height behind the weir to the channel width ration, also presents good results compared to model 4, the selected model (model 4) presents the discharge coefficient with an error percentage equal to 0.67% and an R 2 equal to 0.9946 in the training phase of the model where its hydraulic parameters had no role in predicting the model.

Nomenclature
and MLP modeled discharge coefficient values, respectively.The closer the value of index R 2 to 1, the more it shows that the estimated value is more compatible with the real value.Results which are achieved from coefficient of determination (R 2 ) have been simulated in relation with linear dependence between real and corresponding values (for the present case, the experimental and MLP modeled discharge coefficient values) and they are sensitive towards deviated points, so in evaluating the results, we can't suffice to this index(Karimi et al. 2015).Thus, other statistical indexes like mean absolute percentage error (MAPE) -which shows the difference between real and estimated models in form of percentage of real values -and root mean square error (RMSE) -which considers weight of larger errors by powering the difference between real and estimated values -, are needed in order to estimate function of the models.Both MAPE and RMSE indexes are able to include zero value (best mode) and infinity (worst value).