View
214
Download
0
Tags:
Embed Size (px)
Citation preview
Reliable Multihop Transferon Wireless Sensor Networks
Sukun Kim, Rodrigo Fonseca,David Culler, Ion Stoica
UC Berkeley
NEST Retreat – Jun 4, 2004 in Santa Cruz
Problem Statement
• Goal– Reliable communication in multihop Wireless
Sensor Networks
• Assumption– Wireless communication– Resource-constrained mote
Constraints and Options
Sources of Failure• Link Failure• Mote Failure• …
How to obtain reliability? (possible options)1. Add redundancy of information
1. Retransmission – link-level, end-to-end2. Data redundancy – duplication, erasure code3. Path redundancy – Use thick path
2. Increase success rate1. Alternative Route2. Congestion Control
Internet
(# of pkts received) = Psuccess × (# of pkts sent)
Design Space 2 – Unit of Transfer
Fragment
Bundle
N1 N2 N3
Using fragmentation
+ Less buffer space
+ Multiplexing (point-to-point)
- Reordering, Reassembly
- More control traffic overhead
Design Space 3 – Routing Layer
Point-to-point Convergence Divergence
Implementation on Beacon Vector Routing
Erasure CodeEncoding Channel Decoding
M8 msgs
N
21 code words
N’≥8 code words
M
8 original msgs
Systematic Code
Benefit: if receiver has codes containing original messages• Encoding, Decoding are faster• Even if receiver get less than 8 packets, we don’t lose
every message
Systematic Code
Encoding one code word takes 1.7msDecoding time varies from 0 to 27msReal time processing is possible
In MICA2
Alternative Route Discovery
Find Alternative Route
What if
Get 6 best candidates for the next hop from routing table. And try from the best
Systematic Code without Route Fix
0
0.2
0.4
0.6
0.8
1
1.2
0 1 2 3 4 5 6
Max Number of Retransmission
Su
cce
ss R
ate
012345678
10.37 hops, 17.25% loss rate, 8 original messages
Overhead (10.37 hops, 17.25% loss rate)
0
5
10
15
20
25
30
35
40
45
50
0 1 2 3 4 5 6
Max Number of Retransmission
Nu
mb
er
of
Pa
cke
ts I
nje
cte
d p
er
Da
ta
012345678
10.37 hops, 17.25% loss rate, 8 original messages
Effect of Route Fix
0
0.2
0.4
0.6
0.8
1
1.2
0 1 2 3 4 5 6
Max Number of Retransmission
Su
cce
ss R
ate
w/o Route Fixw/ Route Fix
Systematic Code with Route Fix
0
0.2
0.4
0.6
0.8
1
1.2
0 1 2 3 4 5 6
Number of Redundant Packets
Su
cce
ss R
ate
012345678
8 original messages
Conclusion
• Moderate redundancy (2~3) in erasure code and Large maximum number of retransmission is good combination with route fix is good combination
• For ultimate reliability, alternative route approach is very appealing
(# of pkts received) = Psuccess × (# of pkts sent)
• Separate layer like TCP may not work efficiently
Design Spaces and Options
End to endFragment custodyBundle custody
Link-level retransmission
End-to-end retransmission
Erasure codeThick path
Success rate
Overhead
Delay
Routing layer 2
Routing layer 3
Can depend on loss rate, path length
Questions
Encoding Unit
Design Space 1
• How to obtain reliability? (possible options)– Add redundancy of information
• Retransmission – link level, end-to-end
• Data redundancy – duplication, erasure code
• Path redundancy – Use thick path
– Increase success rate• Alternative Route
• Congestion Control
Fragment compared to Bundle
+ Less buffer space
+ Multiplexing (point-to-point)
+ Decouple bundle size from transport
- Reordering, Reassembly
- Different fates to different pages
- More control traffic overhead
- End points must hold buffer longer
Point-to-point
Admission Control
• Node may also refuse to accept custody for a message, in case its local storage, for example, is full
• This mechanism can create a back-pressure signal that may eventually limit the rate at the source– Congestion control
• On-demand vs Credit-based flow control
Effect of Erasure Code
0
0.2
0.4
0.6
0.8
1
1.2
0 0.2 0.4 0.6 0.8 1 1.2
Raw Loss Rate
Fin
al L
oss
Ra
te
1
2
4
8
16
64
247
Effect of Systematic Code
0
0.2
0.4
0.6
0.8
1
1.2
0 0.2 0.4 0.6 0.8 1 1.2
Raw Loss Rate
Fin
al L
oss
Ra
te
1
2
4
8
16
64
247
Encoding Speed
0
2
4
6
8
10
12
14
16
0 2 4 6 8 10
Number of Redundant Codes
Tim
e (
ms)
Decoding Speed
0
5
10
15
20
25
30
0 2 4 6 8 10
Number of Non-Original Message Code
Tim
e (
ms)
Decoding Time versus Loss Rate
0
5
10
15
20
25
30
0 0.2 0.4 0.6 0.8 1
Loss Rate
Tim
e (
ms)
Variation in Decoding Time (R = 4)
0
2
4
6
8
10
12
14
16
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29
Tim
e (
ms)
What ifEncoding Channel Decoding
M8 msgs
N
21 code words
N’≥8 code words
M
8 original msgs
Problem Statement
Application
Network (Routing)
Reliable TransportInterface toarbitrary Routing Layer
Point-to-point, Convergence, Divergence+ Version Upgrade
Terms
Application
Reliable Transport
Network
Bundle
Bundle Fragmentation
Packet
Challenges in Reliable Multihop Transport
• Energy, computational power, and memory space are limited, and call for algorithms that are parsimonious in their use
• Wireless communication - Asymmetry of link, correlated loss (obstacles, interference), weak correlation to distance, hidden terminal problems, shared broadcast medium
Options
1. End-to-end Retransmission (inefficient)
2. Custody Transfer
3. Erasure Code
4. Hybrid of 2 and 3
Options
1. End-to-end Retransmission (inefficient)
2. Custody Transfer
3. Erasure Code
4. Hybrid of 2 and 3
Alternative Route Discovery
• Upon a link failure, the node has to try another neighbor (next hop), wait for some time, or return a failure notification– Guarantee that if the message will arrive at the
destination if there is a route
End-to-end argument
• 100% Requires end-to-end feedback– Routing layer has to provide a way for the
routing of ack packets back to the source– Backward Routing
• With Link-level retransmission RTT can vary significantly– Use upper bound for timeout
Options
1. End-to-end Retransmission (inefficient)
2. Custody Transfer
3. Erasure Code
4. Hybrid of 2 and 3
Erasure Code
• Only if M out of N packets arrive, we can construct original M message
• 9X.X% would be enough?– Link failure: correlated consecutive packet loss
until route recovery– Erasure code alone may not be able to
guarantee reliability
• Need separate congestion control
• Implementation finished
Options
1. End-to-end Retransmission (inefficient)
2. Custody Transfer
3. Erasure Code
4. Hybrid of 2 and 3
Hybrid
• Erasure coding can afford missed packets– Even if packet gets stuck due to link failure, we
can forget about it
• Explicit failure notification– Find alternative route when link fails voiding
correlated drops
• “Lemmings” Protocol
Another Option
• Thick path– Traffic multiplied by the width of path– Can be too much overhead
Discussion
• Useful features from routing layer (API)– Find alternative route– Disable link
• For duration of transfer (due to link failure)
• Temporarily (due to contention)
– Or get a list of next hop candidates
• From the application:– No silent drops
Conclusion
• Custody transfer and erasure code have potential of providing high reliability combined with alternative route finding
• End-to-end argument– For eventual reliability, it would be needed– Introduces much overhead
• Preliminary performance evaluation will be available at the end of May
Problem Statement (revisited)
• What mechanisms do we need to achieve reliable multihop transport in sensor networks?
• Is it possible to reason about routing from reliability separately, and provide a proper interface for reliable transport?
• Can we devise a reliable transport layer that can be plugged on top of different kinds of routing layers, such as convergence, divergence, and in-network point-to-point routing?
Questions
Coding
• For encoding process, we would have encoding function C(X) where X is a vector of M message
• Then C(X) is a vector of N code words (N > N)
Linear Code
• If code has a property that C(X) + C(Y) = C(X+Y), then it is called a “linear code”
• Linear can be represented with a matrix A. Code word vector for message vector X is simply AX
• Encoding is matrix-vector multiplication• Decoding is finding X such that AX=W for a
received code word vector W• A should have M linearly independent rows so
that linear equation has unique solution, and in turn unique message vector
Vandermonde Matrices
• Vandermonde is a matrix with element A(i, j) = xij where each xi is nonzero and different from all others
• For N by M Vandermonde matrix (N > M), any M rows are linearly independent forming nonsingular matrix
• In linear equation AX=W where A is Vandermonde matrix, any M rows and corresponding M elements of W forms M by M square matrix and vector of size M, where matrix is nonsingular– Can uniquely determine X
Reed-Solomon Code
Reed-Solomon Code
• Produce N equations with M unknown variables. Then with any M out of N equations, we can find those M unknowns– For a given data, let us break down the data into M
messages w(1), w(2), …, w(n)– Construct P(X) using these messages as coefficients– Evaluate this polynomial P(X) at N different points x1,
x2, …, xn– P(x1), P(x2), …, P(xn) can be represented as
multiplication of matrix and vector
• A is Vandermonde matrix!!!
Field
• For efficient use of bits in packet, we use extension filed with base 2. First of all we need to look at field, and prime filed
• A field is any set of elements which satisfies the field axioms for both addition and multiplication and is commutative division algebra– Field axioms include commutativity,
associativity, ditributivity, identity, and inverse
Prime Field
• A field with a finite number of members is known as a finite field or Galois field
• Prime field is a Galois field, whose elements are integer in [0, p – 1], where p is prime
• Addition and multiplication are normal integer addition and multiplication with modulo operation at the end
Extension Field
• Extension field is a Galois filed whose elements are integer in [0, pr – 1]
• This set still satisfies properties of field. Moreover, by setting p = 2, we can fully utilize bits in message
• Non-singularity of Vandermonde matrix still holds for prime field, and even extension field
Systematic Code
• If some part of erasure code is original message itself so that we can get message without decode when every packets arrive, that code is called systematic code
• For Vandermonde matrix, substitution any part of matrix with identity matrix still keep non-singular, even for prime field and extension field
• When we have all packets encoded identity matrix, decoding is free
Other optimization for erasure code
• Division of message
• Operation table
• Common requirement regardless of solution
• Different requirements specific for solution
• Erasure code needs separate congestion control
• Is control packet good?