5G-LENA nr-v4.0
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
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).
 
double DbmToW (double dbm) const
 Convert from dBm to Watts.
 
double DbToRatio (double dB) const
 Convert from dB to ratio.
 
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.
 
uint16_t GetResX () const
 
uint16_t GetResY () const
 
double GetZ () const
 
double RatioToDb (double ratio) const
 Convert from ratio to dB.
 
void SetInstallationDelay (const Time &installationDelay)
 Sets the installation delay.
 
void SetMaxX (double xMax)
 Sets the max x coordinate of the map.
 
void SetMaxY (double yMax)
 Sets the max y coordinate of the map.
 
void SetMinX (double xMin)
 Sets the min x coordinate of the map.
 
void SetMinY (double yMin)
 Sets the min y coordinate of the map.
 
void SetNumOfItToAverage (uint16_t numOfIterationsToAverage)
 Sets the number of iterations to calculate the average of rem value.
 
void SetRemMode (enum RemMode remType)
 Set the type of REM Map to be generated.
 
void SetResX (uint16_t xRes)
 Sets the resolution (number of points) of the map along the x axis.
 
void SetResY (uint16_t yRes)
 Sets the resolution (number of points) of the map along the y axis.
 
void SetSimTag (const std::string &simTag)
 Set simTag that will be concatenated to output file names.
 
void SetZ (double z)
 Sets the z coordinate of the map.
 
double WToDbm (double w) const
 Convert from Watts to dBm.
 

Static Public Member Functions

static TypeId GetTypeId ()
 Get the type id.
 

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

Introspection did not find any typical Config paths.

Attributes

  • SimTag: simulation tag that will be concatenated to output file namesin order to distinguish them, for example: nr-rem-${SimTag}.out. nr-rem-${SimTag}-ues.txt, nr-rem-${SimTag}-gnbs.txt, nr-rem-${SimTag}-buildings.txt.
    • Set with class: ns3::StringValue
    • Underlying type:
    • Initial value:
    • Flags: construct write
  • XMin: The min x coordinate of the map.
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 0
    • Flags: construct write read
  • YMin: The min y coordinate of the map.
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 0
    • Flags: construct write read
  • XMax: The max x coordinate of the map.
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 0
    • Flags: construct write read
  • YMax: The max y coordinate of the map.
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 0
    • Flags: construct write read
  • XRes: The resolution (number of points) of themap along the x axis.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 2:65535
    • Initial value: 100
    • Flags: construct write read
  • YRes: The resolution (number of points) of themap along the y axis.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint16_t 2:65535
    • Initial value: 100
    • Flags: construct write read
  • Z: The value of the z coordinate for whichthe map is to be generated.
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 1.5
    • Flags: construct write read
  • IterForAverage: Number of iterations for the calculationof the average rem value.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint16_t 0:65535
    • Initial value: 1
    • Flags: construct write
  • RemMode: There are three high level modes of Rem generation: a) BEAM_SHAPE in which are represented the beams that are configured in the user's script scenario, considering that the receiver always has quasi-omni, and that all the beams point toward the UE which is passed as UE of interest. The purpose of this map is to illustrate the REM of the scenario that is configured.b) COVERAGE_AREA which produces two REM maps: the worst-case SINR and best-SNR for each rem position; Worst case SINR means that all interfering devices use for the transmission the beam towards the rem point;and also for the best-SNR, for each transmitting device and the REM point are used the best directional beam-pair and then is selected the best SNR.c) UE_COVERAGE which is similar as the above, although the Tx Deviceis the UE (UL direction), and the Rx device is each gNB to which it is connected each time, while the rest of gNBs (if they are present) arepointing their beams towards the Rx gNB. In case of TDD, the SINR mapwill show the interference caused by the DL of these gNBs.
    • Set with class: ns3::EnumValue<ns3::NrRadioEnvironmentMapHelper::RemMode>
    • Underlying type: BeamShape|CoverageArea|UeCoverageArea
    • Initial value: CoverageArea
    • Flags: construct write read
  • InstallationDelay: How many time it is needed in the simulation to configure phy parameters at UE, depends on RRC message timing.
    • Set with class: ns3::TimeValue
    • Underlying type: Time -9.22337e+18ns:+9.22337e+18ns
    • Initial value: +1e+08ns
    • Flags: construct write

No TraceSources are defined for this type.
Size of this type is 504 bytes (on a 64-bit architecture).

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

Member Enumeration Documentation

◆ RemMode

enum ns3::NrRadioEnvironmentMapHelper::RemMode

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

Constructor & Destructor Documentation

◆ NrRadioEnvironmentMapHelper()

ns3::NrRadioEnvironmentMapHelper::NrRadioEnvironmentMapHelper ( )

NrRadioEnvironmentMapHelper constructor.

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

◆ ~NrRadioEnvironmentMapHelper()

ns3::NrRadioEnvironmentMapHelper::~NrRadioEnvironmentMapHelper ( )
override

destructor

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

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 506 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 273 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 285 of file nr-radio-environment-map-helper.cc.

◆ DoDispose()

void ns3::NrRadioEnvironmentMapHelper::DoDispose ( )
override

Definition at line 47 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 243 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 249 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 231 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 237 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 225 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 255 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 261 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 53 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 267 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 291 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 219 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 183 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 189 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 171 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 177 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 213 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 159 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 195 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 201 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 165 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 207 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 279 of file nr-radio-environment-map-helper.cc.


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