Engineers in Dhaka have built a working prototype that watches household water in real time, decides when it needs purifying, cleans it with reverse osmosis and ultraviolet light, and then bills the household automatically for exactly what it used. The system, described in the journal Discover Internet of Things, links eight IoT sensors, an ESP32 microcontroller, a cloud-hosted digital twin and a web dashboard into a single pipeline, and its developers say it is the first low-cost domestic framework to combine monitoring, purification, forecasting and billing rather than treating them as separate problems.
The team behind the work, led by Abu S. M. Mohsin with Shadab H. Choudhury and Munyem Ahammad Muyeed, frames the project against a stark backdrop. More than 2.2 billion people worldwide lack access to safely managed drinking water, and in Bangladesh only 34.6 percent of the population has access to safe water, with waterborne contamination contributing to nearly 8.5 percent of deaths annually. Conventional monitoring, they argue, remains fragmented and labor-intensive, incapable of delivering real-time insight at the domestic level, while manual billing introduces errors, delays and inequity, often with a single bill covering an entire building regardless of individual usage.
The architecture divides the household into three conceptual agents, each a water consumption module equipped with its own sensor set and microcontroller. A kitchen agent prioritizes quality-sensitive parameters such as pH, turbidity, total dissolved solids, temperature and color, because that water is destined for drinking and cooking. Toilet agents focus on quantity metrics, flow rate, pressure and cumulative volume, which matter for leak detection and consumption-based billing. All three agents synchronize with a centralized digital twin core that aggregates their data streams into a unified system state vector, applies rule-based coordination, and triggers purification when any agent detects parameters exceeding predefined safety thresholds.
That core is what makes the system a digital twin rather than a dashboard. It maintains a continuously updated virtual replica of the physical plumbing, refreshed at fixed intervals, and supports three functions the authors highlight: predictive analytics, in which machine learning models forecast contamination trends, water demand and billing outcomes before they occur; what-if simulation, allowing purification strategies such as RO-only versus combined RO plus UVC to be tested without interrupting household supply; and optimization, recommending efficient treatment and billing strategies under varying conditions. A simulation-based scalability test modeled 1,000 households transmitting aggregated sensor updates to the cloud, with a real-time service deadline of 60 seconds per reporting cycle and roughly 16 to 17 concurrent requests per second at peak load.
On the purification side, the prototype pairs a reverse osmosis unit, which strips sediments, chlorine, dissolved salts and heavy metals through multiple filtration stages, with an ultraviolet-C lamp operating at 254 nanometers, which inactivates bacteria, viruses and protozoa by damaging their nucleic acids. Laboratory testing on water from Mirpur WASA in Dhaka, with chlorine and lead assays performed at the Bangladesh Council of Scientific and Industrial Research, showed untreated tap water falling in the Poor category of the Water Quality Index while the combined RO plus UVC treatment lifted the index into the Good category, with a computed WQI of 43.82 for the purified sample. Turbidity dropped from 1.35 NTU to 0.98 NTU and total dissolved solids fell from 15.4 milligrams per liter to 8.1 after treatment. The authors note that lead and chlorine values served as proxy-based reference indicators for validating turbidity and TDS sensors, not direct equivalents, since turbidity measures light scattering rather than metal concentration.
The machine learning layer compared three forecasting approaches on data from six IoT-enabled household sensors, 60,169 data points collected between March and April 2022 and trained on a two-week subset. Autoregressive and ARIMA models struggled, with more than half of parameters showing negative R-squared values despite moderate error rates, a failure the team attributes to short periods of extremely high variance corresponding to domestic water usage, which the limited pilot data made hard for the models to learn. Additive regression, implemented through the FBProphet library, performed comparatively better under the pilot dataset’s constraints, achieving relatively low error rates for temperature, pH, flow, pressure, TDS and color, though it too faltered on turbidity and volume. Its advantage, the authors explain, lies in Fourier-based decomposition and smoothing functions that tolerate the irregular sampling, intervals that drifted between 11 and 20 seconds with occasional multi-hour gaps, that cripple regression models assuming evenly spaced observations.
Sensor accuracy itself varied. While most sensors exceeded 96 percent accuracy against laboratory references, the turbidity measurement, validated via lead, averaged around 66.7 percent, a figure the authors present as supporting reasonably reliable monitoring under pilot-scale conditions rather than laboratory-grade precision. The energy footprint of purification proved modest: the non-portable system’s 24-volt UVC lamp disinfects 25 liters of water in eight minutes, and at one cycle per day the estimated annual electricity cost is roughly 393 Bangladeshi taka, with annual maintenance provisioned at 300 taka. A portable UVC-based smart bottle variant would cost about 49 taka per year in electricity and 200 taka in maintenance.
The user-facing layer is a web dashboard, publicly accessible at wqqms.netlify.app, that presents real-time quality indices, consumption statistics, purification status and predicted billing, with sensor readings benchmarked against international safe drinking water guidelines and deviations expressed as a percentage of safety. A MySQL relational database with normalized schema and foreign key constraints ties sensor records, user accounts, device locations, purification events and billing entries together through a REST API. A user survey during system testing confirmed the dashboard covered the key functionalities required for monitoring, purification management and billing oversight.
The authors are explicit that this remains a proof of concept. The digital twin is a partial, data-driven prototype, not a fully integrated cyber-physical system, validated only at five locations in Dhaka, Mohakhali, Satarkul-Badda, Mirpur-2, Mirpur-10 and Gulshan, under controlled domestic conditions. Coordination is primarily rule-based, which may limit adaptability in dynamic environments, and the sensing and purification subsystems carry inherent constraints including limited monitoring parameters, partial microbial removal capability, sensor fouling and calibration drift. The dataset’s limited temporal coverage and diversity may restrict model generalizability, and some parameters are estimated using proxy indicators rather than direct laboratory measurements. Cybersecurity threats such as man-in-the-middle and distributed denial-of-service attacks remain concerns, with mitigation strategies suggested but not yet validated.
What the pilot does establish is feasibility: that sensing, treatment, prediction and payment can run as one closed loop in a domestic setting, transitioning from passive observation to active intervention. The framework aligns with United Nations Sustainable Development Goal 6 on clean water and sanitation, and the authors point toward smart city deployment, advanced biosensing for direct microbial detection, redundancy-aware sensor fusion and larger, more diverse datasets as the next steps. Until those larger-scale and long-term validations arrive, the results should be read as indicative rather than fully generalizable, a first demonstration that the plumbing, the purifier and the bill can finally speak the same language.
Subject of Research: A pilot-scale IoT and machine learning digital twin framework for domestic water quality monitoring, purification and automated billing
Article Title: AI-driven multi-agent digital twin conceptual framework for real-time domestic water quality monitoring, purification and smart billing
Article References: Mohsin, A. S. M., Choudhury, S. H., & Muyeed, M. A. (2026). AI-driven multi-agent digital twin conceptual framework for real-time domestic water quality monitoring, purification and smart billing. Discover Internet of Things, 6(1), Article 209. https://doi.org/10.1007/s43926-026-00501-9
Image Credits: AI Generated
DOI: 10.1007/s43926-026-00501-9
Keywords: digital twin, IoT sensors, water quality, machine learning, reverse osmosis, UVC purification, automated billing, additive regression, Dhaka, SDG 6, smart water management, pilot study
News Source: Denise Maddox. (October 28, 2026). Digital twin prototype watches household water quality, purifies it and bills you in real time. Scienmag.



