Sei sulla pagina 1di 23

Modul #10

TE3223
SISTEM KOMUNIKASI 2

CYCLIC BLOCK
CODE
Program Studi S1 Teknik Telekomunikasi
Departemen
p
Teknik Elektro - Sekolah Tinggi
gg Teknologi
g Telkom
Bandung 2008

Cyclic block codes


Cyclic codes are a subclass of linear
block codes.
Encoding and syndrome calculation are
easily performed using feedback shift
shiftregisters.

Hence,
Hence

relatively long block codes can be


implemented with a reasonable complexity.

BCH and Reed


Reed-Solomon
Solomon codes are
cyclic codes.
Modul 10 - Siskom 2 - Cyclic Block Code

Cyclic block codes

A linear (n,k) code is called a Cyclic code


if allll cyclic
li shifts
hift off a codeword
d
d are also
l a
codeword.
U = (u0 , u1 , u2 ,..., un 1 )
U

(i )

i cyclic shifts of U

= (un i , un i +1 ,..., un 1 , u0 , u1 , u2 ,..., un i 1 )

Example:

U = (1101)
U (1) = (1110) U ( 2 ) = (0111) U (3) = (1011) U ( 4 ) = (1101) = U

Modul 10 - Siskom 2 - Cyclic Block Code

Example: (7,4) cyclic code


Information Message (m)

Codeword (U)

Code Polynomial U(X)

(0 0 0 0)

(0 0 0 0 0 0 0)

(1 0 0 0)

(1 1 0 1 0 0 0)

1+X+X3

(0 1 0 0)

(0 1 1 0 1 0 0)

X+X2+X4

(1 1 0 0)

(1 0 1 1 1 0 0)

1+X2+X3+X4

(0 0 1 0)

(0 0 1 1 0 1 0)

X2+X3+X5

(1 0 1 0)

(1 1 1 0 0 1 0)

1+X+X2+X5

(0 1 1 0)

(0 1 0 1 1 1 0)

X+X3+X4+X5

(1 1 1 0)

(1 0 0 0 1 1 0)

1+X4+X5

(0 0 0 1)

(0 0 0 1 1 0 1)

X3+X4+X6

(1 0 0 1)

(1 1 0 0 1 0 1)

1+X+X4+X6

(0 1 0 1)

(0 1 1 1 0 0 1)

X+X2+X3+X6

(1 1 0 1)

(1 0 1 0 0 0 1)

1+X2+X6

(0 0 1 1)

(0 0 1 0 1 1 1)

X2+X4+X5+X6

(1 0 1 1)

(1 1 1 1 1 1 1)

1+X+X2+X3+X4+X5+X6

(0 1 1 1)

(0 1 0 0 0 1 1)

X+X5+X6

(1 1 1 1)

(1 0 0 1 0 1 1)

1+X3+X5+X6

Cyclic block codes

Algebraic structure of Cyclic codes, implies expressing


polynomial
y
form
codewords in p

U( X ) = u0 + u1 X + u2 X 2 + ... + un 1 X n 1

degree (n-1)

R l ti
Relationship
hi b
between
t
a codeword
d
d and
d itits cyclic
li shifts:
hift
XU( X ) = u0 X + u1 X 2 + ..., u n 2 X n 1 + un 1 X n

= un 1 + u0 X + u1 X 2 + ... + un 2 X n 1 + u n 1 X n + un 1
144444
42444444
3 142
4 43
4
U (1 ) ( X )

u n1 ( X n +1)

= U (1) ( X ) + un 1 ( X n + 1)

U (1) ( X ) = XU( X ) modulo ( X n + 1)

Hence:
By extension

U ( i ) ( X ) = X i U ( X ) modulo ( X n + 1)

Modul 10 - Siskom 2 - Cyclic Block Code

Cyclic block codes

Basic properties of Cyclic codes:

Let C be a binary (n
(n,k)
k) linear cyclic code
1. Within the set of code polynomials in C, there
is a unique monic polynomial g ( X ) with
minimal degree r < n. g ( X ) is called the
generator polynomials.
g ( X ) = g 0 + g1 X + ... + g r X r
2. Every code polynomial U( X )in C, can be
expressed uniquely as U ( X ) = m( X )g ( X )
3 The generator polynomial g ( X )is a factor of
3.
X n +1

Modul 10 - Siskom 2 - Cyclic Block Code

Cyclic block codes


The orthogonality of G and H in polynomial
form is expressed as g ( X )h( X ) = X n + 1 . This
means h( X ) is also a factor of X n + 1
1. The row i, i = 1,..., k , of generator matrix is
formed by the coefficients of the " i 1" cyclic
shift of the g
generator p
polynomial.
y
g0
g( X )
Xg ( X )
=
G=


M
k 1

X
X
g
(
)

g1 L g r

O O O O

g 0 g1 L g r

g 0 g1 L g r

g1 L g r
g0

Modul 10 - Siskom 2 - Cyclic Block Code

Example: Generator Matrix of Cyclic Codes

G=

g0
0

g1
g0

g2
g1

.
g2

.
.

.
.

.
.

.
.

gn-k
.

0
gn-k

0
0

0 .
0 .

.
.

0
0

0
.
.

g0

g1

g2

gn-k

0 .

0 0 g0

g1

g2

. gn-k

Example: (7,4) Cyclic Code with g(X)=1+X+X


g(X) 1 X X3
1 1 0 1 0 0 0
0 1 1 0 1 0 0
G=
0 0 1 1 0 1 0
0 0 0 1 1 0 1

1
Could be converted to
systematic form with
0
the help of row
G'=
operations
ti
1

1 0 1 0 0 0

1 1 0 1 0 0
1 1 0 0 1 0
1 0 1 0 0 0 1

Modul 10 - Siskom 2 - Cyclic Block Code

Cyclic block codes

Systematic encoding algorithm for an


( k) Cyclic
(n,k)
C li code:
d
1. Multiply the message polynomial m( X ) by X n k
2. Divide the result of Step 1 by the generator
polynomial g ( X ). Let p( X ) be the reminder.
3. Add p( X ) to X n k m( X ) to form the codeword

U( X )

Modul 10 - Siskom 2 - Cyclic Block Code

Cyclic block codes

Example: For the systematic (7,4) Cyclic code

with generator polynomial g ( X ) = 1 + X + X 3


1. Find the codeword for the message m = (1011)
n = 7, k = 4, n k = 3
m = (1011) m( X ) = 1 + X 2 + X 3
X n k m( X ) = X 3m( X ) = X 3 (1 + X 2 + X 3 ) = X 3 + X 5 + X 6
Divide X n k m( X ) by g ( X) :
X 3 + X 5 + X 6 = (1 + X + X 2 + X 3 )(1 + X + X 3 ) +
1
144
42444
3 14243 1
424
3
quotient q(X)

generator g(X)

remainder p ( X )

Form the codeword polynomial :


U ( X ) = p( X ) + X 3m( X ) = 1 + X 3 + X 5 + X 6
030 1102131 )
U = (112
parity
p
y bits message
g bits

Modul 10 - Siskom 2 - Cyclic Block Code

10

Cyclic block codes

Find the generator and parity check matrices, G and H,


respectively.
g( X ) = 1 + 1 X + 0 X 2 + 1 X 3 ( g 0 , g1 , g 2 , g 3 ) = (1101)
1
0
G=
0

1
1
0
0

1
0
G=
1

1 0 1 0 0 0
1 1 0 1 0 0
1 1 0 0 1 0

0 1 0 0 0 1

0
1
1
0

1
0
1
1

0
1
0
1

I 44

0
0
1
0

0
0
0

Not in systematic form.


We do the following:
row(1) + row(3) row(3)
row(1) + row(2) + row(4) row(4)

1 0 0 1 0 1 1
H = 0 1 0 1 1 1 0
0 0 1 0 1 1 1

I 33

Modul 10 - Siskom 2 - Cyclic Block Code

PT

11

Encoding of Cyclic Codes in Systematic Form

Encoding Circuit is a Division Circuit


Gate
g2

g1
R0

R1

gn-k-1
k 1
R2

..

Rn-k-1

Xn-k m(X)

+
Information Bits

Codeword

Parity
y Check Bits

Modul 10 - Siskom 2 - Cyclic Block Code

12

Encoding Circuit Example: Implementation

Encoding Circuit of (7,4) Cyclic Code with g(X)=1+X+X3


Gate

R0

Assume m=(1 0 1 1)
Input

Register Contents

R1

R2
Xnn-kk m(X)

+
Codeword
Information Bits
Parity Check Bits

0 0 0 ((Initial State))
1

1 1 0 (First Shift)

1 0 1 (Second Shift)

1 0 0 ((Third Shift))

1 0 0 (Fourth Shift)

Codeword:
(1 0 0 1 0 1 1)

13

Encoding Circuit Example: Verification

m=(1 0 1 1) m(X) = 1+X2+X3


1 X3m(X)
1.
(X) = X3+X
X5+X
X6
2. X3m(X)/g(X) = (1+X+X2+X3) +1/g(X) p(X) = 1
3 U(X) = 1+X3+X5+X6 U = (1 0 0 1 0 1 1)
3.

Modul 10 - Siskom 2 - Cyclic Block Code

14

Cyclic block codes

Syndrome decoding for Cyclic codes:


Received
Received
codeword

codeword in polynomial form is given by


r ( X ) = U ( X ) + e( X )

Error
pattern

The

syndrome is the reminder obtained by dividing the


received polynomial by the generator polynomial.
r ( X ) = q ( X )g ( X ) + S ( X )

With

Syndrome

syndrome and Standard array, error is estimated.

In Cyclic codes, the size of standard array is considerably


reduced.

Modul 10 - Siskom 2 - Cyclic Block Code

15

Syndrome Circuit
Syndrome Circuit is a Division Circuit
Gate
g2

g1

gn-k-1

r(X)
(X)
+

s0

s1

s2

..

sn-k-1

Received
Vector

Modul 10 - Siskom 2 - Cyclic Block Code

16

Encoding Circuit Example: Implementation

Syndrome Circuit of (7,4) Cyclic Code with g(X)=1+X+X3


Gate

s0

s1

s2

Assume r=(0 0 1 0 1 1 0)
Input

Register Contents
0 0 0 (Initial
(I iti l State)
St t )

000

100

110

011

011

111

101

Syndrome:
(1 0 1)

17

Cyclic Code Decoder


Gate
Received
Vector
r(X)

Gate

Buffer Register
Feedback Connection

Gate
+

ri

Corrected
Vector

Gate

Syndrome Register

Error Pattern
Detection Circuit

ei

Gate

Syndrome Modification
Modul 10 - Siskom 2 - Cyclic Block Code

18

Example Decoding of (7,4) Cyclic Code g(X)=1+X+X3

Syndrome Table
Error P
E
Pattern
e(X)

Syndrome
S
d
s(X)

Syndrome
S
d
Vector
V
(s0 ,s1 , s2)

e6(X)=X6

s(X)=1+X2

(1 0 1)

e5(X)=X5

s(X)=1+X+X2 (1 1 1)

e4(X)=X4

s(X)=X+X2

(0 1 1)

3
e3((X)=X
)

s(X)=1+X
( )

((1 1 0))

e2(X)=X2

s(X)=X2

(0 0 1)

e1(X)=X1

s(X)=X

(0 1 0)

e0(X)=X
(X) X0

s(X) 1
s(X)=1

(1 0 0)

- e6(X) is the only error pattern with an error at location X6


- ((1 0 1)) is the only
y syndrome
y
that needs to be stored in the
- decoder circuit
19

Example Decoding of (7,4) Cyclic Code g(X)=1+X+X3:


Decoder Circuit
Gate
Received
Vector
r(X)

Buffer Register

ri

Gate

Corrected
Vector

Gate

Gate
+

Gate

20

Example Decoding of (7,4) Cyclic Code g(X)=1+X+X3:


Decoder Steps, e(X)=X2
Initial

+
0

1st Shift

+
0

2nd Shift

+
0

3rd Shift

+
0

4th Shift

+
1

5th Shift

+
0

6th Shift

+
0

7th Shift

+
0

21

Tugas !

Problem 5.21 (Bernard Sklar 1st edition) or Problem 6.21 (Bernard


Sklar 2nd edition)

Modul 10 - Siskom 2 - Cyclic Block Code

22

Tugas !
Problem 5.22 (Bernard Sklar 1st edition) or Problem 6.22 (Bernard
Sklar 2nd edition)
Consider the (15, 11) cyclic code generated by g(X)=1+X+X4
1) Devise a feedback register encoder and decoder for this code
2) Illustrate the encoding procedure with the message vector
11001101011 by
y listing
g the states of register
g
((the rightmost
g
bit is
earliest bit
3) Repeat part b) for decoding procedure ( + proses error correcting )

Modul 10 - Siskom 2 - Cyclic Block Code

23

Potrebbero piacerti anche