Top Banner
Block Code Performance ECEN 5682 Theory and Practice of Error Control Codes Block Code Performance Peter Mathys University of Colorado Spring 2007 Peter Mathys ECEN 5682 Theory and Practice of Error Control Codes
44

ECEN 5682 Theory and Practice of Error Control Codes - Block Code Performanceecee.colorado.edu/~mathys/ecen5682/slides/blockperf99.pdf · 2007-03-14 · “Goodness” Criteria for

Mar 05, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: ECEN 5682 Theory and Practice of Error Control Codes - Block Code Performanceecee.colorado.edu/~mathys/ecen5682/slides/blockperf99.pdf · 2007-03-14 · “Goodness” Criteria for

Block Code Performance

ECEN 5682 Theory and Practice of Error ControlCodes

Block Code Performance

Peter Mathys

University of Colorado

Spring 2007

Peter Mathys ECEN 5682 Theory and Practice of Error Control Codes

Page 2: ECEN 5682 Theory and Practice of Error Control Codes - Block Code Performanceecee.colorado.edu/~mathys/ecen5682/slides/blockperf99.pdf · 2007-03-14 · “Goodness” Criteria for

Block Code PerformancePerformance MeasuresProbability of Undetected ErrorProbability of Decoding Error

Performance Measures

“Goodness” Criteria for Block Codes. How does one select the“best” code for a particular application? This is not an easyquestion to answer in general because many factors, some of whichare only marginally related to coding theory (e.g. the wordlengthused on a VLSI chip), need to be considered. But since errorcontrol codes are used to control the effect of transmission orchannel errors, the probability of error after encoding and decodingwith a code C is certainly one of the major, if not the mostimportant, criterion for “goodness”. Depending on whether a codeis used for error detection and/or error correction, we areinterested in the probability of an undetected error Pu(E), or in theprobability of a decoding error P(E).

Peter Mathys ECEN 5682 Theory and Practice of Error Control Codes

Page 3: ECEN 5682 Theory and Practice of Error Control Codes - Block Code Performanceecee.colorado.edu/~mathys/ecen5682/slides/blockperf99.pdf · 2007-03-14 · “Goodness” Criteria for

Block Code PerformancePerformance MeasuresProbability of Undetected ErrorProbability of Decoding Error

Probability of Undetected Error

Theorem: Let C be any binary code with minimum (Hamming)distance dmin. Then the probability of undetected error, Pu(E), ona memoryless binary symmetric channel (BSC) with transitionprobability ε satisfies

Pu(E) ≤n∑

w=dmin

(n

w

)εw (1− ε)n−w .

Proof: Since the code has minimum distance dmin, it can detectall error patterns of (Hamming) weight dmin − 1 or less. QED

Note: The above theorem also holds for memoryless q-ary symmetric channels(QSC) with transition probabilities (x denotes input, y denotes output ofchannel)

P{y=β|x=α} =

1− ε , if α = β, α, β ∈ {0, 1, . . . q − 1} ,

εq−1

, if α 6= β, α, β ∈ {0, 1, . . . q − 1} .

Peter Mathys ECEN 5682 Theory and Practice of Error Control Codes

Page 4: ECEN 5682 Theory and Practice of Error Control Codes - Block Code Performanceecee.colorado.edu/~mathys/ecen5682/slides/blockperf99.pdf · 2007-03-14 · “Goodness” Criteria for

Block Code PerformancePerformance MeasuresProbability of Undetected ErrorProbability of Decoding Error

Note: Usually, many more error patterns can be detected thanthose indicated by the above theorem. A q-ary linear (n, k) code,for example, can detect qn − qk error patterns.

Definition: Let Aw be the number of codewords of a linear (n, k)code with (Hamming) weight w . Then {A0,A1, . . . ,An} is calledthe weight distribution of the code.

Example: Code #1 (binary (5, 2, 3) code) with generator matrix

G =

[1 0 1 0 10 1 0 1 1

],

has codewords

C = {00000, 01011, 10101, 11101} ,

and thus weight distribution

{A0 = 1, A3 = 2, A4 = 1, Aw = 0, w 6= 0, 3, 4} .

Peter Mathys ECEN 5682 Theory and Practice of Error Control Codes

Page 5: ECEN 5682 Theory and Practice of Error Control Codes - Block Code Performanceecee.colorado.edu/~mathys/ecen5682/slides/blockperf99.pdf · 2007-03-14 · “Goodness” Criteria for

Block Code PerformancePerformance MeasuresProbability of Undetected ErrorProbability of Decoding Error

Theorem: Let C be a binary linear (n, k) code with weightdistribution {A0,A1, . . . ,An} which is used on a binary symmetricchannel (BSC) with transition probability ε. Then the probabilityof undetected error, Pu(E), is given by

Pu(E) =n∑

w=dmin

Aw εw (1− ε)n−w .

Note that if C has minimum distance dmin, thenA1,A2, . . . ,Admin−1 are all zero.

Proof: Every error pattern that is equal to a codeword cannot bedetected when a linear code is used.

Note: For a q-ary symmetric channel (QSC) with transitionprobabilities as given earlier, this theorem becomes

Pu(E) =n∑

w=dmin

Aw

q − 1

)w

(1− ε)n−w .

Peter Mathys ECEN 5682 Theory and Practice of Error Control Codes

Page 6: ECEN 5682 Theory and Practice of Error Control Codes - Block Code Performanceecee.colorado.edu/~mathys/ecen5682/slides/blockperf99.pdf · 2007-03-14 · “Goodness” Criteria for

Block Code PerformancePerformance MeasuresProbability of Undetected ErrorProbability of Decoding Error

Examples: The weight distributions {Aw} of a few small binarycodes are:• (7, 4, 3) Hamming code:

{A0 = 1, A3 = 7, A4 = 7, A7 = 1} .

• (15, 11, 3) Hamming code:

{A0 = 1, A3 = 35, A4 = 105, A5 = 168, A6 = 280, A7 = 435, A8 = 435,

A9 = 280, A10 = 168, A11 = 105, A12 = 35, A15 = 1} .

• (31, 26, 3) Hamming code:

{A0 = 1, A3 = 155, A4 = 1085, A5 = 5208, A6 = 22568, A7 = 82615, A8 = 247845,

A9 = 628680, A10 = 1383096, A11 = 2648919, A12 = 4414865, A13 = 6440560,

A14 = 8280720, A15 = 9398115, A16 = 9398115, A17 = 8280720, A18 = 6440560,

A19 = 4414865, A20 = 2648919, A21 = 1383096, A22 = 628680, A23 = 247845,

A24 = 82615, A25 = 22568, A26 = 5208, A27 = 1085, A28 = 155, A31 = 1} .

Peter Mathys ECEN 5682 Theory and Practice of Error Control Codes

Page 7: ECEN 5682 Theory and Practice of Error Control Codes - Block Code Performanceecee.colorado.edu/~mathys/ecen5682/slides/blockperf99.pdf · 2007-03-14 · “Goodness” Criteria for

Block Code PerformancePerformance MeasuresProbability of Undetected ErrorProbability of Decoding Error

Examples: (contd.)

• (31, 21, 5) BCH code:

{A0 = 1, A5 = 186, A6 = 806, A7 = 2635, A8 = 7905, A9 = 18910, A10 = 41602,

A11 = 85560, A12 = 142600, A13 = 195300, A14 = 251100, A15 = 301971,

A16 = 301971, A17 = 251100, A18 = 195300, A19 = 142600, A20 = 85560,

A21 = 41602, A22 = 18910, A23 = 7905, A24 = 2635, A25 = 806, A26 = 186,

A31 = 1} .

• (31, 16, 7) BCH code:

{A0 = 1, A7 = 155, A8 = 465, A11 = 5208, A12 = 8680, A15 = 18259,

A16 = 18259, A19 = 8680, A20 = 5208, A23 = 465, A24 = 155, A31 = 1} .

• (31, 11, 11) BCH code:

{A0 = 1, A11 = 186, A12 = 310, A15 = 527, A16 = 527, A19 = 310,

A20 = 186, A31 = 1} .

Peter Mathys ECEN 5682 Theory and Practice of Error Control Codes

Page 8: ECEN 5682 Theory and Practice of Error Control Codes - Block Code Performanceecee.colorado.edu/~mathys/ecen5682/slides/blockperf99.pdf · 2007-03-14 · “Goodness” Criteria for

Block Code PerformancePerformance MeasuresProbability of Undetected ErrorProbability of Decoding Error

The (exact) probability of undetected error for these six codes, when used on a

memoryless BSC with transition probability ε, is shown in the following graph.

−6 −5.5 −5 −4.5 −4 −3.5 −3 −2.5 −2 −1.5 −110

−20

10−18

10−16

10−14

10−12

10−10

10−8

10−6

10−4

10−2

100

log10

(epsilon) for BSC

log 10

Pu(E

)Probability of Undetected Error

(7,4,3) Code(15,11,3) Code(31,26,3) Code(31,21,5) Code(31,16,7) Code(31,11,11) Code

Peter Mathys ECEN 5682 Theory and Practice of Error Control Codes

Page 9: ECEN 5682 Theory and Practice of Error Control Codes - Block Code Performanceecee.colorado.edu/~mathys/ecen5682/slides/blockperf99.pdf · 2007-03-14 · “Goodness” Criteria for

Block Code PerformancePerformance MeasuresProbability of Undetected ErrorProbability of Decoding Error

The upper three curves show that if dmin is fixed and theblocklength n is increased, then the probability of undetected errorPu(E) increases. The lower three curves show that if n is fixed anddmin is increased, then Pu(E) decreases quite rapidly. But notethat the code rate R = k/n, which does not show up explicitly inthe above graph, also needs to be taken into account whendesigning a system that uses error control. A lower code ratemeans in general that either data can be sent less rapidly over agiven channel, or the channel bandwidth needs to be increased.

Definition: Let {A0,A1, . . . ,An} be the weight distribution of alinear (n, k) code C and let {B0,B1, . . . ,Bn} be the weightdistribution of its dual code C⊥. Define the weight distributionpolynomials of C and C⊥ as

A(z) =n∑

w=0

Aw zw and B(z) =n∑

w=0

Bw zw .

Peter Mathys ECEN 5682 Theory and Practice of Error Control Codes

Page 10: ECEN 5682 Theory and Practice of Error Control Codes - Block Code Performanceecee.colorado.edu/~mathys/ecen5682/slides/blockperf99.pdf · 2007-03-14 · “Goodness” Criteria for

Block Code PerformancePerformance MeasuresProbability of Undetected ErrorProbability of Decoding Error

Example: Code #1 with weight distribution {A0=1, A3=2, A4=1} has weight

distribution polynomial A(z) = 1 + 2 z3 + z4.

Theorem: MacWilliams Identity for Binary Codes. The weightdistribution polynomials, A(z) and B(z), of a binary linear (n, k)code C and its dual code C⊥ are related by

A(z) = 2−(n−k) (1 + z)n B

(1− z

1 + z

).

Theorem: MacWilliams Identity for q-ary Codes. The weightdistribution polynomials, A(z) and B(z), of a q-ary linear (n, k)code C and its dual code C⊥ are related by

A(z) = q−(n−k) (1 + (q − 1)z)n B

(1− z

1 + (q − 1)z

).

Proof: See F.J. MacWilliams, “A Theorem on the Distribution of Weights in a

Systematic Code,” Bell Syst. Tech. J., vol. 42, 1963, pp. 79–94.

Peter Mathys ECEN 5682 Theory and Practice of Error Control Codes

Page 11: ECEN 5682 Theory and Practice of Error Control Codes - Block Code Performanceecee.colorado.edu/~mathys/ecen5682/slides/blockperf99.pdf · 2007-03-14 · “Goodness” Criteria for

Block Code PerformancePerformance MeasuresProbability of Undetected ErrorProbability of Decoding Error

Example: Consider the binary (5, 3) code with generator matrix

G =

1 0 1 0 00 1 0 1 01 1 0 0 1

.

Its dual code is code #1, the (5, 2) code with B(z) = 1 + 2 z3 + z4

given in a previous example. Using the MacWilliams identity, onefinds that

A(z) = 2−2 (1 + z)5(

1 + 2(

1−z1+z

)3+

(1−z1+z

)4)

= 14

((1 + z)5 + 2 (1− z)3 (1 + z)2 + (1− z)4 (1 + z)

)= 1 + 2 z2 + 4 z3 + z4 ,

and thus the weight distribution of this (5, 3) code is

{A0 = 1, A2 = 2, A3 = 4, A4 = 1, Ai = 0, i 6= 0, 2, 3, 4} .

Peter Mathys ECEN 5682 Theory and Practice of Error Control Codes

Page 12: ECEN 5682 Theory and Practice of Error Control Codes - Block Code Performanceecee.colorado.edu/~mathys/ecen5682/slides/blockperf99.pdf · 2007-03-14 · “Goodness” Criteria for

Block Code PerformancePerformance MeasuresProbability of Undetected ErrorProbability of Decoding Error

Theorem: In terms of the weight distribution polynomials A(z) (forcode C) and B(z) (for code C⊥), the probability of undetectederror for a linear binary (n, k) code C used on a BSC withtransition probability ε, can be expressed as

Pu(E) = (1− ε)n(A

( ε

1− ε

)− 1

)= 2−(n−k) B(1− 2ε)− (1− ε)n .

Proof: For the first equality note that

Pu(E)=nX

w=dmin

Aw εw (1−ε)n−w=(1−ε)nnX

w=dmin

Aw

` ε

1− ε

´w=(1−ε)n

“A` ε

1− ε

´−1”.

For the second equality use MacWilliams’ identity

A(z) = 2−(n−k)(1 + z)n B(1− z

1 + z

),

for binary (n, k) codes.

Peter Mathys ECEN 5682 Theory and Practice of Error Control Codes

Page 13: ECEN 5682 Theory and Practice of Error Control Codes - Block Code Performanceecee.colorado.edu/~mathys/ecen5682/slides/blockperf99.pdf · 2007-03-14 · “Goodness” Criteria for

Block Code PerformancePerformance MeasuresProbability of Undetected ErrorProbability of Decoding Error

Probability of Decoding Error

Theorem: Let C be any binary code with minimum (Hamming)distance dmin and let t = b(dmin − 1)/2c. Then the probability of a(block) decoding error, PB(E), on a memoryless BSC withtransition probability ε is upper bounded by

PB(E) ≤n∑

w=t+1

(n

w

)εw (1−ε)n−w = 1−

t∑w=0

(n

w

)εw (1− ε)n−w

︸ ︷︷ ︸= PB(C)

.

Proof: Any code with minimum distance dmin can correct all errorpatterns of t = b(dmin − 1)/2c or less (random) errors. QED

Peter Mathys ECEN 5682 Theory and Practice of Error Control Codes

Page 14: ECEN 5682 Theory and Practice of Error Control Codes - Block Code Performanceecee.colorado.edu/~mathys/ecen5682/slides/blockperf99.pdf · 2007-03-14 · “Goodness” Criteria for

Block Code PerformancePerformance MeasuresProbability of Undetected ErrorProbability of Decoding Error

Example: Consider bounded distance decoding of all errorpatterns up to t errors, t = b(dmin − 1)/2c, using binary codeswith the following parameters (7, 4, 3), (15, 11, 3), (31, 26, 3),(31, 21, 5), (31, 16, 7), and (31, 11, 11). Upper bounds on theprobability of decoding error PB(E) when using a BSC withtransition probability ε are given in the graph on the next slide.Note that the first three codes are Hamming codes and since theseare perfect codes, the PB(E) curves are exact rather than bounds.

As was the case for error detection, the upper three curves showthat if dmin is kept fixed and n is increased, then the probability oferror is increased. Conversely, if the blocklength n is kept fixed anddmin is increased, then PB(E) decreases quite rapidly as can beseen from the lower three curves.

Peter Mathys ECEN 5682 Theory and Practice of Error Control Codes

Page 15: ECEN 5682 Theory and Practice of Error Control Codes - Block Code Performanceecee.colorado.edu/~mathys/ecen5682/slides/blockperf99.pdf · 2007-03-14 · “Goodness” Criteria for

Block Code PerformancePerformance MeasuresProbability of Undetected ErrorProbability of Decoding Error

−6 −5.5 −5 −4.5 −4 −3.5 −3 −2.5 −2 −1.5 −110

−12

10−10

10−8

10−6

10−4

10−2

100

log10

(epsilon) for BSC

log 10

PB(E

)

Probability of Decoding Error for Bounded Distance Decoder

(7,4,3) Code(15,11,3) Code(31,26,3) Code(31,21,5) Code(31,16,7) Code(31,11,11) Code

Peter Mathys ECEN 5682 Theory and Practice of Error Control Codes

Page 16: ECEN 5682 Theory and Practice of Error Control Codes - Block Code Performanceecee.colorado.edu/~mathys/ecen5682/slides/blockperf99.pdf · 2007-03-14 · “Goodness” Criteria for

Block Code PerformancePerformance MeasuresProbability of Undetected ErrorProbability of Decoding Error

Note: In most cases a t-error-correcting code can also correctmany patterns of t + 1 or even more errors. A q-ary linear (n, k)code, for example, can correct qn−k − 1 error patterns (includingthose with t or less errors).

The bound on the probability of decoding error given aboveassumes a bounded distance decoder that only corrects up to terrors. If a complete decoder is used, one should in most cases(except for perfect codes) be able to do better. Let X and Y berandom vectors of length n. For any given channel model, let Xdenote the channel input and Y denote the channel output. Aparticular channel model is specified by giving the conditionalprobability mass function (pmf) p

Y|X(y|x). Assume that the code

C = {ci}, i = 0, 1, . . . ,M − 1, is used and the transmission of acodeword from C over the specified channel results in the receivedn-tuple v.

Peter Mathys ECEN 5682 Theory and Practice of Error Control Codes

Page 17: ECEN 5682 Theory and Practice of Error Control Codes - Block Code Performanceecee.colorado.edu/~mathys/ecen5682/slides/blockperf99.pdf · 2007-03-14 · “Goodness” Criteria for

Block Code PerformancePerformance MeasuresProbability of Undetected ErrorProbability of Decoding Error

The decoder then needs to look at the a posteriori probabilities

pX|Y

(ci |v) =

pXY

(civ)

pY

(v)=

pY|X

(v|ci ) pX

(ci )

pY

(v),

for i = 0, 1, . . . ,M − 1.

Definition: For a given code C = {c0, c1, . . . , cM−1}, a priori pmfpX

(c), channel model pY|X

(v|c) and received n-tuple v, a

maximum a posteriori (MAP) decoder outputs estimate c = ci iff iis the index which maximizes the expression

pY|X

(v|ci ) pX

(ci ) .

If there is more than one index that maximizes this expression, oneof the maximizing indexes can be chosen at random without loss ofoptimality.

Peter Mathys ECEN 5682 Theory and Practice of Error Control Codes

Page 18: ECEN 5682 Theory and Practice of Error Control Codes - Block Code Performanceecee.colorado.edu/~mathys/ecen5682/slides/blockperf99.pdf · 2007-03-14 · “Goodness” Criteria for

Block Code PerformancePerformance MeasuresProbability of Undetected ErrorProbability of Decoding Error

Definition: For a given code C = {c0, c1, . . . , cM−1}, channelmodel p

Y|X(v|c) and received n-tuple v, a maximum likelihood

(ML) decoder outputs estimate c = ci iff i is the index whichmaximizes the expression

pY|X

(v|ci ) .

If there is more than one index that maximizes this expression, oneof the maximizing indexes can be chosen at random without loss ofoptimality.

Peter Mathys ECEN 5682 Theory and Practice of Error Control Codes

Page 19: ECEN 5682 Theory and Practice of Error Control Codes - Block Code Performanceecee.colorado.edu/~mathys/ecen5682/slides/blockperf99.pdf · 2007-03-14 · “Goodness” Criteria for

Block Code PerformancePerformance MeasuresProbability of Undetected ErrorProbability of Decoding Error

Note: If an additive error model is used, then the conditionalprobability p

Y|X(v|c) is equal to the probability p

E(v− c) that the

error pattern e = v − c occurs. If the channel model is such thatlower (Hamming) weight error patterns are more likely to occurthan higher weight patterns, then the ML decoder outputs c = ci

iff i is the index that minimizes the (Hamming) distance dH(v, ci ).If there are several indexes that minimize this distance, then one ofthese indexes can be chosen at random without loss of optimality.

Note: If pX

(ci ) = 1/M for all i = 0, 1, . . . ,M − 1 (uniform

distribution of codewords), then the MAP decoder and the MLdecoder are the same.

Peter Mathys ECEN 5682 Theory and Practice of Error Control Codes

Page 20: ECEN 5682 Theory and Practice of Error Control Codes - Block Code Performanceecee.colorado.edu/~mathys/ecen5682/slides/blockperf99.pdf · 2007-03-14 · “Goodness” Criteria for

Block Code PerformancePerformance MeasuresProbability of Undetected ErrorProbability of Decoding Error

For ML decoders an upper bound for the block error probabilityPB(E) can be derived as follows. Define

Pd(E) = P{Decoding error between two codewords distance d apart}.

Then, assuming a linear code with M equally likely codewords, onecan use a union bound (i.e., the probability of a union of events isupper bounded by the sum of the probabilities of the events) towrite

PB(E) ≤M−1∑m=1

Pwm(E) ,

where wm, m = 1, 2, . . . ,M − 1, are the weights of all nonzerocodewords of the code.

Peter Mathys ECEN 5682 Theory and Practice of Error Control Codes

Page 21: ECEN 5682 Theory and Practice of Error Control Codes - Block Code Performanceecee.colorado.edu/~mathys/ecen5682/slides/blockperf99.pdf · 2007-03-14 · “Goodness” Criteria for

Block Code PerformancePerformance MeasuresProbability of Undetected ErrorProbability of Decoding Error

Using the weight distribution {Aw} of the code one can sum overall weights and multiply by the number of codewords with eachweight, rather than sum over all codewords individually, and thus

PB(E) ≤n∑

w=dmin

Aw Pw (E) .

The probability Pd(E) of a decoding error between two codewordsdistance d apart is the probability that an error pattern occurs withd/2 or more errors in the d positions in which the two codewordsdiffer. To be precise in the case when d is an even integer, onlyone half of the cases when exactly d/2 errors occur causes an erroron the average. Thus, one obtains the following upper bound (orexact expression when d is an odd integer) for Pd(E)

Pd(E) ≤d∑

e=dd/2e

(d

e

)εe (1− ε)d−e .

Peter Mathys ECEN 5682 Theory and Practice of Error Control Codes

Page 22: ECEN 5682 Theory and Practice of Error Control Codes - Block Code Performanceecee.colorado.edu/~mathys/ecen5682/slides/blockperf99.pdf · 2007-03-14 · “Goodness” Criteria for

Block Code PerformancePerformance MeasuresProbability of Undetected ErrorProbability of Decoding Error

Substituting this in the union bound above the following theoremis proved.

Theorem: Let C be a binary block code with blocklength n,minimum (Hamming) distance dmin, and weight distribution {Aw}.Then, using a ML decoder, the probability of a (block) decodingerror PB(E) on a memoryless BSC with transition probability ε isupper bounded by

PB(E) ≤n∑

w=dmin

Aw

w∑e=dw/2e

(w

e

)εe (1− ε)w−e .

Peter Mathys ECEN 5682 Theory and Practice of Error Control Codes

Page 23: ECEN 5682 Theory and Practice of Error Control Codes - Block Code Performanceecee.colorado.edu/~mathys/ecen5682/slides/blockperf99.pdf · 2007-03-14 · “Goodness” Criteria for

Block Code PerformancePerformance MeasuresProbability of Undetected ErrorProbability of Decoding Error

A somewhat weaker bound, based on the so called Bhattacharyyadistance between two codewords, which is

dB = −0.5 log(4ε(1− ε))

for the BSC with transition probability ε, is given in the followingtheorem.

Theorem: Let C be a binary block code with blocklength n,minimum (Hamming) distance dmin, and weight distribution {Aw}.Then, using a ML decoder, the probability of a (block) decodingerror PB(E) on a memoryless BSC with transition probability ε isupper bounded by

PB(E) ≤ 1

2

n∑w=dmin

Aw

[4ε (1− ε)

]w/2.

Peter Mathys ECEN 5682 Theory and Practice of Error Control Codes

Page 24: ECEN 5682 Theory and Practice of Error Control Codes - Block Code Performanceecee.colorado.edu/~mathys/ecen5682/slides/blockperf99.pdf · 2007-03-14 · “Goodness” Criteria for

Block Code PerformancePerformance MeasuresProbability of Undetected ErrorProbability of Decoding Error

Proof: The probability Pd(E) of a decoding error between twocodewords (Hamming) distance d apart can be upper bounded asfollows

Pd(E)≤dX

e=dd/2e

d

e

!εe (1− ε)d−e = (1− ε)d

dXe=dd/2e

d

e

! „ε

1− ε

«e

≤ (1− ε)d

„ε

1− ε

«d/2 dXe=dd/2e

d

e

!= εd/2 (1− ε)d/2

dXe=dd/2e

d

e

!| {z }≤ 2d/2

≤ 1

22d εd/2 (1− ε)d/2 =

1

2

ˆ4 ε (1− ε)

˜d/2.

Substituting this in the union bound for PB(E) completes the proofof the theorem. QED

Peter Mathys ECEN 5682 Theory and Practice of Error Control Codes

Page 25: ECEN 5682 Theory and Practice of Error Control Codes - Block Code Performanceecee.colorado.edu/~mathys/ecen5682/slides/blockperf99.pdf · 2007-03-14 · “Goodness” Criteria for

Block Code PerformancePerformance MeasuresProbability of Undetected ErrorProbability of Decoding Error

Suppose now that it is desired to compare the “goodness” of twocodes with different k. The probability of a block error is then notreally the best measure. Rather, one should compare theprobability of a data symbol error Ps(E) or, in the binary case, theprobability of a data bit error Pb(E). Because a block error willaffect between 1 and k data symbols, the probability of a symbolerror can be bounded as

1

kPB(E) ≤ Ps(E) ≤ PB(E) ,

but for large k there is quite a gap between the upper and thelower bounds. Another approach is to extend the concept of theweight distribution of a code so that it also contains informationabout the weight of the data symbols.

Peter Mathys ECEN 5682 Theory and Practice of Error Control Codes

Page 26: ECEN 5682 Theory and Practice of Error Control Codes - Block Code Performanceecee.colorado.edu/~mathys/ecen5682/slides/blockperf99.pdf · 2007-03-14 · “Goodness” Criteria for

Block Code PerformancePerformance MeasuresProbability of Undetected ErrorProbability of Decoding Error

Definition: Let A(w , i) be the number of codewords of a linear(n,k) code with total weight w and data weight i (both usingHamming weight). Then the set {A(w , i)}, w = 0, 1, . . . , n,i = 0, 1, . . . , k, is called the extended weight distribution of thecode.

If {A(w , i)} is known, then it is easy to obtain {Aw} using

Aw =k∑

i=0

A(w , i) , w = 0, 1, . . . , n .

Substituting this expression in the union bound for the probabilityof a block error yields

PB(E) ≤n∑

w=dmin

k∑i=0

A(w , i) Pw (E) .

Peter Mathys ECEN 5682 Theory and Practice of Error Control Codes

Page 27: ECEN 5682 Theory and Practice of Error Control Codes - Block Code Performanceecee.colorado.edu/~mathys/ecen5682/slides/blockperf99.pdf · 2007-03-14 · “Goodness” Criteria for

Block Code PerformancePerformance MeasuresProbability of Undetected ErrorProbability of Decoding Error

To obtain an expression for the probability of a symbol error,multiply A(w , i) by the number i of data symbol errors in theformula above and then divide by k to obtain

Ps(E) ≤ 1

k

n∑w=dmin

k∑i=1

i A(w , i) Pw (E) .

Substituting the expression for Pw (E) on a BSC with transitionprobability ε thus proves the following theorem.

Theorem: Let C be a binary (n, k, dmin) block code with extendedweight distribution {A(w , i)}. Using a ML decoder, the probabilityof a bit error Pb(E) on a memoryless BSC with transitionprobability ε is then upper bounded by

Pb(E) ≤ 1

k

n∑w=dmin

k∑i=1

i A(w , i)w∑

e=dw/2e

(w

e

)εe (1− ε)w−e .

Peter Mathys ECEN 5682 Theory and Practice of Error Control Codes

Page 28: ECEN 5682 Theory and Practice of Error Control Codes - Block Code Performanceecee.colorado.edu/~mathys/ecen5682/slides/blockperf99.pdf · 2007-03-14 · “Goodness” Criteria for

Block Code PerformancePerformance MeasuresProbability of Undetected ErrorProbability of Decoding Error

Example: Bounds on the probability of block error for a binary(7, 4, 3) Hamming code on a memoryless BSC with transitionprobability ε are shown in the graph on the next page.

Clearly, the upper bound on Pu(E) based on dmin is quite a bitweaker than the exact value which uses the weight distribution{Aw} of the code. Because Hamming codes are perfect codes, thevalue of the block error probability PB(E) based on dmin is exactfor both bounded distance and ML decoders. Note that thesimpler bound for PB(E) of a ML decoder which uses theBhattacharyya distance is quite loose, mostly because the (7, 4, 3)code has both even and odd weight codewords.

Peter Mathys ECEN 5682 Theory and Practice of Error Control Codes

Page 29: ECEN 5682 Theory and Practice of Error Control Codes - Block Code Performanceecee.colorado.edu/~mathys/ecen5682/slides/blockperf99.pdf · 2007-03-14 · “Goodness” Criteria for

Block Code PerformancePerformance MeasuresProbability of Undetected ErrorProbability of Decoding Error

−6 −5.5 −5 −4.5 −4 −3.5 −3 −2.5 −2 −1.5 −110

−12

10−10

10−8

10−6

10−4

10−2

100

log10

(epsilon) for BSC

log 10

Pu(E

), lo

g 10 P

B(E

)

Upper Bounds on Pu(E) and P

B(E) for (7,4,3) Code on BSC

Pu(E) from dminPu(E) exact with AwPB(E) from dminPB(E) Union BoundPB(E) Bhattacharyya

Peter Mathys ECEN 5682 Theory and Practice of Error Control Codes

Page 30: ECEN 5682 Theory and Practice of Error Control Codes - Block Code Performanceecee.colorado.edu/~mathys/ecen5682/slides/blockperf99.pdf · 2007-03-14 · “Goodness” Criteria for

Block Code PerformancePerformance MeasuresProbability of Undetected ErrorProbability of Decoding Error

Bounds on the probability of bit error are shown below.

−6 −5.5 −5 −4.5 −4 −3.5 −3 −2.5 −2 −1.5 −110

−12

10−10

10−8

10−6

10−4

10−2

100

log10

(epsilon) for BSC

log 10

Pb(E

)Bounds on Probability of Bit Error for (7,4,3) Code on BSC

Union BoundUpper Bound PB(E)Lower Bound PB(E)/k

Peter Mathys ECEN 5682 Theory and Practice of Error Control Codes

Page 31: ECEN 5682 Theory and Practice of Error Control Codes - Block Code Performanceecee.colorado.edu/~mathys/ecen5682/slides/blockperf99.pdf · 2007-03-14 · “Goodness” Criteria for

Block Code PerformancePerformance MeasuresProbability of Undetected ErrorProbability of Decoding Error

The upper and lower bounds, which use the more complicated butalso more tight bound on PB(E) for ML decoding, are not too farapart in this case because k is rather small.

Example: Bounds for the block and bit error probabilities of abinary (31, 26, 3) Hamming code on a memoryless BSC withtransition probability ε are shown in the next two figures. Similarcomments as for the (7, 4, 3) code apply. Generally, the boundsthat were loose already for the (7, 4, 3) code become even moreloose as the blocklength n is increased (and dmin is kept fixed). Inpart this is due to the fact that Hamming codes are perfect codes,and in part it comes from the increase in the data length k.

Peter Mathys ECEN 5682 Theory and Practice of Error Control Codes

Page 32: ECEN 5682 Theory and Practice of Error Control Codes - Block Code Performanceecee.colorado.edu/~mathys/ecen5682/slides/blockperf99.pdf · 2007-03-14 · “Goodness” Criteria for

Block Code PerformancePerformance MeasuresProbability of Undetected ErrorProbability of Decoding Error

−6 −5.5 −5 −4.5 −4 −3.5 −3 −2.5 −2 −1.5 −110

−12

10−10

10−8

10−6

10−4

10−2

100

log10

(epsilon) for BSC

log 10

Pu(E

), lo

g 10 P

B(E

)

Upper Bounds on Pu(E) and P

B(E) for (31,26,3) Code on BSC

Pu(E) from dminPu(E) exact with AwPB(E) from dminPB(E) Union BoundPB(E) Bhattacharyya

Peter Mathys ECEN 5682 Theory and Practice of Error Control Codes

Page 33: ECEN 5682 Theory and Practice of Error Control Codes - Block Code Performanceecee.colorado.edu/~mathys/ecen5682/slides/blockperf99.pdf · 2007-03-14 · “Goodness” Criteria for

Block Code PerformancePerformance MeasuresProbability of Undetected ErrorProbability of Decoding Error

−6 −5.5 −5 −4.5 −4 −3.5 −3 −2.5 −2 −1.5 −110

−12

10−10

10−8

10−6

10−4

10−2

100

log10

(epsilon) for BSC

log 10

Pb(E

)

Bounds on Probability of Bit Error for (31,26,3) Code on BSC

Union BoundUpper Bound PB(E)Lower Bound PB(E)/k

Peter Mathys ECEN 5682 Theory and Practice of Error Control Codes

Page 34: ECEN 5682 Theory and Practice of Error Control Codes - Block Code Performanceecee.colorado.edu/~mathys/ecen5682/slides/blockperf99.pdf · 2007-03-14 · “Goodness” Criteria for

Block Code PerformancePerformance MeasuresProbability of Undetected ErrorProbability of Decoding Error

Example: Bounds for the block and bit error probabilities of abinary (31, 11, 11) BCH code on a memoryless BSC with transitionprobability ε are shown in the next two graphs.

Because of the larger dmin, the error probabilities at the decoderoutput now decrease much more rapidly as ε decreases. Moreinterestingly, the bound on PB(E) for a ML decoder is now belowthe bound for bounded distance decoding in the main region ofinterest (i.e., PB(E) < 10−4). This is a direct consequence of thefact that the (31, 11, 11) code is not a perfect code. Note that thebound on Pu(E) based on dmin is quite loose and essentiallyuseless.

The upper and lower bounds on the probability of bit error, whichare based on PB(E) for a ML decoder, are not too far apartbecause k is relatively small.

Peter Mathys ECEN 5682 Theory and Practice of Error Control Codes

Page 35: ECEN 5682 Theory and Practice of Error Control Codes - Block Code Performanceecee.colorado.edu/~mathys/ecen5682/slides/blockperf99.pdf · 2007-03-14 · “Goodness” Criteria for

Block Code PerformancePerformance MeasuresProbability of Undetected ErrorProbability of Decoding Error

−6 −5.5 −5 −4.5 −4 −3.5 −3 −2.5 −2 −1.5 −110

−12

10−10

10−8

10−6

10−4

10−2

100

log10

(epsilon) for BSC

log 10

Pu(E

), lo

g 10 P

B(E

)

Upper Bounds on Pu(E) and P

B(E) for (31,11,11) Code on BSC

Pu(E) from dminPu(E) exact with AwPB(E) from dminPB(E) Union BoundPB(E) Bhattacharyya

Peter Mathys ECEN 5682 Theory and Practice of Error Control Codes

Page 36: ECEN 5682 Theory and Practice of Error Control Codes - Block Code Performanceecee.colorado.edu/~mathys/ecen5682/slides/blockperf99.pdf · 2007-03-14 · “Goodness” Criteria for

Block Code PerformancePerformance MeasuresProbability of Undetected ErrorProbability of Decoding Error

−6 −5.5 −5 −4.5 −4 −3.5 −3 −2.5 −2 −1.5 −110

−12

10−10

10−8

10−6

10−4

10−2

100

log10

(epsilon) for BSC

log 10

Pb(E

)

Bounds on Probability of Bit Error for (31,11,11) Code on BSC

Union BoundUpper Bound PB(E)Lower Bound PB(E)/k

Peter Mathys ECEN 5682 Theory and Practice of Error Control Codes

Page 37: ECEN 5682 Theory and Practice of Error Control Codes - Block Code Performanceecee.colorado.edu/~mathys/ecen5682/slides/blockperf99.pdf · 2007-03-14 · “Goodness” Criteria for

Block Code PerformancePerformance MeasuresProbability of Undetected ErrorProbability of Decoding Error

The bounds considered up to now were based on the BSC channelmodel and thus assumed that hard decisions are made by thereceiver before decoding. To get an idea of the performanceimprovements that are possible if the receiver uses soft decisions,consider binary antipodal signaling with message bits m0 → −

√Eb

and m1 → +√

Eb over an additive white Gaussian noise (AWGN)channel with two-sided noise power spectral density (PSD) N0/2.Assume that the receiver uses a matched filter (MF) and that bothEb and N0 are measured at the output of the MF at the optimumsampling time instant at which the SNR Eb/N0 is maximized.

Theorem: The probability ε of an uncoded bit error for binaryantipodal signaling over an AWGN channel with MF receiver anddecision rule m = m0 iff the MF output b < 0 (at the optimumsampling time instant) is given by

ε =1

2erfc

(√Eb

N0

), where erfc(x) =

2√π

∫ ∞

xe−µ2

dµ .

Peter Mathys ECEN 5682 Theory and Practice of Error Control Codes

Page 38: ECEN 5682 Theory and Practice of Error Control Codes - Block Code Performanceecee.colorado.edu/~mathys/ecen5682/slides/blockperf99.pdf · 2007-03-14 · “Goodness” Criteria for

Block Code PerformancePerformance MeasuresProbability of Undetected ErrorProbability of Decoding Error

Proof: The output b of the matched filter at the optimumsampling time instant (which maximizes the SNR Eb/N0) isGaussian with variance σ2

b = N0/2 and mean either −√

Eb or+√

Eb, i.e.,

fb(β|m0) =e−(β+

√Eb)2/N0

√πN0

, or fb(β|m1) =e−(β−

√Eb)2/N0

√πN0

.

Setting the decision threshold at β = 0 yields

P(E|m0)=1√πN0

Z ∞

0

e−(β+√

Eb)2/N0dβ=1√π

Z ∞

√Eb/N0

e−µ2

dµ=1

2erfc“r Eb

N0

”.

A similar computation yields P(E|m1) = P(E|m0) and thus

ε = P(E|m0) P(m0) + P(E|m1) P(m1) =1

2erfc“r Eb

N0

”.

QED

Peter Mathys ECEN 5682 Theory and Practice of Error Control Codes

Page 39: ECEN 5682 Theory and Practice of Error Control Codes - Block Code Performanceecee.colorado.edu/~mathys/ecen5682/slides/blockperf99.pdf · 2007-03-14 · “Goodness” Criteria for

Block Code PerformancePerformance MeasuresProbability of Undetected ErrorProbability of Decoding Error

Now consider the case where message mi is encoded into codewordci = (ci0, ci1, . . . , ci n−1) and then transmitted using antipodalsignaling such that the receiver (after sampling at the output ofthe MF) sees

mi → ci −→ (2ci0−1, 2ci1−1, . . . , 2ci n−1−1)√

Eb .

Thus, if the receiver has to distinguish between mi → ci andmj → cj and d(ci , cj) = d , then this is equivalent to d uncodeddecoding decisions (assuming a memoryless channel). This provesthe following

Theorem: The probability Pd(E) of a decoding error between twocodewords (Hamming) distance d apart for binary antipodalsignaling over an AWGN channel with MF receiver and MLdecision rule is given by

Pd(E) =1

2erfc

(√d Eb

N0

), where erfc(x) =

2√π

∫ ∞

xe−µ2

dµ.

Peter Mathys ECEN 5682 Theory and Practice of Error Control Codes

Page 40: ECEN 5682 Theory and Practice of Error Control Codes - Block Code Performanceecee.colorado.edu/~mathys/ecen5682/slides/blockperf99.pdf · 2007-03-14 · “Goodness” Criteria for

Block Code PerformancePerformance MeasuresProbability of Undetected ErrorProbability of Decoding Error

Combining the union bound with the result for Pd(E) from theprevious page results in the following theorem.

Theorem: Probability of Block Error for Soft Decisions. Let Cbe a linear binary (n, k, dmin) block code with weight distribution{Aw}. Then, using antipodal signaling over an AWGN channel and(soft-decision) ML decoding with a matched filter at the receiver,the probability of a block decoding error PB(E) is upper boundedby

PB(E) ≤ 1

2

n∑w=dmin

Aw erfc(√

w Eb

N0

),

where Eb is the bit energy of the code bits and N0/2 is the noisepower (or noise variance), both at the output of the MF at theoptimum sampling time instant.

Peter Mathys ECEN 5682 Theory and Practice of Error Control Codes

Page 41: ECEN 5682 Theory and Practice of Error Control Codes - Block Code Performanceecee.colorado.edu/~mathys/ecen5682/slides/blockperf99.pdf · 2007-03-14 · “Goodness” Criteria for

Block Code PerformancePerformance MeasuresProbability of Undetected ErrorProbability of Decoding Error

Replacing {Aw} by {A(w , i)} finally yields the following theorem.

Theorem: Probability of Bit Error for Soft Decisions. Let C bea linear binary (n, k, dmin) block code with extended weightdistribution {A(w , i)}. Then, using antipodal signaling over anAWGN channel and (soft-decision) ML decoding with a matchedfilter at the receiver, the probability of a bit decoding error Pb(E)is upper bounded by

Pb(E) ≤ 1

2k

n∑w=dmin

erfc(√

w Eb

N0

) k∑i=1

i A(w , i) ,

where Eb is the bit energy of the code bits and N0/2 is the noisepower (or noise variance), both at the output of the MF at theoptimum sampling time instant.

Peter Mathys ECEN 5682 Theory and Practice of Error Control Codes

Page 42: ECEN 5682 Theory and Practice of Error Control Codes - Block Code Performanceecee.colorado.edu/~mathys/ecen5682/slides/blockperf99.pdf · 2007-03-14 · “Goodness” Criteria for

Block Code PerformancePerformance MeasuresProbability of Undetected ErrorProbability of Decoding Error

Example: Bounds on the probabilities of block error for hard andsoft decisions of the binary (7,4,3) Hamming code and the binary(23,12,7) Golay code are shown on the following two pages. Forthe soft decision error probabilities the SNR Eb/N0 was convertedto ε of a BSC using

ε =1

2erfc

(√Eb

N0

).

For comparison purposes, the probability of undetected error wasalso included in the graphs.

Peter Mathys ECEN 5682 Theory and Practice of Error Control Codes

Page 43: ECEN 5682 Theory and Practice of Error Control Codes - Block Code Performanceecee.colorado.edu/~mathys/ecen5682/slides/blockperf99.pdf · 2007-03-14 · “Goodness” Criteria for

Block Code PerformancePerformance MeasuresProbability of Undetected ErrorProbability of Decoding Error

−4 −3.5 −3 −2.5 −2 −1.5 −110

−12

10−10

10−8

10−6

10−4

10−2

100

Binary (7,4,3) Hamming Code on BSC

log10

(ε)

PB(E

), P

u(E)

PB(E) d

minP

B(E) union

PB(E) Bhattcharyya

PB(E) AWGN soft

Pu(E)

Peter Mathys ECEN 5682 Theory and Practice of Error Control Codes

Page 44: ECEN 5682 Theory and Practice of Error Control Codes - Block Code Performanceecee.colorado.edu/~mathys/ecen5682/slides/blockperf99.pdf · 2007-03-14 · “Goodness” Criteria for

Block Code PerformancePerformance MeasuresProbability of Undetected ErrorProbability of Decoding Error

−4 −3.5 −3 −2.5 −2 −1.5 −110

−25

10−20

10−15

10−10

10−5

100

Binary (23,12,7) Golay Code on BSC

log10

(ε)

PB(E

), P

u(E)

PB(E) d

minP

B(E) union

PB(E) Bhattcharyya

PB(E) AWGN soft

Pu(E)

Peter Mathys ECEN 5682 Theory and Practice of Error Control Codes