The Implementation of an IoT-Based Flood Alert System

Floods are the most damaging natural disaster in this world. On the occasion of heavy flood, it can destroy the community and killed many lives. The government would spend billions of dollars to recover the affected area. It is crucial to develop a flood control system as a mechanism to reduce the flood risk. Providing a quick feedback on the occurrence of the flood is necessary for alerting resident to take early action such as evacuate quickly to a safer and higher place. As a solution, this paper propose a system that is not only able to detect the water level but also able to measure the rise speed of water level and alerted the resident. Waterfall model is adopted as the methodology in this project. Raspberry Pi is used to collect data from the water sensor and transmit the data to GSM module for sending an alert via SMS. The analysis will be done to show how the Raspberry Pi will be integrated with the smartphone to give an alert. The system is tested in an experiments consist of two different environment in order to ensure that the system is able to provide accurate and reliable data. The project is an IoTbased which significantly in line with the Industrial Revolution 4.0, supporting the infrastructure of Cyber-Physical System. Keywords—Flood Alert System; Internet of Things; CyberPhysical System; IR4.0


I. INTRODUCTION
The worlds climate is changing drastically due to effect from human activities such as pollutions, cut countless trees, excessive gas emission etc. Floods are among the most common damaging natural disasters, that cause significant harm to life, property, and economy.Scientists estimate by 2030, if 4-inch sea level rise, it could potentially caused the severe flooding in many parts of the world [1].
Since Malaysia is located near the equator, the most severe climatic related natural disasters are monsoonal flood.It happens almost every year and causes a lot of damages, property loss, and not to mention the loss of life during the disaster.Recently in Jan 2018, two died and nearly 12,000 evacuated when flood strike in Pahang as reported in [2].The worst flood in Malaysian history happened in 2014.More than 200,000 people were affected while 21 were killed.The major disasters happened in the several states on the east coast side of Peninsular Malaysia.The estimated cost of damages was over RM1 billion as reported in [3].The impact of the flood is huge and it is not happening in Malaysia but all over the world.
This paper proposes a flood warning system that can detect the water level and measure the speed of the rise of water level.To give the society an earlier notification to evacuate before the water rises to the dangerous level, the measurement result is sent as the alert to a mobile phone through Short Message Service (SMS).This project is designed on the IoTbased platform, where data from the sensor is collected at the mini-processor and alert is generated and transmitted as SMS to a smartphone.The proposed system is implemented in an experimental setting in two different environment to test its effectiveness.
Section 2 explains some works that have been conducted in the related field.Section 3 presents the methodology used in developing the system that the Waterfall model.Section 4 analyzes the result of the experiment and discusses them accordingly.Section 5 concludes the paper with an outline of contribution and the future work.

II. RELATED WORKS
Some article such as [4] and [5] has reviewed on flood disaster and disaster management in Malaysia which highlight the importance of finding best remedies to prepare if disaster strikes.Futhermore, Leman et al. [5] also reviewed the current disaster management in Malaysia for proposing enhancement the effectiveness.They suggest four phases of action; preparedness, response, recovery and mitigation.Due to this phenomenon, several experts have studied over the years on ways to improve flood control, thereby reducing the aforementioned risks.Better understanding of the flood hazard phenomenon and its potential consequences in our society is crucial for the development of flood risk reduction projects, control policies and other types of flood management strategies.The adoption of IoT based-system has attract attention among researchers since data is collectively sensed by sensors to provide various services without human intervention [6].Early work by Lo et al. [7] propose to automatically monitor the flood object based on the remote cyber surveillance systems.Image processing methods are being utilized to obtain instant flooding and waterlogging event feedback.
On the other hand, [8] used pressure sensor to read the water level at every second, for detecting the level of water.In the occasion where the water level surpasses a user-defined threshold, an SMS is texted to the residence for warning and quick action.Recent from Jana Priya et al. [9] and Satria et al. [10] demonstrate the idea and implementation of a flood monitoring and alert system using measuring sensor.They proposed a system that measures the height of the water using ultrasonic sensor.While, [11] combine ultrasonic and water level sensor to monitor flood level conditions however it missing alert system.
Inspired by the literature, this work aimed to detect flood with water sensor with different level of measurement with SMS alert.SMS is considered as the most effective way to the scenario Malaysia since smartphone has rapidly become the preferred device for most Malaysian to remain connected.According to the survey [12], the percentage of smartphone users continue to rise from 68.7% in 2016 to 75.9% in 2017.The increment trend shows that the majority of people in Malaysia use mobile phones and it is a good strategy to give an early warning to the society using an SMS via mobile phone.

III. METHODOLOGY
Waterfall Model is flows steadily downwards (like a waterfall) through the seven phases; comprises of Planning, Requirement, Design, Implementation, Testing, Maintenance and Documentation.The following are the details of each phase for starting with the backgroup study until the completion of project.

A. Requirement
The first phase is to study the requirement to explore the research area including background study and also related works.From there, the research gap is identified and proceed to identify the hardware and software requirement.Hardwares that involved are water sensor, SEN113104 model and GSM module (model is a USB 3G modem Huawei mobile broadband E173).A breadboard is used to place and set up all the equipment at one proper place, Resistor 10K to reduce the current that flow of the system and also many types of jumper cables to connect the water sensor, raspberry pi and GSM module.The software used is a python language to code the entire program.

B. Design
The design phase presented the system design as presented in Fig. 1.There are two sensors used which placed at two different height.The first one will be placed at a lower level.This is the level of the potential flood that will be anticipated.When the water reaches this level, it triggers the water sensor and data is transmitted to Raspberry Pi and pass to GSM module for generating SMS alert to the residents, as a warning to be cautious and prepared.If the water continues to rise and reaches the second water sensor, it is considered now as dangerous, an alert SMS once again sent to the resident and authorities.

C. Implementation
In this phase, Raspberry Pi, water sensors and GSM Module are already being installed and developed based on the design.All the wiring that needs to be installed on the breadboard will be installed.Also, the coding for the Raspberry Pi will be set up in this phase for the water sensor and GSM module.This phase will take a lot of time because there will be many errors and unexpected problems that may occur during the configuration and development of the system.Verification and testing of the system also need to be done in this phase.The experiment has been set up as such a basin is placed with the two water sensors where the sensor will be placed on a certain height.Then, the sensor will be connected to the Raspberry Pi and the Raspberry Pi is connected to a Huawei mobile broadband so that it can send an alert message to the user.
This project is tested actual water where the water sensor will be placed in a basin (see Figs. 2).Then, when the water rises and reaches to the first sensor, automatically it will send an alert message to the authorized user or the head of society to inform about the water rise.Later, when the water reaches the second sensor which is much more higher than the first one, an alert message will be sent to inform that the water is now at a dangerous level, and also it will calculate the time for the water to reach the second sensor with the speed of water rising too.

D. Verification
In this phase, the SMS based flood early warning system using Raspberry Pi is tested to ensure if the system could send the early warning.The sensor will also be tested to see whether the detection of the liquid is okay or not.GSM Module should be checked to see whether it can give an SMS as an alert to the mobile phone.This phase is an important phase because it really needs to verify and test the system before it can be implemented.The performance of the system is tested as discussed in Section 3

E. Maintenance
The maintenance phase is to ensure that the sensor continue working to capture data anytime when water is rising.It is also important to ensure the GSM Module is ready to send SMS alert when needed.Maintenance is needed to be performed Fig. 2. The prototype of system and experiment set up from time to time so that, if there any error or malfunction to this system, an appropriate action will be taken.The system needs to always update any new software or any efficient code so that the system is at the top of the performance.This phase is the important part because it will determine the performance and how long will the system withstand.

IV. RESULT AND DISCUSSION
Overall, the system able to send an alert via SMS when the water rises to the pre-determined level.A quick notification through SMS is vital since the system is aimed at alerting people and authorities.Therefore, time delay is used for performance testing and evaluation.Three testings are as shown in Table 1.Entire testing is carried out in a controlled environment where two assumptions made; in the occasion of the water level rise fast or slow; emulating the condition of flash flood and monsoon flood respectively.

A. Test 1 Water Detection
Test 1 is designed to measure the accuracy of time measured by the system which compared with the manual time reading.For each environment, 30 series of reading are captured manually by digital clock and automatically from system time (produced by the system).Since 30 lines of time are quite long, Table II and III only shown the partial result obtained for Environment A and B respectively.The time of water detection at sensor 1 and sensor 2 by the system is compared with the manual reading.
It is not much difference between the manual and system time.For both environment, although some readings are different, on average the difference is not more than 10 seconds.This is expected since the program need some time to acquire data from sensor and pass it to the system.The result appears to verify that the system time is accurate.

B. Test 2 Delay Time of Received SMS
This test aimed to measure the delay of received SMS relative to the time it is sent.The partial result is tabulated in Table IV and Table V.In both environments, the delay between message sent and received at the sensors are on the average of two seconds.While it is depends on the performance of telecommunication provider, the maximum 7 seconds of delay is acceptable.Resident and authorities can still be alerted in a timely manner for appropriate action.

C. Test 3 Water Speed Calculation
Test 3 is for summarizing the finding on the rate of water increment speed.The value can be used as a guideline for estimating the how quick the flood rise.Table 6 shows that as expected, in environment A the rate of water increment is quicker than environment B. The time needed for the height of water to increased 1 meter is less in environment A compared to B. The information about the rate of water increased is sent via SMS as well once water reaches the second sensor.V. CONCLUSION This work enlighting the possibility to provide an alert system to overcome the flood risk.It can also contribute to the authority or company such as firefighter or any government state agency that can help the society about the flooding or any natural disaster.The proposed prototype system has been tested and it works as proposed.It is able to send an alert message to the user with the time of the water rise also with the speed of the water rises for prediction how quick is the flood is happening.It also has been tested in a controlled environment to evaluate the performance.For real implementation, several sensors might be integrated for accurate detection such as pressure sensor [8] and also camera [6].

TABLE I .
PERFORMANCE TESTING SCHEDULEDFor fast water risen, Full Volume Flow Rate environment is used where the water tab is open at its full speed (Environment A).Meanwhile, Half Volume Flow Rate (Environment B) is set with the water tab is open at half of it so that the water rises slowly.Table1summarized the test environment and the performance testing.

TABLE II .
RESULT OF TEST 1 FOR ENVIRONMENT A

TABLE III .
RESULT OF TEST 1 FOR ENVIRONMENT B

TABLE V .
RESULT OF TEST 2 FOR ENVIRONMENT B

TABLE VI .
RATE OF WATER INCREMENT SPEED IN ENVIRONMENT A AND B