ELG 5372 Error Control Coding
ELG 5372 Error Control Coding
ELG 5372 Error Control Coding
Claude D’Amours
Lecture 1: Introduction to Coding
Introduction
m c
Information Source Channel Modulator/
Equivalent channel
source coder coder writer
Channel/
memory
Source m’ Channel c’ Demod./
Sink
Destination
decoder decoder reader
Types of Codes
z Convolutional Codes
z Turbo codes typically use convolutional codes as
constituent codes
z TCM based on convolutional codes
Block Codes
z A block of k digital symbols is input to the encoder
from which n digital symbols are output (typically
n > k).
Block
encoder
k symbols n symbols
2 Eb
s0 (t ) = cos(2πf c t + π ), 0 ≤ t ≤ T
T
2 Eb
s1 (t ) = cos(2πf c t ), 0 ≤ t ≤ T
T
Modulation and Coding (2)
z Transmitted signal is:
N
s (t ) = ∑ si (t − nT )
n =0
where i = 0,1,…,M-1 and is random (i = 0 or 1
for binary case).
z The received signal is:
r (t ) = a (t ) s (t − τ (t )) + n(t )
where a(t) is the time varying channel gain, τ(t) is the
delay introduced by the channel and n(t) is additive noise.
Modulation and Coding (3)
z AWGN Channel
z a(t) = a and τ(t) = τ.
z Flat Rayleigh Fading
z a(t) = time varying Rayleigh envelope
z τ(t) introduces time varying phase shift.
⎛ 2 Eb ⎞ ⎛ 2 ( 4 / 7 ) Eb ⎞
Pu = Q⎜ ⎟, Pc = Q⎜ ⎟
⎝ N0
⎠ ⎝ N0
⎠
Example Hamming (7,4) WER
Word Error Rate
1.00E+00
1.00E-01
WER
1.00E-02 uncoded
coded
1.00E-03
1.00E-04
0 1 2 3 4 5 6 7 8 9
Eb/No (dB)
Example Hamming (7,4) BER
z BER
z Uncoded Pb = Pu.
z Coded
1.00E+00
1.00E-01
BER
1.00E-02
uncoded
coded
1.00E-03
1.00E-04
0 1 2 3 4 5 6 7 8 9
Eb/No (in dB)
ELG 5372 Error
Control Coding
Claude D’Amours
Lecture 2: Introduction to Coding 2
Decoding Techniques
Hard Decision
Receiver detects data before decoding
Soft Decision
Receiver quantizes received data and decoder uses
likelihood information to decode.
Magnitude of decision variable usually indicates
the likelihood that the detection is correct.
Maximum Likelihood Decoding (MLD).
Hard Decision vs Soft Decision
0’
0 0 0
0
1 1 1
1
1’
P( E ) = ∑ P (c' ≠ c | r ) P (r )
r
P (r | c ) = ∏ P ( ri | c i ) = p d ( r , c ) (1 − p ) n − d ( r , c ) (1)
i
log P ( r | c ) = d ( r , c ) log p + ( n − d ( r , c )) log( 1 − p ) (2)
fri(ri|-1) fri(ri|1)
-1 0 +1 ri
P(ci=1)/P(ci=-1)=fri(ri|ci=1)/fri(ri|ci=-1)
Example: HD vs SD
Consider Hamming (7,4) code used with the
following channels
0’
0 P(0’|0)=P(1’|1)=0.6
0 0
0 P(0|0)=P(1|1)=0.3
1 P(1|0)=P(0|1)=0.099
1 1
1 P(1’|0)=P(0’|1)=0.001
P(0|0)=P(1|1)=0.9
1’
P(1|0)=P(0|1)=0.1
(a) HD (b) SD
Example: HD vs SD
Suppose we receive r = 1’ 0 0’ 0 0’ 0’ 0’
For HD, there is no quantization, so r = 1000000 and
will be decoded as 0000000 using minimum
Hamming distance rule.
In the SD case, using (1) with c = 0000000, we get
P(r|c) = 0.000117
However, for c=1101000, we get P(r|c) = 0.000762
This means that for the given r, it is almost 7 times
more probable that 1101000 was transmitted than
0000000.
Errors and Channel Models
Memoryless channels: Noise affects each transmitted
symbol independently.
Tx symbol has probability p of being received incorrectly
and probability 1-p of being received correctly.
Transmission errors occur randomly in the received
sequence.
Memoryless channels are often referred to as random-error
channels.
Errors and Channel Models (2)
Examples
AWGN: ri = si+ni, E[ni]=0, E[ni2]=σn2 and
E[ninj]=0 for i≠j.
DMC: P[0|0]
0 0
P[1|0]
P[0|1]
1 P[1|1]
1
Errors and Channel Models (3)
Channels with memory
Errors do not occur randomly.
Either noise is not independent from
transmission to transmission (coloured noise)
Or slow time varying signal to noise ratio
causes time dependent error rates (fading
channels).
Errors and Channel Models (4)
Gilbert and Fritchman model
q1
Good Bad
1-q1 state State 1-q2
q2
Errors and Channel Models (5)
Channels with memory lead to error
bursts.
Burst-error correcting codes
Random error correcting codes with
interleaving-deinterleaving to randomize
errors.
Performance Measures
Probability of decoding error P(E).
Probability that codeword at output of decoder is not the
transmitted one.
Also referred to as word error rate (WER) or Block error
rate (BLER).
Bit error rate (BER) Pb
Probability that message bit at output of decoder is
incorrect.
Coding Gain (measured in dB)
Savings in transmitted power to achieve a specific BER
using coding compared to uncoded case
Performance Measures 2
Asymptotic coding gain
Coding gain when Eb/No → ∞
Performance Measures 3
1.00E-02
1.00E-03
1.00E-04
1.00E-05
BER
1.00E-06
1.00E-07 uncoded
coded
1.00E-08
1.00E-09
1.00E-10
6 7 8 9 10 11 12 13
Eb/No (in dB)
Coded Modulation
Use of ECC creates bandwidth expansion due to
redundant symbols.
Combining ECC and modulation allows the
redundancy to be contained in the modulation
1 011
s1(t)+s0(t-T)+s1(t-2T)+s1(t-3T)
s1(t)+s2(t-T)+s1(t-2T)+s3(t-3T)
Memory is created without adding redundant bits
by using a higher order modulation scheme and
using a bit in two successive symbols.
Trellis Coded Modulation
State machine adds redundant bits and
creates memory
State change is encoded by selecting a
symbol from a larger than needed
constellation, thus no bandwidth
expansion occurs and significant coding
gains are achieved.
ELG 5372 Error Control Coding
Claude D’Amours
Lecture 3: Algebra (1): Groups,
Subgroups and Cosets
Groups
Let G be a set of elements and * is a
binary operation defined on G such that
for all elements a, b ∈G then c = a*b.
If c ∈G, for all a and b, then G is closed under
the operation *.
For example, if G is the set of all real numbers,
then G is closed under the real addition (+)
operation.
Also, the operation is said to be associative if
for a, b, c∈G, then (a*b)*c = a*(b*c)
Definition of a Group
The set G on which the binary operation *
is defined is referred to as a group if the
following conditions are met:
* is associative
G contains an identity element. In other words,
for a, e ∈G, e is an identity element if a*e = a
for all a.
For any element a∈G, there exists an inverse
element a’ ∈G such that a*a’ = e.
The groups is commutative if for any a, b ∈
G, a*b = b*a
Examples
G is the set of all real numbers
under multiplication.
Multiplication is associative
a×1 = a for all a ∈ G and 1 ∈ G.
+ 0 1 2 × 0 1 2
0 0 1 2 0 0 0 0
1 1 2 0 1 0 1 2
2 2 0 1 2 0 2 1
g ( X ) = g o + g1 X + ... + g m X m
Addition of polynomials
f ( X ) + g ( X ) = ( f o + g o ) + ( f1 + g1 ) X + ... + ( f m + g m ) X m
+ f m +1 X m +1 + ... + f n X n
c0 = f0 g0
c1 = f 0 g1 + f1 g 0
c2 = f 0 g 2 + f1 g1 + f 2 g 0
M M M
cn+ m = fn gm
Examples
z Polynomials in GF(2)
f (X ) = 1+ X + X 3
g( X ) = 1 + X 2
z f(X)+g(X) = (1+1) + (1+0)X + (0+1)X2 +
(1+0)X3 = X + X2 + X3
z f(X)g(X) = (1+X+X3) × (1+X2) = 1 + X2 +
X + X3 + X3 +X5 = 1 + X + X2 + (1 + 1)X3
+ X5 = 1 + X + X2 + X5.
Examples
z Polynomials in GF(4)
f ( X ) = 1 + αX + αX 2
g( X ) = 1 + α 2 X
Properties of Polynomials over
GF(q)
Commutative
a(X) + b(X) = b(X) + a(X)
a(X)b(X) = b(X)a(X)
Associative
a(X) + [b(X) + c(X)] = [a(X) + b(X)] + c(X)
a(X)[b(X)c(X)] = [a(X)b(X)]c(X)
Distributive
a(X)[b(X) + c(X)] = a(X)b(X) + a(X)c(X)
Polynomial Division
z When we divide f(X) by g(X), we get two
new polynomials; q(X) is the quotient
and r(X) is the remainder.
z The degree of the remainder, r(X) is
smaller than the degree of g(X).
X2 +1
X 3 +1 X 5 + +X2 +1
X5 + X3
X3 + X2 +1
X3 + +1
X2
ELG 5372 Error
Control Coding
Lecture 5: Algebra 3:
Irreducible, Primitive and
Minimal Polynomials
Irreducible Polynomials
• Theorem 11
– The conjugacy class of β is made up of the
sequence β , β q , β q 2 , β q 3 ,..., β q d −1
– If we continue the sequence βd = β and this is the
first element of the sequence to be repeated.
– d divides m.
See S.B. Wicker, Error Control Systems for Digital Communication and Storage,
Upper Saddle River, NJ: Prentice Hall, 1995, pages 55-56 for proof.
i =0
• m=2
– X2+X+1
• m=3
– X3+X+1, X3+X2+1
• m=4
– X4+X+1, X4+X3+1
• m=5
– X5+X2+1, X5+X3+1, X5+X3+X2+X+1, X5+X4+X2+X+1
– X5+X4+X3+X+1, X5+X4+X3+X2+1
• m=6
– X6+X+1, X6+X4+X3+X+1, X6+X5+1, X6+X5+X2+X+1
– X6+X5+X3+X2+1, X6+X5+X4+X+1
Introduction to Linear Block Codes: Vector
Spaces
m = [a1 a2 L ak ]
⎡ v1 ⎤
⎢v ⎥
G = ⎢ 2⎥
⎢ M ⎥
⎢ ⎥
⎣v k ⎦
Spanning Sets
• A spanning set for vector space V that has the smallest possible
number of vectors in it is called a basis for V.
– A basis is formed by using only linearly independent vectors
– If one vector in G is linearly dependent on others in G, it can
be removed from the set and the set still spans V.
• Example: V is the set of all binary vectors of length 3.
• V={(0,0,0), (0,0,1), (0,1,0), (0,1,1), (1,0,0), (1,0,1), (1,1,0),
(1,1,1)}.
• Let G1 = {(0,0,1), (0,1,0), (1,0,0)}
• Let G2 = {(0,1,1), (1,1,0), (1,1,1)}
• Both G1 and G2 each form a basis for V.
Dimension of a Vector Space
Lecture 7: Fundamentals of
Linear Block Codes
Basic Definitions
m c
Block
Coder
Definition 2
m c m c
000 000000 100 110110
001 111111 101 001001
010 011011 110 101101
011 100100 111 010010
Example 2
⎡1 1 0 1 1 0⎤
G 2 = ⎢⎢0 1 1 0 1 1⎥⎥
⎢⎣1 0 0 1 0 0⎥⎦
m c m c
000 000000 100 110110
001 100100 101 010010
010 011011 110 101101
011 111111 111 001001
Systematic Codes
m m p p m
m c m c
⎡1 1 1 0 1⎤
G=⎢
⎣0 1 0 1 1⎥⎦
⎡1 0 1 1 0⎤ ⎡1 1 0 ⎤
G syst =⎢ ⎥ , P=⎢ ⎥
⎣0 1 0 1 1⎦ ⎣ 0 1 1 ⎦
⎡1 1 0⎤
⎢0 1 1⎥⎥
⎡1 0 1 0 0⎤
⎡1 1 1 0 1⎤ ⎢ ⎡0 0 0 ⎤
H = ⎢⎢1 1 0 1 0⎥⎥, GH = ⎢
T
⎥ ⎢1 ⎥
0 0 =⎢ ⎥
⎢⎣0 1 0 0 1⎥⎦ ⎣0 1 0 1 1⎦ ⎢0 ⎥
1 0⎥ ⎣
0 0 0 ⎦
⎢
⎢⎣0 0 1⎥⎦
ELG 5372 Error
Control Coding
H = ⎢⎢1 1 1 0 0 1 0⎥⎥ ⎡1 1 0⎤
⎢0 1 1⎥⎥
⎢⎣0 1 1 1 0 0 1⎥⎦ ⎢
⎢1 1 1⎥
⎥
[1 1 0 0 0 0 0]⎢⎢1 0 1⎥ = [1 0 1]
⎢1 0 0⎥
⎢ ⎥
⎢0 1 0⎥
⎢0
⎣ 0 1⎥⎦
Parity check equations
⎡1 0 1 1 1 0 0⎤
⎢
H = ⎢1 1 1 0 0 1 0⎥ ⎥
⎢⎣0 1 1 1 0 0 1⎥⎦
• Parity check matrix gives rise to a set of parity
check equations
• c0+c2+c3+c4=0, c0+c1+c2+c5=0, c1+c2+c3+c6=0
• Or c4=c0+c2+c3, c5=c0+c1+c2, c6=c1+c2+c3.
Linear Block Code Theorem 1
– Proof
Let the column vectors of H be designated h0T, h1T, … hn-1T,
where hi is a 1×n vector. Let codeword c=[c0 c1 … cn-1] be a 1×n
codeword of C. Then cHT = c0h0+c1h1+…cn-1hn-1 = 01,(n-k).
⎡1 0 1 1 1 0 0⎤
⎢
H = ⎢1 1 1 0 0 1 0⎥ ⎥
⎢⎣0 1 1 1 0 0 1⎥⎦
↑ ↑ ↑
↑ ↑ ↑
↑ ↑ ↑
Rank of a Matrix
• The rank of a matrix is the number of maximum
number of linearly independent rows or columns of a
matrix.
– The column rank is the maximum number of
linearly independent columns
– The row rank is the maximum number of linearly
independent rows
– Row rank = column rank.
• For a (n-k) ×n H matrix, the row rank is (n-k).
• Therefore column rank = (n-k). Therefore we know
that we cannot find a set of n-k+1 linearly
independent column vectors in H.
Singleton Bound
m c m c
00 0000 α0 α01α2
01 011α α1 α101
0α 0ααα2 αα ααα20 dmin = 3 = 4-2+1
0α2 0α2α21 αα2 αα2αα
10 10α2α α20 α20α1
11 11α0 α21 α21α2α2
1α 1α11 α2α α2α0α
1α2 1α20α2 α2α2 α2α210
Example cont’d
⎡α 2 1 1 0⎤
H=⎢ ⎥
⎢⎣ α α 0 1⎥⎦
⎡α 2 ⎤ ⎡ 1 ⎤ ⎡0⎤ ⎡0⎤
α⎢ ⎥ + ⎢ ⎥ + ⎢ ⎥ = ⎢ ⎥
⎢⎣ α ⎥⎦ ⎣α ⎦ ⎣1⎦ ⎣0⎦
Hamming Spheres
i ⎛n⎞
t
Vq (n, t ) = ∑ (q − 1) ⎜⎜ ⎟⎟
i =0 ⎝i⎠
(this number includes the given codeword).
Example
• Error detection
– r = c+e
– S = rHT (this is called the syndrome).
– S = (c+e)HT = cHT+eHT = eHT.
– When the error pattern is all zero (no error has occurred,
then the syndrome is all zero).
– If the syndrome is not all zero, an error is detected.
– In automatic repeat request (ARQ) schemes, if the syndrome
is non-zero, the receiver requests that the sender resend the
codeword.
ELG 5372 Error
Control Coding
• Error Correction
– Standard Array
– Syndrome Decoding
Standard Array
⎡1 0 1 0 0⎤
⎡1 0 1 1 0⎤ ⎢ ⎥
G=⎢ ⎥ ⇒ H = ⎢1 1 0 1 0⎥
⎣0 1 0 1 1 ⎦ ⎢⎣0 1 0 0 1⎥⎦
Example: Syndromes (S=rHT)
S e
000 00000
001 00001
010 00010
100 00100
011 01000
110 10000
111 01100 or 10001
101 11000 or 00101
Performance of Linear Block Codes
• P(E) is the probability of decoder error (Word error
rate – WER)
– This is the probability that the codeword at the
output of the decoder is not the same as the
transmitted codeword.
• Pb is the probability of bit error.
– Probability that the decoded message bits are not
the same as the original message bits.
• Pu(E) is the probability of undetected error.
– Probability that errors occurring in a codeword are
not detected.
• Pd(E) is the probability of detected codeword error.
Performance of Linear Block Codes (2)
p0 0 1-p 0
p
p1 1 1
1-p
• r = c+e.
• S = rHT
• An error is detected if S ≠ 0.
• Therefore an error is undetected if the error pattern e is equal
to a codeword.
• For the BSC, Pu(E) is given by:
n
Pu ( E ) = ∑ i
A p i
(1 − p ) n −i
i = d min
Pd ( E ) = 1 − (1 − p ) n − Pu ( E )
Examples
• Suppose p =0.1.
– For Hamming (7,4), Pu(E) = 7p3(1-p)4+7p4(1-p)3+p7.
– Then Pu(E) = 0.0051 or 0.51%.
– For the (5,2) code given at beginning of lecture, Pu(E) =
2p3(1-p)2+p4(1-p) = 0.0017 = 0.17%.
– Is this a fair comparison?
• For these two examples, the probability of detected error would
be:
– Hamming (7,4), Pd(E) = 1-(1-p)7-Pu(E) = 0.5166
– (5,2) code Pd(E) = 1-(1-p)5-Pu(E) = 0.4078
Weight Distribution of the Code
i =0
• Where Ai is the number of codewords of weight i.
• For a linear block code A0 = 1 and for any code An = 0 or
1.
Bounds on Pu(E) and Pd(E)
i = d min ⎝ i ⎠ i =0 ⎝ i ⎠
d min −1 n
n ⎛n⎞ i ⎛ ⎞ i
Pd ( E ) ≥ 1 − (1 − p) − ∑ ⎜ ⎟ p (1 − p) = ∑ ⎜⎜ ⎟⎟ p (1 − p ) n −i
n
⎜ ⎟ n −i
i = d min ⎝ i ⎠ i =1 ⎝ i ⎠
Comparing bounds to actual values for
our examples
i =2 ⎝ i ⎠ i =0 ⎝ i ⎠
Error Correction Performance
⎡ 1 ⎛ 5⎞ i 3⎤
P(E ) = 1 − ⎢∑ ⎜⎜ ⎟⎟ p (1 − p ) + 2 p (1 − p ) ⎥
5−i 2
⎢⎣i =0 ⎝ i ⎠ ⎥⎦
Error correction performance
• In general
t ⎛n⎞ i
P ( E ) ≤ 1 − ∑ ⎜⎜ ⎟⎟ p (1 − p) n −i
i =0 ⎝ i ⎠
ELG 5372 Error
Control Coding
r ĉ=c+cc
decoder
Probability of bit error 2
• For block codes, how does bit error rate in decoded codeword
translate to bit error rate in decoded message?
• Let us consider systematic codes for ease of illustration.
• Assume that the all 0 codeword is transmitted. The first 4 bits
are the message.
• Let us assume that the decoded codeword has weight 3.
(therefore 3/7 of the code bits are in error).
Probability of bit error 7
0000000 0 1000110 3
0001101 3 1001011 4
0010111 4 1010001 3
0011010 3 1011100 4
0100011 3 1100101 4
0101110 4 1101000 3
0110100 3 1110010 4
0111001 4 1111111 7
Probability of bit error 8
3 ⎛7⎞ 2 5 ⎛ 3 4 ⎞⎛ 7 ⎞ 3 4 ⎛ 3 4 ⎞⎛ 7 ⎞ 4
Pb = ⎜⎜ ⎟⎟ p (1 − p ) + ⎜ 0.2 + 0.8 ⎟⎜⎜ ⎟⎟ p (1 − p ) + ⎜ 0.8 + 0.2 ⎟⎜⎜ ⎟⎟ p (1 − p ) 3
7 ⎝ 2⎠ ⎝ 7 7 ⎠⎝ 3 ⎠ ⎝ 7 7 ⎠⎝ 4 ⎠
4 ⎛7⎞ 5 2 ⎛7⎞ 6 ⎛7⎞ 7
+ ⎜⎜ ⎟⎟ p (1 − p ) + ⎜⎜ ⎟⎟ p (1 − p ) + ⎜⎜ ⎟⎟ p
7 ⎝5⎠ ⎝ 6⎠ ⎝7⎠
Pb = 9 p 2 (1 − p ) 5 + 19 p 3 (1 − p ) 4 + 16 p 4 (1 − p ) 3 + 12 p 5 (1 − p ) 2 + 7 p 6 (1 − p ) + p 7
• Of course, the above equation is for the case when the all 0
codeword is transmitted. By using distance rather than weight
arguments, we can show that this is the probability of bit error for
any transmitted codeword in the code.
Probability of bit error 10
• The equation derived for the bit error of probability for Hamming
(7,4) code is long and requires knowledge of the weight
distribution of the code.
• In many cases we don’t know the exact weight distribution of the
code.
• Therefore, Pb is estimated using bounds.
Probability of bit error bounds
1.00E-02
1.00E-03
p(uncoded)
P(E)
BER
(1/k)P(E)
exact
1.00E-04
1.00E-05
1.00E-06
0 2 4 6 8 10 12
Eb/No (in dB)
ELG 5372 Error
Control Coding
• Suppose we have f erasures and e errors, such that 2e+f < dmin.
• Replacing all erasures by 0 introduces e0 errors into the
received codeword, therefore we have e+e0 total errors. Also e0
≤ f.
• Replacing all erasures by 1 introduces e1 errors into the
received codeword, therefore we have e+e1 total errors. Also e1
≤ f and e0+e1 = f.
• In the worst case, e0 = e1 = f/2. therefore both words to be
decoded contain e+f/2 errors.
• If e0 ≠ e1, then there will be one of the words that has less than
e+f/2 errors. 2(e+f/2) = 2e+f < dmin. Therefore, there is always
one that is below the error correcting capability of the code.
Non Binary Erasure Decoding
• Extending a code
– An (n.k,d) code is extended by adding an additional
redundant coordinate to produce an (n+1,k,d+1) code.
– For example we can use even parity to extend Hamming
(7,4) to an (8,4) code with dmin = 4.
⎡1 0 0 0 1 1 0 1⎤ ⎡1 0 1 1 1 0 0 0⎤
⎢0 1 0 0 0 1 1 1⎥⎥ ⎢1 1 1 0 0 1 0 0⎥⎥
G=⎢ H=⎢
⎢0 0 1 0 1 1 1 0⎥ ⎢0 1 1 1 0 0 1 0⎥
⎢ ⎥ ⎢ ⎥
⎣0 0 0 1 1 0 1 1⎦ ⎣1 1 0 1 0 0 0 1⎦
Modifications to Linear Codes 2
• For linear block codes, the standard array (or the syndrome
lookup) can be used for decoding.
• However, for long codes, the storage and computation time of
this method can be prohibitive.
• There is no mechanism by which we can design a generator
matrix (or parity check matrix) to achieve a given minimum
distance.
• Cyclic codes are based on polynomial operations.
Basic Definitions
• (0001101) = x3+x4+x6.
• xc(x) =x4+x5+x7.
• (x7+x5+x4) ÷ (x7+1) = 1 remainder 1+x4+x5 = (1000110).
Rings
• A ring R is a set with two binary operations defined on it (+ and
•) such that
1. R is a commutative group over +. The additive identity is
denoted by 0.
2. The • operation (multiplication) is associative (a•b) •c = a•(b•c).
3. The left and right distributive laws apply:
• a•(b+c) = a•b+a•c
• (a+b) •c = a•c+b•c
4. The ring is said to be a commutative ring if a•b = b•a for every a
and b in R.
• The ring is a ring with identity if there exists a multiplicative
identity denoted as 1.
• Multiplication need not form a group and there may not be a
multiplicative inverse
Rings (2)
• Some elements in a ring with identity may have a multiplicative
inverse.
• For an a in R, if there exist another element such that a•a-1 = 1,
then a is referred to as a unit of R.
• Example: Z4
+ 0 1 2 3 • 0 1 2 3
0 0 1 2 3 0 0 0 0 0
1 1 2 3 0 1 0 1 2 3
2 2 3 0 1 2 0 2 0 2
3 3 0 1 2 3 0 3 2 1
• We can also show that GF(q =pm) form rings over + and •.
+ 0 1 × 0 1
0 0 1 0 0 0
1 1 0 1 0 1
+ S0 S1 S2 S3 S4 S5 S6 S7
S0 S0 S1 S2 S3 S4 S5 S6 S7
S1 S1 S0 S3 S2 S5 S4 S7 S6
S2 S2 S3 S0 S1 S6 S7 S4 S5
S3 S3 S2 S1 S0 S7 S6 S5 S4
S4 S4 S5 S6 S7 S0 S1 S2 S3
S5 S5 S4 S7 S6 S1 S0 S3 S2
S6 S6 S7 S4 S5 S2 S3 S0 S1
S7 S7 S6 S5 S4 S3 S2 S1 S0
Quotient Rings (4)
• S0 S1 S2 S3 S4 S5 S6 S7
S0 S0 S0 S0 S0 S0 S0 S0 S0
S1 S0 S1 S2 S3 S4 S5 S6 S7
S2 S0 S2 S4 S6 S1 S3 S5 S7
S3 S0 S3 S6 S5 S5 S6 S3 S0
S4 S0 S4 S1 S5 S2 S6 S3 S7
S5 S0 S5 S3 S6 S6 S3 S5 S0
S6 S0 S6 S5 S3 S3 S5 S6 S0
S7 S0 S7 S7 S0 S7 S0 S0 S7
Quotient Rings (5)
+ S0 S1 S2 S3 S4 S5 S6 S7
S0 S0 S1 S2 S3 S4 S5 S6 S7
S1 S1 S0 S3 S2 S5 S4 S7 S6
S2 S2 S3 S0 S1 S6 S7 S4 S5
S3 S3 S2 S1 S0 S7 S6 S5 S4
S4 S4 S5 S6 S7 S0 S1 S2 S3
S5 S5 S4 S7 S6 S1 S0 S3 S2
S6 S6 S7 S4 S5 S2 S3 S0 S1
S7 S7 S6 S5 S4 S3 S2 S1 S0
Quotient Ring Example
• S0 S1 S2 S3 S4 S5 S6 S7
S0 S0 S0 S0 S0 S0 S0 S0 S0
S1 S0 S1 S2 S3 S4 S5 S6 S7
S2 S0 S2 S4 S6 S1 S3 S5 S7
S3 S0 S3 S6 S5 S5 S6 S3 S0
S4 S0 S4 S1 S5 S2 S6 S3 S7
S5 S0 S5 S3 S6 S6 S3 S5 S0
S6 S0 S6 S5 S3 S3 S5 S6 S0
S7 S0 S7 S7 S0 S7 S0 S0 S7
Quotient Ring
• Recall the quotient ring R={S0, S1, …, S7}, where Si was the set
of all polynomials in GF(2)[x] whose remainder is i = ax2+bx+c
when divided by x3+1.
• Let’s identify each coset by its lowest degree polynomial
• S0 = 0, S1 = 1, S2 = x, S3 = x+1, S4 = x2, S5 = x2+1, S6 = x2+x and
S7 = x2+x+1.
• Let Rnew = {0, 1, x, x+1, x2, x2+1, x2+x, x2+x+1} where addition is
defined as conventional polynomial addition and multiplication is
conventional polynomial multiplication, both followed by
computing the remainder modulo x3+1.
• Then Rnew is a ring as well.
– We denote this ring as GF(2)[x]/(x3+1).
Quotient Ring
• Let R be a ring.
• Let I be a non empty subset of R
• I is an ideal if it satisfies the following conditions:
1. I forms a group under the addition operation of R
2. And any a in I and any r in R, a•r is in I.
Example
• x7-1 = (x+1)(x3+x+1)(x3+x2+1).
• (7,6) code: g(x) = x+1
• (7,4) code g1(x)= x3+x+1 or g2(x) = x3+x2+1.
• (7,3) code g3(x) = (x+1)(x3+x+1)=x4+x3+x2+1 or g4(x)
= (x+1)(x3+x2+1) = x4+x2+x+1
• (7,1) code: g5(x) = (x3+x+1)(x3+x2+1) =
x6+x5+x4+x3+x2+x+1.
ELG 5372 Error
Control Coding
⎡ g ( x) ⎤
⎢ xg ( x) ⎥
c( x) = [m0 m1 L mk −1 ]⎢ ⎥
⎢ M ⎥
⎢ k −1 ⎥
⎣ x g ( x)⎦
Nonsystematic Encoding of Cyclic Codes (2)
⎡g0 g1 L g n−k 0 0 0 L 0 ⎤
⎢0 g0 g1 L g n−k 0 0 L 0 ⎥
⎢ ⎥
c = [m0 m1 L mk −1 ]⎢ 0 0 g0 g1 L g n−k 0 L 0 ⎥
⎢ ⎥
⎢M M M M M M O M ⎥
⎢0 L g1 L g n − k ⎥⎦
⎣ 0 0 0 g0
c = mG
Example
⎡1 1 1 0 1 0 0⎤
G = ⎢⎢0 1 1 1 0 1 0⎥⎥
⎢⎣0 0 1 1 1 0 1⎥⎦
⎡1 0 1 1 0 0 0⎤
⎢0 1 0 1 1 0 0⎥⎥
H=⎢
⎢0 0 1 0 1 1 0⎥
⎢ ⎥
⎣0 0 0 1 0 1 1⎦
Example cont’d
⎡1 0 0 0⎤
⎢0 1 0 0⎥⎥
⎢
⎡1 1 1 0 1 0 0⎤ ⎢1 0 1 0 ⎥ ⎡0 0 0 0 ⎤
⎢ ⎥ ⎢ ⎥ ⎢ ⎥
GH = ⎢0 1 1 1 0 1 0⎥ ⎢1
T
1 0 1 ⎥ = ⎢0 0 0 0 ⎥
⎢⎣0 0 1 1 1 0 1⎥⎦ ⎢0 1 1 0⎥ ⎢⎣0 0 0 0⎥⎦
⎢ ⎥
⎢0 0 1 1⎥
⎢0 0 0 1⎥⎦
⎣
Generator Polynomial of Dual Code
0 000 0 0 0 0000000
• r(x) = x6+x3+x2+1.
• If y(x) contains no errors, x4m(x) = x6 and d(x) =
x3+x2+1.
• Dividing x6 by x4+x2+x+1 yields a remainder of
x3+x2+1. Therefore, we can conclude that y(x) is a
valid codeword and no error is detected.
• y(x) = x4+x+1.
• Dividing x4 by x4+x2+x+1 yields d(x) = x2+x+1 which
is not equal to x+1. Therefore an error is detected.
Introduction to Shift Registers
D + g
Non binary storage devices
MSB
LSB
Non binary addition
• Consider GF(4)
+ 0 1 α α2
00 01 10 11
0 0 1 α α2
00 00 01 10 11
1 1 0 α2 α
01 01 00 11 10
α α α2 0 1
10 10 11 00 01
α2 α2 α 1 0
11 11 10 01 00
Non binary addition
}
0 0 1 1
0 0 1 1
}b
1 1 0 0
a{
1 1 0 0
}
d
e = a XOR c and it is easy to show that f = b XOR d
Non binary multiplication
1 1 0 0 1 output
• State = 1001
• A delay of n time units is represented as xn.
• The polynomial output by the above circuit is 1+x3+x4. (First
element first representation). Or 1+x+x4 (last element first
representation).
Polynomial Multiplication
a(x) …
g0 g1 g2 gn
+ + … + b(x)
a3=1
1 1
1 1 1
+ 0 0 0 + b(x)
0
Example cont’d
a2=0
0 0
0 1
1 + 1 0 0 + 01
Example cont’d
a1=1
1 1
1 1
0 + 1 1 0 + 101
Example cont’d
a0=1
1 1
1 0
1 + 1 1 1 + 0101
Example cont’d
0 0
0 1
1 + 0 1 1 + 10101
Example cont’d
0 0
0 0
0 + 1 0 1 + 110101
Example cont’d
0 0
0 0
0 + 0 1 0 + 0110101
Example cont’d
0 0
0 0
0 + 0 0 1 + 10110101
1+x2+x3+x5+x7
Polynomial Multiplication First Element First
am, am-1, …, a0
…
gn gn-1 gn-2 g0
+ + … + b(x)
Polynomial Division
q(x)
Example
a4 a5 a6 a7 a8
a3=0
1 1
+ 0 0 + 0 0 1
1
1
Example cont’d
a2=1 1
1 0
+ 1 0 + 1 0 0
0
0
Example cont’d
a1=0 01
0 1
+ 1 1 + 0 1 0
0
0
Example cont’d
a0=1 001
0 0
+ 0 1 + 1 0 1
1
1
Example cont’d
x3
0 1001
0 0
+ 0 0 + 0 1 0
0
0
1+x3
Joint multiplication-division
+ + +
Non-Systematic Encoding of Cyclic Codes
+ +
Systematic Encoding of Cyclic Codes
g0 g1 g1 gn-k-1 x
+ + … + +
x
m0, m1, …, mk-1
x y
Codeword register
y
Initially all switches to x until message word is completely entered,
then all switches to y.
Example (7,4) code, g(x) = x3+x+1
0
1 1
1 0 1
0 + 0 +
1
1
101 1
0
1
0
1 1
1 0 1
1 + 1 +
0
1
10 1
0
1 1
Example (7,4) code, g(x) = x3+x+1
0
1 1
1 1 1
1 + 0 +
0
0
1 0
0
11 0
Example (7,4) code, g(x) = x3+x+1
0
1 1
1 0 1
1 + 0 +
0
1
1
0
110 1
Example (7,4) code, g(x) = x3+x+1
0
0
0 0 0
1 + 0 +
1
0
0
1101
0
0
0 0 0
0 + 1 +
0
0
0
11010
Example (7,4) code, g(x) = x3+x+1
0
0
0 1 1
0 + 0 +
0
0
0
110100
Example (7,4) code, g(x) = x3+x+1
0
0
0 0 0
0 + 0 +
0
0
0
1101001
Syndrome decoding
• For r(x) having syndrome s(x), rR(x) has syndrome s’(x) = xs(x)
mod g(x).
• Proof
– r(x) = q(x)g(x)+s(x)
– rR(x) = xr(x)-(xn-1)rn-1.
– rR(x) = q’(x)g(x)+s’(x) = x(q(x)g(x)+s(x))-(xn-1)rn-1
– xn-1 = g(x)h(x).
– Therefore q’(x)g(x)+s’(x) = x(q(x)g(x)+s(x))-g(x)h(x)rn-1
– xs(x) = (q’(x)-xq(x)+h(x)rn-1)g(x)+s’(x).
– Therefore, s’(x) is the remainder when we divide xs(x) by
g(x).
Syndrome calculation
Gate
+ Syndrome register
1
…
Error pattern Gate
Detection circuit 2
+ Buffer register +
Gate
2
Meggitt Decoder 2
• Consider the (7,4) single error correcting code for which g(x) =
x3+x+1.
• As we saw, for e(x) = x6, s(x) = x2+1. s0=1, s1=0 and s2=1.
• Therefore the decoder shifts the received word until the
syndrome x2+1 is detected (s0s1’s2).
• Let us assume that the received word is r(x) = x2.
Example
Initially gate 1
is on and gates
0 Gate 2 are off.
r(x) + 0 + 0 0
1
0 Gate
2
0
+ +
Gate
2
Example
r(x) Gate 0 +
+ 0 1
1
0 Gate
After the codeword 2
is shifted in, we 0
have s(x) = x2
in the syndrome 0
+ 0010000 +
register and the
received word in
Gate
the buffer register
2
Example
0 + 0 + 0 1
Gate 1 is then
0
switched off
and Gates 2
are switched 0
on. 0 0
+ 0010000 +
Example
0 + 1 + 1 0
0
0 00
+ 0001000 +
Example
0 + 0 + 1 1
0
0 000
+ 0000100 +
Example
0 + 1 + 1 1
0
0 0000
+ 0000010 +
Example
0 + 1 + 0 1
Here we add 1
x6 to the
shifted received 1
word to correct the
error. We must 1 00000
adjust the + 0000001 +
syndrome to
account for the change
Example
0 1+1
+ =0
+ 0 0
Rnew(x) =
0
r(x)+x6.
s’new(x) =
(xr(x)+xx6) 0
mod(x7+1) = 0 000000
s’(x)+1 + 00000000 +
• {1} → (x+1)
• {α, α4} → (x2+x+α5)
• {α2, α8} → (x2+x+α10)
• {α3, α12} → (x2+α10x+1)
• {α5} → (x+α5)
• {α6, α9} → (x2+α5x+1)
• {α7, α13} → (x2+α5x+α5)
• {α10} → (x+α10)
• {α11, α14} → (x2+α10x+α10)
α5 and α10 are elements in GF(16) with order 3, they are α and
α2 of GF(4).
Example
( ) = ∑e α
n n
S j = ∑ ei α j i
i
ij
(*)
i =1 i =1
( ) ( )
v v v
S j = ∑ eil α = ∑ eil α il = ∑ eil X l j
j il j
(**)
l =1 l =1 l =1
Λ ( x) = (1 − X 1 x)(1 − X 2 x) = 1 − ( X 1 + X 2 ) x + X 1 X 2 x 2
Λ1 = -(X1+X2) and Λ2 = X1X2
We can see that S1+Λ1 = 0
S2 = X12+X22, S2+2Λ2 = (X12+2X1X2+X22) = (X1+X2)2
S2+S1Λ1+2Λ2 = 0
Also S3+Λ1S2+Λ2S1 = 0
And S4+Λ1S3+Λ2S2 = 0
Finding the Error Locator Polynomial 2
⎡ S1 S2 S3 L Sv ⎤ ⎡ Λ v ⎤ ⎡ S v +1 ⎤
⎢S S3 S4 L S v +1 ⎥⎥ ⎢⎢ Λ v −1 ⎥⎥ ⎢S ⎥
⎢ 2 ⎢ v+2 ⎥
⎢ S3 S4 S5 L S v + 2 ⎥ ⎢Λ v − 2 ⎥ = − ⎢ S v + 3 ⎥
⎢ ⎥⎢ ⎥ ⎢ ⎥
⎢M M M O M ⎥⎢ M ⎥ ⎢ M ⎥
⎢Sv L S 2v −1 ⎥⎦ ⎢⎣ Λ1 ⎥⎦ ⎢ S 2v ⎥
⎣ S v +1 Sv+2 ⎣ ⎦
MvΛ = -S
Peterson-Gorenstein-Zierler Algorithm
• Set v = t
• Form Mv and determine if Mv is invertible (compute
det(Mv), if det(Mv) = 0, Mv is not invertible.
– If not invertible, it means there are less than t
errors
– Set v = t-1 and repeat step
• Once Mv is invertible, compute Λ = Mv-1(-S)
Example
⎡ α 7 α 14 ⎤
M 2 = ⎢ 14 6 ⎥
, det( M 2 ) = α 13
− α 13
=0
⎢⎣α α ⎥⎦
Example cont’d
⎢⎣α α ⎥⎦
13
⎡ 2⎤ ⎡ 8⎤
1 α 13
α α 4
α
M −21 = 9 ⎢ 2 ⎥=⎢ 8 7⎥
α ⎢⎣ α α ⎥⎦ ⎢⎣α α ⎥⎦
⎡Λ 2 ⎤ ⎡α 4 α 8 ⎤ ⎡α 13 ⎤ ⎡α 7 ⎤
Λ=⎢ ⎥=⎢ 8 ⎥⎢ 4 ⎥ = ⎢ ⎥
⎣ Λ1 ⎦ ⎢⎣α α ⎥⎦ ⎢⎣ α ⎥⎦ ⎢⎣ α ⎥⎦
7
Example 2 cont’d
k =1 : S1 + Λ1 = 0
k=2 : S 2 + S1Λ1 + 2Λ 2 = 0
M
k =v : S v + S v −1Λ1 + S v − 2 Λ 2 + ... + vΛ v = 0
k = v +1 : S v +1 + S v Λ1 + S v −1Λ 2 + ... + S1Λ v = 0
k =v+2 : S v + 2 + S v +1Λ1 + S v Λ 2 + ... + S 2 Λ v = 0
M
k = 2t S 2t + S 2t −1Λ1 + S v −1Λ 2 + ... + S 2t −v Λ v = 0
All the even equations are redundant
Newton’s identities minus redundant
equations
k =1 : S1 + Λ1 = 0
k =3 : S 3 + S 2 Λ1 + S1Λ 2 + Λ 3 = 0
M
k = 2t − 1 : S 2t −1 + S 2t − 2 Λ1 + ... + S t −1Λ t = 0
Newton’s identities minus redundant
equations in matrix form
• AΛ = -S
⎡ 1 0 0 0 L 0 0 ⎤
⎢ S ⎥ Λ
⎢ 2 S1 1 0 L 0 0 ⎥⎡ 1 ⎤ ⎡ S1 ⎤
⎢ S4 S3 S2 S1 1 L 0 ⎥ ⎢Λ 2 ⎥ ⎢ S ⎥
⎢ ⎥ ⎢ ⎥ = − ⎢ 3 ⎥
⎢ M M M M M M M ⎥⎢ M ⎥ ⎢ M ⎥
⎢ S 2t − 4 ⎥ ⎢ ⎥ ⎢ ⎥
S 2t − 5 S 2t − 6 S 2t − 7 L St −2 S t −3 ⎣ Λ t ⎦ ⎣ S 2t −1 ⎦
⎢ ⎥
⎢⎣ S 2t − 2 S 2t − 3 S 2t − 4 S 2t − 5 L St S t −1 ⎥⎦
Peterson Algorithm
r0 r1 r2 … rn-1 +
X If X = 1
+ Y=1, else Y=0
Λ1 Λ2 … Λv
β β2 βv
Berlekamp-Massey Algorithm
i =1
Berlekamp-Massey Algorithm 6
Lk −1
d k = S k − Sˆ k = ∑ i S k −i
Λ( k −1)
i =0
Let us produce a new polynomial Λ(k)(x) = Λ(k-1)(x)+AxlΛ(m-1)(x),
where A is some element in the field, l is an integer and
Λ(m-1)(x) is one of the prior error locator polynomials associated
with an non-zero discrepancy dm.
k Sk dk c(x) L p(x) dm
0 0 1 1 0 1 1
1 α α 1+αx 0 1 1
2 α2 0 1+αx 1 1 α
1+αx+α7x2.
• Therefore
0 = ΛvSj-v+Λv-1Sj-v+1+…+Λ1Sj-1+Sj. (***)
v
S j = − ∑ Λ i S j −i , j = v + 1, v + 2,...,2t (*)
i =1
j =0
(1 − x )mod x ⎡ 2t −1 ⎤
2t 2t
= 1, therefore ⎢(1 − x) ∑ x i ⎥ mod x 2t = 1 (2)
⎣ i =0 ⎦
Ω( x ) = (S ( x)Λ( x) ) mod x 2t
=
⎛
⎜
⎜
(
S1 + S 2 x + ... + S 2t x 2 t −
)
1 ⎛ v
⎜
⎞⎞
⎜ ∏ (1 − X i x) ⎟ ⎟ mod x 2t
⎟⎟
⎝ ⎝ i =1 ⎠⎠
⎛ 2t −1⎛ v ⎞ ⎛ v ⎞⎞
= ⎜ ∑ ⎜⎜ ∑ eil X l ⎟⎟ x ⎜⎜ ∏ (1 − X i x) ⎟⎟ ⎟ mod x 2t
j +1 j
⎜ j =0⎝ l =1 ⎠ ⎝ i =1 ⎟
⎝ ⎠⎠
⎛ v 2t −1 v ⎞
= ∑ eil X l ∑ ( X l x) ∏ (1 − X i x) ⎟ mod x 2t
⎜ j
(3)
⎜ l =1 ⎟
⎝ j =0 i =1 ⎠
Proof of Forney’s Algorithm 2
⎛ ⎞
⎜ ⎟
⎜ v ⎡ 2t −1 ⎤ v ⎟
Ω( x) = ⎜ ∑ eil X l ⎢(1 − X l x) ∑ ( X l x) ⎥∏ (1 − X l x) ⎟ mod x 2t
j
⎜ l =1 ⎢⎣ j =0 ⎥⎦ i =1 ⎟
⎜ 1 4 4 4 2 4 443 i ≠l ⎟
⎝ − ⎠
2t
1 ( X l x )
v
Ω( X k−1 ) = eik X k ∏ (1 − X l X k−1 ) (5)
i =1
i≠k
Proof of Forney’s Algorithm 4
v
Λ ( x) = ∏ (1 − X i x)
i =1
v v
Λ ' ( x) = −∑ X l ∏ (1 − X i x)
l =1 i =1
i ≠l
v v v
Λ ' ( X k−1 ) = −∑ X l ∏ (1 − X i X k−1 ) = − X k ∏ (1 − X i X k−1 )
l =1 i =1 i =1
i ≠l i≠k
Proof of Forney’s Algorithm 5
v
− eik X k ∏ (1 − X l X k−1 )
i =1
i≠k
− Ω( X k−1 ) / Λ ' ( X k−1 ) = v
= eik
− X k ∏ (1 − X l X k−1 )
i =1
i≠k
Example
• S(x) = α5+α2x+α6x3.
• And Λ(x) = 1+x+α4x2.
• Thus Ω(x) = (α5 + (α2+α5)x + (α9+α2)x2 + (α6+α6)x3 +
α6x4 + α3x5)mod x4 = (α5 + α3x + α6x4 + α3x5)mod x4 =
α5 + α3x.
• Lastly, Λ’(x) = 1.
• ei1 = Ω(X1-1) / Λ’(X1-1) = α5+α3α6 = α5+α2 = α3.
• ei2 = Ω(X2-1) / Λ’(X2-1) = α5+α3α4 = α5+1 = α4.
• Therefore e(x) = α3x+α4x3.
• We decode the received word as c(x) = r(x)+e(x) = 0.
ELG 5372 Error
Control Coding
+ 1
1101
0 0
+ 1
Example
+ 1
110 11
1 0
+ 0
Example
+ 0
11 0111
0 1
+ 0
Example
+ 0
1 000111
1 0
+ 1
Example
+ 0
0 10000111
1 1
+ 1
Example
+ 1
0 1010000111
0 1
+ 1
Example
+ 0
0 111010000111
0 0
+ 0
• ci(D) = m(D)gi(D).
• c1(D) = (1+D2+D3)(1+D+D2) = 1+D+D2+D2+D3+
D4+D3+D4+D5 = 1+D+D5 = 110001.
• C2(D) = (1+D2+D3)(1+D2) = 1+D2+D2+D4+D3+D5 =
1+D3+D4+D5 = 100111.
• Output = 11,10, 01, 01, 01, 11.
Example 2
m1
+ c2
m2
⎡1 1 + D D ⎤
c3 G=⎢ ⎥
+ ⎣ 0 D 1 ⎦
c = [c1 (D) c2 (D) c3 (D)]
m = [m1 (D) m2 (D)]
c = mG
Example 2
• m1(D) = 1+D+D2
• m2(D) = 1+D.
• c1(D) = 1+D+D2
• c2(D) = (1+D+D2)(1+D)+(1+D)D = 1+D+D2+D3.
• c3(D) = (1+D+D2)D +(1+D) = 1+D2+D3.
• Output = 111, 110, 111, 011
Encoder State
+ c1
m
+ c2
1/11 1/01
10
0/10
0/00 00 1/00 11 1/10
01 0/01
0/11
Example 2
c1
m1
+ c2
m2
+ c3
Trellis Diagram
+ +
m(D) = 1
g1(D) = 1 c1(D) = 1
g2(D) = D3/(1+D2+D3) c2(D) = D3/(1+D2+D3) =
D3+D5+D6+D7+….
ELG 5372 Error
Control Coding
+ c1
m
+ c2
+ c1
m +
c2
State Diagram for Ga(D)
1/11 1/01
10
0/10
0/00 00 1/00 11 1/10
01 0/01
0/11
State Diagram for Gb(D)
1/11 1/01
10
0/10
0/00 00 0/00 11 0/10
01 1/01
1/11
Comparison
• When comparing the state diagram of Ga(D) to that of
Gb(D), we see that some state changes are affected, but
the same outputs occur.
• For encoder a, if ma = 1000, output = 11,10, 11, 00
• For encoder b, if mb = 1010, output = 11, 10, 11, 00.
• This is because Gb(D) = T(D)Ga(D), where T(D) is a k × k
invertible matrix.
• Let ca = maGa(D) and cb = mbGb(D) = mbT(D)Ga(D) = ca if
mbT(D) = ma. If T(D) is invertible, then for every possible
ma, there is a distinct mb such that ma = mbT(D).
• In this example, T(D) = 1/(1+D2)
Example 2
m1 c1
m2 c2
+ + c3
Example 2 cont’d
+ c1
m1 + c2
c3
m2
G ( D) = [1 + D 2 1 + D]
+ c1
m
A code is catastrophic
If there exist a loop in the
+ c2 State diagram that has
A zero output weight for a
1/11 1/10 Non-zero input weight.
10
0/01
0/00 00 1/01 11 1/00
01 0/11
0/10
Catastrophic Codes cont’d
1/11
0 1 1/01
0/00
0/10
⎡γ 1 ( D) 0 0 L 0 0 0⎤
⎢ 0
⎢ γ 2 ( D) 0 L 0 0 0⎥⎥
Γ( D ) = ⎢ 0 0 γ 3 ( D) L 0 0 0⎥
⎢ ⎥
⎢ 0 0 L O M M M⎥
⎢ 0
⎣ 0 L 0 γ k ( D) L 0⎥⎦
Invariant Factor Decomposition 2
• The nonzero elements of Γ(D) are polynomials called
invariant factors of G(D).
• Then invariant factors satisfy the property that γi(D)
divides γi+1(D).
• If G(D) is rational, G(D) = A(D)Γ(D)B(D) is still true,
only Γ(D) is now rational and takes the form
⎡ α1 ( D ) 0 0 L 0 0 0⎤
⎢ β1 ( D ) ⎥
α 2 ( D)
⎢ 0
β 2 ( D)
0 L 0 0 0⎥
⎢ ⎥
Γ( D) = ⎢ 0 0
α3 ( D)
L 0 0 0⎥
β3 ( D)
⎢ ⎥
⎢ 0 0 L O M L M⎥
α k ( D)
⎢ 0 0 L L L 0⎥
⎣ βk ( D) ⎦
Invariant Factor Decomposition 3
⎡ G ' ( D) ⎤
B( D) = ⎢ ⎥
B
⎣ 2 ( D ) ⎦
⎡ α1 ( D ) 0 0 L 0 ⎤
⎢ β1 ( D ) ⎥
α 2 ( D)
⎢ 0
β 2 ( D)
0 L 0 ⎥
⎢ ⎥
Γ' ( D ) = ⎢ 0 0
α3 ( D)
L 0 ⎥
β3 ( D)
⎢ ⎥
⎢ M M M O M ⎥
⎢ 0 α k ( D) ⎥
0 0 L βk ( D) ⎦
⎣
Invariant Factor Decomposition 5
⎡ 1 D2 D⎤ ⎡D 2 0 ⎤ ⎡0 1 0⎤ ⎡1 0 D ⎤
G=⎢ ⎥=⎢ ⎥⎢ ⎥ +⎢ ⎥
⎢⎣ D 1 0 ⎥⎦ ⎢⎣ 0 D ⎥⎦ ⎣1 0 0 ⎦ ⎣ 0 1 0 ⎦
Basic Encoder Theorem 1 (BET1)
⎡ 1 D2 D⎤ ⎡D 2 0 ⎤ ⎡0 1 0⎤ ⎡1 0 D ⎤
G1 = ⎢ ⎥=⎢ ⎥⎢ ⎥ +⎢ ⎥
⎢⎣ D 1 0 ⎥⎦ ⎢⎣ 0 D ⎥⎦ ⎣1 0 0 ⎦ ⎣ 0 1 0 ⎦
⎡1 1 + D 2 + D 3 D + D 2 ⎤ ⎡D3 0 ⎤ ⎡0 1 0⎤ ⎡1 1 + D 2 D + D2 ⎤
G2 = ⎢ 2 ⎥
=⎢ +
3 ⎥ ⎢0 1 0 ⎥ ⎢ ⎥
⎣⎢0 D + D3 D ⎦⎥ ⎣⎢ 0 D ⎦⎥ ⎣ ⎦ ⎣⎢0 D D 2 ⎦⎥
Producing equivalent basic encoder of
reduced constraint length
11 10 10 10 10 10
01 01 01 01 01 01
10 01 01 01 01 01
10 10 10 10 10 10
00 00 00 00 00
01
11 11 11 11 11
11 11
11
00
11 11 11 11
00 00 00 00 00 00 00
Example
11 10 10 10 10 10
01 01 01 01 01 01
10 01 01 01 01 01
10 10 10 10 10 10
00 00 00 00 00
01
11 11 11 11 11
11 11
11
00
11 11 11 11
00 00 00 00 00 00 00
11 10 10 10 10 10
01 01 01 01 01 01
10 0 01 01 01 01 01
10 10 10 10 10 10
00 00 00 00 00
01
11 11 11 11 11
11 11
11
00
11 11 11 11
00 2 00 00 00 00 00 00
11 10 10 10 10 10
2
01 01 01 01 01 01
10 0 01 01 01 01 01
10 3 10 10 10 10 10
00 00 00 00 00
01
11 11 11 11 11
11 11 0
11
00
11 11 11 11
00 2 00 3 00 00 00 00 00
3
11 10 10 10 10 10
2 4
01 01 01 01 01 01
10 0 010 01 01 01 01
10 3 10 5 10 10 10 10
00 3 00 00 00 00
01 4
11 11 11 11 11
11 11 0
11
00
2 11 11 11 11
00 2 00 3 00 3 00 00 00 00
fr(ri|ci=0) fr(ri|ci=1)
1’’ 1’’’
-1 0 1 r
Maximum Likelihood Sequence Estimation
ci
0 0.47 0.25 0.139 0.085 0.0455 0.009 0.001 0.0005
ci
0 0.47 0.25 0.139 0.085 0.0455 0.009 0.001 0.0005
ci
0 -0.328 -0.612 -0.857 -1.07 -1.34 -2.05 -3 -3.3
ci
0 2.972 2.688 2.443 2.23 1.96 1.25 0.3 0
ci
0 59 54 49 45 39 25 6 0
1 0 6 25 39 45 49 54 59
Example
10 8810 10
154 10 37210 61110
302 573
00 21800 19400 40900 48400 698
01
11 143 11 433 11 390 11 570 11 662
11 11 212
11 243
00
11 202 11503 11 517 11 615
00 39 00 00 226 00 302 00 390 00 528 00 627
39+25+59=123
• Let v = (v1, v2, v3, … vL) and let u = (u1, u2, …, uL).
• The Euclidean distance between v and u is:
L
ED( v, u) = ∑ i i
( v − u ) 2
i =1
r = 2.05 0.3, 0.6 -1.8, -0.75 -0.5, 1.44 -1.3, -0.5 0.21, 0.55 1.8, -0.8 -0.2
01 0/01
0/11
The code transfer function tells us how many paths there are
of weight d as well as the weight of the message sequences
that produce this path.
Definition of a non-zero weight path
Any path that diverges and the remerges with the all-zero path
Transfer Function
• Find all the paths that diverge and then remerge with
all-zero state XY
11 Y
XY
XY2 Y Y2
00 10 01 00
X
This can be seen as a system with feedforward and feedback
loops. The transfer function T(X,Y) is the “gain” of the system.
Mason’s Rule
XY (1 − XY ) + X Y
5 2 6
XY 5
T ( X ,Y ) = = =
1 − 2 XY 1 − 2 XY
XY 5 + 2 X 2Y 6 + 4 X 3Y 7 + 8 X 4Y 8 + ...