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. The method :method:`displayClusters` displays the clusters.

Parameter name

Attribute

LOS angles

Azimuth Arrival angle

phi_LOS_AOA

Azimuth Departure angle

phi_LOS_AOD

Zenith Arrival angle

theta_LOS_ZOA

Zenith Departure angle

theta_LOS_ZOD

LSPs

Shadow Fading

SF

Rician K factor

Kfactor

Delay Spread

DS

Azimuth angular Spread of Departure

ASD

Azimuth angular Spread of Arrival

ASA

Zenith angular Spread of Departure

ZSD

Zenith angular Spread of Departure

ZSA

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 delays

tau_n

Cluster Power

Pn

Azimuth angle of Arrival per ray per cluster

phi_nm_AOA

Azimuth angle of Departure per ray per cluster

phi_nm_AOD

Zenith angle of Arrival per ray per cluster

theta_nm_ZOA

Zenith angle of Departure per ray per cluster

theta_nm_ZOD

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)[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,)

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*10**-9 sec or 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 (int or float) – Departure angular spread in Azimuth direction to generate absolute angles. Absolute angle is typically the angle seen by a base station in the direction of a particular UE. Must be a positive int or a float in degree. Defaults to 25 degree.

  • angularSpreadAoA (int or float) – Arrival angular spread in Azimuth direction to generate absolute angles. Must be a positive int or a float in degrees. Defaults to 60 degree.

  • 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 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:
  • phi_LOS_AOA (float) – Line of Sight (LOS) Arrival angle (deg) in Azimuth direction.

  • phi_LOS_AOD (float) – Line of Sight (LOS) Departure angle (deg) in Azimuth direction.

  • theta_LOS_ZOA (float) – Line of Sight (LOS) Arrival angle (deg) in Zenith direction.

  • theta_LOS_ZOD (float) – Line of Sight (LOS) Departure angle (deg) in Zenith direction.

  • SF (float) – Shadow Fading in dB.

  • Kfactor (float) – Rician K-factor in dB.

  • DS (float) – Delay Spread in sec.

  • ASD (float) – Azimuth angular Spread of Departure angle in deg.

  • ASA (float) – Azimuth angular Spread of Arrival angle in deg.

  • ZSD (float) – Zenith angular Spread of Departure angle in deg.

  • ZSA (float) – Zenith angular Spread of Arrival angle in deg.

  • numClusters (int) – Number of Clusters per each link in simulation.

  • Rtau (float) – Delay scaling parameter

  • zeta (float) – Shadowing standard deviation per cluster in dB.

  • cASA (float) – Cluster Azimuth angular Spread of Arrival angle in deg.

  • cASD (float) – Cluster Azimuth angular Spread of Departure angle in deg.

  • cZSA (float) – Cluster Zenith angular Spread of Arrival angle in deg.

  • cDS (float) – Cluster Delay Spread in nano sec.

  • tau_n (float) – Specify cluster delays in sec.

  • Pn (float) – Specify cluster powers in watt.

  • phi_mn_AOA (float) – Azimuth angle Of Arrival corresponding to each ray m with in a cluster n.

  • phi_mn_AOD (float) – Azimuth angle Of Departure corresponding to each ray m with in a cluster n.

  • theta_mn_ZOA (float) – Zenith angle Of Arrival corresponding to each ray m with in a cluster n.

  • theta_mn_ZOD (float) – Zenith angle Of Departure corresponding to each ray m with in a cluster n.

  • XPRnm (float) – Specifies cross polarization power ratio of each ray m of each cluster n.

  • pathLoss (float) – Path Loss in dB.

property avgBuildingHeight

Specifies average building height in meters. This value is useful in computation of path loss. Defaults to 5 meter.

property avgStreetWidth

Specifies average street width in meters. This value is also useful in computation of path loss. Defaults to 5 meter.

property d2D

Specify the node to node distances in 2D as a numpy array of shape (numSnapShots,numNodes,numNodes), where numNodes = num of BSs + num of UEs

property d3D

Specify the node to node distances in 3D as a numpy array of shape (numSnapShots,numNodes,numNodes), where numNodes = num of BSs + num of UEs

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.

property enableAbsoluteAngles

A boolean flag specifying whether to enable or disable absolute angles between each node in the simulation.

property enableAbsoluteDelays

A boolean flag specifying whether to enable or disable absolute delays between each node in the simulation.

property fc

Carrier or Center Frequency at which each link is being operated in the simulation. Must be always a positive int or float or a numpy array of positive int or float for multi-frequency simulations.

getChannel(applyPathLoss=True)[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.

Return type:

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

property hallVolume

Specifies hall volume in cubic meters. Valid only for indoor terrain such as Indoor Factory (InF).

property linkStateVec

A boolean array specifying the state (i.e., Line Of Sight (LOS) or Non Line Of Sight (NLOS)) of each BS-UE link. True represents LOS state and False represents NLOS state respectively.

property locBS

specify the location of Base Stations (BSs). Must be a numpy array of int or float with 3 dimensions or shape (numSnapShots,numBS,3). Where numSnapShots correspond to num of snapshots, numBS correspond to num of BSs respectively.

property locUE

specify the location of User Equpiments (UEs). Must be a numpy array of int or float with 3 dimensions or shape (numSnapShots,numUE,3). Where numSnapShots correspond to num of snapshots, numUE correspond to num of UEs respectively.

property surfaceArea

Specifies surface area of hall in square meters. Valid only for indoor terrain such as Indoor Factory (InF).

property terrain

Link propagation scenario or terrain at which each link is being simulated. Must be a string and has to be one among “RMa”, “UMa”, “UMi”, “InH-OO”, “InH-MO”, “InF-SL”, “InF-SH”, “InF-DL”, “InF-DH”, “InF-HH” respectively. For TDL or CDL model supported value can be passed both in upper or lower case. i.e., supprted value belongs to {“cdl-a”, “cdl-b”, “cdl-c”, “cdl-d”, “cdl-e”, “CDL-A”, “CDL-B”, “CDL-C”, “CDL-D”, “CDL-E”, “tdl-a”, “tdl-b”, “tdl-c”, “tdl-d”, “tdl-e”, “TDL-A”, “TDL-B”, “TDL-C”, “TDL-D”, “TDL-E”}.

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.

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]))
...  ueAntennaArray[i]()
# 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]))
...   bsAntennaArray[i]()
# simulating BS Layout and UE drops with the following configuration
>>> simLayout = SimulationLayout(numOfBS = 19,
...                              numOfUE = 100,
...                              heightOfBS = 25,
...                              heightOfUE = 10,
...                              ISD = 500,
...                              layoutType = "Hexagonal",
...                              numOfSectorsPerSite = 3,
...                              minUEBSDistance = 35)
>>> simLayout(terrain, carrierFreq, ueAntennaArray, bsAntennaArray)
# displaying the topology of simulation layout
>>> simLayout.display2DTopology()
# Instantiating ParameterGenerator class
>>> paramGen = ParameterGenerator(simLayout.carrierFrequency, simLayout.terrain, simLayout.BSLocations + simLayout.BStracks, simLayout.UELocations + simLayout.UEtracks)
>>> paramGen(simLayout.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
>>> paramGen.pathLoss
# Printing cluster delays
>>> paramGen.tau_n