# Investigation of discharge coefficient of trapezoidal labyrinth weirs using artificial neural networks and support vector machines

- 764 Downloads
- 1 Citations

## Abstract

Weirs are a commonly used system to adjust water surface level and to control the flow in canals and hydraulic structures. Labyrinth weirs are a type of weirs that can pass through a certain amount of flow which has a lower upstream water level than the linear weirs, by increasing the effective length. In the present study, the performance of multilayer perceptron (MLP) networks, radial basis function networks and support vector machines with different kernel functions were investigated in order to estimate the discharge coefficient (*C*_{d}) of labyrinth weirs with quarter-round crests. For this purpose, 454 laboratory data were used. The non-dimensional parameters of *L/W*, *a*, *W/P*, and *H*_{t}*/P* were considered as the input, and the non-dimensional parameter of *C*_{d} was regarded as the output in the models. In comparison with the other models, the performance of the MLP model with RMSE, *R*, and DC of 0.019, 0.985, and 0.971, respectively, was more acceptable and closer to the experimental data. Also, the data density plot and the violin plot showed that the dispersion and distribution of the probability of the estimated data to the MLP model with the data obtained from the laboratory have a very close and similar adaptation.

## Keywords

Discharge coefficient Labyrinth weirs Multilayer perceptron network Radial basis function network Support vector machines## Introduction

Increasing the amount of flow rate in different structures was always a field of interest for researchers. Decreasing sedimentation in reservoirs (Zahabi et al. 2018) and the creation of an opening in a broad-crested weir body to increase the discharge coefficient (Daneshfaraz et al. 2019) are examples of improving the flow rate. The other vital structures that can control the flow rate are weirs. The volume of flow over the weirs depends on the length and shape of the crest of the weir. Many researches have been done on the effect of the hydraulic and geometric parameters on the *C*_{d} and the amount of flow discharged from the weir. One of the effective ways to increase the weir length at a given width is to use weirs with nonlinear plans such as triangular, trapezoidal, circular, and parabolic. These weirs have been known as labyrinth weirs and are usually made in one cycle or several cycles. Through constructing this type of weirs, the volume of the flow through them increases, and a lower free height will be needed upstream in comparison with linear weirs. This issue is critical when they act as flood discharging structures and facilitate the flow of the flood (Crookston and Tullis 2012a).

Study on the labyrinth weirs hydraulics is conducted by the physical and numerical approaches. Crookston and Tullis (2012b) tested some configurations of arced labyrinth weirs and observed increased efficiency. Dabling et al. (2013) investigated the hydraulic performance of labyrinth weirs which consist of two crest elevations as an alternative to multiple-staged labyrinth weir layouts. Kabiri-Samani et al. (2013) performed a combined analytical and experimental investigation on a rectangular labyrinth weir. Their results showed that rectangular labyrinth weir represents an effective alternative and could be five times more efficient than corresponding traditional broad-crested weir. Carollo et al. (2017) studied the dimensionless stage–discharge relation for a sharp-crested triangular labyrinth weir. They found that the length magnification ratio affects the flow magnification ratio.

Recent research efforts have included numerical modeling and CFD as an additional design tool (Seo et al. 2016; Daneshfaraz et al. 2016; Daneshfaraz and Ghaderi 2017). Another way for numerical modeling is related to the use of soft computing techniques for predicting the hydraulic properties of weirs such as discharge coefficient (Azamathulla et al. 2016). In this regard, researchers used an artificial neural network (ANN), group method of data handling (GMDH), gene expression programming (GEP), and adaptive neuro-fuzzy inference system (ANFIS). Juma et al. (2014), using artificial neural network (ANN), analyzed the hydraulic properties of semicircle weirs. They showed that the results of artificial neural networks were in good agreement with laboratory results.

Roushangar et al. (2017) investigated the determination of the *C*_{d} of labyrinth and archery labyrinth weirs with the support vector regression method. Their results showed that the vector support regression method had high efficiency in determining the *C*_{d} of labyrinth weirs. Karami et al. (2018) investigated the rectangular labyrinth weirs with supported vector machine models, artificial neural networks, and genetic algorithms. They compared the results of these models with the experimental data and found out the support vector machines represented better results than the other models.

Moreover, support vector machines have been extensively used in various fields (Zhou et al. 2015; Nadiri et al. 2018; Sadeghfam et al. 2019; Azimi et al. 2019).

The prediction of the *C*_{d} of the labyrinth weirs has always been important for the researchers in this area; therefore, several methods including empirical, quasi-empirical, time series, and artificial intelligence models have been developed. Among these, artificial intelligent models by being inspired by nature have been able to estimate the parameters of natural phenomena with acceptable accuracy.

Reviewing the literature has shown that there have been limited studies conducted on artificial models for estimating the *C*_{d} of labyrinth weirs with quarter-round crests. Therefore, in the present study, using the experimental data of Crookston and Tullis (2013), the performance of artificial neural networks (ANNs) and support vector machines (SVMs) with different kernels was examined for estimating the *C*_{d} of labyrinth weirs with quarter-round crests.

## Materials and methods

*h*) in meters, weir’s crest length (

*L*) in meters and

*C*

_{d}without dimension, which is obtained from Eq. 1 (Tullis et al. 1995).

*C*

_{d}in labyrinth weirs included the total upstream head (

*h*), inside apex length (

*A*), outside apex length (

*D*), centerline length of the sidewall (

*L*

_{c}), number of cycles (

*N*), the whole width of the spillway (

*W*), the walls’ angles (

*a*), the weir’s height (

*P*), the wall thickness (

*t*

_{w}), and the shape of the weir’s crest (

*L*

_{c}=

*N*(

*2l*

_{c}+

*A*+

*D*). Crookston and Tullis (2013) conducted studies on labyrinth weirs with quarter-round crests; the effective parameters in them can be seen in Fig. 1.

### Artificial neural networks

Artificial neural network (ANN) is a nonlinear mathematical model that is able to simulate arbitrarily complex nonlinear processes, which relate inputs and outputs of any system. In many complex mathematical problems that lead to solving complex nonlinear equations, multilayer perceptron networks are common types of ANN widely used by researchers (Parsaie 2016; Moazamnia et al. 2019).

Multilayer perceptron (MLP) network is the most commonly used neural network model applied in water engineering issues; for training, this network, a back-propagation learning algorithm which is a learning method with an observer, is used. The purpose of training a neural network is to arrange the network parameters (weights and biases) by providing training patterns, in a way that by representing the same patterns, the resulted error between the optimal response and network is minimized. Generally, in a multilayer perceptron network, there are two types of signals, i.e., signals moving in the going path (from the inner layer to the outer layer) and the other are the return signals (from the outer layer to the inner layer) which are known as the functional signals and error signals, respectively. Arranging the parameters in the multilayer perceptron network is performed by the error signal and input signal. Determining the number of layers and neurons existing in them is one of the most important issues in modeling with artificial neural networks. Tokar and Johnson mentioned sigmoid stimulus and hyperbolic tangent functions as the most commonly used stimulus functions in the back-propagation learning algorithm (Ghorbani et al. 2013).

*C*

_{d}of the labyrinth weirs with quarter-round crests.

### Support vector machines

Support vector machines operate based on data mining algorithms and are like other artificial intelligent methods. The first application of this method in water issues which was presented by Dibike et al. (2001) was simulating the rainfall runoff. Later, it was used in different fields of hydrology (e.g., Nadiri et al. 2017) and Hydraulics (e.g., Sadeghfam et al. 2019). Support vector machines are an efficient learning system based on the theory of optimization that uses the inductive principle of minimization of structural errors and lead to a general optimal response.

*y*which itself is a function of several independent variables of

*x*is estimated. Similar to the other regression issues, it is assumed that the relationship between the independent and dependent variables is determined by an algebraic function such as

*f*(

*x*) along with some disturbance (tolerance factor

*ε*) (Eq. 2).

*w*is a weight vector,

*b*is biased, and

*∅*is also a kernel function, and then, the purpose is to find a functional form for

*f*(

*x*). This is accomplished by calibrating the SVM model by a series of samples (calibration set). This process involves the sequential optimization of the error function. Depending on the definition of this error function, two types of SVM model have been defined.

SVMs are a set of related supervised learning methods used for classification and regression: SVM regression of type 1 (also known as ε-SVM regression) and SVM regression of type 2 (also known as υ-SVM regression). It is worth noting that in this study, the regression model of ε-SVM was used to predict the discharge coefficient of labyrinth weirs with quarter-round crests because of its extensive application in regression studies.

In the present study, the artificial neural networks (ANNs) and SVM models were used to estimate the amount of *C*_{d} of the labyrinth weirs with quarter-round crests with four non-dimensional parameters of *H*_{t}*/P*, *L/W*, *W/P*, and *α*. The data existing in the laboratory were taken, and the total number of the generated data was 454.

In the applied models, four non-dimensional parameters of *H*_{t}*/P*, *L/W*, *W/P*, and *α* were introduced as the input, and the non-dimensional parameter of *C*_{d} was considered as the output. In the applied models, 75% of the total available data were considered for the training period, and 25% of them were used for the testing period. In this study, STATISTICA 12 software was used to estimate the *C*_{d} and the value of the R, DC, and RMSE is determined.

## Evaluation criteria

*C*

_{d}. The assessment criteria for estimating the parameter of the discharge coefficient included the correlation coefficient between the observational estimated values (

*R*), root-mean-square error (RMSE) and the linear correlation between the predicted values and the observations (DC); each of them was calculated from Eqs. 8, 9, and 10, respectively. The model which had

*R*and DC close to 1 and the root-mean-square close to zero was considered the better model.

In these equations, \(O_{i}\) were the values obtained from the observational values (extracted from the laboratory), \(P_{i}\) were the values obtained from the predictive models’ method, \(\bar{O}\) were the mean values of the observed values, \(\bar{P}\) were the mean values obtained from the predictive models’ method, and *n* was the number of data.

## Results and discussion

The *C*_{d} of the labyrinth weirs with quarter-round crests was analyzed through the results of the ANNs and SVM models. In the present study, Crookston and Tullis (2013) laboratory data were used to evaluate and compare the results obtained from the models.

*H*

_{t}

*/P*,

*L/W*,

*W/P*, and

*α*were considered as the input, and the non-dimensional parameter of

*C*

_{d}was considered as the output in the models used in this research. In Table 1, the statistical parameters of the dataset have been shown for the training and testing ranges.

Range of dataset used for training and testing of models

Range | \(a\)(radian) | | \(W/P\) | | |
---|---|---|---|---|---|

Train | |||||

Min | 0.105 | 1.000 | 2.008 | 0.025 | 0.1998 |

Max | 1.000 | 7.607 | 4.015 | 0.855 | 0.8147 |

Mean | 0.320 | 3.980 | 2.215 | 0.344 | 0.5242 |

Cv | 0.8240 | 0.5003 | 0.2758 | 0.6651 | 0.2498 |

STDV | 0.264 | 1.991 | 0.611 | 0.229 | 0.131 |

Test | |||||

Min | 0.105 | 1.000 | 2.008 | 0.022 | 0.2169 |

Max | 1.000 | 7.607 | 4.015 | 0.832 | 0.8022 |

Mean | 0.344 | 3.751 | 2.221 | 0.353 | 0.5225 |

Cv | 0.7823 | 0.5286 | 0.2796 | 0.6621 | 0.2577 |

STDV | 0.269 | 1.983 | 0.621 | 0.234 | 0.1346 |

The multilayer perceptron (MLP) network and radial basis function (RBF) neural networks with hidden layers and different neurons were used for modeling the *C*_{d} of labyrinth weirs with quarter-round crests.

In this research, a hyperbolic tangent function which has been the most useful form of multilayer perceptron network stimulus functions was used to construct the output layer of the artificial neural networks. Training the multilayer perceptron networks was done through the training back of propagation learning algorithm which is called Lavenberg–Marquart algorithm because of its faster convergence in network training. Also, the Gaussian function was used for the radial basis neural network.

*C*

_{d}, the neural network had four neurons in the input layer (

*H*

_{t}

*/P*,

*L/W*,

*W/P*, and

*α*) and one neuron in the output layer (

*C*

_{d}). The value of the correlation coefficient between the observed and estimated values in the training and testing data for the estimated parameters indicated the high capacity of the designed neural network to estimate the discharge coefficient of the labyrinth weirs with quarter-round crests. Various models were evaluated. Finally, the appropriate models of MLP and RBF were calculated based on the statistical parameters according to Table 2.

The results of the simulation of the *C*_{d} of the labyrinth weirs with quarter-round crests

Parameter | Neural network models | Number of hidden layers | Number of input and output neurons |
---|---|---|---|

| MLP | 4 | 4–1 |

RBF | 8 | 4–1 |

*C*

_{d}in labyrinth weirs with quarter-round crests. According to Table 3, it can be claimed that in the present study, the accuracy of the multilayer perceptron (MLP) neural network is greater than the radial basis function (RBF) neural network for estimating the

*C*

_{d}of the labyrinth weirs with quadrantal crests.

The evaluation of the accuracy of the artificial neural networks model in estimating the *C*_{d}

Neural network models | Training | Testing | ||||
---|---|---|---|---|---|---|

RMSE | DC | | RMSE | DC | | |

MLP | 0.023 | 0.977 | 0.988 | 0.019 | 0.971 | 0.985 |

RBF | 0.045 | 0.892 | 0.944 | 0.043 | 0.872 | 0.933 |

*C*

_{d}. However, the multilayer perceptron (MLP) network model provided very closer results to the results of the observed values; therefore, it had a very high accuracy in estimating the considered parameter, i.e., the amount of

*C*

_{d}.

In the present study, the performance of the support vector machines (SVMs) in estimating the *C*_{d} of the labyrinth weirs with quarter-round crests was investigated. Considering the point that choosing the input models in artificially intelligent systems can affect the accuracy of the results in SVM modeling. It was tried to use the inputs of the neural networks’ model, that is, the parameters of (*H*_{t}*/P*, *L/W*, *W/P*, and *α*) in the input layer, and a neuron in the output layer (*C*_{d}) in order to assess the performance of ANNS in comparison with SVM.

*C*

_{d}model with different kernels was assessed. According to Table 4, the results showed that the RBF kernel function with

*R*, RMSE, and DC of 0.978, 0.027, and 0.956, respectively, performed better in predicting the

*C*

_{d}. The sigmoid kernel function with R, RMSE, and DC of 0.697, 0.211, and 0.185, respectively, had the weakest performance. Also, for finding the optimum parameters of the kernel function, the trial-and-error method was used, and by testing different values, the optimal value of these parameters was selected. In order to do so, for the constant value of

*γ*, first the optimal values of

*ε*and

*c*were obtained, and then, the value of

*γ*was changed, and by calculating the statistical parameters, its optimum value was calculated.

Statistical parameters of the SVM model with different kernels

Kernel Function | Training | Testing | ||||
---|---|---|---|---|---|---|

RMSE | DC | | RMSE | DC | | |

Linear | 0.063 | 0.733 | 0.870 | 0.061 | 0.778 | 0.883 |

Polynomial | 0.043 | 0.862 | 0.944 | 0.046 | 0.871 | 0.935 |

RBF | 0.031 | 0.944 | 0.971 | 0.027 | 0.957 | 0.978 |

Sigmoid | 0.181 | 0.112 | 0.667 | 0.211 | 0.185 | 0.697 |

*R*and the DC were 0.978 and 0.956, respectively, and the RMSE was 0.027 at the testing stage, and it was chosen as the best kernel mode for the SVM model.

*α*unit is radians.

The MR linear and MR nonlinear equation for obtaining the *C*_{d}

Equation | RMSE | | |
---|---|---|---|

\(C_{\text{d}} = 0.303 \times \left( {\frac{{k_{s} }}{p}} \right) - 0.049 \times \alpha {-} 0.023 \times \left( {\frac{P}{L}} \right) {-} 0.306 \times \left( {\frac{P}{L}} \right) + 0.726\) | 0.056 | 0.831 | 0.911 |

\(C_{d} = 8.491 \times \left( {\frac{{k_{s} }}{p}} \right)^{0.011} + 0.156 \times \alpha^{ - 0.903} - 7.749 \times \left( {\frac{P}{L}} \right) ^{0.01} - 0.323 \times \left( {\frac{P}{L}} \right) ^{1.341}\) | 0.056 | 0.835 | 0.913 |

According to Figs. 4, 5, and 6, MLP model has estimated very closely comparable results with respect to observational values compared to other models and therefore has very high accuracy in estimating the desired parameter (*C*_{d}).

ANN, SVM, MR linear, and MR nonlinear results for the test period

RMSE | DC | | |
---|---|---|---|

ANN-MLP | 0.019 | 0.971 | 0.985 |

SVM-RBF | 0.027 | 0.956 | 0.978 |

MR linear | 0.056 | 0.831 | 0.911 |

MR nonlinear | 0.056 | 0.835 | 0.913 |

## Conclusion

In the present research, ANN_{S}, SVM, MR linear and MR nonlinear models were used to estimate the *C*_{d} of the labyrinth weirs with quarter-round crests. The values of the *C*_{d} were obtained from Crookston and Tullis (2013)’s laboratory studies. Then, the estimated values *C*_{d} found for the mentioned models were compared using evaluation criteria. It should be noted that random sampling from the total data of 454 for considering 25% and 75% as testing and training data, respectively, was done in a way that after repeating several random choosing among the total available data, the data concerning the conditions with the highest *R* and the least RMSE for the estimation process could be used in the artificial neural network (ANN) model.

The results of this study showed that both artificial intelligent models had better accuracy in estimating *C*_{d}. However, the multilayer perceptron (MLP) network model with *R*, RMSE, and DC of 0.985, 0.043, and 0.8729, respectively, had a remarkably higher accuracy to the other models.

## Notes

### Compliance with ethical standards

### Conflict of interest

The authors declare that they have no conflict of interest.

## References

- Azamathulla HM, Haghiabi AH, Parsaie A (2016) Prediction of side weir discharge coefficient by support vector machine technique. Water Sci Technol Water Supply 16(4):1002–1016CrossRefGoogle Scholar
- Azimi H, Bonakdari H, Ebtehaj I (2019) Design of radial basis function-based support vector regression in predicting the discharge coefficient of a side weir in a trapezoidal channel. Appl Water Sci 9(4):78CrossRefGoogle Scholar
- Baofeng G, Gunn SR, Damper RI, Nelson JDB (2008) Customizing kernel functions for SVM-based hyperspectral image classification. IEEE Trans Image Process 17(4):622–629CrossRefGoogle Scholar
- Carollo FG, Ferro V, Pampalone V (2017) Testing the outflow process over a triangular labyrinth weir. J Irrig Drain Eng 143(8):06017007CrossRefGoogle Scholar
- Crookston BM, Tullis BP (2012a) Arced labyrinth weirs. J Hydraul Eng 138(6):555–562CrossRefGoogle Scholar
- Crookston BM, Tullis BP (2012b) Discharge efficiency of reservoir application specific labyrinth weirs. J Irrig Drain Eng 138(6):773–776CrossRefGoogle Scholar
- Crookston BM, Tullis BF (2013) Hydraulic design and analysis of labyrinth weirs. I: discharge relationships. J Irrig Drain Eng 139(5):363–370CrossRefGoogle Scholar
- Dabling MR, Tullis BP, Crookston BM (2013) Staged labyrinth weir hydraulics. J Irrig Drain Eng 139(11):955–960CrossRefGoogle Scholar
- Daneshfaraz R, Ghaderi A (2017) Numerical investigation of inverse curvature ogee spillway. Civ Eng J 3(11):1146–1156CrossRefGoogle Scholar
- Daneshfaraz R, Kaya B (2008) Solution of the propagation of the waves in open channels by the transfer matrix method. Ocean Eng 35(11–12):1075–1079CrossRefGoogle Scholar
- Daneshfaraz R, Joudi AR, Ghahramanzadeh A, Ghaderi A (2016) Investigation of flow pressure distribution over a stepped spillway. Adv Appl Fluid Mech 19(4):811Google Scholar
- Daneshfaraz R, Minaei O, Abraham J, Dadashi S, Ghaderi A (2019) 3-D Numerical simulation of water flow over a broad-crested weir with openings. ISH J Hydraul Eng. https://doi.org/10.1080/09715010.2019.1581098 CrossRefGoogle Scholar
- Dibike Y, Velickov S, Solomatine D, Abbott M (2001) Model induction with support vector machines: introduction and applications. J Comput Civ Eng 15(3):208–216CrossRefGoogle Scholar
- Ghorbani MA, Khatibi R, Hosseini B, Bilgili M (2013) Relative importance of parameters affecting wind speed prediction using artificial neural networks. Theor Appl Climatol 114(1–2):107–114CrossRefGoogle Scholar
- Ghorbani MA, Ahmad Zadeh H, Terzi IMO (2016) Comparative study of artificial neural network (MLP, RBF) and support vector machine models for river flow prediction. Environ Earth Sci 75(6):461–476CrossRefGoogle Scholar
- Juma IA, Hussein H, AL-Sarraj M (2014) Analysis of hydraulic characteristics for hollow semi-circular weirs using artificial neural networks. J Flow Meas Instrum 38:49–53CrossRefGoogle Scholar
- Kabiri-Samani A, Javaheri A, Borghei SM (2013) Discharge coefficient of a rectangular labyrinth weir. Proc Inst Civ Eng Water Manag 166(8):443–451CrossRefGoogle Scholar
- Karami H, Karimi S, Bonakdari H, Shamshirband S (2018) Predicting discharge coefficient of triangular labyrinth weir using extreme learning machine, artificial neural network and genetic programming. Neural Comput Appl 29(11):983–989CrossRefGoogle Scholar
- Kavzoglu T, Colkesen I (2009) A kernel functions analysis for support vector machines for land cover classification. Int J Appl Earth Obs Inf 11(5):352–359CrossRefGoogle Scholar
- Moazamnia M, Hassanzadeh Y, Nadiri AA, Khatibi R, Sadeghfam S (2019) Formulating a strategy to combine artificial intelligence models using Bayesian model averaging to study a distressed aquifer with sparse data availability. J Hydrol 571:765–781CrossRefGoogle Scholar
- Nadiri AA, Gharekhani M, Khatibi R, Sadeghfam S, Moghaddam Asghari A (2017) Groundwater vulnerability indices conditioned by supervised intelligence committee machine (SICM). Sci Total Environ 574:691–706CrossRefGoogle Scholar
- Nadiri AA, Sedghi Z, Khatibi R, Sadeghfam S (2018) Mapping specific vulnerability of multiple confined and unconfined aquifers by using artificial intelligence to learn from multiple DRASTIC frameworks. J Environ Manage 227:415–428CrossRefGoogle Scholar
- Parsaie A (2016) Predictive modeling the side weir discharge coefficient using a neural network. Model Earth Syst Environ 2(2):63CrossRefGoogle Scholar
- Roushangar K, Alami MT, Majedi Shiri J, Asl M (2017) Determining discharge coefficient of the labyrinth and arced labyrinth weirs using support vector machine. Hydrol Res 49(3):924–938CrossRefGoogle Scholar
- Sadeghfam S, Daneshfaraz R, Khatibi R, Minaei O (2019) Experimental studies on scour of supercritical flow jets in upstream of screens and modelling scouring dimensions using artificial intelligence to combine multiple models (AIMM). J Hydroinform. https://doi.org/10.2166/hydro.2019.076 CrossRefGoogle Scholar
- Seo IW, Do KY, Park YS, Song CG (2016) Spillway discharges by modification of weir shapes and overflow surroundings. Environ Earth Sci 75(6):496CrossRefGoogle Scholar
- Tullis JP, Amanian NA, Waldron D (1995) Design of labyrinth spillways. J Hydraul Eng 121(3):247–255CrossRefGoogle Scholar
- Zahabi H, Torabi M, Alamatian E, Bahiraei M, Goodarzi M (2018) Effects of geometry and hydraulic characteristics of shallow reservoirs on sediment entrapment. Water 10(12):1725CrossRefGoogle Scholar
- Zhou Q, Zhou H, Zhou Q, Yang F, Luo L, Li T (2015) Structural damage detection based on posterior probability support vector machine and Dempster-Shafer evidence theory. Appl Soft Comput 36:368–374CrossRefGoogle Scholar

## Copyright information

**Open Access**This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.