II Linear Block Codes Last Lecture l What

II. Linear Block Codes

Last Lecture l What are Linear Block Codes? l Linear Systematic Block Codes l Generator Matrix and Encoding Process l Parity Check Matrix, Syndrome & Error Detection Process l Encoding Circuit & Syndrome Circuit © Tallal Elshabrawy 2

Hamming Weight and Hamming Distance Hamming Weight w(v): The number of nonzero components of v Hamming Distance d(v, w): The number of places where v and w differ Example: l v= (1 0 1 1 1 0 1): l w=(0 1 1 0 1): w(v)=5 d(v, w)=3 Important Remark: In GF(2) d(v, w)=w(v+w) In the example above v+w=(1 1 0 0 0) © Tallal Elshabrawy 3

Minimum Distance of a Block Code Minimum Distance of a block code (dmin): The minimum Hamming distance between any two code words in the code book of the block code For Linear Block Codes © Tallal Elshabrawy 4

Theorem Let C be an (n, k) linear block code with parity check matrix H. For each code word of Hamming weight l, there exists l columns of H such that the vector sum of these l columns is equal to the zero vector. PROOF: © Tallal Elshabrawy 5

Theorem (Cont’d) Conversely, if there exists l columns of H whose vector sum is the zero vector, there exists a codeword of Hamming weight l in C. PROOF: © Tallal Elshabrawy 6

Corollaries Given C is a linear block code with parity check matrix H. If no d-1 or fewer columns of H add to 0, the code has minimum weight of at least d. Given C is a linear block code with parity check matrix H. The minimum distance of C is equal to the smallest number of columns of H that sum to 0. © Tallal Elshabrawy 7

Example (7, 4) Linear Block Code l No all 0 column. No two columns are identical: l dmin>2 l Columns 0, 1, 3 sum to zero vector l dmin=3 © Tallal Elshabrawy 8

Error Detection Capability means: HOW MANY ERRORS ARE GUARANTEED TO BE DETECTED AT THE RECEIVER SIDE TWO Possibilities: v Channel r e v: transmitted codeword e: error pattern caused by channel r: received pattern If error pattern includes l errors: d(v, r)=l © Tallal Elshabrawy Number of errors (no. of 1 s in e) is smaller than dmin Number of errors (no. of 1 s in e) is greater than dmin You could be that r is not a valid codeword. There is a chance that r is a valid codeword (if e is a valid code word) THE ERROR IS GUARANTEED TO BE DETECTED THE ERROR PATTERN MIGHT NOT BE DETECTED absolutely sure 9

Error Detection Capability The “Error Detection Capability” of a code defines the number of errors that are GUARANTEED to be detected. For a code with minimum Hamming distance dmin: The error detection capability is dmin-1 © Tallal Elshabrawy 10

Number of Detectable Error Patterns An error pattern is defined as any nonzero ntuple that could affect a transmitted code word. For an (n, k) code: l There are 2 n-1 error patterns. Note that (0 0 0. . . 0) is not an error pattern l There are 2 k-1 undetectable error patterns. Note that (0 0 0. . . 0) is selected to be a valid codeword An (n, k) code has the ability to detect 2 n-2 k error patterns Example: A (7, 4) code is able to detect: 128 -16=112 error patterns © Tallal Elshabrawy 11

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)/2 x means floor(x) © Tallal Elshabrawy 12

Error Correction Capability: Proof Assume a Block Code with dmin Define a Positive Integer t such that: Assume w is also a valid codeword in C Triangle Inequality: v Channel r e v: transmitted codeword e: error pattern caused by channel r: received pattern Assume an error pattern with t’ errors Given that v and w are codewords If t’≤t © Tallal Elshabrawy 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 13

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+1 Example: If it is required for a code to correct 3 errors AND detect up to 6 errors then dmin must satisfy: dmin ≥ 10 Notes: 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 14

Quantization and Analogy to Error Correction and Detection Operation Correct Reception: The value received is identical to what has been transmitted Transmitter Side v 0=0 v 1=1 v 2=2 Receiver Side v 3=3 v*0=0 v*1=1 v*2=2 v*3=3 Channel © Tallal Elshabrawy 15

Quantization and Analogy to Error Correction and Detection Operation Error Detection: The value received IS NOT EQUAL to any of the valid representation levels ARQ: Request retransmission Transmitter Side v 0=0 v 1=1 v 2=2 Receiver Side v 3=3 v*0=0 v*1=1 v*2=2 v*3=3 Channel © Tallal Elshabrawy 16

Quantization and Analogy to Error Correction and Detection Operation Error Detection: The value received IS NOT EQUAL to any of the valid representation levels ARQ: Request retransmission Transmitter Side v 0=0 v 1=1 v 2=2 Receiver Side v 3=3 v*0=0 v*1=1 v*2=2 v*3=3 Channel © Tallal Elshabrawy 17

Quantization and Analogy to Error Correction and Detection Operation Un-Detected Errors: The value received IS a valid representation level. However, it is NOT what has been transmitted Transmitter Side v 0=0 v 1=1 v 2=2 Receiver Side v 3=3 v*0=0 v*1=1 v*2=2 v*3=3 Channel © Tallal Elshabrawy 18

Quantization and Analogy to Error Correction and Detection Operation 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 Transmitter Side v 0=0 v 1=1 v 2=2 Receiver Side v 3=3 v*0=0 v*1=1 D 0 D 1 v*2=2 D 2 v*3=3 D 3 Channel © Tallal Elshabrawy 19

Quantization and Analogy to Error Correction and Detection Operation 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 Transmitter Side v 0=0 v 1=1 v 2=2 Receiver Side v 3=3 v*0=0 v*1=1 D 0 D 1 v*2=2 D 2 v*3=3 D 3 Channel © Tallal Elshabrawy 20

Quantization and Analogy to Error Correction and Detection Operation False Correction: The error pushes the received value outside the decision zone of the representation level that has been transmitted. Transmitter Side v 0=0 v 1=1 v 2=2 Receiver Side v 3=3 v*0=0 v*1=1 D 0 D 1 v*2=2 D 2 v*3=3 D 3 Channel © Tallal Elshabrawy 21

Quantization and Analogy to Error Correction and Detection Operation False Correction: The error pushes the received value outside the decision zone of the representation level that has been transmitted. Transmitter Side v 0=0 v 1=1 v 2=2 Receiver Side v 3=3 v*0=0 v*1=1 D 0 D 1 v*2=2 D 2 v*3=3 D 3 Channel © Tallal Elshabrawy 22

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 Transmitter Side v 0=0 v 1=1 v 2=2 Receiver Side v 3=3 v*0=0 v*1=1 D 0 D 1 v*2=2 D 2 v*3=3 D 3 Channel © Tallal Elshabrawy 23

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 Transmitter Side v 0=0 v 1=1 v 2=2 Receiver Side v 3=3 Channel © Tallal Elshabrawy v*0=0 v*1=1 D 0 D 1 v*2=2 D 2 v*3=3 D 3 Error Correction 24

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 Transmitter Side v 0=0 v 1=1 v 2=2 Receiver Side v 3=3 v*0=0 v*1=1 D 0 D 1 v*2=2 D 2 v*3=3 D 3 Channel © Tallal Elshabrawy 25

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 Transmitter Side v 0=0 v 1=1 v 2=2 Receiver Side v 3=3 Channel © Tallal Elshabrawy v*0=0 v*1=1 D 0 D 1 v*2=2 D 2 v*3=3 D 3 False Error Correction 26

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 Transmitter Side v 0=0 v 1=1 v 2=2 Receiver Side v 3=3 Channel © Tallal Elshabrawy v*0=0 v*1=1 D 0 D 1 v*2=2 D 2 v*3=3 D 3 Error Detection and ARQ could be used 27
- Slides: 27