High-level interface for generating MIMO channel matrices using Sionna RT. More...
#include "sionna-rt-channel-model.h"
Classes | |
| struct | RtPathSolverConfig |
| Configuration for the Sionna RT PathSolver. More... | |
| struct | RtSceneConfig |
| Scene high-level configuration. More... | |
| struct | SionnaRtChannelParams |
| ChannelParams extension to carry Sionna-specific metadata. More... | |
Public Member Functions | |
| SionnaRtChannelModel () | |
| Constructor. | |
| ~SionnaRtChannelModel () override | |
| Destructor. | |
| bool | AntennaSetupChanged (Ptr< const PhasedArrayModel > aAntenna, Ptr< const PhasedArrayModel > bAntenna, Ptr< const ChannelMatrix > channelMatrix) const |
| Check whether antenna configuration changes require regenerating the channel matrix. | |
| int64_t | AssignStreams (int64_t stream) |
| Assign stream indices to any random variables used internally. | |
| bool | ChannelMatrixNeedsUpdate (Ptr< const ChannelMatrix > channelMatrix) const |
| Determine whether an existing ChannelMatrix must be updated. | |
| Ptr< MatrixBasedChannelModel::ChannelMatrix > | CreateNewMatrixChannel (const Complex3DVector hUsn, const Ptr< const MobilityModel > sMob, const Ptr< const MobilityModel > uMob, Ptr< const PhasedArrayModel > sAntenna, Ptr< const PhasedArrayModel > uAntenna) const |
| Create a new ChannelMatrix object wrapping a precomputed CIR tensor. | |
| py::object | CreateScene (const py::module_ rt, const Ptr< const MobilityModel > sMob, const Ptr< const MobilityModel > uMob, Ptr< const PhasedArrayModel > sAntenna, Ptr< const PhasedArrayModel > uAntenna) const |
| Create a sionna.rt scene object for the provided endpoints and antennas. | |
| void | DoDispose () override |
| Release references and perform cleanup. | |
| std::string | GetAntennaElementPattern (Ptr< const AntennaModel > element) const |
| Return a string describing the antenna element pattern for Sionna. | |
| Ptr< const ChannelMatrix > | GetChannel (Ptr< const MobilityModel > aMob, Ptr< const MobilityModel > bMob, Ptr< const PhasedArrayModel > aAntenna, Ptr< const PhasedArrayModel > bAntenna) override |
| Retrieve or generate the channel matrix for the node pair. | |
| double | GetFrequency () const |
| Get the configured center frequency. | |
| double | GetMaxNumberOfPaths () const |
| Get the configured maximum number of propagation paths. | |
| virtual Ptr< ChannelMatrix > | GetNewChannel (py::object paths, const Ptr< const MobilityModel > sMob, const Ptr< const MobilityModel > uMob, Ptr< const PhasedArrayModel > sAntenna, Ptr< const PhasedArrayModel > uAntenna) const |
| Compute a new channel matrix for the given node pair using Sionna RT. | |
| bool | GetNormalizeDelays () const |
| Query whether path delay normalization is enabled. | |
| Ptr< const ChannelParams > | GetParams (Ptr< const MobilityModel > aMob, Ptr< const MobilityModel > bMob) const override |
| Get channel parameters (path info) for a node pair if available. | |
| RtPathSolverConfig | GetRtPathSolverConfig () const |
| Retrieve the current path solver configuration. | |
| std::string | GetScenario () const |
| Return the configured propagation scenario name. | |
| py::object | MakePlannarArray (const py::module_ rt, Ptr< const PhasedArrayModel > antenna) const |
| Build a Sionna PlanarArray description from an ns-3 PhasedArrayModel. | |
| void | SetFrequency (double f) |
| Set the center frequency used by the model and scene factories. | |
| void | SetMaxNumberOfPaths (double p) |
| Set the maximum number of propagation paths to retain. | |
| void | SetMergeShapeEnable (bool cond) |
| Enable or disable shape merging when loading scenes from sionna.rt. | |
| void | SetNormalizeDelays (bool cond) |
| Enable or disable normalization of path delays in Sionna RT. | |
| void | SetRtPathSolverConfig (RtPathSolverConfig configs) |
| Configure the Sionna RT path solver behavior. | |
| void | SetScenario (const std::string &scenario) |
| Set the propagation scenario name used by sionna.rt scene factories. | |
| Public Member Functions inherited from ns3::MatrixBasedChannelModel | |
| ~MatrixBasedChannelModel () override | |
| Destructor for MatrixBasedChannelModel. | |
| Public Member Functions inherited from ns3::Object | |
| Object () | |
| Caller graph was not generated because of its size. | |
| ~Object () override | |
| Destructor. | |
| void | AggregateObject (Ptr< Object > other) |
| Aggregate two Objects together. | |
| void | Dispose () |
| Dispose of this Object. | |
| AggregateIterator | GetAggregateIterator () const |
| Get an iterator to the Objects aggregated to this one. | |
| TypeId | GetInstanceTypeId () const final |
| Get the most derived TypeId for this Object. | |
| template<> | |
| Ptr< Object > | GetObject () const |
| Specialization of () for objects of type ns3::Object. | |
| template<typename T> | |
| Ptr< T > | GetObject () const |
| Get a pointer to the requested aggregated Object. | |
| template<> | |
| Ptr< Object > | GetObject (TypeId tid) const |
| Specialization of (TypeId tid) for objects of type ns3::Object. | |
| template<typename T> | |
| Ptr< T > | GetObject (TypeId tid) const |
| Get a pointer to the requested aggregated Object by TypeId. | |
| void | Initialize () |
| Invoke DoInitialize on all Objects aggregated to this one. | |
| bool | IsInitialized () const |
| Check if the object has been initialized. | |
| void | UnidirectionalAggregateObject (Ptr< Object > other) |
| Aggregate an Object to another Object. | |
| Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
| SimpleRefCount () | |
| Default constructor. | |
| uint32_t | GetReferenceCount () const |
| Get the reference count of the object. | |
| SimpleRefCount & | operator= (const SimpleRefCount &o) |
| Assignment operator. | |
| void | Ref () const |
| Increment the reference count. | |
| void | Unref () const |
| Decrement the reference count. | |
| Public Member Functions inherited from ns3::ObjectBase | |
| virtual | ~ObjectBase () |
| Virtual destructor. | |
| void | GetAttribute (std::string name, AttributeValue &value, bool permissive=false) const |
| Get the value of an attribute, raising fatal errors if unsuccessful. | |
| bool | GetAttributeFailSafe (std::string name, AttributeValue &value) const |
| Get the value of an attribute without raising errors. | |
| void | SetAttribute (std::string name, const AttributeValue &value) |
| Set a single attribute, raising fatal errors if unsuccessful. | |
| bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
| Set a single attribute without raising errors. | |
| bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
| Connect a TraceSource to a Callback with a context. | |
| bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
| Connect a TraceSource to a Callback without a context. | |
| bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
| Disconnect from a TraceSource a Callback previously connected with a context. | |
| bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
| Disconnect from a TraceSource a Callback previously connected without a context. | |
Static Public Member Functions | |
| static TypeId | GetTypeId () |
| Get the ns-3 TypeId for this class. | |
| Static Public Member Functions inherited from ns3::MatrixBasedChannelModel | |
| static uint64_t | GetKey (uint32_t a, uint32_t b) |
| Generate a unique value for the pair of unsigned integer of 32 bits, where the order does not matter, i.e., the same value will be returned for (a,b) and (b,a). | |
| Static Public Member Functions inherited from ns3::Object | |
| static TypeId | GetTypeId () |
| Register this type. | |
| Static Public Member Functions inherited from ns3::ObjectBase | |
| static TypeId | GetTypeId () |
| Get the type ID. | |
Protected Member Functions | |
| MatrixBasedChannelModel::DoubleVector | CalculateAnglesFromPaths (const py::module_ np, py::object paths, std::string Angle) const |
| Extract angular measurements (AOD/AOA/ZOA/ZOD) from the paths. | |
| Ptr< SionnaRtChannelParams > | CalculateChannelParamsFromPaths (const py::object paths, Ptr< const MobilityModel > aMob, Ptr< const MobilityModel > bMob) const |
| Build ChannelParams metadata from Sionna RT paths object. | |
| Complex3DVector | CalculateCirFromPaths (const py::object paths) const |
| Convert calculated paths into channel impulse responses (CIRs). | |
| std::vector< double > | CalculateDopplerFromPaths (const py::module_ np, py::object paths) const |
| Extract Doppler shifts per path from the Python paths object. | |
| py::object | CalculatePaths (const py::module_ rt, const py::object scene) |
| Compute propagation paths between transmitter and receiver. | |
| MatrixBasedChannelModel::DoubleVector | CalculateTauFromPaths (const py::module_ np, py::object paths) const |
| Extract delays (tau) per path from RS paths object. | |
| bool | DoesNumberOfPathsExceedMaximum (size_t numPaths) const |
| Determine if the path count exceeds the configured maximum threshold. | |
| size_t | GetNumberOfPathsFromCir (const py::object paths) const |
| Extract the number of propagation paths from the CIR tensor. | |
| std::string | GetPolarizationFromPolSlantAngle (const double polSlantAngle, const uint8_t numpol) const |
| Convert a polarization slant angle into Sionna RT string representation. | |
| py::object | LoadScene (const py::module_ rt) const |
| Load a Sionna RT scene using the configured scenario name. | |
| void | SceneRenderImageToFile (const py::module_ rt, const py::object paths, const py::object scene) const |
| Render a visualization of the scene and paths to a PNG image file. | |
| Protected Member Functions inherited from ns3::Object | |
| Object (const Object &o) | |
| Copy an Object. | |
| virtual void | DoInitialize () |
| Initialize() implementation. | |
| virtual void | NotifyNewAggregate () |
| Notify all Objects aggregated to this one of a new Object being aggregated. | |
| Protected Member Functions inherited from ns3::ObjectBase | |
| void | ConstructSelf (const AttributeConstructionList &attributes) |
| Complete construction of ObjectBase; invoked by derived classes. | |
| virtual void | NotifyConstructionCompleted () |
| Notifier called once the ObjectBase is fully constructed. | |
Protected Attributes | |
| Vector | m_cameraLookAt |
| Camera look-at point for scene rendering. | |
| Vector | m_cameraPosition |
| Camera position/look-at used by the scene rendering pipeline. | |
| std::unordered_map< uint64_t, Ptr< ChannelMatrix > > | m_channelMatrixMap |
| map containing the channel realizations per pair of PhasedAntennaArray instances, the key of this map is reciprocal uniquely identifies a pair of PhasedAntennaArrays | |
| std::unordered_map< uint64_t, Ptr< SionnaRtChannelParams > > | m_channelParamsMap |
| map containing the common channel parameters per pair of nodes, the key of this map is reciprocal and uniquely identifies a pair of nodes | |
| bool | m_isImageRendered |
| Control for whether we should render a scene image. | |
| double | m_maxNumberOfPaths |
| Maximum number of paths to be generated by the path solver. | |
| bool | m_normalizeDelays |
| Whether Sionna RT should normalize path delays in CIR output. | |
| std::string | m_outputImageDirectory |
| Output directory. | |
| std::string | m_outputImageName |
| Output image rendering options (file name/directory). | |
| RtPathSolverConfig | m_RtPathSolverConfig |
| Path solver configuration used when computing paths. | |
| RtSceneConfig | m_sceneConfigs |
| High-level scene configuration. | |
| Time | m_updatePeriod |
| Channel update period used to decide whether to re-run path computations. | |
Additional Inherited Members | |
| Public Types inherited from ns3::MatrixBasedChannelModel | |
| using | Complex2DVector = ComplexMatrixArray |
| Create an alias for 2D complex vectors. | |
| using | Complex3DVector = ComplexMatrixArray |
| Create an alias for 3D complex vectors. | |
| using | Double2DVector = std::vector<DoubleVector> |
| Type definition for matrices of doubles. | |
| using | Double3DVector = std::vector<Double2DVector> |
| Type definition for 3D matrices of doubles. | |
| using | DoubleVector = std::vector<double> |
| Type definition for vectors of doubles. | |
| Static Public Attributes inherited from ns3::MatrixBasedChannelModel | |
| static const uint8_t | AOA_INDEX = 0 |
| index of the AOA value in the m_angle array | |
| static const uint8_t | AOD_INDEX = 2 |
| index of the AOD value in the m_angle array | |
| static const uint8_t | ZOA_INDEX = 1 |
| index of the ZOA value in the m_angle array | |
| static const uint8_t | ZOD_INDEX = 3 |
| index of the ZOD value in the m_angle array | |
| Related Symbols inherited from ns3::ObjectBase | |
| static TypeId | GetObjectIid () |
| Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. | |
High-level interface for generating MIMO channel matrices using Sionna RT.
This class bridges ns-3's MatrixBasedChannelModel framework and the Sionna RT Python library (sionna.rt) to generate realistic, geometry-based MIMO channels. It embeds a Python interpreter (via pybind11), constructs scenes (terrain/building geometry), computes propagation paths (LOS, specular/diffuse reflections, refraction, diffraction, synthetic arrays), and converts the resulting paths into ns-3 ChannelMatrix and ChannelParams objects for use by spectrum and wireless modules like nr, wifi, lte, etc
Design highlights:
Threading/Concurrency:
Definition at line 69 of file sionna-rt-channel-model.h.
| ns3::SionnaRtChannelModel::SionnaRtChannelModel | ( | ) |
|
override |
| bool ns3::SionnaRtChannelModel::AntennaSetupChanged | ( | Ptr< const PhasedArrayModel > | aAntenna, |
| Ptr< const PhasedArrayModel > | bAntenna, | ||
| Ptr< const ChannelMatrix > | channelMatrix ) const |
Check whether antenna configuration changes require regenerating the channel matrix.
This compares the provided antenna arrays with the stored ChannelMatrix metadata to decide if the matrix is stale (for example if number of ports, element locations, or element types changed).
| aAntenna | Antenna array of node A |
| bAntenna | Antenna array of node B |
| channelMatrix | The existing channel matrix to compare against |
Definition at line 183 of file sionna-rt-channel-model.cc.
References NS_LOG_DEBUG, and NS_LOG_INFO.
Referenced by GetChannel().
| int64_t ns3::SionnaRtChannelModel::AssignStreams | ( | int64_t | stream | ) |
Assign stream indices to any random variables used internally.
This is used to make simulations reproducible by assigning deterministic RNG stream indices.
| stream | First stream index to use. |
|
protected |
Extract angular measurements (AOD/AOA/ZOA/ZOD) from the paths.
Returns the requested angle measure for each path in radians. The Angle parameter is case-sensitive and should be one of:
| np | The numpy_python module reference (py::module_) |
| paths | Python paths object computed by Sionna RT |
| Angle | String indicating the desired angle type |
Definition at line 773 of file sionna-rt-channel-model.cc.
References data, m_RtPathSolverConfig, NS_LOG_DEBUG, and NS_LOG_ERROR.
Referenced by CalculateChannelParamsFromPaths().
|
protected |
Build ChannelParams metadata from Sionna RT paths object.
Produces an instance of SionnaRtChannelParams, populated with per-path doppler terms (m_doppler) and any other per-channel metadata extracted from the paths object.
| paths | Python paths object returned by CalculatePaths |
| aMob | Mobility model of node A |
| bMob | Mobility model of node B |
Definition at line 493 of file sionna-rt-channel-model.cc.
References CalculateAnglesFromPaths(), CalculateDopplerFromPaths(), CalculateTauFromPaths(), ns3::Create(), ns3::DEG2RAD, ns3::Node::GetId(), ns3::Simulator::Now(), NS_LOG_DEBUG, and NS_LOG_FUNCTION.
Referenced by GetChannel().
|
protected |
Convert calculated paths into channel impulse responses (CIRs).
The returned Complex3DVector is shaped as: [numRxPorts][numTxPorts][path] where each path is the complex channel coefficient for a given delay tap. Delay and power normalization are handled according to the scene and solver semantics. The function uses internal utilities to extract angles, Doppler and delays from the paths object.
| paths | Python object representing computed paths |
Definition at line 688 of file sionna-rt-channel-model.cc.
References data, m_normalizeDelays, NS_LOG_DEBUG, and NS_LOG_FUNCTION.
Referenced by GetNewChannel().
|
protected |
Extract Doppler shifts per path from the Python paths object.
The Doppler shifts are returned in a PhasedArrayModel::ComplexVector where each entry is e^{j*2*pi*fd*t} or similar, depending on the calling convention.
| np | The numpy_python module reference (py::module_) |
| paths | Python paths object computed by Sionna RT |
Definition at line 748 of file sionna-rt-channel-model.cc.
References data, m_RtPathSolverConfig, and NS_LOG_FUNCTION.
Referenced by CalculateChannelParamsFromPaths().
|
protected |
Compute propagation paths between transmitter and receiver.
Invokes the Sionna RT PathSolver with the configured RtPathSolverConfig options (max_depth, los, specular_reflection, etc.). The solver recursively traces rays through the scene to identify all significant paths up to the configured maximum depth. If the number of paths exceeds the configured maximum (m_maxNumberOfPaths), this method automatically adjusts the solver depth and retries until the path count is acceptable.
| rt | The imported sionna.rt Python module |
| scene | A Python Scene object (from CreateScene or LoadScene) |
Definition at line 598 of file sionna-rt-channel-model.cc.
References CalculatePaths(), DoesNumberOfPathsExceedMaximum(), GetNumberOfPathsFromCir(), m_isImageRendered, m_maxNumberOfPaths, m_RtPathSolverConfig, NS_LOG_DEBUG, NS_LOG_FUNCTION, NS_LOG_INFO, NS_LOG_WARN, and SceneRenderImageToFile().
Referenced by CalculatePaths(), and GetChannel().
|
protected |
Extract delays (tau) per path from RS paths object.
Returns a vector of delay values for each path aligned with the CIR.
| np | The numpy_python module reference (py::module_) |
| paths | Python paths object computed by Sionna RT |
Definition at line 726 of file sionna-rt-channel-model.cc.
References data, m_normalizeDelays, m_RtPathSolverConfig, and NS_LOG_FUNCTION.
Referenced by CalculateChannelParamsFromPaths().
| bool ns3::SionnaRtChannelModel::ChannelMatrixNeedsUpdate | ( | Ptr< const ChannelMatrix > | channelMatrix | ) | const |
Determine whether an existing ChannelMatrix must be updated.
Checks if the cached ChannelMatrix is stale because of configuration changes (update period expired or mobility changed). If the update period has passed or the ChannelMatrix metadata differs from the provided inputs, it will report that regeneration is required.
| channelMatrix | The existing channel matrix to check |
Definition at line 214 of file sionna-rt-channel-model.cc.
References m_updatePeriod, ns3::Now(), ns3::Simulator::Now(), ns3::Time::NS, NS_LOG_DEBUG, and NS_LOG_FUNCTION.
Referenced by GetChannel().
| Ptr< MatrixBasedChannelModel::ChannelMatrix > ns3::SionnaRtChannelModel::CreateNewMatrixChannel | ( | const Complex3DVector | hUsn, |
| const Ptr< const MobilityModel > | sMob, | ||
| const Ptr< const MobilityModel > | uMob, | ||
| Ptr< const PhasedArrayModel > | sAntenna, | ||
| Ptr< const PhasedArrayModel > | uAntenna ) const |
Create a new ChannelMatrix object wrapping a precomputed CIR tensor.
This function converts a 3D array of complex samples into an ns-3 MatrixBasedChannelModel::ChannelMatrix instance. The expected format of hUsn is a Complex3DVector shaped as: [numRxPorts][numTxPorts][numTaps], where each complex entry represents a channel tap (CIR sample) for the corresponding Rx/Tx element pair for a given delay tap index.
The function will populate the ChannelMatrix's internal metadata (ports, tap delays, samplerate assumptions) and will return a Ptr to the created wrapper object. The mobility and antenna pointers are provided primarily to capture metadata and orientation for consistent caching and book-keeping.
| hUsn | 3D complex CIR vector (rx ports x tx ports x taps) |
| sMob | Mobility model of the transmitter endpoint |
| uMob | Mobility model of the receiver endpoint |
| sAntenna | Transmitter PhasedArrayModel |
| uAntenna | Receiver PhasedArrayModel |
Definition at line 315 of file sionna-rt-channel-model.cc.
References ns3::Create(), ns3::Node::GetId(), and ns3::Simulator::Now().
Referenced by GetNewChannel().
| py::object ns3::SionnaRtChannelModel::CreateScene | ( | const py::module_ | rt, |
| const Ptr< const MobilityModel > | sMob, | ||
| const Ptr< const MobilityModel > | uMob, | ||
| Ptr< const PhasedArrayModel > | sAntenna, | ||
| Ptr< const PhasedArrayModel > | uAntenna ) const |
Create a sionna.rt scene object for the provided endpoints and antennas.
The returned py::object is the Python scene instance and ownership is managed by pybind11. The method uses the RtSceneConfig and frequency set in this class to configure the scene creation.
| rt | sionna.rt module used to construct Python objects |
| sMob | Mobility model of the transmitter |
| uMob | Mobility model of the receiver |
| sAntenna | Transmitter phased array model |
| uAntenna | Receiver phased array model |
Definition at line 535 of file sionna-rt-channel-model.cc.
References ns3::DynamicCast(), LoadScene(), m_sceneConfigs, MakePlannarArray(), NS_LOG_DEBUG, NS_LOG_FUNCTION, NS_LOG_INFO, and v.
Referenced by GetChannel().
|
overridevirtual |
Release references and perform cleanup.
Reimplemented from ns3::Object.
Definition at line 49 of file sionna-rt-channel-model.cc.
References m_channelMatrixMap, m_channelParamsMap, and NS_LOG_FUNCTION.
|
protected |
Determine if the path count exceeds the configured maximum threshold.
Compares a given path count against the m_maxNumberOfPaths attribute to decide whether the channel matrix computation should be rejected or recursively recomputed with reduced solver depth.
| numPaths | Number of paths to check against the threshold |
Definition at line 838 of file sionna-rt-channel-model.cc.
References m_maxNumberOfPaths, and NS_LOG_FUNCTION.
Referenced by CalculatePaths().
| std::string ns3::SionnaRtChannelModel::GetAntennaElementPattern | ( | Ptr< const AntennaModel > | element | ) | const |
Return a string describing the antenna element pattern for Sionna.
This method inspects the ns-3 AntennaModel instance and returns a string that represents the Sionna element pattern (e.g., "isotropic", "3gpp_antenna"). Sionna expects the element description when creating PlanarArray objects for element-level responses.
| element | Pointer to the ns-3 AntennaModel for a single element |
Definition at line 401 of file sionna-rt-channel-model.cc.
References ns3::DynamicCast(), NS_LOG_DEBUG, and NS_LOG_FUNCTION.
Referenced by MakePlannarArray().
|
overridevirtual |
Retrieve or generate the channel matrix for the node pair.
Given mobility and antenna pointers for endpoints A/B, this method returns a cached ChannelMatrix if available and up-to-date; otherwise it invokes GetNewChannel to compute a new one using Sionna RT. The cache key is a reciprocal uint64_t encoding of endpoint identifiers.
| aMob | Mobility model of node A (transmitter or one endpoint). |
| bMob | Mobility model of node B (receiver or the other endpoint). |
| aAntenna | Antenna array of node A. |
| bAntenna | Antenna array of node B. |
Implements ns3::MatrixBasedChannelModel.
Definition at line 233 of file sionna-rt-channel-model.cc.
References AntennaSetupChanged(), CalculateChannelParamsFromPaths(), CalculatePaths(), ChannelMatrixNeedsUpdate(), CreateScene(), ns3::Node::GetId(), ns3::MatrixBasedChannelModel::GetKey(), GetNewChannel(), m_channelMatrixMap, m_channelParamsMap, NS_LOG_DEBUG, NS_LOG_FUNCTION, and NS_LOG_INFO.
| double ns3::SionnaRtChannelModel::GetFrequency | ( | ) | const |
Get the configured center frequency.
Definition at line 176 of file sionna-rt-channel-model.cc.
References m_sceneConfigs, and NS_LOG_FUNCTION.
Referenced by GetTypeId().
| double ns3::SionnaRtChannelModel::GetMaxNumberOfPaths | ( | ) | const |
Get the configured maximum number of propagation paths.
Definition at line 168 of file sionna-rt-channel-model.cc.
References m_maxNumberOfPaths, NS_LOG_FUNCTION, and NS_LOG_INFO.
Referenced by GetTypeId().
|
virtual |
Compute a new channel matrix for the given node pair using Sionna RT.
This method performs the entire flow:
The function accepts the 'paths' object returned by CalculatePaths rather than the Python scene directly to allow callers to separate scene and path computation if desired.
| paths | Python object describing the computed paths (from CalculatePaths) |
| sMob | Mobility model of the transmitter endpoint |
| uMob | Mobility model of the receiver endpoint |
| sAntenna | Transmitter PhasedArrayModel |
| uAntenna | Receiver PhasedArrayModel |
Definition at line 299 of file sionna-rt-channel-model.cc.
References CalculateCirFromPaths(), CreateNewMatrixChannel(), NS_LOG_DEBUG, and NS_LOG_FUNCTION.
Referenced by GetChannel().
| bool ns3::SionnaRtChannelModel::GetNormalizeDelays | ( | ) | const |
Query whether path delay normalization is enabled.
Definition at line 161 of file sionna-rt-channel-model.cc.
References m_normalizeDelays, and NS_LOG_FUNCTION.
Referenced by GetTypeId().
|
protected |
Extract the number of propagation paths from the CIR tensor.
Retrieves the channel impulse response (CIR) data from the Sionna RT paths object and extracts the total number of propagation paths. The CIR is organized as a 6-D numpy array with shape: [num_rx, num_rx_ant, num_tx, num_tx_ant, num_paths, num_time_steps]
This method works identically for both synthetic array and standard array configurations, always reading from dimension 4 (num_paths).
| paths | Python Paths object computed by Sionna RT PathSolver |
Definition at line 822 of file sionna-rt-channel-model.cc.
References m_RtPathSolverConfig, and NS_LOG_FUNCTION.
Referenced by CalculatePaths().
|
overridevirtual |
Get channel parameters (path info) for a node pair if available.
If the pair has associated ChannelParams in m_channelParamsMap this returns it; otherwise a null pointer is returned.
| aMob | Mobility model of node A. |
| bMob | Mobility model of node B. |
Implements ns3::MatrixBasedChannelModel.
Definition at line 475 of file sionna-rt-channel-model.cc.
References ns3::Node::GetId(), ns3::MatrixBasedChannelModel::GetKey(), m_channelParamsMap, NS_LOG_FUNCTION, and NS_LOG_WARN.
|
protected |
Convert a polarization slant angle into Sionna RT string representation.
Maps the polarization configuration (defined by slant angle and element count) into one of Sionna's standard polarization strings: "V" (vertical), "H" (horizontal), "VH" (dual polarization), or "cross" (cross-polarization).
| polSlantAngle | Polarization slant angle in radians (typically 0 or pi/2) |
| numpol | Number of polarizations per element (1 = single-pol, 2 = dual-pol) |
Definition at line 419 of file sionna-rt-channel-model.cc.
References NS_LOG_FUNCTION.
Referenced by MakePlannarArray().
| SionnaRtChannelModel::RtPathSolverConfig ns3::SionnaRtChannelModel::GetRtPathSolverConfig | ( | ) | const |
Retrieve the current path solver configuration.
Definition at line 592 of file sionna-rt-channel-model.cc.
References m_RtPathSolverConfig.
| std::string ns3::SionnaRtChannelModel::GetScenario | ( | ) | const |
Return the configured propagation scenario name.
Definition at line 358 of file sionna-rt-channel-model.cc.
References m_sceneConfigs, and NS_LOG_FUNCTION.
Referenced by GetTypeId().
|
static |
Get the ns-3 TypeId for this class.
Definition at line 57 of file sionna-rt-channel-model.cc.
References GetFrequency(), GetMaxNumberOfPaths(), GetNormalizeDelays(), GetScenario(), m_cameraLookAt, m_cameraPosition, m_isImageRendered, m_outputImageDirectory, m_outputImageName, m_updatePeriod, ns3::MakeBooleanAccessor(), ns3::MakeBooleanChecker(), ns3::MakeDoubleAccessor(), ns3::MakeDoubleChecker(), ns3::MakeStringAccessor(), ns3::MakeStringChecker(), ns3::MakeTimeAccessor(), ns3::MakeTimeChecker(), ns3::MakeVectorAccessor(), ns3::MakeVectorChecker(), ns3::MilliSeconds(), SetFrequency(), ns3::TypeId::SetGroupName(), SetMaxNumberOfPaths(), SetMergeShapeEnable(), SetNormalizeDelays(), ns3::TypeId::SetParent(), and SetScenario().
|
protected |
Load a Sionna RT scene using the configured scenario name.
Instantiates the scene factory selected by m_sceneConfigs.sceneName. The method detects whether the scenario is:
The merge_shapes parameter from m_sceneConfigs is forwarded to control whether the scene loader should merge individual shapes.
| rt | The imported sionna.rt Python module for scene creation |
Definition at line 365 of file sionna-rt-channel-model.cc.
References m_sceneConfigs, NS_LOG_DEBUG, NS_LOG_FUNCTION, and NS_LOG_INFO.
Referenced by CreateScene().
| py::object ns3::SionnaRtChannelModel::MakePlannarArray | ( | const py::module_ | rt, |
| Ptr< const PhasedArrayModel > | antenna ) const |
Build a Sionna PlanarArray description from an ns-3 PhasedArrayModel.
This converts antenna element locations, patterns and polarization into a Python PlanarArray object suitable for installation into an sionna.rt scene.
| rt | sionna.rt module used to construct Python objects |
| Antenna module | The ns-3 PhasedArrayModel to convert |
Definition at line 450 of file sionna-rt-channel-model.cc.
References ns3::DynamicCast(), GetAntennaElementPattern(), GetPolarizationFromPolSlantAngle(), NS_LOG_FUNCTION, and NS_LOG_WARN.
Referenced by CreateScene().
|
protected |
Render a visualization of the scene and paths to a PNG image file.
If m_isImageRendered is true, this method invokes the Sionna RT rendering pipeline using the specified camera parameters and writes the output image to the file specified by m_outputImageDirectory and m_outputImageName.
The image provides visual debugging of scene geometry and path interactions, which can be useful for validating scenario definitions and understanding propagation mechanisms.
| rt | The sionna.rt module providing rendering functionality |
| paths | The Python Paths object containing computed propagation paths |
| scene | The Python Scene object describing the simulation environment |
Definition at line 662 of file sionna-rt-channel-model.cc.
References m_cameraLookAt, m_cameraPosition, m_outputImageDirectory, m_outputImageName, and NS_LOG_INFO.
Referenced by CalculatePaths().
| void ns3::SionnaRtChannelModel::SetFrequency | ( | double | f | ) |
Set the center frequency used by the model and scene factories.
The frequency affects antenna patterns, wavelength-dependent computations, and where applicable, factory-specific scene generation (e.g., building materials that might be frequency-specific).
| f | Center frequency in Hz |
Definition at line 135 of file sionna-rt-channel-model.cc.
References m_sceneConfigs, NS_ASSERT_MSG, NS_LOG_FUNCTION, and NS_LOG_INFO.
Referenced by GetTypeId().
| void ns3::SionnaRtChannelModel::SetMaxNumberOfPaths | ( | double | p | ) |
Set the maximum number of propagation paths to retain.
Controls the upper limit on the number of paths that will be accepted from the Sionna RT path solver. If the solver generates more paths than this threshold, the CalculatePaths() method will recursively reduce the solver's max_depth and recompute until the path count falls within bounds. This mechanism ensures that channel matrix complexity remains tractable.
| p | Maximum number of paths (typically 1 to 1000 depending on antenna arrays and simulation requirements) |
Definition at line 145 of file sionna-rt-channel-model.cc.
References m_maxNumberOfPaths, NS_LOG_FUNCTION, and NS_LOG_INFO.
Referenced by GetTypeId().
| void ns3::SionnaRtChannelModel::SetMergeShapeEnable | ( | bool | cond | ) |
Enable or disable shape merging when loading scenes from sionna.rt.
Controls whether the scene geometry loader merges individual mesh shapes into larger primitives during scene creation. Merging reduces the complexity of geometric primitives passed to the path solver and can improve performance and memory usage for complex scenes at the potential cost of small geometric inaccuracies.
Important notes:
| cond | True to enable shape merging (reduce geometry complexity), false to preserve original, detailed shapes. |
Definition at line 128 of file sionna-rt-channel-model.cc.
References m_sceneConfigs, and NS_LOG_FUNCTION.
Referenced by GetTypeId().
| void ns3::SionnaRtChannelModel::SetNormalizeDelays | ( | bool | cond | ) |
Enable or disable normalization of path delays in Sionna RT.
When true, Sionna RT normalizes delays so the first path is at zero delay. When false, raw path delays are returned.
| cond | True to normalize delays, false to preserve raw delays. |
Definition at line 153 of file sionna-rt-channel-model.cc.
References m_normalizeDelays, NS_LOG_FUNCTION, and NS_LOG_INFO.
Referenced by GetTypeId().
| void ns3::SionnaRtChannelModel::SetRtPathSolverConfig | ( | SionnaRtChannelModel::RtPathSolverConfig | configs | ) |
Configure the Sionna RT path solver behavior.
Sets all options that control how the path solver traces rays through the scene, including maximum interaction depth, which phenomena to model (LOS, reflections, diffractions, etc.), and whether to use synthetic array processing. These settings remain in effect for all subsequent path computations until changed again.
| configs | RtPathSolverConfig structure containing solver options |
Definition at line 580 of file sionna-rt-channel-model.cc.
References ns3::SionnaRtChannelModel::RtPathSolverConfig::diffraction, ns3::SionnaRtChannelModel::RtPathSolverConfig::diffuseReflection, ns3::SionnaRtChannelModel::RtPathSolverConfig::edgeDiffraction, ns3::SionnaRtChannelModel::RtPathSolverConfig::los, m_RtPathSolverConfig, ns3::SionnaRtChannelModel::RtPathSolverConfig::maxDepth, NS_LOG_INFO, ns3::SionnaRtChannelModel::RtPathSolverConfig::refraction, ns3::SionnaRtChannelModel::RtPathSolverConfig::seed, ns3::SionnaRtChannelModel::RtPathSolverConfig::specularReflection, and ns3::SionnaRtChannelModel::RtPathSolverConfig::syntheticArray.
| void ns3::SionnaRtChannelModel::SetScenario | ( | const std::string & | scenario | ) |
Set the propagation scenario name used by sionna.rt scene factories.
The scenario string selects a pre-defined scene factory within sionna.rt (for example "munich", "simple_street_canyon_with_cars", etc.). The scene name is used by LoadScene/CreateScene to instantiate the geometry.
| scenario | The scene factory name to call in sionna.rt.scene |
Definition at line 333 of file sionna-rt-channel-model.cc.
References builtInSceneSionna, m_sceneConfigs, NS_FATAL_ERROR, NS_LOG_FUNCTION, and NS_LOG_INFO.
Referenced by GetTypeId().
|
protected |
Camera look-at point for scene rendering.
Definition at line 676 of file sionna-rt-channel-model.h.
Referenced by GetTypeId(), and SceneRenderImageToFile().
|
protected |
Camera position/look-at used by the scene rendering pipeline.
Camera position for scene rendering
Definition at line 675 of file sionna-rt-channel-model.h.
Referenced by GetTypeId(), and SceneRenderImageToFile().
|
protected |
map containing the channel realizations per pair of PhasedAntennaArray instances, the key of this map is reciprocal uniquely identifies a pair of PhasedAntennaArrays
Definition at line 649 of file sionna-rt-channel-model.h.
Referenced by DoDispose(), and GetChannel().
|
protected |
map containing the common channel parameters per pair of nodes, the key of this map is reciprocal and uniquely identifies a pair of nodes
Definition at line 653 of file sionna-rt-channel-model.h.
Referenced by DoDispose(), GetChannel(), and GetParams().
|
protected |
Control for whether we should render a scene image.
Definition at line 670 of file sionna-rt-channel-model.h.
Referenced by CalculatePaths(), and GetTypeId().
|
protected |
Maximum number of paths to be generated by the path solver.
Definition at line 673 of file sionna-rt-channel-model.h.
Referenced by CalculatePaths(), DoesNumberOfPathsExceedMaximum(), GetMaxNumberOfPaths(), and SetMaxNumberOfPaths().
|
protected |
Whether Sionna RT should normalize path delays in CIR output.
Definition at line 672 of file sionna-rt-channel-model.h.
Referenced by CalculateCirFromPaths(), CalculateTauFromPaths(), GetNormalizeDelays(), and SetNormalizeDelays().
|
protected |
Output directory.
Definition at line 667 of file sionna-rt-channel-model.h.
Referenced by GetTypeId(), and SceneRenderImageToFile().
|
protected |
Output image rendering options (file name/directory).
Output file name
Definition at line 666 of file sionna-rt-channel-model.h.
Referenced by GetTypeId(), and SceneRenderImageToFile().
|
protected |
Path solver configuration used when computing paths.
Definition at line 660 of file sionna-rt-channel-model.h.
Referenced by CalculateAnglesFromPaths(), CalculateDopplerFromPaths(), CalculatePaths(), CalculateTauFromPaths(), GetNumberOfPathsFromCir(), GetRtPathSolverConfig(), and SetRtPathSolverConfig().
|
protected |
High-level scene configuration.
Definition at line 663 of file sionna-rt-channel-model.h.
Referenced by CreateScene(), GetFrequency(), GetScenario(), LoadScene(), SetFrequency(), SetMergeShapeEnable(), and SetScenario().
|
protected |
Channel update period used to decide whether to re-run path computations.
Definition at line 657 of file sionna-rt-channel-model.h.
Referenced by ChannelMatrixNeedsUpdate(), and GetTypeId().