pam#
- sionna.phy.mapping.pam(num_bits_per_symbol: int, normalize: bool = True, precision: Literal['single', 'double'] | None = None) numpy.ndarray[source]#
Generates a PAM constellation.
This function generates a real-valued vector, where each element is a constellation point of an M-ary PAM constellation. The bit label of the
nth point is given by the length-num_bits_per_symbolbinary representation ofn.- Parameters:
num_bits_per_symbol (int) – Number of bits per constellation point. Must be positive.
normalize (bool) – If True, the constellation is normalized to have unit power. Defaults to True.
precision (Literal['single', 'double'] | None) – Precision used for internal calculations and outputs. If set to None,
precisionis used.
- Outputs:
c – np.ndarray, shape [2**num_bits_per_symbol]. PAM constellation symbols.
Notes
The bit label of the nth constellation point is given by the binary representation of its position within the array and can be obtained through
np.binary_repr(n, num_bits_per_symbol).The normalization factor of a PAM constellation is given in closed-form as:
\[\sqrt{\frac{1}{2^{n-1}}\sum_{i=1}^{2^{n-1}}(2i-1)^2}\]where \(n= \text{num\_bits\_per\_symbol}\) is the number of bits per symbol.
This algorithm is a recursive implementation of the expressions found in Section 5.1 of [3GPPTS38211]. It is used in the 5G standard.
Examples
from sionna.phy.mapping import pam # Generate 4-PAM constellation constellation = pam(2) print(constellation.shape) # (4,)