usrp-users@lists.ettus.com

Discussion and technical support related to USRP, UHD, RFNoC

View all threads

Re: [USRP-users] How exactly is "Receiver Gain" defined?

LH
Lukas Haase
Mon, Nov 9, 2020 10:29 PM

Hi Marcus,

From: "Marcus D. Leech" patchvonbraun@gmail.com
On 11/05/2020 06:42 PM, Lukas Haase via USRP-users wrote:

Hi,

I m studying:

https://files.ettus.com/performance_data/ubx/UBX-without-UHD-corrections.pdf

How exactly is "Gain" in the "RX Figures" defined? Can it be related to the digital samples (e.g. in dBFS or RMS)?

If, for example, I apply a exactly Pin=-20dBm, f=916MHz CW (calibrated via VNA) at the SMA input, I get -14.05dBFS (=rms value of IQ samples in 20*log10) when I calculate the RMS values of the samples.

(Note: set_rx_gain(0) and I use 516MHz as center frequency to avoid DC correction).

Also, the statement on the gain values is not quite clear: "Gain range for both RX and TX is 0-31.5 (the maximum RX gain seen in the tests of 37.5dB is due to the additional 6dB provided by the ADC in the USRP motherboard on top of the UBX's maximum gain".

How does this relate to the value which is set with set_rx_gain()?
Does that mean that a "Gain" value of 10 dB on the plot corresponds to set_rx_gain(4) ?

What confuses me is that I can call set_rx_gain() with values of 0...37.5, and the output scales accordingly (i.e., the lowest value seems to be 0 and the highest 37.5; not 31.5).

Would be great if someone could confirm.

Thanks,
Luke

The precise implications of the gain-setting function are highly
dependent on the particular daughterboard architecture.  When you set
the gain, you're typically (certainly true on UBX) setting a step
attenuator, which is usually sandwiched between a pair of low-noise
amplifiers, then a mixer, which may have either gain or loss of a few dB.

The only way you can relate the dB values in your FFT display to
power-as-seen-at-the-RF-connector is using an external calibration source,
and you'll have to do this exercise over your entire expected
operating-parameter space.  RF analog components will NOT provide exacty
the same gain/loss levels across their entire operating range.

Yes, I am aware of that but my question related specifically to https://files.ettus.com/performance_data/ubx/UBX-without-UHD-corrections.pdf because I want to sanity-check my measurements (and I want to know how much off I am compared to the figures).

Hence my question is how the "Gain" in the "RX Figure" in this document is defined. It's not written anywhere.

The additional gain-range setting is due to the presence of a baseband
VGA on some motherboards ahead of the ADCs.  UHD will distribute
gain settings over the available gain-setting elements (in both the
daughtercards and motherboard).  By default, it will distribute gain to
favor noise figure over linearity.  You can set individual gain
elements if you prefer:

https://files.ettus.com/manual/classuhd_1_1usrp_1_1multi__usrp.html#ad602e7681b796deddd9231f022ffef11

Now the names for the various gain elements will differ depending on the
motherboard and daughterboard in use, and they can be
shown using "uhd_usrp_probe".

Thank you, that I did not know.

For me the result is:

TX Frontend 0, RX Frontend 0: Gain range PGA0: 0.0 to 31.5 step 0.5 dB
RX Codec A, RX Codec B: Gain range digital: 0.0 to 6.0 step 0.5 dB
TX Codec A, TX Codec B: None

Is the "RX Codec" the "VGA on some motherboards ahead of the ADCs" you were referring to above?

A related question (of course, I studied the the schematic https://files.ettus.com/schematics/ubx/UBX-160_revE.pdf as well): For both TX and RX path the only programmable element are attenuators (HMC624LP4E, 6-bit).

That would fit nicely the "PGA0" from above: 0 to 31.5dB in 0.5dB steps are 64 steps (6 bit).

The other gain elements (TX: NBB-400, PHA-1+, RX: MGA-62563, NBB-400 are static).

Why would you painstakingly gain up a signal, just to attenuate it again? Why a programmable attenuator instead of a real programmable amplifier?
For the TX path I can somewhat see for simplicity ... but for RX path? The attenuator unnecessarily generates noise (the noise figure of a passive attenuator is identical to its attenuation).

Thanks,
Lukas

Hi Marcus, > From: "Marcus D. Leech" <patchvonbraun@gmail.com> > On 11/05/2020 06:42 PM, Lukas Haase via USRP-users wrote: > > Hi, > > > > I m studying: > > > > https://files.ettus.com/performance_data/ubx/UBX-without-UHD-corrections.pdf > > > > How exactly is "Gain" in the "RX Figures" defined? Can it be related to the digital samples (e.g. in dBFS or RMS)? > > > > If, for example, I apply a exactly Pin=-20dBm, f=916MHz CW (calibrated via VNA) at the SMA input, I get -14.05dBFS (=rms value of IQ samples in 20*log10) when I calculate the RMS values of the samples. > > > > (Note: set_rx_gain(0) and I use 516MHz as center frequency to avoid DC correction). > > > > > > Also, the statement on the gain values is not quite clear: "Gain range for both RX and TX is 0-31.5 (the maximum RX gain seen in the tests of 37.5dB is due to the additional 6dB provided by the ADC in the USRP motherboard on top of the UBX's maximum gain". > > > > How does this relate to the value which is set with set_rx_gain()? > > Does that mean that a "Gain" value of 10 dB on the plot corresponds to set_rx_gain(4) ? > > > > What confuses me is that I *can* call set_rx_gain() with values of 0...37.5, and the output scales accordingly (i.e., the lowest value seems to be 0 and the highest 37.5; not 31.5). > > > > > > Would be great if someone could confirm. > > > > Thanks, > > Luke > > > The precise implications of the gain-setting function are highly > dependent on the particular daughterboard architecture. When you set > the gain, you're typically (certainly true on UBX) setting a step > attenuator, which is usually sandwiched between a pair of low-noise > amplifiers, then a mixer, which may have either gain or loss of a few dB. > > The only way you can relate the dB values in your FFT display to > power-as-seen-at-the-RF-connector is using an external calibration source, > and you'll have to do this exercise over your entire expected > operating-parameter space. RF analog components will NOT provide exacty > the same gain/loss levels across their entire operating range. Yes, I am aware of that but my question related specifically to https://files.ettus.com/performance_data/ubx/UBX-without-UHD-corrections.pdf because I want to sanity-check my measurements (and I want to know how much off I am compared to the figures). Hence my question is how the "Gain" in the "RX Figure" in this document is defined. It's not written anywhere. > The additional gain-range setting is due to the presence of a *baseband* > VGA on some motherboards ahead of the ADCs. UHD will distribute > gain settings over the available gain-setting elements (in both the > daughtercards and motherboard). By default, it will distribute gain to > favor noise figure over linearity. You can set individual gain > elements if you prefer: > > https://files.ettus.com/manual/classuhd_1_1usrp_1_1multi__usrp.html#ad602e7681b796deddd9231f022ffef11 > > > Now the names for the various gain elements will differ depending on the > motherboard and daughterboard in use, and they can be > shown using "uhd_usrp_probe". Thank you, that I did not know. For me the result is: TX Frontend 0, RX Frontend 0: Gain range PGA0: 0.0 to 31.5 step 0.5 dB RX Codec A, RX Codec B: Gain range digital: 0.0 to 6.0 step 0.5 dB TX Codec A, TX Codec B: None Is the "RX Codec" the "VGA on some motherboards ahead of the ADCs" you were referring to above? A related question (of course, I studied the the schematic https://files.ettus.com/schematics/ubx/UBX-160_revE.pdf as well): For both TX and RX path the only programmable element are attenuators (HMC624LP4E, 6-bit). That would fit nicely the "PGA0" from above: 0 to 31.5dB in 0.5dB steps are 64 steps (6 bit). The other gain elements (TX: NBB-400, PHA-1+, RX: MGA-62563, NBB-400 are static). Why would you painstakingly gain up a signal, just to attenuate it again? Why a programmable attenuator instead of a real programmable amplifier? For the TX path I can somewhat see for simplicity ... but for RX path? The attenuator unnecessarily generates noise (the noise figure of a passive attenuator is identical to its attenuation). Thanks, Lukas
MD
Marcus D. Leech
Mon, Nov 9, 2020 10:57 PM

On 11/09/2020 05:29 PM, Lukas Haase via USRP-users wrote:

Yes, I am aware of that but my question related specifically to
https://files.ettus.com/performance_data/ubx/UBX-without-UHD-corrections.pdf
because I want to sanity-check my measurements (and I want to know how
much off I am compared to the figures). Hence my question is how the
"Gain" in the "RX Figure" in this document is defined. It's not
written anywhere.

I think a more general version of what you're asking is "what was the
exact test setup, and what software was used to
derive these values?".  THAT I cannot answer, and it's likely that
whoever did that performance data is no longer
an Ettus employee.  But the "gain" listed is just the gain setting,
which does not directly give you the total gain
between the antenna and ADC input.

Thank you, that I did not know.

For me the result is:

TX Frontend 0, RX Frontend 0: Gain range PGA0: 0.0 to 31.5 step 0.5 dB
RX Codec A, RX Codec B: Gain range digital: 0.0 to 6.0 step 0.5 dB
TX Codec A, TX Codec B: None

Is the "RX Codec" the "VGA on some motherboards ahead of the ADCs" you were referring to above?

The word 'codec' is often used in the Ettus world to refer to ADCs and
DACs.  The associated gain element is the
ADC digital gain setting.

A related question (of course, I studied the the schematic https://files.ettus.com/schematics/ubx/UBX-160_revE.pdf as well): For both TX and RX path the only programmable element are attenuators (HMC624LP4E, 6-bit).

That would fit nicely the "PGA0" from above: 0 to 31.5dB in 0.5dB steps are 64 steps (6 bit).

The other gain elements (TX: NBB-400, PHA-1+, RX: MGA-62563, NBB-400 are static).

Why would you painstakingly gain up a signal, just to attenuate it again? Why a programmable attenuator instead of a real programmable amplifier?

In the RF world, 99% of "programmable gain amplifiers" are actually just
RF amplifiers with attenuators on one side of
the signal or the other.

You CAN change the gain of an RF amplifier a bit by playing with bias
settings, but when you do that other important
properties of an RF amplifier will change, usually negatively.

So, in an RF-gain "line-up" that strives to offer decent noise figure at
the same time as having variable gain, it is typically
the case that an attenuator is sandwiched between a pair of low-noise
amplifiers.  The equivalent noise figure of the
attenuator is notionally "washed out" by the presence of the LNA in
front of it.  This is not a particularly weird or
radical arrangement and is generally considered sound RF
engineering.  So, it's all about preserving noise figure while
still allowing variable gain at least at modest attenuation
settings.  At higher settings it's likely that you're attenuating because
the input signal is "loud" enough that noise figure is less important.

On 11/09/2020 05:29 PM, Lukas Haase via USRP-users wrote: > Yes, I am aware of that but my question related specifically to > https://files.ettus.com/performance_data/ubx/UBX-without-UHD-corrections.pdf > because I want to sanity-check my measurements (and I want to know how > much off I am compared to the figures). Hence my question is how the > "Gain" in the "RX Figure" in this document is defined. It's not > written anywhere. I think a more general version of what you're asking is "what was the exact test setup, and what software was used to derive these values?". THAT I cannot answer, and it's likely that whoever did that performance data is no longer an Ettus employee. But the "gain" listed is just the gain *setting*, which does not directly give you the total gain between the antenna and ADC input. > Thank you, that I did not know. > > For me the result is: > > TX Frontend 0, RX Frontend 0: Gain range PGA0: 0.0 to 31.5 step 0.5 dB > RX Codec A, RX Codec B: Gain range digital: 0.0 to 6.0 step 0.5 dB > TX Codec A, TX Codec B: None > > Is the "RX Codec" the "VGA on some motherboards ahead of the ADCs" you were referring to above? The word 'codec' is often used in the Ettus world to refer to ADCs and DACs. The associated gain element is the ADC digital gain setting. > > > A related question (of course, I studied the the schematic https://files.ettus.com/schematics/ubx/UBX-160_revE.pdf as well): For both TX and RX path the only programmable element are attenuators (HMC624LP4E, 6-bit). > > That would fit nicely the "PGA0" from above: 0 to 31.5dB in 0.5dB steps are 64 steps (6 bit). > > The other gain elements (TX: NBB-400, PHA-1+, RX: MGA-62563, NBB-400 are static). > > Why would you painstakingly gain up a signal, just to attenuate it again? Why a programmable attenuator instead of a real programmable amplifier? In the RF world, 99% of "programmable gain amplifiers" are actually just RF amplifiers with attenuators on one side of the signal or the other. You *CAN* change the gain of an RF amplifier a bit by playing with bias settings, but when you do that *other* important properties of an RF amplifier will change, usually negatively. So, in an RF-gain "line-up" that strives to offer decent noise figure at the same time as having variable gain, it is typically the case that an attenuator is sandwiched between a pair of low-noise amplifiers. The equivalent noise figure of the attenuator is notionally "washed out" by the presence of the LNA in front of it. This is not a particularly weird or radical arrangement and is generally considered sound RF engineering. So, it's all about preserving noise figure while still allowing variable gain at least at modest attenuation settings. At higher settings it's likely that you're attenuating because the input signal is "loud" enough that noise figure is less important.