exp_corr_mat#
- sionna.phy.channel.exp_corr_mat(a: torch.Tensor, n: int, precision: str | None = None, device: str | None = None) torch.Tensor[source]#
Generates exponential correlation matrices
This function computes for every element \(a\) of a complex-valued tensor \(\mathbf{a}\) the corresponding \(n\times n\) exponential correlation matrix \(\mathbf{R}(a,n)\), defined as (Eq. 1, [MAL2018]):
\[\begin{split}\mathbf{R}(a,n)_{i,j} = \begin{cases} 1 & \text{if } i=j\\ a^{i-j} & \text{if } i>j\\ (a^\star)^{j-i} & \text{if } j<i, j=1,\dots,n\\ \end{cases}\end{split}\]where \(|a|<1\) and \(\mathbf{R}\in\mathbb{C}^{n\times n}\).
- Parameters:
a (torch.Tensor) – Parameters \(a\) for the exponential correlation matrices, shape [n_0, …, n_k]
n (int) – Number of dimensions of the output correlation matrices
precision (str | None) – Precision used for internal calculations and outputs. If set to None,
precisionis used.device (str | None) – Device for computation. If None,
deviceis used.
- Outputs:
R – [n_0, …, n_k, n, n], torch.complex. Correlation matrices.
Examples
import torch from sionna.phy.channel import exp_corr_mat # Single correlation matrix R = exp_corr_mat(torch.tensor(0.9+0.1j), 4) print(R.shape) # torch.Size([4, 4]) # Batch of correlation matrices R = exp_corr_mat(torch.rand(2, 3) * 0.9, 4) print(R.shape) # torch.Size([2, 3, 4, 4])