optic.comm.sources.symbolSource

symbolSource(param)

Generate a random symbol sequence based on the specified modulation scheme, order, and pmf.

Parameters:

param (optic.utils.parameters object) –

Parameters of the symbol source:

  • nSymbols : int, optional. The number of symbols to generate. [default: 1000]

  • M : int, optional. The modulation order, defining the size of the constellation. [default: 4]

  • constType : str, optional. The type of modulation scheme. Supported types are ‘qam’, ‘pam’, ‘psk’, and ‘apsk’. [default: ‘qam’].

  • dist : str, optional. The probability distribution for generating symbols. Options are ‘uniform’ or ‘maxwell-boltzmann’ [default: ‘uniform’].

  • shapingFactor : float, optional. The shaping factor applied when dist is ‘maxwell-boltzmann’. Controls the shaping of the constellation points. [default: 0.0].

  • px : array-like, optional. Custom probability distribution for the constellation points. If None, the distribution is determined by dist. [default: None].

  • seed : int, optional. Seed for the random number generator to ensure reproducibility [default: None].

Returns:

symbols – A NumPy array containing the generated symbols from the specified constellation, based on the given probability distribution.

Return type:

np.array

Notes

The function generates symbols using a specified modulation scheme following a uniform or Maxwell-Boltzmann distribution to the constellation points. The Maxwell-Boltzmann distribution is shaped by the shapingFactor. If a custom probability distribution px is provided, it will override the default distribution.

If the constType is set to ‘qam’, ‘pam’, ‘psk’, or ‘apsk’, the corresponding constellation is used. Custom modulation schemes are not supported.

The seed parameter ensures the same sequence of symbols is generated across different runs when set.

References

[1] Junho Cho and Peter J. Winzer, “Probabilistic Constellation Shaping for Optical Fiber Communications,” J. Lightwave Technol. 37, 1590-1607 (2019).