Sub Block Interleaver

The sub-block interleaver rearranges the sub-blocks of the polar encoded codewords. The block fading is very common in wireless communication which can severely corrupt a sub-block of data. The performance of many channel codes is sensitive to block errors. To handle such scenarios, 5G uses sub-block interleaver which helps in spreading such errors across the complete codeword length. This makes the polar codes more robust to burst errors. Such interleaver has been used in 4G and other wireless standards as well.

Important

Sub-block interleaving improves the robustness of the polar codes against the burst errors.

Note

Length of vector passes to sub-block interleaver must be multiple of 32.

Sub Block Interleaver

The details about the implementation, usage and application interface is provided in following sections.

class toolkit5G.Ratematcher.PolarCoder.Subblock_Interleaver[source]

This module implements the sub block interleaver used by rate matcher of Polar codec detailed in section 5.4.1.1 of [3GPPTS38212Polar].

Parameters:

None

Input:

input_bits ([…,N], np.number) – Input bits to be interleaved.

Warning

The number of input bits must be a multiple of 32!

Output:

[…,N], np.number – Interleaver bits.

Attributes:

interleavePattern ([N, 1], int where N is the number of bits passed as inputs for interleaving.) – Defines the Interleaving pattern as defined in Table 5.4.1.1-1 of [3GPPTS38212Polar].

Raises:
  • ValueError – [Error-Subblock_Interleaver]: ‘input_bits’ should be NumPy array of numbers!

  • AssertionError – [Error-Subblock_Interleaver]: ‘If length of u is not a multiple of 32.

Sub Block Interleaver

The details about the implementation, usage and application interface is provided in following sections.

class toolkit5G.Ratematcher.PolarCoder.Subblock_DeInterleaver[source]

This module implements the opposite of sub block interleaver to undo its effect at receiver. The details of sub block interleaver is provided in section 5.4.1.1 of [3GPPTS38212Polar].

Parameters:

None

Input:

input_bits ([…,N], np.number) – Input bits to be interleaved.

Warning

The number of input bits must be a multiple of 32!

Output:

[…,N], np.number – Interleaver bits.

Attributes:

interleavePattern ([N, 1], int where N is the number of bits passed as inputs for interleaving.) – Defines the De-interleaving pattern. It is complementary to permutation defined in Table 5.4.1.1-1 of [3GPPTS38212Polar].

Raises:
  • ValueError – [Error-Subblock_DeInterleaver]: ‘input_bits’ should be NumPy array of numbers!

  • AssertionError – [Error-Subblock_DeInterleaver]: ‘If length of u is not a multiple of 32.