1. Introduction
The composition of wireless sensor networks (WSNs) includes numerous sensor nodes with signal processing, communication, and other functions to the fore area to be monitored. These nodes then connect, sense, and process information through wireless communication technology to form a multi-hop self-organizing network [
1,
2,
3,
4,
5], which has the characteristics of low networking cost, self-organizing ability, and environmental adaptability. A wireless sensor node usually consists of sensing units, processing units, transceivers, and power units. Its function can be summarized as three keywords: communication, perception, and calculation. WSNs have great applications in military, medical, transportation, and environmental monitoring [
6].
Location information is an integral part of data sensing in most applications of the WSNs, such as monitoring the extent of the enemy’s area during military activities, determining the exact location of the fire source during forest fires, and quickly identifying the affected area during earthquake disasters [
7,
8]. Knowledge of the node location information can improve the efficiency of routing protocols and enable automatic configuration of the network topology to improve coverage quality [
9]. We can obtain the location information of nodes by deploying some nodes with a global positioning system (GPS) or BeiDou navigation satellite system (BDS) modules in the WSN. The greater the number of nodes with known locations, the more accurate the user can be in determining the location of the information source, but these devices are energy-intensive, large, and costly, and are not suitable for deployment in all nodes. Therefore, it is necessary to research a precise and effective localization algorithm for WSNs.
The main contributions of this paper are as follows:
Aiming at the shortcomings of TDOA localization algorithm in WSNs, which is susceptible to interference from non-visual range errors and poor localization results, a hybrid bald eagle search algorithm (HBES) is proposed to replace the mathematical analysis method to estimate the unknown node coordinates. It avoids the inverse and the derivative of the matrix in the mathematical analysis method, which can lead to unsolvable solutions.
To enhance the optimization capability of the bald eagle search algorithm (BES), we propose to use chaotic mapping, Lévy’s flight and backward learning strategies to improve the population quality, and hybrid sine and cosine algorithms to improve the performance of the bald eagle algorithm.
A localization model combining the TDOA algorithm and HBES algorithm is developed, and experiments are conducted to analyze the performance of the algorithm and the localization effect.
The rest of this article is arranged as follows. In
Section 2, we introduce some existing positioning technologies in WSNs. In
Section 3, we describe our model for TDOA localization in detail. In
Section 4, we make a comparison between our algorithm and other swarm intelligence algorithms for assessing the performance of the proposed algorithm, and we use the localization algorithm in localization experiments to analyze the actual performance of the proposed algorithm.
Section 5 concludes the paper and predicts trends in applications.
2. Background and Related Work
The positioning of the WSNs is usually done by two kinds of nodes. The first is the anchor node with known position data. The other is the target node without location information [
10,
11,
12]. The two-dimensional or three-dimensional coordinates of the target node is calculated by combining the coordinates with the communication of the anchor node using localization algorithms. Range-based localization methods require distance information to be obtained first, and then the unknown node coordinates are solved by using localization algorithms. Range-based methods include TDOA, time of arrival (TOA), received signal strength indication (RSSI), etc. The coordinates are then located using methods such as least-squares and trilateration methods. Range-free localization methods generally use connectivity information between unknown nodes and landmarks to obtain estimated distances and then use localization algorithms to estimate unknown node coordinates. Range-free methods include Distance Vector HOP algorithms, centroid localization algorithms, and Approximate Point-in-Triangulation Test (APIT) localization algorithms [
13,
14]. Both types of algorithms have their own applications and need to be selected according to the actual situation.
The swarm intelligence algorithm is a kind of metaheuristic algorithm. The concept of “swarm intelligence” was proposed by Beni and Wang for the first time in 1989 in Swarm Intelligence [
15]. Researchers have proposed many swarm intelligence algorithms to solve practical optimization problems by observing the unique behaviors and survival modes of birds, animals, and other biological groups formed in the evolution process and imitating the behaviors of biological groups. The ant colony algorithm [
16,
17,
18] proposed in 1991 and the particle swarm optimization algorithm [
19] proposed in 1994 were among the earlier swarm intelligence optimization algorithms. Given the advantages of distributed computing, parallel search, and robustness in solving optimization problems, swarm intelligence has been used to solve the problems such as routing, coverage, and localization in sensor networks.
TDOA [
20,
21] localization methods have the characteristics of simple models and high localization accuracy and are applied in the localization scenario of the WSN localization. The Taylor-series estimation method [
22] is one of the general methods of classic TDOA localization, but it is very prone to non-convergence of the algorithm when the initial value is poorly chosen. In addition, two-step least-squares algorithms, weighted least-squares algorithms and constrained least-squares algorithms [
23,
24] are also common algorithms for solving localization problems. These algorithms do not need iterative arithmetic, are computationally small, fast and can approximate the Cramér–Rao Lower Bound (CRLB) when the noise is small, and is the more established of the commonly used algorithms. However, there is a matrix inversion process in the least-squares algorithm, and more observatories must be used to satisfy the operational conditions in order to keep the operations free of matrix singularities.
The emergence of swarm intelligence optimization algorithms, which simulate the nature of organisms searching for food, has a wide range of applications for solving optimal solutions to complex functions and provides new ideas for the TDOA localization problem. Kenneth et al. [
25] put forward using Particle Swarm Optimization (PSO) algorithm to solve the TDOA localization problem, which does not need original values for localization and can attain better localization precision than the least-squares method. Chen Tao [
26] et al. proposed the use of the Salp Swarm algorithm to solve the passive time difference localization problem. The Salp Swarm algorithm has fewer control parameters and a simple model, which is also applicable to TDOA localization. Swarm intelligent optimization algorithms omit the complex computational process. These methods initialize a large number of random points in the observation range and evaluate the merits of the random points by constructing an adaptation function between the random points and the measurements. Then, the position of random points is updated according to the formula of the swarm intelligence optimization algorithm to find the best degree of adaption position. Therefore, this method avoids matrix inversion, overcoming the disadvantage of least-squares-like algorithms that require the placement of multiple observation stations.
However, the swarm intelligence algorithm has a slow convergence rate and tends to fall into a local optimum. Therefore, other strategies are needed to optimize the swarm intelligence algorithm and enhance its optimization capability. The application of improved particle swarm algorithms, and genetic algorithms in TDOA localization is described in the literature [
27,
28]. They both improve the original algorithm to enhance the algorithm’s search accuracy, such as introducing chaotic mapping to initialize the population quality to improve the global search capability of the particle swarm algorithm, and using adaptive crossover rate and variation rate to optimize the local search capability of the genetic algorithm.
The reported approaches have improved the performance of the swarm intelligence algorithms to some extent, and they have been used to solve some practical problems. On the other hand, some swarm intelligence algorithms still suffer from slow convergence speed and low accuracy in finding the optimal individual. In addition, the use of swarm intelligence algorithms for TDOA localization only takes into account factors such as algorithm accuracy and stability, two-dimensional scenarios, and specific deployment of base stations. These methods are not closely related to practical application.
According to the NFL (no free lunch) theory [
29], The results of each swarm intelligence algorithm are uncertain when solving different optimization problems, and there is no swarm intelligent algorithm that can optimize all engineering problems. In addition, different swarm intelligent optimization algorithms require different numbers of control parameters, and numerous control parameters not only increase the complexity of the algorithm but also increase the workload of adjusting parameters. Therefore, it is vital and significant to find a more suitable swarm intelligence algorithm to solve the TDOA localization problem.
All these defects are considered via proposing an effective method combining HBES to improve the accuracy of the TDOA localization. A localization model combining the TDOA localization and HBES algorithm is designed. The search strategy of the BES algorithm is improved by using many strategies such as chaotic mapping, Lévy flight, and opposition-based learning, which can avoid the algorithm falling into a local optimum. The effect of population size and the number of iterations on the algorithm results is analyzed. In two-dimensional (2D) and three-dimensional (3D) scenarios, we analyze the random deployment of base stations, noise effects, and the impact of base station numbers on TDOA localization to better solve practical problems.
3. Proposed Localization Algorithm
3.1. TDOA Localization Algorithm
This section mainly describes the TDOA positioning method and its model combined with the swarm intelligence algorithm.
3.1.1. TDOA Positioning Principle
In order to achieve localization, nodes in the WSN can be divided into two types: beacon nodes and unknown nodes, where beacon nodes are also called anchor nodes or reference points, and unknown nodes are also called ordinary nodes. Beacon nodes are nodes with known location information, and unknown nodes are nodes without location information. The principle of TDOA localization is shown in
Figure 1, where an unknown node broadcasts a signal to the surrounding area to anchor nodes, and the anchor nodes in the surrounding area will successively receive the signal sent by the unknown node. Then the distance difference from the unknown node to the anchor nodes can be calculated through the time difference. For example, if we know the distance difference between the unknown node MS and the anchor nodes BS1 and BS2, we know that the unknown node is on the hyperbola with BS1 and BS2 as the focal points, and similarly, MS is on the hyperbola with BS2 and BS3 as the focal points, and the coordinates of the unknown node can be determined by solving for the intersection of the hyperbolas according to some known conditions.
3.1.2. Location Model Based on Swarm Intelligence Algorithm
Taking a two-dimensional scenario as an example, we suppose there are
M anchor nodes distributed on the field. The coordinates of the anchor node
i and the unknown node are
,
, the distance between the anchor node
i and the unknown node is
, and the calculation is:
We considered anchor node 1 as the main reference node,
is the measured value of the distance difference between the unknown node and the anchor node
i and the anchor node 1 and the unknown node. The equation is:
where
is calculated as the time difference between the two anchor nodes receiving a broadcast from the unknown node and
is the measurement noise. Equation (3) identifies the unknown node on a particular hyperbola, which requires at least three anchor nodes in the two-dimensional plane to unite the set of equations, and at least four anchor nodes in the three-dimensional plane, converting Equation (3) to matrix form as:
Assuming that:
where
are independent Gaussian white noise random variables with zero mean and known variance of
, the maximum likelihood method is used to determine the location of the unknown node (
x,
y). The likelihood function can be followed as:
for getting the coordinate of maximizing the likelihood function of Equation (5), it can be transformed into solving the objective function of Equation (6).
Using general methods to solve nonlinear Equation (6) will lead to high computation costs, which are very inconvenient in practical problems. After transforming Equation (6) into objective Equation (7), this paper proposes a HBES algorithm, which obtains the optimal solution for the target function by finding the individual with the highest level of adaptability.
3.2. Hybrid Bald Eagle Search Optimization Algorithm
3.2.1. Bald Eagle Search Optimization Algorithm
The bald eagle search algorithm [
30] is a new metaheuristic algorithm inspired by the predatory behaviors of the bald eagle. Bald eagles use multiple attack methods to assess the energy cost of a hunting action, the energy contained in the prey, and the success rate in all kinds of habitats. They follow an intelligent strategy of selecting the correct area with prey, searching the selected area, and capturing the prey at the right time. Wise hunting strategies are also used to take advantage of wind speeds and stormy air. Bald eagle hunting behaviors involve selecting the right search area, searching the selected area, and swooping in on prey at the right time. A bald eagle usually chooses a search area that is spatially closer to the previous search area, and each of its movements is determined by the previous movements. The basic process of BES algorithm can be divided into three stages: choosing a seek space, seeking the space for prey, and diving for prey.
Step 1: Selecting a search space: The bald eagle randomly searches a large area for prey, deciding whether the area is suitable for hunting in accordance with the prey concentrative degree and its own experience. The equation for updating a bald eagle’s location is:
is for bald eagle’s own experience, which is itself is a parameter controlling position variation ranging from (1.5, 2), r is a random number between (0, 1), represents the most adapted position among individual bald eagles, represents the average position of the bald eagle population, and represents the position of the bald eagle i.
Step 2: Search space prey: The bald eagle selects a search space to search for prey and will search in and around the center point of the search space, moving in different directions within the spiral space to speed up the search, which can be expressed through the equation as:
where
represents the polar angle in polar coordinates,
is the polar radius in polar coordinates;
a and
R are parameters to govern the helix search pattern of the bald eagle, varying over the ranges (0, 5) and (0.5, 2). rand represents a random number of (0, 1), and
and
represent the two coordinates of the bald eagle when converted to a plane rectangular coordinate system.
represents the position of bald eagle
i + 1 before the population was updated.
Step 3: Swooping for prey: The bald eagle finds prey and launches a swoop toward it. The bald eagle attacks the target prey from the optimum location in the search space, and all points go to the best point. The equation for the change in position of a bald eagle is:
where
c1 and
c2 represent the motion intensity of the bald eagle to the optimal point and center point during the dive, and the value range is (1, 2).
3.2.2. Lévy Flight Strategy
Lévy flight has its origins in the mathematically related chaos theory [
31], which is essentially a random wander with step size obeying the Lévy distribution, a power-law heavy-tailed distribution. The distribution is given by:
where
w is the shape index taking values in the range (0, 2), after the research of many scholars, the foraging trajectories of many creatures fit the pattern of Lévy flight, and the swarm intelligence algorithm is also an algorithm inspired by observing the behavior of creatures. The search strategy of Lévy flight is a small step search in most cases, with occasional larger steps, and the combination with the swarm intelligence algorithm helps expand the swarm intelligence algorithm’s global search capability. The most common method currently used to solve for random step sizes is the algorithm proposed by Mentegna [
32], which has been applied with good results. The formula is as follows:
where
= 1.5,
u and
v serve the regular distribution of
and
, and the variance calculation method is as follows:
BES in Equation (10) is the first stage of the algorithm, the bald eagle starts a wide range of searches, laying the foundation for the subsequent search for excellence. Therefore, there is still room for improvement at this stage, combined with the Lévy flight strategy to improve the search strategy, improving the algorithm’s global search capability, and the algorithm’s search efficiency. Equation (10) is improved as follows:
3.2.3. Chaos Mapping
The initial population of BES is generated randomly, and for the D-dimensional space, the initial population is:
where
and
represent the upper and lower bounds of the population search range,
represents the bald eagle
i in the population, and rand is a random number of (0, 1). The initial population also has an impact on the algorithm’s capabilities in finding the optimal solution. We need the initial population to be uniformly distributed, and the wide search range of the algorithm helps to find the globally optimal solution. Chaotic mappings have been applied to swarm intelligence algorithms such as the grey wolf algorithm and whale algorithm in the literature [
33,
34]. Chaos mapping can increase the diversity of the initial population at the beginning of population intelligence and speed up the convergence of the algorithm. The bifurcation diagram for drawing the Tent map is shown in
Figure 2. In this paper, the population expression of the tent-mapping initialized bald eagle algorithm was chosen as follows:
3.2.4. Sine Cosine Algorithm
The second phase of the BES algorithm searches for spatial prey is to search for prey in a spiral flight search based on the first phase with respect to the region selected in the first phase. This transition phase can be helpful for the algorithm to go beyond the local optimum to ultimately get the best value if it increases the search convenience and the exploration of the solution space. The sine cosine algorithm proposed by Mirjalili [
35] in 2016 is characterized by fast convergence speed and few adjustment parameters. The sine cosine algorithm replaces the process of biological searching for food in the swarm intelligence algorithm by the oscillation of the sine and cosine function. The position update formula of the sine cosine algorithm is as follows:
where
t is the current iteration number,
represents the particle
i of the
t iteration,
,
,
are random numbers whose values range is (0, 2), (−2, 2), (0, 1) respectively.
represent the individual with the best fitness in the current population, and
is a parameter that linearly decreases with the number of iterations and controls the switching between global search and local development of the algorithm.
where
T is the total number of iterations, when
or
is greater than 1 the algorithm deviates from
to enhance the algorithm’s global search, when
or
less than or equal to 1 the algorithm is close to
to facilitate the algorithm’s local exploration to find the optimal solution. This paper incorporates the oscillation mechanism of the positive cosine algorithm in the second stage of the BES algorithm to adjust the local development mode of the global search of the algorithm and improve the algorithm’s ability to find the optimal solution. Because
is linearly decreasing, this paper adjusts
as a nonlinear parameter to facilitate the global search in the early stage of slow decline, and local development in the late stage of fast decline to find the optimal solution, while introducing a nonlinear weight factor
to adjust the dependence of the bald eagle algorithm on individual information. In order to match the conversion pattern of
,
is smaller in the early stage and larger in the late stage, which is in line with the strategy of global search in the early stage and local development in the late stage.
Equation (25) is the adjusted
, Equation (26) is the expression of
, and Equation (27) is the improved expression of the bald eagle search algorithm’s two-stage integration with the sine cosine algorithm. The curves of
r,
,
with iteration number are shown in
Figure 3.
3.2.5. Opposition-Based Learning
The opposition-based learning strategy is a mathematical method proposed by Tizhoosh [
36] in 2005, which is an idea to expand the solution space by generating corresponding reverse solutions again based on the basis of the present solution space and then selecting the best solution from it for the next iteration. This strategy can be a good way to expand the population size of a swarm intelligence algorithm and extend the range of the algorithm’s superiority search. In this paper, the population size is expanded by incorporating a backward learning strategy in the closing stage of the bald eagle algorithm to further improve the algorithm’s merit-seeking ability. The population expansion formula is:
Equation (28) is the mathematical expression for generating a reverse population. ub and lb represent the upper and lower bounds of population search, respectively, and are the current population and reverse population, respectively.
3.2.6. Time Complexity Analysis
Supposing the population size of HBES is
n, the dimension of the search space is
d, Then the Tent mapping initialization complexity of the population is
. In addition, the maximum evaluation times
also influence the time complexity. The computation complexity of the fitness value is
, the complexity of the three-position update is
, the sorting complexity of the fitness value of the algorithm is
, and the control parameter
r,
, updates the complexity of the algorithm is
. Generating reverse populations and sorting complexity is
. Then, the time complexity of HBES is:
However, the original BES algorithm has the same initialization population
n, maximum evaluation times
, and the dimension of search space
d as the proposed HBES. The time complexity of the initialization phase is
; calculating the fitness of all agents is
; the position update is
. Consequently, the time complexity of the BES algorithm is:
In summary, the time complexity of the HBES algorithm is slightly higher than that of BES algorithm for the same number of iterations. However, the optimization capability of the advanced algorithm is superior to BES, and both of them are in the same order of magnitude. Speed of optimization, optimization capability, and robustness of the proposed method can be proved in the following experiments, including the 23 benchmark functions test, and TDOA problems test, respectively.
3.3. TDOA Localization Implementation Process and Pseudo Code Based on HBES
This section applies HBES to the WSN localization scenario, solving the nonlinear equations for TDOA localization to derive the estimated coordinates of the unknown nodes. The specific steps and pseudo-code for the implementation of TDOA localization based on HBES are shown below.
Step 1: First, the modelling of TDOA localization is started by setting the number of anchor nodes and unknown nodes, randomly generating the coordinates of the anchor and unknown nodes. After that, start the localization and calculate the distance between each node based on the communication time between the nodes.
Step 2: Initialize the population using Tent mapping and configure the basic parameters of HBES algorithm such as population dimension dim, the maximum number of iterations T, population size N, population search boundary ub, lb, etc.
Step 3: Calculate the search space of the current population and return the individuals that exceed the search space.
Step 4: Calculate the fitness of each individual in the population and rank them; record the current best fitness value.
Step 5: Introduce the Lévy flight to promote the algorithm ability of global search and perform a global search of the initialized population of individuals according to Equation (20) with the HBES algorithm, after which the fitness values of the individuals in the population are ranked to complete a phase of position updating.
Step 6: Then, the search mechanism of the positive cosine algorithm is added to perform the local search of the HBES algorithm, and the spatial prey phase of the HBES algorithm is entered according to Equation (27), followed by the spiral search phase according to Equation (13).
Step 7: Finally, expand a set of reverse populations and calculate the fitness of the reverse populations, selecting the updated populations and the individuals with the highest fitness in the reverse populations.
Step 8: Repeat steps 3–7 until the number of iterations reaches a maximum or the overall extreme accuracy value meets a predetermined minimum accuracy value to obtain the optimal coordinates for the TDOA localization model. Pseudo code of HBES-based TDOA positioning process is shown in Algorithm 1.
Algorithm 1: Pseudo code of HBES-based TDOA positioning process |
- Input:
; - Initialization:
Initial population by tent mapping, randomly generating the coordinates of the anchor nodes and unknown nodes;
Calculated the fitness of individuals in the initial population by Equation (7); ; While iterations < T for i = 1:P ) = end if end for for i = 1:P if rand < 0.5 else if rand >= 0.5 end if ) = end if end for for i = 1:P ) = end if end for by Equation (28) Calculated the fitness of individuals in the reverse population by Equation (7); ; ) = end if iterations = iterations + 1 end while is the unknown node coordinate calculated by HBES algorithm ;
|
5. Conclusions
The purpose of the research in this article is to further address the problem of poor TDOA localization accuracy by using swarm intelligence algorithms. To achieve this goal, we proposed an improved BES method named HBES algorithm and applied HBES to the TDOA problem with higher accuracy and precision than that of other similar algorithms. In the basic BES algorithm, chaotic mappings are introduced to initialize the population. A Lévy flight strategy is incorporated to expand the global search capability of the algorithm, and an opposition-based learning strategy is added to increase the ability of the algorithm to step out of local optima, which can promote the optimization-seeking accuracy and convergence speed of BES.
In order to verify the performance of HBES, firstly, we performed an experimental simulation with other advanced swarm intelligence algorithms in 23 test functions for finding the optimum. At last, in the two-dimensional and three-dimensional scenarios, we respectively analyzed the impacts of some aspects, such as noise effects, number of base stations, number of algorithm iterations, and population size on the TDOA localization. As a general conclusion, the HBES metaheuristic algorithm has better convergence accuracy and faster convergence speed in the test function experiments and shows the best performance, solution quality, and robustness in dealing with the node localization problem.
In this paper, the TDOA localization problem was not yet identified in the real scenarios. Therefore, in order to improve the practicality of this research, further research will be carried out on TDOA localization in indoor, underwater, and underground scenarios. Since many of the challenges from the research area of WSNs belong to the NP-hard optimization group and the swarm intelligence metaheuristic is proven to be a robust solution method for such problems, we will apply HBES to other problems in WSNs, such as deployment, coverage, and routing. Moreover, there are many opportunities for improvement in swarm intelligence research. We also plan to explore the existing population intelligence algorithms for improvement research to make swarm intelligence work better in the field of WSNs.