channel coding new

Upload: krunalpatel23

Post on 10-Apr-2018

227 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/8/2019 Channel Coding New

    1/51

    Channel Coding

    To reduce the effect of noise

    Redundancy

    Error detection

    Data word Codeword

    0 00

    1 11

    Invalid code-words : 01 or 10

  • 8/8/2019 Channel Coding New

    2/51

    Hamming Distance

    Words of same length

    Number of different digits

    00 and 11

    Distance : 2

    000 and 111

    Distance : 3

  • 8/8/2019 Channel Coding New

    3/51

    Hamming distance for Error

    detection

    t errors to be detected.

    Hamming distance: t + 1

    Words : 00 and 11

    Hamming distance : 2

    1 error can be detected.

  • 8/8/2019 Channel Coding New

    4/51

    Error correction Coding

    Data word Codeword

    0 000

    1 111

    Majority rule

    1 bit error correction

  • 8/8/2019 Channel Coding New

    5/51

    Rate reduction in coding

    accumulated digitsRate in bits per sec : E

    Accumulation over time : T seconds

    ET bits coded by FT bits

    ET bits sent in t1 seconds

    FT sent in t = ( F/E) t1 seconds

    t/t1 = F/E

  • 8/8/2019 Channel Coding New

    6/51

    Error Probability

    Fraction = 2 ET/ 2 FT

    = 2 (F-E)T

    Pe reduces as T is increased

  • 8/8/2019 Channel Coding New

    7/51

  • 8/8/2019 Channel Coding New

    8/51

    Hamming Bound

    k : Number digits in the

    dataword

    n : Number of digits in the

    codeword

    2 m >= 7 ncj ; j =0 to j = t

    m = n k : Parity or checkdigits

  • 8/8/2019 Channel Coding New

    9/51

    Table for n,k pairst n k

    1 3

    4

    7

    1

    1

    4

    2 10

    15

    4

    8

    3 10

    15

    23

    2

    5

    12

  • 8/8/2019 Channel Coding New

    10/51

    Linear Block Codes

    c = (c1,c2,c3 .cn)

    d = (d1,d2,d3 .dk)

    c1 = d1 ; c2 = d2 ; .. ck= dk

    ck+1 = h11d1 + h12d2 + +h1kdk

    c k+2 = h21d1 + h22d2 + h2kdk

    .

    cn = hm1d1 + hm2d2 + . + hmkdk

  • 8/8/2019 Channel Coding New

    11/51

    Generator Matrix

    c = d G

    1 0 .. 0 h11 h21 .. hm1

    0 1 .. 0 h12 h22 ..hm2

    G = . .

    0 0 .. 1 h1k h2k ..hmk

    Ik(k by k) P( k by m)

  • 8/8/2019 Channel Coding New

    12/51

    -

    !

    011100

    110010

    101001

    )3,6(

    G

    ismatrixgeneratortheCodeaFor

    Data word d Code word c

    111 111000110 110110

    101 101011

    100 100101

    011 011101

    010 010011

    001 001110

    000 000000

  • 8/8/2019 Channel Coding New

    13/51

    ? A

    216;325;31433;22;11

    011100

    110010

    101001

    321

    ddcddcddcdcdcdc

    dddc

    !!! !!!

    -

    !

    The Example

  • 8/8/2019 Channel Coding New

    14/51

    Code word property

    C = dG

    = d [ Ik , P]

    = [ d, dP ]

    PH T =

    Im

    C HT = [dP+dP]

    = 0

    HT

    : n by m

  • 8/8/2019 Channel Coding New

    15/51

    Error Vector

    d : 100

    r : received word 101101

    c : Code word 100101

    e : Error vector 001000

    r = c + e

    c = r + e

  • 8/8/2019 Channel Coding New

    16/51

    Syndrome Vector

    S = r H T

    = ( c + e) H T

    = e H T

    1 by n n by m

    S : 1 by m

  • 8/8/2019 Channel Coding New

    17/51

    Decoding table

    -

    !

    !

    100

    010

    001

    011

    110

    101

    T

    T

    H

    Hes

  • 8/8/2019 Channel Coding New

    18/51

    Decoding Table Continued

    e s

    000000

    100000

    010000

    001000

    000100

    000010000001

    100010

  • 8/8/2019 Channel Coding New

    19/51

    Decoding Table

    e s

    000000 000

    100000 101

    010000 011

    001000 110

    000100 100

    000010 010000001 001

    100010 111

  • 8/8/2019 Channel Coding New

    20/51

    Decoding

    (1)Calculate syndrome by

    S = r HT

    (2) Obtain the error vector by

    using the lookup table

    (3) c = r + e

  • 8/8/2019 Channel Coding New

    21/51

    Algebraic Codes

    k

    kk

    k

    n

    nn

    n

    dxdxdxd

    dddd

    cxcxcxc

    cccc

    !

    !

    !

    !

    2

    2

    1

    1

    21

    2

    2

    1

    1

    ,2,1

    )(

    ),(

    )(

  • 8/8/2019 Channel Coding New

    22/51

    Examples

    246

    3

    )()0010101(

    )()0101(

    4,7

    xxxxc

    c

    xxxd

    d

    kn

    !

    !

    !

    !

    !!

  • 8/8/2019 Channel Coding New

    23/51

    Modulo2 addition

    56

    45

    46

    xx

    xxx

    xxx

  • 8/8/2019 Channel Coding New

    24/51

    Generation of Cyclic Codes

    cg tH nce

    xgxdxc

    xdcalculatedeachFor

    xoffactorkn

    polynomialGeneratorxgFind

    nth

    )()()(

    )()2(1)(

    )()1(

    !

  • 8/8/2019 Channel Coding New

    25/51

    An Example

    1

    .,1,1

    3,4,7

    3

    33

    !!!

    xtryfirstWe

    etcxxxfactorsorderThird

    knkn

  • 8/8/2019 Channel Coding New

    26/51

    Division

    1

    1

    (1)1

    4

    4

    47

    473

    x

    xx

    x

    xx

    xxxx

  • 8/8/2019 Channel Coding New

    27/51

    Trial Division

    1

    1

    23

    7

    xx

    x

  • 8/8/2019 Channel Coding New

    28/51

    The Result

    1

    1

    1

    23

    234

    7

    !

    xx

    xxx

    x

  • 8/8/2019 Channel Coding New

    29/51

    Code generation

    )0100111(

    )1)(()(

    )().()(

    )(

    )0101(

    456

    233

    3

    !

    !

    !

    !

    !

    !

    c

    xxxx

    xxxxxc

    xgxdxc

    xxxd

    d

  • 8/8/2019 Channel Coding New

    30/51

    Systematic cyclic code

    The first k digits of c

    are same as that of k

    )(

    )(

    )(

    )()()(

    xg

    xdx

    ofremainderisx

    xxdxxc

    kn

    kn

    !

    V

    V

  • 8/8/2019 Channel Coding New

    31/51

    Systematic code continued

    )().()()(

    )(

    )(

    )(

    )(

    )()(

    )()(

    )(

    )(

    xgxqxxdx

    xq

    xg

    x

    xg

    xdxxg

    xxq

    xg

    xdx

    kn

    kn

    kn

    !

    !

    !

    V

    V

    V

  • 8/8/2019 Channel Coding New

    32/51

    Decoding

    Every valid code

    polynomial is a

    multiple of g(x)

    Ifthe received wordpolynomial r(x) is not

    a multiple of g(x) an

    error is indicated and

    remainder polynomialis used as syndrome

    )(

    )(Re)(

    xg

    xrofmainderxs !

  • 8/8/2019 Channel Coding New

    33/51

    Error Polynomial

    )(

    )(.Re

    )(

    )()(.Re

    )(

    )(

    .Re)(

    )()()(

    xg

    xeofm

    xg

    xexcofm

    xg

    xr

    ofmxs

    xexcxr

    !

    !

    !

    !

  • 8/8/2019 Channel Coding New

    34/51

    Syndrome-ErrorTable

    For various errors syndrome is calculated

    and stored in the form oftable.

    D

    ecoding steps

    Get s(x) as remainder in dividing r(x) by

    g(x)

    G

    etth

    e error fromth

    eta

    ble Get c = r + e

  • 8/8/2019 Channel Coding New

    35/51

    Cyclic Code Generation

    1)( 12

    2

    1

    1

    xgxgxgxxg knknknkn

    D D D D

    g1g2gn-k-1

    a

    d b

    c

    s1

    s2

    n-k number of flip-flops

    and modulo2 adders Output

  • 8/8/2019 Channel Coding New

    36/51

    An Example

    fl sfliT us

    xxxx

    xxx

    C e

    !!

    !

    !

    !

    33;0

    1

    1.0.1)(

    1)(

    )4,7(

    1

    23

    23

    D1 D2 D3

  • 8/8/2019 Channel Coding New

    37/51

    Verification

    )(

    )()(

    )1()(

    1)(

    )11(

    xg

    xdxdivisionthedowexfindTo

    xx

    xxxdx

    xxd

    d

    kn

    kn

    !

    !

    !

    !

    V

  • 8/8/2019 Channel Coding New

    38/51

    Remainder Calculation

    1

    1

    1()1

    23

    23

    34

    24

    245

    5

    356

    233623

    x

    xx

    xxxxxx

    xx

    xxxx

    xxx

    xxxxxxx

  • 8/8/2019 Channel Coding New

    39/51

    Remainder polynomial

    0111)(

    !

    !

    V

    V xx

  • 8/8/2019 Channel Coding New

    40/51

    D1 D2 D3

    Clock D1 D2 D3

    0 0 0

    1 1 0 02 0 1 0

    3 0 0 1

    4 0 0 1

    5 1 0 1

    6 1 1 1

    7 1 1 0

    D= 1001

  • 8/8/2019 Channel Coding New

    41/51

    Interlaced Coding for Burst errors

    x1 x2 x3 ------- x14 x15

    y1 y2 y3 ------- y14 y15

    z1 z2 z3 ------- z14 z15

    15 , 8 code t= 2

  • 8/8/2019 Channel Coding New

    42/51

    Convolution Coder

    N stage shift register

    V modulo 2 adders

  • 8/8/2019 Channel Coding New

    43/51

    An Example

    S1 S2 S3

    v1 v2

    Datain

    11010

    s1 s2 s3 v1 v2

    0 0 0

    1 0 0 1 1

    1 1 0 0 1

    0 1 1 0 1

    1 0 1 0 00 1 0 1 0

    0 0 1 1 1

    0 0 0 0 0

  • 8/8/2019 Channel Coding New

    44/51

    Number of output digits

    n = (k+N-1).v

    = (5+3-1).2 = 14

  • 8/8/2019 Channel Coding New

    45/51

    Channel coding in GSM

    50 132 78

    50 + 3 132 + 4

    Parity bits Trailing bits

    Convolution Coder

    189 bits

    378bits

    456 bits

  • 8/8/2019 Channel Coding New

    46/51

    0

    1

    00

    11

    00

    11

    10

    01

    a

    b

    c

    d

    00 a

    11 b

    10 c

    01 d

    11 a

    00 b

    01 c

    10 d

    Code Tree

    a

  • 8/8/2019 Channel Coding New

    47/51

    S1 S2 S3

    v1 v2

    Data

    in

    a

    b 01

    c 10

    d 11

    a

    b c

    d

    1111

    00

    10

    10

    0101

    From to

    a a & b

    b c & d

    c a & b

    d c & d

  • 8/8/2019 Channel Coding New

    48/51

    a

    b

    c

    d

    00 00 00

    11

    01

    11 11 11

    10

    10

    0101

    10

    00

    Received Digits : 01 00 01 00

    Paths into node a 00 00 00 HD : 2 Survivor path

    11 10 11 HD : 3

    Paths into node b : 00 00 11 HD : 2 Survivor path

    11 10 10 HD : 3

    Trellis

    Diagram

  • 8/8/2019 Channel Coding New

    49/51

    Error Probability in Un-coded

    system

    FunctionGaussianFor

    xXobabilityxQ

    worddatainbitsofNumberk

    noiseofPSD

    PowerSignalS

    rateBitff

    S

    QkP

    i

    i

    EU

    )(Pr:)(

    :

    :

    :

    :

    )2(.

    "

    !

    !

    L

    LP

    P

  • 8/8/2019 Channel Coding New

    50/51

    Error Probability in coded system

    err rsec rrect blf Nu bert

    w rc eibitsf Nu ber

    QtP

    t

    EC

    :

    :

    2

    1

    1

    !

    P

  • 8/8/2019 Channel Coding New

    51/51

    An Example

    6

    4

    1096.1

    101.1

    1

    12.9

    11

    15

    v!

    v!

    !

    !

    !

    !

    EC

    EU

    P

    P

    t

    k

    n

    P