veeresht / CommPy

Digital Communication with Python
http://veeresht.github.com/CommPy
BSD 3-Clause "New" or "Revised" License
551 stars 179 forks source link

MAP decoder (BCJR) for non-systematic codes #124

Open snerzkristall opened 8 months ago

snerzkristall commented 8 months ago

The current MAP decoder implementation is for coding rate 1/2 but assumes that the code is systematic (based on the input parameters). Is it possible to decode non-systematic codes like the one from the example conv_encode_decode.py with this algorithm?

# =============================================================================
# Convolutional Code 1: G(D) = [1+D^2, 1+D+D^2]
# Standard code with rate 1/2
# =============================================================================

# Number of delay elements in the convolutional encoder
memory = np.array(2, ndmin=1)

# Generator matrix
g_matrix = np.array((0o5, 0o7), ndmin=2)

# Create trellis data structure
trellis1 = cc.Trellis(memory, g_matrix)

The output of map_decode() only provides LLRs for the systematic symbols, which is just half of the whole message.