commpy.channelcoding.viterbi_decode

viterbi_decode(coded_bits, trellis, tb_depth=None, decoding_type='hard')

Decodes a stream of convolutionally encoded bits using the Viterbi Algorithm

Parameters:
  • coded_bits (1D ndarray) – Stream of convolutionally encoded bits which are to be decoded.
  • generator_matrix (2D ndarray of ints) – Generator matrix G(D) of the convolutional code using which the input bits are to be decoded.
  • M (1D ndarray of ints) – Number of memory elements per input of the convolutional encoder.
  • tb_length (int) – Traceback depth (Typically set to 5*(M+1)).
  • decoding_type (str {'hard', 'unquantized'}) – The type of decoding to be used. ‘hard’ option is used for hard inputs (bits) to the decoder, e.g., BSC channel. ‘unquantized’ option is used for soft inputs (real numbers) to the decoder, e.g., BAWGN channel.
Returns:

decoded_bits – Decoded bit stream.

Return type:

1D ndarray

References

[1]Todd K. Moon. Error Correction Coding: Mathematical Methods and Algorithms. John Wiley and Sons, 2005.