Wireless Links & Localization Wireless Sensor Networks and Laboratories Link Characteristics...

Post on 27-Dec-2015

223 views 0 download

Tags:

Transcript of Wireless Links & Localization Wireless Sensor Networks and Laboratories Link Characteristics...

Wireless Links & LocalizationWireless Sensor Networks and Laboratories

Link Characteristics

Localization

Ranging Techniques

Ideal Wave Propagation

• Simplest model: Wavefront propagation from an isotropic source in free space

• Pr = Pt A / (4∏r2)– Signal intensity drops as

second power of distance.

r

Isotropic source

Dipole antenna

z

xy

Propagation Characteristics

• Path Loss

• Shadowing (due to obstructions)

• Multipath Fading

Pr/Pt

d=vt

PrPt

d=vt

v

• 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)

Link Characteristics Depends on…

CC1000 Radio Propagation

*Zhou et. al. 04, Polastre et al, 04

Real Wave Propagation

Zigbee Radio Propagation

*Zhou et. al. 04

1. Direction

• Continuous variation– Path loss varies

– Reflection, diffraction and scattering in environment

– Antenna gain

– Hardware issues

Connectivity is not a simple disk!

Low transmit power High transmit power

2. Distance

Woo et al, 2003

Many neighbors are likely to be in this wide, high-variance, transitional region. Also called “grey area”

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

-60

-59.5

-59

-58.5

-58

-57.5

-57

0 25 50 75

Beacon SeqNo

1.58V 1.4V1.32V 1.18V

(a) One mote with different battery status

-60-59.5

-59-58.5

-58-57.5

-57-56.5

-56-55.5

-55

0 25 50 75

Beacon SeqNo

Mote A Mote BMote C Mote D

(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

• 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

What Causes Asymmetry?

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• k beacons at positions

• Assume node 0 has position

• Distance measurement between node 0 and beacon i is

• Error:

• The objective function is

• This is a non-linear optimization problem

20 0( , ) min iF x y f

02 2

0( ) ( )i i i if r x x y y

),( ii yx

(x0, y0)

ir

Linearization

• Ideally, we would like the error to be 0

• Re-arrange:

• Subtract the last equation from the previous ones to get rid of quadratic terms.

• Note that this is linear.

2 20 0( ) ( ) 0i i i if r x x y y

2 2 2 2 20 0 0 0( ) ( 2 ) ( 2 )i i i i ix y x x y y r x y

2 20

2 2 20

22 ( ) 2 ( )k i k i i k i i k kx x y y rx r x y x yy

Min Mean Square Estimate (MMSE)

• In general, we have an over-constrained linear system Ax b

2 2 2 2 2 21 1 1

2 2 2 2 2 22 2 2

2 2 2 2 2 21 1 1

k k k

k k k

k k k k k k

r r x y x y

r r x y x yb

r r x y x y

1 1

2 2

1 1

2( ) 2( )

2( ) 2( )

2( ) 2( )

k k

k k

k k k k

x x y y

x x y yA

x x y y

0

0

xx

y

A x = b

Solve Least Square Equation

The linearized equations in matrix form become

Now we can use the least squares equation to compute an estimation.

1( )T Tx A A A b

Ax b

Recursive Least Squares

• Linearize the measurement equations using Taylor expansion

where

• Neglecting higher-order terms, and choosing an initial “guess” Xu, solve linear equations for “” that minimizes error

)( 22,, Oyxfr yixiiuiu

i

uii

i

uii r

yyy

r

xxx

ˆ,

ˆ

22 )ˆ()ˆ( uiuii yyxxr

zA

f ( ˆ x u x, ˆ y u y) f 1

1!x

f

xy

f

y

...

ˆ x u , ˆ y u

The linearized equations in matrix form become

Now we can use the least squares equation to compute a correction to our initial estimate

Update the current position estimate

Repeat the same process until δ comes very close to 0

)(3

)(2

)(1

33

22

11

, ,u

u

u

y

x

f

f

f

z

yx

yx

yx

A

zAAA TT 1)(

yuuxuu yyxx ˆˆ and ˆˆ

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]

Fingerprint or RSS

(x?,y?)

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)

– Use triangulation to compute (x,y) » Problem solved

• Not in real life!! – noise, multi-path, reflections,

systematic errors, etc.

DistanceR

SS

I

Path lossShadowingFading

1b. RSSI: Radio-Based Localization using Supervised Learning fs

[-80,-67,-50]

RSS

(xj,yj)

(x?,y?)

[(x,y),s1,s2,s3]

[(x,y),s1,s2,s3][(x,y),s1,s2,s3]

• 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

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, …

-1

-0.5

0

0.5

1

0 0.5 1 1.5 2

-2.5

-2

-1.5

-1

-0.5

0

0.5

1

1.5

2

2.5

0 0.5 1 1.5 2

1. Signal strength is not crucial: no dependence on orientation, power level, hardware deviations

2. Low freq envelope (of composite signal): inexpensive HW

3. High carrier freq: high

accuracy

Geometry

φCD= (dAD-dBD+dBC-dAC) mod λ

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

A B

C D

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.

Figure source: http://www.dependability.org/wg10.4/timedepend/03-Schmi.pdf

Can we use radio-based ToA for short-range localization?

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

Acoustic MoteUCB/UCLA

UCLA NESL MK-II Ultrasound Localization

MIT Cricket ProjectUltrasound 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

CPU

Speaker

Radio

CPU

Microphone

Radio

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.

Beacons onceiling

Mobile device

Cricket listenerwith RF and ultrasonic

sensors

The Cricket Compass Architecture

Z

X

Y

RF + UltrasonicPulse

(x1,y1,z1)

(x0,y0,z0)

(x2,y2,z2)

( x, y, z)

(x3,y3,z3)

vt3vt0

vt1 vt2

Use Differential Distance

d1d2 z

Beacon

S2

S1

d

L

Estimating Differential Distance using Time Difference of Arrival

• Error in estimating d is high when using time difference of arrival (TDoA)• For angle error < 1 degree, L > 52 cm (too large)

Expt: Fix beacon location, rotate the rotary table to change orientation

Solution: Differential Distance (d2-d1) from Phase Difference ()

• Observation: The differential distance (d2-d1) is reflected as a phase difference between the signals received at two sensors

d2d1

t

= 2(d2 – d1)/

BeaconEstimate phase difference between

ultrasonic waveforms to find (d2-d1)!

S1 S2t

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.5 apart

– Sensors are not tiny enough!!!

– Placing sensors close together produces inaccurate measurements

Solution: Use Three Sensors

d1

t

L12 = 3

d2 d3

L23 = 4

• Estimate 2 phase differences to find unique solution for (d2-d1)

• Can do this when L12 and L23 are relatively-prime multiples of

• Accuracy increases!

Beacon

S1 S2 S3

RF module (xmit)

Cricket CompassRF antenna

Ultrasonictransmitter

BeaconSensor Module

Ultrasound Sensor Bank

1.25 cm x 4.5 cm

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

CPU

Speaker

Radio

CPU

Radio

MicrophoneMicrophone

MicrophoneMicrophoneArray

Localization for Multihop Network

Multihop Node Localization Problem

Beacon

Unkown Location

Randomly Deployed Sensor Network

Beacon nodes

• 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.

Beacon node(known position)

Unknown node(unknown 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.

j

pi

pj

dij

Fij

i

Mass-Spring System (cont.)

• Total force on ni: Fi=Σ Fij.

• Move the node ni by a small distance (proportional to Fi).

• Recurse.

pi

pj

dij

Fij

Fi

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.

pi

pj

dij

Fij

Fi

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.