torchsig.signals.builders.constellation.constellation_modulator_baseband

torchsig.signals.builders.constellation.constellation_modulator_baseband(class_name: str, pulse_shape_name: str, max_num_samples: int, oversampling_rate_nominal: int, alpha_rolloff: float | None = None, rng=Generator(PCG64) at 0x7694C485E260) ndarray[source]

Modulates constellation based signals (QAM/PSK/ASK/OOK) at complex baseband.

Parameters:
  • class_name (str) – Name of the signal to modulate, ex: ‘qpsk’.

  • pulse_shape_name (str) – Pulse shaping filter selection, ‘rectangular’ or ‘srrc’ (square-root raised cosine).

  • max_num_samples (int) – Maximum number of samples to be produced. The length of the output signal must be less than or equal to this number.

  • oversampling_rate_nominal (int) – The amount of oversampling, which is equal to the ratio of the ratio of the sampling rate and bandwidth.

  • alpha_rolloff (float, optional) – The alpha-rolloff value for the SRRC filter. If pulse_shape_name == ‘recantangular’ then this value is ignored. If pulse_shape_name == ‘srrc’ then this value must be defined, and within the range 0 < alpha_rolloff < 1. Defaults to None.

  • rng (optional) – Seedable random number generator for reproducibility.

Raises:
  • ValueError – Raises ValueError if pulse_shape_name is neither ‘rectangular’ or ‘srrc’.

  • ValueError – Raises ValueError if alpha_rolloff is not defined when selecting ‘srrc’.

Returns:

IQ samples of the constellation-modulated complex baseband signal.

Return type:

np.ndarray