Study of Wireless Sensor Network Route Based on Improved Ant Colony Algorithm

Combining the characteristics of wireless sensor network, the ant colony algorithm is applied to a wireless sensor network, and a wireless sensor network route algorithm based on energy equilibrium is proposed in this paper. This algorithm takes the energy factor into the consideration of selection of route based on probability and enhanced calculation of information so as to find out the optimal route from the source node to the target node with low cost and balanced energy, and it prolongs the life cycle of the whole network.


INTRODUCTION
The main purpose of the design of traditional wireless network route protocol is to avoid network congestion and improve the quality of service (QOS) [1]. However, since a wireless sensor network is restricted by node energy, the priority of the design of route protocol is energy conservation. Network energy consumption overall must be minimized, and global energy consumption must be balanced so as to prolong the life cycle of the whole network [2].
Ant colony optimization algorithm (ACO) is a distributed intelligent simulation algorithm generated by insights gained from the biological behavior of an ant colony in the nature. Inspired by the collective behavior of the ant colony in nature, in 1992, Dorito first proposed a completely new heuristic algorithm in his Ph.D. thesis and applied this algorithm to solve a series of group and optimization problems [3][4]. Some characteristics that the network route problems have, such as internal information, distribution calculation, and stochastic dynamic and asynchronous network status update, are matched with the ant colony algorithm, so the ACO provides a new direction for solving network route problems [5].

II. REALIZATION OF ANT COLONY ALGORITHM
Analysis of TSP problem (i.e., the shortest circuit of n cities) is used in this paper to describe briefly the principle for realizing the basic ant colony algorithm [6].
The total number of and colonies is m, the number of cities is n, the distance from city i to the city j is d ij (i,j=l,2, ... ,n), the pheromone connection path between city i and city j at the moment of t is (0, and the pheromone concentration on the party of each city at the initial moment is the same, which is ! ij =! 0.
When the ant k decides to move to the next city depends on the pheromone concentration of the connection path among cities [7][8].
Set P k ij (t) to be the probability of the ant k moving from city i to the city j.
where! ij (t)=1/d ij is the heuristic function, representing the degree of expectation for the ant to go from city to city .
N k (t)represents the next city set that ant & can visit. "is the importance factor of pheromone? The larger the value, the larger the role of the pheromone concentration in deciding the next city to visit.# is the importance factor of the heuristic function [9]. The larger the value, the larger the role of the heuristic function in deciding the next city to visit [10].
When the ant finishes the cycle once, the pheromone on the paths among cities is updated according to formula (2) [11]: in which: !$ k ij represents the pheromone concentration that the ant leaves on the path from city i to the city j.!$ ij represents the sum of the pheromone concentration that the ant colony leaves on the path from city i to the city j [12].
Depending on the difference of pheromone update strategy, there are different models for the basic ant colony algorithm [13]: (1) Ant cycle system model In this model: (2) Ant quantity system model In this model: / (3) Ant den sky system model In this model: SHORT PAPER STUDY OF WIRELESS SENSOR NETWORK ROUTE BASED ON IMPROVED ANT COLONY ALGORITHM In the three models above, Q is the constant, representing the total pheromone released during one cycle of ants, L k is the length of the path that ant k covers from city i to city j, l k represents the path that the ant covers, and d ij is the side length [14]. Since the ant cycle system model performs well, usually this model is selected to calculate the pheromone growth concentration; i.e., the path of the ant and the released pheromone is in inverse proportion [15][16]. Multi-path energy ant colony algorithm (MEACO) is proposed in this paper to solve the energy equilibrium problem during the route process, including a detailed design process and performance analysis [17].

A. Wireless sensor network route model
The wireless sensor network is abstracted to an undirected graph with weight G=(V, A), among which [18]: V represents the set of all nodes in the sensor network V=(V 0 ,V 1 ,…,V N-1 ,V N ),with each node having energy, network position and the communication radius; A represents the set of sides, with each side having its own weight that is the pheromone and energy value, and its definition is: The adjacent node set A(i) of node i is defined as: where R is the maximum communication distance between nodes, and (i,j) is the communication distance from node i to node j [19].
The improved MEACO is used to look for the optimal route with the longest life cycle from source node V 0 to the node Sink in the in directed graph G [20].

B. Protocol algorithm design
With the features of wireless sensor network route, the steps of the ACO algorithm to find the optimal energy equilibrium route are as follows [21]: (1) Initialize relevant parameters m ants are placed on the source node of the wireless sensor network to work, and each path is given the same initial value of pheromone trace and initial value of energy.
(2) Status transfer rule Each ant tries to find the path with minimum cost in the network [22]. Ant A selects the next hop node j routed from node/ depending on the probability selection rule formula (9): Among which ! ij (t) means the pheromone on the link from node i to node j; " ij (t) is the heuristic value of the link related to the energy from node i to the node j; #and$are the parameters to control the relative importance of the pheromone trace and heuristic value's>0,$>0. N k (i) represents the set of nodes that ant k can select at the next step. The heuristic value of the node j is shown in Formula (10).
In Formula (10), E 0 is the initial energy of the node, and e j is the current energy of node j. This will enable the ant to make the next hop selection according to the energy level of the neighboring node and it also means the node with a higher energy level is more likely to be selected, so it is better able to realize the energy equilibrium of the whole network.
SHORT PAPER STUDY OF WIRELESS SENSOR NETWORK ROUTE BASED ON IMPROVED ANT COLONY ALGORITHM  Each node checks its current energy value in real time. When the energy decreases and exceeds the set amplitude, the adjacent node has to be notified immediately.
In order to prevent the ant colony algorithm from falling into local optimization, scientists have studied the ant colony algorithm and proposed many improvements, among which the optimal ant and MAX-MIN algorithm achieve better results. In order to solve the stagnation problem and prevent it from falling into local optimal solution, a portion of ant types is added apart from limiting the pheromone scope in this algorithm.
1. Normal ant: select the next node depending on Formula (9); 3. Abnormal ant: When there are many choices, delete the node with the largest probability is deleted and a random selection is made from the remaining nodes.
Which kind of ant is selected is decided by their existence probability which can be selected and adjusted for different scenarios depending on the needs.
(3) Adjust he path fitness value The path fitness value is calculated according to Formula (10) as follows: whereJ k w (t) represents the number of nodes that ant k experiences at the time t. The travel of ant k at the time t is represented byw k (t), % is the positive weighting coefficient, and e i is the current energy of the experienced node i. This shows that the fitness value of the path is related to the path length and the number of nodes on this path. The larger the remaining energy of the path node, the larger the fitness value, so that the overall energy consumption of the network tends to be uniform and balanced.
(4) Pheromone update After one iteration is finished, the pheromone for the path the ant has covered will be updated according to Equation (11) and Equation (12) as follows: where&(&'(0,1)) represents the volatile coefficient of the pheromone and 0 represents the strength coefficient of the pheromone.
(5) Iteration implementation Turn to step (2) for repetitive implementation until the specified iteration number N is finished so that the optimal path is achieved.

A. Design of message and routing table
The task of the forward ant is to find the optimal route from the source node to the destination node and send the relevant acquired data. The data structure is shown in Table 1.
The message type, including sending the data message (forward ant), confirming the message (backward ant), SHORT PAPER STUDY OF WIRELESS SENSOR NETWORK ROUTE BASED ON IMPROVED ANT COLONY ALGORITHM greeting message and energy report message, etc. Here, it is sending the data message.
The sequence number of the message is the only identification of each message used for reliable transmission of the message. The control information overhead of the wireless sensor network refers to the specific value of the size of all the data packets in the data volume and sensor network detected and maintained by the route. The simulation results are shown in Figure1. In the flooding protocol, the node broadcasts to all the adjacent nodes after receiving the data packet. This process will continue until the data packet arrives at the destination node or until the end of the preset life cycle, so the network overhead is the maximum. As for the improved ACO algorithm, since the data packets of the forward ant and the backward ant are very small, the network load added by the route control information is also very small. Meanwhile, with the increase of sending rate, although the route control data is increased, the route control information is basically unchanged, so the overhead of route control information of the improved ACO algorithm is decreased.
The next-node ID is the ID of the selected next hop node.
The visited number is the length of the route, based on which the sink node can judge the merits of the route and it affects the path pheromone update.
When the forward ant successfully arrives at the destination through the route, the forward ant will die and the backward ant will be produced which chooses the reverse route to return. Apart from update of the link pheromone during this process, the data packet is confirmed to ensure that the source node data can safely be sent to the destination node. Its data structure is shown in Table 2.
The sensor node periodically broadcasts its energy value to the adjacent node to mutually interact. Its data structure is shown in Table 3.
The energy value of the adjacent node is taken as the heuristic parameter to confirm its next hop, so each node has to check its own current energy value in real time. When the energy decreases and exceeds the set amplitude, its value will be immediately noticed by the adjacent node. Its data structure is shown in Table 4.
To record the route the forward ant has passed, the backward ant finds the next hop depending on this table and finally returns to the original node so as to update the global pheromone and finish the message confirmation of the forward ant. Its data structure is shown in Table 5.
When the node receives the greeting message and energy report message of the adjacent node, table 6 has to be updated immediately. This is to store relevant information of the adjacent node, including the current energy value of the node, pheromone information, etc.
4.2 Detection and establishment process of the route The wireless sensor network applied by this algorithm is assumes as the following: (1)The initial energy value of all the nodes is the same, and each node initially has sufficient energy to communicate with the sink node.
(2)The communication between nodes is two-way; i.e., two adjacent nodes can both send and receive data.
(3) There is a unique Sink node at the zone boundary.
(4) Data arrives at the target node only by multi-hop forwarding, resulting in limited node power.
In the initial stage of the network, the broadcasting is sent by the sink node with sufficient transmitting power to cover the whole network, the sensor operation is started and the message parameter is initialized. After receiving the message, the sensor node broadcasts the greeting message to the adjacent node with the preset transmitting power, based on which the adjacent node generates the neighbor table.
Two kinds of artificial ants are used by this protocol; i.e., forward ant and backward ant. The forward ant is used to look for the path from the original node to the destination node, and the backward ant returns to the source node from the destination node along the path the forward ant has passed so as to update the global pheromone and confirm the message carried by the forward ant. The route realization flow of this algorithm is shown in Figure2.

V. SIMULATION TEST
In this section, the routing algorithm is simulated in the MATLAB 7.0. The algorithm convergence is analyzed, total energy consumption of the whole wireless sensor network and the mean energy to send and receive messages are calculated, and it is compared with other algorithms. Relevant test parameters are shown in Table 7.

A. Performance analysis
The control information overhead of the wireless sensor network refers to the specific value of the size of all the data packets in the data volume and the sensor network is detected and maintained by the route. The simulation results are shown in Figure2. In the flooding protocol, the node broadcasts to all the adjacent nodes after receiving the data packet. This process will continue until the data packet arrives at the destination node or until the end of the preset life cycle, so the network overhead is the maximum. As for the improved ACO algorithm, since the data packets of the forward ant and the backward ant are very small, the network load added by the route control information is very small. Meanwhile, with an increase of the sending rate, although the route control data is increased, the route control information is basically unchanged, so the overhead of route control information of the improved ACO algorithm is decreased.

B. Energy consumption superiority
Total energy consumption of the sensor network is defined as the total energy consumed by the sensor nodes of the whole network. The smaller the total network energy consumption, the smaller the network routing cost, thus the longer the life cycle of the network. With the total sensor energy consumption as the measurement index, this algorithm is compared with the flooding model and its basic ACO algorithm, the results of which are shown in Figure 3.

VI. CONCLUSIONS
The largest communication model of a wireless sensor network lifetime is based on multiple source link with multiple base stations. The data produced from the source node can be transmitted to a different link of base station node. The intermediate node provides data forwarding business, and data translates from the edge of the network SHORT PAPER STUDY OF WIRELESS SENSOR NETWORK ROUTE BASED ON IMPROVED ANT COLONY ALGORITHM nodes to the base station node collection. The data source node perception is though a jump forward to the base station node. The homologous node is possibly routed to a different base station node through a different data link. The homologous node data has a strong correlation, and a different source node can relate data in the process of data fusion. Considering the source data fusion processing that the base station node needs from multiple base station nodes forming a tree structure, the root node is connected to the base station through the virtual link, one of the base station nodes is as a root node, and the root node deletes redundant compressed data before sending data to the terminal receiver.
The ant colony optimization algorithm is applied to the routing selection of the wireless sensor network and is improved in this paper. The multi-path energy ant colony algorithm protocol based on energy equilibrium is proposed. The routing simulation test is conducted in MATLAB7.0 and it is compared with the flooding model, the basic ACO algorithm, and the PACO and EEABR algorithms. The simulation test results show that this algorithm avoids the problems with algorithms such as basic ACO which can easily become stagnant and fall into the local optimal solution. Furthermore, it better balances the relationship between the route length and node energy consumption, so it effectively controls the total energy consumption of the overall network and the mean energy consumption of the network nodes and prolongs the life cycle of the network.