5G-LENA  nr-v3.0-25-g90be5d1
The 5G/NR module for the ns-3 simulator
ns3::NrRadioEnvironmentMapHelper Class Reference

Generate a radio environment map. More...

#include "nr-radio-environment-map-helper.h"

+ Inheritance diagram for ns3::NrRadioEnvironmentMapHelper:
+ Collaboration diagram for ns3::NrRadioEnvironmentMapHelper:

Public Types

enum  RemMode { BEAM_SHAPE , COVERAGE_AREA , UE_COVERAGE }
 

Public Member Functions

 NrRadioEnvironmentMapHelper ()
 NrRadioEnvironmentMapHelper constructor.
 
 ~NrRadioEnvironmentMapHelper () override
 destructor
 
void CreateRem (const NetDeviceContainer &rtdNetDev, const Ptr< NetDevice > &rrdDevice, uint8_t bwpId)
 This function is used for the creation of the REM map. When this function is called from an example, it is responsible for "installing" the REM through a callback to the DelayedInstall after a delay of installationDelay. Then the DelayedInstall takes care to perform all the necessary actions (call the necessary functions). More...
 
double DbmToW (double dbm) const
 Convert from dBm to Watts. More...
 
double DbToRatio (double dB) const
 Convert from dB to ratio. More...
 
void DoDispose () override
 
double GetMaxX () const
 
double GetMaxY () const
 
double GetMinX () const
 
double GetMinY () const
 
RemMode GetRemMode () const
 Get the type of REM Map to be generated. More...
 
uint16_t GetResX () const
 
uint16_t GetResY () const
 
double GetZ () const
 
double RatioToDb (double ratio) const
 Convert from ratio to dB. More...
 
void SetInstallationDelay (const Time &installationDelay)
 Sets the installation delay. More...
 
void SetMaxX (double xMax)
 Sets the max x coordinate of the map. More...
 
void SetMaxY (double yMax)
 Sets the max y coordinate of the map. More...
 
void SetMinX (double xMin)
 Sets the min x coordinate of the map. More...
 
void SetMinY (double yMin)
 Sets the min y coordinate of the map. More...
 
void SetNumOfItToAverage (uint16_t numOfIterationsToAverage)
 Sets the number of iterations to calculate the average of rem value. More...
 
void SetRemMode (enum RemMode remType)
 Set the type of REM Map to be generated. More...
 
void SetResX (uint16_t xRes)
 Sets the resolution (number of points) of the map along the x axis. More...
 
void SetResY (uint16_t yRes)
 Sets the resolution (number of points) of the map along the y axis. More...
 
void SetSimTag (const std::string &simTag)
 Set simTag that will be concatenated to output file names. More...
 
void SetZ (double z)
 Sets the z coordinate of the map. More...
 
double WToDbm (double w) const
 Convert from Watts to dBm. More...
 

Static Public Member Functions

static TypeId GetTypeId ()
 Get the type id. More...
 

Detailed Description

Generate a radio environment map.

The purpose of the radio environment map helper is to generate rem maps, where for each point on the map (rem point) a rem value is calculated (SNR/SINR/IPSD).

Two general types of maps can be generated according to whether the BeamShape or CoverageArea is selected. The first case considers the configuration of the beamforming vectors (for each transmitting device RTD) as defined by the user in the scenario script for which the (SNR/SINR/IPSD) maps are generated. In the second case, the beams are reconfigured during the map generation for each rem point in order to visualize the coverage area in terms of SNR, SINR and IPSD.

The NrRadioEnvironmentMapHelper gives the possibility to generate maps either for the DL or the UL direction. This can be done by passing to the rem helper the desired transmitting device(s) (RTD(s)) and receiving device (RRD), which for the DL case correspond to gNB(s) and UE, while for the UL case to UE(s) and gNB.

Moreover, an UL map can be generated to visualize the coverage area of a tx device (UE), while there is the possibility to add interference from DL gNB device(s) to study a worst case mixed FDD-TDD scenario.

Let us notice that for the SNR/SINR/IPSD calculations at each REM Point the channel is re-created to avoid spatial and temporal dependencies among independent REM calculations. Moreover, the calculations are the average of N iterations (specified by the user) in order to consider the randomness of the channel

For the CoverageArea REM generation the user can include the following code in the desired example script:

$ Ptr<NrRadioEnvironmentMapHelper> remHelper = CreateObject<NrRadioEnvironmentMapHelper> ();
$ remHelper->CreateRem (gnbNetDev, ueNetDev, indexPhy);

While for the BeamShape REM generation the user can include the following code:

$ Ptr<NrRadioEnvironmentMapHelper> remHelper = CreateObject<NrRadioEnvironmentMapHelper> ();
$ remHelper->SetRemMode (NrRadioEnvironmentMapHelper::BEAM_SHAPE);
$
gnbNetDev.Get(0)->GetObject<NrGnbNetDevice>()->GetPhy(remBwpId)->GetBeamManager()->ChangeBeamformingVector(ueNetDev.Get(0));
$ remHelper->CreateRem (gnbNetDev, ueRemDevice, indexPhy);

Please refer to the rest parameters of the REM map that can be set through the command line (e.g. x, y, z coordinates and resolution)

The output of the NrRadioEnvironmentMapHelper are REM csv files from which the REM figures can be generated with the following command:

$ gnuplot -p nr-rem-SimTag-gnbs.txt nr-rem-SimTag-ues.txt nr-rem-SimTag-buildings.txt
nr-rem-SimTag-plot-rem.gnuplot

Definition at line 92 of file nr-radio-environment-map-helper.h.

Member Function Documentation

◆ CreateRem()

void ns3::NrRadioEnvironmentMapHelper::CreateRem ( const NetDeviceContainer &  rtdNetDev,
const Ptr< NetDevice > &  rrdDevice,
uint8_t  bwpId 
)

This function is used for the creation of the REM map. When this function is called from an example, it is responsible for "installing" the REM through a callback to the DelayedInstall after a delay of installationDelay. Then the DelayedInstall takes care to perform all the necessary actions (call the necessary functions).

Parameters
rtdNetDevThe transmitting device(s) for which the map will be generated
rrdDeviceThe receiving device for which the map will be generated
bwpIdThe bwpId

Definition at line 508 of file nr-radio-environment-map-helper.cc.

References ns3::NrUeNetDevice::GetPhy().

+ Here is the call graph for this function:

◆ DbmToW()

double ns3::NrRadioEnvironmentMapHelper::DbmToW ( double  dbm) const

Convert from dBm to Watts.

Parameters
dbmthe power in dBm
Returns
the equivalent Watts for the given dBm

Definition at line 275 of file nr-radio-environment-map-helper.cc.

◆ DbToRatio()

double ns3::NrRadioEnvironmentMapHelper::DbToRatio ( double  dB) const

Convert from dB to ratio.

Parameters
dBthe value in dB
Returns
ratio in linear scale

Definition at line 287 of file nr-radio-environment-map-helper.cc.

◆ GetMaxX()

double ns3::NrRadioEnvironmentMapHelper::GetMaxX ( ) const
Returns
Gets the value of the max x coordinate of the map

Definition at line 245 of file nr-radio-environment-map-helper.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetMaxY()

double ns3::NrRadioEnvironmentMapHelper::GetMaxY ( ) const
Returns
Gets the value of the max y coordinate of the map

Definition at line 251 of file nr-radio-environment-map-helper.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetMinX()

double ns3::NrRadioEnvironmentMapHelper::GetMinX ( ) const
Returns
Gets the value of the min x coordinate of the map

Definition at line 233 of file nr-radio-environment-map-helper.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetMinY()

double ns3::NrRadioEnvironmentMapHelper::GetMinY ( ) const
Returns
Gets the value of the min y coordinate of the map

Definition at line 239 of file nr-radio-environment-map-helper.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetRemMode()

NrRadioEnvironmentMapHelper::RemMode ns3::NrRadioEnvironmentMapHelper::GetRemMode ( ) const

Get the type of REM Map to be generated.

Returns
The type of the map (BeamShape/CoverageArea/UeCoverage)

Definition at line 227 of file nr-radio-environment-map-helper.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetResX()

uint16_t ns3::NrRadioEnvironmentMapHelper::GetResX ( ) const
Returns
Gets the value of the resolution (number of points) of the map along the x axis

Definition at line 257 of file nr-radio-environment-map-helper.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetResY()

uint16_t ns3::NrRadioEnvironmentMapHelper::GetResY ( ) const
Returns
Gets the value of the resolution (number of points) of the map along the y axis

Definition at line 263 of file nr-radio-environment-map-helper.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetTypeId()

TypeId ns3::NrRadioEnvironmentMapHelper::GetTypeId ( )
static

Get the type id.

Returns
the type id of the class

Definition at line 55 of file nr-radio-environment-map-helper.cc.

References GetMaxX(), GetMaxY(), GetMinX(), GetMinY(), GetRemMode(), GetResX(), GetResY(), GetZ(), SetInstallationDelay(), SetMaxX(), SetMaxY(), SetMinX(), SetMinY(), SetNumOfItToAverage(), SetRemMode(), SetResX(), SetResY(), SetSimTag(), and SetZ().

+ Here is the call graph for this function:

◆ GetZ()

double ns3::NrRadioEnvironmentMapHelper::GetZ ( ) const
Returns
Gets the value of the z coordinate of the map

Definition at line 269 of file nr-radio-environment-map-helper.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ RatioToDb()

double ns3::NrRadioEnvironmentMapHelper::RatioToDb ( double  ratio) const

Convert from ratio to dB.

Parameters
ratiothe ratio in linear scale
Returns
the value in dB

Definition at line 293 of file nr-radio-environment-map-helper.cc.

◆ SetInstallationDelay()

void ns3::NrRadioEnvironmentMapHelper::SetInstallationDelay ( const Time &  installationDelay)

Sets the installation delay.

Parameters
installationDelaydelay for the REM installation

Definition at line 221 of file nr-radio-environment-map-helper.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetMaxX()

void ns3::NrRadioEnvironmentMapHelper::SetMaxX ( double  xMax)

Sets the max x coordinate of the map.

Parameters
xMaxThe max x coordinate

Definition at line 185 of file nr-radio-environment-map-helper.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetMaxY()

void ns3::NrRadioEnvironmentMapHelper::SetMaxY ( double  yMax)

Sets the max y coordinate of the map.

Parameters
yMaxThe max y coordinate

Definition at line 191 of file nr-radio-environment-map-helper.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetMinX()

void ns3::NrRadioEnvironmentMapHelper::SetMinX ( double  xMin)

Sets the min x coordinate of the map.

Parameters
xMinThe min x coordinate

Definition at line 173 of file nr-radio-environment-map-helper.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetMinY()

void ns3::NrRadioEnvironmentMapHelper::SetMinY ( double  yMin)

Sets the min y coordinate of the map.

Parameters
yMinThe min y coordinate

Definition at line 179 of file nr-radio-environment-map-helper.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetNumOfItToAverage()

void ns3::NrRadioEnvironmentMapHelper::SetNumOfItToAverage ( uint16_t  numOfIterationsToAverage)

Sets the number of iterations to calculate the average of rem value.

Parameters
numOfIterationsToAverageThe number of iterations

Definition at line 215 of file nr-radio-environment-map-helper.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetRemMode()

void ns3::NrRadioEnvironmentMapHelper::SetRemMode ( enum RemMode  remType)

Set the type of REM Map to be generated.

Parameters
remTypethe desired type (BeamShape/CoverageArea/UeCoverage)

Definition at line 161 of file nr-radio-environment-map-helper.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetResX()

void ns3::NrRadioEnvironmentMapHelper::SetResX ( uint16_t  xRes)

Sets the resolution (number of points) of the map along the x axis.

Parameters
xResThe x axis resolution

Definition at line 197 of file nr-radio-environment-map-helper.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetResY()

void ns3::NrRadioEnvironmentMapHelper::SetResY ( uint16_t  yRes)

Sets the resolution (number of points) of the map along the y axis.

Parameters
yResThe y axis resolution

Definition at line 203 of file nr-radio-environment-map-helper.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetSimTag()

void ns3::NrRadioEnvironmentMapHelper::SetSimTag ( const std::string &  simTag)

Set simTag that will be concatenated to output file names.

Parameters
simTagstring to be used as simulation tag

Definition at line 167 of file nr-radio-environment-map-helper.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetZ()

void ns3::NrRadioEnvironmentMapHelper::SetZ ( double  z)

Sets the z coordinate of the map.

Parameters
zThe z coordinate

Definition at line 209 of file nr-radio-environment-map-helper.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ WToDbm()

double ns3::NrRadioEnvironmentMapHelper::WToDbm ( double  w) const

Convert from Watts to dBm.

Parameters
wthe power in Watts
Returns
the equivalent dBm for the given Watts

Definition at line 281 of file nr-radio-environment-map-helper.cc.


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