Pres_5July_9871 (Hiram-PC's Conflicted Copy 2011-08-05)

  • Upload
    sgjhr

  • View
    214

  • Download
    0

Embed Size (px)

Citation preview

  • 8/3/2019 Pres_5July_9871 (Hiram-PC's Conflicted Copy 2011-08-05)

    1/13

    1

    ERROR DETECTION and CORRECTION

    Cyclic Codes (contd)

    Syndrome Computation and Error Detection

    Cyclic Codes are Linear Block Codes 0 1 1( ... )nv v v vReceived Word

    Syndrome T

    s vH

    We know that T

    cH 0

    So, if T

    s = vH 0 v is a codeword

    Cyclic Codes: 1

    0 1 1( ) ...n

    nv X v v X v X

    Received Polynomial

    Syndrome ( ) ( ) ( ) ( )v X a X g X s X

    degree r=n-kdegree n-1 degree r-1

    The r= n-kcoefficients form the syndrome.

    ( ) 0s X if and only if is a code polynomial

    (a multiple of g(X)).

    ( )v X

  • 8/3/2019 Pres_5July_9871 (Hiram-PC's Conflicted Copy 2011-08-05)

    2/13

    2

    ERROR DETECTION and CORRECTION

    Cyclic Codes (contd)

    Syndrome Computation and Error Detection (contd)( )s X

    It can be computed with a division circuit, which is identical to the (n-k)-stageencoding circuit, except that the received polynomial is shifted into the registerfrom the left end.

    The received polynomial is shifted into the register with all stages initially set to zero.As soon as v(X) has been shifted into the register, the content in the register form thesyndrome s(X).

    is the remainder of the division v(X) :g(X).

  • 8/3/2019 Pres_5July_9871 (Hiram-PC's Conflicted Copy 2011-08-05)

    3/13

    3

    ERROR DETECTION and CORRECTION

    Cyclic Codes (contd)

    Syndrome Computation and Error Detection (contd)Property of the Syndrome for Cyclic Codes

    Let s(X) be the syndrome of a received polynomial v(X).The remainder s(1)(X) resulting from dividing Xs(X) by the generator polynomialg(X) is the syndrome of v(1)(X), which is a cyclic shift of v(X)(For proof: see the definition of the syndrome).

    The syndrome s(1)(X) of v(1)(X) can be obtained by shifting the register (syndrome)once, with s(X) as the initial content and with the input gate disabled.This is equivalent with dividing Xs(X) by g(X).

    In general, the remainder s(i)

    (X) resulting from dividing Xi

    s(X) by the generatorpolynomial g(X) is the syndrome of v(i)(X), which is a cyclic shift of v(X).This property is useful in decoding cyclic codes.

    The syndrome s(i)(X) of v(i)(X) can be obtained by shifting the register (syndrome)itimes, with s(X) as the initial content and with the input gate disabled.This is equivalent with dividing Xis(X) by g(X).

  • 8/3/2019 Pres_5July_9871 (Hiram-PC's Conflicted Copy 2011-08-05)

    4/13

    4

    ERROR DETECTION and CORRECTION

    Cyclic Codes (contd)

    Syndrome Computation and Error Detection (contd)Property of the Syndrome for Cyclic Codes (contd)

    Example: Find the syndrome circuit for the (7,4) cyclic code generated by

    . Suppose that the received vector is

    .Calculate the syndrome and compare it with the contents of the shift

    register after the 7th shift. Show the contains of the shift register with

    the input gate disabled and comment on the result.

    3( ) 1g X X X

    (0010110)v

    (0010110)v

    2 4 5

    ( )v X X X X

    The remainder of v(X) : g(X) is , and so, the

    syndrome is , or .

    2 1X 2( ) 1s X X [101]s

    For the content of the shift register, see the next table,

    which is related to the syndrome circuit.

  • 8/3/2019 Pres_5July_9871 (Hiram-PC's Conflicted Copy 2011-08-05)

    5/13

    5

    With the input gate disabled, the syndrome of is obtained by shifting

    the register once, the syndrome of is obtained if we shift the

    register twice, and so on.

    (1)( ) (0001011)v X (2 )

    ( ) (1000101)v X

    ERROR DETECTION and CORRECTION

  • 8/3/2019 Pres_5July_9871 (Hiram-PC's Conflicted Copy 2011-08-05)

    6/13

    6

    ERROR DETECTION and CORRECTION

    Cyclic Codes (contd)

    Syndrome Computation and Error Detection (contd)

    Let be the transmitted code polynomial, and( )c X

    Then, the received polynomial is ( ) ( ) ( )v X c X e X

    As ( ) ( ) ( )c X m X g X and ( ) ( ) ( ) ( )v X a X g X s X

    ( ) [ ( ) ( )] ( ) ( )e X m X a X g X s X

    The syndrome is equal to the remainder of dividing the error pattern by

    the generator polynomial.

    However, the error pattern is not known at the decoder.

    The syndrome is computed based on the received vector, and thedecoder has to estimate the error pattern e(X) based on the syndrome.

    10 1 1( ) ...

    nne X e e X e X

    let be the error pattern.

  • 8/3/2019 Pres_5July_9871 (Hiram-PC's Conflicted Copy 2011-08-05)

    7/13

    7

    ERROR DETECTION and CORRECTION

    Cyclic Codes (contd)

    Syndrome Computation and Error Detection (contd)Remark: One can notice that if and only if( ) 0s X

    ( ) 0e X

    or

    ( ) ( )e X c X (the error pattern is a codeword)

    For the latter, the error pattern is undetectable !

    Remark: The error detection circuit is simply a syndrome circuit with an

    OR gate whose inputs are the syndrome digits.If the syndrome is non-zero, the output of the OR gate is 1, and thepresence of errors has been detected.

    CYCLIC CODES ARE VERY EFFECTIVE FOR DETECTING ERRORS,RANDOM OR BURST !

  • 8/3/2019 Pres_5July_9871 (Hiram-PC's Conflicted Copy 2011-08-05)

    8/13

    8

    ERROR DETECTION and CORRECTION

    Cyclic Codes (contd)

    Burst Error Patterns

    Definition: An error pattern with errors confined to ihigh-order positions and l-ilow-order positions is also regarded as a burst of length l.This is called an end-around burst.

    Example:3 7( )e X X X has the burst length b=7-3+1=5.

    By definition, there can be only one burst in a block.

    Example:3 7 19 20( )e X X X X X

    has the burst length b=20-3+1=18, and not two bursts of length 5 and 2.

    Definition:

    The burst length of an error polynomial e(X) is defined as the number of bitsfrom the first error term in e(X) to the last error term, inclusive.

    Example: ( 0000000101 1 0)11e is an end-around burst of length 7.

  • 8/3/2019 Pres_5July_9871 (Hiram-PC's Conflicted Copy 2011-08-05)

    9/13

    9

    ERROR DETECTION and CORRECTION

    Cyclic Codes (contd)

    Error Detection Capability

    CASE 1: Suppose that e(X) is a burst of length r= n-kor less.

    ( ) ( )je X X B X

    degree n-k-1

    ( ) is not a factor of ( )g X B X

    Also is not a factor of ( ), as ( ) divides 1

    nX g X g X X

    ( ) ( ) is not divisible by ( )j

    e X X B X g X

    or, equivalently, the syndrome caused by e(X) is not equal to zero.

    The (n,k) cyclic code is capable of detecting any error burst of

    length r= n-kor less.

    Because degree{ ( )} degree{ ( )}B X g X

  • 8/3/2019 Pres_5July_9871 (Hiram-PC's Conflicted Copy 2011-08-05)

    10/13

    10

    ERROR DETECTION and CORRECTION

    Cyclic Codes (contd)

    Error Detection Capability (contd)

    CASE 2: Suppose that e(X) is a burst of length r+1 = n-k+1, and let it startfrom the ith position. Thus, it ends at the (i+n-k)th position.

    Errors are confined to , with1, ,...,i i i n k e e e 1i i n k e e

    There are such bursts (the error bits in the first and lastpositions are 1, and only the n-k+1-2 positions can take any value,i.e., either 0 or 1).

    12n k

    Among these, only one cannot be detected (zero syndrome), i.e.,

    ( ) ( )ie X X g X

    The fraction of undetectable bursts of length n k+1 is

    ( 1)

    1

    12

    2

    n k

    n k

  • 8/3/2019 Pres_5July_9871 (Hiram-PC's Conflicted Copy 2011-08-05)

    11/13

    11

    ERROR DETECTION and CORRECTION

    Cyclic Codes (contd)

    Error Detection Capability (contd)

    CASE 3: Suppose that e(X) is a burst of length l > n k +1 or (r+ 1).

    Among these, the undetectable ones (zero syndrome) must be of the form,

    ( ) ( ) ( )ie X X a X g X

    The fraction of undetectable burst errors of length l is( ) 2

    ( )

    2

    2

    22

    l n kn k

    l

    There are such bursts (the bits in the first and last positions are1, and only the l-2 positions can take any value, i.e., either 0 or 1).

    22

    l

    degree l-1 degree=n-k( ) 1

    0 1 ( ) 1( ) ...l n k

    l n ka X a a X a X

    0 ( ) 11, 1l n ka a

    The number of such bursts is .( ) 22l n k

  • 8/3/2019 Pres_5July_9871 (Hiram-PC's Conflicted Copy 2011-08-05)

    12/13

    12

    ERROR DETECTION and CORRECTION

    Cyclic Codes (contd)

    Error Detection Capability (contd)EXAMPLE:

    3( ) 1g X X X

    The minimum Hamming distance for this code is 3

    The code can detect up to 2 random errors.(see the relation between dmin and td.)

    The code can detect any burst errors of length 3 or less.It also detects many burst of length >3.The fraction of undetectable error patterns with 4 errors is 1/22.The fraction of undetectable error patterns with more than 4 errors is 1/23.

    Let a (7,4) cyclic code be generated by .

    Also, it detects112 error patterns (2n-2k).

  • 8/3/2019 Pres_5July_9871 (Hiram-PC's Conflicted Copy 2011-08-05)

    13/13

    13

    ERROR DETECTION and CORRECTION

    Cyclic Codes (contd)

    Cyclic Redundancy Check (CRC) Codes

    -CRC are error-detecting codes typically used in ARQ systems.

    -CRC have no error correction capability, but they can be used incombination with an error-correcting code.

    - The error control system is in the form of a concatenated code.

    CRCENCODER

    Error CorrectionENCODER

    Error CorrectionDECODER

    CRC SyndromeChecker

    Tx

    Rx