A Piano Key Weir (PKW) is a nonlinear (labyrinth-type) weir with a small spillway footprint and a large discharge carrying capacity. It (PKW) enables water bodies to continue functioning at elevated supply levels while causing no damage to dam structures, resulting in increased storage. PKW's geometrical structure is extremely complex, and geometrical aspects have a significant impact on its efficiency and on energy dissipation. Among them relative width ratio (Wi/Wo) (i.e., inlet to outlet key width ratio) is a critical parameter that affects the PKW's discharge efficiency, and energy dissipation across the weir significantly. This study predicts the PKW's inlet to the outlet key ratio and understands the resulting hydraulic behaviours based on a Fuzzy Neural Network (FNN). The dataset used in this study was collected experimentally, which adds to the study's authenticity because it is not a conventional dataset. The model's performance is evaluated by the Root Mean Square Error (RMSE) and Mean Absolute Error (MAE); both values are 0.0305 and 0.0222, respectively. According to the dataset, these scores tell the model's reliability as it is in the ideal range. The FNN approach can be applied in a variety of fields to predict or solve different problems erent problems.

  • This study aims to predict the optimum inlet-to-outlet key width ratio of PKWs based on a Fuzzy Neural Network (FNN) computation.

  • Studying the effects of width ratio on energy dissipation of piano key weirs.

  • Studying and comparing the energy dissipation of the different width ratios of piano key weirs.

P

PKW's height

L

Overall development length

W

Weir's width

Ht

Cumulative head over the weir

Wi

Width of inlet key

Wo

Width of outlet key

N

Cycle number

Si

Slope of inlet key

So

Slope of outlet key

Bi

Length of inlet key

Bo

Length of outlet key

CDL

Coefficient of discharge along developed crest length

Q

Discharge flow of PKW

EL

Relative energy dissipation

E1 or E2

Energy dissipation in sections 1 and 2

MLPNN

Multi-level perceptron neural network

CWR

Crop water requirement

CIR

Crop irrigation requirement

EC

Electrical conductivity

GCM

General circulation model

NSE

Nash-Sutcliffe efficiency model

CFD

Computational fluid dynamics

ANFIS

Adaptive Neuro-fuzzy Inference System

PSO

Particle swarm optimization

GA

Genetic algorithm

MFO

Moth flame optimization

FA

Factor analysis

SVR

Support vector machine

ANN

Artificial Neural Network

x

Input for the FNN model

Weights associated with ith layer in FNN model

e

Epsilon

Outputs associated with ith layer in FNN model

Partial differentiation

Piano key weir (PKW) is a spillway that is used in water management at dams. In dam engineering, there are height and space restrictions; at that given condition, PKW is a very effective management solution and is nonlinear in design. As the name suggests, it resembles piano keys, a structure where keys are grouped in a stepped manner to serve the purpose. When PKW is compared with traditional linear spillways, it has much better discharge capacity, energy dissipation, and lower material utilization. This is a very cutting-edge structure used to manage and regulate water flows in dams. PKW is an upgraded form of labyrinth weirs, which were first researched by and gained notoriety as a more effective and economical weir (Lempérière & Ouamane 2003). A recent project in France that uses PKW to boost the water release capacity of the country's current suction dams (Laugier et al. 2017) and as a promising solution for dam weir on derailed structures in Vietnam (Khanh 2017) is rapidly increasing. Since 2011, significant knowledge exchange during geographical conferences has guided the compilation of reference material summarizing the current state of PKW technology (Erpicum et al. 2011, 2013, 2017). All around the world, more than 35 PKWs have been successfully built, including in the UK, Algeria, South Africa, France, Switzerland, Vietnam, India, Australia, and Sri Lanka (Crookston et al. 2019).

The first PKWs were built in 2006 at the Goulours Dam in France and more recently at the Hazelmere Dam in South Africa. They significantly increased the possibility of reservoir and spillway release. An upcoming PKW implementation at Tzaneen Dam is in progress (van Deventer et al. 2015). Notably, recent interest in PKW implementations extends to interior weir applications, complementing the primary focus on utilizing PKWs as lateral weirs for runoff release (Karimi et al. 2018). Over the past two decades, detailed summaries of PKW geometry and hydraulic behaviour have been presented by Abhash & Pandey (2020) and Singh & Kumar (2021). Weir altitude (P), relative advancement L/W ratio (crest length), (Ht/P) ratio, alveolar width (Wi/Wo), and cycle number (N) for a constant channel width are geometric parameters that have a significant impact on head-discharge efficiency and energy dissipation (where L is the overall development length, W is weir's width, Ht is cumulative head over the weir, and P is weir altitude). PKW behaviour is further influenced by the type of crest, lengths of overhangs, upstream apex walls, and raising the crest via a parapet wall (Anderson & Tullis 2013). Numerous investigations have explored scientific hypotheses, case studies, and original research on PKW energy loss and labyrinths (Bieri et al. 2011; Ribeiro et al. 2011; Khanh 2013). Silvestri et al. (2013) observed that in PKWs with stepped chutes, residual energy was low at the spillway toe and increased with release and spillway length. Al-Shukur & Al-Khafaji (2018) investigated how the PKW slope affected energy loss and showed that the proportion of energy dissipation decreased as the slope decreased. Computational techniques employing AI models such as MLPNN, ANFIS, PSO, GA, MFO, and FA have been used to define PKW hydraulic behaviour based on geometrical parameters (Zounemat-Kermani & Mahdavi-Meymand 2019). Karbasi & Azamathulla (2016) used GEP for hydraulic jump aspects over a rough bed, comparing its performance with conventional AI approaches SVR and ANN. Many studies have tried to estimate how deep scour can occur along dikes, weirs, and piers that are partially submerged in water (Karbasi & Azamathulla 2016; Pandey et al. 2020; Birbal et al. 2021; Emadi et al. 2022; Singh et al. 2022). Therefore, more new ideas and rivals are needed to improve PKW technology. Comprehensive reviews on PKWs for discharge measurement (Bhukya et al. 2022) and energy dissipation (Silvestri et al. 2013; R. Eslinger & Crookston, 2020; Singh & Kumar, 2022a, 2022b, 2022c, 2023a, 2023b) have been presented, emphasizing the need for robust experimental and computational analyses to better understand PKW hydraulic properties.

Amin et al. (2019) have provided valuable information on energy loss in free streams below rectangular sharp-crested weirs, emphasizing the importance of careful hydraulic system design to enhance efficiency and reduce negative effects on the environment and structure. This study aims to examine how the difference between the width of the air sacs at the entrance and the exit (Wi/Wo) influences the flow and energy loss of PKWs (PKWs). Previous studies have only tried to explore how the Wi/Wo ratio affects the discharge capacity, coefficient, and energy dissipation in PKWs. However, there is still a big lack of knowledge about this topic. Consequently, this experimental investigation was conducted to provide comprehensive insights into how the Wi/Wo ratio impacts hydraulic efficiency and downstream energy dissipation, mainly focusing on type-A PKWs. Pralong et al. (2011) indicated various geometrical parameters associated with PKWs (shown in Figure 1), which are frequently used in design analysis and provide sufficient information about the PKWs. The study utilizes a fuzzy neural network (FNN) to enhance our understanding of this critical PKW design and performance parameter. Poonia et al. (2021a, 2021b, 2021c) focus on the problem of resource distribution and ineffective response to disasters, which makes natural disasters worse. The aim is to resolve issues such as poor coordination, late responses, and corruption among responsible agencies. The author proposes a step-by-step approach to tackle disaster management using blockchain technology; the first step is data management: a blockchain framework that ensures the timely sharing of trustable and traceable records related to various aspects of disasters. The second step is automated aid distribution, built on smart contracts to automate the fast transfer of emergency relief, prevent corruption in its use, and allocate it wisely.
Figure 1

Cross-sectional view of piano key weir (adapted from Pralong et al. (2011)).

Figure 1

Cross-sectional view of piano key weir (adapted from Pralong et al. (2011)).

Close modal

Kumar et al. (2021) reviewed and understood the change in extreme circumstances to develop effective, durable strategies. The document identifies regions in India prone to droughts and floods to prepare in advance and reduce risk. The author offers a solid approach for assessing risks and boosting the resilience of essential infrastructure. The proposed approach first assesses the potential impact of extreme weather on critical infrastructure and then develops strategies that can withstand climate-related challenges. Tiwari et al. (2024) explore the relationship between climate change and water quality by focusing on the electrical conductivity in the Narmada basin. AI techniques can be used to predict water quality. The author develops 10 AI models to predict the EC levels at the Sandia station in the Narmada basin. This information can be used to manage the region's drinking water, irrigation, and other uses. Model 8 performs exceptionally well among all models, with an R2 value of 0.889. Poonia et al. (2021a, 2021b, 2021c) addressed the lack of comprehensive analysis of the joint dependence of drought duration and its effect across Indian river basins. There is a research gap that hinders the development of effective drought strategies. The author suggests modelling the joint dependence structure of drought features using a bivariate copula-based technique. The author aims to identify patterns and hotspots of severe and prolonged drought events across India. Poonia et al. (2021a, 2021b, 2021c) aim to address the research gap related to the unpredictability of climate model projections and scenarios in assessing CWR and CIR in the Eastern region of Himalayan, specifically in Sikkim. Das et al. (2020) provide a thorough analysis of how climate change affects a Sikkim crop field, particularly rice, wheat, and maize. They use calibrated AquaCrop simulations based on historical data to project future crop yields under different emission scenarios and GCMs.

Additionally, they add possibility theory to examine uncertainty with GCMs. Jamal et al. (2024) aim to address the challenge and land loss in states like West Bengal and India. Existing systems for protecting riverbanks include different materials and methods to determine stone size and effectiveness under different temporal variations. The author identifies a lack of research finding the most effective stone for safeguarding against bank failure. The author suggests a way to test how a riverbank reacts to different sizes of stones using a physical model. Poonia & Tiwari (2020) aim to satisfy the demand for rainfall-runoff modelling in Madhya Pradesh's Hoshangabad Narmada River watershed. This area often experiences floods, so it is important to have accurate runoff estimation for good flood management. The author suggests using ANN-based models to simulate water flow in the Hoshangabad area. Different ways of measuring how well the models work is used, such as how close they are to the real data, how much error they have, and how much they improve the results. Kantharia et al. (2024) want to find out how well they can predict the amount of water that flows out of the Damanganga River daily by using information about the rain and the soil. The study's objective is to fill the gap by creating a model using ANFIS that is customized for the Damanganga basin, taking into account soil moisture at various depths as input variables. We measure how well the model fits the data by using two numbers: the R2 and the NSE.

Although there is growing awareness of the urban heat island (UHI) phenomenon and its consequences, Sharma et al. (2023) discovered a scarcity of in-depth investigations on this topic, especially in regions with hot semi-arid climates, such as India. The author's model intends to fill the current knowledge gaps on UHI effects, and it employs remote sensing and geospatial analysis methods to examine how surface temperatures and UHI effects vary throughout the year, especially considering the influence of land use and water body cooling. Baudhanwala et al. (2024) discuss the necessity for accurate rainfall prediction models in regions like South Gujarat, India. Severe rainstorms are happening more often in the area, and this causes problems for water, farming, buildings, and people's lives. The writer utilizes four distinct machine learning (ML) techniques: support vector regression (SVR), multiple linear regression (MLR), decision tree (DT), and random forest (RF). The research suggests that a width ratio between 1.25 and 1.30 provides the best results in terms of hydraulic efficiency, as indicated by the highest discharge coefficient. Beyond this range, energy dissipation increases, yielding diminishing returns. This research offers valuable insights for PKW design and highlights the applicability of FNNs in hydraulic engineering, ultimately enhancing civil engineering and water resource management practices.

A real-world dataset and the suggested strategy were used to demonstrate the contribution. An overview of the contribution would be as follows:

  • The dataset utilized in this research is experimentally obtained and used to evaluate proposed methodologies; it is not pre-defined. The dataset utilized in this work was obtained through experimentation. Unlike traditional methods, which rely on pre-defined datasets, this study offers a unique dataset, enhancing the data's validity.

  • A new model named FNN is proposed; this method has never been used before. The research void in hydraulic behaviour pattern prediction for PKWs will be filled by proposing FNN.

  • A thorough derivation of the tuning of the hyperparameters suggested in FNN is presented in this article. A crucial part of building a model is tuning; the contribution offers a systematic and precise way to adjust the parameters to the specifications. The derivation is novel and contributes to improving the model's performance.

The organization of the article is as follows: Section 2.1 talks about the experimental set-up and dataset used in the process, Section 2.2 shows the methodology used in the article and also the tuning of hyperparameters, then further in Section 3, experimental results are discussed and in Section 4, conclusion is given.

Experimental set-up and model fabrication

In this study, Singh & Kumar (2023a, 2023b) publication of the PKW's width ratio data is used. They performed a series of laboratory experiments using a horizontal flume of a rectangular cross-section of width 0.516 m, height 0.6 m, and length 10 m. The discharge flow rate was measured with an electromagnetic flowmeter within an accuracy limit of ±0.2%. A metal monitor gate was incorporated into the flume headbox to enhance upstream approach flow uniformity. The average flow velocity was determined using an acoustic Doppler velocimeter (ADV). The models were constructed from 8-mm-thick transparent acrylic sheets, assembled using chloroform, shown in Figure 2. Detailed specifications of geometrical parameters and collected data during the research are outlined in Table 1. Where, is the width of the input key, is the width of the outlet key, L is the developed crest length, W states the width of the channel of PKW, Ht is the total head, Q is the discharge flow of PKW, P is the height of PKW, Si is the slope of the inlet key, So is the slope of the outlet key, Bi is the length of the inlet key, Bo is the length of the outlet key, EL is relative energy dissipation, and E1 or E2 is energy dissipation at a particular section.
Table 1

Range of data collected in the present study

S. No.Si=SoHt (m)Q (L/s)Bi/P=Bo/PRange of EL/E1Range of E2/E1No. of readings
1.00 1.08 0.0300–0.0971 10.17–50.26 0.69 0.8093–0.1930 0.1907–0.8096 18 
1.10 1.08 0.0304–0.0986 10.14–50.26 0.69 0.7860–0.1785 0.2140–0.8214 18 
1.20 1.08 0.0307–0.0989 10.19–50.07 0.69 0.7700–0.1731 0.2300–0.8268 18 
1.25 1.08 0.0317–0.1011 10.28–50.18 0.69 0.7533–0.1734 0.2467–0.8265 18 
1.30 1.08 0.0322–0.1004 10.09–50.00 0.69 0.7356–0.1655 0.2644–0.8344 18 
1.35 1.08 0.0310–0.0891 10.16–50.07 0.69 0.7297–0.1501 0.2703–0.8498 18 
1.40 1.08 0.0303–0.0985 10.19–50.13 0.69 0.7031–0.1435 0.2969–0.8564 18 
1.50 1.08 0.0310–0.0992 10.15–50.45 0.69 0.6822–0.1411 0.3118–0.8588 18 
2.00 1.08 0.0313–0.0995 10.29–49.82 0.69 0.6518–0.1342 0.3482–0.8657 18 
S. No.Si=SoHt (m)Q (L/s)Bi/P=Bo/PRange of EL/E1Range of E2/E1No. of readings
1.00 1.08 0.0300–0.0971 10.17–50.26 0.69 0.8093–0.1930 0.1907–0.8096 18 
1.10 1.08 0.0304–0.0986 10.14–50.26 0.69 0.7860–0.1785 0.2140–0.8214 18 
1.20 1.08 0.0307–0.0989 10.19–50.07 0.69 0.7700–0.1731 0.2300–0.8268 18 
1.25 1.08 0.0317–0.1011 10.28–50.18 0.69 0.7533–0.1734 0.2467–0.8265 18 
1.30 1.08 0.0322–0.1004 10.09–50.00 0.69 0.7356–0.1655 0.2644–0.8344 18 
1.35 1.08 0.0310–0.0891 10.16–50.07 0.69 0.7297–0.1501 0.2703–0.8498 18 
1.40 1.08 0.0303–0.0985 10.19–50.13 0.69 0.7031–0.1435 0.2969–0.8564 18 
1.50 1.08 0.0310–0.0992 10.15–50.45 0.69 0.6822–0.1411 0.3118–0.8588 18 
2.00 1.08 0.0313–0.0995 10.29–49.82 0.69 0.6518–0.1342 0.3482–0.8657 18 
Figure 2

Schematic plan view of experimental set-up.

Figure 2

Schematic plan view of experimental set-up.

Close modal

Methodology

This article proposes a novel FNN. The biological neurons inspire neurons in ML. Pattern recognition and prediction are required in many situations where automation is challenging. Neural networks (NNs) were developed to address these issues, as they can automate the process and provide accurate data predictions. NN processes the input along with the hyperparameters. A fuzzy system is a logic that deals with binary values, divides the data based on membership function, and gives values as a degree of truth. Equations are given a more human touch through the use of fuzzy logic.

The FNN model combines the benefits of fuzzy logic and NNs. Figure 3 illustrates the FNN model employed in the process. The model consists of six layers, including the first layer. Once the data has been gathered, it is prepared for the FNN model by going through a pre-processing stage. Before we can use ML, we need to prepare the data, which improves its quality and makes it suitable for our purposes. This research involved the elimination of redundant data, the correction of inconsistencies, the normalization of data, and the management of missing values. Initially, the dataset was examined for missing values, which could impact the analysis outcome if not appropriately handled. Data loss has different causes, such as mistakes in data input or faulty devices. The presence of repeated redundant data, such as rows or columns, was resolved earlier. The same data can influence outcomes and create prejudices. Data are normalized and scaled to ensure features are equally available for analysis.
Figure 3

Fuzzy neural network model.

Figure 3

Fuzzy neural network model.

Close modal
Data standardization is essential when evaluating features with different units or scales. There is an input layer where we retrieve data in the form of from the dataset, where n is the total number of samples and t shows the iteration number. The fuzzification layer is the first layer of the model after the input layer. The membership function used in the fuzzification layer is the trapezoidal membership function, and a graphical and mathematical representation of this function is shown in Figure 4. Where are the inputs of randomly generated parameters, and x is provided to the fuzzification layer.
Figure 4

Trapezoidal membership function.

Figure 4

Trapezoidal membership function.

Close modal
Layer 1 of Figure 3 illustrates how each input is divided into three components following the fuzzification layer: . The production layer, the second layer in the model, takes the output of the first layer as input and outputs as x1, combining the fuzzy components from the membership function's output. , where n is the number of inputs in one iteration, subscript shows the number of the layers, and superscript shows the number of nodes in the present layer; as the membership function has three components, the production layer will have only three nodes combining the inputs. Similarly, we can calculate and . Subsequently, we will employ a membership function, namely the sigmoid function, on the output of the second layer and all subsequent layers. The sigmoid function is a membership function that helps produce output from 0 to 1, making it easy to handle outputs and then further process them. The sigmoid membership function is shown in Equation (1):
(1)
where denotes the output of the first layer, which is fed to the sigmoid function and is the layer's final output will be sent as input to the following layer. Further, this output of the second layer is passed to the third layer, a neural layer in FNN. is the weight for this neural layer, and it will first be produced at random and will give output as , in generic form, it will be given as follows:
(2)
Then, the output is passed through the sigmoid membership function in the second layer, and it can be presented as a similar notation shown in Equation (3):
(3)

Comparably, the function for the fourth layer is displayed in Equation (4). It accepts input as and handles weights as to produce an output of .

The output of the sigmoid function is then passed to the final layer, the network's last layer, is the final output of the layer.
(4)
Equation (5) shows the function for the fifth layer. It can handle weights as and take in input to produce an output . The output of the sigmoid function is then passed through the layer, and the final result is .
(5)
Equation (6) shows how the fifth layer works. The input is processed and the weights are used to generate an output . The layer's last result is. The result of this process is then passed through the sigmoid function.
(6)
The last result of the FNN will be written as , shown in Equation (7):
(7)
Because the initial parameters were randomly generated, it is reasonable to expect that there will be mistakes in our output after the feed-forward process. The following section explains adjusting the settings to make the error as small as possible. The flow of data is presented in the flowchart, as shown in Figure 5.
Figure 5

Flowchart of the FNN model.

Figure 5

Flowchart of the FNN model.

Close modal

Tuning of hyperparameters

Let's denote the outcome of FNN with ‘z’ which equals in Equation (7). The output expected after the prediction is ‘t’. The mean square error (MSE) for FNN is shown in Equation (8):
(8)
where ‘n’ is the total number of samples of input. The backtracking process is depicted in generalized form; for example, the value of n is taken as 1 for simplifying the derivations. The error function in Equation (8) will give the total error of the model, and it will be minimized using the process of gradient descent. Gradient descent is an algorithm where, with each iteration, we try to update the parameters, which are weights in this case, to minimize the error.

Layer six

According to the gradient descent algorithm, to minimize the error value in output, the partial differentiation of the error function is required w.r.t. parameters, i.e. weights of the respective layer. The deduction of the partial differentiation for the sixth layer is shown in Equation (9):
(9)
where is the partial differentiation of error function (E) w.r.t. , which is the output of the last layer shown in Equation (10):
(10)
where is the partial differentiation of the output of a layer after the sigmoid membership function w.r.t. output of the layer without the membership function, shown in Equation (11) and also given a generalized notation, i.e. . Every layer will repeat this step, making it easy to calculate and donate it with a generalized term.
(11)
where is the partial differentiation of which is the output without membership function w.r.t. . As shown in Equation (12), the weights between the present and previous layers must be updated to achieve a lower error value.
(12)
In Equation (12), is the denotation for differentiated function which has final outputs of the previous layers as inputs and respective weights. Now combine the partial differentiations from Equations (10) to (12), and put together in Equation (9):
(13)
Some general values can be clubbed together to simplify the terms, repeating further in derivation. is assumed notation for the ease of calculations as shown in Equation (14):
(14)
Now, putting the simplified assumed notation from Equation (14) to the expanded Equation (13):
(15)
After getting the partial differentiation of error function w.r.t. respective weight, the weight for the respective layer can be updated using Equation (16):
(16)
where is the learning rate of the model, and the learning rate is the tuning parameter in the optimization process, which regulates the model's parameter changes in steps that lead to the lowest possible error value.

Layer five

To update the weights of this layer, i.e. w, the partial differentiation of E w.r.t. w3 is needed, deduced in Equation (17):
(17)
Here are values for and are available in previous equations, i.e. Equations (10) and (11). is the partial differentiation of the sixth layer w.r.t. output to the final output of the fifth layer in FNN, shown in Equation (18):
(18)
is the partial differentiation of the final output of the fifth layer after the membership function w.r.t. the output of the layer without membership function. It is very similar to Equation (11). As it is the differentiation of the sigmoid function only, the generic notation continues, as shown in Equation (19):
(19)
is the partial differentiation of the output of the respective layer w.r.t. weights between the respective layer and the previous layer, shown in Equation (20):
(20)
Putting deduced Equations (18)–(20) and previously calculated Equations (10) and (11) in Equation (17) for an expanded form, which is shown in Equation (21):
(21)
There are some repetitive terms that generic assumed notations can replace. So, using Equation (14) in Equation (21).
(22)
Some general values can be clubbed together to simplify the terms, repeating further in derivation. is assumed notation for the ease of calculations as shown in Equation (23).
(23)
After all the deductions and using all generalized notations, the final equation for the partial differentiation of E w.r.t. is shown in Equation (24):
(24)
According to the gradient descent algorithm, the weights for this layer will be updated, as shown in Equation (25):
(25)

Layer four

To update the respective parameters if this layer is w2, partial differentiation of E w.r.t. w2 is needed and deduced in Equation (26):
(26)
Here, we can directly take values from Equation (10), (11), (18), and (19). The rest of the values are creating a pattern and repeating themselves. So, the expanded form of Equation (26) is shown in Equation (27):
(27)
Using Equation (14) in Equation (27) for simplification of the equation:
(28)
Using Equation (23) in Equation (28),
(29)
From the above calculations, Δ3 can be computed in similar pattern and is shown in Equation (30):
(30)
Using Equation (30) in Equation (29) to simplify and find the final equation of the partial differentiation of E w.r.t. :
(31)
After getting the final equation in Equation (31), updated weight can be calculated as shown in Equation (32):
(32)

Layer three

From previous findings and generic notations, the partial differentiation of E w.r.t is deduced in Equation (34) from Equation (33) easily.
(33)
(34)
From Equation (34) and previous patterns, Δ2 can be computed easily and is shown in Equation (35):
(35)
Putting Equation (35) in Equation (34),
(36)
Weights can be updated easily after getting the final equation for the partial differentiation, as shown in Equation (37):
(37)

Layer two

This layer is the production layer, which combines all the components of the fuzzification layer. This particular layer has no variable weights; hence, updating the parameters is impossible.

Layer one

In the first layer, while forward pass, the trapezoidal function is used for the fuzzification shown in Figure 4. Firstly, the partial differentiation of the A1, A2, and A3 will be taken on the bases of the respective variables , , , ,, and which is shown in equations from Equations (38) to (43):
(38)
where and are the hyperparameters for the first component of fuzzy logic, i.e. A1. And Equation (38) shows the partial differentiation of component A1 w.r.t. variable .
(39)
where the hyperparameters for the first fuzzy logic component or A1 are and . Additionally, Equation (39) illustrates component A1's partial differentiation with respect to the variable .
(40)
where and are the hyperparameters for the second fuzzy logic component or . Furthermore, the partial differentiation of component with respect to the variable is shown in Equation (40).
(41)
where the hyperparameters for the second fuzzy logic component or are and . Moreover, Equation (41) illustrates the partial differentiation of component with respect to the variable .
(42)
where and are the hyperparameters for the third fuzzy logic component or . Additionally, Equation (42) shows how a component is partially differentiated with respect to the variable :
(43)
where the hyperparameters for the third fuzzy logic component or are and . Furthermore, Equation (43) illustrates the partial differentiation of component with respect to the variable .
Further, to update all six variables, differentiation of the respective E w.r.t variables is needed, as shown in the equations from Equations (44) to (52).
(44)
Equation (44) illustrates the partial differentiation of the error function with respect to the fuzzy parameter .
(45)

In Equation (45), the parameter is from Equation (35). is the parameter related to layers 2 and 3 of the FNN as seen in Figure 3, is the partial differentiation of the sigmoid function utilized in layer 3, and are the parameters related to fuzzy logic, and x is the input provided to the FNN model.

Similarly, the remaining values will also be calculated as
(46)
The partial differentiation of the error function with respect to the fuzzy parameter is shown in Equation (46).
(47)
Equation (47) displays the partial differentiation of the error function with respect to the fuzzy parameter .
(48)
The partial differentiation of the error function with respect to the fuzzy parameter is shown in Equation (48).
(49)
Equation (49) displays the partial differentiation of the error function with respect to the fuzzy parameter .
(50)
The partial differentiation of the error function with respect to the fuzzy parameter is shown in Equation (50). These values can be updated easily with the help of general terms in Equations (51) and (52).
(51)
(52)
From this complete hyper-tuning process, some generalized equations can be deduced as the ‘ith’ term and shown in equations from Equations (53) to (57).
(53)
where is the partial differentiation of E w.r.t. weights associated with the respective layer and is the final output of the previous is associated with the weights for the ith layer.
(54)
(55)
where is the differentiation of the sigmoid function for the ith layer.
(56)
Equation (56) is the generic formula to update the weight for the layer.
(57)

Equation (57) is similar to Equation (54) only L in Equation (57) is used for the variables of the last layers.

The dataset is collected experimentally, preprocessed, and passed to the FNN model. The method used to validate data is splitting the data into two categories, i.e. training and testing data. Both datasets are chosen randomly and divided in a ratio of 4:1. The training data is used to train the model by tuning the hyperparameters. Then, the model is validated using the testing data. This method allows the judgement of the model's performance to be balanced.

Measures used for the evaluation of the model are root mean square error (RMSE) and mean absolute error (MAE). MAE tells us about the average error, which can offer a straightforward idea about the model's performance. RMSE gives more importance to significant errors, which is a more sensitive measure to determine the accuracy of the predictions. Values for RMSE and MAE are shown in Table 2 and graphically in Figure 6.
Table 2

Performance evaluation of predicted parameters by the FNN model for training and testing datasets

DatasetHt vs QHt/P vs CDLHt/P vs ELHt/P vs E2/E1Average
RMSE 0.0582 0.0206 0.0216 0.0216 0.0305 
MAE 0.0383 0.0150 0.0183 0.0174 0.0222 
DatasetHt vs QHt/P vs CDLHt/P vs ELHt/P vs E2/E1Average
RMSE 0.0582 0.0206 0.0216 0.0216 0.0305 
MAE 0.0383 0.0150 0.0183 0.0174 0.0222 
Figure 6

RMSE and MAE values.

Figure 6

RMSE and MAE values.

Close modal
The PKW discharge coefficient is determined by assessing the developed length within the 0.24 < Ht/P < 0.79 range. The stage–discharge relationship serves as a fundamental characteristic of each flow measurement structure. It is illustrated as a curve, plotting discharge against the head for all Wi/Wo values ranging from 1.0 to 2.0, as depicted in Figure 7. The FNN model's performance metrics indicate an RMSE value of 0.0582 and an MAE value of 0.0383, as visualized in Figure 5. These metrics are vital indicators of the model's accuracy in predicting the given data. An RMSE of 0.0582 signifies the average magnitude of prediction errors, while an MAE of 0.0383 denotes the mean absolute difference between expected and actual values (see Table 2). Such metrics are pivotal in assessing the model's reliability and precision in research, contributing to a comprehensive understanding of its predictive capabilities.
Figure 7

Stage–discharge curve Q (L/s) vs Ht (m).

Figure 7

Stage–discharge curve Q (L/s) vs Ht (m).

Close modal
To delineate the optimal Wi/Wo proportion range, considering the highest CDL values representing peak discharge efficiency, we present the results in Figure 8, depicting CDL as a function of Ht/P. Figure 8 clearly illustrates that Wi/Wo ratios of 1.25 and 1.3 yield the most substantial improvements in discharge efficiency. They are closely followed by Wi/Wo values of 1, 1.1, 1.2, 1.25, 1.3, 1.35, 1.4, 1.5, and 2. This observation underscores that the most advantageous discharge performance is concentrated between the Wi/Wo range of 1.25 and 1.3. The predictions made by the model in all the cases of the ratio of widths and the parameters are almost coinciding, as is visible in the graphs. Thus, the model proves to help predict the hydraulic behaviours from the change of width of the inlet key and the outlet key.
Figure 8

Discharge coefficient variation curve (CDL vs Ht/P).

Figure 8

Discharge coefficient variation curve (CDL vs Ht/P).

Close modal

Furthermore, the data in Figure 8 reveals that Wi/Wo = 1.25 achieves notably higher discharge efficiency than Wi/Wo = 1.3 for Ht/P < 0.35. However, for the range 0.35 < Ht/P < 0.44, Wi/Wo = 1.3 surpasses Wi/Wo = 1.25 regarding discharge efficiency. Notably, Wi/Wo = 1.4 stands out as the configuration with the highest discharge capacity within the 0.44 < Ht/P < 0.81 range. In particular, PKW setups with Wi/Wo values of 1.25 and 1.3 demonstrate a remarkable 7–17% increase in efficiency compared with Wi/Wo = 1.0 and an approximately 8–13% gain over Wi/Wo = 2.0. It's worth noting that the FNN model excels in precision, as evidenced by its RMSE of 0.0206 and MAE of 0.0150, as shown in Figure 6.

The FNN models exhibited consistent trends in relative energy dissipation, and their findings were validated against previous studies with a high degree of accuracy in measurement. In this research, we noted that energy dissipation rates tend to be higher when Ht/P is less than 0.42, a trend across all PKW models. This observation deviates from previous research, which reported lower energy dissipation at these values. Conversely, for Ht/P values greater than 0.55 and within the range of 0.42 < Ht/P < 0.55, the relative energy dissipation rate [EL= (E1E2)/E1] displayed a more complex, intermingled behaviour. Figures 9 and 10 illustrate the variation of relative energy dissipation [EL= (E1E2)/E1] at the base of PKWs as a function of the upstream head ratio (Ht/P).
Figure 9

Energy dissipation curve (EL vs Ht/P).

Figure 9

Energy dissipation curve (EL vs Ht/P).

Close modal
Figure 10

Residual energy curve (E2/E1 vs Ht/P).

Figure 10

Residual energy curve (E2/E1 vs Ht/P).

Close modal

To precisely compute the optimal inlet-to-outlet key width ratio of PKW and the influence of the different width ratios on energy dissipation, the experimental data from a previous study by Singh & Kumar (2023a, 2023b) were used to create the FNN algorithm-based model in this research. According to the proposed model for predicting the key's width ratio, the approaches resulted in a highly nonlinear relationship between the width ratio and input parameters, with promising prediction results. The hydraulic behaviours measured in the process are discharge flow over the PKW, coefficient of discharge along developed crest length (CDL) and relative energy dissipation (EL). The peak efficiency occurs at a width ratio (Wi/Wo) of approximately 1.2755–1.28, with a 7–17% efficiency advantage over Wi/Wo= 1 and 8–13% over Wi/Wo = 2.0. The energy losses over the weir decreases as the Wi/Wo ratio increases, with the highest relative energy dissipation corresponding to the lowest width ratio (i.e. EL = 0.8093 or 80.93%, the corresponding Wi/Wo = 1) and the lowest energy loss for the highest width ratio (i.e. EL = 0.5818 or 58.18% the related Wi/Wo = 2.0). This means the energy dissipation across the weir for Wi/Wo = 2.0 indicates 12–23% less energy dissipation than Wi/Wo = 1. The performance of the algorithm is measured based on the RMSE value and MAE value. More studies are needed on prediction and various soft computing techniques. Furthermore, doing an experimental investigation or CFD simulation while accounting for scaling effects is possible.

The faculty, staff, and technical team of the Hydraulic Laboratory of the Civil Engineering Department are much appreciated by the authors for their support, and they are also beseeched with sympathy.

This study has not received any funding.

All relevant data are included in the paper or its Supplementary Information.

The authors declare there is no conflict.

Abhash
A.
&
Pandey
K. K.
2020
A review of piano key weir as a superior alternative for dam rehabilitation
.
ISH Journal of Hydraulic Engineering
28
(
supp1
),
541
551
.
Al-Shukur
A. H. K.
&
Al-Khafaji
G. H.
2018
Experimental study of the hydraulic performance of piano key weir
.
International Journal of Energy and Environment
9
(
1
),
63
70
.
Amin
M. R.
,
Rajaratnam
N.
&
Zhu
D.
2019
Energy loss below rectangular sharp-crested weirs for free flows
. In
Proceedings of 38th IAHR World Congress
(pp.
1
7
)
Anderson
R. M.
&
Tullis
B. P.
2013
Piano key weir hydraulics and labyrinth weir comparison
.
Journal of Irrigation and Drainage Engineering
139
(
3
),
246
253
.
Baudhanwala
D.
,
Mehta
D.
&
Kumar
V.
2024
Machine learning approaches for improving precipitation forecasting in the Ambica River basin of Navsari District, Gujarat
.
Water Practice & Technology
19
(
4
),
1315
1329
.
Bieri
M.
,
Federspiel
M.
,
Boillat
J.-L.
,
Houdant
B.
,
Faramond
L.
&
Delorme
F.
2011
Energy dissipation downstream of piano key weirs –case study of Gloriettes Dam (France)
. In: Labyrinth and Piano KeyWeirs – PKW2011 (Erpicum, S., Laugier, F., Boillat, J. L., Pirotton,M., Reverchon, B., & Schleiss, A. J., Eds.).
CRC Press
,
Leiden, The Netherlands
, pp.
120
130
.
Bhukya
R. K.
,
Pandey
M.
,
Valyrakis
M.
&
Michalis
P.
2022
Discharge estimation over piano key weirs: A review of recent developments
.
Water
14
(
19
),
3029
.
Birbal
P.
,
Azamathulla
H.
,
Leon
L.
,
Kumar
V.
&
Hosein
J.
2021
Predictive modelling of the stage–discharge relationship using gene-expression programming
.
Water Supply
21
(
7
),
3503
3514
.
Crookston
B. M.
,
Erpicum
S.
,
Tullis
B. P.
&
Laugier
F.
2019
Hydraulics of labyrinth and piano key weirs: 100 years of prototype structures, advancements, and future research needs
.
Journal of Hydraulic Engineering
145
(
12
),
02519004
.
Das
J.
,
Poonia
V.
,
Jha
S.
&
Goyal
M. K.
2020
Understanding the climate change impact on crop yield over Eastern Himalayan Region: Ascertaining GCM and scenario uncertainty
.
Theoretical and Applied Climatology
142
,
467
482
.
Emadi
A.
,
Sobhani
R.
,
Ahmadi
H.
,
Boroomandnia
A.
,
Zamanzad-Ghavidel
S.
&
Azamathulla
H. M.
2022
Multivariate modeling of river water withdrawal using a hybrid evolutionary data-driven method
.
Water Supply
22
(
1
),
957
980
.
Erpicum
S.
,
Nagel
V.
&
Laugier
F.
2011
Piano Key Weir design study at Raviege dam
.
Proc. Int. Conf. Labyrinth and Piano Key Weirs -PKW 2011
, 43-50,
CRC Press
,
Boca Raton, FL
.
Erpicum
S.
,
Laugier
F.
,
Pfister
M.
,
Pirotton
M.
,
Cicero
G. M.
&
Schleiss
A. J.
(Eds)
2013
. In:
Proceedings of the 2nd International Workshop on Labyrinth and Piano Key Weirs II - PKW 2013
,
Taylor & Francis Group
,
London
. ISBN 978-1-138-00085-8
Erpicum
S.
,
Laugier
F.
,
Ho Ta Khanh
M.
&
Pfister
M.
2017
Labyrinth and PKWs III – PKW-2017
.
CRC Press
,
London, UK
.
Eslinger
K. R.
&
Crookston
B., M.
2020
Energy dissipation of type A piano key weirs
.
Water
12
(
5
),
1253
.
Jamal
M.
,
Khatun
S.
,
Jha
S.
,
Mehta
D.
,
Dixit
S.
,
Kumar
V.
&
Tiwari
D. K.
2024
Experimental investigation of the efficiency of stone revetment for different temporal variations with the static water condition
.
Journal of Water and Climate Change
15
(
4
),
1969
1980
.
Kantharia
V.
,
Mehta
D.
,
Kumar
V.
,
Shaikh
M. P.
&
Jha
S.
2024
Rainfall–runoff modeling using an adaptive neuro-fuzzy inference system considering soil moisture for the Damanganga basin
.
Journal of Water and Climate Change
15 (5), 2518–2531. jwc2024143
.
Karimi
M.
,
Attari
J.
,
Saneie
M.
&
Jalili Ghazizadeh
M. R.
2018
Side weir flow characteristics: Comparison of piano key, labyrinth, and linear types
.
Journal of Hydraulic Engineering
144
(
12
),
04018075
.
Karbasi
M.
&
Azamathulla
H. M.
2016
GEP to predict characteristics of a hydraulic jump over a rough bed
.
KSCE Journal of Civil Engineering
20
(
7
),
3006
3011
.
Khanh
M. H. T.
2013
The Piano Key Weirs: 15 years of Research & Development-Prospect
. In:
Proceedings of the 2nd International Workshop on Labyrinth and Piano Key Weirs II - PKW 2013
, (pp.
3
14
)
Taylor & Francis Group
,
London
.
Khanh
M. H. T.
2017
History and development of Piano Key Weirs in Vietnam from 2004 to 2016
. In
Proceedings of the 3rd International Workshop on Labyrinth and Piano Key Weirs III
,
February 22-24, 2017
(pp.
3
16
).
CRC Press
.
Qui Nhon, Vietnam
.
Kumar
N.
,
Poonia
V.
,
Gupta
B. B.
&
Goyal
M. K.
2021
A novel framework for risk assessment and resilience of critical infrastructure towards climate change
.
Technological Forecasting and Social Change
165
,
120532
.
Laugier
F.
,
Vermeulen
J.
&
Blancher
B.
2017
Overview of design and construction of 11 piano key weirs spillways developed in France by EDF from 2003 to 2016
. In Erpicum, S., Laugier, F., Ho Ta Khanh, M., and Pfister, M. (2017). Labyrinth and Piano Key Weirs III - PKW 2017, pp (
37
51
).
CRC Press
,
London, U.K
Lempérière
F.
&
Ouamane
A.
2003
The piano keys weir: A new cost-effective solution for spillways
.
International Journal on Hydropower & Dams
10
(
5
),
144
149
.
Pandey
M.
,
Zakwan
M.
,
Sharma
P. K.
&
Ahmad
Z.
2020
Multiple linear regression and genetic algorithm approaches to predict temporal scour depth near circular pier in non-cohesive sediment
.
ISH Journal of Hydraulic Engineering
26
(
1
),
96
103
.
Poonia
V.
&
Tiwari
H. L.
2020
Rainfall-runoff modeling for the Hoshangabad Basin of Narmada River using artificial neural network
.
Arabian Journal of Geosciences
13
(
18
),
944
.
Poonia
V.
,
Das
J.
&
Goyal
M. K.
2021a
Impact of climate change on crop water and irrigation requirements over eastern Himalayan region
.
Stochastic Environmental Research and Risk Assessment
35
,
1175
1188
.
Poonia
V.
,
Goyal
M. K.
,
Gupta
B. B.
,
Gupta
A. K.
,
Jha
S.
&
Das
J.
2021b
Drought occurrence in different river basins of India and blockchain technology-based framework for disaster management
.
Journal of Cleaner Production
312
,
127737
.
Poonia
V.
,
Jha
S.
&
Goyal
M. K.
2021c
Copula-based analysis of meteorological, hydrological and agricultural drought characteristics across Indian river basins
.
International Journal of Climatology
41
(
9
),
4637
4652
.
Pralong
J.
,
Vermeulen
J.
,
Blancher
B.
,
Laugier
F.
,
Erpicum
S.
,
Machiels
O.
,
Pirotton
M.
,
Boillat
J. L.
,
Leite Ribeiro
M.
&
Schleiss
A. J.
2011
A naming convention for the piano key weirs geometrical parameters
. In
Proceedings of the International Conference on Labyrinth and Piano Key Weirs (PKW 2011)
.
CRC Press, Taylor & Francis Group
,
Leiden, Netherlands
, pp.
271
278
.
Ribeiro
M. L.
,
Boillat
J. L.
,
Schleiss
A. J.
,
Le Doucen
O.
&
Laugier
F.
2011
Experimental parametric study for hydraulic design of PKWs
. In
Proc. Int. Conf. Labyrinth and Piano Key Weirs, Liege B
.
CRC Press
, pp.
183
190
.
Sharma
K. V.
,
Kumar
V.
,
Gautam
L.
,
Choudhary
S.
&
Mathew
A.
2023
Geo-physical seasonal deviations of land use, terrain analysis, and water cooling effect on the surface temperature of Pune city
.
Journal of Water and Climate Change
14
(
12
),
4802
4820
.
Silvestri
A.
,
Archambeau
P.
,
Pirotton
M.
,
Dewals
B.
&
Erpicum
S.
Comparative Analysis of the Energy Dissipation on a Stepped Spillway Downstream of a Piano Key Weir
. In Labyrinth and Piano Key Weirs II; Erpicum, S., Laugier, F., Pfister, M., Pirotton, M., Cicero, G.M., Schleiss, A.J., Eds.;
CRC Press/Balkema
:
Leiden, The Netherlands
,
2013
; pp.
111
120
.
Singh
D.
&
Kumar
M.
2021
Hydraulic Design and Analysis of Piano Key Weirs: A Review
.
Arabian Journal for Science and Engineering
47
,
5093
5107
(
2022
).
https://doi.org/10.1007/s13369-021-06370-4
.
Singh
D.
&
Kumar
M.
2022b
Energy dissipation of flow over the type-B piano key weir
.
Flow Measurement and Instrumentation
83
,
102109
.
Singh
D.
&
Kumar
M.
2023a
Effect of the inlet-to-outlet key width ratio of piano key weir on its hydraulic behaviour
.
Flow Measurement and Instrumentation
91
,
102342
.
Singh
D.
&
Kumar
M.
2023b
Study of the energy dissipation over the type-A piano key weir
.
KSCE Journal of Civil Engineering
27
(
4
),
1568
1584
.
Singh
U. K.
,
Jamei
M.
,
Karbasi
M.
,
Malik
A.
&
Pandey
M.
2022
Application of a modern multi-level ensemble approach for the estimation of critical shear stress in cohesive sediment mixture
.
Journal of Hydrology
607
,
127549
.
Tiwari
D. K.
,
Singh
K. R.
&
Kumar
V.
2024
Forecasting of water quality parameters of Sandia station in Narmada basin, Central India, using AI techniques
.
Journal of Water and Climate Change
15
(
3
),
1172
1183
.
https://doi.org/10.2166/wcc.2024.520.
van Deventer
N. J.
,
Matlala
J.
,
Mulder
E.
&
Hoosen
S.
2015
Tzaneen dam raising: Hydraulic model study
. In
Proceedings of the SANCOLD Conference 2015
, pp.
223
230
.
Zounemat-Kermani
M.
&
Mahdavi-Meymand
A.
2019
Hybrid meta-heuristics artificial intelligence models in simulating discharge passing the piano key weirs
.
Journal of Hydrology
569
,
12
21
.
This is an Open Access article distributed under the terms of the Creative Commons Attribution Licence (CC BY 4.0), which permits copying, adaptation and redistribution, provided the original work is properly cited (http://creativecommons.org/licenses/by/4.0/).