This example shows how to configure the 3GPP channel model classes to compute the SNR between two nodes. More...
#include "ns3/channel-condition-model.h"#include "ns3/constant-position-mobility-model.h"#include "ns3/core-module.h"#include "ns3/lte-spectrum-value-helper.h"#include "ns3/mobility-model.h"#include "ns3/node-container.h"#include "ns3/node.h"#include "ns3/spectrum-signal-parameters.h"#include "ns3/three-gpp-channel-model.h"#include "ns3/three-gpp-propagation-loss-model.h"#include "ns3/three-gpp-spectrum-propagation-loss-model.h"#include "ns3/uniform-planar-array.h"#include <fstream>Go to the source code of this file.
Classes | |
| struct | ComputeSnrParams |
| A structure that holds the parameters for the ComputeSnr function. More... | |
Functions | |
| static void | ComputeSnr (const ComputeSnrParams ¶ms) |
| Compute the average SNR. | |
| static void | DoBeamforming (Ptr< MobilityModel > txMob, Ptr< PhasedArrayModel > thisAntenna, Ptr< MobilityModel > rxMob) |
| Perform the beamforming using the DFT beamforming method. | |
Variables | |
| static Ptr< ThreeGppPropagationLossModel > | m_propagationLossModel |
| the PropagationLossModel object | |
| static Ptr< ThreeGppSpectrumPropagationLossModel > | m_spectrumLossModel |
| the SpectrumPropagationLossModel object | |
This example shows how to configure the 3GPP channel model classes to compute the SNR between two nodes.
The simulation involves two static nodes which are placed at a certain distance from each other and communicate through a wireless channel at 2 GHz with a bandwidth of 18 MHz. The default propagation environment is 3D-urban macro (UMa), and it can be configured changing the value of the string "scenario". Each node hosts has an antenna array with 4 antenna elements.
$ ./ns3 run "three-gpp-channel-example [Program Options]"
--frequency --txPow --noiseFigure --distance --simTime --timeRes --scenario Definition in file three-gpp-channel-example.cc.
|
static |
Compute the average SNR.
| params | A structure that holds the parameters that are needed to perform calculations in ComputeSnr |
Definition at line 110 of file three-gpp-channel-example.cc.
References ns3::Create(), ns3::LteSpectrumValueHelper::CreateNoisePowerSpectralDensity(), ns3::LteSpectrumValueHelper::CreateTxPowerSpectralDensity(), ns3::Time::GetSeconds(), m_propagationLossModel, m_spectrumLossModel, ns3::Simulator::Now(), NS_ASSERT_MSG, NS_LOG_DEBUG, and ns3::Sum().
|
static |
Perform the beamforming using the DFT beamforming method.
| txMob | the mobility model of the node performing the beamforming |
| thisAntenna | the antenna object associated to thisDevice |
| rxMob | the mobility model of the node towards which will point the beam |
Definition at line 66 of file three-gpp-channel-example.cc.
References ns3::Angles::GetAzimuth(), and ns3::Angles::GetInclination().
|
static |
the PropagationLossModel object
Definition at line 40 of file three-gpp-channel-example.cc.
|
static |
the SpectrumPropagationLossModel object
Definition at line 42 of file three-gpp-channel-example.cc.