![]() |
5G-LENA nr-v4.0
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). | |
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. | |
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:
Introspection did not find any typical Config paths.
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.
enum ns3::NrRadioEnvironmentMapHelper::RemMode |
Definition at line 93 of file nr-radio-environment-map-helper.h.
ns3::NrRadioEnvironmentMapHelper::NrRadioEnvironmentMapHelper | ( | ) |
NrRadioEnvironmentMapHelper constructor.
Definition at line 37 of file nr-radio-environment-map-helper.cc.
|
override |
destructor
Definition at line 42 of file nr-radio-environment-map-helper.cc.
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 506 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 273 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 285 of file nr-radio-environment-map-helper.cc.
|
override |
Definition at line 47 of file nr-radio-environment-map-helper.cc.
double ns3::NrRadioEnvironmentMapHelper::GetMaxX | ( | ) | const |
Definition at line 243 of file nr-radio-environment-map-helper.cc.
Referenced by GetTypeId().
double ns3::NrRadioEnvironmentMapHelper::GetMaxY | ( | ) | const |
Definition at line 249 of file nr-radio-environment-map-helper.cc.
Referenced by GetTypeId().
double ns3::NrRadioEnvironmentMapHelper::GetMinX | ( | ) | const |
Definition at line 231 of file nr-radio-environment-map-helper.cc.
Referenced by GetTypeId().
double ns3::NrRadioEnvironmentMapHelper::GetMinY | ( | ) | const |
Definition at line 237 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 225 of file nr-radio-environment-map-helper.cc.
Referenced by GetTypeId().
uint16_t ns3::NrRadioEnvironmentMapHelper::GetResX | ( | ) | const |
Definition at line 255 of file nr-radio-environment-map-helper.cc.
Referenced by GetTypeId().
uint16_t ns3::NrRadioEnvironmentMapHelper::GetResY | ( | ) | const |
Definition at line 261 of file nr-radio-environment-map-helper.cc.
Referenced by GetTypeId().
|
static |
Get the type id.
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().
double ns3::NrRadioEnvironmentMapHelper::GetZ | ( | ) | const |
Definition at line 267 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 291 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 219 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 183 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 189 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 171 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 177 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 213 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 159 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 195 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 201 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 165 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 207 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 279 of file nr-radio-environment-map-helper.cc.