Smart Water Distribution and Management System Using IoT.
Smart Water Distribution and Management System Using IoT.
Smart Cities
Bachelor of Technology
in
Computer Science and Engineering
by
GANTA VARA PRASAD
Registration No.: 2020105238
SUSHMA R
Registration No.: 2020105256
DECEMBER 2023
i
Bachelor of Technology
in
Computer Science and Engineering
by
GANTA VARA PRASAD
Registration No.: 2020105238
SUSHMA R
Registration No.: 2020105256
DECEMBER 2023
ii
रा ीय ौ ोिगकी सं ान नागालड
NATIONAL INSTITUTE OF TECHNOLOGY NAGALAND
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
Chumukedima, Dimapur – 797103, Nagaland
BONAFIDE CERTIFICATE
Ganta Vara Prasad (2020105238) & Sushma R (2020105256) who carried out the
work under my supervision. Certified further, that to the best of my knowledge the
work reported herein does not form part of any other project or dissertation on the
basis of which a degree or award was conferred on an earlier occasion on this or any
other student.
ABSTRACT
Water is absolutely necessary for our daily existence. With the growing
demand, we also see that the availability of water is diminishing. A significant portion
of the global population lacks access to fresh water. Numerous factors, including
extreme weather conditions, excessive usage, complete urbanization, industrial
expansion, lack of proper infrastructure, etc., are blamed for water scarcity. In housing
societies, challenges arise from the uniform distribution of water irrespective of the
consumption rate, leaks during transportation, and the energy-intensive supply of
water from the main source. In response to these challenges, we have adopted Internet
of Things (IoT) technology for monitoring water levels, detecting leaks, and
implementing automated tank refilling when required. We initiate the process by
calculating the daily consumption rate and distributing water accordingly to pre-
emptively prevent water scarcity. In the event of any shortage, rather than supplying
water from the main source, we redirect the supply from the nearest water tank whose
consumption rate is lower than the daily consumption rate. This approach enhances
water resource management and reduces the dependency on the primary water source.
iv
ACKNOWLEDGEMENT
We wish to place on record our deep sense of gratitude to our honorific Guide
Dr. Nagaraju Baydeti, Assistant Professor, National Institute of Technology
Nagaland for his supervision, valuable guidance and moral support leading to the
successful completion of the work. Without his continuous encouragement and
involvement, this project would not have been a reality.
We would like to extend our sincere thanks to Dr. Arambam Neelima for
their valuable suggestions. We wish to thank Dr. Lithungo Murry, Head of the
Department Computer Science and Engineering, NIT Nagaland for continuous support.
We would also like to thank all our friends who have developed us to gain a sense of
dutifulness, perfection and sincerity in the effort.
We wish to dedicate this work to parents and teachers, for they are the
pillars of support giving us confidence in whatever we do. We would like to thank
Saurabh Kumar, PhD Scholar and Shyam Sunder Jannu Soloman, PhD Scholar who
has motivated us to work harder and do our best. Last but not least, we would like to
owe our sincere and incessant gratitude to the almighty God for the immense blessing
on us.
(2020105238)
&
SUSHMA R
(2020105256)
v
TABLE OF CONTENTS
ABSTRACT iii
LIST OF FIGURES vii
LIST OF ABBREVIATIONS viii
1. INTRODUCTION 1-6
1.1 GENERAL 1
1.2 STATE OF ART 2
1.3 OBJECTIVES 5
1.4 ORGANIZATION OF THE REPORT 6
5. CONCLUSION 21-22
5.1 INTRODUCTION 21
5.2 HIGHLIGHTS OF THE WORK 21
5.3 FUTURE WORK 22
vii
LIST OF FIGURES
LIST OF ABBREVIATIONS
CHAPTER 1
INTRODUCTION
1.1 GENERAL
Water is vitally important for the existence of all living organisms. It is
important in all aspects such as agriculture, industrial processes, and climate regulation,
and also is a great support to the ecosystem. With the growing population, there is also
an increase in water demand. Beyond its impact on vast rural and urban populations,
water scarcity in India has far-reaching consequences for the environment and
agricultural sector. Despite a population exceeding 1.4 billion people, India possesses
merely 4% of the world’s freshwater resources. India is facing increasing challenges
related to water scarcity due to various factors such as the increase in population,
changes in climatic patterns, uneven distribution of water across the country, and water
pollution which further reduces the availability of clean water. Ensuring India’s
economic and social well-being requires the availability of sufficient resources to meet
the needs of agriculture, industries, and the domestic sector in the years ahead.
In recent years, numerous occurrences have brought attention to the water challenges
in India, revealing the gravity of the issue. One of the noticeable incidents includes:
Chennai Water Crisis (2019): On June 19, 2019, authorities in Chennai officially
announced the arrival of “Day Zero,” or the day when almost no water is left.
This declaration came as all four primary reservoirs that ran throughout the city
had depleted due to two consecutive years of inadequate monsoon rainfall,
especially in late 2017 and throughout a significant portion of 2018.
The primary issue in water scarcity arises from the equitable distribution of
water without accounting for consumption. The equal distribution results in regional
tanks with higher water consumption facing shortages.
2
M. M. Srihari et al. [3] suggested a system for smart water management system
that includes features such as checking water quality and detecting water leaks. In this
model water level sensor is used to regulate water flow, a Ph sensor is used to check
the Ph value of the water, and a flow sensor is used to detect leaks if any. All these
sensors are linked directly to the Arduino board and the IoT module employed is used
to link the Arduino board to the internet, retrieves information from IoT devices, and
transfers it using MQTT protocol.
Kaushik Gupta et al. [4] proposed a smart water management system that attains
full automation. In this proposed model they used an ultrasonic sensor and turbidity
sensor for observing the level and purity of water, these data are transmitted
continuously using MMQT protocol. Two Raspberry Pi Zero W are used to interpret
data and relay switches are used to control the water from the smartphone application
thus achieving complete automation.
Thomas Robles et al. [5] suggested an updated design for smart water
management by incorporating IoT technologies to separate decision support systems
and monitoring from business processes coordination and subsystem implementation.
Here a MEGA model architecture is used which sets a standard protocol to decouple
all water management globally. In this model, interoperability between the interfaces
is provided.
Mingyang Pan et al. [8] employed deep neural networks to explore the
prediction of water levels. The primary emphasis of the paper is on utilizing this
extensive dataset to develop deep neural network models for accurate predictions. To
enhance prediction accuracy, a hybrid CNN-GRU model is constructed, combining the
gated recurrent unit (GRU) to capture changing water level trends and the
convolutional neural network (CNN) to discern spatial correlations among water level
data from neighbouring stations.
1.3 OBJECTIVES
We will address the mentioned issues by employing IoT devices and Machine
Learning algorithms to calculate the daily consumption rate. Based on the predicted
data, water distribution is managed to ensure there is no water shortage. To counter the
loss due to transportation, flow sensors are used they are strategically placed at pipe
endpoints to measure flow, detecting any potential leaks. If a shortage is identified,
rather than supplying water from the main source, we can redirect it from the nearest
tank with a lower consumption rate, thereby reducing energy consumption.
6
To predict the usage of water and distribute it accordingly using IoT and
machine learning algorithms.
To recognize the leakage of water from pipes while transporting using flow
sensors.
Achieving the task of supplying water to the water tank having water underneath
the minimum water level, from the nearest water tank where its consumption is
lower as compared to its daily consumption.
Chapter 4: Presents the outcomes of the project and engages in a discussion around
them.
Chapter 5: Summarizes the key findings and outlines potential directions for future
research.
7
CHAPTER 2
2.2 DATASET
It's worth noting that the original dataset is sourced from the following
repository: https://github.com/DAIAD/data/blob/master/swm_trialA.zip. The
repository includes all datasets generated during the Trials of the DAIAD project. For
detailed information about each dataset and its characteristics, please refer to the D7.3
Report Deliverable of the DAIAD project, accessible at www.daiad.eu.
- `id` : Record Id
- `userId` : User Id
- `deviceId` : Device Id
- `time` : Consumption time (yyyy-MM-dd hh:mm:ss)
- `consume` : Consumption in liters
- `totalConsume` : Accumulated consumption
- `isAtHome` : This field indicates whether the user is at home or not,
with possible values Y (Yes), N (No), U (Unknown).
- `isAnomalous` : This field categorizes consumption as anomalous (1) or
not(0).
9
PREPROCESSING
CHAPTER 3
PROPOSED MODEL
3.1 INTRODUCTION
Initially, our project was bifurcated into two modules. The first module focuses
on water distribution, analysing the consumption of each water tank by taking into
account various factors such as temperature, population, season, and holidays. The
second module is dedicated to managing water within nearby tanks independently until
the main water source is required.
For demand forecasting to predict the daily consumption of water, we are using
Short-Term forecasting. We plan to study the consumption rate of each water tank by
considering different factors such as temperature, population, seasons, and holidays.
11
For the design of the water management system, we opted for the powerful and
reliable Python language. The entire management system was compartmentalized into
distinct modules, each handling specific tasks within the overall framework.
12
3.2 MODULES
A water management system algorithm that predicts and manages the water
consumption rates in different tanks over a specified period. Here's a report
summarizing the key components and functionalities of the code:
(I) Overview
- The Algorithm focuses on managing the distribution of water among
different tanks connected by pipes. It utilizes Dijkstra's algorithm to
find the shortest path between water tanks, considering various
factors such as leakages
(II) Code Components
i. Graph Representation:
o The water distribution network is represented using a graph
with nodes as tanks and pipes connecting them.
o The `graph` dictionary holds the edge weights between tanks.
ii. Dijkstra’s Algorithm:
o The `dijsktra_algorihtm` and `dijsktra` functions implement
Dijkstra's algorithm to find the shortest path between a source
and destination tank.
o The algorithm considers leakages, adjusting edge weights for
affected pipes.
iii. Water Tanks and Pipes:
o Tanks and pipes are represented using dictionaries
(`pipes_tanks_links`,`TANKS`).
o The `find_nearest_tank` function returns a list of nearest tanks
for a given tank, considering leak adjustment.
iv. Leak Detection:
o The `leakage_detection` module is imported to identify
leakages in the water distribution network.
16
v. Heap Operations
o Heap operations are used to efficiently manage and retrieve
minimum values during Dijkstra's algorithm execution
(III) Functionality
- The Algorithm dynamically adjusts the nearest tanks for each tank
based on leakages detected
- It calculates the shortest paths and associated costs between tanks.
- The water management system aims to optimize water distribution
considering leakages and shortest paths
(IV) Conclusion
- The Algorithm provides a foundation for a water management
system, considering factors like leakages and optimizing water
distribution. Further development and documentation could enhance
its usability and robustness.
In summary, the script provides a function to determine the valves that should
be opened based on a given path of pipes in a water pipeline system. The dictionaries
`pipes_tanks_links` and `valves_tanks_links` are crucial for mapping pipes to tanks
and valves, respectively.
This hypothesis outlines a scenario for cost analysis related to water distribution.
Let’s break down the key components of this hypothesis:
(V) Purpose:
- The purpose of the hypothesis is likely to evaluate the economic
aspects of water distribution in this specific scenario. This could
involve understanding the operational costs, energy
consumption, and potential areas for cost optimization.
(VI) Analysis Scenario:
- This scenario sets the stage for a detailed cost analysis of the
water distribution process. It may involve considering factors
like the power requirements of pumps, energy consumption by
motors, and amount of water being saved from leakage in pipe.
(VII) Data Points:
- The hypothesis provides specific data points such as the tank
capacity, distance, and the number of tanks. These would be
crucial for performing accurate calculations and assessments.
(IV)
20
CHAPTER 4
4.1 INTRODUCTION
For every hour the leakage database table is updated after checking for leakages
in pipe this is an hourly periodic check.
21
4.2 PERFORMANCE
DAY 1:
Figure 4.1. Hourly water Figure 4.2. Hourly water Figure 4.3. Hourly water
consumption of Tank 1 consumption of Tank 2 consumption of Tank 3
DAY 2:
Figure 4.8. Hourly water Figure 4.9. Hourly water Figure 4.10. Hourly water
consumption of Tank 1 consumption of Tank 2 consumption of Tank 3
CHAPTER 5
CONCLUSION
5.1 INTRODUCTION
In conclusion, this research aims to address the critical issue of water scarcity
through the implementation of the Internet of Things (IoT) based water management
system tailored for housing societies. Through historical data and demand forecasting,
the model guarantees that water distribution corresponds to consumption patterns. The
incorporation of detection techniques in the leakage detection module empowers the
system to identify and address leaks, thereby minimizing water wastage and
contributing to the overall sustainability of water resources. By redirecting water from
tanks with lower consumption rates instead of relying on the primary source, energy is
conserved.
To integrate smart management module with IoT devices using cloud server.
To implement a smart distribution module.
To integrate both the modules.
To develop user interface.
To develop a small prototype using hardware components.
25
REFERENCES
[2] Ankit Anilkumar Maroli, Vavhav S. Narwane, Rakesh D. Raut, and Balkrishna
E. Narkhede, “Framework for the implementation of an Internet of Things
(IoT)-based water distribution and management system”, Clean Technologies
Environmental Policy, Vol. 23, pp. 271–283, January 2021.
[3] M.M. Srihari, “Intelligent water distribution and management system using the
Internet of Things”, In Proceedings of the 2018 International Conference on
Inventive Research in Computing Applications (ICIRCA), Coimbatore, India,
pp. 785-789, IEEE, July 2018.
[4] Kaushik Gupta, Mandar Kulkarni, Manas Magdum, Yash Baldawa, and
Shivprasad Patil, “Smart water management in housing societies using IoT”, In
Proceedings of the 2018 Second International Conference on Inventive
Communication and Computational Technologies (ICICCT), Coimbatore,
India, pp. 1609-1613, IEEE, April 2018.
[5] Tomas Robles, Ramon Alcarria, Diego Martín, Augusto Morales, Mariano
Navarro, Rodrigo Calero, Sofia Iglesias, and Manuel López, “An Internet of
Things-based model for smart water Management”, In Proceedings of the 2014
28th international conference on advanced information networking and
Applications workshops, Victoria, BC, Canada, pp. 821-826, IEEE, May 2014.
[7] H Fuentes, and D Mauricio, “Smart water consumption measurement system for
houses using IoT and cloud computing”, Environmental Monitoring and
Assessment, Vol. 192, No. 602, pp. 1-16, September 2020.
[8] M Pan, H Zhou, J Cao, Y Liu, J Hao, S Li and CH Chen, “Water level prediction
model based on GRU and CNN”, IEEE Access, Vol. 8, pp. 60090-60100, March
2020.
[9] L Wu, C Kong, X Hao and W Chen, “A short-term load forecasting method
based on GRU-CNN hybrid neural network model”, Mathematical Problems in
Engineering, Vol. 2020, Article ID 1428104, pp. 1-10, March 2021.
[11] Q Tao, F Liu, Y Li and D Sidorov, “Air Pollution Forecasting Using a Deep
Learning Model Based on 1D Convnets and Bidirectional GRU”, IEEE Access,
Vol. 7, pp. 76690-76698, June 2019.
[12] Liyuan Deng, Xiaobo Chang, and Peng Wang, “Daily Water Demand Prediction
Driven by Multi-source Data”, Procedia Computer Science, Vol. 208, pp. 128-
135, January 2022.