7#ifndef SIONNA_RT_SPECTRUM_PROPAGATION_LOSS_H
8#define SIONNA_RT_SPECTRUM_PROPAGATION_LOSS_H
14#include "ns3/random-variable-stream.h"
18#include <unordered_map>
44 friend class ::ThreeGppCalcLongTermMultiPortTest;
45 friend class ::ThreeGppMimoPolarizationTest;
162 const uint8_t numTxPorts,
163 const uint8_t numRxPorts,
164 const bool isReverse);
214 uint16_t cIndex)
const;
234 const Vector& sSpeed,
235 const Vector& uSpeed,
238 bool isReverse)
const;
242 mutable std::unordered_map<uint64_t, Ptr<const LongTerm>>
Test case that test the correct use of the multi-port antennas in spectrum.
This test tests that the channel matrix is correctly generated when dual-polarized antennas are being...
Hold a value for an Attribute.
Network layer to device interface.
ComplexMatrixArray ComplexVector
the underlying Valarray
PhasedArraySpectrumPropagationLossModel()
Smart pointer class similar to boost::intrusive_ptr.
~SionnaRtSpectrumPropagationLossModel() override
Destructor.
std::complex< double > CalculateLongTermComponent(Ptr< const MatrixBasedChannelModel::ChannelMatrix > params, Ptr< const PhasedArrayModel > sAnt, Ptr< const PhasedArrayModel > uAnt, uint16_t sPortIdx, uint16_t uPortIdx, uint16_t cIndex) const
Computes a longTerm component from a specific port of s device to the specific port of u device and f...
Ptr< const MatrixBasedChannelModel::Complex3DVector > CalcLongTerm(Ptr< const MatrixBasedChannelModel::ChannelMatrix > channelMatrix, Ptr< const PhasedArrayModel > sAnt, Ptr< const PhasedArrayModel > uAnt) const
Computes the long term component.
double GetFrequency() const
Get the operating frequency.
void GetChannelModelAttribute(const std::string &name, AttributeValue &value) const
Returns the value of an attribute belonging to the associated MatrixBasedChannelModel instance.
Ptr< const MatrixBasedChannelModel::Complex3DVector > GetLongTerm(Ptr< const MatrixBasedChannelModel::ChannelMatrix > channelMatrix, Ptr< const PhasedArrayModel > aPhasedArrayModel, Ptr< const PhasedArrayModel > bPhasedArrayModel) const
Looks for the long term component in m_longTermMap.
static TypeId GetTypeId()
Get the type ID.
static Ptr< MatrixBasedChannelModel::Complex3DVector > GenSpectrumChannelMatrix(Ptr< SpectrumValue > inPsd, Ptr< const MatrixBasedChannelModel::Complex3DVector > longTerm, Ptr< const MatrixBasedChannelModel::ChannelMatrix > channelMatrix, Ptr< const MatrixBasedChannelModel::ChannelParams > channelParams, PhasedArrayModel::ComplexVector doppler, const uint8_t numTxPorts, const uint8_t numRxPorts, const bool isReverse)
Computes the frequency-domain channel matrix with the dimensions numRxPorts*numTxPorts*numRBs.
SionnaRtSpectrumPropagationLossModel()
Constructor.
Ptr< SpectrumSignalParameters > DoCalcRxPowerSpectralDensity(Ptr< const SpectrumSignalParameters > spectrumSignalParams, Ptr< const MobilityModel > a, Ptr< const MobilityModel > b, Ptr< const PhasedArrayModel > aPhasedArrayModel, Ptr< const PhasedArrayModel > bPhasedArrayModel) const override
Computes the received PSD.
void SetChannelModel(Ptr< MatrixBasedChannelModel > channel)
Set the channel model object.
Ptr< SpectrumSignalParameters > CalcBeamformingGain(Ptr< const SpectrumSignalParameters > params, Ptr< const MatrixBasedChannelModel::Complex3DVector > longTerm, Ptr< const MatrixBasedChannelModel::ChannelMatrix > channelMatrix, Ptr< const MatrixBasedChannelModel::ChannelParams > channelParams, const Vector &sSpeed, const Vector &uSpeed, uint8_t numTxPorts, uint8_t numRxPorts, bool isReverse) const
Computes the beamforming gain and applies it to the TX PSD.
void SetChannelModelAttribute(const std::string &name, const AttributeValue &value)
Sets the value of an attribute belonging to the associated MatrixBasedChannelModel instance.
Ptr< MatrixBasedChannelModel > GetChannelModel() const
Get the channel model object.
void DoDispose() override
Destructor implementation.
Ptr< MatrixBasedChannelModel > m_channelModel
the model to generate the channel matrix
int64_t DoAssignStreams(int64_t stream) override
Assign a fixed random variable stream number to the random variables used by this model.
std::unordered_map< uint64_t, Ptr< const LongTerm > > m_longTermMap
map containing the long term components
void SetRtPathSolverConfig(SionnaRtChannelModel::RtPathSolverConfig configs)
Set the ray-tracing path solver configurations.
a unique identifier for an interface.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Configuration for the Sionna RT PathSolver.
Data structure that stores the long term component for a tx-rx pair.
PhasedArrayModel::ComplexVector m_sW
the beamforming vector for the node s used to compute the long term
Ptr< const MatrixBasedChannelModel::Complex3DVector > m_longTerm
vector containing the long term component for each cluster
PhasedArrayModel::ComplexVector m_uW
the beamforming vector for the node u used to compute the long term
Ptr< const MatrixBasedChannelModel::ChannelMatrix > m_channel
pointer to the channel matrix used to compute the long term