KBestDetector#

class sionna.phy.ofdm.KBestDetector(output: str, num_streams: int, k: int, resource_grid: sionna.phy.ofdm.resource_grid.ResourceGrid, stream_management: sionna.phy.mimo.stream_management.StreamManagement, constellation_type: str | None = None, num_bits_per_symbol: int | None = None, constellation: sionna.phy.mapping.Constellation | None = None, hard_out: bool = False, use_real_rep: bool = False, list2llr: Callable | None = None, precision: Literal['single', 'double'] | None = None, device: str | None = None, **kwargs)[source]#

Bases: sionna.phy.ofdm.detection.OFDMDetector

K-Best detector for OFDM MIMO transmissions.

This block wraps the MIMO K-Best detector for use with the OFDM waveform. Both detection of symbols or bits with either soft- or hard-decisions are supported. The OFDM and stream configuration are provided by a ResourceGrid and StreamManagement instance, respectively. The actual detector is an instance of KBestDetector.

Parameters:
  • output (str) – Type of output, either “bit” or “symbol”

  • num_streams (int) – Number of transmitted streams

  • k (int) – Number of paths to keep. Cannot be larger than the number of constellation points to the power of the number of streams.

  • resource_grid (sionna.phy.ofdm.resource_grid.ResourceGrid) – ResourceGrid to be used

  • stream_management (sionna.phy.mimo.stream_management.StreamManagement) – StreamManagement to be used

  • constellation_type (str | None) – Type of constellation, None (default), “qam”, “pam”, or “custom”. For “custom”, an instance of Constellation must be provided.

  • num_bits_per_symbol (int | None) – Number of bits per constellation symbol, e.g., 4 for QAM16. Only required for constellation_type in [“qam”, “pam”].

  • constellation (sionna.phy.mapping.Constellation | None) – Instance of Constellation or None. If None, constellation_type and num_bits_per_symbol must be provided.

  • hard_out (bool) – If True, the detector computes hard-decided bit values or constellation point indices instead of soft-values.

  • use_real_rep (bool) – If True, the detector uses the real-valued equivalent representation of the channel. Note that this only works with a QAM constellation.

  • list2llr (Callable | None) – The function to be used to compute LLRs from a list of candidate solutions. If None, the default solution List2LLRSimple is used.

  • precision (Literal['single', 'double'] | None) – Precision used for internal calculations and outputs. If set to None, precision is used.

  • device (str | None) – Device for tensor operations. If None, device is used.

Inputs:
  • y – [batch_size, num_rx, num_rx_ant, num_ofdm_symbols, fft_size], torch.complex. Received OFDM resource grid after cyclic prefix removal and FFT.

  • 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 for all streams from all transmitters.

  • err_var – [Broadcastable to shape of h_hat], torch.float. Variance of the channel estimation error.

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

Outputs:

z

One of:

[batch_size, num_tx, num_streams, num_data_symbols*num_bits_per_symbol], torch.float. LLRs or hard-decisions for every bit of every stream, if output equals “bit”.

[batch_size, num_tx, num_streams, num_data_symbols, num_points], torch.float or [batch_size, num_tx, num_streams, num_data_symbols], torch.int32. Logits or hard-decisions for constellation symbols for every stream, if output equals “symbol”. Hard-decisions correspond to the symbol indices.