chapter 10 error-control coding - website of professor po...

50
1 Chapter 10 Error-Control Coding Error-Control Coding is the platform of Shannon channel coding theorem. © Po-Ning [email protected] Chapter 10-2 10.1 Introduction

Upload: vuongquynh

Post on 17-Apr-2018

259 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: Chapter 10 Error-Control Coding - Website of Professor Po …shannon.cm.nctu.edu.tw/comtheory/chap10-1to10-7.pdf ·  · 2018-01-16Chapter 10 Error-Control Coding Error-Control Coding

1

Chapter 10 Error-Control Coding

Error-Control Coding is the platform of Shannon channel coding theorem.

© Po-Ning [email protected] Chapter 10-2

10.1 Introduction

Page 2: Chapter 10 Error-Control Coding - Website of Professor Po …shannon.cm.nctu.edu.tw/comtheory/chap10-1to10-7.pdf ·  · 2018-01-16Chapter 10 Error-Control Coding Error-Control Coding

2

© Po-Ning [email protected] Chapter 10-3

10.1 Introduction

o Error correction versus error detectionn There is an alternative system approach to achieve

reliable transmission other than forward error correction (FEC).

n By the system structure, it is named automatic-repeat request (ARQ), which is a combination of error detection and noiseless feedback.

© Po-Ning [email protected] Chapter 10-4

10.1 Introduction

o Classifications of ARQn ARQ with stop-and-wait strategy

o After the transmission of a codeword, the transmitter stops and waits for the feedback before moving onto the next block of message bits.

n Continuous ARQ with pullbacko The transmitter continue its transmissions until a retransmission

request is received, at which point it stops and pulls back to the incorrectly transmitted codeword.

n Continuous ARQ with selective repeato Only retransmite the codewords that are incorrectly transmitted.

Page 3: Chapter 10 Error-Control Coding - Website of Professor Po …shannon.cm.nctu.edu.tw/comtheory/chap10-1to10-7.pdf ·  · 2018-01-16Chapter 10 Error-Control Coding Error-Control Coding

3

© Po-Ning [email protected] Chapter 10-5

10.3 Linear block codes

o “10.2 Discrete memoryless channels” has been introduced in Chapter 9, so we omit it.

o Linear coden A code is linear if any two code words in the code can

be added in modulo-2 arithmetic to produce a third code word in the code.

n The codewords of a linear code can always be obtained through a “linear” operation in the sense of modulo-2 arithmetic.

© Po-Ning [email protected] Chapter 10-6

10.3 Linear block codes

o For a linear code, there exists a k-by-n generator matrix Gsuch that

o Generator matrix G is said to be in the canonical form if its k rows are linearly independent.

Page 4: Chapter 10 Error-Control Coding - Website of Professor Po …shannon.cm.nctu.edu.tw/comtheory/chap10-1to10-7.pdf ·  · 2018-01-16Chapter 10 Error-Control Coding Error-Control Coding

4

© Po-Ning [email protected] Chapter 10-7

What will happen if one row is linearly dependent on other rows?

Suppose

Then

© Po-Ning [email protected] Chapter 10-8

Hence, the number of distinct code words is at most 2k-1 (not the anticipated 2k).

Page 5: Chapter 10 Error-Control Coding - Website of Professor Po …shannon.cm.nctu.edu.tw/comtheory/chap10-1to10-7.pdf ·  · 2018-01-16Chapter 10 Error-Control Coding Error-Control Coding

5

© Po-Ning [email protected] Chapter 10-9

10.3 Linear block codes

o Parity-check matrix Hn The parity-check matrix of a canonical generator matrix

is an (n-k)-by-n matrix satisfying

where the columns of H are linearly independent. n Then, the code words (or error-free receptions) should

satisfy (n-k) parity-check equations.

© Po-Ning [email protected] Chapter 10-10

10.3 Linear block codes

o Syndrome sn The receptions may be erroneous (with error pattern e).

n With the help of parity-check matrix, we obtain

Page 6: Chapter 10 Error-Control Coding - Website of Professor Po …shannon.cm.nctu.edu.tw/comtheory/chap10-1to10-7.pdf ·  · 2018-01-16Chapter 10 Error-Control Coding Error-Control Coding

6

© Po-Ning [email protected] Chapter 10-11

10.3 Linear block codes

o In short, syndromes are all possible symptoms that possibly happen at the output of parity-check examination.n Similar to the disease symptoms that can be observed and examined

from outside the body.n Based on the symptoms, the doctors diagnose (possibly) what

disease occurs inside the body. o Based on the symptoms, the receiver “diagnoses” which bit is erroneous

(i.e., ill) based on the symptoms (so that the receiver can correct the “ill” bit.)n Notably, the syndrome only depends on the error pattern, and is

completely independent of the transmitted code word.

© Po-Ning [email protected] Chapter 10-12

10.3 Linear block codes

o Properties of syndromesn Syndrome depends only on the error pattern, and not on

the transmitted code word.

n All error patterns that differ by (at least) a code word have the same syndrome s.

Page 7: Chapter 10 Error-Control Coding - Website of Professor Po …shannon.cm.nctu.edu.tw/comtheory/chap10-1to10-7.pdf ·  · 2018-01-16Chapter 10 Error-Control Coding Error-Control Coding

7

© Po-Ning [email protected] Chapter 10-13

1. All elements in a coset have the same syndrome since

2. There are 2k elements in a coset since

3. Cosets are disjoint.

i.e., coset elements are the same iff two code words are the same.

4. The number of cosets is 2n-k, i.e., the number of syndromes is 2n-k.Thus, syndromes (with only (n-k) unknowns) cannot uniquely determine the error pattern (with n unknowns).

0. It suffices to fix the error pattern e and vary the codewordswhen determining the coset.

© Po-Ning [email protected] Chapter 10-14

10.3 Linear block codes

o Systematic coden A code is systematic if the message bits are a part of the

codewords.n The remaining part of a systematic code is called parity

bits.

n Usually, message bits are transmitted first because the receiver can do “direct hard decision” when “necessary”.

Page 8: Chapter 10 Error-Control Coding - Website of Professor Po …shannon.cm.nctu.edu.tw/comtheory/chap10-1to10-7.pdf ·  · 2018-01-16Chapter 10 Error-Control Coding Error-Control Coding

8

© Po-Ning [email protected] Chapter 10-15

10.3 Linear block codes

o For a systematic code,

n Example 10.1. (n, 1) repetition codes

and

© Po-Ning [email protected] Chapter 10-16

10.3 Linear block codes

o Error correcting capability of a linear block coden Hamming distance (for “0”- “ 1” binary sequences)

n Minimum (pair-wise) Hamming distance dmin

Page 9: Chapter 10 Error-Control Coding - Website of Professor Po …shannon.cm.nctu.edu.tw/comtheory/chap10-1to10-7.pdf ·  · 2018-01-16Chapter 10 Error-Control Coding Error-Control Coding

9

© Po-Ning [email protected] Chapter 10-17

n Operational meaning of the minimum (pair-wise) Hamming distance

There exists at least a pair of codewords, of which the distance is dmin.

n Minimum distance decoder

© Po-Ning [email protected] Chapter 10-18

n Based on the minimum distance decoder, if the received vector and the transmitted codeword differ at most

namely, if the number of 1’s in the (true) error pattern is at most this number, then no error in decoding decision is obtained.

n If the received vector and the transmitted codeworddiffer at t positions, where

then erroneous decision is possibly made (such as when the transmitted codeword is one of the pairs with distance dmin.)

Page 10: Chapter 10 Error-Control Coding - Website of Professor Po …shannon.cm.nctu.edu.tw/comtheory/chap10-1to10-7.pdf ·  · 2018-01-16Chapter 10 Error-Control Coding Error-Control Coding

10

© Po-Ning [email protected] Chapter 10-19

n We therefore name this quantity the error correcting capability of a code (not limited to linear block codes).

n The error correcting capability of a linear block code can be easily determined by the minimum Hamming weight of codewords. (This does not apply for non-linear codes!)

n By linearity,

© Po-Ning [email protected] Chapter 10-20

10.3 Linear block codes

o Syndrome decoding for (n, k) linear block codes

Page 11: Chapter 10 Error-Control Coding - Website of Professor Po …shannon.cm.nctu.edu.tw/comtheory/chap10-1to10-7.pdf ·  · 2018-01-16Chapter 10 Error-Control Coding Error-Control Coding

11

© Po-Ning [email protected] Chapter 10-21

10.3 Linear block codes

syndrome rH

Find the element in coset(rH), whose has the minimum weight.This element is usually named the coset leader.The coset leader in each coset is fixed and known before the reception of r.

o Syndrome decoding using standard array for an (n, k) block code

© Po-Ning [email protected] Chapter 10-22

10.3 Linear block codes

o Example 10.2 (7,4) Hamming codes

Page 12: Chapter 10 Error-Control Coding - Website of Professor Po …shannon.cm.nctu.edu.tw/comtheory/chap10-1to10-7.pdf ·  · 2018-01-16Chapter 10 Error-Control Coding Error-Control Coding

12

© Po-Ning [email protected] Chapter 10-23

10.3 Linear block codes

o Decoding table

© Po-Ning [email protected] Chapter 10-24

10.3 Linear block codes

o Appendix: The notion of perfect coden (7, 4) Hamming code is a binary perfect code.

All of the 27 = 128 binary sequences are confined with the 24 = 16 non-overlapping balls of radius 1,

For (7,4) Hamming code, the coset leaders form a perfect ball (of radius 1).

Page 13: Chapter 10 Error-Control Coding - Website of Professor Po …shannon.cm.nctu.edu.tw/comtheory/chap10-1to10-7.pdf ·  · 2018-01-16Chapter 10 Error-Control Coding Error-Control Coding

13

© Po-Ning [email protected] Chapter 10-25

10.3 Linear block codes

o Dual code

n Every (n, k) linear block code with generator matrix Gand parity-check matrix H has an (n, n-k) dual code with generator matrix H and parity-check matrix G.

© Po-Ning [email protected] Chapter 10-26

10.4 Polynomial codes/Cyclic codes

o Polynomial expression of a linear coden Polynomial code: A special type of linear codes.

o Represent a code [c0, c1, …, cn-1] as a code polynomial of degree n-1

where X is called the indeterminate.

Page 14: Chapter 10 Error-Control Coding - Website of Professor Po …shannon.cm.nctu.edu.tw/comtheory/chap10-1to10-7.pdf ·  · 2018-01-16Chapter 10 Error-Control Coding Error-Control Coding

14

© Po-Ning [email protected] Chapter 10-27

10.4 Polynomial codes/Cyclic codes

n Generator polynomial (of a polynomial code)

n The code polynomial (of a polynomial code) includes all polynomials of degree (n-1), which can be divided by g(X), and hence can be expressed as

o Example of a (6, 3) polynomial code

© Po-Ning [email protected] Chapter 10-28

10.4 Polynomial codes/Cyclic codes

Page 15: Chapter 10 Error-Control Coding - Website of Professor Po …shannon.cm.nctu.edu.tw/comtheory/chap10-1to10-7.pdf ·  · 2018-01-16Chapter 10 Error-Control Coding Error-Control Coding

15

© Po-Ning [email protected] Chapter 10-29

10.4 Polynomial codes/Cyclic codes

o Property of a polynomial code

© Po-Ning [email protected] Chapter 10-30

10.4 Polynomial codes/Cyclic codes

o Example of a (6, 3) polynomial code (Continue)

encode encode

Page 16: Chapter 10 Error-Control Coding - Website of Professor Po …shannon.cm.nctu.edu.tw/comtheory/chap10-1to10-7.pdf ·  · 2018-01-16Chapter 10 Error-Control Coding Error-Control Coding

16

© Po-Ning [email protected] Chapter 10-31

o Encoder for systematic polynomial codes

10.4 Polynomial codes/Cyclic codes

o Example of the usual long division

multiply

© Po-Ning [email protected] Chapter 10-32

Temporary quotientTemporary remainder

Page 17: Chapter 10 Error-Control Coding - Website of Professor Po …shannon.cm.nctu.edu.tw/comtheory/chap10-1to10-7.pdf ·  · 2018-01-16Chapter 10 Error-Control Coding Error-Control Coding

17

multiply

© Po-Ning [email protected] Chapter 10-33

Temporary quotientTemporary remainder

……. repeat this procedure until the last term is shifted into the shift register…..

© Po-Ning [email protected] Chapter 10-34

Page 18: Chapter 10 Error-Control Coding - Website of Professor Po …shannon.cm.nctu.edu.tw/comtheory/chap10-1to10-7.pdf ·  · 2018-01-16Chapter 10 Error-Control Coding Error-Control Coding

18

o An alternative realization of the long division (with the shift register containing not the remainder but the “lower power coefficients”)

© Po-Ning [email protected] Chapter 10-35

© Po-Ning [email protected] Chapter 10-36

Page 19: Chapter 10 Error-Control Coding - Website of Professor Po …shannon.cm.nctu.edu.tw/comtheory/chap10-1to10-7.pdf ·  · 2018-01-16Chapter 10 Error-Control Coding Error-Control Coding

19

© Po-Ning [email protected] Chapter 10-37

On for first k clocks Off for the remaining (n-k) clocks

Down for first k clocks Up for the remaining (n-k) clocks

© Po-Ning [email protected] Chapter 10-38

After k clocks,

Page 20: Chapter 10 Error-Control Coding - Website of Professor Po …shannon.cm.nctu.edu.tw/comtheory/chap10-1to10-7.pdf ·  · 2018-01-16Chapter 10 Error-Control Coding Error-Control Coding

20

© Po-Ning [email protected] Chapter 10-39

10.4 Polynomial codes/Cyclic codes

o Decoder for polynomial codesn How to find the syndrome polynomial s(X) of

polynomial codes with respect to the received word polynomial r(X)?o Recall that syndromes are all symptoms that possibly

happen at the output of parity-check examination. o If there is no error in transmission, r(X) mod g(X) = 0.

Indeed, s(X) = r(X) mod g(X).

© Po-Ning [email protected] Chapter 10-40

10.4 Polynomial codes/Cyclic codes

n Relation of syndrome polynomial s(X), error polynomial e(X) and received vector polynomial r(X) for systematicpolynomial codes.

Page 21: Chapter 10 Error-Control Coding - Website of Professor Po …shannon.cm.nctu.edu.tw/comtheory/chap10-1to10-7.pdf ·  · 2018-01-16Chapter 10 Error-Control Coding Error-Control Coding

21

© Po-Ning [email protected] Chapter 10-41

10.4 Polynomial codes/Cyclic codes

n Relation of syndrome polynomial s(X), error polynomial e(X) and received vector polynomial r(X) for generalpolynomial codes.

© Po-Ning [email protected] Chapter 10-42

10.4 Polynomial codes/Cyclic codes

Syndrome calculator

Page 22: Chapter 10 Error-Control Coding - Website of Professor Po …shannon.cm.nctu.edu.tw/comtheory/chap10-1to10-7.pdf ·  · 2018-01-16Chapter 10 Error-Control Coding Error-Control Coding

22

© Po-Ning [email protected] Chapter 10-43

10.4 Polynomial codes/Cyclic codes

o Example of a (6, 3) polynomial code (Continue)

encode encode

© Po-Ning [email protected] Chapter 10-44

Page 23: Chapter 10 Error-Control Coding - Website of Professor Po …shannon.cm.nctu.edu.tw/comtheory/chap10-1to10-7.pdf ·  · 2018-01-16Chapter 10 Error-Control Coding Error-Control Coding

23

© Po-Ning [email protected] Chapter 10-45

10.4 Polynomial codes/Cyclic codes

o The decoding of a systematic code is to simply add the coset leader, corresponding to the syndrome polynomial, to the received vector polynomial.

© Po-Ning [email protected] Chapter 10-46

10.4 Polynomial codes/Cyclic codes

o Definition of cyclic codesn Cyclic property: Any cyclic shift of a codeword is also

a codeword.n Linearity property: Any sum of two codewords is also

a codeword.

o A cyclic code is also a polynomial code.n See Theorem 5.3 in Shu Lin and Daniel J. Costello, Jr,

Error Control Coding, 2nd edition, Prentice Hall, 1983

Page 24: Chapter 10 Error-Control Coding - Website of Professor Po …shannon.cm.nctu.edu.tw/comtheory/chap10-1to10-7.pdf ·  · 2018-01-16Chapter 10 Error-Control Coding Error-Control Coding

24

© Po-Ning [email protected] Chapter 10-47

10.4 Polynomial codes/Cyclic codes

o A cyclic code is a special type of polynomial codes with g(X) dividing (Xn+1).

o Proof: Suppose c(X) is a (non-zero) code polynomial.

© Po-Ning [email protected] Chapter 10-48

All (n-1) equations must be satisfied, and at least one q(n-1)(X) is non-zero.

A polynomial code is cyclic iff its generator polynomial divides Xn+1.

Page 25: Chapter 10 Error-Control Coding - Website of Professor Po …shannon.cm.nctu.edu.tw/comtheory/chap10-1to10-7.pdf ·  · 2018-01-16Chapter 10 Error-Control Coding Error-Control Coding

25

© Po-Ning [email protected] Chapter 10-49

10.4 Polynomial codes/Cyclic codes

o Parity-check polynomial of cyclic codesn After proving that g(X) must divide Xn+1, we can define

the parity-check polynomial of a cyclic code as

where h(X) is a polynomial of degree k with h0 = hk = 1.n Since the degrees of g(X) and h(X) are respectively n-k

and k-1, and gn-k = hk = 1, we may induce that

© Po-Ning [email protected] Chapter 10-50

10.4 Polynomial codes/Cyclic codes

n Multiplying both sides by a(X) yields:

Page 26: Chapter 10 Error-Control Coding - Website of Professor Po …shannon.cm.nctu.edu.tw/comtheory/chap10-1to10-7.pdf ·  · 2018-01-16Chapter 10 Error-Control Coding Error-Control Coding

26

© Po-Ning [email protected] Chapter 10-51

© Po-Ning [email protected] Chapter 10-52

Page 27: Chapter 10 Error-Control Coding - Website of Professor Po …shannon.cm.nctu.edu.tw/comtheory/chap10-1to10-7.pdf ·  · 2018-01-16Chapter 10 Error-Control Coding Error-Control Coding

27

© Po-Ning [email protected] Chapter 10-53

Observation.

The parity-check matrix arranges its entries according to the coefficients of the parity-check polynomial in reverse order as contrary to the generator matrix arranges its entries according to the coefficients of the generator polynomial.

© Po-Ning [email protected] Chapter 10-54

10.4 Polynomial codes/Cyclic codes

o Remarksn The generator matrix and parity-check matrix derived

previously are not for systematic codes.n We can manipulate these two matrices by adding their

elements of selective rows so as to make them “systematic”.

n Example can be found in Examples 10.3 and 10.4 in the textbook.

Page 28: Chapter 10 Error-Control Coding - Website of Professor Po …shannon.cm.nctu.edu.tw/comtheory/chap10-1to10-7.pdf ·  · 2018-01-16Chapter 10 Error-Control Coding Error-Control Coding

28

© Po-Ning [email protected] Chapter 10-55

10.4 Polynomial codes/Cyclic codes

o Examples 10.3 and 10.4: Hamming code and Maximum-length code

n Irreducible polynomial: A polynomial that cannot be further factored.o All three of the above are irreducible.

n Primitive polynomial: An irreducible polynomial of degree m, which divides Xn + 1 for n = 2m- 1 but does not divides Xn + 1 for n < 2m- 1.o Only the first two irreducible polynomials are

primitive.

© Po-Ning [email protected] Chapter 10-56

10.4 Polynomial codes/Cyclic codes

n Example 10.3 (of cyclic codes): (7, 4, 3) Hamming code o Any cyclic code generated by a primitive polynomial

is a Hamming code of minimum pairwise distance 3.n Example 10.4 (of cyclic codes): (2m - 1, m, 2m-1)

maximum-length codeo The maximum-length code is a dual code of

Hamming codes.o In other words, it is a cyclic code with primitive

parity-check polynomial.o It is a code of minimum distance 2m - 1.

Page 29: Chapter 10 Error-Control Coding - Website of Professor Po …shannon.cm.nctu.edu.tw/comtheory/chap10-1to10-7.pdf ·  · 2018-01-16Chapter 10 Error-Control Coding Error-Control Coding

29

o It is named the maximum-length code because the codeword length for m information bits has been pushed to the maximum (or equivalently, the number of codewords for code of length n has been pushed to the minimum). For example,

© Po-Ning [email protected] Chapter 10-57

So, there are in total 7 code words if c is originally nonzero. Adding the all-zero codeword gives 8 = 23

codewords. This makes the (7, 3) maximum-length code.

o So, the nonzero codeword in a maximum-length code must be a circular shift of any other nonzero codeword.

© Po-Ning [email protected] Chapter 10-58

Page 30: Chapter 10 Error-Control Coding - Website of Professor Po …shannon.cm.nctu.edu.tw/comtheory/chap10-1to10-7.pdf ·  · 2018-01-16Chapter 10 Error-Control Coding Error-Control Coding

30

© Po-Ning [email protected] Chapter 10-59

n Example (of cyclic codes): Cyclic redundancy check (CRC) codeso Cyclic codes are extremely well-suited for error

detection owing to the simplicity of its implementation, and its superior error-detection capability.

o Binary (n, k, dmin) CRC codes can detect:n all contiguous error bursts of length n - k or less.n 2n-k+1-4 of contiguous error bursts of length n-k+1n all combinations of dmin-1 or fewer errorsn all error patterns with an odd number of errors if the

generator polynomial g(X) has an even number of nonzero coefficients.

© Po-Ning [email protected] Chapter 10-60

n Example (of cyclic codes): Bose-Chaudhuri-Hocquenghem (BCH) codes

n A special type of BCH codes: Primitive (n, k, dmin) BCH codes with parameters satisfying

n (n, k, 3) Hamming code can be described as BCH codes.

n The table in the next slide illustrates the generator polynomial g(X) of some binary BCH codes.

Page 31: Chapter 10 Error-Control Coding - Website of Professor Po …shannon.cm.nctu.edu.tw/comtheory/chap10-1to10-7.pdf ·  · 2018-01-16Chapter 10 Error-Control Coding Error-Control Coding

31

© Po-Ning [email protected] Chapter 10-61

n = block lengthk = number of message bitst = number of errors that are guaranteed correctable

© Po-Ning [email protected] Chapter 10-62

10.5 Convolutional codes

o For block codes, the encoding and decoding must perform in a block-by-block basis. Hence, a big buffer for the entire message block and codeword block is required.

o Instead, for the convolutional codes, since the inputs and outputs are governed through a convolution operation of “finite-order” filter, only a buffer of size equal to the filter order is demanded. n “Convolution” is defined based on modulo-2 arithmetic

operations.

Page 32: Chapter 10 Error-Control Coding - Website of Professor Po …shannon.cm.nctu.edu.tw/comtheory/chap10-1to10-7.pdf ·  · 2018-01-16Chapter 10 Error-Control Coding Error-Control Coding

32

© Po-Ning [email protected] Chapter 10-63

10.5 Convolutional codes

Buffer two bits at a time

(n, k, m) = (2, 1, 2) convolutional codeNote that here, n is not the codeword length, k is not the message length, and m is not the minimum distance between codewords. See the next slide for their definitions.

© Po-Ning [email protected] Chapter 10-64

10.5 Convolutional codes

o (n, k, m) convolutional codesn k input bits will produce n output bits.n The most recent m “k-message-bit input blocks” will be

recorded (buffered).n The n output bits will be given by a linear combination of the

buffered input bits.n Constraint length K of a convolutional code

o It is the number of k-message-bit shifts, over which a single k-message-bit block influences the encoder output.

o In other words, the encoder output depends on the current input message block and the previous K - 1 input message blocks.

o Based on the definition, constraint length = m+1.

Page 33: Chapter 10 Error-Control Coding - Website of Professor Po …shannon.cm.nctu.edu.tw/comtheory/chap10-1to10-7.pdf ·  · 2018-01-16Chapter 10 Error-Control Coding Error-Control Coding

33

© Po-Ning [email protected] Chapter 10-65

10.5 Convolutional codes

n Effective code rate of a convolutional codeo In practice, km zeros are often appended at the end of

an information sequence to clear the shift register contents.

o Hence, kL message bits will produce n(L+m) output bits.

o The effective code rate is therefore given by:

o Since L is often much larger than m,n k/n is named the code rate of a convolutional code.

© Po-Ning [email protected] Chapter 10-66

10.5 Convolutional codes

o Polynomial expression of convolutional codesn Example 10.5 (Slide 10-63)

o D is used instead of X because the flip-flop (i.e., one time-unit delay) is often denoted by D.

Page 34: Chapter 10 Error-Control Coding - Website of Professor Po …shannon.cm.nctu.edu.tw/comtheory/chap10-1to10-7.pdf ·  · 2018-01-16Chapter 10 Error-Control Coding Error-Control Coding

34

© Po-Ning [email protected] Chapter 10-67

10.5 Convolutional codes

Buffer two bits at a time

© Po-Ning [email protected] Chapter 10-68

10.5 Convolutional codes

o Graphical expressions of convolutional codesn Code tree

n Code trellis

generate the same “next code symbol”

Page 35: Chapter 10 Error-Control Coding - Website of Professor Po …shannon.cm.nctu.edu.tw/comtheory/chap10-1to10-7.pdf ·  · 2018-01-16Chapter 10 Error-Control Coding Error-Control Coding

35

© Po-Ning [email protected] Chapter 10-69

10.5 Convolutional codes

n Code trellis (continue)

Append two zeros to clear the shift-register contents

Solid line : 0Dashed line : 1

00

10

01

11

© Po-Ning [email protected] Chapter 10-70

10.5 Convolutional codes

n State diagram

Page 36: Chapter 10 Error-Control Coding - Website of Professor Po …shannon.cm.nctu.edu.tw/comtheory/chap10-1to10-7.pdf ·  · 2018-01-16Chapter 10 Error-Control Coding Error-Control Coding

36

© Po-Ning [email protected] Chapter 10-71

10.6 Maximum likelihood decoding of convolutional codes

o Likelihood function (i.e., probability function)

o Maximum-likelihood decoding

o For equal prior probability, ML decoding minimizes the error rate.

© Po-Ning [email protected] Chapter 10-72

10.6 Maximum likelihood decoding of convolutional codes

o Minimum distance decodingn For an additive noise,

Page 37: Chapter 10 Error-Control Coding - Website of Professor Po …shannon.cm.nctu.edu.tw/comtheory/chap10-1to10-7.pdf ·  · 2018-01-16Chapter 10 Error-Control Coding Error-Control Coding

37

n Example (of distance function): AWGN

n Example (of distance function): BSC

© Po-Ning [email protected] Chapter 10-73

10.6 Maximum likelihood decoding of convolutional codes

© Po-Ning [email protected] Chapter 10-74

10.6 Maximum likelihood decoding of convolutional codes

o Viterbi algorithm (for minimum distance decoding over code trellis)n Optimality

One survivor path (solid line) for each intermediate node

2

32

21

22

2

32

Page 38: Chapter 10 Error-Control Coding - Website of Professor Po …shannon.cm.nctu.edu.tw/comtheory/chap10-1to10-7.pdf ·  · 2018-01-16Chapter 10 Error-Control Coding Error-Control Coding

38

© Po-Ning [email protected] Chapter 10-75

Solid line = information 0Dashed line = information 1

Assume that the all-zero sequence is transmitted.

© Po-Ning [email protected] Chapter 10-76

Solid line = information 0Dashed line = information 1

Assume that all-zero sequence is transmitted.

It is possible that the ML codeword or theminimum distance codeword is not equal to the transmitted codeword.

Page 39: Chapter 10 Error-Control Coding - Website of Professor Po …shannon.cm.nctu.edu.tw/comtheory/chap10-1to10-7.pdf ·  · 2018-01-16Chapter 10 Error-Control Coding Error-Control Coding

39

© Po-Ning [email protected] Chapter 10-77

10.6 Maximum likelihood decoding of convolutional codes

o Free distance of convolutional codesn Under binary symmetric channels (BSCs), a

convolutional code with free distance dfree can correct terrors iff dfree is greater than 2t.

n Question: How to determine dfree?n Answer: By signal-flow graph.

© Po-Ning [email protected] Chapter 10-78

State diagram

Page 40: Chapter 10 Error-Control Coding - Website of Professor Po …shannon.cm.nctu.edu.tw/comtheory/chap10-1to10-7.pdf ·  · 2018-01-16Chapter 10 Error-Control Coding Error-Control Coding

40

© Po-Ning [email protected] Chapter 10-79

State diagram

Signal graphExponent of D = Hamming weight on the branchExponent of L = Length of the branch

Input 100 generates a codeword of length 3 (branches) with weight 5.

Input 10100 generates a codewordof length 5 (branches) with weight 6.

Example.

A zero-weight input generates a zero-weight code pattern.

© Po-Ning [email protected] Chapter 10-80© Po-Ning [email protected] Chapter 10-80

Page 41: Chapter 10 Error-Control Coding - Website of Professor Po …shannon.cm.nctu.edu.tw/comtheory/chap10-1to10-7.pdf ·  · 2018-01-16Chapter 10 Error-Control Coding Error-Control Coding

41

© Po-Ning [email protected] Chapter 10-81

© Po-Ning [email protected] Chapter 10-82

10.6 Maximum likelihood decoding of convolutional codes

o Since the distance transfer function T(D, 1) = D5 + 2 D6 + 4 D7 + … enumerates the number of codewords that are a given distance apart, it follows that

o A convolutional code may be subject to catastrophic error propagation.n Catastrophic error propagation = A finite number of

transmission errors may cause infinite number of decoding errors.

n A code with potential catastrophic error propagation is named a catastrophic code.

Page 42: Chapter 10 Error-Control Coding - Website of Professor Po …shannon.cm.nctu.edu.tw/comtheory/chap10-1to10-7.pdf ·  · 2018-01-16Chapter 10 Error-Control Coding Error-Control Coding

42

© Po-Ning [email protected] Chapter 10-83

A zero-weight input generates a zero-weight code pattern.

A non-zero-weight input generates a zero-weight code pattern.

© Po-Ning [email protected] Chapter 10-84

Page 43: Chapter 10 Error-Control Coding - Website of Professor Po …shannon.cm.nctu.edu.tw/comtheory/chap10-1to10-7.pdf ·  · 2018-01-16Chapter 10 Error-Control Coding Error-Control Coding

43

n Alternative definition of catastrophic codes: A code for which an infinite weight input causes a finite weight output o In terms of the state diagram, a catastrophic code will have a

loop corresponding to a nonzero input for which all the output bits are zeros.

n It can be proved that a systematic convolutional code cannot be catastrophic.

n Unfortunately, the free distance of systematic codes is usually smaller than that of nonsystematic codes.

© Po-Ning [email protected] Chapter 10-85

Maximum free distances attainable for convolutional codes of rate 1/2.

© Po-Ning [email protected] Chapter 10-86

10.6 Maximum likelihood decoding of convolutional codeso Asymptotic coding gain

n Hard decision decodingo Section 6.3 (cf. Slide 6-32) has established that for BPSK

transmission, the hard-decision error for each code bit is given by:

o The error of convolutional codes (particularly at high SNR) is dominated by the “two codewords” whose pairwise Hamming distance is equal to dfree.

o Thus, the (code)word error rate (WER) can be analyzed via an equivalent binary symmetric channel (BSC) with crossover probability p.

Page 44: Chapter 10 Error-Control Coding - Website of Professor Po …shannon.cm.nctu.edu.tw/comtheory/chap10-1to10-7.pdf ·  · 2018-01-16Chapter 10 Error-Control Coding Error-Control Coding

44

© Po-Ning [email protected] Chapter 10-87

(cf. the next slide)

© Po-Ning [email protected] Chapter 10-88

For your information, assuming dfree is odd, we derive

Page 45: Chapter 10 Error-Control Coding - Website of Professor Po …shannon.cm.nctu.edu.tw/comtheory/chap10-1to10-7.pdf ·  · 2018-01-16Chapter 10 Error-Control Coding Error-Control Coding

45

n Soft decision decoding (can be analyzed via an equivalentbinary-input additive white Gaussian noise channel)o WER of convolutional codes (particularly at high SNR) is

dominated by the “two codewords” whose pairwise Hamming distance is equal to dfree.

© Po-Ning [email protected] Chapter 10-89

© Po-Ning [email protected] Chapter 10-90

n Based on the decision rule

Page 46: Chapter 10 Error-Control Coding - Website of Professor Po …shannon.cm.nctu.edu.tw/comtheory/chap10-1to10-7.pdf ·  · 2018-01-16Chapter 10 Error-Control Coding Error-Control Coding

46

© Po-Ning [email protected] Chapter 10-91

o Asymptotic coding gain (here, asymptotic = at high SNR) Ga

n The performance gain due to coding (i.e., the performance gain of a coded system against an uncodedsystem)

© Po-Ning [email protected] Chapter 10-92

o Asymptotic coding gain (at high SNR)

Page 47: Chapter 10 Error-Control Coding - Website of Professor Po …shannon.cm.nctu.edu.tw/comtheory/chap10-1to10-7.pdf ·  · 2018-01-16Chapter 10 Error-Control Coding Error-Control Coding

47

© Po-Ning [email protected] Chapter 10-93

o Asymptotic coding gain (at high SNR)

Error(log-scale)

Ga

uncoded

coded

© Po-Ning [email protected] Chapter 10-94

10.7 Trellis-coded modulation

o In the previous section, encoding is performed separately from modulation in the transmitter, and likewise for decoding and detection in the receiver.

o To attain more effective utilization of the available bandwidth and power, coding and modulation have to be treated as a single entity, e.g., trellis-coded modulation. n Instead of selecting codewords from “code bit domain”,

we choose codewords from “signal constellation domain”.

Page 48: Chapter 10 Error-Control Coding - Website of Professor Po …shannon.cm.nctu.edu.tw/comtheory/chap10-1to10-7.pdf ·  · 2018-01-16Chapter 10 Error-Control Coding Error-Control Coding

48

© Po-Ning [email protected] Chapter 10-95

Partitioning of 8-PSK constellation that shows d0 < d1 < d2.

© Po-Ning [email protected] Chapter 10-96

Partitioning of 16-QAM constellation that shows d0 < d1 < d2 < d3.

Page 49: Chapter 10 Error-Control Coding - Website of Professor Po …shannon.cm.nctu.edu.tw/comtheory/chap10-1to10-7.pdf ·  · 2018-01-16Chapter 10 Error-Control Coding Error-Control Coding

49

© Po-Ning [email protected] Chapter 10-97

10.7 Trellis-coded modulation

o Codeword versus code signal

0000001111001111

Select 4 out of 16 possibilities(The bit patterns are dependent temporally so that these bitpatterns exhibit “error correcting capability”.)

Select 4 out of 16 possibilities from QPSK constellation(The signal patterns are dependent temporally so these signal patterns exhibit “error correcting capability”.)

© Po-Ning [email protected] Chapter 10-98

10.7 Trellis-coded modulation

o Trellis codeword versus trellis code signal

n The next code bit is a function of the current trellis state and some number of the previous information bits.

n The next code signal is a function of the current trellis state and some number of the previous information signals.

Page 50: Chapter 10 Error-Control Coding - Website of Professor Po …shannon.cm.nctu.edu.tw/comtheory/chap10-1to10-7.pdf ·  · 2018-01-16Chapter 10 Error-Control Coding Error-Control Coding

50

© Po-Ning [email protected] Chapter 10-99

o Example of trellis-coded modulationn 4-state

Ungerboeck 8-PSK codeo Code rate = 2

bits/symbol00/ 00/00/

10/

01/

11/

© Po-Ning [email protected] Chapter 10-100

o Example of trellis-coded modulationn 8-state Ungerboeck 8-

PSK codeo Code rate = 2

bits/symbol

00/ 00/ 00/

00/

10/