torchsig.transforms.functional.agc

torchsig.transforms.functional.agc(data: ndarray, initial_gain_db: float, alpha_smooth: float, alpha_track: float, alpha_overflow: float, alpha_acquire: float, ref_level_db: float, track_range_db: float, low_level_db: float, high_level_db: float) ndarray[source]

Automatic Gain Control algorithm (deterministic).

Parameters:
  • data (np.ndarray) – IQ data samples.

  • initial_gain_db (float) – Inital gain value in dB.

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

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

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

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

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

  • track_range_db (float) – dB range for operating in tracking state.

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

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

Returns:

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

Return type:

np.ndarray