Channel Generator

This module provides the classes that generate cluster level channel coefficients. The class ChannelGenerator allows the user to generate the cluster level channel. Users can access all the cluster level OFDM channel coefficients in frequency domain, time domain from the methods ofdm() and timeDomain() respectively. For more details refer [3GPPTS38901_channelGenerator]

class toolkit5G.ChannelModels.ChannelGenerator(fc, terrain, txLocations, rxLocations, txVelocityVector, rxVelocityVector)[source]

A class to generate cluster level channel coefficients for all the links specified in the simulation.

Parameters:
  • fc (int or float or NumPy.ndarray of int or float) – Carrier Frequency in GHz. Must be positive.

  • terrain (str or NumPy.ndarray of str.) – Propagation scenario/terrain. When passed as a numpy array it takes a shape of (3,). i.e., array of 3 terrain each correspond to BS-UE, UE-UE and BS-BS links respectively.

  • txLocations (NumPy.ndarray) – Specifies the locations of transmitter (tx). Typically Base Stations (BSs) in the downlink (DL). Must be a three dimensional numpy array of shape (numSnapShots,numBS,3), where numSnapShots correspond to number of SnapShots, numBS correspond to number of BSs respectively.

  • rxLocations (NumPy.ndarray) – Specifies the locations of receiver (rx). Typically User Equipments (UEs) in the downlink (DL). Must be a three dimensional numpy array of shape (numSnapShots,numUE,3), where numUE correspond to number of UEs respectively.

  • txVelocityVector (NumPy.ndarray) – Specifies the velocity of each tx node in simulation. It takes a shape of (numSnapShots, numBS, 3). Ref: Equation 7.5-25 of TR 38.901.

  • rxVelocityVector (NumPy.ndarray) – Specifies the velocity of each rx node in simulation. It takes a shape of (numSnapShots, numUE, 3). Ref: Equation 7.5-25 of TR 38.901.

ChannelGenerator.ofdm(subCarrierSpacing=15000, fftSize=128, carrierFrequency=None, normalizeChannel=False)[source]

Method to generate OFDM channel coefficients. For a given fft size and sub carrier spacing, this function returns ofdm channel coefficients in frequency domain.

Parameters:
  • subCarrierSpacing (int or float) – Specifies the sub-carrier spacing being used in OFDM channel. Default value is 15*10**3 or 15 KHz.

  • fftSize (int) – Size of FFT/IFFT used to compute OFDM channel. Must be a positive int. Default value is 128.

  • carrierFrequency (np.ndarray of int or float) – Carrier Frequency in Hz. Must be an numpy array of int or float and defaults to None. When carrierFrequency is passed, it includes carrier phase while computing OFDM channel frequency response. Otherwise it ignores the passband carrier frequency phase.

  • normalizeChannel (bool) – A boolean flag to specify whether to normalize the power of each OFDM channel. It forces the average power of OFDM channel block (of size Nfft) accross subcarriers to 1 for link level simulations. Defaults to False.

Returns:

A 7 dimensional tensor representing OFDM channel coefficients in frequency domain.

  • numCarrierFreq correspond to number of carrier frequencies in simulation,

  • numSnapShots correspond to number of SnapShots or the different time instants at which the channel coefficients are being computed,

  • numBSs correspond to number of Base Stations (BSs),

  • numUEs correspond to number of User Equipments (UEs),

  • Nfft correspond to fftSize,

  • numRxAnt correspond to number of Rx antenna elements,

  • numTxAnt correspond to number of Tx antenna elements respectively.

Return type:

[numCarrierFreq, numSnapShots, numBSs, numUEs, Nfft, numRxAnt, numTxAnt], np.complex64

ChannelGenerator.timeDomain(subCarrierSpacing=15000, fftSize=128, carrierFrequency=None, normalizeChannel=False)[source]

Method to generate OFDM channel coefficients. For a given fft size and sub carrier spacing, this function returns ofdm channel coefficients in time domain.

Parameters:
  • subCarrierSpacing (int or float) – Specifies the sub-carrier spacing being used in OFDM channel. Default value is 15*10**3 or 15 KHz.

  • fftSize (int) – Size of FFT/IFFT used to compute OFDM channel. Must be a positive int. Default value is 128.

  • carrierFrequency (np.ndarray of int or float) – Carrier Frequency in Hz. Must be an numpy array of int or float and defaults to None. When carrierFrequency is passed, it includes carrier phase while computing OFDM channel frequency response. Otherwise it ignores the passband carrier frequency phase.

  • normalizeChannel (bool) – A boolean flag to specify whether to normalize the power of each OFDM channel. It forces the average power of OFDM channel block (of size Nfft) accross subcarriers to 1 for link level simulations. Defaults to False.

Returns:

A 7 dimensional tensor representing OFDM channel coefficients in time domain.

  • numCarrierFreq correspond to number of carrier frequencies in simulation,

  • numSnapShots correspond to number of SnapShots or the different time instants at which the channel coefficients are being computed,

  • numBSs correspond to number of Base Stations (BSs),

  • numUEs correspond to number of User Equipments (UEs),

  • Nfft correspond to fftSize,

  • numRxAnt correspond to number of Rx antenna elements,

  • numTxAnt correspond to number of Tx antenna elements respectively.

Return type:

[numCarrierFreq, numSnapShots, numBSs, numUEs, Nfft, numRxAnt, numTxAnt], np.complex64

References:
[3GPPTS38901_channelGenerator]

(3GPP TS 38.901 version 17.0.0 Release 17) 5G;NR;Study on channel model for frequencies from 0.5 to 100 GHz.