torchsig.transforms.functional.digital_agc

torchsig.transforms.functional.digital_agc(data: ndarray, initial_gain_db: float = 0.0, alpha_smooth: float = 0.0001, alpha_track: float = 0.001, alpha_overflow: float = 0.1, alpha_acquire: float = 0.001, ref_level_db: float = 0.0, track_range_db: float = 1.0, low_level_db: float = -80, high_level_db: float = 10) ndarray[source]

Automatic Gain Control algorithm (deterministic).

Parameters:
  • data – IQ data samples.

  • initial_gain_db – Inital gain value in dB.

  • alpha_smooth – Alpha for avergaing the measure signal level level_n = level_n * alpha + level_n-1(1-alpha)

  • alpha_track – Amount to adjust gain when in tracking state.

  • alpha_overflow – Amount to adjust gain when in overflow state [level_db + gain_db] >= max_level.

  • alpha_acquire – Amount to adjust gain when in acquire state.

  • ref_level_db – Reference level goal for algorithm to achieve, in dB units.

  • track_range_db – dB range for operating in tracking state.

  • low_level_db – minimum magnitude value (dB) to perform any gain control adjustment.

  • high_level_db – magnitude value (dB) to enter overflow state.

Returns:

IQ data adjusted sample-by-sample by the AGC algorithm.