Skip to content

komm.BCJRDecoder

Bahl–Cocke–Jelinek–Raviv (BCJR) decoder for terminated convolutional codes. For more details, see LC04, Sec. 12.6.

Parameters:

  • code (TerminatedConvolutionalCode)

    The terminated convolutional code to be used for decoding.

  • snr (float)

    The signal-to-noise ratio (SNR) of the channel (linear, not decibel).

Notes
  • Input type: soft.
  • Output type: soft.

__call__

Decode received words. This method takes one or more sequences of received words and returns their corresponding estimated message sequences.

Parameters:

  • input (ArrayLike)

    The input sequence(s). Can be either a single sequence whose length is a multiple of $n$, or a multidimensional array where the last dimension is a multiple of $n$.

Returns:

  • output (NDArray[integer | floating])

    The output sequence(s). Has the same shape as the input, with the last dimension contracted from $bn$ to $bk$, where $b$ is a positive integer.

Examples:

>>> convolutional_code = komm.ConvolutionalCode(feedforward_polynomials=[[0b11, 0b1]], feedback_polynomials=[0b11, 0b11])
>>> code = komm.TerminatedConvolutionalCode(convolutional_code, num_blocks=3, mode="zero-termination")
>>> decoder = komm.BCJRDecoder(code, snr=0.25)
>>> decoder([-0.8, -0.1, -1.0, +0.5, +1.8, -1.1, -1.6, +1.6])
array([-0.47774884, -0.61545527,  1.03018771])