Fuzzy Logic-based Data Controlled Wireless Sensor Network Routing Protocol for Flood Early Warning

: Floods account for 15% of all natural disasters related deaths. Therefore, early flood warning systems using wireless network of sensors installed in flood prone areas is necessary to provide early notice of impending flood. This research focuses on the use of an energy efficient routing protocol to prolong the life time of the Network. The importance of this is to minimize energy consumption as necessary for reliable field operations. It adopts the use of mandami Fuzzy logic-based data controlled routing protocol (F-DCRP).Simulation was carried out for the F-DCRP, LEACH and Crisp Data controlled routing protocol (DCRP). The performance of the three protocols were obtained and compared. The result showed that Cluster head (CH) load was better shared uniformly among all the nodes. Percentage of packets dropped showed that the proposed F-DCRP was 10% lower compared to DCRP and 50% lower compared to LEACH resulting in more packets sent per round and greater reliability compared to LEACH and DCRP. The network lifetime was also improved by 40 % when compared to LEACH and DCRP.


I. INTRODUCTION
The rapid breakthrough in smart sensors and telecommunications technology has led to the use of wireless sensor network (WSN) in many areas of human endeavours. One of the areas where WSN have found its use is flood monitoring and alerting system. This is because the traditional manual mode of data collection for flood prediction employed by flood and weather management agencies does not always produce efficient and real-time warning systems in case of flood. However, the WSN is also limited because of the low power resource of the sensor nodes. Power sources are often not available at the site where sensor nodes are installed. Moreover, these locations are usually unprotected, and if renewable energy devices are used to power the sensor nodes, they are prone to vandalism or theft. Therefore, WSN must be designed to have low-power consumption, which along with existing standard batteries, should last at least one hydrologic cycle. WSN communication protocols (in all layers) with minimized energy consumption that can prolong the lifetime of the WSN are required.
The aim of this work is to develop an energy efficient WSN routing protocol that is suitable for flood prone areas monitoring and early warning system. The objectives are to design the energy efficient routing protocol, to carry out simulation of the design system and conduct performance evaluation.
Flooding in Nigeria and especially in the city of Ibadan (case study) is becoming more extreme, more widespread and more frequent (Alli-Balogun et al, 2018). The first flood case in the city took place in 1902 at Oranyan swamp. Ogunpa stream overflowed its bank and rendered many homeless in 1924and 1956(Ojolowo, 2019. Similar occurrence took place in 1960, 1963and 1978(Ajayi & Agboola, 2012Eguaroje et al, 2015). It destroyed properties worth several millions of Naira. Worst in history was in 1980, when about three hundred people were killed along Ogunpa, Oyo, Omitowoju and Molete (Ogunsesan et al, 2012;Ojolowo, 2019).
In order to combat this menace, a number of research have been carried out to monitor and predict flood occurrence in real time. Udo and Isong (2013) built a system using wireless sensor network system and GIS to monitor and detect flood in fifteen flood prone areas of Uyo metropolis in Nigeria. The system sends notification SMS to the inhabitants for necessary actions. Similar work was carried out by Nuhu et al (2016) incorporating 6LOWPAN communication standard. Ajayi & Agboola (2012) introduced the possibility of determining the areas affected by the popular August 2011 flood disaster in Ibadan. Other notable works, carried out by Christian & Soni (2013), focuses on the integration of GIS with wireless sensor network in flood analysis and prediction. Guesmi (2017) developed WSN for real time flash flood early warning in Kingdom of Saudi Arabia. Babiker et al (2017) built a wireless sensor network system to monitor flooding in the Tabuk River in Saudi Arabia. In order to prolong the network lifetime, a new routing protocol was proposed. The protocol adopts a clustering topology, whereby there is a cluster head (CH) for each cluster of sensors. The sensor that transmits repeated data is most favoured to be selected as the next CH. Such sensor is then allotted higher observation time (made idle) to reduce the transmission of data because such data is repetitive and irrelevant. The algorithm used is not based on artificial intelligence which may lead to decrease in computational speed and bandwidth of the network.  Gupta et al (2013) used fuzzy logic inference to select cluster head. Though this improved system energy conservation and network lifetime, it is not adapted to the flood monitoring scenario under consideration.
Some routing protocols in the literature which has been used to increase the life time of wireless sensor network by minimizing the energy consumption exists and can be classified as follows; 1. Hierarchical based, such as LEACH (Goyal & Umang, 2016), TEEN (Manjeshwar and Agrawal, 2001), APTEEN (Agrawal and Manjeshwar, 2002). 2. Location based, such as GPSR, SMECN, GEAR, GAF (Kumar et al, 2017). 3. Data Centric based, such as SPIN (Zia, 2015). The focus of this study will be on hierarchical routing protocol because of its superior energy consumption reduction over the others (Azizi and Hasnaoui, 2019). Low Energy Adaptive Clustering Hierarchy (LEACH) according to Singh et al, (2010) is the most popular among hierarchical based protocol, made up of setup phase and steady state phase for each round. During the setup phase, CHs are selected per round using stochastic method. Sensor nodes then join the CH nearest to them to form a cluster.CH is responsible during the steady phase for receiving sensed data from all its member, aggregate it and transmit to Base station (BS) using the TDMA/CDMA to reduce data collection. To ensure that the load is evenly distributed among all the nodes in the cluster, CH is rotated among nodes and the event of its selection (setup phase) is repeated at each round (Heinzelman et al, 2000).
According to Sharma and Kumar (2012), LEACH is more efficient than MTE routing. However it has its disadvantages among which are; 1. Usage of single hop transmission to either CH or BS. This is a minus in a situation where the BS is far away from the cluster. 2. Problem with dynamic clustering per round for large network. The process dissipates more sensor node energy that is designed to preserve. 3. LEACH select the CH based on stochastic method, it does not consider the energy level of the sensor node. Position responsive routing protocol PRRP (Zaman & Abdullah, 2011) is another protocol that was designed to improve on the performance of LEACH by eliminating the use of broadcasting and advertisement in the setup phase thereby further elongating the network lifetime by reducing energy expended during this phase. But the DCRP (Data-Based Energy Efficient Clustered Routing Protocol), which is an improvement over PRRP, is of profound interest (Babiker et al, 2017). In addition to being position responsive using GPS, it also considers data sent by node and the residual energy to select the cluster head.

II. MATERIALS AND METHODS
Sensor nodes are arranged in clusters to sense river water level, amount of rainfall, humidity and temperature, the data is transmitted to the BS at every round. The sensors report the data through a cluster head in the cluster. The newly proposed reporting method for F-DCRP is illustrated in the Figure 1.
The cluster head is to be chosen for each round of transmitting. At first round, a CH is chosen at random but starting from the second round, a CH is chosen based on the three Criteria's namely sensor with repeating data (level of repetition), distance from the BS (centrality) and energy level of sensor. The three inputs are fed into the fuzzy logic and subject to the rules in the fuzzy inference system to determine the cluster head. The algorithm is shown in Figure. 2. Fuzzy logic is a mathematical system that analyzes analog input values in terms of logical variables that take on continuous values between 0 and 1, in contrast to classical or digital logic, which operates on discrete values of either 1 or 0. It mimics how human will make decision only much faster. Decisions are made based on imprecise inputs, the level of which is determined by the membership functions and subject to fuzzy inference to arrive at the final decision (Kurmi et al, 2015). The model is as shown in the Figure 3.
The simulation was implemented in MATLAB R2019a.The parameters used are shown in the Table 1. For a sensor node in a cluster, energy is used for data transmission and receiving. The energy expended in transmitter to transmit Z-bit message is given by Eq. (1) (Comaeu & Aslam, 2011).
where: Z = Packet size Eelect = The energy consumed per bit by the Transmitter electronics; µ * d n = The propagation energy consumed by the Transmitter Amplifier per bit. µ = Is a constant that depends on the propagation loss d = The distance between Transmitter and Receiver. n = The propagation loss exponent  For distance (d) less than d0, the factor, µ is based on Friis free space equation, the energy expended in the transmitter to transmit z-bit message is given in Eq.

ET1(z,d)= Z * E elec + Z * Ԑ fs * d 2 If d≤d0
. (2) For distance (d) greater than d0, The factor µ is multipath factor (Ԑmp), the energy expended in Transmitter to transmit Z-bit message is given in Eq.
where: Ԑfs = coefficient of energy dissipation in the free space model, when d≤d0 Ԑmp = coefficient of energy dissipation in the multi-path attenuation model, when d>d0 d0 (crossover distance) = (Ԑfs/Ԑmp) 1/2 The energy expended in Receiver to receive a Z-bit message is given by Eq. (4) (Comaeu & Aslam, 2011).

4.) Sensor node centrality computation
To find the sensor node centrality, the BS which is at the center of the network, selects each node and calculates the distance. Since transmission energy is proportional to d 2 , the lower the value of the distance, the lower the amount of energy required by the other nodes to transmit the data through that node as cluster-head (Uma Maheswari and Pushpalatha, 2014).

5.) Sensor node slot-time computation
The sensor node slot-time is the time allotted to a node to sense and transmits data to base station. Normally, each node is expected to sense and transmit in a "observation time" (WMO, 2011), but since the protocol is to minimize consumption of energy, data sent by node is compared with its immediate previous observation time data and if it is repeated, the node that transmit such data will be put to sleep and its slot time will be set to double the observation time (Hady et al, 2013). The observation time is continually doubled for subsequent round of repeated data sent until reaching the specified peak which is ՙՙ 16 × ՚՚ for ther case in this study. However, if a change is detected in the data sent, it will go back to sensing and transmitting data in the normal observation time.

6.) The fuzzy inference system
Finally, the chance of each sensor node to become the CH is determined when the inputs from the sensor nodes, namely energy level, centrality and level of repetition are evaluated by the human's knowledge laws constructed in form of fuzzy rules (Mhemed et al, 2012). A total of 27 fuzzy rules are built and summarized as in Table 2.

III. RESULTS AND DISCUSSION
The application of the above rules and aggregation of the results produce an established relationship between the inputs and the output as shown in Figures 6, 7, 8 and 9.   From Figures 6, 7 and 8 it is observed that chance is directly proportional to energy and data repetition and it is only proportional to centrality when the degree of centrality is too low or when it is too high. We can therefore conclude that sensor node energy and level of idleness have more influence on CH selection than centrality. The implication is that, it is better to stop sensor node from transmitting repetitive data as much as possible which is what the algorithm try to achieve. Comparison was made with the LEACH and the DCRP using the same simulation scenario. In Figure 10, the F-DCRP performs better than the DCRP and LEACH as the number of dead nodes is significantly reduced. At exactly 500 observations round the F-DCRP protocol are leading by about 40%.The lead in extension of the network lifetime increase linearly to almost 80% compared to LEACH and DCRP as the number of observation rounds increases as can be observed in Figure 10. Total remaining residual energy of sensor nodes is another metric used in the performance evaluation of the proposed protocol. As can be observed from Figure.11. the total residual energy of sensor node is lesser for the proposed F-DCRP when compared to LEACH and DCRP. This is an indication that load bear by the Cluster head is much more uniformly distributed among all the nodes in F-DCRP when compared to LEACH and DCRP.
Percentage of packets dropped shows that the proposed F-DCRP is 10% lower compared to DCRP and 50% lower when compared to LEACH resulting in more packets sent per round and greater reliability compared to LEACH and DCRP.

IV. CONCLUSION
This study proposes routing protocol to improve the life span of WSN for flood early warning system. The proposed protocol, Fuzzy logic -based data controlled routing protocol (F-DCRP) is an improvement over the LEACH, DCRP and others in literature. It has less computational complexity because of its use of fuzzy logic. Since all operations for cluster formation are done at the base station, a large amount of energy is saved and speed of cluster formation is increased. ` Figure 11: Total node energy per round.
Packet drop percentage is the third metric used to evaluate the performance of the proposed protocol as shown in Figure.12. Moreover, this method is extremely robust because it uses appropriate input such as data repetition, energy level and centrality for the fuzzy system. The simulation results showed the network lifetime is improved by more than 40 % compare to LEACH and DCRP which is reasonably good. It is also more reliable. Further work can be carried out to design algorithm that will further reduce transmission of redundant data and a network with real time data as input to fuzzy system can be tested in the future with further experiments.