spatial_consistency_correlation_matrix#

sionna.phy.channel.tr38901.spatial_consistency_correlation_matrix(distance_2d, correlation_distance, states: torch.Tensor | None = None, correlation_distance_layout: Literal['broadcast', 'per_terminal'] = 'broadcast', precision: Literal['single', 'double'] | None = None, device: str | None = None) torch.Tensor[source]#

Computes a TR 38.901 spatial-consistency correlation matrix.

For two terminals \(i\) and \(j\) separated by horizontal distance \(d_{i,j}\), the correlation coefficient is

\[C_{i,j} = \exp\left(-\frac{d_{i,j}}{D}\right)\]

where \(D\) is the parameter-specific correlation distance. The matrix \(\mathbf{C}\) is the finite-dimensional correlation matrix obtained by applying the exponential normalized autocorrelation function from Eq. (7.4-5), Section 7.4.4 of [TR38901V1920], to all pairs of terminal positions. The spatial-consistency procedure in Section 7.6.3.1 of [TR38901V1920] uses this correlation law with the parameter-specific correlation distances from Table 7.6.3.1-2.

If states is provided, entries for terminals with different states are set to zero, while the diagonal remains one. This implements the applicability rule from Section 7.6.3.4 of [TR38901V1920] that spatial consistency is not modelled across different link types such as outdoor LoS, outdoor NLoS, and O2I.

Parameters:
  • distance_2d – Pairwise horizontal distances [m], with shape [..., num_points, num_points].

  • correlation_distance – Correlation distance \(D\) [m]. For correlation_distance_layout="broadcast", this can be a scalar or a tensor broadcastable to distance_2d. For correlation_distance_layout="per_terminal", its last dimension must have length num_points and contain one distance per terminal. The corresponding pairwise distance is the geometric mean of the two terminal distances, which keeps the result symmetric.

  • states (torch.Tensor | None) – Optional integer or Boolean state labels with shape [..., num_points]. Points with unequal state labels are uncorrelated.

  • correlation_distance_layout (Literal['broadcast', 'per_terminal']) – Interpretation of correlation_distance. Must be "broadcast" or "per_terminal". Defaults to "broadcast".

  • precision (Literal['single', 'double'] | None) – Precision used for internal calculations and outputs. If set to None, precision is used.

  • device (str | None) – Device for computation. If None, device is used.

Outputs:

C – Spatial-consistency correlation matrix with shape broadcast from distance_2d and correlation_distance.