You are on page 1of 6

A Prototype for Flood Warning and Management

System using Mobile Networks


Syed Ahmed Ali, Fasih Ashfaq,
Ehsan Nisar, Usama Azmat, Jehan
Zeb
Dept. of Electrical Engineeering
Center for Advanced Studies in
Engineering
Islamabad, Pakistan
syed.ahmed.2007@gmail.com,
fasihashfaq@gmail.com,
usama.bss@gmail.com,
ehsannisar65@gmail.com,
mr.jehanzeb@gmail.com

Abstract— Pakistan has a long track record of devastating $43 billion [4], economic development was expected to hit
floods that have caused chaos in the country as a result of loss 4.1% in 2010, but this estimate dropped to 2.5% after the
of human life, property damage, harm to agriculture, loss of floods. Of the 4 provinces in Pakistan, Sindh and Khyber
livestock, and breakdown of health. Backed up by heavy Pakhtunkhwa were the most affected [5]. A total of 19
monsoonal rains, global climate change has increased the risk
districts had been affected in Sindh. In Sindh, 410 lives were
of flooding in areas along with the river belts, making it
pertinent to have an effective flood notification and monitoring lost, 1,235 injuries, 876,249 homes were ravaged and
system. The system design consists of three main blocks: the 7,274,250 residents in general, had been impacted. Out of
telemetry data collection block; the collection of data from the the 24 districts were affected in KPK, 1,156 lives were lost,
sensor Units deployed on the shores; the data analysis and 1,198 injuries 284,990 houses had been damaged and
processing block; the compilation of algorithms for processing 3,800,000 people had been impacted [6]. The places where
data obtained from sensors and the development of the most destruction occurred were in the settlements and
appropriate alerts/warnings for the public and control farms that were next to the major rivers in the adjacent
messages for the spillways; and finally, the information banks.
dissemination block; which is used notify community of the
flood risk levels and warnings. The model demonstrates the use
of the ESP32 development board to gather data from the Due to regular floods, Pakistan needs a network that could
sensors on precipitation, water flow and water level. The raw support local population in flood hazards, help alert them
data is transmitted to the IoT platform using a 4 G device and emergency services, with the aid of the flood risk
connected to the ESP microcontroller where it is processed information. There is no appropriate system in place due to
using an online IOT platform based on the algorithm lack of care and safety measures that could help prevent or
developed in MATLAB, after which the warning alert is sent to at least mitigate the destruction wreaked by the flooding.
the community. The end users are also provided with an Residents of this flood prone region do not receive timely
android application to monitor the flood risk situation in real information or the notification system is so bad that no
time. Results of the experiment demonstrate robustness in
flood prediction with reduced likelihood of error.
warnings can reach the community.

This aim of this paper is to propose an early flood detection,


I. INTRODUCTION warning and notification system. Our design would focus on
A long recorded history of deadly floods in Pakistan is real-time collection of data on the riverbanks with our onsite
responsible for, causing loss of life, property destruction, sensors, this telemetry data would be then sent to an online
and destruction to crops, loss of livestock, and degradation platform for processing. This data would be labelled into
of health conditions because of waterborne illnesses. different danger levels in real-time, and then this labeled
Because of the mean increase in global temperature caused data would be disseminated via various methods for
by global warming [1] and in combination with an intense maximum coverage to the local population and safety
monsoon rainy season, Pakistan's threat of deadly floods in services.
recent years has been enhanced. Pakistan is one of the
countries most affected by climate change and would be The rest of the paper is organized as follows. The related
affected by it [2], so the occurrence of floods is work is presented in Section II followed by the limitations
unfortunately very probable to rise. According to a Science and assumptions in Section III. The Section IV and V
Advances analysis and calculations [3], by 2040, "Pakistan discusses the proposed architectural design, its flow and
is already highly affected and will experience nearly a operation. The section VI discusses the testing and
doubling of high-end flood risk at a subnational rate." deployment. Future work is discussed in Section VII. The
A flood in August 2010 hit Pakistan, culminating in a conclusion section in the end in section VIII.
humanitarian crisis considered one of the severe in
Pakistan's history [3]. Pakistan endured financial losses of

‹,(((

3URFHHGLQJVRIWK,QWHUQDWLRQDO%KXUEDQ&RQIHUHQFHRQ$SSOLHG6FLHQFHV 7HFKQRORJ\ ,%&$67 


,VODPDEDG3DNLVWDQWK±WK-DQXDU\
Authorized licensed use limited to: University of Exeter. Downloaded on May 06,2020 at 20:47:51 UTC from IEEE Xplore. Restrictions apply.
Fig 2: Telemetry Data Collection Block

In all [7-10] the authors in general present a flood warning


system which is not effective unless some flood
management is added in the design. Our system offers both
flood warning and management of spill way control through
actuators to effectively neutralize the threat of flood in the
affected area.
III. LIMITATIONS AND ASSUMPTIONS
Our proposed system strongly depends on the availability of
centralized cellular network responsible for relaying the
information collected from the sensors units to the server for
processing. We use a LTE Device to connect to the internet
which in turn relies on Mobile towers for the 4G service. If
there was an eventuality where the Mobile towers stopped
working due to a flood, our on-site sensors would cease to
transmit the sensor data to the IOT Server. However, a flood
notification can still be transmitted to the user based on the
estimations of the previously sent telemetry data. Therefore,
we assume full availability of the LTE services in the
Fig 1: System achitecture affected area for the necessary operations of our system.
IV. SYSTEM ARCHITECTURE
II. RELATED WORK
In this chapter, we present the design and architecture for
In [7] the authors present a flood detection system that uses an early flood warning and management system for a local
mobile networks. The sensor data is collected from various Nallah Lai stream that is vulnerable to flash flooding flowing
sensors and is stored in a memory card and sent using a in the middle of heavily populated Rawalpindi and
GSM module to a computer that generates a warning Islamabad twin cities. The plan can be divided into three
notification, which is a loudspeaker system. Similar to [7] in blocks: the block of data collection by telemetry, the block of
[8], the authors use sensors such as rain-gauge, ultrasonic data analysis and storage, the block of information
sensor and cameras to collect telemetry data. A cellular dissemination and finally the system of management. The
network connection is then utilized to send the data to a block descriptions are listed below:
central server after which the warning notification is sent
from the server to the end user via a web as well as Android A. The Telemetry Data Collection Block
application. This block is made up of Sensors, ESP32 and an LTE
system for data collection at riverbanks. ESP32, a low-cost
The architecture design in Reference [9] uses multiple and low-power microcontroller with integrated Wi-Fi, was
sensors for monitoring the water level and flow. The the development board used.
microcontroller sends the sensor data, using a ZigBee
device, to the server. The server based on previously set Sonar Sensor, HC-SR04, an ultrasonic module that
thresholds automatically transmits the warning to the user, measures the depth of water, was one of the sensors used. It
using a ZigBee device. The user uses an android application works when a signal is sent by the transmitter (TRIG pin), a
This design has no dependability on the internet. Reference high frequency back-reflected sound (echo pin) when an
[10] uses Arduino UNO as the developmental board. This object is found by the signal. The range or distance is
design only uses the water level sensor. The sensor data is calculated using a conversion equation using the time
sent to the microcontroller. Based on the analysis of the difference between when and when the signal is transmitted.
sensor data a warning notification is sent to the user via an The ECHO and TRIG pins are connected to the ESP32
SMS. There also 3 LED’s attached to GPIO pins of the device's GPIO pins. This runs at roughly 5 volts. A rain
Arduino board which turn on and off based on the readings. detector is the second sensor used. It is used as a

3URFHHGLQJVRIWK,QWHUQDWLRQDO%KXUEDQ&RQIHUHQFHRQ$SSOLHG6FLHQFHV 7HFKQRORJ\ ,%&$67  


,VODPDEDG3DNLVWDQWK±WK-DQXDU\
Authorized licensed use limited to: University of Exeter. Downloaded on May 06,2020 at 20:47:51 UTC from IEEE Xplore. Restrictions apply.
A=sonar_Sensor (); Set Water flow thresholds
B=rain_Detector ();
C=WaterFlow_Sensor (); Set Mean level thresholds

Assign flow_data from sensors in


Internet_connection (SSID, pass); Total_flow
connection_iot_cloud_platform ();
Assign waterLevel_data from sensors in
transmit-data (A); level_data
transmit-data (B);
transmit-data (C); Store RainDetectorData from sensors in
stop_transmission (); Rain_data
pause_10000_milliseconds ();
If (Total flow isGreaterthan first flow
Fig 3: Pseudo code of telemetry data collection block threshold and waterLevel_data
isGreaterthan first level threshold and
Switch when rainfall drops on the sensor. When rainwater is Rain_data isEqualto yes)
sensed, it produces a digital output of 5 volts or 0 volts. Last Set Danger to High
but not least, the water flow detector consists of a plastic
body, a motor rotor and a Hall Effect sensor. As the water Else if (Total_flow isGreaterthan Second
flows through the sensor, the rotor rotates, and with the flow_threshold and waterLevel_data
increase in water flow, the rotation speed changes. The hall- is isGreaterthan Second level_Threshold
effect sensor provides the correct output pulse signal. Each and Rain_data isEqualto Yes)
unit in our design constitutes of an ESP-32 device alongside Set Danger to Moderate
the previously mentioned sensors constitute a single units.
Else If (Total_flow isGreaterthan third
Our device is in close proximity to several such units. This flow_threshold and waterLevel_data
will bring robustness to our framework in making the right isGreaterthan Third level_Threshold and
flood warning and alert decisions. The raw data collected Rain_data isEqualto No)
from all units by the ESP device is then sent to the data Set Danger to Low
analysis and processing block to make decisions related to
flood warning and management. The pseudo code of Fig 4: pseudo code of data analysis and processing
operations performed in the telemetry data collection block block
is presented in the figure (3)
C. Information Dissemination
There are two ways to alert the user of the flood risk. An
B. The Data Analysis and Processing Block android app that provides the flood risk person with an alert
In this block, the ESP-32 sends the telemetry data after in real time and a map-based view of the level of flood risk
every couple of seconds to be handled on the MATLAB- in their location. The app has been made with the user in
based IOT-cloud platform. Beneath the TCP / IP protocol, mind to make it easy for the user to use, read and quick to
the IOT platform uses an MQTT protocol. It is based on a browse navigate the application's various pages. The
publish-subscribe-based messaging model designed for application shows the various flood danger states in three
remote location connections where the bandwidth of the colors, a high-risk red circle, a medium-risk yellow circle,
network is limited. The sensor data from different units are and a low-risk green circle. Color changes take place in real-
analyzed to reduce the error by an average. The processed time based on sensor-sent telemetry data. The app also has a
data will then be marked on the basis of specified built-in feature to contact local safety authorities.
thresholds.
D. Management System (Actuator Block)
The Pseudo code of the functionalities involved in the Data This block is responsible for the management of the
Analysis and Processing Block is shown in the figure (4). spillway of the dam, to alleviate the flood situation in the
local area. The management system plays the role of an
actuator where it performs actions based on the level of the
flood risk. If the flood risk level is high the spillway gates
are open to a greater degree and if they the flood risk level is
low the gates open to smaller degree. In our design we
replicated the action of spillway gates with use the use of
servo motors, where the servo motors connected to an ESP-
32 device receives labeled data, high risk, medium risk or
low risk, from the cloud.

3URFHHGLQJVRIWK,QWHUQDWLRQDO%KXUEDQ&RQIHUHQFHRQ$SSOLHG6FLHQFHV 7HFKQRORJ\ ,%&$67  


,VODPDEDG3DNLVWDQWK±WK-DQXDU\
Authorized licensed use limited to: University of Exeter. Downloaded on May 06,2020 at 20:47:51 UTC from IEEE Xplore. Restrictions apply.
Fig 5: Android Application

The second way to send a warning is the SMS method. The


cloud data is collected on a server PC every couple of
minutes. A GSM module (SIM800L) is connected to this Fig 6: Flow chart of the Architecture
server PC, which sends alert alerts to registered users via VI. TESTING AND DEPLOYMENT
SMS. This is an expansion of our alert delivery mechanism
as we have taken into account that not everyone is using For testing purposes, we employed the use of a controlled
Android devices, so this is a much simpler and widely environment. We used 8 cubic feet glass tank/container,
available update process. with inflow water pipe and outflow water pipes on the either
sides. With the inflow water pipes we attached water flow
The ESP32 device that uses LTE to continuously collect sensors and to measure the water depth we used an
data from the server PC depends on the data produced from ultrasonic sensor (or level sensor) attached vertically to the
the control center and using relay circuits to control the tank. With this testbed we replicated a flood environment on
Dam's waterway. The greater the risk of flooding, the a smaller scale, where the water which flows through inflow
greater the opening of spillways and vice-versa. pipes represents the flow of the actual stream in a natural
environment and the level of water tank represents the water
V. SYSTEM FLOW AND OPERATION level of the river. For our testbed we employed the use of
This section discusses the series of operations involved at two units in conjunction with each other, with their own set
various stages of the design., Firstly, the data from each unit of sensors and ESP device. For the management system, we
that includes three sensors rain detector, water flow and used a gate mechanism with two servo motors which
level are sent to ESP32 device. Next, the ESP device sends controls the flow of the output stream and acts as our
this data to the IOT platform using MQTT protocol. The actuator.
IOT platform has risk thresholds set for each sensor, based
on the incoming telemetry data and on the basis of which A number of trials were carried out to assess the accuracy
the IOT platform determines the current flood risk level. All and timing of the sensors used to reach end users for the
this data including the telemetry data and the flood risk level flood risk warning. In a controlled environment, these tests
is stored in a database at the Server PC. Based on the current were conducted. We conducted five trails for testing and
flood risk level, three actions are taken, first the user gets an reset ESP-32 Devices after each check and calculation of the
SMS notification via a GSM module. Secondly, the user can target value again. Below are the findings of these studies.
sign in to our android application to get real-time update on The primary purpose of the tests was to evaluate the
the current flood risk. Lastly, the actuator which in our case accuracy of the sensor data.
is the dam’s spillway is controlled on the basis of the The table (1) is the outcome of the experiment carried out to
labeled data to reduce the flood risk in the affected area. The test the reading accuracy of both units ultrasonic sensor,
figure (6) shows the complete flow of operations involved in which is used to determine the level of water.
the project.

3URFHHGLQJVRIWK,QWHUQDWLRQDO%KXUEDQ&RQIHUHQFHRQ$SSOLHG6FLHQFHV 7HFKQRORJ\ ,%&$67  


,VODPDEDG3DNLVWDQWK±WK-DQXDU\
Authorized licensed use limited to: University of Exeter. Downloaded on May 06,2020 at 20:47:51 UTC from IEEE Xplore. Restrictions apply.
Test We measure the robustness of our system by defining the
Amount(cm) Test Test Test Test Test expected value of the sensors error using the equation
below:
1 2 3 4 5 n ^
Unit 1 22 19 18 21 20 ¦ (x i  xi )
20 Unit 2 20 20 21 20 19 E e i 1
u 100% …………Equation 1
Unit 1 41 42 38 42 42 n
40 Unit 2 41 40 40 41 40 Where, E e = Expected value of the error,
Unit 1 62 61 63 59 58 xi =Measured Value
60 Unit 2 61 60 62 59 60 ^
Unit 1 83 81 82 79 78 x i =Original Value
80 Unit 2 81 82 79 78 83
Unit 1 121 117 120 121 122 Average Rain Average Actuator Actuator Flood
120 Unit 2 122 121 120 119 118 Water Level Detector Water A B Risk
(Centimeter) Flow Level
Table 1: Ultrasonic test results
(Liters
Per
The following table is a rain detector accuracy test that is Minute)
used to detect the presence of rain that we used water >40 >=4 >4 OPEN OPEN HIGH
droplets to verify the binary performance of this sensor that (Raining)
can be virtual high (wet) or low (dry). We conducted only 3 >40 <4 (NOT >4 OPEN OPEN HIGH
trails that were sufficient for this study. Raining)
>20 >= 4 <4 OPEN CLOSED MED
Simulated (Raining)
condition Test 1 Test 2 Test 3 >20 <4 (NOT <4 OPEN CLOSED MED
Raining)
<20 >= <4 CLOSED CLOSED LOW
Wet Wet Wet Wet 4(Raining)
<20 <4 (NOT <4 CLOSED CLOSED LOW
Dry Dry Dry Dry Raining)

Wet Wet Wet Wet Table 4: Predetermined flood risk parameters

Dry Dry Dry Dry


The expected value comes out to be less than 5% for all of
Table 2: Rain Detector test results the sensor units which is considered to be an acceptable
number. The table 4 above shows the parameters that were
The table below is the test results for the total amount of set for the determination of the level of the flood risk.
time taken to provide the flood risk warning to the end user.
In a controlled environment, we set all the parameters (flow, VII. FUTURE WORK
depth and rain detector) so that each of these sensors read A third warning notification system (with the first 2 namely
flood risk rates as "danger". Android Application and SMS system) can be added using
the LoRaWAN protocol with the ESP unit. This
technique has the capability to add more variation in our
Trial Trial Trial Trial Trial architecture and our alert dissemination techniques because
1 2 3 4 5 it will not depend on data network for transferring data as
well as being totally independent of it. Another possible
Time development will be using a rain guage sensor to monitor
Taken 17 18 17 19 17 precipitation, adding additional complexity to our telemetry
(Seconds) dataset. If introduced, it would incorporate rain data to our
Table 3: Time taken for the notification to reach the end system that would make designating flood risk thresholds
user and accuracy to our architecture much easier. Finally, we
could add another layer to our model by using machine
learning techniques. We can analyze the flood data by
training the machine learning algorithm to identify trends
leading to flooding risk in the future. The system could then
predict flood risks based on the data set and carry out flood
warnings and management in time.

3URFHHGLQJVRIWK,QWHUQDWLRQDO%KXUEDQ&RQIHUHQFHRQ$SSOLHG6FLHQFHV 7HFKQRORJ\ ,%&$67  


,VODPDEDG3DNLVWDQWK±WK-DQXDU\
Authorized licensed use limited to: University of Exeter. Downloaded on May 06,2020 at 20:47:51 UTC from IEEE Xplore. Restrictions apply.
VIII. CONCLUSION [8] Anand Dersingh, "Design and Development of a
We have implemented the flood warning and management Flood Warning System via Mobile and Computer
system in our architecture design. The management system Networks," Department of Computer Engineering
is used to curtail the damage caused by floods with the help Assumption University Bangkok, 2011.
of actuator(spillway) that perform preventative actions
based on labeled data of the flood risk fetched from the [9] Jayashree S, Sarika S, Solai A L, Soma Prathibha, "A
cloud. We have added robustness in our system by NOVEL APPROACH FOR EARLY FLOOD
employing multiple Units in close proximity. We also WARNING USING ANDROID AND IOT,"
developed an android application for flood notification. It Department of Information Technology Sri Sai Ram
displays the level of risk and also has a feature to contact the Engineering College, 2017.
user’s local safety authority in case of an emergency.
[10] Analyn N. Yumang, Charmaine C. Paglinawan, Arnold C.
Paglinawan, Glenn O. Avendaño, , "Real-Time Flood Water
IX. REFERENCES Level Monitoring System with SMS Notification," Mapúa
University Muralla St, Manila, 2017.
[1] Lead.org.pk, "Report of the Secretary-General’s
High-level Advisory Group on Climate Change
Financing," UNFCCC, 5th November 2010.

[2] A. Salam, "Pakistan is ground zero for global warming


consequences," 24 July 2018. [Online]. Available:
https://www.usatoday.com/story/news/world/2018/07/24/
pakistan-one-worlds-leading-victims-global-
warming/809509002/. [Accessed 12 September 2018].

[3] Sven N. Willner Anders Levermann, Fang Zhao and


Katja Frieler, "Adaptation required to preserve future
high-end river flood risk at present levels,"
ScienceAdvances, 2018.

[4] The Editors of Encyclopaedia Britannica,


"Pakistan Floods of 2010," 26 July 2018.
[Online]. Available:
https://www.britannica.com/place/Pakistan.
[Accessed 14 Septermber 2018].

[5] Ahmed Hassan, "Pakistan: Flood loss


estimates rise to $43bn: PM," DAWN
Group of Newspapers, 2010.
[6] World Health Organization, "Pakistan
floods 2010 Early recovery plan for the
health sector," World Health Organization,
2011.
[7] Hung Ngoc Do, Minh-Thanh Vo, Van-Su Tran,
Phuoc Vo Tan, and Cuong Viet Trinh, "An Early
Flood Detection System Using Mobile Networks,"
School of Electrical Engineering International
University,Vietnam National University, 2015.

3URFHHGLQJVRIWK,QWHUQDWLRQDO%KXUEDQ&RQIHUHQFHRQ$SSOLHG6FLHQFHV 7HFKQRORJ\ ,%&$67  


,VODPDEDG3DNLVWDQWK±WK-DQXDU\
Authorized licensed use limited to: University of Exeter. Downloaded on May 06,2020 at 20:47:51 UTC from IEEE Xplore. Restrictions apply.

You might also like