全球用水量不断增加,主要城市因水资源短缺而承受的压力日益增加,这凸显了对有效水管理实践的迫切需要。在全球缺水地区,大量的水浪费主要归因于渗漏,低效使用,和老化的基础设施。建筑物管道中未检测到的漏水导致了水浪费问题。为了解决这个问题,需要一种有效的漏水检测方法。在本文中,我们探索边缘计算在智能建筑中的应用,以加强水管理。通过集成传感器和嵌入式机器学习模型,被称为TinyML,智能水管理系统可以收集实时数据,分析它,并为有效利用水资源做出准确的决策。向TinyML的过渡可以实现更快、更具成本效益的本地决策,减少对中心化实体的依赖。在这项工作中,我们提出了一种解决方案,该解决方案可以在使用TinyML的情况下,以最小的人为干预进行实际场景中的有效泄漏检测。我们遵循的方法类似于生产中典型的机器学习生命周期,跨越阶段,包括数据收集,培训,超参数调整,部署前对设备上资源效率的离线评估和模型优化。在这项工作中,我们考虑了现有的聚氯乙烯管道漏水声数据集。要准备用于分析的声学数据,我们进行了预处理以将其转换为scalogram。我们通过将迁移学习应用于五个不同的卷积神经网络(CNN)变体,设计了一种漏水检测方法。即EfficientNet,ResNet,AlexNet,MobileNetV1和MobileNetV2。CNN模型被发现能够检测到最大测试精度的泄漏,召回,精度,F1得分为97.45%,98.57%,96.70%,和97.63%,分别,使用EfficientNet模型观察到。要在ArduinoNano33BLE边缘设备上实现无缝部署,EfficientNet模型使用量化压缩,导致1932毫秒的低推断时间,255.3千字节的峰值RAM使用量,和仅48.7千字节的闪存使用要求。
The escalating global water usage and the increasing strain on major cities due to water shortages highlights the critical need for efficient water management practices. In water-stressed regions worldwide, significant water wastage is primarily attributed to leakages, inefficient use, and aging infrastructure. Undetected water leakages in buildings\' pipelines contribute to the water waste problem. To address this issue, an effective water leak detection method is required. In this paper, we explore the application of edge computing in smart buildings to enhance water management. By integrating sensors and embedded Machine Learning models, known as TinyML, smart water management systems can collect real-time data, analyze it, and make accurate decisions for efficient water utilization. The transition to TinyML enables faster and more cost-effective local decision-making, reducing the dependence on centralized entities. In this work, we propose a solution that can be adapted for effective leakage detection in real-world scenarios with minimum human intervention using TinyML. We follow an approach that is similar to a typical machine learning lifecycle in production, spanning stages including data collection, training, hyperparameter tuning, offline evaluation and model optimization for on-device resource efficiency before deployment. In this work, we considered an existing water leakage acoustic dataset for polyvinyl chloride pipelines. To prepare the acoustic data for analysis, we performed preprocessing to transform it into scalograms. We devised a water leak detection method by applying transfer learning to five distinct Convolutional Neural Network (CNN) variants, which are namely EfficientNet, ResNet, AlexNet, MobileNet V1, and MobileNet V2. The CNN models were found to be able to detect leakages where a maximum testing accuracy, recall, precision, and F1 score of 97.45%, 98.57%, 96.70%, and 97.63%, respectively, were observed using the EfficientNet model. To enable seamless deployment on the Arduino Nano 33 BLE edge device, the EfficientNet model is compressed using quantization resulting in a low inference time of 1932 ms, a peak RAM usage of 255.3 kilobytes, and a flash usage requirement of merely 48.7 kilobytes.