Interesting AGC results

I’ve been tinkering with my set up (and getting ready to move it back to a Pi) but I decided to use the mutability output while I still can (OBJ, can we get this dump1080-mutability stats log as an option in the FA version?)

The thing that I noticed, with AGC enabled, my messages seem to be much ‘hotter’ and it appears, too much so.

With AGC enabled:


Statistics: Wed Oct 7 07:10:29 2015 EDT - Wed Oct 7 08:10:29 2015 EDT
Messages with signal power above -3dBFS: 21371
Total useable messages: 810231
Total ratio: 2.63764

Statistics: Wed Oct 7 09:10:29 2015 EDT - Wed Oct 7 10:10:29 2015 EDT
Messages with signal power above -3dBFS: 27586
Total useable messages: 751662
Total ratio: 3.67

Statistics: Wed Oct 7 09:10:29 2015 EDT - Wed Oct 7 10:10:29 2015 EDT
Messages with signal power above -3dBFS: 27586
Total useable messages: 751662
Total ratio: 3.67

Statistics: Wed Oct 7 10:10:29 2015 EDT - Wed Oct 7 11:10:29 2015 EDT
Messages with signal power above -3dBFS: 52122
Total useable messages: 954435
Total ratio: 5.46103

Statistics: Wed Oct 7 10:10:29 2015 EDT - Wed Oct 7 11:10:29 2015 EDT
Messages with signal power above -3dBFS: 52122
Total useable messages: 954435
Total ratio: 5.46103

Statistics: Wed Oct 7 11:10:29 2015 EDT - Wed Oct 7 12:10:29 2015 EDT
Messages with signal power above -3dBFS: 46018
Total useable messages: 889852
Total ratio: 5.17142

Statistics: Wed Oct 7 12:10:29 2015 EDT - Wed Oct 7 13:10:29 2015 EDT
Messages with signal power above -3dBFS: 52113
Total useable messages: 1039364
Total ratio: 5.01393


However, if I set gain to MAX:


Statistics: Wed Oct 7 14:13:53 2015 EDT - Wed Oct 7 15:13:53 2015 EDT
Messages with signal power above -3dBFS: 1154
Total useable messages: 759694
Total ratio: 0.151903


Am I crazy here, or is AGC actually jacking the signals up way too high? I do have an amplifier (habamp) and now the FA filter before the amp, but I figured AGC would compensate and adjust the gain as needed, not just jack it all the way up.

Thanks!

You’re not crazy.

The thing to remember here is that the dongles are really designed for DAB / DVB-T signals, which are

  • fairly constant power
  • fairly continuous

ADS-B is neither - it has very variable power level and it transmits in short bursts, not continuously.

AGCs work by measuring the signal power that they see and adjusting the gain in a feedback loop to try to make the amplified signal be the “right” strength. As far as I can tell what happens when you try to use the AGC with an ADS-B signal is that the power measurement appears very weak (for a DVB-T signal!), so the AGC rapidly sets the gain to maximum.

Due to a quirk in the guts of librtlsdr, that “maximum” gain actually ends up slightly higher than you can set with a manual gain.

… sounds comprehensible - but as the radarscape e.g. is especially designed to meet the ads-b needs do these boxes perform measurable better - did you ever do a one to one comparison?

I don’t have a radarcape but I would expect it to perform substantially better than a dongle.

flightaware should definitely buy one for you!
funny thing - today i had a phone call with the head of the company producing the beasts and radarscapes - and he told me that the factory is about 10 minutes from my home :slight_smile:

Interesting, that all makes sense. I am not used to auto gain, in the SATCOM world that I was in, we manually adjusted attenuation settings on the downconverters to give us the best SNR for our shots, but that was usually with a CW spike to tune off of and a constant CW to use going on. It makes sense that it’s not working properly with ADS-B. I am curious as to why AGC is recommended for the set ups then?

… that’s what i’m wondering too. i experimented with and without - but did not see real differences up to now.
where differences are visible is in sdr# …

https://dl.dropboxusercontent.com/u/39745369/sdr_sharp_01.jpg

https://dl.dropboxusercontent.com/u/39745369/sdr_sharp_02.jpg

hmmmm - i have those messages too - are there other bad things i did not see right now?


Statistics: Wed Oct  7 11:00:14 2015 CEST - Wed Oct  7 12:00:14 2015 CEST
Local receiver:
  8640659456 samples processed
  0 samples dropped
  0 Mode A/C messages received
  75274806 Mode-S message preambles received
    46610818 with bad message format or invalid CRC
    25630894 with unrecognized ICAO address
    2683607 accepted with correct CRC
    296921 accepted with 1-bit error repaired
    52566 accepted with 2-bit error repaired
  -4.2 dBFS mean signal power
  -0.8 dBFS peak signal power
  953170 messages with signal power above -3dBFS
Messages from network clients:
  0 Mode A/C messages received
  68364 Mode S messages received
    0 with bad message format or invalid CRC
    0 with unrecognized ICAO address
    68364 accepted with correct CRC
    0 accepted with 1-bit error repaired
    0 accepted with 2-bit error repaired
3101458 total usable messages
469 surface position messages received
203387 airborne position messages received
183164 global CPR attempts with valid positions
29 global CPR attempts with bad data
  17 global CPR attempts that failed the range check
  4 global CPR attempts that failed the speed check
351 global CPR attempts with insufficient data
16648 local CPR attempts with valid positions
  16426 aircraft-relative positions
  222 receiver-relative positions
4015 local CPR attempts that did not produce useful positions
  3537 local CPR attempts that failed the range check
  12 local CPR attempts that failed the speed check
0 CPR messages that look like transponder failures filtered
957159 non-ES altitude messages from ES-equipped aircraft ignored
4201 unique aircraft tracks
3780 aircraft tracks where only one message was seen
0 HTTP requests
CPU load: 35.6%
  888803 ms for demodulation
  343382 ms for reading from USB
  49237 ms for network input and background tasks

In practice it works like a slightly higher gain than you can manually set, which works well with a regular unamplified antenna where you basically want all the gain you can get.

That’s quite a lot of loud messages. It is probably worth trying a lower gain to see if that gives you better performance.
(A high rate of strong messages is just a possible indicator that maybe your gain is too high - you still need to experiment to see if a lower gain actually helps)

ok - then this will be the next thing for me to try - as my settings are ‘agc’ AND ‘–enable-agc’.
in sdr# it looks very similar what happens when going from ‘max’ to ‘agc’ and/or ‘–enable-agc’ or not.
hopefully my fa filter arrives this week from us - probably the too high signal power automatically drops when filter is inserted.

I would not plan on that accomplishing the goal of a proper attenuator. You do have quite a lot of loud messages, maybe turning your gain down (and AGC off) would help in your case. You may get less messages overall, but it’s likely that the ones you get will be higher quality.

yep - but to have a base of data i wait for the filter just to see what improvements or not it will bring. after that test i’ll examine the ‘loudnees-thing’. but what exactly are ‘higher quality messages’ you mentioned?

If you overdrive an amplifier, the resulting signal ends up being less and less clear. Imagine someone in a car driving down the street with their stereo at a moderate level, probably sounds fairly clear, if they ‘crank it to 11’ then the sound coming from the speakers would be far lower quality at a much higher volume. The same thing can happen in RF communications.

My first post - what a great discussion and excellent help provided - I have learned a lot here! Thank you all.

TomMuc - thanks for posting your stats page - my test site is very similar with my ratio in the 30’s to 40’s. i just bought a bunch of 3db pads and will add them to see if I can bring down the ratio without giving up much range. I have a primary site #6588 on a 15’ pole on my roof and a test site # 11086 on a 8’ pole on the roof near it. The primary site has the plain vanilla Piaware image and the test site has the latest sw and is where I will put the pads. I have dump1090-mut running on it with the agc at -10 (enabled) - I will play around with agc values and pads to see what the best combination is. I think I think I need to be looking at the mean signal power and peak signal power to try to bring them down a bit to improve my ratio.

Here is a dump of my test site:

Statistics: Wed Oct 7 18:25:33 2015 UTC - Wed Oct 7 19:25:33 2015 UTC
Local receiver:
8640528384 samples processed
0 samples dropped
0 Mode A/C messages received
93907060 Mode-S message preambles received
59894263 with bad message format or invalid CRC
33203234 with unrecognized ICAO address
757532 accepted with correct CRC
52031 accepted with 1-bit error repaired
-3.2 dBFS mean signal power
-0.3 dBFS peak signal power
395219 messages with signal power above -3dBFS
Messages from network clients:
0 Mode A/C messages received
58683 Mode S messages received
0 with bad message format or invalid CRC
0 with unrecognized ICAO address
58683 accepted with correct CRC
0 accepted with 1-bit error repaired
868246 total usable messages
1350 surface position messages received
89860 airborne position messages received
87272 global CPR attempts with valid positions
18 global CPR attempts with bad data
0 global CPR attempts that failed the range check
18 global CPR attempts that failed the speed check
70 global CPR attempts with insufficient data
3195 local CPR attempts with valid positions
3169 aircraft-relative positions
26 receiver-relative positions
725 local CPR attempts that did not produce useful positions
635 local CPR attempts that failed the range check
13 local CPR attempts that failed the speed check
0 CPR messages that look like transponder failures filtered
99347 non-ES altitude messages from ES-equipped aircraft ignored
431 unique aircraft tracks
181 aircraft tracks where only one message was seen
3590 HTTP requests
CPU load: 34.9%
898356 ms for demodulation
314103 ms for reading from USB
42542 ms for network input and background tasks

hmmmm - not really convinced. i can imagine that caused by over-amplifying messages could become unreadable/unusable on the input side of dump. but i’d think on output side there are no ‘low quality messages’ because either they are correct, dump can correct or they are simply dropped. but maybe i’m not right …

hi cadyx, welcome to the forum :slight_smile: my first post also was just 2 weeks ago :slight_smile: regarding your sites you are way in front of me. two of my sites sit under the roof in the attic and one in a bookshelf of my home-office. despite being a bavarian i’m not a great mountaineer as my roof is not flat and about 35 feet above ground :slight_smile:

Well, good luck figuring that out. :wink:

should be easy - as i guess obj knows exactly what the app he’s working at is doing there :slight_smile:

You’re right in the sense that either a message passes the CRC checks or it doesn’t, but… the CRC is only 24 bits at best (and for some messages it’s a lot worse). That is small enough that if you throw a lot of noise at the wall, some of it will stick. The “aircraft tracks where only one message was seen” count is a guide to how many bogus messages you’re seeing - some really will be aircraft right on the edge of your range, but many will be noise or damaged messages that happened to pass the CRC check mostly through luck, and so the aircraft address is just noise.