Also known as: automatic gain control, AGC
Automatic gain control (AGC) is a feedback loop that adjusts amplification to keep a signal at a usable level — high enough above the noise floor to resolve fine detail, but below the ADC’s clipping ceiling (0 dBFS).1 It measures the output level, compares it against a target, and drives a variable-gain stage in the opposite direction, so a signal that fades or surges by tens of decibels still arrives at the detector within a narrow window.
How it works
An AGC loop has three parts: a level detector (often an envelope or RMS estimate of the signal), a comparison against a reference set-point, and a variable-gain element whose gain is driven by the error. Because it is a closed loop, its behaviour is governed by two time constants:
- Attack time — how fast the loop reduces gain when the signal suddenly grows. Fast attack protects against clipping on a strong burst but can clamp the leading edge of a transmission.
- Decay (release) time — how fast the loop restores gain in a quiet interval. Slow decay is smoother; fast decay recovers quickly but can “pump,” audibly or numerically ramping the noise up between symbols.
If the loop responds faster than the modulation itself, it will fight the signal it is trying to preserve — flattening the amplitude variations of an AM or QAM waveform, or modulating the noise floor of a bursty digital channel. This is why AGC is tuned to be slow relative to the symbol rate but fast relative to fading.
Variants
- Hardware AGC lives in the tuner or IF chain (e.g. the LNA and mixer gain stages of an RTL-SDR or Airspy), adjusting analog gain before the ADC so the converter’s dynamic range is used well.
- Software (digital) AGC operates after digitisation, scaling the IQ stream in the DSP chain. It cannot recover headroom already lost to ADC clipping, but it is precise and repeatable.
- Feed-forward vs feedback — most AGCs are feedback loops; feed-forward designs measure the input and pre-scale it, trading loop stability for speed.
In practice
For monitoring a fixed trunking system, a well-chosen manual gain usually beats AGC. AGC optimises for an average level, but a decoder wants a consistent level and clean headroom for the strongest expected signal. Automatic loops tend to raise gain during silence — lifting the noise floor and inviting intermodulation from strong nearby signals — then clamp hard on a local transmission, producing the “pumping” that disrupts symbol slicing. The practical routine is to set gain so the loudest signal peaks a few dB below 0 dBFS and leave it there. AGC is distinct from squelch (which mutes weak audio) and a noise blanker (which removes impulse spikes); all three manage level, but only AGC changes amplification.
Relevance to SDR
Setting gain correctly is the single setting beginners most often get wrong: too little buries weak signals in quantisation noise, too much overloads the front end and manufactures spurs. GopherTrunk normalises channel amplitude in its DSP chain so the symbol slicer sees a stable level regardless of the captured signal strength, which is a form of software AGC applied per channel rather than across the whole captured band. See the gain lesson for a practical routine.
Sources
-
Automatic gain control — Wikipedia, on closed-loop gain adjustment, attack/decay, and headroom. ↩