Lecture 8a Channel Coding 2024
Lecture 8a Channel Coding 2024
University of Science
Faculty of Electronics & Telecommunications
Dang Le Khoa
[email protected]
Outline
⚫ Channel coding
⚫ Linear block codes
– The error detection and correction capability
– Linear block codes: Encoding and decoding
– Hamming codes
– Cyclic codes
2
Block diagram of a DCS
Digital modulation
Channel
Digital demodulation
3
What is channel coding?
◼ Channel coding:
Transforming signals to improve
communications performance by increasing
the robustness against channel impairments
(noise, interference, fading, ..)
◼ Structured sequences: Transforming data
sequences into better sequences, having
structured redundancy.
-“Better” in the sense of making the decision process less
subject to errors.
4
Error control techniques
⚫ Automatic Repeat reQuest (ARQ)
– Full-duplex connection, error detection codes
– The receiver sends a feedback to the transmitter, saying that if
any error is detected in the received packet or not (Not-
Acknowledgement (NACK) and Acknowledgement (ACK).
– The transmitter retransmits the previously sent packet if it
receives NACK.
⚫ Forward Error Correction (FEC)
– Simplex connection, error correction codes
– The receiver tries to correct some errors
⚫ Hybrid ARQ (ARQ+FEC)
– Full-duplex, error detection and correction codes
5
Why using error correction coding?
◼ Error performance vs. bandwidth
PB
Coding gain:
Coded
For a given bit-error probability,
the reduction in the Eb/N0 that can be
A
realized through the use of code:
F
Eb Eb
G [dB] = [dB] − [dB].
C B
N0 u N 0 c D
E
Uncoded
Eb / N0 (dB)
6
Some definitions
⚫ Binary field :
– The set {0,1}, under modulo 2 binary addition and
multiplication forms a field.
Addition Multiplication
0 0 =0 0 0 = 0
01 =1 0 1 = 0
1 0 =1 10 = 0
1 1 =0 1 1 = 1
– Binary field is also called Galois field, GF(2).
7
Linear block codes
Channel
Data block Codeword
encoder
k bits n bits
8
Linear block codes
9
Linear block codes – cont’d
e = dmin − 1
10
Linear block codes – cont’d
U = mG
V1
V
(u1, u2 , , un ) = ( m1, m2 , , mk ) 2
◼ The rows of G are linearly independent.
Vk
(u1, u2 , , un ) = m1 V1 + m2 V2 + + m2 Vk .
Lecture 9 11
Linear block codes – cont’d
⚫ Example: Block code (6,3)
000 000000
V1 110100 1 00 11 01 00 .
G = V2 = 011010 01 0 011 01 0
V3 101001 11 0 1 0111 0
001 1 01001
1 01 0111 01
011 11 0011
111 000111
12
Linear block codes – cont’d
G = [P Ik ]
I k = k k identity matrix
Pk = k (n − k ) matrix
13
Linear block codes – cont’d
GH = 0 T
H = [I n −k PT ]
14
Linear block codes – cont’d
⚫ Standard array
n−k
– For row i = 2,3,...,2 find a vector in Vn of minimum
weight which is not already listed in the array.
– Call this pattern e i and form the i:th row as the corresponding
coset
zero
codeword U1 U2 U 2k
e2 e2 U 2 e 2 U 2k coset
.
coset leaders
e 2n − k e 2n − k U 2 e 2 n − k U 2k
15
Linear block codes – cont’d
⚫ Example: Standard array for the (6,3) code
codewords
Coset leaders
16
Linear block codes – cont’d
r = U+e
r = (r1 , r2 ,...., rn ) received codeword or vector
e = (e1 , e2 ,...., en ) error pattern or vector.
◼ Syndrome testing:
◼ S is the syndrome of r, corresponding to the error pattern e.
S = rHT = eHT
17
Linear block codes – cont’d
– ˆ = r + eˆ = (U + e) + eˆ = U + (e + eˆ )
Note that U
If eˆ = e , error is corrected.
If eˆ e , undetectable decoding error occurs.
18
Linear block codes – cont’d
19
Hamming codes
◼ Hamming codes
◼ Hamming codes are a subclass of linear block codes and
belong to the category of perfect codes.
◼ Hamming codes are expressed as a function of a single
integer m 2 .
Code length: n = 2m − 1
Number of information bits: k = 2m − m − 1.
Number of parity bits: n-k = m
Error correction capability: t = 1
◼ The columns of the parity-check matrix, H, consist of all
non-zero binary m-tuples.
20
Hamming codes
1 0 0 0 1 1 1
H = 0 1 0 1 0 1 1 = [I 33 PT ].
0 0 1 1 1 0 1
0 1 1 1 0 0 0
1 0 1 0 1 0 0
G= = [P I 44 ].
1 1 0 0 0 1 0
1 1 1 0 0 0 1
21
Other representations of the Hamming Code
⚫ Example: Systematic Hamming code (7,4)
0 1 1 1 0 0 0
1 0 1 0 1 0 0
G [P I4 4 ]
1 1 0 0 0 1 0
1 1 1 0 0 0 1
1 1 1 0 0 0 0
1 0 0 1 1 0 0
G
0 1 0 1 0 1 0
1 1 0 1 0 0 1
22
Cyclic block codes
⚫ Cyclic codes are a subclass of linear block codes.
⚫ Encoding and syndrome calculation are easily performed
using feedback shift-registers.
– Hence, relatively long block codes can be implemented with a
reasonable complexity.
⚫ BCH and Reed-Solomon codes are cyclic codes.
23
Cyclic block codes
U (i )
= (un −i , un −i +1,..., un −1, u0 , u1, u2 ,..., un −i −1).
◼ Example:
U = (1101)
U(1) = (1110) U(2) = (0111) U(3) = (1011) U(4) = (1101) = U.
24
Cyclic block codes
= U(1) ( X ) + un −1 ( X n + 1)
26
Cyclic block codes
g0 g1 gr 0
g ( X )
Xg( X ) g0 g1 gr
G= =
k −1 g0 g1 gr
X g( X )
0 g0 g1 g r
27
Cyclic block codes
n−k
3. Add p ( X ) to X m( X ) to form the codeword
U( X ).
28
Cyclic block codes
29
Cyclic block codes
– Find the generator and parity check matrices, G and H,
respectively.
g( X ) = 1 + 1 X + 0 X 2 + 1 X 3 ( g 0 , g1, g 2 , g3 ) = (1101).
1 1 0 1 0 0 0
0 1 1 0 1 0 0
Not in systematic form.
G= We do the following:
0 0 1 1 0 1 0 row(1) + row(3) → row(3)
0 0 0 1 1 0 1 row(1) + row(2) + row(4) → row(4)
1 1 0 1 0 0 0
0 1 1 0 1 0 0 1 0 0 1 0 1 1
G=
1 1 1 0 0 1 0
. H = 0 1 0 1 1 1 0 .
0 0 1 0 1 1 1
1 0 1 0 0 0 1
P I 4 4 I 33 PT
30
Cyclic block codes
Received r ( X ) = U ( X ) + e( X ) Error
codeword pattern
◼ With syndrome.
S( X ) = 0 : no error
S( X ) 0 : error , retransmission
31
Example of the block codes
PB
8PSK
QPSK
Eb / N0 [dB]
32