SBAA401A July   2019  – January 2024 TLV320ADC3140 , TLV320ADC5140 , TLV320ADC6140

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Introduction
  5. 2Automatic Gain Control
    1. 2.1 High Pass Filter
    2. 2.2 AGC Parameters
  6. 3Examples
  7. 4References
  8. 5Revision History

AGC Parameters

Table 2-3 shows the parameters of the AGC algorithm. The first two parameters (AGC Target Level and Maximum Gain) are controlled by writing to the device registers. The other parameters reside in the 32-bit wide coefficient memory (Book 0, Page 5, Page 6, and Page 7) of the device.

Table 2-3 List of AGC Parameters
AGC PARAMETERFunction/Description
AGC Target Level (dB)The AGC target level represents the nominal level at which the AGC attempts to maintain its output signal.
Maximum Gain (dB)Upper limit of gain in dB applied by the AGC for signals below target level.
Noise Threshold (dB)The threshold level the AGC utilizes to distinguish noise from weak signals. Signals lower than this threshold are classified as noise and not amplified by the AGC.
Release Time Constant (seconds)How fast the AGC circuitry responds with a PGA gain increase when the input signal falls below the target level.
Attack Time Constant (seconds)How fast the AGC circuitry responds with a PGA gain decrease when input signal rises above the target level.
Release Hysteresis (dB)Amount of signal level decrease in dB past the Target Level that forces the AGC to increase gain and start a release.
Attack Hysteresis (dB)Amount of signal level increase in dB past the Target Level that forces the AGC to decrease gain and start an attack.
Noise Hysteresis (dB)Amount of signal level change past the Noise Threshold that causes the AGC to decide between noise or signal.
Release Debounce (samples)The number of consecutive input samples that falls below Target Level after an attack event before the AGC starts releasing and increasing PGA gain.
Attack Debounce (samples)The number of consecutive input samples that rises above Target Level after a release event before the AGC starts attacking and decreasing PGA gain.
Noise Debounce (samples)The number of consecutive samples for the input to fall below Noise Threshold for the signal to be considered as noise.

AGC Target Level: The AGC target level represents the nominal level at which the AGC attempts to maintain the output signal. The target level is expressed relative to full scale (dBFS) of the ADC output. Table 2-4 lists the AGC Target Level configuration settings. The default is -34 dB. Setting a high target level increases the converted output level. However, large target level settings can lead to clipping the input signal with a sudden increase in the signal level. Therefore, set the target level with enough margin so as to prevent clipping when loud sounds occur.

Table 2-4 AGC Target Level Programmable Settings
P0_R112_D[7:4] : AGC_LVL[3:0]AGC TARGET LEVEL FOR OUTPUT
0000The AGC target level is the –6 dB output signal level
0001The AGC target level is the –8 dB output signal level
0010The AGC target level is the –10 dB output signal level
1110 (default)The AGC target level is the –34 dB output signal level
1111The AGC target level is the –36 dB output signal level

Maximum Gain: The maximum gain represents the upper limit of gain applied by the AGC for signals below the target level. Table 2-5 lists the Maximum Gain configuration settings. The default value is 24 dB. It can be programmed from 3 dB to 42 dB with steps of 3 dB.

Table 2-5 AGC Maximum Gain Programmable Settings
P0_R112_D[3:0] : AGC_MAXGAIN[3:0]AGC MAXIMUM GAIN ALLOWED
0000The AGC maximum gain allowed is 3 dB
0001The AGC maximum gain allowed is 6 dB
0010The AGC maximum gain allowed is 9 dB
0111 (default)The AGC maximum gain allowed is 24 dB
1110The AGC maximum gain allowed is 39 dB
1111The AGC maximum gain allowed is 42 dB

Noise Threshold: The threshold level used by the AGC to distinguish noise from weak signals. Signals lower than this threshold are classified as noise and not amplified by the AGC. Noise Threshold is set by writing to the AGC_NOISE coefficient. Equation 5 shows the computation of the AGC_NOISE parameter.

Equation 5. GUID-524BF47A-2336-401F-A8F3-4005B44BB40D-low.gif

where

  • NT is the Noise Threshold in dB

The default value (0xFFFFA600) corresponds to -90 dB. Table 2-6 shows the registers that control the AGC_NOISE parameter.

Table 2-6 Programmable Coefficient Registers for Noise Threshold
COEFFICIENT PAGE REGISTER RESET VALUE DESCRIPTION
AGC_NOISE0x060x200xFFAGC_NOISE Byte[31:24]
0x060x210xFFAGC_NOISE Byte[23:16]
0x060x220xA6AGC_NOISE Byte[15:8]
0x060x230x00AGC_NOISE Byte[7:0]\

Release Time Constant: How fast the AGC circuitry responds with a PGA gain increase when the input signal falls below the target level. The Release Time Constant is controlled by two coefficients: AGC_REL_ALPHA and AGC_REL_BETA. Equation 6 and Equation 7 show how to compute the AGC_REL_ALPHA and AGC_REL_BETA parameters from the following time constant:

Equation 6. GUID-0CE2978E-CE91-4C63-A645-B2A9E8295D8B-low.gif
Equation 7. GUID-3D217004-9D14-47DB-90A3-B1B77EE22F50-low.gif

where

  • RT is the Release Time Constant in seconds

Table 2-7 shows the registers that control AGC_REL_ALPHA and AGC_REL_BETA parameters. These parameters are written in 2s-complement representation. The default values for AGC_REL_ALPHA and AGC_REL_BETA corresponds to a time constant of 20 milliseconds.

Table 2-7 Programmable Registers for Release Time Constant
COEFFICIENT PAGE REGISTER RESET VALUE DESCRIPTION
AGC_REL_ALPHA0x050x7C0x7FAGC_REL_ALPHA Byte[31:24]
0x050x7D0xB5AGC_REL_ALPHA Byte[23:16]
0x050x7E0x16AGC_REL_ALPHA Byte[15:8]
0x050x7F0x50AGC_REL_ALPHA Byte[7:0]
AGC_REL_BETA0x060x080x00AGC_REL_BETA Byte[31:24]
0x060x090x4AAGC_REL_BETA Byte[23:16]
0x060x0A0xE9AGC_REL_BETA Byte[15:8]
0x060x0B0xB0AGC_REL_BETA Byte[7:0]

Attack Time Constant: How fast the AGC circuitry responds with a PGA gain decrease when the input signal rises above the target level. Equation 8 and Equation 9 show the computation of the Attack Time Constant Parameters AGC_ATT_ALPHA and AGC_ATT_BETA.

Equation 8. GUID-7482CAC0-908C-43E3-834C-F354B3B5C356-low.gif
Equation 9. GUID-DA0BAAE9-8AB2-40AD-B00B-09798AF0CAC1-low.gif

where

  • AT is the Attack Time Constant in seconds

AGC_ATT_ALPHA and AGC_ATT_BETA parameters are each 32-bit wide, 2s-complement representations, and are controlled by registers shown in Table 2-8. The default values for AGC_ATT_ALPHA and AGC_ATT_BETA corresponds to a time constant of 0.1 milliseconds.

Table 2-8 Programmable Registers for Attack Time Constant
COEFFICIENT PAGE REGISTER RESET VALUE DESCRIPTION
AGC_ATT_ALPHA0x060x0C0x50AGC_ATT_ALPHA Byte[31:24]
0x060x0D0xFCAGC_ATT_ALPHA Byte[23:16]
0x060x0E0x64AGC_ATT_ALPHA Byte[15:8]
0x060x0F0x5CAGC_ATT_ALPHA Byte[7:0]
AGC_ATT_BETA0x060x100x2FAGC_ATT_BETA Byte[31:24]
0x060x110x03AGC_ATT_BETA Byte[23:16]
0x060x120x9BAGC_ATT_BETA Byte[15:8]
0x060x130xA4AGC_ATT_BETA Byte[7:0]

Release Hysteresis: Amount of signal level decrease past Target Level that forces the AGC to increase gain and start a release. Release Hysteresis is specified in dB. Equation 10 shows the computation of the AGC_REL_HYST parameter.

Equation 10. GUID-C2C513A2-F589-4917-AEAB-51FB7C90FE02-low.gif

where

  • RH (>= 0) is the Release Hysteresis in dB

The default value of AGC_REL_HYST is 0x00000300, which corresponds to a hysteresis of 3 dB. Table 2-9 list the registers corresponding to AGC_REL_HYST.

Table 2-9 Programmable Registers for Release Hysteresis
COEFFICIENT PAGE REGISTER RESET VALUE DESCRIPTION
AGC_REL_HYST0x060x340x00AGC_REL_HYST Byte[31:24]
0x060x350x00AGC_REL_HYST Byte[23:16]
0x060x360x03AGC_REL_HYST Byte[15:8]
0x060x370x00AGC_REL_HYST Byte[7:0]

Attack Hysteresis: Amount of signal level increase past Target Level that forces the AGC to decrease the gina and start an attack. Attack Hysteresis is specified in dB. Equation 11 shows the computation of the AGC_ATT_HYST parameter.

Equation 11. GUID-3870B7AB-8BB0-46B5-A081-954E2B587F4A-low.gif

where

  • AH (>= 0) is the Attack Hysteresis in dB

The default value of Attack Hysteresis is 1 dB. Table 2-10 shows the registers that control the AGC_ATT_HYST parameter.

Table 2-10 Programmable Coefficient Registers for Attack Hysteresis
COEFFICIENT PAGE REGISTER RESET VALUE DESCRIPTION
AGC_ATT_HYST0x060x3C0x00AGC_ATT_HYST Byte[31:24]
0x060x3D0x00AGC_ATT_HYST Byte[23:16]
0x060x3E0x01AGC_ATT_HYST Byte[15:8]
0x060x3F0x00AGC_ATT_HYST Byte[7:0]

Noise Hysteresis: (AGC_NOISE_HYST): Amount of signal level change around the Noise Threshold that causes the AGC to decide between noise and signal. A rising signal has to rise above the Noise Hysteresis level to be amplified to the Target Level. A decreasing signal has to fall below the Noise Hysteresis level to be considered as noise. Noise Hysteresis is specified in dB. Equation 12 shows the computation of the AGC_NOISE_HYST parameters.

Equation 12. GUID-9108A820-7CBB-4EFC-8197-4EE42F53B069-low.gif

where

  • NH (>= 0) is the Noise Hysteresis in dB

The default value of AGC_NOISE_HYST is 0x00000600, which corresponds to a hysteresis of 6 dB. Table 2-10 shows the registers controlling the AGC_NOISE_HYST parameter.

Table 2-11 Programmable Registers for Noise Hysteresis
COEFFICIENT PAGE REGISTER RESET VALUE DESCRIPTION
AGC_NOISE_HYST0x060x540x00AGC_NOISE_HYST Byte[31:24]
0x060x550x00AGC_NOISE_HYST Byte[23:16]
0x060x560x06AGC_NOISE_HYST Byte[15:8]
0x060x570x00AGC_NOISE_HYST Byte[7:0]

Attack Debounce: The number of consecutive input samples that rises above the target level after a release event before the AGC starts attack and decreases the PGA. Equation 13 shows the computation of the AGC_ATT_CNT parameter.

Equation 13. GUID-62C25C61-508E-49C8-B04B-79AFC8EE3841-low.gif

where

  • AD (>= 0) is specified in seconds

Table 2-12 shows the registers controlling the AGC_ATT_CNT parameter.

Table 2-12 Programmable Registers for Attack Debounce
COEFFICIENT PAGE REGISTER RESET VALUE DESCRIPTION
AGC_ATT_CNT0x060x180x00AGC_ATT_CNT Byte[31:24]
0x060x190x00AGC_ATT_CNT Byte[23:16]
0x060x1A0x02AGC_ATT_CNT Byte[15:8]
0x060x1B0x00AGC_ATT_CNT Byte[7:0]

Release Debounce: The number of consecutive input samples that falls below Target Level after an attack event before the AGC starts releasing and increasing the PGA gain. The default value of Release Debounce is 25 milliseconds at 48 kHz. Equation 14 shows the computation of the AGC_REL_CNT parameter.

Equation 14. GUID-627F08D7-2AA1-4247-A7EC-9E87A2329C41-low.gif

where

  • RD (>= 0) is the Release Debounce specified in seconds

Table 2-13 shows the registers controlling the AGC_REL_CNT parameter.

Table 2-13 Programmable Registers for Release Debounce
COEFFICIENT PAGE REGISTER RESET VALUE DESCRIPTION
AGC_REL_CNT0x060x1C0x00AGC_REL_CNT Byte[31:24]
0x060x1D0x04AGC_REL_CNT Byte[23:16]
0x060x1E0xB0AGC_REL_CNT Byte[15:8]
0x060x1F0x00AGC_REL_CNT Byte[7:0]

Noise Debounce: The number of consecutive samples for the input to fall below Noise Threshold for the signal to be considered noise. Equation 15 shows the computation of the AGC_NOISE_CNT parameter.

Equation 15. GUID-4AA20855-771F-4346-8A01-C6E420783A92-low.gif

where

  • ND (>= 0) is the Noise Debounce time specified in seconds

The default value of AGC_NOISE_CNT is 0x0004B000, which corresponds to a debounce time of 25 milliseconds at 48 kHz. Table 2-14 shows the registers controlling the AGC_NOISE_CNT parameter.

Table 2-14 Programmable Registers for Noise Debounce
COEFFICIENT PAGE REGISTER RESET VALUE DESCRIPTION
AGC_NOISE_CNT0x060x440x00AGC_NOISE_CNT Byte[31:24]
0x060x450x04AGC_NOISE_CNT Byte[23:16]
0x060x460xB0AGC_NOISE_CNT Byte[15:8]
0x060x470x00AGC_NOISE_CNT Byte[7:0]