Unsupervised Water Leakage Detection Using IoT Devices and Anomaly Detection Algorithms
Resumo
This work proposes a water leakage detection system for residential settings using low-cost sensors and unsupervised machine learning algorithms. Water consumption data is collected by an STM32 microcontroller connected to a pulse-output water meter and transmitted via LoRaWAN for remote analysis. The models used Isolation Forest and Elliptic Envelope require no labeled data. Evaluation was conducted using three datasets, including one collected by the authors. The models achieved an average F1-score of 0.8579, performing well even in high-variability scenarios. The proposed solution stands out for its scalability, low cost, and adaptability to different household consumption patterns.
Referências
Baranauskas, J. A. Sistemas inteligentes: fundamentos e aplicações. In Sistemas Inteligentes. Departamento de Computação e Matemática, FFCLRP-USP, Ribeirão Preto, 4, 2003. Disponível em: [link]. Acesso em: 10 maio 2025.
Cabral, R. A., C., P. A., Bonfim, M. S., and Coutinho, E. F. Desempenho energético no freertos com paralelismo em relação a sistema sequencial em um protótipo de hidrômetro lora. In LII Seminário Integrado de Software e Hardware (SEMISH). Brasil, 2025. Artigo aceito, no prelo. Disponível em: [link]
Centenaro, M. and Vangelista, L. Lorawan: A low power wide area network for the internet of things: A survey. Electronics 11 (1): 164, 2022.
Di Mauro, A., Di Nardo, A., Santonastaso, G. F., and Venticinque, S. An iot system for monitoring and data collection of residential water end-use consumption. In 2019 IEEE International Conference on Environment and Electrical Engineering and 2019 IEEE Industrial and Commercial Power Systems Europe (EEEIC / I&CPS Europe). IEEE, pp. 1–6, 2019
Gubbi, J., Buyya, R., Marusic, S., and Palaniswami, M. Internet of things (iot): A vision, architectural elements, and future directions. Future Generation Computer Systems 29 (7): 1645–1660, 2013
Guezouli, L., Guezouli, L., Djeghaba, M. B. E., and Bentahrour, A. Iot and ai for real-time water monitoring and leak detection. Journal of Renewable Energies, 2024.
Hariri, S., Carrasco Kind, M., and Brunner, R. J. Extended isolation forest. IEEE Transactions on Knowledge and Data Engineering 33 (4): 1479–1489, 2021.
Hastie, T., Tibshirani, R., and Friedman, J. The Elements of Statistical Learning: Data Mining, Inference, and Prediction. Springer, New York, 2009
Instituto Trata Brasil. Estudo de Perdas de Água 2024: Desafios e oportunidades para o avanço do saneamento no Brasil, 2024. Disponível em: [link]. Acesso em: maio de 2024.
Khan, M. A., Silva, R., and Tran, L. Recent advances on anomaly detection using isolation forest variants, 2023.
Kulikovas, Lukas, Packevičius, and Šarunas ¯ . Anomalous water use detection using machine learning. In Information Society and University Studies (IVUS). Kaunas, Lithuania, 2023
Lambert, A. What do we know about pressure: Leakage relationships in distribution systems? International Water Association (IWA), 2000. Disponível em: [link].
Liu, F. T., Ting, K. M., and Zhou, Z.-H. Isolation forest. In IEEE International Conference on Data Mining. pp. 413–422, 2008.
Ludermir, T. B. Inteligência artificial e aprendizado de máquina: estado atual e tendências. Estudos Avançados 35 (101): 99–118, jan-abr, 2021.
Ministério do Desenvolvimento Regional. Portaria nº 490, de 22 de março de 2021. [link], 2021. Estabelece os procedimentos gerais para o cumprimento de índices de perda de água na distribuição. Publicado no Diário Oficial da União em 23 de março de 2021.
Mohammed, A.-W., Zhang, Q., Alazab, M., Razzak, I., Jolfaei, A., and Gadekallu, T. R. Low-power wide-area networks (lpwans) for internet of things: A comprehensive survey. ACM Computing Surveys, 2024
Pedregosa, F., Varoquaux, G., Gramfort, A., Michel, V., Thirion, B., Grisel, O., Blondel, M., Prettenhofer, P., Weiss, R., Dubourg, V., Vanderplas, J., Passos, A., Cournapeau, D., Brucher, M., and Perrot. Scikit-learn: Machine learning in python. Journal of Machine Learning Research vol. 12, 2011.
Santos, M. M., Franco, M. L., Alves, W. M., de Souza, M. C., Barros, G. F., and da Silva, M. M. Internet das coisas: a busca do conceito e as perspectivas futuras sobre sua aplicabilidade. Research, Society and Development 10 (10): e140101018504, 2021.
Selvaprakash, J., Arasu, P. S. K., Xavier, V. S., Maria, O. R. R., Manimegalai, M., and Sebasthirani, K. Water leakage detection and recognition system. In 3rd International Conference on Intelligent Data Communication Technologies and Internet of Things (IDCIoT). IEEE, 2025.
