Nature Inspired Range Based Wireless Sensor Node Localization Algorithms

,


I. Introduction
W ireless Sensor Network (WSN) consists of independent similar or diverse types of nodes that monitor the environment. These tiny, autonomous, portable and economical nodes sense the data and pass it to designated location or the base station by using wireless ad-hoc network technique. Each sensor node has a transducer, power supply, microcomputer and transceiver to record and process the sensory data [1]. WSN is being used for many applications like industrial process monitoring, battlefield, forest fire detectors, natural disaster prevention, traffic monitoring, etc. [2]. Most of the applications need location information of the sensor nodes for tracking and monitoring [3].
In WSN, sensor nodes sense and report the events of interest which can be examined when the position of target nodes reporting the event is known. The information gathered at sink node will be in vain without localization information of sensor nodes. The estimation of the position of sensor nodes is one of the important issues of the WSN and is known as localization problem [4]. Localization can be defined as determining the coordinates of unknown nodes called as target nodes using the position of known nodes called as anchor nodes or beacons [5] based on the measurements such as Time of arrival (TOA), Time difference of arrival (TDOA), Angle of arrival measurement (AOA), etc. [6]. The localization issue can be resolved by deploying each node with Global Positioning System (GPS) but this is not preferred due to size, cost and power factors [7]. Moreover, GPS has restricted functionality as it cannot work indoor and underwater. So, an efficient alternative is required for the localization. The non-GPS based localization algorithms can be used which is categorized into range based and range free algorithms. Range based localization algorithms uses point to point distance estimation or angle based estimation between sensor nodes whereas range free localization algorithms do not require range information between target node and anchor node but depends on the topological information. The former provides more accuracy as compared to range free localization algorithms.
The range based localization of nodes has two phases -ranging phase and position estimation phase. In the ranging phase, each target node measures its distance from the anchor nodes using the strength of received signal or the signal propagation time. Accurate measurement of distance is not possible due to noise. There is a noisy range measurement irrespective of the ranging method used whereas in position estimation phase, the information acquired from ranging phase is used to determine position of target node. It can also be estimated using geometric approach or by using an optimization algorithm.
The optimization algorithms are really effective in solving NP-Hard problems like Traveling salesman problem, decision subset sum problem, localization, etc. Localization problem is considered as an optimization problem due to size and complexity factors. The analytical methods of optimization like linear programming takes more computation time for solving optimization problems and increase the complexity as the size of problem increases [8]. This propelled to use nature inspired optimization algorithms for WSN as these are robust and effective [9]. These algorithms became popular from the last decade as they can easily adjust to frequently changing environment and have high efficiency [10]. The various algorithms like Particle Swarm Optimization (PSO) [11], Firefly Algorithm (FA) [12] [13], Genetic Algorithm (GA) [14], Grey Wolf Optimization (GWO) [15], Flower pollination Algorithm [16], etc. have been used to determine positions of target nodes. The objective of the various optimization algorithms in WSN localization is to minimize the position estimation error. These nature inspired algorithms really performed well on benchmark functions and localization problem [17]. The work on FPA based node localization algorithm [18] does not provide comparison of two or more localization algorithms with FPA. The distance between target node and an estimated node for each target node has not been reported. In order to provide a fair comparison, it is necessary to show the behavior of the aforementioned techniques considering other values of the parameters involved in the considered algorithms which has not been done yet.
In this paper, the application of FPA, PSO, FA and GWO for the optimal location estimation of sensor nodes is analysed. All the aforementioned factors are considered for the comparison and analysis. These range based localization algorithms are compared with each other to determine the proficient algorithm which performs better to solve localization issue. Factors like transmission range, number of anchor nodes and number of iterations affecting the localization error are considered and analysed for each localization algorithm and compared graphically. All the localization algorithms are analysed in 36 trail runs by changing number of anchor nodes and target nodes in sensor field in terms of localized nodes, localization accuracy and computation time.
The organization of the rest of the paper is as follows: Section II includes literature survey on WSN. Section III describes the metaheuristic optimization algorithms. Section IV present the localization based on optimization algorithms. In section V, simulation results and comparative study are given and discussed. In section 6, a conclusion along with the future work is presented.

II. Related Work
Localization has become an active research topic in WSN in recent years as exact localization information is really desirable for the performance of WSN. This problem is approached with different methods by the researchers. The localization with Ad-hoc Positioning System (APS)-distributed method in an ad-hoc network is developed by Niculescu [19]. The principle of APS is similar to the GPS but it extends the potential of GPS to non-GPS sensor nodes as position information of anchor nodes is passed to all sensor nodes in the wireless network. For each target node, minimum three anchor nodes are necessary to execute the triangulation or trilateration to determine its location. Another algorithm was proposed by Savarese [20] to improve Niculescu's method which consists of two phases-hop terrain and refinement. Hop terrain phase is similar to the APS. The refinement phase uses an iterative procedure for the accuracy of location of each node which is enhanced by estimating the least square distances from the neighbouring sensor nodes [21]. The sensor nodes in the sensor field work collectively to determine the location but the error is accumulated in the network. To avoid the accumulation, the kalman filter along with the least square estimation method is used to estimate the co-ordinates of location simultaneously as proposed by Savvides [22]. Localization problem is approached with the convex optimization which is based on semi-definite programming [23]. The technique of semi-definite program is extended further to non-convex inequality constraints by Prtaik [24]. Tzu-Chen Liang extends the Pratik's method to apply gradient search method [25]. It uses technique of data analysis called multidimensional scaling (MDS) [26]. The range based anchor less localization algorithms are discussed in [27][28][29].
The localization problem can be considered as an optimization problem. The optimization methods use population based stochastic method to evaluate the location of nodes by minimizing the mean square error [30]. Simulated annealing method was proposed to locate the position of nodes but this doesn't provide good results. An improved simulated annealing method was proposed which has two phases. In first phase, the location of target node is estimated whereas in second phase, the optimization is executed on those nodes that may have flip ambiguity problem [31]. The localization algorithms based on GA are proposed in [14], [32], [33]. To minimize the localization error, localization algorithm based on PSO is proposed [30]. The Biogeography Based optimization (BBO) and H-best particle swarm optimization (HPSO) performs better in terms of accuracy and localized nodes as described in [34]. FPA based localization is also proposed to solve the localization issue [18].

III. Nature Inspired Algorithms
Nature inspired algorithms mimics' nature to solve various hard and complex problems as nature exhibits flexible, robust, diverse and dynamic phenomenon. The nature inspired becomes popular as it can easily adjust to frequently changed environment and the conventional or traditional methods were inefficient. These optimization algorithms really perform well to solve the optimization problems like localization issue, traveling salesman problem, etc. The various algorithms like PSO, FA, FPA, GWO and GA. have been applied to solve the localization problem in WSN. The algorithms which are used for the analysis and comparison are:

A. Flower Pollination Algorithm
FPA is a nature inspired algorithm proposed by Xin-She Yang in 2012 [35]. It is inspired from the natural process 'pollination of flowers'. This metaheuristic algorithm has evolutionary characteristics and its convergence rate is relatively high as compared to other nature inspired algorithms [36].
Pollination is an intriguing process in which pollen grains are transferred from the anther to the stigma with the help of pollinators for reproduction. It has two major types: biotic and abiotic pollination. Biotic requires help of some living organisms like insects, bats etc. to transfer pollen grains whereas the latter are dependent on wind and water for pollination. There is a process known as flower constancy in which some pollinators visit specific species of flowers bypassing others.
Pollination can be attained by two ways i.e. self-pollination and cross-pollination. Self-pollination is defined as the reproduction of flower by the transfer of pollen grains from the same or different flower of the same plant species whereas in cross-pollination, pollinators like birds, bees, bats etc. travel a long distance for pollination and follows Levy flight behaviour in which the step length obeys Levy distribution.
There are four rules which have been derived for FPA based on the characteristics of pollination which are: 1. Global pollination process is attained by considering biotic and cross pollination because various pollinators performs levy flights.
2. Local pollination is attained through abiotic and self-pollination.
3. Flower constancy is defined as the probability of reproduction which directly depends on the similarity of two flowers which are involved.
4. Switch probability p ∈ [0, 1] helps in controlling local pollination (exploitation) and global pollination (exploration). In overall pollination activities, local pollination can have a value of p in significant fraction due to the various factors like physical proximity, wind etc.
These rules are formulated into mathematical equations to have position updating formulas. The two most important steps of FPA are local pollination and global pollination. In global pollination, pollinators carry the pollen grains to the different flowers by traveling a long distance as birds, insects [37]. Through this, exploration can be attained and reproduction of the fittest is ensured.
The first and third rule can be mathematically represented in Eq. (1). * ) (1) Here is pollen i at iteration t or solution vector and * is the global best value in every generation. L is the most important parameter for pollination as the various insects use Levy flight to move over a long distance for pollination [38]. Thus, we draw L > 0 from levy distribution which is valid for large steps i.e. s > 0 [39] and it can be represented as: The local pollination takes place by the transfer of pollen grains with the help of abiotic pollinators from one flower to another. The second rule and flower constancy can be represented mathematically as: where e and are pollens from distinct flowers of the same plant species at iteration t. It imitates the flower constancy in restricted neighbourhood which helps to attain convergence quickly. If and are from same population and ∈ is drawn from a uniform distribution [0, 1], then it becomes a local random walk. Switch probability p helps to switch from local to global pollination and vice-versa. The pseudo code of the FPA is given in Fig. 1.

B. Firefly Algorithm
FA was proposed by Xin she Yang in 2009 and it was mainly inspired from the flashing qualities or characteristics of fireflies [40]. The fireflies get attracted to each other despite of their sex. Attractiveness between fireflies depends directly on the brightness due to which less luminous fireflies will be attracted towards brighter firefly. But attractiveness decreases with an increase in distance between them [41]. If there is no brighter firefly available, then firefly will move randomly in the search space. The brightness of the firefly is evaluated by the objective function which is to be optimized [42]. The brightness determines the attractiveness between fireflies corresponding to the objective function. FA is mainly based on two important factors i.e. change in light intensity and formulation of attractiveness [43]. The intensity of light I changes with distance r having a constant light absorption coefficient which is described mathematically as follows: (4) Here Io represents light intensity at initial value. The attractiveness between fireflies is relative which is seen or judged by fireflies and it varies with distance r between two fireflies. Thus, the attractiveness β is defined as follows which is corresponding to the light intensity judged or seen by fireflies. (5) Here the represents attractiveness between fireflies when distance r is 0. The Cartesian distance method is used to calculate distance between two fireflies. The firefly i move towards the brighter firefly j which is determined with the help of Eq. (6). (6) The second part of the equation represents the attractiveness and the third part is for randomization where the parameter α lies in the range of [0, 1] which helps in randomization and is a random variable whose value is drawn from Gaussian distribution. The pseudo code for this algorithm is given in Fig. 2.

C. Particle Swarm Optimization
The PSO algorithm was proposed by Kennedy and Eberhart [44]. This algorithm is mainly inspired from the behaviour of birds flocking in nature. The flock of birds communicate with each other while migrating to the destination and find the bird at best position. Each bird in the flock moves towards best position with velocity dependent on the current position of the bird and then, they explore the search space from their new positions. The process is reiterated until they reach their destination [45].
In this algorithm, the social interaction and intelligence of birds are involved. The birds grasp knowledge from their own experience as well as the experience of other birds [46]. Each particle or bird possesses three values i.e. the present position ( ), the local best value ( ) and their velocity ( ). The objective function helps to find out the best particle's position ( ). Every particle in the flock updates their velocity with respect to best particle using following mathematical formula given in Eq. (7).
Here rand ( ) and Rand ( ) are two random functions whose value lies in the range [0, 1]. The and parameters are acceleration constants or learning factors and w represents inertia weight which is mainly used to control the impact of previous velocities of particle on current velocity. The second part of the equation is used to compare the particle's current position to its own local best position whereas third part compares the particle's position to the global best particle. The position of a particle using new velocity is updated with the help of Eq. (8). to control the effect of change in particle's velocity. The pseudo code of PSO algorithm is given in Fig. 3.

D. Grey Wolf Optimization
Grey Wolf Optimizer (GWO) is a nature inspired algorithm proposed by Mirjalili et al. in 2014 that focuses on social behaviour of grey wolves [47]. This algorithm is inspired from grey wolves that belong to canidae family. It simulates the leadership quality and the hunting behaviour of grey wolves in three steps as tracking, encircling and attacking. Grey wolves consists of 5-12 wolves. Grey wolves live in pack that contains 5-12 wolves. α, β, δ and ω are four types of grey wolves following a strict social hierarchy. α is the dominant wolf among the other grey wolves that makes different decisions which are followed by other submissive grey wolves. β grey wolf is second in the hierarchy after α grey wolf. β grey wolf help the dominant leader α to make decisions about sleeping etc.
Approaching and encircling the prey are behaviour of team hunting followed by the grey wolves' pack which is mathematically modelled in Eq. (9) and Eq. (10).
Here and represents the position vector of grey wolf and prey.
Vectors and are depicted with the help of following equations: Here Here and are random vectors in range [0, 1] and parameter r is linearly decreased from 2 to 0. The best three solutions are saved and further the candidate solutions i.e., grey wolves update their positions accordingly. Social behavior of hunting mechanism is mathematically derived using Eq. (13), (14) and Eq. (15).
At the end, when the last criterion specified will be satisfied, GWO algorithm will get terminated and the best position of α wolf will be considered as the outcome. All the steps are presented in pseudo code which is given in Fig. 4.

IV. Localization Using Nature Inspired Algorithms
The objective of sensor node localization using nature inspired algorithms is to evaluate the position of the maximum number of target nodes using analytical information about the position of anchor nodes. The localization problem can be formulated as an objective function which is to be minimized using nature inspired algorithm. The overall flowchart of range based distributed localization of sensor nodes using nature inspired algorithm is shown in Fig. (5).
The following steps are followed to perform node localization of each target node in WSN: 1. M target nodes and N beacons or anchor nodes are deployed randomly in the sensor field. Each anchor node has transmission range R. The localized nodes act as beacon in next iteration to remove flip ambiguity problem.

Start
Deploy target nodes and anchor nodes in 2-D sensor field.
Estimate distance between target node and anchor node If each target node has anchor nodes within transmission range >= 3  2. The distance between each target node and anchor node is measured. There is an additive white Gaussian noise which blurs the measurement. Each target node's distance from every anchor node is measured as where is the actual distance and is the measurement noise which has gaussian distributed random value in the range ( ) which really affects the performance of the localization algorithm as the localization error increases with the increase in noise. The actual distance can be measured by using the Eq. (16): Where (x, y) and ( , ) are the coordinates of target node and anchor node respectively.
3. The target node that has anchor node ≥ 3 within its transmission range is known as localizable node. This target node is localized using an optimization algorithm.
4. For each target node, an optimization algorithm is executed independently. Initialize the particles of the algorithm with the centroid of the anchor nodes (within the transmission range) by using the Eq. (17) as follows: 17) where N is the number of the anchor nodes within transmission range of each target node.
5. The algorithm minimizes the objective function or error for the localization problem in WSN which is given mathematically in Eq. (18). (18) where N ≥3 are the number of anchor nodes within transmission range, ) is the anchor node within the transmission range and (x,y) is the position of the particles. 6. FPA finds the optimal value (X, Y) after the maximum number of iterations.
7. When the position of all localized nodes get estimated, compute the average localization error to find the localization accuracy by using the Eq. (19) as follows: where ) are the coordinates of actual node, ( , ) are the coordinates of estimated position and is the total number of localized nodes. Localization accuracy is better if value of and is less.
The number of localized nodes increases as the iteration increments. A node that has been localized can be used as a beacon for the next node. This decreases the problem of flip ambiguity as more references are available for the localized node. However, this increases the computation time.

V. Simulation Results and Discussion
The simulation of WSN localization is conducted using PSO,

A. PSO Based Localization
The performance of PSO based localization with different parameters is analysed and summarized in Table 1. The parameter values that result in less localization error are considered. The inertia weight is an important parameter to control the effect of the previous velocities on the existing velocity and the parameters and is the learning factors. The number of particles n helps to localize a target node by updating the position according to optimization algorithm. The number of iterations represents the number of times the position is updated to find an optimal solution. The parameter values that works best for localization is considered for PSO based node localization algorithm which are as follows.  The PSO based localization algorithm is conducted using above parameters for specified number of iterations to find the localization information. The localized nodes, 50 target nodes and 15 anchor nodes are depicted in Fig. 6.

B. FA Based Localization
Each localized node runs FA to estimate the position of sensor nodes in the sensor field. The performance of FA based localization is evaluated by tuning parameters and summarized in Table 2. The parameter γ is the light absorption coefficient which is really important for the convergence of the algorithm. The value of randomization factor α lies between [0, 1] and β is the initial attractiveness when the distance between two fireflies is 0. The value of n shows the number of fireflies to be deployed in the sensor field to attain the localization information by running the algorithm for specified number of iterations.
The parameters which shows less localization error are considered for localization which are:

C. GWO Based Node Localization
The performance of GWO based node localization algorithm considering the parameters is summarized in Table 3. The vector is a controlling parameter for exploration and exploitation in an algorithm which linearly decreases from 2 to 0. The numbers of grey wolves or particles n helps to determine the localization information of target node by updating their position.
The following parameters are considered for the localization of target nodes using GWO:  GWO based node localization of 50 target nodes with 15 anchor nodes is illustrated in Fig. 8 which shows target nodes, localized nodes and anchor nodes.

D. FPA Based Node Localization
The performance of the FPA based localization algorithm is analysed and summarized by considering parameters in Table 4.    Table 5 which shows that FPA performs better with respect of localization error and un-localized node. The computation time taken by PSO is less than other algorithms. GWO performs less among other algorithms in terms of localization error. The initial deployment of sensor nodes is random due to which the localization accuracy, the number of un-localized node and the total computing time will be different for every run of the localization algorithm. The beacons, target node and the position estimated by the algorithms like PSO, FA, GWO and FPA are shown in Fig. 6, 7, 8 and  9 respectively The transmission range, additive Gaussian noise and the number of anchor nodes are the important parameters to determine the localization error. The performance of localization algorithms is influenced by these parameters. Dependency of the percentage of the localized node on the number of anchor nodes for FA, PSO, GWO and FA based localization algorithms is shown in Fig. 10. The performance of the localization algorithm depends on the density of anchor nodes. It is difficult to locate position of nodes if sufficient number of anchor nodes (N >= 3) are not available. The less number of anchor nodes localize very few number of target nodes. Location estimation accuracy and the percentage of localized nodes increase with the increase in anchor node density. The increase in transmission range of anchor nodes helps in improving the performance as the number of anchor nodes within transmission range of each target node will be more. This will also increase the number of localized nodes. The dependency of localized nodes on the transmission range for FA, PSO, GWO and FPA is shown in Fig. 11. Smaller transmission range localizes very less number of sensor nodes.  Gaussian additive noise is also an important parameter that has a great impact on localization accuracy. As noise in distance measurement increases, increases which leads to decrease in localization accuracy. Due to this, all the experiments are conducted by considering Gaussian noise The localization accuracy also improves with the increase in number of iterations as shown in Fig. 12. As the number of iteration progresses, the localization error declines. FPA shows more decline in the error as compared to other two algorithms.
The distance between target node and estimated node for varying number of target nodes is shown in Fig. 13. In this estimated distance for each target node using optimization algorithms is compared which shows FPA based node localization performs better for target nodes which shows its proficiency. Node localization based on FA, PSO, GWO and FPA algorithms by varying number of anchor and target nodes is summarized in Table 6. All the experiments are conducted with different configurations in 36 trails. All the optimization algorithms performed well to estimate the location of nodes in WSN. The FPA based localization algorithms provides less localization error for each number of target nodes whereas PSO estimate the position in less computing time but it has high localization error. It shows better localization accuracy to estimate the position than FA, PSO and GWO localization algorithms in terms of mean square error. But the computing time required by FPA in locating the sensor nodes is more than other optimization algorithms. However, the performance of GWO is comparative less to other algorithms like FA, PSO and FPA in terms of localization accuracy and computation time.

VI. Conclusion
Localization of sensor nodes is really important for the performance of WSN as many applications of WSN require localization information. The main objective of this optimization problem is to minimize the localization error with the help of nature-inspired optimization algorithms. In this paper, node localization using meta-heuristic optimization algorithm like Firefly Algorithm (FA), Particle Swarm Optimization (PSO) and Grey Wolf Optimization (GWO) algorithm is conducted to determine the position of the sensor nodes in WSN. This paper has analysed the localization problem and solved it with different optimization algorithms and provides the summary of results by comparing the algorithm with the each other in terms of localization error, localized nodes and computing time. The FPA based node localization algorithm shows better localization accuracy in estimating the position than other algorithms. GWO performs comparative less with respect to localization error and computation time among the optimization algorithms. These distributed localization algorithms are better than centralized algorithms as the number of transmissions to the sink node is reduced which helps to conserve the energy of sensor nodes. These localization algorithms further can be implemented for centralized method and can be compared with distributed method for analysis. FPA can be hybridized with other optimization algorithm to further minimize the location estimation error. These optimization algorithms can be implemented in 3D scenario to find localization accuracy. The parameter values can be varied to improve the optimization algorithm to improve convergence rate, localization accuracy and computation time.