You are on page 1of 4

2009 Third International Conference on Genetic and Evolutionary Computing

An Ant Colony Clustering Routing Algorithm for Wireless Sensor Networks

WANG Guifeng
Network Information Center Guilin University of Electronic Technology Guilin, China
AbstractOn the basis of analyzing the Low-Energy Adaptive Clustering Hierarchy (LEACH), a clustering routing algorithm for Wireless Sensor Network (WSN) based on ant colony algorithm (ACA) is proposed in this paper. We applied the ACA to inter-cluster routing mechanism and looked for the best path from cluster heads to base station. Thanks to the algorithm, the transmission of information, for the cluster heads node away from the base station (Sink), along the best path was achieved and the energy consuming of cluster heads node was decreased. Meanwhile, not only the node residual energy, but also the distance between the cluster heads was considered for the selection of cluster heads. It resulted in the more even distribution of cluster heads. Simulation result indicates that the new algorithm has a more than 30% increase in extension of network life compared with LEACH. Keywords-WSN; ACA; clustering routing

WANG Yong, Tao Xiaoling

Network Information Center Guilin University of Electronic Technology Guilin, China fusion, but did not take the balanced use of energy in the whole networks into account. At present, many algorithms which concerned about applying ACA into the routing of WSN were put forward, but all of them were about the planar routing. In this paper, basing on ACA and the characteristics of WSN, applying the ACA to clustering routing of WSN, we put forward a novel WSN clustering routing algorithm (ACALEACH). The algorithm apply the ACA into inter-cluster routing mechanism to reduce the energy consumption of cluster heads and finally prolong the life span of networks. II. AN ANT COLONY CLUSTERING ROUTING ALGORITHM FOR WSN



Wireless Sensor Network (WSN) is composed of sensor nodes with the abilities of communication and computation which construct networks in the form of multi-hop communication and self-organization [1]. As the power of sensor node is supplied by the battery and the energy is limited. Therefore how to make rational use of energy and achieve high efficient, as much as possible to prolong the network lifetime, has become the core issue in sensor network research [2, 3]. Undertaking the task of transmitting information from the source node to the destination node through the network. The network routing is the basis of high communicating efficiency of the network. Therefore, the WSN routing algorithm has become a present research focus as a key technology. Ant Colony Algorithm (ACA) is a simulation of the behaviors of ants swarm in the Kingdom of insects [4], it has the advantage of robust, excellent distributed calculated mechanism, easy to combine with other methods, etc. Literature [5] meet the requirement of WSN by modifying ant colony optimization (ACO) and introduced the data-chip routing mechanism to optimize path-selecting efficiency, however, the algorithm was only applied to the planar routing. Literature [6] have introduced the energy level of nodes and transmission distance into ACO pheromone increment formula which made ACO adapt better to routing protocol in WSN. The algorithm also took into account data

Figure 1. Flow chart of algorithm

The algorithm determine the cluster heads according to the remained energy of node and the distance between nodes. Taking ACA's advantage on being implemented easily, according to the exchange of information of respective position, the distance from Sink and the remained energy the whole network, based on which we can calculate the possibility of each adjacent cluster heads being selected as the next hop to form the routing of adjacent clusters. The

978-0-7695-3899-0/09 $29.00 2009 IEEE DOI 10.1109/WGEC.2009.22

algorithm has the characteristic of periodical cyclical round. Each round is divided into clustering-forming stage and clustering-stability stage. At the new round begining, the cluster is divided and then waits for data transfer. The algorithm flow chart is shown in Figure 1. III. THE REALIZATION PROCESS OF ALGORITHM

A. Clustering-forming Stage Since the cluster heads will perform the extra functions such as data fusion and transit information, it will consume more energy than the member nodes. So the remaining energy value of the nodes must be taken into account when selecting the cluster heads. In addition, due to the random choice of cluster heads, the phenomenon of relative concentration of cluster heads may exist. The algorithm refer to the method mentioned in literature [7] to limit minimum distance (Dis) between cluster heads. However, the difference between our method and that of the literature [7] is that: when the distance between two cluster heads is less than Dis, our algorithm will compare the energy value between the two, and then choose the cluster head with more energy as the new cluster head but with less as the member node, thus, it can better optimize the clustering program. Implementation steps of the process and some pseudo-codes is as follows: Step1: Initialize parameter values and information table, dispense the nodes dispensed into MM square region, record the coordinates of the node (x, y) at the same time, as shown in Figure 2 (a). Step2: R<rand (0,1) // each node generate a random number if R<T(n) //To determine whether the random number is less than T (n), T(n) is calculated out by the equation (1) S(i).type=cluster head // the node i is cluster head Broadcast //broadcast the information of becoming the cluster head if S(i).type=cluster head Listening if Cluster head receive clustering messages sent by other cluster heads if D(i,j) <Dis // D(i,j) denote the distance between two cluster heads if s(i).weight<s(j).weight choose the cluster head with more energy as new cluster head but with the less as member node end

selecting cluster heads is completed, as shown in Figure 2 (b). Step3: The non-cluster head in the network choose the appropriate cluster to join according to their distance from each cluster head (select the nearest distance) and then inform the cluster head. The process of cluster division is completed. The assumption that the entire region will be divided into five clusters, namely, S1, S2, S3, S4, S5. As shown in Figure 2 (c).
S1 S5 S4





(a) (b) cluster member

(c) cluster head

Figure 2. The various stages of clustering

B. Clustering-stability Stage In order to achieve the multi-hop communications between cluster heads, reduce energy consumption of the cluster head away from Sink, to extend the survival time of network, in this paper, we run ACA between the cluster heads to achieve this goal. As shown in Figure (3). Suppose that the cluster head 1 is about to send data to Sink, instead of sending directly, it will firstly send the data to cluster head 2, through which the data will be send to sink. Similarly, the path is 3-4-5-Sink when cluster head 3 send the data to the Sink. Concrete process is as follows: Step1: Place K ants on each cluster head, then set matrix Tabu, R_best, A_city and initialize them. Tabu is used to store and record the generated path, R_best is used to store the best path between each cluster head and the Sink, A_city store the nodes which have been visited.

Figure 3. Data transmission from cluster head to Sink

Where P is the percentage of desirable cluster heads in all sensor nodes, r is the round number, G is the node set which contain nodes which did not become the cluster head in the final 1/p rounds. Ecurrent denote the current energy of node, Emax denote the initial energy of node. The process of

0, n G T ( n) = Ecurrent p ,n G 1 p[r mod(1/ p ) E max


Step2: K ants in each cluster head are transferred to the next accessable cluster head with possibility P. P can be calculated out by equation (2). Add the accessed node into Tabu, and then set it as the node not allowed to be access in A_city, and then update pheromone on the ant path according to equation (4). Repeat step 2 until all ants in each cluster head have accessed to the Sink node.

pij =

( ij ) 1 (ij ) 2

( ik ) 1 (k ) 2


Where Ni denotes the set of neighboring nodes of chi, including the node can be chosen as next hop. 1 and 2 are relative important parameter for controling the distance

between pheromone and the two cluster heads. ij is t moment, the concentration value of pheromone of (i,j) edge. Equation (3) denote the heuristic value from cluster head i to j.

i j (t ) =

1 = D(i, j )

1 ( x j xi )2 + ( y j yi ) 2


ij = ij + energy + ( )


Where energy is the remaining energy of neighboring cluster heads, denotes the distance between cluster head and base station, 1 denotes the percentage of the energy of neighboring node in the pheromone, 2 denotes the percentage of the distance from neighboring node to base station in the pheromone. Step3: For the K ants of each cluster head, select one which is the shortest path and with the lowest energy consumption, store the path which the ant passed by. Repeat Step 2, 3, until each cluster head find the best path to Sink. Step4: The cluster head will be made to translate data along the optimal path until the energy of one cluster node is less than that consumed to send k bit data whit distance being d0 in the free space model, and then we will enter into the next round. IV. SIMULATION EXPERIMENTS AND ANALYSIS OF RESULTS

B. Analysis of Simulation Results In order to verify the performance of the algorithm, we make the simulation comparison between the LEACH and our algorithm. Due to the length of the life cycle of the network directly reflects the performance of WSN, we compare our algorithm with LEACH in two aspects: the average energy consumption; the number of survival nodes. Figure (5) shows the average energy consumption diagram of our algorithm and the LEACH, it reflects the change of the average power consumption of network with time elapsing. The total energy of 200 nodes in network is 100J. LEACH appears the death of node at the 450 round, where consumption of energy is 60J while that in this algorithm is 12J. The algorithm can save 48J at this stage; when all of the LEACH node die, energy consumption after adopting this algorithm is the 80J, reducing 20J, the performance of network has been greatly improved.

A. Energy Models and Performance Parameters This paper adopt the same wireless energy model used in literature [8]. The wireless transmission module can realize the transmitting power control or be shut down automatically in order to avoid receiving unnecessary data according to the distance between the nodes. We adopt matlab as the simulation tool. Specific simulation environment as follows: 200 nodes are randomly dispensed in the 200m200m square region, the base station is located at (50,175), as shown in Figure (4). The parameters of algorithm is: Eelec=50nJ/bit, fs=10 pJ/bit/m2, mp=0.0013 pJ/bit/m2, EDA=0.5nJ/bit, the initial energy is Eo=0.5J; The packet length is packetLength = 4000; The Control packet length is ctrPacketLength = 100, 1=0.01, 2=0, 1=2, 2=2, p=0.05.

Figure 5. The average energy consumption under the two algorithms

As shown in Figure (6). According to simulation results, LEACH appeared death of node at the 450 round while ours at the 950 round; The death of half of the nodes appeared at the 750 round using LEACH while ours at the 900 round. All nodes die at the 1150 round in LEACH while ours at the 1500 round. Simulation result indicates that the new algorithm has a more than 30% increase in extension of network life compared with LEACH.

Figure 6. The number of survival nodes under the two algorithms

Figure 4. Random distribution of nodes


With the characteristics of self-organized, dynamic and multi-path, ACA make is particularly suited to the routing of WSN. On the basis of analyzing LEACH, a clustering routing algorithm for WSN based on ACA is proposed in this paper. The algorithm has the characteristics of low


expending on routing, self-organized and multi-path. Simulation result indicates that the new algorithm has a remarkable improvement in the average energy consumption and extends the life cycle of the networks. As the WSN routing protocols is vulnerable, how to design and realize routing protocol with security mechanism will be our future research work. REFERENCES

[4] [5]


[7] [1] I. F. Akyildiz and I. H. Kasimoglu, Wireless sensor and actor networks: Research challenges, Ad Hoc Networks Journal, 2004, 2(4): pp. 351-367. Akyildiz I, and Su W.Sankarasubramaniam Y, Wireless Sensor networks: a swrvey, Computer Networks, 2002, 38(4): pp. 393-422. Heinzelman W, Chandrakasan A, and Balakrishnan H, Energn_efficient Communication Protocol for wireless Sensor


[2] [3]

networks//IEEE Proc of the Hawaii Int Conf System Sciences, Washington: IEEE Computer Society, 2000. pp. 175 -187. Haibing Duan, Ant Colony Algorithms: Theory and Applications, Beijing: Science and Technology Press, 2007. J.T. WANG, J.D. XU, and J.C. XU, Wireless Sensor Networks Routing Protocol Based on Ant Colony Optimized Algorithm, Journal of System Simulation, 2008, 20 (18): pp. 4898-4901. Camilo T, Carreto C, and Silva J S, An Energy-Efficient Ant-Based Routing Algorithm for Wireless Sensor Networks//ANTS2006, Int., Workshop on Ant Colony Optimization and Swarm Intelligence. Brussels, Blgica: Springer Verlag, 2006: pp. 49-59. X.P. GU, Y.J. SUN, and J.S. QIAN, An Improved Clustering Routing Protocol for Wireless Sensor Networks, Microelectronics & computer, 2009, 2, 26(3): pp. 34-37. Heinzelman W R, Chandrakasan A, and Balakrishnan H, Energyefficient communication protocol for wireless microsensor networks, Hawaii International Conference on System Sciences (HICSS). Hamaii, 2000.