+ All Categories
Home > Documents > Bai 10_Ma Hoa Kenh_tt [Compatibility Mode]

Bai 10_Ma Hoa Kenh_tt [Compatibility Mode]

Date post: 14-Apr-2018
Category:
Upload: tung-la
View: 218 times
Download: 0 times
Share this document with a friend

of 37

Transcript
  • 7/29/2019 Bai 10_Ma Hoa Kenh_tt [Compatibility Mode]

    1/37

    Principles of Communications

    Faculty of Electronics and Telecommunications

    Ho Chi Minh University of Natural Sciences

    1

    Convolutional codes

    09/2008

  • 7/29/2019 Bai 10_Ma Hoa Kenh_tt [Compatibility Mode]

    2/37

    Introduction In block coding, the encoder accepts k-

    bit message block and generates n-bitcodewordBlock-by-block basis

    2

    block before generating the codeword

    When the message bits come in serially

    rather than in large blocks, using bufferis undesirable

    Convolutional coding

  • 7/29/2019 Bai 10_Ma Hoa Kenh_tt [Compatibility Mode]

    3/37

    Definitions An convolutional encoder: a finite-state machine that

    consists of an M-stage shift register, n modulo-2 adders

    L-bit message sequence produces an output sequencewith n(L+M) bits

    Code rate:

    3

    L>>M, so

    ol)(bits/symb)( MLn

    Lr+

    =

    ol)(bits/symb1

    nr=

  • 7/29/2019 Bai 10_Ma Hoa Kenh_tt [Compatibility Mode]

    4/37

    Definitions

    Constraint length (K): the number ofshifts over which a single message bit

    4

    M-stage shift register: needs M+1 shiftsfor a message to enter the shift register

    and come out K=M+1

  • 7/29/2019 Bai 10_Ma Hoa Kenh_tt [Compatibility Mode]

    5/37

    Example Convolutional code (2,1,2)

    n=2: 2 modulo-2 adders or 2 outputs

    k=1: 1 input

    M=2: 2 stages of shift register (K=M+1=2+1=3)

    5

    Path 2

    OutputInput

  • 7/29/2019 Bai 10_Ma Hoa Kenh_tt [Compatibility Mode]

    6/37

    Example Convolutional code (3,2,1)

    n=3: 3 modulo-2 adders or 3 outputs

    k=2: 2 input

    M=1: 1 stages of each shift register (K=2 each)

    6

    OutputInput

  • 7/29/2019 Bai 10_Ma Hoa Kenh_tt [Compatibility Mode]

    7/37

    Generations Convolutional code is nonsystematiccode

    Each path connecting the output to the input can becharacterized by impulse responseor generator

    polynomial

    denoting the impulse response of the),,,...,()(

    0

    )(

    1

    )(

    2

    )( iiii

    M gggg

    7

    pa Generator polynomial of the ith path:

    D denotes the unit-delay variabledifferent from X of

    cyclic codes A complete convilutional code described by a set of

    polynomials { }

    )(

    0

    )(

    1

    2)(

    2

    )()( ...)( iiiMiMi

    gDgDgDgDg ++++=

    )(),...,(),( )()2()1( DgDgDg n

  • 7/29/2019 Bai 10_Ma Hoa Kenh_tt [Compatibility Mode]

    8/37

    Example(1/8)

    Consider the case of (2,1,2) Impulse response of path 1 is (1,1,1)

    The corresponding generator polynomial is2)1(

    8

    Impulse response of path 2 is (1,0,1)

    The corresponding generator polynomial is

    Message sequence (11001)

    Polynomial representation:

    1)( 2)2( += DDg

    1)( 34 ++= DDDm

  • 7/29/2019 Bai 10_Ma Hoa Kenh_tt [Compatibility Mode]

    9/37

    Example(2/8) Output polynomial of path 1:

    1

    1

    )1)(1(

    )()()(

    236

    2345456

    234

    )1()1(

    ++++=

    ++++++++=

    ++++=

    =

    DDDD

    DDDDDDDD

    DDDD

    DgDmDc

    9

    Output sequence of path 1 (1001111)

    Output polynomial of path 2:

    Output sequence of path 2 (1111101)

    1

    )1)(1(

    )()()(

    23546

    234

    )2()2(

    +++++=

    +++=

    =

    DDDDD

    DDD

    DgDmDc

  • 7/29/2019 Bai 10_Ma Hoa Kenh_tt [Compatibility Mode]

    10/37

    Example(3/8)

    m= (11001) c(1)=(1001111)

    c(2)=(1111101)

    10

    Encoded sequence c=(11,01,01,11,11,10,11) Message length L=5bits

    Output length n(L+K-1)=14bits

    A terminating sequence of K-1=2 zeros isappended to the last input bit for the shiftregister to be restored to its zero initial state

  • 7/29/2019 Bai 10_Ma Hoa Kenh_tt [Compatibility Mode]

    11/37

    Example(4/8) Another way to calculate the output:

    Path 1:

    11001001

    output111m

    11

    11110000

    10110100

    10011001

    11001001

    00110010

    01100100

    c(1)=(1001111)

  • 7/29/2019 Bai 10_Ma Hoa Kenh_tt [Compatibility Mode]

    12/37

    Example(5/8)

    Path 2m 101 output

    001001 1 1

    00100 11 1

    12

    001 001 1 1

    00 100 11 1

    0 010 011 0001 0011 1

    c(2)=(1111101)

  • 7/29/2019 Bai 10_Ma Hoa Kenh_tt [Compatibility Mode]

    13/37

    Example(6/8) Consider the case of (3,2,1)

    13

    denoting the impulseresponse of the jth path corresponding to ith

    input

    Output

    Input

    ),,...,,( )( 0,)(

    1,

    )(

    1,

    )(

    ,

    )( j

    i

    j

    i

    j

    Mi

    j

    Mi

    j

    i ggggg =

  • 7/29/2019 Bai 10_Ma Hoa Kenh_tt [Compatibility Mode]

    14/37

    Example(7/8)

    OutputInput

    14DDgg

    DDgg

    DDgg

    Dgg

    Dgg

    DDgg

    ==

    +==

    ==

    ====

    +==

    )()10(

    1)()11(

    )()10(

    1)()01(

    1)()01(

    1)()11(

    )1(

    1

    )3(

    2

    )1(

    1

    )3(

    1

    )2(

    2

    )2(

    2

    )2(

    1

    )2(

    1

    )1(1)1(2

    )1(

    1

    )1(

    1

  • 7/29/2019 Bai 10_Ma Hoa Kenh_tt [Compatibility Mode]

    15/37

    Example(8/8) Assume that:

    m(1)=(101)m(1)(D)=D2+1

    m(2)=(011)m(1)(D)=D+1 Outputs are:

    c(1)=m(1)*g1(1)+m(2)*g2

    (1)

    15

    = + + + +

    =D3+D2+D+1+D+1=D3+D2c(1)=(1100)

    c(2)=m(1)*g1(2)+m(2)*g2

    (2)

    = (D2+1)(1)+(D+1)(D)

    =D2

    +1+D2

    +D=D+1 c(2)

    =(0011) c(3)=m(1)*g1

    (3)+m(2)*g2(3)

    = (D2+1)(D+1)+(D+1)(D)

    =D3+D2+D+1+D2+D=1=D3+1c(3)=(1001)

    Output c=(101,100,010,011)

  • 7/29/2019 Bai 10_Ma Hoa Kenh_tt [Compatibility Mode]

    16/37

    State diagramstate Binary

    description

    a 00

    b 10

    c 01

    11d

    1/10

    Consider convolutional code (2,1,2)

    16

    4 possible states Each node has 2 incoming

    branches, 2 outgoing branches A transition from on state to

    another in case of input 0 isrepresented by a solid line andof input 1 is represented bydashed line

    Output is labeled over the

    transition line

    00

    10 01

    a

    b c

    0/00

    1/11

    0/10

    1/00

    0/11

  • 7/29/2019 Bai 10_Ma Hoa Kenh_tt [Compatibility Mode]

    17/37

    Example Message 11001

    Start at state a Walk through the

    state diagram in

    10 01

    11

    b

    d

    c

    0/10

    1/01

    1/10

    0/01

    1/00

    17

    message sequence

    00

    a

    0/00

    1/110/11

    00

    a

    10 01 00

    b c a

    State

    Input 1 0 0

    Output

    10

    b

    1

    11

    01

    c

    0

    01

    00

    a

    0

    11 11 10 11

    11

    d

    01

    1

  • 7/29/2019 Bai 10_Ma Hoa Kenh_tt [Compatibility Mode]

    18/37

    Trellis(1/2)

    a=00

    b=10

    0/00 0/00 0/00 0/00 0/00 0/00 0/00 0/00

    18

    c=01

    d=111/10 1/10 1/10 1/10

    Level j=0 1 5432 L-1 L L+1 L+2

  • 7/29/2019 Bai 10_Ma Hoa Kenh_tt [Compatibility Mode]

    19/37

    Trellis(1/2) The trellis contains (L+K) levels

    Labeled as j=0,1,,L,,L+K-1

    The first (K-1) levels correspond to the

    19

    enco er s epar ure rom e n a s a e a The last (K-1) levels correspond to the

    encoders return to state a

    For the level j lies in the range K-1jL, allthe states are reachable

  • 7/29/2019 Bai 10_Ma Hoa Kenh_tt [Compatibility Mode]

    20/37

    Example Message 11001

    a=00

    0/00 0/00 0/00 0/00 0/00 0/00 0/00

    Input 1 1 0 0 1 0 0

    20

    =10

    c=01

    d=111/10 1/10 1/10

    Level j=0 1 5432

    Output

    6 7

    11 01 01 11 11 10 11

  • 7/29/2019 Bai 10_Ma Hoa Kenh_tt [Compatibility Mode]

    21/37

    Maximum Likelihood Decoding

    of Convolutional codes mdenotes a message vector

    cdenotes the corresponding code vector

    rdenotes the received vector

    With a given r, decoder is required to make estimateof messa e vector e uivalentl roduce an estimate

    mc

    21

    of the code vector otherwise, a decoding error

    happens

    Decoding ruleis said to be optimum when the

    propability ofdecoding erroris minimized

    The maximum likelihood decoder or decision rule isdescribed as follows:

    Choose the estimate for which the log-likelihoodfunction logp(r/c)is maximum

    ccmm == ifonly

    c

  • 7/29/2019 Bai 10_Ma Hoa Kenh_tt [Compatibility Mode]

    22/37

    Maximum Likelihood Decoding

    of Convolutional codes Binary symmetric channel: both c and r are binary

    sequences of length N

    ==N

    i

    ii crpcrp1

    )|()|(

    =

    =N

    i

    ii crpcrp1

    )|(log)|(log

    22

    rdiffers from cin dpositions, or dis the Hamming

    distance between rand c

    =

    =

    ii

    ii

    iicr

    cr

    p

    pcrpif

    if1

    )|(with

    )1log(1

    log

    )1log()(log)|(log

    pNp

    pd

    pdNpdcrp

    +

    =

    +=

    k l h d d

  • 7/29/2019 Bai 10_Ma Hoa Kenh_tt [Compatibility Mode]

    23/37

    Maximum Likelihood Decoding

    of Convolutional codes

    Decoding rule is restated as follows: Choose the estimate that minimizes the

    Hamming distance between the received vector r

    c

    23

    The received vector ris compared with eachpossible code vector c, and the one closestto ris chosen as the correct transmitted

    code vector

  • 7/29/2019 Bai 10_Ma Hoa Kenh_tt [Compatibility Mode]

    24/37

    The Viterbi algorithm

    Choose a path in the trellis whosecoded sequence differs from the

    24

    number of positions

  • 7/29/2019 Bai 10_Ma Hoa Kenh_tt [Compatibility Mode]

    25/37

    The Viterbi algorithm

    The algorithm operates by computing ametric for every possible path in the trellis Metric is Hamming distance between coded

    25

    received sequence For each node, two paths enter the node, the

    lower metric is survived. The other isdiscarded

    Computation is repeated every level j in therange K-1jL

    Number of survivors at each level 2K-1=4

  • 7/29/2019 Bai 10_Ma Hoa Kenh_tt [Compatibility Mode]

    26/37

    The Viterbi algorithm c=(11,01,01,11,11,10,11),r=(11,00,01,11,10,10,11)

    a=00 0/00 0/00 0/00 0/00 0/00 0/00 0/00

    Input 11 00 01 11 10 10 11

    2 2 3 2 41 24 325

    26

    b=10

    c=01

    d=111/10 1/10 1/10

    11 01 01 11 11 10 11

    0 4

    1

    1

    3 2

    6

    1

    4 3

    32

    4 3

    4 3

    24

    2 5

    43

    25

    Code

    Output 1 1 0 0 1 0 0

  • 7/29/2019 Bai 10_Ma Hoa Kenh_tt [Compatibility Mode]

    27/37

    Free distance of a conv. code Performance of a conv. code depends on

    decoding algorithm and distance properties ofthe code.

    Free distance, denoted by dfree, is a measure of

    27

    Free distance: minimum Hamming distancebetween any two codewords in the code

    dfree>2t

    Since a convolutional code doesn't use blocks,processing instead a continuous bitstream, thevalue oftapplies to a quantity of errors located

    relatively near to each other

  • 7/29/2019 Bai 10_Ma Hoa Kenh_tt [Compatibility Mode]

    28/37

    Free distance of a conv. code Conv. code has linear property

    So, free distance also defined:

    ....000)]([ min =

    XXwdfree

    28

    ufree

    y r u

    Generating function viewed the transferfunction of encoder

    Relating input and output by convolution

    Generation func relating initial and final stateby multiplication Free distance

    Decoding error probability

  • 7/29/2019 Bai 10_Ma Hoa Kenh_tt [Compatibility Mode]

    29/37

    Free distance of a conv. code Modify state diagram

    11d

    1/10

    d

    DL

    29

    00

    10 01

    a

    b c

    0/00

    1/11

    0/10

    1 01 0/01

    1/00

    0/11

    a0 b c a1

    D2L

    DL DD

    L

    D2

    Signal-flow graph

    Exponent of D: Hamming weight of encoderoutput on that branch.

    Exponent of L: number of nonzero messagebits

  • 7/29/2019 Bai 10_Ma Hoa Kenh_tt [Compatibility Mode]

    30/37

    Free distance of a conv. code State equations:

    cDa

    DLdDLbd

    DdDbc

    LcLaDb

    2

    1

    0

    2

    =

    +=

    +=

    +=

    DL

    30

    d

    a0

    b c a1

    D2L

    DL D

    D

    L

    D2

    a0,b,c,d,a1: node signals of the graphSolve the equation set for a1/a0. Sothe generating func is:

    =

    =

    ==0

    55

    0

    1 )2(21

    ),(i

    iDLLD

    DL

    LD

    a

    aLDT

    4

    5

    537265 2...42),(

    =

    =+++=d

    d

    dd LDLDLDLDLDT

  • 7/29/2019 Bai 10_Ma Hoa Kenh_tt [Compatibility Mode]

    31/37

    Free distance of a conv. code

    T(D,L) represents all possible transmittedsequences that terminate with c-e

    4

    5

    5372652...42),(

    =

    =+++= dd

    ddLDLDLDLDLDT

    31

    r

    For any d5, there are 2d-5 paths withweight w(X)=dthat terminate with c-etransition, those paths are generated bymessages containing d-4 nonzero bits

    The free distance is the smallest of w(X),

    so dfree=5

  • 7/29/2019 Bai 10_Ma Hoa Kenh_tt [Compatibility Mode]

    32/37

    Systematic conv. code The message elements appear explicitly in the

    output sequence together with the redundantelements

    32

    Path 2

    OutputInput

  • 7/29/2019 Bai 10_Ma Hoa Kenh_tt [Compatibility Mode]

    33/37

    Systematic conv. code

    Impulse response of path 1 is (1,0,0) The corresponding generator polynomial is

    2)1()( DDg =

    33

    Impulse response of path 2 is (1,0,1) The corresponding generator polynomial is

    Message sequence (11001)

    1)( 2)2( += DDg

  • 7/29/2019 Bai 10_Ma Hoa Kenh_tt [Compatibility Mode]

    34/37

    Systematic conv. code

    Output sequence of path 1 (1100100) Output sequence of path 2 (1111101)

    34

    c(1)=(1100100)

    c(2)=(1111101)

    Encoded sequencec=(11,11,01,01,11,00,01)

  • 7/29/2019 Bai 10_Ma Hoa Kenh_tt [Compatibility Mode]

    35/37

    Systematic conv. code

    Another example of systemmatic conv.code

    35

    Path 2

    OutputInput

  • 7/29/2019 Bai 10_Ma Hoa Kenh_tt [Compatibility Mode]

    36/37

    Systematic vs nonsystematic

    Assumption: T(D,L) is convergent

    When T(D,L) is nonconvergent, an finite number

    4

    5

    537265 2...42),(

    =

    =+++= dd

    dd LDLDLDLDLDT

    36

    of transmission errors can cause an infinitenumber of decoding errors

    The code is called catastrophic code

    Systematic conv. code cannot be catastrophic

    But, for the same constraint length, free distanceof systematic code is smaller than that ofnonsystematic code

    Table 10.8

  • 7/29/2019 Bai 10_Ma Hoa Kenh_tt [Compatibility Mode]

    37/37

    Systematic vs nonsystematic Maximum free distance with systematic and

    nonsystematic conv codes of rate 1/2

    K Systematic Nonsystematic

    2 3 3

    37

    3 4 5

    4 4 6

    5 5 7

    6 6 8

    7 6 10

    8 7 10


Recommended