# Techniques Used to Improve Localization

**1.7.1 Features of Optimization Techniques**

The features of optimization techniques are listed below.

**1.7.1.1 Speed**

In real-time environments, the convergence rate of the localization algorithm used should be fast enough.

**1.7.1.2 Adaptability**

The system should adapt to the environment and report accordingly, in case the node fails.

**1.7.1.3 Self-Organizing Capability**

The system will have self-organizing capabilities, meaning that, in cases of mobility, it will re-organize the network itself. Some pre-defined rules and instructions are posed on the network, so that system will adapt the changes accordingly.

**1.7.2 Genetic Algorithms (GA)**

This is a technique based on search and optimization and is used for finding the estimated results. It begins its search with random solutions and these solutions are assigned a fitness function that is relative to their objective function. Then, a set of new populations is formed by using three genetic operators, named as reproduction, cross-over and mutation [86]. An iterative operation in GA takes place using all three operators until a terminated criterion is not reached. For decades, GA has been used in a wide variety of applications, because of its simplicity. The basic flow of genetic algorithms is given in Fig. 1.10.

**1.7.3 Particle Swarm Optimization (PSO)**

A technique developed by Kennedy and Eberhart is known as PSO [87], based on the behavior of birds. It is an efficient algorithm and its implementation stage is easier. A random number of particles is deployed in the search space and the objective function is calculated accordingly. Then, the movement is applied to the particles deployed in the search space [88]. A particle moving in the search space collects ‘pbest’ and ‘gbest’ positions in the space. The idea is illustrated in Fig. l.l l.

FIGURE 1.10 Genetic algorithm

**1.7.4 Biogeography Based Optimization (BBO)**

In BBO, the term HIS (Habitat Suitability Index) represents the fitness function. The higher the value of HIS, the better the place is for the species to live, whereas lower HIS values indicate an inappropriate place for the species to live. The basic idea about the BBO algorithm is shown in Fig. 1.12.

**1.7.5 Firefly Algorithm**

The firefly algorithm was proposed by Yang [89]. The behavior of fireflies is used in this algorithm and the rules followed by the fireflies are as follows:

All fireflies are unisex as they move from one place to another notwithstanding of sex [90].

The parameter which attracts the fireflies towards each other is attractiveness, which is directly proportional to the glowing nature of the fireflies, and, as they move a certain distance apart, their brightness is reduced. So, fireflies will not follow each other in that particular case. If there is no brighter

FIGURE 1.11 PSO

firefly found, then this event is random in nature. The fitness function in this case is represented by the glowing nature of fireflies. Then, according to these rules, the firefly algorithm is represented in Fig. 1.13.

According to the Free Lunch theory, no single algorithm is best-suited to each optimization problem. There are many more types of optimization algorithms that are reported in the literature, which can be applied to localization problems to check their performance.

FIGURE 1.12 BBO

# Criteria for Evaluation and Performance Parameters

In WSNs, multiple errors occur, such as errors due to range problems, errors due to non-availability of GPS signals and sometimes localization algorithms, which are used for certain applications, degrade the accuracy of the system. Range error arises due to incorrect measurements carried out on the basis of distances. Similarly, errors in anchor position lead to a GPS error. There are certain parameters on which the performance of the algorithms depends on accuracy in terms of location, its cost and coverage. The evaluation procedure is described in Fig. 1.14.

• Accuracy in Location: In this, the difference between the node’s original position and the estimated position is calculated using any localization algorithm and the difference between the two leads to an error. By using

FIGURE 1.13 Firefly algorithm

FIGURE 1.14 Procedure for evaluating the performance this information, the determination of the accuracy parameter is calculated; the smaller the error, the greater will be the accuracy, and *vice versa.*

- • Flexibility to Error and Noise: The localization algorithm chosen for the determination of location should be flexible enough to combat errors or noises originating from the input side.
- • Coverage: The coverage parameter depends upon a few conditions, such as the number of anchor nodes deployed in the sensing field. The larger the number, the better the coverage.
- • Cost: In this, the cost parameter is evaluated on the basis of power consumed and the time taken by the algorithms to localize the nodes, so that communication between the nodes can be initiated.

## Parameter Calculations on the Basis of Accuracy

The accuracy term is used to match the positions of the actual and the estimated target nodes. The difference between the two positions leads to errors and these errors are named the Mean Absolute Error and the Root Mean Square Error.

Mean Absolute Error (MAE): MAE is basically calculated with respect to the continuous variables and it is an important parameter for finding out the accuracy of a localization algorithm used in a specified application. The equation for MAE is Eq. (1.5), where (x,, *y„* z,) is the current position, (x_{(}„ *y _{e}, zj* is the calculated position, and

*N,*represents the total number of sensor nodes deployed.

Root Mean Square Error (RMSE): This parameter also represents a measure of accuracy and is given by Eq. (1.6),

## Evaluation on the basis of cost metrics

In almost every application, cost factor determination plays an important role. In the context of localization, the parameters which contribute to the cost are power consumed during the set-up stage, how many anchor nodes are required for this process, and the total time required to localize all the nodes in the network. If lifetime enhancement of the network is important at the same time, cost management also plays an equal role. There is a trade-off between these two. The ratio of known positions of the anchor nodes to the unknown positions, power consumed, and time taken by the localization algorithm to localize all the nodes play important roles in determining cost metrics.

• Anchor to Target Ratio: In terms of cost metrics, anchor nodes are the ones which are deployed in the sensing field with GPS features enabled in them.

In order to save the cost, we need to install only a few anchor nodes in the field as they are expensive, and, in order to localize the target nodes, this terminology is used. It is defined as the number of anchor nodes required to localize the target nodes.

- • Overhead during Communication: As the number of sensor nodes deployed in the sensor field increases, the communication overhead also increases to a greater extent. The overhead can be calculated by finding out the total number of packets sent.
- • Convergence Time: The time taken by the localization algorithm to collect all the information regarding localizing all the nodes present in the network represents the convergence time. As the network size increases, this parameter is affected.
- • Algorithmic Complexity: Algorithmic complexity is always defined with some standard notions (O), where the higher the order, like
*0(n*and^{3})*0(n*the longer time it will take to converge, with this parameter representing the complexity.^{2}), - • Power Consumed: This parameter is important in terms of cost as it calculates the power consumed in a localization process.

# Conclusions

In this chapter, the two different scenarios, the Static and Dynamic issues of WSNs, are discussed. There are two main stages on which estimation of a sensor node’s location depends, i.e., the measurement stage and the computational stage. Furthermore, they are classified on the basis of range based or range free, anchor based or anchor free, and the mobility scenario has already been discussed. There are certain challenges faced in the localization process. The major challenge is to localize the sensor node’s location in 2-D and 3-D scenarios. Many optimization techniques have been used to estimate the accurate locations of the sensor nodes. Still, there are open questions in this research area, like the localization in mobility-based scenarios and the use of smaller numbers of anchor nodes to save costs. Therefore, one can introduce different optimization techniques in the future to solve the various issues arising in the localization process.