Preliminary Technical Data UG-1828
Rev. PrC | Page 159 of 338
• Peak/Power Detect mode, where information from both the power detector and the peak detectors are used jointly to make gain
changes.
Peak Detect Mode
In this mode, the peak detectors alone are used to inform the AGC to make gain changes. This section explains the basic premise of the
operation, while more explicit details of configuring the peak detectors is covered in subsequent sections.
The APD and HB detector both have a high threshold and a low threshold, apdHighTresh, apdLowThresh, hbHighTresh and
hbUnderRangeHighThresh, respectively. These levels are user programmable, as well as the number of times a threshold must be
exceeded for an over range condition to be flagged.
The high thresholds are used as limits on the incoming signal level and will principally be set based on the maximum input of the ADC.
When an over range condition occurs, the AGC will reduce the gain (gain attack). The low thresholds are used as lower limits on signal
level. When an under range condition occurs, the AGC will increase the gain (gain recovery). The AGC stable state (where it will not
adjust gain) occurs when neither an under range nor over range condition is occurring.
Each overrange/underrange condition has its own attack and recovery gain step as shown in Table 61.
Table 61. Peak Detector Gain Steps
Over Range/Under Range Gain Step
apdHighThresh over range Reduce gain by apdGainStepAttack
apdLowThresh under range Increase gain by apdGainStepRecovery
hbHighThresh over range Reduce gain by hbGainStepAttack
hbUnderRangeHighThresh under range Increase gain by hbGainStepHighRecovery
An overrange condition occurs when the high thresholds have been exceeded a configurable number of times within a configurable
period. An underrange condition occurs when the low thresholds have not been exceeded a configurable number of times within the
same configurable period. These counters make the AGC less sensitive to occasional peaks in the input signal, ensuring that a single peak
exceeding a threshold does not necessarily cause the AGC to react. Table 62 outlines the counter parameters for the individual
overload/under range conditions.
Table 62. Peak Detector Counter Values
Over Range/Under Range Counter
apdUpperThreshPeakExceededCnt
apdLowThresh under range apdLowerThreshPeakExceededCnt
hbHighThresh over range hbUpperThreshPeakExceededCnt
hbUnderRangeHighThresh under range hbUnderRangeHighThreshExceededCnt
The AGC uses a gain update counter to time gain changes, with gain changes made when the counter expires. The counter value, and
therefore the time spacing between possible gain changes, is user programmable through the gainUpdateCounter parameter. The user
specifies the period, in AGC clock cycles, that gain changes can be made. Typically, this might be set to frame or sub-frame boundary
periods.
Once the gain update counter expires, all the peak threshold counters are reset. The gain update period is therefore a decision period. The
overload thresholds and counters are therefore set based on the number of overloads considered acceptable for the application within the
gain update period.
Figure 150 shows an example of the AGC response to a signal versus the APD or HB peak detector threshold levels. APD and HB detector
works in the same fashion in this mode. For ease of explanation, only APD is mentioned in the following discussions. The green line is
representative of the peaks of the signal. Initially the peaks of the signal are within the apdHighThresh and apdLowThresh. No gain
changes are made. An interferer suddenly appears whose peaks now exceed apdHighThresh. On the next expiry of the gain update
counter (assuming a sufficient number of peaks occurred to exceed the counter), the AGC decrements the gain index (reduces the gain)
by apdGainStepAttack. This isn’t sufficient to get the signal peaks within the threshold levels, and hence the gain is decremented once
more, with the peaks now between the two thresholds. The gain is stable in this current gain level until the interferer is removed, and the
peaks of the desired signal are now below the apdLowThresh which results in an under range condition. Hence the AGC increases gain by
the apdGainStepRecovery at the next expiry of the gain update counter, continuing to do so until the peaks of the signal are within the
two thresholds once more.