A LoRa-Based Wireless Sensor Network for Urban Water Quality Monitoring with Real-Time Machine Learning and Energy Analysis

This paper presents a LoRa-based system for real-time urban water quality monitoring. The proposed platform integrates several sensors, including ultraviolet (UV), infrared (IR), red-green-blue (RGB), pH, turbidity, and temperature sensors, to monitor different water quality parameters. A total of 1443 sensor records were collected during the experiments. Among these records, 75 UV measurements, corresponding to approximately 5.2% of the dataset, were missing or invalid while the Red, Green, and Blue (RGB) and IR measurements were available. Several regression and machine learning models were evaluated to reconstruct these UV values. Multiple Linear Regression showed limited performance in the initial random train–test evaluation (R2 = 0.12), while second-order Polynomial Regression achieved a considerably higher R2 of 0.963. Support Vector Regression (SVR), k-Nearest Neighbors (KNN), Multi-Layer Perceptron (MLP), and Random Forest (RF) were also evaluated. Random Forest obtained the highest R2 in the random train–test evaluation (R2 = 0.991). However, the results were less consistent when the models were evaluated using Leave-One-Session-Out (LOSO) validation. In this evaluation, KNN obtained the lowest mean absolute error (MAE) and root mean squared error (RMSE), while the mean R2 values were negative for all evaluated models, showing limited generalization between experimental sessions. The possible energy benefit of UV reconstruction was also estimated. Based on an active power of 2.995 W and an acquisition time of 10 s, avoiding 75 additional acquisition cycles would correspond to approximately 0.624 Wh of acquisition energy, or 4.94% under the assumptions used in the energy analysis. These results show that machine learning can be useful for reconstructing individual missing or invalid UV measurements when the corresponding optical measurements are available. At the same time, the differences observed between experimental sessions show that further experiments with more independent sessions and longer field deployments are needed.

Authors

Institutions

Publication Details

Journal
Sensors
Published
2026-09-29
DOI
https://doi.org/10.3390/s26196159
Primary Topic
Water Quality Monitoring Technologies
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
article

A LoRa-Based Wireless Sensor Network for Urban Water Quality Monitoring with Real-Time Machine Learning and Energy Analysis

Lorena Parra, Jaime Lloret, Iman Valizadeh
Sensors
Water Quality Monitoring Technologies
article

A LoRa-Based Wireless Sensor Network for Urban Water Quality Monitoring with Real-Time Machine Learning and Energy Analysis

Lorena Parra, Jaime Lloret, Iman Valizadeh
article en

Abstract

This paper presents a LoRa-based system for real-time urban water quality monitoring. The proposed platform integrates several sensors, including ultraviolet (UV), infrared (IR), red-green-blue (RGB), pH, turbidity, and temperature sensors, to monitor different water quality parameters. A total of 1443 sensor records were collected during the experiments. Among these records, 75 UV measurements, corresponding to approximately 5.2% of the dataset, were missing or invalid while the Red, Green, and Blue (RGB) and IR measurements were available. Several regression and machine learning models were evaluated to reconstruct these UV values. Multiple Linear Regression showed limited performance in the initial random train–test evaluation (R2 = 0.12), while second-order Polynomial Regression achieved a considerably higher R2 of 0.963. Support Vector Regression (SVR), k-Nearest Neighbors (KNN), Multi-Layer Perceptron (MLP), and Random Forest (RF) were also evaluated. Random Forest obtained the highest R2 in the random train–test evaluation (R2 = 0.991). However, the results were less consistent when the models were evaluated using Leave-One-Session-Out (LOSO) validation. In this evaluation, KNN obtained the lowest mean absolute error (MAE) and root mean squared error (RMSE), while the mean R2 values were negative for all evaluated models, showing limited generalization between experimental sessions. The possible energy benefit of UV reconstruction was also estimated. Based on an active power of 2.995 W and an acquisition time of 10 s, avoiding 75 additional acquisition cycles would correspond to approximately 0.624 Wh of acquisition energy, or 4.94% under the assumptions used in the energy analysis. These results show that machine learning can be useful for reconstructing individual missing or invalid UV measurements when the corresponding optical measurements are available. At the same time, the differences observed between experimental sessions show that further experiments with more independent sessions and longer field deployments are needed.

SensorsVol. 26(19)
Universitat Politècnica de València (ES), Universidad Politécnica de Madrid (ES)
Sustainable cities and communities
Openalex Percentile: Top 21%
Water Quality Monitoring Technologies
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.