The rising field of wireless sensor network (WSN) has potential benefits for real-time monitoring of a physical phenomenon. The Wireless sensors continuously monitor the physical process and transmit information to the base station  . Wireless Sensor Networks (WSNs) are intelligent network application systems which collect the real time data, integrate and transmit it to the sink node  . It is an information technology which integrates latest technological achievements in the network, micro-electronics and communications. Widespread net- work of low-cost wireless sensor devices offers a significant opportunity to observe more precisely the surrounding physical phenomena when compared to traditional sensing methods  . Wireless sensor network has it own design and limited resources  . The energy of nodes, communication computing and storage capability are limited in Wireless Sensor Networks. Many applications based on wireless sensor networks usually require real-time multimedia data  . A large number of multimedia data transfer to sink node via multi-hops generate congestion. A node in congestion zone consumes huge energy and reduces the lifetime of the network  . Therefore, routing technique and congestion control mechanism play a key role to consume the efficient energy and support quality of services in Wireless Sensor Networks. Since every application challenges and quality factors are different, so there is a need for diversified energy efficient routing and congestion control techniques which will be suitable for the application domain  .
Wireless Sensor Network is a set of micro sensor nodes for the intelligent autonomous monitoring system concerning with computing and communication capabilities which are placed to monitor different areas  . It can hold potential to revolutionize segments of the economy and life. A Wireless Sensor Network has been designed to perform the high-level of information processing tasks like detection, classification and tracking. Wireless Sensor Networks has been applied in several fields like home networking, disaster management, pollution watching, offshore exploration, underground environment monitoring like soil properties and toxic substances  , aircraft control and health management systems  , 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     .
Congestion control is an approach which is used to avoid network congestion and mitigate congestion. Wireless sensor networks generally have two types of congestion control, end-to-end and hop-by-hop congestion control  . The main aim of the paper is to propose an energy efficient 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. In Section 4, the proposed methodology to solve the problem is shown. Section 5 explained the simulation environment, after that results and conclusion are discussed in Sections 6 and 7 respectively.
2. Literature Survey
Ortiz, Antonio M. et al.  proposed a wireless routing protocol for the dense networks. They use Fuzzy logic based approach for determining the optimal route for sending the data from source to destination. The route can be determined using the mathematical approach derived using fuzzy logic algorithm and shows better results on comparison with previous approaches in terms of end to end delay and packet delivery ratio.
Wang, Sheng-Shih et al.  proposed a link aware approach for the clustering in wireless sensor networks. The links are stored in the routing table of each node and the packets are forwarded using those links which saves a lot of energy used in determining the links. This protocol assumes the generic MAC protocols and aims at increasing the time period of networks by distributing residual energy of the detector nodes.
Domingo, Mari Carmen  proposed a congestion detection and avoidance algorithm to solve the problem of congestion in underwater wireless sensor network. In their approach, they work on the sonar waves for the communication between sensors and base station. The waves follow different rules and different set of methodologies to tackle the problem of congestion.
Rawat, Priyanka et al.  presented a survey on the recent approaches to solve various wireless sensor network related problems. They discussed both proactive and reactive routing approaches used for routing of data in WSN. The strategies used in recent years for solving the problem of congestion are also discussed in their work.
Akkaya, Kemal et al.  presented survey and classification of recent routing protocols for sensor networks. Each routing protocol is appropriately categorise into three categories: data-centric, hierarchical and location-based. Moreover, quality of service (QoS)-aware protocols, network flow protocols and utilisation of data aggregation in various protocols for energy saving and traffic optimization are also discussed.
Gandomi, Amir Hossein, et al.  proposed Bat algorithm for various constraint optimization problems. They proposed a mathematical approach for solving the objective function by comparing various parameters of the Bat algorithm with the objective function. The bat algorithm tries to reach the global best solution after each iteration and mathematical structure can be used for various other problems.
Alihodzic, et al.  proposed an application of bat algorithm in the image processing application. They designed a model used for the thresholding of the image using Bat algorithm. In their approach they considered a multiple threshold values for determining the binary image from the given image. This approach can be implemented in the wireless sensor networks by setting various performance levels for the node.
Zhao, Miao et al.  proposed a wireless rechargeable network which uses rechargeable battery power for the functioning of the nodes. These mobile nodes can be deployed in a grid and can be used for the calculation of the state of the network and also used for the optimized node placing calculation in the network.
Garcia, Miguel et al.  proposed a cooperative wireless sensor network where groups are formed by the nodes and the processing of data is performed using the cluster head of each group. The cluster head must have the best configuration in terms of residual energy and must be approximately at equal distance from all the other nodes in the network. This setup helps in improving the packet delivery ratio as the packets follow multi-hop route to the base station.
Alam Bhuiyan et al.  proposed an energy and frequency efficient algorithm for the WSNs. In their approach they worked on the optimize use of energy for sending of data. For this they find out optimum location for the placement of Cluster Heads so that nodes require approximately equal amount of energy for the transfer of data.
Sergiou, Charalambos et al.  presented a Hierarchical Tree Alternative Path (HTAP) algorithm to control congestion in Wireless Sensor Networks. This “resource control” algorithm attempts to alleviate congestion in wireless sensor networks by creating dynamic alternative paths to the sink.
3. 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:
・ 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. Packet collision in the network and Queue length of the node 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 transfers per unit time taken along a fixed path.
To improve the performance of the network and to reduce the congestion, we need to optimize the fitness function.
where, i is the iteration which ranges from 1 to N (total number of nodes),
w1, w2, w3 and w4 are the weights supplied to the algorithm,
t is the throughput of the network,
PL is the normalized Packet lost rate in the network,
is the distance between node i and j and
E is the residual energy of each node in the network.
4. Proposed Methodology
In our proposed congestion control approach, we have implemented improved bat algorithm which is based on concept of echolocation of bats    . For obstacle detection and avoidance, bats use sonar echoes which reflect from the obstacle and are transformed to frequency. They use time delay between the emission and reflection and use that delay for navigation. This behaviour of bats can be used to formulate the new bat algorithm.
A. Bat Algorithm:
1: Objective function f(x), x = (x1, ..., xd) T
2: Initialize the bat population xi and vi for i = 1 . . . n
3: Define pulse frequency Qi ∈ [Qmin, Qmax]
4: Initialize pulse rates ri and the loudness Ai
5: while (t < Tmax) // number of iterations
6: Generate new solutions by adjusting f requency, and
7: updating velocities and locations/solutions
[Eq.(2) to (4)]
8: if(rand(0, 1) > ri)
9: Select a solution among the best solutions
10: Generate a local solution around the best solution
11: end if
12: Generate a new solution by flying randomly
13: if(rand(0, 1) < Ai and f(xi) < f(x))
14: Accept the new solutions
15: Increase ri and reduce Ai
16: end if
17: Rank the bats and find the current best
18: end while
19: Post process results and visualization
The original bat algorithm is discussed in the above Algorithm. In this algorithm bat behaviour is captured into fitness function of problem to be solved. It consists of the following components:
・ Generation of new solutions,
・ Local search,
・ Generation of a new solution by flying randomly,
・ Find the current best solution.
Initialization of the bat population is performed randomly. Generating the new solutions is performed by moving virtual bats according the following equations:
where is a uniform distribution. A random walk with direct exploitation is used for local search that modifies the current best solution according to equation:
where ε is the scaling factor and is the loudness. The local search is launched with the proximity depending on the pulse rate ri. The term in line 13 is similar to the simulated annealing behavior, where the new solution is accepted with some proximity depending on parameter
where α and γ are constants. Actually, α parameter plays a similar role as the cooling factor in simulated annealing algorithm that controls the convergence rate of this algorithm.
For the improvement in the above algorithm, a third parameter Throughput is also introduced and velocity in the above algorithm is compared to the packet lost rate and position is used to calculate the distance. Another parameter Residual Energy is also introduced. Figure 1 shows the flow diagram of the proposed methodology.
Reactive routing  is used in the proposed approach. First, the nodes in the network are clustered and each node shares its energy and distance from the other nodes with all nodes within cluster. Number of retransmissions and residual energy are important factors for calculating the performance of the network.
Congestion in the network is detected by monitoring the packets flowing in the network from source to sink node. For the detection of the congestion, queue length is an important parameter. Queue length size information is shared within the network. Queue size and window size information is used to route the data packets in the network.
In Improved Bat algorithm each node sends a ping signal (or a beacon signal)
Figure 1. Flow diagram of proposed methodology.
to other nodes of the cluster if it wants to updates its routing table with other node’s remaining queue size value. The other node in the network replies to signal by returning the value requested by that node. The node will decide about the route the packet follows by calculating the objective function which needs to be maximized.
We have selected following three approaches to compare with our proposed approach  :
1) CODA: Congestion Detection and Avoidance is an energy efficient congestion control mechanism which comprises three schemes  :
i) Closed-loop multisource regulation,
ii) Open loop hop-by-hop backpressure,
iii) 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.
2) Particle Swarm optimization (PSO): Particle Swarm optimization is a method of finding the mathematical solution of the problem in terms of position and velocity  . 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 the position. Swarm will follow the path calculated by the particles in the search space.
3) Ant Colony Optimization (ACO): Ant Colony Optimization is a method for finding the solution in terms of optimal routes based on the behavior of ants searching for food   . Firstly ants wander randomly and when they find the food they walks back to the colony leaving the traces called the pheromones for other ants to get the path to the food. This model is mathematically developed in order to solve the complex problems.
5. Simulation Environment
In Table 1, Simulation environment is created using a 1000*1000 grid and 50 nodes are placed in the network grid. Wireless parameters like antenna type, channel type and propagation model are defined for each node. MAC layer is used in the simulation with standard following IEEE 802.11 and the radio model has been adopted  .
6. 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 reduced. It is also evident from the graphs that after the application of improved bat algorithm the length of the queue decreases and at 40 hop count there is a very rare increase in the queue length value.
Figure 3 shows the graph between Fitness factor and Simulation Time for different Hop numbers. Fitness factor is the decreasing function. This means
Table 1. Simulation parameters.
Figure 2. Graph between simulation time and queue length for hop count 10, 20, 30 and 40.
Figure 3. Graph between simulation time and fitness factor.
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.
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), Ant Colony Optimization (ACO) and the proposed approach. In our proposed Bat algorithm based approach the throughput of the network is almost constant and greater than the throughput calculated using the CODA and almost same as throughput calculated using PSO algorithm. Throughput of ACO is slightly better than the proposed approach. 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 Bat Algorithm is greater than CODA, PSO and ACO. This is due to the fact that Bat algorithm consumes low energy as compared to other algorithms with the increase in simulation time. These results are calculated with the number of hop count considered as 40.
Figure 4. Graph between simulation time and normalized system throughput.
Figure 5. Graph between simulation time and residual energy.
7. Conclusions and Future Scope
The problem of Congestion in the Wireless Sensor Networks is dealt by applying the Improved Bat Algorithm and it is observed from the above results that after the application of improved bat algorithm the length of the queue decreases and at 40 hop count there is a very rare increase in the queue length value. The fitness function also tries to decrease by increasing the hop count. The throughput of the proposed approach is almost constant and better than CODA. Simulation results have shown a significant improvement in network lifetime of a node in the network on comparison with CODA, PSO, ACO algorithms.
In future, we will apply other bio inspired algorithms and compare the results of various algorithms. We can take transmission delay as a parameter.
Authors are grateful to Punjabi University Patiala and NIT, Kurukshetra for providing adequate library and internet facility.
 Gadze, J.D., Dake, D.K. and Diawuo, K. (2013) Adaptive Congestion Control Protocol (Accp) for Wireless Sensor Networks. International Journal of Wireless & Mobile Networks (IJWMN), 5, 129-144.
 Cardell-Oliver, R., Kranz, M., Smettem, K. and Mayer, K. (2005) A Reactive Soil Moisture Sensor Network: Design and Field Evaluation. International Journal of Distributed Sensor Networks, 1, 149-162.
 Barrenetxea, G., Ingelrest, F., Schaefer, G. and Vetterli, M. (2008) The Hitchhiker’s Guide to Successful Wireless Sensor Network Deployments. Proceedings of the 6th ACM Conference on Embedded Network Sensor Systems, Raleigh.
 Wang, S.-S. and Chen, Z.-P. (2013) LCM: A Link-Aware Clustering Mechanism for Energy-Efficient Routing in Wireless Sensor Networks. Sensors Journal, 13, 728-736.
 Yedavalli, R.K. and Belapurkar, R.K. (2011) Application of Wireless Sensor Networks to Aircraft Control and Health Management Systems. Journal of Control Theory and Applications, 9, 28-33.
 Hull, B., Jamieson, K. and Balakrishnan, H. (2004) Mitigating Congestion in Wireless Sensor Networks. Proceedings of the 2nd International Conference on Embedded Networked Sensor Systems, Baltimore, 3-5 November 2004, 134-147.
 Priyanka, R., Singh, K., Chaouchi, H. and Bonnin, J. (2014) Wireless Sensor Networks: A Survey on Recent Developments and Potential Synergies. The Journal of Supercomputing, 68, 1-48.
 Gandomi, A., Yang, X., Hossein, A. and Talatahari, A. (2013) Bat Algorithm for Constrained Optimization Tasks. Neural Computing and Applications, 22, 1239-1255.
 Zhao, M., Li, J. and Yang, Y. (2014) A Framework of Joint Mobile Energy Replenishment and Data Gathering in Wireless Rechargeable Sensor Networks. IEEE Transactions on Mobile Computing, 13, 2689-2705.
 Garcia, M., Sendra, S., Lloret, J. and Canovas, A. (2013) Saving Energy and Improving Communications Using Cooperative Group-Based Wireless Sensor Networks. Telecommunication Systems, 52, 2489-2502.
 Alam, B., et al. (2013) Energy and Bandwidth-Efficient Wireless Sensor Networks for Monitoring High-Frequency Events. Proceedings of 10th Annual IEEE Communications Society Conference on Sensor, Mesh and Ad Hoc Communications and Networks, New Orleans, 24-27 June 2013, 194-202.
 Charalambos, S., Vassiliou, V. and Paphitis, A. (2013) Hierarchical Tree Alternative Path (HTAP) Algorithm for Congestion Control in Wireless Sensor Networks. Ad Hoc Networks, 11, 257-272.
 Manshahia, M.S., Dave, M. and Singh, S.B. (2015) Bio Inspired Congestion Control Mechanism for Wireless Sensor Networks. Proceedings of 2015 IEEE International Conference on Computational Intelligence and Computing Research, Madurai, 10-12 December 2015, 1-6.
 Manshahia, M.S., Dave, M. and Singh, S.B. (2015) Congestion Control in Wireless Sensor Networks Based on Bioluminescent Firefly Behavior. Wireless Sensor Network, 7, 149-156.
 Ding, R. and Yang, L. (2010) A Reactive Geographic Routing Protocol for Wireless Sensor Networks. 6th International Conference on Intelligent Sensors, Sensor Networks and Information Processing, Brisbane, 7-10 December 2010, 31-36.
 Wan. C.Y., Eisenman, S.B. and Campbell, A.T. (2003) CODA: Congestion Detection and Avoidance in Sensor Networks. Proceedings of the 1st International Conference on Embedded Networked Sensor Systems, Los Angeles, 5-7 November 2003, 266-279.
 Antoniou, P., Pitsillides, A., Blackwell, T., Engelbrecht, A. and Michael, L. (2013) Congestion Control in Wireless Sensor Networks Based on Bird Flocking Behavior Congestion. Computer Networks, 57, 1167-1191.
 Aghaei, R.G., Rahman, A.M., Rahman, M.A., Gueaieb, W. and Saddik, A.E. (2008) Ant Colony-Based Many-to-One Sensory Data Routing in Wireless Sensor Networks. Proceedings of IEEE/ACS International Conference on Computer Systems and Applications, Doha, 31 March-4 April 2008, 1005-1010.
 Saleem, K., Fisal, N., Baharudin, M.A., Ahmed, A.A., Hafizah, S. and Kamilah, S. (2010) Ant Colony Inspired Self-Optimized Routing Protocol Based on Cross Layer Architecture for Wireless Sensor Networks. WSEAS Transactions on Communications, 9, 670-678.