Encode the information symbols into Hamming code. Let k denotes parameter uncodedRate and n denotes parameter codedRate. During each firing, the actor consumes k bits and encode them into a block of code with length n. The rate of the code is k/n.
For a Hamming code, k and n must satisfy the following: n = 2m - 1 k = 2m - 1 - m; where m is any positive integer. Note m = n - k. It is called the order of the Hamming code. The lowest order is m = 2, and (n, k) = (3, 1).
The generator matrix G is defined as: Gk*n = [Ik | Pk*(n-k) ] where P is called the parity matrix. The subscript of a matrix indicates its dimension.
The parity check matrix H is defined as: H(n-k)*n = [PT | In-k ] Each column of H must be one of the non-zero n = 2m - 1 combinations of m bits.
To generate a Hamming code, the k information bits is considered as a row vector X. Its Hamming code is Y = X * G. Hence Y is a row vector of length n. The result is then sent to the output port in sequence.
For more information on Hamming codes, see Proakis, Digital Communications, Fourth Edition, McGraw-Hill, 2001, pp. 416-424.
Field Detail |
public VisualSim.data.expr.Parameter uncodedRate
public VisualSim.data.expr.Parameter codedRate
Created with the Personal Edition of HelpNDoc: Easily create CHM Help documents