Transform Decoding for 5G

This module implements the OFDM demodulator to recover the resource Grid back from the received samples.

class toolkit5G.OFDM.TransformDecoding5G(numRB, nGroupPTRS=None, nSampGroup=None)[source]

This module is used at the receiver to undo the effect of transform decoding in 5G networks.

Parameters:
  • numRB (int) – Defines the number of resource block allocated for transmission

  • nGroupPTRS (int) – Defines the numbers of PTRS group. For PUSCH only.

  • nSampGroup (int) – Defines the numbers of samples in each PTRS group. For PUSCH only.

Input:

inputs ([…, numSubcarriers*numSets], np.complex) – Defines the streams of tranform precoded symbols. The numSets must be positive integer (>0). In 5G DFT-s-OFDM numSets is generally equal to number of OFDM symbols.

Output:

[…,numSubcarriers*numSets], np.complex – The modules returns the transform decoded symbols.

Note

The length of input (inputs.shape[-1]) must be an integer multiple of numRB*12 - nGroupPTRS*nSampGroup.

Raises:
  • ValueError – “[Error-TransformPrecoding5G]: ‘inputs’ must be numpy array and complex!”

  • ValueError – “[Error-TransformPrecoding5G]: ‘Numbers of inputs must be multiple of numbers of subcarriers so that numbers of set is integer”

  • ValueError – “[Error-TransformPrecoding5G]: Numbers of sets (inputs.shape[-1]/(12*numRB)) cannot be greater than 14 since numbers of set is equal to numbers of OFDM symbols in a slot in 5G!”

  • ValueError – “[Error-TransformPrecoding5G]: ‘numRB’ must be positive (>0)!”

  • ValueError – “[Error-TransformPrecoding5G]: ‘numRB’ must be an integer!”

  • ValueError – “[Error-TransformPrecoding5G]: ‘nGroupPTRS’ in release-17 can take one of the 3 values [2,4,8]!”

  • ValueError – “[Error-TransformPrecoding5G]: ‘nGroupPTRS’ must be an integer!”

  • ValueError – “[Error-TransformPrecoding5G]: ‘nSampGroup’ must can take values only from the set “+str(possValues[ self.__nGroupPTRS])+” when ‘nGroupPTRS’ is “+str(self.__nGroupPTRS)+”!”

  • ValueError – “[Error-TransformPrecoding5G]: ‘nSampGroup’ must be an integer!”