You are on page 1of 5

Design of disaster management based on Artificial Neural

Network and Logistic Regression


Balamurugan MS Manojkumar R
School of Electronics Engineering School of Electronics Engineering
Vellore Institute of Technology Vellore Institute of Technology
Chennai Chennai
+91-8220638855 +91-7358784992
Balamurugan.ms@vit.ac.in Manojkumar.r@vit.ac.in

ABSTRACT which are spread miles apart. Since it uses Sub 1 GHz spectrum,
Low Power Wireless Area Network (LPWAN) has been used as long-range communication capabilities and low power
one on the prominent Internet of Things (IoT) based protocol for consumption, this fits the requirement to build sensor nodes.
various IoT services. It has been used in monitoring and In this scenario, LoRa WAN will provide the best way to
transmitting the data to a remote server without any need of communicate to other nodes and it will cover a good range due to
backhaul internet which makes it more preferred form on network its operation in sub GHz. Once the data is recorded the intention
in IoT technologies. Long Range Wireless Area Network (LoRa is to predict the outcome and in the present scenario Machine
or LoRaWAN) is one such protocol that can be used to establish a learning algorithm and Artificial Neural Network (ANN),
system implementation using an IoT based data acquisition Algorithms gives very wide scope and facilities to predict the
system. LoRaWAN can be used even in remote area to monitor outcome. ANN is used for better understanding of complex and
data and send it to a remote server without the need of backhaul non-linear relationships between input and output data. It has
internet. Due to its inherent capability of sub 1 GHz spectrum already been established that ANN provides better rainfall
usage and not blocking the air traffic spectrum of regular 2.4 GHz prediction.
it can be thought of replacing the traditional networks which
depends of WiFi or Zigbee based systems. Also, since the new In the study by authors Sven Norman Willner, Christian
paradigm shift in Artificial Intelligence which has strides in Otto & Anders Levermann[1] has reported that total losses are
deploying ANN in various monitoring and prediction systems, estimated be around 200 Billion US $ and loss of human lives due
which were mostly depending on traditional approaches. to epidemics. Further Jonkman [2] has stated that flash flood
causes the highest mortality impact. There was not only change in
CCS Concepts demography of the respective areas but also loss of human lives in
• Computer systems organization➝Embedded hardware. addition material loss. BBC [20] has reported that India
Meteorological Department has predicted the Fani cyclone very
Keywords well so that losses were minimized. Such was the improvement in
Internet of Things (IoT), Smart cities, LoRaWAN, Artificial technologies that has had saved lives of people. So, if the same
Neural Network, Logistic Regression, Binary Classification. can be handled for floods as well, there can be much better life.
The cause of flood is generally due to events that are hydrological
1. INTRODUCTION or meteorological in nature. Looking into the factors of water
Recent epidemics events in India have given significant resources like dam, river, stream these are governed by a simple
information to us that if it can be predicted well in advance there principle of Discharge of water = Area of (Dam, River, Stream) x
can be a lot of action up front. There have been several works Velocity. Unplanned discharge of water from any of these sources
related to the weather prediction but if the developments of a will be one of the causes of flood other than the factors like
Machine learning algorithm can be applied to and used the meteorological in nature. Since the Area factor is something is
Internet of Things based technologies can be used to our benefit nature made and sometimes altered by human, this attribute can be
we can certainly predict about epidemics. Since the advent of represented as static during calculation. But the Velocity certainly
Long Range (LoRa) protocol and its implementation using LoRa is one factor that must be predicted. Velocity is dynamic in nature
based Wireless Area Network (LoRaWAN), it has been certainly and if we can apply prediction algorithm for this factor then
one of the dependent features in collecting data from distant nodes certainly, we can build an effective disaster management system
due to floods. If there can be a system to predict hydrological
Permission to make digital or hard copies of all or part of this work for
personal or classroom use is granted without fee provided that copies are effects (rain), then certainly with today‟s technological
not made or distributed for profit or commercial advantage and that advancement there can be a state of art disaster management
copies bear this notice and the full citation on the first page. Copyrights system.
for components of this work owned by others than ACM must be
honored. Abstracting with credit is permitted. To copy otherwise, or 2. LITERATURE SURVEY
republish, to post on servers or to redistribute to lists, requires prior There has been various research works which has been
specific permission and/or a fee. Request permissions from implemented based on Wireless Sensor Networks [WSN],
Permissions@acm.org. Theoretical based designs, Mechanical systems and recent
ICCCM 2019, July 27–29, 2019, Bangkok, Thailand
© 2019 Association for Computing Machinery.
Artificial Intelligence based approaches in designing a flood alert
ACM ISBN 978-1-4503-7195-7/19/07…$15.00 system to manage disasters. In one such work authors [27] have
created a setup using WSN to record the levels of water and read
https://doi.org/10.1145/3348445.3348486

205
the data using sensor network and apply linear regression model network to connect the remote nodes used to monitor depth level
to predict the outcome(flood). However, for the required outcome water in water reservoir.
there is a need for predicting the outcome with respect to non-
linear inputs. A 6LowPAN[28] based implementation using 4. INTRODUCTION TO LORAWAN
XM1000 motes setup has been created and implemented to LoRa achieves long range communication dues to its
successfully measure the real time flood monitoring system, implementation of chirp spread spectrum modulation, which is
which has significant results of 95.3% water level monitoring, but widely used in military-based applications [21]. A single gateway
this system and setup is costlier implementation and it depends of using LoRa can cover practically 2km distance, but the coverage
internet for further information routing. SENDI [29] a system for can be further increased, but depends on factors like obstruction.
detection of disaster has been designed to predict the flow of LoRaWAN‟s link budget is practically higher than any
water using ns3 and real time setups created in Brazil, which has communication technology that is standardized [22].
been successfully collecting the data and adds a fault tolerance
Table 1. Comparison of various IoT standards and its benefits
system in case of system damage due to natural disasters. But in
this case accuracy of the system is a concern in addition to system Standards Data Benefits
implementation complexities. An IoT framework [30] has been Rate
designed and Raspberrypi based implementation has been setup to WiFi, Both Legacy and existing
record the water level and based on which an Artificial Neural LAN Bluetooth, high and infrastructure
Network model has been created to predict the outcome. This Zigbee low
design seems to more feasible since of latest advancement in AI Sigfox, LoRa, Low New technologies
and recent Machine Learning implementations to predict an LPWAN NB-IoT and very low power
accurate outcome not only based available results but also a consumption
trained model can be made run correlated to the inputs received Cellular 4G, LTE High Existing coverage
from parallel systems. Once such model is proposed here to Network and high data rate
manage disaster and make use of the LoRaWAN which provides Provisioning LAN and cellular network-based devices for long
the sub 1 GHz transmission and doesn‟t need a backhaul internet distance transmission will affect the battery performance and, in
for an efficient transmission. this case, cellular network is the most preferred for long distance,
but however they are used high data rate applications. The above
Machine learning has been on the most successful model is
table [23] can clarify which applications can use LoRaWAN. If
predicting an outcome based on template matching [10]. By
the need is to send a streaming data, then LoRaWAN doesn‟t fit
applying ANN and Logistic regression the authors have
into that application. The LoRa physical layer which used FSK
successfully classified deep and shallow earthquakes. An effort to
modulation enables long distance transmission possible.
successfully map debris flows [11] using data mining-based ANN
LoRaWAN uses adaptive data rate so that battery performance is
has been evaluated to and to correlate the data has been done. To
not compromised. Since IoT is intended for multiple end
find a pattern by modelling the complex relationships between
applications LoRaWAN uses three different device classes [24] to
input and output, ANN plays a significant role in identifying the
adapt to the application requirement. Class A devices are basically
desired pattern. Logistic regression predicts probabilities based on
Bi-Directional devices and mostly preferred by devices operated
continuous signals into binary output [16]. Sometimes this can be
by battery. Class B devices are devices which are energy efficient
also referred to binary classification as based on the input Signal
with its latency controlled by downlink. Class C devices are the
Xn we predict the occurrence of an event P(Y=1|X) and this can be
one which keeps listening continuously and closed only when it is
trained and evaluated for multiple input factors to arrive and
transmitting. From the Friis transmission Equation
predict the outcome. This study is done by modelling and training
the system using Artificial Neural Networks [18].
( )

3. IMPACT OF IoT it can be very well inferred that more power is lost in higher
Internet of Things (IoT) has taken the world by storm by frequencies. So, for transmitting LoRaWAN is preferred over
incorporating all the technological layers into its technique right other IoT communication protocol.
from hardware to incorporating powerful software algorithms in
very low computing devices [19]. The convergence of many a
technology like wireless communication, MEMS, rise of Big data
has been the core of IoT development [30]. In the era
technological advancements, the OSI architecture can be tweaked
to incorporate the layers of Internet of Things based architecture.
Internet of Things can be defined as devices connected to Internet,
which can communicate with other devices or to the server which
can run with Artificial Intelligence. This means that individual
devices connected to internet will have some form of intelligence
either through the gateway or directly from the server [20]. With
the recent developments in IoT and various protocol which
support the devices to be connected to internet either through Figure 1. LoRaWAN protocol architecture.
legacy protocols like WiFi, Bluetooth or Zigbee or with recent
advancement in protocols like LoRa, Sigfox etc., So, the main 5. THE PROPOSED SYSTEM DESIGN
requirement for this flood monitoring system is that the node is It is proposed to deploy LoRaWAN based solution to connect the
just has to transmit the data to the server. Considering this node to Internet. The fig.2 explains the architecture to connect the
scenario and application it has decided to use LoRaWAN based node using LoRaWAN. LoRaWAN devices are manufactured by
the company Semtech. A prototype is developed as shown in the

206
Fig.2. It is assumed that water in the bottle represents a water processed for further impact in coalition with data from weather
reservoir. A water flow sensor is designed and placed at various reports, which are available public domain of Indian Government.
depth levels to identify the height of the water level in the In this case the data for weather is retrieved from through API
reservoir. When the water reaches the respective level, it is service from Ministry of India through data.gov.in.
recorded from the sensor internally in a graphically designed
system deploying LabVIEW to read the depth of water data at the 6. ARTIFICIAL NEURAL NETWORK
base station. This setup is interfaced with the nucleo ST MODELLING AND LOGISTIC
Microelectronics processor running on an ARM Cortex M4
processor. The LoRaWAN from semtech is connected to the STM
REGRESSION
system and the data received from the setup is transferred using The logistic function which can also be referred as sigmoid
LoRaWAN setup to a server which is further connected to the function that takes any real number as an input and maps it to the
cloud and Artificial Neural Network. binary value 0 to 1, using 1/(1+e^(-value)). A simple logistic
function can be fitted using the function represented in the graph
shown in fig. 4

Figure 2. Working prototype node connecting the sensors and


LoRaWAN.
The protocol format of LoRaWAN for uplink traffic is as shown
Figure 4. Logistic function representation using exponential
in the Fig 3. LoRaWAN data is encrypted using AES encryption
function.
[38] and there are keys provided using AES in Network layer and
Application layer. The packet is encoded in base 64 format and Binary classification gives more qualitative prediction that
then encrypted using AES-128 bit encryption [25] as gateway multiple linear regression. Also, the streaming data is processed
only accepts encrypted data. The encrypted data is transmitted through stream analytics for further decision making. For decision
using LoRa protocol. The data is recorded as datasets in json and making a simple Binary logistics classification based neural
the data is transferred using REST API‟s which transports the data network is applied since the statistically modelled input data
sets over HTTPS. All the payloads are encrypted, and data must belonging to different data sets are being applied. Unlike Linear
be decrypted using the respective keys in server. All the payloads regression where the output is modelled to numerical value the
are designed to use standard Base64 representation. logistic function described above models the output between 0 to
1(binary values). However logistic regression can be represented
as , where y is the predicted output and any real value can
be fitted into this logistic function to be transformed into a binary
output [12]. When using a simple linear regression model for a
binary response variable
where Yi is the binary output. To predict the output P(Y=1|X i=x),
the error function becomes discrete and error variance is not
constant. In these scenarios it is preferred to use the Binary
classification based on logistic regression as indicated.

Where denotes the probability of that P(Yi=1|Xi=x). But


however here due to abrupt changes in slopes, this function is
further transformed into ( ) . The S curve as
Figure 3. LoRa protocol and its data representation with indicated in the fig.5 can be modelled for prediction of Y as
respective sensor. P(Y=1|X=x) = . So, using this logistic regression any real
The data is decrypted at the LoRaWAN server and the data from value between -∞ to +∞ can be fit into f(z) having either 0 or 1.
packets are decoded for further understanding. From the payload Since the intention is to understand whether there will be an event
the Base64 encoded data is decoded to retrieve the flood sensor of occurrence of rain or not of all the logistic regression Binary
data. As shown in Fig 2, the flood reading model is split into 4 logistic regression is preferred since the output is either yes or no.
water recording levels. As implemented in the setup by Author From the fig 6 and fig. 7 which gives the information on density
Nirupama [26] a replica of the same is created and water levels plots of observed data, data is further modelled and trained for
are monitored from the sensor. The decoded data which is a final prediction. Based on the above classifier tree the binary
stream data from LoRaWAN based node is analysed and classifier algorithm is implemented to predict the outcome of

207
weather and its results are inferred in a LabVIEW (fig. 8) 7. RESULTS AND DISCUSSION
environment for a pictorial representation of the information. This work involves setting up a LoRaWAN based node at Vellore
Institute of Technology, Chennai campus to monitor the weather
data like Temperature, Humidity, Pressure and Windspeed.
Further data‟s are observed through the comparison from weather
station. In this implementation LoRaWAN based communication
was preferred for the fact that the requirement was to receive the
data from a remote station operating in battery and backhaul
internet at the node is not the need. Internet facilities are required
only at server for further computational and AI studies. So
LoRaWAN is the best preferred in these kinds of scenarios. Also,
theoretically these nodes can run 2 years on a 3.3 V battery, so
they are energy efficient. In addition, the LoRaWAN has strong
encryption algorithms AES end to end incorporated in it. The data
frames are decrypted further on the server side to identify the
relative parameters. Once the respective parameters are recorded
further with the datasets observed from IMD helps us in applying
Figure 5. ANN Architecture. the Artificial Neural Network algorithms to study the data for
further analysing. In this case Logistic regression was preferred as
the need is to study whether it will rain tomorrow or not based on
the various input parameters. The following results has predicted a
value of P(Y=1) =0.49. This forewarning yielded good results as
there no epidemic was inferred during the said period of study as
plotted. If P(Y=1) <0.5, then the probability of such a catastrophic
event can be considered minimal.

8. CONCLUSION
In this work we have modelled a disaster management system
using LoRaWAN based nodes to communicate the sensor data to
the server, where the data is validated for further analytics to
predict an instance. The data is collected for over a period of 3
months from February to April and the data gathered is streamed
through a gateway to a secured cloud server. From the cloud
Figure 6. Minimum density plot for Rain prediction. server the data can be accessed through respective API‟s with
secured keys. Further from the collected data, in this case
prediction is done by employing an Artificial Neural Network
model based on Binary Logistics regression.

9. REFERENCES
[1] C. Anton-Haro M. Dohler, “Machine-to-Machine (M2M)
Communications: Architecture Performance and
Applications”, Woodhead Publishing Lt, Jan. 2015.
[2] C. Pielli, "Platforms and Protocols for the Internet of Things”,
Endorsed Transactions on Internet of Things, vol. 15 no. 1
Oct. 2015.
[3] J. Gubbi "Internet of Things (loT): A Vision Architectural
Elements and Future Directions, Future Generation
Computer Systems, vol. 29 no. 7 pp. 1645-60 Sept. 2013.
Figure 7. Maximum density plot of rain prediction. [4] D. Miorandi "Internet of Things”, Ad Hoc Networks, vol. 10
no. 7 pp. 1497-516 Sept. 2012.
[5] A. Zanella "Internet of Things for Smart Cities”, IEEE
Internet of Things Journal, vol. 1 no. 1 pp. 22-32 Feb. 2014.
[6] A. Biral, "The Challenges of M2M Massive Access in
Wireless Cellular Networks", Digital Communications and
Networks, vol. 1 no. 1 pp. 1-19 Feb. 2015.
[7] S.-Y. Lien K.-C. Chen Y. Lin, "Toward Ubiquitous Massive
Accesses in 3GPP Machine-to-Machine Communications",
IEEE Commun. Magazine, vol. 49 no. 4 pp. 66-74 Apr.
2011.
Figure 8. Final output in LabVIEW GUI display.

208
[8] "New Study Item on Cellular System Support for Ultra Low [20] Kharbouch, Abdelhak and El Khoukhi, H and Nait Malek, Y
Complexity and Low Throughput Internet of Things", 3GPP and Bakhouya, Mohamed and De Florio, V and El Ouadghiri,
TSG GERAN#62 tech. rep. GP-140421, May 2014. D and Latré, Steven and Blondia, C, “Towards an IoT and
[9] C. Goursaud J.M. Gorce "Dedicated networks for IoT: Big Data Analytics Platform for the Definition of Diabetes
PHY/MAC state of the art and challenges", EAI endorsed Telecare Services”, July 2018, pp 1-6
transactions on Internet of Things, 2015. [21] Fayçal Ait Aoudia, Matthieu Gautier, Michele Magno,
[10] S. Mostafa Mousavi, Stephen P. Horton,1 Charles A. Mickaël Le Gentil, Olivier Berder, Luca Benini, “Long-short
Langston1 and Borhan Samei, “Seismic features and range communication network leveraging LoRa™ and wake-
automatic discrimination of deep and shallow induced-micro up receiver”, Microprocessors and Microsystems, Volume 56,
earthquakes using neural network and logistic regression, 2018, Pages 184-192, ISSN 0141-9331
Geophysical journal International, July 2013, 29-46 [22] M. O. Farooq and D. Pesch, "Analyzing LoRa: A use case
[11] Racha Elkadiri, Mohamed Sultan, Ahmed M. Youssef, perspective," 2018 IEEE 4th World Forum on Internet of
Tamer Elbayoumi, Ronald Chase, Ali B. Bulkhi, and Things (WF-IoT), Singapore, 2018, pp. 355-360
Mohamed M. Al-Katheeri, “A Remote Sensing-Based [23] S. C. Gaddam and M. K. Rai, "A Comparative Study on
Approach for Debris-Flow Susceptibility Assessment Using Various LPWAN and Cellular Communication Technologies
Artificial Neural Networks and Logistic Regression for IoT Based Smart Applications," 2018 International
Modeling”, IEEE JOURNAL OF SELECTED TOPICS IN Conference on Emerging Trends and Innovations in
APPLIED EARTH OBSERVATIONS AND REMOTE Engineering and Technological Research (ICETIETR),
SENSING Ernakulam, 2018, pp. 1-8
[12] Ranjit Kumar Paul, “Logistic Regression”, Indian [24] Ferran Adelantado, Xavier Vilajosana, Pere Tuset-Peiro,
Agricultural Statistical Research Institute, New Delhi, pp 1- Borja Martinez, Joan Melià-Seguí, Thomas Watteyne,
11 “Understanding the Limits of LoRaWAN”, IEEE
[13] Hsu, Kuolin & Vijai Gupta, Hoshin & Sorooshian, Soroosh. Communications Magazine, January 2017, pp1-7
(1995). Artificial Neural Network Modeling of the Rainfall- [25] A. Gladisch, S. Rietschel, T. Mundt, J. Bauer, J. Goltz and S.
Runoff Process. Water Resources Research - WATER Wiedenmann, "Securely Connecting IoT Devices with
RESOUR RES. 31. 2517-2530. LoRaWAN," 2018 Second World Conference on Smart
[14] Pitta, Sundara & V. Praveen, T & Prasad, Mynepally, Trends in Systems, Security and Sustainability (WorldS4),
“Artificial Neural Network Model for Rainfall-Runoff -A London, 2018, pp. 220-229
Case Study”, International Journal of Hybrid Information [26] Nirupam, Amit Krishna Dwivedi, “Innovative design of Dam
Technology. Volume 9. 263-272. Water Level Sensor”, Sensors and Transducers, Volume 189,
[15] H. Halff, Albert & M. Halff, Henry & Azmoodeh, Masoud, Issue 6, June 2015, pp 150-156
“ Predicting runoff from rainfall using neural networks”, [27] V. Seal, A. Raha, S. Maity, S. Mitra, A. Mukherjee and M.
Proceedings of the Symposium on Engineering Hydrology, Kanti Naskar, “A Simple Flood Forecasting Scheme Using
1993, pp 760-765. Wireless Sensor Networks”, International Journal of Ad hoc,
[16] Mohammad Ali Mansournia, Angelika Geroldinger, Sander Sensor & Ubiquitous Computing (IJASUC) vol. 3, no. 1,
Greenland, Georg Heinze, Separation in Logistic Regression: February 2012.
Causes, Consequences, and Control, American Journal of [28] B. Kontagora Nuhu, T. Arulogun, I. Adeyanju and Abdullahi
Epidemiology, Volume 187, Issue 4, April 2018, Pages 864– I.M., “Wireless Sensor Network for Real-time Flood
870 Monitoring Based on 6loWPAN Communication Standard”,
[17] Adeogun, Ramoni Ojekunle et al. “Indoor Occupancy APTIKOM Journal on Computer Science and Information
Detection and Estimation Using Machine Learning and Technologies vol. 1, no.1, 2016.
Measurements from an IoT LoRa-Based Monitoring System.” [29] Furquim, Gustavo and Filho, Geraldo P. R. and Jalali,
2019 Global Iot Summit (giots) (2019) Roozbeh and Pessin, Gustavo and Pazzi, Richard W. and
[18] V. M. Suresh, R. Sidhu, P. Karkare, A. Patil, Z. Lei and A. Ueyama, Jó, “How to Improve Fault Tolerance in Disaster
Basu, "Powering the IoT through embedded machine Predictions: A Case Study about Flash Floods Using IoT,
learning and LoRa," 2018 IEEE 4th World Forum on Internet ML and Real Data”, Sensors, Volume 18, 2018, ISSN 1424-
of Things (WF-IoT), Singapore, 2018, pp. 349-354. 8220.

[19] Olson, N. (2016) „The Internet of things‟, New Media & [30] Swapnil, Virendre Shete, “Smart flood disaster prediction
Society, 18(4), pp. 680–68 system using IoT and Neural Networks”, International
Conference on Smart Technology for Smart Nation, 2017

209

You might also like