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.BlockConvenience class that combines an equalizer, such as
lmmse_equalizer(), and aDemapper.- Parameters:
equalizer (str | Callable) – The equalizer to be used. Either one of the existing equalizers
lmmse_equalizer(),zf_equalizer(), ormf_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 symbolsdemapping_method (str) – Demapping method, either
"app"or"maxlog"constellation_type (str | None) – Constellation type, one of
"qam","pam", or"custom". For"custom", an instance ofConstellationmust be provided.num_bits_per_symbol (int | None) – Number of bits per constellation symbol, e.g., 4 for QAM16. Only required for
constellation_typein ["qam","pam"].constellation (sionna.phy.mapping.Constellation | None) – An instance of
Constellationor None. If None,constellation_typeandnum_bits_per_symbolmust 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,
precisionis 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
outputequals"bit".logits – […, num_streams, num_points], torch.float or […, num_streams], torch.int32. Logits or hard-decisions for constellation symbols for every stream, if
outputequals"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)