Abstract
In recent years, the use of wireless sensor networks has been increasing. Localization is a fundamental problem in wireless sensor networks (WSNs), since location information is essential for diverse applications such as tracking, quality network coverage, health, and energy efficiency. In this paper performance of localization algorithms such as range-free, range-based, and fuzzy-based decision is evaluated. We introduce a modification of an algorithm by providing weights to the correlation matrix to improve correctness. In all the cases the accuracy, precision, and computational complexity are evaluated as performance metrics. Location algorithms are evaluated using two scenarios, a first stage where all nodes are randomly distributed in a given area and a second scenario where four APs (access points) are placed on fixed positions and unknown nodes are randomly distributed within the sensing area. The received signal strength (RSS) is used to estimate the position of a node of interest. In the simulation results we show how our modified algorithm improves localization. On the other hand, we also have acceptable accuracy using distance-based algorithms, but they are more complex computationally.
1. Introduction
WSNs have attracted the attention of the scientific community to be the technology for the future, to sense the environment wirelessly with devices extremely small and inexpensive [1]. In many applications, the sensed information is useful only when the location from where such information was measured is known. Thus, sensor nodes need to estimate their position [1, 2]. Additionally, WSNs need more efficient and robust protocols to further optimize network resources, such as energy and response time, depending on the position of the nodes. The precise location of sensors at low cost is a critical requirement for deployment of WSNs in a wide variety of applications (see [3, 4]), such as animal tracking, which allows analyzing animal behavior and interactions with other species, logistics, where sensors report their location when required to be found, and health, where location of equipment and medical employees in emergencies [5] is needed.
Node localization is described according to a reference coordinate system, defined by anchor nodes with known positions [6]. However, in reconfigurable networks such as ad hoc and sensor networks, connectivity is not always direct, and anchor nodes or access points are connected through multiple hops to the node of interest (NOI) [6, 7]. In a multihop scenario, [3], neighboring nodes provide information of the NOI (unknown coordinates) and help to estimate its location. Currently there are many techniques for determining the distance between sensor nodes. GPS systems are very useful in outdoor scenarios; however, their performance is affected adversely in indoor scenarios [6, 8], and the increase in hardware for the sensors and energy consumption make it difficult for GPS to be considered as an integral solution. Also, traditional multilateration techniques can be of use in certain scenarios where estimation is based on signal strength, time, or angle of arrival. In time of arrival (TOA) technique, the nodes physically calculate distance through speed and time of signal propagation. In angle of arrival (AOA) distance to the NOI is estimated by using the direction of the signal received by nodes usually through an antenna array. In time difference of arrival (TDOA), nodes calculate the time difference to avoid dependence on departure time of signal, and multilateration is achieved combining these differences from several anchor nodes. In received signal strength indicator (RSSI) the power received by the node is used to calculate the propagation loss and estimate distance, using theoretical or empirical model of path loss [1].
This paper presents a performance evaluation of RSS-based localization algorithms. These techniques are a perfect fit to be implemented in simple systems, since AOA-based distance estimation involves costly hardware, TOA requires perfect synchronization, and TDOA is coverage limited [9]. The performance evaluation algorithm is carried out to determine the efficiency and the relevance in the use of localization or positioning algorithms in wireless sensor networks. We briefly introduce range-free and range-based position location algorithms, as well as those based on fuzzy decision techniques to later modify one of the algorithms by assigning weights to the correlation matrix and show how this change improves accuracy. All the algorithms are analyzed using root mean squared (rms) error between the estimated position and the true location of the NOI. We show that our proposed algorithm performs well for different noise scenarios and with increasing network node density. We provide a qualitative analysis of performance of the algorithms and a computing complexity analysis in terms of processing time as a function of node density as means to help one decide the best position location technique to apply.
The rest of the paper is organized as follows. Section 2 formally presents the fundamental position location problem and the signal propagation model that is used throughout the paper. In Section 3 the localization techniques are described, which are classified into two types: range-based and range-free algorithms. Section 4 presents a modification of the weighted least squares multilateration algorithm. Meanwhile, in Section 5, the performance of these algorithms is evaluated under two scenarios, and the main results obtained are shown in terms of defined performance metrics. The two main scenarios consist of a randomly generated node network and a structured set of four reference nodes with a randomly generated node network. Finally we highlight the main conclusions of this research and references that support it.
2. Problem Statement
Consider a set of sensor nodes on a two-dimensional plane where a NOI with unknown coordinates
The log-normal propagation model is used to estimate the power received, where the signal power is inversely proportional to the separation distance
where A is the average power received at a reference distance
3. Related Work: Localization Techniques
Localization techniques are mainly classified into two categories: range-based and range-free [11]. Range-based techniques need to estimate distances between nodes and the NOI in order to estimate its position. Distance is usually estimated using RSSI, TOA, or TDOA. Some of these techniques are multilateration [7]; multidimensional scaling (MDS) [12]; ad hoc positioning systems [13]; and circular positioning and hyperbolic algorithms [14]. Range-free techniques are those where NOI position estimation is not based on the distance estimation between nodes but on the solution to heuristic or optimization problems with a decentralized characteristic [15]. This group of techniques includes DV-Hop [7, 16, 17]; approximate point in triangle [7, 18]; centroid [7]; rectangular intersection [19]; circular intersection [19]; and hexagonal intersection [19] among others. In this section, we present briefly several range-free and range-based techniques that will be compared to our proposed algorithm in Section 5.
3.1. Range-Free Techniques
Range-free localization techniques involve the received signal strength in order to estimate separation distance to the NOI and calculate its position. Within this group, there are some techniques that require knowing the location of reference nodes to estimate the position of other nodes, such as APIT [18, 20], which creates all possible combinations of triangles with three reference nodes to estimate the overlapped area of these triangles where the NOI is found by calculating the centroid of the intersection area of the triangles. The advantage of this method is that it is accurate for high density networks, but their computational cost is very high as more triangles are added. There are also other methods based on the same criteria as APIT, for example, the circular intersection algorithm, which finds the area resulting from the intersection of circles centered at the nodes. This method is also computationally costly. However, rectangular intersection algorithm requires less computational complexity, since the resulting figure from the intersection of boxes is a rectangle. Nevertheless, the rectangular intersection algorithm is less accurate than the circular intersection algorithm [19]. Given a set of receivers or anchor nodes within transmission range of a node to be located, we can formulate the idea of the centroid by approximating the coordinate of the unknown node as the average of a set of known N anchor node positions
In the following, we describe range-free algorithms based on the centroid and nearest neighbor techniques, with a brief introduction of the form in which position is estimated.
3.1.1. Weighted Centroid Localization (WCL) Algorithm
The centroid localization (CL) approach assumes that all anchor nodes are approximately equidistant from the NOI. However, [22] argues that some reference nodes are more likely than others to be close to the NOI, thus under this argument it proposes the weighted centroid localization (WCL) scheme that uses weights to improve location accuracy. It assigns greater weight to the positions of those anchor nodes closer to the NOI and less weight to the farthest ones. The weighted centroid is computed as
with the weights
3.1.2. Relative Weighted Localization (RWL) Algorithm
This approach is similar to that of the WCL scheme, except that the weights are assigned by a linear relationship of the RSS measured values of each receiver [24]. Denote
3.1.3. Relative Exponential Weighted Localization (REWL)
REWL scheme is a variant of the WCL scheme where the weight increases exponentially with the power of RSS [24]. In this way, the effect of the closest nodes is further accentuated in the computed centroid. Consider factor λ as a positive real value between 0 and 1; then the weights of each receiver are computed as
The exponent takes positive real values; therefore, weights
Figure 1 shows the behavior of the weights described in the algorithms for RWL and REWL for three different values of the weighting factor λ. One can see that receiver weight is increased as power received (RSS) improves when the value of λ increases. The weight changes significantly when RSS is above −80 dBm for λ above 0.2.

Example of relative span weights.
3.1.4. Centroid Algorithm with Fuzzy Logic
This is another variant of the REWL scheme where fuzzy logic system (FLS) is used to assign weights to a given set of anchor nodes. This mechanism consists of a fuzzifier, the inference mechanism, and the defuzzifier. The fuzzifier block is responsible for allocating the linguistic values to the input variable, for example, {low, medium, high}. The outputs of this block are membership functions, the inference mechanism is where a set of rules or conditions if-then is assigned, and the defuzzifier performs the conversion of the fuzzy set to a value.
In this method, the RSS is used as an input parameter, which takes values from the interval
Fuzzy logic rules for edge weight.
This method of fuzzy logic was modeled for Mamdani fuzzy inference system and Sugeno fuzzy inference system; the differences between Mamdani and Sugeno output membership functions are either constant or linear [27–29].
Mamdani Fuzzy Inference System. In this method, the fuzzy logic system was modeled with Mamdani fuzzy inference [27, 28], the input parameter (RSS) was broken down into five trapezoidal membership functions, named {VL, L, M, H and VH}, (see Figures 2 and 3) and output parameter (weight) was decomposed into five triangular membership functions, named {VL, L, M, H and VH}.

Fuzzy membership function of RSS.

Fuzzy membership function of weight.
Sugeno Fuzzy Inference System. In this method, the fuzzy logic system was modeled with Sugeno fuzzy inference [29, 30]. The input parameter RSS was decomposed into five trapezoidal membership functions, named {VL, L, M, H and VH}, and the output parameter weight was decomposed into five linear membership functions. Figure 4 shows the decompositions for input parameter RSS.

Fuzzy Membership function of RSS.
Finally, to estimate location of NOI, the WCL scheme is used. Then location of the position of the NOI is calculated using expression (3).
Combined Mamdani-Sugeno Fuzzy Inference System. For this approach, the location estimate of a NOI is performed by combining Mamdani [27] and Sugeno [29] schemes; then the location of the NOI is calculated as follows:
where
3.1.5. K-Nearest Neighbor
This method is divided into two stages: offline stage and online stage [31]. In the offline stage, RSS from m nodes is measured by fixed anchor nodes in order to create a map or fingerprint of the area. During the online stage the fingerprints are used and compared against the measured RSS values from the NOI. Then, those K fingerprints that are closest to the measured RSS values are used in an algorithm. Let
With distances
where
3.1.6. K-Nearest Neighbor with Fuzzy Logic
This approach uses the Euclidean distance to determine the K nearest neighbors, used as input parameter in order to calculate weights through fuzzy systems.
Fuzzy Inference System (FIS). In this method, Sugeno type inference is preferred to Mamdani-type inference [31]; five constants are proposed to be used as the output membership function with values {0, 0.25, 0.5, 0.75, 1}, which have linguistic values {very small, small, medium, large, and very large}. Figures 5 and 6 show such decompositions.

Input parameter.

Output parameter.
There are five proposed rules for this method.
If distance is very close then weight is very large.
If distance is close then weight is large.
If distance is medium then weight is medium.
If distance is far then weight is small.
If distance is very far then weight is very small.
The weights are calculated by FIS and the coordinates of the K nearest neighbors are used to calculate the position of the NOI. The NOI coordinates are computed as
where
3.2. Range-Based Techniques
Range-based techniques require the separation distance between the NOI and the anchor nodes. These algorithms achieve greater accuracy than the range free algorithms, but the accuracy is highly dependent on the position of the anchor nodes. In the following subsections, some range based algorithms are described such as weighted least squares (WLS) multilateration, circular and hyperbolic positioning algorithm, and the weighted hyperbolic positioning algorithm.
3.2.1. Weighted Least Squares Multilateration
In the presence of noise or inaccurate measurement, the range of the ith anchor node to the NOI is expressed as [7]
where
Whenever the noise covariance matrix
Equation (13) describes a nonlinear optimization problem; then by first-order Taylor series of the function vector
where
Redefining the observation vector
By expanding vector
This last equation finds the WLS estimator
The above expression shows that the position of the NOI is iteratively computed until convergence is obtained when the term
3.2.2. Circular Positioning Algorithm
This approach (see [14]) consists on finding the position of the node that minimizes the sum of squared errors in a set of n estimated distances. If
The position of the mobile node can be calculated iteratively with the straight gradient method
This method requires an initial position, which may be the centroid of the locations of the anchor nodes.
3.2.3. Hyperbolic Positioning Algorithm
The hyperbolic positioning algorithm [14] converts the nonlinear problem into a linear problem that can be solved with a least squares estimator. The distance between a mobile node and an anchor node is expressed as
Expanding (21), the resulting expression is
Rewriting (22) in matrix form gives
Therefore, the problem is formulated as
where
Therefore, position
3.2.4. Weighted Hyperbolic Positioning Algorithm
The traditional hyperbolic positioning algorithm calculates the position of the mobile node through (26). However, this linear problem could also be solved using weighted least squares estimator, as proposed in [34]. In this case, the position of the mobile node may be estimated as
where
It can be observed that in (28) the elements of
4. WLS Modified Multilateration Algorithm
The proposed localization algorithm is a modified version of WLS. Consider (13) which represents the WLS optimization problem with noise covariance matrix
Accuracy is improved by using a matrix
Matrix
This modification implies that each element of matrix
As seen in (30), matrix
Rearranging terms in (31) and considering that WLS multilateration algorithm is iterative lead to
The main objective is to know the impact of matrix
5. Performance Evaluation
In this section, the localization algorithms introduced in previous sections are evaluated using three metrics: accuracy measured by mean squared error (MSE), precision in terms of standard deviation (SD), and computational complexity.
First Stage of Evaluation. The analyzed localization techniques were evaluated in a scenario with a square area of 1000 m × 1000 m. A total of M = 10,000 different realizations of node distributions were evaluated. For each scenario, a random node was chosen to represent the node to locate (NOI). Nodes were generated randomly in scenarios from 100 up to 900 nodes in the deployment area. For each realization, standard deviation σ of the RSS is varied from 4 up to 12 dB. A value of RSS is calculated for every anchor or reference node, using the log-normal shadowing propagation model, [10], given by (1), with

Distribution of nodes in 1000 m × 1000 m area.
5.1. Performance Metrics
Accuracy. This metric is the mean squared error (MSE) of the estimated position and the true position of the NOI throughout all the realizations; that is, if (x, y) is the real position of the NOI and
Precision. This metric considers the distance error distribution, while the accuracy considers the average value of those errors. When two techniques are compared, a technique with concentrated distance errors on small values is preferred.
Computational Complexity. It refers to the number of mathematical operations performed by an algorithm during its execution.
Figures 8 and 9 show the rms error obtained for each location algorithm for 100 and 500 nodes in the network, respectively. As for rms error, WLS multilateration algorithm has the best performance for small noise levels. In general, it can be seen that the algorithms improve as node density increases.

rms error versus (σ Noise) for 100 nodes.

rms error versus (σ Noise) for 500 nodes.
Figure 10 shows how the rms error decreases for each location algorithm, as node density increases in the network. WLS multilateration scheme shows best performance for the scenario with low noise (4 dB). Figure 11 shows the comparison to the algorithms based on fuzzy systems, where we observe that our proposed method (WLS multilateration) has the best performance; we also note that Sugeno FIS performs better than Mamdani FIS.

rms error as node density changes for

rms error as node density changes for
In Figure 12, we show the comparison of the method proposed and those range-based algorithms. The scenario shows that as node density increases, rms error is reduced, but our method proposed has better performance even when noise has levels of 8 dB.

rms error as node density changes for
In order to present in detail the precision of each localization algorithm for a certain node density and noise level, we use the cumulative distribution function (CDF).
Figures 13 and 14 show the curves of the CDF for analyzed location algorithms with noise levels of

CDF of rms error σ = 4 dB 100 nodes.

CDF of rms error σ = 4 dB 100 nodes.

CDF of rms error σ = 8 dB 100 nodes.

CDF of rms error σ = 8 dB 100 nodes.
Figures 17 and 18 show the rms error using different values of noise level for a 100 and a 500 node network, respectively. In Figure 17 it is observed that the performance of the circular positioning algorithm is closed to that of the proposed algorithm, improving performance for high noise levels, that is, beyond 10 dB. When density increases to the 500 node network, we can see that the circular positioning algorithm has practically the same performance as that of the WLS method proposed.

rms error for a 100-node network.

rms error for a 500-node network.
These figures show that for low noise levels all algorithms have similar rms error behavior, but when noise level is higher, the performance of the WLS multilateration scheme is better. The improvement of the circular positioning algorithm is due to its use of the estimation performed by the weighted hyperbolic algorithm as the initial position. Figure 18 shows the weighted hyperbolic algorithm greatly improving the rms error.
Second Stage of Evaluation. Figure 19 shows the proposed second stage, in which the location algorithms of centroid, fuzzy centroid, WLS multilateration, and nearest neighbor were evaluated. 10,000 tests are performed for each location algorithm. Every test generates a random NOI node.

Evaluation stage in a 10 × 10 m area.
The received signal strength was calculated by log-normal shadowing model [27], where
Figure 20 shows the performance in terms of the rms error for the location algorithms when implemented in the network of Figure 19. For lower noise levels of up to

rms error for 100 node network.

rms error for 100 node network.
Analysis of the Computational Complexity. The evaluation of the computational complexity of the location algorithms range-based and range-free is very important, as this performance metric determines the computational cost of the algorithm or the amount of computer resources used by the algorithm to solve a problem. The computational complexity of the localization algorithms presented in this paper was evaluated through the number of elementary operations performed by the algorithm during its execution. Figure 22 shows the number of operations per second of range-based algorithms. In this Figure, it can be seen that the WLS multilateration scheme is computationally more complex, thus resulting in the hyperbolic algorithm with lower computational complexity.

Processing time versus node density for range-based algorithms.
Figure 23 shows the number of operations per second of range-free algorithms. In this figure, it is observed that REWL algorithm is computationally more complex, and thus resulting in the CL algorithm with the lower computational complexity.

Processing time versus node density for range-free algorithms.
Comparing Figures 22 and 23, it is shown that range-based algorithms are computationally more expensive than the range-free algorithms.
Analysis of the WLS Multilateration and WLS Modified Multilateration Algorithms. The first evaluation scenario uses the same signal propagation model. In this section we show the results of performance of the proposed algorithm WLS modified and that of WLS multilateration.
Figure 24 shows that the WLS multilateration algorithm performed better MSE and SD for low noise levels; however, the modified algorithm has improved performance for high values of the noise random variable. The performance of this algorithm is not significant in this scheme, as the node density is low, which affects the WLS multilateration algorithm proposed.

rms error for 100 node network.
Finally, Figure 25 shows the rms error for WLS and the proposed WLS modified algorithm. It can be seen that the WLS multilateration proposed algorithm with the modification exceeds with a wide difference the WLS multilateration algorithm in performance. This is because the node density is high hence improving accuracy of the algorithm. Therefore, a higher density of nodes improves performance of the proposed algorithm.

rms error for 500 node network.
Results Discussion. Table 2 summarizes the performance of each location algorithm, using performance metrics of rms error, precision, complexity, and node density, in terms of quality indicators of performance as follows: very bad, bad, fair, good, and very good.
Quality performance metrics.
Table 2 shows that range-based algorithms have better precision and rms error that range-free algorithms, but they are more complex. It is observed that the complexity of these algorithms is bad for the positioning algorithms weighted hyperbolic and hyperbolic and very bad for the circular positioning algorithm and WLS multilateration. Comparing the Centroid algorithms, WCL algorithm is better because it is less complex than the REWL algorithm. Sugeno FIS is more efficient than Mamdani FIS, because the range-free algorithms exhibit more robustness for the 900 node scenario. The circular positioning algorithm and WLS multilateration exhibit robustness for node densities 500 nodes.
Table 3 shows the number of operations required by each of the algorithms analyzed. It can clearly be seen that range-based algorithms require a larger number of operations than their range-free counterparts. The results also show that range-based algorithms have polynomial complexity because the multiplication and matrix inversion needed in those algorithms have complexity
Number of operations.
6. Conclusions
Given a WSN, the information of RSS and neighboring nodes can be used to estimate the position of an unknown node. By analyzing the algorithms evaluated, range-free algorithms are computationally more efficient than range-based schemes, because it requires more processing time. This paper shows that the centroid algorithm based on Sugeno FIS is computationally more efficient than Mamdani FIS, even in terms of precision and accuracy. It also demonstrates that WCL and REWL are the most efficient centroid algorithms. We introduced a modification to the WLS algorithm by assigning weights to the correlation matrix and showed that it improves accuracy. Range-based algorithms offer better precision than the range-free algorithms, but these schemes require more processing time and also are highly dependent on the position of the anchor nodes, so the coverage is a factor important for range-based algorithms. Therefore, range-free algorithms are more robust than range-based algorithms.
Footnotes
Conflict of Interests
The authors declare that there is no conflict of interests regarding the publication of this paper.
Acknowledgment
This work was supported by SEP-CONACyT Project no. 183703.
