Efficient Algorithms for Neighbor Discovery in Wireless

advertisement
Efficient Algorithms for Neighbor
Discovery in Wireless Networks
Sudarshan Vasudevan (Bell Labs), Micah Adler
(FluentMobile), Dennis Goeckel and Don Towsley
(UMass Amherst)
1
Problem definition
• Wireless nodes dropped over a region
– Nodes have very little or no information
about the network characteristics
• Nodes beginning to power up
• Problem: How does each node “discover”
the IDs of its neighbors (e.g., nodes in
communication range)?
– A node i “discovers” node j upon receiving a
message from node j
2
System model
• Each node has a unique ID
• Omni-directional transceiver
– Node can either transmit or receive at any time
• Collision channel model
Idle: No discovery
Collision: No discovery
One-and-only-one transmit:
That ID is discovered (by all)
• Bi-directional links between neighboring nodes
3
Motivation
• Fundamental problem in large, self-organizing
wireless networks
– First step in initializing wireless networks
– Medium access, routing, topology control depend
on knowledge of neighbor IDs
• Faster neighbor discovery implies reduced
energy consumption
4
Prior work
• Aloha-based ND: [MMcGlynn’01, SBorbash’07]
– Assume a time-slotted system with nodes
synchronized
– At each slot: node transmits with probability p
• What is the optimal p to maximize discovery
rate?
– p = 1/n where n is number of neighbors
– n known to all nodes
5
Number of questions unresolved…
• What is the running time of Aloha-based
ND?
–
Not studied even for single-hop networks!
• What happens when nodes do not know n
(number of neighbors)?
• How to initiate and terminate ND?
• Is Aloha-based ND optimal?
• Outline:
–
–
Single-hop networks
Multi-hop networks
6
Aloha-based ND
• What is the time to discover all n neighbors?
• Assumptions:
– Clique of size n
– n known to all nodes
– Slotted, synchronous system
• Prob. node i is discovered in a time slot:
• Prob. of “unsuccessful” slot:
– Probability that the slot is idle or collision occurs =
1 – n ps = 1/e
7
Aloha-based ND and Coupon Collection
• Given an urn with n coupon types (each
corresponding to unique neighbor)
– draw a coupon (i.e. discover a neighbor) with probability
1/ne
– draw a “blank” coupon (i.e. a collision or an idle slot occurs)
with probability 1/e
• W: time to discover all n neighbors
– Same as waiting time to complete coupon collection
– E[W] = ne(log N + Θ(1)) = O(n log n)
• Concentration result: W = Θ(n log n) w.h.p
8
Unknown number of neighbors
• Algorithm divided into “phases”
– Phase k:
• Duration 2k e(ln 2k  c) slots
k
• Each node transmits with prob p = 1/2
Phase 1 : p  1/2, Duration  2 e (ln 2  c)
Phase 2 : p  1/4, Duration  4 e (ln 4  c)



Phase log2 n  : p  1/n, Duration  n e(log n  c)
W
log2n 
i
i
2
e(ln
2
 c)  2 n e(log n  c)

i1
At most a factor 2 slowdown from when n is known!
9
Asynchronous Aloha-based ND
• Each node alternates between “transmit” and
“receive” modes
Receive ~ Exponential(Λ)
σ
Time
• Analogous to synchronous case, where p = 1/n
• factor of two in the denominator due to doubling of
collision window in asynchronous operation
10
Asynchronous Aloha-based ND
• Exponential “receive” durations implies
transmission events are Poisson
– Prob. a given transmission is successful is 1/e
• Asynchronous algorithm can again be viewed
as a coupon collection problem
– Prob. of drawing a coupon
• Time to discover all neighbors (W)
– E[W] = 2σne(log n + Θ(1))
• Two times slower than synchronous version
– W = Θ(n log n) w.h.p
11
Initiating ND
• Assumption: maximum clock offset of δ
• Each node starts ND when its local clock
reaches T
• Add δ times units to each phase
– All nodes in log n-th phase for 2σne(log n + c) time
units
• In practice:
– Mica2 motes 32.768 kHz quartz crystal oscillator
• real-time clock accuracy ±10 ppm
• δ = 1.7 seconds/day
– Temperature-compensated oscillators
• accuracy ±1 ppm, δ=160 ms/day
12
Terminating ND
• Let Dj denote the number of neighbors
discovered by node i in the j-th phase
• Termination Rule: Stop at the end of j-th
phase if Dj-1 ≥ 2j-2 and Dj < 2j-1
• Example: Simulation of clique of size n = 16
–
–
–
–
–
Phase 1: D1 = 0
Phase 2: D2 = 2
Phase 3: D3 = 14
Phase 4: D4 = 15
Phase 5: D5 = 15
Terminate after phase 5, since D4 ≥ 8
and D5 < 16
Result : Eachnode terminates in log2 n  1 - st phase and
discoversall nodes w.h.p
13
Summary of Aloha-based ND
• Θ(n log n) Aloha-based ND
– A priori knowledge of n not required
• At most factor of two slowdown
– Asynchronous operation at most two times slower
compared to synchronous operation
– Allows nodes to start execution at different time
instants
– Provably correct termination condition
• Can we achieve an O(n) ND algorithm?
14
Order-optimal ND in single-hop networks
Idea: Divide each slot into two mini-slots to provide feedback to senders
Assume nodes detect collisions
A
C
A
A
C
C
B
B
B
D
E
Idle: No discovery
D
E
Collision: No discovery
D
E
One-and-only-one transmit:
That ID discovered (by all)
Collision: No feedback from A,B,C in the 2nd mini-slot
D and E know their xmissions failed
Success: Only C transmits => all nodes transmit feedback in 2nd mini-slot
C no longer transmits and channel contention keeps decreasing!
15
Order-optimal ND in single-hop networks
• Time to discover all neighbors, W = Θ(n) w.h.p
– Factor log n improvement over Aloha-based ND
• Similar to Aloha-based ND:
–
–
–
–
No knowledge of n => at most factor 2 slowdown
Asynchronous operation => factor 2 slowdown
Starting ND same as for Aloha-like algorithm
Termination trivial: each node yet to be discovered
broadcasts at the end of each phase
16
Order-optimal ND without collision
detection
• Algorithm divided into “rounds”
– Round k lasts ~ O(n/2k) time slots
– In Round k, where k < log log n:
• Each node transmits with prob. 2k-1/n and includes ID of
most recently discovered node
• At the end of the round, nodes that hear their IDs back
“drop out”
– After log log n rounds, run Aloha-based ND
17
Order-optimal ND without collision
detection
• Insight:
– Given n coupons, first n/2 coupons can be collected
in linear time, while remaining n/2 coupons require
O(n log n) time
– n/2k nodes “drop out” in round k
• Key result: At most n/log n nodes remain in
contention after log log n rounds w.h.p
– Remaining n/log n nodes discovered using Alohabased ND in O(n) time w.h.p
• Total running time Θ(n) w.h.p.
18
Multi-hop network analysis
• Given a graph G=(V,E) where |V| = n, Δ=max
node degree
• Aloha-based ND: each node transmits with
prob. 1/Δ
• Time W until all edges in E are discovered?
19
Multi-hop network analysis (contd.)
20
Lower bound analysis
• Given an arbitrary graph G=(V,E) such that
|V| = n, max. degree = Δ, and |E| -> ∞ as n ->
∞
• Main result: Any randomized algorithm
requires Ω(Δ + ln |E|) time w.h.p
– Ω(Δ) lower bound applies trivially
– Result follows by proving a lower bound of Ω(ln
|E|) when Δ=o(ln |E|)
• Assume collision detection at nodes
– Does not affect lower bound
21
Defn. of randomized algorithm
22
Lower bound analysis
• First establish lower bound for class of
uniform randomized algorithms
– All nodes run the same algorithm i.e.,
23
Lower bound analysis
• Result: Any graph G=(V,E) with max node degree Δ
admits a matching of size at least |E|/2Δ
• Proof: At each step, pick arbitrary edge in G; add to
matching and remove all adjacent edges from G
g
a
c
b
h
d
e
i
f
j
– At most 2Δ edges removed per step
a
c
b
e
d
f
g
h
i
j
24
Lower bound analysis
• Why look at matching?
– Different edges operate independently
– Lower bound for matching yields lower bound for graph G
– Histories of neighboring nodes identical until the time T that
discovery happens
• Assume both nodes discover each other in same slot
• log(|E|/2Δ) time to discover all links of matching w.h.p.
– When Δ=o(log |E|), this implies a lower bound of Ω(log |E|)
and main result follows
25
Lower bound analysis
• Non-uniform algorithms
– Each node may run a different algorithm
– Assume nodes 1..n run A1,..,An respectively
• Idea: reduce a non-uniform algorithm to a
uniform one
– Node i simulates an Ak uniformly at random,
independent of any other node
• Result: Joint probability of schedules chosen
by nodes same under both non-uniform and
uniform algorithms
– Lower bound of Ω(Δ + log |E|) applies
26
Summary of multi-hop analysis
• Aloha-based ND has running time O(Δ log n)
w.h.p
• Any randomized algorithm requires Ω(Δ+log
|E|) w.h.p.
• When |E| = Ω(n) (e.g. a connected graph)
– Aloha-based ND at most min(Δ, log n) from optimal
27
Other extensions
• Analysis extends to randomized directional
neighbor discovery
• ND algorithms can be adapted for RFID tag
identification and counting applications
• Unidirectional links can be identified
– E.g. nodes broadcast ids of discovered neighbors
on termination
• Neighbor discovery when nodes have
multipacket reception [MobiHoc 2011]
28
Open problems
• Order-optimality in multi-hop setting
– Can the feedback-based algorithms be
extended to a multi-hop network?
• Lower bound on deterministic
complexity
– Exponential gap between randomization and
determinism?
• More detailed PHY layer models?
• Mobility and topology maintenance
29
Comparison with beacon-based ND
• Each node transmits beacon once every k time units
– Routing protocols: AODV, DSR, GPSR, …
– Bluetooth networks, Zigbee, ..
• Bluetooth standard recommends k = 14
– When n ~ 100, Beacon-based ND 65 times slower than Alohabased ND and 300 times slower than feedback-based ND!
• GPSR recommends k = 1600 (corresponds to interval
of 1s with a slot size of 0.625 ms)
– When n ~ 10, Beacon-based ND 60 times slower than Alohabased ND!
• No obvious way to terminate Beacon-based ND
30
Thanks!
?^|/**/
31
References
• S. Vasudevan, M. Adler, D. Goeckel, and D. Towsley, “Efficient
Algorithms for Neighbor Discovery in Wireless Networks”, In
submission to IEEE/ACM Transactions on Networking.
• S. Vasudevan, D. Towsley, D. Goeckel, and R. Khalili, “Neighbor
Discovery in Wireless Networks and the Coupon Collector’s
Problem”, Proceedings of ACM MOBICOM, 2009.
• W. Zeng, X. Chen, A. Russell, S. Vasudevan, B. Wang, W. Wei,
“Neighbor Discovery in Wireless Networks with Multipacket
Reception”, To appear in Proceedings of ACM MOBIHOC, 2011.
32
Backup slide: Order notations
33
Download