I am just understanding AGC :
As per my understanding, AGC is a digital block which controls the gain of the amplifier, placed after ADC, such that ADC doesn't clip the incoming data and maintains good SNR.
In most of the cases, I am seeing that AGC calculates the average energy of the incoming signal and then compares it with thresholds (lower and upper). If the average energy exceeds the upper threshold, amplifier's gain is reduced and if average energy is lower than lower threshold amplifier's gain is increased.
My doubt is, since the goal of AGC is to control gain of amplifier such that ADC doesn't saturate. Then why can't we consider maximum of absolute of the ADC output (calculated over a window size) and then control amplifier's gain according to that. This will reduce the hardware size being used in AGC to control the gain. Still why this method is not accepted ? Also, what challenges this method may have ?