TVRX gain troubles

Hi-

I’m having trouble with the gain control on a TVRX (actually, on a
whole bunch of TVRX’s). There are two problems:

  1. The effect of the gain setting is far from linear. I measured this
    with the attached program, at 1 dB increments of requested gain, with
    antennas (with LNAs) attached to both channels. (I’m not completely
    sure I have the full scale right, but that’s just an offset.) I get
    essentially identical results using usrp_rx_cfile.py and a little
    Python script to do the same calculation (also attached).

  2. The system acts like there’s some kind of automatic gain control.
    My setup is an antenna (with built-in LNA), connected through a
    combiner, to the USRP. On the other input to the combiner is a signal
    generator. The entire setup is duplicated on sides A and B. I did
    two runs. First, I had the signal generator on and the antenna
    connected. Then I replaced the antenna with a terminator and left the
    signal generator on. (The USRP was tuned to 106MHz and the signal was
    a sine wave at 106.25MHz.) The power I see in MATLAB at 0.25MHz from
    center is dramatically (12 dB) less with the antenna connected.

Any ideas what’s going on?

This occurs with gnuradio trunk r10579. I’m updating now and will try
again with a newer trunk shortly.

Thanks,
Andy

Andrew L. wrote:

Python script to do the same calculation (also attached).
The gain vs. gain setting is always going to be somewhat nonlinear, as
you have seen. There are 3 stages of gain control – RF, IF, and PGA.
The only one you can expect to be perfectly linear is the PGA (the last
20 dB).

The reason you see the first two plateaus in the gain curve is that at
the high end of the range of each of those gain settings, the gain amps
become nonlinear is twofold –

First, the gain range becomes more nonlinear near the top of each
variable gain amp. You could compensate for this in the gain setting
function in the daughterboard code if you like, by reducing the amount
of gain we try to get from each stage.

Second, if your signal is strong enough, it will cause saturation in the
frontend.

The formula we use in the daughterboard code for the TVRX is by no means
optimal. What it does is first add gain to the RF, until that is maxed
out. Once that happens, it adds gain to the IF. Once that is maxed
out, it puts the remaining gain in the PGA.

Every application will have different requirements. For example, if
there is a strong inband interferer, you will need to reduce the gain.
You might also want to distribute the gain differently, instead of
putting it all up front.

  1. The system acts like there’s some kind of automatic gain control.
    My setup is an antenna (with built-in LNA), connected through a
    combiner, to the USRP. On the other input to the combiner is a signal
    generator. The entire setup is duplicated on sides A and B. I did
    two runs. First, I had the signal generator on and the antenna
    connected. Then I replaced the antenna with a terminator and left the
    signal generator on. (The USRP was tuned to 106MHz and the signal was
    a sine wave at 106.25MHz.) The power I see in MATLAB at 0.25MHz from
    center is dramatically (12 dB) less with the antenna connected.

Discuss-gnuradio Info Page

There is nothing automatic unless you implement it. What you are seeing
is compression of your signal from strong nearby stations when you
attach the antenna. Since you are in the FM band, it is likely that one
or more very strong stations are nearby.

Matt