Automatic gain control adjusts a receiver's gain so the signal level entering the ADC stays in a good range when conditions change. A typical example is a WiFi monitor carried from a quiet room into a busy office: the band gets much louder, and the gain must come down. The integral part of its controller needs the protection in Integral Windup and Anti-Windup.
Why It Is Needed
- an ADC has a fixed range, for example 12 bits
- too much gain: strong signals clip, which creates false frequency content
- too little gain: weak signals sink into quantisation noise
- the right gain changes with place, time and interference
Measure, Then Adjust
Each frame:
- measure a level, often the noise floor or the average power
- compute the error,
- update the gain with a controller, usually in incremental form
- if the floor is too high, the error is negative and the gain goes down
Practical Limits
- clamp the gain to the hardware range, for example 0 to 76 dB
- slew-rate limit: at most a few dB of change per frame, because a sudden large increase can clip a strong burst that appears at the same moment, and smooth changes keep the data consistent over time
- anti-windup on the integral, because the gain often sits at a limit
- audio AGCs often react fast when the level is too high (to stop clipping) and slowly when it is too low
Two Stages For Machine Learning
- a hardware loop changes the radio gain so the ADC is well used
- a software step then shifts every frame so its noise floor sits at one fixed level (for example dB)
- the model then sees inputs with the same statistics as its training data, whatever the radio gain was
Testing Without Hardware
Unit tests on synthetic frames can check:
- the gain moves in the right direction for too much and too little noise
- the step never exceeds the slew limit, and the gain never leaves its range
- the loop converges within a set number of frames
- the loop recovers after it has been stuck at a limit