wsn-labs-localization

Download Report

Transcript wsn-labs-localization

Wireless Links & Localization
Wireless Sensor Networks and Laboratories
Link Characteristics
Localization
Ranging Techniques
Ideal Wave Propagation
r
Isotropic source
z
xy
Dipole antenna
• Simplest model: Wavefront
propagation from an
isotropic source in free space
• Pr = Pt A / (4∏r2)
– Signal intensity drops as
second power of distance.
Propagation Characteristics
• Path Loss
• Shadowing (due to obstructions)
• Multipath Fading
Pr/Pt
Pt
Pr
d=vt
v
d=vt
Link Characteristics Depends on…
• Hardware technology:
• Frequency, antenna type, TX power level,
amplifier, RX sensitivity, modulation,
encoding
• Application issues:
• MAC, packet size, retransmission schemes,
traffic pattern
• Environmental conditions:
• Environment (e.g. forest, office), type of
materials (e.g. walls, trees), deployment
conditions (e.g. with or w/o line of sight),
weather (e.g. temperature, humidity)
Real Wave Propagation
CC1000 Radio Propagation
*Zhou et. al. 04, Polastre et al, 04
Zigbee Radio Propagation
1. Direction
• Continuous
variation
– Path loss varies
– Reflection,
diffraction and
scattering in
environment
– Antenna gain
– Hardware issues
*Zhou et. al. 04
Connectivity is not a simple disk!
Low transmit power
High transmit power
2. Distance
Many neighbors
are likely to be in
this wide, highvariance,
transitional
region. Also
called “grey
area”
Woo et al, 2003
Packet Loss Rate vs Distance
Grey Area with high variance
3. Time
Time  Energy Level
• Different nodes have different signal sending powers
due to:
– Different battery status
– Different hardware calibration
(a) One mote with different
battery status
(b) Different motes with the
same battery status
4. Asymmetric Links
Kotz et al
Asymmetric Links no Good?
• A thinks B is a neighbor and sends packet to B
but never gets an ACK!
• Existence of asymmetries requires careful
identification of “good neighbors”
Why Asymmetric Links?
• Do the laws of physics allow for the
existence of asymmetric links?
• NO – transmitted signal strength, path loss,
shadow fading, and multipath fading are all
symmetric effects
What Causes Asymmetry?
•
When swapping the asymmetric links node pairs, the
asymmetric links were inverted (91.1% ± 8.32)
•
Link asymmetries are often caused by differences in
transmitter/receiver calibration
Short Summary
• Real communication channel is not isotropic
•
Variability over distance (50 to 80% of radio range)
–
–
•
•
Reception rate is not normally distributed around the mean and
std. dev. (more later)
The region of highly variable reception rates is 50% or more of
the radio range
Variability over time (energy)
Variability over Tx/Rx calibration (asymmetric links)
Localization
What is Localization
• A mechanism for
discovering spatial
relationships between
objects
Why is Localization Important?
• Fundamental for many other services
– GPS does not work everywhere
– Geographic routing & coverage problems
• Localization gives raw sensor readings a physical
context
– Temperature readings  temperature map
– Asset tagging  asset tracking
– “Smart spaces”  context dependent behavior
Localization Problem
• Output: nodes’ location.
– Global location, e.g., what GPS gives.
– Relative location.
• Input:
–
–
–
–
Connectivity, hop count
Distance measurement of an incoming link.
Angle measurement of an incoming link.
Combinations of the above.
Triangulation, Trilateration
• Anchors advertise
their coordinates &
transmit a reference
signal
• Other nodes use the
reference signal to
estimate distances
anchor nodes.
Optimization Problem
• Distance measurements are noisy!
• Solve an optimization problem: minimize the mean square
error.
Problem Formulation
( xi , yi )
• k beacons at positions
(x 0 , y 0 )
• Assume node 0 has position
• Distance measurement between node 0 and beacon
i is ri
2
2
• Error:
fi  ri  (
xi  x0 )  ( yi  y0 )
• The objective function is
F ( x0 , y0 )  min  fi 2
• This is a non-linear optimization problem
Linearization
• Ideally, we would like the error to be 0
• Re-arrange:
fi  ri  ( xi  x0 ) 2  ( yi  y0 ) 2  0
( x0  y0 )  x0 (2xi )  y0 (2 yi )  ri  xi2  yi2
2
2
2
• Subtract the last equation from the previous ones to get rid of
quadratic terms.
2x0 ( xk  xi )  2 y0 ( yk  yi )  ri2  rk  xi2  yi2  xk2  yk2
2
• Note that this is linear.
Min Mean Square Estimate
(MMSE)
• In general, we have an over-constrained
linear system Ax  b
 r12  rk2  x12  y12  xk2  yk2 
 2 2

2
2
2
2
r2  rk  x2  y2  xk  yk 

b


 2
2
2
2
2
2
 rk 1  rk  xk 1  yk 1  xk  yk 
 x0 
x 
 y0 
2( yk  y1 ) 
 2( xk  x1 )
 2( x  x )

2(
y

y
)
k
2
k
2 
A




2(
x

x
)
2(
y

y
)

k 1
k
k 1 
 k
A
x =
b
Solve Least Square Equation
The linearized equations in matrix form
become
Ax  b
Now we can use the least squares equation to
compute an estimation.
x  ( AT A)1 AT b
Recursive Least Squares
• Linearize the measurement equations using Taylor
expansion
1  f
f 
f ( xˆ u  x, yˆ u  y)  f  x
 y  ...
1!  x
y 
xˆ
where

u
, yˆu
ru,i  fu2,i  xi x  yi y  O(2 )
xi  xˆu
yi  yˆ u
xi 
, yi 
ri
ri
ri  ( xi  xˆu ) 2  ( yi  yˆ u ) 2
• Neglecting higher-order terms, and choosing an initial “guess”
Xu, solve linear equations for “” that minimizes error
A  z
The linearized equations in matrix form become
 x 
   ,
 y 
 x1
A  x2
 x3
 f1( u ) 
y1 


y2 , z   f 2( u ) 
 f 3( u ) 
y3 


Now we can use the least squares equation to compute a correction to our
initial estimate
  ( A A) A z
T
1
T
Update the current position estimate
xˆu  xˆu   x and yˆu  yˆu   y
Repeat the same process until δ comes very close to 0
Ranging Techniques
Distance Measurements
•
•
•
•
•
•
Hop Count
1. Received Signal Strength Indicator (RSSI)
2. Phase Difference
3. Time of Arrival (ToA)
4. Time Difference of Arrival (TDoA)
5. Angle-of-Arrival (AOA)
1. RSSI: Radio-based Localization
using Triangulation
• Signal decays linearly with log
distance in laboratory setting
– Sj = b0j + b1j log Dj
– Dj = sqrt((x-xj)2 + (y-yj)2)
– Use triangulation to compute
(x,y) » Problem solved
[-80,-67,-50]
(x?,y?)
Fingerprint or RSS
1a. RSSI: Radio-based Localization
using Triangulation
• Signal decays linearly with log
distance in laboratory setting
– Sj = b0j + b1j log Dj
– Dj = sqrt((x-xj)2 + (y-yj)2)
RSSI
– Use triangulation to compute
(x,y) » Problem solved
Path loss
Shadowing
Fading
• Not in real life!!
– noise, multi-path, reflections,
systematic errors, etc.
Distance
1b. RSSI: Radio-Based Localization
using Supervised Learning fs
RSS
• Offline Training phase
– Collect “labeled” training data
[(x,y), S1,S2,S3,..]
• Online phase
– Match “unlabeled” RSS
– [(?,?), S1,S2,S3,..] to existing
“labeled” training fingerprints
[(x,y),s1,s2,s3]
[-80,-67,-50]
(x?,y?)
[(x,y),s1,s2,s3]
[(x,y),s1,s2,s3]
(xj,yj)
2. Radio Interferometric Ranging
Interference: superposition of two or more waves resulting
in a new wave pattern
Interferometry: cross-correlates a signal from a single
source recorded by 2 observers, used in geodesy,
astronomy, …
2.5
2
1
1.5
0.5
1
0.5
0
0
-0.5
0.5
1
1.5
2
0
0
0.5
1
1.5
-0.5
-1
-1
-1.5
1. Signal strength is not
crucial: no dependence 2. Low freq envelope
on orientation, power
(of composite signal):
level, hardware deviations
inexpensive HW
-2
-2.5
3. High carrier
freq:
high accuracy
2
Geometry
φCD= (dAD-dBD+dBC-dAC) mod λ
A
B
C
D
Senders (A, B) transmit
simultaneously
•pure sinusoid waves
•high carrier freq (400 MHz)
•small freq difference (500 Hz)
Receivers (C, D) measure radio
interference
•sample RSSI (9 KHz)
•find beat frequency (500 Hz)
•measure phase offset of RSSI
•use 1 μs timesync to correlate
phase offsets
•result: (dAD-dBD+dBC-dAC) mod λ
dXY: distance of X and Y
λ: wave length of carrier freq
3. Time of Arrival (ToA)
Gather four satellite signals and solve the non-linear system of
equations. Satellite have atomic clocks (four on each), kept within
250 ns of each other.
Can we use radio-based ToA for short-range localization?
Figure source: http://www.dependability.org/wg10.4/timedepend/03-Schmi.pdf
Using Acoustics for Ranging
• Pros:
– Sound travels slowly, so easy to measure ToF
– Tight synchronization easily achieved using RF
signaling
• Cons:
– Acoustic/Ultrasound emitters are power-hungry (must
move air)
– Solid obstructions block sound completely  detector
picks up reflections
– Audible sound has good channel properties but isn’t
always appropriate. Ultrasound is better.
Acoustic/Ultrasound Ranging
MIT Cricket Project
Ultrasound Localization
Acoustic Mote
UCB/UCLA
UCLA NESL MK-II
Ultrasound Localization
Typical Time-of-Flight AR System
• Radio channel is used to synchronize the sender and
receiver (or use a timesync service)
• Coded acoustic signal is emitted at the sender and detected
at the emitter. TOF determined by comparing arrival of RF
and acoustic signals
Radio
Radio
CPU
CPU
Speaker
Microphone
4. Time Difference of Arrival (TDoA)
•
•
•
•
•
Anchor B1 and B2 send signal
to A simultaneously. The time
difference of arrival is
recorded.
A stays on the hyperbola:
Do this for B2 and B3.
A stays at the intersection of
the two hyperbolas.
If the two hyperbolas have 2
intersections, one more
measurement is needed.
The Cricket Compass Architecture
(x1,y1,z1)
Y
(x3,y3,z3)
Beacons on
ceiling
(x2,y2,z2)
(x0,y0,z0)
X
Z
vt0
vt1
Cricket listener
with RF and ultrasonic
sensors
RF + Ultrasonic
Pulse
vt2
vt3

Mobile device
( x, y, z)
Use Differential Distance
Beacon
d
d1
d2

S1
L
S2
z
Estimating Differential Distance
using Time Difference of Arrival
Expt: Fix beacon
location, rotate the
rotary table to
change orientation
•
•
Error in estimating d is high when using time
difference of arrival (TDoA)
For angle error < 1 degree, L > 52 cm (too large)
Solution: Differential Distance (d2d1) from Phase Difference ()
• Observation: The differential distance (d2-d1) is
reflected as a phase difference between the signals
received at two sensors
Estimate phase difference between
ultrasonic waveforms to find (d2-d1)!
Beacon
 = 2p(d2 – d1)/l
d1
d2
S1
t
S2
t
Problem: Two Sensors Are
Inadequate
• Phase difference is periodic  ambiguous solutions
• We don’t know the sign of the phase difference to
differentiate between positive and negative angles
• Cannot place two sensors less than 0.5l apart
– Sensors are not tiny enough!!!
– Placing sensors close together produces inaccurate
measurements
Solution: Use Three Sensors
•
Beacon
•
d1
d2
d3
•
S3
S2
S1
L12 = 3l/2
Estimate 2 phase differences
to find unique solution for
(d2-d1)
Can do this when L12 and L23
are relatively-prime multiples
of l/2
Accuracy increases!
L23 = 4l/2
t
Cricket Compass
Ultrasound Sensor Bank RF module (xmit)
RF antenna
1.25 cm x 4.5 cm
Sensor Module
Ultrasonic
transmitter
Beacon
5. Angle Measurements
•
Angle of Arrival (AoA)
–
•
•
Determining the direction of propagation
of a radio-frequency wave incident on an
antenna array.
Directional Antenna
Special hardware, e.g., laser transmitter
and receivers.
Angle of Arrival (AoA)
•
•
A measures the direction of an incoming link by radio array.
By using 2 anchors, A can determine its position.
Acoustic Angle-of-Arrival System
• TOF AR system with multiple receiver channels
• Time difference of arrivals at receiver used to
estimate angle of arrival
Radio
Radio
CPU
CPU
Speaker
Microphone
Microphone
Microphone
Microphone
Array
Localization for Multihop Network
Multihop Node Localization Problem
Unkown Location
Beacon
Beacon nodes
Randomly Deployed Sensor Network
• Localize nodes in an ad-hoc
multihop network
• Based on a set of inter-node
distance measurements
Iterative multilateration
• Iterative multilateration
– a node with at least 3 neighboring beacons estimates its
position and becomes a beacon.
– Iterate until all nodes with 3 beacons are localized.
Unknown node
(unknown position)
Beacon node
(known position)
Error Accumulates over multiple hops!
Minimizing Error: Mass-Spring System
•
•
•
•
•
Nodes are “masses”, edges are “springs”.
Length of the spring equals the distance measurement.
Springs put forces to the nodes.
Nodes move.
Until the system stabilizes.
Mass-Spring System
•
•
•
•
Node ni’s current estimate of its position: pi.
The estimated distance dij between ni and nj.
The measured distance rij between ni and nj.
Force: Fij =dij- rij, along the direction pipj.
pj
j
Fij
dij
i
pi
Mass-Spring System (cont.)
•
•
•
Total force on ni: Fi=Σ Fij.
Move the node ni by a small distance (proportional to Fi).
Recurse.
pj
Fij
dij
Fi
pi
Mass-Spring System (cont.)
•
•
•
Total energy ni: Ei=Σ Eij= Σ (dij- rij)2.
Make sure that the total energy E=Σ Ei goes down.
Stop when the force (or total energy) is small enough.
pj
Fij
dij
Fi
pi
Mass-Spring System (cont.)
•
•
Advantage: Naturally a distributed algorithm.
Problem 1: may stuck in local minima.
–
–
•
Need to start from a reasonably good initial
estimation, e.g., the iterative multi-lateration.
Typically not used alone.
Problem 2: not robust to outliers.
–
If one measurement is off too much, the error gets
distributed everywhere in the system.