ViterbiDecoder
ptolemy.actor.lib.comm.ViterbiDecoder

The Viterbi algorithm is an optimal way to decode convolutional and trellis codes. The code is specified jointly by the <i>uncodedRate</i> and <i>polynomialArray</i> parameters. To get a <i>k</i>/<i>n</i> code, set <i>uncodedRate</i> to <i>k</i> and give <i>n</i> integers in <i>polynomialArray</i>. See ConvolutionalCoder for details about the meaning of these parameters. On each firing, this actor will read <i>n</i> inputs and produce <i>k</i> outputs. <p> The decoder finds the most likely data sequence given noisy inputs by searching all possibilities and computing the distance between the codewords they produce and the observed noisy data. The sequence yielding the minimum distance is the decoded output. <p> There are two choices offered in this actor to compute the distance. If it the parameter <i>softDecoding</i> is set to be false, the input port will accept boolean tokens and compute the Hamming distance. If the parameter <i>softDecoding</i> is set to be true, the input port will accept double tokens and compute the Euclidean distance. The parameter <i>constellation</i> should be a double array of length 2. The first element specifies the amplitude of "false" input. The second element specifies the amplitude of "true" input. At this time, this actor can only handle binary antipodal constellations, but we expect to generalize this. <p> Soft decoding has lower probability of decoding error than hard decoding. But distance computation for hard decoding is easier, since it is based on bit operations. Moreover, hard decoding can be used when there is no direct observation of the noisy data, but only observations of a bit sequence that may have errors in it. With hard decoding, this actor serves the role of correcting errors. With soft decoding, it serves the role of reducing the likelyhood of errors. <p> There is some delay between the reading of input data and the production of decoded output data. That delay, which is called the <i>trace-back depth</i> or <i>truncation depth</i> of the decoder, is controlled by the <i>delay</i> parameter, which is required to be a positive integer. On the first <i>delay</i> firings of this actor, the outputs will be <i>false</i>. On each firing, the number of outputs produced is <i>uncodedRate</i>, so the output will have a prefix of <i>delay</i>*<i>uncodedRate</i> false-valued tokens before any decoded bits are produced. Larger values of <i>delay</i> generally reduce the probability of error. A good rule of thumb is to set <i>delay</i> to five times the highest order of all polynomials, provided that the convolutional code is a one that has good distance properties. <p> For more information on convolutional codes and Viterbi decoder, see the ConvolutionalCoder actor and Proakis, <i>Digital Communications</i>, Fourth Edition, McGraw-Hill, 2001, pp. 471-477 and pp. 482-485, or Barry, Lee and Messerschmitt, <i>Digital Communication</i>, Third Edition, Kluwer, 2004. <p>

Author(s): Ye Zhou, contributor: Edward A. Lee
Version:$Id: ViterbiDecoder.doc.html,v 1.1 2006/02/22 18:42:26 mangal Exp $
Pt.Proposed Rating:Yellow (eal)
Pt.Accepted Rating:Red (cxh)




polynomialArray
An array of integers defining polynomials with binary coefficients. The coefficients indicate the presence (1) or absence (0) of a tap in the shift register. Each element of this array parameter should be a positive integer. The default value is {05, 07}.
uncodedRate
Integer defining the number of bits produced at the output in each firing. It should be a positive integer. Its default value is 1.
delay
Integer defining the trace back depth of the viterbi decoder. It should be a positive integer. Its default value is the integer 10.
softDecoding
Boolean defining the decoding mode. If it is true, the decoder will do soft decoding, and the input data type will be double; otherwise it will do hard decoding, and the input data type will be boolean. The default value is false.
trellisDecoding
Boolean defining whether the decoder will do trellis decoding. If it is true, the input data and constellation type will be complex; otherwise, they follow the constraints set by <i>softDecoding</i>. This parameter is always set to "false" in ViterbiDecoder. It will always be set to "true" in TrellisDecoder subclass.
constellation
The constellation for soft decoding. Inputs are expected to be symbols from this constellation with added noise. This parameter should be a double array of length 2. The first element defines the amplitude of "false" input. The second element defines the amplitude of "true" input.