Discharge predicted in compound channels using adaptive neuro - fuzzy inference system ( ANFIS )

: Some hydraulic structures and phenomena, including compound channels, must be studied in rela - tion to open channel ﬂ ow. Despite the fact that the pri - mary channel and watersheds share a similar degree of roughness, estimating discharge in composite channels with mainstreams and ﬂ ood plains has proved tricky. The ﬂ ow discharge for a compound channel with di ﬀ erent roughness in the primary and ﬂ ood plain channels has been studied, and the results computed experimentally using horizontal division level have been compared with those predicted using dimensional analysis and an adap - tive neuro - fuzzy inference system. The results show good agreement between experimental and numerical for dis - charge calculation according to root - mean - square error, MARE, R 2 , SI, and Nash – Sutcli ﬀ e e ﬃ ciency, with a per - centage error not exceeding ± 5%.


Introduction
Most waterways have irregular shapes and sections that do not resemble simple rectangular, trapezoidal, or triangle channels. These passages are filled with water during the full flood, causing water to cross into neighboring lands known as flood plains, and often they are filled with plants that obstruct the flow compared to the main channel. Zheleznyakov [1] conducted the first study of the complex channels that consist of a primary canal, as well as flood plains. Therefore, the friction resistance of the primary channel is less than that of the plains susceptible to flooding [2]. Despite the many methods of measuring discharge in the compound channels, it still gives unconvincing results because a large number of data are collected and applied to small-and large-sized laboratory channels [3]. Parsaie and Haghiabi [4] conducted a study employing mathematical approaches like principal component analysis to compute the discharge coefficient in side weir principal component analysis (PCA). The Froude number and the proportion of the elevation of the weir to the level of flowing upstream of the weir were shown to be among the most impactful parameters on the discharge coefficient. Relying on PCA was essential to prepare the optimum source using the neural-a-physical adaptive neuro-fuzzy inference system (ANFIS), in which five and four organic functions were used for the Froude number and the proportion of the flowing height to the weir. The researchers [5] investigated product shear stress in symmetrical compounded conduits of smooth and rocky flood plains. RF = random forest, random tree, tree pruning line reduction, and distinctive hybrid M5P were used. The findings revealed that the best estimate of RF was obtained when the number of inputs was six. When the number of input variables is four, it gives the best results compared to other models. Haghiabi et al. [6] conducted a study on the triangular zigzag weirs to find out the discharge coefficient using multi-layer neural networks multilayer perceptron (MLP) and ANFIS. Essential factors for the gamma test test are the ratio of the weir length edge to the main channel width, the percentage of one cycle duration to the breadth, and the balance of total water height in front of the weir to the weir height. In addition, the results showed that both MLP and ANFIS gave acceptable results and that the ANFIS model is considered the best. Bousmar [7] studied the model of exchange discharge using the one-dimensional approximation and the model of exchange discharge exchange discharge model (EDM). Use EDM to calculate the momentum transfer between the sub-channel sections estimated in proportion to the velocity gradient and exchange discharge through the interface. Two main types of exchange processes can be characterized: the first is turbulent exchange due to the development of the shear layer, and the second is geometric exchange due to the change of section. The study showed that using EDM gave good results for estimating the discharge. Under flood conditions, the flow velocity in the flood plain is less than that in the main channel, leading to a momentum transfer. Studies have proven that the variation in the flow depth in the main channel and the width of the main channel affect the coefficient of friction, while the slope of the bank sides does not affect the coefficient of friction, Cfa. The study of Moreta and Martin-vide [8] proved that it is necessary to know the effect of gradient velocity, roughness, and channel shape in estimating shear stress because it is complicated to find the gradient velocity without a detailed measurement. The Cfa does not have high accuracy when changing the channel shape and roughness. Huai et al. [9] reached the possibility of using the technique of artificial neural networks (ANNs) in estimating momentum transfers in the main channel and flood plains with the presence or absence of vegetation cover. Bonakdari et al. [10] estimated shear stress using genetic algorithms (ANN) and genetic programming (GP) with multiple linear regression (MLR). Their study showed that the genetic algorithm analysis method gives better results than the GP and MLR methods. The matrix principles were also used to predict the shear stress. In addition, one of the limitations that causes software weakness is the presence of data outside the learning values [11,12]. Computer programs have been widely used for comparison with other methods. ANNs, fuzzy logic (FL), and ANFIS have been used to overcome the weaknesses of individual models with high efficiency. Khosravi et al. [12] proved that although the hybrid models have higher prediction than individual ANNs and FLs, they suffer from the weakness of finding the best parameter for the FL and fuzzy networks model as well as the best weight in the organic analysis function. Naik et al. [13] studied numerical analysis depththe rate of velocity distribution in composite channels and flood plains. Initially, 3D computer fluid dynamics was applied to establish a database under different conditions. The researcher used the technique of ANNs for training based on the backpropagation neural network to estimate the depth of the rate of velocity distribution in the stenosis segments. The investigation concentrated on the capacity of computer programs to correctly guess the complex flow phenomenon that occurs in the channels.
The present study relied on calculating the discharge for each main compound channel and flood plain from the experimental data and compared the results with theoretical equations and the results deduced from ANFIS.

Experimental setup
According to ref. of the compound flume is 6 m, and the primary flume is split into two sections (major channel 10 cm wide and flood plain 20 cm width), 3,660 cubic wooden pieces (1 × 1 × 1 cm 3 dimensions), and cylindrical pieces of 1 cm diameter and 1 cm width were installed in the main and flood plain channels at a line distance 1 cm between ( Figure 2). The experiments were conducted using cubic and cylindrical pieces in five different Manning roughness conditions by changing the distance between cubic pieces along the flood plain Nf (flood plain Manning roughness). In contrast, n b (the main channel Manning roughness) remains constant, so nine different Nf/n b were used, Table 1. Five different discharges were taken for all these cases as 45 experiments in each water depth were measured at three different places: the entrance, middle, and end of the composite conduit across the primary and flood channels using a point gauge with an accuracy of 0.1 mm, the velocity measurement was taken using a pitot tube in a different section of the main and flood channels. The discharge measurements were done by a standard sharp-crested weir (30 × 35 × 0.6 cm 3 dimensions) installed at 85 cm from the channel entrance. Calibration was done before experiments using a volumetric method to calculate the actual discharge. The following equation is used to estimate discharge: where Q a is actual discharge (L/s) and H w is the water depth above the standard weir (cm).

Theoretical methodology
The flow in the rivers and compound channels is very complex because of the relative motion, mass, and energy between the primary flume and the flood stream. However, different from theoretically studying this phenomenon, there have not been purely mathematical analyses considering the additional losses resulting from this complex physical phenomenon. Therefore, attention turned to practical methods based on experimental observations to design composite channels. The practical methods used to find the discharge in all complex channels were based on dividing the total section into homogeneous parts using imaginary levels in the contact areas of the details.
One of the most fundamental, accessible, and widely used imaginary division levels were the vertical (V), horizontal (H), diagonal (D), and zero (Z) division levels ( Figure 3).
The discharge of the composite channel is computed as follows: where Q i is the discharge at section (i), A i is the area in paragraph (i), R i is the hydraulic radius at section (i), n i is the Manning roughness at section (i), S is the channel slope, m is the number of compound sections, and Q c is the compound discharge. This study used the horizontal division (H) to calculate the theoretical discharge in a compound channel.

Horizontal division level (He)
The whole section is divided using the horizontal division plane (a-c), as shown in Figure 3, and the division plane does not enter the wet boundary of the main canal and flood plain:

Manning roughness coefficient
In the compound channels, the Manning roughness coefficient of the flood envelope is usually more significant than the coefficient of the roughness of the main channel; it has been artificially roughed to obtain the Manning roughness coefficient of the flood envelope. In this study, wooden cubes were used in the first model and wooden discs in the second model. In the second model with the same method and by-passing discharges inside the main channel only whose bottom is rough with the same roughness conditions for the flood envelope bottom during the experiments and by measuring the release and depth, the Manning roughness coefficient was obtained by applying the [15] method that includes the following relationships: where Q is the discharge pass through the canal (m 3 /s); R b is the hydraulic radius to the bottom (m); R w is the hydraulic radius for the main canal wall (m); n w is the Manning coefficient for the canal wall (0.011 s/m 1/3 ); u is the average velocity of flow (m/s); D 1 is the theoretical depth (m); and n b is the Manning roughness coefficient for the bed (s/m 1/3 ).

Dimensional analysis
The By using Buckingham's theory as well as combining and neglecting some parameters because they are constant according to experimental results and the Reynolds number because of the turbulent flow, then equation (9) can be written as follows:

Adaptive neuro-fuzzy inference systems (ANFIS):
Based on the input and output data, ANFIS is a potent modeling instrument for complicated systems. ANFIS is accomplished by optimally combining neural and fuzzy systems. This particular combo allows both numerical and intelligent methods to be employed. In fuzzy systems, many fuzzifications and profoundly changing algorithms with unique rules are investigated for each input parameter. There are three steps to consider when calculating the influence of FL on incoming dataone-by-one selection of every variable's transfer function. A Gaussian function may be considered for each input variable at this step. For example, fuzzy thinking is shown in Figure 4. A fuzzy system with three variable inputs and a single output was investigated. Consider a rule base that has three if-then rules that are ambiguous: Rule 1: if x is A1 and y is B1 then f1 = p1x + q1y + r1 Rule 2: if x is A2 and y is B2 then f2 = p2x + q2y + r2 Rule 3: if x is A3 and y is B3 then f3 = p3x + q3y + r3 in which A1, A2, A3 and B1, B2, B3 are the membership functions for inputs x and y, respectively; p1, q1, r1, p2, q2, r2 and p3, q3, r3 are the parameters of the output function.
As shown in Figure 4, the ANFIS architecture is composed of four layers: in the first layer, all input variables are multiplied by a transfer function to provide the degree of organization; in the second layer, all stages of membership are standardized; in the third level, the sum of all calculated rules' contributions; and in the fourth level, the overall contribution is added. An average weightedgrade membership [16][17][18][19][20][21].
9 Results and discussions 9

.1 Data collection and preparation
To estimate minor discharges, a computer-based approach is utilized partial derivative (PD). A modular FL system was created, with a distinct FL engine built to identify each form of PD defect. The entry values are selected from a set of integrated variables and numerical moments that are routinely used to define phase-resolved PD patterns.
The parameters of the dimensional analysis (B m , N m , N f , N m , h, and H) are used as input for the FL model, and Q c is the output of the FL model ( Figure 5).
The code for the toolbox is included in the MATLAB application. of FL with various FL architectures for model computation. The output results compared between experimental and training data for various iterations are shown in Figure 6.
The measure that evaluates recorded and computed Q c for all composite channel data investigated in this study demonstrates excellent agreement between the data and these findings after (15) iterations with R 2 = 0.99 (Figure 7).

Results indexes
The qualitative results of the available equations are also computed and characterized in terms of the coefficient of determination (R 2 ), root-mean-square error (RMSE), scatter index (SI), and mean absolute relative error (MARE). The determination coefficient is the   fraction of the dependent variable's variation that can be predicted from the independent factors. It typically runs from 0 to 1. The RMSE is also used to assess the disparity between what a model predicts and what the modeled entity does. RMSE is a commonly used error-index metric that is defined as follows: The SI is calculated by dividing the RMSE at each grid point by the average of the observations and then multiplying the result by 100. Regarding the mean remark, it provides the proportion of the RMSE difference or the percentage of anticipated error for the parameter and is defined as follows: MARE is a loss function for machine learning regression problems that are often used to measure the accuracy of an estimated system's prediction in statistics. Typically, precision is expressed as a ratio determined by the following formula: The Nash-Sutcliffe efficiency correlation was used to evaluate the forecasting capability of hydrological studies. Compared to the computed data variance, the mathematically verified data variance indicates the number of response values ("noise"). It demonstrates how well the plot of actual data against predicted data aligns with the 1:1 axis. It is described as follows: where E = 1 shows a perfect match between the predicted discharge coefficient and the data collected; E = 0 means that the model is as powerful as the normal of the available data; and -E0 denotes that the detected median value is superior to the model, indicating that the results are undesired. The MLR from the dimensional analysis model and ANFIS predicted and the results calculated using imaginary division (horizontal divisions, He and Hi) results satisfactorily compared to the available discharge equations for the compound channel, Table 2.
The qualitative performance of the present dimensional analysis equation MLR has a low RMSE (0.295), MARE (0.0278), SI (0.0403), a high Nash-Sutcliffe efficiency (NSE) and R 2 (0.971), and (98.27%), respectively. In contrast, the ANFIS model has the lowest RMSE (0.0611), MARE (0.0045), SI (0.0083), and highest NSE and R 2 (0.998), and (99.91%), respectively, which indicates that it has better performance as compared to other existing predictors. Figure 8 demonstrates the relationship between discharge observed from data from experiments and that predicted using imaginary division, MLR, and ANFIS. From the figure, it is clear that the percent error does not exceed ±5%. Therefore, the ANFIS models are recommended for general use to predict the discharge of compound channel.

Conclusions
The discharge compound channel was predicted in this study using imaginary horizontal divisions He and Hi, MLR (from dimensional analysis), and the ANFIS approach and then compared using RMSE, MARE, SI, R 2 , and NSE. In this investigation, the ANFIS approach yielded the highest results compared to others by 0.0611, 0.0045, 0.0083, 0.998, and 99.91%, respectively, with percentage error not exceeding ±5%, which indicates that it has better performance as compared to other existing predictors.   Figure 8: The comparison between discharge computed using different methods.