# Introduction ireless sensor network typically has little or no infrastructure. It consists of a number of sensor nodes (few tens to thousands) working together to monitor a region to obtain data about the environment. WSN has gained worldwide attention in recent years. These sensor nodes can sense, measure to gather information from the environment. Based on some local decision process, they can transmit the sensed data to the user. A variety of mechanical, thermal, biological, chemical, optical, and magnetic sensors may be attached to the sensor node to measure properties of the environment. WSN consists of spatially distributed autonomous sensor nodes to cooperatively monitor physical or environmental conditions. The sensor nodes of a WSN sense the physical phenomena and transmit the information to base stations. When an event occurs, the load becomes heavy and the data traffic also increases. This might lead to congestion. There are mainly two causes for congestion in WSN. The first case is node level congestion, which occurs when the packet-arrival rate exceeds the packetservice rate. This is more likely to occur at sensor nodes close to the sink, as they usually carry more combined upstream traffic. The second case is link level congestion, which occurs due to contention, interference, and bit-error rate. Congestion control mechanism has three phases: congestion detection, congestion notification and congestion control with rate adjustment technique. In recent years, lots of work going on in congestion control for wireless sensor network. Most of the work deals with the priority based rate adjustment algorithm for different types of application for heterogeneous traffic. Congestion Control and Fairness for Many-to-one Routing in Sensor Networks [1] proposes a distributed and scalable algorithm that eliminates congestion within a sensor network and that ensures the fair delivery of packets to a central node or base station. Priority Based Congestion Control for Heterogeneous Traffic in Multipath Wireless Sensor Networks [2] proposes a priority based congestion control for heterogeneous traffic in multi path wireless sensor network. The proposed protocol allocates bandwidth proportional to the priority of many applications simultaneously running on the sensor nodes. Congestion Detection and Avoidance (CODA) [4] uses buffer occupancy and the channel load for measuring congestion level. It handles both transient and persistent congestion. For transient congestion, the node sends explicit backpressure messages to its neighbors were as for persistent congestion; it needs explicit ACK from the sink. It uses three mechanisms as follows: 1) Receiver based congestion detection, 2) open loop, hop-by hop backpressure, 3) closed loop multi source regulation. PCCP (Priority Based Congestion Control Protocol) [7] is a node priority based congestion control protocol. It defines priority from the nodes point of view instead of the traffic flows point of view. For implicit congestion detection, we proposed two bit binary flags such as 00, 01, 10 or 11 for congestion notification. Based on congested or heavily loaded network status, we propose different activities such as pass packet with delay factor or pass packets with rate adjustment technique. In rate adjustment technique, here also calculated with a delay factor. The rate adjustment technique also distributes congested packet, equally to all child nodes to avoid packet loss. The structure of this paper is as follows. Section II represents the research methodology of the study. Section III represents details about the technical implementation. Section IV provides result and discussion on the basis of technical implementation of the research. This section also shows a comparison between simple fairness and weighted fairness. Finally, section V summarized a set of conclusion and through an outlook of the future work. # II. # Research Methodology A literature review to find about wireless sensor network and also find about congestion in it. Congestion in wireless sensor network causes overall channel quality to degrade and loss rates rise, leads to buffer drops, packet loss and increased delays. Most of the work in recent years has been done in congestion control to avoid packet loss or to minimize packet loss. In order to find a congestion control technique which avoid packet loss and capable of reducing delay. In these circumstances we discover a system architecture which contains congestion detection unit, congestion notification unit and congestion controlling unit. The analytical data provide different network status from which we can make a decision whether the congestion is occurring or not. Furthermore, we found some analytical data from the multipath multihop network model. From the basis of these analyses data, a plot represents the comparison of simple fairness, weighted fairness and throughput. Finally, careful study of the plots is expected to provide a fairness measure of the effect of different packets. # III. # Technical Implementation a) System Architecture In Figure 1 represents the system architecture of the proposed work. The Congestion Detection Unit (CDU) calculates the packet service ratio [8]. With the help of congestion control Unit each packet, equally distributed to the child node with existing priority allocates the bandwidth to the child nodes according to the source traffic priority and transit traffic priority. The Congestion Notification Unit (CNU) uses an implicit congestion notification by piggybacking the rate information in its packet header. All the child nodes of a parent node overhear the congestion notification information [12]. ? Scheduling rate r i sch : It is defined as the rate at which the scheduler schedules the packets from the queues. The scheduler of node i, forwards the packet from node i-1 to the next node i+1. The scheduler schedules the packets from queues according to the queue priority [10]. The packets from a higher priority queue will be serviced more than the packets from the lower priority queue. The packets in a particular queue are processed based on its sourced traffic and transit traffic [3]. Transit traffic gives more priority than source traffic, since the transit traffic data have already been traversed several paths, and dropping them would cause more waste of network resources. The classifier differentiates the transit traffic from source traffic by examining the source address in the packet header [11]. # Sink Congestion control mechanism containing three phase congestion detection, congestion notification and finally congestion control with rate adjustment technique [5]. Theoretically, we implement our proposed technique that avoids congestion occurrence and minimize packet loss. # i. Congestion Detection For congestion detection we use, congestion notification flag based on different types of data stored in a single queue to pass the packet through the channel to destination. Sensor node may have multiple sensors with different types of characteristics stored in a single queue. Based on queue for different types of data with different characteristics we use, congestion notification flag such as if the queue is lightly loaded than it notify 00 and the packet pass through the channel without any modification, if it is loaded then it notify 01 and the packet also pass through the channel with queue priority. If the queue is heavily loaded, then it notifies 10 and we propose a delay to avoid congestion in our mechanism and if the queue notify 11 means congestion than we control it with our proposed priority based rate adjustment technique. When each node receives the congestion notification information, it adjusts the queue rate accordingly [14]. The following describe the rate adjustment technique: The packet service ratio r (i) is used to measure the congestion level at each node i. The packet service ratio is calculated as follows: r(i)=rs(i)/rsch(i) Here r(i) denoted as packet service ratio used to measure the congestion level for each node where rs(i) denotes packet service rate of node i and rsch(i) denotes packet scheduling rate of node i. The average service time can be calculated as follows by using Exponential weighted moving average formula. ?? s (i)=(1-k)?? s (i)+KT s (i) Where K is a constant value in the range between 0= Qmin& r(i) =Qavr& r(i)=Qmax distribute packet to the child node. Let the traffic source priority SP(i) for parent node i of application j where j as child node and i as sense node. For each node i, total traffic source priority can be calculated as the sum of all application running in it. SP(i)= ? ?SP ?? ?? ? ?? ?? =1 Where SPij denotes the traffic source priority of application j. The symbol n denotes the number of application running in sensor node i under multipath routing. The packets of a flow may pass through multiple paths before they arrive at the sink and only a fraction of a flow passes through a particular node or link. The traffic of a particular flow forwarded in one path is defined as a sub flow [15]. Transit traffic priority at sensor node i is used to represent the relative priority of transit traffic from other nodes routed through node i. Let dlyji for application j in sense node i carries priority that depends on child node that means single node to single node or single node to multi node. If we denote transit priority TP(i) for node i than it would be TP(i)=dly j i ×? ????(??) ?? =1 ?? =0 # GP(i)=SP(i)+TP(i) Where GP(i) stands for global priority for node i , Here (dlyji) calculation depends on node number, here we assume that if single node to single node, the value of dlyji must be 1, otherwise it is calculated by dividing delay with the number of parent node connected with [13]. Where SP(i) denotes the source priority for each node carrying with. The process running continuously to pass packet to the sink varied with transit priority and global priority. The packet service ratio reflects the congestion level at each sensor node. When this ratio is equal to 1, the scheduling rate is equal to the service rate. When this ratio is greater than 1, the scheduling rate is less than the packet service rate. In both these cases, there is no congestion. When the packet service ratio is less than 1, the scheduling rate is more than service rate and it causes the queuing up of packets. It indicates congestion. Let threshold value is 0.75. If the packet service ratio is less than the threshold value, it notifies congestion. Then node i will adjust the scheduling rate. If the packet service ratio is greater than 1, indicates that the packet service rate is greater than the scheduling rate. So each node will increase the scheduling rate for parent j to improve link utilization otherwise the packet service rate is equal to the scheduling rate. r sch (i)=GP(i)/(GP(i-1)+ GP(i)+ GP(i+1)) Tr sch (i)= r sch (i)/ (r sch (i-1)+ r sch (i)+ r sch (i+1)) Scheduling rate can be calculated based on threshold and its directly connected to service ratio to pass packet, and if the service ratio r(i) exceeds the queue maximum value distribute the packet to the child node to avoid packet loss and continue the process to avoid congestion. # IV. # Result and Discussion All the child nodes of the node i overhear the congestion notification information and they control their rate according to it. Rate adjustment is done in a queue. It ensures that the heterogeneous data from different class will reach the base queue at the desired rate. When the queue explodes the congestion notification flag, it adjusts its rate accordingly. Figure 3, shows the multipath multi hop heterogeneous network model considered in the network. In case of multipath routing, each node divides its total traffic into multipath flows and those flows pass through multiple downstream nodes. For simplicity, we assume that each node divides its rate equally among all its parents. We assume that application 1 generates traffic of class 1 and its priority is 1 and for application 2 the priority is 2 and so on. Then the total priority is calculated based on the traffic class of application running on the nodes. The rate allocates to each node is calculated based on the total priority. Table II shows the source traffic priorities of nodes i in heterogeneous environments. As shown in line 5, node 5 has applications 2 and 3 running on it, which generates heterogeneous data with traffic class priority 2 and 3 respectively. The source traffic priority of node 5 is 0+2+3 = 5. The source traffic priority of all the other nodes can be calculated by the sum of source traffic priorities of traffic classes of individual applications running in it. Node 2 routes the traffic from 4, 5 and 6. The delay factor must be 1/3. The transit traffic priority of node 2 is calculated from the global priorities of nodes 4, 5 and 6. Figure 4.compares the normalized throughput obtained from the proposed technique for priority based weighted fairness with the simple fairness case. As shown in Figure 4, in simple fairness when the priorities of all nodes are same, they receive equal throughput. The proposed method provides priority based weighted fairness for all the sensor nodes according to the priority of heterogeneous traffic generated by the applications. TP(i)= dly j ?? × ? GP(j) ?? =1 ?? =0 TP(2) =1/3×29=10 The rate allocation and scheduling are made according to the priority. The node 10 which has higher priority has highest normalized throughput and nodes 15 and 1 got lowest normalized throughput. Thus, the proposed mechanism allocates the bandwidth to each sensor node based on its priority. # Conclusions In this paper is proposed a priority based congestion control mechanism for heterogeneous data for multipath environment. We have calculated source priority depending on running applications of the sensor nodes and also calculates transit priority by multiplying with delay factor and global priority. In the proposed method the queue divides its congested packet to the child nodes equally and then running the controlling mechanism to prevent or avoid congestion. The proposed technique minimizes congestion occurrence through packet drop ratio, delay and normalized throughput. In future work, a real time application will be made and the performance will be evaluated through congestion avoidance technique. It is anticipated that will be no packet loss or any kind of delay in packet transmission. ![Figure1: Side Channel Power Analysis Attack](image-2.png "Figure1:G") 2![Figure 2 : Queuing Model](image-3.png "Figure 2 :") 3![Figure 3 : Multipath multi hop network modelTable 2 : Congestion Notification Flag and Action Status Node App1 App2 App3 SP(i)1 0 0 1 3 2 0 1 0 2 3 1 0 0 1 4 0 1 0 2 5 0 1 1 5 6 1 0 0 1 7 1 0 1 4 8 1 1 1 6](image-4.png "Figure 3 :") ![Simple Fairness vs Weighted Fairness](image-5.png "") 4![Figure 4 : Normalized Throughput Comparison V.](image-6.png "Figure 4 :") ![service for nomadic users. Communications Magazine, IEEE, 38(7), 70-77.](image-7.png "G") Table1: Congestion Notification Flag and Action StatusCNNetwork StatusActionFlag00Lightly loadedPass packet without modification01LoadedPass packet based on queue priority10Heavily loadedUsing delay factor & pass packet11CongestedControlling with rate adjustmenttechniqueiii. Rate Adjustment TechniqueRate adjustment is done in the single queue. It ensures that the heterogeneous data from different queue will reach the base queue at the desired rate. 3Node TP(i) dly i jGPr sch (i)Tr sch (i)Normalizd(i)throughputof node i112115 0.5550.6430.6432100.33 12 0.3070.2540.2543110.512 0.3420.3440.344490.511 0.3430.3440.344540.590.3100.3280.328680.33 90.2900.2950.295790.513 0.3820.3690.36986112 0.3870.3620.36293160.3340.3760.376101120.1120.1140.114115110 0.5560.600.60123160.2540.2080.208134180.4450.4540.454143160.2300.1770.177156112 0.6700.7300.730Table III. shows the scheduling rate and thenormalized throughput of the sensor nodes. © 2014 Global Journals Inc. (US) * Congestion control and fairness for many-to-one routing in sensor networks CTEe R&bajcsy Proceedings of the 2nd international conference on Embedded networked sensor systems the 2nd international conference on Embedded networked sensor systems ACM 2004. November * Priority based congestion control for heterogeneous traffic in multipath wireless sensor networks SSridevi MUsha GP A&lithurin International Conference on Computer Communication and Informatics (ICCCI) IEEE 2012. January. 2012 * Multipath congestion control for heterogeneous traffic in wireless sensor network MMMonowar MORahman CSHong 10th International Conference on Advanced Communication Technology IEEE 2008. February. 2008. 2008 3 * CODA: congestion detection and avoidance in sensor networks CYWan SBEisenman ATCampbell Proceedings of the 1st international conference on Embedded networked sensor systems the 1st international conference on Embedded networked sensor systems ACM 2003. November * Priority-based congestion control in wireless sensor networks CWang KSohraby VLawrence BLi YHu IEEE International Conference on Sensor Networks, Ubiquitous, and Trustworthy Computing IEEE 2006. June. 2006 1 8 * Mitigating congestion in wireless sensor networks BHull KJamieson H&balakrishnan Proceedings of the 2nd international conference on Embedded networked sensor systems the 2nd international conference on Embedded networked sensor systems ACM 2004. November * A new priority based congestion control protocol for wireless multimedia sensor networks MHYaghmaee D&adjeroh International Symposium on a World of Wireless, Mobile and Multimedia Networks IEEE 2008. June. 2008. WoWMoM 2008. 2008 * Adaptive back-pressure congestion control based on local information LTassiulas IEEE Transactions on Automatic Control 40 2 1995 * Back pressure based multicast scheduling for fair bandwidth allocation SSarkar L&tassiulas INFOCOM 2001.Twentieth Annual Joint Conference of the IEEE Computer and Communications Societies.Proceedings.IEEE IEEE 2001 2 * Maxmin fair scheduling in wireless networks LTassiulas S&sarkar INFOCOM 2002. Twenty-First Annual Joint Conference of the IEEE Computer and Communications Societies. Proceedings.IEEE IEEE 2002 2 * Joint congestion control and media access control design for ad hoc wireless networks LChen SHLow JCDoyle INFOCOM 2005.24th Annual Joint Conference of the IEEE Computer and Communications Societies 2005. March * Proceedings IEEE 3 IEEE * Scalable laws for stable network congestion control FPaganini JDoyle SLow Proceedings of the 40th IEEE Conference on Decision and Control the 40th IEEE Conference on Decision and Control IEEE 2001. 2001 1 * End-to-end congestion control for the Internet: Delays and stability RJohari DK HTan IEEE/ACM Transactions on Networking 9 6 2001 * Bounds on the throughput of congestion controllers in the presence of feedback delay SShakkottai RSrikant SP&meyn IEEE/ACM Transactions on Networking (TON) 11 6 2003 * CDMA/HDR: a bandwidth efficient high speed wireless data PBender PBlack MGrob RPadovani NSindhushyana AViterbi 2000