Function File: t = poly2trellis (m, g)

Convert convolutional code generator polynomials into trellis form.

The arguments m and g together describe a rate k/n feedforward convolutional encoder. The optional argument f adds feedback support. The output t is a trellis structure describing the same encoder with the fields listed below.

The vector m is a k-by-1 array containing the lengths of each of the shift registers for the k input bits to the encoder.

The matrix g is a k-by-n octal-value matrix describing the generation of each of the n outputs from each of the k inputs. For a particular entry of g, the least-significant bit corresponds to the most-delayed input bit in the kth shift-register.

The optional vector f is a 1-by-k vector of octal numbers describing the feedback of each of the shift registers.

The returned trellis structure contains the following fields:

numInputSymbols

The number of k-bit input symbols possible, i.e. 2^k.

numOutputSymbols

The number of n-bit output symbols possible, i.e. 2^n.

numStates

The number of states in the trellis.

nextStates

The state transition table for the trellis. The ith row contains the indices of the states reachable from the (i-1)th state for each possible input symbol.

outputs

A table of octal-encoded output values for the trellis. The ith row contains values representing the output symbols produced in the (i-1)th state for each possible input symbol.

Input symbols, output symbols, and encoder states are all interpreted with the lowest indices being the most significant bits.

References:

[1] S. Lin and D. J. Costello, "Convolutional codes," in Error Control Coding, 2nd ed. Upper Saddle River, NJ: Pearson, 2004, ch. 11, pp. 453-513.

See also: istrellis.

Package: communications