# Leveraging Urban Water Distribution Systems with Smart Sensors for Sustainable Cities
###### Abstract  
Optimizing urban water distribution systems is essential for reducing economic losses, minimizing water wastage, and addressing resource access gaps, particularly in drought-prone regions impacted by climate change. We apply advanced artificial intelligence (AI) techniques and the Internet of Things (IoT) to optimize water networks in Spain using simulation. By employing EPANET for hydraulic modeling and a linear regression-based algorithm for optimization, we achieved up to 96.62% system efficiency with a mean absolute error of 0.049. Our approach demonstrates the potential to conserve up to 648,000 L of water daily at high-demand nodes, contributing to substantial resource savings across urban water  
Since these early studies, the need for more efficient water infrastructure management has become evident, with studies highlighting an imminent future of water scarcity. Proposed solutions often did not rely on advanced technology due to its immaturity at the time. However, some technological solutions were suggested, such as using geographic information technologies like remote sensing to improve water planning and management in irrigation communities [4]. The OPTIMA project focused on efficient resource management based on the EU Water Framework Directive, using a client-server approach and optimization algorithms [5]. Other proposals included forecasting reservoir water levels [6; 7]. Our research contributes directly to the United Nations Sustainable Development Goals (SDGs) [8], particularly SDG 6: Clean Water and Sanitation, and SDG 11: Sustainable Cities and Communities. By optimizing urban water distribution, our work promotes efficient water management, which is essential for ensuring clean and sustainable water access in urban areas. Addressing SDG 6 aligns with our goal of minimizing water wastage and ensuring equitable access to this critical resource, especially in drought-prone regions. Additionally, this study supports SDG 11 by enhancing urban resilience and infrastructure sustainability. Our proposed architecture, which integrates IoT and AI, can be adapted to varying urban settings and can inform public policies on resource management and smart city planning, reinforcing sustainable urbanization efforts. The objectives of this study are (1) to analyze diverse urban areas in Spain, focusing on varied climatic conditions related to real-world use cases, given the country's climate crisis concerning water reserves; (2) to aim to create and simulate urban water networks using an open-source hydraulic simulator such as EPANET software [9] in various Spanish cities of reference; (3) optimizing their infrastructures with EPANET, which will support future comparative and evolutionary projects in Smart Cities and provide a framework for future research; and (4) to justify the optimization of urban water distribution systems (WDSs) to save resources daily, thereby contributing to more efficient and sustainable urban management. The rest of this paper is structured as follows: Section 2 reviews related work on WDSs. Section 3 describes the tools used. The methodology applied is shown in Section 4. The simulation results are presented and discussed in Section 5, including a proposed architecture for real-world deployment. Finally, Section 6 summarizes the findings and suggests future research directions.