7
An Ant-colony Routing Algorithm for Wireless Sensor Network Guangcai Cui 1, a , Shanshan Wang 1, b and Jingjing Fang 1, c 1 Changchun University of Science and Technology, Jilin, Changchun, 130022, China a [email protected], b [email protected], c [email protected] Keywords: Wireless Sensor Network (WSN), Ant-colony Algorithm (ACO), The Optimal Routing, Energy Consumption, Negative Feedback Mechanism, Time Delay. Abstract. According to real-time and limited energy of the wireless sensor network(WSN), this paper proposed an ant-colony algorithm (ACO) for optimal routing. The algorithm limited the search space to next node based on search angle and designed directional pheromones to guide ants to the destination node. Using negative feedback mechanism encouraged later ants to choose the optimal path. When ants are timeout with limited life cycle, go back along the way and reduce the pheromone. Probability-transfer function contained the factors of distance, energy, pheromones and search angle. Compared with other ACOs, the results show that it can balance the energy consumption and improve the routing in aspects of energy, dead nodes, short path and time delay. Introduction WSN is composed of a set of limited-energy sensor nodes, and is multiple hops self-organizing network by wireless connect. With the development of the Internet of things, WSN as key technology has a wider application prospect. But in environment without supervision and the nodes energy very limited, providing how to balance the energy consumption and create a relatively stable work environment for WSN, is the key issues related to truly practical WSN. In WSN, [1] designed probability-transfer function according to the energy consumption of nodes communication on paths and remaining energy status. It made the network energy consumption more balanced, but the search space is large and convergence speed is slow. [2] created ant-colony routing algorithm by remaining energy of adjacent nodes and the number of routing hops. To balance the energy consumption is the network guarantee, but the algorithm affects the search speed of ants based on the typical design of non-directional pheromones. [3] (MP-ACRA) studied routing algorithm for WSN from the aspect of the multi-path routing and proposed multi-path routing algorithm without intersecting edges. This algorithm can prolong the network lifetime, but cannot guarantee the global optimal path. [4] (ES-ACRA) improved pheromones update process and considered the energy distribution of all nodes in the routing. In the whole network energy balance is improved, but on the optimal path it has no guarantee. [5] created ant colony routing algorithm by the total energy consumption of messages in the routing. It can minimize the network energy consumption, but there are no feedback messages of dead ants to improve the performance of the network. For the above shortages this paper proposed an improved an-colony routing algorithm from the aspects of communication distance, directional pheromones, energy, limited life cycle and search angle. This algorithm can narrow the search scope, balance the nodes energy consumption, search the optimal path of energy conservation fast and prolong the lifetime of WSN. Typical ACO Idea of ACO. Ants have features of self-organization, self-adaption, mutual communication and collaboration. ACO simulates their intelligent behavior and can solve many complex problems. ACO [6] is proposed as a new type of simulated evolutionary algorithm in the early 1990s, is also a very important method of cluster analysis. It has strong extensibility and robustness and can adapt to the dynamic environment, so it is suitable for the design of dynamic WSN. ACO can simulate the real process of a large number of ants find food together. Ants select paths by random and leave Applied Mechanics and Materials Vols. 462-463 (2014) pp 112-117 Online available since 2013/Nov/15 at www.scientific.net © (2014) Trans Tech Publications, Switzerland doi:10.4028/www.scientific.net/AMM.462-463.112 All rights reserved. No part of contents of this paper may be reproduced or transmitted in any form or by any means without the written permission of TTP, www.ttp.net. (ID: 130.207.50.37, Georgia Tech Library, Atlanta, USA-12/11/14,15:01:15)

An Ant-Colony Routing Algorithm for Wireless Sensor Network

Embed Size (px)

Citation preview

Page 1: An Ant-Colony Routing Algorithm for Wireless Sensor Network

An Ant-colony Routing Algorithm for Wireless Sensor Network

Guangcai Cui1, a, Shanshan Wang1, b and Jingjing Fang1, c 1Changchun University of Science and Technology, Jilin, Changchun, 130022, China

[email protected],

[email protected],

[email protected]

Keywords: Wireless Sensor Network (WSN), Ant-colony Algorithm (ACO), The Optimal Routing, Energy Consumption, Negative Feedback Mechanism, Time Delay.

Abstract. According to real-time and limited energy of the wireless sensor network(WSN), this paper

proposed an ant-colony algorithm (ACO) for optimal routing. The algorithm limited the search space

to next node based on search angle and designed directional pheromones to guide ants to the

destination node. Using negative feedback mechanism encouraged later ants to choose the optimal

path. When ants are timeout with limited life cycle, go back along the way and reduce the pheromone.

Probability-transfer function contained the factors of distance, energy, pheromones and search angle.

Compared with other ACOs, the results show that it can balance the energy consumption and improve

the routing in aspects of energy, dead nodes, short path and time delay.

Introduction

WSN is composed of a set of limited-energy sensor nodes, and is multiple hops self-organizing

network by wireless connect. With the development of the Internet of things, WSN as key technology

has a wider application prospect. But in environment without supervision and the nodes energy very

limited, providing how to balance the energy consumption and create a relatively stable work

environment for WSN, is the key issues related to truly practical WSN.

In WSN, [1] designed probability-transfer function according to the energy consumption of nodes

communication on paths and remaining energy status. It made the network energy consumption more

balanced, but the search space is large and convergence speed is slow. [2] created ant-colony routing

algorithm by remaining energy of adjacent nodes and the number of routing hops. To balance the

energy consumption is the network guarantee, but the algorithm affects the search speed of ants based

on the typical design of non-directional pheromones. [3] (MP-ACRA) studied routing algorithm for

WSN from the aspect of the multi-path routing and proposed multi-path routing algorithm without

intersecting edges. This algorithm can prolong the network lifetime, but cannot guarantee the global

optimal path. [4] (ES-ACRA) improved pheromones update process and considered the energy

distribution of all nodes in the routing. In the whole network energy balance is improved, but on the

optimal path it has no guarantee. [5] created ant colony routing algorithm by the total energy

consumption of messages in the routing. It can minimize the network energy consumption, but there

are no feedback messages of dead ants to improve the performance of the network.

For the above shortages this paper proposed an improved an-colony routing algorithm from the

aspects of communication distance, directional pheromones, energy, limited life cycle and search

angle. This algorithm can narrow the search scope, balance the nodes energy consumption, search the

optimal path of energy conservation fast and prolong the lifetime of WSN.

Typical ACO

Idea of ACO. Ants have features of self-organization, self-adaption, mutual communication and

collaboration. ACO simulates their intelligent behavior and can solve many complex problems. ACO

[6] is proposed as a new type of simulated evolutionary algorithm in the early 1990s, is also a very

important method of cluster analysis. It has strong extensibility and robustness and can adapt to the

dynamic environment, so it is suitable for the design of dynamic WSN. ACO can simulate the real

process of a large number of ants find food together. Ants select paths by random and leave

Applied Mechanics and Materials Vols. 462-463 (2014) pp 112-117Online available since 2013/Nov/15 at www.scientific.net© (2014) Trans Tech Publications, Switzerlanddoi:10.4028/www.scientific.net/AMM.462-463.112

All rights reserved. No part of contents of this paper may be reproduced or transmitted in any form or by any means without the written permission of TTP,www.ttp.net. (ID: 130.207.50.37, Georgia Tech Library, Atlanta, USA-12/11/14,15:01:15)

Page 2: An Ant-Colony Routing Algorithm for Wireless Sensor Network

pheromones on the search path. Then ants make a path decision by the pheromones of olfactory

perception. The more quantity of pheromones on path, the greater probability the path is selected. So

it realizes the clustering process of self-organization.

Advantages of ACO for WSN. This paper analyzed the features of WSN and ACO. WSN is a

self-organizing network and need to rely on each node in the network of cooperation to complete a

task. A single disabled node will not affect the other nodes and the whole network. In the process of

looking for routing, ACO can find the shortest path from source to destination and can save energy in

maximum. At the same time it also can improve the reliability of data transmission and the

adaptability to the change of network topology. Routing choice depends on the dynamic amount of

pheromones and is a directed measurement for the situation of real-time network. Therefore, it can

improve the real-time performance of network.

Improved Ant-colony Routing Algorithm for WSN

Strategy. The lack of typical ACO in: considering node energy consumption is not enough, balancing

the network energy consumption is not well; search speed needs to be improved; pheromones update

strategy needs to be modified to improve the convergence speed of algorithm; When the algorithm

run after a period of time, the nodes energy easily work out on the shortest path. So this paper

proposed the improved strategy and can effectively solve the above problems.

Search Angle. If ants select the node with the greatest transfer probability, the node maybe not the

nearest distance to sink in the [1]. Thus the total path length of data transfer and the total energy

consumption increases, at the same time, it does not conform to the principle of the shortest path in

routing algorithm design.

Search angle is the intersection angle θ composed of the next node, this node and the sink. The

smaller θ, the shorter the search path and the less energy consume. It also limits the search space of

next node and accelerates the search speed. As a result, this paper designed the formula (1+cosθ)λ ,

when θ is smaller, the function value is greater. Directional Pheromones. The traditional pheromones on path are no direction. As shown in Fig.1,

the pheromones amount the ants on node A perceived on path AB is equal to the pheromones amount

ants on node B perceived on path BA. If there is an ant from node C to node B, it will choose next

node A and reach the node A according to the probability-transfer function. It does not choose sink D,

largely because path BA and path BD have the same amount of pheromones. Therefore, the ant may

deviate from the sink and the more walk the more far.

Directional pheromones refer to the pheromones is not necessarily equal on two directions of the

same path. As shown in Fig.1. When the ants reach the sink and return through DB, BA and AS, but

only release pheromones in the direction of BD, AB and SA. In this way, when the later ants reach

node B, they would be not affected by pheromones on path BA.

Pheromones Update. Ants release pheromones after they reached the sink and returned in [3].

pheromones volatilization can not timely guide later ants to choose another path, so it reduces the

convergence speed. Moreover, if the path has more pheromones, the node on the path may be has little

residual energy. The result easily falls into local optimal solution.

This paper divides ants into forward ants and backward ants. Forward ants pass through nodes and

consume pheromones of paths. Its formula is (1). Backward ants pass through nodes and release

pheromones of paths. Its formula is (2).

(1)

(2)

Applied Mechanics and Materials Vols. 462-463 113

Page 3: An Ant-Colony Routing Algorithm for Wireless Sensor Network

This formula shows the pheromones when backward ants pass through path ij and release. Among

them, C is a constant, AllE is the total remaining energy of all the nodes on the paths ants passed,

DiffuseE refers to the total energy consumption of the path. Therefore, the more AllE, the less

DiffuseE on the path and the more pheromones ants released.

Probability-transfer Function. In conclusion, probability-transfer function is affected by energy,

nodes distance, pheromones, search angle and other factors. So we design the formula (3).

(3)

(4)

In formula (3), ej(t) means the remaining energy when ants reach node j and consume pheromones

at t time. When residual energy of nodes is less than the minimum Emin, the nodes is disabled and

remove its information from all of its adjacent nodes. ηij is the reciprocal of the distance (dij) between

nodes. Routei table records all adjacent nodes of node i within the transmission radius (Dr). Compute

each probability node i can reach its adjacent nodes, choose the adjacent node with the greatest

probability as next node and store in the table BestRoute.The function can balance the influence of

various factors and maintain optimization of network performance.

Negative Feedback Mechanism. When [4] determines the optimal paths in this stage, the WSN

data will transmit to sink along the optimal paths. Data transmission will consume node energy along

the paths. If a large amount of data transmits along the optimal paths, it will accelerate energy

consumption of nodes on the optimal paths and cause energy imbalance of the entire network.

This paper used negative feedback mechanism of ants [7], exist behavior reduce later behavior, to

solve the contradiction between positive feedback and negative feedback. When a message arrives at

node i, we assume path ij is one of the optimal paths, there is formula (5).

(5)

In formula (5), diffusion means reducing pheromones. The function is to reduce for next path and

to strengthen pheromones for paths of other adjacent nodes. It encourages later ants to choose new

optimal paths and balances data flow. So the strategy solves the problem energy consumes fast on the

shortest paths and improves performance of the algorithm.

Life Cycle of Ants. If the ant does not reach sink and its time is over, then delete the message in

[5]. It does not make better use of the ants for feedback to warn later ants not to pass the way which

cannot arrive at sink.

To prevent the ant message time is too long, when the ant moves to next node, its life cycle

decreases one until zero. If the ant does not reach sink and the life cycle is timeout, then returns along

the same paths and reduces the pheromones, at the same time adds the pheromones for paths of other

adjacent nodes. This update operation is able to solve the above problem and encourages later ants to

open new optimal paths and to rapidly arrive at sink.

114 Progress in Mechatronics and Information Technology

Page 4: An Ant-Colony Routing Algorithm for Wireless Sensor Network

Algorithm Description

Assumed that all nodes in WSN are homogeneous, have the function of data fusion, initialize the

same limited energy, and can get their geographic coordinates by GPS devices. Each node maintains a

table, the coordinates of its adjacent nodes and can periodically exchange a small amount of data to

refresh the information with adjacent nodes in the table. When the energy of node is lower than a

certain value, the distance between this node and its adjacent nodes is set with the maximum number. Define the structure of ants in Table 1:

The algorithm sents N ants as a cycle. In this cycle, ants are numbered from 0 at start. After ants

return to the source, they will be record the routing paths from source to sink until ant N-1 returns.

Then it judges the optimal paths from the N paths and store in the bestRoute array. The next cycle of

ants are numbered from 0 again. At the end of each cycle, we can transmit data. Algorithm flow chart

is shown in Fig.2. Initialization work includes the initial value of every parameter, the calculation of

distance between each node, and the establish of a neighbor information table. Then we add all nodes

within Dr Distance into the current node information table and calculate the cosθ. When a node is

disabled in the network, just delete it from the tables of neighbor nodes.

Table2. Network life cycle

Analysis Results

In order to verify the algorithm validity, we simulated MP-ACRA in [3], ES-ACRA in [4] and

IACRA in this paper. In the experiments, we used the same initial conditions and data for the above

three algorithms and to avoid accident, each experiment does 20 times and gets the means. We choose

Table1. The structure of ants

Source Destination Route table Energy Flag for forward

ants

The length

of paths

Life cycle

Fig.2. Algorithm flow chart

Fig.1. Release the directional pheromones

Applied Mechanics and Materials Vols. 462-463 115

Page 5: An Ant-Colony Routing Algorithm for Wireless Sensor Network

the eil51 instance from TSP repository as experiment data. The size of transmission data is 64 Byte

every time. 8 ants all move from the source at start. Set the initial values of parameters as follows: α=

0.1, β= 2, γ= 1, λ= 1, ρ= 0.05, δ= 0.0005, Dr = 20 m, e = 5J. Parameters of the above three algorithms

must be the same, in order to make sure the results with the same convergence and complexity.

Life Cycle of Network. This paper defines the network life cycle is from run to the p% node death.

We record p in 10, 20, 50 and 80. When p is 10, it means nodes begin to appear a small amount of

death for a period of time and the network performance is very good. Compared with lifetime of the

three algorithms, the longest one means network energy is balanced. When p is 80, it means almost all

of nodes died and the network cannot work for data transmission. The longer the algorithm runs, the

longer network lifetime is. The table 2 is given network life cycle for MP-ACRA, ES-ACRA and

IACRA in the node number of 50 and 100.

By Table 2, we can see that life cycle of IACRA slightly decreases with the increasing number of

nodes and is still relatively stable on the whole. ES-ACRA fell sharply with the increase of network

scale. MP-ACRA may lead to instability of network due to establish of multiple paths when nodes are

few. For a large number of nodes, due to the large network space and energy consumption of nodes

communication, MP-ACRA will lead to reduce the life cycle further. So we can predict life cycle of

MP-ACRA will be sharply reduced if we enlarge the network scale further.

Energy Consumption. Network lifetime is proportional to residual energy of nodes as we known.

The more total rest energy of all nodes in the network at the same time the longer network lifetime.

We can see from Fig.3, when the nodes number is 5, energy consumption is almost the same for

routing build in the three algorithms. But energy consumption is the largest in MP-ACRA and the

larger in ES-ACRA as second with the increase of network scale. So energy consumption in IACRA

is smallest and reduces about 20% than ES-ACRA. IACRA has a long network lifetime mainly

depended on the minimal energy consumption of the routing establish with few ants. So it obtains the

destination of WSN protocoland it can reduce energy consumption, increase energy efficiency and

maximize the network lifetime as possible.

Fig.3. Energy consumption

Fig.4. The number of disabled nodes

Numbers of Disabled Nodes. The number of disabled nodes relates to energy consumption in the

network. It can maintain the network lifetime is longer if the number of disabled nodes is less and

disabled nodes occur later.The simulation is shown in Fig.4. Compared with the three algorithms,

IACRA has the longest lifetime and best performance of entire network. ES-ACRA considers energy

consumption insufficiently and leads to inequality of energy consumption and to kill nodes rapidly.

Under the conditions of the same initial energy, the lifetime in MP-ACRA is longer than ES-ACRA

within 25 nodes, but its nodes die rapidly later and the rest nodes are less. So MP-ACRA cannot show

its superiority in practical application. The Shortest Paths. The shorter the total length of the shortest paths, the less network energy

consumption. This paper tests the experiment by 20 times for the three algorithms respectively. The

result is shown in Fig.5. The shortest paths in IACRA is shorter and fluctuation of the final result

116 Progress in Mechatronics and Information Technology

Page 6: An Ant-Colony Routing Algorithm for Wireless Sensor Network

graph is less. It means the algorithm performance is more stable than others. The simulation shows

IACRA can work out a better global optimal solution to solve the shortest paths problem with strong

robustness in WSN.

Average delay. Shorter average delay refers to the faster speed of algorithm convergence and the

less energy consumption. This paper tests experiments for the three algorithms in the different node

number and records their convergence time. The simulation is shown in Fig.6. In the network scale 40,

the average dalay for three algorithms is almost the same, but with the increase of network scale,

average delay in IACRA is lower than the other two algorithms. The main reason is that the optimal

paths in IACRA decreases the number of jump, thus it can reduce the average delay.

Conclusions

This paper applies the ACO to WSN with features of WSN and ACO and analyzes communication

distance, energy, pheromones, search angle, speed and other factors. Then it establishs

probability-transfer function and test experiments in different aspects. In results, it can balance the

node energy consumption effectively, reduce the disabled nodes, increase the convergence speed,

improve the performance of WSN and extend the lifetime of the network. Such algorithm has a high

application value and will be considered in future works on this area.

References

[1] Xirong Bao, Shi Zhang and Dingyu Xue: Research and Simulation on Genetic Ant Colony

Routing in Wireless Sensor Network. Proceedings of fourth International Conference on Wireless

Communications, Networking and Mobile Computing. Dalian, China, Sep. 19-21, 2008, pp. 32-27.

[2] S.D. Muruganathan, F.C.D. Ma and R.I. Bhasin: A Centralized Energy-efficient Routing Protocol

for Wireless Sensor Networks. IEEE Radio Communication Magazine, Vol.43, N°3, pp. 13-25, 2005.

[3] F. Li, K. Wu and A. Lippman: Energy-efficient Cooperative Routing in Multi-hop Wireless Ad

Hoc Networks. In Performance, Computing and Communications Conference. IPCCC 25th

IEEE

International, Apr. 10-12, 2006, pp. 124-136.

[4] A. Salehpour, B. Mirmobin and K. Afzali: An Energy Efficient Routing Protocol for

Cluster-based Wireless Sensor Networks Using Ant Colony Optimization. Chinese Journal of

Sensors and Actuators, Shengyang, China, Jun. 17-19, 2008, pp. 4716-4721.

[5] T. Camilo, C. Carreto and J.S. Silva: An Energy-efficient Ant-based Routing Algorithm for

Wireless Sensor Networks. Lecture Notes in Computer Science, Apr. 23-29. 2006, pp. 325-329.

[6] Hadim Salem and Nader Mohamed: Middleware Challenges and Approaches for Wireless Sensor

Networks. IEEED distributed Systems Online, Vol. 29, pp. 68-87, 2006.

[7] A.K. Kkaya and M.A. Younis: Survey on Routing Protocols for Wireless Sensor Networks. Ad

Hoc Networks, Vol. 23, N°3, pp. 305-326, 2005.

Fig.5.The shortest paths

Fig.6.Average delay

Applied Mechanics and Materials Vols. 462-463 117

Page 7: An Ant-Colony Routing Algorithm for Wireless Sensor Network

Progress in Mechatronics and Information Technology 10.4028/www.scientific.net/AMM.462-463 An Ant-Colony Routing Algorithm for Wireless Sensor Network 10.4028/www.scientific.net/AMM.462-463.112