I’m sorry but I don’t understand what you are trying to say by this.
I don’t see any indication of that happening in the firmware version history.
(1) I did not want to say anything except acknowledging that the source of these screenshots is the document linked by you.
(2) I posted these screenshots as a quick and visible reference for anybody browsing this thread.
That figure 1 from the PDF document does sort of confirm what LawrenceHill is saying about where the I/Q generation is performed, i.e. in the PC (or RPi in our case). Notice the output of the Airspy says: “USB to PC 12-bit ADC samples plus control signals”.
Well it’s kind of nice to know what you’re actually configuring.
But speaking of configuring, in /etc/default/airspy_adsb file what does
#don't change:
G=-g
M=-m
mean?
airspy_adsb --help
airspy_adsb never makes IQ, it looks at the raw samples.
I wouldn’t recommend lowering -w below 5 due to garbage.
-P can be lowered to 5 to reduce the frequency of bad altitudes being received.
I’ve changed the default to that not long ago.
Ah, you’re saying for adsb demodulation specifically, you don’t need to create I/Q, you can just use the raw samples (i.e the A/D samples) ? Interesting.
Two subsequent raw samples form an IQ pair.
The sample speed for the different modes differ by a factor of two, because for raw, every value counts as a sample while for the non-real mode aka IQ mode, a pair is considered to be a sample. So you get twice as many values. 20Msps raw (real) = 10 Msps IQ-pair.
Why do i know that two raw samples form an IQ pair? Because it works. Stream1090 runs on this by now with an R2.
It reads two values, computes the magnitude. Done.
What are raw samples?
I dont understand the previously linked document. There is a diagram of only one ADC. The second picture suggests two ADCs. This is what i understand (middle) about IQ pairs.
https://pysdr.org/_images/receiver_arch_diagram.svg
from IQ Sampling | PySDR: A Guide to SDR and DSP using Python
Pretty sure there’s only one A/D. At least that’s what the Airspy block diagram shows.
Also, none of the block diagrams in your first link represent the implementation here.
AIUI, there is one A/D followed by a digital IQ mixer.
I don’t know much about how this works in hardware. All i can contribute here is that two subsequent samples form an IQ pair. The other conversions that take place in libairspy is not related too much to the concept of IQ. It is DC removal and band pass filter.
Edit: Could also be that i am completely wrong.
Edit2: I have to think about this a bit more. Stream1090 is a bit dfferent since it is comparison based. Comparison based stuff only requires monotonicity in the functions dealing with the magnitude. Could be that the above function actually provides that most of the times. Maybe i should just implement a quick hack to check what happens if i only take one a sample at a time.
I don’t doubt that consecutive samples provide IQ data as you say. The LPC4370 has plenty of horsepower to do that. I’m just wondering how it is implemented.
I was looking at your code to calculate magnitude:
const float sq = f_i * f_i + f_q * f_q;
out[i] = sqrtf(sq);
I imagine it takes a lot of cpu cycles to do that. In your white paper on Stream1090 you say that for 8-bit samples (RTL-SDR dongle) you use a lookup table to calculate magnitude (65536 entries in table). Couldn’t you do the same for 12-bits ? The table would be 1024x bigger, but memory is cheap. Even the lowliest RPi has 1 GB of memory.
The circuit board image posted earlier is for an Airspy R0, here is another from the Airspy.com website for the R2.
The R2 definitely has two ADCs.
I recently read something that listed the differences between the mini and the R2, but can’t find it again. Basically is a down-spec version of the R2 - it definitely didn’t mention removing one of the ADCs. I can’t find a clear enough image of an Airspy Mini circuit board to check.
It is also worth noting that the block diagram is from a review is for the R0 dated March 2015. The R2 circuit board is dated August 2015 as are the images I’ve seen of the mini circuit board. I think the mini was released in early 2016, so both didn’t exist when the block diagram was drawn.
I think that’s two inputs to one ADC. Maybe it’s differential inputs. I don’t know.
If you look at the data sheet for the LPC4370, it has one 12-bit ADC (high speed) and two 10-bit ADC’s (low speed) , and one 10-bit DAC (low speed).
Analog peripherals
One 10-bit DAC with DMA support and a data conversion rate of 400 kSamples/s.
LBGA256 package only.
Two 8-channel, 10-bit ADCs (ADC0/1) with DMA support and a data conversion
rate of 400 kSamples/s for a total of 16 independent channels. The 10-bit ADCs
are only available on the LBGA256 package.
One 6-channel, 12-bit high-speed ADC (ADCHS) with DMA support and a data
conversion rate of 80 MSamples/s.
Yes - that occurred to me after I posted my message!
I think you are correct.
I think this where the confusion (for me) arises. If I, like @mgrone, thought that you need two ADCs to derive IQ samples according to the linked document he referenced, how could you do it with one?
If I believe AI, 6-channel means six simultaneous ADC measurements, so using two channels isn’t stretching the chip at all. The chip has is effectively six 12-bit ADCs and the Airspy is only using two.
Well then the two inputs to the ADC would have to be from two analog chains (two mixers, two lowpass filters). But I don’t think that’s the case here.
Anyway this is way off course for this thread. Probably should be in the Stream1090 thread.
Nah, the HSADC on the 4370 has 6 inputs, but internally it’s a single 12-bit ADC and a 6-way input multiplexer. You can get interleaved samples from different inputs if you want, but it all has to run at the same sample rate, the different inputs are sampled sequentially not in parallel, and the isolation between inputs is worse than you’d expect.
I don’t know how the airspy board is laid out wrt those external ADC IN1/IN2 connectors, but I’d assume that it’s really using it as a choice of inputs (so you can e.g. have two different RF chains plugged in, and choose which to use). The R820T/R860T provides a single (differential) output, not an I/Q pair, and the airspy is capturing real samples at a non-zero intermediate frequency and doing the conversion to quadrature in software on the host side (or not, if the client wants the raw samples, which is what airspy_adsb does I believe)
Thanks - yet another example of AI confidently giving the wrong answer.
I had been puzzling as to why the chip would have so many unused ADCs.


