Channel Coding Intro Linear Codes
Channel Coding Intro Linear Codes
Channel coding
Introduction & linear codes
Manuel A. Vázquez
Jose Miguel Leiva
Joaquı́n Mı́guez
Index
1 Introduction
Channel models
Fundamentals
2 Encoding
3 Decoding
Hard decoding
Soft decoding
Coding gain
4 Linear block codes
Fundamentals
Decoding
5 Cyclic codes
Polynomials
Decoding
Introduction Encoding Decoding Linear block codes Cyclic codes
Index
1 Introduction
Channel models
Fundamentals
2 Encoding
3 Decoding
Hard decoding
Soft decoding
Coding gain
4 Linear block codes
Fundamentals
Decoding
5 Cyclic codes
Polynomials
Decoding
Introduction Encoding Decoding Linear block codes Cyclic codes
(Channel) Coding
Goal
Add redundancy to the transmitted information so that it can be
recovered if errors happen during transmission.
transmitter receiver
n(t) :
AWGN noise with
PSD N0 /2
Digital channel
transmitter receiver
n(t) :
AWGN noise with
PSD N0 /2
B Digital channel B̂
Introduction Encoding Decoding Linear block codes Cyclic codes
transmitter receiver
n(t) :
AWGN noise with
PSD N0 /2
A Gaussian channel q
Introduction Encoding Decoding Linear block codes Cyclic codes
B̂[0], B̂[1], · · ·
bi ci or b̂
q[0], q[1], · · ·
i = 1, · · · , 2k i = 1, · · · , 2k
# incorrect bits
BER =
# transmitted bits
Capacity
It is the maximum of the mutual information between
the input and output of the channel.
Reliable transmission
There is a sequence of codes (n, k) = (n, nR) such
that, when n → ∞, Pemax → 0.
Introduction Encoding Decoding Linear block codes Cyclic codes
Definitions
Definition: Redundancy
k n−r r
It allows rewriting the rate of the code as R = n = n =1− n
Index
1 Introduction
Channel models
Fundamentals
2 Encoding
3 Decoding
Hard decoding
Soft decoding
Coding gain
4 Linear block codes
Fundamentals
Decoding
5 Cyclic codes
Polynomials
Decoding
Introduction Encoding Decoding Linear block codes Cyclic codes
Coding
In the usual model for a digital communications system,
transmitter receiver
n(t) :
AWGN noise with
PSD N0 /2
n(t) :
AWGN noise with
PSD N0 /2
and we have
B[0] = C [0]
B[1] = C [1] codeword
.. ..
. .
Introduction Encoding Decoding Linear block codes Cyclic codes
Index
1 Introduction
Channel models
Fundamentals
2 Encoding
3 Decoding
Hard decoding
Soft decoding
Coding gain
4 Linear block codes
Fundamentals
Decoding
5 Cyclic codes
Polynomials
Decoding
Introduction Encoding Decoding Linear block codes Cyclic codes
Hard decoding
B Digital channel B̂
The input to the decoder are bits coming from the Detector ,
the B̂’s.
Metric is the Hamming distance.
Notation
Approximate bound
The first element in the summation is a good approximation if
is small and dmin large.
Introduction Encoding Decoding Linear block codes Cyclic codes
Soft decoding
Decoding at the element from the constellation level
It relies on the Gaussian channel
A Gaussian channel q
with
q=A+n
where n is a Gaussian noise vector.
The input to the decoder are the observations coming from
the Demodulator , the q’s.
Metric is Euclidean distance
Notation
Coding gain
If we set equal the BER with and without coding, the coding
gain is obtained as
Stirling’s approximation
1 x2
Q(x) ≈ e − 2
2
Introduction Encoding Decoding Linear block codes Cyclic codes
√ √
− Es Es
φ1 (t)
√
Let us consider a binary antipodal constellation 2-PAM (± Es ),
with the code
bi ci
00 000
01 011
10 110
11 101
Introduction Encoding Decoding Linear block codes Cyclic codes
BER as a function of Eb : r !
8Eb
BER ≈ 2Q
3N0
Introduction Encoding Decoding Linear block codes Cyclic codes
Index
1 Introduction
Channel models
Fundamentals
2 Encoding
3 Decoding
Hard decoding
Soft decoding
Coding gain
4 Linear block codes
Fundamentals
Decoding
5 Cyclic codes
Polynomials
Decoding
Introduction Encoding Decoding Linear block codes Cyclic codes
Properties
It is a subspace in GF (2)n with 2k elements.
The all-zeros word is a codeword.
Every codeword has at least another codeword that is at dmin
from it.
dmin is the smallest weight (number of 1s) among the non-null
codewords.
Introduction Encoding Decoding Linear block codes Cyclic codes
Encoding
Property
Every row of G is a codeword.
Introduction Encoding Decoding Linear block codes Cyclic codes
Parity-check matrix
Parity check matrix, H, is the orthogonal complement of G so that
cH> = 0 ⇔ c is a codeword
For the sake of convenience,
Definition: Syndrome
Then,
s = 0 ⇔ r is a codeword.
Syndrome-error connection
*0
s = rHT = (c + e)HT =
cHT + eHT = eHT
Introduction Encoding Decoding Linear block codes Cyclic codes
Systematic codes
Exercise
Prove it!
Introduction Encoding Decoding Linear block codes Cyclic codes
generator matrix:
Parity-check matrix:
1 0 0 0 1 0 1
0 1 0 0 1 1 0 1 1 1 0 1 0 0
G=
0 0 1 0 1 1 1 H = 0 1 1 1 0 1 0
0 0 0 1 0 1 1 1 0 1 1 0 0 1
10−3
10−4
hard gain
10−5 2 4 6 8
Eb
N0
Introduction Encoding Decoding Linear block codes Cyclic codes
0000010 010
and hence e = [0100000] so that
0000001 001
ĉ = r + e = r = [1000101] .
Introduction Encoding Decoding Linear block codes Cyclic codes
Equivalent codes
Computing H from G
If the code is systematic, we have an easy way of computing the
parity-check matrix...
...but what if it’s not? If the code is not systematic, one can apply
operations on the generator matrix, G, to try and transform it into
that of an equivalent systematic code, G0 = Ik P .
Index
1 Introduction
Channel models
Fundamentals
2 Encoding
3 Decoding
Hard decoding
Soft decoding
Coding gain
4 Linear block codes
Fundamentals
Decoding
5 Cyclic codes
Polynomials
Decoding
Introduction Encoding Decoding Linear block codes Cyclic codes
Cyclic codes
In a cyclic code,
If [c0 , c1 , . . . , cn−1 ] is a codeword, then so is
[cn−1 , c0 , c1 , . . . , cn−2 ]
i.e., every codeword is a (circularly) shifted version of another
codeword.
Introduction Encoding Decoding Linear block codes Cyclic codes
How is
[c0 , c1 , · · · , cn−1 ] → [cn−1 , c0 , · · · , cn−2 ]
achieved mathematically? By multiplying c(x) times x modulo
(x n − 1), i.e.,
xc(x) = c0 x + c1 x 2 + · · · + cn−1 x n = c0 x + · · · + cn−1 x n + cn−1 − cn−1
= cn−1 (x n − 1) + cn−1 + c0 x + c1 x 2 + · · · + cn−2 x n−1
Hence,
(xc(x))x n −1 = cn−1 + c0 x + c1 x 2 + · · · + cn−2 x n−1
| {z }
[cn−1 ,c0 ,··· ,cn−2 ]
Introduction Encoding Decoding Linear block codes Cyclic codes
Encoding
G → g (x)
generator generator
matrix polynomial
Decoding
H → h(x)
parity-check parity-check
matrix polynomial