Priority Based Congestion Detection and Avoidance in Wireless Sensor Networks

The primary objective of event driven wireless sensor networks is to route the detected or monitored data at the earliest to the base station depending on their degree of priority since the data generated in a sensor network has different importance. In order to avoid indiscriminate dropping of data during congestion we propose a novel congestion protocol named priority based congestion detection and avoidance in wireless sensor networks. It aims to provide differentiated data delivery during congestion which comprises of packet priority assignment based on data value, dual queue scheduler for scheduling the next packet to forward based on priority and finally a dynamic dual path congestion aware routing protocol is developed. Our simulation results and analysis shows that this new protocol provides better performance than existing protocols in terms of throughput, packet delivery ratio and packet loss.


INTRODUCTION
Wireless Sensor Network (WSN) is composed of a large number of cooperative sensor nodes, which are densely deployed either inside the phenomenon or very close to it, can communicate in broadcast fashion. The number of sensor nodes deployed in studying a phenomenon may be in the order of hundreds or thousands. Depending on the application, the number may reach an extreme value of millions. A sensor node is made up of four basic components namely sensing unit, processing unit, transceiver unit and power unit. Sensor networks may consist of different types of sensors namely thermal, visual, infrared, acoustic. They are able to monitor a wide variety of ambient conditions such as temperature, vehicular movement, lightning condition, noise levels Akyildiz et al. (2002) have suggested that wireless sensors can be used where wired line systems cannot be deployed. The rapid deployment, selforganization and fault-tolerance characteristics of WSNs make them versatile for military, medical, environmental, entertainment, transportation, crisis management and smart spaces.
Wireless sensor networks are intended to monitor events and phenomena in a specified environment such as physical world, a biological system, or an information technology framework using autonomous collection of sensor nodes with limited energy, storage and processing capabilities. While trying to send the monitored information to the base station or administrator to react to events and phenomena in a specific environment congestion occurs. Generally sensors are deployed in large quantities with high density. So congestion is a likely event. Controlling congestion is difficult due to dynamically time varying wireless channel condition and contention caused due to interference by concurrence transmission and also traffic pattern in WSN is entirely different from traditional networks. In traditional networks destinations are random hence avoiding congestion is easy but WSN deliver myriad types of traffic ,its density increases when sudden event occurs and some nodes may worn out their battery power removal of such nodes in the network make uncongested part of the network become easily congested. This will degrade the network quality, increase the loss rate and unfairness toward nodes whose data has to traverse a Science Publications JCS large number of hops. Thus it is necessary to develop a new congestion detection and mitigating algorithm for wireless sensor network. Ee and Bajcsy (2004) and Flora et al. (2011) have classified the congestion in WSN into two types namely transient congestion, caused by link variation and persistent congestion, caused by source data sending rate through explicit ACK which lowers the channel utilization but reducing the sending rate is not applicable for certain emergency application and lost ACK which keeps trying again to reach the sender to transmit the packet again that are being successfully received. The two general approaches to control congestion are end-toend and hop-by-hop. In end-to-end approach, it is the source node's responsibility to detect congestion either receiver assisted based loss detection or network assisted based explicit congestion notification to adjust its rate. In hop-by-hop intermediate nodes detect congestion and notify the originating link node to adjust its rate. In this study, we propose Priority based congestion detection and avoidance protocol for wireless sensor network to alleviate congestion using data priority assignment for prioritizing packet, dual queue scheduler to provide differentiated services to packets which are sensed in sensor field as High Priority (HP) packet or Low Priority (LP) packet and congestion aware routing algorithm to route packet to base station using buffer occupancy of all the intermediate forwarder in the path.
The rest of this study is organized as follows. In the next section, we have introduced the previous research about existing congestion control protocols. Section III elaborately describes our algorithm. Section IV describes the detail of implementation. Section V presents the performance is evaluated through simulation experiments. Finally, the study is concluded in section VI.

Previous Research
In the literature, many works have been conducted by Wang et al. (2006) congestion detection and congestion mitigation in WSNs. Wan et al. (2003) propose CODA, a Congestion Detection and Avoidance system for wireless sensor networks detects congestion by monitoring both buffer occupancy and channel utilization. The congested node will notify its upstream neighbor to reduce its rate. Then the upstream node reduces their output rate using Additive Increase and Multiplicative Decrease (AIMD). Further propagation of the backpressure message in the upstream direction is based on its own local network condition. This technique is called open loop hop-by-hop backpressure for transient congestion control. The closed loop end-to-end multisource regulation is used for persistent congestion control but the response time increases under heavy congestion because acknowledgement issued from sink will probably be lost. CODA does not provide differentiated services to multiple class of traffic. Tao and Yu (2010) have proposed a energy efficient congestion control scheme for sensor networks, called Enhanced Congestion Detection and Avoidance (ECODA) which uses dual buffer thresholds and weighted buffer difference for congestion detection, flexible queue scheduler to select next packet to send based on channel loading and packets priority. Similar to CODA it controls transient congestion. But persistent congestion can be controlled using bottleneck-node based source sending rate control scheme where congested nodes can be identified and source sending rate can be dynamically adjusted. Therefore it leads to higher energy efficiency and better Qos in terms of throughput, fairness and delay. Wang et al. (2007) investigate a packet based computation to optimize congestion control for a WSNs. It is an upstream congestion control protocol addresses both node-level and link-level congestion. It uses hopby-hop congestion control approach to measure congestion degree as the ratio of packet inter-arrival time with packet service time to detect congestion. Then congestion information is piggybacked in the header of data packets to avoid transmission of additional control messages in implicit congestion notification. In general, sensor nodes are installed with different kind of sensors in an environment that have different priority. Priority index reflects the importance of each sensor node. Finally priority based rate adjustment is designed to guarantee that the nodes with higher priority index gets more bandwidth, the nodes with same priority index gets equal bandwidth. PCCP provides efficient congestion control and flexible weighted fairness for both single path and multipath routing.
Event-to-Sink reliable transport protocol ESRT is presented by Sankarasubramaniam et al. (2003). It is a novel transport solution that tries to achieve reliable event detection and congestion control with minimum energy for WSN. It uses a centralized congestion control mechanism where the base station periodically counts the number received packets based on rate allocation for source is computed and broadcasted to the sources. Then source sets the congestion bit in its outgoing packets when its buffer overflows. However ESRT uses high energy signals to broadcast network state to sensor nodes at regular intervals, which consumes a lot of energy. This method is suitable only Science Publications JCS for homogeneous application because all source nodes in the network have same reporting rate. Lee and Chung (2010) investigate an Adaptive Duty Cycle based Congestion control (ADCC). It is a energy efficient and lightweight weight congestion control scheme, implemented over a duty cycle based MAC protocol for congestion avoidance in wireless sensor networks. It use both traffic control approach by reducing the packet transmission rate of sending node and resource control approach by increasing packet reception rate of the receiving node. This can be done based on congestion degree, if the congestion degree is below a certain threshold, adjusts its own duty cycle to reduce congestion. On the other hand if the congestion degree is above threshold, notifies child nodes to adjust the transmission rates. Hull et al. (2004) uses hop-by-hop flow control, rate limiting and prioritized MAC for distributed congestion control in WSN to mitigate congestion. The node that detects congestion sets a congestion bit in the header of each outgoing packet, then neighboring nodes stop forwarding packets to the congested node until the congestion is controlled. Kumar et al. (2008) address differentiated data delivery in the presence of congestion in wireless sensor networks to mitigate the performance degradation in congested sensor networks the differentiated routing protocol based on the congested areas of a network and data priority discovers congestion zone that exists between high priority sources and sink. Then dedicates this portion of the network to forward priority packets which is fixed.

Protocol Overview
The proposed system aims at developing an efficient congestion detection and avoidance protocol for wireless sensor network to mitigate the performance degradation in congested sensor networks. The overall architecture of the system is as shown in Fig. 1 source node detects the event then assign priority to each packet based on the data value so that during disaster congestion should not cause the valuable packets to be dropped. In order to avoid indiscriminate dropping of data packets and to detect congestion dual queues with dual threshold are used. Finally dual path congestion aware routing protocol for routing the packets to the sink node with the cooperation of intermediate forwarders which make use of buffer occupancies of each intermediate node in the routing path. Our protocol ensures lower packet drop and higher packet delivery ratio with tolerable levels of delay for HP packets than LP ones which in turn increase the throughput.
The following provides definition related to data priority assignment.

Definition 1: Static Priority (SP)
The SP of a packet is used to represent the relative priority of packets generated in any node based only on its data values which are presented in the payload. SP packet is independent of the location at which the sensor nodes are deployed and mainly dependent on the specific applications. Generally sink wants to receive HP packets first from all sensor nodes than LP packets. Therefore assigns high static priority for packets which contains higher data value and vice-versa. Here priority is not given to any particular sensor nodes, all the sensor nodes in the sensing environment are treated equally while deploying. The node gets high priority only if it sensed or generated higher data value packets. Our proposed system assigns priority not for the node only for the packet which contains high data value.

Definition 2: Dynamic Priority (DP)
The DP of a packet is used to represent relative priority of packets routed through intermediate forwarder to reach the sink. Packets dynamic priority changes with number of hops. Packets which contain more hops to reach sink have higher dynamic priority than packets with less hops.

Definition 3: Global Priority (GP)
The GP of a packet refers to the relative importance of both static and dynamic priority at each node which is given in model 1.

Data Priority Assignment
Differentiated data delivery is main component in wireless sensor network. Typical example is that the packet received from the node at the epicenter of the earthquake hit zone should get the higher priority where as the packet received from rest of the nodes should get lower priority. Generally the phenomenan sensed in the sensor field is not stick on to any particular location mostly it will be spreading. So assigning priority to the node is not an efficient method. To overcome the above mentioned drawback we have designed a new priority assignment scheme. Our priority assignment scheme going to assign two kinds of priority to every packets in the network namely static priority and dynamic priority. Static priority is defined as the priority which is assigned to the sensor node based on its data value. This can be done by storing the actual threshold value, the sensor node is going to sense for the specific application while deploying. So that the observed value can be compared with the actual value for assigning priority in data priority assignment scheme. The packets which contain data value above the threshold are marked as HP packets and all the other packets are marked as LP packets. The special feature in our approach is that packets which are originated in the same node may have varying static priority if the sensing phenomenan density changes or it is spread to nearby location immediately. For this reason static priority is not assigned based on the node.
Dynamic priority is based on number of hops between the data sources and the sink. Normally nodes in sensor network can act as both source and forwarder, based on this there are two types of data namely locally generated data and transit data or route through data. The data generated from any source node is called locally generated data. The generated data which is received from any node for forwarding becomes a transit data. In multi-hop environment transit data gets higher priority, also its priority changes when it travels more hops dynamically dropping of transit data with high dynamic priority leads to more energy wastage because of small TTL. So it is necessary to route packets with higher static and dynamic priority immediately to the base station.

Dual Queue Scheduler
After assigning priority, the packets have to be queued properly in order to reach the sink immediate with the cooperation of intermediate forwarder. The queue model in each node places an important role for the quick delivery of the packets. The Fig. 2 is the queue model we are using in each node. Here the queue is logically split into two sub queues. One sub-queue is dedicated to HP packet and other for LP packet where each queue is bounded by two threshold values. When the queue size is less than first threshold all the packets are buffered, when it is between the two thresholds the packets are filtered based on their priority and when it is above all the packets are dropped or rejected. In multi hop WSN, the HP transit packets and generated packets have to be routed first when compared with LP packets. This requires a scheduler called the dual queue scheduler to act as an interface between MAC and network layer of each node. The dual queue scheduler schedules each packet based on its priority, HP packets are first scheduled to route where as the rest are scheduled later. Even with in high priority queue route through traffic gets high priority compared with locally generated traffic. Most of the conventional sensor network tries to resolve unfairness problem by providing equal allocation of bandwidth to the nodes either close or far from the sink.

Fig. 2. Queue model
Generally sensor networks are deployed to sense abnormality prevailing in the surrounding environment. The proposed algorithm gives priority to a packet which has a higher sensed value and then priority is given based on its proximity from where the packet originated.
Algorithm for the intermediate forwarder is as below: Input: Pht ->high priority transit packets Phg ->high priority generated packets Plt ->low priority transit packets Plg ->low priority generated packets Output: ->queue in which packet to be stored Variables: Qh ->queue for high priority packets Ql ->queue for low priority packets Qt ->threshold of Qh&Ql Pin ->incoming packet L ->current length of queue

Dynamic Congestion Aware Routing
Congestion will delay or some time drop the priority packets just few hops prior to reaching the base station. This makes the wireless sensor network useless and also to improve network performance instead of single path routing, a new dynamic dual path congestion aware routing protocol called DD-CAR is developed. This performs on-demand route discovery same as AODV. During route discovery control packets are piggy back with the traffic load of each node thus every nodes in the network learns the traffic load of its one hop neighbor. Thus DD-CAR makes use of traffic load of each intermediate forwarder to route the packet along the shortest path in the network. For example if any Science Publications JCS particular intermediate forwarder filled beyond the threshold value of the traffic load, then neighborhood node of the particular forwarder is selected as anew forwarder to route packet towards the destination provided if it is within the transmission range. This concept is termed as opportunistic data forwarding.
Algorithm for opportunistic data forwarding: x: Node which wants to forward data Nx: Set of neighbors of node x y,z: Only nodes whose traffic load is below minimum threshold in Nx Step1: When x forwards any packet, it piggy backs its traffic load in packet header to Nx. Step2: When y,z € Nx receives a packet from x it caches the traffic load of x. Step3: Since y and z are the only nodes whose traffic load is below minimum threshold forwards a packet to x. When x receives a packet it caches the traffic load of y and z. Step4: Then x compares the traffic load of both y and z.
Step5: When X wants to forward a high priority packet it chooses y from Nx since its traffic load is less than z. Then choose z for forwarding low priority packets.
DD-CAR always maintains two paths one for HP packets and other for LP packets. Since the data packets are classified into two types based on their value. The path which carries HP packets are termed as critical path and the path which carries LP packets are termed as non critical path. Critical path is dedicated to HP packets along the path traffic load should be minimum so that HP packet can compete the LP packets even during congestion. Thus critical path is a shortest and congestion free path for routing HP packet at the earliest to reach the sink. The non critical path is a node and link disjoint path of the critical path for forwarding LP packets. Generally it takes longer and traffic loaded path when compared with critical path. This two paths are always maintained dynamically in DD-CAR protocol with the help of single routing table but most of the conventional congestion aware routing algorithm maintains two region namely critical and non critical region where critical region is used to route HP packet and non critical region for LP and the regions are static but in DD-CAR protocol dynamically change the path depending upon traffic load of intermediate forwarder along with shortest path.

Simulation Results
In this section we evaluate our congestion detection and avoidance algorithm through NS2 Network simulation version 2.32. The simulation parameters used are given in Table 1. The topology used for our simulation is random topologies with different network sizes. The metrics used for evaluating system performance is packet drop, packet delivery ratio and throughput.

Packet Drop
It is the average number of packets dropped in the network. The simulation results reveal that dual queue gives a less packet drop than single queue. Figure 3 shows the comparison between the number of total packets dropped in the network with respect to simulation time and Fig. 4 shows the comparison between HP transit packets dropped in the network with respect to simulation time for both dual queue and single queue.

Packet Delivery Ratio
It is defined as the ratio of the number of packets received successfully and the total number of packets transmitted by the sources. Figure 5 shows the comparison between packet delivery ratio and simulation time for both priority packets and normal packets.

Throughput
It is the total number of packets successfully received by the sink node. Figure shows the number of different types of packets received by the sink over time. As per the priority assignment the total number of priority packets received by the sink is in highest number compared with normal packets throughout the simulation period. Also route through packets are received greater in number than generated packets which is shown is Fig. 6.   Fig. 6. Throughput

CONCLUSION
In this study, we addressed data delivery issues in the presence of congestion in wireless sensor networks. We propose data priority assignment for assigning priority to packets based on data value. Based on the priority, queuing the packets in the dual queue and the scheduler will schedule the next packet to be forwarded. Finally we develop a DD-CAR protocol will prefer to maintain dual path for the quick delivery of the high priority packets. Simulation results show that priority based congestion detection and avoidance protocol achieves lower packet drop mainly for prioritized packets and achieves higher throughput and packet delivery ratio compared to the previous congestion control schemes.