Sei sulla pagina 1di 43

Digital Communications I:

Modulation and Coding Course

Term 3 - 2008
Catharina Logothetis
Lecture 9
Last time we talked about:
Evaluating the average probability of
symbol error for different bandpass
modulation schemes

Comparing different modulation schemes


based on their error performances.

Lecture 9 2
Today, we are going to talk about:
Channel coding

Linear block codes


The error detection and correction capability
Encoding and decoding
Hamming codes
Cyclic codes

Lecture 9 3
Block diagram of a DCS

Source Channel Pulse Bandpass


Format
encode encode modulate modulate

Digital modulation

Channel
Digital demodulation

Source Channel Demod.


Format Detect
decode decode Sample

Lecture 9 4
What is channel coding?

Channel coding:
Transforming signals to improve
communications performance by increasing
the robustness against channel impairments
(noise, interference, fading, ...)
Waveform coding: Transforming waveforms to
better waveforms
Structured sequences: Transforming data
sequences into better sequences, having
structured redundancy.
-Better in the sense of making the decision process less
subject to errors.

Lecture 9 5
Error control techniques
Automatic Repeat reQuest (ARQ)
Full-duplex connection, error detection codes
The receiver sends feedback to the transmitter,
saying that if any error is detected in the received
packet or not (Not-Acknowledgement (NACK) and
Acknowledgement (ACK), respectively).
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
Lecture 9 6
Channel models
Discrete memory-less channels
Discrete input, discrete output
Binary Symmetric channels
Binary input, binary output
Gaussian channels
Discrete input, continuous output

Lecture 9 8
Linear block codes

Let us review some basic definitions first


that are useful in understanding Linear
block codes.

Lecture 9 9
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).

Lecture 9 10
Some definitions
Fields :
Let F be a set of objects on which two
operations + and . are defined.
F is said to be a field if and only if
1. F forms a commutative group under + operation.
The additive identity element is labeled 0.
a,b F a b b aF
1. F-{0} forms a commutative group under .
Operation. The multiplicative identity element is
labeled 1.
a,b F ab b a F
1. The operations + and . are distributive:
a(b c) (
ab) (a c)
Lecture 9 11
Some definitions

Vector space:
Let V be a set of vectors and F a fields of
elements called scalars. V forms a vector space
over F if:
1. Commutative: u,
v V u v v u F
2. a F
, v V av u V
3. Distributive:
(a b)v a
vbv and a(u v ) a u
av
4. Associative: a,
b F
, v V (a b)v
a
(b
v)
5. v V,1 vv

Lecture 9 12
Some definitions
Examples of vector spaces
The set of binary n-tuples, denoted by Vn


V
4{(
0000
),
(
0001
),
(
0010
),
(
0011
),
(
0100
),
(
010
),
(
01
),
(
1000
),
(
1001
),
(
1010
),
(
1011
),
(
1100
),
(
110
),
(
11
)}
Vector subspace:
A subset S of the vector space Vn is called a
subspace if:
The all-zero vector is in S.
The sum of any two vectors in S is also in S.

Example:
{(
0000
),
(
0101
),
(1010
),
(1111
)}
is
asubs
of
V.
4

Lecture 9 13
Some definitions
Spanning set:
A collection of vectors G v 1,v
2 , ,v n, is said to
be a spanning set for V or to span V if
linear combinations of the vectors in G include all
vectors in the vector space V,
Example:

(
1000
),
(0110
),
(
1100
),
(0011
),
(
1001
)span
V
.
4

Bases:
The spanning set of V that has minimal cardinality is
called the basis for V.
Cardinality of a set is the number of objects in the set.
Example:

(
1000
),
(0100
),
(
0010
),
(
0001
)is
a
basis
for
V
.
4

Lecture 9 14
Linear block codes

Linear block code (n,k)


A set C Vn with cardinality 2 is called a
k

linear block code if, and only if, it is a
subspace of the vector space Vn .
VkCVn

Members of C are called code-words.


The all-zero codeword is a codeword.

Any linear combination of code-words is a


codeword.

Lecture 9 15
Linear block codes contd
The Hamming weight of the vector U,
denoted by w(U), is the number of non-zero
elements in U.
The Hamming distance between two vectors
U and V, is the number of elements in which
they differ.
d
(U,V )w (
U V )

The minimum distance of a block code is


dmin
mind(
U,
iU)
j
min
w
(
Ui)

ij i

Lecture 9 18
Linear block codes contd

Error detection capability is given by


e dmin1

Error correcting-capability t of a code is


defined as the maximum number of
guaranteed correctable errors per codeword,
that is
dmin1
t
2

Lecture 9 19
Linear block codes contd

For memory less channels, the probability


that the decoder commits an erroneous
decoding is Pn j
n
p
M(1
p

n
)
j
j


j t
1
p is the transition probability or bit error probability
over channel.
The decoded bit error probability is
1n nj
P
B j
1


p(
1p
)
nj

n
jt
j

Lecture 9 20
Linear block codes contd
Example: Block code (6,3)

Message vector Codeword

000 000000
V1 110100 100 110100
GV 0
2 11010
010 011010

V
3 101001
110 1 011 1 0
001 1 010 0 1
101 0 111 0 1
011 110011
111 000111

Lecture 9 24
Linear block codes contd

Systematic block code (n,k)


For a systematic code, the first (or last) k
elements in the codeword are information bits.
G[P Ik]
Ik kkidentity
matrix
k
P k(nk) matrix


U
(
u,
u
,...,
u)(p
,
p,...,
p
,
m,m,...
m)
12 n



1

2


n
k
1
2

k


parity
bits
mess
bits

Lecture 9 25
Linear block codes contd

For any linear code we can find a


matrix H ( n k )n , such that its rows are
orthogonal to the rows of G :
GH 0 T

H is called the parity check matrix and


its rows are linearly independent.
For systematic linear block codes:
H[Ink P T
]

Lecture 9 26
Linear block codes contd

Standard array
For row i 2,3,...,2nk find a vector in Vn of minimum
weight that is not already listed in the array.
Call this pattern e i and form the i : th row as the
corresponding coset
zero
codeword U 1 U2 U 2k

e2 e2 U 2 e 2 U k
2 coset

en
k enk
U 2 enk U k
coset leaders 2 2 2 2

Lecture 9 28
Linear block codes contd

Standard array and syndrome table decoding


1. Calculate S rHT
2. Find the coset leader, e ei , corresponding to S.
r e and the corresponding m .
3. Calculate U



Note that U
r
e
(
U

e)
eU
(e
e
)
If e e , the error is corrected.
If e e , undetectable decoding error occurs.

Lecture 9 29
Linear block codes contd
Example: Standard array for the (6,3) code
codewords

000000
110100
011010
101110
101001
011101
110011
000111
000001
110101
011011
101111
101000
011100
110010
000110
000010
110111
011000
101100
101011
011111
110001
000101
000100
110011
011100
101010
101101
011010
110111
000110
001000
111100
010000
100100 coset
100000
010100
100101
010001 010110

Coset leaders

Lecture 9 30
Linear block codes contd

Error pattern Syndrome


000000 000 U(101110)
transmit
ted.
000001 101
r(001110)
isreceived.
000010 011
000100 110
Thesyndrome
ofriscomputed
:
001000 001 SrH T
(001110)
HT (100)
010000 010 Errorpattern
correspond
ingtothis
syndrome
is
100000 100
(100000)
e
010001 111
The corrected
vector
isestimated
re
U (001110)
(100000)(101110)

Lecture 9 31
Hamming codes

Example: Systematic Hamming code (7,4)



10001 1
1

H
0 10101
1
[I T
P]
3
3



001 1

101

01110 0 0

101010 0

G [
P I]

110 0 010 44



1110 0 01

Lecture 9 33
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.

Lecture 9 34
Cyclic block codes
Algebraic structure of Cyclic codes, implies expressing
codewords in polynomial form

U
(
X
)u
u
X
uX
01 2
2

...
u

nX
1
n
1
deg
(
n-
1)
Relationship between a codeword and its cyclic shifts:

X
U(
X)u
0X
uX
1
2
...,
u
n2Xn1
u

nX
1
n



u
uX
uX 2

...
uXn1
u
1
Xn
u


n

1 0


1

n2


n



n1
(
1
U)
(X) u

n(
1X
n
1)


U(
1)
(X
)
u
n(
1Xn
1
)
(
1
U)
(X
)XU
(
X) n

modulo
(
X 1)
Hence:
By extension (
i
U)
(X
)Xi
U (
X) n

modulo
(
X 1)

Lecture 9 36
Cyclic block codes
Basic properties of Cyclic codes:
Let C be a binary (n,k) linear cyclic code
1. Within the set of code polynomials in C, there
is a unique monic polynomial g ( X ) with
minimal degree r n. g(X) is called the
generator polynomial.
g (
X ) g
0 1g X
...grX r

1. Every code polynomial U( X ) in C can be


expressed uniquely as U (X ) m (X )g (X)
2. The generator polynomial g ( X ) is a factor of
X n 1

Lecture 9 37
Cyclic block codes

The orthogonality of G and H in polynomial


form is expressed as g (X )h(X ) X n
1. This
means h( X ) is also a factor of X n 1

1. The row i,i 1,...,k , of the generator matrix is


formed by the coefficients of the " i 1" cyclic
shift of the generator polynomial.

g 1
0 g g 0
g )
r
(X

X g(X) g
0 g
1 g
r

G

k g
0 g
1 g
r
X1
g(
X
)
0 g 1
0 g g
r

Lecture 9 38
Cyclic block codes

Systematic encoding algorithm for an


(n,k) Cyclic code:
nk
1. Multiply the message polynomial m ( X ) by X

1. Divide the result of Step 1 by the generator


polynomial g ( X ) . Let p( X ) be the reminder.

nk
1. Add p ( X ) to X m(X)to form the codeword
U( X )

Lecture 9 39
Cyclic block codes

Example: For the systematic (7,4) Cyclic code


with generator polynomial g (X )1XX 3

1. Find the codeword for the message m(1011 )


n7, k 4, nk 3
m(1011
)m(X)1X2 X3
Xnkm(X)X3m(X)X3(1X2 X3)X3 X5 X6
Xnkm(X)byg(X):
Divide
X3 X5 X6 (1XX2 X3)(1XX3) 1


quotient
q(X) generator
g(X) remainder
p(X)

Form
the
codeword
polynomial
:
U(X)p(X)X3m(X)1X3 X5 X6
U(1
0
010
1
1)
parity
bitsmessage
bits

Lecture 9 40
Cyclic block codes
Find the generator and parity check matrices, G and H,
respectively.
g
(X)
1X
1
0X
2
X
1 3
(
g0,g
1,g
2,g
3)
(1101
)

1101000

0 110100 Not in systematic form.

G We do the following:

0011010
row(1)
row(3)
row(3)


0001101
row(1)
row(2)
row(4)
row(

1 1 0 1 0 0 0
0
0
1 0 0 1 011
G
1 1 0 1 0 H
0 1 0 1 1 1
0
1 1 1 0 0 1 0


0 0 1 0 111

1 0 1 0 0 0 1
I 33 PT
P I 44

Lecture 9 41
Example of the block codes

PB
8PSK

QPSK

Eb / N0 [dB]
Lecture 9 43

Potrebbero piacerti anche