Congestion Control in Wireless Sensor Networks Based on Bioluminescent Firefly Behavior

Congestion in Wireless Sensor Network (WSN) is an issue of concern for several researchers in recent years. The key challenge is to develop an algorithmic rule which may realize the optimased route on the idea of parameters like residual energy, range of retransmissions and the distance between source and destination. The Firefly Algorithmic rule is implemented in this paper that relies on the attractiveness issue of the firefly insect to control congestion in WSN at transport layer. The results additionally show that the projected approach is best as compared to Congestion Detection and Avoidance (CODA) and Particle Swarm Optimization (PSO) on network lifetime and throughput of the network.


Introduction
A Wireless Sensor Network is formed by spatially distributing low powered sensor nodes.Due to the recent developments in low powered tiny sensor technologies, the sensor nodes are used in wide range of applications in environmental monitoring [1].During event detection, congestion can occur while transferring the data from source to sink.Congestion control in WSNs means to improve the performance when demand for the finite transmission capacity exceeds the supply.Wireless sensing nodes have bound constraints due to which the wireless implementation of sensing protocol is not easy.One of the main constraints among them is the energy of each node [2].Energy is an important parameter as it decides the network lifetime of each node [3].Once a sensing element node transmits knowledge onto the base station, the energy loss incurred may be quite intensive depending on the placement of the sensing element nodes relative to the base station.Energy constraints also make design of the WSN protocols very complex.Therefore, minimizing congestion and the energy consumption is the key demand among the sensor network protocols and algorithms.
The sensor networks are self-healing, so a node can be inserted or removed without having to restart the network.It is possible to have a high sampling rate over large spatial scales.This high sampling rate enables changes to be seen clearly.It is possible to have many users viewing the data simultaneously, and also manipulating it [4].High sampling rate also leads to a congestion situation.
Wireless sensing element networks have lots of potential application areas like oceanographic knowledge assortment, home networking, disaster management, pollution watching, offshore exploration, aircraft control and health management systems [4], precision agriculture, traffic control, remote environment monitoring, target tracking, power monitoring, inventory location monitoring, marine environment monitoring, factory and process automation, crime investigation and military applications [5]- [7].Wireless Sensor Network may be a new space of wireless sensing element network in underwater environments that has challenges to be overcome like long propagation delay, severely restricted information measure, and time varied multi-path propagation [8].
The main aim of the paper is to propose an approach to control congestion in wireless sensor networks at transport layer.Section 2 of the paper discusses about the brief literature study; Section 3 formulates the problem.Section 4 proposed methodology to solve the problem is shown.Section 5 explains the simulation environment, after that results and conclusion are discussed in Sections 6 and 7 respectively.

Literature Review
Fister et al. [9] proposed a comprehensive study of the living and evolving discipline of Swarm Intelligence, and their application in algorithmic programs.On the other hand, it encourages new researchers and algorithmic program developers to use this straightforward and nonetheless terribly economical algorithmic program for drawback determination.It typically guarantees that the obtained results can meet the expectations.
Sarma et al. [1] proposed energy economical cluster formation of sensor nodes using jumper firefly.Firefly Algorithms have been proposed to minimize the intra-cluster distance in order to optimize the energy consumption of the network.The performance of the network is then compared with the LEACH protocol.
Xu, Ming et al. [2] proposed energy-efficient algorithms to cut back energy consumption of Wireless Sensor Networks to some extent by neglecting the correlation existed between the native knowledge of nodes.A multi-population Firefly Algorithm is proposed in this work to correlate the knowledge in Wireless Sensor Network.
Schenato et al. [3] proposed a replacement of consensus-based protocol, remarked as Average TimeSynch, for synchronizing the clocks of a wireless device network.This algorithm is a combination of two algorithms whose main task is to average native data.The projected algorithmic program has the advantage of being wholly distributed, asynchronous, strong to packet drop and device node failure, and it's adaptation to time-varying clock drifts and changes the communication topology.
Sai Prakash et al. [10] proposed a firefly inspired tree formation in wireless sensor networks.In this cluster based energy aware technique the responsibility of cluster head is distributed among nodes to distribute the energy drain factor.The proposed approach has shown improvement in the network lifetime and minimizes the partitioning problem.
Kumar, E. Sandeep et al. [8] proposed Wireless sensing element networks encompass little nodes with sensing, computation, and wireless communications capabilities.In this work Firefly Algorithm is used in clustering of the sensor nodes in the network.
Sun, Yi et al. [11] proposed a clustering scheme for the network which employs Firefly Algorithm.The clustering of the network is considered on the basis of parameters considered together which includes energy and distance and a reach-back technique is employed for clustering of the sensor network.

Problem Formulation
The problem of congestion control in WSN is a very wide area of research.From the past few years many researchers use various algorithms to solve the same problem.Among the many reasons of congestion, Buffer overflow, Channel contention and packet collision are considered as the major focus areas.A fitness function is considered based on various parameters like throughput of the network, packet lost rate and residual energy.These parameters are:  Residual Energy of the network: Residual Energy is an important factor in calculating the network lifetime of a node in the network.The energy exhausted by the node in communicating with other nodes or the in idle mode is used.Residual Energy is: Residual Energy Total Energy Energy Used = −  Distance between the nodes: Distance between two nodes communicating with each other at a particular time is calculated.The distance is an important factor as the energy consumed in transmitting a packet directly depends on the distance between the nodes.Distance is calculated using the Euclidean Formula which is given by: ( ) ( )  Normalized Packet Loss Rate: The packet lost while transferring packets from one node to another is also an important factor in detection of congestion.Queue length of the node and the packet collision in the network are two main reasons of packets loss in the network.The packet loss rate must be minimized for improving the performance of the congestion detection and control algorithm. Throughput of the network: Throughput is defined as the ratio of packet size and the delay.It is an important parameter which provides the information about the packet transmissions per unit time taken along a fixed path.

Packet Size Throughput
Receive Time Send Time = − To improve the performance of the network and to reduce the congestion we need to optimize the fitness function.
( ) ( ) ( ) Fitness Function 1 where, i is the iteration which ranges from 1 to N (total number of nodes).τ is the throughput of the network.
L P is the normalized Packet lost rate in the network.
, j i d is the distance between node i and j.E is the residual energy of each node in the network.

Proposed Methodology
Reactive routing technique [12] is used in the proposed work.In reactive routing the route is computed on demand basis.When a node wishes to transmit data then it will generally generate RREQ message which is a route request message and is flooded in the network.It will result in a delay in initiating the communication from source to destination.In reactive routing the route is considered in which the RREQ message reaches earlier through either single hop or multiple hops.
A Firefly Algorithm based approach is proposed to control congestion in WSN at transport layer.Firefly insect produces flashes of short duration through a process called bioluminescence.It is used to attract potential prey or partner or for the issue of warning against predator.Thus intensity of flash becomes an important parameter for the other firefly insects.Firefly Algorithm follows three rules [13]: 1) Fireflies of any gender can attract towards the other firefly; 2) An attractiveness factor is taken into account which depends on the brightness of the flash, as the fireflies' move towards the more attractive fireflies; 3) The brightness of fireflies is calculated through an objective function.

Structure of Firefly Algorithm
In Firefly Algorithm, light intensity and attractiveness are the two important variables.Firefly is attracted toward the other firefly that has brighter flash than itself.The attractiveness is dependent with the light intensity.
The intensity of the flash light which is also defined as attractiveness is inversely proportional with r distance from the light source.This shows that the attractiveness increases as the distance decreases and vice-versa.The flash light intensity is proportional to the attractiveness and is given by β .Cartesian Distance Formula is used to calculate the distance between two fireflies.
( ) The movement of the less attractive firefly i towards the more attractive one j is given by: ( ) In Equation ( 4), if light absorption coefficient approaches zero then the attractiveness is almost constant otherwise if the coefficient approaches infinity, the attractiveness decreases.The second term in the equation is used for randomization.
In the algorithm described above, light intensity is replaced by Residual Energy of a node, and hence attractiveness ( â ) is proportional to energy., i j r is the distance between two nodes i x and j x .Now, at first the nodes in the network are clustered and each node in the cluster shares its information related to residual energy, its distance from other nodes in the cluster and number of retransmissions of data.This information is used to select the cluster head.After each round this information is updated on each node and reclustering and cluster head selection is performed.
The bandwidth of the network is limited and each node trying to send its data to the cluster head which further sends its data to the base station.The congestion in the network is occurred because of the data travelling from source to sink.The congestion is detected by monitoring the window size and the queue size of each node.This information is also shared by each node in the network.In case of congestion if the data travelling from source to sink then the nodes lies in the path, which may be either belong to one cluster or to different clusters, have information of other nodes of its cluster and directs the data through other nodes based on the value of queue size and window size.Efforts are being made detect and reduce the congestion of data from each node.The objective is to maximize the throughput of the network by optimizing the objective function.
In firefly based approach (Figure 1), the residual energy value plays a major role as this value is shared among other nodes in the network.Number of retransmissions of every node and the distance value between any two nodes in the cluster is calculated.Based on these values and the values of residual energy, a new route is found in the network from source to sink.The nodes which have low energy value attracted towards the high energy node and an attractiveness factor is calculated.The congestion on any node is determined by the same method as described earlier.Based on the remaining queue size value an optimum route is computed by putting the above values in the objective function.
We are comparing our proposed approach with the following two approaches.CODA: Congestion Detection and Avoidance (CODA) is an energy efficient congestion control mechanism which comprises three schemes [14]:  Closed-loop multisource regulation;  Open loop hop-by-hop backpressure;  Receiver based congestion detection.
MAC layer plays a vital role in the management of data and performance of a CODA based systems.CSMA plays a role in detection and avoidance of congestion.PSO: Particle Swarm Optimization is a method of finding the mathematical solution of the problem in terms of position and velocity [15].The PSO iteratively calculates the candidate solution by moving particles in the search space.The particles move from the best known position to the other best position calculated using the formula and updates its value for position.Swarm will follow the path calculated by the particles in the search space.

Simulation Environment
For creating the simulation environment, we have taken a 1000 × 1000 in size grid in Network Simulator-ns-2.35and 50 nodes are placed in the area (grid).As the network is wireless, so we have to assign few wireless network parameters to the node.Each node in the network is configured to wireless channel and Omni-directional antenna type.MAC layer is used in the simulation with standard following IEEE 802.11 and the radio model has been adopted.

Results and Discussions
Figure 2 shows that the queue length (number of packets) of each node with respect to the simulation time.The Queue length is inversely proportional to the number of hops and by increasing the number of hops congestion in the network is decreasing.As the number of hops in between source and destination increases, the queue length of each node decreases and packets can travel through another selected nodes.
Figure 3 shows the graph between fitness factor and simulation time for different hop numbers.Fitness factor is the decreasing function.This means that that the optimal route is selected based on the lesser value of fitness function.The fitness function contains various parameters like throughput, packets lost, energy etc. which decreases with the increase in the simulation time.As the number of hops in the network increases the value of the fitness function decreases.

Comparative Analysis
Figure 4 displays the graph between simulation time and throughput of the network.The graph compares Congestion Detection and Avoidance (CODA), Particle Swarm Optimization (PSO) and proposed Firefly Algorithm based approach.In case of Firefly Algorithm the throughput of the network is almost constant and greater than the throughput calculated using the CODA and PSO algorithm.There is a decrease in value for CODA at around 30 seconds of simulation which shows that at the peak of traffic at the middle the performance of the algorithm goes down and packet loss rate in the network increases.Figure 5 displays the graph between the simulation time and the network lifetime of the nodes in the network.It is clear from the graph that the network lifetime of nodes in case of Firefly Algorithm is greater than CODA and PSO.This is due to the fact that Firefly Algorithm consumes low energy as compared to other algorithms with the increase in simulation time.The following graphs are designed by considering the hop count to be 40.

Conclusion and Future Scope
It is observed from the above results that after the application of Firefly Algorithm, the length of the queue decreases, and the fitness function also tries to decrease by increasing the hop count.The Firefly Algorithm results display the improvement in network lifetime and the throughput of the network.The graphs verify implementation and display much better result as compared to traditional CODA algorithm and PSO algorithm.Network lifetime has measured using the residual energy of node.In future, we can apply other bio inspired algorithms and compare the results with Firefly, PSO and CODA algorithms.

w w w and 4 w
are the weights supplied to the algorithm.

I
= Flash light intensity; 0 I = Initial flash light intensity; ã = The light absorption coefficient; r = Dis- tance between firefly i and j.
at r is 0.

Figure 1 .
Figure 1.Flow diagram of the proposed methodology.

Figure 3 .
Figure 3. Graph between simulation time and fitness factor.

Figure 4 .
Figure 4. Throughput of the network.

Figure 5 .
Figure 5. Network lifetime of nodes in network.