# SW3T-IoT: Smart Water Monitoring Based on a Three-Tier IoT Architecture

Mohammed Kamal Benhaoua, Amine Dahane, Rabaie Benameur, Izzessalam

Belhadj Benziane, Houssam Eddine Zahaf, Abderrahmane Benhariga,

Abdelkader Elouissi, Cherifa Boudia, Sami Souihi

► To cite this version:

Mohammed Kamal Benhaoua, Amine Dahane, Rabaie Benameur, Izzessalam Belhadj Benziane, Houssam Eddine Zahaf, et al.. SW3T-IoT: Smart Water Monitoring Based on a Three-Tier IoT Architecture. IEEE Access, 2025, 13, pp.206331-206354. 10.1109/ACCESS.2025.3640507. hal-05514613

HAL Id: hal-05514613

https://hal.science/hal-05514613v1

Submitted on 20 Feb 2026

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons CC BY 4.0 - Attribution - International License
Received 4 November 2025, accepted 26 November 2025, date of publication 4 December 2025, date of current version 10 December 2025.

Digital Object Identifier 10.1109/ACCESS.2025.3640507

RESEARCH ARTICLE

# SW3T-IoT: Smart Water Monitoring Based on a Three-Tier IoT Architecture

MOHAMMED KAMAL BENHAOUA<sup>1</sup>, AMINE DAHANE<sup>1,2,3</sup>, RABAIE BENAMEUR<sup>1,2</sup>, IZZESSALAM BELHADJ BENZIANE<sup>1</sup>, HOUSSAM EDDINE ZAHAF<sup>4</sup>, ABDERRAHMANE BENHARIGA<sup>1</sup>, ABDELKADER ELOUISSI<sup>1</sup>, CHERIFA BOUDIA<sup>1</sup>, AND SAMI SOUIHI<sup>3,5</sup>, (Senior Member, IEEE)

Corresponding authors: Mohammed Kamal Benhaoua (k.benhaoua@univ-mascara.dz) and Amine Dahane (amine.dahane@univ-oran1.dz)

This work was supported in part by PNR ECO-GIRE Project (ATRSSV/DGRSDT), IFA, PHC Tassili+ Program under Project 51319QD; and in part by French National Research Agency (ANR) through the Project HeRITAGEs under Grant ANR-23-CES25-0001.

**ABSTRACT** The growing impacts of climate change on water resources demand innovative monitoring and management strategies. This paper presents SW3T-IoT, an innovative water monitoring system leveraging Internet of Things (IoT) technologies to enhance water resource management under dynamic conditions. The system adopts a three-tier architecture—edge, fog, and cloud—integrating a custom-designed LoRaWDS node optimized for low power consumption and long-term autonomous operation. These nodes collect real-time data on water level, flow, pressure, temperature, and quality from distribution networks and reservoirs. Data are locally processed at the edge, then transferred to the cloud for advanced analysis and visualization. A Geographic Information System (GIS) enhances spatial awareness and decision-making. To ensure adaptability, SW3T-IoT integrates a continual learning (CL) framework for Biochemical Oxygen Demand (BOD) forecasting. The CL mechanism allows models to incrementally update with new environmental data without catastrophic forgetting, maintaining accuracy and robustness as water quality dynamics evolve. A hybrid CNN-BiLSTM-Attention model, reinforced with PER, AER, LwF, and EWC strategies, supports adaptive prediction and knowledge retention. The system delivers intuitive dashboards for engineers and water managers, providing a holistic, scalable, and intelligent solution for sustainable water resource management.

**INDEX TERMS** Internet of Things, smart water monitoring, edge computing, fog computing, cloud computing, continual learning, biochemical oxygen demand, deep learning models.

## I. INTRODUCTION

In recent years, the water quality (WQ) sector has witnessed increasing research attention, propelled by rapid population growth, accelerated industrial development, and the exacerbating effects of climate change. Contamination of surface and groundwater, deterioration of aquatic ecosystems, and deficiencies in water distribution infrastructure have emerged as critical challenges, posing substantial risks to human health, food security, and environmental sustainability [1].

The associate editor coordinating the review of this manuscript and approving it for publication was Razi Iqbal.

These issues have further intensified the pressure on global water resources, contributing to growing scarcity across several regions [2], [3]. The Mediterranean basin, including Algeria, has been particularly affected, where recurrent and severe drought episodes continue to strain already limited resources [4], [5]. While water quality encompasses multiple domains—including rivers, surface water, wastewater, agricultural water, and recreational sources—this study specifically focuses on water distribution management. To this end, we propose SW3T-IoT, a three-tier IoT-based smart water monitoring architecture tailored for water resource management companies, aiming to enhance monitoring

<footnote n="1">¹Technological Laboratory in Artificial Intelligence and Food Safety (LABTEC-IA), University of Mustapha Stambouli, Mascara 29000, Algeria</footnote>

<footnote n="2">²University of Oran 1, Institute of Applied Science and Technology (ISTA), Oran 31000, Algeria</footnote>

<footnote n="3">³Laboratory of Images, Signals and Intelligent Systems (LiSSi), TincNET Research Team, Paris-East Créteil University, 94010 Créteil, France</footnote>

<footnote n="4">⁴École Centrale Nantes, IMT Atlantique, CNRS, INRIA, LS2N, UMR 6004, Nantes Université, 44000 Nantes, France</footnote>

<footnote n="5">⁵CEA, List, University of Paris Saclay, 91120 Palaiseau, France</footnote>
efficiency, resilience, and decision-making. In this context, several key questions arise: How can we preserve this resource, [6]? How can we optimize its use [7]? How can we improve and maintain its quality [8]? How can we support the Algerian water distribution company, Algérienne des Eaux (ADE), in maintaining its network (preventive and corrective maintenance) using Geographic Information Systems (GIS)? How can we help ADE modernize its billing system and reduce the gap between production and consumption? Addressing these challenges requires intelligent water resource management to ensure sustainable distribution and use. Artificial intelligence (AI) is expanding its potential applications in water quality management due to developments such as the Internet of Things (IoT), cloud computing, and advanced data analytics [9], [10]. Water quality data are inherently dynamic and influenced by multiple factors, including changing environmental conditions, variable pollution levels, and the impacts of climate change. These continuous variations highlight the importance of continual learning (CL) models, which allow machine learning (ML) algorithms to keep learning from new data while preserving previously acquired knowledge. Cyberphysical systems (CPS) and the Internet of Things (IoT), through networks of connected sensors, open promising perspectives for long-term monitoring of water distribution and quality [11], [12], [13]. Advances in electronics—such as sensor miniaturization, low energy consumption, and reduced costs—have accelerated the deployment of monitoring devices. Furthermore, improvements in telecommunications now enable long-distance data transmission, even in remote areas, without requiring complex infrastructure or a continuous power supply. Despite these advances, existing solutions often remain limited to short-term experiments or specific applications, such as irrigation management [14]. Likewise, many studies on cloud data storage [15] rarely consider a fully integrated approach, covering the complete data path from sensors to cloud over multi-year periods, with diverse sensors and broad geographic coverage. Existing architectures also face limitations in scalability, flexibility, and security [16], [17]. This work aims to fill these gaps by proposing an integrated solution for long-term monitoring of both water distribution and water quality. Our solution, named SW3T-IoT: *Smart Water Monitoring Based on a Three-Tier IoT Architecture*, is designed for constrained environments and provides a sustainable approach for water distribution monitoring. SW3T-IoT relies on a three-tier architecture—edge nodes, fog computing, and cloud-based analytics—that together enable efficient data collection, processing, storage, and visualization. The SW3T-IoT system includes three main parts: 1) the LoRa-WDS Node, a low-power, long-lifespan sensor unit that collects data on water level, flow, temperature, and quality, transmitting it over several kilometers via the LoRa protocol; 2) the Edge Gateway, based on a Raspberry Pi, which performs local storage, analytics, and real-time visualization while reducing dependency on the cloud and improving resilience; and

3) the Cloud Platform, which provides large-scale storage, advanced analytics, and remote monitoring, with decision support through ThingsBoard integration.

Our proposed solution leads to several key contributions:

* **Design of an Optimized Generic LoRa-WDS Node:** A dedicated sensor node for long-term water monitoring, optimized for energy efficiency and LoRa-based communication.

* **Implementation of a three-tier architecture:** Integration of data acquisition at the LoRa-WDS node level, local processing by an Edge Gateway, and cloud-based analysis for flexible, efficient, and secure data management.

* **Integration of multiple sensor types:** Capability to incorporate diverse sensors for monitoring water levels, flow rates, temperature, pH, and other parameters critical to water quality.

* **Continental learning for water quality prediction:** Incorporation of a continual learning framework focused on Biochemical Oxygen Demand (BOD) time series, using a CNN-BiLSTM-Attention model with strategies such as PER, AER, LwF, and EWC, to adapt to evolving conditions while keeping prior knowledge.

* **Integration of GIS:** Development of a Geographic Information System that connects with SW3T-IoT to enhance visualization, spatial analysis, and decision-making for water managers.

All these contributions aim to deliver a comprehensive and sustainable framework for water resource management, enabling effective monitoring and informed decision-making for operators. The remainder of this paper is organized as follows. Section II reviews related work on smart water quality monitoring and IoT-based systems. Section III presents the proposed SW3T-IoT architecture, covering edge-fog-cloud integration, the custom LoRa-WDS node, and the GIS-based module for enhanced visualization and decision support. Section IV describes the materials and methods employed in this study. Section V details the continual learning framework and the CNN-BiLSTM-Attention model for predicting BOD. Finally, Section VI concludes the paper and highlights future research directions.

## II. LITERATURE REVIEW

In the literature, several studies have addressed water quality monitoring using IoT and ML techniques. However, most of these works focus on static models and lack adaptive frameworks capable of handling evolving environmental conditions.

### A. INTRODUCTION

Water is a vital resource requiring efficient management; however, traditional methods for monitoring and managing water distribution systems (WDS) are often time-consuming, costly, and insufficient for collecting detailed, real-time data necessary for informed decision-making [18]. The advent
<figure><img src="image_2.png" /><figcaption>FIGURE 1. SW3T-IoT: smart water monitoring based on a three-tier IoT architecture.</figcaption></figure>

of IoT technology has revolutionized water management by providing a framework for continuous monitoring and real-time data collection [19]. IoT has become a cornerstone in the digitization of critical infrastructure, comprising sensors, communication networks, and user interfaces for data processing and visualization [20]. Integrating IoT into WDS enables not only the gathering of large amounts of data, but also its analysis and extraction of actionable insights, thereby facilitating the development of Smart Water Networks (SWN) [21]. Unlike traditional approaches, these intelligent systems deeply embed Information and Communication Technologies (ICT) into water management practices [22], [23]. The interconnected sensors installed in all water bodies, pipelines, treatment plants, and distribution networks measure parameters such as temperature, turbidity, pH, pressure, flow rates, and contaminants [18], [24]. These technological advances create substantial opportunities for efficient management of water resources at the local and remote levels [19]. SWN, using wireless sensor networks (WSNs) and IoT, can monitor conditions on site, generate timely alerts for abnormal situations (for example, leaks or contamination), and support rapid decision-making for resource allocation and intervention [25], [26]. Moreover, combining IoT with Big Data analytics strengthens water management by transforming raw data into actionable insights [27]. Platforms such as SMART-WATER exemplify the modern approach, offering unified frameworks for urban water management using state-of-the-art IoT solutions for remote telemetry, control, and ML-based optimization [28]. These systems integrate sensors, communication devices, and advanced analytics to enable real-time monitoring of water quality, consumption patterns, and distribution network status, allowing for proactive maintenance and cost-effective resource use compared to traditional methods [29]. This

literature review provides an in-depth, comparative analysis of IoT technologies, architectures, challenges, and applications within the context of water distribution systems. Drawing primarily upon two recent detailed surveys [24], [26], this review explores the current state-of-the-art, significant challenges (especially for large-scale deployments), and future directions for intelligent, sustainable water management systems.

## B. IoT Architectures for Water Distribution Systems

Effective implementation of intelligent water monitoring and management relies on well-structured IoT architectures capable of reliably collecting, transmitting, processing, and analyzing data. The literature describes various approaches, reflecting technological evolution and diverse application needs.

### 1) THREE-TIER VERSUS FIVE-LAYER ARCHITECTURES

The three-tier architecture has gained popularity for its practicality and efficiency, decomposing the system into:

1) **Physical and Sensing Layer:** IoT devices with sensors (for example, pH, turbidity, flow, pressure) collect real-time data from WDS environments, distribution networks, treatment plants, and consumer endpoints [30], [31].

2) **Middleware and Communication Layer:** This layer ensures data transmission from sensors to central systems (cloud or servers) using wireless technologies (for example, GPRS, LoRaWAN, NB-IoT) and middleware that provides interoperability. SWaMM (Smart Water Metering Middleware), based on Edge Computing, exemplifies this layer's interface function [32], [33].
3) **Data Management and Application Layer:** At the top level, collected data are stored, processed, analyzed, and visualized. Cloud components, time-series databases, message brokers, object storage, and advanced analytics (AI/ML) transform raw data into actionable insights for decision-making [30], [33], [34].

More complex five-layer architectures have also been proposed [35], [36], adding distinct levels for edge processing and application-specific services. Velayudhan et al. [24] propose the IoTA4IWNet (IoT Architecture for Intelligent Water Networks), emphasizing a framework for real-time monitoring and control of water distribution networks with a focus on effective sensor design, communication, and processing. Pagano et al. [26] focus on large-scale deployments and propose an architecture (illustrated in their Fig. 1) where data flows from meters to concentrators, then via an IoT operator to application servers for water operators. Their significant contribution is integrating Edge Computing (EC) to address scale-related challenges, latency, bandwidth, and cost by decentralizing processing closer to data sources (concentrators or gateways). Incorporating EC enables real-time analysis, reduces network and cloud load, and enhances scalability, particularly for applications such as early leak detection. Pagano et al. distinguish Fog from Edge Computing and stress EC's role in massive SWGs, including smart cities and digital twins. The SWI-FEED framework [26] (Smart Water IoT-Framework for Evaluation of Energy and Data in Massive Scenarios) aligns with this evolution by integrating low-level (connectivity, energy) and high-level (data management, applications) network properties. While the three-tier architecture remains a common baseline, large-scale deployments are driving the integration of edge computing to overcome the limitations of centralized architectures and enable more responsive, efficient, and scalable water management systems.

### C. ESSENTIAL COMPONENTS OF SMART WATER MONITORING SYSTEMS

Intelligent water management relies on the seamless integration of multiple technological components, each contributing to the data value chain from collection to exploitation. As highlighted by Velayudhan et al. [24], Pagano et al. [26], and the introduction of the focused report, a set of core elements underpin the functionality and adaptability of modern water distribution systems (WDS). The foundation of these systems lies in specialized sensors that are deployed according to specific monitoring requirements. These include pH and turbidity sensors for assessing water quality, flow and level sensors for monitoring consumption and reservoir conditions, pressure and leak detection sensors for maintaining network integrity, and dissolved oxygen sensors for applications such as aquaculture. Strategic sensor selection and deployment are essential to capture a detailed representation of the state of the WDS [24], [37], [38], [39]. Complementing these are smart water meters (SWMs), which

extend beyond basic volumetric measurement. Equipped with communication capabilities, commonly through NB-IoT, SWMs enable early leak detection, consumption pattern analysis, enhanced customer engagement, and optimized infrastructure planning, while simultaneously reducing the cost of manual readings [40]. At the processing layer, microcontrollers and embedded computing platforms serve as the core of sensor nodes and gateways. Devices such as ESP32 boards, Android Things modules, and other edge computing platforms locally process raw data, perform pre-processing, manage communication tasks, and occasionally execute simple control logic. By integrating edge computing capabilities, these nodes can handle more complex analyses directly in the field, reducing data transmission requirements and improving response times [26], [37], [39], [41]. Reliable data flow is dependent on communication technologies that enable the interconnection of distributed components. WSNs are widely used to link nodes and, for large-scale deployments, low-power wide area network (LPWAN) technologies such as LoRaWAN, SigFox, and NB-IoT are favored for their low energy consumption and long-range performance [26], [42]. In parallel, the Advanced Metering Infrastructure (AMI) provides a structured data and communication backbone that enhances the hydraulic efficiency of utility networks [40]. Data management and visualization platforms, typically cloud-based solutions like ThingSpeak or integrated building management systems, handle the collected information. These platforms store data, perform advanced analytics, including ML and AI, and provide user-oriented tools such as dashboards, alerts, and reports to support both operational monitoring and informed decision-making [37], [41], [43], [44]. Finally, the sustainability of such distributed IoT infrastructures depends on power management systems. Many WDS nodes are deployed in remote or hard-to-access locations, making long-life batteries, solar recharging options, and energy optimization strategies crucial for continuous operation [26], [41]. The modularity and flexibility of these components allow intelligent water management solutions to be adapted to residential, industrial, and agricultural contexts, balancing performance, cost-efficiency, reliability, and scalability [45].

### D. MAJOR CHALLENGES OF IOT-BASED WATER DISTRIBUTION SYSTEMS

The integration of IoT technologies into water distribution systems (WDS) promises significant improvements in monitoring, operational efficiency, and data-driven decision-making. Nevertheless, this transition introduces considerable technical, operational, and deployment challenges, particularly in large-scale implementations for smart cities and regional utility networks [24], [26]. These challenges can be grouped into intrinsic WDS limitations and scale-related technological constraints. Intrinsic challenges stem from the physical and managerial characteristics of WDS. Aging infrastructure causes leaks and significant non-revenue water (NRW) losses, while rising demand and unplanned
expansions complicate the assurance of adequate water quality and quantity [24]. Data scarcity further limits predictive maintenance and strategic planning, as many utilities lack reliable historical records. Governance complexity, involving multiple stakeholders and regulatory frameworks, slows coordinated decision-making. The introduction of IoT compounds these issues by producing large volumes of heterogeneous, high-velocity data, demanding robust storage, processing, and analytics capabilities [24], [26]. Scale-related technological challenges emerge in massive IoT deployments. Scalability and interoperability are critical, as networks with tens of thousands of heterogeneous sensors require efficient configuration, protocol integration, and maintenance [26]. Energy efficiency is essential for battery-powered nodes expected to operate autonomously for years; LPWAN technologies help reduce consumption but require continuous optimization. Network reliability is challenged by signal attenuation and interference in underground or dense urban areas, which can hinder time-sensitive tasks like leak detection. Data management becomes increasingly complex as high-frequency sensing generates massive datasets. Edge computing mitigates cloud dependency and improves responsiveness but introduces challenges in distributed processing, security, and coordination. In addition, wireless coexistence in urban settings raises the risk of signal interference, and cybersecurity threats expand with the proliferation of sensors, gateways, and cloud interfaces, making data confidentiality, integrity, and availability critical for safe and resilient operation [26].

## E. COMMUNICATION TECHNOLOGIES AND DATA PROCESSING: FOCUS ON LPWAN AND EDGE COMPUTING

Efficient communication and data handling are critical for large-scale smart WDS. LPWAN technologies such as LoRaWAN, SigFox, and NB-IoT offer multi-kilometer coverage, low power consumption for long battery life, and better obstacle penetration than short-range radios [26]. Their limitations, low data throughput, interference susceptibility, and congestion in dense deployments, require technology selection based on throughput, latency, bidirectionality, and network ownership models [26], [42]. Edge Computing (EC) mitigates the data and bandwidth challenges of massive IoT by processing information at gateways or concentrators, reducing cloud dependence. It enables real-time anomaly detection, supports resilience during connectivity losses, and distributes computational load, while the cloud remains vital for advanced storage and analytics [26], [32]. Deploying EC requires addressing gateway capacity, code management, and security at the network edge. Combining LPWAN for low-power sensing with EC for local intelligence underpins scalable and responsive smart WDS [26].

## F. APPLICATIONS AND USE CASES

IoT applications in water distribution systems (WDS) aim to improve efficiency, sustainability, and resilience across different domains [24], [26]. Comprehensive monitoring

of the water cycle connects sources, treatment facilities, distribution networks, and end-use locations for a complete system view [24]. Water quality management employs sensors to monitor pH, turbidity, chlorine, and pollutants, facilitating real-time assessments of potability and triggering alarms [18], [37], [44]. Monitoring quantity and pressure is essential for maintaining hydraulic balance, optimizing flow, and preventing bursts [24], [38]. Leak detection and localization through the analysis of flow, pressure, or acoustic data can effectively reduce non-revenue water (NRW) and associated costs [24], [26], [38], [40]. Smart water metering (SWM) and demand management provide real-time consumption data, improve billing accuracy, and support peak demand forecasting and infrastructure planning [40], [43]. Predictive maintenance analyzes trends in pressure, vibration, and water quality to predict equipment or pipe breakdowns [24], while operations optimization uses IoT data to optimize treatment and pumping schedules, lowering energy and operational costs. Beyond municipal WDS, IoT helps aquaculture through dissolved oxygen and pH monitoring, as well as agricultural irrigation through precision water management [39]. These applications enable Smart Water Networks (SWN) and Smart Water Grids (SWG), essential for smart cities and digital twin modeling of WDS for simulation and optimization [26].

## G. INSIGHTS AND FUTURE DIRECTIONS FOR SMART WATER NETWORKS

This review, informed by key surveys [24], [26] and the report introduction, highlights the transformative potential of IoT in Water Distribution System (WDS) management. By integrating sensors, LPWAN communication, and data analytics—augmented with Edge Computing—operations can shift from reactive to proactive. Key benefits include reduced Non-Revenue Water through early leak detection, enhanced water quality monitoring, energy-efficient pumping, and improved planning for aging infrastructure. Applications span network monitoring, predictive maintenance, and consumer engagement via smart meters. Despite these advantages, several challenges persist, including aging infrastructure, complex governance, and IoT-specific issues such as scalability, interoperability, energy management, communication reliability, data processing, and cybersecurity. Pagano et al. [26] emphasize LPWAN and Edge Computing as critical for overcoming scale-related constraints, while architectures like IoTA4IWNet [24] and frameworks such as SWI-FEED [26] exemplify ongoing efforts to enhance network responsiveness and sustainability. In summary, IoT is pivotal for modernizing water distribution. Sustainable, large-scale deployment requires improvements in LPWAN efficiency, secure and high-performance Edge Computing, robust AI/ML analytics for anomaly detection, and standardized interoperability. A holistic approach that integrates technical, economic, and governance perspectives is essential to fully realize Smart Water Networks and achieve sustainable water management.
### III. PROPOSED SYSTEM ARCHITECTURE

The SW3T-IoT system is designed to implement a smart water grid, a prototype of an automatic water monitoring system for one distribution tank and two consumption tanks (representing two housing blocks). The distribution tank is responsible for distributing water to the two other consumption tanks. The system is based on a three-tier architecture. The first tier is built around the LoRa-WDS Node that we have developed; the second tier, called the “Edge” tier, consists of a gateway based on a Raspberry Pi, integrating the entire system developed for data acquisition, storage, and processing from the LoRa-WDS Node; and finally, the last tier is the Cloud, which enables remote access from anywhere to visualize and analyze the necessary data. Figure 1 illustrates each tier of the SW3T-IoT architecture, detailing its various parts and specific functionalities. We also show a deployment diagram for our proposed system in Figure 2. At the first tier, the system uses the LoRa-WDS Node, developed within the framework of our national research project (PNR). This sensor node, optimized for low energy consumption and long lifespan, collects data from various types of sensors, such as ultrasonic sensors for water level measurement, temperature sensors, flow sensors, and other water quality sensors (turbidity, conductivity, pH, and dissolved oxygen). It uses the LoRa protocol for data transmission, ensuring reliable communication over long distances (several kilometers). The node is based on an ATmega328P microcontroller. The LoRa-WDS Node’s acquisition board can be connected to various types of sensors. In our prototype, we used the HC-SR04 ultrasonic sensor, which measures the water level in the distribution tank, and the LM35 temperature sensor, which gathers temperature data from the same tank. For water quality, additional sensors for turbidity, conductivity, and pH are also installed in this tank. Furthermore, three other LoRa-WDS Nodes are used in the prototype. The first node reads data from a flow meter located at the outlet pipe of the distribution tank, enabling the quantification of the amount of water flowing out of this main tank. The second node reads data from a flow meter and a pressure sensor, making it possible to quantify the amount of water consumed by the first apartment block, as well as the water pressure at that point. The third node is similar to the second one, performing the exact measurements for the second apartment block. The goal of this work is to test the system’s functionality at a prototype level. The prototype also includes, in the third node, an electric valve connected to the inlet pipe of the second block (consumption tank), which closes when the water reaches a predetermined level. The second tier of the SW3T-IoT architecture consists of a Raspberry Pi that receives data from the LoRa-WDS nodes and, in other tests, via serial connection. The Raspberry Pi processes the incoming data, stores it in a MongoDB database, enables visualization via a web interface, and transmits the data to the cloud for further analysis. The third tier is the cloud, providing remote access for data visualization and analysis, using Thingsboard,

an open-source IoT platform. The Raspberry Pi transmits the data to Thingsboard via the HTTP protocol, enabling user-friendly data visualization as well as in-depth analysis and processing.

### IV. MATERIALS AND METHODS

Developing our smart water monitoring system required bringing together a diverse set of hardware and software, organized into three tiers: edge, fog, and cloud. To clarify the methodology behind the construction of our SW3T-IoT system, we present a detailed explanation of each tier, highlighting the relevant hardware and software components employed.

#### A. EDGE TIER

In this tier, we built LoRa-WDS sensor nodes that collect data from various sensors and transfer it using a wireless communication module. To construct such a device with an IoT-based architecture, we must have the three major components of an IoT device, which are:

##### 1) MICROCONTROLLERS

A microcontroller (MCU) is a compact embedded computing unit that integrates a CPU, memory, and I/O peripherals on a single chip, allowing efficient execution of dedicated tasks [46]. In this work, three different types of microcontrollers were employed, which were extensively tested and evaluated for system implementation. These microcontrollers are:

*   **Arduino Uno:** During the prototyping phase, we simply used Arduino boards because of their ease of use. Arduino Uno is a microcontroller board developed by Arduino.cc, based on the Microchip ATMEGA328P. Introduced in 2010 as an open-source platform, it includes digital and analog I/O pins for interacting with various extension modules and circuits [47]. It features 14 digital I/O pins (including PWM outputs) and 6 analog input pins. Programming is done via the Arduino IDE using a USB connection. The board can be powered either via USB or through a 7-20V barrel jack, such as a 9V battery.

*   **Arduino Pro Mini:** The Arduino Pro Mini is a low-cost, compact board designed for experienced users requiring flexibility and permanent integration in embedded applications. It omits a built-in USB interface and pre-soldered header pins to minimize size and cost. Available in 5 V and 3.3 V versions, it requires proper voltage supply and compatible peripheral components [48].

*   **SAMD21 Xplained Pro:** In the second year of our project, during the validation phase of our LoRa-WDS Node prototypes, we used the SAMD21 microcontroller in our IoT kits. The Microchip SAMD21 Xplained Pro Evaluation Kit is based on the ATSAMD21J18A microcontroller and features an integrated on-board debugger. This debugger functions as a USB composite
<figure><img src="image_3.png" /><figcaption>**FIGURE 2.** System architecture diagram with deployment specifications for each kit.</figcaption></figure>

device, simplifying programming and debugging tasks without the need for external tools. It provides interfaces for debugging, a virtual COM port, and a Data Gateway Interface (DGI). The Xplained Pro board includes three Xplained Pro extension headers, allowing easy connectivity with extension kits. These modular extension boards improve functionality by adding specific peripherals such as sensors, connectivity options, touch controllers, and more.

After experimenting with the three microcontrollers, we performed two types of comparisons. The first was a technical comparison. We found that the Arduino Uno is a reliable and easy-to-use option for prototyping, offering balanced performance. The Arduino Pro Mini is a more compact and power-efficient alternative, ideal for space-constrained applications. The SAMD21 Xplained Pro provides higher performance with its 32-bit ARM Cortex-M0+ architecture, more GPIO pins, and native USB support. This technical comparison led us to consider the SAMD21 Xplained Pro as the best choice for a high-performance, reliable solution.

However, the second comparison focused on the use case, where we found that Arduino Uno was not the best option for the deployment solution, so we had to choose between SAMD21 and Arduino Pro Mini. The SAMD21 microcontroller supports programming with a real-time operating system (RTOS), which takes advantage of its high performance. This RTOS enables a time-oriented architecture with multiple tasks and executions, for example, reading data from sensors or sending it. With the RTOS, we can control the priority and execution time of each task, while also using sleep modes to reduce power consumption when tasks are not running. On the other hand, the Arduino Pro Mini is better suited for bare-metal programming, executing

tasks sequentially in a repeated loop. For our current system, which consists of kits, which we will discuss later, there is no significant need to manage task priorities or execution times. Therefore, a bare-metal approach not only simplifies development but also offers better scalability and suitability for this specific use case. As a result, we chose the Arduino Pro Mini as the microcontroller for our final deployment. In this work, we ultimately opted for the LoRa R-02 module instead of the NRF24L01. Although the NRF24L01 offers very high data throughput (up to 2 Mbps) and is highly cost-effective for short-range links, its performance rapidly degrades beyond a few hundred meters and requires relatively constant power to maintain the radio in receive mode. In contrast, the LoRa SX1278 Ra-02 (433 MHz) module supports long-range communication, with a practical connectivity range of 2–5 km in semi-urban environments and up to 15–20 km under ideal rural line-of-sight conditions. Moreover, its ultra-low-power sleep modes enable battery-operated nodes to operate for several months or even years on a single cell [49].

## 2) WIRELESS COMMUNICATION MODULES

A wireless communication module refers to a device that facilitates communication between nodes and the gateway without the need for physical wired connections. These modules are essential components in modern IoT systems and embedded networks, as they enable efficient, flexible, and scalable data transmission [50]. Various wireless technologies can be employed by these modules, depending on the application's requirements, such as range, data rate, and power consumption. For our SW3T-IoT system, we experimented with two well-known and widely used communication modules. These modules were selected based on their popularity, ease of integration, and compatibility
with our hardware and software setup. These modules are as follows:

* NRF24L01: For the prototyping phase, we used the NRF24L01 radio module. It is an integrated circuit for radio transmission/reception, operating in the 2.4 GHz frequency range, similar to WiFi or Bluetooth. It can be controlled using the SPI port by a basic Arduino board [51]. It is worth mentioning that theoretically, under specific conditions such as open terrain and no interference, communication could extend up to 1.1 kilometers at a speed of 256,250 kbps. However, practical scenarios often do not meet these ideal conditions.

* LoRa SX1278 Ra-02 (433 MHz): For the second year, during the validation of our LoRa-WDS Node prototypes, we plan to use the LoRa SX1278 Ra-02 (433 MHz) module in our IoT kits. It is a wireless communication device based on LoRa (Long Range) technology, designed to enable long-distance data transmission while consuming little power [49]. Operating in the 433-MHz or 868/915-MHz frequency bands, depending on the version, it offers communication ranges that can reach several kilometers in open field conditions, making it a popular choice for IoT applications, WSNs, and other use cases requiring long-range communication and low energy consumption.

A range test was conducted to evaluate the communication performance of the developed LoRa-based wireless monitoring system. The secondary node, built around the LoRa RA-02 transceiver with the spring antenna on the IPEX interface, is connected to a DS18B20 temperature sensor. On the other hand, a similar LoRa RA-02 module with a 2 dBi SubG rubber antenna to increase reception was used for the primary node. Field tests were done in building environments to assess the reliability of transmission in a semi-obstructed environment. As shown in Table 1, the PDR was maintained at around 100% for most measured positions within a distance of about 70 m, followed by a slight degradation in the packet delivery to 96%, and finally, all packets were lost at the farthest point. The average latency of the successfully transmitted packets was around 615 ms which conveyed that the range communication performance is consistent and has little variation in the delay. These results manifest that the LoRa RA-02 module is able to keep high reliability even in obstructions and that performance will be noticeably improved in open-area conditions, where the higher distances of communication can be obtained due to much smaller attenuation and line-of-sight propagation.

## 3) SENSORS

In the context of quantity and quality of water, several factors are considered on the basis of the intended use of the water. Table 1 summarizes the different water quantity and quality parameters, together with the sensor brand names

<table><caption>TABLE 1. LoRa field test results: PDR, average latency, and distance.</caption><thead><tr><td>Point</td><td>Lat. (°N)</td><td>Lon. (°E)</td><td>PDR (%)</td><td>Latency (ms)</td><td>Dist. (m)</td></tr></thead><tbody><tr><td>1</td><td>36.069167</td><td>1.125056</td><td>100</td><td>615.42</td><td>41.61</td></tr><tr><td>2</td><td>36.069222</td><td>1.125278</td><td>100</td><td>615.43</td><td>76.48</td></tr><tr><td>3</td><td>36.069333</td><td>1.124944</td><td>100</td><td>615.43</td><td>17.77</td></tr><tr><td>4</td><td>36.069528</td><td>1.125056</td><td>100</td><td>615.43</td><td>64.23</td></tr><tr><td>5</td><td>36.069444</td><td>1.124722</td><td>100</td><td>615.44</td><td>55.46</td></tr><tr><td>6</td><td>36.069139</td><td>1.124750</td><td>100</td><td>615.54</td><td>14.63</td></tr><tr><td>7</td><td>36.069083</td><td>1.124639</td><td>99</td><td>615.55</td><td>29.52</td></tr><tr><td>8</td><td>36.069361</td><td>1.124556</td><td>96</td><td>615.60</td><td>44.54</td></tr><tr><td>9</td><td>36.069444</td><td>1.124528</td><td>0</td><td>-</td><td>46.60</td></tr></tbody></table>

used and their descriptions. Before designing the final PCB, we went through a prototyping phase in which the system was implemented using discrete modules wired on breadboards. During this phase, we built four functional kits. We tested them with an Arduino Uno microcontroller. These prototype kits were designed to test sensor integration, data acquisition logic, and wireless communication. In Figure 3, we can see the early version of our system using the Arduino Uno. This setup was built during the initial prototyping phase and includes several sensors connected via a breadboard. The system is powered via USB and communicates wirelessly using the NRF24L01 module. In Figure 4 we can see a more advanced prototype developed later in the project, using the SAMD21 Xplained Pro board which was selected for its enhanced performance, increased number of interfaces, and support for real-time operating systems, allowing us to test more complex and scalable architectures. These prototypes provided valuable insights and allowed us to validate our sensor choices and data transmission logic. However, they were not suitable for long-term deployment due to their bulkiness, high power consumption, and fragile wiring. This led us to transition toward a more compact and better design. To implement the final hardware version of the LoRa-WDS Nodes, we designed a compact printed circuit board (PCB) that forms the core of our data-acquisition kit for monitoring environmental parameters (pH, pressure, turbidity, water level, electrical conductivity, temperature, dissolved oxygen, flow rate, etc.). Details about the sensors and their calibration procedures are comprehensively described in our previous work [52]. The board was laid out in EasyEDA (PCB design and circuit simulation software) as a two-layer PCB. The selected microcontroller, the Arduino Pro Mini, was mounted directly on the board together with the LoRa RA-02 (433 MHz) module for wireless transmission. To ensure long-range and reliable communication, an external antenna was connected to the LoRa module, offering extended range in open-field conditions. Power for the LoRa-WDS Node is supplied by a 6V/1W solar panel connected to a CN3065 solar charge controller, which manages the charging of a single-cell lithium-ion battery. This controller is well-suited for solar energy harvesting thanks to its constant-current/constant-voltage (CC/CV) charging algorithm and ultra-low standby current. Voltage regulation is handled using two low dropout regulators (LDOs): the LD1117V33 and
<figure><img src="image_4.png" /><figcaption>FIGURE 3. Empirical analysis of gateway coverage and link performance in testbed environment.</figcaption></figure>

AMS1117-3.3, which ensure stable 3.3V output required by the microcontroller and sensors.

This combination allows the system to operate autonomously in outdoor environments with minimal power consumption. Figure 5 shows the power and modules connectivity diagram of our LoRa-WDS Node PCB. The custom PCB, measuring approximately 95 mm × 35 mm, was designed with a double-layer layout to optimize routing and minimize size. All sensor inputs were labeled and equipped with standard connectors for easy integration of modules such as turbidity, pH, dissolved oxygen, and flow sensors, depending on the use case. Mechanically, the PCB includes four mounting holes (Ø ~3mm) positioned at the corners to allow secure attachment to enclosures or poles, ensuring stability during deployment in outdoor or industrial environments, the board supports sensors for various parameters such as pH, pressure, turbidity, water level, and electrical conductivity.

Figure 6 shows the PCB design version 1.1, which integrates key components including a LoRa communication module, an Arduino Mini microcontroller, a voltage regulator and a solar energy management circuit with rechargeable battery. The real image of this board is presented in Figure 7, where it can be observed that the PCB is single-sided, with visible copper tracks. The compact layout of version 1.0 was optimized to reduce the board size, though this resulted in a dense component arrangement. Nonetheless, the design allowed the battery to be placed on the back of the PCB, facilitating power integration while improving

energy autonomy. In version 2.0, shown in Figure 8 (design) and Figure 9 (real image), the layout was revised and expanded. The components were more evenly distributed to enhance thermal dissipation and support sensors with larger footprints. This more spacious configuration also simplified maintenance and integration of new features. Furthermore, all traces and ground planes in both versions were carefully routed to minimize electromagnetic interference (EMI), with particular attention given to isolating the high-frequency LoRa antenna feed from sensitive analog signal lines. Based on this hardware, we decided to develop three specific kits, one of which has a different architecture than the prototypes we discussed earlier. This was done to ensure the flexibility of our SW3T-IoT system. The first kit is dedicated to water quality monitoring and includes sensors for pH, turbidity, temperature, dissolved oxygen, and electrical conductivity. The second kit focuses on flow and pressure measurements, integrating the YF-S201 flow sensor and the SEN0257 water pressure sensor. The third kit focuses on water level detection and utilizes a capacitive or optical level sensor, rather than the HC-SR04 ultrasonic sensor, which can be unreliable in environments with condensation. Each kit is enclosed in a weatherproof casing with openings for the solar panel connection and the LoRa antenna, ensuring ease of deployment and long-term stability in the field. These design choices reflect our focus on modularity, low power consumption, and long-range reliability for the collection of environmental data in real time. The designed PCB board features (Figure 10) the CN3791 MPPT charge controller,
<table><caption>TABLE 2. Parameters measured by the developed kits.</caption><thead><tr><td>Parameter</td><td>Sensor Name</td><td>Description</td></tr></thead><tbody><tr><td>Turbidity</td><td>SEN0189 (Analog Turbidity Sensor)</td><td>Measures water turbidity by detecting suspended particles through light transmittance and scattering, which vary with total suspended solids (TSS) concentration.</td></tr><tr><td>Temperature</td><td>DS18B20 (Water Temperature Sensor)</td><td>A waterproof digital temperature sensor that maintains signal integrity over long distances. It uses a 1-Wire interface, requiring only one data line and ground.</td></tr><tr><td>Dissolved Oxygen</td><td>SEN0237-A (Dissolved Oxygen Sensor)</td><td>Quantifies the concentration of dissolved oxygen in water, serving as an indicator of water quality. Commonly used in aquaculture, environmental monitoring, and research.</td></tr><tr><td>pH</td><td>SEN0161-V2 (pH Meter V2)</td><td>Measures the acidity or alkalinity of a solution, suitable for aquaponics, aquaculture, and environmental testing applications.</td></tr><tr><td>Electrical Conductivity</td><td>DFR0300 (Analog Electrical Conductivity Meter)</td><td>Evaluates the ionic concentration of an aqueous solution by measuring its electrical conductivity, providing a metric for water quality assessment.</td></tr><tr><td>Water Flow</td><td>Gravity: Water Flow Sensor (1/2")</td><td>The YF-S201 flow sensor detects liquid flow rate using a magnetic rotor and Hall-effect sensor, where rotation speed corresponds to volumetric flow.</td></tr><tr><td>Water Pressure</td><td>Gravity: Analog Water Pressure Sensor</td><td>The SEN0257 sensor measures water pressure in pipelines or tanks, commonly used in IoT, smart home, and industrial monitoring systems.</td></tr><tr><td>Water Level</td><td>HC-SR04 (Ultrasonic Sensor)</td><td>Ultrasonic distance sensor that measures water level within a range of 2–400 cm, ideal for liquid level monitoring applications.</td></tr></tbody></table>

<figure><img src="image_5.png" /><figcaption>FIGURE 4. Modular hardware kits for comprehensive water quality monitoring (kits 1–4).</figcaption></figure>

which efficiently harvests energy from a 6V–12V solar panel to charge an 18650 Li-ion battery, ensuring optimal power extraction under varying sunlight conditions. In addition, the battery is protected by the HY2112-BB protection IC and the FS8205A MOSFET, which prevent overcharge,

over-discharge, and short circuits. Additionally, the board incorporates an MT3608 boost converter to increase the battery voltage to 5V for an Arduino Pro Mini, while a 3.3V LDO regulator powers a LoRa RA-02 module, allowing long-range wireless communication. Furthermore,
<figure><img src="image_6.png" /><figcaption>(a) Kits wiring using Arduino UNO board.</figcaption></figure>

<figure><img src="image_7.png" /><figcaption>(b) Kits wiring using SAMD21 Xplained Pro Developer Kit.</figcaption></figure>

<figure><img src="image_8.png" /><figcaption>**FIGURE 6.** Comprehensive power and connectivity schematic of the LoRa-WDS node.</figcaption></figure>

a bidirectional level shifter ensures safe signal conversion between the 5V Arduino and the 3.3V LoRa module. The design also includes modular sensor connectors for interfacing with environmental, agricultural, or industrial sensors. Finally, this system provides a self-sustaining, low-power solution ideal for academic research in WSNs, precision agriculture, and environmental monitoring, with potential future enhancements in multi-source energy harvesting and power optimization.

## 4) POWER CONSUMPTION AND BATTERY LIFETIME ESTIMATION

The power consumption of the designed wireless sensor node was analyzed to estimate its operational lifetime when powered by a 3.7 V, 2000 mAh 18650 lithium-ion battery. The power path consists of a HY2112 protection circuit followed by an MT3608 boost converter that raises

<figure><img src="image_9.png" /><figcaption>**FIGURE 7.** Detailed hardware components of the LoRa-WDS node (PCB v1.0).</figcaption></figure>

the voltage to 5 V. The 5 V rail powers the Arduino Pro Mini microcontroller and all 5 V sensors, while an AMS1117-3.3 V linear regulator supplies the LoRa RA-02 transceiver. Table 3 summarizes the current consumption of each subsystem. During active operation, the Arduino Pro Mini draws approximately 20 mA, while the LoRa RA-02 module consumes 120 mA at 3.3 V. The sensor suite—including DS18B20 (temperature), dissolved oxygen, pH,
<figure><img src="image_10.png" /><figcaption>FIGURE 8. Prototype PCB design: preliminary layout (v1.0).</figcaption></figure>

<figure><img src="image_11.png" /><figcaption>FIGURE 9. Detailed hardware components of the LoRa-WDS Node (PCB version 1.1).</figcaption></figure>

<figure><img src="image_12.png" /><figcaption>FIGURE 10. Prototype PCB layout: preliminary design (v1.1).</figcaption></figure>

<table><caption>TABLE 3. Active current consumption of components.</caption><thead><tr><th>Component</th><th>V (V)</th><th>Active (mA)</th><th>Sleep (mA)</th><th>Notes</th></tr></thead><tbody><tr><td>Arduino Pro Mini</td><td>5</td><td>20</td><td>0.01</td><td>Central controller</td></tr><tr><td>LoRa RA-02</td><td>3.3</td><td>120</td><td>0.002</td><td>via AMS1117 regulator</td></tr><tr><td>DS18B20</td><td>5</td><td>1.5</td><td>0</td><td>Temperature sensor</td></tr><tr><td>DO Sensor (Gravity)</td><td>5</td><td>30</td><td>0</td><td>Analog sensor</td></tr><tr><td>pH Sensor (Gravity)</td><td>5</td><td>35</td><td>0</td><td>Analog sensor</td></tr><tr><td>DFR0300 TDS Sensor</td><td>5</td><td>10</td><td>0</td><td>Conductivity</td></tr><tr><td>YF-S201 Flow Sensor</td><td>5</td><td>15</td><td>0</td><td>Pulse output</td></tr><tr><td>SEN0257 Pressure Sensor</td><td>5</td><td>7</td><td>0</td><td>Analog sensor</td></tr><tr><td>HC-SR04 Ultrasonic</td><td>5</td><td>15</td><td>0</td><td>Distance meas.</td></tr><tr><td>Total (5 V)</td><td>5</td><td>133.5</td><td>—</td><td>—</td></tr></tbody></table>

total dissolved solids (DFR0300), YF-S201 (flow), SEN0257 (pressure), and HC-SR04 (ultrasonic distance)—collectively draws approximately 133.5 mA at 5 V.

The system operates in a low-duty-cycle configuration, where the microcontroller remains in deep sleep mode until

awakened by a LoRa interrupt signal. The active state duration is approximately 30 s per hour, yielding a duty cycle:

$$D = \frac{30}{3600} = 0.0083 \quad (1)$$

Sleep current is negligible compared to the active state and can be omitted in the average power calculation.

The instantaneous load power during active operation is expressed as:

$$P_{\text{active}} = V \times I \quad (2)$$

Substituting the measured parameters:

$$P_{\text{active}} = 5 \times 133.5 \text{ mW} = 667.5 \text{ mW} \quad (3)$$

Considering converter efficiencies, the MT3608 boost converter operates at approximately $\eta_{boost} = 88\%$, while the AMS1117 regulator achieves $\eta_{reg} = 66\%$. Thus, the total battery power draw during active operation is:

$$P_{\text{batt,active}} = \frac{P_{\text{active}}}{\eta_{\text{boost}}} = \frac{667.5}{0.88} = 758.5 \text{ mW} \quad (4)$$

The average battery power is determined by multiplying by the duty cycle:

$$P_{\text{avg}} = P_{\text{batt,active}} \times D = 758.5 \times 0.0083 = 6.29 \text{ mW} \quad (5)$$

Given the nominal battery voltage $V_{batt} = 3.7$ V, the corresponding average discharge current is:

$$I_{\text{avg}} = \frac{P_{\text{avg}}}{V_{\text{batt}}} = \frac{6.29}{3.7} = 1.7 \text{ mA} \quad (6)$$

The expected operational lifetime of the 2000 mAh 18650 cell can then be estimated as:

$$t = \frac{2000}{1.7} \approx 1176 \text{ hours} \approx 49 \text{ days} \quad (7)$$

Given that the 6 V, 1 W solar panel produces approximately 5 Wh per hour under full sunlight, only about 17 minutes of sunlight per day is required to maintain continuous operation. This confirms that the designed system achieves high energy efficiency and extended battery autonomy suitable for remote monitoring applications.

## B. FOG TIER

Positioned between the edge and cloud tiers, the fog layer utilizes a device known as the gateway. Our gateway is a small, portable processing unit, designed to manage databases and host a web application for monitoring and actuator control. Crucially, it must also support radio modules such as LoRa and nRF24L01 to ensure reliable data reception from edge nodes. We selected the Raspberry Pi 4 Model B as our gateway (Figure 11) due to its compact size and Linux-based architecture. It effectively hosts a local database and web application for monitoring and actuator control [53]. Its robust specifications, including a 1.5 GHz quad-core ARM Cortex-A72 CPU, up to 4 GB of RAM, and a rich set of onboard interfaces (SPI, I²C, USB, Ethernet, Wi-Fi), perfectly align with our project's demands. To ensure
<figure><img src="image_13.png" /><figcaption>FIGURE 11. Detailed circuit schematic of the proposed hardware prototype.</figcaption></figure>

seamless sensor data reception from edge nodes, this same Pi 4 is equipped with two SPI-attached radio modules: an nRF24L01 (2.4 GHz) for short-range, high-throughput links, and a LoRa RA-02 (433 MHz) for long-range, low-power telemetry. Incoming packets are buffered in memory, preprocessed, and, during burst transmissions or backhaul outages, temporarily queued in local storage. Once connectivity (via Ethernet, Wi-Fi, GSM, or LoRaWAN) is reestablished, the gateway then forwards this aggregated data upstream to the cloud tier.

For software, the Raspberry Pi 4 was chosen for its hardware resources and compatibility with various programming languages and data processing libraries, thanks to its Linux-based operating system. To address compatibility issues and simplify deployments, containerization technology was employed.

As illustrated in Figure 12, our platform collects data from multiple kits and publishes it via the MQTT protocol to an MQTT broker installed in the cloud for data distribution to various deployed services. Among these services, a MongoDB database stores gateway configurations and data as documents accessible from anywhere. This database is utilized by data analysts for centralized data processing. Additionally, InfluxDB, a time-series database, is used for sensor data storage, visualization, and simplified statistical calculations. Our platform consists of several Node.js containers to ensure system availability and fluidity under increased load. These containers process data stored in the databases and provide RESTful APIs for communication with single-page web applications deployed on the Nginx web server. HAProxy acts as a load balancer among

<figure><img src="image_14.png" /><figcaption>FIGURE 12. Key hardware components for the field experiment: gateway.</figcaption></figure>

these containers to ensure balanced distribution of end-user requests.

Figure 13 illustrates the software architecture of the application embedded within the gateway. It uses the SPI protocol for reading data received from the nRF or LoRa
<figure><img src="image_15.png" /><figcaption>FIGURE 13. Modular containerized software architecture for the fog gateway.</figcaption></figure>

<figure><img src="image_16.png" /><figcaption>FIGURE 14. Embedded application software architecture for the gateway.</figcaption></figure>

RA-02 radio module. This data is then processed, organized, and stored in the MongoDB database. The web application's backend is designed with Node.js, using the Express.js framework to create APIs for accessing stored data and performing edge processing. The frontend is developed with React.js, and pages are deployed via the Nginx web server. The integrated WiFi card of the Raspberry Pi serves as an access point for connecting to the web application from a computer or smartphone. The system collects measurements from various sensors, including turbidity, temperature, dissolved oxygen, pH, electrical conductivity, water flow, water pressure, and water level, from different kits. For each kit, these measurements are formatted as a string with values separated by semicolons, then transmitted via the nRF24L01 or LoRa RA-02 module. The nRF24L01/LoRa RA-02 module is configured with a payload size of 32 bytes, a channel frequency of 0 × 76 (118 decimal), a transmission rate of 1 Mbps, and minimum transmit power (PA_MIN) to optimize energy consumption and reduce interference. Auto-acknowledgment (AutoAck), dynamic payloads, and payload acknowledgment are enabled to enhance communication reliability. Before transmission, the formatted string is converted into a list of characters and padded with zeros if necessary to meet the 32-byte constraint. Once the message is ready, it is transmitted, and the send time is recorded to measure response time. After sending, the transceiver switches to listen mode to receive a potential response from the receiver. A timeout mechanism is implemented: if no response is received within two seconds, an error message is displayed to indicate a potential connection problem. The transceiver then stops listening, and a three-second delay is

introduced before restarting the process to ensure stable and continuous communication.

The web application's dashboard (Figure 14.a) displays information about the kits and their latest captured values. Users can select the target kit, and specific station information such as localization, kit description, and the latest received measurement will be visualized. The dashboard also presents the various installed and operational sensors, with their latest received values, allowing real-time monitoring and informed decision-making. At the bottom of the dashboard (Figure 14.b) the history of each sensor's measurements is visualized in graph form. The user can select a sensor, and the graphs automatically update with statistics according to the year, month, and day. It is also possible to store this information in a CSV file for later data analysis if needed. The MQTT protocol can be configured for synchronization with the cloud (Figure 14.c). Connection information for the MQTT Broker must be provided. It is also possible to test access to the broker and then save the configuration once everything is correctly parameterized. To ensure continuous service monitoring, APIs have been developed to obtain system status data such as RAM, CPU, and disk usage, as well as application deployment status. These APIs allow verification of whether the Node.js server is functional, as well as the database and the radio module. Details are visualized in Figure 17.c. The web application also offers the possibility to modify the username and password for access, which helps prevent unauthorized access and strengthens the application's security.

### C. CLOUD TIER

The Cloud Layer constitutes the uppermost tier of our architecture. It is the central point of our SW3T-IoT system, where all collected data from the fog and edge tiers is gathered. It provides powerful tools for in-depth analysis and overall system control. Here, we host the main application for water resource management, offering advanced features like geographical information systems (GIS), subscriber management, and infrastructure control. This layer ensures data is always available, scalable, and secure for critical decision-making. The AdeGIS application serves as the central platform for comprehensive water resource management. It integrates various functionalities, including advanced GIS capabilities, subscriber management, and valve control. This application is crucial for decision-making regarding water availability and its impact on the environment. The AdeGIS platform uses Laravel for its backend and React for its frontend to deliver a fast, user-friendly experience. This setup handles complex data processing behind the scenes while keeping the interface responsive and engaging. For mapping, it uses Leaflet (an open-source JavaScript library for mobile-friendly interactive maps) to display water network layouts, sensor locations, and other spatial data directly on interactive maps. AdeGIS uses QGIS (Quantum GIS), a free, open-source desktop GIS, to extend its geospatial data
<figure><img src="image_17.png" /><figcaption>(a) Real-Time Dashboard for Kit Data and Latest Measurements</figcaption></figure>

<figure><img src="image_18.png" /><figcaption>(c) MQTT Client Configuration Form for Cloud Synchronization</figcaption></figure>

<figure><img src="image_19.png" /><figcaption>(b) Interactive Dashboard for Sensor History, Statistics, and CSV Export</figcaption></figure>

<figure><img src="image_20.png" /><figcaption>(d) Overview of Gateway Services, Statuses, and System Information</figcaption></figure>

<caption>**FIGURE 15.** System dashboards and architecture: (a) real-time dashboard, (b) interactive sensor history, (c)mers, and (d) gateway services overview.</caption>

management and analysis capabilities, [54]. This integration provides powerful mapping tools, spatial analysis functions, and advanced data visualization features critical for water resource management. With these GIS features, users can map distribution networks, pinpoint potential leak sites, and oversee infrastructure maintenance more effectively. Furthermore, AdeGIS includes dedicated subscriber-management modules that let water authorities track usage trends, process billing, and maintain customer records with ease. It also features remote valve control so that operators can open, close, or throttle valves anywhere in the network, ideal for balancing supply, handling emergencies, or enforcing conservation measures. By combining edge-level data collection and fog layer processing with cloud-based monitoring and analytics, the platform provides a complete real-time picture of the entire water system to support sustainable management. The AdeGIS application uses a client-server architecture. Its React.js frontend communicates with the Laravel backend via REST APIs. A PostgreSQL database holds all persistent data, which QGIS also populates directly. The AdeGIS application's user interface includes a variety of functionalities. The “Cartography” page (Figure 15) allows users to choose a location to visualize and analyze the water distribution network. When a site (e.g., Mascara) is selected, the map shows network elements like valves (red), water towers, and pipes (blue). Furthermore, users can add a new valve or water reservoir to the map by right-clicking on a specific location. Selecting an element on the map, such as Valve 09, displays detailed information (Figure 16), including

<figure><img src="image_21.png" /><figcaption>**FIGURE 16.** Interactive visualization of the water distribution network.</figcaption></figure>

<figure><img src="image_22.png" /><figcaption>**FIGURE 17.** Information display for a selected valve.</figcaption></figure>

its name, historical sensor measurements (pressure, pH, flow) visualized with 5-minute intervals, precise position, and a list of connected subscribers. Users can also modify or delete the selected element. Detailed information similar to that is available when a water reservoir is selected.
<figure><img src="image_23.png" /><figcaption>FIGURE 18. QGIS interface window.</figcaption></figure>

One of the core functionalities of AdeGIS is the Subscriber List page. This page displays all network subscribers, organized by criteria such as subscriber number, company name, block, entrance, floor, and wing, facilitating management and search operations. This functionality allows filtering by Block and Floor. Users can also add new subscribers, or edit/delete existing subscriber information. A key strength of AdeGIS lies in its integration with QGIS. As illustrated in Figure 17, QGIS enables ADE agents to map the water distribution network for any site and directly populate the PostgreSQL database to ensure efficient and structured updates of geospatial data.

The typical workflow for AdeGIS users involves:

*   **Login:** Users enter their credentials to access the application.

*   **Navigation:** Users can access the dashboard, network cartography, or subscriber management.

*   **Creation/Modification:** Users can add or modify valves, water towers, subscribers, or pipes via QGIS.

*   **Consultation:** Users can view and analyze analytical data for better decision-making.

Advanced functionalities include:

*   **JWT Authentication:** Ensures secure exchanges between the frontend and backend using JSON Web Tokens for session and user access management.

*   **Interactive Graphs:** Integration of Chart.js provides dynamic and intuitive visualizations of analytical data.

*   **Real-time Notifications:** Instantaneous information updates via WebSockets or polling ensure fluid data synchronization.

## V. CONTINUOUS LEARNING FRAMEWORK FOR WATER QUALITY ESTIMATION

This section introduces the proposed continual learning framework for short and long-term forecasting of water quality parameters, with a focus on Biochemical Oxygen Demand (BOD). The framework enables models to adapt to changing patterns in water quality while preserving previously learned information. We tested the approach using BOD data, a highly dynamic indicator, to demonstrate its effectiveness.

### A. CONTINUOUS LEARNING FRAMEWORK

Continuous learning allows a system to adapt to new input patterns while also keeping previously learned information. This section presents an overview of continuous learning approaches typically used in academic literature [55], [56].

#### 1) PRIORITIZED EXPERIENCE REPLAY (PER)

Prioritized Experience Replay (PER) is a continual learning strategy designed to reduce forgetting in regression tasks by training on a fixed-size buffer of past data [57]. Let $B_t$ denote the replay buffer at time $t$, with a maximum capacity $C$. When new data $D_t$ arrives, the buffer is updated as follows:

$$B_{t+1} = \text{Update}(B_t, D_t), \quad \text{such that } |B_{t+1}| \le C, \quad (8)$$

where older or less relevant samples may be removed. The regression model $f_t$ is then trained on the updated buffer:

$$f_{t+1} \leftarrow \text{Train}(f_t, B_{t+1}). \quad (9)$$

In PER, each sample in the buffer is assigned a priority score, typically based on its prediction error (e.g., mean squared error or absolute error). Samples with higher errors are more likely to be selected for replay:

$$p_i = \frac{|\mathcal{L}(y_i, \hat{y}_i)|^\alpha}{\sum_j |\mathcal{L}(y_j, \hat{y}_j)|^\alpha}, \quad (10)$$

where $\mathcal{L}(y_i, \hat{y}_i)$ is the loss for sample $i$, and $\alpha$ controls the degree of prioritization. This targeted replay enables the model to focus on more challenging or informative examples, thereby improving generalization while preserving prior knowledge.

#### 2) ADAPTIVE EXPERIENCE REPLAY (AER))

The Adaptive Experience Replay (AER) technique improves continual learning by dynamically adjusting the replay buffer size based on validation performance [58]. Let $B_t$ be the buffer at time $t$, and $V$ the validation set. For each new batch $D_t$, the model is trained using $B_t \cup D_t$, then evaluated on $V$:

$$\text{Perf}_t = \mathcal{M}(f_t, V), \quad (11)$$

where $\mathcal{M}$ is a performance metric such as accuracy or validation loss. The buffer size is then updated as follows:

$$|B_{t+1}| = \begin{cases} |B_t| + \Delta, & \text{if } \text{Perf}_t < \text{Perf}_{t-1}, \\ |B_t| - \Delta, & \text{otherwise,} \end{cases} \quad (12)$$

where $\Delta$ is a step-size parameter controlling how much the buffer size is adjusted. This adaptive mechanism helps retain important past experiences while integrating new data, thus reducing catastrophic forgetting.

#### 3) LEARNING WITHOUT FORGETTING (LWF)

The Learning without Forgetting (LwF) method mitigates catastrophic forgetting via knowledge distillation. Let $D_{old}$ and $D_{new}$ denote the old and new datasets. The teacher model
$f_T$ is trained on $\mathcal{D}_{old}$, and the student model $f_S$ is trained to minimize:

$$ \mathcal{L} = \mathcal{L}_{\text{new}}(f_S(\mathcal{D}_{\text{new}}), y_{\text{new}}) + \lambda \mathcal{L}_{\text{KD}}(f_S(\mathcal{D}_{\text{old}}), f_T(\mathcal{D}_{\text{old}})) \quad (13) $$

where $\mathcal{L}_{new}$ is the standard loss on new data, and $\mathcal{L}_{KD}$ is the distillation loss (e.g., KL divergence), balancing learning and retention via hyperparameter $\lambda$ [59].

### 4) ELASTIC WEIGHT CONSOLIDATION (EWC)

Elastic Weight Consolidation (EWC) is a continual learning method that reduces catastrophic forgetting by penalizing changes to important parameters learned from previous tasks [57]. Given model parameters $\theta$, and the optimal parameters from a previous task $\theta^*$, EWC introduces a regularization term into the loss function:

$$ \mathcal{L}(\theta) = \mathcal{L}_{\text{new}}(\theta) + \frac{\lambda}{2} \sum_{i} F_{i}(\theta_{i} - \theta_{i}^{*})^{2}, \quad (14) $$

where $\mathcal{L}_{new}$ is the loss on the new task, $F_i$ is the Fisher Information estimate for parameter $\theta_i$, and $\lambda$ controls the strength of regularization.

This objective ensures that updates to $\theta$ preserve knowledge from prior tasks by constraining important parameters from changing significantly.

## B. DATA COLLECTION AND PREPROCESSING

The dataset covers six years (2014–2019) from the Melbourne Eastern water treatment plant and includes data on energy use, weather conditions, and water quality. It combines public data from Melbourne Water with weather data from the Melbourne Airport station [60]. Table 2 lists variables, including hydraulic and biological metrics, as well as environmental factors, all aligned by date. In this study, we aim to predict biochemical oxygen demand (BOD), a key indicator of organic pollution in water. Accurate BOD prediction is crucial for ensuring the safe and efficient treatment of potable water, as values below 5 mg/L are considered acceptable, while those above 10 mg/L indicate critical contamination. The data were structured as a time series using a sliding window. Faulty entries were removed, numeric formats checked, and the data split into training sets (first 20% and next 50%) and a validation set (final 30%).

## C. DEEP LEARNING MODEL ARCHITECTURE

Table 3 presents the CNN-BiLSTM-Attention architecture used for multistep time-series forecasting over horizons of 1, 3, 6, 12, 24, and 48 days. The model starts with a 1D convolutional layer (128 filters) to extract local temporal features, followed by batch normalization, dropout ($p = 0.2$), and a Tanh activation to enhance training stability and generalization. Batch normalization stabilizes the learning process and reduces internal covariate shift by normalizing

<table><caption>TABLE 4. Description of the water quality dataset.</caption><thead><tr><th>Parameter</th><th>Observations</th><th>Mean</th><th>Std. Dev.</th><th>Min - Max</th></tr></thead><tbody><tr><td>Biochemical Oxygen Demand (BOD) (mg/L)</td><td>1382</td><td>382.0</td><td>85.99</td><td>140.0 - 850.0</td></tr><tr><td>Average Temperature (°C)</td><td>1382</td><td>15.04</td><td>5.4</td><td>0.0 - 35.5</td></tr><tr><td>Total Nitrogen Concentration (mg/L)</td><td>1382</td><td>62.74</td><td>3.57</td><td>40.0 - 92.0</td></tr><tr><td>Average Wind Speed (m/s)</td><td>1382</td><td>3.68</td><td>1.58</td><td>0.0 - 19.48</td></tr></tbody></table>

<table><caption>TABLE 5. Compact overview of the CNN-BiLSTM-attention model.</caption><thead><tr><th>Layer</th><th>Type</th><th>Output Shape</th></tr></thead><tbody><tr><td>Input</td><td>Raw Sequence</td><td>(batch, seq_len)</td></tr><tr><td>Unsqueeze</td><td>Reshape</td><td>(batch, 1, seq_len)</td></tr><tr><td>Conv1D</td><td>Conv (1D, 128)</td><td>(batch, 128, seq_len+1)</td></tr><tr><td>BatchNorm</td><td>Norm (1D)</td><td>(batch, 128, seq_len+1)</td></tr><tr><td>Dropout 1</td><td>Dropout (p=0.2)</td><td>(batch, 128, seq_len+1)</td></tr><tr><td>Tanh</td><td>Activation</td><td>(batch, 128, seq_len+1)</td></tr><tr><td>MaxPool1D</td><td>Pooling (k=2)</td><td>(batch, 128, (seq_len+1)/2)</td></tr><tr><td>Permute</td><td>Reshape</td><td>(batch, (seq_len+1)/2, 128)</td></tr><tr><td>Bi-LSTM</td><td>Bi-LSTM</td><td>(batch, (seq_len+1)/2, 128)</td></tr><tr><td>Attention</td><td>Context Vector</td><td>(batch, 128)</td></tr><tr><td>FC1</td><td>Linear (128 → 64)</td><td>(batch, 64)</td></tr><tr><td>FC2</td><td>Linear + Dropout</td><td>(batch, 32)</td></tr><tr><td>FC3</td><td>Output Layer</td><td>(batch, input_size)</td></tr></tbody></table>

activations as:

$$ \hat{x}_i = \frac{x_i - \mu_B}{\sqrt{\sigma_B^2 + \epsilon}}, \quad (15) $$

where $\mu_B$ and $\sigma_B^2$ are the batch mean and variance.

A max-pooling layer reduces temporal resolution, and the reshaped output is processed by a bidirectional LSTM (64 units per direction) to capture bidirectional dependencies. An attention mechanism assigns adaptive weights to key time steps, and the resulting context vector passes through fully connected layers to produce the final forecast.

## D. PRACTICAL IMPLEMENTATION DETAILS

The proposed framework was implemented to emulate real-world data stream scenarios, where information arrives incrementally over time.

The dataset was partitioned into temporally ordered chunks, each representing a new data arrival. Upon receiving a new chunk $\mathcal{D}_t$, model parameters were updated to integrate the new information while preserving previously acquired knowledge. Each CL approach was implemented and evaluated independently to ensure fair methodological comparison. No hybrid or combined strategies were applied.
<figure><img src="image_24.png" /><figcaption>FIGURE 19. BOD prediction error evolution (window size = 48) under various continual learning strategies and model architectures.</figcaption></figure>

<figure><img src="image_25.png" /><figcaption>FIGURE 20. BOD prediction error evolution under various continual learning strategies.</figcaption></figure>

1) PER

In the PER approach, a fixed-size replay buffer (C = 1000) was maintained to store representative samples from prior data segments. Each stored sample was assigned a priority score proportional to its prediction error, determining the probability of being replayed. The prioritization coefficient (α = 0.6) controlled the emphasis on high-error samples during training. This selective replay mechanism allowed the model to focus on more informative examples, enhancing retention of critical information while reducing catastrophic forgetting.

2) EWC

EWC employed a Fisher Information-based regularization mechanism to preserve knowledge from earlier learning iterations. Following each update, the Fisher Information Matrix was computed to estimate parameter importance. The

model loss was augmented by a regularization term scaled by the coefficient ($\lambda_{EWC}$ = 0.1), penalizing significant deviations of crucial parameters from their previously optimized values. This constraint maintained stability and prevented forgetting while allowing the model to adapt to evolving input distributions.

3) LWF

In LWF, a knowledge distillation technique was employed to balance adaptation and retention. The previously trained model served as a teacher, guiding the current (student) model during training. The total loss combined the prediction loss on new data and a distillation loss promoting consistency between teacher and student outputs. The trade-off was controlled by the coefficient ($\lambda_{LWF}$ = 0.5), which maintained performance on earlier tasks without direct access to past data samples.
<table><caption>TABLE 6. Evaluation of BOD forecasting model architectures with continual learning across 48 prediction horizons.</caption><thead><tr><th>Model</th><th>Method</th><th>MAE</th><th>MSE</th><th>R<sup>2</sup></th><th>RMSE</th></tr></thead><tbody><tr><td rowspan="4">LSTM</td><td>PER</td><td>0.330</td><td>0.108</td><td>-0.400</td><td>0.329</td></tr><tr><td>UER</td><td>0.310</td><td>0.096</td><td>-0.350</td><td>0.310</td></tr><tr><td>LWF</td><td>0.320</td><td>0.102</td><td>-0.380</td><td>0.319</td></tr><tr><td>EWC</td><td>0.330</td><td>0.109</td><td>-0.420</td><td>0.330</td></tr><tr><td rowspan="4">BiLSTM</td><td>PER</td><td>0.310</td><td>0.096</td><td>-0.330</td><td>0.310</td></tr><tr><td>UER</td><td>0.300</td><td>0.090</td><td>-0.280</td><td>0.300</td></tr><tr><td>LWF</td><td>0.290</td><td>0.084</td><td>-0.220</td><td>0.290</td></tr><tr><td>EWC</td><td>0.300</td><td>0.091</td><td>-0.300</td><td>0.302</td></tr><tr><td rowspan="4">CNN-BiLSTM with Attention</td><td>PER</td><td><b>0.0888</b></td><td><b>0.0152</b></td><td><b>-0.0129</b></td><td><b>0.1232</b></td></tr><tr><td>UER</td><td><b>0.0877</b></td><td><b>0.0149</b></td><td><b>0.0058</b></td><td><b>0.1221</b></td></tr><tr><td>LWF</td><td><b>0.0874</b></td><td><b>0.0146</b></td><td><b>0.0300</b></td><td><b>0.1207</b></td></tr><tr><td>EWC</td><td><b>0.0878</b></td><td><b>0.0154</b></td><td><b>-0.0250</b></td><td><b>0.1240</b></td></tr></tbody></table>

## E. EXPERIMENTAL SETUP

To prevent data leakage, the dataset was divided into independent training, validation, and testing subsets prior to model training. The data samples were sequentially ordered to ensure that the model only accessed the current portion of data at each update step, thereby avoiding any exposure to future observations. The training process followed a chunk-based strategy, where data were partitioned into temporally ordered segments (chunks), and the model was incrementally updated after each chunk arrival. This approach simulates realistic streaming conditions in which new data become available progressively, allowing the model to adapt while preserving previously acquired knowledge continuously. The model was trained exclusively on the training subset, whereas the validation and testing subsets were reserved solely for performance evaluation to maintain strict separation and prevent data leakage. All methods were implemented in PyTorch, with NumPy and Pandas utilized for data processing and management and Matplotlib for visualization and performance monitoring. The experiments were performed in the Google Colab environment equipped with an Intel Xeon CPU (2.20 GHz), 12 GB of RAM, and an NVIDIA Tesla T4 GPU when required. The complete set of experimental hyperparameters is summarized in Table 8, which outlines the key configuration parameters applied across all CL strategies.

## F. RESULTS DISCUSSION

This section presents the experimental results of the proposed continual learning framework for BOD forecasting. Three deep learning architectures, namely LSTM, BiLSTM, and CNN BiLSTM Attention, were systematically evaluated under multiple continual learning strategies to assess their predictive accuracy, convergence characteristics, and computational efficiency. Furthermore, the CNN BiLSTM Attention

model was examined across different prediction window sizes to investigate its adaptability to varying temporal horizons.

### 1) BOD FORECASTING ERROR ACROSS MODEL ARCHITECTURES

Figure 19 and Table 6 collectively present a comparative analysis of three deep learning architectures—LSTM, BiLSTM, and CNN BiLSTM Attention—each integrated with four continual learning strategies (PER, UER, LWF, and EWC) for BOD forecasting. Across all architectures, the learning curves in Figure 18 reveal a rapid initial reduction in MAE, followed by stabilization after approximately fifty training chunks, indicating efficient convergence behavior. Among the evaluated architectures, the CNN BiLSTM Attention model consistently achieves lower MAE values and smoother convergence patterns compared with LSTM and BiLSTM, demonstrating superior generalization capability and robustness under continual learning conditions.

This finding is quantitatively supported by the results in Table 4, where the CNN BiLSTM Attention model achieves the best overall performance, with MAE values ranging from 0.087 to 0.089, MSE between 0.0146 and 0.0154, RMSE between 0.121 and 0.124, and near-zero or slightly positive coefficients of determination (R²).

In contrast, the LSTM and BiLSTM architectures exhibit higher error magnitudes, with MAE values between 0.29 and 0.33 and negative R² values, indicating reduced predictive reliability and limited ability to capture long-term temporal dependencies. Furthermore, among continual learning strategies, LWF and UER demonstrate slightly better performance relative to PER and EWC, suggesting that experience replay and knowledge distillation mechanisms are more effective in mitigating catastrophic forgetting.

Statistical validation through multiple independent runs reveals that the CNN BiLSTM Attention model not only achieves the lowest mean error values but also exhibits the smallest standard deviation across all performance metrics, with variability below 0.005 for MAE and below 0.002 for RMSE. These results confirm the model's stability and reproducibility across training sessions, whereas LSTM and BiLSTM show slightly higher variance, suggesting greater sensitivity to initialization and data sequencing. Collectively, these findings establish that the CNN BiLSTM Attention architecture, particularly when coupled with LWF or UER, provides the most accurate, consistent, and statistically reliable framework for continual BOD forecasting.

### 2) BOD FORECASTING MODELS UNDER CONTINUAL LEARNING ACROSS PREDICTION HORIZONS

Figure 20 and Table 7 illustrate the progression of MAE for BOD prediction during training across different window sizes (1, 3, 6, 12, 24, and 48 days) using four continual learning methods: PER, UER, LWF, and EWC. Across all configurations, the training begins with high error values that
<table><caption>TABLE 7. Evaluation of BOD prediction models with continual learning across prediction horizons.</caption><thead><tr><th>Forecasting Horizon</th><th>Method</th><th>MAE</th><th>MSE</th><th>R<sup>2</sup></th><th>RMSE</th></tr></thead><tbody><tr><td rowspan="4">1 day</td><td>PER</td><td>0.0778</td><td>0.0109</td><td>0.1555</td><td>0.1043</td></tr><tr><td>UER</td><td>0.0778</td><td>0.0110</td><td>0.1430</td><td>0.1050</td></tr><tr><td>LwF</td><td>0.0784</td><td>0.0109</td><td>0.1563</td><td>0.1042</td></tr><tr><td>EWC</td><td>0.0779</td><td>0.0109</td><td>0.1499</td><td>0.1046</td></tr><tr><td rowspan="4">3 days</td><td>PER</td><td>0.0878</td><td>0.0155</td><td>0.0508</td><td>0.1246</td></tr><tr><td>UER</td><td>0.0884</td><td>0.0158</td><td>0.0361</td><td>0.1258</td></tr><tr><td>LwF</td><td>0.0881</td><td>0.0156</td><td>0.0497</td><td>0.1248</td></tr><tr><td>EWC</td><td>0.0874</td><td>0.0153</td><td>0.0676</td><td>0.1237</td></tr><tr><td rowspan="4">6 days</td><td>PER</td><td>0.0920</td><td>0.0164</td><td>0.0233</td><td>0.1281</td></tr><tr><td>UER</td><td>0.0899</td><td>0.0157</td><td>0.0703</td><td>0.1254</td></tr><tr><td>LwF</td><td>0.0903</td><td>0.0158</td><td>0.0593</td><td>0.1258</td></tr><tr><td>EWC</td><td>0.0901</td><td>0.0160</td><td>0.0534</td><td>0.1264</td></tr><tr><td rowspan="4">12 days</td><td>PER</td><td>0.0868</td><td>0.0146</td><td>0.0790</td><td>0.1208</td></tr><tr><td>UER</td><td>0.0862</td><td>0.0148</td><td>0.0703</td><td>0.1215</td></tr><tr><td>LwF</td><td>0.0878</td><td>0.0148</td><td>0.0655</td><td>0.1218</td></tr><tr><td>EWC</td><td>0.0858</td><td>0.0146</td><td>0.0827</td><td>0.1208</td></tr><tr><td rowspan="4">24 days</td><td>PER</td><td>0.0880</td><td>0.0154</td><td>0.0178</td><td>0.1242</td></tr><tr><td>UER</td><td>0.0868</td><td>0.0150</td><td>0.0446</td><td>0.1224</td></tr><tr><td>LwF</td><td>0.0875</td><td>0.0148</td><td>0.0539</td><td>0.1217</td></tr><tr><td>EWC</td><td>0.0878</td><td>0.0152</td><td>0.0325</td><td>0.1233</td></tr><tr><td rowspan="4">48 days</td><td>PER</td><td>0.0888</td><td>0.0152</td><td>-0.0129</td><td>0.1232</td></tr><tr><td>UER</td><td>0.0877</td><td>0.0149</td><td>0.0058</td><td>0.1221</td></tr><tr><td>LwF</td><td>0.0874</td><td>0.0146</td><td>0.0300</td><td>0.1207</td></tr><tr><td>EWC</td><td>0.0878</td><td>0.0154</td><td>-0.0250</td><td>0.1240</td></tr></tbody></table>

<table><caption>TABLE 8. Summary of experimental hyperparameters.</caption><thead><tr><th>Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Learning rate (η)</td><td>0.005</td></tr><tr><td>Chunk size (N<sub>c</sub>)</td><td>512 samples per update</td></tr><tr><td>Replay buffer capacity (C)</td><td>1000 (PER)</td></tr><tr><td>Prioritization coefficient (α)</td><td>0.6 (PER)</td></tr><tr><td>EWC regularization weight (λ<sub>EWC</sub>)</td><td>0.1 (EWC)</td></tr><tr><td>LwF distillation weight (λ<sub>LwF</sub>)</td><td>0.5 (LwF)</td></tr><tr><td>Optimizer</td><td>Adam</td></tr><tr><td>Loss function</td><td>Mean Squared Error (MSE)</td></tr></tbody></table>

decrease progressively as the number of chunks increases, demonstrating the learning behavior of each model. For the smallest window size (1 day), all models rapidly reduce MAE within the first few chunks. PER shows the most consistent and fastest convergence to a low MAE (0.10), followed closely by LwF and EWC. UER performs slightly worse in the early chunks but stabilizes similarly toward the end. This fast stabilization reflects the relative ease of learning short-term dependencies. As the window size increases to 3 and 6 days, we observe increased fluctuations in MAE during the early stages of training, especially with UER and EWC. PER still achieves the fastest convergence and lowest MAE overall. LwF continues to display more variability in the early phases but gradually aligns with the others as training progresses. The impact of window size becomes evident here: larger windows introduce more temporal dependencies, slowing initial convergence. At 12 and 24 days, the error curves begin higher and fluctuate more in the initial chunks. However, all models still achieve MAE values close to 0.12 after sufficient training. PER maintains its advantage, followed closely by EWC. UER performs reasonably well but with slightly higher final errors. LwF improves in later stages but remains less stable during initial learning,

indicating sensitivity to long-range temporal patterns. For the longest window (48 days), the initial MAE is noticeably high across all models. The fluctuations are more pronounced, particularly for UER and EWC. Despite this, all methods effectively reduce MAE over time. PER and LwF show faster convergence, with LwF improving more steadily than at intermediate windows. EWC and UER lag slightly in convergence speed but catch up after 20–30 chunks. Table 5 complements these observations by providing a quantitative comparison of the models across all window sizes using MAE, MSE, R², and RMSE metrics. PER achieves the lowest MAE and RMSE in most cases, especially for 1, 3, and 6-day windows (e.g., MAE = 0.0778 at 1 day, 0.0878 at 3 days). Its strong performance confirms its ability to learn efficiently with minimal error propagation over time. At longer horizons (12–48 days), while PER continues to show competitive metrics, other models, such as UER and EWC, become more effective in terms of R² scores, indicating a better fit to the target distribution in some cases. For instance, EWC achieves a higher R² (0.0827) at 12 days, and UER leads in R² at 6 days (0.0703). However, LwF shows the highest variability, struggling at intermediate horizons but showing improvement at 48 days (R² = 0.0300).

In summary, PER emerges as the most robust continual learning strategy across all window sizes, achieving consistently low prediction errors and rapid convergence. UER and EWC demonstrate adequate generalization with higher R² in some settings, especially over longer horizons. LwF, while initially unstable, shows potential at both short and long horizons but underperforms in intermediate cases. Larger windows primarily affect the rate of convergence rather than the final accuracy, underscoring the adaptability of continual learning models under varying temporal conditions.
## VI. CONCLUSION AND FUTURE DIRECTIONS

The SW3T-IoT system represents a major step forward in intelligent water management, integrating multiple technological layers into a cohesive framework. At its core, the optimized LoRaWDS node enables long-term monitoring with energy-efficient operation and reliable LoRa communication, forming the backbone of the system's intelligence. The three-tier architecture combines data acquisition at the node, local processing through the acquisition node (gateway), and cloud-based analysis. This design reduces latency, ensures resilience during connectivity interruptions, and enables real-time responsiveness, while supporting the integration of diverse sensors for the comprehensive monitoring of water levels, flow rates, temperature, pH, and other critical parameters. Beyond monitoring, SW3T-IoT incorporates a continual learning framework for predictive water quality analysis. The system adapts to evolving conditions by using long-term Biochemical Oxygen Demand (BOD) forecasting with a CNN-BiLSTM-Attention model and continual learning strategies, while retaining prior knowledge to support proactive maintenance and sustainable resource planning. Integration of a Geographic Information System (GIS) adds a spatial layer, allowing precise localization of issues, better visualization of network dynamics, and enhanced decision-making for maintenance and investment planning.

This work identifies key research challenges aimed at further enhancing the security, privacy, and real-world deployment of the SW3T-IoT system. While the proposed continual learning framework demonstrates strong adaptability and robustness within distributed IoT environments, several directions remain open for advancement. The current architecture efficiently manages scalability due to the modular separation of sensor nodes and IoT gateways; however, transitioning toward federated continual learning (FCL) may introduce new challenges related to communication synchronization, data heterogeneity, and coordination overhead among distributed nodes. Additionally, ensuring integrity and reliability during continuous model updates remains an important research aspect. The integration of blockchain technology is envisioned to complement these efforts by providing secure, transparent, and verifiable management of decentralized learning updates. Combined with privacy-preserving mechanisms, such as homomorphic encryption, this approach aims to reinforce trust and resilience across distributed systems. The following recommendations summarize potential directions for future research and development:

1. **Cross-Sector Validation:** Validate the low-cost, generic IoT platform across multiple domains of water quality monitoring, including rivers, surface water, wastewater, agricultural water, and recreational environments.

2. **Real-World Validation:** Conduct large-scale pilot evaluations to demonstrate system reliability and scalability, including:

* AADL Sidi Said, Mascara, is a residential site that houses 1,000 apartments.

* The city's main water tanks have a capacity of 30,000 m³ (Mascara).

3. **Federated Continual Learning:** Extend the learning framework to a federated setting, enabling distributed model updates across gateways and sensor nodes while maintaining data locality and reducing communication overhead.

4. **Blockchain-Enabled Model Integrity:** Integrate lightweight blockchain mechanisms to ensure immutable logging of model updates, water management events, and sensor readings, enhancing auditability and trust across the IoT network.

5. **Privacy-Preserving Data Aggregation:** Incorporate homomorphic encryption and secure aggregation to protect sensitive information while allowing decentralized learning and real-time decision-making.

## AUTHOR CONTRIBUTIONS

**Conceptualization:** Mohammed Kamal Benhaoua, Amine Dahane, Rabaie Benameur, Houssam Eddine Zahaf, and Abdelkader Elouissi; **Methodology:** Mohammed Kamal Benhaoua, Amine Dahane, Abdelkader Elouissi, and Houssam Eddine Zahaf; **Calibration sensors:** Amine Dahane, Izzessalam Belhadj Benziane, Houssam Eddine Zahaf, and Mohammed Kamal Benhaoua; **Deployment:** Abderrahmane Benhariga, Amine Dahane, Rabaie Benameur, and Izzessalam Belhadj Benziane; **Software:** Mohammed Kamal Benhaoua, Amine Dahane, Houssam Eddine Zahaf, and Rabaie Benameur; **Validation:** Mohammed Kamal Benhaoua, Amine Dahane, Abdelkader Elouissi, Cherifa Boudia, and Rabaie Benameur; **Formal analysis:** Houssam Eddine Zahaf, Amine Dahane, and Sami Souihi; **Investigation:** Mohammed Kamal Benhaoua, Rabaie Benameur, and Amine Dahane; **Resources:** Mohammed Kamal Benhaoua, Izzessalam Belhadj Benziane, Cherifa Boudia, Houssam Eddine Zahaf, and Amine Dahane; **Data curation:** Rabaie Benameur, Izzessalam Belhadj Benziane, and Abderrahmane Benhariga; **Writing—original draft preparation:** Mohammed Kamal Benhaoua, Amine Dahane, and Rabaie Benameur; **Writing—review and editing:** Abderrahmane Benhariga, Abdelkader Elouissi, Cherifa Boudia, and Sami Souihi; **Visualisation:** Rabaie Benameur, Amine Dahane, Houssam Eddine Zahaf, and Abderrahmane Benhariga; **Supervision:** Mohammed Kamal Benhaoua, Amine Dahane, and Abdelkader Elouissi; and **Project administration:** Mohammed Kamal Benhaoua, Amine Dahane, and Abdelkader Elouissi. All authors have read and agreed to the published version of the manuscript.

## DATA AVAILABILITY

The datasets used and/or analyzed during the current study are available from the corresponding authors upon reasonable request.
CONFLICTS OF INTEREST

The authors declare no conflicts of interest.

ABBREVIATIONS

The following abbreviations are used in this manuscript:

<table><tr><td>ADC</td><td>Analog-to-Digital Converter</td></tr><tr><td>AI</td><td>Artificial Intelligence</td></tr><tr><td>CPS</td><td>Cyber-Physical System</td></tr><tr><td>DFRobot</td><td>Device Factory Robot (sensor brand)</td></tr><tr><td>DT</td><td>Digital Twin</td></tr><tr><td>DHT</td><td>Digital Humidity and Temperature</td></tr><tr><td>EC</td><td>Edge Computing</td></tr><tr><td>ESP</td><td>Espressif Systems Platform (ESP8266 module)</td></tr><tr><td>GPRS</td><td>General Packet Radio Service</td></tr><tr><td>GPS</td><td>Global Positioning System</td></tr><tr><td>GUI</td><td>Graphical User Interface</td></tr><tr><td>HTTP</td><td>Hypertext Transfer Protocol</td></tr><tr><td>IoT</td><td>Internet of Things</td></tr><tr><td>IoTA4IWNet</td><td>Internet of Things Architecture for Intelligent Water Networks</td></tr><tr><td>LPWAN</td><td>Low-Power Wide-Area Network</td></tr><tr><td>MAE</td><td>Mean Absolute Error</td></tr><tr><td>MAPE</td><td>Mean Absolute Percentage Error</td></tr><tr><td>MSE</td><td>Mean Squared Error</td></tr><tr><td>NRW</td><td>Non-Revenue Water</td></tr><tr><td>PCB</td><td>Printed Circuit Board</td></tr><tr><td>PM</td><td>Predictive Maintenance</td></tr><tr><td>PWM</td><td>Pulse Width Modulation</td></tr><tr><td>R<sup>2</sup></td><td>Coefficient of Determination</td></tr><tr><td>RMSE</td><td>Root Mean Squared Error</td></tr><tr><td>SLA</td><td>Service Level Agreement</td></tr><tr><td>SQL</td><td>Structured Query Language</td></tr><tr><td>SWI-FEED</td><td>Smart Water Infrastructure - Fault Event Detection</td></tr><tr><td>SWN</td><td>Smart Water Networks</td></tr><tr><td>WSNs</td><td>Wireless Sensor Networks</td></tr><tr><td>Wi-Fi</td><td>Wireless Fidelity</td></tr></table>

REFERENCES

[1] J. A. Smith and L. B. Doe, “Global water quality: Challenges and solutions,” *Water Resour. J.*, vol. 45, no. 3, pp. 123–135, 2023.

[2] D. Amaxilatis, I. Chatzigiannakis, C. Tselios, N. Tsironis, N. Niakas, and S. Papadogeorgos, “A smart water metering deployment based on the fog computing paradigm,” *Appl. Sci.*, vol. 10, no. 6, p. 1965, Mar. 2020.

[3] M. Singh and S. Ahmed, “IoT based smart water management systems: A systematic review,” *Mater. Today, Proc.*, vol. 46, pp. 5211–5218, Jan. 2021.

[4] V. Lakshmikantha, A. Hiriyannagowda, A. Manjunath, A. Patted, J. Basavaiah, and A. A. Anthony, “IoT-based smart water quality monitoring system,” *Global Transitions Proc.*, vol. 2, no. 2, pp. 181–186, 2021.

[5] N. Kamal and P. Ghosal, “Three tier architecture for IoT driven health monitoring system using raspberry pi,” in *Proc. IEEE Int. Symp. Smart Electron. Syst.*, Dec. 2018, pp. 167–170.

[6] S. Piao, P. Ciais, Y. Huang, Z. Shen, S. Peng, J. Li, L. Zhou, H. Liu, Y. Ma, Y. Ding, P. Friedlingstein, C. Liu, K. Tan, Y. Yu, T. Zhang, and J. Fang, “The impacts of climate change on water resources and agriculture in China,” *Nature*, vol. 467, no. 7311, pp. 43–51, 2010.

[7] P. Mukheibir, “Water access, water scarcity, and climate change,” *Environ. Manage.*, vol. 45, no. 5, pp. 1027–1039, May 2010.

[8] P. G. Whitehead, R. L. Wilby, R. W. Batterbee, M. Kernan, and A. J. Wade, “A review of the potential impacts of climate change on surface water quality,” *Hydrol. Sci. J.*, vol. 54, no. 1, pp. 101–123, 2009.

[9] M. K. Johnson and S. T. Lee, “Artificial intelligence in water quality monitoring: A review,” *Environ. Monitor. Assessment*, vol. 196, no. 4, pp. 567–582, 2024.

[10] R. Chen and P. Kumar, “Leveraging IoT and cloud computing for Al-driven water quality management,” *J. Environ. Informat.*, vol. 38, no. 2, pp. 89–102, 2022.

[11] H. Sabireen and V. Neelanarayanan, “A review on fog computing: Architecture, fog with IoT, algorithms and research challenges,” *ICT Exp.*, vol. 7, no. 2, pp. 162–176, Jun. 2021.

[12] S. Pasika and S. T. Gandla, “Smart water quality monitoring system with cost-effective using IoT,” *Heliyon*, vol. 6, no. 7, Jul. 2020, Art. no. e04096.

[13] F. Jan, N. Min-Allah, S. Saeed, S. Z. Iqbal, and R. Ahmed, “IoT-based solutions to monitor water level, leakage, and motor control for smart water tanks,” *Water*, vol. 14, no. 3, p. 309, Jan. 2022.

[14] C. Kamienski, J.-P. Soininen, M. Taumberger, R. Dantas, A. Toscano, T. S. Cinotti, R. Filev Maia, and A. Torre Neto, “Smart water management platform: IoT-based precision irrigation for agriculture,” *Sensors*, vol. 19, no. 2, p. 276, Jan. 2019.

[15] S. Mazumdar, D. Seybold, K. Kritikos, and Y. Verginadis, “A survey on data storage and placement methodologies for cloud-big data ecosystem,” *J. Big Data*, vol. 6, no. 1, p. 15, Dec. 2019.

[16] S. B. Keshipeddii, “IoT-based smart water quality monitoring system,” *SSRN Electron. J.*, Aug. 2021. [Online]. Available: https://ssrn.com/abstract=3904842

[17] M. S. Munir, I. S. Bajwa, A. Ashraf, W. Anwar, and R. Rashid, “Intelligent and smart irrigation system using edge computing and IoT,” *Complexity*, vol. 2021, no. 1, Jan. 2021, Art. no. 6691571.

[18] I. Essamlali, H. Nhaila, and M. El Khaili, “Advances in machine learning and IoT for water quality monitoring: A comprehensive review,” *Heliyon*, vol. 10, no. 6, Mar. 2024, Art. no. e27920.

[19] P. R. Ashtikar, “Water resource management using Internet of Things (IoT): Literature survey,” *Int. J. Res. Appl. Sci. Eng. Technol.*, vol. 7, no. 9, pp. 80–83, Sep. 2019.

[20] H. M. Rai, A.-Ur-Rehman, A. Pal, S. Mishra, and K. K. Shukla, “Use of Internet of Things in the context of execution of smart city applications: A review,” *Discover Internet Things*, vol. 3, no. 1, p. 25, Aug. 2023.

[21] E. Q. Shahra, W. Wu, and M. Romano, “Considerations on the deployment of heterogeneous IoT devices for smart water networks,” in *Proc. IEEE SmartWorld, Ubiquitous Intell. Comput., Dependable, Autonomic Secure Comput.*, Aug. 2019, pp. 791–796.

[22] N. J. Okoli and B. Kabaso, “Building a smart water city: IoT smart water technologies, applications, and future directions,” *Water*, vol. 16, no. 4, p. 557, Feb. 2024.

[23] K. McKenna and A. Keane, “Residential load modeling of price-based demand response for network impact studies,” *IEEE Trans. Smart Grid*, vol. 7, no. 5, pp. 2285–2294, Sep. 2016.

[24] N. K. Velayudhan, P. Pradeep, S. N. Rao, A. R. Devidas, and M. V. Ramesh, “IoT-enabled water distribution systems—A comparative technological review,” *IEEE Access*, vol. 10, pp. 101042–101070, 2022.

[25] B. B. Baanu and K. S. J. Babu, “Smart water grid: A review and a suggestion for water quality monitoring,” *Water Supply*, vol. 22, no. 2, pp. 1434–1444, Feb. 2022.

[26] A. Pagano, D. Garlisi, F. Giuliano, T. Cattai, and F. C. Sapienza, “SWI-FEED: Smart water IoT framework for evaluation of energy and data in massive scenarios,” in *Proc. IFIP Netw. Conf. (IFIP Netw.)*, Jun. 2024, pp. 583–585.

[27] S. Bouziane, B. Aghoutane, A. Moumen, A. Sahlaoui, and A. E. Ouali, “Proposal of a big data system for an intelligent management of water resources,” in *Proc. E3S Web Conf.*, vol. 314, 2021, p. 02002.

[28] G. Antzoulatos, C. Mourtzios, P. Stournara, I.-O. Kouloglou, N. Papadimitriou, D. Spyrou, A. Mentes, E. Nikolaidis, A. Karakostas, D. Kourtesis, S. Vrochidis, and I. Kompatsiaris, “Making urban water smart: The SMART-WATER solution,” *Water Sci. Technol.*, vol. 82, no. 12, pp. 2691–2710, Dec. 2020.

[29] A. Abebe, “Internet of Things (IoT) enabled water distribution system for smart water management,” *Int. J. Wireless Commun. Mobile Comput.*, vol. 11, no. 1, pp. 1–6, Apr. 2024.
[30] M. A. Dada, M. T. Majemite, A. Obaigbena, O. H. Daraojimba, J. S. Oliha, and Z. Q. S. Nwokediegwu, “Review of smart water management: IoT and AI in water and wastewater treatment,” *World J. Adv. Res. Rev.*, vol. 21, no. 1, pp. 1373–1382, Jan. 2024.

[31] V. Lakshmi, K. S. Hemanth, A. Settipalli, A. Nanda, Ishtiyaq, and L. Jasim, “Sustainable water quality monitoring and innovative purification solutions,” in *Proc. E3S Web Conferences*, vol. 529, 2024, p. 03005.

[32] S. Alvisi, F. Casellato, M. Franchini, M. Govoni, C. Luciani, F. Poltronieri, G. Riberto, C. Stefanelli, and M. Tortonesi, “Wireless middleware solutions for smart water metering,” in *Proc. Italian Nat. Conf. Sensors*, vol. 19, 2019, p. 1853.

[33] R. Martínez, N. Vela, A. El Aatik, E. Murray, P. Roche, and J. M. Navarro, “On the use of an IoT integrated system for water quality monitoring and management in wastewater treatment plants,” *Water*, vol. 12, no. 4, p. 1096, Apr. 2020.

[34] Y. Himeur, M. Elnour, F. Fadli, N. Meskin, I. Petri, Y. Rezgui, F. Bensaali, and A. Amira, “AI-big data analytics for building automation and management systems: A survey, actual challenges and future perspectives,” *Artif. Intell. Rev.*, vol. 56, no. 6, pp. 4929–5021, Jun. 2023.

[35] D. Kanellopoulos, V. K. Sharma, T. Panagiotakopoulos, and A. Kameas, “Networking architectures and protocols for IoT applications in smart cities: Recent developments and perspectives,” *Electronics*, vol. 12, no. 11, p. 2490, May 2023.

[36] C. Luciani, F. Casellato, S. Alvisi, and M. Franchini, “From water consumption smart metering to leakage characterization at district and user level: The GST4Water project,” in *Proc. EWaS3*, Jul. 2018, p. 675.

[37] A. Humnabadkar, A. Karve, B. Shivbhakta, and A. A. Kokate, “Water quality monitoring and measures of water usage in homes,” *Int. J. Multidisciplinary Res.*, vol. 6, no. 5, pp. 1–9, Sep./Oct. 2024.

[38] V. S. Vani, P. V. Joshi, R. Shinde, S. Kadam, and M. Matkamwad, “Smart water management grid,” *Int. J. Innov. Sci. Res. Technol.*, vol. 9, no. 5, pp. 854–859, May 2024.

[39] N. T. Le, N. T. H. Nguyen, and P. L. S. Ngan, “Generic framework for industrial 4.0 applications based on Internet of Things,” in *Proc. 7th Int. Conf. Smart Inf. Commun. Technol.*, 2020, pp. 1–18.

[40] K. Joseph, A. K. Sharma, and R. van Staden, “Development of an intelligent urban water network system,” *Water*, vol. 14, no. 9, p. 1320, Apr. 2022.

[41] N. Bawankar, A. Kriti, S. S. Chouhan, and S. Chaudhari, “IoT-enabled water monitoring in smart cities with retrofit and solar-based energy harvesting,” *IEEE Access*, vol. 12, pp. 58222–58238, 2024.

[42] Y.-M. Cheng, M.-F. Horng, and C.-C. Chung, “ICT innovation to promote sustainable development goals: Implementation of smart water pipeline monitoring system based on narrowband Internet of Things,” *Sustainability*, vol. 16, no. 22, p. 9683, Nov. 2024.

[43] S. A. Palermo, M. Maiolo, A. C. Brusco, M. Turco, B. Pirouz, E. Greco, G. Spezzano, and P. Piro, “Smart technologies for water resource management: An overview,” in *Proc. Italian Nat. Conf. Sensors*, vol. 22, 2022, p. 6225.

[44] F.-L. Chen, B.-C. Yang, S.-Y. Peng, and T.-C. Lin, “Applying a deployment strategy and data analysis model for water quality continuous monitoring and management,” *Int. J. Distrib. Sensor Netw.*, vol. 16, no. 6, Jun. 2020, Art. no. 155014772092982.

[45] S. Ismail, D. W. Dawoud, N. Ismail, R. Marsh, and A. S. Alshami, “IoT-based water management systems: Survey and future research direction,” *IEEE Access*, vol. 10, pp. 35942–35952, 2022.

[46] D. Ibrahim, *Microcontroller Systems: An Introduction to Microcontrollers and Their Applications*. New York, NY, USA: Academic, 2015.

[47] *Arduino*. Accessed: Dec. 3, 2025. [Online]. Available: https://www.Arduino.cc

[48] I. P. Sari, A. A. N. Gunawan, I. M. S. Wibawa, I. K. Putra, and M. Yusuf, “Design of radiosonde based on Arduino pro mini using BME280 sensor,” *Techn. Innov. Eng. Res.*, vol. 5, pp. 145–157, Feb. 2023.

[49] H. Bougaddou, N. Cherkaoui, and O. Mouhib, “Long-range, low-power for IoT devices: The LoRA network—A review,” 2024, arXiv:2401.00001.

[50] A. Colakovic, A. H. Dzubur, and B. Karahodza, “Wireless communication technologies for the Internet of Things,” *Sci. Eng. Technol.*, vol. 1, no. 1, pp. 1–14, 2021.

[51] F. A. Jeffrey Vaz, T. Sangeetha, S. U. Sai Leksmi, and A. Dhanusha, “Performance analysis of nRF24L01 wireless module,” in *Proc. 5th Int. Conf. Data Intell. Cognit. Informat. (ICDICI)*, Nov. 2024, pp. 216–222.

[52] A. Dahane, R. Benameur, M. Naloufi, S. Souihi, T. Abreu, F. S. Lucas, and A. Mellouk, “IoT urban river water quality system using federated learning via knowledge distillation,” in *Proc. ICC - IEEE Int. Conf. Commun.*, Jun. 2024, pp. 1515–1520.

[53] C. R. M. Silva and F. A. C. M. Silva, “An IoT gateway for modbus and MQTT integration,” in *IEEE MTT-S Int. Microw. Symp. Dig.*, Nov. 2019, pp. 1–3.

[54] N. Moyroud and F. Portet, *Introduction to QGIS*. Hoboken, NJ, USA: Wiley, 2018, ch. 1, pp. 1–17.

[55] T. Fred and M. Bills, “Continual learning: Strategies and challenges,” Univ. London, Tech. Rep., Mar. 2025.

[56] A. Dahane, R. Benameur, S. Souihi, M. Naloufi, I. B. Benziane, F. Lucas, and A. Mellouk, “FCL-IWQMS: Federated continual learning and IoT-based water quality monitoring system for adaptive real-time insights,” in *Proc. IEEE Int. Conf. Commun.*, Jun. 2025, pp. 2955–2960.

[57] A. Cabrera-Codony, A. Valverde, K. Born, O. A. I. Noreldin, and T. G. Myers, “Mathematical modelling of flow and adsorption in a gas chromatograph,” 2024, arXiv:2501.00001.

[58] J. S. Smith, L. Valkov, S. Halbe, V. Gutta, R. Feris, Z. Kira, and L. Karlinsky, “Adaptive memory replay for continual learning,” in *Proc. IEEE/CVF Conf. Comput. Vis. Pattern Recognit. Workshops (CVPRW)*, Jun. 2024, pp. 3605–3615.

[59] S. Li, T. Su, X.-Y. Zhang, and Z. Wang, “Continual learning with knowledge distillation: A survey,” *IEEE Trans. Neural Netw. Learn. Syst.*, vol. 36, no. 6, pp. 9798–9818, Jun. 2025.

[60] F. Bagehrzadeh. (2021). *Full Scale Wastewater Treatment Plant Data*. [Online]. Available: https://data.mendeley.com/datasets/pprkvz3vbd/1

<figure><img src="image_26.png" /></figure>

**MOHAMMED KAMAL BENHAOUA** received the Engineering degree in artificial intelligence and the magister degree in information security and networking from the Department of Computer Science, Oran University 1, Algeria, in 2005 and 2009, respectively, and the joint Ph.D. degree from the University of Lille, France, and Oran University 1. He is currently a Full Professor with the University of Mustapha Stambouli, Algeria. He is the Director of the Technological Laboratory

in Artificial Intelligence and Food Safety (LABTEC-IA) and the Head of the Cyber-Physical Systems and Artificial Intelligence (CPSAI) Research Team. His research interests include design-time and run-time optimization of NoC-based multi/many-core systems, energy efficiency, reliability in embedded systems, and AI applications in agriculture and water management.

<figure><img src="image_27.png" /></figure>

**AMINE DAHANE** received the master's degree in computer systems and networks from the University of Bechar, Algeria, in 2011, and the Ph.D. degree in electronics from the University of Science and Technology of Oran (USTO), Algeria, in 2017. He is currently a Lecturer and a Researcher at the Institute of Science and Applied Technology, Oran University 1, Algeria, and an Associate Member of the LiSSi/TincNET Laboratory at Paris-East Créteil University, France.

He is the Head of the ENV-IoT-AI Research Team (Environmental Intelligence through IoT and AI) within the Technological Laboratory in Artificial Intelligence and Food Safety (LABTEC-IA). His research interests include the Internet of Things (IoT) applications, cybersecurity, machine learning, deep learning, federated learning, smart farming, and water quality monitoring.
<figure><img src="image_28.png" /></figure>

**RABAIE BENAMEUR** received the Ph.D. degree in cybersecurity systems and networks. He is currently a Lecturer and a Researcher at the Institute of Science and Applied Technology, Oran University 1, Algeria. His research interests include intelligent systems, particularly machine learning, deep learning, and federated learning. He has authored several peer-reviewed journal articles and conference papers in these fields.

<figure><img src="image_29.png" /></figure>

**ABDELKADER ELOUISSI** received the Ph.D. degree in hydraulics from the University of Abu Bekr Belkaid, Tlemcen, Algeria. He is currently a Professor of hydrology and data analysis at the University of Mustapha Stambouli, Mascara, Algeria. His research interests include water resources management, hydrological modeling, and environmental data science.

<figure><img src="image_30.png" /></figure>

**IZZESSALAM BELHADJ BENZIANE** received the master's degree in electrical engineering, in 2011. He is currently pursuing the Ph.D. degree in renewable energy with the University of Ghardaia, Algeria. His research focuses on power electronic systems, renewable energy integration, and grid stability.

<figure><img src="image_31.png" /></figure>

**CHERIFA BOUDIA** received the Ph.D. degree in computer science from Oran University 1 Ahmed Ben Bella, Algeria, in 2020. She is currently an Associate Professor at the University of Mustapha Stambouli, Mascara, Algeria. Her research focuses on artificial intelligence, generative AI in education, collaborative programming, and ICT-enhanced learning. She is a reviewer of several international journals in computer science education.

<figure><img src="image_32.png" /></figure>

**HOUSSAM EDDINE ZAHAF** is currently an Associate Professor at IUT of Nantes University in the real-time systems team of LS2N Laboratory. Previously, he was a Postdoctoral Researcher at the University of Lille within the ÉMeraude Team of CRISTAL Laboratory, and the HiPeRT Laboratory, University of Modena and Reggio Emilia, Italy. His main research interests include real-time systems, scheduling algorithms, operating systems, and energy-efficient computing on heterogeneous platforms.

<figure><img src="image_33.png" /></figure>

**SAMI SOUIHI** (Senior Member, IEEE) received the M.Sc. degree from the University of Paris 6 in 2010 and the Ph.D. degree from Paris-East Créteil University (UPEC) in 2013. He is currently an Associate Professor of computer science with the Networks and Telecommunications Department, UPEC, and a Senior Researcher at CEA, LIST, University of Paris-Saclay, Palaiseau, France. His research focuses on adaptive mechanisms in large-scale dynamic distributed systems, with an

emphasis on security and resilience, digital sovereignty and trust, as well as machine learning for autonomous operation (including reinforcement learning, federated learning, anomaly detection, and self-remediation) across multi-domain critical infrastructures such as 5G/6G networks, decentralized sovereign clouds, DePIN architectures, and their applications in digital health, environmental monitoring, the IoT, and edge computing.

<figure><img src="image_34.png" /></figure>

**ABDERRAHMANE BENHARIGA** received the master's degree in industrial, parallel, and embedded computing, in 2024. He is currently pursuing the Ph.D. degree in computer science with the University of Mustapha Stambouli, Mascara, Algeria. He is a member of LABTEC-IA Laboratory. His research focuses on real-time AI inference on embedded GPUs and heterogeneous architectures.