BasePilotChannelEstimator#

class sionna.phy.ofdm.BasePilotChannelEstimator(resource_grid: sionna.phy.ofdm.resource_grid.ResourceGrid, interpolation_type: str = 'nn', interpolator: sionna.phy.ofdm.channel_estimation.BaseChannelInterpolator | None = None, precision: Literal['single', 'double'] | None = None, device: str | None = None, **kwargs)[source]#

Bases: sionna.phy.ofdm.channel_estimation.BaseChannelEstimator

Abstract block for implementing an OFDM channel estimator that first estimates the channel at the pilot locations and then obtains channel estimates for the entire resource grid through interpolation.

Any block that implements this class must implement the estimate_at_pilot_locations() abstract method.

This class extracts the pilots from the received resource grid y, calls the estimate_at_pilot_locations() method to estimate the channel for the pilot-carrying resource elements, and then interpolates the channel to compute channel estimates for the data-carrying resource elements using the interpolation method specified by interpolation_type or the interpolator object.

Parameters:
Inputs:
  • y – [batch_size, num_rx, num_rx_ant, num_ofdm_symbols, fft_size], torch.complex. Observed resource grid.

  • no – [batch_size, num_rx, num_rx_ant] or only the first n>=0 dims, torch.float. Variance of the AWGN.

Outputs:
  • h_hat – [batch_size, num_rx, num_rx_ant, num_tx, num_streams_per_tx, num_ofdm_symbols, num_effective_subcarriers], torch.complex. Channel estimates across the entire resource grid for all transmitters and streams.

  • err_var – Same shape as h_hat, torch.float. Channel estimation error variance across the entire resource grid for all transmitters and streams.

Examples

import torch
from sionna.phy.ofdm import ResourceGrid, LSChannelEstimator

rg = ResourceGrid(num_ofdm_symbols=14,
                  fft_size=64,
                  subcarrier_spacing=30e3,
                  num_tx=2,
                  num_streams_per_tx=2,
                  pilot_pattern="kronecker",
                  pilot_ofdm_symbol_indices=[2, 11])

estimator = LSChannelEstimator(rg, interpolation_type="lin")

batch_size = 16
y = torch.randn(batch_size, 1, 4, 14, 64, dtype=torch.complex64)
no = torch.ones(1) * 0.1

h_hat, err_var = estimator(y, no)
print(h_hat.shape)
# torch.Size([16, 1, 4, 2, 2, 14, 60])

Methods

abstractmethod estimate_at_pilot_locations(y_pilots: torch.Tensor, no: torch.Tensor) Tuple[torch.Tensor, torch.Tensor][source]#

Estimate the channel for the pilot-carrying resource elements.

This is an abstract method that must be implemented by a concrete OFDM channel estimator that implements this class.

Parameters:
  • y_pilots (torch.Tensor) – [batch_size, num_rx, num_rx_ant, num_tx, num_streams, num_pilot_symbols], torch.complex. Observed signals for the pilot-carrying resource elements.

  • no (torch.Tensor) – [batch_size, num_rx, num_rx_ant] or only the first n>=0 dims, torch.float. Variance of the AWGN.

Outputs:
  • h_hat – [batch_size, num_rx, num_rx_ant, num_tx, num_streams, num_pilot_symbols], torch.complex. Channel estimates for the pilot-carrying resource elements.

  • err_var – Same shape as h_hat, torch.float. Channel estimation error variance for the pilot-carrying resource elements.