Multiple-Input Multiple-Output (MIMO)
Stream Management
Stream management determines which transmitter is sending which stream to
which receiver. Transmitters and receivers can be user terminals or base
stations, depending on whether uplink or downlink transmissions are considered.
The StreamManagement
class has various properties that
are needed to recover desired or interfering channel coefficients for precoding
and equalization. In order to understand how the various properties of
StreamManagement
can be used, we recommend to have a look
at the source code of the LMMSEEqualizer
or
RZFPrecoder
.
The following code snippet shows how to configure
StreamManagement
for a simple uplink scenario, where
four transmitters send each one stream to a receiver. Note that
StreamManagement
is independent of the actual number of
antennas at the transmitters and receivers.
num_tx = 4
num_rx = 1
num_streams_per_tx = 1
# Indicate which transmitter is associated with which receiver
# rx_tx_association[i,j] = 1 means that transmitter j sends one
# or mutiple streams to receiver i.
rx_tx_association = np.zeros([num_rx, num_tx])
rx_tx_association[0,0] = 1
rx_tx_association[0,1] = 1
rx_tx_association[0,2] = 1
rx_tx_association[0,3] = 1
sm = StreamManagement(rx_tx_association, num_streams_per_tx)
- class sionna.phy.mimo.StreamManagement(rx_tx_association, num_streams_per_tx)[source]
Class for management of streams in multi-cell MIMO networks.
- Parameters:
rx_tx_association ([num_rx, num_tx], np.int) – A binary NumPy array where
rx_tx_association[i,j]=1
means that receiver i gets one or multiple streams from transmitter j.num_streams_per_tx (int) – Indicates the number of streams that are transmitted by each transmitter.
Note
Several symmetry constraints on
rx_tx_association
are imposed to ensure efficient processing. All row sums and all column sums must be equal, i.e., all receivers have the same number of associated transmitters and all transmitters have the same number of associated receivers. It is also assumed that all transmitters send the same number of streamsnum_streams_per_tx
.- property detection_desired_ind
Indices needed to gather desired channels for receive processing
A NumPy array of shape [num_rx*num_streams_per_rx] that can be used to gather desired channels from the flattened channel tensor of shape […,num_rx, num_tx, num_streams_per_tx,…]. The result of the gather operation can be reshaped to […,num_rx, num_streams_per_rx,…].
- property detection_undesired_ind
Indices needed to gather undesired channels for receive processing
A NumPy array of shape [num_rx*num_streams_per_rx] that can be used to gather undesired channels from the flattened channel tensor of shape […,num_rx, num_tx, num_streams_per_tx,…]. The result of the gather operation can be reshaped to […,num_rx, num_interfering_streams_per_rx,…].
- property num_interfering_streams_per_rx
Number of interfering streams received at each eceiver
- property num_rx
Number of receivers
- property num_rx_per_tx
Number of receivers communicating with a transmitter
- property num_streams_per_rx
Number of streams transmitted to each receiver
- property num_streams_per_tx
Number of streams per transmitter
- property num_tx
Number of transmitters
- property num_tx_per_rx
Number of transmitters communicating with a receiver
- property precoding_ind
Indices needed to gather channels for precoding
A NumPy array of shape [num_tx, num_rx_per_tx], where
precoding_ind[i,:]
contains the indices of the receivers to which transmitter i is sending streams.
- property rx_stream_ids
Mapping of streams to receivers
A Numpy array of shape [num_rx, num_streams_per_rx]. This array is obtained from
tx_stream_ids
together with therx_tx_association
.rx_stream_ids[i,:]
contains the indices of streams that are supposed to be decoded by receiver i.
- property rx_tx_association
Association between receivers and transmitters.
A binary NumPy array of shape [num_rx, num_tx], where
rx_tx_association[i,j]=1
means that receiver i gets one ore multiple streams from transmitter j.
- property stream_association
Association between receivers, transmitters, and streams
A binary NumPy array of shape [num_rx, num_tx, num_streams_per_tx], where
stream_association[i,j,k]=1
means that receiver i gets the k th stream from transmitter j.
- property stream_ind
Indices needed to gather received streams in the correct order
A NumPy array of shape [num_rx*num_streams_per_rx] that can be used to gather streams from the flattened tensor of received streams of shape […,num_rx, num_streams_per_rx,…]. The result of the gather operation is then reshaped to […,num_tx, num_streams_per_tx,…].
- property tx_stream_ids
Mapping of streams to transmitters
A NumPy array of shape [num_tx, num_streams_per_tx]. Streams are numbered from 0,1,… and assiged to transmitters in increasing order, i.e., transmitter 0 gets the first num_streams_per_tx and so on.
Precoding
- sionna.phy.mimo.cbf_precoding_matrix(h, precision=None)[source]
Computes the conjugate beamforming (CBF) Precoder
This function computes the CBF precoding matrix for a MIMO link, assuming the following model:
where
is the received signal vector, is the known channel matrix, is the precoding matrix, is the symbol vector to be precoded, and is a noise vector.The precoding matrix
is defined as :where
The matrix
ensures that each stream is precoded with a unit-norm vector, i.e., . The function returns the matrix .- Input:
h ([…,K,M], tf.complex) – 2+D tensor containing the channel matrices
precision (None (default) | “single” | “double”) – Precision used for internal calculations and outputs. If set to None,
precision
is used
- Output:
g ([…,M,K], tf.complex) – 2+D tensor containing the precoding matrices
- sionna.phy.mimo.rzf_precoding_matrix(h, alpha=0.0, precision=None)[source]
Computes the Regularized Zero-Forcing (RZF) Precoder
This function computes the RZF precoding matrix for a MIMO link, assuming the following model:
where
is the received signal vector, is the known channel matrix, is the precoding matrix, is the symbol vector to be precoded, and is a noise vector.The precoding matrix
is defined as :where
where
is the regularization parameter. The matrix ensures that each stream is precoded with a unit-norm vector, i.e., . The function returns the matrix .- Input:
h ([…,K,M], tf.complex) – 2+D tensor containing the channel matrices
alpha (0. (default) | […], tf.float32) – Regularization parameter
precision (None (default) | “single” | “double”) – Precision used for internal calculations and outputs. If set to None,
precision
is used
- Output:
g ([…,M,K], tf.complex) – 2+D tensor containing the precoding matrices
- sionna.phy.mimo.rzf_precoder(x, h, alpha=0.0, return_precoding_matrix=False, precision=None)[source]
Regularized Zero-Forcing (RZF) Precoder
This function implements RZF precoding for a MIMO link, assuming the following model:
where
is the received signal vector, is the known channel matrix, is the precoding matrix, is the symbol vector to be precoded, and is a noise vector.The precoding matrix
is defined as (Eq. 4.37) [BHS2017] :where
where
is the regularization parameter.This ensures that each stream is precoded with a unit-norm vector, i.e.,
. The function returns the precoded vector .- Input:
x ([…,K], tf.complex) – Symbol vectors to be precoded
h ([…,K,M], tf.complex) – Channel matrices
alpha (0. (default) | […], tf.float32) – Regularization parameter
return_precoding_matrices (bool, (default, False)) – Indicates if the precoding matrices should be returned or not
precision (None (default) | “single” | “double”) – Precision used for internal calculations and outputs. If set to None,
precision
is used
- Output:
x_precoded ([…,M], tf.complex) – Precoded symbol vectors
g ([…,M,K], tf.complex) – Precoding matrices. Only returned if
return_precoding_matrices=True
.
- sionna.phy.mimo.grid_of_beams_dft_ula(num_ant, oversmpl=1, precision=None)[source]
Computes the Discrete Fourier Transform (DFT) Grid of Beam (GoB) coefficients for a uniform linear array (ULA)
The coefficient applied to antenna
for beam is expressed as:where
is the number of antennasnum_ant
and is the oversampling factoroversmpl
.Note that the main lobe of beam
points in the azimuth direction if and if , where defines the perpendicular to the antenna array.- Input:
num_ant (int) – Number of antennas
oversmpl (int, (default 1)) – Oversampling factor
precision (None (default) | “single” | “double”) – Precision used for internal calculations and outputs. If set to None,
precision
is used.
- Output:
gob ([num_ant x oversmpl, num_ant], tf.complex) – The
-th row contains the num_ant antenna coefficients for the -th DFT beam.
- sionna.phy.mimo.grid_of_beams_dft(num_ant_v, num_ant_h, oversmpl_v=1, oversmpl_h=1, precision=None)[source]
Computes the Discrete Fourier Transform (DFT) Grid of Beam (GoB) coefficients for a uniform rectangular array (URA)
GoB indices are arranged over a 2D grid indexed by
. The coefficient of the beam with index applied to the antenna located at row and column of the rectangular array is expressed as:where
, , , , is the number of antennasnum_ant
and are the oversampling factoroversmpl_v
,oversmpl_h
in the vertical and horizontal direction, respectively.We can rewrite more concisely the matrix coefficients
as follows:where
denotes the Kronecker product and are the ULA DFT beams computed as ingrid_of_beams_dft_ula()
.Such a DFT GoB is, e.g., defined in Section 5.2.2.2.1 [3GPP38214].
- Input:
num_ant_v (int) – Number of antenna rows (i.e., in vertical direction) of the rectangular array
num_ant_h (int) – Number of antenna columns (i.e., in horizontal direction) of the rectangular array.
oversmpl_v (int, (default 1)) – Oversampling factor in vertical direction
oversmpl_h (int, (default 1)) – Oversampling factor in horizontal direction
precision (None (default) | “single” | “double”) – Precision used for internal calculations and outputs. If set to None,
precision
is used.
- Output:
gob ([num_ant_v x oversmpl_v, num_ant_h x oversmpl_h, num_ant_v x num_ant_h], tf.complex) – The elements
contain the antenna coefficients of the DFT beam with index pair .
- sionna.phy.mimo.flatten_precoding_mat(precoding_mat, by_column=True)[source]
Flattens a […, num_ant_v, num_ant_h] precoding matrix associated with a rectangular array by producing a […, num_ant_v x num_ant_h] precoding vector
- Input:
precoding_mat ([…, num_antennas_vertical, num_antennas_horizontal], tf.complex) – Precoding matrix. The element
contains the precoding coefficient of the antenna element located at row and column of a rectangular antenna array.by_column (bool, (default True)) – If True, then flattening occurs on a per-column basis, i.e., the first column is appended to the second, and so on. Else, flattening is performed on a per-row basis.
- Output:
[…, num_antennas_vertical x num_antennas_horizontal], tf.complex – Flattened precoding matrix
- sionna.phy.mimo.normalize_precoding_power(precoding_vec, tx_power_list=None, precision=None)[source]
Normalizes the beam coefficient power to 1 by default, or to
tx_power_list
if provided as input- Input:
precoding_vec ([N,M], tf.complex) – Each row contains a set of antenna coefficients whose power is to be normalized.
tx_power_list ([N], float) – The
-th element defines the power of the -th precoding vector.precision (None (default) | “single” | “double”) – Precision used for internal calculations and outputs. If set to None,
precision
is used.
- Output:
[N,M] tf.complex – Normalized antenna coefficients
Equalization
- sionna.phy.mimo.lmmse_matrix(h, s=None, precision=None)[source]
MIMO LMMSE Equalization matrix
This function computes the LMMSE equalization matrix for a MIMO link, assuming the following model:
where
is the received signal vector, is the vector of transmitted symbols, is the known channel matrix, and is a noise vector. It is assumed that , and .This function returns the LLMSE equalization matrix:
If
, a numerically more stable version of the equalization matrix is computed:- Input:
h ([…,M,K], tf.complex) – Channel matrices
s (None (default) | […,M,M], tf.complex) – Noise covariance matrices. If None, the noise is assumed to be white with unit variance.
precision (None (default) | “single” | “double”) – Precision used for internal calculations and outputs. If set to None,
precision
is used.
- Output:
g ([…,K,M], tf.complex) – LLMSE equalization matrices
- sionna.phy.mimo.lmmse_equalizer(y, h, s, whiten_interference=True, precision=None)[source]
MIMO LMMSE Equalizer
This function implements LMMSE equalization for a MIMO link, assuming the following model:
where
is the received signal vector, is the vector of transmitted symbols, is the known channel matrix, and is a noise vector. It is assumed that , and .The estimated symbol vector
is given as (Lemma B.19) [BHS2017] :where
This leads to the post-equalized per-symbol model:
where the variances
of the effective residual noise terms are given by the diagonal elements ofNote that the scaling by
is important for theDemapper
although it does not change the signal-to-noise ratio.The function returns
and .- Input:
y ([…,M], tf.complex) – Received signals
h ([…,M,K], tf.complex) – Channel matrices
s ([…,M,M], tf.complex) – Noise covariance matrices
whiten_interference (bool, (default True)) – If True, the interference is first whitened before equalization. In this case, an alternative expression for the receive filter is used that can be numerically more stable.
precision (None (default) | “single” | “double”) – Precision used for internal calculations and outputs. If set to None,
precision
is used.
- Output:
x_hat ([…,K], tf.complex) – Estimated symbol vectors
no_eff (tf.float) – Effective noise variance estimates
- sionna.phy.mimo.mf_equalizer(y, h, s, precision=None)[source]
MIMO Matched Filter (MF) Equalizer
This function implements matched filter (MF) equalization for a MIMO link, assuming the following model:
where
is the received signal vector, is the vector of transmitted symbols, is the known channel matrix, and is a noise vector. It is assumed that , and .The estimated symbol vector
is given as (Eq. 4.11) [BHS2017] :where
This leads to the post-equalized per-symbol model:
where the variances
of the effective residual noise terms are given by the diagonal elements of the matrixNote that the scaling by
in the definition of is important for theDemapper
although it does not change the signal-to-noise ratio.The function returns
and .- Input:
y ([…,M], tf.complex) – Received signals
h ([…,M,K], tf.complex) – Channel matrices
s ([…,M,M], tf.complex) – Noise covariance matrices
precision (None (default) | “single” | “double”) – Precision used for internal calculations and outputs. If set to None,
precision
is used.
- Output:
x_hat ([…,K], tf.complex) – Estimated symbol vectors
no_eff (tf.float) – Effective noise variance estimates
- sionna.phy.mimo.zf_equalizer(y, h, s, precision=None)[source]
Applies MIMO ZF Equalizer
This function implements zero-forcing (ZF) equalization for a MIMO link, assuming the following model:
where
is the received signal vector, is the vector of transmitted symbols, is the known channel matrix, and is a noise vector. It is assumed that , and .The estimated symbol vector
is given as (Eq. 4.10) [BHS2017] :where
This leads to the post-equalized per-symbol model:
where the variances
of the effective residual noise terms are given by the diagonal elements of the matrixThe function returns
and .- Input:
y ([…,M], tf.complex) – Received signals
h ([…,M,K], tf.complex) – Channel matrices
s ([…,M,M], tf.complex) – Noise covariance matrices
precision (None (default) | “single” | “double”) – Precision used for internal calculations and outputs. If set to None,
precision
is used.
- Output:
x_hat ([…,K], tf.complex) – Estimated symbol vectors
no_eff (tf.float) – Effective noise variance estimates
Detection
- class sionna.phy.mimo.EPDetector(output, num_bits_per_symbol, hard_out=False, l=10, beta=0.9, precision=None, **kwargs)[source]
MIMO 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:
where
is the received signal vector, is the vector of transmitted symbols which are uniformly and independently drawn from the constellation , is the known channel matrix, and is a complex Gaussian noise vector. It is assumed that and , where 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 ("bit" | "symbol") – Type of output, either LLRs on bits or logits on constellation symbols
num_bits_per_symbol (int) – Number of bits per QAM constellation symbol, e.g., 4 for QAM16.
hard_out (bool, (default False)) – If True, the detector computes hard-decided bit values or constellation point indices instead of soft-values.
l (int, (default 10)) – Number of iterations
beta (float, (default 0.9)) – Parameter
for update smoothingprecision (None (default) | “single” | “double”) – Precision used for internal calculations and outputs. If set to None,
precision
is used.
- Input:
y ([…,M], tf.complex) – Received signals
h ([…,M,num_streams], tf.complex) – Channel matrices
s ([…,M,M], tf.complex) – Noise covariance matrices
- Output:
One of
[…, num_streams, num_bits_per_symbol], tf.float – LLRs or hard-decisions for every bit of every stream, if
output
equals “bit”.[…, num_streams, num_points], tf.float or […, num_streams], tf.int32 – Logits or hard-decisions for constellation symbols for every stream, if
output
equals “symbol”. Hard-decisions correspond to the symbol indices.
- class sionna.phy.mimo.KBestDetector(output, num_streams, k, constellation_type=None, num_bits_per_symbol=None, constellation=None, hard_out=False, use_real_rep=False, list2llr=None, precision=None, **kwargs)[source]
MIMO K-Best detector
This block implements K-Best MIMO detection as described in (Eq. 4-5) [FT2015]. It can either generate hard decisions (for symbols or bits) or compute LLRs.
The algorithm operates in either the complex or real-valued domain. Although both options produce identical results, the former has the advantage that it can be applied to arbitrary non-QAM constellations. It also reduces the number of streams (or depth) by a factor of two.
The way soft-outputs (i.e., LLRs) are computed is determined by the
list2llr
function. The default solutionList2LLRSimple
assigns a predetermined value to all LLRs without counter-hypothesis.This block assumes the following channel model:
where
is the received signal vector, is the vector of transmitted symbols which are uniformly and independently drawn from the constellation , is the known channel matrix, and is a complex Gaussian noise vector. It is assumed that and , where has full rank.In a first optional step, the channel model is converted to its real-valued equivalent, see
complex2real_channel()
. We assume in the sequel the complex-valued representation. Then, the channel is whitened usingwhiten_channel()
:Next, the columns of
are sorted according to their norm in descending order. Then, the QR decomposition of the resulting channel matrix is computed:where
is unitary and is upper-triangular. The channel outputs are then pre-multiplied by . This leads to the final channel model on which the K-Best detection algorithm operates:where
, , and with and .LLR Computation
The K-Best algorithm produces
candidate solutions and their associated distance metrics for . If the real-valued channel representation is used, the distance metrics are scaled by 0.5 to account for the reduced noise power in each complex dimension. A hard-decision is simply the candidate with the shortest distance. Various ways to compute LLRs from this list (and possibly additional side-information) are possible. The (sub-optimal) default solution isList2LLRSimple
. Custom solutions can be provided.- Parameters:
output ("bit" | "symbol") – Type of output, either LLRs on bits or logits on constellation symbols
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.
constellation_type ("qam" | "pam" | "custom") – For “custom”, an instance of
Constellation
must be provided.num_bits_per_symbol (int) – Number of bits per constellation symbol, e.g., 4 for QAM16. Only required for
constellation_type
in [“qam”, “pam”].constellation (None (default) |
Constellation
) – If None,constellation_type
andnum_bits_per_symbol
must be provided.hard_out (bool, (default False)) – If True, the detector computes hard-decided bit values or constellation point indices instead of soft-values.
use_real_rep (bool, (default False)) – If True, the detector use the real-valued equivalent representation of the channel. Note that this only works with a QAM constellation.
list2llr (None (default) |
List2LLR
) – The function to be used to compute LLRs from a list of candidate solutions. If None, the default solutionList2LLRSimple
is used.precision (None (default) | “single” | “double”) – Precision used for internal calculations and outputs. If set to None,
precision
is used.
- Input:
y ([…,M], tf.complex) – Received signals
h ([…,M,num_streams], tf.complex) – Channel matrices
s ([…,M,M], tf.complex) – Noise covariance matrices
- Output:
One of
[…, num_streams, num_bits_per_symbol], tf.float – LLRs or hard-decisions for every bit of every stream, if
output
equals “bit”.[…, num_streams, num_points], tf.float or […, num_streams], tf.int32 – Logits or hard-decisions for constellation symbols for every stream, if
output
equals “symbol”. Hard-decisions correspond to the symbol indices.
- class sionna.phy.mimo.LinearDetector(equalizer, output, demapping_method, constellation_type=None, num_bits_per_symbol=None, constellation=None, hard_out=False, precision=None, **kwargs)[source]
Convenience class that combines an equalizer, such as
lmmse_equalizer()
, and aDemapper
.- Parameters:
equalizer ("lmmse" | "zf" | "mf" | equalizer function) – The equalizer to be used. Either one of the existing equalizers
lmmse_equalizer()
,zf_equalizer()
, ormf_equalizer()
can be used, or a custom equalizer callable provided that has the same input/output specification.output ("bit" | "symbol") – Type of output, either LLRs on bits or logits on constellation symbols
demapping_method ("app" | "maxlog") – Demapping method to be used
constellation_type ("qam" | "pam" | "custom") – For “custom”, an instance of
Constellation
must be provided.num_bits_per_symbol (int) – Number of bits per constellation symbol, e.g., 4 for QAM16. Only required for
constellation_type
in [“qam”, “pam”].constellation (None (default) |
Constellation
) – If None,constellation_type
andnum_bits_per_symbol
must be provided.hard_out (bool, (default False)) – If True, the detector computes hard-decided bit values or constellation point indices instead of soft-values.
precision (None (default) | “single” | “double”) – Precision used for internal calculations and outputs. If set to None,
precision
is used.
- Input:
y ([…,M], tf.complex) – Received signals
h ([…,M,num_streams], tf.complex) – Channel matrices
s ([…,M,M], tf.complex) – Noise covariance matrices
- Output:
One of
[…, num_streams, num_bits_per_symbol], tf.float – LLRs or hard-decisions for every bit of every stream, if
output
equals “bit”[…, num_streams, num_points], tf.float or […, num_streams], tf.int32 – Logits or hard-decisions for constellation symbols for every stream, if
output
equals “symbol” Hard-decisions correspond to the symbol indices.
- class sionna.phy.mimo.MaximumLikelihoodDetector(output, demapping_method, num_streams, constellation_type=None, num_bits_per_symbol=None, constellation=None, hard_out=False, precision=None, **kwargs)[source]
MIMO maximum-likelihood (ML) detector
This block implements MIMO maximum-likelihood (ML) detection assuming the following channel model:
where
is the received signal vector, is the vector of transmitted symbols which are uniformly and independently drawn from the constellation , is the known channel matrix, and is a complex Gaussian noise vector. It is assumed that and , where has full rank. Optionally, prior information of the transmitted signal can be provided, either as LLRs on the bits mapped onto or as logits on the individual constellation points forming .Prior to demapping, the received signal is whitened:
The block can compute ML detection of symbols or bits with either soft- or hard-decisions. Note that decisions are computed symbol-/bit-wise and not jointly for the entire vector
(or the underlying vector of bits).ML detection of bits:
Soft-decisions on bits are called log-likelihood ratios (LLR). With the “app” demapping method, the LLR for the
bit of the user is then computed according towhere
and are the sets of vectors of constellation points for which the bit of the user is equal to 1 and 0, respectively. is the prior distribution of the vector of constellation points . Assuming that the constellation points and bit levels are independent, it is computed from the prior of the bits according towhere
is the prior knowledge of the bit of the user given as an LLR and which is set to if no prior knowledge is assumed to be available, and is the sigmoid function. The definition of the LLR has been chosen such that it is equivalent with that of logit. This is different from many textbooks in communications, where the LLR is defined as .With the “maxlog” demapping method, the LLR for the
bit of the user is approximated likeML detection of symbols:
Soft-decisions on symbols are called logits (i.e., unnormalized log-probability).
With the “app” demapping method, the logit for the constellation point
of the user is computed according toWith the “maxlog” demapping method, the logit for the constellation point
of the user is approximated likeWhen hard decisions are requested, this block returns for the
th streamwhere
is the set of constellation points.- Parameters:
output ("bit" | "symbol") – Type of output, either LLRs on bits or logits on constellation symbols
demapping_method ("app" | "maxlog") – Demapping method to be used
num_streams (int) – Number of transmitted streams
constellation_type ("qam" | "pam" | "custom") – For “custom”, an instance of
Constellation
must be provided.num_bits_per_symbol (int) – Number of bits per constellation symbol, e.g., 4 for QAM16. Only required for
constellation_type
in [“qam”, “pam”].constellation (None (default) |
Constellation
) – If None,constellation_type
andnum_bits_per_symbol
must be provided.hard_out (bool, (default False)) – If True, the detector computes hard-decided bit values or constellation point indices instead of soft-values.
precision (None (default) | “single” | “double”) – Precision used for internal calculations and outputs. If set to None,
precision
is used.
- Input:
y ([…,M], tf.complex) – Received signals
h ([…,M,num_streams], tf.complex) – Channel matrices
s ([…,M,M], tf.complex) – Noise covariance matrices
prior (None (default) | […,num_streams,num_bits_per_symbol] or […,num_streams,num_points], tf.float) – Prior of the transmitted signals. If
output
equals “bit”, then LLRs of the transmitted bits are expected. Ifoutput
equals “symbol”, then logits of the transmitted constellation points are expected.
- Output:
One of
[…, num_streams, num_bits_per_symbol], tf.float – LLRs or hard-decisions for every bit of every stream, if
output
equals “bit”.[…, num_streams, num_points], tf.float or […, num_streams], tf.int32 – Logits or hard-decisions for constellation symbols for every stream, if
output
equals “symbol”. Hard-decisions correspond to the symbol indices.
- class sionna.phy.mimo.MMSEPICDetector(output, demapping_method='maxlog', num_iter=1, constellation_type=None, num_bits_per_symbol=None, constellation=None, hard_out=False, precision=None, **kwargs)[source]
Minimum mean square error (MMSE) with parallel interference cancellation (PIC) detector
This block implements the MMSE PIC detector, as proposed in [CST2011]. For
num_iter
>1, this implementation performs MMSE PIC self-iterations. MMSE PIC self-iterations can be understood as a concatenation of MMSE PIC detectors from [CST2011], which forward intrinsic LLRs to the next self-iteration.Compared to [CST2011], this implementation also accepts priors on the constellation symbols as an alternative to priors on the bits.
This block assumes the following channel model:
where
is the received signal vector, is the vector of transmitted symbols which are uniformly and independently drawn from the constellation , is the known channel matrix, and is a complex Gaussian noise vector. It is assumed that and , where has full rank.The algorithm starts by computing the soft symbols
and variances from the priors, where , for all .Next, for each stream, the interference caused by all other streams is cancelled from the observation
, leading towhere
.Then, a linear MMSE filter
is computed to reduce the resdiual noise for each observation , which is given aswhere
is diagonal with entriesThe filtered observations
where
, are then demapped to either symbol logits or LLRs, assuming that the remaining noise is Gaussian with varianceThe resulting soft-symbols can then be used for the next self-iteration of the algorithm.
Note that this algorithm can be substantially simplified as described in [CST2011] to avoid the computation of different matrix inverses for each stream. This is the version which is implemented.
- Parameters:
output ("bit" | "symbol") – Type of output, either LLRs on bits or logits on constellation symbols
demapping_method ("maxlog" (default) | "app") – Demapping method to be used
num_iter (int, (default 1)) – Number of MMSE PIC iterations
constellation_type ("qam" | "pam" | "custom") – For “custom”, an instance of
Constellation
must be provided.num_bits_per_symbol (int) – Number of bits per constellation symbol, e.g., 4 for QAM16. Only required for
constellation_type
in [“qam”, “pam”].constellation (None (default) |
Constellation
) – If None,constellation_type
andnum_bits_per_symbol
must be provided.hard_out (bool, (default False)) – If True, the detector computes hard-decided bit values or constellation point indices instead of soft-values.
precision (None (default) | “single” | “double”) – Precision used for internal calculations and outputs. If set to None,
precision
is used.
- Input:
y ([…,M], tf.complex) – Received signals
h ([…,M,num_streams], tf.complex) – Channel matrices
s ([…,M,M], tf.complex) – Noise covariance matrices
prior ([…,num_streams,num_bits_per_symbol] or […,num_streams,num_points], tf.float) – Prior of the transmitted signals. If
output
equals “bit”, then LLRs of the transmitted bits are expected. Ifoutput
equals “symbol”, then logits of the transmitted constellation points are expected.
- Output:
One of
[…, num_streams, num_bits_per_symbol], tf.float – LLRs or hard-decisions for every bit of every stream, if
output
equals “bit”.[…, num_streams, num_points], tf.float or […, num_streams], tf.int32 – Logits or hard-decisions for constellation symbols for every stream, if
output
equals “symbol”. Hard-decisions correspond to the symbol indices.
Utility Functions
- class sionna.phy.mimo.List2LLR(precision=None, **kwargs)[source]
Abstract class defining a callable to compute LLRs from a list of candidate vectors (or paths) provided by a MIMO detector
The following channel model is assumed
where
are the channel outputs, is an upper-triangular matrix, is the transmitted vector whose entries are uniformly and independently drawn from the constellation , and is white noise with and .It is assumed that a MIMO detector such as
KBestDetector
produces candidate solutions and their associated distance metrics for . This layer can also be used with the real-valued representation of the channel.- Parameters:
precision (None (default) | “single” | “double”) – Precision used for internal calculations and outputs. If set to None,
precision
is used.- Input:
y ([…,M], tf.complex or tf.float) – Channel outputs of the whitened channel
r ([…,num_streams, num_streams], same dtype as
y
) – Upper triangular channel matrix of the whitened channeldists ([…,num_paths], tf.float) – Distance metric for each path (or candidate)
path_inds ([…,num_paths,num_streams], tf.int32) – Symbol indices for every stream of every path (or candidate)
path_syms ([…,num_path,num_streams], same dtype as
y
) – Constellation symbol for every stream of every path (or candidate)
- Output:
llr ([…num_streams,num_bits_per_symbol], tf.float) – LLRs for all bits of every stream
Note
An implementation of this class does not need to make use of all of the provided inputs which enable various different implementations.
- class sionna.phy.mimo.List2LLRSimple(num_bits_per_symbol, llr_clip_val=20.0, precision=None, **kwargs)[source]
Computes LLRs from a list of candidate vectors (or paths) provided by a MIMO detector
The following channel model is assumed:
where
are the channel outputs, is an upper-triangular matrix, is the transmitted vector whose entries are uniformly and independently drawn from the constellation , and is white noise with and .It is assumed that a MIMO detector such as
KBestDetector
produces candidate solutions and their associated distance metrics for . This layer can also be used with the real-valued representation of the channel.The LLR for the
bit of the stream is computed aswhere
and are the set of indices in the list of candidates for which the bit of the stream is equal to 1 and 0, respectively. The LLRs are clipped to which can be configured through the parameterllr_clip_val
.If
is empty, ; if is empty, .- Parameters:
num_bits_per_symbol (int) – Number of bits per constellation symbol
llr_clip_val (float, (default 20.0)) – The absolute values of LLRs are clipped to this value.
precision (None (default) | “single” | “double”) – Precision used for internal calculations and outputs. If set to None,
precision
is used.
- Input:
y ([…,M], tf.complex or tf.float) – Channel outputs of the whitened channel
r ([…,num_streams, num_streams], same dtype as
y
) – Upper triangular channel matrix of the whitened channeldists ([…,num_paths], tf.float) – Distance metric for each path (or candidate)
path_inds ([…,num_paths,num_streams], tf.int32) – Symbol indices for every stream of every path (or candidate)
path_syms ([…,num_path,num_streams], same dtype as
y
) – Constellation symbol for every stream of every path (or candidate)
- Output:
llr ([…num_streams,num_bits_per_symbol], tf.float) – LLRs for all bits of every stream
- property llr_clip_val
Get/set the value to which the absolute values of LLRs are clipped
- Type:
float
- sionna.phy.mimo.complex2real_vector(z)[source]
Transforms a complex-valued vector into its real-valued equivalent
Transforms the last dimension of a complex-valued tensor into its real-valued equivalent by stacking the real and imaginary parts on top of each other.
For a vector
with real and imaginary parts and , respectively, this function returns the vector .- Input:
[…,M], tf.complex
- Output:
[…,2M], tf.complex.real_dtype
- sionna.phy.mimo.real2complex_vector(z)[source]
Transforms a real-valued vector into its complex-valued equivalent
Transforms the last dimension of a real-valued tensor into its complex-valued equivalent by interpreting the first half as the real and the second half as the imaginary part.
For a vector
with and , this function returns the vector .- Input:
[…,2M], tf.float
- Output:
[…,M], tf.complex
- sionna.phy.mimo.complex2real_matrix(z)[source]
Transforms a complex-valued matrix into its real-valued equivalent
Transforms the last two dimensions of a complex-valued tensor into their real-valued matrix equivalent representation.
For a matrix
with real and imaginary parts and , respectively, this function returns the matrix , given as- Input:
[…,M,K], tf.complex
- Output:
[…,2M, 2K], tf.complex.real_dtype
- sionna.phy.mimo.real2complex_matrix(z)[source]
Transforms a real-valued matrix into its complex-valued equivalent
Transforms the last two dimensions of a real-valued tensor into their complex-valued matrix equivalent representation.
For a matrix
, satisfyingwith
and , this function returns the matrix .- Input:
[…,2M,2K], tf.float
- Output:
[…,M, 2], tf.complex
- sionna.phy.mimo.complex2real_covariance(r)[source]
Transforms a complex-valued covariance matrix to its real-valued equivalent
Assume a proper complex random variable
[ProperRV] with covariance matrix and real and imaginary parts and , respectively. This function transforms the given into the covariance matrix of the real-valued equivalent vector , which is computed as [CovProperRV]- Input:
[…,M,M], tf.complex
- Output:
[…,2M, 2M], tf.complex.real_dtype
- sionna.phy.mimo.real2complex_covariance(q)[source]
Transforms a real-valued covariance matrix to its complex-valued equivalent
Assume a proper complex random variable
[ProperRV] with covariance matrix and real and imaginary parts and , respectively. This function transforms the given covariance matrix of the real-valued equivalent vector , which is given as [CovProperRV]into is complex-valued equivalent
.- Input:
[…,2M,2M], tf.float
- Output:
[…,M, M], tf.complex
- sionna.phy.mimo.complex2real_channel(y, h, s)[source]
Transforms a complex-valued MIMO channel into its real-valued equivalent
Assume the canonical MIMO channel model
where
is the received signal vector, is the vector of transmitted symbols, is the known channel matrix, and is a noise vector with covariance matrix .This function returns the real-valued equivalent representations of
, , and , which are used by a wide variety of MIMO detection algorithms (Section VII) [YH2015]. These are obtained by applyingcomplex2real_vector()
to ,complex2real_matrix()
to , andcomplex2real_covariance()
to .- Input:
y ([…,M], tf.complex) – Complex-valued received signals
h ([…,M,K], tf.complex) – Complex-valued channel matrices
s ([…,M,M], tf.complex) – Complex-valued noise covariance matrices
- Output:
[…,2M], tf.complex.real_dtype – Real-valued equivalent received signals
[…,2M,2K], tf.complex.real_dtype – Real-valued equivalent channel matrices
[…,2M,2M], tf.complex.real_dtype – Real-valued equivalent noise covariance matrices
- sionna.phy.mimo.real2complex_channel(y, h, s)[source]
Transforms a real-valued MIMO channel into its complex-valued equivalent
Assume the canonical MIMO channel model
where
is the received signal vector, is the vector of transmitted symbols, is the known channel matrix, and is a noise vector with covariance matrix .This function transforms the real-valued equivalent representations of
, , and , as, e.g., obtained with the functioncomplex2real_channel()
, back to their complex-valued equivalents (Section VII) [YH2015].- Input:
y ([…,2M], tf.float) – Real-valued received signals
h ([…,2M,2K], tf.float) – Real-valued channel matrices
s ([…,2M,2M], tf.float) – Real-valued noise covariance matrices
- Output:
[…,M], tf.complex – Complex-valued equivalent received signals
[…,M,K], tf.complex – Complex-valued equivalent channel matrices
[…,M,M], tf.complex – Complex-valued equivalent noise covariance matrices
- sionna.phy.mimo.whiten_channel(y, h, s, return_s=True)[source]
Whitens a canonical MIMO channel
Assume the canonical MIMO channel model
where
is the received signal vector, is the vector of transmitted symbols, is the known channel matrix, and is a noise vector with covariance matrix .This function whitens this channel by multiplying
and from the left by , where is the Cholesky decomposition of . Optionally, the whitened noise covariance matrix can be returned.- Input:
y ([…,M], tf.float or tf.complex) – Received signals
h ([…,M,K], tf.float or tf.complex) – Channel matrices
s ([…,M,M], tf.float or tf.complex) – Noise covariance matrices
return_s (bool, (default True)) – If True, the whitened covariance matrix is returned.
- Output:
[…,M], tf.float or tf.complex – Whitened received signals
[…,M,K], tf.float or tf.complex – Whitened channel matrices
[…,M,M], tf.float or tf.complex – Whitened noise covariance matrices. Only returned if
return_s
is True.
- References:
- [CovProperRV] (1,2)
Covariance matrices of real and imaginary parts, Wikipedia, accessed 11 September, 2022.
[YH2015] (1,2)S. Yang and L. Hanzo, “Fifty Years of MIMO Detection: The Road to Large-Scale MIMOs”, IEEE Communications Surveys & Tutorials, vol. 17, no. 4, pp. 1941-1988, 2015.
[FT2015]W. Fu and J. S. Thompson, “Performance analysis of K-best detection with adaptive modulation”, IEEE Int. Symp. Wirel. Commun. Sys. (ISWCS), 2015.
[EP2014]J. Céspedes, P. M. Olmos, M. Sánchez-Fernández, and F. Perez-Cruz, “Expectation Propagation Detection for High-Order High-Dimensional MIMO Systems”, IEEE Trans. Commun., vol. 62, no. 8, pp. 2840-2849, Aug. 2014.
[CST2011] (1,2,3,4)C. Studer, S. Fateh, and D. Seethaler, “ASIC Implementation of Soft-Input Soft-Output MIMO Detection Using MMSE Parallel Interference Cancellation”, IEEE Journal of Solid-State Circuits, vol. 46, no. 7, pp. 1754–1765, July 2011.