Beruflich Dokumente
Kultur Dokumente
Cyclic Codes
Practicalities
References:
A. B. Carlson: Communication Systems (4th ed.)
J. G. Proakis, Digital Communications (4th ed.)
L. Ahlin, J. Zander: Principles of Wireless
Communications
Prerequisites: S-72.245 Transmission Methods in
Telecommunication Systems
Homepage: http://www.comlab.hut.fi/opetus/227/
Timetables:
Lectures: Tuesdays 14-16 S3, Wednesdays 12-14 I346
Tutorials: Mondays 14-16 S2, starting 21.3.05
Targets today
Taxonomy of coding
How cyclic codes are defined?
Systematic and nonsystematic codes
Why cyclic codes are used?
How their performance is defined?
How practical encoding and decoding circuits are realized?
How to construct cyclic codes?
Taxonomy of Coding
Error
Correction
Coding
= FEC
- no feedback
channel
- quality paid
by redundant
bits
Cryptography
(Ciphering)
- Secrecy/ Security
- Encryption (DES)
Source
Coding
- Makes bits
equal
probable
Compression
Coding
Error
Detection
Coding
- used
in ARQ
as in TCP/IP
- feedback channel
- retransmissions
- quality paid by delay
Error Control
Coding
- Strives to
utilize
channel
capacity by
adding
extra bits
- Redundancy removal:
- Destructive (jpeg, mpeg)
- Non-destructive (zip)
Line Coding
- for baseband
communications
- RX synchronization
- Spectral shaping
for BW requirements
- error detection
Background
Block and
convolutional coding
k bits
(n,k)
(n,k)
encoder
encoder
n bits
For practical applications rather large n and k must be used. This is because
in order to correct up to t errors it must be that
t n
n n n
nk
1
...
i1
i
{1 2 t
number of syndromes n
number of error patters
(or check-bit error patterns)
in encoded word
t n
1
1 RC log 2
note: q n k n(1 RC )
1
n
i
Example
Consider a relatively high SNR channel such that only 1 or 2 bit errors
are likely to happen. Consider the ration
1
1 RC log 2
n
(n, k )
log 2
n
i
t
i1
nk
n n
1 2
k-bits
n-bits
(n,k)
(n,k)
block
blockcoder
coder
Number of check-bits
Number of error patterns
This demonstrates that long codes are more advantages when a high
code rate and high error correction capability is required
10
An (n,k) linear code X is called a cyclic code when every cyclic shift of
a code X, as for instance X, is also a code, e.g.
X ( xn1 xn2 L x1 x0 )
X ' ( xn2 xn3 L x0 xn1 )
Each (n,k) cyclic code has the associated code vector with the n-bit code
polynomial
X( p ) xn1 p n1 xn2 p n2 L x1 p x0
Note that the (n,k) code vector has the polynomial of degree of n-1 or
less. Mapping between code vector and code polynomial is one-to-one,
e.g. they specify each other uniquely
Manipulation of the associated polynomial is done in a Galois field (for
instance GF(2)) having elements {0,1}, where operations are performed
mod-2. Thus results are always {0,1} -> binary logic circuits applicable
For each cyclic code, there exists only one generator polynomial whose
degree equals the number of check bits q=n-k in the encoded word
11
12
Modulo-2 Multiplication
*
0
1
0
0
0
1
0
1
Cyclic codes have a common factor pn+1. In order to see this we consider
summing two cyclic code vectors:
X( p ) xn1 p n1 xn2 p n2 L x1 p x0
Unshifted
Left rotated
13
X ( p ) p X( p ) mod( p 1)
(i )
Example:
shift 101
(i )
p3 1 p3 p
p3 1
p 1
101 X( p) p 2 1
pX( p ) p 3 p
pX( p )
1
011
3
p 1
p 1
14
p 7 1 ( p 1)( p 3 p 1)( p 3 p 2 1)
( p 2 1)( p 3 p 1) p 5 p 2 p 1
and the respective code vector (of degree n-1 or smaller) is
100111
n7k 4
k-bits
0101
n-bits
(n,k)
(n,k)
block
blockcoder
coder
100111
15
unit delay
element
alternate
notation of
XOR-circuit
Timo O. Korhonen, HUT Communication Laboratory
16
word to be
encoded
generator polynomial
determines connection
of taps
( p 1)( p 3 p 1)
1
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
0
1
out
0
0
0
1
1
1
0
1
0
p 4 p 2 p p3 p 1
p 4 p 3 p 2 1 11101
Encoded word
17
0
0
0
0
0
0
Word to be rotated
(divided by the common factor)
0
0
1
0
0
0
A
0
1
1
0
1
0
B
0
0
1
1
0
1
C
0
0
0
1
1
0
D
0
1
1
1
0
1
101 X( p) p 2 1
Determines tap
connections
0
1
0
0
0
0
X
0
1
0
1
0
0
pX( p ) p 3 p
pX( p )
1
1
011
p3 1
p 1
Remainder
18
G ( p ) p q p q1 g q1 L pg1 1, q n k
and G(p) is a factor of pn+1. Any factor of pn+1 that has the degree q
(the number of check bits) may serve as the generator polynomial. We
noticed earlier that a cyclic code is generated by the multiplication
X ( p ) M ( p )G ( p )
G ( p) p 3 0 p 1
Some cyclic codes:
19
Define the length q=n-k check vector C and the length-k message
vector M by M ( p ) m p k 1 L m p m
k 1
C( p ) cq1 p q1 L c1 p c0
X( p ) p nk (mk 1 p k 1 L m1 p m0 )
cq1 p q1 L c1 p c0
p q M ( p ) C( p )
message bits
check bits
20
Determining check-bits
X( p ) M ( p)G ( p) p q M ( p) C( p)
p nk M ( p )
C( p )
M( p)
G ( p)
G ( p)
7
7 5 1
1
5
5
Definition of systematic cyclic code
21
p3 p 2 1
p3 p 2 1 p6 p 4 1
p6 p5 p3
p5 p 4 p3 1
p5 p 4 p 2
p3 p2 1
p3 p2 1
Timo O. Korhonen, HUT Communication Laboratory
22
23
24
S( p ) mod R ( p) / G ( p )
This can be expressed also in terms of the error E(p) and the
code word X(p) while noting that the received word is in terms of error
R ( p ) X ( p ) E( p )
hence
S( p ) mod X( p ) E( p) / G ( p)
S( p ) mod E( p) / G ( p)
Timo O. Korhonen, HUT Communication Laboratory
25
16.20 s ( x) mod e( x) / g ( x)
26
Table 16.6
s ( x) mod r ( x) / g ( x)
g ( x)
27
received code
syndrome
G ( p) p 3 p 1
28
Lessons learned
You can construct cyclic codes starting from a given factored pn+1
polynomial by doing simple calculations in GF(2)
You can estimate strength of designed codes
You understand how to apply shift registers with cyclic codes
You understand how syndrome decoding works with cyclic codes
You can design encoder and decoder circuits for your cyclic codes
29