Skip to content

komm.PAModulation

Pulse-amplitude modulation (PAM). It is a real modulation scheme in which the constellation symbols are uniformly arranged in the real line and have zero mean. More precisely, the the $i$-th constellation symbol is given by $$ x_i = A \left( 2i - M + 1 \right), \quad i \in [0 : M), $$ where $M$ is the order (a power of $2$), and $A$ is the base amplitude of the modulation. The PAM constellation is depicted below for $M = 8$.

8-PAM constellation.

__init__()

Constructor for the class.

Parameters:

  • order (int)

    The order $M$ of the modulation. It must be a power of $2$.

  • base_amplitude (Optional[float])

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

  • labeling (Optional[Array1D[int] | str])

    The binary labeling of the modulation. Can be specified either as a 2D-array of integers (see base class for details), or as a string. In the latter case, the string must be either 'natural' or 'reflected'. The default value is 'reflected', corresponding to the Gray labeling.

Examples:

The PAM modulation with order $M = 4$, base amplitude $A = 1$, and Gray labeling is depicted below.

4-PAM modulation with Gray labeling.

>>> pam = komm.PAModulation(4)
>>> pam.constellation
array([-3., -1.,  1.,  3.])
>>> pam.labeling
array([[0, 0],
       [1, 0],
       [1, 1],
       [0, 1]])
>>> pam.modulate([0, 0, 1, 1, 0, 0, 1, 0, 1, 0])
array([-3.,  1., -3., -1., -1.])