PerColumnModel#

class sionna.phy.channel.PerColumnModel(r_rx: torch.Tensor | None = None, precision: str | None = None, device: str | None = None)[source]#

Bases: sionna.phy.channel.spatial_correlation.SpatialCorrelation

Per-column model for spatial correlation

Given a batch of matrices \(\mathbf{H}\in\mathbb{C}^{M\times K}\) and correlation matrices \(\mathbf{R}_k\in\mathbb{C}^{M\times M}, k=1,\dots,K\), this function will generate the output \(\mathbf{H}_\text{corr}\in\mathbb{C}^{M\times K}\), with columns

\[\mathbf{h}^\text{corr}_k = \mathbf{R}^{\frac12}_k \mathbf{h}_k,\quad k=1, \dots, K\]

where \(\mathbf{h}_k\) is the kth column of \(\mathbf{H}\). Note that all \(\mathbf{R}_k\in\mathbb{C}^{M\times M}\) must be positive semi-definite, such as the ones generated by one_ring_corr_mat().

This model is typically used to simulate a MIMO channel between multiple single-antenna users and a base station with multiple antennas. The resulting SIMO channel for each user has a different spatial correlation.

Parameters:
  • r_rx (torch.Tensor | None) – Receive correlation matrices of shape […, M, M]. If the rank of r_rx is smaller than that of the input h, it will be broadcast. For a typical use of this model, r_rx has shape […, K, M, M], i.e., a different correlation matrix for each column of h.

  • precision (str | None) – Precision used for internal calculations and outputs. If set to None, precision is used.

  • device (str | None) – Device for computation (e.g., ‘cpu’, ‘cuda:0’). If None, device is used.

Inputs:

h – […, M, K], torch.complex. Spatially uncorrelated channel coefficients.

Outputs:

h_corr – […, M, K], torch.complex. Spatially correlated channel coefficients.

Examples

import torch
from sionna.phy.channel import one_ring_corr_mat, PerColumnModel

# Create per-column correlation matrices (4 users, 16 antennas)
r_rx = one_ring_corr_mat(torch.tensor([-45., -15., 0., 30.]), 16)

# Create model
per_col = PerColumnModel(r_rx)

# Apply to channel matrix
h = torch.randn(32, 16, 4, dtype=torch.complex64)
h_corr = per_col(h)
print(h_corr.shape)
# torch.Size([32, 16, 4])

Attributes

property r_rx: torch.Tensor | None#

Get/set receive correlation matrices.

For use within torch.compile, use in-place updates via model.r_rx.copy_(new_value) to avoid graph breaks.