next up previous
Next: Information Theory Up: ADC (coding) Previous: Review of Probability Theory

Error Correcting Codes

Error-control codes:

Channel coding in a digital communication system:

 
Figure 1: Simplified model of a digital communication system.

Block codes

 figure158
Figure 2: A channel encoder that generates an (n,k) block code.

Code rate: tex2html_wrap1548
Channel data rate: tex2html_wrap1549
where tex2html_wrap_inline1572 denotes the bit rate of the information source.

Convolutional codes

 figure167
Figure 3: A convolutional encoder with memory M that encodes the incoming bits serially.

Modulo-2 arithmetic
- Taking the remainder when dividing by 2:
eqnarray172

Block codes
A binary block code C of block length n is a subset of the set of all binary n-tuples tex2html_wrap_inline1582 where tex2html_wrap_inline1584 for tex2html_wrap_inline1586. An n-tuple belonging to the code is called a codeword or code vector of the code.

If the subset is a vector space over {0,1}, the binary block code is then a linear block code.

Minimum Hamming distance
The Hamming weight of an n-tuple tex2html_wrap_inline1592, tex2html_wrap_inline1594, is the number of nonzero components of the n-tuple.

The Hamming distance between any two n-tuples tex2html_wrap_inline1600 and tex2html_wrap_inline1602, denoted tex2html_wrap_inline1604, is the number of positions in which their components differ. It is clear that tex2html_wrap_inline1606 where tex2html_wrap_inline1608 is defined as tex2html_wrap_inline1610 (a component-by-component subtraction).

The minimum Hamming distance, tex2html_wrap_inline1612, of the block code C is the smallest Hamming distance between pairs of distinct codewords.

Example tex2html_wrap_inline1616.
eqnarray199

Correction and detection ability of a block code
When tex2html_wrap_inline1618 is the actual codeword and tex2html_wrap_inline1620 its possible corrupted received version, then the error pattern tex2html_wrap_inline1622 is the n-tuple defined by
displaymath1554
The number of errors is just tex2html_wrap_inline1626.

Error detection We say that a code can detect all patterns of t or fewer errors if the decoder chosen never incorrectly decodes whenever the number of errors is less than or equal to t.
theo213

Error correction We say that a code can correct all patterns of t or fewer errors if the decoder chosen correctly decodes whenever the number of errors is less than or equal to t.
theo218
The implicit decoding rule: decode tex2html_wrap_inline1620 to the nearest codeword in terms of Hamming distance.

Linear codes
A binary block code C is linear if, for tex2html_wrap_inline1618 and tex2html_wrap_inline1654 in C, tex2html_wrap_inline1658 is also in C.

The minimum Hamming distance of a linear block code is equal to the smallest weight of the nonzero codewords in the code.

Example tex2html_wrap_inline1662 is a linear code because tex2html_wrap1550 etc.

If we take k n-tuples tex2html_wrap_inline1668, tex2html_wrap_inline1670 tex2html_wrap_inline1672, tex2html_wrap_inline1674 that are linearly independent and form a matrix
displaymath1555

An (n,k) block code may then be conveniently represented as
displaymath1556
where tex2html_wrap_inline1676 is the codeword corresponding to the message block tex2html_wrap_inline1678.

G is called the generator matrix of the code.

A code is systematic if the generator matrix G is of the form
displaymath1557
i.e., tex2html_wrap_inline1684 where tex2html_wrap_inline1686 is a tex2html_wrap_inline1688 identity matrix and P is an tex2html_wrap_inline1692 matrix. The generator matrix is also said to be systematic.

In a systematic code, the first k bits of the codeword is the same as the corresponding message bits.

For the generator matrix G of a linear code, there exists an tex2html_wrap_inline1698 matrix, H, whose n-k rows are linearly independent such that
displaymath1558
The matrix H is called the parity check matrix of the code.

For any codeword tex2html_wrap_inline1706 in the code,
displaymath1559

If the code is systematic,
displaymath1560
where tex2html_wrap_inline1708 is an tex2html_wrap_inline1710 identity matrix.

Clearly, the n-k rows are linearly independent and
eqnarray271


theo281

Syndrome decoding
Given a received vector tex2html_wrap_inline1716, the receiver has the task of decoding tex2html_wrap_inline1706 from tex2html_wrap_inline1620.

Syndrome:
eqnarray289

Standard array for an (n,k) linear code:

  1. The tex2html_wrap_inline1724 codewords are placed in a row with all-zero codeword tex2html_wrap_inline1726 as the left-most one.
  2. An error pattern tex2html_wrap_inline1728 is picked and placed under tex2html_wrap_inline1726, and a second row is formed by adding tex2html_wrap_inline1728 to each of the remaining codewords in the first row. (tex2html_wrap_inline1728 has not appeared previously and has the least minimum Hamming weight.)
  3. Step 2 is repeated until all the possible error patterns have been account for.
Each row in the standard array is called a coset. The left-most element of a row is called the coset leader of the coset. Note that each coset has a unique syndrome.

Syndrome decoding for an (n,k) linear block code:

  1. For the received vector tex2html_wrap_inline1620, compute the syndrome tex2html_wrap_inline1740.
  2. Within the coset characterized by the syndrome tex2html_wrap_inline1742, identify the coset leader; call it tex2html_wrap_inline1744.
  3. Compute the codeword
    displaymath1561
    as the decoded version of the received vector tex2html_wrap_inline1620.

Example Consider the (6,3) linear code generated by the following matrix
displaymath1748
We then have the parity check matrix
displaymath1750

Standard array for the (6,3) linear code:

tabular332

theo335

Example (cont.) If the code is used for error correction on a BSC with transition probability p, the probability that the decoder decodes correctly is
displaymath1756
The probability that the decoder commits an erroneous decoding is then
displaymath1758
To minimize tex2html_wrap_inline1760, the error patterns that are mostly likely to occur for a given channel should be chosen as the coset leaders.

Example The generator matrix for the the repetition code of length 3 ({ 000, 111 } ) is
displaymath1762
Therefore, the parity check matrix of the code is
displaymath1764

tabular342

Hamming codes
For any positive tex2html_wrap_inline1768, there exists a Hamming code (a tex2html_wrap_inline1770 linear code) with the following parameters:

tabular349

The parity check matrix H of this code consists of all the nonzero m-tuple as its columns. In systematic form, the columns of H are arranged in the following form:
displaymath1786
where tex2html_wrap_inline1788 is an tex2html_wrap_inline1790 identity matrix and the submatrix Q consists of tex2html_wrap_inline1794 columns which are the m-tuples of weight 2 or more.

Dual codes
An (n,k) linear code with generator matrix G and parity check matrix H has a dual code that is a (n,n-k) linear code with generator matrix H and parity matrix G.

Example The even parity check code of length is generated by
displaymath1808
The parity check matrix is [1 1 1] which is the generator matrix of the repetition code of length 3. This code is a dual code of the repetition code of length 3.


next up previous
Next: Information Theory Up: ADC (coding) Previous: Review of Probability Theory

Updated Oct. 1996