Post Go back to editing

# Calculate RX gain on ADRV9009

Hello all!

How to calculate total gain of RX path in ADRV9009, convert data from gain table to dB?

For example, gain table for RX:

```taliseRxGainTable_t rxGainTable [61] =
{
{0, 0, 0, 14, 0},     /* Gain index 255 */
{14, 0, 0, 14, 0},    /* Gain index 254 */
{27, 0, 0, 15, 0},    /* Gain index 253 */
{41, 0, 0, 14, 0},    /* Gain index 252 */
{53, 0, 0, 13, 0},    /* Gain index 251 */
{67, 0, 0, 14, 0},    /* Gain index 250 */
{78, 0, 0, 15, 0},    /* Gain index 249 */
{88, 0, 0, 14, 0},    /* Gain index 248 */
{100, 0, 0, 14, 0},   /* Gain index 247 */
{109, 0, 0, 14, 0},   /* Gain index 246 */
{118, 0, 0, 14, 0},   /* Gain index 245 */
...
}```

How to convert each value to attenuation and gain, respectively?

Columns in table:

1. Front-End Attenuator bits. Attenuation value `A1(g1) = 20 * Log[(256 - g1) / 256]`, `g1` — value from column 1 (0, 14, 27, 41, ...) Well, it's known.
2. External Gain Control Bits. Attenuation value `A2(g2) = 0` for each `g2` in this table. OK.
3. TIA/AGC Gain. How to convert to attenuation/gain in dB? Attenuation value `A3(g3)` = ?
4. Digital Gain / Attenuation Bits. How to convert to attenuation/gain in dB? Attenuation value `A4(g4)` = ?

So, the total attenuation is A = A1 + A2 + A3 + A4. And total gain G is?

Simpler question, why at 255 gain index total rx gain is 18 dB?

• Simpler question, why at 255 gain index total rx gain is 18 dB?

The max gain available from chip is 18 dB. The gain control is basically attenuation.

So for gain index 255 we have 0 attenuation and max gain of  ~18 dB.

So with each gain index change, the gain coms down by 0.5 dB approx,

So attenuation will be as per below equation for Front-End Attenuator Bits[7:0] + .05 x the value in field Signed Digital Gain/Attenuation Bits[10:0]

• Cite from Hardware Manual:

The signed digital gain/attenuation is used to digitally apply gain or attenuation. The range of the digital gain is 0 dB to 41.9 dB, and the range of the digital attenuation is 0 dB to 18.05 dB.

However, plot Gain(Attenuation) from datasheet says that maximum gain is 18 dB. Why?

Are the names of the axes mixed up here?

• The signed digital gain/attenuation is used to digitally apply gain or attenuation. The range of the digital gain is 0 dB to 41.9 dB, and the range of the digital attenuation is 0 dB to 18.05 dB.

This digital gain control is used only when gain compensation is enabled.

Please refer to the section "GAIN COMPENSATION, FLOATING POINT FORMATTER, AND SLICER" page number 149 of user guide document UG-1295.

Mode 1—No Digital Gain Compensation
The device is configured to this mode by default. In this Mode 1, the digital gain block is not used for gain compensation. Instead, the digital gain block can be utilized to apply small amounts of digital gain/attenuation to provide consistent gain steps in a gain table. The premise is that because the analog attenuator does not have consistent stops in dB terms across its range, the digital gain block can be utilized to even out the steps for consistency (the default table utilizes the digital gain block to provide consistent 0.5 dB steps).

The plot in figure 105, shows the Gain versus attenuation settings used excluding the digital gain.

The actual gain range available for user application is 30 dB out of which 18 dB is Gain and remaining values are attenuation. The plot in figure 105, illustrates the same.

Please refer to the gain range mentioned in datasheet.

• Hi， .

The actual gain range available for user application is 30 dB out of which 18 dB is Gain and remaining values are attenuation.

So in mode 1,for the default gain table,the actual gain is:

//****************************************

18 dB ,     /* Gain index 255 */

18 dB - 0.5 dB ,     /* Gain index 254 */

18 dB - 1 dB ,     /* Gain index 253 */

.....

18 dB - 30 dB ,     /* Gain index 195*/

//****************************************

Am I right?

• Yes correct

Depending on the LO frequency, the maximum gain corresponding to maximum gain index of 255 will vary.

Gain index    Gain dB

255                18

253                 17

219                0

217                -1

195                -12

1.

Depending on the LO frequency, the maximum gain corresponding to maximum gain index of 255 will vary.

Where to find the right gain for a particular LO frequency?

2.Can I modify the agc gain mode to get gain greater than 18 dB?

• Refer to the datasheet plots for this graph of receiver gain vs attenuation at low, mid and high frequency. Select the graph corresponding to an LO frequency that is closest to your LO frequency of operation.

Can I modify the agc gain mode to get gain greater than 18 dB?

No, you cannot exceed the datasheet value of maximum gain corresponding to maximum gain index of 255 or 0dB attenuation.

• Hi, ,thank you for your reply.

you cannot exceed the datasheet value of maximum gain corresponding to maximum gain index of 255 or 0dB attenuation.

So the gain table is typically an attenuation table ?

And the 18dB gain is always there ,just we adjust the attenuation value to change the final gain value?

I read from the page 126 of UG 1295 :

How to explain I quote "The range of the digital gain is 0 dB to 41.9 dB" ?

• So the gain table is typically an attenuation table ?

And the 18dB gain is always there ,just we adjust the attenuation value to change the final gain value?

No, the gains of the individual components in the RX datapath changes with change in gain index. 18dB gain value corresponding to maximum gain index of 255 and the gain value decreases by 1dB if the gain index decreases by 2.

How to explain I quote "The range of the digital gain is 0 dB to 41.9 dB" ?

This 41.9dB gain corresponds to the digital gain that is used for compensating the analog front end attenuation(internal analog attenuator and any external gain component)

From UG:

The user has the option to enable gain compensation. In gain compensation mode, the digital gain block compensates for the analog front-end attenuation. The cumulative gain across the device is 0 dB, for example, if 5 dB of analog attenuation is applied at the front end of the device, 5 dB of digital gain is applied.

Gain compensation can be used in AGC or MGC mode. The maximum amount of gain compensation is 41.95 dB, which allows compensation of the internal analog attenuator and any external gain component (for example, a digital step attenuator (DSA) or low noise amplifier (LNA)). Considering an ADC with a 16-bit output, large amounts of digital gain increase the bit width of the path. Figure 91 shows a block diagram of the gain compensation portion of the receiver chain and shows the locations of the various blocks.

• Hi, . Thanks for your reply. I have some more confuse.

No, the gains of the individual components in the RX datapath changes with change in gain index. 18dB gain value corresponding to maximum gain index of 255 and the gain value decreases by 1dB if the gain index decreases by 2.

rxGainTable structure:

The front-end attenuator equation:

From the ug1295 .I can calculate the gain value of every gain index in the rxGainTable.

the gain index 255 correspond to 0.7dB

the gain index 254 correspond to 0.7dB - 0.48dB

the gain index 253 correspond to 0.75dB - 0.968dB

the gain index 252 correspond to 0.7dB - 1.516dB

the gain index 251 correspond to 0.7dB - 2.0149dB

....

the gain index 195 correspond to 24*0.05dB - 31.263dB =  -30.063dB,

There isn't 18 dB and the gain become attenuation from gain index 253.

Am I wrong?