06-Selfconfiguration..

advertisement
VI-1
Part VI: Self Configuration
Copyright © 2005
VI-2
Self Configuration in Sensor Networks
Operate in the
presence of
obstacles
Ad-Hoc
Deployment
Rapid
Infrastructure
Setup
VI-3
Self-configuration Challenges
1. Timing synchronization
– When did an event take place?
Most of This Set
2. Node Localization
– Where did an event take place?
3. Calibration
– What is the value of an event?
Self-configuration crucial to relate to the physical world!
VI-4
Time Synchronization
VI-5
Importance of Time in Sensor Networks
•
•
•
•
•
•
•
•
•
•
Beam-forming, localization
Data aggregation & caching
Security protocols
MAC layer design
Adaptive topology
management schemes
Absolute time of occurrence
Coordinated robotics
Debugging
User Interface
……
Beam-forming, localization, distributed DSP:
small scope, short lifetime, high precision
t=1
t=0
t=2
Target tracking:
larger scope, longer lifetime,
but lower required precision
t=3
VI-6
Why synchronized time?
The Myth of Simultaneity: “Event 1 and event 2 at same time”
Event 1
Event 2
Observer A:
Event 2 is earlier than Event 1
Observer B:
Event 2 is simultaneous to Event 1
Observer C:
Event 1 is earlier than Event 2
•
•
•
•
•
•
Ordering of events
Coordinated actuation
Data logging
Absolute time of occurrence
Performance measurement
…..
VI-7
Time Synchronization Quality Metrics
• Maximum Error
• Lifetime
• Scope & Availability
• Efficiency (use of power and time)
• Cost and form factor
…
VI-8
Time & Clocks
• Clocks: Measure of time!
– Oscillator and counter
t
C ( t )  k   ( ) d   C ( t 0 )
t0
• Synchronized time -> Synchronized clocks
• Errors
– Clock skew (offset): Difference between time on
two clocks.
• Different start times
– Clock drift: Count at different rates.
• Different frequency of the oscillator.
1  
dC
dt
1 
VI-9
Oscillators
Drift rate
Rubidium
~10-15 s / day
Cost
High
Atomic
Clocks
~10-12 s / day
Cesium
Quartz
Desktop
~10-6 s / day
IPAQs
~10-6 s / hr
Motes
~10-6 s / s
Low
VI-10
Atomic Clock
CPU power drawn by motes ~ 25 mW
Cost will be the deciding factor!
VI-11
Logical Clocks: “Time” = Number Assigned
to an Event Satisfying Causality
Time
P1
P2
e11
e21
e12
e22
e23
e24
e25
e32
P3
e13
e33
e34
e31
Time
P1
P2
P3
e11
e21
e12
e22
e23
e24
e13
e25
e32
e33
e34
e31
“Time, Clocks, and the Ordering of Events in a Distributed System”, Leslie Lamport, Communications of the ACM, July 1978, Volume 21, Number 7.
VI-12
Implementing Logical Clock
•
•
With synchronized physical clocks
– An event a happened before an event b if a happened at an earlier time
than b
Without physical clocks:
– Happened before relation “”
• If a and b are events in the same node, and a comes before b, then ab
• If a is the sending of a packet by one node and b is the receipt of the same
message by another node, then ab
• If ab and bc, then ac
– Local clock Ci for each node Ni
• Assigns a number Ci(a) to any event at a node
– Each node Ni increments Ci between any two successive events
• Ensures event ordering at a node
– (a) if event a is the sending of a message m by node Ni, then the message
m contains a timestamp Tm = Ci(a), and (b) Upon receiving a message m,
node Nj sets Cj greater than or equal to its present value and greater than
Tm
• Ensures event ordering across nodes
•
Using this method, one can assign a unique timestamp to each event in a
distributed system to provide a total ordering of all events
– But not enough for many applications!
VI-13
•
Technologies for Absolute Time
Synchronization
GPS
– Pros
•
•
Accuracy ~ 10-100ns (1 PPS signal in GPS)
Reliable operation
– Cons
•
•
Cannot work indoors, with foliage, obstructions, under
water
If something goes bad, delay for correcting it can be as
large as 30 minutes.
– Neutral
•
•
•
•
Expensive ~ Cheapest GPS receiver 50 US dollars.
Energy hungry!
Not all GPS receivers designed for time
NIST Radio Time Service: WWVB @ Fort
Collins, CO
– Continuously broadcasts time and
frequency signals at 60 KHz using a 50
KW radiated power transmitter
– It path delay is removed (e.g. by
averaging), WWVB provides uncertainty
of less than 100 microseconds relative to
UTC
•
QuickTime™ and a
TIFF (Uncompressed) decompressor
are needed to see this picture.
Inexpensive one ~ 0.5s
– Coverage area (signal > 100 microvolt
per meter) varies
• Contracts during day, expands during
night
1600 UTC
VI-14
Why not put a GPS or WWVB receiver at
every sensor node?
• Outages:
– GPS: foliage etc.
– WWVB: typically available for ~ 20 hours/day
• Other 4 hours you are stuck with an uncompensated clock
oscillator
• Accuracy
– Inexpensive receivers don’t give good accuracies:
intermittent synchronization, serial port delay and jitter
• Listening on a radio is not cheap - energy!!!
VI-15
802.11 Synchronization
Send at T1
Base station
Clients just adopt
the timestamp in the
beacon packet
Very simple, Provides ms
accuracy.
Neglects packet delay and
delay jitters
• This approach used by electronic products such as wall clocks,
clock radio, wrist watches etc. worldwide to synchronize via
WWVB/WWV/WWVH signals
• Can do better by compensating for propagation delay
VI-16
NTP: Internet Synchronization
Recv at T2
Send at T1
Client
T2 = T1 + DELAY + OFFSET
A
Recv at T4
B
Peer
Send at T3
T4 = T3 + DELAY- OFFSET
OFFSET = {(T2-T1)-(T4-T3)}/2
DELAY = {(T2-T1)+(T4-T3)}/2
VI-17
NTP details
•
Level n synchronizes to level n-1
– Level 1 synchronizes to UTC via GPS, WWVB etc.
•
•
•
•
•
•
Multiple synchronization peers -> redundancy and diversity
Path from clients to a canonical clock is short
Data filters -> Sliding window
Intersection and clustering algorithms -> Discard outliers
Combining algorithm -> Weight samples
Loop filter and local clock oscillator (LCO) -> implement
hybrid phase/frequency-lock feedback loop to minimize
jitter
Peer 1
Filter 1
Peer 2
Filiter 2
Peer 3
Filter 3
Intersection
and
Clustering
Algorithms
Combining
Algorithm
Loop Filter
P/F-Lock Loop
NTP Messages
LCO
Timestamps
Figure source: RFC on NTP
VI-18
NTP Evaluation
• Pros
– Readily available
– Industry standard
– Achieves secure and stable sync to ms accuracy
• Cons
–
–
–
–
Designed for ms accuracy only!
Not flexible
Impact of poor topologies
Designed for constant operation in the background at low rates
• E.g. it took NTP an hour to reduce error to 60 microseconds with
maximum polling rate of 16 sec.
• Neutral
– Not energy friendly!
VI-19
Comparison
Sensor Network
Demands
NTP
GPS
Tunable
One-fit all solution
One-fit all solution
Multi-modal
External synchronization External synchronization
Energy-efficient
•Listening is free
Receiver energy
consumption
•Using CPU is free
•Packet transmissions do
not effect lifetime
µs-ms accuracy
ms accuracy
ns accuracy
Specialized costly hardware
Cannot work indoors
VI-20
Synchronizing a pair of sensor nodes
VI-21
RBS: Synchronize Receivers
Receiver-receiver Synchronization
Based on CesiumSpray system by Verissimo and Rodrigues
Figure source: Courtesy of Jeremy Elson
VI-22
Magic behind RBS
NIC
NIC
Sender
Sender
Receiver
Receiver 1
Critical Path
Receiver 2
Time
Critical Path
Traditional critical path:
From the time the sender
reads its clock, to when the
receiver reads its clock
Figure source: Courtesy of Jeremy Elson
RBS: Only sensitive to the
differences in receive time
and propagation delay
VI-23
Phase Offset Estimation
•
Simplest case: single pulse, two receivers
– Xmitter broadcasts reference packet
– Each receiver records the time that beacon was received according to
its local clock
– Receivers exchange observations
– Sufficient information to form a local (relative) timescale
• However, global timescales are also important
•
Extending simple case to many receivers
– Assumptions
• Propagation delay is zero
• No clock skew
• Receiver non-determinism (error) is Gaussian
•
•
Sending more messages increases precision
– Transmitter broadcasts m packets
– Each receiver records time the beacon was observed
– Receivers exchange observations
– Receiver i computes phase offset to receiver j as the average of the
offsets implied by each pulse received by both nodes
Result:
VI-24
Receiver Determinism
Mica1 motes with narrowband
(19.2K) radios
VI-25
Gaussian == Good!
•
•
Well behaved distributions are useful
– Error can be reduced statistically, by sending multiple pulses over time
and averaging
– Also, easier to model/simulate
Problem: Clock skew
– It takes time to send multiple pulses
– By the time we do, clocks will have drifted
• Oscillator characteristics
– Accuracy: difference between expected and actual frequency
– Difference: Frequency error (usually 10-4 – 10-6)
– Stability: tendency to stay at same frequency over time
• Phase difference between two nodes’ clocks will change due to frequency
differences
•
Solution: don’t average; fit a line instead!
– Frequency and phase of local node’s clock recovered from slope and
intercept of the line
– Fitting a line assumes that frequency is stable
• Assume high short-term frequency stability
• Ignore data more than a few minutes old
VI-26
Clock Skew Estimation Results
•
•
2 receivers (motes): r1, r2
Point (0,0) marks the first
pulse
– Receivers synchronized,
no clock skew
•
Clock skew increases as time
increases
– Linear fit gives good results
•
•
Time
With clock skew estimation,
sufficient information exists to
convert any time value
generated by r1’s clock to a
time value that would have
been generated by r2’s clock
30 broadcasts improve
precision from 11 us to 1.6 us
between two receivers
– Dispersion down to 5.6 us
among 20 receivers
VI-27
Relative Performance of RBS with NTP on
iPaqs with 802.11 Radios
Clock Resolution
With higher network load
RBS degraded slightly (6us to 8us); NTP degraded severely (51us to 1542us)
VI-28
Relative Performance of RBS with NTP on
iPaqs with 802.11 Radios (contd.)
Clock Resolution
With higher network load RBS degraded slightly (6us to 8us);
NTP degraded severely (51us to 1542us)
VI-29
TPSN: Conventional Sender-Receiver
Synchronization
Recv at T2
Send at T1
OFFSET = {(T2-T1)-(T4-T3)}/2
T2 = T1 + DELAY + OFFSET
A
DELAY = {(T2-T1)+(T4-T3)}/2
B
Recv at T4
Send at T3
T4 = T3 + DELAY- OFFSET
Enemy is non-determinism!
Asymmetric delays and varying offset
Based on NTP
VI-30
Variability in Clock Offset
Node B clock
AB
RD t 1   t 4 Node A clock
Local node time
D
AB
t4
Ideal clock
AB
D t1
t1
Real Time
t4
AB
Error 
RD t 1   t 4
2
Relative offset
VI-31
Magic behind TPSN
ALL DELAYS ARE VARIABLE !
sender
receiver
software
MAC
TX
propagation
RX
software
Bottleneck
Use low level time stamping
Error 
S
UC
2
Sender
uncertainty

P
UC

R
2
Propagation
uncertainty
UC
2

RD
A B
t 1 t 4
2
Receiver
uncertainty
VI-32
Sources of Error: TPSN vs. RBS
 Most critical is the MAC delay.
 Small variations in software delay and propagation delay.
 Transmission delay and reception delay would have negligible variations
 Impact of drift between sensor node clocks.
A
B
B
C
A
Drift among the
Clocks in this interval
A
TPSN
B
B
RBS
C
VI-33
Error Comparison
( Error ) TPSN 
S
UC

2
( Error ) RBS  P



UC
P
UC

2
R
UC
R
AB
UC

RD t 1   t 4
2
2
AB
 RD t 1   t 4
RBS eliminates impact of sender side jitters
TPSN reduces by 2x the impact of propagation and receiver
side jitters, and variations in clock drift.
With low-level time stamping, sender side jitters will be
negligible

TPSN will give ~2x better performance than RBS
VI-34
TPSN vs. RBS


All results have been obtained via 100 independent
experimental runs.
Only consider the magnitude of synchronization error.
30
25
Average Error
(in microseconds)
20
TPSN
15
RBS
10
5
0
MICA1
MICA2
VI-35
FTSP: Estimate Clock Drift
• TPSN and RBS (for motes)
estimate only offset
Time at Node A
Slope = drift
– FTSP takes multiple readings to
estimate both offset and drift.
• Over short time scales linear
model works well!
}
Offset
Time at Node B
Based on both TPSN and RBS
VI-36
Magic behind FTSP
• Multiple timestamps to accurately estimate the byte boundaries.
sender
cpu:
interrupt handling
radio:
encoding
antenna:
propagation
antenna:
receiver
decoding
radio:
(byte alignment)
radio:
• RBS -> propagation, decoding,
interrupt handling.
• TPSN -> [interrupt handling, encoding,
propagation, decoding, interrupt
handling] / 2
• FTSP -> [interrupt handling, encoding,
propagation, decoding, byte alignment,
interrupt handling] / X , {2 < X < 4}
interrupt handling
cpu:
Extra overhead of 4 bytes per message
Figure source: Courtesy of Miklos Maroti
VI-37
Relative Comparison of TPSN and RBS
Comparison is not fair: skew v/s [skew, offset estimation]
What does superior time stamping buy?
TPSN
RBS
0.035
0.035
0.03
0.03
0.025
0.025
0.02
0.02
0.015
0.015
0.01
0.01
0.005
0.005
0
-8
Mean = -1.8e-16 ≈ 0
Standard deviation = 1.79e-6
≈ 1.8 microseconds
-6
-4
-2
0
2
4
6
-6
x 10
0
-8
Mean = -6.5e-15 ≈ 0
Standard deviation = 2.81e-6
≈ 2.8 microseconds
-6
-4
-2
0
2
4
6
8
10
-6
x 10
FTSP ~ 1.4 microseconds
FTSP’s strength lies in doing network-wide time sync!
VI-38
High-latency Communication
•
FTSP, RBS, TPSN: all implicitly assume that propagation delay is small
– FTSP, RBS: being receiver-receiver, ignore this
• They assume that difference between propagation delays to different
receivers is negligible
•
– TPSN: factors propagation delay, but assumes that it is small enough
so that there is negligible clock drift within the message exchange
duration
This assumption breaks down in acoustic links for underwater sensor
networks
– speed of sound: 1500 m/s
– RBS and FTSP yield 6 ms error @ 10m, 100s of ms @ 500 m
VI-39
Example Underwater Sensor Network
[Syed et. al., ISI-TR-2005-602]
VI-40
Considering Drift During Synchronization
• Consider Berkeley motes: worst case 40 ppm, or 40 microseconds
per second drift
• For nodes that are 400 meters apart, this means that the clock can
drift up to 21 microseconds during a TPSN message exchange
• USC/ISI’s TSHL: Skew-compensated two-way exchange
– First model each node’s clock so that nodes are skew
synchronized
• Done without any knowledge of propagation delay, which is
assumed to remain constant during the message exchange for this
phase
• Uses linear regression, assuming clock frequencies are short term
stable
– Then, perform TPSN-like two-way exchange for offset correction
VI-41
TSHL Performance
VI-42
TSHL Performance (contd.)
VI-43
Multihop Synchronization
VI-44
Network-wide Time Synchronization in TPSN

Level discovery
2
1
K
B
0
1
Levels now
all assigned
A
H
2
1
F
C
1
2
E
3
I

Node synchronize to
a node belonging to
one upper level


Use pair wise
synchronization.
Needs symmetric
links
L
2
2
3
G
D
J
VI-45
On-demand or Post-Facto Synchronization
•
•
•
Standard question: what time is it?
– Requires timing available at highest degree of precision all the time and
everywhere
– Expensive in resources
New service model: what is the time difference?
– Need not have global reference
– Precision depends on purpose (frames, symbols, phase) and can vary
throughout the network
– Allows time-stamping and later resolution of time differences
– Far lower resource cost
Approach
– Clocks start out unsynchronized
– A set of receivers waits for an interesting event
– Locally timestamp an event when it happens
– After the fact, reconcile clocks
•
Avoids wasting energy on unneeded sync; it’s easier to predict the past
than future
VI-46
Post-facto Synchronization
“Red pulse 2 sec
after blue pulse!”
“Here 1 sec
after blue pulse!”
“Here 0 sec after blue
pulse!”
•
•
Timestamp the events with unsynchronized clocks.
Do reconciling at a later stage.
Figure source: Courtesy of Jeremy Elson
“Here 3 sec after
red pulse!”
“Here 1 sec after
red pulse!”
VI-47
Post-facto Synchronization
Sync pulses
Drift Estimate
Test pulses
7usec error after 60 seconds of silence
Ref: based on slides by J. Elson
VI-48
Time Routing
The physical topology can be easily converted to a
logical topology; links represent possible clock
conversions
5
A
3
1
B
4
7
2
5
6
6
3
2
4
7
1
C
10
10
D
8
9
9
8
11
11
Use shortest path search to find a “time route”;
Edges can be weighted by error estimates
Figure source: Courtesy of Jeremy Elson
VI-49
Synchronizing to External Standards
The multihop algorithm can also be
easily used to sync to an external standard such as UTC
1
2
5
A
3
1
B
4
2
5
6
7
6
3
4
7
8
9
10
11
C
8
9
D
10
11
GPS
GPS
E.g. in RBS GPS’s PPS generates a series of “fake broadcasts”: “received” by
node 11’s local clock and UTC
Ref: based on slides by J. Elson
VI-50
Evaluation of Multihop Sync on IPAQs
(RBS based)
3.68 +/- 2.57
7
2.73 +/- 2.42
E rro r (u s e c )
6
2.73 +/- 1.91
5
1.85 +/- 1.28
4
Std Dev
3
Error
2
1
0
1 Hop
2 Hop
3 Hop
4 Hop
For Gaussian Error: Variance (n hops) = n.Variance (1 hop)
VI-51
Evaluation on Motes (TPSN based)
Theoretically, error increases with hop distance.

Randomness of drift and sign of error helps.
25
20
Microseconds

15
Average error
10
5
0
1 hop
2 hop
3 hop
4 hop
5 hop
VI-52
Long-term Synchronization
Temporal Aspect
VI-53
Current State of the Art...
• Accuracy of a few microseconds for instantaneous
synchronization between pair of nodes.
• But nodes go out of sync….
– Long term synchronization needed:
• Better design of network layers such as MAC, power management.
• Synchronized sampling, data logging, coordinated actuation….
• How error increases with time?
– No systematic study!
• Do periodic sync at an arbitrary
period.
• Is periodic the right way to do it?
VI-54
Recall: Rate-Adaptive Protocol (RATS)
Synchronize a pair of nodes A and B.
Sample
Repository
Model
Estimation
K
TB 
(TA , TB)

Error
Prediction
 kTA
k
k 0
Window (W)
Choose
W=max(2,T/S)
F
F
E p  TˆB  T B
Use W samples
to estimate β0 and β1
Sampler
Decide new
beaconing time of A
Error
Bound (Emax)
Estimate δ.
Scale δ by Δ
to find EP
Sampling
period (S)
Follow a MIMD
policy to update S
VI-55
Comparison with best possible periodic strategy
Best possible periodic strategy is not possible in practice.
It gives an upper bound.
14
Periodic scheme
MIMD; optimistic
MIMD; balanced
MIMD; pessimistic
Faulty ratio (%)
12
10
Better Error
Performance
Better Energy
Performance
8
6
4
2
0
0
10
20
30
40
50
60
70
Average sampling period (minutes)
Not a single scenario where MIMD performs worse either on error or energy
Energy gains ~ 1.1x – 12.5x
Error gains ~ 1.25x – 13.5x
VI-56
Performance Evaluation
Protocol automatically adapts
to the ambient conditions
Data set
Indoors
Outdoors
Version
(Savg)RATS
(minutes)
( S avg ) RATS
( S avg ) PERIODIC
(EF)RATS
(%)
( E F ) RATS
( E F ) PERIODIC
Optimistic
56.1
3.57
0.93
13.47
Balanced
54.26
5.16
2.03
5.76
Pessimistic
49.48
12.52
0.87
10.93
Optimistic
22.02
1.15
18.43
1.45
Balanced
21.72
1.11
19.71
1.31
Pessimistic
19.55
1.08
15.9
1.24
Avg. sampling period
is more for indoor
Error is more for
outdoors
VI-57
Comparison with Existing Systems
Hardware specs
For an error bound of 90µs
FTSP
RATS
Drift Estimate
Periodic Resync Drift Estimate
period
5µs/s
18s
2µs/s
Periodic
Period
Resync Average Resync
period
20 – 60 min
45s
For a scenario of 1 event / day
Energy gain of 2800x due to time sync
Hardware specs
FTSP
RATS
Overhead
Net gain
Overhead
Net gain
Overhead
Net gain
~ 4800x
NA
~ 1920x
~ 1.4 x
~ 70x
~ 40x
VI-58
Other Distributed Synchronization
Approaches
VI-59
Other Approaches
• Probabilistic clock synchronization by Chaudri et. al in IPSN
2004.
• Interval based Synchronization by Philipp et. al in IPSN 2004.
• Tiny/mini Sync by Sichuti et. al in WCNC 2003
• Light-weight Time Synchronization by Greunen et. al in WSNA
2003.
• A pulse-coupled oscillator approach to synchronization by
Lucarelli et. al in SenSys 2004.
VI-60
Distributed Time Synchronization as a
Consensus Problem
• Global averaging
– Each node broadcasts its local clock time periodically
– The node waits for time T
• The node collects the messages broadcast by other nodes.
• For each message received, the node keeps the local time.
• At the end of T, the node estimates the skew of its clock with
respect to each of the other nodes on the basis of the times
at which it received.
• The node computes a fault-tolerant average of the estimated
skews and uses it to adjust its local clock
• Localized averaging
– Each node exchanges its clock time with its neighbors
– Then sets its clock time to the average of its own clock
and the clock times of its neighbors
VI-61
Biologically-inspired Approaches
• Synchrony observed in swarms of coupled biological systems
– Synchronous flashing fireflies in southeast Asia
– Spiking of neurons
• Basically, pulse-coupled integrate-and-fire model
– Nodes integrate the coupling caused by the signal pulses
received from other nodes
– Nodes fire a pulse after reaching a designated threshold
– Early analytic study by Mirollo & Strogatz in 1990
• Proved synchronization of a network of pulse-coupled oscillators
under assumptions of uniform coupling and zero delay between
firing and receiving
– Later studies with different assumptions on delays and coupling
• Ideal for ad hoc networks!
– decentralized and simple mechanism
• Observation: instead of locking to a central clock or a specific node,
all nodes agree on a common phase so that their pulses are
maximally aligned
VI-62
Pulse Coupling
• Each node maintains an internal state variable x(t)
• A pulse is emitted whenever x(t)=1, and the state variable is reset to
0
• x(t) evolves according to
xÝi ( t )  f ( x i ),
x  [0,1]
• Without coupling, each state equation is periodic with the same
frequency but different phase
• If a neighbor  Ni fires, then the state variable is updated according
to 
x i  x i   g( x i )
where g() is chosen positive over [0,1]
• Coupling procedure drives the phase differences to zero
– Since g() is positive over [0,1], the effect of a single coupling is
to
decrease the time to fire for the receiving node
– Key theorem by Mirollo & Strogatz,1990
VI-63
Results from [Lucarelli04]
VI-64
Node Localization
VI-65
Problem Setup
Unkown Location
Beacon
Beacon nodes
Randomly Deployed Sensor Network
• A small fraction of the nodes
is aware of their locations
• Rest need to collaborate to
estimate their locations
VI-66
Different Problem Setups & Algorithms
• Absolute vs. relative frame of reference
– Beacons or no beacons
– Infrastructure vs. ad-hoc
– Single hop vs. multihop
• Many candidate approaches and solution methods
(depending on problem setup, measurement technology
and computation resources)
–
–
–
–
Range or angle measurement with least-squares optimization
Approaches based on radio connectivity
Learning based approaches
Semi definite programming approaches
• Both measurement based and connectivity based
– Vision based algorithms
VI-67
Base Case: Atomic Multilateration
1
ru ,1
u
ru , 3
3
ru , 2
2
Beacon node
with known
location
( xˆ u , yˆ u ) - initial position estimate for node u
• Beacons advertise their coordinates & transmit a reference signal
• Sensor node u uses the reference signal to estimate distances to
each of the beacon
• Note: Distance measurements are noisy!
VI-68
Problem Formulation
• Need to minimize the sum of squares of the residuals
f u , i  ru , i 
2
2
ˆ
ˆ
( xi  xu )  ( yi  yu )
• The objective function is
F ( x u , y u )  min

f
2
u ,i
• Could do weighted sum of desired
• This a non-linear optimization problem
– Many ways to solve (e.g a forces formulation, gradient
descent methods etc
VI-69
Solving over multiple hops
• Iterative Multilateration
Unknown node
(known position)
Beacon node
(known position)
VI-70
Iterative Multilateration
[Savvides01]
Iterative Multilateration
Problems
Error accumulation
May get stuck!!!
Localized nodes
total nodes
% of initial beacons
VI-71
Collaborative Mutlilateration
[Savvides01, Savvides02]
– All available measurements are used as constraints
Known position
Uknown position
– Solve for the positions of multiple unknowns simultaneously
– Catch: This is a non-linear optimization problem!
– How do we solve this?
VI-72
Problem Formulation
Distance measurement
f 2 ,3  R 2 ,3 
2
2
( x 2  xˆ 3 )  ( y 2  yˆ 3 )
f 3,5  R 3,5 
( xˆ 3  x 5 )  ( yˆ 3  y 5 )
f 4 ,3  R 4 ,3 
2
2
( xˆ 4  xˆ 3 )  ( yˆ 4  yˆ 3 )
f 4 ,5  R 4 ,5 
f 4 ,1  R 4 ,1 
2
Position estimate
1
2
2
2
( xˆ 4  x 5 )  ( yˆ 4  y 5 )
5
3
4
6
2
2
2
( xˆ 4  x1 )  ( yˆ 4  y 1 )
The objective function is
F ( xˆ 3 , yˆ 3 , xˆ 4 , yˆ 4 )  min

2
f i, j
Can be solved using iterative least squares utilizing the initial
Estimates from phase 2 - e.g. use a Kalman Filter
VI-73
A Solution Approach
PHASE 1
PHASE 2
Find nodes with unique
position solutions
Compute Initial Position Estimates
For all nodes
Using Bounding Boxes
PHASE 3
PHASE 3
Centralized Computation
Distributed Computation
Communicate results
to central point
Compute location estimates
Refine estimates of
under-constrained nodes
Communicate
Compute estimate
at each node
Criteria met?
NO
YES
Transmit estimates back
to each unknown node
Done
Done
VI-74
Ad-Hoc Positioning System(APS)
(Nicolescu and Nath [Nicolescu01])
DV-Hop:
• Landmarks propagate their locations in the network
• Each node forwards the landmark and keeps track of landmark id
and hop count
• When a landmark receives a packet propagated from another
landmark, it uses the hop information to compute average hoplength
• Each unknown node uses this distance estimate to compute an
estimate of its distance to each beacon
• Computes distance using a multilateration
• A Euclidian metric is also proposed by DV-Hop provides better
performance
VI-75
When is a graph localizable? How hard is
localization? (Goldenberg et. al. @ Yale)
• Physically:
– Network of n nodes, m beacons nodes at fixed locations in
space {x1…xm,xm+1,…,xn}
– Set of symmetric neighbor relations
• Abstraction
– Given: Graph Gn, {x1,...,xm}, edge weight function dij
– Find: Locations of all the nodes
1
4
{x1,x2,x3}
2
3
3
5
{d14, d24, d25, d35, d45}
5
4
1
2
{x4, x5}
VI-76
Solvability
• Problem is solvable if there is exactly one set of points {xm+1,…,xn}
(one realization of the graph) consistent with Gn, {x1,…,xm} and d:E
to R
• The solvability of the problem does not depend on the positions of
the points
• Graph properties alone (!) of a variant of Gn that is called the
grounded graph determine if the problem is solvable with probability
1
– By adding all edges between beacons to Gn, we get the
Grounded Graph
If it is, then one can
use {x1,x2,x3} and δ
to get the answer
is this localizable?
3
1
2
5
4
1
4
2
3
5
{x4, x5}
VI-77
Conditions for Ensuring Unique Realization
Solution:
G must rigid
G must be 3-connected
Fold or fold ambiguity
b
a
e
c
b
f
d
a
Flex ambiguity
d
c
G must be redundantly rigid:
It must remain rigid upon
removal of any single edge
e
f
3-conn+redundantly rigid = Globally Rigid, Uniquely realizable iff Globally rigid
VI-78
Full Conditions for Localizability
Network localization is solvable iff its associated grounded graph is
redundantly rigid and 3-connected
The grounded graph of a network is the graph of network connectivity, augmented
with edges between all pairs of beacons.
VI-79
NP-Hardness
Theorem:
Realization of uniquely realizable graphs weighted so as to be realizable
is NP-hard.
• There are subclasses of globally rigid graphs that are easy to
localize.
• For instance trilateration graphs – those graphs obtained through a
sequence of extensions corresponding to trilaterations from a
triangle:
Trilateration graphs are:
Globally rigid
Realizable in polynomial time
VI-80
Beyond Rigidity: Robustness
(Moore et. al. @ SenSys 2004)
Due to noise, an incorrect realization of the graph may fit better than the
ground truth! Tests and results from graph rigidity do not apply when
distance measurements are noisy! What graphs have low probability of
being subject to discontinuous flip or flex ambiguity?
VI-81
Rigid and Robust Quadrilaterals
•
•
Rigid quadrilateral
– Fully connected quadrilateral is globally
rigid
– Any two globally rigid quadrilaterals
sharing three vertices form a five node
subgraph that is also globally rigid
– By induction, any number of robust
quadrilaterals chained in this fashion
form a globally rigid subgraph
Robust quadrilateral
– Additional constraint to graph rigidity to
permit localization of only those nodes
which have a high probability of
unambiguous realization
– If the smallest angle i is near zero,
there is a risk that measurement error,
say in AD, will cause vertex D to be
reflected over this tiny sliver of a
triangle to cause flip ambiguity
– Additional condition:
VI-82
Errors in Localization
Position
Error
Channel
Effects
Computation
Error
Setup
Error
Induced by intrinsic
measurement error
VI-83
Geometry Effects (Savvides 2003)
10
(x,y)
10
(0,0)
unknown
beacon
0.6
0.4
0.2
0
15
15
10
10
5
y coordinate
5
0
0
x coordinate
It’s the angles stupid!
RMS Error(m)
0.019
RMS Error(m)
RMS Error(m)
0.8
0.018
0.017
0.016
0.015
0.014
10
0.03
0.025
0.02
0.015
10
10
5
y coordinate
5
0
0
x coordinate
Effect of beacons
10
5
y coordinate
5
0
0
x coordinate
VI-84
Wideband Acoustic Ranging (Girod, 2001)
•
•
Basic idea: acoustic spread-spectrum to cope with multipath
– Sender emits a characteristic acoustic signal
– Receiver correlates received time series with time-offsets of reference signal to
find “peak” offset
Shape signal to cope with limited speaker frequency repsonse, non-linearity, ringing
etc.
Degree of correlation
as a function of time
offset
Amount of Correlation
T
Mote with audio
amplifier and speaker
VI-85
Conclusions
VI-86
Unified Framework for Calibration of
Location, Time, and Sensor Parameters
•
•
Commonality between spatial localization, timing synchronization, and sensor
calibration problems
Three steps:
1. Measurements to give local pairwise “distances” f(n1,n2)
• Clock offsets (easy), Distance & angle (hard), transducer gain ratios and offsets
(hardest)
2. Rules for composing pairwise distances into constraints of the form
g(f1,f2…fm)=0
• Easy for clocks, hard for distance (geometry),hardest for calibration (channel model)
3. Distributed optimization problem: find assignment of variables that maximally
satisfy the constraints
•
•
Potentially, a single distributed service for “localization” in space, time, and
transducer dimensions
Problems an vulnerabilities in one affect the other
– Distance = Speed * Time
– Distance = f(signal strength)
– Speed = f(ambient)
VI-87
Multihop Synchronization
•
•
•
Measure “distance” in time between pairs of nodes
– R-R or T-R signaling
Translate time at one node to time at another node
Combine pair-wise timing relationships into end-to-end ones
1. Shortest path search with links weighted by error estimates
2. Find maximally consistent allocation of clock offsets among nodes
•
Can be used to sync to an external time standard
1
2
5
A
3
1
B
4
7
2
5
6
6
3
4
7
8
9
10
11
C
8
9
D
10
11
“Time Routing”
VI-88
•
•
•
•
•
Calibration: “Localizing” values of sensor
parameters
Sources of errors
– Noise
– Systematic errors
Calibration = correcting systematic errors
– Manufacturing
– Environment
– Age
Pre-deployment calibration not sufficient and
doesn’t scale
In-situ distributed calibration
Colibration approach
– Derive relative calibration among nearby
nodes when their readings are correlated
– “Calibration routing”
– Maximize consistency of pairwise
calibration functions within a group
• Sum of relative corrections in a perfect
calibration graph must be zero
VI-89
Securing Localization, Timesync, and
Calibration
• Sensor network functionality heavily relies on
localization, time synchronization, and calibration
• Adversary can tamper with a nodes notion of location,
time, and sensor values
• Need to consider invariants and correlations in the world
physical model
PsM
– Capkun @ Infocom 2005, Ganeriwal @ WiSe 2005
Ps
PrM
M
Pr
MN
Ps
BS
ACK: Srdjan Capkun
Recv at T2
Send at T1


T 2  T1 d   ;
A
A
Recv at T4
T4  T3 d 


B
B
Send at T3
Download