0% found this document useful (0 votes)
48 views20 pages

Cyclic Code-LIM

Cyclic codes are a subclass of block codes that have the properties of linearity and cyclicity. Cyclic codes can be represented using polynomials which simplifies the encoding and decoding process using algebraic properties. Encoding a cyclic code involves dividing the message polynomial by the generator polynomial to obtain the parity bits. Decoding uses the syndrome, which is the remainder of dividing the received codeword by the generator polynomial, to detect and correct errors.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views20 pages

Cyclic Code-LIM

Cyclic codes are a subclass of block codes that have the properties of linearity and cyclicity. Cyclic codes can be represented using polynomials which simplifies the encoding and decoding process using algebraic properties. Encoding a cyclic code involves dividing the message polynomial by the generator polynomial to obtain the parity bits. Decoding uses the syndrome, which is the remainder of dividing the received codeword by the generator polynomial, to detect and correct errors.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

TTI3J3 SISTEKM

KOMUNIKASI II

CYCLIC CODE
CYCLIC CODE

• Cyclic code merupakan subklas dari block code.


Suatu binary code dikatakan sebagai cyclic code
bila memenuhi:
• Sifat Linearitas: Penjumlahan dari dua buah codeword
akan mengkasilkan codeword baru.
• Sifat cyclic: Setiap pergeseran perputaran dari suatu
code word akan menghasilkan codeword baru.
• Untuk proses encoding dan decoding , cyclic code
dipermudah oleh sifat aljabar
• Untuk menggunakan sifat aljabar ini maka code
cyclic direpresentasikan dalam bentuk Polynomial

v = (v0, v1, ,v2, …, vn-1) V(X)= v0 + v1X + v2 X2 +… +vn-1 Xn-1


CYCLIC CODE(7,4)
Information Message (m) Codeword (U) Code Polynomial U(X)
(0 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
• Ekspresi codeword Cyclic code dalam bentuk
polinomial
𝐔(𝑋) = 𝑢0 + 𝑢1 𝑋 + 𝑢2 𝑋 2 +. . . +𝑢𝑛−1 𝑋 𝑛−1 degree (𝑛 − 1)

• Hubungan antara codeword dan pergeseran siklis:


𝑋𝐔(𝑋) = 𝑢0 𝑋 + 𝑢1 𝑋 2 +. . . , 𝑢𝑛−2 𝑋 𝑛−1 + 𝑢𝑛−1 𝑋 𝑛
= 𝑢𝑛−1 + 𝑢0 𝑋 + 𝑢1 𝑋 2 +. . . +𝑢𝑛−2 𝑋 𝑛−1
𝐔 (1) (𝑋)
= 𝐔 (1) (𝑋) + 𝑢𝑛−1 (𝑋 𝑛 + 1)

• Oleh karena itu: 𝐔(1) (𝑋) = 𝑋𝐔(𝑋) modulo (𝑋 𝑛 + 1)

By extension
𝐔 (𝑖) (𝑋) = 𝑋 𝑖 𝐔(𝑋) modulo (𝑋 𝑛 + 1)
CYCLIC CODE

• Basic properties of Cyclic codes:


• Let C be a binary (n,k) linear cyclic code
1. Within the set of code polynomials in C, there is a unique
monic polynomial 𝐠(𝑋) with minimal degree 𝑟 < 𝑛. 𝐠(𝑋) is called
the generator polynomials.
𝐠(𝑋) = 𝑔0 + 𝑔1 𝑋+. . . +𝑔𝑟 𝑋 𝑟

2. Every code polynomial 𝐔(𝑋) in C, can be expressed uniquely


as
𝐔(𝑋) = 𝐦(𝑋)𝐠(𝑋)
3. The generator polynomial 𝐠(𝑋) is a factor of 𝑋 𝑛 + 1
CYCLIC CODE
• The orthogonality of G and H in polynomial form is
expressed as 𝐠(𝑋)𝐡(𝑋) = 𝑋 𝑛 + 1 . This means 𝐡(𝑋) is
also a factor of 𝑋 𝑛 + 1

1. The row 𝑖, 𝑖 = 1, . . . , 𝑘, of generator matrix is formed by


the coefficients of the "𝑖 − 1" cyclic shift of the
generator polynomial.

𝑔0 𝑔1 ⋯ 𝑔𝑟 𝟎
𝐠(𝑋)
𝑔0 𝑔1 ⋯ 𝑔𝑟
𝑋𝐠(𝑋)
𝐆= = ⋱ ⋱ ⋱ ⋱

𝑔0 𝑔1 ⋯ 𝑔𝑟
𝑋 𝑘−1 𝐠(𝑋)
𝟎 𝑔0 𝑔1 ⋯ 𝑔𝑟
CONTOH:

g0 g1 g2 . . . . . gn-k 0 0 0 . . 0
0 g0 g1 g2 . . . . . gn-k 0 0 . . 0
0 0 g0 g1 g2 . . . . . gn-k 0 . . 0
G=
.
.
0 0 . . . 0 0 g0 g1 g2 . . . . gn-k

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


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

• Systematic encoding algorithm for an (n,k)


Cyclic code:
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.

n−k
3. Add p( X ) to X m ( X ) to form the codeword
U(X )
CYCLIC CODE

• 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
     
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
U = (1
00 1011 )
parity bits message bits
CYCLIC CODE

• 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 1 0 1 0 0 0
0 Not in systematic form.
1 1 0 1 0 0 We do the following:
G=
0 0 1 1 0 1 0 row(1) + row(3) → row(3)
 
0 0 0 1 1 0 1 row(1) + row(2) + row(4) → row(4)

1 1 0 1 0 0 0
0 1 0 0 1 0 1 1 
1 1 0 1 0 0
G= H = 0 1 0 1 1 1 0
1 1 1 0 0 1 0
  0 0 1 0 1 1 1
1 0 1 0 0 0 1
I 33 PT
P I 44
RANGKAIAN ENCODER KODE CYCLIC

Encoding Circuit is a Division Circuit


Gate

g1 g2 gn-k-1

R0 + R1 + R2 .. + Rn-k-1 +

Xn-k m(X) Codeword


Information Bits

Parity Check Bits


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

R0 + R1 R2 +

Assume m=(1 0 1 1) Xn-k m(X) Codeword


Information Bits

Input Register Contents Parity Check Bits

0 0 0 (Initial State)
1 1 1 0 (First Shift)
Codeword:
1 1 0 1 (Second Shift)
(1 0 0 1 0 1 1)
0 1 0 0 (Third Shift)
1 1 0 0 (Fourth Shift)
CONTOH: VERIFIKASI RANGKAIAN
ENKODER

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


1. X3m(X) = X3+X5+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)
SYNDROME

• Syndrome decoding for Cyclic codes:


• Received codeword in polynomial form is given by
Received r ( X ) = U ( X ) + e( X ) Error
codeword patter
n
• The syndrome is the reminder obtained by dividing the
received polynomial by the generator polynomial.

r ( X ) = q ( X )g ( X ) + S ( X )
Syndrome
• With syndrome and Standard array, error is estimated.

• In Cyclic codes, the size of standard array is considerably


reduced.
RANGKAIAN SYNDROME

Syndrome Circuit is a Division Circuit


Gat
e
g1 g2 gn-k-1

r(X)
+ s0 + s1 + s2 .. + sn-k-1
Received
Vector
CONTOH : RANGKAIAN
SYNDROME
Syndrome Circuit of (7,4) Cyclic Code with g(X)=1+X+X3
Gat
e

+ s0 + s1 s2
Assume r=(0 0 1 0 1 1 0)
Input Register Contents
0 0 0 (Initial State)
0 000
1 100
1 110 Syndrome:
0 011 (1 0 1)
1 011
0 111
0 101
CYCLIC CODE DECODER
Gate
Received Corrected
Vector ri Vector
Gate Buffer Register +
r(X)

Feedback Connection
Gate Gate

+ Syndrome Register

Error Pattern ei
Gate
Detection Circuit

Syndrome Modification
EXAMPLE DECODING OF (7,4) CYCLIC CODE
G(X)=1+X+X3: DECODER STEPS, E(X)=X2

Initial 0 0 1 1 0 1 1 0 1 1 +
0

1st Shift 1 1 0 1 1 0 1 1 0 1 +
0

2nd Shift 0 1 1 1 1 1 0 1 1 0 +
0

3rd Shift 1 1 1 0 1 1 1 0 1 1 +
0

4th Shift 1 0 1 1 0 1 1 1 0 1 +
1

5th Shift 0 0 0 0 1 0 1 1 1 0 +
0

6th Shift 0 0 0 0 0 1 0 1 1 1 +
0

7th Shift 0 0 0 1 0 0 1 0 1 1 +
0
LATIHAN SOAL
• Problem 5.21 (Bernard Sklar 1st edition) or Problem 6.21 (Bernard
Sklar 2nd edition)
TUGAS
• Cyclic code (7,4) Memiliki generator polinomial g(x)= 1+X+X3
a. Tentukan generator matrix G dan parity-check matrix H untuk code tersebut.,
kemudian buktikan bahwa HGT=0
b. Tentukan rangkaian encoder dan sindrome, menggunakan kode yang
sistematik
• Sinyal transmisi diterima oleh demodulator di receiver, r = [0 1 0 1 0 0 1 ],
tentukan syndrome polynomial S(X) yang kemudian diproses oleh error
decoder. Berikan sequence yang merupakan output dari error decoder (estimasi
dari codeword yang sebenarnya dikirim).

You might also like