In [8], Huang et al. also proposed a method to choose initial-anchors; for convenience, we call it HuangChoose. In this subsection, we will propose an adaptive algorithm for choosing anchors. We first give our observations and motivations. After the execution of line 11 in algorithm Main, there may exist nodes that have not been not localized yet. In order to localize all of the nodes, more initial-anchors are needed. How to choose a node which is not localized as an initial-anchor is obviously an important issue.
(a) (b)
(c)
Figure 6: Example of Rigid Algorithm.
Intuitively, among the non-localized nodes, a node v with the maximum degree should be chosen since v makes the largest number of nodes have one more anchor in their neighborhoods. However, simulation results show that nodes that have large degrees usually locate in some regions of the given graph. Therefore, it is very likely that the chosen anchors are from the same region of the graph and could not help with localizing nodes in the other regions. To overcome this difficulty, we will use an adaptive algorithm to choose initial-anchors. Let v.degree denote the degree of a node v. More precisely, instead of using v.degree, algorithm AdpativeChoose will use (v.degree − v.ann). For instance, if v.degree is 8 and v.ann is 3, then algorithm AdpativeChoose will treat v.degree as 5. A node v with the maximum (v.degree − v.ann) will be chosen as an initial-anchor.
The pseudocode is as follows.
Figure 7 shows the performance of algorithm AdpativeChoose. In Figure 7(a), nodes colored with black are anchors and the others are non-anchors and therefore non-localized.
As shown in Figure 7(b), a tradition algorithm will choose u as the next initial-anchor since u has the maximum degree. However, as shown in Figure 7(c), algorithm AdpativeChoose
Algorithm 5 AdpativeChoose
1: for each v ∈ V such that (v.localized == false) do
2: compute the degree v.degree;
3: v.degree = v.degree − v.ann;
4: end for
5: find v with the maximum v.degree which is not localized;
6: return v;
will choose v as next initial-anchor since v has the maximum (v.degree − v.ann). It is not difficult to check that v is a better choice than u; see Figure 7(d).
Algorithm AdpativeChoose is a greedy strategy. It is obvious that there are other greedy strategies; for example, HuangChoose is another greedy strategy. How to choose the most effective initial-anchor is still an open problem and is our future work. We will compare AdpativeChoose with HuangChoose later; see Section 4.
(a) (b)
(c) (d)
Figure 7: (a) A subgraph of the original network. (b) A strategy without adaptivity: a node with the maximum degree is chosen as the next initial-anchor; here u is chosen. (c) The strategy with adaptivity: a node with the maximum (v.degree − v.ann) is chosen as the next initial-anchor; here v is chosen. (d) The contribution of v; those nodes colored black are localized.
4 Simulation results
In this section, we provide our simulation results. For convenience, in the remaining figures, LocalTri means Trilateration. According to our simulations, the performance of Sweep3 is almost the same as Sweep2. However, the computation of Sweep3 is much more complicated than that of Sweep2. Therefore, we will not provide the results of Sweep3, . . ., Sweepk. In our simulations, we will compare the following six combinations of Localization-Phase + AnchorChoose-Phase:
LocalTri + AdpativeChoose, LocalTri + HuangChoose, LocalTri + MaxDegree,
Sweep2 + AdpativeChoose, Sweep2 + HuangChoose, and Sweep2 + MaxDegree.
Notice that MaxDegree will choose a node v such that v.localized = false and deg(v) is the maximum among all such nodes.
This section is divided into six subsections and is organized as follows. In Subsec-tion 4.1, we introduce three parameters (IAF, COVERAGE, and CP ) for evaluating the performance of the four combinations of Localization-Phase + AnchorChoose-Phase; our comparisons are based on the values of the three parameters (IAF, COVERAGE, and CP ). In Subsection 4.2, we compare the four combinations with respect to the graph in [8]. In Subsection 4.3, we compare the six combinations with respect to very sparse graphs. In Subsection 4.4, we compare the six combinations with respect to sparse graphs.
In Subsection 4.5, we compare the six combinations with respect to dense graphs.
Before going further, we describe the four simulation environments that we will use:
the graph in [8], very sparse graphs, sparse graphs, and dense graphs. Note that all the graphs used in our simulations are unit disk graphs. The first simulation environment is the graph in [8], which is a graph with 199 nodes randomly generated in a 1200m × 1000m rectangle region and the transmitting range of each node is set to 80m. The second simulation environment contains 200 very sparse graphs: each graph is with 200 nodes
randomly generated in a 1200m × 1000m rectangle region and the transmitting range of each node is set to 70m. The third simulation environment contains 200 sparse graphs:
each graph is with 200 nodes randomly generated in a 800m × 600m rectangle region and the transmitting range of each node is set to 70m. The fourth simulation environment contains 200 dense graphs: each graph is with 200 nodes randomly generated in a 800m
× 600m rectangle region and the transmitting range of each node is set to 100m.
4.1 The three parameters considered in our simulations
In this subsection, we introduce three parameters (IAF, COVERAGE, and CP) for evaluating the performance. In the remaining part of this thesis, we will use Anchor to denote the set of nodes that know their positions, that is, Anchor contains initial-anchors and those nodes that have been localized. Let G be the given graph, n be the number of nodes in G, and A be a combination of Localization-Phase + AnchorChoose-Phase.
The first parameter IAF is the cardinality of an initial-anchor set, i.e.,
IAFA(G) = |S|
where S is an initial-anchor set. The second parameter COVERAGE is the percentage of nodes that know their positions, i.e.,
COVERAGEA(G) = |Anchor |
n .
It is obvious that if an initial-anchor set is feasible, then COVERAGE will achieve 100%.
When a localization algorithm is running, nodes can be added into the initial-anchor set;
therefore we use Sc to denote the current initial-anchor set. The third parameter CP is used to show the contribution of the current initial-anchor set and we define
CPA(G) = |Anchor |
|Sc| .
Do notice that we provide simulation results for CP only for the graph in [8].