Forward Error Correction
FEC Basic Idea Send redundant data Receiver uses it to detect/correct errors Reduces retransmissions/NAKs Useful when RTT is high
Types of FEC Two types of FEC Block codes (works on blocks/packets) Hamming codes, Reed-Solomon codes Convolutional codes (arbitrary length symbols/bits) Viterbi codes
Reed-Solomon Codes Operates on blocks of m bits, each block is a symbol Corrects symbol errors, not bit errors Useful for correcting burst errors E.g. 2 symbol error-correcting code for m=8 Correct burst errors of 16 bits or less Used for deep space communication, CDs, digital media
(n,k)- Erasure codes (n,k)-code means k data packets Encoded into n > k Any k packets can be used to decode data Tolerate up to n-k losses
A simple example Consider a simple (3,2) code 2 Data bits a and b Send the following 3 symbols a b a XOR b Any 2 out of 3 symbols can now be used to decode all data In general, coding is done over a finite field
Recall TCP congestion control Congestion control Increase linearly if no packet loss Decrease to half if packet loss TCP sending rate Time 150 Kbps 100 Kbps 50 Kbps Channel error Congestion t0t0 t1t1 t2t2
Data vs. Redundancy tradeoff Optimizing Forward Error Correction (FEC) coding rate for TCP Trade-off between channel rate and packet error probability What is the optimal coding rate for TCP? Active research topic
Coding trade-off: rate vs. error Coding rate Coded channel rate Coding rate Packet error probability DATA FEC DATA FEC TCP packet Radio block
Coding rate vs throughput Coding rate ( ) TCP throughput (Kbps) Channel rate = 128 Kbps Optimal coding rate