RaysGenerator#

class sionna.phy.channel.tr38901.RaysGenerator(scenario, enable_spatial_consistency: bool = False, blockage_model: BlockageModelA | BlockageModelB | None = None)[source]#

Bases: sionna.phy.object.Object

Sample rays according to a given channel scenario and large scale parameters (LSP).

This class implements steps 6 to 9 from the TR 38.901 specifications, (section 7.5).

Note that a global scenario is set for the entire batches when instantiating this class (UMa, UMi, RMa, InH, or InF). However, each UT-BS link can have its specific state (LoS, NLoS, or indoor).

The batch size is set by the scenario given as argument when constructing the class.

Parameters:
  • scenario – Scenario used to generate LSPs

  • enable_spatial_consistency (bool) – If True, generate the cluster- and ray-specific random variables of Steps 5 to 10 from spatially consistent random fields according to Sections 7.6.3.1 and 7.6.3.4 of [TR38901V1920]. This includes cluster delays, cluster shadowing, cluster angle signs and offsets, random coupling, XPR, and initial random phases. Fields are sampled for the current topology snapshot and are not retained across topology updates. The feature is disabled by default for backwards compatibility.

  • blockage_model (BlockageModelA | BlockageModelB | None) – Optional blockage model applied after Step 9 and before Step 10, as specified by Section 7.6.4 of [TR38901V1920].

Inputs:

lspLSP. LSPs samples.

Outputs:

raysRays. Rays samples.

Examples

# Assuming scenario is a SystemLevelScenario instance
rays_generator = RaysGenerator(scenario)
rays = rays_generator(lsp)

Methods

allocate_topology_tensors(batch_size: int, num_bs: int, num_ut: int) None[source]#

Pre-allocate topology-dependent buffers.

Parameters:
reset_topology() None[source]#

Reset topology-dependent buffers.

Attributes

property spatial_consistency_enabled: bool#

True if spatial consistency is enabled for ray generation.

topology_updated_callback() None[source]#

Updates internal quantities when the scenario topology changes.