5G-LENA
nr-v3.0-25-g90be5d1
The 5G/NR module for the ns-3 simulator
|
Generate a radio environment map. More...
#include "nr-radio-environment-map-helper.h"
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... | |
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:
While for the BeamShape REM generation the user can include the following code:
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:
Definition at line 92 of file nr-radio-environment-map-helper.h.
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).
rtdNetDev | The transmitting device(s) for which the map will be generated |
rrdDevice | The receiving device for which the map will be generated |
bwpId | The bwpId |
Definition at line 508 of file nr-radio-environment-map-helper.cc.
References ns3::NrUeNetDevice::GetPhy().
double ns3::NrRadioEnvironmentMapHelper::DbmToW | ( | double | dbm | ) | const |
Convert from dBm to Watts.
dbm | the power in dBm |
Definition at line 275 of file nr-radio-environment-map-helper.cc.
double ns3::NrRadioEnvironmentMapHelper::DbToRatio | ( | double | dB | ) | const |
Convert from dB to ratio.
dB | the value in dB |
Definition at line 287 of file nr-radio-environment-map-helper.cc.
double ns3::NrRadioEnvironmentMapHelper::GetMaxX | ( | ) | const |
Definition at line 245 of file nr-radio-environment-map-helper.cc.
Referenced by GetTypeId().
double ns3::NrRadioEnvironmentMapHelper::GetMaxY | ( | ) | const |
Definition at line 251 of file nr-radio-environment-map-helper.cc.
Referenced by GetTypeId().
double ns3::NrRadioEnvironmentMapHelper::GetMinX | ( | ) | const |
Definition at line 233 of file nr-radio-environment-map-helper.cc.
Referenced by GetTypeId().
double ns3::NrRadioEnvironmentMapHelper::GetMinY | ( | ) | const |
Definition at line 239 of file nr-radio-environment-map-helper.cc.
Referenced by GetTypeId().
NrRadioEnvironmentMapHelper::RemMode ns3::NrRadioEnvironmentMapHelper::GetRemMode | ( | ) | const |
Get the type of REM Map to be generated.
Definition at line 227 of file nr-radio-environment-map-helper.cc.
Referenced by GetTypeId().
uint16_t ns3::NrRadioEnvironmentMapHelper::GetResX | ( | ) | const |
Definition at line 257 of file nr-radio-environment-map-helper.cc.
Referenced by GetTypeId().
uint16_t ns3::NrRadioEnvironmentMapHelper::GetResY | ( | ) | const |
Definition at line 263 of file nr-radio-environment-map-helper.cc.
Referenced by GetTypeId().
|
static |
Get the type id.
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().
double ns3::NrRadioEnvironmentMapHelper::GetZ | ( | ) | const |
Definition at line 269 of file nr-radio-environment-map-helper.cc.
Referenced by GetTypeId().
double ns3::NrRadioEnvironmentMapHelper::RatioToDb | ( | double | ratio | ) | const |
Convert from ratio to dB.
ratio | the ratio in linear scale |
Definition at line 293 of file nr-radio-environment-map-helper.cc.
void ns3::NrRadioEnvironmentMapHelper::SetInstallationDelay | ( | const Time & | installationDelay | ) |
Sets the installation delay.
installationDelay | delay for the REM installation |
Definition at line 221 of file nr-radio-environment-map-helper.cc.
Referenced by GetTypeId().
void ns3::NrRadioEnvironmentMapHelper::SetMaxX | ( | double | xMax | ) |
Sets the max x coordinate of the map.
xMax | The max x coordinate |
Definition at line 185 of file nr-radio-environment-map-helper.cc.
Referenced by GetTypeId().
void ns3::NrRadioEnvironmentMapHelper::SetMaxY | ( | double | yMax | ) |
Sets the max y coordinate of the map.
yMax | The max y coordinate |
Definition at line 191 of file nr-radio-environment-map-helper.cc.
Referenced by GetTypeId().
void ns3::NrRadioEnvironmentMapHelper::SetMinX | ( | double | xMin | ) |
Sets the min x coordinate of the map.
xMin | The min x coordinate |
Definition at line 173 of file nr-radio-environment-map-helper.cc.
Referenced by GetTypeId().
void ns3::NrRadioEnvironmentMapHelper::SetMinY | ( | double | yMin | ) |
Sets the min y coordinate of the map.
yMin | The min y coordinate |
Definition at line 179 of file nr-radio-environment-map-helper.cc.
Referenced by GetTypeId().
void ns3::NrRadioEnvironmentMapHelper::SetNumOfItToAverage | ( | uint16_t | numOfIterationsToAverage | ) |
Sets the number of iterations to calculate the average of rem value.
numOfIterationsToAverage | The number of iterations |
Definition at line 215 of file nr-radio-environment-map-helper.cc.
Referenced by GetTypeId().
void ns3::NrRadioEnvironmentMapHelper::SetRemMode | ( | enum RemMode | remType | ) |
Set the type of REM Map to be generated.
remType | the desired type (BeamShape/CoverageArea/UeCoverage) |
Definition at line 161 of file nr-radio-environment-map-helper.cc.
Referenced by GetTypeId().
void ns3::NrRadioEnvironmentMapHelper::SetResX | ( | uint16_t | xRes | ) |
Sets the resolution (number of points) of the map along the x axis.
xRes | The x axis resolution |
Definition at line 197 of file nr-radio-environment-map-helper.cc.
Referenced by GetTypeId().
void ns3::NrRadioEnvironmentMapHelper::SetResY | ( | uint16_t | yRes | ) |
Sets the resolution (number of points) of the map along the y axis.
yRes | The y axis resolution |
Definition at line 203 of file nr-radio-environment-map-helper.cc.
Referenced by GetTypeId().
void ns3::NrRadioEnvironmentMapHelper::SetSimTag | ( | const std::string & | simTag | ) |
Set simTag that will be concatenated to output file names.
simTag | string to be used as simulation tag |
Definition at line 167 of file nr-radio-environment-map-helper.cc.
Referenced by GetTypeId().
void ns3::NrRadioEnvironmentMapHelper::SetZ | ( | double | z | ) |
Sets the z coordinate of the map.
z | The z coordinate |
Definition at line 209 of file nr-radio-environment-map-helper.cc.
Referenced by GetTypeId().
double ns3::NrRadioEnvironmentMapHelper::WToDbm | ( | double | w | ) | const |
Convert from Watts to dBm.
w | the power in Watts |
Definition at line 281 of file nr-radio-environment-map-helper.cc.