5G-LENA nr-v3.0-32-g83aee33
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
ns3::NrSpectrumValueHelper Class Reference

This class provides a set of useful functions when working with spectrum model for NR. More...

#include "nr-spectrum-value-helper.h"

Public Types

enum  PowerAllocationType { UNIFORM_POWER_ALLOCATION_USED , UNIFORM_POWER_ALLOCATION_BW }
 

Static Public Member Functions

static Ptr< SpectrumValue > CreateNoisePowerSpectralDensity (double noiseFigure, const Ptr< const SpectrumModel > &spectrumModel)
 Create a SpectrumValue that models the power spectral density of AWGN.
 
static Ptr< SpectrumValue > CreateTxPowerSpectralDensity (double powerTx, const std::vector< int > &rbIndexVector, const Ptr< const SpectrumModel > &txSm, enum PowerAllocationType allocationType)
 Create SpectrumValue that will represent transmit power spectral density, and assuming that all RBs are active.
 
static uint64_t GetEffectiveBandwidth (double bandwidth, uint8_t numerology)
 Returns the effective bandwidth for the total system bandwidth.
 
static Ptr< const SpectrumModel > GetSpectrumModel (uint32_t numRbs, double centerFrequency, double subcarrierSpacing)
 Creates or obtains from a global map a spectrum model with a given number of RBs, center frequency and subcarrier spacing.
 

Static Public Attributes

static const uint8_t SUBCARRIERS_PER_RB = 12
 subcarriers per resource block
 

Static Protected Member Functions

static Ptr< SpectrumValue > CreateTxPsdOverActiveRbs (double powerTx, const std::vector< int > &activeRbs, const Ptr< const SpectrumModel > &spectrumModel)
 Create SpectrumValue that will represent transmit power spectral density, and the total transmit power will be uniformly distributed only over active RBs.
 
static Ptr< SpectrumValue > CreateTxPsdOverAllRbs (double powerTx, const std::vector< int > &activeRbs, const Ptr< const SpectrumModel > &spectrumModel)
 Create SpectrumValue that will represent transmit power spectral density, and the total transmit power will divided among all RBs, and then it will be assigned to active RBs.
 

Detailed Description

This class provides a set of useful functions when working with spectrum model for NR.

Definition at line 22 of file nr-spectrum-value-helper.h.

Member Enumeration Documentation

◆ PowerAllocationType

enum ns3::NrSpectrumValueHelper::PowerAllocationType

Definition at line 25 of file nr-spectrum-value-helper.h.

Member Function Documentation

◆ CreateNoisePowerSpectralDensity()

Ptr< SpectrumValue > ns3::NrSpectrumValueHelper::CreateNoisePowerSpectralDensity ( double  noiseFigure,
const Ptr< const SpectrumModel > &  spectrumModel 
)
static

Create a SpectrumValue that models the power spectral density of AWGN.

Parameters
noiseFigurethe noise figure in dB w.r.t. a reference temperature of 290K
spectrumModelthe SpectrumModel instance to be used to create the output spectrum value
Returns
a pointer to a newly allocated SpectrumValue representing the noise Power Spectral Density in W/Hz for each Resource Block

Definition at line 169 of file nr-spectrum-value-helper.cc.

Referenced by ns3::NrPhy::GetNoisePowerSpectralDensity().

+ Here is the caller graph for this function:

◆ CreateTxPowerSpectralDensity()

Ptr< SpectrumValue > ns3::NrSpectrumValueHelper::CreateTxPowerSpectralDensity ( double  powerTx,
const std::vector< int > &  rbIndexVector,
const Ptr< const SpectrumModel > &  txSm,
enum PowerAllocationType  allocationType 
)
static

Create SpectrumValue that will represent transmit power spectral density, and assuming that all RBs are active.

Parameters
powerTxtotal power in dBm
rbIndexVectorthe list of active/used RBs for the current transmission
txSmspectrumModel to be used to create this SpectrumValue
allocationTypepower allocation type to be used
Returns
spectrum value representing power spectral density for given parameters

Definition at line 149 of file nr-spectrum-value-helper.cc.

Referenced by ns3::CellScanBeamforming::GetBeamformingVectors(), ns3::CellScanBeamformingAzimuthZenith::GetBeamformingVectors(), ns3::CellScanQuasiOmniBeamforming::GetBeamformingVectors(), and ns3::NrPhy::GetTxPowerSpectralDensity().

+ Here is the caller graph for this function:

◆ CreateTxPsdOverActiveRbs()

Ptr< SpectrumValue > ns3::NrSpectrumValueHelper::CreateTxPsdOverActiveRbs ( double  powerTx,
const std::vector< int > &  activeRbs,
const Ptr< const SpectrumModel > &  spectrumModel 
)
staticprotected

Create SpectrumValue that will represent transmit power spectral density, and the total transmit power will be uniformly distributed only over active RBs.

Parameters
powerTxtotal power in dBm
activeRbsvector of RBs that are active for this transmission
spectrumModelspectrumModel to be used to create this SpectrumValue

Definition at line 107 of file nr-spectrum-value-helper.cc.

◆ CreateTxPsdOverAllRbs()

Ptr< SpectrumValue > ns3::NrSpectrumValueHelper::CreateTxPsdOverAllRbs ( double  powerTx,
const std::vector< int > &  activeRbs,
const Ptr< const SpectrumModel > &  spectrumModel 
)
staticprotected

Create SpectrumValue that will represent transmit power spectral density, and the total transmit power will divided among all RBs, and then it will be assigned to active RBs.

Parameters
powerTxtotal power in dBm
activeRbsvector of RBs that are active for this transmission
spectrumModelspectrumModel to be used to create this SpectrumValue

Definition at line 128 of file nr-spectrum-value-helper.cc.

◆ GetEffectiveBandwidth()

uint64_t ns3::NrSpectrumValueHelper::GetEffectiveBandwidth ( double  bandwidth,
uint8_t  numerology 
)
static

Returns the effective bandwidth for the total system bandwidth.

Parameters
bandwidththe total system bandwidth in Hz
numerologythe numerology to be used over the whole bandwidth
Returns
effective bandwidth which is the sum of bandwidths of all sub-bands, in Hz

Definition at line 185 of file nr-spectrum-value-helper.cc.

Referenced by ns3::NrSpectrumPhyTestSuite::NrSpectrumPhyTestSuite().

+ Here is the caller graph for this function:

◆ GetSpectrumModel()

Ptr< const SpectrumModel > ns3::NrSpectrumValueHelper::GetSpectrumModel ( uint32_t  numRbs,
double  centerFrequency,
double  subcarrierSpacing 
)
static

Creates or obtains from a global map a spectrum model with a given number of RBs, center frequency and subcarrier spacing.

Parameters
numRbsbandwidth in number of RBs
centerFrequencythe center frequency of this band
Returns
pointer to a spectrum model with defined characteristics

Definition at line 63 of file nr-spectrum-value-helper.cc.

Referenced by ns3::NrPhy::GetSpectrumModel().

+ Here is the caller graph for this function:

Member Data Documentation

◆ SUBCARRIERS_PER_RB

const uint8_t ns3::NrSpectrumValueHelper::SUBCARRIERS_PER_RB = 12
static

subcarriers per resource block

Definition at line 31 of file nr-spectrum-value-helper.h.

Referenced by ns3::NrPhy::DoUpdateRbNum(), and ns3::NrAmc::GetPayloadSize().


The documentation for this class was generated from the following files: