Bit Selection for Polar Coder

Bit Selection is used to match the encoded bits to target bits using the circular buffer. The target bits is a reflection of the number of time-frequency resource allocated for payload transmission. Bit Selection performs one of the three operations based on the number of information bits, number of target bits and number of encoded bits:

  • Truncation (N>E)

  • Puncturing (N>E)

  • Repetition (N<E)

The rate matching pattern is carried out based on a match pattern. The number of rate matched bits are reduced in the case of first two with the only different being the rate match pattern.

Note

Truncation selects first E bits whereas puncturing selects E bits starting from a certain location.

Bit Selection

The details about the input-output interface of the bit-selection modules is provided below.

class toolkit5G.Ratematcher.PolarCoder.BitSelection(K, N, E)[source]

Rate matching is a process of adjusting the quantity of data in a communication stream to fit the capacity of the communication channel being used.Bit selection involves choosing which bits to include in the transmitted signal and which bits to discard. :Parameters: * K (int) – Defines the size of 1st stage control information in terms of bits

  • N (int) – Defines the number of bits at the output of Polar Encoder

  • E (int) – Defines the number of target Bits expected after Rate matching

Input:

inputBits (np.ndarray) – Defines the Array of Bits that are to be polar rate matched.

Output:

Array of size E containing the rate Matched Bits

Raises:
  • Exception: – [Error Polar RM]: number of input bits should be equal to output of Polar encoder!

  • Exception: – [Error Polar RM]: number of input bits for bitselection should be non-zero positive number!

  • Bug: – [Bug Polar RM]: Inside ‘BitSelection’!n Code is not expected to reach here.]

  • Exception: – [Error Polar RM]: ‘E’: number of (target) bits after rate maching in BitSelection must be +ve integer!

Bit De-selection

The details about the input-output interface of the bit de-selection modules is provided below.

class toolkit5G.Ratematcher.PolarCoder.BitDeSelection(K, N, E)[source]

Rate de-matching is the process of reversing the rate matching process, which involves restoring the original data bits from the modified data bits that was created during rate matching. :Parameters: * E (int) – Defines the number of target Bits expected after Rate matching

  • N (int) – Defines the number of bits at the output of Polar Encoder

  • K (int) – Defines the size of 1st stage control information in terms of bits

Input:

llr (np.ndarray) – Defines the Array of log likelihood ratio of each received Bits.

Output:

Array of size N containing the rate De-Matched Bits

Raises:
  • Exception: – [Error Polar DRM]: ‘E’: number of (target) bits after rate maching in BitSelection must be +ve integer!”

  • Exception: – [Error Polar DRM]: ‘N’: number of bits at the output of Polar Encoder must be less +ve integer!

  • Exception: – [Error Polar DRM]: ‘K’: number of bits at the input of Polar Encoder must be +ve integer!