Paths
A propagation path
In Sionna, paths are computed with the help of a path solver (suct as PathSolver
)
which returns an instance of Paths
.
Paths can be visualized by providing them as arguments to the functions render()
,
render_to_file()
, or preview()
.
Channel impulse responses (CIRs) can be obtained with cir()
which can
then be used for link-level simulations. This is for example done in the Sionna Ray Tracing Tutorial.
- class sionna.rt.Paths(scene, src_positions, tgt_positions, tx_velocities, rx_velocities, synthetic_array, paths_buffer, rel_ant_positions_tx, rel_ant_positions_rx)[source]
Stores the simulated propagation paths
Paths are generated for the loaded scene using a path solver, such as
PathSolver
. Please refer to the documentation of this class for further details.- Parameters:
scene (
sionna.rt.scene.Scene
) – Scene for which paths are computedsrc_positions (
mitsuba.Point3f
) – Positions of the sourcestgt_positions (
mitsuba.Point3f
) – Positions of the targetstx_velocities (
mitsuba.Vector3f
) – Velocities of the transmittersrx_velocities (
mitsuba.Vector3f
) – Velocities of the receiverssynthetic_array (
bool
) – If set to True, then the antenna arrays are applied syntheticallypaths_buffer (
sionna.rt.path_solvers.paths_buffer.PathsBuffer
) – Paths buffer storing the computed pathsrel_ant_positions_tx (
mitsuba.Point3f
|None
) – Positions of the array elements with respect to the center of the transmitters. Only required if synthetic arrays are used.rel_ant_positions_rx (
mitsuba.Point3f
|None
) – Positions of the array elements with respect to the center of the receivers. Only required if synthetic arrays are used.
- property a
Real and imaginary components of the channel coefficients
- Type:
Tuple[mi.TensorXf [num_rx, num_rx_ant, num_tx, num_tx_ant, num_paths], mi.TensorXf [num_rx, num_rx_ant, num_tx, num_tx_ant, num_paths]]
- cfr(frequencies, sampling_frequency=1.0, num_time_steps=1, normalize_delays=True, normalize=False, reverse_direction=False, out_type='drjit')[source]
Compute the frequency response of the channel at
frequencies
. Optionally, time evolution of the channel can be simulated based on the Doppler shifts of all paths.Given a channel impulse response
, as computed bycir()
, the channel frequency response for the frequency is computed as follows:The time evolution of the channel is simulated as described in the documentation of
cir()
.- Parameters:
frequencies (
drjit.cuda.ad.Float
) – Frequencies [Hz] at which to compute the channel responsesampling_frequency (
float
) – Frequency [Hz] at which the channel impulse response is samplednum_time_steps (
int
) – Number of time stepsnormalize_delays (
bool
) – If set to True, path delays are normalized such that the first path between any pair of antennas of a transmitter and receiver arrives at .normalize (
bool
) – If set to True, the channel is normalized across time and frequencies to ensure unit average energy.reverse_direction (
bool
) – If set to True, swaps receivers and transmittersout_type (
typing.Literal
['drjit'
,'jax'
,'numpy'
,'tf'
,'torch'
]) – Name of the desired output type. Currently supported are Dr.Jit (“drjit), Numpy (“numpy”), Jax (“jax”), TensorFlow (“tf”), and PyTorch (“torch”).
- Returns:
Real and imaginary components of the baseband equivalent channel coefficients
- Return type:
Shape : [num_rx, num_rx_ant, num_tx, num_tx_ant, num_time_steps, num_frequencies], Type :
Tuple[mi.TensorXf
|np.array
|jax.array
|tf.Tensor
|torch.tensor
- cir(*, sampling_frequency=1.0, num_time_steps=1, normalize_delays=True, reverse_direction=False, out_type='drjit')[source]
Returns the baseband-equivalent channel impulse response (28) which can be used for link simulations by other Sionna components. Optionally, time evolution of the channel can be simulated based on the Doppler shifts of all paths.
The baseband equivalent channel coefficient
at time is computed as :where
is the index of an arbitrary path, is the passband path coefficient (a
), is the path delay (tau
), is the carrier frequency, and is the Doppler shift of the path.- Parameters:
sampling_frequency (
float
) – Frequency [Hz] at which the channel impulse response is samplednum_time_steps (
int
) – Number of time stepsnormalize_delays (
bool
) – If set to True, path delays are normalized such that the first path between any pair of antennas of a transmitter and receiver arrives atreverse_direction (
bool
) – If set to True, swaps receivers and transmittersout_type (
typing.Literal
['drjit'
,'jax'
,'numpy'
,'tf'
,'torch'
]) –Name of the desired output type. Currently supported are Dr.Jit (“drjit), Numpy (“numpy”), Jax (“jax”), TensorFlow (“tf”), and PyTorch (“torch”).
- Returns:
Real and imaginary components of the baseband equivalent channel coefficients
- Return type:
Shape : [num_rx, num_rx_ant, num_tx, num_tx_ant, num_paths, num_time_steps], Type:
Tuple[mi.TensorXf, mi.TensorXf]
|np.array
|jax.array
|tf.Tensor
|torch.tensor
- Returns:
Paths delays
[s]- Return type:
Shape : [num_rx, num_rx_ant, num_tx, num_tx_ant, num_paths] or [num_rx, num_tx, num_paths], Type :
mi.TensorXf
|np.array
|jax.array
|tf.Tensor
|torch.tensor
- property doppler
Doppler shift for each path
To understand how Doppler shifts are computed, let us consider a single propagation path undergoing
scattering processes, e.g., reflection, diffuse scattering, refraction, as shown in the figure below.The object on which lies the
scattering point has the velocity vector and the outgoing ray direction at this point is denoted . The first and last point correspond to the transmitter and receiver, respectively. We therefore havewhere
are the AoDs, are the AoAs, and is defined in (1).If the transmitter emits a signal with frequency
, the receiver will observe the signal at frequency , where is the Doppler shift, which can be computed as [Wiffen2018]Under the assumption that
, we can apply the Taylor expansion , for , to the previous equation to obtainwhere the second line results from ignoring terms in
. Solving for , grouping terms with the same together, and using , we obtain- Type:
mi.TensorXf [num_rx, num_rx_ant, num_tx, num_tx_ant, num_paths] or [num_rx, num_tx, num_paths]
:
- property interactions
Interaction type represented using
InteractionType
- Type:
mi.TensorXu [max_depth, num_rx, num_rx_ant, num_tx, num_tx_ant, num_paths] or [max_depth, num_rx, num_tx, num_paths]
- property num_rx
Number of receivers
- Type:
int
- property num_tx
Number of transmitters
- Type:
int
- property objects
IDs of the intersected objects. Invalid objects are represented by
INVALID_SHAPE
.- Type:
mi.TensorXu [max_depth, num_rx, num_rx_ant, num_tx, num_tx_ant, num_paths] or [max_depth, num_rx, num_tx, num_paths]
- property phi_r
Azimuth angles of arrival [rad]
- Type:
mi.TensorXf [num_rx, num_rx_ant, num_tx, num_tx_ant, num_paths] or [num_rx, num_tx, num_paths]
- property phi_t
Azimuth angles of departure [rad]
- Type:
mi.TensorXf [num_rx, num_rx_ant, num_tx, num_tx_ant, num_paths] or [num_rx, num_tx, num_paths]
- property primitives
Indices of the intersected primitives. Invalid primitives are represented by
INVALID_PRIMITIVE
.- Type:
mi.TensorXu [max_depth, num_rx, num_rx_ant, num_tx, num_tx_ant, num_paths] or [max_depth, num_rx, num_tx, num_paths]
- property rx_array
Antenna array used by receivers
- Type:
- property sources
Positions of the paths sources. If synthetic arrays are not used (
synthetic_array
is False), then every transmit antenna is modeled as a source of paths. Otherwise, transmitters are modelled as if they had a single antenna located at theirposition
. The channel responses for each individual antenna of the arrays are then computed “synthetically” by applying appropriate phase shifts.- Type:
mi.Point3f
- property synthetic_array
Flag indicating if synthetic arrays were used to trace the paths
- Type:
bool
- taps(bandwidth, l_min, l_max, sampling_frequency=None, num_time_steps=1, normalize=False, normalize_delays=True, reverse_direction=False, out_type='drjit')[source]
Returns the channel taps forming the discrete complex baseband-equivalent channel impulse response
This function assumes that a sinc filter is used for pulse shaping and receive filtering. Therefore, given a channel impulse response
(which can be computed bycir()
), the channel tap at sample instance is computed as follows (see (Eq. 2.34) [Tse]):for
ranging froml_min
tol_max
, and where is thebandwidth
.This function allows for an arbitrary
sampling_frequency
at which the channel taps are sampled. By default, it is equal to thebandwidth
.- Parameters:
bandwidth (
float
) – Bandwidth [Hz] to which the channel impulse response will be limitedl_min (
int
) – Smallest time-lag for the discrete complex baseband-equivalent channel ( )l_max (
int
) – Largest time-lag for the discrete complex baseband-equivalent channel ( )sampling_frequency (
typing.Optional
[float
]) – Frequency [Hz] at which the channel impulse response is sampled. If set to None, thebandwidth
is used instead.num_time_steps (
int
) – Number of time stepsnormalize (
bool
) – If set to True, the channel is normalized such that the average total energy of the channel taps is equal to one.normalize_delays (
bool
) – If set to True, path delays are normalized such that the first path between any pair of antennas of a transmitter and receiver arrives at .reverse_direction (
bool
) – If set to True, swaps receivers and transmittersout_type (
typing.Literal
['drjit'
,'jax'
,'numpy'
,'tf'
,'torch'
]) –Name of the desired output type. Currently supported are Dr.Jit (“drjit), Numpy (“numpy”), Jax (“jax”), TensorFlow (“tf”), and PyTorch (“torch”).
- Returns:
Channel tap coefficients
- Return type:
Shape: [num_rx, num_rx_ant, num_tx, num_tx_ant, num_time_steps, l_max - l_min + 1], Type :
Tuple[mi.TensorXf, mi.TensorXf]
|np.array
|jax.array
|tf.Tensor
|torch.tensor
- property targets
Positions of the paths targets. If synthetic arrays are not used (
synthetic_array
is False), then every receiver antenna is modeled as a source of paths. Otherwise, receivers are modelled as if they had a single antenna located at theirposition
. The channel responses for each individual antenna of the arrays are then computed “synthetically” by applying appropriate phase shifts.- Type:
mi.Point3f
- property tau
Paths delays [s]
- Type:
mi.TensorXf [num_rx, num_rx_ant, num_tx, num_tx_ant, num_paths] or [num_rx, num_tx, num_paths]
- property theta_r
Zenith angles of arrival [rad]
- Type:
mi.TensorXf [num_rx, num_rx_ant, num_tx, num_tx_ant, num_paths] or [num_rx, num_tx, num_paths]
- property theta_t
Zenith angles of departure [rad]
- Type:
mi.TensorXf [num_rx, num_rx_ant, num_tx, num_tx_ant, num_paths] or [num_rx, num_tx, num_paths]
- property tx_array
Antenna array used by transmitters
- Type:
- property valid
Flags indicating valid paths
- Type:
mi.TensorXb [num_rx, num_rx_ant, num_tx, num_tx_ant, num_paths]
- property vertices
Paths’ vertices, i.e., the interaction points of the paths with the scene
- Type:
mi.TensorXf [max_depth, num_rx, num_rx_ant, num_tx, num_tx_ant, num_paths, 3] or [max_depth, num_rx, num_tx, num_paths, 3]
Constants
- class sionna.rt.constants.InteractionType[source]
Constants representing the type of interaction
- DIFFUSE = 2
Diffuse reflection
- NONE = 0
No interaction
- REFRACTION = 4
Refraction
- SPECULAR = 1
Specular reflection
- sionna.rt.constants.INVALID_SHAPE = 4294967295
Constant representing an invalid shape
- sionna.rt.constants.INVALID_PRIMITIVE = 4294967295
Constant representing an invalid primitive
- References:
- [Wiffen2018]
F. Wiffen et al., “Comparison of OTFS and OFDM in Ray Launched sub-6 GHz and mmWave Line-of-Sight Mobility Channels”, Proc. IEEE Int. Sym. Personal, Indoor and Mobil Radio Commun. (PIMRC), Bologna, Italy, Sep. 2018.