The optimised operation of drinking water supply infrastructures is a crucial objective for companies and cities, facing the complexity of multiple conflicting objectives and factors such as climate change and demand fluctuations. This paper presents an intelligent and predictive control system designed for the efficient and safe management of these resources. The proposed system combines a multi-agent model with Artificial Intelligence algorithms. It uses the KNN algorithm for consumption prediction, highlighting its high accuracy (average relative error of 6%) and its ability to provide interpretable results that reflect human expert knowledge, avoiding the “black box” behaviour of other AIs. An essential component is the simulation tool developed. This allows the configuration, testing, validation and adjustment of the control system and its hyperparameters in a safe environment, preventing damage to critical infrastructure and optimising investments. The solution has been successfully validated in two real drinking water infrastructures in south-eastern Spain (serving 5,000 and 90,000-200,000 inhabitants). The results demonstrate a tangible improvement in pressure stabilisation, maintenance of optimal water levels (reducing unnecessary storage and the formation of by-products) and minimisation of pump starts/stops, which translates into energy savings and a longer service life for the equipment. In addition, this approach is adaptable to various infrastructure configurations.
Anomaly detection in water distribution networks (WDNs) using unsupervised methods faces a fundamental limitation: the inability of the classic Isolation Forest (IF) algorithm to locate the semantic origin of detected anomalies and quantify their severity in an actionable manner within environments whose operational nature is constantly evolving. This paper proposes Contextual Isolation Forest (CIF), an adaptive extension of IF designed to operate on dynamic systems with continuous sensor data streams. CIF integrates three sequential procedures: domain-specific formal data modelling, empirical estimation of hyperparameters via controlled contamination, and contextual explainability through semantic partitioning based on domain expert criteria, functional properties of the system and geographical distribution. The method introduces two new anomaly indicators, Recurrence (RI) and Intensity (II), which extend the output of the classic IF from < score > to < score, RI, II>, enabling prioritisation and diagnosis without additional post-hoc analysis, and laying the foundations for self-adaptive monitoring strategies. The model was validated on 33,096 real-world records, derived from 11 sensor variables distributed across 4 geographical zones of a WDN in south-eastern Spain. The results demonstrate the stabilisation of detection metrics with just 10 trees and a threshold of 0.70, identifying 5 critical anomalies (RI ∈ [0.38, 0.63] and II ∈ [0.00, 0.77]) with explicit localisation by zone and type of measurement. CIF complements IF, EIF and DIFFI by adding operational explainability through semantic subspaces, without requiring labels or assuming prior distributions, constituting a viable component for anomaly detection systems in continuously evolving industrial environments.
This paper presents the Data Quality Assurance Model (DQAM), a formal model and multilayered architecture designed to guarantee data integrity and robustness in Reliable and Quality-Assured Information Systems. Recognising that inaccurate or corrupted sensor data can lead to system collapses and false alarms in critical services, the DQAM provides a standardised and systematic flow of actions to ensure data excellence for Artificial Intelligence (AI). The architecture is structured into three specialised layers (Acquisition, Processing, and AI Adequacy), implementing formal transformation functions that act as a rigorous filter against data degradation. A core contribution is the mapping of these functions to ISO/IEC 25012 and 5259-2 standards, providing a practical framework for reliable information management. It should be noted that quality dimensions regarding timeliness and data volume are outside the scope of this work, as they depend on external data issuers and end-service requirements. The model’s viability is validated through a real-world implementation on a university campus managing millions of data points, demonstrating its capability to optimise performance—achieving a speedup of up to 43%—and prevent service malfunctions. This work bridges the gap between raw IoT streams, and the high-integrity standards required by modern AI-driven applications.