LinearDetector#

class sionna.phy.mimo.LinearDetector(equalizer: str | Callable, output: str, demapping_method: str, constellation_type: str | None = None, num_bits_per_symbol: int | None = None, constellation: sionna.phy.mapping.Constellation | None = None, hard_out: bool = False, precision: Literal['single', 'double'] | None = None, device: str | None = None, **kwargs)[source]#

Bases: sionna.phy.block.Block

Convenience class that combines an equalizer, such as lmmse_equalizer(), and a Demapper.

Parameters:
  • equalizer (str | Callable) – The equalizer to be used. Either one of the existing equalizers lmmse_equalizer(), zf_equalizer(), or mf_equalizer() can be used (specified as "lmmse", "zf", or "mf"), or a custom equalizer callable provided that has the same input/output specification.

  • output (str) – Type of output, either "bit" for LLRs on bits or "symbol" for logits on constellation symbols

  • demapping_method (str) – Demapping method, either "app" or "maxlog"

  • constellation_type (str | None) – Constellation type, one of "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) – An 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. Defaults to False.

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

  • device (str | None) – Device for computations

Inputs:
  • y – […,M], torch.complex. Received signals.

  • h – […,M,num_streams], torch.complex. Channel matrices.

  • s – […,M,M], torch.complex. Noise covariance matrices.

One of:

Outputs:
  • llr – […, num_streams, num_bits_per_symbol], torch.float. LLRs or hard-decisions for every bit of every stream, if output equals "bit".

  • logits – […, num_streams, num_points], torch.float or […, num_streams], torch.int32. Logits or hard-decisions for constellation symbols for every stream, if output equals "symbol". Hard-decisions correspond to the symbol indices.

Parameters:

Examples

detector = LinearDetector(
    equalizer="lmmse",
    output="bit",
    demapping_method="app",
    constellation_type="qam",
    num_bits_per_symbol=4
)
llr = detector(y, h, s)