1. Introduction
Localization is the process of acquiring the position information of an entity in a coordinate system. Knowledge of the position of network nodes is invaluable for numerous applications, such as routing, autonomous air-vehicles, network security, environment surveillance for military purposes, and so on. The network is modeled as an undirected graph, where vertices represent a set of nodes and edges are links between two nodes within communication range. Nodes which are aware of their coordinates or position are known as anchor nodes. The aim is to compute the position of other nodes within the network with the help of these anchor nodes. We attempt to achieve this goal by using the position information of anchor nodes and the relative distance between their one-hop neighbors. Since, in some ad-hoc networks (e.g., IoT), the devices have limited resources, it is computationally expensive to equip each node with a localization sensor such as GPS. Thus, we attempt to localize nodes where only a subset are equipped with localization sensors.
Using the distance between one-hop neighbors to localize nodes is known as range-based localization, where the distance between nodes is computed either through Received Signal Strength Indicator (RSSI), Time Of Arrival (TOA), or Time Difference Of Arrival (TDOA). TOA and TDOA require external hardware to synchronize a transmitter and a receiver, while RSSI does not need additional hardware as the distance is derived from a signal attenuation model which relates signal strength to the distance. However, using RSSI is subject to error due to environmental factors (indoors or outdoors), multi-path fading, and noise [
1]. In [
2], RSSI was found to vary consistently, with a distance up to 50 m.
Considering the resource limitation of the network nodes, we propose a lightweight solution based on a series of triangulations. If a non-anchor node lies within the vicinity of three nodes whose positions are known, it can efficiently estimate its own position via triangulation, because the distances to these nodes are known. The node then shares its position with other nodes, to further propagate the location estimation process. However, in some less connected regions of the network, this condition will not hold, prohibiting the location discovery for existing solutions (such as [
3,
4]). Our contribution involves the use of triangulation to estimate the coordinates of non-anchor nodes within the vicinity of exactly two anchor nodes. The triangulation yields two possible positions for non-anchor nodes. We introduce a mechanism which attempts to eliminate one of the positions, to localize non-anchor nodes in less connected regions of the network. This approach improves significantly the localization of unknown positions of network nodes.
2. Related Work
Localization of network nodes is crucial for plethora of applications; for instance, improvement of routing techniques [
5,
6,
7]. A straightforward method to address the localization problem is to equip all nodes with a location sensor (such as a GPS), and share the location information. There are two main paradigms to share position information: Rendez-vous-based and flooding-based. In rendez-vous-based methods, some nodes are elected to store node position information and respond to inquiries when position information is requested. The disadvantage of such a method is that it centralizes the information in only a few nodes, and thus there is a risk of information loss if such nodes break down [
8]. Flooding-based methods overcome this disadvantage by broadcasting node position information to the network. The cost involved in such an approach is excessive message exchange, contributing to network overhead. In Semi-Flooding based Location Service (SFLS) [
8], the location information is forwarded with higher frequency to close neighbors (in terms of the number of hops) and lower frequency to further nodes, in order to decrease bandwidth consumption while maintaining adequate knowledge of neighbors’ positions.
In the case where not all nodes are equipped with a GPS, localizing non-anchor nodes require additional information to relate nodes to each other. According to the classification specified in [
9], node relations can be connectivity-based, which simply indicates whether a node is in connection with anchor nodes or not. This is used in [
10], where a node’s position is assumed to be the average of the known positions of the other nodes. Another type of inter-node relation is the distance between one-hop neighbors, which is widely used to estimate the positions of non-anchor nodes [
3,
4]. Relative distance information is an added benefit, which helps to improve the accuracy of the location. In addition, some solutions use the Angle-of-Arrival to relate nodes, or a combination of the mentioned measurement types [
11].
The localization problem can also be seen as an optimization problem, which can be solved using numerical techniques such as Semi-Definite Programming (SDP) [
12] or linear programming [
13]. To avoid the inaccuracies of signal propagation models when using RSSI for distance measurements, some studies [
14,
15,
16] have used interval-analysis. In interval-based analysis, instead of computing direct distances from RSSI, a set of inequalities is formulated to indicate that a node is on a ring between 2 radii, based on its relative position to other nodes. Then, the defined areas for nodes can be further restrained using the Waltz algorithm [
17].
Some approaches divide the problem into subproblems, as in [
2], where (1) base stations classify ordinary nodes into clusters based on their proximity to anchor nodes, and (2) within each cluster, a node seen by three anchor nodes is located using a simple geometrical computation. In [
1], the region where the network is deployed is divided into rectangular grids as a first step, then within each small grid the location is refined. However, in the previously mentioned approaches, the number of GPS nodes needs to be high in order to satisfy the necessary constraints. In [
9,
18,
19], the probability distribution is integrated in the location process, rather than attributing a single position for each node. Such a method allows the uncertainty of measurements to be taken into account—be it the GPS position or the relative distance between nodes [
9].
Generally speaking, if the distance of a non-anchor node to three anchor nodes is known the node can be located with simple geometric computations, except in rare cases where the nodes are collinear or when some nodes overlap. This might imply a conclusion that at least three GPS nodes in the network are needed for location. However, in [
9], the proposed solution attempts to localize the network with a single anchor node. Each node starts with a uniform probability distribution over the deployment region and, as the roaming anchor node passes by, the ordinary nodes tweak the distribution to localize the nodes. In this context, the authors experiment their solution where the anchor nodes use a random model to traverse the network, and have a reasonable claim that traversing the network can be optimized to improve the location process. In [
9,
18], negative information about the absence of a node in the proximity of the anchor nodes is used in the location process. This kind of information is used as a basis for our algorithm.
An approach which is seemingly far from the above-mentioned methods, yet interesting to address the node location problem, are Graph Layout Algorithms such as FDP [
20] and neato [
21]. Even though the objective of these algorithms is generally to create an easy-on-the-eye graph, some variations make it possible to fix the positions of some nodes (the anchor nodes) and to set a suitable edge length (i.e., the distance between nodes). We have tested these algorithms using graphviz [
22], and the estimated node positions are satisfactory.
Other methods, which use a set of distance equations and optimization techniques, usually require high computation power, which is impractical for these networks. In this case, the computation is done remotely in a centralized fashion. The graph structure might not yield a unique solution. Even if the graph has a unique solution, finding this solution has been proved to be NP-hard [
23].
The presented work is an extension of our previous work on localization [
24]. We address the problem from the graph point of view, aimed at pinpointing the location of as many nodes as possible. In our approach, we first consider perfect distance measurements and compare it to an existing method [
4], and show that our method is able to localize more nodes in a randomly generated network by exploiting the case where a non-anchor node is within vicinity of only two localized nodes. Next, we introduce Gaussian noise to distance measurements to simulate the effect of real world errors in distance measurements. Gaussian noise is widely accepted in simulating distance errors, and is experimentally validated in [
25].
Table 1 summarizes different approaches to solve the localization problem.
In
Section 3, the system model is presented and the principal localization steps of the algorithm are introduced. In
Section 4, we explain the distributed implementation of the algorithm, which shows how each node acquires awareness of its location and the location of other nodes. Next, the algorithm is compared with the GPS-free [
4] method, which is widely referenced in the literature and has some similarities with our method, allowing clear comparison and explanation of results. Next, the behavior of our method is studied, with distance measurement errors, in the NS-3 [
26] network simulator in
Section 5.
Section 6 contains the conclusion and discusses possible future work.
4. Distributed Implementation of the Algorithm
In this section, we present the algorithm implemented on each node in the network. The first part of the algorithm is sharing positions (if found) through the network, in a bandwidth efficient manner. The second part is the previously described localization method. We use a semi-flooding method (SFLS) [
8] to share known positions, as it takes the advantages of both flooding and rendez-vous based methods, while mitigating their drawbacks. In this method, each node broadcasts its own position (if found) with an identifier, such as a time-stamp or sequence number. A node that receives another node’s position with a higher sequence number or time-stamp re-broadcasts once every two receivables. In other words, when a node receives a position for the first time, it rebroadcasts. The next time it receives the new position of the same node, it does not rebroadcast and keeps alternating the rebroadcast decision for the following received positions. This method is bandwidth-friendly and compatible with our localization algorithm, because nodes need more frequent information about their closer neighbors. Assuming the broadcast interval is
t seconds, one-hop neighbors receive the position information every
t seconds, two-hop neighbors receive position information every
seconds, three-hop neighbors receive position info every
seconds, and so on. In [
8], it has been shown mathematically that the mean number of broadcasts
performed to update the position information of node
i grows approximately linearly with the number of nodes in the network, where nodes are uniformly distributed. This ensures scalability with respect to bandwidth consumption. The broadcasting of positions, receiving them, and initiating the self-localization algorithm is illustrated in Algorithm 1.
Algorithm 1 SFLS Position sharing |
- 1:
= 0 (Sequence number starts at 0 for all nodes) - 2:
(stores retransmission decision for all nodes, initialized to true for all nodes) - 3:
N (list of received node positions) and (1-hop neighbors with known positions) - 4:
: list of IDs of all one-hop neighbors and stores distances to 1-hop neighbors - 5:
procedurebroadcast_own_position - 6:
if == then - 7:
- 8:
= - 9:
else if position is estimated then - 10:
= - 11:
end if - 12:
packet = [, , , ] - 13:
broadcast packet - 14:
end procedure - 15:
procedurereceive() - 16:
- 17:
if then - 18:
- 19:
- 20:
update - 21:
if == then - 22:
- 23:
end if - 24:
if and and then - 25:
- 26:
end if - 27:
end if - 28:
- 29:
end procedure - 30:
procedurerebroadcast() - 31:
if == then - 32:
packet = [] - 33:
broadcast packet - 34:
= - 35:
else - 36:
= - 37:
end if - 38:
end procedure
|
Three procedures are described in Algorithm 1:
- (a)
Broadcast own position: Startup method is called every t seconds for anchor nodes at the beginning of the simulation. For non-anchor nodes, it is called, once their positions are estimated, to start broadcasting their positions with the interval t. Note that the sequence number (which indicates the freshness of position information) is incremented only by anchor nodes. This is because the position information originates from the anchor nodes, while the localization of all the other nodes is more or less inherited from them. Thus, when a non-anchor node is localized, it updates its sequence number to be equal to that of the nodes used to localize it.
- (b)
Receive: Called every time a packet is received. The inputs to the procedure are the ID of the original creator of the packet , the position of sending node , the associated sequence number , and the ID of the one-hop neighbor that relayed the packet . When new information arrives, this method checks if the gathered information is sufficient to attempt to estimate a node’s position. If so, it calls the method, which is described in Algorithm 2.
- (c)
Rebroadcast: Called by the receive method, after the received position is processed, to decide whether to forward the received packet according to the SFLS rule.
The second part of the algorithm is the localization part, which was explained in the previous section. Thus, each time updated position information is received, an attempt is made to localize a node by calling in the method. The localization procedure is further detailed in Algorithm 2.
Algorithm 2 Position Certainty Propagation: |
- 1:
= list of 1-hop neighbors with the highest sequence number - 2:
= seqNum of any of the nodes in the - 3:
if has 3 or more nodes then - 4:
= - 5:
= - 6:
else if has 2 nodes then - 7:
[pos1, pos2] = - 8:
= n for each n ∈ N where <= - 9:
= - 10:
= n for each n ∈ N where <= - 11:
= - 12:
⇔ for each n ∈ , n ∈ and for each m ∈ , - 13:
⇔ for each n ∈ , n ∈ and for each m ∈ , - 14:
if and not then - 15:
= - 16:
= - 17:
else if and not then - 18:
= - 19:
= - 20:
end if - 21:
end if
|
Let be the list of detected neighbors with known positions within communication range of the node. When includes two or three nodes, the position of the node can be estimated using the intersection method. If includes two nodes, the intersection method returns the two possible positions, one of which is to be eliminated (if possible). Let N be the list containing position information of all the received positions of network nodes. The first line gets the 1-hop neighbors whose positions are known and have the highest sequence number available. This ensures that the positions used to localize the node are from the same time step, and thus ensures the information is coherent. Then, if the number of 1-hop node positions is three or more, the method returns one position that is stored in and the sequence number is updated to be equal to the sequence number of nodes used in localization. If there were two 1-hop nodes with known positions, the method returns two possible positions, which are then tested in an attempt to eliminate one of them using the procedure explained above. Once is updated, it will be used together with the sequence number in the next call.
6. Conclusions
The work presented in this article proposed a location service solution that is lightweight, bandwidth friendly, and cost and energy efficient. Cost and energy consumption is conserved by requiring a minimum of three GPS-equipped nodes. The computations used to localize nodes are not complicated, and do not require many cycles (as in the case of optimization). Sharing positions with other nodes in the network is done using a semi-flooding method, to conserve network bandwidth. The solution requires that the anchor nodes are in the vicinity of at least one non-anchor node, in order to be able to start. This starting condition constraint might appear to hinder the generality of the algorithm, but this can be mitigated by electing some virtual anchor nodes that satisfy the condition. These virtual anchor nodes are given assumed positions, so that they form a triangle from the known distance between them. For instance, let us assume non-collinear nodes
see each other, and at least a fourth node
l. Node
i is positioned at the origin, node
j is on the horizontal axis at a distance equal to
and node
k is added to have a positive
y-value using triangluation. The algorithm then treats them as anchor nodes and computes the position of the rest of the nodes, as previously explained. When at least three real anchor node positions have been computed, all the nodes can then be transferred to the global coordinate system, using the computed and actual positions of anchor nodes [
4].
The solution was compared to another method [
4], and it was shown that our solution achieves a higher percentage of localized nodes. In a network with an average degree ≈10, around
of the nodes are localized. Furthermore, we tested our algorithm using NS-3, while introducing distance measurement errors, and the average error is shown to be stable for a 50-node network. Also, the average localization error increases linearly with the standard deviation of the Gaussian measurement noise. The position sharing technique used conserves bandwidth by reducing position update frequency to further nodes. For future work, the error propagation effect towards the edge of the network needs to be mitigated. Additionally, the impact of node mobility on the accuracy of localization is also to be considered.