A simple iterative positioning algorithm for client node localization in WLANs

The ability to determine in real-time the geographic location of client nodes is an important tool in wireless networks, allowing instantaneous mobile tracking, implementation of location-aware services and also efficient channel and power allocation planning. Among existing classical cooperative localization techniques for wireless networks, the maximum likelihood estimator (MLE) is theoretically the best. However, the gradient-based algorithms that are commonly used for maximum likelihood estimation are quite sensitive to the initial values and cannot achieve the theoretical optimal performance. In this paper, we propose a new iterative positioning algorithm based on received signal strength information that employs a location ordering strategy and a numerical nonlinear optimization method. The algorithm performance is evaluated through simulation for different network scenarios. A real wireless network scenario is also implemented in order to demonstrate the algorithm effectiveness. The proposed algorithm, while presenting a simplified implementation, can achieve better positioning estimates than the classical MLE approach based on the conjugated gradient.


Introduction
Wireless networks have found widespread application in many scenarios including entertainment, medicine, security, automation, emergency services, among other uses. These networks may operate under different architectures, including structured mode using access points (APs) and unstructured modes using ad hoc and mesh topologies. The knowledge of node positions in a wireless network has many applications. In wireless mesh networks (WMNs) [1], the positioning information allows the creation of efficient scheduling algorithms to reduce collisions and interferences. The positioning information can be used to estimate the interference a node causes in other nodes of the network and thus improve the multiple access strategies, scheduling mechanisms, channel allocation algorithms, and routing protocols.
In wireless local area networks (WLANs), the positioning information can be used for location-based services *Correspondence: marcelo@ppgia.pucpr.br 1 Pontifical Catholic University of Paraná -PUCPR, Rua Imaculada Conceicao, Curitiba 1155, Brazil Full list of author information is available at the end of the article [2], mobile device tracking [3][4][5], and physical layer authentication [6]. Even though there exist more precise location techniques based on the angle-of-arrival (AoA), time-of-arrival (ToA), and time-difference-ofarrival (TDoA) [7,8], algorithms based on the received signal strength (RSS) measurements are still very attractive from a practical point of view because this metric is available in every radio interface and does not require any additional hardware features nor explicit cooperation from the localized node. Among existing classical localization techniques for wireless networks, the maximum likelihood estimator (MLE) is theoretically the best. However, the gradient-based algorithms that are commonly used for MLE are quite sensitive to the initial position estimation of the unknown nodes and cannot achieve the theoretical optimal performance. The development of a positioning algorithm less susceptible to the initial coordinate estimations motivates our investigation.
In this paper, we propose an iterative positioning algorithm for localization of client nodes in WLANs. The pairwise range estimation is based on RSS. We consider a centralized processing unit (central node), http://jwcn.eurasipjournals.com/content/2013/1/276 as usually implemented in many networks for operation management. It is assumed that each network node collects received power information and MAC addresses from neighbor nodes within its transmission range. Such information is sent to the central node that executes the localization algorithm. The main contributions of the proposed algorithm are the use of a selection and ordering strategy for the reference (or anchor) nodes and also the application of the numerical nonlinear optimization method of Nelder-Mead [9], that does not require the derivative of the cost function. The algorithm performance is evaluated through computer simulations for different network scenarios. A real wireless network scenario is implemented in order to demonstrate the algorithm effectiveness. The proposed algorithm, while presenting a simplified implementation, can achieve better positioning estimates than the classical MLE approach based on the conjugated gradient [10].
The rest of this paper is organized as follows: in Section 2, we present a brief description of the localization technique principles and describe the path loss channel model with shadowing which is employed in the algorithms using RSS. In Section 3, we describe the classical localization techniques for wireless networks. The proposed algorithm is presented in Section 4. The performance results are presented and discussed in Section 5, while Section 6 concludes the paper.

Localization techniques overview
Consider a wireless network scenario where a specific node with unknown position, called unknown node, should be localized. The other nodes in its vicinity are assumed to have known positions and are called reference nodes. It is possible to estimate the unknown node coordinates by applying a localization technique. This procedure starts with the reference nodes transmitting their own coordinates to the unknown node. Then, the unknown node must estimate its relative distance to each of the references based on any technique of range estimation. Finally, the unknown node applies a combining technique over the distances estimates and received coordinates in order to estimate its own position. Alternately, if the unknown node does not cooperate in the localization process, the procedure is executed by the set of reference nodes based on opportunistic measurements collected when the unknown node transmits. We do not include in our analysis the class of Bayesian localization algorithms [11][12][13][14] as those assume the cooperation among all nodes. In our scenario, we consider that the unknown node may be non-cooperative.
Basically, the location discovery approaches consist of two phases [15]. In the first phase, the relative distance between two nodes can be estimated using methods as RSS, ToA, TDoA, and AoA [7]. Distance estimation techniques based on RSS measures the signal power at the receiver. Assuming a known transmit power, the propagation loss is computed using a theoretical or empirical model and this loss is translated into a distance estimate. This technique is mainly used for radio frequency (RF) signals and is subject to different types of errors: additive noise, multipath fading, and shadowing. A time-based method (ToA/TDoA) estimates the relative distance based on the time or time difference the RF signal takes to travel from the transmitter to the receiver node. This technique assumes that the signal propagation speed is known and can be applied to different signal types including RF, acoustic, infrared, and ultrasound. Finally, the AoA technique is applied to estimate the angle at which signals are received and is generally used in combination with other techniques. An interesting overview of these algorithms for wireless position estimation is presented in [16].
In the second phase, the estimated relative distances should be combined to obtain the node position. The first combining approach is to use a method called hyperbolic trilateration, where the node position is estimated calculating the intersection point of three circumferences. Each of them with a center at one reference, and with radius equal to the estimated distance between its center reference and the unknown node. A second strategy denoted triangulation can be used if the signal angleof-arrival is available instead of the distance. The node position is computed using simple trigonometry laws. A third combining method called multilateration calculates the node position by minimizing the differences between the noisy measured distances and estimated distances, using MLE. The multilateration technique is a generalization of the trilateration by using more than three references [15].
In real-world scenarios, the RSS measurements are highly dependent of multipath fading and shadowing, so that RSS is considered a poor range estimator compared with ToA and AoA [7]. However, the RSS measurement is an inexpensive technique because the signal power, generally available at any RF transceiver, can be measured during normal data communication without additional transmissions or bandwidth requirements. Therefore, the technique does not require any additional hardware setup nor extra energy consumption. Technically, the random shadowing behavior of the wireless channel becomes the most relevant source of error for a RSS-based location system. Measurement errors affects the TOA distance measurement in an additive way while RSS is affected in a multiplicative way [7]. Finally, even though it is less precise, due to its low cost and ease of practical deployment, the RSS technique is used for range estimation in the proposed localization framework. http://jwcn.eurasipjournals.com/content/2013/1/276

Problem formulation
Consider a receiver i and a transmitter j separated by distance d ij . Assuming the log-distance propagation model [17,18], the mean received power, P dBm ij , is predicted as where P dBm 0 is the power received at a reference distance d 0 from the transmitter. In this model, the signal power decays exponentially with d ij , where parameter η is the path loss exponent. The mean received power at different points at the same separation distance from the transmitter may vary significantly. This effect is caused by the randomness of shadowing and is statistically modeled as a random variable χ. The variable χ has normal distribution in dB with zero mean and variance relatively constant with distance [7] so that we assume a constant variance. The received power P dBm 0 at a reference distance d 0 can be predicted by measurement or obtained analytically, for instance, using the free space propagation model where P dBm t is the transmit power, λ = c/f is the signal wavelength, f is the carrier frequency and c = 3×10 8 m/s. Consider a wireless ad hoc network with m reference nodes and n unknown nodes. The positioning algorithm aims to locate the n unknown nodes as close as possible to their real position based on peer-to-peer range estimation and on the known coordinates of the references. The core algorithm mechanism is the atomic multilateration. Because of the shadowing effect, the trilateration in a real scenario will not have a unique intersection point. Figure 1 presents a generic triangulation scenario, including the symbolic notation used in the problem formulation. The scenario shows three reference nodes identified by R j , j = 1, 2, 3. The circumference surrounding each reference node has radius representing the distance, d ij , that an unknown node U i estimates to be from the reference R j . The distance estimation is computed using the path loss model. The intersections of the circumferences define an area where the unknown node is expected to be. The unknown node real position is denoted by and is identified by the square in the intersection area in Figure 1. A possible candidate position for the unknown node is identified by the triangle in the same figure and is denoted byũ i = (ũ x i ,ũ y i ). The coordinate of reference node R j is defined as r j = (r x j , r y j ). The distance between the unknown node candidate position and each of the references is represented by d ij . Additionally, the distance between a reference node R j and the real position of unknown node U i is denoted by d ij . Ideally, consider the log-distance model in (1) without the shadowing effect, Therefore, it is straightforward to compute the estimated distance,d ij , from the received power measurement, P dBm ij , as beinĝ From another point of view, we can think thatP dBm ij is derived from the real distance, d ij , plus a shadowing error. In this case, we can derive the following relation Following the derivation of [10] and combining (4) and (5) we obtain in which becomes clear that the estimated distanced ij is affected by the shadowing in a multiplicative way, or equivalently, that the estimation error d ij − d ij is proportional to the range. In a practical localization framework, the nodes participating in the localization process should deal with power measurements. Therefore, it is convenient to reformulate the problem based directly on this metric. Then, assume that an unknown node U i is able to monitor signal transmissions from a set of reference nodes in the neighborhood, denoted by R. The mean power that unknown node U i experiences from transmissions originated by http://jwcn.eurasipjournals.com/content/2013/1/276 node R j ∈ R isP ij = P ij + χ, where P ij is the power that should be received at real position of node U i in an ideal propagation scenario (no shadowing). Additionally, we define the mean theoretical received power at a candidate location of node U i with respect to transmissions from nodes R j ∈ R as being P ij . The proposed algorithm considers a cost function given by the squared error between RSS measurements and estimated powers from references at the candidate position, The use of a weighting factor for the cost function that reinforces the contribution to the location from the closest references was suggested in [15], providing more precise range estimation. The proposed algorithm takes advantage from this observation and includes into the cost function a weighting factor. The weighting factor between unknown node U i and reference node R j reinforces the contribution from closer references and increases the location precision. The positioning algorithm evaluates as many candidate positions as required to find the one which satisfies a predefined criteria. Whenever a candidate position for node U i is guessed, The estimated receiver power at the current candidate position,ũ i , can then be computed as The candidate position that minimizes f (ũ i ) is the estimated position of the unknown node.

Proposed algorithm
In this section, we present the details of the proposed localization algorithm, but first we discuss the influence of ordering in the localization accuracy.

The Influence of ordering
As discussed in the previous section, the localization error is proportional to the range. In order to demonstrate this effect, it was computed the mean location error for a node placed in different predefined positions, as enumerated in Figure 2. We applied the cost function defined by (7). The results for each predefined position are shown in Figure 3.
The positions 1 to 8 correspond to a vertical movement of the node from the center and positions 9 to 15 correspond to a diagonal movement. The results clearly show that the error in range estimation is significantly reduced when the node approaches the reference R 4 . Therefore, given that the real node position is determinant for the error in range estimation, it is reasonable to assume that the location ordering may affect the mean location error. Based on this assumption, we derived a metric which is a function of the node position. This metric should consider the power measurements and the corresponding estimated distancesd ij , which is the only information available for the positioning algorithm. Moreover, the proposed algorithm first locates the node which is in the proximity of the largest number of references. Therefore, a metric is proposed to quantify the proximity of any given node to the reference nodes so that the algorithm can estimate which is the node closest to the largest number of references. In particular, the proximity factor of a node U i is computed as where R is the set of reference nodes in the neighborhood, which also includes the unknown nodes already localized.
Computing the proximity factor for nodes in the scenario in Figure 2, we obtain the values shown in Table 1. The first column, denoted target location sequence, presents the nodes in ascending order of location error. That is the resultant error location considering the localization of that node only. This column in Table 1 is used only as a reference, as this would be the ideal order in which the nodes should be located in case of sequential node localization (the node that is located with the smallest error should be located first, then it becomes a reference for the other nodes, and so on). The second and third columns, show the F proximity value for each node i. A selection metric should be defined in order to define the localization sequence of the unknown nodes. The selected sequence must be as close as possible to the target sequence presented in the first column of Table 1   positions associated with lower location errors should be localized first. Comparing the target sequence and the sequence obtained using F proximity , we can verify that this goal is not fully achieved. For example, the node in position 8 has a mean location error about 2 m greater than the node in position 15. We can observe in Figure 2 that when a node moves along the vertical or diagonal directions, it approaches some references and moves away from others. However, when the node is closer to a specific reference, its mean location error achieves a lower value. Based on this observation, a new metric was empirically derived, called proximity relation, which is a function of F proximity and the lowest distanced ij estimated (measured) by the unknown node U i to a reference R j or an already localized node. The set of unknown nodes already localized will be denoted by L. The proximity relation is defined as where α = 1.15, for 1 ≤ j ≤ m 1, for j > m.
Based on simulation experiments, we identified that the distance estimates between two unknown nodes not yet localized can be used to improve the sequence ordering used by the localization algorithm. This is done by adding to F proximity the constant parameter γ = (n−|L|)·max( D), where n is the number of unknown nodes, |L| is the cardinality of L, and D = [d ij ] is the matrix of estimated distances. The scaling factor α has the objective to locate unknown nodes that are closer to a great number of reference nodes. Therefore, if there are two unknown nodes with the same value of R proximity (i), the one that has a larger number of closer reference nodes will be localized first. This procedure is a strategy to give a localization reliability metric for each of m reference nodes. The performance was evaluated for values 1 ≤ α ≤ 3 and the best result obtained through simulations was with α = 1.15. The R proximity values for a node at the different positions http://jwcn.eurasipjournals.com/content/2013/1/276 indicated in Figure 2 are also presented in Table 1. Note that the estimated location sequence obtained based on R proximity is very close to the target location sequence.
As another example, consider the network topology of Figure 4. By applying the R proximity factor to determine the localization ordering of the unknown nodes, they will be located in the following order: {9, 3, 7, 12, 13, 15, 11, 8, 14, 1, 4, 5, 2, 6, 10}. Each located node that becomes a reference node affects the metric for the next nodes. This means that unknown nodes closer to already located nodes will be localized first. Figure 5 presents a comparison between the performance of the location algorithm with and without node ordering, as a function of the number of unknown nodes in the network. It should be pointed out that the location error can be significantly reduced when the number of unknown nodes increases, which we consider to be a quite interesting feature.

Algorithm
The proposed algorithm locates nodes individually, following the sequence ordering obtained using the R proximity factor, where the node with the highest R proximity factor is located first. The pseudocode is presented in Algorithm 1. The set of reference nodes, R, have known coordinates, r j . These nodes collect the power measurements from unknown neighbor nodes to form matrixP. The reference power P dBm 0 and the pathloss exponent η are predefined parameters. Based on the power measurements, the R proximity factor is computed for all unknown nodes. Then, the iterative localization procedure is started, where the unknown nodes are localized in the order based on the R proximity factor. The coordinates are estimated by minimizing the cost function f (ũ k ). The localized node becomes part of the reference set for the next iteration of the algorithm. Select unknown node U k ∈ U , where k = arg max i R proximity (i)

1.10
Select an initial candidate position for unknown node U k ,ũ k = (ũ x k ,ũ y k )

1.12
Setû k =ũ k and update set L = {L U k }

end
Note that in the proposed algorithm, we include a scale factor β ij for the cost function terms (please compare step (1.11) of Algorithm 1 and (7)). The inclusion of the scale factor is based on the fact that the error in the estimation of relative distanced ij increases for greater distances between i and j. The scaling factor β uses the relation between F proximity (i) in (10) and the estimated distance d ij between unknown node i and reference node j as a way to attribute a higher scale factor to an unknown node closest to the reference. The parameter β kj is computed as where ρ is a constant which benefits the proximity of an unknown node to any reference and whose optimal value obtained through extensive simulations is a In Figure 6, we present a comparison between the performance of the proposed algorithm with and without the proposed scale factor β ij in the cost function, considering the same scenario with four reference nodes presented in Figure 4. It is clear that the inclusion of the scaling factor is beneficial in terms of performance.
Moreover, in our implementation, we use of the Nelder-Mead nonlinear optimization numerical method [9] for minimizing the weighted cost function, therefore without requiring the derivative of the cost-function, as is the case of MLE methods based on the conjugate gradient [10].

Initial candidate position problem
For practical implementations of localization algorithms, the best strategy to select the initial candidate positions for unknown nodes is to apply the method proposed in [19], which selects the initial candidate position based on estimated distances from reference nodes. Consider the scenario shown in Figure 7, with reference nodes r 1 , r 2 , and r 3 . The circumferences surrounding each reference node represent the estimated distances for unknown node k and are defined as By combining (15) and (16), we obtain which is the equation that represents the straight line defined by the two intersection points of circles defined by (15) and (16). Similarly, by combining (15) with (17) and (16) with (17), we obtain the other two line equations: The intersection of these three straight lines defines the initial candidate position of unknown node k for the localization algorithm, as marked by the triangle in Figure 7. In a specific scenario, where the three references are aligned, the lines are parallel. In such case, the initial candidate position is defined as the mean computed among the coordinates defined by the intersection of the line defined by the references with the parallel lines [19].

Practical results
The design of the proposed algorithm is heavily based on extensive computer simulations. Therefore, in order to evaluate the effectiveness of our approach, we tested the proposed localization algorithm in a real wireless network scenario implemented in an outdoor environment, as shown in Figure 8. The scenario consists of one unknown node designated by i and three reference nodes denoted by R j , j = 1, 2, 3. The wireless nodes consist of mobile devices equipped with IEEE802.11b interfaces, operating in channel number 4 (carrier frequency 2,417 MHz). This channel was selected because it was the free available frequency band without co-channel and adjacent channel interferences at the moment.
The path loss exponent required by the algorithm, η, was determined from RSS measurements in a range distance from 10 to 100 m, in steps of 10 m. At each distance, d, a set of 1,000 RSS samples were collected to determine the average values in the downlink and uplink channels. These average values are plotted in Figure 9. The average noise power in the wireless interfaces was measured as −100 dBm. The estimated value of η, using the minimum mean squared error (MMSE) method, was obtained as η = 2.4 for downlink and η = 2.2 for uplink. In the positioning algorithm, we used the mean value, η = 2.3. In the practical survey, five scenarios were considered. The configuration parameters and measured powers of each scenario are summarized in Table 2. The localization algorithm considers the average power values, P j , measured  at each reference node j, as shown in Table 2, which also shows the variance of the collected power samples, σ 2 P j . In order to apply the proposed localization algorithm, it is necessary to first determine the received reference power, P 0 , at a reference distance, d 0 , from the transmitter. The received signal power at reference distance d 0 is computed using where L dB 0 is the free space path loss for a reference distance d 0 = 1 m. The parameters used in (21) were obtained from equipment specifications and are presented in Table 3.
In order to evaluate the performance of the proposed algorithm, we compared it with the classical MLE [10] which is based on the conjugated gradient optimization method b . The practical results in terms of location error are presented in Figure 10 using the weighted cost function with parameter β as defined by (13). The results show that the use of a weighted cost function can lead to considerable reductions in localization errors in all practical network scenarios. For scenario E, this reduction may reach approximately 30%. Even for scenarios A and B, a low but significant reduction around 3% is achieved. When the β scale factor is applied to the cost function, the higher reported RSS receives a higher weight because they correspond to more precise measurements obtained from reference nodes closer to the unknown node. This explains the best result obtained for scenario E, where the distances from the three reference nodes to the unknown node are different.
Some additional insights can be obtained analyzing the data shown in Table 4 and Figure 10. For each scenario, this table presents the real distances d ij among the  unknown node and the reference nodes, as well as the estimated distances d ij . For scenarios A, B, and C, the mean reported RSS values caused a positive error in distance estimation, mainly for the values measured with respect to reference R 3 . It means that the unknown node is sensed to be farther away from this reference than it really is. The more distant are nodes i and j, the lower is the weight of its RSS value in the cost function and therefore the erroneous RSS measures have less influence in the optimization. This can lead to error reductions of up to 12% in these scenarios with respect to the MLE algorithm, as seen in Figure 10. Scenario D presents large values of negative errors in distance estimation, so the unknown node seems to be closer to reference nodes than it really is. The relative distance estimation to R 3 was more accurate with respect to real distance d i3 = 50 m. By observing Figure 8, we can verify that node i is positioned exactly between R 1 and R 2 . Therefore, even if the RSS values between node i and references R 1 and R 2 are inaccurate, there is a tendency of the algorithm to optimize the location of i equidistant to R 1 and R 2 since then the average reported powers to these references have similar values, as was the case. The weighting factor β reduces the localization error even more when it attributes higher weights to RSS values reported from R 1 and R 2 , because reference R 3 reported a lower RSS value, even though more precise.

Conclusions
In this paper, we present a new localization strategy based on RSS measurements. The algorithm is centralized and iterative: centralized because a node must accumulate the RSS measurements and run the location algorithm for all the other nodes; iterative because each node is localized one at a time and once located it becomes a reference to the location of other unknown nodes in the next iterations. The Nelder-Mead nonlinear optimization numerical method is employed to find the candidate coordinates for the unknown node, by minimizing the cost function. It is shown that the proposed algorithm can achieve better practical position estimates than the classical MLE strategy that employs gradient-search-based methods.
Endnotes a There are two constants that are used in our proposed algorithm and that were numerically obtained (α and ρ). These values were obtained after several tests considering up to n = 30 unknown nodes randomly located within an area of 15 × 15 m 2 (the node positions are random and follow a uniform distribution). For each number of unknown nodes, an ensemble of topologies were generated and several values of α and ρ were tested. The impact of ρ in the performance of the proposed algorithm is larger than the impact of α.
b Among existing classical cooperative localization techniques for wireless networks, the MLE is theoretically the best in the sense that it asymptotically achieves the Cramer-Rao bound (CRB). However, the gradient based iterative algorithms that are commonly used to achieve MLE positions are quite sensitive to the initial values and cannot achieve the theoretical optimal performance [14]. In this case the optimum solution is the minimum mean square error (MMSE) algorithm, which requires the prior distribution on the location of the nodes.