Professional Documents
Culture Documents
Coding
• Diversity makes use of redundancy in terms of using
multiple signals to improve signal quality.
• Error control coding, as discussed in this lecture and
next, uses redundancy by sending extra data bits to
detect and correct bit errors.
• Two types of coding :
• Source coding – compressing a data source using encoding of
information
• Channel coding – encode information to be able to overcome bit
errors
• Now we focus on channel coding, also called error
2
control coding to overcome the bit errors of a channel.
Error Detection
5
• If we do nothing, then a significant amount of our data will be
corrupted
• It is more likely that a complete file would be transmitted with
corruption than without corruption.
6
• Error Detection
8
• The receiver separates the data bits and the error correction bits.
9
• So, this can be used to detect errors. For example,
a received 10100010 (when using even parity)
would be invalid.
• But what types of errors would NOT be
detected?
11
• Takes the source data and creates a sequence of bits that is only
valid if divisible by a predetermined number.
12
• Using the following definitions.
• So, C = 2n-km + F
• This means m is shifted by (n-k) bits and F is added to it.
• Example: m = 11111, F=101
13
• C = 11111000 + 101 = 11111101
14
• Using polynomial operations.
• In the example, m = 110101
• This could also be represented as a polynomial as
m(X) = X5+ X4+ X2+1
• From bit positions in P of order 0 to 5.
• Using polynomial operations indirectly performs modulo-2
arithmetic.
• CRC codes fail when a sequence of bit errors creates a
different bit sequence that is also divisible by P.
15
• It can be shown that the following errors can be prevented by
suitably chosen values for P, and the related P(X).
• All single bit errors will be detected.
• All double-bit errors.
• Any odd number of errors.
• Any burst error for which the length of the burst is less than or
equal to (n-k)
• This means the burst is less than the frame check sequence.
Definition : A burst error is a contiguous set of bits where all of the bits
are in error.
16
Different versions of P(X) are widely used (different bit
lengths).
• For example, CRC-16.
P(X) = X16+ X15+ X2+1
• Checksums
• The Internet Protocol uses a checksum approach.
• Only on the packet header information.
• All of the 16-bit words in the header are added
together.
• A checksum is then inserted into to the header.
• At the receiver, all of the 16-bit words are added
again, and this time (because the checksum was
inserted) should sum to zero.
17
Block Error Correction Codes
• Error detection requires blocks to be retransmitted.
1. The bit error rate can be quite high, which would
result in a large number of retransmissions.
2. In some cases, especially satellite links, the
propagation delay is very long compared to the
transmission time of a single frame. The result is a
very inefficient system.
18
• It is desirable to be
able to correct
errors without
requiring
retransmission.
• Using the bits
that were
transmitted.
19
• On transmission, the k-bit block of data is mapped into an
n-bit block called a codeword (C).
• Using an FEC encoder.
• A codeword may or may not be similar to those form
the CRC approach above.
• It may come from taking the original data and adding
extra bits (as with CRC). (systematic)
• Or it may be created using a completely new set of
bits. (Non-systematic)
23
• Block Code Principles
• Hamming Distance
• Given are two example sequences.
v1 = 011011, v2 = 110001
• The Hamming Distance is defined as the
number of bits which disagree.
d(v1 , v2 ) = 3
24
• Example: Given k = 2, n = 5
25
• Can the error be corrected?
• We cannot be sure.
• 1, 2, 3, 4, or even 5 bits may have been corrupted by
noise.
• However, only one bit is different between this and
00000.
d(00100,00000) = 1
• Two bits changes would have been required between
this and 00111.
d(00100,00111) = 2
• Three bits with 11110. d(00100,11110) = 3
• And four bits with 11001. d(00100,11001) = 4
26
• Thus the most likely codeword that was sent is
00000.
• The output from the decoder is then the data
block 00.
• But there we could be having a failed correction
and some other data block should have been
decoded.
• Decoding rule: Use the closest codeword (in terms
of Hamming distance).
• Why is it okay to do this? How much less likely are
two errors than one error? Assume BER = 10-3. 27
• Now, for all cases…
• There are five bits in the codeword, so there
are 25=32 possible received codewords.
• Four are valid, the other 28 would come
from bit errors.
• In many cases, a possible received codeword is
a Hamming distance of 1 from a valid
codeword.
28
29
• But in eight cases, a received codeword would be a
distance of 2 away from two valid codewords.
• The receiver does not know how to choose.
• A correction decision is undecided.
• An error is detected but not correctable.
• So, we can conclude that in this case an error of 1
bit is correctable, but not errors of two bits.
30
31
• Example: A 2/5 rate code over a 30 kbps channel.
32
• For a code consisting of codewords denoted wi, the minimum
Hamming distance is defined as
33
• From the example, tcorr = (3-1)/2 = 1 bit error can be corrected.
• A two-bit error will cause either an undecided correction or a
failed correction.
• The number of errors that can be detected is
34
• The following design considerations are involved with devising
codewords.
• For given values of n and k, we would like the largest possible
value of dmin.
• The code should be relatively easy to encode and decode, with
minimal memory and processing time.
• We would like the number of extra bits, (n-k) to be minimum to
preserve bandwidth.
• We would like the number of extra bits, (n-k) to be large to
reduce error rate.
• The last two objectives are in conflict.
35
• Coding Gain
36
37
• The coding gain of a code is defined as the
reduction in dB of Eb/N0 that is required to obtain
the same error rate.
• For example, for a BER of 10-6, 11 dB is needed for
the ½ rate code, as compared to 13.77 dB
without the coding.
• This is a coding gain of 2.77 dB.
• What is the coding gain at a BER of 10-3?
38