EPDetector#
- class sionna.phy.mimo.EPDetector(output: str, num_bits_per_symbol: int, hard_out: bool = False, l: int = 10, beta: float = 0.9, precision: Literal['single', 'double'] | None = None, device: str | None = None, **kwargs)[source]#
Bases:
sionna.phy.block.BlockMIMO Expectation Propagation (EP) detector.
This block implements Expectation Propagation (EP) MIMO detection as described in [EP2014]. It can generate hard- or soft-decisions for symbols or bits.
This block assumes the following channel model:
\[\mathbf{y} = \mathbf{H}\mathbf{x} + \mathbf{n}\]where \(\mathbf{y}\in\mathbb{C}^M\) is the received signal vector, \(\mathbf{x}\in\mathcal{C}^S\) is the vector of transmitted symbols which are uniformly and independently drawn from the constellation \(\mathcal{C}\), \(\mathbf{H}\in\mathbb{C}^{M\times S}\) is the known channel matrix, and \(\mathbf{n}\in\mathbb{C}^M\) is a complex Gaussian noise vector. It is assumed that \(\mathbb{E}\left[\mathbf{n}\right]=\mathbf{0}\) and \(\mathbb{E}\left[\mathbf{n}\mathbf{n}^{\mathsf{H}}\right]=\mathbf{S}\), where \(\mathbf{S}\) has full rank.
The channel model is first whitened using
whiten_channel()and then converted to its real-valued equivalent, seecomplex2real_channel(), prior to MIMO detection.The computation of LLRs is done by converting the symbol logits that naturally arise in the algorithm to LLRs using
PAM2QAM(). Custom conversions of symbol logits to LLRs can be implemented by using the soft-symbol output.The detector is currently restricted to QAM constellations.
- Parameters:
output (str) – Type of output, either
"bit"for LLRs on bits or"symbol"for logits on constellation symbolsnum_bits_per_symbol (int) – Number of bits per QAM constellation symbol, e.g., 4 for QAM16
hard_out (bool) – If True, the detector computes hard-decided bit values or constellation point indices instead of soft-values. Defaults to False.
l (int) – Number of iterations. Defaults to 10.
beta (float) – Parameter \(\beta\in[0,1]\) for update smoothing. Defaults to 0.9.
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 = EPDetector( output="bit", num_bits_per_symbol=4, l=10 ) llr = detector(y, h, s)
Methods