what is cyclic code ?

Post on 03-Jan-2016

39 Views

Category:

Documents

1 Downloads

Preview:

Click to see full reader

DESCRIPTION

What is Cyclic Code ?. 指導教授:黃文傑 博士 學生:吳濟廷 2004.03.10. OUTLINE. Introduction Encoding Generator polynomial Decoding Parity check polynomial Syndrome testing Error correction Conclusion. Code Taxonomy. Today. Important cyclic code. BCH code Powerful random error-correcting codes - PowerPoint PPT Presentation

TRANSCRIPT

42510011 0010 1010 1101 0001 0100 1011

Wireless Communication Lab. CGU

What is Cyclic Code ?

指導教授:黃文傑 博士學生:吳濟廷2004.03.10

4251

0011 0010 1010 1101 0001 0100 1011

OUTLINE

• Introduction• Encoding

– Generator polynomial

• Decoding– Parity check polynomial– Syndrome testing– Error correction

• Conclusion

4251

0011 0010 1010 1101 0001 0100 1011

4251

0011 0010 1010 1101 0001 0100 1011

Code Taxonomy

Today

4251

0011 0010 1010 1101 0001 0100 1011

Important cyclic code

• BCH code– Powerful random error-correcting codes

• Goley(23,12) code– Triple-error-correcting code

• RS code– Nonbinary, widely used for error control in data

communication and data storage

4251

0011 0010 1010 1101 0001 0100 1011

Cyclic Code• Definition

– Linearity: sum of any two codewords in the code is also a codeword

– Cyclic: any cyclic shift of a codeword in the code is also a codeword

a b c d ………………… x y z

z a b c d …………… w x y

1 cyclic shift

0 1 2 1( , , ,..., )nc c c c

1 0 1 2( , , ,..., )n nc c c c

4251

0011 0010 1010 1101 0001 0100 1011

Cyclic shift

• How do we make such a shift cyclic?

2 10 1 2 1( ) ... n

nc X c c X c X c X

1 10 1 1 1

1 1 11 0 1 1

1 1 11 0 1 1

11

( ) ( ... ... )

... ...

... ...

( 1) ... ( 1)

i i n i n i nn i n i n

n n i i i nn i n n i

i i i nn i n n i

n i nn i n

X c X X c c X c X c X c X

c X c X c X c X c X

c c X c X c X c X

c X c X X

( ) ( )ic X

( )q X

( )( ) ( )( 1) ( )i n iX c X q X X c X

Code polynomial form

4251

0011 0010 1010 1101 0001 0100 1011

Generator polynomial

• be a polynomial of degree (n-k) that is a factor of

• Encoded codeword

where has degree (k-1)

( )g x

1nX

1

1

( ) 1n k

i n ki

i

g x g X X

general form :

( ) ( ) ( )c X a X g X( )a X

4251

0011 0010 1010 1101 0001 0100 1011

Encoding procedure

1.Multiply the message polynomial by

2.Divide by , obtaining the

3.Add to , obtaining the code polynomial

( )b X

( )m X n kX

( )n kX m X ( )g X ( )b X

( )n kX m X

( )c X

( ) ( )( )

( ) ( )

n kX m X b Xa X

g X g X

4251

0011 0010 1010 1101 0001 0100 1011

Encoding example

• Using the to generate a (7,4) systematic cyclic code from the message (1011)

3( ) 1g X X X

2 3( ) 1m X X X 3 2 3 3 5 6( ) (1 )n kX m X X X X X X X

Dividing by g(X)

3 5 6 2 3 3(1 )(1 ) 1X X X X X X X X quotient q(x) generator g(x) reminder3 3 5 6( ) ( ) ( ) 1c X p X X m X X X X

1001011U

4251

0011 0010 1010 1101 0001 0100 1011

EncoderEncoding (1 0 1 1) to a (7,4) cyclic code with 3( ) 1g X X X

(1 0 1 1)

4251

0011 0010 1010 1101 0001 0100 1011

Parity-check polynomial

• Definition

from linear block code ~

to check if the basis still has orthogonality

so we could get :

1

1

( ) 1k

i ki

i

h X h X X

0TGH

( ) ( ) mod( 1) 0

( ) ( ) 1

n

n

g X h X X

g X h X X

4251

0011 0010 1010 1101 0001 0100 1011

Syndrome testing

• Purpose : to check if there’s error in received codeword

• Result : syndrome polynomial

• How to do the syndrome testing ?

0,( )

0,s X

no error detected

error detected

4251

0011 0010 1010 1101 0001 0100 1011

Calculation of the syndrome

• Received codeword

where

( )r X1

0 1 1( ) ... nnr X r r X r X

generator polynomial

( ) ( ) ( ) ( )r X m X g X s X

syndromequotient

4251

0011 0010 1010 1101 0001 0100 1011

Syndrome calculatorTransmitted codeword 0 1 1 1 0 0 1

Received codeword 0 1 1 0 0 0 1error

So we could get the

by syndrome calculator

What’s next ??

( ) 1s X X

For a (7,4) cyclic code

( 1 1 0 )

3( ) 1g X X X

syndrome calculator

4251

0011 0010 1010 1101 0001 0100 1011

Error pattern

the code poly.

the Rx poly. (with error)

or in another form

so

( ) ( ) ( )c X a X g X

( ) ( ) ( )r X c X e X

( ) ( ) ( ) ( )r X m X g X s X

( ) ( ) ( ) ( ) ( ) ( )

( ) [ ( ) ( )] ( ) ( )

a X g X e X m X g X s X

e X a X m X g X s X

Syndrome of received codeword is exactly the same as syndrome of error pattern !!

4251

0011 0010 1010 1101 0001 0100 1011

Using the look-up table

Decoding table for (7,4) cyclic code

So from previous example,

we could get the location of error (0 0 0 1 0 0 0)

and get the corrected codeword

by adding the error pattern to received codeword which is

0 1 1 0 0 0 1

0 0 0 1 0 0 00 1 1 1 0 0 1

4251

0011 0010 1010 1101 0001 0100 1011

Conclusion

• Cyclic code is good for error detection due to its structure

• It’s so easy to implement

• Convolution code next time ~

4251

0011 0010 1010 1101 0001 0100 1011

[Reference]

• Simon Haykin, ”Communication systems, 3rd ed.”, pp.686~pp699, John Wiley & Sons 1994

• Bernard Sklar, “Digital communications, 2nd ed.”, pp.356~pp.366, Prentice-Hall, 2002

• 盧而輝 ,”錯誤控制編碼” , pp.4.1~pp.4.34, 2001

top related