Forward Error Correction: Steven Marx CSC457 12/04/2001
Forward Error Correction: Steven Marx CSC457 12/04/2001
Steven Marx
CSC457
12/04/2001
Outline
What is FEC?
Why do we need it?
How does it work?
Where is it used?
What is FEC?
Send k packets
Reconstruct n packets
Such that we can tolerate k-n losses
Called an (n, k) FEC code
What is FEC? (2)
Why FEC?
Alternatives:
ARQ (Automatic Repeat reQuest)
requires feedback
bad for multicast
tolerance
only suitable for some applications
Why FEC? (2)
Advantages:
sometimes no feedback channel necessary
long delay path
one-way transmission
avoids multicast problems
Disadvantages:
computationally expensive
requires over-transmission
How is this possible?
An easy example:
(n, k) = (2, 3) FEC code
transmitting two numbers: a and b
Send three packets:
1. a
2. b
3. a + b
How is this possible? (2)
Could be represented as matrix multiplication
To encode:
|
|
.
|
\
|
(
(
(
=
|
|
|
.
|
\
|
b
a
y
y
y
1 1
1 0
0 1
3
2
1
To decode, use subset of rows.
How is this possible? (3)
More generally:
y = Gx, where G is a generator matrix
G is constructed in such a way that any
subset of rows is linearly independent.
A systematic generator matrix includes
the identity matrix.
A Problem
a and b are 8-bit numbers
a + b may require more bits
loss of precision means loss of data
A Solution
Finite fields:
field:
we can add, subtract, multiply, and divide
as with integers
closed over these operations
finite: finite number of elements
A Solution (2)
Specific example:
prime field or Galois Field - GF(p)
elements 0 to p-1
modulo p arithmetic
Problem:
with the exception of p = 2,
log(p)> log(p) bits required
requires modulo operations
Extension Fields
q = p
r
elements with p prime, r > 1
extension field, or GF(p
r
)
elements can be considered polynomials of
degree r - 1
sum just sum modulo p
extra simple with p = 2:
exactly r bits needed
sums and differences just XORs
Multiplication and Division
Exists an whose powers generate all non-
zero elements.
In GF(5), = 2, whose powers are
(1,2,4,3,1,).
Powers of repeat with period q - 1, so
q-1
=
0
= 1
Multiplication and Division (2)
x
y x
l q
q l l
x
xy
+
=
=
1
1 mod
1
o
o
for all x, x =
l
l is xs logarithm
Multiplication and Division (3)
An example: GF(5) -> = 2
3 = 2
3
mod 5
4 = 2
2
mod 5
3 * 4 = 2
3+2
mod 5
= 32 mod 5
= 2 mod 5
3 * 4 = 12 mod 5
= 2 mod 5
Vandermonde Matrices
g
i,j
= x
i
j-1
x
i
s are elements of GF(p
r
)
called Vandermonde Matrices
invertible if all x
i
s different
y = Gx
G
-1
y = G
-1
Gx = x
can be extended with the identity matrix for
systematic codes
Swarmcast - a real example
for media distribution
reduces bandwidth requirements of the server
server transmits to a small number of clients
while downloading, those clients also
transmit packets to other clients
FEC used to maximize chances of getting
useful packets
Swarmcast (2)
Star Wars:
Episode Two
Trailer
300Mb/s
100Mb/s
100Mb/s
100Mb/s
100Mb/s
100Mb/s
50Mb/s
100Mb/s
50Mb/s
50Mb/s
Other useful applications
multicast
streaming media: less I frames in MPEGS
one-way communication
high delay pathways
storage
Conclusion
FEC:
allows error correction without retransmission
requires redundancy in transmission
useful for multicast
not extensively used at the packet level
more important with high bandwidth,
high latency, as is the trend