Symbol Mapping

The symbol mapper is used to map multiple bits on-to symbol based on “QAM” or “PSK” mapping. These symbols are processed by lower physical layer for transmission over the wireless channel. At receiver, the log likelihood ratios or the hard bits can be recovered from the estimated symbols using the symbol demapper.

Table of Contents

Mapper

The symbols mapper supports “QAM” and “PSK” for the modulation orders as illustrated in table-1. 5G Toolkit utilizes Sionna for QAM mapping. The application programming interface (API) is similar to that Sionna-mapper for the ease of use. The generation of the symbols is based on [3GPPTS38211_map] Section 5.1 “Modulation mapper”.

Table-2: Uplink Reference Signal and its utility

Constellation Type

Number of bits per symbol

“qam”

2,4,6,8,10

“bpsk”

NA (always 1).

“pi/2-bpsk”

NA (always 1).

Important

  • Symbol mapping supports BPSK, \(\frac{\pi}{2}\) BPSK and, QAM modulation order upto 10 (only even values).

For BPSK Symbol mapping:

numBits   = 100     # number of bits: should be a multiple of the modOrder
# Generate the bits for modulation
bits      = np.random.randint(2, size = numBits)

constType = "bpsk"  # Symbol mapping type
modOrder  = 1       # Mordulation order or number of bits per symbol
# Symbol mapping object
mapper    = Mapper(constType, modOrder)
symbols   = mapper(bits) # Generate symbols from the bits.

For 16-QAM Symbol mapping:

numBatch  = 100     # number of batches
numBits   = 1600    # number of bits: should be a multiple of the modOrder
# Generate the bits for modulation
bits      = np.random.randint(2, size = (numBatch, numBits))

constType = "qam"   # Symbol mapping type
modOrder  = 4       # Mordulation order or number of bits per symbol
# Symbol mapping object
mapper    = Mapper(constType, modOrder)
symbols   = mapper(bits) # Generate symbols from the bits.

The details about the input-output interface of the Mapper modules is provided below.

class toolkit5G.SymbolMapping.Mapper(constellation_type, num_bits_per_symbol, constellation, dtype=tf.float32)[source]

Mapper generate the modulation symbols for the given inputs puts. The constructor expects constellation type, number of bits per symbol (modulation order) slot index and, symbol index. The call method expect the length to be generated for the PRS and returns 1 or multiple CSI-RS based on the size of slot index and symbol index passed as input. The details about the implementation of the sequence are provided in section 7.4.1.7 of [3GPPTS38211_map].

Parameters:
  • constellation_type (str) – Defines symbol modulation/mapping type \(\in \{\)“qam”,”bpsk”,”pi/2-bpsk”\(\}\).

  • num_bits_per_symbol (int) – Defines the modulation order (number of bits per symbol).

  • constellation (sionna constellation class) – Defines the sionna constellation class object. It is used for defining custom symbol mapping.

  • dtype (NumPy data type) – Defines the data type for the output. The type conversion is supported as per NumPy type conversion.

  • **kwargs (keyValue pairs) – key-value pairs for Sionna Mapper.

Note

The num_bits_per_symbol is applicable only for “qam” constellation type. For “qam” symbol mapping, num_bits_per_symbol \(\in \{2,4,6,8,10\}\). On the other hand for “bpsk” and “pi/2-bpsk”, the value is forced to 1.

Input:

inputs ([…, numBits], np.int8) – Define input bits to be mapped to symbols.

Output:

[…, numBits/num_bits_per_symbol], np.complex64 – Channel state information reference sequence (PRS).

Warning

The number of bits to be symbol mapped must be a multiple of num_bits_per_symbol.

Raises:
  • ValueError – [Error-Mapper]: inputs must be an NumPy integer array!

  • ValueError – [Error-Mapper]: number inputs bits must be a multiple of num_bits_per_symbol!

  • ValueError – [Error-Mapper]: num_bits_per_symbol must be integer!

References:
[3GPPTS38211_map] (1,2)

3GPP TS 38.211 “Physical channels and modulation (Release 17)”, V17.1.0 (2022-03).