Time-Frequency 5G-Configurations

This API generates parameters related to frame structure, OFDM, sample-rate numerology, bandwidth, and other frequency related parameters. The details are provided in following input-output interface.

Important

This configuration generate only 3GPP standards complaint values for parameters such as bandwidth (corresponding number of RBs, guard band), cyclic prefix etc. However, the 5G-toolkit based simulation don’t restrict to standards complaint parameters. The users can pass values as per their requirements for the simulations.

Note

The un-configured parameters are selected randomly from a valid set of possible values.

** Examples **

## System Parameters
carrierFrequency = 3.6*10**9        # Carrier frequency 3.6 GHz
scs         = 30*(10**3);           # Subcarrier spacing for simulation
bandwidthTx = 10*(10**6);           # Transmission bandwidth
nSymbolFrame= 140*int(scs/15000);   # Number of OFDM symbols per frame (Its a function of subcarrier spacing)

## This class fetches valid set of 5G parameters for the system configurations
tfParams    = TimeFrequency5GParameters(bandwidthTx, scs)
tfParams(nSymbolFrame, typeCP = "normal")
nRB         = tfParams.numRBs        # SSB Grid size (Number of RBs considered for SSB transition)
Neff        = tfParams.Neff        # Number of resource blocks for Resource Grid ( exclude gaurd band | offsets : BWP)
Nfft        = tfParams.fftsize                 # FFT-size for OFDM
lengthCP    = tfParams.lengthCP    # CP length
class toolkit5G.Configurations.TimeFrequency5GParameters(bandwidth=100000000, subcarrierSpacing=30000, fftsize=None, carrierFrequency=3600000000.0)[source]

This class generates the time frequency parameters such as frame structure, number of resource blocks, gaurd bands, length of cyclic prefix for each symbol for a certain bandwidth, subcarrier spacing, carrier frequency, and FFT-size value.

Tip

If fftsize is not set (or set to None), a random legit value is generated internally for fftsize for the computation of cyclic prefix length for each OFDM symbol.

Parameters:
  • bandwidth (int) – Define system bandwidth in Hz. Default value is 100*10**6 (100 MHz).

  • subcarrierSpacing (int) – Define system bandwidth in Hz.Default value is 30000 (30 kHz).

  • fftsize (int) – Define fft size for OFDM. It is used for cyclic prefix length computation. Default value is None.

  • carrierFrequency (number) – Define carrier frequency in Hz. Default value is 3.6*10**9.

Input:
  • numSymbol (int) – Defines number of OFDM symbols for which cyclic prfix length is returned. Default value is 14.

  • typeCP (str) – Defines the type of cyclic prefix to attached in OFDM. It acn be one of \(\{\) “normal”, “extended”\(\{\). Default value is “normal”.

Output:
  • numRBs (int) – Returns the number of resource blocks available in system bandwidth.

  • fftsize (int) – Returns fft size for OFDM. It is used for cyclic prefix length computation. Its relevant only when fftsize is None as input argument.

  • lengthCP ((numSymbol,), integer) – Returns the number of samples to be attached to each OFDM system starting first symbol of the frame.

Attributes:
  • possibleCombinations_FR1 ((39,2), integer) – Defines the all possible combinations of (bandwidth, subcarrierSpacing) supported by 5G systems in FR1 (carrierFrequency less than 7.125 GHz) where bandwidth (MHz), subcarrierSpacing (kHz). It can accessed as follows:

    • TimeFrequency5GParameters().possibleCombinations_FR1

    • object.possibleCombinations_FR1

  • possibleCombinations_FR2 ((7,2), integer) – Defines the all possible combinations of (bandwidth, subcarrierSpacing) supported by 5G systems in FR2 (carrierFrequency higher than 7.125 GHz) where bandwidth (MHz), subcarrierSpacing (kHz). It can accessed as follows:

    • TimeFrequency5GParameters().possibleCombinations_FR2

    • object.possibleCombinations_FR2

Important

The user can get the (bandwidth, subcarrierSpacing) pair supported by 5G systems for each band (FR1, FR2) respectively using following commands:

  • TimeFrequency5GParameters().possibleCombinations_FR1

  • TimeFrequency5GParameters().possibleCombinations_FR2

Raises:
  • ValueError – [Error-TimeFrequency5GParameters]: ‘numSymbol’ must be a number!

  • ValueError – [Error-TimeFrequency5GParameters]: ‘typeCP’ must be either ‘normal’ or ‘extended’!

  • ValueError – [Error-TimeFrequency5GParameters]: ‘bandwidth’ must be a number!

  • ValueError – [Error-TimeFrequency5GParameters]: For 5G, ‘bandwidth’ can only be from the set {5, 10, 15, 20, 25, 30, 40, 50, 60, 70, 80, 90, 100, 200, 400} MHz!

  • ValueError – [Error-TimeFrequency5GParameters]: ‘carrierFrequency’ must be a number!

  • ValueError – [Error-TimeFrequency5GParameters]: ‘subcarrierSpacing’ must be a number!

  • ValueError – [Error-TimeFrequency5GParameters]: For 5G, ‘subcarrierSpacing’ can only be from the set {15, 30, 60, 120} KHz!

  • Exception – Error-TimeFrequency5GParameters]: Invalid combination of (subcarrierSpacing, bandwidth)!n Check valid Combinations using ‘TimeFrequency5GParameters.possibleCombinations_FR1’ or ‘TimeFrequency5GParameters.possibleCombinations_FR2’

getGaurdBand_FR1(bandwidth, subcarrierSpacing)[source]

This function returns the number of resource blocks at FR1 frequency range for a legit (bandwidth, subcarrierSpacing) pair.

Input:
  • bandwidth (int) – Define system bandwidth in Hz.

  • subcarrierSpacing (int) – Define system bandwidth in Hz.

Output:

numRBs (int) – Defines the gaird band (in kHz) for the (bandwidth, subcarrierSpacing) pair.

getGaurdBand_FR2(bandwidth, subcarrierSpacing)[source]

This function returns the size of gaurd-band on each side at FR2 frequency range for a legit (bandwidth, subcarrierSpacing) pair.

Input:
  • bandwidth (int) – Define system bandwidth in Hz.

  • subcarrierSpacing (int) – Define system bandwidth in Hz.

Output:

numRBs (int) – Defines the gaird band (in kHz) for the (bandwidth, subcarrierSpacing) pair.

getNumberRB_FR1(bandwidth, subcarrierSpacing)[source]

This function returns the number of resource blocks at FR1 frequency range for a legit (bandwidth, subcarrierSpacing) pair.

Input:
  • bandwidth (int) – Define system bandwidth in Hz.

  • subcarrierSpacing (int) – Define system bandwidth in Hz.

Output:

numRBs (int) – Returns the number of resource blocks available in system bandwidth.

getNumberRB_FR2(bandwidth, subcarrierSpacing)[source]

This function returns the size of gaurd-band on each side at FR1 frequency range for a legit (bandwidth, subcarrierSpacing) pair.

Input:
  • bandwidth (int) – Define system bandwidth in Hz.

  • subcarrierSpacing (int) – Define system bandwidth in Hz.

Output:

numRBs (int) – Returns the number of resource blocks available in system bandwidth.