forward error correction in sensor networks
DESCRIPTION
Jaein Jeong , Cheng-Tien Ee University of California, Berkeley. Forward Error Correction in Sensor Networks. Motivation. Packet errors occur in WSN. Error recovery is required for correct delivery. Questions. What kinds of error recovery method? What level of error recovery capability?. - PowerPoint PPT PresentationTRANSCRIPT
Forward Error Correction in Sensor Networks
Jaein Jeong, Cheng-Tien Ee
University of California, Berkeley
2
Motivation
• Packet errors occur in WSN.– Error recovery is required for correct delivery.
• Questions.– What kinds of error recovery method?
– What level of error recovery capability?
3
Two methods for error recovery
• ARQ (Automatic Repeat reQuest)
– A sends, and B acks.
– A sends, B misses, and A resends.
– TX cost increases with (#-nodes, #-TX).
A Bdata
ack
A B
data...
retransmission of data
ack
4
Two methods for error recovery
• FEC (Forward Error Correction)
– A sends data with error correction code (ECC).
– Preferable in broadcast and multi-hop network.
– We focus on FEC for WSN.
A Bdata + ECC
5
Choosing Right ECC for WSN
• Preliminary Experiment
0 200 400 600 800
100012001400
0 5 10 15 20 25 30 35
Fre
qu
en
cy
Burst Error Length (Bits)
Graph of Frequency Against Burst Error Length (Bits)Per 10000 Packets
2.1 m10.3 m20.6 m41.1 m
• Our approach: 1-bit & 2-bit ECC for WSN.
– Most packet errors are 1-bit or 2-bit.
6
Organization
• Background– Reed-Solomon, LT-code, 1-bit ECC.
• Theory– Linear block code, 1-bit & 2-bit ECC.
• Implementation– ECC implementation for Mica2dot w. CC1000.
• Experiment– Outdoor & indoor tests for several ECC.
• Conclusion
7
Background
• Reed-Solomon code, LT code– Better error-correction capability.
– Complex computation, larger memory space.
• 1-bit ECC code for Mica (RFM TR1000)– Handles both 1-bit ECC & DC-balancing.
– Not efficient for radio that already supports DC-balancing (e.g. CC1000).
8
Organization
• Background
• Theory
• Implementation
• Experiment
• Conclusion
9
Theory• Based on linear block code over GF(2)*.
– Message is represented as k-bit bitvector.• Elements of bitvector: {0, 1}
– Encoding & decoding: binary matrix multiplication.• Addition and multiplication: bitwise XOR and AND
Encoding
Modulation
Decoding
Demodulation
Noise
Channel
Encodedmessage: v = uG
Received message: r
Message: u Decoded message: u’
Syndrome: s = rHT
*: Galois Field
10
Theory• Encoding:
– Encodes k-bit msg u to (k+r)-bit codeword v.
– v = uG (u: msg, G: generator)
Encoding
Modulation
Decoding
Demodulation
Noise
Channel
Encodedmessage: v = uG
Received message: r
Message: u Decoded message: u’
Syndrome: s = rHT
11
Theory• Encoding:
– Encodes k-bit msg u to (k+r)-bit codeword v.
– v = uG (u: msg, G: generator)
• Decoding:– Decodes (k+r)-bit received data r into k-bit data u’.
– Calculates syndrome s = rHT (r: received msg, H: parity) for locating bit errors.
Encoding
Modulation
Decoding
Demodulation
Noise
Channel
Encodedmessage: v = uG
Received message: r
Message: u Decoded message: u’
Syndrome: s = rHT
12
Theory
• Locating bit errors:–
–
– Any non-zero syndrome s implies an error.
( )T T
T T T T T
s rH v e H
vH eH uGH eH eH
[ : ][ : ] 0T T Tk rGH I C C I C C
• Correcting bit errors:– If s matches i-th column of H, invert i-th bit of r.
– Otherwise, bit error is not correctable.
13
Odd-weight-column code• Odd-weight-column code is SECDED.
– Single-Error-Correction & Double-Error-Detection.
• Ex: odd-weight-column w. k = 8, r = 5.
8
1 0 0 0 0 0 0 0 0 0 1 1 1
0 1 0 0 0 0 0 0 0 1 0 1 1
0 0 1 0 0 0 0 0 1 0 1 0 1
0 0 0 1 0 0 0 0 1 0 1 1 0[ : ]
0 0 0 0 1 0 0 0 1 1 0 0 1
0 0 0 0 0 1 0 0 1 1 0 1 0
0 0 0 0 0 0 1 0 1 1 1 0 0
0 0 0 0 0 0 0 1 1 1 1 1 1
G I C
5
0 0 1 1 1 1 1 1 1 0 0 0 0
0 1 0 0 1 1 1 1 0 1 0 0 0
[ : ] 1 0 1 1 0 0 1 1 0 0 1 0 0
1 1 0 1 0 1 0 1 0 0 0 1 0
1 1 1 0 1 0 0 1 0 0 0 0 1
TH C I
14
Odd-weight-column code• Encoding: let message
– Then, codeword
• TX error: suppose 2nd bit of v is inverted.– Received bits
• Detecting error:– s matches 2nd column of H 2nd bit of v inverted.
5
1 1 1 1 1 1 1
1 1 1 1 1
[ : ] 1 1 1 1 1 1
1 1 1 1 1
1 1 1 1
1
1
1 1
TH C I
[0100 0010]u [0100 0010 10111]v uG
' [0 00 0010 1 1]0 011v ' [01011]Ts v H
15
Odd-weight-column code• Error correction:
– Calculating correct codeword.
– Since first k-columns of G is identity matrix,
' [0100 0000 00000]
[0000 0010 10111] [0100 0000 00000]
[0100 0010 10111]
v v
[0100 0010 10111]
[0100 0010]
uG
u
16
Double-bit error correction code
• Used (16,8) systematic, quasi-cyclic code.– Can correct 2-bit error and detect 3-bit error (DECTED).
– Similar to SECDED except decoding.• If syndrome s matches ith column of H, invert ith bit of r.
• If s matches sum of ith column of H and jth column of H,invert ith and jth bits of r.
• Otherwise, bit error is not correctable.
17
Double-bit error correction code• Encoding: let message
– Then, codeword
• TX error: 2nd & 3rd bits of v are inverted.– Received bits
• Detecting error:
8
1 1 1 1
1 1 1 1 1
1 1 1 1
1 1 1[ : ]
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1
1
1 1
1
1
1
1
TH C I
[0100 0010]u
[0100 0010 1001 1100]v uG
' [0 0 0010 1001 101 100]v
' [1010 1111]Ts v H
18
Organization
• Background
• Theory
• Implementation
• Experiment
• Conclusion
19
Implementation• Platform: Mica2dot with CC1000 radio.
• Three versions of ECC (1-bit & 2-bit)– SECDEC (13, 8) : 8-bit data, 13-bit codeword
– SECDED (30, 24) : 24-bit data, 30-bit codeword
– DECTED (16, 8) : 8-bit data, 16-bit codeword
• Implemented within MAC layer providing transparent packet interface.
• Lookup table of H for faster decoding.
20
Implementation• Overhead in bytes to transmit due to ECC.
– Assumes 20-byte preamble & 36-byte payload.
– Bytes to be sent
Bytes to be encodedeccr
SECDED (8,13) SECDED (30,24) DECTED (16,8)
recc 2byte / 1byte 4byte / 3byte 2byte / 1byte
Overhead 64.3% 21.4% 64.3%
21
Organization
• Background
• Theory
• Implementation
• Experiment
• Conclusion
22
Experimental Setup• Four versions of ECC MAC were tested
– NO FEC
– SECDED(13,8)
– SECDED(30,24)
– DECTED(16,8)
• TX node sends a packet 5,000 times.
• Received data is logged for analysis.
23
Experimental Setup• Outdoor test
– Sender / receiver were 183m apart L.O.S.
• Indoor test– Four different sender locations in Cory Hall.
24
Result (Packet Drop)• Our ECC implementation reduces packet error
rate (PER), but it has limitations.
• Outdoor: ECC reduces PER to zero.
0.00
0.05
0.10
0.15
0.20
0.25
NO FEC SECDEC(13,8)
SECDEC(30,24)
DECTED(16,8)
Pa
cke
t d
rop
ra
te (
%)
ECC type
Packet drop rate for different causes (outdoor)
1-bit error2-bit error
multi-bit error
25
Result (Packet Drop)• Indoor: PER > 0 due to multiple-bit errors.
0.00
1.00
2.00
3.00
4.00
5.00
NO FEC SECDEC(13,8)
SECDEC(30,24)
DECTED(16,8)
Pa
cke
t d
rop
ra
te (
%)
ECC type
Packet drop rate for different causes (Indoor Location 3)
1-bit error2-bit error
multi-bit error
0.00
1.00
2.00
3.00
4.00
5.00
6.00
NO FEC SECDEC(13,8)
SECDEC(30,24)
DECTED(16,8)
Pa
cke
t d
rop
ra
te (
%)
ECC type
Packet drop rate for different causes (Indoor Location 4)
1-bit error2-bit error
multi-bit error
26
Comparison among ECC schemes• SECDED (13,8) has smallest packet drop.
– SECDED (30,24) is weaker than SECDED(13,8) although more space-saving.
• DECTED(16,8) is no better than SECDEC (13,8).– Most errors are single-bit or multiple-bit.
0.00
1.00
2.00
3.00
4.00
5.00
6.00
NO FEC SECDEC(13,8)
SECDEC(30,24)
DECTED(16,8)
Pa
cke
t d
rop
ra
te (
%)
ECC type
Packet drop rate for different causes (Indoor Location 4)
1-bit error2-bit error
multi-bit error
27
Burst bit errors & packet losses• Burst bit errors happen, but frequency of
multiple packet drops is low.– A few retransmissions would be enough.
0
500
1000
1500
2000
0 50 100 150 200
Fre
qu
en
cy
Burst Error Length (Bits)
Graph of Frequency Against Burst Error Length (Bits) (Indoor Location 4)
No FECSEC (13,8)
SEC (30,24)DEC (16,8)
20 40 60 80
100 120 140 160 180 200
0 2 4 6 8 10 12
Fre
qu
en
cy
Packet Loss Burst Length
Graph of Frequency Against Packet Loss Burst Length (Indoor Location 4)
No FECSEC (13,8)
SEC (30,24)DEC (16,8)
28
Organization
• Background
• Theory
• Implementation
• Experiment
• Conclusion
29
Conclusion
• A few versions of 1-bit & 2-bit ECC were implemented and tested on CC1000.
• ECC reduces packet drop rate, but not effective under burst bit errors.
• Under burst bit errors, a few re-TX can be used to further reduce packet drop rate.
30
Back-up Slides
31
GF(2): Galois Field with two elements
• Elements: {0, 1}
• Operation: addition (XOR), multiplication (AND)
• Closure property:– For any a, b in GF(2), a + b and a * b belongs to GF(2)
f
• Other properties:– For any a in GF(2), a + a = 0
+ 0 1
0 0 1
1 1 0
* 0 1
0 0 0
1 0 1
32
Implementation• Overhead in bytes to transmit due to ECC.
– Assumes 20-byte preamble & 36-byte payload.
Data ParityUn-used
Overhead(Lecc-Lnon-ecc)
/ Lnon-ecc
Packet Size(Lecc )
Lnon
-ecc
SECDED (8,13)8b 5b 3b 64.3%
92B(= 20+36x2)
56B
SECDED (30,24)24b 6b 2b 21.4%
68B(= 20+36x4/3)
56B
DECTED (16,8)8b 8b 0b 64.3%
92B(= 20+36x2)
56B