A Genetic Algorithm Based Minimal Maximal Load Tree Routing Algorithm in Wireless Sensor Networks

,


Introduction
Wireless sensor networks consist of homogeneous, tiny sensors that can measure the environment nearby and report sensed data to the sink.With the development of computer, communication, electronic, and other technologies, wireless sensor networks have become an important technology and have been widely applied in many fields, such as military, environment, and space exploration [1][2][3][4][5][6][7].In wireless sensor networks, all sensors are powered by lightweight batteries.Therefore, limited energy of sensors constrains network lifetime and is a serious bottleneck.And how to improve energy efficiency, thereby extending network lifetime, is a critical issue in the study of wireless sensor networks [7][8][9][10].
Many energy efficiency routing algorithms have been proposed in order to improve energy efficiency and extend network lifetime.These proposed algorithms fall into two types: static routing algorithms and dynamic routing algorithms.With the former, only one routing is constructed and it is used during the whole network duration.With the latter, multiple routings are constructed and used based on changing status of a network.Although dynamic routing can respond to changing status of a network, it needs to obtain current status of the network, such as all sensors' current residual energy, which requires that networks meet some specific conditions.For example, with Ratio- [11] or Sum- [11], it is assumed that there is enough time between two times of data gathering so that all sensors can report their current energy to the sink [11].Therefore, dynamic routings are only suitable for the networks meeting some specific conditions and not universally suitable for all networks.On the contrary, static routings usually do not require networks to meet specific conditions and can be applied to all applications because they need not obtain changing status of a network.
Many static routing algorithms have been proposed.The key issue of static routing algorithms is how to construct a routing tree that is utilized during the whole network duration.Usually, the energy consumed to deliver a data packet between two sensors is set as the weight of the link between the two sensors [11,12].PEDAP (Power Efficient Data Gathering and Aggregation Protocol) [12] constructs a routing tree based on MST (Minimum Spanning Tree) algorithm.However, it is pointed out that the optimal routing tree is not MST, but LET (Least Energy Tree) [12].LET constructs a minimum path tree with the sink as the root.Therefore, each sensor sends its data packets to the sink with the least energy consumption and the energy consumption of the whole network is also minimal [11].
Network lifetime of wireless sensor networks has two definitions in two kinds of applications: (1) in some applications, network lifetime is defined as the time when the first sensor depletes its energy and dies because the network loses its efficacy even if only one sensor dies and (2) in other applications, the fact that one or a few sensors die has no effect on the application.And network lifetime is defined as the time when a certain proportion of sensors die because only this leads to the fact that the network loses its efficacy [3].
With static routing algorithms, each sensor consumes the same energy in each data gathering because the routing is constant.We define a sensor's energy consumption in each data gathering as the sensor's load.For an application which defines its network lifetime as the time when the first sensor dies and adopts static routing algorithms, its network lifetime is decided not by energy consumption of the whole network but by the load of the sensor with the maximal load because the first dead sensor must be the one with the maximal load.Therefore, the optimal routing tree is the routing tree minimizing maximal load of all sensors, which is named Minimal Maximal Load Tree (MMLT) by us.However, it is very difficult to find the MMLT in a network.This is because the process of constructing a routing tree is complex and most networks have large numbers of possible routing trees, especially when a network has quite a few sensors.
In this paper, we have proposed an algorithm that finds approximate MMLT.The genetic algorithm (GA) is adopted in our algorithm to find approximate MMLT because the GA is a stochastic searching and optimizing technology and appropriate to solve complex problems having huge numbers of possible solutions [9].In detail, all sensors are divided into different layers according to their minimal hops to the sink.For a sensor, its neighbor sensors in its next layer closer to the sink are its possible parent sensors.A routing tree is constructed as an individual of the GA after each sensor is designated a possible parent sensor.And the objective function of the GA is minimizing maximal load of all sensors.Thus, an approximate MMLT can be obtained.Although routing trees obtained by our proposed algorithm are only approximate MMLT, they still can improve energy efficiency and prolong network lifetimes compared to traditional rooting algorithms because they decrease the maximal load of all sensors.
The remainder of this paper is organized as follows: in Section 2, we describe related works of routing algorithms; in Section 3, we present the model of our work; in Section 4, our proposed algorithm is described minutely; experimental results are provided and analyzed in Section 5; finally, this paper is concluded and future work is presented in Section 6.

Related Works
In this section, we summarize some routing algorithms that have been proposed to extend network lifetime.
As mentioned before, routing algorithms in wireless sensor networks have been widely studied and many energy efficient routing algorithms have been proposed in order to extend network lifetime.In this section, we summarize some of these routing algorithms.We also summarize some applications of the GA in the study of routing in wireless sensor networks.Some routing algorithms are proposed based on Flooding or Gossiping [13,14].For example, a gossip-based routing algorithm was proposed in [14].With this routing, for a route quest received by a sensor the first time, the sensor broadcasts it with the probability  and discards it with the probability 1 − ; and for a route quest received by the sensor not the first time, the sensor discard it [14].Routing algorithms based on Flooding or Gossiping produce and forward too much route quests that waste sensors' energy and limit network lifetime [11].
In [12], PEDAP (Power Efficient Data Gathering and Aggregation Protocol) was proposed.PEDAP computes a routing tree with MST (Minimum Spanning Tree) algorithm by setting the energy cost delivering a data packet between two sensors as the weight of the link between them [11,12].However, routing trees constructed with MST are not optimal energy efficient routing trees and cannot obtain long network lifetime [11].
Based on PEDAP, another algorithm, PEDAP-PA (Power Efficient Data Gathering and Aggregation Protocol-Power Aware) [12], was proposed.With PEDAP-PA, the sink periodically estimates each sensor's residual energy based on the current routing and computes the weight from sensor  to sensor  as follows: (see [12]), where (, ) is the energy consumption sending a packet from sensor  to sensor  and   is the residual energy of sensor .And routing trees are periodically constructed with the MST algorithm [12].However, it is a dynamic routing algorithm and not suitable for all applications.
In [11], it is pointed out that the optimal routings are not the routings constructed with MST algorithm, but the routings constructed with LET (Least Energy Tree) algorithm which constructs a minimum path tree with the sink as the root [11].And two dynamic routing algorithms, Ratio- and Sum-, were proposed.It is assumed that there is enough time between two times of data gathering.Before each round of data gathering, all sensors report their residual energy to the sink, and the weight between sensor  and  is computed as follows: (see [11]), where the former is used in Ratio- and the latter is used in Sum-.And then a routing is constructed with LET algorithm [11].However, these two algorithms are dynamic routing algorithms and cannot be applied to all applications.
In [9], a GA based algorithm for energy efficient routing in two-tiered networks is proposed.The bottom tier is sensors and the upper tier is relay nodes with higher power.Relay nodes act as cluster headers, receive data from sensors, and forward the data to the sink through the network formed among them.Network lifetime is mainly determined by relay nodes.The proposed algorithm schedules the data gathering of relay nodes with GA and notably extends network lifetimes.The algorithm is designed for networks with relay nodes, while our proposed algorithm is designed for networks without relay nodes.
In [15], GA is applied to select cluster headers from sensors.In detail, the whole network is divided into some areas, and some sensors in each area act as cluster headers.Cluster headers in each area form a chromosome.Then the most suitable solutions of cluster heads in each area for each round are obtained with GA.The algorithm increases network lifetime.However, it is only suitable for networks with clustering hierarchy.
In [16], GA is applied to solve the optimization problems of finding combinations of sensors detecting and/or locating targets.The algorithm decreases the energy consumption of the whole network.In [17], GA is applied to allocate different detection methods to different sensors in order to increase detection probability.However, the two algorithms are designed and suitable for the applications of detecting targets.

The Model
We have considered a square area in which some homogeneous sensors are randomly and evenly deployed, and one fixed sink is deployed at the center of the area.The sensors are powered by lightweight batteries and have limited energy.And the sink is assumed to have limitless energy, memory, and computing power.After the network is deployed, sensors obtain their positions by GPS or other technologies and report their positions to the sink.Therefore, the sink has the data of each sensor's position [18].
The first order radio model [19] is adopted as our radio model.The energy consumed by a sensor to receive  bits is (see [11,19]), where  elec is the energy consumed by transmitter or receiver circuits to send or receive one bit.The energy consumed by a sensor to send  bits is (see [11,19]), where  is the distance between the sending sensor and the receiving sensor,  amp   is the energy consumed by transmit amplifier to send one bit, and  is called path loss exponent with the value 2, 3, or 4. Therefore, the total energy consumed by sensor  to send  bits and sensor  to receive  bits is (see [11,19]).

A Genetic Algorithm Based Minimal Load Tree Routing Algorithm
As mentioned before, the key issue of static routing algorithms is how to construct a routing tree that is utilized during the whole network duration.And usually, the energy consumed to deliver data packets between two sensors is set as the weight of the link between the two sensors.Some routing algorithms, such as PEDAP (Power Efficient Data Gathering and Aggregation Protocol), are based on MST (Minimum Spanning Tree), that is, construct routing trees by Prim algorithm [12].However, these routing trees are not optimal routing trees because they do not aim at reducing energy consumption of the whole network.Therefore, routing algorithms based on LET (Least Energy Tree) are proposed.These algorithms, such as Sum- and Ratio-, construct a minimum path tree with the sink as the root by Dijkstra algorithm.Therefore, all sensors send their data packets to the sink with the least energy consumption and energy consumption of the whole network is also minimal [11].
In [9], it is pointed out that network lifetime is mainly determined by the maximal energy consumption of all relay nodes in each data gathering in two-tiered networks [9].Similarly, for applications with their network lifetime as the time when the first sensor dies and adopts static routing algorithms, their network lifetime is decided not by energy consumption of the whole network but by the load of the sensor with the maximal load because the first dead sensor must be the one with the maximal load, where the load is defined as a sensor's energy consumption in each data gathering.For example, a small network is shown in Figure 1, in which node 0 is the sink.In the figure, the number beside a link is the weight of the link (i.e., the energy consumed to deliver a data packet between two sensors) and the number beside a sensor is its load, and to simplification, only energy consumed to send data packets is considered because the energy consumed to receive data packets is little, and it assumed that each sensor generates only one data packet in each data gathering.(1) is the network's topology and (2) is the LET constructed by Dijkstra algorithm.As can be seen in the figure, (2) obtains the least energy consumption of the whole network, and its maximal load is (1+1+1+1)×4 = 16, at sensor 2. However, in (3), the maximal load is (1+1+1)×4 = 12, at sensor 2. Therefore, (3) has smaller maximal load and can obtain longer network lifetime than (2).
Therefore, for applications with their network lifetime as the time when the first sensor dies and adopts static routing algorithms, optimal routing trees are the ones minimizing maximal load of all sensors and we named such routing trees Minimal Maximal Load Tree (MMLT).However, it is very difficult to find MMLT because the procedure of constructing a routing tree is complex and the number of possible routing trees in a network is very huge, especially when the network contains many sensors.In this paper, we applied the genetic algorithms (GA) to find MMLT because the GA is a stochastic searching and optimizing technology and appropriate to solve complex problems having huge numbers of possible solutions [9].Although routing trees obtained with our proposed algorithm are only approximate MMLT, they aim at decreasing the maximal load of all sensors, improve energy efficiency, and prolong network lifetimes.
The symbols used in our proposed algorithm are listed as follows: gen: the number of generations in the GA,  pop: the size of population in the GA, : the probability that an individual is chosen to perform crossover in the GA, : the probability that an individual is chosen to perform mutation in the GA, : an individual in the GA, : the sink, V: a sensor,  0 : the tree constructed with the Dijkstra algorithm when all weights of links are set 1, ℎ(V): the number of hops from sensor V to  in  0 , (V): the set of neighbor sensors of V in  0 , (V): the set of possible parent sensors of V in  0 , LT: the network lifetime, : initial energy of sensors,  max : the maximal load of all sensors.
And the procedure of the GA is shown in Algorithm 1.

Genetic Coding.
Each individual corresponds to a routing tree.And each gene corresponds to a sensor's parent sensor.First, the weights of all links are set 1 and the tree  0 is constructed with the Dijkstra algorithm.For each sensor V, its number of hops to the sink in  0 , ℎ(V), can be obtained.And all sensors are divided into different layers in accordance with their values of ℎ(V).Then, the set (V) can be obtained by the following: For sensor V, it is randomly designated a sensor from (V) as its parent sensor.Obviously, since each sensor is designated a sensor from its closer layer to the sink as its parent sensor, a routing tree is constructed after all sensors are designated.Thus an individual is generated.For example, the routing tree in Figure 1(3) corresponds to the individual in Figure 2.

Fitness Function.
The fitness function is defined as the maximal load of all sensors.For individual , a routing tree can be constructed based on it.Then, it is assumed that each sensor generates a data packet and the data packet is forwarded to the sink according to the routing tree.Energy consumption of each sensor receiving or sending the data packet can be computed with (3) and (4) [9].After all sensors are assumed to generate and send a data packet to the sink, energy consumption of each sensor during the procedure can be computed, the sensor with maximal energy consumption can be found, and the maximal energy consumption is  max corresponding to , also the fitness function value of individual .

Initial Population and Selection.
First, a population involving  pop individuals is randomly generated.Selection is performed with the Roulette-Wheel or ranking selection method to eliminate inferior individuals and reserve good individuals.In selection, the probability that an individual is selected increases with its value of fitness function.

Crossover.
Each individual is randomly selected to perform crossover with the probability .Two selected individuals performed crossover to produce new offspring.In this paper, we have adopted the uniform crossover operator [20,21].For each gene in the individuals, it is chosen to perform crossover with a probability.For example, two individuals performed crossover in Figure 3, where the 2rd, 4th, and 5th genes are chosen to perform crossover.

Mutation.
Mutation is performed to avoid previous convergence.Each individual is selected with the probability .For an individual selected to perform mutation, each of its genes is chosen to mutate with a probability [17,18].For the sensor corresponding to the gene selected to mutate, V, a new parent is randomly selected from (V) to perform mutation.An example of mutation is shown in Figure 4, where the 5th gene is selected to perform mutation.
Our proposed algorithm is a centralized algorithm.After the network is deployed, each sensor reports its position to the sink.The sink computes a routing with our GA based algorithm.Then the sink broadcasts the computed routing to the whole network before the network operation.Although the computation of the GA is huge, the computing process does not affect the application because the sink is assumed to have powerful computing capability [18] and the computing process is performed only once before the network operation.

Parameters Values
The number of generations  gen 100 The size of population  pop 5000 The probability that an individual is chosen to perform crossover  0.80/0.85/0.90/0.95 The probability that an individual is chosen to perform mutation  0.10/0.20/0.30/0.40

Experimental Validation
Simulations are performed with OMNet++ to validate our proposed algorithm.We have compared the following three static routing algorithms in the experiments: (1) Power Efficient Data Gathering and Aggregation Protocol (PEDAP) [12], with which routing trees are constructed by MST (Minimum Spanning Tree); (2) Least Energy Tree (LET) [11], with which routing trees with the sink as the root are constructed by Dijkstra algorithm; (3) our proposed GA based Minimal Maximal Load Tree routing algorithm (GA-MMLT), with which approximate MMLT is constructed with the GA.
The values of the main simulation parameters are shown in Table 1.
The values of the main parameters in the GA are listed in Table 2.We have set the size of population a large number because the number of the possible individuals (i.e., routing trees) is very huge.Additionally, an elitist approach is adopted, with which 5% of the individuals with the best fitness function values are permitted to proceed the next generation [9,21].
Network lifetime is defined as the time when the first sensor exhausts its energy and dies [3,11].We have compared network lifetimes obtained in different networks with different number of sensors.The experimental results are shown in Figure 5, where each dot is the average value of 5 networks.As can be seen in the figure, our proposed GA-MMLT notably increases network lifetime.With GA-MMLT, network lifetime is prolonged by about 66% on average compared to LET and about 273% on average compared to PEDAP.PEDAP or  LET does not consider the maximal load of all sensors, while GA-MMLT does.Therefore, network lifetimes obtained by PEDAP or LET are shorter than network lifetimes obtained by GA-MMLT which reduces the maximal load of all sensors with the GA.We have also compared total energy consumption of the whole network in each data gathering using the three static routing algorithms.The experimental results are shown in Figure 6.As can be seen in the figure, LET performs best in this metric, GA-MMLT takes second place, and PEDAP performs worst.This is because LET aims at reducing energy  consumption of the whole network.Although GA-MMLT consumes more total energy of the whole network in each data gathering than LET, it obtains longer network lifetimes because it obtains approximate minimal maximal load of all sensors.
Additionally, we have compared network lifetimes obtained by GA-MMLT using different values of  and .The experimental results are shown in Figure 7.As can be seen in the figure, network lifetimes obtained by GA-MMLT using different values of  and  are very close, where  = 0.90 and  = 0.30 have slight advantage.This shows that GA-MMLT can obtain close performance using different values of  and .

Conclusion and Future Work
In this paper, we have illuminated that, in applications which define network lifetime as the time when the first sensor dies, the key of extending network lifetime is not the energy consumption of the whole network but the maximal load of all sensors and named the routing tree minimizing maximal load of all sensors as the Minimal Maximal Load Tree (MMLT).And furthermore, we have proposed a routing algorithm based on the genetic algorithms (GA) to find approximate MMLT because the procedure of constructing a routing tree is complex and the number of possible routing trees in a network is very huge, especially when the network contains many sensors.In our proposed algorithm, each individual corresponds to a routing tree, and the fitness function is defined as the maximal load of all sensors in accordance with the routing tree.After some generations of selection, crossover, and mutation, an approximate optimal individual (routing tree) is obtained.Thus, the time the first sensor dies is postponed and network lifetime is extended.For the future work, we plan to propose a novel algorithm that can find the authentic MMLT.

Figure 1 :
Figure1: A small network in which node 0 is the sink.(1) The network's topology, (2) the LET, and (3) the routing tree with smaller maximal load than LET[11].

Figure 4 :
Figure 4: An example of mutation, where the 5th gene is selected to perform mutation[9].

Figure 5 :Figure 6 :
Figure 5: Network lifetime obtained by the three static routing algorithms.

Figure 7 :
Figure 7: Network lifetimes obtained by GA-MMLT using different values of  and .

Table 1 :
The values of the main simulation parameters.

Table 2 :
The values of the main parameters in the GA.