Date post: | 30-Jan-2018 |
Category: |
Documents |
Upload: | vuongthien |
View: | 406 times |
Download: | 4 times |
18 March 2004 S72.333 Postgraduate Seminar in Radio Communications 1
HELSINKI UNIVERSITY OF TECHNOLOGY
Error Control Block Codes and Convolutional Codes
23 March 2004
Mei Yen [email protected]
18 March 2004 S72.333 Postgraduate Seminar in Radio Communications 2
HELSINKI UNIVERSITY OF TECHNOLOGY
Content1. Introduction
2. Forward error control (FEC)
3. Linear Block CodesGeneric block codesBCH codesReed-Solomon codes
4. Convolutional CodesConvolutional encodingViterbi decoding algorithm
5. Discussion
6. References
18 March 2004 S72.333 Postgraduate Seminar in Radio Communications 3
HELSINKI UNIVERSITY OF TECHNOLOGY
Introduction (1)
Why error control?
Multipath fadingInterference (unlicensed spectrum)Low received signal level (omnidirectional antenna)
High bit error rate in received data.
Error control important for WLAN.
Building 1Building 1
Building 2
Other device
Multipath fading
Interference
To wired network
Low receivedlevel
WLAN Environment
18 March 2004 S72.333 Postgraduate Seminar in Radio Communications 4
HELSINKI UNIVERSITY OF TECHNOLOGY
Introduction (2)
Objective: Error control to compensate transmission impairmentin order to increase quality of transmission.
Datalink layer and transport layer (TCP) protocols
Approaches for error controlError detection – CRC, parity checkForward error correction (FEC) – channel codingAutomatic Repeat Request (ARQ) – Stop-and-wait, Go-back-N, etc..
18 March 2004 S72.333 Postgraduate Seminar in Radio Communications 5
HELSINKI UNIVERSITY OF TECHNOLOGY
Forward Error ControlFEC scheme adds redundant bits to transmitted data to form codeword known as error correcting codes.
FEC scenarios
Error correction code can be implemented with block codes or convolutional codes
FECencoderD
ata
k bi
ts FECdecoder
Cod
ewor
d
n bi
ts
Dat
aD
ata
Detectable butuncorrectable error Error report
No error detectedor correctable
error
k bi
tsk
bits
Undetectable error
18 March 2004 S72.333 Postgraduate Seminar in Radio Communications 6
HELSINKI UNIVERSITY OF TECHNOLOGY
Block Codes (1)
Block error coding scheme divides the transmitted bit streaminto nonoverlapping blocks of length k.
Each k-bit block is map into an n-bit block called codeword.
Sourcedata
Receiveddata Decoded
data
n bi
ts
k bi
ts
FEC
Enc
oder
FEC
Dec
oder
Encodeddata
Erroneous bitCheck bitData bit
18 March 2004 S72.333 Postgraduate Seminar in Radio Communications 7
HELSINKI UNIVERSITY OF TECHNOLOGY
Block Codes (2)
The ratio k/n is called the code rate is a measure of how much excess bandwidth is required to transmit the data at the same data rate as without the code.
The minimum distance of a code is minimum Hamming distance between all vectors the code.
Tells the minimum error correcting capability of the codeMaximum number of guaranteed correctable errors/code word
mind
( )min min ,i ji jd d c c
≠ =
≤ − =
min , where is the largest integer 1 .2
xdt x
18 March 2004 S72.333 Postgraduate Seminar in Radio Communications 8
HELSINKI UNIVERSITY OF TECHNOLOGY
Generic Block Codes Encoder (1)Encoding of an (n,k) block code
Multiplying data block with the generator matrix
The rows of G contains the basis of the (n,k) code.Only out of the codes generated are valid codes.
= .c mG
[ ] [ ]
=
11 12 1
21 22 21 2 1 2
1 2
g g gg g g
...
g g g
n
nn k
k k kn
c c c m m m
kro
ws
n columns
2k 2n
(n-k) check bits added
n k
18 March 2004 S72.333 Postgraduate Seminar in Radio Communications 9
HELSINKI UNIVERSITY OF TECHNOLOGY
Generic Block Codes Encoder (2)Nonsystematic codes
n-k check bits in random positions
Systematic codes First k bits contain dataLast n-k bits contain the check bitsEasier decoding
[ ]
11 12 1
21 22 2
1 2
1 0 0 00 1 0 0
0 0 0 1
| .
n k
n k
k k kn k
k
p p pp p p
p p p
G
I P
−
−
−
=
=
18 March 2004 S72.333 Postgraduate Seminar in Radio Communications 10
HELSINKI UNIVERSITY OF TECHNOLOGY
Generic Block Codes Decoder (1)Decoding involves multiplying the n-bit received block with the parity check matrix H.
Let the received block be
Then
H (with dimension n-k) constitute the null space of the codeI.e. = .'GH 0
= += + .
y c emG e
( )= += +=
' '' '
'.
yH mG e HmGH eH
S eH Syndrome of the error patternIf = 0,
18 March 2004 S72.333 Postgraduate Seminar in Radio Communications 11
HELSINKI UNIVERSITY OF TECHNOLOGY
Generic Block Codes Decoder (2)
All-zero syndrome vector S=0 indicates no bit error has occured .
Nonzero syndrome vector indicates errors have occured indicate the error positions if the number of errors in the block do not exceed t, error correction can be done
H is the generator matrix of the dual code of G.For systematic codes, H can be deduced from G as
( )=e 0
[ ]−= − ' | .n kH P I
18 March 2004 S72.333 Postgraduate Seminar in Radio Communications 12
HELSINKI UNIVERSITY OF TECHNOLOGY
Some well-known block codes
Hamming codesGolay codesHamadard codesBCH codes Reed Solomon Codes Cyclic codes
18 March 2004 S72.333 Postgraduate Seminar in Radio Communications 13
HELSINKI UNIVERSITY OF TECHNOLOGY
Cyclic codes (1)
A block code is said to be cyclic if and only if the cyclic shift of a codeword is another codeword.
The cyclical structure of the codes allows us to associate a code with polynomials
Can be efficiently implemented using linear shift-register based codecs.
( )( )
−
− −
= ∈
= ∈1 1 2 1
2 1 2 1
, ,..., , C
, ,..., , Cn n
n n n
c c c c
c c c c
c
c
18 March 2004 S72.333 Postgraduate Seminar in Radio Communications 14
HELSINKI UNIVERSITY OF TECHNOLOGY
Cyclic Codes (2)
The generator polynomial g(x) of an (n,k) cyclic codes is a polynomial of degree n-k that divides
G can be obtained by arranging cyclically shifted version of g(x) into an matrix as follow.
can be reduced by row operation to systematic form
+ .1nx
1 2
1 2
1 2
0 00 0
0 0
n k
n k
n k
g g gg g g
g g g
G
−
−
−
=
×n k
18 March 2004 S72.333 Postgraduate Seminar in Radio Communications 15
HELSINKI UNIVERSITY OF TECHNOLOGY
Cyclic Codes (3)Example 1:
Find the generator matrix of a (7,4) cyclic code. Encode 1010.
Factorization:
g(x) is of degree , choose
Encode
+ = + + + + +7 3 2 31 ( 1)( 1)( 1)x x xx x x
( )3g( ) 1x x x= + + ( )1011− = 3n k
[ ]= 1010m
row operation
1 0 1 11 0 1 1
0 0 0 1 0 0 0 1 0 10 0 0 0 1
1 00 0 1 1 1
0 0 0 0 0 1 0 1 1 00 0 0 0 0 0 1 01 0 1 1 1 1
1 1G
= →
==
1010011cc
mG check bits
18 March 2004 S72.333 Postgraduate Seminar in Radio Communications 16
HELSINKI UNIVERSITY OF TECHNOLOGY
Cyclic Codes (4)Example 2
Find the parity check matrix H of the code. Find the syndrome and decode y=1011011.
H can be deduced from G
Syndrome:
Decoded data:
=
1 1 1 0 1 0 00 1 1 1 0 1 01 1 0 1 0 0 1
H
= =´ 011S yH =Error pattern, 0001000e
=⇒ =
min 31
dt
Number of linearly independent columns
= +=
ˆˆ 1010011
y emm
[ ]−= − ' | .n kH P I
18 March 2004 S72.333 Postgraduate Seminar in Radio Communications 17
HELSINKI UNIVERSITY OF TECHNOLOGY
BCH codes (1)
BCH codes consist of cyclic codes which employ binary and nonbinary alphabets.
BCH codes are 3-parameter codes expressed as (n,k,t) BCH code.
For any positive integer m n( )≥ ≥3; 7 ,
= −− ≤= +min
Block length: 2 1 Check bits: Minimum distance: 2 1
mnn k mtd t
18 March 2004 S72.333 Postgraduate Seminar in Radio Communications 18
HELSINKI UNIVERSITY OF TECHNOLOGY
BCH Codes (2)The parameter set provide large selection of block lengths, code rates and error correcting capabilities.
Nonbinary BCH takes q-ary symbols where q is any power of a prime number p;
For any positive integer s, q-ary BCH code is of length
To correct up to t errors, the number of parity check bits needed is
Note: Table of binary BCH codes parameters in Appendix
= −1.sn q
− ≤ 2 .n k st
⇒ = .zq p
18 March 2004 S72.333 Postgraduate Seminar in Radio Communications 19
HELSINKI UNIVERSITY OF TECHNOLOGY
Performance of BCH codes
BCH codes on channel with random errors [4]
5.5%
16.5%
27.5%
38.5%
As expected, as the code overhead increases, the performance improves.
18 March 2004 S72.333 Postgraduate Seminar in Radio Communications 20
HELSINKI UNIVERSITY OF TECHNOLOGY
Reed-Solomon Codes (1)Reed-Solomon (RS) codes are a special subclass of nonbinary BCH codes with parameter s=1
The parameters of an (n,k,t) RS code are as follows.
RS codes have optimal distance propertiesthe extra reduncdancy provided by nonbinary alphabets.For fixed number of check bits, RS codes provide optimal error correcting capability.
= −− ≤= +min
Block length: 1 Check bits: 2 Minimum distance: 2 1
n qn k td t
⇒ = −1.n q
18 March 2004 S72.333 Postgraduate Seminar in Radio Communications 21
HELSINKI UNIVERSITY OF TECHNOLOGY
Reed-Solomon Codes (2)
Practical RS codes take alphabets of q
Special feature: Extended RS code with length n+22 information symbols can be added to the length n RS code without reducing the minimum distance.
Effective in burst-error correction.
Efficient for channels where the set of input symbols is large.
= 2 .m
18 March 2004 S72.333 Postgraduate Seminar in Radio Communications 22
HELSINKI UNIVERSITY OF TECHNOLOGY
Convolutional codes
Convolutional codes are encoded with encoders with memoryEncoder outputs at an instant not only on the current inputs butalso some past inputs
An (n,k,m) convolutional code generates n encoded bits for every k data bitsm is the memory of the the encoder
Code rate is the ratio of number input bits to the corresponding number of output bits ./k n
18 March 2004 S72.333 Postgraduate Seminar in Radio Communications 23
HELSINKI UNIVERSITY OF TECHNOLOGY
Convolutional EncodingExample 3:
A ½-rate (2,1,2) binary convolutional encoder. Encode x=101.
11010
10100
00011
1010011001
y1 y2Register contentsInputD D
+
+
x
y1
y2
y
21
22
G (D) = 1+D+DG (D) = 1+D
11 10 00 10 11y =
Initial contents = 00
18 March 2004 S72.333 Postgraduate Seminar in Radio Communications 24
HELSINKI UNIVERSITY OF TECHNOLOGY
Convolutional Decoding (1)
Convolutional decoding is based on Maximum Likelihood (ML) concept. It’s an optimum decoder.
Viterbi algorithm performs reduced complexity ML decodingEliminate least likely trellis path at each transition stageReduced decoding complexity with early rejection if unlikely paths
Code trellis structure is exploited in viterbi decoding.
( ) ( ){ }=( )
( ') ( )
all | max |
m
m m
XP Z X P Z X
18 March 2004 S72.333 Postgraduate Seminar in Radio Communications 25
HELSINKI UNIVERSITY OF TECHNOLOGY
Convolutional Decoding (2)Trellis diagram of encoder in Example 3
Input bit 0
Input bit 1
• Viterbi decoding compares the Hamming distance between the branch code and the received code.
• Path producing larger Hamming distance is eliminated (after constraint length).
Branch code = encoder output
Reg
iste
rs’ s
tate
Transition
00
10
01
11
t1 t2 t3 t4 t5 t6
00 00 00 00 00
11 11 11 11 11
1010 10 10
0101 01 01
01 01 01
00 00 00
10 10 10
11 11 11
18 March 2004 S72.333 Postgraduate Seminar in Radio Communications 26
HELSINKI UNIVERSITY OF TECHNOLOGY
Convolutional Decoding (3)Example 4:
Input data m = 1 1 0 1 1 and Tx codeword X = 11 01 01 00 01Received code Z = 11 01 01 10 01
00
10
01
11
t1 t2 t3 t4 t5 t6
2
1
2
2
Z = 11 01 01 10 01
00
10
01
11
t1 t2 t3 t4
00
11
10
01
01
00
10
11
2
0
3
0
3
2
4
2
3
4
3
5
0
3
Z = 11 01 01
Decoded bits: 1 1 .......
18 March 2004 S72.333 Postgraduate Seminar in Radio Communications 27
HELSINKI UNIVERSITY OF TECHNOLOGY
Performance comparison Comparison of diffrent coding schemes over Rayleigh fading channel with MSK modulation [4]
RS(12,6,3)
RS(57,29,14)
CC(2,1,5)
All the codes have code rate ≈½.
Convolutional code outperforms the RS codes due to soft-decision Viterbi decoding.
18 March 2004 S72.333 Postgraduate Seminar in Radio Communications 28
HELSINKI UNIVERSITY OF TECHNOLOGY
Discussion
Selecting coding scheme for an application, tradeoffs on the following have to be considered
Performance – Probability of uncorrected errors, Coding gainOverhead – Throughput, Code rateComplexity – Processing delay, Computational power
To overcome individual drawbacks of coding schemes the following can be considered
Concatenated codes – reduced length, high performanceHybrid ARQ – Improve throughputInterleaving – Alternative to long codes for burst errorsAdaptive coding scheme – maximize code rate in varying channel [5]
18 March 2004 S72.333 Postgraduate Seminar in Radio Communications 29
HELSINKI UNIVERSITY OF TECHNOLOGY
References
[1] Bernard Sklar, “Digital Communications, Fundamentals and Application,” Int’l ed., Prentice-Hall, 1998.
[2] J. G. Proakis, “Digital Communications,” 4th ed., McGraw-Hill, 2001.
[3] William Stallings, “Wireless Communications and Networks,” Upper Saddle River, New Jersey, Prentice-Hall, 2002.
[4] H. Liu et. al., “Error Control Schemes for Networks: An Overview,” BaltzerScience Publishers BV, 1997.
[5] Pjilip K. McKinley, “A Study of Adaptive Forward Error Correction for Wireless Collaborative Computing,” IEEE Trans. on Parallel & Distributed Systems, vol. 13 no. 9, Sept. 2002.
18 March 2004 S72.333 Postgraduate Seminar in Radio Communications 30
HELSINKI UNIVERSITY OF TECHNOLOGY
Homework1. Block code
Given the generator polynomial of a (7,4) cyclic code
Find the parity check matrixHow many errors can this code detect and correct? How do you tell?Decode y=1011011 (as in Example 2)
2. Convolutional codeWhat is the principle of convolutional decoding?Based on the encoder in Example 3, decode the received sequence
using Viterbi algorithm.
= + +3 2( ) 1.g x x x
11 10 10 10 01Z =