<< Chapter < Page | Chapter >> Page > |
In effect, at the end of every calculation,
the answer is taken modulo 2.For instance, in standard arithmetic,
.
The correct code word
is found by reducing each
calculation modulo 2. In M
atlab , this is done with
mod(x4*g,2)
where
x4=[1,1]
and
g
is
defined as in
[link] . In modulo
2 arithmetic, 1 represents any odd number and0 represents any even number. This is also true for
negative numbers so that, for instance,
and
.
After transmission, the received signal is multiplied by . If there were no errors in transmission, then is equal to one of the four code words . With defined as in [link] , , where the arithmetic is binary, and where 0 means thezero vector of size 1 by 3 (in general, 1 by ). Thus and the received signal is one of the code words.
However, when there are errors, , and the value can be used to determine the most likely errorto have occurred. To see how this works, rewrite
where represents the error(s) that have occurred in the transmission. Note that
since . The value of is used by looking in the syndrome [link] . For example, suppose that the symbol is transmitted using the code . But an error occurs in transmission so that is received. Multiplication by the parity check matrix gives . Looking this up in the syndrome table shows that the most likely error was 10000.Accordingly, the most likely code word to have been transmitted was , which is indeed the correct code word .
Syndrome Most lik | Most likely error |
000 | 00000 |
001 | 00001 |
010 | 00010 |
011 | 01000 |
100 | 00100 |
101 | 10000 |
110 | 11000 |
111 | 10010 |
On the other hand, if more than one error occurred in a single symbol, then the (5,2) code cannot necessarilyfind the correct code word. For example, suppose that the symbol is transmitted using the code but that two errors occur in transmission so that is received. Multiplication by the parity check matrix gives . Looking this up in the syndrome table shows that the most likely error was 10010.Accordingly, the most likely symbol to have been transmitted was , which is the code word corresponding to the symbol , and not .
The syndrome table can be built as follows. First, take each possible single error pattern, that is, each ofthe 's with exactly one 1, and calculate for each. As long as the columns of are nonzero and distinct, each error pattern corresponds to a different syndrome.To fill out the remainder of the table, take each of the possible double errors (each of the 's with exactly two 1's) and calculate . Pick two that correspond to the remaining unused syndromes.Since there are many more possible double errors than there are syndromes ( ), these are beyond the ability of the code to correct.
The M
atlab program
blockcode52.m
shows details of how this
encoding and decoding proceeds. The first part defines the relevantparameters of the
binary linear block code: the generator
g
,
the parity check matrix
h
, and the syndrome table
syn
.
The rows of
syn
are ordered
so that the binary digits of
can be
used to directly index into the table.
Notification Switch
Would you like to follow the 'Software receiver design' conversation and receive update notifications?