cir_to_ofdm_channel#
- sionna.phy.channel.cir_to_ofdm_channel(frequencies: torch.Tensor, a: torch.Tensor, tau: torch.Tensor, normalize: bool = False) torch.Tensor[source]#
Compute the frequency response of the channel at
frequenciesGiven a channel impulse response \((a_{m}, \tau_{m}), 0 \leq m \leq M-1\) (inputs
aandtau), the channel frequency response for the frequency \(f\) is computed as follows:\[\widehat{h}(f) = \sum_{m=0}^{M-1} a_{m} e^{-j2\pi f \tau_{m}}\]- Parameters:
frequencies (torch.Tensor) – Frequencies at which to compute the channel response, shape [fft_size]
a (torch.Tensor) – Path coefficients, shape [batch size, num_rx, num_rx_ant, num_tx, num_tx_ant, num_paths, num_time_steps]
tau (torch.Tensor) – Path delays, shape [batch size, num_rx, num_tx, num_paths] or [batch size, num_rx, num_rx_ant, num_tx, num_tx_ant, num_paths]
normalize (bool) – If set to True, the channel is normalized over the resource grid
- Outputs:
h_f – [batch size, num_rx, num_rx_ant, num_tx, num_tx_ant, num_time_steps, fft_size], torch.complex. Channel frequency responses at
frequencies.
Examples
import torch from sionna.phy.channel import cir_to_ofdm_channel, subcarrier_frequencies # Create dummy CIR batch_size, num_paths, num_time_steps = 2, 4, 10 a = torch.randn(batch_size, 1, 1, 1, 1, num_paths, num_time_steps, dtype=torch.complex64) tau = torch.rand(batch_size, 1, 1, num_paths) * 1e-6 # Compute OFDM channel frequencies = subcarrier_frequencies(64, 15e3) h_f = cir_to_ofdm_channel(frequencies, a, tau) print(h_f.shape) # torch.Size([2, 1, 1, 1, 1, 10, 64])