You are on page 1of 5

Optimized Ant Based Routing Protocol for MANETs

Abhijeet Uike (UFID: 93619946)#, Narayana Perla (UFID: 11941953)$, Kapil Dalal (UFID: 8695980)^
Graduate Students, Dept of Electrical and Computer Engineering University of Florida Gainesville, Florida, USA # abhijeetuike@ufl.edu, $ perlanarayana@ufl.edu, ^ dalal87@ufl.edu
Abstract Mobile AdHoc Networks (MANET) are characterized by a constant change in their network topology. Traditional routing algorithms like Bellman-Ford or Dijkstra are found wanting in these topologies. Ant Colony based Routing Algorithm (ARA) is a well-known bio-inspired algorithm that mimics the behavior of ants to achieve routing. It has the potential of providing an elegant routing solution due to its inherent properties that support node mobility. MATLAB implementation of an optimized version of the ant routing algorithm, "Optimized Ant Based Routing Protocol" was the topic of our project. As MATLAB does not support concurrent programming and no MATLAB based network simulator for MANETs was available, we developed and implemented a new approach of simulating Ant Colony based Routing Algorithm (ARA) using pseudorandom approach. We defined a "Path Finding Factor" to measure the probability of establishment of the shortest path between a source and destination. This model can be extended to include greater number of nodes. Keywords MANET, Ant Colony based Routing Algorithm (ARA), bio-inspired algorithms, Optimized Ant Based Routing Protocol, Network Simulators

II.

BASICS AND BACKGROUND

In this section, we focus on the biological inspiration of Ant Routing Algorithm. We then present an Ant Colony optimization meta-heuristic and its application in a MANET environment. A. Inspiration for ARA - Behavior of Ants Ants discover a path to food using an interesting approach called "Stigmergy", which involves changing the environment for communicating with their peers. Each ant achieves this by depositing a special chemical called "pheromone" along the trail as it scavenges for food. Another ant that comes across this pheromone trail (of higher concentration) blindly starts following this trail, as for him, the trail signifies that some other ant has already found a path from the source to the destination. The pheromone concentration decays with time, and is completely erased in due course if not traversed [3]. Let us consider a scenario where ants A, B, C, D start searching randomly for food (destination). They leave behind a pheromone trail as they move. As seen in figure 1, A reaches the destination and traces its way back. When D and C come across another pheromone trail, they start following it as it has a higher pheromone concentration (figure 2). B finds out another path of its own, but it is not the shortest amongst the existing paths (figure 3). In a given time span, the shorter path will be traversed more number of times than the longer one. Hence, the shortest path emerges as the path with the highest pheromone concentration, and attracts other ants (figure 4). The pheromone trails of the longer paths fade out with time [3].

I.

INTRODUCTION

Mobile AdHoc Networks (MANET) are wireless networks of mobile devices that are essentially self-configuring and infrastructureless. They configure themselves as the need arises, hence the name AdHoc. This adhoc approach is best suited for military applications, sensor networks and intervehicular communication [1]. In MANETs, there is no central control, and the nodes (devices) communicate with each other to establish a network, exchange data and control and maintain the route. Each node thus acts as a router, forwarding packets to concerned neighbors. Routing algorithms in MANETs must be fully distributed, must have an ability to self-organize, and must possess robust and adaptive behavior [2]. There has been a lot of research on applying the concepts of Swarm Intelligence to routing algorithms in MANETs. One such approach is Ant Routing Algorithm. In this report, we first present the basics of the ant routing algorithm. We then describe the structure and approach of the ant routing algorithm model that we developed and identify its advantages and shortcomings.

Figure 1

Figure 2

Figure 3

Figure 4

Figures 1-4: Ants establishing the shortest path from colony to food [3]

B. Ant colony optimization meta-heuristic algorithm In their paper, the authors of reference [4] have proposed a mathematical model for the ant behavior described in section 2A. We are reproducing it here. be a connected graph with number of nodes . The simple ant colony optimization meta-heuristic can be used to find the shortest path between (the source node ) and (the destination node) on the graph G. The path length is given by the number of nodes on the path. Each edge of the graph connecting the nodes and has a variable (artificial pheromone), which is modified by the ants when they visit the node. The pheromone concentration, is an indication of the usage of this edge. An ant located in node uses pheromone of node to compute the probability of node as next hop. is the set of one-step neighbors of node Let

The node interprets the source address of the FANT as destination address, the address of the previous node as the next hop, and computes the pheromone value depending on the number of hops the FANT needed to reach the node. Then the node relays the FANT to its neighbors. Every node that receives duplicate FANTs can distinguish duplicates by comparing their sequence number and the source of the ANT's origin. Such duplicates are destroyed [4]. When the FANT reaches the destination, the destination node destroys it after extracting information. Subsequently, it creates a special packet called Backward Ant (BANT) which is sent to the source. The BANT retraces the path that the FANT took to the destination, laying pheromone as it travels to the source. Thus FANT and BANT act together to discover and establish a pheromone trail between the source and destination [4]. Figures 5 and 6 show the route discovery between the source and destination. We observe that multiple paths between source and destination are established, and this is an inherent strength of the algorithm.

The transition probabilities constraint

of a node

fulfill the

During the route finding process, ants deposit pheromone on the edges. In the simple ant colony optimization metaheuristic algorithm, the ants deposit a constant amount of pheromone. An ant changes the amount of pheromone of the edge when moving from node to node as follows: (1) (2) Like real pheromone the artificial pheromone concentration decreases with time to inhibit a fast convergence of pheromone on the edges. In the simple ant colony optimization metaheuristic, this happens exponentially [4].

Figure 5: The movement of FANTs from the source to destination [4]

Figure 6: The movement of BANTs from the destination to source [4]

C. Ant colony based Routing Algorithm (ARA) ARA is an algorithm that applies the meta-heuristic described in section 2.B (above) to MANETs. It consists of three phases: 1) Route Discovery In this phase, paths between the source and destination are discovered. The source sends out special packets with sequence numbers to the destination, they are called as Forward Ants (FANT). The source broadcasts FANTs to its neighbors. Each neighboring node that receives the FANT updates its own routing table. A record in the routing table consists of (destination address, next hop, pheromone value).

2) Route Maintenance The route discovery phase discovers and establishes paths between source and destination. The source now starts transmitting data packets. The intermediate recipient nodes route this packet according to the information in their routing tables. As the packet is being sent to the next hop, it updates the pheromone value of its corresponding entry in the routing tables of both the nodes. Thus data packets strengthen the pheromone concentration of the path as they traverse it [4]. In a given time span, more number of data packets will traverse the shortest distance (in comparison with the other existing paths), thus it gets the highest pheromone concentration and emerges as the most optimum path. In addition, as per equation 2 the other pheromone concentration of the other trails decreases with time. Thus, there is no need for a special route maintenance phase [4].

3) Route failure handling Route failures are common in MANETs due to the dynamic nature of the nodes. When this happens, the next best pheromone trail is chosen. If no other trail exists, FANTs and BANTs are re-propagated, leading to the discovery of new paths [4]. III. OUR IMPLEMENTATION

Also there is a global fant_count number which tells how many FANTs have reached the destination within the time span. Our MATLAB code has the following main macros: 1) Init: It contains the global data structures of node, fant, fant_table. All global data structures are initialized to default values. 2) Find_next_node: Each node uses this function to forward the FANT to the adjacent node. The next node is chosen by both pheromone and random probability factors. The return value of this function is the node number of the next node. 3) Update_list_of _prev_nodes_visited: It updates the fant structure with the visited node. The input to this structure is the fant number. 4) Total_time_taken_to_reach_destination: It computes the total time taken by the FANT to reach the destination from source. The input to this function is fant number. This uses the fant structure to look at the list of nodes visited by this FANT and computes the sum of all times taken to traverse through each link. 5) Update_fant_queue: This is the main scheduler that runs after init. The scheduler gives the CPU to each node in a round robin fashion. When source node is scheduled it sends some FANTs to the adjacent neighbors. Each FANT is associated with a time_expiry which decides when the current FANT has to be processed. This is to ensure the distance/congestion factor between nodes is taken into account. The time_expiry is calculated by the sum of current_time and distance between nodes (in terms of time). When the scheduler is passed to other nodes (excluding destination node) they process the FANTs. It checks every node for any FANTs to be processed by comparing the current time with the expiry time. If the time lapses, then each node processes the FANT and routes to a different node basing on find_next_node function output. When the scheduler passes control to the destination node, it looks for a fant in its queue. Incase if the queue is not empty it takes the path information from the fant_table and updates the pheromone values of all the associated nodes accordingly. Thus in our simulation we are removing the need of BANTs (which update the pheromone values). Thereby, we achieve faster simulations by removing the overhead of BANT processing.

A. Reason and roadblocks encountered The original intent of this project was the MATLAB implementation and study of "Optimized Ant Based Routing Protocol" as in [5]. We encountered the following roadblocks: 1) MANET simulations are exclusively done in Network simulators like NS2, Qualnet, OPNET etc. 2) MATLAB does not support concurrent programming. 3) All available implementations of network simulators are in Java, C++ and other programming languages. Hence, in consultation with the course instructors, we decided to implement a model to simulate ARA for a static MANET environment in MATLAB. B. Details of the implementation As MATLAB does not support concurrency, we adopted a "Pseudo-Random" approach for our implementation. In order to support concurrency across nodes, we assumed that the time taken by a node to process a FANT is much smaller than the time taken by the FANT to traverse through any link in the network. These FANTs are associated with a fant number to be identified uniquely in the network. The FANTs are also associated with a time_stamp, which tells the node when to process it. As FANTs have to be processed concurrently at every node we need a scheduler to do this. To imitate the movement of packet routing at all the nodes, we designed a scheduler which passes the control to every node in a round robin fashion and make sure that the FANT is processed only when the time lapses. Thus the physical distance between two nodes is translated proportionally to its time equivalent. The data structures that we defined are: Node This structure contains the following members: i Adjacent node info of every node ii Queue for accepting FANTs from other neighbors, iii Push_index points to the latest received FANT, iv PH - pheromone value at that instant associated with the node Fant_table Each FANT is associated with a unique number called fant number. This structure contains the following members: i Position of the node the FANT is in. ii Number of nodes visited by this FANT so far. iii List of nodes visited so far, which will serve as the path to be updated with pheromone values by the destination node.

IV.

SIMULATION AND ANALYSIS

We define a new parameter called "Path finding factor (Pf)" to measure effectiveness of the developed model. For a given source-destination pair in a given topology, path finding factor is defined as the number of times the shortest path is established in a trial size of 100 iterations. For the following trials, the network topology is fixed . the number of nodes is 10. The figure 7 shows the topology of the

network we have used. Here 1 is the source node and 10 is the destination node. The links are marked with distance between the corresponding nodes as shown.

and random probability. If all of the FANTs follow randomly then the shortest path will never be found. Similarly if all FANTs follow pheromone values it is likely that if a FANT finds a longer path initially, then all the other FANTs also try to follow it and concentrate the pheromone values along the path. So both the factors should be considered while forwarding a FANT. The two factors are varied and the path finding factor is computed. The graph shown below is by varying the pheromone choosing probability factor on x-axis and path finding factor on y-axis.

Figure 7: Network Topology (Source = node 1, Destination = node 10)

For ease of measurement, we ran the simulation ten times for each number of FANTs and the number of times a shortest path is found is noted.
Figure 9: Effect of Probability on path finding factor

A. Effect of number of FANTs on the path finding factor: The graph in figure 8 is obtained by varying the number of FANTs on the x axis and the path finding factor of the FANTs are plotted on the y-axis. When the number of FANTs are less i.e. 10 very few will be reaching the destination with the time span and the probability of FANTs choosing the shortest path is very less, hence the path finding factor is 0. As the number of FANTs increases the number of FANTs reaching the destination increases and hence increases the probability of choosing the shortest path to destination. We observed that when the number of FANTs is 1000, the path finding factor is 100%, i.e. every time the best possible path is chosen as the outcome.

V.

CONCLUSION

The simulations prove that Ant Colony based Routing Algorithm (ARA) can be implemented with MATLAB. This is a great advantage because a lot of users are more familiar with MATLAB than with other network simulators. The results showed that the assumptions made for the design parameters (like number of FANTs required by the source to broadcast and probability of choosing the pheromone path) are correct. Also, the Path Finding Factor (Pf) can be used to accurately choose the design parameters of a MANET. A higher value of Pf indicates a good choice of design parameters. VI. SCOPE FOR FUTURE WORK

Figure 8: Effect of number of FANTs on the path finding factor

B. Effect of Probability (of finding pheromone path) on path finding factor: To forward a FANT to the adjacent node, node chooses the adjacent node basing on two factors: pheromone concentration

A limitation of our approach is that for greater number of nodes, the pseudo randomness associated with the model will be complicated. This happens because our assumption i.e. "the time taken by a node to process a FANT is much smaller than the time taken by the FANT to traverse through any link in the network" does not hold good. Thus, the time-distance relationship between nodes has to be extrapolated . The current model does not support measurement of factors like path to delivery ratio, end to end delay parameter. This is a potential area of improvement. As MATLAB 8 supports limited concurrency, the current model can be improved. The simulation speed will be increased and we can compare with other existing routing algorithms like ANTNET, AODV etc. This model can be extended to include mobile nodes. Also, a GUI interface will make the simulation more intuitive to the user.

REFERENCES
[1] Scott L. Rosen, John A. Stine, William J Weiland, "A manet simulation tool to study algorithms for generating propagation maps", Proceedings of the 2006 Winter Simulation Conference. Frederick Ducatelle,Gianni A. DiCaro, and Luca M. Gambardella, "An Evaluation of Two Swarm Intelligence MANET Routing Algorithms in an Urban Environment", 2008 IEEE Swarm Intelligence Symposium, September 21- 23 , 2008. http://mute-net.sourceforge.net/howAnts.shtml Mesut Gunes, Udo Sorges, Imed Bouazizi, "ARA The Ant-Colony Based Routing Algorithm for MANETs", International Workshop on Ad Hoc Networking (IWAHN 2002), August 18-21, 2002. Ashima Rout, Srinivas Sethi, Debajyoti Mishra, "Optimized Ant Based Routing Protocol for MANET", Proceedings of the 2011 International Conference on Communication, Computing & Security ARA The Ant-Colony Based Routing Algorithm for MANETs, Mesut G unes, Udo Sorges, Imed Bouazizi Ant Colony Optimization Applied on Combinatorial Problem for Optimal Power Flow Solution, Brahim GASBAOUI and Boumedine ALLAOUA; Leonardo Journal of Sciences, ISSN 1583-0233 Issue 14, January-June 2009, p. 1-17

[8]

[2]

[9] [10] [11]

[3] [4]

[12] [13]

[5]

[6] [7]

[14]

A Parallel Ant Colony Optimization Algorithm with GPU-Acceleration Based on All-In-Roulette Selection; Jie Fu, Lin Lei, Guohua Zhou; Third International Workshop on Advanced Computational Intelligence, August 25-27, 2010 - Suzhou, Jiangsu, China Ant Colony Optimization for Mobile Ad-hoc Networks; Ajay C Solai Jawahar, Department of Electrical Engineering, Rutgers Introduction to MANET Routing, Laura Marie Feeney, Swedish Institute of Computer Science Using ModelSim, Matlab/Simulink and NS for Simulation of Distributed Systems, Uwe Hatnik, Sven Altmann; IEEE PARELEC 2004 Dresden, 7.-10.9.04, ISBN 0-7695-2080-4, 114 - 119 AntNet-RSLR: A Proposed Ant Routing Protocol for MANETs, Ahmed. A. A. Radwan, Tarek. M. Mahmoud, Essam. H. Hussein, A new proactive routing algorithm for MANET, Mamoun Hussein Mamoun, INTERNATIONAL JOURNAL Of ACADEMIC RESEARCH Vol. 2. No. 2. March 2010 Routing in Wireless Sensor Networks Using an Ant Colony Optimization (ACO) Router Chip, Sensors 2009, 9, 909-921; doi:10.3390/s90200909

You might also like