GenerateTimeChannel#

class sionna.phy.channel.GenerateTimeChannel(channel_model, bandwidth: float, num_time_samples: int, l_min: int, l_max: int, normalize_channel: bool = False, precision: str | None = None, device: str | None = None, **kwargs)[source]#

Bases: sionna.phy.object.Object

Generate channel responses in the time domain

For each batch example, num_time_samples + l_max - l_min time steps of a channel realization are generated by this layer. These can be used to filter a channel input of length num_time_samples using the ApplyTimeChannel layer.

The channel taps \(\bar{h}_{b,\ell}\) (h_time) returned by this layer are computed assuming a sinc filter is used for pulse shaping and receive filtering. Therefore, given a channel impulse response \((a_{m}(t), \tau_{m}), 0 \leq m \leq M-1\), generated by the channel_model, the channel taps are computed as follows:

\[\bar{h}_{b, \ell} = \sum_{m=0}^{M-1} a_{m}\left(\frac{b}{W}\right) \text{sinc}\left( \ell - W\tau_{m} \right)\]

for \(\ell\) ranging from l_min to l_max, and where \(W\) is the bandwidth.

Parameters:
  • channel_model – Channel model to be used

  • bandwidth (float) – Bandwidth (\(W\)) [Hz]

  • num_time_samples (int) – Number of time samples forming the channel input (\(N_B\))

  • l_min (int) – Smallest time-lag for the discrete complex baseband channel (\(L_{\text{min}}\))

  • l_max (int) – Largest time-lag for the discrete complex baseband channel (\(L_{\text{max}}\))

  • normalize_channel (bool) – If set to True, the channel is normalized over the block size to ensure unit average energy per time step. Defaults to False.

  • precision (str | 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.

Inputs:

batch_sizeNone (default) | int. Batch size. Defaults to None for channel models that do not require this parameter.

Outputs:

h_time – [batch size, num_rx, num_rx_ant, num_tx, num_tx_ant, num_time_samples + l_max - l_min, l_max - l_min + 1], torch.complex. Channel responses. For each batch example, num_time_samples + l_max - l_min time steps of a channel realization are generated by this layer. These can be used to filter a channel input of length num_time_samples using the ApplyTimeChannel layer.

Examples

import torch
from sionna.phy.channel import RayleighBlockFading, GenerateTimeChannel

channel_model = RayleighBlockFading(num_rx=1, num_rx_ant=2, num_tx=1, num_tx_ant=4)
gen_channel = GenerateTimeChannel(
    channel_model,
    bandwidth=1e6,
    num_time_samples=100,
    l_min=-6,
    l_max=20
)
h_time = gen_channel(batch_size=32)
print(h_time.shape)
# torch.Size([32, 1, 2, 1, 4, 126, 27])

Attributes

property l_min: int#

Smallest time-lag

property l_max: int#

Largest time-lag

property l_tot: int#

Total number of channel taps

property bandwidth: float#

Bandwidth [Hz]

property num_time_samples: int#

Number of time samples