Channel Parameter Generator

This module provides classes and functions that generate parameters required to compute cluster level channel coefficients. Channel parameters include correlated Large Scale Parametes (LSPs) such as path loss, delay spread, angular spreads of departure, angular spreads of arrival, both in azimuth, elevation direction. Small Scale Parameters (SSPs) such as cluster delays, cluster powers and cluster/ray angles.

The class ParameterGenerator allows the user to generate all the parameters required to simulate cluster level channel. The following table lists all the attributes of the class ParameterGenerator, which capture the parameters necessary to generate cluster level channel coefficients. Users can display the clusters using the method displayClusters() and can fetch channel coefficients through the method getChannel(). For more details refer [3GPPTS38901_parameterGenerator]

Parameter name

Attribute

LOS angles

LOS Azimuth Arrival angle

phiAOA_LOS

LOS Azimuth Departure angle

phiAOD_LOS

LOS Zenith Arrival angle

thetaAOA_LOS

LOS Zenith Departure angle

thetaAOD_LOS

LSPs

Shadow Fading

shadowFading

Rician K factor

kFactor

Delay Spread

delaySpread

Azimuth angular Spread of Departure

phiAoD_spread

Azimuth angular Spread of Arrival

phiAoA_spread

Zenith angular Spread of Departure

thetaAoD_spread

Zenith angular Spread of Arrival

thetaAoA_spread

Path Loss

pathLoss

SSPs

Cluster Azimuth angular Spread of Arrival

cASA

Cluster Azimuth angular Spread of Arrival

cASD

Cluster Zenith angular Spread of Arrival

cZSA

Cluster or Path delays

pathDelay

Cluster or Path Power

pathPower

Azimuth angle of Arrival per ray per cluster

phiAoA_mn

Azimuth angle of Departure per ray per cluster

phiAoD_mn

Zenith angle of Arrival per ray per cluster

thetaAoA_mn

Zenith angle of Departure per ray per cluster

thetaAoD_mn

Cross Polarization Power Ratio per ray per cluster

XPRnm

class toolkit5G.ChannelModels.ParameterGenerator(fc, terrain, locBS, locUE, d3D=None, d2D=None, hallVolume=1, surfaceArea=1, avgBuildingHeight=5, avgStreetWidth=5, BSvelocityVector=None, bsOrientation=None, UEvelocityVector=None, ueOrientation=None, ueAntennaArray=None, bsAntennaArray=None, timeInstances=None, memoryEfficient=False, enableSpatialConsistencyForLSPs=False, enableSpatialConsistencyForSSPs=False, enableSpatialConsistencyForInitialPhases=False)[source]

A class to generate cluster level channel parameters 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.

  • locBS (NumPy.ndarray of int or float) – Specifies the locations of Base Stations (BSs). Must be a three dimensional numpy array of shape (numSnapShots,numBS,3).

  • locUE (NumPy.ndarray of int or float) – Specifies the locations of User Equpiments (UEs). Must be a three dimensional numpy array of shape (numSnapShots,numUE,3).

  • d3D (None or NumPy.ndarray of int or float) – Specify the node to node 3D distance array of shape (numSnapShots,numNodes,numNodes), where numNodes = number of BSs + number of UEs. Defaults to None.

  • d2D (None or NumPy.ndarray of int or float) – Specify the node to node 2D distance array of shape (numSnapShots,numNodes,numNodes). Defaults to None.

  • hallVolume (int or float) – Volume of the hall in cubic meters. Defaults to 1. Valid only for indoor terrain.

  • surfaceArea (int or float) – Surface area of the the hall in square meters. Defaults to 1. Also vaild for indoor terrain.

  • avgBuildingHeight (int or float) – Average building height in meters. Useful in computation of path loss. Defaults to 5 meter.

  • avgStreetWidth (int or float) – Average street width in meters. Also useful in compuation of path loss. Defaults to 5 meter.

  • BSvelocityVector (None or NumPy.ndarray of int or float) – Array of velocities of each BS in simulation with shape (numSnapShots, numBSs, 3), where numSnapShots correspond to number of snap-shots, numBSs correspond to number of BSs in simulation.

  • bsOrientation (None or NumPy.ndarray of int or float) – Array of orientation angle of each BS in simulation with shape (numSnapShots, numBSs, 3).

  • UEvelocityVector (None or NumPy.ndarray of int or float) – Array of velocities of each UE in simulation with shape (numSnapShots, numUEs, 3), where numUEs correspond to number of UEs in simulation.

  • ueOrientation (None or NumPy.ndarray of int or float) – Array of orientation angle of each UE in simulation with shape (numSnapShots, numUEs, 3).

  • ueAntennaArray (None or NumPy.ndarray of AntennaArrays) – Vector of AntennaArrays object at each Rx node or UE side with shape of (numOfCarrierFrequencies,).

  • bsAntennaArray (None or NumPy.ndarray of AntennaArrays) – Vector of AntennaArrays object at each Tx node or BS side with shape of (numOfCarrierFrequencies,).

  • timeInstances (None or NumPy.ndarray of int or float) – specifies the time instant of each snap-shot in the simulation with shape (numSnapShots,).

  • memoryEfficient (bool) – A boolean variable to enable/disable memory efficient computations. If this variable is true, then the implementation uses less memory/RAM but slows down the execution. Defaults to False.

  • enableSpatialConsistencyForLSPs (bool) – A boolean variable to enable/disable spatial consistency among LSPs. Defaults to False.

  • enableSpatialConsistencyForSSPs (bool) – A boolean variable to enable/disable spatial consistency among SSPs. Defaults to False.

  • enableSpatialConsistencyForInitialPhases (bool) – A boolean variable to enable/disable spatial consistency among inital phases. Defaults to False.

Input:
  • linkStateVec (NumPy.ndarray) – A numpy array specifying the state (i.e., “LOS” or “NLOS”) of each node to node link. Shape (numSnapShots,numNodes,numNodes), where numNodes = number of BSs + number of UEs.

  • delaySpread (int or float) – Delay Spread value in sec for link level simulations. Must be an int or a float. Defaults to 100 nanosec.

  • muKdB (int or float) – Mean of K-factor in dB. K-factor in dB is a normal random variable with mean muKdB and variance sigmaKdB respectively. Must be an int or a float. Defaults to 7 dB. Ref: Table 7.5.6 of TR 38.901.

  • sigmaKdB (int or float) – Variance of K-factor in dB. Must be an int or a float. Defaults to 4. Ref: Table 7.5.6 of TR 38.901.

  • angularSpreadAoD ((2,) numpy.ndarray of int or float) – Specifies an array of departure angular spreads in both azimuth and elevation dimension. Defualts to None. Must be an array or list of 2 elements, where the first element correspond to departure angular spread in azimuth dimension and second element correspond to departure angular spread in elevation dimension respectively.

  • angularSpreadAoA ((2,) numpy.ndarray of int or float) – Specifies an array of arrival angular spreads in both azimuth and elevation dimension. Defualts to None. Must be an array or list of 2 elements, where the first element correspond to arrival angular spread in azimuth dimension and second element correspond to arrival angular spread in elevation dimension respectively.

  • muLog10 (int or float) – Correspond to (Log base 10 of) mean of absolute delays. Absolute delays correspond to delays generated by subtracting each delay value from the non-zero delay of the first tap of channel impulse response. This parameter is relevant for NLOS link level channels (i.e., TDL and CDL models) when absolute time of arrival (TOA) is enabled. These are typically log-normal random variables with mean muLog10 and variance sigmaLog10. Must be a positive number and defaults to -7.5. Users must pass this value when enableAbsoluteDelays flag is set to True.

  • sigmaLog10 (int or float) – Correspond to (Log base 10 of) variance of absolute delays. Must be a positive number and defaults to 0.4. Users must pass this value when enableAbsoluteDelays flag is set to True.

  • enableAbsoluteAngles (bool) – A boolean flag specifying whether to enable or disable absolute angles between each node in the simulation. Must be a boolean. Defaults to True.

  • enableAbsoluteDelays (bool) – A boolean flag specifying whether to enable or disable absolute delays in the simulation. Must be a boolean. Defaults to True.

Attributes:
  • phiAoA_LoS (numpy.ndarray of float having dimension (num of frequencies, num of snapshots, num of BSs, num of UEs).) – Line of Sight (LOS) Arrival angle (deg) in Azimuth direction.

  • phiAOD_LOS (numpy.ndarray of float having dimension (num of frequencies, num of snapshots, num of BSs, num of UEs).) – Line of Sight (LOS) Departure angle (deg) in Azimuth direction.

  • shadowFading (numpy.ndarray of float having dimension (num of frequencies, num of snapshots, num of BSs, num of UEs).) – Shadow Fading in dB.

  • kFactor (numpy.ndarray of float having dimension (num of frequencies, num of snapshots, num of BSs, num of UEs).) – Rician K-factor in dB.

  • delaySpread (numpy.ndarray of float having dimension (num of frequencies, num of snapshots, num of BSs, num of UEs).) – Delay Spread in sec.

  • numClusters (numpy.ndarray of float having dimension (num of frequencies, num of snapshots, num of BSs, num of UEs).) – Number of Clusters per each link in simulation.

  • zeta (numpy.ndarray of float having dimension (num of frequencies, num of snapshots, num of BSs, num of UEs).) – Shadowing standard deviation per cluster in dB.

  • cASA (numpy.ndarray of float having dimension (num of frequencies, num of snapshots, num of BSs, num of UEs).) – Cluster Azimuth angular Spread of Arrival angle in deg.

  • cASD (numpy.ndarray of float having dimension (num of frequencies, num of snapshots, num of BSs, num of UEs).) – Cluster Azimuth angular Spread of Departure angle in deg.

  • cZSA (numpy.ndarray of float having dimension (num of frequencies, num of snapshots, num of BSs, num of UEs).) – Cluster Zenith angular Spread of Arrival angle in deg.

  • cDS (numpy.ndarray of float having dimension (num of frequencies, num of snapshots, num of BSs, num of UEs).) – Cluster Delay Spread in nano sec.

  • phiAoA_mn (numpy.ndarray of float having dimension (num of frequencies, num of snapshots, num of BSs, num of UEs, number of rays per cluster, number of cluster).) – Azimuth angle Of Arrival corresponding to each ray m with in a cluster n.

  • phiAoD_mn (numpy.ndarray of float having dimension (num of frequencies, num of snapshots, num of BSs, num of UEs, number of rays per cluster, number of cluster).) – Azimuth angle Of Departure corresponding to each ray m with in a cluster n.

  • thetaAoD_mn (numpy.ndarray of float having dimension (num of frequencies, num of snapshots, num of BSs, num of UEs, number of rays per cluster, number of cluster).) – Zenith angle Of Departure corresponding to each ray m with in a cluster n.

  • thetaAoA_mn (numpy.ndarray of float having dimension (num of frequencies, num of snapshots, num of BSs, num of UEs, number of rays per cluster, number of cluster).) – Zenith angle Of Arrival corresponding to each ray m with in a cluster n.

  • XPRnm (numpy.ndarray of float having dimension (num of frequencies, num of snapshots, num of BSs, num of UEs, number of cluster, number of rays per cluster).) – Specifies cross polarization power ratio of each ray m of each cluster n.

  • pathLoss (numpy.ndarray of float having dimension (num of frequencies, num of snapshots, num of BSs, num of UEs).) – Path Loss in dB.

  • pathPower (numpy.ndarray of float. Dimension (num of frequencies, num of snapshots, num of BSs, num of UEs, number of cluster or path).) – Specifies cluster or path power in dB.

  • pathDelay (numpy.ndarray of float. Dimension (num of frequencies, num of snapshots, num of BSs, num of UEs, number of cluster or path including sub-clusters).) – Specifes cluster or path delay in nano sec.

Important

  • Inputs muLog10, sigmaLog10, enableAbsoluteAngles and enableAbsoluteDelays are relevant only for positoning or sensing kind of scenarios where absolute TOA and/or absolute angles are required.

  • Inputs muKdB, sigmaKdB, angularSpreadAoD, and angularSpreadAoD are relevant only for link level channels. i.e., under CDL or TDL channel model.

ParameterGenerator.displayClusters(indices=(0, 0, 0), rayIndex=None, carrierIndex=0, radiusTx=1, radiusRx=1, displayPlot=True)[source]

Method to display clusters in simulation.

Parameters:
  • indices (int tuple) – Correspond to a positive integer tuple of size 3, where the first one corresponds to number of carrier frequencies, second one to number of BSs, and third one to number of UEs respectively. Defaults to (0,0,0).

  • rayIndex (int or none.) – Corresponds to ray index. Must be a positive int. Defaults to None.

  • carrierIndex (int) – Index correspond to number of carrier frequencies at which the simulation is being carried out. Must be a positive int. Defaults to 0, meaning the first carrier frequency is being considered.

  • radiusTx (int) – Radius at which the transmitter (Tx) locations are being plotted. Must be a positive int and defaults to 1 meter.

  • radiusRx (int) – Radius at which the receiver (Rx) locations are being plotted. Must be a positive int and defaults to 1 meter.

  • displayPlot (bool) – A boolen variable, if true calls plt.show() function of matplotlib. Defaults to true.

ParameterGenerator.getChannel(applyPathLoss=True, memoryEfficient=False)[source]

Method to fetch channel coefficients. All the channel coefficients corresponding to Tapped Delay Line (TDL), Clustered Delay Line (CDL) and Spatial Channel Model (SCM) are returned by this function.

Parameters:
  • applyPathLoss (bool) – A boolen specifying whether to apply path loss to Spatial Channel Model (SCM) or not. Defaults to True corresponds to channel coefficients being computed by applying path loss and shadow fading. If False, it returns channel coefficients with out applying the computed path loss and shadow fading.

  • memoryEfficient (bool) – Set this to true for low memory consumption.

Return type:

Returns an object of the class ChannelGenerator. User can fetch OFDM channel using this object.

Example:

# terrain or scenario for BS-UE links "UMa"
>>> terrain     = np.array(["UMa","UMi","InH-OO"])
# links simulated at two carrier frequencies in GHz
>>> carrierFreq = np.array([3,5])
>>> numCarriers = carrierFreq.shape[0]
# vector of Antenna Array objects at UE or Rx side
>>> ueAntennaArray = np.empty(numCarriers, dtype=object)
>>> for i in range(carrierFreq.size):
>>>   ueAntennaArray[i] = AntennaArrays(antennaType     = "OMNI",
...                                     centerFrequency = carrierFreq[i],
...                                     arrayStructure  = np.array([1,1,1,1,1]),
...                                     antennaSpacing  =  np.array([0.5,0.5,0.5,0.5]))
# vector of Antenna Array objects at BS or Tx side
>>> bsAntennaArray = np.empty(numCarriers, dtype=object)
>>> for i in range(carrierFreq.size):
>>>   bsAntennaArray[i] = AntennaArrays(antennaType ="3GPP_38.901",
...                                     centerFrequency=carrierFreq[i],
...                                     arrayStructure = np.array([1,1,1,1,1]),
...                                     antennaSpacing =  np.array([0.5,0.5,0.5,0.5]))
# simulating BS Layout and UE drops with the following configuration
>>> simLayoutObj = SimulationLayout(numOfBS = 19,
...                                 numOfUE = 100,
...                                 heightOfBS = 25,
...                                 heightOfUE = 10,
...                                 ISD = 500,
...                                 layoutType = "Hexagonal",
...                                 numOfSectorsPerSite = 3,
...                                 minUEBSDistance = 35)
>>> simLayoutObj(terrain, carrierFreq, ueAntennaArray, bsAntennaArray)
# displaying the topology of simulation layout
>>> simLayoutObj.display2DTopology()
# Instantiating ParameterGenerator class with the following parameters
>>> paramGenObj = ParameterGenerator(fc = carrierFreq,
...                                  terrain = terrain,
...                                  locBS = simLayoutObj.BSLocations + simLayoutObj.BStracks,
...                                  locUE = simLayoutObj.UELocations + simLayoutObj.UEtracks,
...                                  d3D   = simLayoutObj.d3D,
...                                  d2D   = simLayoutObj.d2D)
# Passing link state vector as input
>>> paramGenObj(simLayoutObj.linkState)
# Now user can print all the parameters as follows.
# Below shows printing of path loss and cluster delays.
# Same way user can print all the other parameters
# Printing Path Loss for the given scenario
>>> paramGenObj.pathLoss
# Printing cluster delays
>>> paramGenObj.pathDelay
References:
[3GPPTS38901_parameterGenerator]

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