## Simulating the Discharge Coefficient of an Improved Triangular Side Weir using a Novel Hybrid Method of Firefly Optimization based Support Vector Regression

### Amir Hossein Zaji^{1} and Hossein Bonakdari^{2}*

^{1}Department of Civil Engineering, Razi University, Kermanshah, Iran

^{2}Department of Civil Engineering, Razi University, Kermanshah, Iran

**Submission:** December 07, 2017; **Published:** March 19, 2018

***Corresponding author:** Amir Hossein Zaji, Department of Civil Engineering, Razi University, Kermanshah, Iran, Tel: +98 831 427 4537; Fax: +98 831 428 3264; E-mail: bonakdari@yahoo.com

**How to cite this article:** Amir H Z, Hossein B.Simulating the Discharge Coefficient of an Improved Triangular Side Weir using a Novel Hybrid Method of Firefly Optimization based Support Vector Regression. Civil Eng Res J. 2018; 3(5): 555625. DOI:10.19080/CERJ.2018.03.555625

**Abstract**

The discharge coefficient of side weirs is the most important required information in designing side weirs and tributary channels. An accurate discharge coefficient method needs to do a trustable design. The aim of this paper is to introduce and compare the Firefly optimization- based Support Vector Regression (FFSVR) with other powerful artificial intelligence approaches, including Artificial Neural Network (ANN), Genetic Programming (GP) and Support Vector Regression (SVR) to predict the discharge coefficient of an improved shape, triangular side weir. According to the results, the FFSVR model with RMSE of 0.035 performed the best among ANN, GP and SVR, with RMSE of 0.036, 0.040 and 0.039 in the test dataset, respectively. It can be concluded that combining the Firefly optimization algorithm with SVR can produce a higher- performance model.

**Keywords:** Artificial neural network, Discharge coefficient, Firefly optimization algorithm, Genetic programming, Support vector regression,Triangular side weir

**Abbreviations:** MLPNN: Multi-Layer Perceptron Neural Network; RBNN: Radial Basis Neural Network; PSO: Particle Swarm Optimization; GA: Genetic Algorithm

**Introduction**

Side weirs are always used in a wide range of hydraulic structures, including irrigation and drainage systems, diverting and dividing flow structures, as well as flood control utilities. The first study to mathematically describe side weir flow was under taken by De Marchi [1]. The author presented the following equation using the constant specific energy assumption for the upstream and downstream of the side weir.

Where *Cd* is the discharge coefficient, *w* weir height, flow depth and variation of discharge with respect to distance along the main channel. The first side weirs that were practically employed had a rectangular shape. Determining the discharge of such side weirs is a topic of interest in many studies [2-7].

For a side weir to pass additional flow, the one option is to increase the side weir length. Increasing the length of the side weir can be done in two ways. One way is to increase the tributary channel width, or second, the side weir shape can be modified.Obviously, the second way is much more economical than the first. Therefore, numerous studies have focused on modifying the shape of side weirs [8-12]. Geometric modification can help increase side weir performance by 1.5 to 4.5 times [13].

On account of the complex nature and various geometric and hydraulic dependencies of discharge coefficient conditions, different soft computing methods are often used as a fast and accurate means of predicting the discharge coefficient [13-16]. The discharge coefficient of the triangular side weir that is considered in the present study is modelled in various studies. Zaji and Bonakdari [17] are modelled the present side weir discharge coefficient using Multi-Layer Perceptron Neural Network (MLPNN), Radial Basis Neural Network (RBNN), and Particle Swarm Optimization (PSO) based equations. Zaji et al. [18] modelled the considered side weir discharge coefficient using a hybrid method of PSO based RBNN. The authors concluded that PSO improved the RBNN prediction performance. By using ANFIS there are two studies in simulating the discharge coefficient of the present side weir [19,20]. The authors concluded that ANFIS has a high capability in simulating the present side weir discharge coefficient.

To enhanceneural network performance, one possibility is to combine the neural networks with optimization algorithms [21-25]. In this study a hybrid combination of Support Vector Regression method with Firefly optimization algorithm (FFSVR) is introduced and compared with three well-known artificial intelligence techniques, namely ANN, GP and SVR. To compare the models, the discharge coefficients of the improved side weir were predicted and verified using a published experimental dataset [26].

**Materials and Methods**

**Experimental dataset**

Borghei and Parvaneh [26] experimental dataset for an improved triangular side weir was used to verify and compare the FFSVR, SVR, GP and ANN methods. The authors introduced a new side weir shape that could increase the pass discharge ability up to two times (Figure 1). The experiments were done in a glass channel with 11m length, 0.4m width and 0.66m height.

Various hydraulic and geometric conditions were considered in the experimental study. The interval of this verification is shown in Table 1.inth side weir [26].

**Numerical models**

**Artificial neural network (ANN):** The back propagation learning algorithm artificial neural network has been widely used in numerous studies. An ANN model consists of three major layers: input, hidden and output layers. Each layer comprises neurons. The neurons of the input and output layers are the input and output variables of the problem, respectively. The back propagation algorithm attempts to determine the weight and bias of each neuron. The neurons in each layer calculate the weighted summation of the last layer's neurons and bias values and place this summation in the transfer function. Neurons can use many transfer functions with the hyperbolic transform function being the most common [14,27,28] and defined as follows:

In this study, the input layer consists of the considered non- dimensional parameters of the improved triangular side weir and the output layer is the discharge coefficient. Details of the ANN algorithm are given in [29,30].

**Genetic programming (GP):** Genetic Programming [31], a subset of the Genetic Algorithm (GA) [32], is a program- based method that uses the symbolic form of programs as chromosomes. The initial population is selected randomly. Each individual of the population is a randomly generated program made from random input combinations, random arithmetic (+, -, x, ÷) and mathematical functions (sin, cos, etc.), and random logical functions (NOT, AND, OR, etc.). By using the fitness function, each individual cost is calculated. Subsequently, the individuals (programs) with the best costs are selected to perform the crossover and mutation process. Crossover is meant to change the parts of two programs with each other and mutation is to randomly change a program to create new programs. This evolution is repeated to achieve the defined stop criterion. The output of the program is a program that could predict the discharge coefficient of improved triangular side weir by using the non-dimensional input parameters. The GP procedure is presented in more detail in [33,34].

**Support vector regression (SVR):** Support vector regression is a high-performance method capable of handling regression and classification problems much better than other neural networks [35,36]. Most of the other machine learning methods are performed from local training errors in their training process, but SVR uses upper band generalization error minimization in the training process [37]. SVR is described in detail in [38,39]. In this study, an SVR model with RBF kernel function was used to model the discharge coefficient of the improved triangular side weir. RBF kernel function scan handle complex problems more accurately than other kernel functions [37,40]. An RBF kernel function is defined as:

**Firefly optimization-based support vector regression (FFSVR):** The accuracy of SVR model prediction is directly related to the correct specification of model variables. In this study, the optimal values of SVR variables were determined using the Firefly optimization algorithm [39]. The Firefly algorithm can perform much better in finding the optima compared to other evolutionary optimization algorithms [40-43]. The basic steps of the Firefly algorithm are summarized in Figure 2.

**Results**

Improved triangular side weir discharge coefficient is related to various geometric and hydraulic situations, such as length (*L)*) , height (*w*), weir apex angle *(ϕ)* , flow depth (y,), upstream Froude number ( *F _{1}* ) and upstream discharge

*(Q*. To run a numerical model to be used in practical and scientific processes without concern about the geometric and hydraulic scales, it is ideal to use non-dimensional input variables. Thus, ten non-dimensional input variables were performed using the efficient variables. Here, the numerical methods FFSVR, SVR,ANN and GP were used to model the discharge coefficient of an improved triangular side weir with the input variables:

_{1})Figure 3 shows the scatter plot and statistic errors of the investigated model for training and testing. From this figure, it can be concluded that the FFSVR model with RMSE, MAE and of 0.035, 0.026 and 4.218, respectively, performed best among the investigated models.

The trend line equation of each model is shown in Figure 3. The form of a linear trend line equation is *y = C _{1}x + C_{2}* . It is obvious that as

*C*approaches one and C

_{1}_{2}approaches zero,the model is more fit to the experimental results. The figure shows that the FFSVR model with

*C*equaling 0.976 and 0.912 in the trainin and testin data respectively, could predict the improved triangular side weir more accurately.

_{1}Figure 3 indicates that for all four models, the performance of training and testing data is very similar. This is indicative that the models were not trapped in over-fitting. Over-fitting occurs when the instruments used to design the model are more than enough. Thus, in an over-fitting situation, the performance of the training dataset prediction is significantly better than the testing dataset.

**Conclusion**

In this study, the Firefly optimization algorithm was combined with an SVR model to achieve a new, powerful hybrid method, the FFSVR. The performance of the FFSVR was then investigated and compared with the three most applied artificial intelligence methods: SVR, ANN and GP. The output of the models was the discharge coefficient of an improved triangular side weir, and the inputs were ten non-dimensional parameters obtained from the main parameters: *w*, *L ,θ* ,y, , *b* and *F _{l}* .The results signify that the FFSVR with RMSE of 0.035 in the test dataset achieved the highest performance among all investigated models. It can be concluded that the Firefly optimization algorithm can be successfully combined with the SVM method to increase the model's ability to predict accurately.

**References**

- De Marchi G (1934) Saggio di teoria del funzionamento degli stramazzi laterali. L Energia elettrica 11(11): 849-860.
- Ghodsian M (2003) Supercritical flow over a rectangular side weir. Can J Civ Eng 30(3): 596-600.
- Muslu Y (2001) Numerical analysis of lateral weir flow. J Irrig Drain Eng 127(4): 246-253.
- Muslu Y, Tozluk H, Yuksel E (2003) Effect of lateral water surface profile on side weir discharge. J Irrig Drain Eng 129(5): 371-375.
- Singh R, Manivannan D, Satyanarayana T (1994) Discharge coefficients of rectangular side weirs. J Irrig Drain Eng 120(4): 814-819.
- Swamee PK, Pathak SK, Ali MS (1994) Side weir analysis using elementary discharge coefficient. J Irrig Drain Eng 120(4): 742-755.
- Yuksel E (2004) Effect of specific energy variation on lateral overflows. Flow Meas Instrum 15(5-6): 259-269.
- Aydin MC, Emiroglu ME (2013) Determination of capacity of labyrinth side weir by CFD. Flow Meas Instrum 29(2013): 1-8.
- Bautista-Capetillo C, Robles O, Junez-Ferreira H, Playan E (2014) Discharge coefficient analysis for triangular sharp-crested weirs using low-speed photographic technique. J Irrig Drain Eng 140(3).
- Emiroglu EM, Aydin CM, Kaya N (2014) Discharge Characteristics of a Trapezoidal Labyrinth Side Weir with One and Two Cycles in Subcriti- cal Flow. J Irrig Drain Eng 140(5).
- Emiroglu ME, Kaya N, Agaccioglu H (2010) Discharge capacity of labyrinth side weir located on a straight channel. J Irrig Drain Eng 136(1): 37-46.
- Mirnaseri M, Emadi A (2013) Hydraulic performance of combined flow rectangular labyrinth weir-gate. Middle East J Sci Res 18(9): 13351342.
- Bilhan O, Emin Emiroglu M, Kisi O (2010) Application of two different neural network techniques to lateral outflow over rectangular side weirs located on a straight channel. Adv Eng Software 41(6): 831-837.
- Emiroglu ME, Bilhan O, Kisi O (2011) Neural networks for estimation of discharge capacity of triangular labyrinth side-weir located on a straight channel. Expert Sys Appl 38(1): 867-874.
- Kisi O, Emin Emiroglu M, Bilhan O, Guven A (2012) Prediction of lateral outflow over triangular labyrinth side weirs under subcritical conditions using soft computing approaches. Expert Sys Appl 39(3): 34543460.
- Onen F (2014) Prediction of Scour at a Side-Weir with GEP, ANN and Regression Models. Arab J Sci Eng 39(8): 6031-6041.
- Zaji AH, Bonakdari H (2014) Performance evaluation of two different neural network and particle swarm optimization methods for prediction of discharge capacity of modified triangular side weirs. Flow Measurement and Instrumentation 40: 149-156.
- Bonakdari H, Zaji AH, Shamshirband S, Hashim R, Petkovic D (2015) Sensitivity analysis of the discharge coefficient of a modified triangular side weir by adaptive neuro-fuzzy methodology. Measurement 73: 74-81.
- Zaji AH, Bonakdari H, Shamshirband S, Qasem SN (2015) Potential of particle swarm optimization based radial basis function network to predict the discharge coefficient of a modified triangular side weir. Flow Measurement and Instrumentation 45: 404-407.
- Shamshirband S, Bonakdari H, Zaji AH, Petkovic D, Motamedi S (2016) Improved side weir discharge coefficient modeling by adaptive neu- ro-fuzzy methodology. KSCE Journal of Civil Engineering: 1-7.
- Hotta TK, Balaji C, Venkateshan SP (2015) Experiment driven ANN-GA based technique for optimal distribution of discrete heat sources under mixed convection. Exp Heat Transf 28(3): 298-315.
- Nath M, Ray S, Gupta B (2013) Optimal design of a waveguide bandpass filter using ANN-GA algorithm. Microw Rev 19(1): 8-13.
- Sivapathasekaran C, Sen R (2013) Performance evaluation of an ANN- GA aided experimental modeling and optimization procedure for enhanced synthesis of marine biosurfactant in a stirred tank reactor. J Chem Technol Biotechnol 88(5): 794-799.
- Wang Jx, Zuo Sl (2013) Vulcanizing process parameter optimization based on RBF-GA algorithm. Metal Int 18(1): 76-80.
- Zhang R, Tao J, Gao F (2014) Temperature modeling in a coke furnace with an improved RNA-GA based RBF network. Ind Eng Chem Res 53(8): 3236-3245.
- Borghei SM, Parvaneh A (2011) Discharge characteristics of a modified oblique side weir in subcritical flow. Flow Meas Instrum 22(5): 370-376.
- Pierini JO, Gomez EA, Telesca L (2012) Prediction of water flows in Colorado River, Argentina. Lat Am J Aquatic Res 40(4): 872-880.
- Zadeh MR, Amin S, Khalili D, Singh VP (2010) Daily Outflow Prediction by Multi Layer Perceptron with Logistic Sigmoid and Tangent Sigmoid Activation Functions. Water Resour Manage 24(11): 2673-2688.
- Haykin S (2004) A comprehensive foundation. Neural Networks 2.
- Karunanithi N, Grenney WJ, Whitley D, Bovee K (1994) Neural networks for river flow prediction. J Irrig Drain Eng 8(2): 201-220.
- Koza JR (1992) Genetic programming: on the programming of computers by means of natural selection. MIT press.
- Holland JH (1975) Adaptation in natural and artificial systems: An introductory analysis with applications to biology, control, and artificial intelligence. U Michigan Press.
- Babovic V, Keijzer M (2002) Rainfall-runoff modelling based on genetic programming. Nord Hydrol 33(5): 331-346.
- Khu ST, Liong SY, Babovic V, Madsen H, Muttil N (2001) Genetic programming and its application in real-time runoff forecasting. J Am Water Resour Assoc 37(2): 439-451.
- Huang C, Davis LS, Townshend JRG (2002) An assessment of support vector machines for land cover classification. Int J Remote Sens 23(4): 725-749.
- Vapnik V, Golowich SE, Smola A (1997) Support vector method for function approximation, regression estimation, and signal processing. In Advances in Neural Information Processing Systems, Denver, CO, Neural information processing systems foundation, pp. 281-287.
- Jahangirzadeh A, Shamshirband S, Aghabozorgi S, Akib S, Basser H, et al. (2014) A cooperative expert based support vector regression (Co-ESVR) system to determine collar dimensions around bridge pier. Neurocomputing 140(2014): 172-184.
- Rajasekaran S, Gayathri S, Lee TL (2008) Support vector regression methodology for storm surge predictions. Ocean Eng 35(16): 15781587.
- Yang H, Huang K, King I, Lyu MR (2009) Localized support vector regression for time series prediction. Neurocomputing 72(10-12): 26592669.
- Shamshirband S, Petkovic D, Javidnia H, Gani A (2014) Sensor data fusion by support vector regression methodology-a comparative study. Sens J IEEE PP(99): 1-1.
- Fister Jr I, Yang XS, Brest J (2013) A comprehensive review of firefly algorithms. Swarm Evol Comput 13(2013): 34-46.
- Pal SK, Rai CS, Singh AP (2012) Comparative study of firefly algorithm and particle swarm optimization for noisy non-linear optimization problems. Int j intell syst appl 4(10): 50-57.
- Yang XS (2013) Multiobjective firefly algorithm for continuous optimization. Eng Comput 29(2): 175-184.