Water Quality Identification: Integrating IoT Sensors and Deep Learning for Near-Real-Time Water Quality Assessment
The increasing demand for sustainable and affordable smart-city infrastructure has intensified the need for low-cost, near-real-time water-quality monitoring systems. In this study, we propose Water-QI, a low-cost Internet of Things (IoT)-based environmental monitoring platform that combines budget-friendly sensors with deep learning for Water Quality Index (WQI) assessment and forecasting. The sensing platform measures five key physicochemical parameters, namely temperature, total dissolved solids (TDS), pH, turbidity, and electrical conductivity, enabling continuous multi-parameter monitoring in urban water environments. To model temporal variations in water quality under both cloud-based and edge-oriented deployment scenarios, we evaluate multiple Gated Recurrent Unit (GRU) architectures with different widths and depths. Experiments are conducted at two temporal resolutions, hourly and minute-level, in order to examine the trade-off between predictive accuracy and computational cost. In the hourly scenario, the single-layer GRU with 64 units achieved the best overall balance, reaching a validation RMSE of 0.0281 and a test R2 of 0.9820, while deeper stacked GRU models degraded performance substantially. In the minute-resolution scenario, shallow wider GRU models produced the best results, with the single-layer GRU with 512 units attaining the lowest validation RMSE (0.025548) and the 256-unit variant achieving nearly identical accuracy with much lower inference cost. The results show that increasing model width can yield marginal improvements at high temporal granularity, whereas excessive recurrent depth consistently harms convergence and generalization. Overall, the findings indicate that shallow GRU architectures provide the most practical solution for accurate, low-cost, and scalable near-real-time water-quality forecasting. In particular, the 64-unit GRU is the most suitable choice for hourly low-complexity operation, while the 256-unit GRU offers the best speed–accuracy trade-off for minute-level edge inference on resource-constrained devices.