GenerateFlatFadingChannel#
- class sionna.phy.channel.GenerateFlatFadingChannel(num_tx_ant: int, num_rx_ant: int, spatial_corr: sionna.phy.channel.spatial_correlation.SpatialCorrelation | None = None, precision: Literal['single', 'double'] | None = None, device: str | None = None, **kwargs)[source]#
Bases:
sionna.phy.block.BlockGenerates tensors of flat-fading channel realizations
This class generates batches of random flat-fading channel matrices. A spatial correlation can be applied.
- Parameters:
num_tx_ant (int) – Number of transmit antennas
num_rx_ant (int) – Number of receive antennas
spatial_corr (sionna.phy.channel.spatial_correlation.SpatialCorrelation | None) – Spatial correlation to be applied. Defaults to None.
precision (Literal['single', 'double'] | None) – Precision used for internal calculations and outputs. If set to None,
precisionis used.device (str | None) – Device for computation (e.g., ‘cpu’, ‘cuda:0’). If None,
deviceis used.
- Inputs:
batch_size – int. Number of channel matrices to generate.
- Outputs:
h – [batch_size, num_rx_ant, num_tx_ant], torch.complex. Batch of random flat fading channel matrices.
Examples
import torch from sionna.phy.channel import GenerateFlatFadingChannel gen_chn = GenerateFlatFadingChannel(num_tx_ant=4, num_rx_ant=16) h = gen_chn(batch_size=32) print(h.shape) # torch.Size([32, 16, 4])
Attributes
- property spatial_corr: sionna.phy.channel.spatial_correlation.SpatialCorrelation | None#
Get/set spatial correlation to be applied