comnum.estimate_symbol_rate#

comnum.estimate_symbol_rate(x, fs, f_min_hz, f_max_hz)#

The symbol rate of a linearly modulated signal from the strongest line of the spectrum of its instantaneous power (cyclostationarity, Gardner 1991); the pulse must have an excess bandwidth.

Parameters:
  • x (array_like) – the samples (complex).

  • fs (float) – the sampling rate (Hz).

  • f_min_hz (float) – the lowest symbol rate searched (Hz).

  • f_max_hz (float) – the highest symbol rate searched (Hz, at most fs/2).

Returns:

the symbol rate (Hz).

Return type:

float

Raises:

ValueError – for an invalid parameter or input (the message names it).

Examples

>>> import comnum, numpy as np
>>> n = np.arange(4096)
>>> x = np.sqrt(1 + 0.3 * np.cos(np.pi * n / 4)).astype(complex)
>>> round(comnum.estimate_symbol_rate(x, 1.0, 0.05, 0.2), 6)
0.125