Skip to content

komm.SimplexConstellation

Simplex constellation. It is a real $M$-dimensional constellation of order $M$ obtained from an orthogonal constellation by subtracting from each symbol the mean of all the symbols. The $i$-th symbol is given by $$ \mathbf{x}_i = A \left( \mathbf{e}_i - \frac{1}{M} \mathbf{1} \right), \quad i \in [0 : M), $$ where $A$ is the base amplitude, and $\mathbf{e}_i$ is the $i$-th standard basis vector of $\mathbb{R}^M$. The symbols are equidistant, equicorrelated, and lie in an $(M-1)$-dimensional subspace. The simplex constellation achieves the same minimum distance as the orthogonal constellation, but with smaller energy. For more details, see PS08, Sec. 3.2–4.

Parameters:

  • order (int)

    The order $M$ of the constellation.

  • base_amplitude (float)

    The base amplitude $A$ of the constellation. The default value is 1.0.

Examples:

  1. The $4$-ary simplex constellation with base amplitude $A = 1$ is given by

    >>> const = komm.SimplexConstellation(4)
    >>> const.matrix
    array([[ 0.75, -0.25, -0.25, -0.25],
           [-0.25,  0.75, -0.25, -0.25],
           [-0.25, -0.25,  0.75, -0.25],
           [-0.25, -0.25, -0.25,  0.75]])
    
  2. The $2$-ary simplex constellation with base amplitude $A = 1$ is given by

    >>> const = komm.SimplexConstellation(2)
    >>> const.matrix
    array([[ 0.5, -0.5],
           [-0.5,  0.5]])
    

matrix Array2D[floating] cached property

The constellation matrix $\mathbf{X}$.

Examples:

>>> const = komm.SimplexConstellation(4)
>>> const.matrix
array([[ 0.75, -0.25, -0.25, -0.25],
       [-0.25,  0.75, -0.25, -0.25],
       [-0.25, -0.25,  0.75, -0.25],
       [-0.25, -0.25, -0.25,  0.75]])

order int property

The order $M$ of the constellation.

Examples:

>>> const = komm.SimplexConstellation(4)
>>> const.order
4

dimension int property

The dimension $N$ of the constellation.

For the simplex constellation, it is given by $N = M$. Note, however, that the symbols lie in an $(M-1)$-dimensional subspace.

Examples:

>>> const = komm.SimplexConstellation(4)
>>> const.dimension
4

mean()

Computes the mean $\mathbf{m}$ of the constellation given prior probabilities $p_i$ of the constellation symbols. It is given by $$ \mathbf{m} = \sum_{i \in [0:M)} p_i \mathbf{x}_i. $$

Parameters:

  • priors (ArrayLike | None)

    The prior probabilities of the constellation symbols. Must be a 1D-array whose size is equal to the order $M$ of the constellation. If not given, uniform priors are assumed.

Returns:

  • mean (Array1D[floating])

    The mean $\mathbf{m}$ of the constellation.

For uniform priors, the mean of the simplex constellation is given by $$ \mathbf{m} = \mathbf{0}. $$

Examples:

>>> const = komm.SimplexConstellation(4)
>>> const.mean()
array([0., 0., 0., 0.])

mean_energy()

Computes the mean energy $E$ of the constellation given prior probabilities $p_i$ of the constellation symbols. It is given by $$ E = \sum_{i \in [0:M)} p_i \lVert \mathbf{x}_i \rVert^2. $$

Parameters:

  • priors (ArrayLike | None)

    The prior probabilities of the constellation symbols. Must be a 1D-array whose size is equal to the order $M$ of the constellation. If not given, uniform priors are assumed.

Returns:

  • mean_energy (floating)

    The mean energy $E$ of the constellation.

For uniform priors, the mean energy of the simplex constellation is given by $$ E = A^2 \left( 1 - \frac{1}{M} \right). $$

Examples:

>>> const = komm.SimplexConstellation(4)
>>> const.mean_energy()
np.float64(0.75)

minimum_distance()

Computes the minimum Euclidean distance $d_\mathrm{min}$ of the constellation. It is given by $$ d_\mathrm{min} = \min_ { i, j \in [0:M), ~ i \neq j } \lVert \mathbf{x}_i - \mathbf{x}_j \rVert. $$

For the simplex constellation, the minimum distance is given by $$ d_{\min} = A \sqrt{2}. $$

Examples:

>>> const = komm.SimplexConstellation(4)
>>> const.minimum_distance()
np.float64(1.4142135623730951)

indices_to_symbols()

Returns the constellation symbols corresponding to the given indices.

Parameters:

  • indices (ArrayLike)

    The indices to be converted to symbols. Must be an array of integers in $[0:M)$.

Returns:

  • symbols (NDArray[floating])

    The symbols corresponding to the given indices. Has the same shape as indices, but with the last dimension expanded by a factor of $N$.

Examples:

>>> const = komm.SimplexConstellation(4)
>>> const.indices_to_symbols([1, 3])
array([-0.25,  0.75, -0.25, -0.25, -0.25, -0.25, -0.25,  0.75])

closest_indices()

Returns the indices of the constellation symbols closest to the given received points.

Parameters:

  • received (ArrayLike)

    The received points. Must be an array whose last dimension is a multiple of $N$.

Returns:

  • indices (NDArray[integer])

    The indices of the symbols closest to the received points. Has the same shape as received, but with the last dimension contracted by a factor of $N$.

Examples:

>>> const = komm.SimplexConstellation(4)
>>> const.closest_indices([0.6, -0.1, -0.2, -0.3])
array([0])

closest_symbols()

Returns the constellation symbols closest to the given received points.

Parameters:

  • received (ArrayLike)

    The received points. Must be an array whose last dimension is a multiple of $N$.

Returns:

  • symbols (NDArray[floating])

    The symbols closest to the received points. Has the same shape as received.

Examples:

>>> const = komm.SimplexConstellation(4)
>>> const.closest_symbols([0.6, -0.1, -0.2, -0.3])
array([ 0.75, -0.25, -0.25, -0.25])

posteriors()

Returns the posterior probabilities of each constellation symbol given received points, the noise power, and prior probabilities.

The posteriors are computed under the Gaussian channel model $Y = X + Z$, assuming that each received point is the transmitted symbol corrupted by additive Gaussian noise of power $\sigma_Z^2$. For real-valued constellations the noise is real Gaussian with variance $\sigma_Z^2$; for complex-valued constellations it is circularly symmetric complex Gaussian, with the noise power equally divided between the real and imaginary parts, i.e., $\mathrm{E}[\mathrm{Re}\{Z_n\}^2] = \mathrm{E}[\mathrm{Im}\{Z_n\}^2] = \sigma_Z^2/2$.

Parameters:

  • received (ArrayLike)

    The received points. Must be an array whose last dimension is a multiple of $N$.

  • noise_power (float)

    The noise power (variance) $\sigma_Z^2$.

  • priors (ArrayLike | None)

    The prior probabilities of the symbols. Must be a 1D-array whose size is equal to $M$. If not given, uniform priors are assumed.

Returns:

  • posteriors (NDArray[floating])

    The posterior probabilities of each symbol given the received points. Has the same shape as received, but with the last dimension changed by a factor of $M / N$.

Examples:

>>> const = komm.SimplexConstellation(4)
>>> const.posteriors([0.6, -0.1, -0.2, -0.3], noise_power=0.5).round(3)
array([0.62 , 0.153, 0.125, 0.102])