Transform Precoding

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

class toolkit5G.OFDM.TransformPrecoding(numSubcarriers)[source]

This class implements the transform precoding required for implementation of DFT-s-OFDM or SC-FDM. Details of the implementation can be found in the section Transform precoding of 3GPP TS 38.211.


numSubcarriers (int) – Defines the number of subcarriers considered for transform precoding. The length of the input (inputs.shape[-1]) must be a multiple of numSubcarriers.


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


[…,numSubcarriers*numSets], np.complex – Transform precoded symbols. These symbols are mapped into the resource grid before OFDM.


The length of input (inputs.shape[-1]) must be an integer multiple of numSubcarriers.

  • ValueError – “[Error-TransformPrecoding]: ‘inputs’ must be numpy array of real or complex numbers!”

  • ValueError – “[Error-TransformPrecoding]: shape of ‘inputs’ is inconsistent with ‘numSubcarriers’! The length of the input (inputs.shape[-1]) must be a multiple of numSubcarriers!”

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

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