ii. linear block codes
DESCRIPTION
II. Linear Block Codes. Last Lecture. H Matrix and Calculation of d min Error Detection Capability Error Correction Capability Error Correction & Error Detection Operation. Decoding and Error Correction. - PowerPoint PPT PresentationTRANSCRIPT
II. Linear Block Codes
© Tallal Elshabrawy 2
Last Lecture H Matrix and Calculation of dmin
Error Detection Capability
© Tallal Elshabrawy 3
Error Correction Capability
The “error correction capability” defines the number of errors that are GUARANTEED to be corrected.
For a code with minimum Hamming distance dmin:
The error correction capability is (dmin-1)/2x means floor(x)
© Tallal Elshabrawy 4
Assume w is also a valid codeword in CTriangle Inequality:
Error Correction Capability: Proof
i.e., if an error pattern of t or fewer errors occur, the received vector r MUST BE closer to v than to any other codeword in C
Channelve
r
v: transmitted codeworde: error pattern caused by channelr: received pattern
Assume a Block Code with dminDefine a Positive Integer t such that:
min2t 1 d 2t 2
d d d v,r w,r v,wAssume an error pattern with t’ errors d v,r t'
Given that v and w are codewords d mindv,w
d dd
mind 2t 12t 1 t'
v,r w,rw,r
If t’≤t d mind 1t, t 2w,r
© Tallal Elshabrawy 5
Error Correction & Error Detection Capability
Some codes are designed such that they can GUARANTEE correction of λ or fewer errors AND detection of up to l>λ
For a code with minimum Hamming distance dmin:
If the code could correct λ and detect up to l then dmin≥ λ+l+1Example: If it is required for a code to correct 3 errors AND detect up to 6 errors then dmin must satisfy: dmin ≥10Notes: In the example above,
If the number of errors are 3 or less: you can provide a GUARNTEE to correct all of them.If the number of errors are from 4 to 6: you can provide a GUARNTEE to detect that the number of errors are between 4 to 6 without being able to correct ANY of them.If the number of errors are greater than 6: there is NO GUARANTEE that you would be able to detect or correct the errors
© Tallal Elshabrawy 6
v0=0 v1=1 v2=2 v3=3 v*0=0 v*
1=1 v*2=2 v*
3=3Transmitter Side Receiver Side
Quantization and Analogy to Error Correction and Detection Operation
Correct Reception:The value received is identical to what has been transmitted
Channel
© Tallal Elshabrawy 7
Error Detection:The value received IS NOT EQUAL to any of the valid representation levelsARQ: Request retransmission
v0=0 v1=1 v2=2 v3=3 v*0=0 v*
1=1 v*2=2 v*
3=3Transmitter Side Receiver Side
Channel
Quantization and Analogy to Error Correction and Detection Operation
© Tallal Elshabrawy 8
Error Detection:The value received IS NOT EQUAL to any of the valid representation levelsARQ: Request retransmission
v0=0 v1=1 v2=2 v3=3 v*0=0 v*
1=1 v*2=2 v*
3=3Transmitter Side Receiver Side
Channel
Quantization and Analogy to Error Correction and Detection Operation
© Tallal Elshabrawy 9
Un-Detected Errors:The value received IS a valid representation level. However, it is NOT what has been transmitted
v0=0 v1=1 v2=2 v3=3 v*0=0 v*
1=1 v*2=2 v*
3=3Transmitter Side Receiver Side
Channel
Quantization and Analogy to Error Correction and Detection Operation
© Tallal Elshabrawy 10
Error Correction:Approximate the received value to the closest valid representation level.FEC: The receiver defines decision zones and maps ANY received value to a valid representation level. ARQ cannot be applied
v0=0 v1=1 v2=2 v3=3 v*0=0 v*
1=1 v*2=2 v*
3=3Transmitter Side Receiver Side
Channel
D0 D1 D2 D3
Quantization and Analogy to Error Correction and Detection Operation
© Tallal Elshabrawy 11
Error Correction:Approximate the received value to the closest valid representation level.FEC: The receiver defines decision zones and maps ANY received value to a valid representation level. ARQ cannot be applied
v0=0 v1=1 v2=2 v3=3 v*0=0 v*
1=1 v*2=2 v*
3=3Transmitter Side Receiver Side
Channel
D0 D1 D2 D3
Quantization and Analogy to Error Correction and Detection Operation
© Tallal Elshabrawy 12
False Correction:The error pushes the received value outside the decision zone of the representation level that has been transmitted.
v0=0 v1=1 v2=2 v3=3 v*0=0 v*
1=1 v*2=2 v*
3=3Transmitter Side Receiver Side
Channel
D0 D1 D2 D3
Quantization and Analogy to Error Correction and Detection Operation
© Tallal Elshabrawy 13
False Correction:The error pushes the received value outside the decision zone of the representation level that has been transmitted.
v0=0 v1=1 v2=2 v3=3 v*0=0 v*
1=1 v*2=2 v*
3=3Transmitter Side Receiver Side
Channel
D0 D1 D2 D3
Quantization and Analogy to Error Correction and Detection Operation
© Tallal Elshabrawy 14
Error Correction and Error Detection:Defines two types of decision zone such that both FEC and ARQ could be used dependent on the received value
v0=0 v1=1 v2=2 v3=3Transmitter Side Receiver Side
Channel
D0 D1 D2 D3
v*0=0 v*
1=1 v*2=2 v*
3=3
Quantization and Analogy to Error Correction and Detection Operation
© Tallal Elshabrawy 15
v0=0 v1=1 v2=2 v3=3Transmitter Side Receiver Side
Channel
D0 D1 D2 D3
v*0=0 v*
1=1 v*2=2 v*
3=3
Error Correction and Error Detection:Defines two types of decision zone such that both FEC and ARQ could be used dependent on the received value
Quantization and Analogy to Error Correction and Detection Operation
Error Correction
© Tallal Elshabrawy 16
v0=0 v1=1 v2=2 v3=3Transmitter Side Receiver Side
Channel
D0 D1 D2 D3
v*0=0 v*
1=1 v*2=2 v*
3=3
Error Correction and Error Detection:Defines two types of decision zone such that both FEC and ARQ could be used dependent on the received value
Quantization and Analogy to Error Correction and Detection Operation
© Tallal Elshabrawy 17
v0=0 v1=1 v2=2 v3=3Transmitter Side Receiver Side
Channel
D0 D1 D2 D3
v*0=0 v*
1=1 v*2=2 v*
3=3
Error Correction and Error Detection:Defines two types of decision zone such that both FEC and ARQ could be used dependent on the received value
Quantization and Analogy to Error Correction and Detection Operation
False Error Correction
© Tallal Elshabrawy 18
v0=0 v1=1 v2=2 v3=3Transmitter Side Receiver Side
Channel
D0 D1 D2 D3
v*0=0 v*
1=1 v*2=2 v*
3=3
Quantization and Analogy to Error Correction and Detection Operation
Error Correction and Error Detection:Defines two types of decision zone such that both FEC and ARQ could be used dependent on the received value
Error Detection and ARQ could be used
© Tallal Elshabrawy 19
Decoding: A rule to partition 2n possible received vectors into 2k
disjoint subsets D1, D2,…,D2k such that the codeword vi is contained in the subset Di, 1≤i ≤2k
Let C be an (n,k) linear block code with codewords v1, v2,…,v2k
Channelve
r Decoder
Which vi was sent??2k codewords 2n n-tuples
Decoding Rule: ivr s Decision i⇒Decoding D∈If i
Correct Decoding: Given vi is transmitted, error pattern e does not push r outside Di
Decoding and Error Correction
© Tallal Elshabrawy 20
Design of a Decoder
How to divide 2n vectors into 2k disjoint subsets such that the error correcting capability is optimal?In other words, which n-tuples should be designed such that they belong to a given subset Di?
© Tallal Elshabrawy 21
Standard Array
Partitioning 2n possible received vectors into 2k disjoint subsets with each subset containing only one codeword
kn-kn-kn-kn-k
k
k
k
22i2222
23i3233
22i2222
2i2
+...+...+..
.
...
.
...
.
.+...+...++...+...+
......=
vevevee
veveveevevevee
vvv0v1
D1 D2 Di D2k
© Tallal Elshabrawy 22
Standard Array
Partitioning 2n possible received vectors into 2k disjoint subsets with each subset containing only one codeword
kn-kn-kn-kn-k
k
k
k
22i2222
23i3233
22i2222
2i2
+...+...+..
.
...
.
...
.
.+...+...++...+...+
......=
vevevee
veveveevevevee
vvv0v1e2≠v1,v2,…,v2k
D1 D2 Di D2k
© Tallal Elshabrawy 23
Standard Array
Partitioning 2n possible received vectors into 2k disjoint subsets with each subset containing only one codeword
kn-kn-kn-kn-k
k
k
k
22i2222
23i3233
22i2222
2i2
+...+...+..
.
...
.
...
.
.+...+...++...+...+
......=
vevevee
veveveevevevee
vvv0v1
e3≠v1,v2,…,v2k,e2,…,e2+v2k
D1 D2 Di D2k
© Tallal Elshabrawy 24
Standard Array
Partitioning 2n possible received vectors into 2k disjoint subsets with each subset containing only one codeword
kn-kn-kn-kn-k
k
k
k
22i2222
23i3233
22i2222
2i2
+...+...+..
.
...
.
...
.
.+...+...++...+...+
......=
vevevee
veveveevevevee
vvv0v1
e2n-k ≠Any previous element in the array
D1 D2 Di D2k
© Tallal Elshabrawy 25
Theorem
1. No two n-tuples in the same row of a standard array are identical.
2. Every n-tuple appears in one and only one row.
PROOF:1. Given a linear block code is considered. By definition of
the standard array construction, ej is not a codeword. Therefore, ej+ vj generate distinct patterns
2. Select row l<m, assume el+vi= em+vj. Therefore,em= el+vi+vjem= el+vs (because vi and vj are codewords)This means that em could be found in row lThis is a contradiction to the construction rule of the standard array
© Tallal Elshabrawy 26
Standard Array
Partitioning 2n possible received vectors into 2k disjoint subsets with each subset containing only one codeword
kn-kn-kn-kn-k
k
k
k
22i2222
23i3233
22i2222
2i2
+...+...+..
.
...
.
...
.
.+...+...++...+...+
......=
vevevee
veveveevevevee
vvv0v1
e2n-k ≠Any previous element in the array
D1 D2 Di D2k
© Tallal Elshabrawy 27
Coset of a Code, Coset Leader
Given the standard array. The 2n-k rows are called the cosets of the code. The first n-tuple ej of each coset is called the coset leader
© Tallal Elshabrawy 28
Error Correction
DECODINGFALSE ⇒≠Det Dn the subsis found i+=
++=+=⇒+=
cosetlis in the or patternAssume errDECODING⇒FALSE a is notor patternIf the errDECODING⇒CORRECT is a or patternIf the err
s Decision i⇒Decoding DIf
js
sl
ilj
jil
th
i
rve
vevxvrvex
xleader coset
leader cosetvr i∈
A Linear block code can correct 2n-k-1 error patterns corresponding to 2n-k-1 coset leadersNote that one of the coset leaders is the zero vector
© Tallal Elshabrawy 29
Error Correction MethodologyThe error patterns that are most likely to occur should be used as the coset leaders
Example: A (7,4) code can correct 2(7-4)-1=7 error patternsTo correct a single error. The coset leaders should be selected as:
e1= v1= (0 0 0 0 0 0 0)e2 =(0 0 0 0 0 0 1)e3 =(0 0 0 0 0 1 0)e4 =(0 0 0 0 1 0 0)e5 =(0 0 0 1 0 0 0)e6 =(0 0 1 0 0 0 0)e7 =(0 1 0 0 0 0 0)e8 =(1 0 0 0 0 0 0)
© Tallal Elshabrawy 30
Theorem
1. All 2k n-tuples of a coset have the same syndrome. 2. The syndrome for different cosets are different
PROOF:1. (el+vi)HT=elHT+viHT=elHT (independent of vi)2. Let ej and ei be the coset leaders. If they have the same
syndromeejHT+eiHT=0. Therefore,(ej+ei) is a codewordThis contradicts the definition of a linear block code because ej and ei are not codewords
Advantages: We can use a syndrome decoding table which is much simpler to use than a standard array
© Tallal Elshabrawy 31
Syndrome Decoding
1. Compute syndrome of r (i.e., rHT)2. Locate the coset leader el whose syndrome is
equal to rHT
3. v*= r+el where v* is the codeword output by the decoder