Ecolocation: A Sequence Based Technique for RFLocalization in Wireless Sensor Networks
Kiran Yedavalli
∗
, Bhaskar Krishnamachari
∗
, Sharmila Ravula
†
, Bhaskar Srinivasan
†∗
Department of Electrical Engineering  SystemsUniversity of Southern California, Los Angeles, CAEmail: kyedaval@usc.edu, bkrishna@usc.edu
†
Robert Bosch Research and Technology Center, Palo Alto, CAEmail: sharmila.ravula@rtc.bosch.com, bhaskar.srinivasan@rtc.bosch.com
Abstract
—In this paper we present a novel sequencebased RF localization algorithm called Ecolocation. Our algorithm determines thelocation of unknown nodes by examining the ordered sequence of receivedsignal strength (RSS) measurements taken at multiple reference nodes.We employ a constraintbased approach that provides for robust locationdecoding even in the presence of random RSS ﬂuctuations due to multipath fading and shadowing. Through extensive systematic simulations,and a representative set of real mote experiments, we show that over awide range of settings Ecolocation performs better than other state of the art approaches in terms of localization accuracy and precision.
I. I
NTRODUCTION
Wireless sensor networks (WSN) are severely constrained forenergy and cost of deployment and operation. The unique sellingpoint of many WSN systems is that they are
inexpensive, autonomoussystems
capable of working
unattended
for
many years
. This canbe realized to some extent by multitasking the components onsensor motes. Thus, the system radio which is used for intermotecommunication can also be used for localization.In this paper we present a novel RF based node localizationalgorithm called Ecolocation that examines the ordered sequence of nearby
reference nodes
(nodes with known locations) to determinethe location of the
unknown node
(node with unknown location).The key idea of Ecolocation is that the distancebased rank order of reference nodes constitutes a unique signature for different regionsin the
localization space
.In Ecolocation, we obtain the ordered sequence of reference nodesby ranking them on oneway RSS measurements between them andthe unknown node. This measured sequence is then compared withthe ideal distancebased sequence for each location to determine howmany orderconstraints are satisﬁed. The location which maximizesthe number of satisﬁed constraints is then determined to be the bestestimate of the unknown node’s location.Ideally, the ranks of the reference nodes based on RSS readingsshould be monotonic with their ranks based on true Euclideandistance. Of course, this is not true in the real world because of thepresence of multipath fading and shadowing in the RF channel. Reference nodes farther from the unknown node might measure higherRSS values than those which are closer and this introduces errorsin the constraints. However, we show that the inherent insensitivityto absolute RSS amplitudes and the inherent redundancy present inthe set of constraints make this approach to localization very robustin practice. Because of the close analogy to controlling errors byredundancy in traditional error control coding, we name our algorithmthe “Error COntrolling LOCAlizaTION technique”, or
Ecolocation
for short.The rest of the paper is organized as follows: Section II describesEcolocation in detail and presents some illustrative examples. Section III deals with related RF based localization techniques whichwe use for comparison with Ecolocation. In section IV we evaluateEcolocation and present its comparative study with other localizationtechniques. Section V discusses the results of real world systemsimplementation and the conclusion and future work are presented insection VI.II. E
COLOCATION
In this section we describe Ecolocation and illustrate it for the idealand real world scenarios through examples.The localization process is initiated by the unknown node bybroadcasting a localization packet. The reference nodes collect RSSmeasurements of this packet and forward them to a single point
1
where the location estimate is computed as follows:1) Determine the ordered sequence of reference nodes by rankingthem on the collected RSS measurements.2) For each possible location gridpoint in the location spacedetermine the relative ordering of reference nodes and compareit with the RSS ordering previously obtained, to determine howmany of the ordering constraints are satisﬁed.3) Pick the location that maximizes the number of satisﬁedconstraints. If there is more than one such location, take theircentroid.
A. Ideal versus Real World Scenarios
Radio frequency (RF) based localization techniques are inherentlydependent on the RF channel whose multipath fading and shadowingeffects have a fundamental bearing on the accuracy of locationestimate. Nevertheless, it helps to study the localization techniquein isolation of these effects. We introduce Ecolocation for the idealscenario of zero multipath fading and shadowing effects and latterexplain why it provides robust and accurate location estimate evenin the presence of these effects.
1) Ideal Scenario:
In the absence of multipath fading and shadowing, RSS measurements between the reference nodes and theunknown node accurately represent the distances between them. If the reference nodes are ranked as a sequence in decreasing order of these RSS values then this order represents the increasing order of their separation from the unknown node. For a reference node rankedat position
i
in the ordered sequence,
R
i
> R
j
⇒
d
i
< d
j
,
∀
i < j
where,
R
i
and
d
i
are the RSS measurement and distance of the
i
th
ranked reference node from the unknown node, respectively.
1
This could be either a clusterhead or the unknown node itself, dependingon the application and computational capabilities of nodes.
The above relationship between two reference nodes is a
constraint
on the location of the unknown node and is dependent on it. An
i
th
ranked reference node forms
(
i
−
1)
constraints with lesserranked ones and for a total of
α
reference nodes there are
(
α
(
α
−
1)2
)
constraints on the unknown node.For ﬁxed reference node locations, the sequence order and theconstraints are completely determined by the unknown node location.Figure 1 illustrates this idea for a simple case of ﬁve reference nodesand one unknown node.
A
1
2
3
4
5
BC DE F BC A
1
2
3
4
4
DE F
(a) (b)
Fig. 1. The order of reference nodes (
B,C,D,E,F
) depends on the locationof the unknown node (
A
).
Table I shows the constraints on the unknown node for the examplein 1(a).
B:1 C:2 D:3 E:4 F:5
R
1
R
2
< R
1
R
3
< R
1
R
4
< R
1
R
5
< R
1
R
3
< R
2
R
4
< R
2
R
5
< R
2
R
4
< R
3
R
5
< R
3
R
5
< R
4
TABLE IC
ONSTRAINTS ON THE UNKNOWN NODE FOR THE EXAMPLE INFIGURE
1(
A
).
Each location gridpoint
2
in the location space has its own set of constraints based on its Euclidean distances to the reference nodes.The unknown node location estimate can be obtained by comparingthe constraints obtained from RSS measurements to the constraint setsof each location gridpoint and picking the location which satisﬁesthe maximum number of constraints. If there are more than one suchlocations then their centroid is the location estimate.
2) Real World Scenario:
In contrast to the ideal scenario, thereal world is characterized by the presence of multipath fadingand shadowing in the RF channel. Ideally, reference nodes that arefar from the unknown node should measure lower RSS values thanreference nodes that are nearer, but due to multipath effects this isnot true in the real world.Figure 2 shows the experimental RSS measurements at ﬁve MICA2 receivers placed at different distances from a MICA 2 transmitter. Itshows that the receiver at
5
.
69
meters measured a higher RSS valuethan the receiver at
5
.
37
meters. Evidently, RSS measurements donot represent distances accurately in the real world.Therefore, if the reference nodes are ranked on their respectiveRSS measurements, the constraints on the unknown node location
2
Location space scanning can be made more efﬁcient by using greedysearch/multiresolution algorithms instead of exhaustively looking at all locations, but we do not discuss this optimization in this paper as it doesn’taffect localization performance.
0.6723.335.375.699080706050403020100
Distance (meters)
R S S ( d B m )
RSS as a function of distance
Fig. 2. Real world experimental results: Reference nodes far from theunknown node may measure higher RSS values than closer reference nodes.Note that yaxis is reverse ordered.
formed by these ranks will be erroneous. For example, if the ranksof fourth and ﬁfth ranked reference nodes are interchanged due tomultipath effects in the RF channel, as in the experiment of ﬁgure 2,for the example in ﬁgure 1(a), then the new constraints are as shownin table II. As it can be seen,
10%
of the constraints are erroneousin this case.
B:1 C:2 D:3 E:5 F:4
R
1
R
2
< R
1
R
3
< R
1
R
5
< R
1
R
4
< R
1
R
3
< R
2
R
5
< R
2
R
4
< R
2
R
5
< R
3
R
4
< R
3
R
4
< R
5
TABLE IIC
ONSTRAINTS FOR THE EXAMPLE OF TABLE
I
WHEN THE RANKS OFFOURTH AND FIFTH RANKED REFERENCE NODES ARE INTERCHANGEDDUE OF MULTI

PATH EFFECTS
.
The percentage of erroneous constraints depends on the RF channelcondition, the topology of the reference nodes and the number of reference nodes. The unknown node location estimate accuracy inturn depends on the percentage of erroneous constraints. This isillustrated through a few examples.Figure 3 shows a sample layout of nine reference nodes placedin a grid and a single unknown node. Figure 3(a) plots the locationestimate for the ideal case when there are no erroneous constraintson the unknown node. Figures 3(b), 3(c) and 3(d) show the locationestimates for varying percentages of erroneous constraints. It is evident that location estimate error increases with increasing percentageof erroneous constraints.These examples suggest that Ecolocation is robust to multipatheffects of the RF channel up to some level. The inherent redundancyin the constraint set ensures that the nonerroneous constraints help inestimating the unknown node location accurately. Also, the constraintconstruction inherently holds true for random variations in RSSmeasurements up to a tolerance level of
(

R
i
−
R
j

)
.For ease of implementation, the constraint set is represented by aconstraint matrix
M
α
×
α
, where
M
α
×
α
(
i,j
) =1
if
R
i
< R
j
0
if
R
i
=
R
j
−
1
if
R
i
> R
j
X−AXIS (length units)
Y − A X I S ( l e n g t h u n i t s )
Location estimate for 123456789
024681012024681012
A1 A3A2 A4 A5 A6 A7 A8 A9 P E
X−AXIS (length units)
Y − A X I S ( l e n g t h u n i t s )
Location estimate for 123745968
024681012024681012
A1 A3 A2 A7 A4 A5 A9 A6 A8 P E
024681012024681012
X−AXIS (length units)
Y − A X I S ( l e n g t h u n i t s )
Location estimate for 124739586
A1 A2 A4A7 A3 A9 A5 A8 A6 P E
024681012024681012
X−AXIS (length units)
Y − A X I S ( l e n g t h u n i t s )
Location estimate for 913276584
A9 A3 A5 A1 A2 A8 A7A6 A4 PE
(a) (b) (c) (d)
Fig. 3. Ecolocation location estimate (E) for the unknown node (P) at
(1
,
3)
for a grid layout of 9 reference nodes (A). The reference nodes are numberedaccording to their rank in the ordered sequence. (a) Sequence:
123456789
(no erroneous constraints) [Estimate: (
0
.
5
,
3
)] (b) Sequence:
123745968
(
13
.
9%
erroneous constraints) [Estimate: (
0
.
5
,
3
)] (c) Sequence:
124739586
(
22
.
2%
erroneous constraints) [Estimate: (
0
.
5
,
1
.
5
)] (d) Sequence:
913276584
(
47
.
2%
erroneous constraints) [Estimate: (
5
,
7
)].
It is easy to see that
M
α
×
α
is a symmetric matrix and each elementof the matrix represents a constraint in the constraint set. The pseudocode for the Ecolocation algorithm is presented below.
ECOLOCATION
Input
: The number of reference nodes withinthe range of the unknown node (
α
), their locations
(
p
ix
,p
iy
)(
i
=1
...α
)
, the RSS values of RF signals from the unknown node ateach one of them
R
i
(
i
= 1
...α
)
, the localization area size (
λ
×
λ
sq. length units), and the area scanning resolution (
γ
).
Output
: Thelocation estimate of the unknown node. The reference nodes aresorted into an ordered sequence based on
R
′
i
s
and a constraint matrix
M
α
×
α
is derived from this sequence.
◮
Calculate the number of matched constraints at each grid point(
i,j
) and identify the maximum number of constraints matchedover all the grid points.0
maxConstrMatch
←
0
;1
for
each grid point
(
i,j
)
in the localization area2
for
each reference node
k
(
→
1
...α
)
3
d
ijk
←
((
p
kx
−
i
)
2
+ (
p
ky
−
j
)
2
)
12
;4
generate
constraint matrix
C
ijα
×
α
based on
d
ij
.5
for
each element
(
m,n
)(
n > m
)
in
C
ijα
×
α
6
if
C
ijα
×
α
(
m,n
) =
M
α
×
α
(
m,n
)
7
constrMatch
ij
←
constrMatch
ij
+ 1
;8
else
9
constrMatch
ij
←
constrMatch
ij
−
1
;10
if
constrMatch
ij
> maxConstrMatch
11
maxConstrMatch
←
constrMatch
ij
;
◮
Search for grid points where the maximum number of constraintsare matched and return the centroid of those grid points as thelocation estimate.12
(
x,y
)
←
(0
,
0)
;13
count
←
0
;14
for
each grid point (
i,j
)15
if
constrMatch
ij
=
maxConstrMatch
16
(
x,y
)
←
(
x
+
i,y
+
j
)
;17
count
←
count
+ 1
;18
return
(
xcount
,
ycount
)
◮
Location Estimate.
Complexity Analysis
: We should say ﬁrst of all that this implementation of Ecolocation is meant only to be functional, it is notat all optimized for space or time complexity. Still, the followinganalysis provides an upper bound on the computational costs forimplementing this technique. The initial sorting of reference nodesbased on
R
′
i
s
costs
Θ(
α
log(
α
))
time and
O
(
α
)
space respectively.The corresponding constraint matrix generation costs
O
(
α
2
)
timeand
O
(
α
2
)
space respectively. Calculating the number of constraintsmatched at each grid point and identifying the maximum number of constraints matched over all grid points (lines 111) costs
O
(
λ
2
α
2
γ
2
)
time and
O
(
λ
2
γ
2
+
α
2
)
space respectively. Searching for grid pointswhere maximum number of constraints are matched (lines 12 17) costs
O
(
λ
2
γ
2
)
time and
O
(1)
extra space. Finally calculatingthe centroid of those grid points (line 18) costs
O
(1)
time andspace. In total, the time and space complexities of Ecolocation are atmost
O
(
λ
2
α
2
γ
2
)
and
O
(
λ
2
γ
2
+
α
2
)
respectively
3
. Prior to presenting acomplete performance evaluation of Ecolocation, we discuss relatedlocalization techniques proposed by others.III. R
ELATED
W
ORK
Over the past few years many solutions have been proposed forRFonly localization in wireless adhoc and sensor networks whichcan be broadly classiﬁed into two main categories –
range based
and
range free
. Range based techniques estimate distances (range) fromRSS measurements between the unknown node and the referencenodes and use them to triangulate the location of the unknown node[4], [7], [8], [9], [10], [11], [13], [14], [15], [16]. On the other handrange free techniques estimate the location of the unknown nodewithout determining the range [5], [18].To compare with Ecolocation, we selected four localization techniques –
proximity localization
,
centroid
[18],
approximate point intriangle
[5] and
maximum likelihood estimation
[8] – based on thecriterion that they should use RSS of RF signals to calculate thelocation estimate over a single hop.
Proximity localization
: It is a simple localization scheme in which thelocation of the closest reference node, based on RSS measurements,is the unknown node location estimate. It can be considered as anextreme special case of Ecolocation where only the ﬁrst rankingreference node is considered.
Centroid
: In [18] the authors propose a range free, proximity basedsolution for localization where the location estimate is the centroidof all the reference nodes which are in the proximity of the unknownnode. In [17] the authors suggest an enhancement to this techniqueby adaptively placing reference nodes to minimize location error. We
3
We believe the complexities can be signiﬁcantly reduced by using greedydescent or more efﬁcient scanning versions of the algorithm; this is the subjectof ongoing work.
do not consider this enhancement as this requires extra informationgathering and processing.
Approximate point in triangle
: T. He et al in [5] propose a range freelocalization technique called approximate point in triangle (APIT) inwhich the RSS value at the unknown node is compared with RSSvalues at its neighbors and based on this comparison a decision ismade whether the unknown node location is inside various trianglesformed by the reference nodes. This comparison test is done for allthe locations in the location space and for all the triangles that can beformed by the reference nodes. The location estimate is the centroidof the locations which are in a maximum number of triangles. Theaccuracy of the location estimate also depends on the non referencenode neighbor density of the unknown node.
Maximum Likelihood Estimation
: Out of the many maximum likelihood location estimation (MLE) techniques proposed, [4], [14], [8]etc., we consider a simple, representative MLE technique proposedin [8]. In this, the authors calculate the location which maximizesa likelihood function, which is based on the distance estimate andits standard deviation, using the gradient climbing method. All RFbased MLE methods need good ranging techniques that use radiofrequencies to estimate distances. This either requires expensiveranging equipment and/or time consuming preconﬁguration surveysof the location space.The readers should refer to [1] for a detailed description, includingthe pseudo code and scalability analysis, for the above four localization techniques.In [3] the authors present a comparative study of many RSS basedlocalization techniques using commodity 802.11 cards. According tothe authors none of the localization techniques have a signiﬁcantadvantage over others over a range of environments. We conjecturethat this could be an artifact of ﬁxing the number of nodes andthe node density. Our work differs from this in evaluating theperformance of ﬁve different RSS based localization techniques overdifferent node deployments in different RF channel conditions.IV. E
VALUATION
In this section we present a complete performance evaluation of Ecolocation using simulations.
A. Simulation Model
The most widely used simulation model to generate RSS samplesas a function of distance in RF channels is the lognormal shadowingmodel [19]:
RSS
(
d
) =
P
T
−
PL
(
d
0
)
−
10
η
log
10
dd
0
+
X
σ
(1)where,
P
T
is the transmit power and
PL
(
d
0
)
is path loss for areference distance of
d
0
.
η
is the path loss exponent and the randomvariation in RSS is expressed as a gaussian random variable of zeromean and
σ
2
variance,
X
σ
=
N
(0
,σ
2
)
. All powers are in
dBm
and all distances are in meters. In this model we do not provisionseparately for any obstructions like walls. If obstructions are to beconsidered an extra constant needs to be subtracted from equation(1) to account for the attenuation in them (the constant depends onthe type and number of obstructions).
B. Simulation Parameters
The location estimate of any RFbased localization techniquedepends on a fundamental set of parameters which can be broadlycategorized into RF channel characteristics and node deploymentparameters.
•
RF Channel Characteristics
: [20], [19]
–
Path loss exponent (
η
): Measures the power attenuation of RF signals relative to distance.
–
Standard deviation (
σ
): Measures the standard deviation inRSS measurements due to lognormal shadowing.The values of
η
and
σ
change with the frequency of operationand the clutter and disturbance in the environment.
•
Node Deployment Parameters
:
–
Number of reference nodes (
α
) and unknown nodes (
ρ
).
–
Density of reference nodes (
β
) and unknown nodes. Nodedensity is deﬁned as the number of nodes per square meter.
–
Location space size: A square area of
(
λ
×
λ
)
sq. meters isconsidered.
–
Resolution or granularity (
γ
): The unit distance betweentwo grid points in the location space.
–
Node distribution in the location space: Random, gridtopology or gridrandom topology.The effect of each of the above parameters on any localizationtechnique depends on the actual technique itself. For example, somelocalization techniques depend more on the number of referencenodes than resolution, while for some other techniques reference nodedensity may be more important than the number of reference nodes.Table III lists the typical values and ranges for different parameters used in our simulations. Each simulation scenario consists of randomly placing
α
reference nodes and one unknown node in asquare of (
λ
×
λ
) square meters and generating RSS values betweenthem using equation 1. A
48
bit arithmetic, linear congruential pseudorandom number generator was used and results were averaged over
100
random trials using
10
different random seeds.
Parameter Typical Value Typical Range
P
T
4
dBm (max.) NA
PL
(
d
0
) 55
dB (
d
0
= 1
m) [2] NA
η
4
(indoors)
1
–
7
[20]
4
(outdoors)
σ
7
(indoors)
2
–
14
[20]
5
(outdoors)
α
25 3
–
25
λ
15
{
50
,
25
,
15
,
5
}
β
(=
αλ
2
) 0
.
11
{
0
.
01
,
0
.
04
,
0
.
11
,
1
}
(1 ref. node in9 sq.meters)
γ
0.1 NA
ρ
(for APIT) 8 NANode Random (Grid, Random,Placement Gridrandom)TABLE IIIT
YPICAL VALUES AND RANGES FOR DIFFERENT SIMULATIONPARAMETERS
C. Simulation Results
The performance of Ecolocation is measured on two metrics  (i)
location error
and (ii)
location precision
 for a wide range of RFchannel conditions and node deployment parameters. A comparativestudy of Ecolocation with the four localization techniques describedin section III is also presented.Location error is deﬁned as the Euclidean distance between thelocation estimate and the actual location of the unknown node andlocation precision is deﬁned as the standard deviation in the locationerror. Location precision is a measure of the robustness of thelocalization technique as it reveals the variation in its performance
13570102030405060708090100110
σ
= 7,
α
= 25,
β
= 0.11,
γ
= 0.1Path loss exponent (
η
)
A v e r a g e l o c a t i o n e r r o r ( % o f D
a
)
EcolocationCentroidAPITMLEProximity24681012140102030405060708090100110
η
= 4,
α
= 25,
β
= 0.11,
γ
= 0.1Standard deviation (
σ
)
A v e r a g e l o c a t i o n e r r o r ( % o f D
a
)
EcolocationCentroidAPITMLEProximity
(a) (b)
357911131517192123250102030405060708090100110
β
= 0.11,
γ
= 0.1,
η
= 4,
σ
= 7Number of reference nodes (
α
)
A v e r a g e l o c a t i o n e r r o r ( % o f D
a
)
EcolocationCentroidAPITMLEProximity0.010.040.111 0102030405060708090100110
α
= 25,
γ
= 0.1,
η
= 4,
σ
= 7Reference node density (
β
) (log scale)
A v e r a g e l o c a t i o n e r r o r ( % o f D
a
)
EcolocationCentroidAPITMLEProximity
(c) (d)
Fig. 4. Comparison: (a) Average location error as a function of path loss exponent (
σ
= 7
,
α
= 25
,
β
= 0
.
11
,
γ
= 0
.
1
) (b) Average location error as afunction of standard deviation (
η
= 4
,α
= 25
,β
= 0
.
11
,γ
= 0
.
1
) (c) Average location error as a function of number of reference nodes (
η
= 4
,
σ
= 7
,
β
= 0
.
11
,
γ
= 0
.
1
) (d) Average location error as a function of reference node density (
η
= 4
,
σ
= 7
,
α
= 25
,
γ
= 0
.
1
).
12345670102030405060
Path loss exponent (
η
)
A v e r a g e l o c a t i o n p r e c i s i o n ( % o f D
a
)
σ
= 7,
α
= 25,
β
= 0.11,
γ
= 0.1
EcolocationCentroidAPITMLEProximity
0.010.040.111 0102030405060
Reference node density (
β
) (log scale)
A v e r a g e l o c a t i o n p r e c i s i o n ( % o f D
a
)
η
= 4,
σ
= 7,
α
= 25,
γ
= 0.1
EcolocationCentroidAPITMLEProximity
(a) (b)
Fig. 5. Comparison: (a) Average location precision as a function of path loss exponent (
σ
= 7
,
α
= 25
,
β
= 0
.
11
,
γ
= 0
.
1
) (b) Average location precisionas a function of reference node density (
η
= 4
,σ
= 7
,α
= 25
,γ
= 0
.
1
).
over many trials. The two metrics are averaged over
100
randomtrials and presented as a percentage of the average inter referencenode distance (
D
a
). The distance
D
a
is calculated as the average of the distances between all possible reference node pairs. (
D
a
≈
λ
2
).Figures 4(a) and 4(b) show the average location error for Ecolocation and the four localization techniques as a function of path lossexponent (
η
) and standard deviation of lognormal shadowing (
σ
)respectively. The results suggest that Ecolocation performs better forRF channels that have higher
η
and lower
σ
values.Among all ﬁve localization techniques Ecolocation provides theleast location error over a range of
η
and
σ
values. MLE performsequally well for some values. APIT is the least accurate and Centroidis not inﬂuenced by radio channel conditions because all referencenodes fall in the radio range of the unknown node.Figures 4(c) and 4(d) compare the average location error for all ﬁvelocalization techniques as a function of the number of reference nodes