ADS-B, an acronym for Automatic Dependent Surveillance-Broadcast is a technology that allows tracking aircrafts using high speed radio transmissions. I have never had much interest in this technology until recently. While I was fiddling with this mode with Ian, we discovered a very simple way of demodulating this digital mode using the cheap DVB-T/FM (rtlsdr) dongles. This diagram explains how it works:
The final application, ADSB# (read ADSB-Sharp) is released under the MIT license and looks a bit like this:
The executable can be downloaded here. The sources are also available here.
Henry Forte also wrote a nice documentation to get started. You can view it here.
Configure your plotting software to use 127.0.0.1:47806 in AVR format.
I’m working with Osmocom on a C port of this
POC application. Check Keen’s git repository.
There’s also another version by Salvatore Sanfilippo that uses the same decoding method developed in the latest versions of adsb#. Have a look on it here. Very promising so far!
More on this later…
A lot of users wanted to know who are the brains behind SDR# and instead of letting them speculating I decided to publish the list.
The main application without plugins is the work of two people:
- Initial project setup
- DSP Core (What processes the radio data and renders audio etc.)
- The Waterfall and Spectrum Analyzer components
- GUI logic (What happens when you click/hover a component)
- Plugin system
- SoftRock support
- FUNcube Dongle Pro support
- RTL-SDR support
- Quality Assurance
Ian Gilmour (MM6DOS)
- Many valuable DSP Optimizations
- Plugin system
- FUNcube Dongle Pro+ support
- RFSPACE’s SDR-IQ support
- Audio/Baseband recorder plugin
- Quality Assurance
The optional plugins have been contributed by these people:
Tony BenBrahim (K5DEV)
- Initial wav recorder code
SDR# has an original algorithm that compensates gain and phase imbalances between the IQ channels. Without this compensation strong signals are mirrored with respect to the center of the spectrum. All quadrature sampling receivers have their imaging problems. Solutions that were developed in this regard scale from manual adjustment of phase and gain parameters, to much complex mathematical models that find out these parameters by analyzing IQ signals and do some magic. The algorithm I developed is somewhere between these two extremes. Here’s a brief description of how it works:
The algorithm tries to figure out parameters that maximize an objective function (image
rejection utility function, actually). The function simply sums the distances between every FFT bin and its corresponding image. We build that function such that it takes two parameters, phase and gain errors (our target). The return value is a scalar. The nearer the parameters to optimality the higher the return value. The maximum point of this function corresponds to a perfectly balanced signal. Have a look on this plot:
For an ideal transmitted IQ signal:
The output of QSD/ADC stages subject to imbalances is defined by these equations:
We first initialize the alpha and phi parameters with 0. The algorithm then moves by random steps and evaluates the utility function until it reaches (or approaches) the maximum. Only moves that improve the problem are retained. We iterate over many buffers improving the estimation every time. This is a multi-dimensional concave optimization problem. This approach is computationally effective, and often simple to implement. Sometimes, it’s the only way to solve problems when no known/valid analytic model exists.
Here’s a signal from FUNcube Dongle without IQ correction:
The same signal with IQ correction activated. Nice image rejection, isn’t it?
The source code can be found here.
- This algorithm supposes that the phase and gain errors are constant over the spectrum, which is the case on most sound cards, but not all.
- I have a few ideas to extend this algorithm to cover phase and gain errors that are dependent on frequency.
This algorithm and associated code are disclosed for reference only. For commercial usage, contact me at info *at* sdrsharp.com. In either case I’ll be pleased to help you.
The code of the DSP is released under the MS-RSL license. This basically grants you the right to view the code for your own education, but you cannot redistribute it or redistribute modified copies (derived works.)
The rest of the application is under the MIT license.