© 2025 The authors. This article is published by IIETA and is licensed under the CC BY 4.0 license (http://creativecommons.org/licenses/by/4.0/).
OPEN ACCESS
Deep learning approaches spread widely in many applications because of their accurate results. Water flow rate measurement is one of these applications. This work proposes a new approach for measuring water flow rate in pipes using acoustic signals generated. The approach consists of multiple stages: real-time acoustic data collection, feature extraction, and classifier implementation. A medical stethoscope and microphone are attached to the pipe under test with a proper soundproof mounted enclosure to collect acoustic data. The obtained data represented ten levels of water flow rate in the pipe. Then, all these data are processed and used to generate features using the Mel-Filterbank energies spectrogram, which enhances flow-related acoustic information. The generated spectrogram features of the 10 classes are fed to the deep learning classifier, which is based on the TinyML framework. Classifier high-performance metrics show the implemented approach's success in accurately measuring flow. The 98.36% accuracy of the classifier illustrates the success of the proposed approach with an F1 Score of 0.99, which outperforms the competitive research results. Moreover, the trained and tested classifier with the feature generation stage is deployed efficiently on the limited resources microcontroller (Arduino Nano 33BLE sense), consuming only a tiny share of the microcontroller's resources. Additionally, the resulting latency of the classifier inference time is less than 0.2 seconds, making the classifier suitable for real-time applications.
flow rate measurement, flowmeter, TinyML, neural network, 1D-CNN classifier, acoustic signal flowmeter
Flow measurement is considered one of the most significant processes in industrial or residential applications [1]. Therefore, various flow meter systems are proposed in the literature, including direct (intrusive) and indirect (non-intrusive) techniques. The choice of the correct flow meter is subject to liquid physical properties like temperature, pressure, velocity, and turbulence [2]. Intrusion depends on the electromechanical or mechanical sensors that sink into the liquid path. Despite the widespread usage of this kind of flow meter, they still have several disadvantages, such as complex installation, costly maintenance, and pressure losses. On the other hand, non-intrusive flow instruments can overcome these disadvantages and increase reliability. These devices provide plug-and-play solutions, so they are clamped or attached to the pipe rather than embedded in them [3, 4].
The non-intrusive meter can work depending on several physical principles, such as acoustic, pipe vibration, or ultrasonic flowmeter. Ultrasonic technologies have gained popularity in industrial and biomedical applications to monitor bidirectional flow without disrupting the medium. Particularly under clean, steady-flow conditions, these instruments produce reliable findings. In addition, the ability to operate without penetrating the pipe or coming into contact with the fluid makes them particularly suitable for applications where cleanliness, safety, or ease of maintenance is a priority. They do have some difficulties, however. They are sensitive to variations in flow profile, temperature, and pressure, as well as the stability of the acoustic link, and their performance may suffer when working with fluids that contain particles or bubbles. For instance, asymmetrical flow patterns or misalignment during installation might throw transit-time meters off. In contrast, Doppler-based devices rely significantly on consistent acoustic scatterers in the flow. These problems underscore the continuous requirement for hybrid or more robust measurement systems to manage a greater variety of real-world circumstances [5].
On the other hand, many authors proposed that the acoustic signal approach can be the most reliable method for home applications. Based on artificial intelligence algorithms, sound signals generated by water flow are used to classify, detect, or estimate flow value. The main challenging points of acoustic signal processing are background noise, microphone installation, and quality of generated sound textures [1, 6, 7].
To this end, several previous works deal with flow parameters based on acoustic. In the study [1], the author presents an original way to design a recognition system to detect water sounds generated by drops based on bubble physics (radially oscillating). The proposed method consisted of several pre-processing signal stages: Candidate selection, non-harmonic filtering, and attack localization. After that, a decision algorithm is performed using spectrogram localization. The design system is simulated successfully and gives an F-measure equal to 70% compared with classical machine learning. Unfortunately, there is no indication that the studies are scalable because they are carried out on a small, controlled dataset. In the study [4], the authors proposed a flowmeter that utilizes acoustic signals from water passing through a PVC pipe knee. These audio signals are captured by a stethoscope chest piece, significantly reducing interference from surrounding noise. This study analyzes the recording audio using the Fast Fourier Transform (FFT) to filter out noise and extract features from the sound signals, thereby finding a better correlation with flow rates. The results indicate a quadratic relationship between the standard deviation of the recording sound and water flow rates. Also, an exponential relationship was found between the wavelet transform coefficients and water flow energy. This method's drawbacks include being influenced by noisy surroundings, the need for knees in the pipe, low accuracy measures, and high cost. In the study [7], a field study is carried out to characterize the use of outdoor water taps based on the sound recording method. The authors depended on a microphone sensor and recorder device to acquire water sound to achieve this aim. The pre-processed stage consisted of a high-pass filter and short-term energy with a movable window. Then, an automated detection algorithm was used to capture signal features. An 80% precision is achieved with a low cost of implementation, but unfortunately, the proposed work faces challenges during peak demand periods because of the reduction in pressure. In the study [8], a system for classifying water-flow sounds is proposed to support elderly individuals in a home environment. Three water-flow sound signals were recorded separately and combined. In the pre-processing stage, the designed system depended on a spectrogram (Short-Time Fourier Transform) to identify unique features for each flow type. Then, time-frequency combined sound data is applied to the decision algorithm, which uses a threshold value to classify sounds. The authors declared that the system gave high accuracy for classification, but they did not mention any numerical values or make comparisons. In the study [9], a non-intrusive monitoring device for domestic activity is designed based on acoustic detection and classification to serve older people in Singapore. The system mainly consists of a small omnidirectional microphone sensor and a sound recognition algorithm, Hidden Markov Models (HMM), and Mel-Frequency Cepstral Coefficients (MFCC). The classifier gives five activity classes with an 84% accuracy rate. The authors did not resolve the privacy issue during system installation. In the study [10], a water flow detection and measuring system for the home environment is proposed based on acoustic signals. The design uses a commercial microphone sensor attached directly to the water pipe for audio acquisition and is covered by a foam layer for noise reduction. Thus, the classification modal is developed using the Context Recognition Network (CRN) Toolbox. This open-source tool contains stand-alone algorithms named (Tasks), enabling users to build a chain of complex data analysis. These chains consisted of the following tasks: sound interface, FFT conversion, Mel-Frequency filter, feature extraction, classifier algorithm, and rules. The authors used the K-nearest neighbour (KNN) classifier to perform well. However, the system has a complex installation process, and some noise sounds cannot be rejected, which reduces the classifier levels to six. Previous work [11] proposed a pipeline flow detection and classification device based on machine learning for a residential environment. The design is based on sensing the vibrations generated by water in the pipe using two piezoelectric sensors (hot and cold water). Also, the design supports energy consumption principles by applying a dynamic sampling technique and extracting features from the collected data before transmission to the cloud. Support Vector Machines (SVMs) are used to develop a model that identifies four classes: no flow, hot flow, cold flow, and mixed flow. However, the system also has complex installation, requiring new calibration steps (training) for each deployment.
In the study [12], the authors find a relationship between the sound of water flowing through a tap and its flow rate. A microphone was placed under the tap to record sound signals, and a transparent container was employed to measure the flow rate. The captured voice signals were analyzed using FFT. The experimental results used five independent sound clips, yielding an average error of 15%, representing low accuracy. Unfortunately, the experiments did not include outside noise (such as traffic or animals). More research is required to create adaptive models or noise-filtering strategies that retain accuracy in noisy, real-world settings. In the study [13], the authors proposed a method for classifying water usage into interactivity and intra-activity waste by surveying everyday water-related tasks. This method is based on sound data by extracting frequency and amplitude as features; the sound is captured using a microphone placed on a tap. FFT was applied to analyze the audio's frequency, and machine learning was used as a classifier. The accuracy results are 100% for interactivity and 81.1% for intra-activity waste detection. The data was collected in a controlled laboratory setting with just ten participants. Verifying the system's functionality in homes with a broader range of user habits and ambient noise is necessary. In the study [14], the authors suggested developing a water leak detection system based on artificial intelligence and cloud information management using sounds collected by the acoustic rod and microphone via the mobile. This system can systematically gather and organize leakage sounds and provide a model that a mobile application uses to guide operators in specifying leaking pipes. FFT was utilized to analyze the sound frequency. Machine Learning (ML), Deep Neural Networks (DNN), Convolutional Neural Networks (CNN), and Support Vector Machines (SVM) were used to design and compare the system. The findings show that DNN is better than others, with an accuracy of 90%. The system proposed leak vs. no leak as a binary classification. Multi-class classification may be useful in real-world situations.
The earlier stated techniques lack important features needed to make a proportional tradeoff in the accuracy of measuring water flow rate in pipes and acoustic signals generated from this flow and implementation cost.
The main contributions of this research are:
Low installation cost and complexity using a combination of a stethoscope and microphone attached to the pipe under test.
A high classifier level gives a high-performance implemented approach to measure flow successfully and accurately.
The trained and tested classifier is implemented efficiently on the limited resources of the microcontroller, consuming only a tiny share of the microcontroller's resources.
The rest of the paper is organized as follows: the next three sections describe background theory. Section 5 shows the proposed work and methodology. In section 6, the obtained results are presented and discussed. Finally, the conclusion is depicted in section 7.
Liquid in flow may produce sounds due to the air bubbles trapped by the water. Many physical models are proposed in the literature to describe sounds from bubbles. Based on the work of Leighton and Doel [15, 16], the equations from (1) to (6) describe the behaviour of the bubbles immersed in the liquid. The liquid's kinetic energy (E) just surrounding the created bubbles and injected into it is shown in Eq. (1)
$E=2 \rho r^3 u^2$ (1)
where, (ρ) is the liquid density, (r) is the bubble radius in meters, and (u) is the average velocity at the boundary. During the bubble's lifetime, the bubble oscillates and emits a sinusoidal sound, which decays over time due to dissipating in its energy, as deprecated in Eq. (2). This phenomenon is called "radially oscillating".
$h(t)=a \, \sin (2 \pi f t) e^{-d t}$ (2)
where, (f) is the resonance frequency calculated by Eq. (3), (d) is the damping factor calculated by Eq. (4), and (a) is the amplitude calculated by Eq. (5).
$f=3 / r$ (3)
$d=\frac{0.13}{r}+0.0072 r^{-3 / 2}$ (4)
$a \cong r \sqrt{r u}$ (5)
Therefore, the immersed bubble creates a sound wave that propagates to the liquid surface and later is delivered to the free air. Moreover, the bubble's radial oscillation increases rapidly during the trip to the surface. The resonance frequency of a bubble just under the liquid surface is 1.4 times its value of an immersed one. The relation between sound frequency and time is subjected to Eq. (6). This phenomenon can be shown in Figure 1.
$f(t)=f_0(1+\sigma d)$ (6)
where, (σ) is the slope factor, and it is related to the moving velocity of the bubble.
Figure 1. The spectrogram of a drop falling into water shows the change in sound frequency during the bubble travelling to the surface [1]
Acoustic signals generated from the water flow inside pipes can be analyzed and processed to generate features related to the behaviour of the flow. There are several processing techniques used to generate features from acoustic signal and time series data, such as Mel-Frequency Cepstral Coefficients (MFCC), Spectrogram, Syntiant, or Mel-Filterbank energy (MFE) [17]. These processing techniques enhance machine learning and classifier performance [18]. The MFE efficiently assists machine learning algorithms in classification tasks, especially for non-voice data such as environmental sounds and unvoiced phonemes. However, the ability of MFE to use phase information to encode filterbank energies improves generated feature quality, which in turn enhances classification performance [19]. The Mel-Filterbank Energies (MFE) calculates features from the acoustic signals using Short-Time Fourier Transform (STFT). The following mathematical equations detail the required steps to compute MFE [19, 20].
Calculate STFT by applying window (such as Hamming), then compute Discrete Fourier transform (DFT)
$X[k]=\sum_{n=0}^{N-1} x[n] \cdot e^{-\frac{j 2 \pi k n}{N}}$ (7)
where, k=1, 2, 3…, N-1.
Computing the power spectrum of the DFT signal
$P[k]=|X[k]|^2$ (8)
Applying the Mel-Filterbank using the Mel Scale approximation illustrates how humans perceive frequencies. The conversion from frequency f in Hz to the Mel scale is
$m(f)=2595 . \log _{10}(1+f / 700)$ (9)
Generation of a set of triangular $H_m[k]$ centred on frequencies in the Mel scale
$H_m[k]=\left\{\begin{array}{cc}0 & \text { if } f_k<f_{m-1} \text { or } f_k>f_{m+1} \\ \frac{f_k-f_{m-1}}{f_m-f_{m-1}} & f_{m-1} \leq f_k \leq f_m \\ \frac{f_{m+1}-f_k}{f_{m+1}-f_m} & f_m \leq f_k \leq f_m+1\end{array}\right.$ (10)
Figure 2. Mel-Filterbank
where, $f_{m-1} f_m$ and $f_{m+1}$ are the beginning centre and ending of the linear frequencies with $m^{t h}$ order. The above equations of the Mel scale filterbank are implemented using MATLAB environment is shown in Figure 2 [21].
Then, multiplying the power spectrum P[k] by the filters $H_m[k]$ Moreover, taking the sum of these multiplications for each filter as follows:
$E_m=\sum_k P[k] \cdot H_m[k]$ (11)
where, m=1, 2, …, M.
Convolutional Neural Networks (CNNs) are generally employed to extract features from two-dimensional (2D) input data. An equivalent one-dimensional (1D) structure is used for 1D data. Therefore, 1D-CNN can be one of the proper techniques for examining 1D signals. The 1D-CNN has recently drawn interest in several applications, including anomaly detection, fault detection, and personal medical data classification. 1D-CNN extracts signal attributes by considering local data rather than the whole signal in each network layer. This reduces the number of learnable parameters and speeds up network training, leading to less cost and computing power, making it suitable for real-time applications. It comprises the following layers: input, convolutional, pooling, flattening, fully connected, and output, all shown in Figure 3 [22, 23].
Figure 3. 1D-CNN architecture [24]
4.1 Convolution layer
Assume (x) indicates the input data with length (n), (w) represents the kernel with length (k), (s) is the number of steps in the kernel window location, and (p) is the padding p. So, the convolution between (x) and (w) for step (s) is as follows:
$\begin{gathered}y(n)= \left\{\begin{array}{cl}\sum_{i=1}^k x(n+i) w(i) & \text { if } n=0 \\ \sum_{i=1}^k x(n+i+(s-1)) w(i) & \text { otherwise }\end{array}\right\}\end{gathered}$ (12)
The output length (o) is
$o=\frac{n+2 p-k}{s}+1$ (13)
4.2 Pooling layer
Typically positioned beyond a convolution layer. This layer minimizes overfitting, the size of features, and network parameters. The most common pooling method, maximum pooling, selects a maximum value inside a size (f) window and then shifts it over the input by (s) step after each pooling. The formula for the maximum pooling is as follows:
$y(n)=\left\{\begin{array}{l}\max (x(n+i)) \quad \text { if } n=0 \\ \max (x(n+j+(s-1)))\end{array}\right\}$ (14)
4.3 Flatten and fully connected layers
Assume that convolution layers deliver output with a depth of more than one. In such cases, the convolutional layers' output is transformed by the Flatten layer into a format that the dense layers can employ as input. Fully connected layers connect every node in the layers that follow. The flattened matrix traverses a fully connected layer before categorizing it into suitable classes [24].
In this work, a water flow rate measuring approach is designed, implemented, and tested based on several stages, as shown in Figure 4. The proposed approach consists of five stages, starting with gathering the required hardware in one system. Then, the experiment is conducted for sound data collection. The collected data is processed for feature generation and fed to the deep learning model. Finally, the AI model is tested to evaluate its performance and to check its success in achieving the proposed measuring values. The following subsections will explain each stage of the proposed system in more detail.
Figure 4. The proposed system
5.1 Experiment setup
Figure 5 illustrates the proposed system's experimental setup during training, testing, and deployment. In all phases, a high-quality microphone connected to a stethoscope is used to acquire the acoustic signal generated by water flow in the pipe. To mitigate the impact of external noise, the sound sensor is placed inside a soundproof enclosure lined with acoustic-insulating materials. In addition, according to the study [4], the stethoscope reduces the surrounding noise by amplifying sound from water flow. The stethoscope can be attached directly to the pipe near a knee or tap. This installation process is simple and cost-effective because it does not require complex noise isolation or plumbing techniques. A computer was used to record sound signals for different flow levels during the data collection phase with the help of a cloud tool. For each level, (300) seconds of real water flow sound is recorded to train and test the neural network module. Finally, the developed AI module is deployed using an Arduino Nano 33 device. A special shield connects our sound acquisition components to the Nano 33 device. Also, an LCD screen displays the measured flow rate value in real-time.
(a) Device deployment and during system training and testing
(b) Practical implementation
Figure 5. System experimental setup
5.2 Data collection
The dataset is collected from the real-world environment using the proposed system shown in Figure 5 above. The collected data consisted of ten water flow rate levels. These levels are generated using a faucet. For each level, the microphone with A stethoscope records five minutes of water sound and saves it in (.wav) file format. A thick fabric is used as soundproof material to reduce the noise of the surrounding environment. Practically, the obtained levels start from 10% to 100%, representing full capacity. Under 10% of the capacity, the flow level is treated as zero flow because weak or no sound is obtained with a zero flow rate in the pipe. However, the dataset is collected using a cloud platform with a sampling frequency of (1.6kHz). After that, each level's audio file is segmented into 300 files to make the sample length one second. Therefore, the net size of the dataset becomes 3000 files. A percentage of 80% is used for training, 10% for validation, and the remaining 10% for testing the classifier.
5.3 Acoustic feature extraction
Usually, deep learning algorithms do not need a feature extraction stage to perform the classification task. However, with sound signals, it is more efficient to use special feature generation tools. In this work, Mel-filter bank energies (MFE) representative of sound signals are used to enhance the performance of the proposed approach. Several configurations are tested, including the frame length (100 ms, 200 ms, 300 ms), frame stride (50 ms, 100 ms, 150 ms), number of filters (20, 40, 64), and FFT length (128, 256, 512). The classification model was trained and evaluated for each configuration using the same dataset split. The combination presented in Table 1 yielded the best performance in terms of accuracy and F1-score, with an improvement ranging from 2% to 4% over suboptimal configurations. This sensitivity analysis demonstrates that the selected parameters balance temporal resolution and spectral detail, enhancing the discriminative power of the extracted features.
Table 1. MFE parameters
|
Parameter |
Value |
|
Frame length |
200 ms |
|
Frame stride |
100 ms |
|
Filter number |
40 |
|
FFT length |
256 |
|
Low frequency |
20 Hz |
|
High frequency |
8kHz |
Figure 6 shows the steps of MFE feature generation, starting with the audio signal for two randomly selected classes (0 and 70%) and the Mel energies for these classes, and ending with FFT Bin weighting. While Figure 7 shows the features gathering for all ten classes.
Figure 6. MFE-generated images
Figure 7. Generated features
5.4 Deep learning classifier
In this work, the flow measurement has been divided into 10 classes. A deep learning model has been built to classify input sound signals into their proper classes, representing the water flow. The one-dimensional convolutional neural network model (1DCNN) was chosen as a classifier with 10 output classes. The architecture and the layers of the classifier are stacked together, as shown in Figure 8. In addition, the hyperparameter setting of the neural network is shown in Table 2.
Table 2. 1DCNN model hyperparameter
|
Hyperparameter |
Value |
|
Number of training cycles |
60 |
|
Learning rate |
0.005 |
|
Validation set size |
20% |
|
Batch size |
32 |
|
Profile integer 8 model |
Yes |
Figure 8. 1DCNN architecture
Figure 9. Confusion matrix (training)
As mentioned earlier, the model was trained using the collected dataset, which is split into 80% for training and 20% for validation. The CNN is trained over 60 training cycles (Epochs) with a learning rate of 0.005 and batch size of 32. The deep learning model depicts very high-performance metrics with a validation accuracy of 99.3% and a loss of 0.02. Figure 9 shows the confusion matrix of the ten classes of the classifier with an F1 Score metric.
The confusion matrix confirms the perfect performance of measuring water flow in the pipe and proper categorizing tasks for each class, with a slight dip in accuracy in the second class. More performance training metrics are shown in Table 3, which also confirms the success of the model in classifying the sound signal into its right class in a proper way.
Table 3. 1D-CNN classifier performance metrics
|
Metric |
Value |
|
Area under ROC curve |
1.00 |
|
Weighted average recall |
0.99 |
|
Weighted average precision |
0.99 |
|
Weighted average F1 Score |
0.99 |
The implemented system is tested using the unseen 20% of the collected sound data. The confusion matrix of the 10 classes classifier shows the high-performance metrics, as shown in Figure 10. However, low misclassification error has been accorded along low flow rate classes (10% and 20%) with a score of 76.9% that gained a 20% class, which is expected with low flow rate [25]. The relatively low accuracy observed for class 2 (20% flow) is likely attributed to the overlap in acoustic features with adjacent flow levels, particularly class 1 (10%). At low flow rates, the sound generated by the water is weak and lacks distinctive acoustic characteristics, making it difficult for the classifier to differentiate between these classes reliably.The results generally show a high classification total accuracy of 98.39%, which outperforms the state-of-the-art research approaches in flow rate measuring classifiers, as shown in Table 4. Other performance metrics are calculated to enlighten a global overview of the implemented approach. One of these metrics is the area under the curve (AUC) of the classifier's receiver operating characteristics (ROC). The perfect results of AUC with a score of 1.0 represent the ability of the classifier to distinguish sharply between the 10 classes. Weighted average precision and weighted average recall are other global performance metrics considering the number of samples in each class. In turn, this will predict better classifier performance measures. The high scores of 0.99 for both precision and recall measures reflect the ability of the classifier to correctly predict each class individually. Finally, another global measure is chosen to illustrate how the multi-class classifier is successful, as shown in Table 4, the F1 Score performance metrics.
Figure 10. Confusion matrix (test set)
Table 4. Classifier performance metrics
|
Metric |
Value |
|
Accuracy |
98.39% |
|
The area under the ROC curve |
1.00 |
|
Weighted average recall |
0.99 |
|
Weighted average precision |
0.99 |
|
Weighted average F1 Score |
0.99 |
The 0.99 value of the F1 Score shows that the classifier performs well regarding the harmonic mean of both precision and recall measures, which F1 contains. The 10-step water-flow measuring model is quantized and optimized using the TinyML framework with the online development platform Edge Impulse [26]. The quantization tool helps to reduce the required hardware resources and fits the model to a resources-constrained Arduino microcontroller (Nano 33 BLE sense). Table 5 shows the resources used in the deployed model of the microcontroller.
Table 5. Microcontroller resources usage by the classifier
|
Metric |
MFE |
Classifier |
Total |
|
Latency |
161ms |
7ms |
168ms |
|
RAM |
19.8k |
10.6k |
19.8k |
|
Flash |
- |
35.8k |
35.8k |
|
Accuracy |
- |
- |
98.39% |
At the same time, the latency is fast enough to enable the deployed model to be implemented in real-time. Classifier high-performance metrics show the success of the implemented approach to measure flow successfully and accurately. The 98.39 % accuracy of the classifier illustrates the success of the proposed approach with an F1 Score of 0.99, which outperforms the competitive research results. Moreover, the trained and tested classifier with the feature generation stage is deployed efficiently on the limited resources microcontroller (Arduino Nano 33BLE sense), consuming only a tiny share of the microcontroller's resources. The contribution of this work is illustrated in Table 6, which represents a comparison to the related published system in the literature.
Table 6. Comparison of the proposed system with the related works in the literature
|
Ref. |
Required System Resources |
Classifier Technique |
Accuracy |
Installation Cost |
Classifier Levels |
Installation Complexity |
|
[9] |
N/A |
Mel-Frequency Cepstral Coefficients (MFCC) |
84% |
N/A |
4 |
simple |
|
[10] |
High-resource |
K-nearest neighbour (KNN) |
≅90% |
Low cost |
6 |
Complex |
|
[1] |
Time-frequency zones |
F-measure |
≅70% |
N/A |
binary |
N/A |
|
[7] |
N/A |
- |
80% |
High cost |
- |
Simple |
|
[11] |
Low-resources |
Support Vector Machine (SVM) |
≅96% |
High cost |
4 |
Complex |
|
This work |
Very Low resources |
1D-CNN |
98.39% |
Low cost |
10 |
simple |
In this paper, a non-intrusive water flow rate measuring system is designed, tested, and enhanced using a one-dimensional convolutional neural network.
The suggested flow meter collects the acoustic signal generated due to water flow in the measured pipe, which changes based on the water flow rate. A microphone collects the audio signal and then fed to the model's feature extraction stage. In turn, the convolutional neural network receives the generated feature. The generated features train and test the 1D-CNN algorithm to classify the acoustic signal into 10 classes based on the flow rate category. The trained flow measuring system is tested using the test set of the collected acoustic data. The test results show high-performance metrics scores and reflect the proposed classifier's success with its 10 classes measuring water flow in pipes. The system measured flow levels from 10% to 100% of pipe capacity. This design option increased system reliability when installed with different pipe diameters. It is important to remember that a flow value of less than 10% is regarded as zero. This assumption prevents the microphone from recording weak water sounds to maintain system stability against ambient noise. Implementing the proposed system increases the ability to build low-cost measuring modules that can be easily installed and non-invasively. The classifier of 10 classes gained a total accuracy of 98.39% and an F1 Score of 0.99. The scores show how accurate and reliable this proposed approach is. The systems and their high-performance metrics scores open the opportunity to manufacture low-cost, straightforward modules. This approach can be practical for domestic flow meters and detect many patterns, such as leak behaviour and blocked pipes. The trained and tested classifier with the feature generation stage is deployed efficiently on the limited resources microcontroller (Arduino Nano 33BLE sense), consuming only a tiny share of the microcontroller's resources.
[1] Guyot, P., Pinquier, J., André-Obrecht, R. (2013). Water sound recognition based on physical models. In 2013 IEEE International Conference on Acoustics, Speech and Signal Processing, Vancouver, BC, Canada, pp. 793-797. https://doi.org/10.1109/ICASSP.2013.6637757
[2] Campagna, M.M., Dinardo, G., Fabbiano, L., Vacca, G. (2015). Fluid flow measurements by means of vibration monitoring. Measurement Science and Technology, 26(11): 115306. https://doi.org/10.1088/0957-0233/26/11/115306
[3] Mileiko, S., Cetinkaya, O., Yakovlev, A., Balsamo, D. (2021). A non-intrusive ultrasonic sensor system for water flow rate measurement. In 2021 IEEE Sensors Applications Symposium (SAS), Sundsvall, Sweden, pp. 1-6. https://doi.org/10.1109/SAS51076.2021.9530165
[4] de Souza, N., dos Santos Miranda, I.D., Khun, A., de Araujo Wanderley Romeiro, L., Fontes, C.H., de Castro Lima, A.C. (2023). Development of an acoustic flowmeter for low flow rates. Flow Measurement and Instrumentation, 91: 102368. https://doi.org/10.1016/j.flowmeasinst.2023.102368
[5] Rajita, G., Mandal, N. (2016). Review on transit time ultrasonic flowmeter. In 2016 2nd International Conference on Control, Instrumentation, Energy & Communication (CIEC), Kolkata, India, pp. 88-92. https://doi.org/10.1109/CIEC.2016.7513740
[6] Lannes, D.P., Gama, A.L., Bento, T.F.B. (2018). Measurement of flow rate using straight pipes and pipe bends with integrated piezoelectric sensors. Flow Measurement and Instrumentation, 60: 208-216. https://doi.org/10.1016/j.flowmeasinst.2018.03.001
[7] Makwiza, C., Jacobs, H.E. (2017). Sound recording to characterize outdoor tap water use events. Journal of Water Supply: Research and Technology—AQUA, 66(6): 392-402. https://doi.org/10.2166/aqua.2017.120
[8] Zaric, N., Radonjic, M., Kyriazakos, S., Djurisic, M.P. (2014). Automated algorithm for classification of water-flow signals to support Ambient Assisted Living applications. In 2014 22nd Telecommunications Forum Telfor (TELFOR), Belgrade, Serbia, pp. 31-34. https://doi.org/10.1109/TELFOR.2014.7034351
[9] Chen, J., Kam, A.H., Zhang, J., Liu, N., Shue, L. (2005). Bathroom activity monitoring based on sound. In Pervasive Computing: Third International Conference, PERVASIVE 2005, Munich, Germany, pp. 47-61. https://doi.org/10.1007/11428572_4
[10] Ibarz, A., Bauer, G., Casas, R., Marco, A., Lukowicz, P. (2008). Design and evaluation of a sound based water flow measurement system. In Smart Sensing and Context: Third European Conference, EuroSSC 2008, Zurich, Switzerland, pp. 41-54. https://doi.org/10.1007/978-3-540-88793-5_4
[11] Vafeas, A., Papadopoulos, G., Moustakas, K., Tzovaras, D. (2018). Energy-efficient, noninvasive water flow sensor. In 2018 IEEE International Conference on Smart Computing (SMARTCOMP), pp. 139-146. https://doi.org/10.1109/SMARTCOMP.2018.00084
[12] He, J., Skibbe, Y., Mj, B., Makwiza, C. (2015). Correlating sound and flow rate at a tap. Procedia Engineering, 119: 864-873. https://doi.org/10.1016/j.proeng.2015.08.953
[13] Vu, T.T., Nguyen, T.T., Pham, X.C., Hoang, D.B. (2011). Feature selection and activity recognition to detect water waste from water tap usage. In 2011 IEEE 17th International Conference on Embedded and Real-Time Computing Systems and Applications, pp. 138-141. https://doi.org/10.1109/RTCSA.2011.47
[14] Vanijjirattikhan, R., Kabir, M.A., Bland, S.N., Chahl, J., Wang, Z. (2022). AI-based acoustic leak detection in water distribution systems. Results in Engineering, 15: 100557. https://doi.org/10.1016/j.rineng.2022.100557
[15] Leighton, T. (2012). The Acoustic Bubble. Academic Press.
[16] van der Doel, K. (2005). Physically based models for liquid sounds. ACM Transactions on Applied Perception (TAP), 2(4): 534-546. https://doi.org/10.1145/1101530.1101554
[17] Zhang, C., Stephens, M.L., Lambert, M.F., Alexander, B.J., Gong, J. (2022). Acoustic signal classification by support vector machine for pipe crack early warning in smart water networks. Journal of Water Resources Planning and Management, 148(7): 04022035. https://doi.org/10.1061/(ASCE)WR.1943-5452.0001570
[18] Rajasekaran, U., Kothandaraman, M. (2024). A survey and study of signal and data-driven approaches for pipeline leak detection and localization. Journal of Pipeline Systems Engineering and Practice, 15(2): 03124001. https://doi.org/10.1061/JPSEA2.PSENG-1611
[19] Tak, R.N., Agrawal, D.M., Patil, H.A. (2017). Novel phase encoded mel filterbank energies for environmental sound classification. In International Conference on Pattern Recognition and Machine Intelligence, pp. 317-325. https://doi.org/10.1007/978-3-319-69900-4_40
[20] Ahmed, A., Serrestou, Y., Raoof, K., Diouris, J.F. (2022). Empirical mode decomposition-based feature extraction for environmental sound classification. Sensors, 22(20): 7717. https://doi.org/10.3390/s22207717
[21] Wojcicki, K. (2025). Triangular Filterbank. https://www.mathworks.com/matlabcentral/fileexchange/31755-triangular-filterbank, accessed on February 15, 2025.
[22] Nisa, E.C., Kuan, Y.D. (2021). Comparative assessment to predict and forecast water-cooled chiller power consumption using machine learning and deep learning algorithms. Sustainability, 13(2): 744. https://doi.org/10.3390/su13020744
[23] Kiranyaz, S., Avci, O., Abdeljaber, O., Ince, T., Gabbouj, M., Inman, D.J. (2021). 1D convolutional neural networks and applications: A survey. Mechanical Systems and Signal Processing, 151: 107398. https://doi.org/10.1016/j.ymssp.2020.107398
[24] Çavdar, T., Ebrahimpour, N., Kakız, M.T., Günay, F.B. (2023). Decision-making for the anomalies in IIoTs based on 1D convolutional neural networks and Dempster–Shafer theory (DS-1DCNN). The Journal of Supercomputing, 79(2): 1683-1704. https://doi.org/10.1007/s11227-022-04739-2
[25] Karadirek, I.E. (2020). An experimental analysis on accuracy of customer water meters under various flow rates and water pressures. Journal of Water Supply: Research and Technology—AQUA, 69(1): 18-27. https://doi.org/10.2166/aqua.2019.031
[26] Hymel, S., Banbury, C., Situnayake, D., Elium, A., Ward, C., Kelcey, M., Baaijens, M., Majchrzycki, M., Plunkett, J., Tischler, D., Grande, A., Moreau, L., Maslov, D., Beavis, A., Jongboom, J., Reddi, V.J. (2022). Edge impulse: An MLOps platform for tiny machine learning. arXiv preprint arXiv:2212.03332. https://arxiv.org/abs/2212.03332