Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Channel Coding (II) Cyclic Codes and Convolutional Codes.

Similar presentations


Presentation on theme: "1 Channel Coding (II) Cyclic Codes and Convolutional Codes."— Presentation transcript:

1 1 Channel Coding (II) Cyclic Codes and Convolutional Codes

2 ECED4504 2 of 20 Topics today u Cyclic codes –presenting codes: code polynomials –systematic and non-systematic codes –generating codes: generator polynomials –encoding/decoding circuits realized by shift registers u Convolutional codes –presenting codes t convolutional encoder t code trees and state diagram t generator sequences

3 ECED4504 3 of 20 Defining cyclic codes: code polynomial u An (n,k) linear code X is called a cyclic code when every cyclic shift of a code X, as for instance X’, is also a code, e.g. u Each cyclic code has the associated code vector with the polynomial u Note that the (n,k) code vector has the polynomial of degree of n-1 or less. Mapping between code vector and code polynomial is one-to-one, e.g. they specify the same code uniquely u Manipulation of the associated polynomial is done in a Galois field (for instance GF(2)) having elements {0,1}, where operations are performed mod-2 u For each cyclic code, there exist only one generator polynomial whose degree equals the number of check bits in the encoded word

4 ECED4504 4 of 20 The common factor of cyclic codes u GF(2) operations (XOR and AND): u Cyclic codes have a common factor p n +1. In order to see this we consider summing two (unity shifted) cyclic code vectors: u Question is how to make the cyclic code from the multiplied code? Adding the last two equations together reveals the common factor: Right rotated Right shifted by multiplication Unshifted

5 ECED4504 5 of 20 Factoring cyclic code generator polynomial u Any factor of p n +1 (Note: decompose it into factors) with the degree q=n-k generates an (n,k) cyclic code u Example: Consider the polynomial p 7 +1. This can be factored as u For instance the factors 1+p+p 3 or 1+p 2 +p 3, can be used to generate an unique cyclic code. For a message polynomial 1+p 2 (I.e. 110), the following encoded word is generated: and the respective code vector (of degree n-1, n=7, in this case) is

6 ECED4504 6 of 20 Obtaining a cyclic code from another cyclic code u Therefore unity cyclic shift is obtained by (1) multiplication by p where after (2) division by the common factor yields a cyclic code and by induction, any cyclic shift is obtained by u Example: right shift 101 u (n=3) u Important point is that division by mod p n +1 and multiplication by the generator polynomial is enabled by tapped shift register. not a three-bit code, divide by the common factor

7 ECED4504 7 of 20 Using shift registers for multiplication u Figure shows a shift register to realize multiplication by 1+p 2 +p 3 u In practice, multiplication can be realized by two equivalent topologies:

8 ECED4504 8 of 20 Example: multiplication by using a shift register determined by the tapped connections word to be encoded adding dashed line would enable division by 1+p n Encoded word

9 ECED4504 9 of 20 Examples of cyclic code generator polynomials u The generator polynomial for a (n,k) cyclic code is defined by and G(p) is a factor of p n +1. Any factor of p n +1 that has the degree q may serve as the generator polynomial. We noticed that a code is generated by the multiplication where M(p) is a block of k message bits. Hence this gives a criterion to select the generator polynomial, e.g. it must be a factor of p n +1. u Only few of the possible generating polynomials yield high quality codes (in terms of their minimum Hamming distance) Some cyclic codes:

10 ECED4504 10 of 20 Systematic cyclic codes u Define the length q=n-k check vector C and the length-k message vector M by u Thus the systematic n:th degree codeword polynomial is Check bits determined by: check bits message bits

11 ECED4504 11 of 20 Determining check-bits u Prove that the check-bits can be calculated from the message bits M(p) by checkmessage Example: (7,4) Cyclic code: must be a systematic code based on its definition (previous slide)

12 ECED4504 12 of 20 Example: Encoding of systematic cyclic codes

13 ECED4504 13 of 20 Decoding cyclic codes u Every valid, received code word R(p) must be a multiple of G(p), otherwise an error has occurred. (Assume that the probability for noise to convert code words to other code words is very small.) u Therefore dividing the R(p)/G(p) and considering the remainder as a syndrome can reveal if the error has happened and sometimes also to reveal in which bit (depending on code strength) u The error syndrome of n-k-1 degree is therefore u This can be expressed also in terms of error E(p) and the code word X(p) error syndrome S(p) is:

14 ECED4504 14 of 20 Decoding cyclic codes: example Using denotation of this example:

15 ECED4504 15 of 20 Table 16.6 Decoding cyclic codes (cont.) msg code error error syndrome

16 ECED4504 16 of 20 Part II. Convolutional coding u Block codes are memoryless u Convolution codes have memory that utilizes previous bits to encode or decode following bits u Convolutional codes are specified by n, k and constraint length that is the maximum number of information symbols upon which the symbol may depend u Thus they are denoted by (n,k,L), where L is the code memory depth u Convolutional codes are commonly used in applications that require relatively good performance with low implementation cost u Convolutional codes are encoded by circuits based on shift registers and decoded by several methods as t Viterbi decoding that is a maximum likelihood method t Sequential decoding (performance depends on decoder complexity) t Feedback decoding (simplified hardware, lower performance)

17 ECED4504 17 of 20 Example: convolutional encoder u Convolutional encoder is a finite state machine processing information bits in a serial manner u Thus the generated code word is a function of input and the state of the machine at that time instant u In this (n,k,L)=(2,1,2) encoder, each message bit influences a span of n(L+1)=6 successive output bits that is the code constraint length u Thus (n,k,L) convolutional code is produced that is a 2 n(L-1) state finite- state machine (n,k,L) = (2,1,2) encoder

18 ECED4504 18 of 20 (3,2,1) Convolutional encoder Here each message bit influences a span of n(L+1)=3(1+1)=6 successive output bits

19 ECED4504 19 of 20 Tells how one input bit is transformed into two output bits (initially register is all zero) Representing convolutional code: code tree

20 ECED4504 20 of 20 Representing convolutional codes compactly: code trellis and state diagram Shift register states Input state ‘1’ indicated by dashed line


Download ppt "1 Channel Coding (II) Cyclic Codes and Convolutional Codes."

Similar presentations


Ads by Google