Page 1
7/29/2019 KomDig_8
http://slidepdf.com/reader/full/komdig8 1/28
Slide 1
Digital Communication
Channel coding, linear block codes,
Hamming and cyclic codes
Lecture - 8
Ir. Muhamad Asvial, MSc., PhDCenter for Information and Communication Engineering Research (CICER)
Electrical Engineering Department - University of Indonesia
E-mail: [email protected]
http://www.ee.ui.ac.id/cicer
Page 2
7/29/2019 KomDig_8
http://slidepdf.com/reader/full/komdig8 2/28
Slide 2
• Channel coding:– Transforming signals to improve communications
performance by increasing the robustness againstchannel impairments (noise, interference, fading, ..)
– Waveform coding: Transforming waveforms tobetter waveforms
– Structured sequences: Transforming datasequences into better sequences, having structuredredundancy.
• “Better” in the sense of making the decision process lesssubject to errors.
What is channel coding?
Page 3
7/29/2019 KomDig_8
http://slidepdf.com/reader/full/komdig8 3/28
Slide 3
Error control techniques
• Automatic Repeat reQuest (ARQ)– Full-duplex connection, error detection codes
– The receiver sends a feedback to the transmitter, saying thatif 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 itreceives 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
Page 4
7/29/2019 KomDig_8
http://slidepdf.com/reader/full/komdig8 4/28
Slide 4
Why using error correction coding?
– Error performance vs. bandwidth– Power vs. bandwidth
– Data rate vs. bandwidth
– Capacity vs. bandwidth
(dB)/ 0NEb
BP
A
F
B
D
C
EUncoded
Coded
Coding gain:For a given bit-error probability,the reduction in the Eb/No that can be
realized through the use of code:
[dB][dB][dB]c0u0
N
E
N
EG bb
Page 5
7/29/2019 KomDig_8
http://slidepdf.com/reader/full/komdig8 5/28
Slide 5
Channel models
• Discrete memory-less channels– Discrete input, discrete output
• Binary Symmetric channels
– Binary input, binary output
• Gaussian channels
– Discrete input, continuous output
Page 6
7/29/2019 KomDig_8
http://slidepdf.com/reader/full/komdig8 6/28
Slide 6
Some definitions
• Binary field :– The set {0,1}, under modulo 2 binary addition and
multiplication forms a field.
– Binary field is also called Galois field, GF(2).
011
101
110
000
111
001
010
000
Addition Multiplication
Page 7
7/29/2019 KomDig_8
http://slidepdf.com/reader/full/komdig8 7/28
Slide 7
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”.
2. F-{0}forms a commutative group under . Operation. Themultiplicative identity element is labeled “1”.
3. The operations “+” and “.” distribute:
FabbaFba ,
FabbaFba ,
)()()( cabacba
Page 8
7/29/2019 KomDig_8
http://slidepdf.com/reader/full/komdig8 8/28
Slide 8
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:
Commutative:
Distributive:
Associative:
VuvVv aFa ,
vuvuvvv aaababa )( and )(
FV
uvvuvu,
)()(,, vvv babaVFba
vvVv 1 ,
Page 9
7/29/2019 KomDig_8
http://slidepdf.com/reader/full/komdig8 9/28
Slide 9
Linear block codes
• Linear block code (n,k)– A set with cardinality is called a linear
block code if, and only if, it is a subspace of thevector space .
• Members of C are called code-words.
• The all-zero codeword is a codeword.
• Any linear combination of code-words is a codeword.
nV
nVC k
nk VCV
Page 10
7/29/2019 KomDig_8
http://slidepdf.com/reader/full/komdig8 10/28
Slide 10
Linear block codes – cont’d
nVkV C
Bases of C
mapping
Page 11
7/29/2019 KomDig_8
http://slidepdf.com/reader/full/komdig8 11/28
Slide 11
Linear block codes – cont’d
• The information bit stream is chopped into blocks of k bits.• Each block is encoded to a larger block of n bits.
• The coded bits are modulated and sent over channel.
• The reverse procedure is done at the receiver.
Data blockChannelencoder
Codeword
k bits n bits
rateCode
bits Redundant
kR
n-k
c
Page 12
7/29/2019 KomDig_8
http://slidepdf.com/reader/full/komdig8 12/28
Slide 12
Linear block codes – cont’d
• The Hamming weight of 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.
• The minimum distance of a block code is
)()( VUVU,
wd)(min),(minmin i
i ji
jiwdd UUU
Page 13
7/29/2019 KomDig_8
http://slidepdf.com/reader/full/komdig8 13/28
Slide 13
Linear block codes – cont’d
• Error detection capability is given by
• Error correcting-capability t of a code, which is definedas the maximum number of guaranteed correctableerrors per codeword, is
2
1mindt
1min de
Page 14
7/29/2019 KomDig_8
http://slidepdf.com/reader/full/komdig8 14/28
Slide 14
Linear block codes – cont’d
• For memory less channels, the probability thatthe decoder commits an erroneous decoding is
– is the transition probability or bit error probability over
channel.
• The decoded bit error probability is
jn jn
t jM pp
j
nP
)1(
1
jn jn
t j
B pp j
n j
nP
)1(
1
1
Page 15
7/29/2019 KomDig_8
http://slidepdf.com/reader/full/komdig8 15/28
Slide 15
Linear block codes – cont’d
• Discrete, memoryless, symmetric channel model
– Note that for coded systems, the coded bits are modulated andtransmitted over channel. For example, for M-PSK modulationon AWGN channels (M>2):
where is energy per coded bit, given by
Tx. bits Rx. bits
1-p
1-p
p
p
MN
REMQMMN
EMQM
p cbc
sinlog2log
2sinlog2log
20
2
20
2
2
cE bcc ERE
1
0 0
1
Page 16
7/29/2019 KomDig_8
http://slidepdf.com/reader/full/komdig8 16/28
Slide 16
Linear block codes –cont’d
– A matrix G is constructed by taking as its rows thevectors on the basis,
nVkV
C
Bases of C
mapping
},,,{ 21 kVVV
knkk
n
n
kvvv
vvv
vvv
21
22221
11211
1
V
V
G
Page 17
7/29/2019 KomDig_8
http://slidepdf.com/reader/full/komdig8 17/28
Slide 17
Linear block codes – cont’d
• Encoding in (n,k) block code
– The rows of G, are linearly independent.
mGU
kn
k
kn
mmmuuu
mmmuuu
VVV
V
V
V
2221121
2
1
2121
),,,(
),,,(),,,(
Page 18
7/29/2019 KomDig_8
http://slidepdf.com/reader/full/komdig8 18/28
Slide 18
Linear block codes – cont’d
• Example: Block code (6,3)
1
0
0
0
1
0
0
0
1
1
1
0
0
1
1
1
0
1
3
2
1
V
V
V
G
1
1
1
1
1
0
0
0
0
1
0
1
1
1
1
1
1
01
1
0
0
0
1
1
0
1
1
1
1
1
0
0
0
1
1
1
1
0
0
0
1
1
0
1
0
0
0
1
0
0
0
1
0
1
0
0
1
1
0
0
1
0
0
0
0
1
0
0
0
1
0
Message vector Codeword
Page 19
7/29/2019 KomDig_8
http://slidepdf.com/reader/full/komdig8 19/28
Slide 19
Linear block codes – cont’d
• Systematic block code (n,k)– For a systematic code, the first (or last) k elements in
the codeword are information bits.
matrix )(
matrixidentity][
knk
kk
k
k
k
P
IIPG
),...,,,,...,,(),...,,(
bitsmessage
21
bitsparity
2121 kknn mmmpppuuu U
Page 20
7/29/2019 KomDig_8
http://slidepdf.com/reader/full/komdig8 20/28
Slide 20
Linear block codes – cont’d
• For any linear code we can find an matrix, which its rows are orthogonal to rows of :
• H is called the parity check matrix and its rowsare linearly independent.
• For systematic linear block codes:
nkn )(HG
0GH T
][ Tkn PIH
Page 21
7/29/2019 KomDig_8
http://slidepdf.com/reader/full/komdig8 21/28
Slide 21
Linear block codes – cont’d
• Syndrome testing:– S is syndrome of r , corresponding to the error pattern e.
FormatChannel
encodingModulation
Channeldecoding
FormatDemodulation
Detection
Data source
Data sink
U
r
m
channel
or vectorpatternerror),....,,(
or vectorcodewordreceived ),....,,(
21
21
n
n
eee
rrr
e
reUr
T T eHrHS
Page 22
7/29/2019 KomDig_8
http://slidepdf.com/reader/full/komdig8 22/28
Slide 22
Linear block codes – cont’d
111010001
100100000
010010000
001001000
110000100
011000010
101000001
000000000
(101110)(100000)(001110)ˆˆ
estimatedisvectorcorrected The
(100000)ˆ
issyndromethistoingcorrespondpatternError
(100)(001110)
:computedisof syndrome The
received.is (001110)
ted.transmit(101110)
erU
e
HrHS
r
r
U
T T
Error pattern Syndrome
Page 23
7/29/2019 KomDig_8
http://slidepdf.com/reader/full/komdig8 23/28
Slide 23
• Hamming codes– Hamming codes are a subclass of linear block codes and belongto the category of perfect codes.
– Hamming codes are expressed as a function of a single integer.
– The columns of the parity-check matrix, H, consist of all non-zerobinary m-tuples.
Hamming codes
2m
t
mn-k
mk
nm
m
1 :capabilitycorrectionError
:bitsparityof Number
12 :bitsninformatioof Number
12 :lengthCode
Page 24
7/29/2019 KomDig_8
http://slidepdf.com/reader/full/komdig8 24/28
Slide 24
Hamming codes
• Example: Systematic Hamming code (7,4)
][
1011100
1101010
1110001
33 TPIH
][
1000111
0100011
0010101
0001110
44
IPG
Page 25
7/29/2019 KomDig_8
http://slidepdf.com/reader/full/komdig8 25/28
Slide 25
Cyclic block codes
• Cyclic codes are a subclass of linear blockcodes.
• Encoding and syndrome calculation areeasily performed using feedback shift-
registers.– Hence, relatively long block codes can be
implemented with a reasonable complexity.
• BCH and Reed-Solomon codes are cycliccodes.
Page 26
7/29/2019 KomDig_8
http://slidepdf.com/reader/full/komdig8 26/28
Slide 26
Cyclic block codes
• A linear (n,k) code is called a Cyclic code if allcyclic shifts of a codeword are also acodeword.
– Example:
),...,,,,,...,,(),...,,,(
121011)(
1210
inninini
n
uuuuuuuuuuu
UU
“i” cyclic shifts of U
UUUUUU
)1101( )1011( )0111( )1110()1101(
)4()3()2()1(
Page 27
7/29/2019 KomDig_8
http://slidepdf.com/reader/full/komdig8 27/28
Slide 27
Cyclic block codes
• Syndrome decoding for Cyclic codes:– Received codeword in polynomial form is given by
– The syndrome is the reminder obtained by dividing the receivedpolynomial by the generator polynomial.
– With syndrome and Standard array, error is estimated.
• In Cyclic codes, the size of standard array is considerably reduced.
)()()( XXX eUr Receivedcodeword
Errorpattern
)()()()( XXXX Sgqr Syndrome
Page 28
7/29/2019 KomDig_8
http://slidepdf.com/reader/full/komdig8 28/28
Slide 28
Example of the block codes
8PSK
QPSK
[dB]/ 0NEb
BP