Title: Error Detection and Correction
1Error Detection and Correction
- Trac D. Tran
- ECE Department
- The Johns Hopkins University
- Baltimore, MD 21218
2Outline
- Motivation and background
- General communication system
- Objectives
- Assumptions
- Error detection
- Repetition
- Parity checking
- Examples
- Error correction
- Repetition
- Redundant-check code word
- Hamming error correction code
3Communication System
received signal
received message
message
signal
source
transmitter
receiver
destination
m
x
x
m
noise
communication channel
Examples of noisy communication channels
Robust communication over noisy channels
- 56K modem
- Radio link
- Cellular phone
- Disk drive or CD drive
- Physical solutions
- System solutions
4Main Concept
- System solution to robust communication
- Accept the given noisy channel, try to find
solutions to the detection and correction of
transmission errors - Additional computational load at the transmitter
and the receiver - Redundancy helps!
- Objectives
- Detection and correction of error introduced by
noisy channels - Efficient transmission of data (bandwidth
efficiency) - Fast simple encoding/decoding algorithms
- Error detection codes
- Add redundant check bits to detect bit error in
the transmission - Error correction codes
- More powerful not only detecting errors, but
also capable of correcting errors as well
5Assumptions
- All length-n code-words (consisting of n bits
0,1) sent over the channel will be received as
blocks of binary digits of length n no erasure
error - Probability of error for any single bit is
independent of the probability of error of any of
its neighbors - The channel is a binary symmetric channel (BSC)
p
0
0
error
1p
1p
1
1
p
Reliability of BSC
6Error Detection Codes Repetition
- Repetition
- Another example where is the error?
- Double bandwidth
- Cannot correct errors 00 or 11?
1 1 0 0 1 1 0 0 0 1 1 1
0 0 1 1 0 0 1 0 0 0 1 1
7Error Detection Codes Parity Check
- Parity-Check
- One redundant bit, called parity bit, per
code-word - Parity bit is based on the number of 1s and
whether the count should be even or odd - More bandwidth-efficient than the repetition
method - (N, K) code
- length-K source bits, length-N transmitted bits,
NgtK
(3,2) code
0 0 0 0 1 1 1 0 1 1 1 0
- Is error correction possible? 000 or 110 or 011?
0 1 0 0 1 1 1 0 1 1 1 0 1 0 0
(4,3) Parity error detection code 0 0 1 1 0 0
1 0 0 0 1 1
8Error Correction Codes Repetition
- Error correction
- More sophisticated then error detection can
correct bit error as well - Working principle relying on the redundant bits
to check and correct errors - Repetition codes
- (3,1) error correction code via repetition
1 1 1 0 0 0 1 1 1 0 0 0
- Triple the bandwidth!
- Majority-vote in correction
- No absolute immunity!
1 1 1 0 1 0 0 0 0 0 1 1
9Hamming Distance
- Number of differing digits between 2 code-words
- Examples d(01101,01100)1 d(01001,01100)2
d(000,111)3
d(011,110)d(011,101)d(101,110)2
10Error Detection Correction Capability
?
?
Maximum Likelihood Decoding
- minimum Hamming distance between valid
code-words - Number of bit errors that ECC can detect
- Number of bit errors that ECC can correct
- For an (N,K) block code, the code rate is
- Example (5,1) repetition code
11Single Parity-Check Code Revisit
- Single Parity-check Code (SPC)
- (N, N1) block code, appending a single parity
bit at the end to force even-parity overall - Construction
- Properties
- Rate
- Minimum Hamming distance
- Detection capability
- Correction capability
1 bit error
NO!
12Hamming Error Correction Code
- An (N, K) Hamming code has NK parity checking
bits
message bits
parity bits
check the odd parity of these 3 bits
K
NK
Inputs
Outputs
13Hamming ECC
Message Code-words 0000 0000000 0001
0001011 0010 0010111 0011
0011100 0100 0100101 0101
0101110 0110 0110010 0111
0111001 1000 1000110 1001
1001101 1010 1010001 1011
1011010 1100 1100011 1101
1101000 1110 1110100 1111
1111111
- Rate 4/7
- Additional cost of 3 bits per 4-bit message
- Minimum Hamming distance 3
- Can detect 2 bits of error
- Can correct a single bit error
14Hamming Encoder
inputs
outputs
Modulo-2 arithmetic
15Hamming ECC Decoding
16Hamming ECC Decoding
- Suppose that we only have at most 1 bit error per
block
Action
no error
- 0 0 0
- 0 0 1
- 0 1 0
- 0 0
- 0 1 1
- 0 1
- 1 1 0
- 1 1 1
- What if there are 2 bit errors?
17Hamming ECC Decoding Example
Send
Received
18Redundancy-Check Code
- Redundancy-check code-word
- Appends to the end of a data sequence
- Check code-word is computed from the data
code-words hence redundant! - Data code-words contains error detection to
identify the error bits that the check code-word
can then correct - Built on top of error detection
- Problem error correction fails when there are
more than one error occurring during
transmission. To correct multiple errors, we need
additional redundant bits (more check code-words
for example)
19Redundancy-Check Example
- Can only protect a short message
- More redundancy check code-words are needed for
better correction
Even 1s check
0 0 0 0 1 1 1 0 1 1 1 0
1 1 0
Even 1s check
redundancy-check code-word
Transmitted
0 0 0 0 1 1 1 0 1 1 1 0 1 1 0
Even 1s check
Received
0 1 0 0 1 1 1 0 1 1 1 0 1 1 0
compare
1 0
Even 1s check
Error occurs in 2nd bit position
20Reed-Solomon Code
- A generalization of Hamming codes
- Reed-Solomon error correction code
- has a different (larger) alphabet
- uses Modulo-N arithmetic
- used on CDs, in the transmission of information
from outer space (for instance, the Voyager
images)