 Research
 Open Access
 Published:
LACFA: an algorithm for localization aware cluster formation in wireless sensor networks
EURASIP Journal on Wireless Communications and Networking volume 2011, Article number: 121 (2011)
Abstract
The ability of a sensor node to determine its position is a fundamental requirement for many applications in wireless sensor networks (WSNs). In this article, we address a scenario where a subset of sensors, called anchor nodes, knows its own position and helps other nodes determine theirs through rangebased positioning techniques. Such techniques benefit from a high degree of connectivity, since range measurements from at least four anchor nodes are necessary (threedimensional scenario). On the other hand, WSN topologies, most notably the clustertree topology, tend to limit connectivity between nodes to save energy. This results in very poor performance of the network in terms of localization. In this article, we propose LACFA, a network formation algorithm that increases the probability of localization of sensors in a clustertree topology. It does so by properly allocating anchor nodes to different clusters during the network formation phase. Our algorithm achieves very high localization probability when compared with existing cluster formation algorithms, at no additional cost. Moreover, a distributed cluster formation algorithm, with no need for any centralized information exchange mechanisms, is defined.
1 Introduction
Wireless sensor networks (WSNs) consist of small, lowcomplexity sensor nodes interconnected through wireless links. WSNs provide applications for monitoring and automation in different fields, such as agriculture, industrial environments, home, or smart cities. Low energy consumption is one of the main priorities of WSNs, as sensors are typically batteryoperated, and battery replacement may be costly or not even possible. Therefore, it is crucial to employ energyefficient protocols. The 802.15.4 [1] standard is a suitable candidate for WSNs, specifying both physical (PHY) and Medium Access Control (MAC) layers. Moreover, an alternative PHY, the IEEE 802.15.4a [2], based on ultrawideband, has also been standardized. Finally, ZigBee [3] is an industrial standard that defines the network and application layers for sensor networks based on IEEE 802.15.4 PHY and MAC layers. One of the features that these standards characterize is the topology of the WSN. Besides a star topology, the 802.15.4/Zigbee standard supports mesh and clustertree topologies.
The ability of sensor nodes to know its location is an enabler for many locationbased applications. Owing to the ad hoc character of WSNs, a distributed positioning of the target nodes is more attractive than centralized algorithms [4]. Probabilistic methods (e.g., [5, 6]) take into account uncertainty of the measurements, but they require larger computational complexity than deterministic methods. We focus on anchorbased algorithms with a scenario where some sensors, called anchor nodes, know its own location (by means of Global Navigation Satellite System, GNSS for short, or by installing them at points with known coordinates) and help localize other sensors. Sensors with unknown location information are called nonreference or target nodes, and their coordinates need to be estimated using a sensor network positioning algorithm [7]. In this context, rangebased algorithms [8] rely on distance between nodes, which is usually measured with received signal strength indicator (RSSI)time of arrival (TOA)time differential of arrival (TDOA)or angle of arrival (AOA)based techniques. Fingerprinting techniques [9] are based on ranges but require centralized algorithms. Rangefree techniques (e.g., [10, 11]) are not based on the previous metrics, for instance, averaging broadcasted positions of surrounding anchor nodes. However, they typically provide a higher estimation error than the rangebased approaches. IEEE 802.15.4a provides mechanisms for precision ranging using TOA by means of an UltraWide band (UWB) PHY layer and location primitives, while RSSIbased range estimation methods are also possible with IEEE 802.15.4. Thus, target nodes coordinates can be estimated using anchorbased algorithms [8] that use the available a priori knowledge of positions of anchor nodes in the network. This type of localization allows cooperation between the nodes [4]. With cooperation, target nodes that are able to determine their position become anchor nodes, thus providing new references for the remaining target nodes.
In the literature, a number of algorithms based on range and anchor nodes have been proposed for sensor networks [4, 12–14]. Also algorithms for TOA and UWB have been presented [15, 16]. Most of the previous references are based on mesh WSNs. Localization with Zigbee and RSSI in a clustertree WSN is studied in a few studies works such as [17]. For rangebased localization algorithms, the success of the location discovery depends on the network connectivity [12]. In [12, 13] a multilateration algorithm for localization is presented as well as multihop ranging solutions for nodes with low connectivity to anchor nodes. However, previous studies do not take into account the limitations that network topologies supported by the standards can introduce in rangebased localization algorithms. While the connectivity between nodes in a mesh network is high, it is considerably reduced in a clustertree topology. This presents advantages, such as energy saving, but it severely degrades the performance of rangebased localization. This aspect is not addressed in the literature, which focuses in providing clustering algorithms with high energy efficiency [18, 19], such as, for example, the LEACH algorithm. The authors of [20] address the problem, showing that indeed localization does not work properly in clustertree topologies. However, the design of a clustering algorithm with the goal of enhancing localization performance has not been addressed to the best of these authors knowledge.
The main contribution of this article is to provide a solution to improve positioning in clustertree topologies defined in the standards. In this direction, we propose LACFA, a network formation algorithm that increases the probability of positioning of sensors in a clustertree topology. It does so by properly allocating anchor nodes to different clusters during the network formation phase, and by allowing peers in the same cluster to perform ranging with each other. This simple algorithm greatly improves the probability of positioning of sensor nodes for a moderate density of anchor nodes. As has been shown, it outperforms LEACH without paying a penalty in terms of energy consumption. Moreover, the algorithm is analyzed in terms of mean square error with both TOA and RSSI rangings, providing satisfactory results in all cases. Results show that LACFA increases onehop connectivity from target to anchor nodes improving the onehop rangebased positioning.
The remainder of this article is organized as follows: In Section 2, we describe peertopeer topologies in the IEEE 802.15.4/Zigbee and 802.15.4a standards. In Section 3, we explain the considered rangebased positioning algorithm based on trilateration. In Section 4, we describe rangebased positioning for the mesh and clustertree WSNs. Based on this analysis, we propose schemes for positioning in a clustertree topology. These solutions are used with our algorithm for localization aware cluster formation (LACFA) presented in Section 5. Numerical results are provided in Section 6, and conclusions are drawn at the end of this article.
2 Peertopeer topologies under Zigbee and IEEE 802.15.4a
Peertopeer topologies supported by Zigbee and IEEE 802.15.4 standards will be used in this article. The IEEE 802.15.4/Zigbee protocol stack is shown in Figure 1. IEEE 802.15.4 defines physical and MAC layers, while Zigbee defines the network (NWK) and application layers. In order to enhance localization, the 802.15.4a alternate physical layer was standardized [2], supporting time of arrival ranging. In 802.15.4 [1], two types of devices, reduced function device (RFD) and full function device (FFD), are defined, where only an FFD may be the coordinator of a personal area network (PAN) or cluster. In the following, we will assume where necessary that sensors are FFDs. The 802.15.4/Zigbee standard supports star and peertopeer topologies. Within peertopeer topologies, we distinguish between mesh and clustertree networks [3], both shown in Figure 2.
In a mesh network, any sensor may communicate with any other sensor within its range, and route messages from other sensors, enabling the formation of complex selforganizing topologies. The mesh topology places no restrictions on the connectivity between nodes, maximizing network coverage. On the other hand, nodes need to listen to the medium continuously, causing this topology to be highly energy consuming. In a clustertree network as defined by Zigbee, a FFD, acting as PAN coordinator, initiates the network and becomes root. Sensors are then grouped in clusters where a coordinator is the cluster head, and several other devices are leaf or child nodes. The cluster head sends periodic beacon frames that are used by sensors within its range to attach to the cluster as child nodes. These nodes may, in turn, send new beacons and form a new cluster, resulting in a clustertree. This structure is highly energy efficient since sensors synchronize with their parent node. Moreover, the resulting tree topology greatly simplifies routing. The 802.15.4a standard supports both star and mesh topologies, while the clustertree topology falls outside the scope of the standard, since upper layers are not addressed.
The MAC layer defined by the 802.15.4 standard [1] specifies two modes of operation: beaconenabled and nonbeacon. In the nonbeacon mode, Carrier Sense Multiple Access with Collision Avoidance (CSMACA) is used, which requires long listening periods which decrease the energy efficiency of the protocol. The beaconenabled mode greatly improves energy efficiency by defining the socalled superframe, shown in Figure 3. The superframe, managed by the cluster head, contains the synchronization beacon, followed by a contentionaccess period (CAP), and an optional contentionfree period (CFP). During the CAP, the channel is accessed using slotted CSMACA. In order to minimize interference, neighboring clusters in a clustertree may concatenate superframes as shown in Figure 3, where rectangles denote active parts of the superframe (beacon in black and CAP in white). The defined parameters that configure the superframe are adjustable by 802.15.4/Zigbee.
3 Rangebased positioning in WSNs
In this section, we focus on the positioning problem in a WSN. Particularly, we address the rangebased approach in which a node that aims at determining its position first estimates its distance to a reference node using a ranging technique (e.g., RSSI or TOA). Afterward, these ranges are used to solve a geometrical problem referred to as trilateration.
There is a plethora of techniques for ranging in WSNs, see, for instance, the studies in [8, 21]. In this article, we consider RSSI and TOAbased techniques. While RSSI techniques use measurements from the signal power at the receiver, TOA is based on the estimation of the travel time that a signal takes from the transmitter to the receiving node. The advantage of the RSSI approach versus TOA techniques is that it requires no additional hardware. However, while RSSI is greatly affected by multipath fading, TOA with UWB is a much more robust ranging technique since the large bandwidth of a UWB signal provides high time resolution [4].
Concerning TOAbased ranging, the IEEE 802.15.4a [2] standard defines a mandatory ranging protocol called twoway timeofarrival (TWTOA) and an optional Symmetric Double Sided (SDS) TWTOA protocol that reduces the effect of the finite crystal tolerances at the local oscillator [2]. In order to start the ranging protocol, an upper layer of 802.15.4a standard (the protocol stack is shown in Figure 1) calls a primitive of the MAC layer. This primitive is named MCPSDATA.request and it is used for requesting data. Also, this primitive has to be called with a corresponding attribute to start ranging [2].
The problem under study involves the positioning of N_{ n } target coordinators in a WSN that contains N_{ r } reference coordinators emitting ranging signals to allow positioning of the latter. In this article, we consider the topologies defined in the two standards, namely, the Zigbee standard with RSSIbased ranging and the 802.15.4a standard with TOAbased technique for UWB devices. We address the following WSN topology configurations: 802.15.4a mesh WSN; Zigbee mesh and Zigbee clustertree WSNs; and a WSN based on 802.15.4a PHY layer with clustertree topology similar to Zigbee. We assumed a uniform random deployment of the N_{ n } + N_{ r } nodes in the simulation results that are provided in Section 6. Let us define the threedimensional coordinates of target and reference nodes as
respectively. Notice that for the trilateration procedure to be valid, we need to assume that positions of the reference nodes are known. The geometrical distance between the j th node and the i th anchor is defined as
with · being the Euclidean norm in ℝ.
We can identify different range models depending on the technology used. On the one hand, we consider the following observation equation for TOAbased ranging
where j = 1, 2,..., N_{ n } and $i\in {\mathcal{N}}_{j}$, with ${\mathcal{N}}_{j}$ being the set of reference nodes from which the j th node receives ranging information. ${\nu}_{j,i}~\mathcal{N}\left(0,\phantom{\rule{2.77695pt}{0ex}}{\sigma}_{j,i}^{2}\right)$ is additive measurement noise, independent among measures.
On the other hand, RSSIbased ranging measures are commonly modeled using the lognormal path loss model [22], defined as
where ρ_{ o } is the reference distance, L_{ o } is the attenuation at such reference distance in dB, ρ_{ j,i } is the distance between nodes j and i, L_{ j,i } the path loss for the distance ρ_{ j,i } in dB, and p the path loss exponent (typ. 3 in our scenarios). Notice that L_{ j,i } = P_{ T x,j } − P_{ Rx,i } , where P_{ T x, j } and P_{ Rx,i } are the transmitted and received powers in dBm for the pair {j, i}, respectively. If the randomness due to received power estimation is modeled by ${\nu}_{j,i}~\mathcal{N}\left(0,\phantom{\rule{2.77695pt}{0ex}}{\sigma}_{j,i}^{2}\right)$ in dBm, then we can write
resulting in
and recognizing the terms, we obtain the observation equation for RSSIbased ranging:
Once range measurements are available, either resorting to TOA or RSSI techniques, the target node computes its position based on a simple algorithm to solve the trilateration problem. A least square (LS) algorithm suffices for the purpose of this article, which is to propose and analyze network topologies formations that improve the overall positioning performance. Thus, the wellknown LS method is used here as a comparison tool among topology creation algorithms. Particularly, we consider onehop ranging, meaning that ranging is performed considering only those reference nodes which are in view. As commented earlier, a set of ranging measurements from at least four reference nodes can be seen as a geometrical problem, where each (3) defines a sphere centered at the corresponding ${\text{x}}_{r}^{\left(i\right)}$ and with radii the measured range. The optimal positioning solution is given by the point in space where all the spheres intersect. Since the accuracy of range estimates is affected by noise (among other phenomena such as multipath components), the spheres are not likely to intersect at one single point and instead an uncertainty area is obtained in which the node can be found. The LS method provides an appealing solution to the problem, where the coordinates of the j th node are those which minimize the squarederror
The optimization admits a closedform solution [23] based on the MoorePenrose pseudoinverse
with the following definitions:
where ${\kappa}_{i}\triangleq {\left({\text{p}}_{r}^{\left(i\right)}\right)}^{T}{\text{p}}_{r}^{\left(i\right)}$ is a constant, and $\left{\mathcal{N}}_{j}\right$ indicates the cardinality of the set ${\mathcal{N}}_{j}$, i.e., the number ranging measurements at the j th node.
The next section describes algorithms for topology formation. Indeed, this comes before the position solution described above, from a practical point of view. Current topology formation criteria are focused on purposes other than localization; therefore, an effort is made in the sequel to the study existing methods and investigate clustering techniques aiming toward providing localization quality of service to the WSN.
4 Network localization constrained by topology
4.1 Mesh and clustertree topologies
The success of rangebased localization depends on the network connectivity [12]. Thus, in our case, rangebased techniques for positioning such as trilateration need at least four onehop range estimations (three dimensional scenario) with reference or located nodes. However, in a 802.15.4/Zigbee or 802.15.4a network, RFD devices may communicate only with one coordinator within its range, therefore, in our case, these devices cannot be located.
Mesh topology allows a high connectivity between nodes because it places no restrictions on that. In fact in a Zigbee or 802.15.4a mesh WSN, any coordinator may communicate with any other coordinator within range. Therefore, the connectivity allowed by mesh topology is an advantage for rangebased localization.
However, in a clustertree topology, there are restrictions on the connectivity between the nodes. For Zigbee (and in our 802.15.4a WSN with clustertree topology), nodes are grouped in clusters where any coordinator may communicate only with its parent and its children of its cluster. This excludes communication with other coordinators that may be in range. As a result, less nodes are available for ranging and localization. Therefore for onehop ranging between nodes, one coordinator j could be located under the following conditions: (1) it has at least four range estimations with reference coordinators, and (2) these reference coordinators have parent or children relationship with the j coordinator.
4.2 Improved localization in a clustertree topology
In this section, we explain a solution for the constraints of the rangebased localization in a clustertree network. With this solution, we want to improve the localization, and thus to reach a tradeoff between the connectivity of mesh topology and energy saving of clustertree topology.
For Zigbee clustertree topology, ranging among parent and children can be done with RSSI using the data interchange of frames [3]. Also for 802.15.4a, ranging among parent and children can be done using the message sequence for ranging explained in the standard [2] that also uses data frames interchanging. We propose the following solution to increase the ranging between coordinators overcoming this parentchildrenbased connectivity:

Ranging is controlled by MAC layer: The ranging application is done in a MAC level, as in the IEEE 802.15.4 standard. The application layer (that controls the localization algorithm) calls the corresponding MAC primitives directly for doing ranging between two nodes.
In order to follow this solution, the MAC level frames for ranging should work with the Zigbee or upper layer superframe structures without collisions. For this propose, a scheme is proposed:

Ranging during the CAP of the superframe (RCAPS): A coordinator j can do ranging with its parent coordinator and with its child coordinators using the ranging interchange of frames defined in the standards. The improvement achieved is that this coordinator j also uses the CAP of its parent cluster superframe for ranging with its brother coordinators (coordinators with same parent that follow the same superframe) within range. Figure 4 shows the RCAPS solution with the superframes structures of the corresponding parent and children of three interconnected clusters. In Figure 5, the interchange of frames between two brothers of a cluster with RCAPS solution is presented. Figure 6 shows an example where clustertree and clustertree with RCAPS are compared.
5 Localizationaware cluster formation
We aim at designing a clustertree formation algorithm with the objective of improving of the average number of positioned target nodes. As the necessary signals for positioning of target nodes are emitted by anchor nodes, we propose to design a clustering algorithm that maximizes the connectivity of the anchor nodes in the clustertree topology. In this section, we resort to Graph Theory [24] to propose a solution for that aim. We demonstrate that in a clustertree topology, the best connectivity of anchor nodes is held by those nodes being cluster heads. Also, we propose that our algorithm controls the maximum number of anchor nodes in the clusters.
Graph theory describes the communication flow among the nodes of a network by an undirected graph $\mathcal{G}=\left(\mathcal{V},\mathcal{E}\right)$ where $\mathcal{V}=\left\{\mathsf{\text{1}},...,N\right\}$ is the set of vertices (the set of N = N_{ n } + N_{ r } nodes in our case), and $\mathcal{E}$ is the set of edges (i.e., their links). The edge e_{ ij } represents a bidirectional communication link between a pair of distinct nodes i and j. The set of neighbors of a node i was defined previously as ${\mathcal{N}}_{i}=\left\{j\in \mathcal{V}:{e}_{ij}\in \mathcal{E}\right\}$ for all i, j = {1,..., N}, which represents the set of indexes of the nodes sending information to node i.
The connectivity matrix of a graph is a N × N matrix with entries
with the degree of a vertex being the number of edges at i. The degree is equal to the number of neighbors ${d}_{i}=\left{\mathcal{N}}_{i}\right$, or equivalently
Let us define the following sets:

${\mathcal{V}}_{\ell}$ as the set of nodes in the ℓth cluster;

${\mathcal{V}}_{\ell ,p}$ as the set of parent nodes in the ℓth cluster including the clusterhead, i.e., those generating a cluster;

${\mathcal{V}}_{r}$ as the set of anchor nodes in the graph, ${N}_{r}=\left{\mathcal{V}}_{r}\right$.

${\mathcal{V}}_{n}$ as the set of target nodes in the graph, ${N}_{n}=\left{\mathcal{V}}_{n}\right$.
The necessary signals for positioning of target nodes are emitted by anchor nodes. Therefore, for our purposes, it is necessary to design a clustering algorithm that maximizes the connectivity of the anchor nodes in the clustertree topology. We base on Proposition 1 to state that such algorithm should ensure that cluster heads are the anchor nodes of the network.
Proposition 1. Let the undirected graph$\mathcal{G}=\left(\mathcal{V},\mathcal{E}\right)$define a clustertree topology. Then, for the ℓth cluster we have that
with d_{ ℓ }_{, CH}being the degree of the ℓth cluster head.
Proof. The proof follows easily if one realizes that ${{d}_{\ell}}_{,\mathsf{\text{CH}}}=\left{\mathcal{V}}_{\ell}\right$, as the clusterhead is connected to all the nodes in its cluster. For the rest of the nonparent nodes, we have two schemes. On the one hand, in the conventional clustertree topology, we know that ${\mathcal{V}}_{\ell}\backslash {{\mathcal{V}}_{\ell}}_{,p}=\left{\mathcal{V}}_{\ell}\right\phantom{\rule{2.77695pt}{0ex}}\phantom{\rule{2.77695pt}{0ex}}\left{{\mathcal{V}}_{\ell}}_{,p}\right<\left{\mathcal{V}}_{\ell}\right$ since a clusterchild can only do ranging with its parent node. On the other hand, in the RCAPS scheme, since a clusterchild can do ranging with its parent node and other clusterchild (within range) that share the same parent, we have that ${\mathcal{V}}_{\ell}\backslash {{\mathcal{V}}_{\ell}}_{,p}\le \left{\mathcal{V}}_{\ell}\right$ with equality only if all child are in range with each other. □
Therefore, it arises that, in a clustertree topology, the best connectivity is held by anchor nodes being clusterheads. Since, the objective of this article is to provide enhanced connectivity of target nodes to anchor nodes in clustertrees, we conclude that a suitable algorithm should enforce that ${{\mathcal{V}}_{\ell}}_{,p}\subseteq {\mathcal{V}}_{r}$, with anchor nodes being clusterheads.
Another preferable feature of the proposed localizationaware topology formation algorithm is to design the maximum number of anchor nodes in the clusters R_{max}. The algorithm proceeds as follows. Initially, ℓ = 1, and ${\mathcal{V}}_{\ell ,p}=\mathsf{\text{C}}{{\mathsf{\text{H}}}_{\ell}}_{=\mathsf{\text{1}}}$ is the clusterhead (anchor node) of the first cluster. For each cluster ℓ, the clusterhead sends beacon frames to find clusterchildren and join them to the cluster. This set of nodes ${\mathcal{N}}_{\ell}$ is composed of target and anchor nodes within range, that is ${\mathcal{N}}_{\ell}={\mathcal{N}}_{\ell}^{n}\cup {\mathcal{N}}_{\ell}^{r}$. They are selected randomly and for the anchor nodes $\left{\mathcal{N}}_{\ell}^{r}\right\phantom{\rule{0.3em}{0ex}}\le {R}_{\mathsf{\text{max}}}$. Notice that LACFA controls $\left{\mathcal{N}}_{\ell}^{r}\right\phantom{\rule{0.3em}{0ex}}\le {R}_{\mathsf{\text{max}}}$, but the maximum value of ${\mathcal{N}}_{\ell}$ is configured by the standard. Then, the anchor members ${\mathcal{N}}_{\ell}^{r}$ of ${\mathcal{N}}_{\ell}$ start to send beacons to form its own clusters setting ${{\mathcal{V}}_{\ell}}_{,p}\subseteq {\mathcal{V}}_{r}$. The process is performed sequentially until ${\bigcup}_{{\ell}^{\prime}=1}^{\ell}{\mathcal{N}}_{{\ell}^{\prime}}^{r}={\mathcal{V}}_{r}$, that is, when all reference nodes have been included in one of the clusters. Notice that this is a completely distributed algorithm.
For a better understanding of LACFA's operation, Figure 7 shows the state machine running in each anchor coordinator in the network. Initially, state S0 represents the situation in which a node is listening to the environment, waiting for a beacon signal of a clusterhead. Once the node receives it, a request to join that particular cluster is emitted in S1. If joining fails, for instance, because clusterhead does not admit another child, then the node returns to S0; otherwise it moves to S2. In such situation, the node is correctly incorporated into a cluster, and its aim becomes to associate coordinators to its own cluster. To do so, it emits periodically beacons. If a beacon response from an anchor coordinator is received, then the node processes it in S3. If the responding anchor coordinator requests cluster joining, the node might reject or accept it following the rules explained earlier. In the latter, ${\mathcal{N}}_{\ell}^{r}$ should be updated to ${\mathcal{N}}_{\ell}^{r}+1$. Another situation accounted in S3 is that of an anchor node leaving the cluster, and thus ${\mathcal{N}}_{\ell}^{r}={\mathcal{N}}_{\ell}^{r}1$. Analogously, S4 deals with messages received from target coordinators.
Considering the cooperation between nodes, that is, if a target node is located it might act as a reference for other coordinators target nodes, LACFA can be straightforwardly applied. In our case, the clusterchildren coordinators (coordinators that share the same parent coordinator) that are positioned with the initial anchor coordinators can work as references to the positioning of other clusterchildren coordinators (within range) of the same cluster using RCAPS solution.
5.1 LACFA protocol in mobile sensor networks
So far, we have addressed a WSN scenario where cluster formation takes place during the network startup phase. In Mobile scenarios, the network topology will inevitably suffer changes as nodes move. IEEE 802.15.4/ZigBee supports a faulttolerance mechanism for orphaned coordinator's realignment [3]. This process can start when the communication is lost between the child coordinator and its parent or when the child loses synchronization with its parent. This process is based on two different behaviors depending on the change: the orphaned realignment procedure with the same parent coordinator when it is possible, or otherwise, reset the MAC parameters leading to a new association procedure to the network.
Following this faulttolerance mechanism, for our case depending on which node is moving, the impact on the topology will be small or considerable. Notice that in mobile scenarios, the anchor parents of a cluster have to count the set ${\mathcal{N}}_{\ell}^{r}$ to be $\left{\mathcal{N}}_{\ell}^{r}\right\phantom{\rule{0.3em}{0ex}}\le {R}_{\mathsf{\text{max}}}$. For this purpose, when a node joins or leaves the cluster, it is notified with the corresponding primitives of the standard. However, also periodically, the anchor parents should send a request frame using the periodic beacons to the clusterchildren to cover the situation when a clusterchild leaves the cluster without notification.
In the following, we classify the events associated with the mobility of a particular node.
Target node mobility

Event 1: Target node gains or loses coverage of 3 or more anchor nodes. It will impact its own positioning capability.

Event 2: Target node leaves cluster coverage area. It will cause the target node to reconnect, if possible, at a different cluster. It may impact its own positioning capability.
Nonclusterhead anchor node mobility

Event 3: Target nodes within area of influence of anchor node gain or lose coverage. It may impact their positioning capability.

Event 4: Anchor node leaves cluster coverage area. The old cluster loses one anchor node, reducing its positioning capability. The anchor node might join a new cluster following LACFA's algorithm, see Figure 7.
Clusterhead mobility

Event 5: Child nodes may leave coverage area as cluster head moves. This is accounted for in previously defined mobility events (1:4).

Event 6: Cluster head leaves parent cluster coverage area. It follows the procedure defined by LACFA to reconnect to a new parent cluster, as in Figure 7.
Notice that all these mobility events have implications in the network connectivity, such as the necessary updates on the routing tables. However, in this article, we focus on implications on positioning only.
6 Simulations and results
In this section, we present the simulations of the rangebased localization algorithm explained in Section 3 in different WSN topologies: mesh topology defined by Zigbee and 802.15.4a standards, clustertree topology defined by Zigbee, and a clustertree topology with 802.15.4a PHY layer. Also, we present the results of our solution RCAPS for the clustertree topologies with our clustering algorithm for localization LACFA, and we compare it with the wellknown clustering algorithm LEACH. All the considered WSNs consist of N_{ n } + N_{ r } coordinators with N_{ n } = 100 target coordinators and N_{ r } reference coordinators. Nodes are randomly deployed in a cell of dimensions 50 × 50 m^{2}. The range of the nodes equals 20 m, the standard deviation for TOA σ_{ t } = 0.3, m and the standard deviation for RSSI σ_{ t } = 0.6 dBm.
Taking into account the described scenario, Figure 8 shows the number of located coordinators (%) versus the density of anchor coordinators N_{ r } within range. With clustertree topology and the LEACH algorithm, the number of located nodes is very low because ranging only can be done between parent and children. Results improve with LEACH algorithm and RCAPS solution because ranging can be done between parent and children and also between clusterchildren within the range of the same cluster. However, our clustering algorithm LACFA with RCAPS solution obtains better results than LEACH, because our algorithm increases the connectivity of the anchors coordinators. Also controlling the maximum number of anchor coordinators in a cluster (R_{max}) improves results. Best results are obtained with values of R_{max} between 7 and 10. For R_{max} = 7 and density of anchor nodes within range equal to 12, the number of located nodes is 50%; for density of anchor nodes within range equal to 30, the number of located nodes is 80%. Mesh topology is the upper limit because there are not limitations in the connectivity between nodes due to topology. In this case, the localization of all nodes (100%) is performed for density of anchor coordinators within the range equal to 10.
Figure 9 shows the Cumulative Distribution Function (CDF) of the position error for TOAbased ranging technique. For all the cases with our clustering algorithm LACFA, between 90 and 100% of the nodes have a position error less than 0.15 m. For mesh topology, the 100% of the nodes have an error less than 0.04 m.
The CDF of the position error for RSSIbased ranging technique is showed in Figure 10. The error increases for all the cases with respect to TOA CDF. With our clustering algorithm LACFA, between 90 and 100% of the nodes have a position error less than 1.8 m. For mesh topology, the 100% of the nodes have an error less than 0.8 m.
The histogram of the frequency that target nodes have anchor nodes within the range is represented in Figure 11. For LACFA with R_{max} = 7, the majority of target nodes are located with five anchor nodes within range and the maximum is 7. For LACFA with R_{max} = 10, the target nodes are located with higher number of anchor nodes until 10. However, for R_{max} = 32, the frequency is lower, and it is distributed for all the numbers of anchor nodes until 30. Therefore, the information of this figure explains that in Figures 9 and 10, for CDF of the cases with LACFA, the best results are obtained for R_{max} = 10.
Once a coordinator is located, it becomes a reference for locating other clusterchildren coordinators (coordinators that share the same parent coordinator) within range of the same cluster. We consider this kind of cooperation between coordinators in Figure 12 where we compare it with the case of absence of cooperation shown in Figure 8. This cooperation improves results for low R_{max}, and for all the cases, the cooperation improves for low densities. Also, as cooperation increases the number of references for localization in the clusters, the CDF decreases as shown in Figure 13 for TOAbased ranging technique.
In mobile scenarios, LACFA can recompose the occurred events because of movement in the clustertree. It is done in a distributed way as explained in Section 5.1. An example is shown in Figure 14 with a density of 30 anchor nodes within the range and R_{max} = 7. Anchor and target coordinators change its position following a random walk in each step. The number of located coordinators is maintained between 75 and 80%.
In this study, we have considered onehop rangebased localization. However, LACFA could also improve the performance of multihop ranging in a clustertree topology as follows: first, as onehop connectivity to anchor nodes increases with LACFA, it can be expected that secondhop connectivity will improve as well. Second, since LACFA provides a higher degree of onehop connectivity, it is expected to reduce positioning error in multihop algorithms as well, since more onehop distance measurements will be available. If an algorithm such as the weighted least squares is used, then onehop links can be given higher weight thus reducing the error.
7 Conclusion
In this study, we have focused on increasing the probability of localization of sensors in a clustertree WSN. We have dealt with a scenario where a subset of sensors, called anchor or reference nodes, is aware of its own position and helps target nodes determine theirs through rangebased positioning algorithms. Since at least four range measurements with anchor nodes are necessary for positioning of target nodes (threedimensional scenario), rangebased algorithms benefit from a high degree of connectivity. However, clustertree topology tends to limit connectivity between nodes in order to save energy. This results in very poor performance of the network in terms of localization. In order to improve rangebased localization in a clustertree topology, we have proposed LACFA, an algorithm for LocalizationAware Cluster Formation in WSNs. It does so by properly allocating anchor nodes to different clusters during the network formation phase, and by allowing peers in the same cluster to communicate with each other. Results show this simple distributed clusterformation algorithm greatly improves the probability of localization of sensor nodes for a moderate density of anchor nodes. Results show that LACFA increases onehop connectivity from target to anchor nodes improving the onehop rangebased positioning. Also, LACFA outperforms LEACH without paying a penalty in terms of energy consumption.
References
 1.
IEEE Standard Part 15.4: Wireless Medium Access Control (MAC) and Physical Layer (PHY) Specifications for LowRate Wireless Personal Area Networks (WPANs) IEEE Std 802.15.42006 2006, 1305.
 2.
IEEE Standard Part 15.4: Wireless Medium Access Control (MAC) and Physical Layer (PHY) Specifications for LowRate Wireless Personal Area Networks (WPANs) IEEE Std 802.15.4a2007 (Amendment to IEEE Std 802.15.42006 adding alternate Physical Layer) 2007, 1203.
 3.
Alliance Zigbee: Zigbee Specification. 2005.
 4.
Patwari N, Ash J, Kyperountas S, HeroIII A, Moses R, Correal N: Locating the Nodes: Cooperative Localization in Wireless Sensor Networks. IEEE Signal Processing Magazine 2005, 22(4):5469.
 5.
Wymeersch H, Lien J, Win M: Cooperative localization in wireless networks. Proceedings of the IEEE 2009, 97(2):427450.
 6.
Savic V, Población A, Zazo S, García M: Indoor Positioning Using Nonparametric Belief Propagation based on Spanning Trees. EURASIP Journal on Wireless Communication and Networking 2010, 2010: 9:19:13.
 7.
Mao G, Fidan B: Localization Algorithms and Strategies for Wireless Sensor Networks. Information Science Reference; 2009.
 8.
Sun G, Chen J, Guo W, Liu K: Signal Processing Techniques in Networkaided Positioning: a survey of stateoftheart positioning designs. IEEE Signal Processing Magazine 2005, 22(4):1223.
 9.
Larranaga J, Muguira L, LopezGarde JM, Vazquez JI: An environment adaptive ZigBeebased indoor positioning algorithm. Proceedings of the international conference on Indoor Positioning and Indoor Navigation (IPIN) 2010, 18.
 10.
He T, Huang C, Lum B, Stankovic J, Adelzaher T: Rangefree localization schemes for large scale sensor networks. Proceedings of the international conference on Mobile computing and networking (Mobicom) 2003, 8195.
 11.
Vivekanandan V, Wong V: Concentric Anchor Beacon Localization Algorithm for Wireless Sensor Networks. IEEE Transactions on Vehicular Technology 2007, 56(5):27332744.
 12.
Savvides A, Han CC, Strivastava MB: Dynamic finegrained localization in AdHoc networks of sensors. Proceedings of the 7th annual international conference on Mobile computing and networking (MobiCom) 2001, 166179.
 13.
Langendoen K, Reijers N: Distributed Localization in Wireless Sensor Networks: a quantitative comparison. Elsevier Computer Networks 2003, 43(4):499518. 10.1016/S13891286(03)003566
 14.
Tennina S, Renzo MD, Graziosi F, Santucci F: Distributed and Cooperative Localization Algorithms for WSNs in GPSless Environments. The Italian Institute of Navigation (I.I.N.), Issue Theme: Integration of Navigation with Communication and Remote Sensing Applications 2008, 188: 7076.
 15.
Yu K, Guo Y, Hedley M: TOAbased distributed localisation with unknown internal delays and clock frequency offsets in wireless sensor networks. IEEE Signal Processing 2009, 3(2):106118. 10.1049/ietspr:20080029
 16.
Ismail G, ChiaChin C, Fujio W, Hiroshi I: NLOS identification and weighted leastsquares localization for UWB systems using multipath channel statistics. EURASIP Journal on Advances in Signal Processing 2008.
 17.
Cho H, Kang M, Kim J, Kim H: Zigbee based location estimation in home networking environments. IEICE Transactions on Information and Systems 2007, E90D(10):17061708. 10.1093/ietisy/e90d.10.1706
 18.
Abbasi AA, Younis M: A Survey of Clustering Algorithms for Wireless Sensor Networks. Elsevier Computer Communications 2007, 2007: 28262841.
 19.
Boyinbode O, Le H, Mbogho A, Takizawa M, Poliah R: A survey on clustering algorithms for wireless sensor networks. 13th International Conference on NetworkBased Information Systems (NBiS) 2010, 358364.
 20.
Moragrega A, Ibars C: Performance analysis of cooperative and range based localization algorithms for Zigbee and 802.15.4a Wireless Sensor Networks. IEEE 21st International Symposium on Personal Indoor and Mobile Radio Communications (PIMRC) 2010, 19962001.
 21.
Sayed A, Tarighat A, Khajehnouri N: Networkbased Wireless Location: challenges faced in developing techniques for accurate wireless location information. IEEE Signal Processing Magazine 2005, 22(4):2440.
 22.
Shi Q, Correal N, Kyperountas S, Niu F: Performance comparision between TOA ranging technologies and RSSI ranging technologies for multihop wireless networks. In Proceedings of Vehicular Technology Conference (VTC). Dallas, Texas, USA; 2005:434438.
 23.
Shen G, Zetik R, Thoma R: Performance comparison of TOA and TDOA based location estimation algorithms in LOS environment. 5th Workshop on Positioning, Navigation and Communication (WPNC) 2008, 7178.
 24.
Godsil C, Royle G: Algebraic Graph Theory. Volume 207. Graduate Texts in Mathematics. Berlin, Germany: SpringerVerlag; 2001.
Acknowledgements
This study was partially supported by the European Commission in the framework of the FP7 Network of Excellence in Wireless COMmunications NEWCOM++ (contract no. 216715), as well as ICTFP7251557 SWAP and COST Action IC0803 (RFCSET) projects, by the Spanish Science and Technology Commission TEC200802685/TEC (NARRA), and the Generalitat de Catalunya under grant 2009SGR940.
Author information
Additional information
Competing interests
The authors declare that they have no competing interests.
Authors’ original submitted files for images
Below are the links to the authors’ original submitted files for images.
Rights and permissions
Open Access This article is distributed under the terms of the Creative Commons Attribution 2.0 International License (https://creativecommons.org/licenses/by/2.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
About this article
Received
Accepted
Published
DOI
Keywords
 wireless sensor networks
 positioning
 clustertree
 least squares