commpy.channelcoding.turbo_encode¶
-
turbo_encode
(msg_bits, trellis1, trellis2, interleaver)¶ Turbo Encoder.
Encode Bits using a parallel concatenated rate-1/3 turbo code consisting of two rate-1/2 systematic convolutional component codes.
Parameters: - msg_bits (1D ndarray containing {0, 1}) – Stream of bits to be turbo encoded.
- trellis1 (Trellis object) – Trellis representation of the first code in the parallel concatenation.
- trellis2 (Trellis object) – Trellis representation of the second code in the parallel concatenation.
- interleaver (Interleaver object) – Interleaver used in the turbo code.
Returns: [sys_stream, non_sys_stream1, non_sys_stream2] – Encoded bit streams corresponding to the systematic output
and the two non-systematic outputs from the two component codes.
Return type: list of 1D ndarrays