channel coding exercise

Upload: salman-shah

Post on 03-Apr-2018

241 views

Category:

Documents


1 download

TRANSCRIPT

  • 7/28/2019 Channel Coding Exercise

    1/13

    Channel Coding - Exercises 1

    Contents

    1 Parameters of Block Codes I 2

    2 Parameters of Block Codes II 2

    3 Parity Check Code 2

    4 Weight Distribution 3

    5 Hard-Decision Decoding 3

    6 Soft-Decision Decoding 3

    7 ML vs. MAP Decoding 4

    8 Generator Matrix, Parity Check Matrix 5

    9 Cyclic Block Codes I 5

    10 Cyclic Block Codes II 6

    11 Viterbi Decoding with Soft Decision 6

    12 Punctured Convolutional Codes 7

    13 Weight Enumerating Function 7

    14 Concatenated Codes/Log-Likelihood Ratio 7

    15 Group, Field 8

    16 Euclidean Algorithm 9

    17 Prime Field GF(7) 9

    18 RS Code over GF(7) 9

    19 Theorems of the DFT 10

    20 Properties of RS Codes 10

    Information and Coding Theory Lab,

    Faculty of Engineering, University of Kiel, Germany Summer Term 2009

  • 7/28/2019 Channel Coding Exercise

    2/13

    Channel Coding - Exercises 2

    1 Parameters of Block Codes I

    Consider a channel code with parameters (3, 2, 2)2.

    a) How does the set U of info words look like? Determine the length k of a (binary)info word, if there are altogether |U| info words.

    b) How many different block codes with the above parameters do exist? By whichcode rate are they characterized?

    c) Suppose, one of these block codes is selected. How many different encoders doexist?

    2 Parameters of Block Codes IIConsider the channel code C = {[0000], [0011], [1100], [1111]}.

    a) Determine the parameters and the rate of this code.

    b) Are there further codes characterized by the same parameters?

    c) How many errors can be detected by means of the code C and how many errorscan be corrected? Consider the cases of 1, 2, 3 and 4 bit errors.

    3 Parity Check Code

    A binary parity check code shall be constructed according to the following rules:

    a) Three info bits are encoded yielding six code bits.

    b) The first three bits of the code word are equal to the corresponding info bits.

    c) Code bit 4 yields even parity with the first two info bits.

    d) Code bit 5 yields even parity with the last two info bits.

    e) Code bit 6 yields even parity with the first and the last info bit.

    Derive the code table and determine the parameters of the code. Is the code able tocorrect errors?

    Information and Coding Theory Lab,

    Faculty of Engineering, University of Kiel, Germany Summer Term 2009

  • 7/28/2019 Channel Coding Exercise

    3/13

    Channel Coding - Exercises 3

    4 Weight Distribution

    The weight distribution {a0, a1, . . . , an} of a code C with length n provides the number

    aj of code words having a Hamming weight j. Derive the weight distributions for thefollowing codes:

    a) (3, 2, 2)2 single parity check code,

    b) (3, 1, 3)2 repetition code,

    c) Parity check code of exercise 3.

    5 Hard-Decision Decoding

    Consider a transmission over a BSC (binary symmetric channel) characterized by theerror probability PBSC. In this context, the block code of exercise 3 shall be employed.The decoder receives the word y = [011001].

    a) Calculate the Hamming distances between the received word and all valid codewords. Which code word will be selected by the decoder? Determine the corre-sponding info word.

    b) Calculate the probability that y is received if the info word [010] is transmitted.

    c) Calculate the probability that the decoder yields the info word [110] although

    the info word [011] was encoded and transmitted. Assume that a BMD decoder(bounded minimum distance decoder) with maximum decoding radius is used.

    d) In which cases is the decoder not able to detect transmission errors? Calculatethe probability for this event.

    6 Soft-Decision Decoding

    Consider a transmission over an AWGN channel, where a (3, 2, 2)2 single parity checkcode is used. The bits are mapped on 1 according to the following rule:

    0 +1 ,1 1 .

    The demodulator yields real values (soft output) that are passed on to the decoder.Consider a received word [1.3,0.1,0.2] (demodulator output).

    a) Calculate the squared Euclidean distances between the received word and all validcode words. Which (estimated) info word is obtained by means of soft-decisiondecoding?

    Information and Coding Theory Lab,

    Faculty of Engineering, University of Kiel, Germany Summer Term 2009

  • 7/28/2019 Channel Coding Exercise

    4/13

    Channel Coding - Exercises 4

    b) Which received word is passed on to the decoder if the demodulator yields hardoutputs only, i.e., zeros and ones? Calculate the Hamming distances between thereceived word and all valid code words. Which (estimated) info word is obtained

    by means of hard-decision decoding?

    c) Carry out both soft-decision and hard-decision decoding of a received word[1.3,+0.1,0.2]. Is the result surprising, compared to the received word[1.3,0.1,0.2]?

    7 ML vs. MAP Decoding

    Speech data shall be transmitted over a BSC with bit error probability 0.2. For errorprotection the systematic (6, 3, 3)2 parity check code of exercise 3 is employed.

    As the speech encoder does not work ideally, the different info words are not equiprob-able. They occur according to the following distribution:

    u P(u)[000] 0.10[001] 0.05[010] 0.20[011] 0.05

    [100] 0.05[101] 0.10

    [110] 0.35[111] 0.10

    Over the BSC, the decoder receives the word

    y = [100 111].

    a) Perform ML decoding ofy.

    b) Perform MAP decoding ofy.

    c) Under which conditions are ML and MAP decoding equivalent?

    Information and Coding Theory Lab,

    Faculty of Engineering, University of Kiel, Germany Summer Term 2009

  • 7/28/2019 Channel Coding Exercise

    5/13

    Channel Coding - Exercises 5

    8 Generator Matrix, Parity Check Matrix

    The generator matrix of a (n,k,dmin)2 block code consists of k linearly independent

    rows of length n. It is easy to see that the individual rows of the generator matrix arevalid code words themselves (to which info words?). Conversely, a generator matrixcan be constructed from any set ofk linear independent code words.

    In the following, consider the parity check code of exercise 3.

    a) From the code words [001 011], [011 101], [101 110] construct a generator matrixand derive the code table.

    b) How can one find a systematic generator matrix? How does the correspondingcode table look like?

    c) In which way are the code and the encoder altered, if one permutes the rows ofthe generator matrix, and in which way, if one permutes its columns?

    d) Given a systematic generator matrix according to G = [Ik|P], the parity checkmatrix H is determined by H= [PT|Ink]. According to this rule, calculatethe parity check matrix for the given code.

    9 Cyclic Block Codes I

    The (7, 4, 3)2 Hamming code consists of the following code words:

    C0 = { [0000000] , [1000011] ,[0001111] , [1001100] ,[0010110] , [1010101] ,[0011001] , [1011010] ,

    [0100101] , [1100110] ,[0101010] , [1101001] ,[0110011] , [1110000] ,[0111100] , [1111111] } .

    The generator polynomial of the equivalent cyclic code is given by

    g(D) = 1 + D + D3 .

    a) On basis of the code C0 derive a systematic generator matrix Gs.

    b) On basis of the generator polynomial derive a generator matrix Gp.

    c) By permuting the columns ofGs and applying elementary operations to its rows,transform the matrix Gs into Gp.

    d) Encode the info word u = [0111] by means of (a) the generator matrix Gp and(b) the generator polynomial g(D).

    Information and Coding Theory Lab,

    Faculty of Engineering, University of Kiel, Germany Summer Term 2009

  • 7/28/2019 Channel Coding Exercise

    6/13

    Channel Coding - Exercises 6

    10 Cyclic Block Codes II

    The cyclic (7, 4, 3)2 Hamming code is generated by the polynomial

    g(D) = 1 + D + D3.

    In the following, the info word u = [0111] shall first be encoded non-systematicallyand then systematically.

    a) The equation x(D) = u(D) g(D) defines the non-systematic encoding. Calculatethe code word associated with u. How does the corresponding shift-registerrepresentation look like?

    b)* In the case of a systematic cyclic block code, the info bits are typically locatedin the upper bit positions of the code word, i.e., the info word

    u(D) = u0 + u1D + u2D2 + u3D

    3

    is encoded yielding the word

    x(D) = r0 + r1D + r2D2 + u0D

    3 + u1D4 + u2D

    5 + u3D6.

    How can one determine the polynomial r(D) = r0 + r1D + r2D2 ? Calculate

    the code word associated with u. How does the corresponding shift-registerrepresentation look like here?

    11 Viterbi Decoding with Soft Decision

    Consider a transmission over an AWGN channel, where a terminated convolutionalcode with (octal) taps 5 and 7 is used ((5, 7)octal). The info word length is 5 (BPSKmapping 0 +1, 1 1). In the following, soft-decision decoding shall be performedby means of the Viterbi algorithm.

    a) Sketch the trellis diagram of the above code. By which code rate is the codecharacterized?

    b) In which way does one calculate the branch metrics?

    c) Decode the received word

    y = [ 1.2 , 0.4 ,0.3 , 0.2 ,

    0.8 , 1.2 ,0.5 , 0.8 ,1.4 , 1.3 ,0.2 , 0.6 ,1.5 , 0.1 ]

    Information and Coding Theory Lab,

    Faculty of Engineering, University of Kiel, Germany Summer Term 2009

  • 7/28/2019 Channel Coding Exercise

    7/13

    Channel Coding - Exercises 7

    using the Viterbi algorithm. For this purpose first calculate the branch metrics,then carry out the add-compare-select operations and finally perform the trace-back.

    12 Punctured Convolutional Codes

    By means of puncturing according to the pattern

    1 11 0

    , a code of a higher rate shall

    be derived from the convolutional code given by the generator polynomials (5, 7)octal.

    a) How does the trellis diagram look like, if the info word length is 5 and zero tailingis applied? Which code rate does one obtain?

    b) In which way does one calculate the branch metrics for the punctured code, ifsoft-decision decoding shall be applied?

    c) By which free distance dfree is the mother code characterized and by which thepunctured code?

    d) Which asymptotic code gain does result for the mother code and which for thepunctured code when the info word length is 5 (zero tailing applied)? Whichasymptotic code gains do result in the case of an infinite info word length?

    13 Weight Enumerating FunctionFor the convolutional code defined by the generator polynomials (3, 1)octal the weightdistribution shall be derived. For this purpose determine the following items:

    a) Generator polynomials, encoder, and trellis segment

    b) State representation and modified state representation

    c) Weight enumeration function T(wc, wi) and thus the coefficients ad

    14 Concatenated Codes/Log-Likelihood Ratio

    In the following a two-dimensional block code, referred to as product code, shall beconsidered. Such a product code could, for example, be employed in order to encodean image file.The product code regarded here consists of a horizontal and a vertical (3 , 2, 2)2 singleparity check code. The systematic part of the product code is given by four info bitsu11, u12, u21 and u22. The horizontal parity bits are given by p

    1

    , p2 and the vertical

    by p|1, p

    |2

    (see figure).

    Information and Coding Theory Lab,

    Faculty of Engineering, University of Kiel, Germany Summer Term 2009

  • 7/28/2019 Channel Coding Exercise

    8/13

    Channel Coding - Exercises 8

    u u

    u u

    p

    p

    p p

    1211

    21 22

    1

    2

    1 2

    |

    |

    |

    |

    For transmission, BKSK mapping (0 +1, 1 1) is applied and an AWGN channelis assumed.

    a) Compare the distance properties of the product code to those of the componentcodes.

    b) Perform iterative decoding of the product code given the following received sym-

    bols:

    u11 +1.0, u12 +3.0, u21 +1.5, u22 +0.5

    p1 +2.5, p2 0.5

    p|1 +0.5, p

    |2 1.0.

    The received symbols are already LLRs.

    15 Group, Field

    Consider the setsMq = {0, 1, . . . , q 1}

    in connection with the operations

    : addition mod q

    : multiplication mod q

    for q= 6, 7.

    Determine the result tables for the two operations and check whether

    a) (Mq,) are groups (commutative?).

    b) (Mq,)\{0} are groups (commutative?).

    c) (Mq,,) are fields.

    Information and Coding Theory Lab,

    Faculty of Engineering, University of Kiel, Germany Summer Term 2009

  • 7/28/2019 Channel Coding Exercise

    9/13

    Channel Coding - Exercises 9

    16 Euclidean Algorithm

    a) Calculate the greatest common divisor (gcd) of 275 and 80.

    b) Consider the polynomials

    a(x) = x12 + x10 + x7 + x4 + x3 + x2 + x + 1

    b(x) = x11 + x9 + x7 + x6 + x5 + x + 1

    having coefficients in GF(2). Determine the greatest common divisorgcd(a(x), b(x)).

    17 Prime Field GF(7)

    Consider the prime field GF(7).

    a) Determine the order of its elements.

    b) Determine the primitive elements.

    Hint: A smart way of performing modulo calculations is as follows:(a b) c mod q= (a b mod q) c mod q

    18 RS Code over GF(7)As an example, a Reed-Solomon (RS) code over GF(7) was constructed in the lecture,which is able to correct t = 2 symbol errors. The code word length was n = 6.Accordingly, the was chosen to be the primitive element 5 GF(7).

    a) What properties does the RS code have if an element not having maximum orderis chosen for the transformation?

    b) Construct an RS code which is able to correct t = 1 symbol errors but which has- apart from this - the same parameters as the RS code constructed in the lecture.

    Do you obtain a larger or a smaller code rate than in the lecture? Determine thegenerator polynomial g(D).

    c) For the code of 2., encode the info word [4, 3, 2, 1] (i) using the IDFT and (ii)using the generator polynomial g(D).

    Information and Coding Theory Lab,

    Faculty of Engineering, University of Kiel, Germany Summer Term 2009

  • 7/28/2019 Channel Coding Exercise

    10/13

    Channel Coding - Exercises 10

    19 Theorems of the DFT

    Let a(x) A(x) and b(x) B(x). On basis of the definition of the DFT prove the

    following theorems:

    b(x) = xl a(x) Bj = jl Aj (Shift theorem)

    bi = il ai B(x) = x

    l A(x) (Modulation theorem)

    20 Properties of RS Codes

    For the following two tasks the theorems of exercise 19 shall be utilized. As an abbre-viation Fq= GF(q) will be used below.

    a) Prove that RS codes are cyclic codes.

    b) Let the codes Ca and Cb be defined as follows:

    Ca :=a Fqn : a A = [A0, . . . , Ak1, 0, . . . , 0

    nk

    ]

    Cb :=b Fqn : b B = [0, . . . , 0

    nk

    , B0, . . . , Bk1]

    In which way do the two codes differ?

    Information and Coding Theory Lab,

    Faculty of Engineering, University of Kiel, Germany Summer Term 2009

  • 7/28/2019 Channel Coding Exercise

    11/13

    Channel Coding - Exercises 11

    Trellis diagram of the convolutional code with generator polynomials (5, 7)octal.

    00

    00

    00110011 0011

    0011 00110011 0011 0011 00110011 0011 0011 00110011 0011 0011 00110011 0011 0011 0011 0011 0011 00110011 0011 0011

    0011 0011 0011001100110

    11

    00

    Information and Coding Theory Lab,

    Faculty of Engineering, University of Kiel, Germany Summer Term 2009

  • 7/28/2019 Channel Coding Exercise

    12/13

    Channel Coding - Exercises 12

    Trellis diagram of the convolutional code with generator polynomials (5, 7)octal.

    00

    00

    00110011 0011

    0011 00110011 0011 0011 00110011 0011 0011 00110011 0011 0011 00110011 0011 0011 0011 0011 0011 00110011 0011 0011

    0011 0011 0011001100110

    11

    00

    Information and Coding Theory Lab,

    Faculty of Engineering, University of Kiel, Germany Summer Term 2009

  • 7/28/2019 Channel Coding Exercise

    13/13

    Channel Coding - Exercises 13

    Trellis diagram of the convolutional code with generator polynomials (5, 7)octal.

    00

    00

    00110011 0011

    0011 00110011 0011 0011 00110011 0011 0011 00110011 0011 0011 00110011 0011 0011 0011 0011 0011 00110011 0011 0011

    0011 0011 0011001100110

    11

    00

    Information and Coding Theory Lab,

    Faculty of Engineering, University of Kiel, Germany Summer Term 2009