AGC and rtl-sdr dongles

Main forum to discuss RTL-SDR related topics.
Post Reply
Posts: 1
Joined: Wed Jul 11, 2018 11:55 pm

AGC and rtl-sdr dongles

Post by mesocyclone » Thu Jul 12, 2018 12:04 am

First, my questions, then the background.

  • what is the problem with hardware AGC?
  • why isn't software AGC used?
  • Does changing the gain cause a disruption, or can the gain be changed at any time in the C++ libraries?
Why I am asking...

I am interested in making an aviation receiver for a single frequency. The software I have looked at does not implement any AGC function (rtlsdr_airband and rtl_fm). ...airband has AVC (AGC on the audio) but does not adjust RF gain. Also, neither turns on the tuner AGC.

So, what is one to do? The dynamic range of the dongle is not as good as it needs to be without AGC. In my application, I would rather have intermod and blocking than no AGC, but the signal of interest may range from very weak to very strong.

My testing shows that at high gain, strong signals become unintelligible - no doubt due to clipping either in the analog circuitry, or exceeding the ADC range. At low gain, of course, weak signals disappear.

Thanks in advance.

Site Admin
Posts: 1953
Joined: Mon Nov 19, 2012 11:54 pm

Re: AGC and rtl-sdr dongles

Post by rtlsdrblog » Fri Jul 13, 2018 12:24 am

The AGC on RTL-SDR dongles was designed for DVB-T TV signals, which are wideband. So it doesn't tend to work well for the more narrowband signals that most SDR users are interested in.

If you have narrowband signal that you're focusing on, you could try to implement your own AGC in software. Not sure what you mean by disruption, but you can change the gain at anytime without restarting the dongle.

Posts: 1
Joined: Sun Sep 23, 2018 7:00 pm

Re: AGC and rtl-sdr dongles

Post by wittrup » Sun Sep 23, 2018 7:56 pm

mesocyclone wrote:
Thu Jul 12, 2018 12:04 am

  • Does changing the gain cause a disruption, or can the gain be changed at any time in the C++ libraries?
I am interested in making an aviation receiver for a single frequency.
This subject is discussed much at - particular at the Gain Adjustment thread. The problem summed up here: Interesting AGC results

I cannot find any direct reference/source for this claim, but as I recall, the short answer to your question is, yes, changing the gain cause a disruption, and no the gain cannot be changed at any time in the C++ libraries.

If i remember correctly it takes about 500 ms (half a second) disruption to restart librtlsdr for changing the gain. I cannot find this in my archive, but I did some tests with running

Code: Select all

rtl_sdr -f <frequency> -s <sample rate> -g <gain> output.bin
to a named pipe and then reading from that. But I didn't gain any reduced disruption/restart time from that (pun intended). You are of course most welcome to prove me wrong, and perhaps re-write librtlsdr so it is possible to change gain at any time - I'd even donate some for that feature ;)

Posts: 128
Joined: Tue Dec 27, 2016 11:00 pm

Re: AGC and rtl-sdr dongles

Post by snn47 » Wed Oct 03, 2018 5:33 am

Receiver designs may or may not employ AGC, since as said before the dongles are designed with a specific task (DVB-T) in mind, when all DVB-T signals are strong, not changing in strength and therefore you don't need to receive weak signals in presence of much stronger signals.
Lack of a large dynamic range, high IP and especially complete absence of receiver RF selectivity is your problem. Since you are interested in a single frequency ad a good bandpath filter and this should improve performance considerably.

PS.: Aviation has different requirements and therefore dedicated receiver designs that match the requirements defined by ICAO in ANNEX 10 and related documents for a system. Bandwidth varyies from a few kHz for NDB or 8.33 kHz VHF-COM to many MHz. Dynamic range and required sensitivity under all operational waether conditions are two more factors in receiver design.

Aircraft and/or ground equipment are sepearted from just a few 10 meter, e.g. when waiting in line to more than 100 NM, which requires a large dynamic range. To give you an idea about dynamic range 960 to 1215 MHz receiver withstand up to about +20 dBm (EIRP in excess of 60 dBm), operational sesnsitivity starting at about -20 dBm and dynamic range of 60 dB or more. AGC imho, unless designed into a receiver as passive attenuator. e.g. pin diode attenuator, means that a receiver performance will degrade except for very few good receiver designs.

Post Reply