Bit Selection for Polar Coder

Bit Selection

The details about the input-output interface of the Mapper 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 Mapper 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!