Abstract
The location of sensors represents a relevant attribute in wireless sensor networks. In this article, we propose a distributed range-based localization algorithm for wireless sensor network. The algorithm is mainly based on an adaptively local circular searching area where each unknown sensor must find inside a position that minimizes the error distance with neighboring sensors using a local function. The new position of a sensor is broadcast to neighboring sensors allowing collaboratively to other sensors re-estimate their new positions. The iterative process is repeated until a stopping criterion is reached. The performance of the proposed algorithm is evaluated and compared with other state-of-the-art algorithms, and results indicate that the approach overcomes the other methods in both accuracy and time of convergence.
Introduction
A wireless sensor network (WSN) is a network of small sensors that are wirelessly interconnected with each other. 1 The main purpose of the network is monitoring any desired physical or chemical phenomenon. Due to the huge advance in electronic technology, extensive quantities can be measured by sensors. Thus, the use of sensor networks can span different applications, ranging from industry and agriculture, even to health care. 2
One of the main requirements to install a WSN is that each sensor knows three elementary sensors information, which are measured quantity, time of measurement, and geographic position. Moreover, each sensor must meet some requirements, such as having the ability to process information and transmit it to another sensor. In addition, the sensor needs to be small and economic and use the smallest amount of energy. The number of sensors used in a WSN can range from hundreds to thousands units, causing an economic issue in the WSN and therefore an increase in the overall network cost.
As a consequence, sensors location has a huge impact on WSN final cost. One possible solution is the use of a Global Positioning System (GPS); however, this is very expensive. 3 Another solution is to program the position to every sensor in the network, but this can be a difficult task when the number of the sensors is large.
Because of the above, different algorithms that use fewer sensors with GPS (known as anchors) had been developed. The anchors communicate their position to adjacent sensors which do not know their position (known as unknown sensors), so each of the sensors can estimate their own position indirectly. In order to do so, different techniques and algorithms are used, where the sensor positions can be estimated by distance or proximity techniques.4–6
Each of the techniques used to estimate distances has different error rates in the distance measurement.7,8 For instance, no measurement is accurate due to several aspects, such as sensor’s manufacture, power supply, technology used, and environment where the network was deployed. Also obstructions and noise that may be in the system can affect the measurement. This is why a new algorithm that minimizes errors in the estimated positions of unknown sensors is needed.
In this article, we propose an iterative range-based localization algorithm with an adaptive search region. The algorithm is characterized by an adaptive circular search area that proposes a set of possible solutions to reduce the error using a local minimizing function. In the process, each sensor should estimate its own new position and broadcast it to its neighbor sensors. To evaluate the performance of this research, we evaluated the distributed adaptive local searching algorithm (DALSA) versus another localization range-based algorithm, found on state of the art.
This article is organized as follows. The related work is introduced in section “Related work.” In section “Distance estimator,” the received signal strength (RSS) distance estimator is presented. Section “DALSA” presents the mathematical formulation of DALSA. In section “Simulation results,” the experimental results are reported; finally, conclusions and the future work are given in section “Conclusions and future work.”
Related work
Recently, range localization algorithms have attracted attention from different research teams.6,9–12 In 2012, Jama et al. 13 proposed an algorithm also based on RSS location. The algorithm should meet the following specifications: be sufficiently precise, easily implemented, be adaptive, and, finally, do not consume in excess sensor’s resources. The result of this approach was the Easy Lock algorithm. This decentralized algorithm can be divided into six main phases, which explain the operation of large-scale algorithm. It is important to mention that the authors implemented the algorithm on TelosB (a software platform designed specifically for sensing experimentation). The main result is that increasing the number of anchor sensors and transmitting power reduces errors in measurements. Also this algorithm works better in open environments.
In 2013, Jiang et al. 14 proposed a localization algorithm able to be applied in WSNs. The main objective was to improve the accuracy on estimating the positions of the unknown sensors. The researchers used as a basis the trilateration algorithm along with RSS technology. They designed an algorithm called LoDCE (localization ranging algorithm with a dynamic mechanism), which consists of an adaptive measuring method using RSS an adaptive circle area which searches for neighboring sensors. This algorithm works in both indoor and outdoor environments. To validate the LoDCE, both MATLAB and a small indoor WSN were used.
Tomic et al. 15 developed a localization algorithm for WSNs using RSS technology to estimate the true distance between neighboring nodes. The proposed algorithm is based on second-order cone programming (SOCP). Among the differences from existing algorithms is that this does uses a MATLAB Toolbox named CVX to estimate the best position, which requires less iterations to converge. Furthermore, a selection of neighboring is performed to calculate the unknown position sensors, so that energy consumption is decreased. SOCP uses the maximum likelihood method as the basis of its project.
Tomic et al. 16 also used SOCP to estimate positions of a WSN using RSS. They run their code in MATLAB to solve the SOCP relaxation and called SeDuMi a C implementation of a predictor corrector primal dual interior point method for solving SOCP. The experiments they made were considering the inaccuracy in the anchor positions in addition to the distance estimation noise errors. Also they consider the problem of tracking a mobile node in an indoor environment using a few anchors with high power and long range.
In 2015, Svecko et al. 17 designed an algorithm for locating unknown sensors using distance estimation with received signal strength indicator (RSSI). This project was carried out experimentally. The first step was to conduct the initial estimate of the unknown distance sensors using RSSI. Once calculated the distance between unknown sensors and anchors nodes, an iterative algorithm is used to filter the errors in the distance measurements. Another method to reduce errors was the particle filter, considered by the authors as a method of Monte Carlo. The authors conducted tests in three different scenarios. First, they provided 10 circumferentially positioned antennas around unknown sensors. In the second case, they used eight parallel positioned antennas to the unknown sensors, and finally, they only used one antenna. The tests resulted in a better approximation to the actual value in the first scenario. The authors stated that the usage of particle filter together with the increment of receiver antennas reduces the estimated distance measurement error.
Distance estimator
The principle of the RSS describes the relationship between the transmitted and received power in wireless devices. The RSS is a technique that has become very popular in recent years because it does not require special hardware and can be found embedded on different sensors nodes like XBee, MicaMote, and MICAZ Rene node, among others. 2 Distance estimation techniques consist in getting the distance dij between a sensor si and sj, using the power of the signal received between them.
Nowadays, there are three propagation models in WSNs: the free space model, bidirectional reflectance model, and logarithmic attenuation model. The model in free space is applicable when the transmission distance is much larger than the size of the antenna and the carrier wavelength. Additionally, there are no obstacles between the transmitter and the receiver. The transmission power of a wireless signal Pr is commonly measured at any distance, as the signal received power between two devices located at a distance dij and can be determined with the following equations
In equation (1), Gt and Gr are the antenna gains and L is the loss factor which has nothing to do with the transmission. Usually, GT = 1, Gr = 1, and L = 1. Then, equation (2) is the formula of signal attenuation.
The bidirectional reflectance model is applicable in the following cases: when the transmission distance of the antenna is located a few kilometers away or farther and when both the height of the antenna of a transmitter and receiver are located around 50 m or more. This model is very accurate when it is used in micro-cellular environments. The potential of the received signal can be determined by the following formulas
where ht is the height of the transmitting antenna and hr is the height of the receiving antenna. By equations (3) and (4), it can be seen that the energy consumption E has a power attenuation of four in relation to the distance.
Finally, the logarithmic attenuation model is suitable to work in both closed and open environments. In this model, it is assumed that the power signal decreases in a way that is inversely proportional to the square of the distance
where Pij is the power received at the sensor sj from the sensor si (measured in dBm). P0(d0) is a reference power at a distance d0 transmitter (typically 1 km for large urban mobile systems and 1 m for indoor systems). 19 Xσ is a random variable, with Gaussian distribution that has an expected value of zero and a standard deviation σ SH for cases of attenuation. Power measurements follow a logarithmic Gaussian distribution as shown below
where Pij is the expected value of the received power in dBm. From equations (5) and (1), the distance dij can be estimated as follows
DALSA
Consider a WSN deployed in a flat two-dimensional (2D), with a set of N anchor sensors
Instead, a set M of unknown sensors
The algorithm is designed so that once the initial estimate of the position of a sensor si given by
and reference sensors
and |
The distributed algorithm determines for each unknown sensor si a search region called
The total error in the estimated position of each sensor can be defined as the sum of the errors between anchor sensors and unknown neighboring sensors. It is important to note that the anchor sensors in this research have connection to all sensors in the WSN; for purposes of the present investigation, the connection of the four anchor sensors with each unknown sensor is taken into account. Instead, unknown sensors have a range of 30 mts which is less than the anchor sensors reach.
To define the estimation error between the estimated position
where dij(pi,pj) refers to the Euclidean distance between the sensor position si with respect to a neighboring sensor sj
Note that neighbor sensors sj can be either an anchor or an unknown sensor. The sensor si coverage range delimits the exchange of information between the set
The total error in each sensor si is influenced to delimit the area of the search region for the new position
In Figure 1, the circular search region defined by a radius α with three levels can be observed. Where α is calculated by the following expression
so, the length of the radius α changes with each iteration and will be different in each of the unknown sensors, since the error Ei is different for each individual case. With this we sought that at first the spacing would make the region out a wide search, which sought to reach the best error rate in a quick manner but with a robust search; however, as the iterations are advancing, the error decreases, so the spacing and the search region becomes thinner and more accurate.

Circular search region for si with eight equally spatially distributed possible candidates in each orbit.
For the search region
To determine its new position, the sensor si evaluates each candidate position of
Simulation results
It was decided to implement a bank of WSNs through simulation under two schemes, C-shape and uniform-randomly distributed, to perform the corresponding tests on the DALSA algorithm and the other algorithms to be tested. The simulation was carried out on MATLAB. We made a total of 20 simulated WSNs for each scheme, so the test of each algorithm was made on each one at time.
For each scheme, in a 2D area, we randomly deployed a total of 100 sensors nodes in a square area of 100 m × 100 m, where 96 of those sensors are considered as unknown sensors and four of them are anchors sensors which know their own position. On the other hand, the estimated distance dijest between neighboring sensors was simulated under two approaches. The first approach consists of adding a noise component that has a Gaussian distribution where dijest is calculated by the following expression
Where the noise can be described as
And Eij is a normal random variable N(0,1) representing the measurement noise. Then, nfd is the noise factor (standard deviation of the distance error in percentage) for the distance measurements. 20 For a standard deviation of 20% in the distance estimation error, we set nfd = 0.20.
The second approach used to estimate distance between neighboring sensors was the RSS methodology described in section “Distance estimator” with σSH = 2 and ηp = 2.6 which correspond to indoor environments. 19
For the algorithm evaluation, three algorithms found in the recent state of the art were used as reference. The first algorithm against was compared with the DSCL, 21 the second algorithm was the Levenberg Marquardt,22,23 and the third one was the SOCP15,16 algorithm. The main characteristics evaluated were the estimation accuracy and the iterations to converge. A set of initial positions were produced using least squares only with the location information produced by anchor nodes. As described earlier, we assume that the four anchors have connectivity with all unknown sensors, each algorithm was ran for 100 iterations in each one of the 20 simulated networks and the accuracy was measured using the root mean square error (RMSE)
where N is the number of unknown sensors in each network, and
Figure 2 shows an example of a uniform and randomly distributed WSN with the last estimated positions using DALSA versus the real positions of the unknown sensors using a nfd = 0.10 resulting in an average error of 2.24 m. An initial estimation was made using the least square technique, so the initial error on this example was 18.2 m. Also there was not a threshold applied to stop the iterations, so it ran for 100 iterations but the RMSE reaches the lowest value after 15 iterations.

Position estimates of DALSA using a network with 96 unknown sensors with nfd = 0.1 and initial estimates provided by the least square method.
Figure 3 shows an example of a C-shape distributed WSN with the last estimated positions using DALSA versus the real positions of the unknowns sensors using a nfd = 0.10.

Position estimates of DALSA using a network with 96 unknown sensors with nfd = 0.1 and initial estimates provided by the least square method in a C-shape distribution.
Figure 4 shows a comparison of RMSE values after 100 iterations for different algorithms using a nfd = 0.20 with a random and uniform deployment topology. The RMSE follows a negative exponential behavior in almost every case. The DSCL and DALSA algorithms present a fast decay at almost five iterations, but DALSA shows the minimum error rate in the long term.

RMSE behavior of the proposed DALSA algorithm with nfd = 0.20 and uniform topology versus other algorithms.
Table 1 shows the average RMSE of 20 WSN with a standard deviation of 20%. The Δ symbol means the threshold used as a reference for the change in the RMSE value, and it can be represented as follows
20 WSNs average, uniform and random deployment with R = 30 m, initial RMSE estimate = 23.33 m.
WSN: wireless sensor network; RMSE: root mean square error; DALSA: distributed adaptive local searching algorithm; SOCP: second-order cone programming.
As shown in Table 1, the SOCP algorithm is the fastest to achieve a minimum change of Δ followed by the LM algorithm, but the most accurate algorithms are the DSCL and the DALSA, with DALSA achieving almost half of the RMSE recorded by LM.
The second test made was with a nfd = 0.20, but now with a C-shape distribution as shown in Table 2. The initial RMSE was 26.9065 m which implies an increment of almost 3 m compared to the average RMSE of the WSNs with a uniform and random distribution. The lowest RMSE was accomplished by the DALSA algorithm with a magnitude of 4.8024 m as depicted in Figure 5.
20 WSNs average, regular deployment in C-Shape area with R = 30 m, initial RMSE estimate = 26.9065 m.
WSN: wireless sensor network; RMSE: root mean square error; DALSA: distributed adaptive local searching algorithm; SOCP: second-order cone programming.

Proposed DALSA algorithm with nfd = 0.20 and C-shape distribution versus other algorithms.
Again, SOCP algorithm was the fastest to accomplish the minimum threshold, but the RMSE has a really poor accuracy compared to the other three algorithms. In this case, there was only 0.7 m of difference on the RMSE when Δ was lower than 0.1. DALSA algorithm accomplished the lowest RMSE.
We also run a test with the RSS model. The RSS was used with a uniform and randomly distribution as well in a C-shape one. We used least squares to estimate initial positions. Figure 6 shows the RMSE behavior of the four algorithms, the initial RMSE for each one was 20.43 m. The average RMSE was almost identical on the DSCL and the DALSA algorithms, but DALSA algorithm obtained a lower RMSE average of 4.4802 m.

RMSE behavior of the proposed DALSA algorithm with RSS in a uniform and random deployment versus other algorithms.
As shown in Table 3, the slowest algorithm to converge is the LM, at the nine iteration. The DALSA algorithm reaches the best accuracy at six iterations.
20 WSN average, uniform and random deployed, R = 30, initial RMSE estimate = 20.43.
WSN: wireless sensor network; RMSE: root mean square error; RSS: received signal strength; DALSA: distributed adaptive local searching algorithm; SOCP: second-order cone programming.
The RSS model was also used in a C-shape distribution. Figure 7 shows the RMSE behavior and the results obtained after 100 iterations. It can be seen that DALSA algorithm presents the best results in accuracy and also in convergence speed.

RMSE behavior of the proposed DALSA algorithm with RSS in a C-shape deployment versus other algorithms.
Table 4 shows a summary of the tests realized under the two approaches proposed to estimate distances between neighboring sensors, as well as the two topologies used.
Summary results using different topologies.
RMSE: root mean square error; RSS: received signal strength; DALSA: distributed adaptive local searching algorithm; SOCP: second-order cone programming.
Finally, we proposed to make a test using the same scenario provided by 16 the total number of sensors n = 300, the sensors were randomly deployed on a [−0.5,0.5] 2 area. The percentage of anchor sensors was 40%. Also, there was used a nfd = 0.05. The main difference in this approach was the nonuse of an initial estimator, all of the unknown sensor positions were initiated at [0,0]. The RMSE results can be seen on Figure 8.

RMSE behavior of the proposed DALSA algorithm and others without using an initial estimator.
The results were practically the same using the DSCL and DALSA algorithms, they showed the most accurate RMSE, but DALSA showed the fastest converge time, as it is shown the DALSA algorithm converges at almost fourth iteration while DSCL converges at eighth.
Conclusion and future work
This article proposes a novel DALSA for range-based localization in WSNs. The main purpose of the algorithm was to reduce the high error in estimated positions caused by the noisy estimated distances between the sensors in a WSN. The method is a decentralized and iterative algorithm.
Our algorithm was compared to other three algorithms found in the recent state of art. The simulation results confirm the superiority of our proposed algorithm in terms of estimation accuracy and convergence. Unlike other existing algorithms, our approach has a good response when the percentage of anchor nodes is reduced.
The proposed approach could have better results in terms of accuracy if the set possible positions for the adaptive region increases, but that could decimate the computer efficiency. That is why the number of positions was set on 25. Also, the algorithm shows that it requires few iterations to converge, not as fast as SOCP, but has a much better accuracy than it.
As future work, we would like to evaluate the time of processing of each node and compare it to other algorithms. Finally, we are also interested in evaluating our algorithm in a real WSN.
Footnotes
Academic Editor: Yong Feng
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This work was supported by the National Council for Science and Technology (CONACyT), Mexico.
