hackrf
hackrf copied to clipboard
Why hackrf_sweep use INTERLEAVED mode and discards data from a center of filter?
What would you like to know?
Hi,
As far as I can see from host/hackrf-tools/src/hackrf_sweep.c code,
It takes samples with a center frequency at +7.5 MHz (at 20 Msps, under 15 MHz baseband filter) to produce a spectrum of
(center - 7.5 MHz) .. (center - 2.5 MHz) = 5 Mhz
and
(center + 2.5 MHz) .. (center + 7.5 MHz) = 5 Mhz
then repeats it with a +5 MHz shift, which covers all 20 MHz of the spectrum during one step (which is interleaved into two sub-steps i.e. frequency block transfers).
So at each sub-step we take data from the left and right 5 MHz edges of 15 MHz of baseband filter and the 5 MHz of center is discarded.
But according to https://hackrf.readthedocs.io/en/latest/sampling_rate.html we should use a 5 or 5.5 MHz baseband filter (4:1 at 20 Mhz sampling rate) to take the center 5 MHz of spectrum.
I saw comment https://github.com/greatscottgadgets/hackrf/issues/349#issuecomment-280379815 where was explained that it was implemented to remove the DC spike in the middle (thanks to @dominicgs ).
But in such case a significant adjacent spectrum interference isn't removed, is it?
If we would use a 5 or 5.5 MHz baseband filter in LINEAR mode to take the center 5 MHz instead of two 5 MHz edges in INTERLEAVED mode, as described in https://hackrf.readthedocs.io/en/latest/sampling_rate.html.
Was this way not used just due to performance impact? Or would it also lead to the DC spike issue? If so, is the way to get rid of both of the issues, even in the slower way?
Thanks in advance!