HackRF One and the centre spike

797 views
Skip to first unread message

mike....@gmail.com

unread,
May 11, 2018, 9:17:48 AM5/11/18
to mmbtools
Having seen the comments about the LimeSDR producing a centre spike and the Digital Gain no longer being transfer rate dependant, I experimented with the Hack's output into our newly acquired Rigol Spectrum Analyser. I was curious to see the effect of a low setting of digital gain and at 0.1, the centre spike was huge compared with the greatly reduced DAB carriers much like the picture obtained from Welle.io by Eddie. Only by setting the gain to 1 made the carriers and spike equal. Further question about the generation of a fir-filter file, does the sampling_freq have to match the transfer rate into the HackRF_One which in my case is 6144ksps not 2048ksps and generate a custom file ?
Mike G1SBN.

peter allridge

unread,
May 11, 2018, 9:31:40 AM5/11/18
to mmbtools
Hi Mike, I'm using a hackrf myself aswell as the limesdr mini and this centre spike I've just got rid of by tweeking the settings on a fresh install of dabmod the gain setting is 1.0 even 1.01 starts to produce an iffy signal snr drops on welle.io and sides start to creep but at 1.0 it's Bob on best signal ive had to-date on this hackrf the gainmode is set to FIX sample rate to 4096000 all via hackrf transfer method power x-47 at Max and power out seems to be -18dbm? What did you observe power out to be? I'm using a really crappy Chinese power meter so it could be totally wrong but it does help to an extent.

Thanks Pete

Matthias Brändli

unread,
May 11, 2018, 12:32:26 PM5/11/18
to crc-mm...@googlegroups.com
Hi Mike, Pete,

> Further question about the generation of a fir-filter file, does the sampling_freq have to match the transfer rate

The FIR filter is before the resampler, and will always run at 2048ksps


> gain setting is 1.0 even 1.01 starts to produce an iffy signal
> [...]
> gainmode is set to FIX
As for all SDR devices, it's important to avoid sample saturation. I
don't remember what the max sample amplitude is when using gainmode FIX,
but it's very well possible that with 1.0 saturation cannot occur,
whereas it can for 1.01.

However, with gainmode VAR, some amount of saturation will occur with
gainmode 1.0. So be sure to measure the spectrum!

If you find a way to improve the spectrum quality, please create a page
on the wiki and write your observations there, or send me some text that
I can copy-paste into the guide!

Cheers,
mpb

peter allridge

unread,
May 11, 2018, 12:50:00 PM5/11/18
to mmbtools
Hi Matthias, yes it does indeed use the same rates as for fir filter I have that off and have not tried it as it messes everything up. "makes sense if it only uses 2048k" I also don't have usb3 till next Friday so I can't test any further I'm afraid. I'm stuck on 4096k and can't go any higher as USB trips out. Digital gain I've got that at 1.01 and it seems it's creeping up slightly at the sides to me so I'm going to back it off slightly as the snr in Welle.io drops down but signal looks good but as you know it's not an accurate reading by far.

Pete

mike....@gmail.com

unread,
May 12, 2018, 5:03:19 AM5/12/18
to mmbtools
Pete - Odr-dabmod is very resource hungry and I have detailed my findings in another thread. USB3 may not solve your issue unless the CPU is at least a 4-core chip. USB2 is still adequate with a 4core CPU. I can use 8192ksps but have compromised for trouble-free transfer at 6144ksps. The ETI mux data is networked from a dual-core CPU equipped PC handling 2 live audio encoding and 3 test web streams and adding  DLS encoding being assembled by odr-dabmux.
Matthias - I have always set GAINMODE to VAR as the commented notes in the sample INI file suggest that it is the preferred option. I shall check it with MAX. Thanks for the Fir-Filter clarification.
Mike D.

mike....@gmail.com

unread,
May 18, 2018, 12:51:07 PM5/18/18
to mmbtools
I think that output level is about the same as I get into our newly acquired Rigol spectrum analyser. There seems to be a good shoulder depth of 35dB with the fir filter I have produced from the python script :-
gain = 1
sampling_freq = 2.048e6
cutoff = 770e3
transition_width = 100e3
which gives 49 taps.The original settings of cutoff 810e3 and transition-width of 250e3 only gave 19 taps so I don't know what parameters were used to produce the 45 tap file.
With fir-filter disabled, the shoulder depth was about 5db worse.
Mike D.


On Friday, May 11, 2018 at 2:31:40 PM UTC+1, peter allridge wrote:
Hi Mike, I'm using a hackrf myself aswell as the limesdr mini and this centre spike I've just got rid of by tweeking the settings on a fresh install of dabmod the gain setting is 1.0 even 1.01 starts to produce an iffy signal snr drops on welle.io and sides start to creep but at 1.0 it's Bob on best signal ive had to-date on this hackrf the gainmode is set to FIX sample rate to 4096000 all via hackrf transfer method power x-47 at Max and power out seems to be -18dbm? What did you observe power out to be? I'm using a really crappy Chinese power meter so it could be totally wrong but it does help to an extent.

Thanks Pete


Matthias Brändli

unread,
May 19, 2018, 1:31:10 PM5/19/18
to crc-mm...@googlegroups.com
Hi Mike,

I'm afraid I also cannot find the settings anymore that generate the
doc/fir-filter/filtertaps.txt :-/

I've had to update the script once because of a GNURadio version change,
and I see in the history that the transition width was 150k at some
time. But changing it from 250e3 to 150e3 generates 33 taps, not 45.

This default filter of 45 taps is not necesarily best, and improvements
are welcome. If you find settings that give same or better performance
with less taps then we could update the defaults. Maybe there's a
dependency on the SDR device too.

If you want to investigate this more, please create a wiki page, write
down your measurements and upload taps files and corresponding
screenshots. This way, more can collaborate on the topic! I can
contribute spectrum measurements on a B200, but I would like somebody to
lead this topic.

Cheers
mpb

On 18/05/18 18:51, mike....@gmail.com wrote:
> I think that output level is about the same as I get into our newly
> acquired Rigol spectrum analyser. There seems to be a good shoulder
> depth of 35dB with the fir filter I have produced from the python script :-
> gain = 1
> sampling_freq = 2.048e6
> cutoff = 770e3
> transition_width = 100e3
> which gives 49 taps.The original settings of cutoff 810e3 and
> transition-width of 250e3 only gave 19 taps so I don't know what
> parameters were used to produce the 45 tap file.
> With fir-filter disabled, the shoulder depth was about 5db worse.
> Mike D.
>
> On Friday, May 11, 2018 at 2:31:40 PM UTC+1, peter allridge wrote:
>
> Hi Mike, I'm using a hackrf myself aswell as the limesdr mini and
> this centre spike I've just got rid of by tweeking the settings on a
> fresh install of dabmod the gain setting is 1.0 even 1.01 starts to
> produce an iffy signal snr drops on welle.io <http://welle.io> and
> sides start to creep but at 1.0 it's Bob on best signal ive had
> to-date on this hackrf the gainmode is set to FIX sample rate to
> 4096000 all via hackrf transfer method power x-47 at Max and power
> out seems to be -18dbm? What did you observe power out to be? I'm
> using a really crappy Chinese power meter so it could be totally
> wrong but it does help to an extent.
>
> Thanks Pete
>
>
> On Friday, May 11, 2018 at 2:31:40 PM UTC+1, peter allridge wrote:
>
> Hi Mike, I'm using a hackrf myself aswell as the limesdr mini and
> this centre spike I've just got rid of by tweeking the settings on a
> fresh install of dabmod the gain setting is 1.0 even 1.01 starts to
> produce an iffy signal snr drops on welle.io <http://welle.io> and
> sides start to creep but at 1.0 it's Bob on best signal ive had
> to-date on this hackrf the gainmode is set to FIX sample rate to
> 4096000 all via hackrf transfer method power x-47 at Max and power
> out seems to be -18dbm? What did you observe power out to be? I'm
> using a really crappy Chinese power meter so it could be totally
> wrong but it does help to an extent.
>
> Thanks Pete
>
> --
> You received this message because you are subscribed to the Google
> Groups "mmbtools" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to crc-mmbtools...@googlegroups.com
> <mailto:crc-mmbtools...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

mike....@gmail.com

unread,
May 21, 2018, 6:37:39 AM5/21/18
to mmbtools
Hi Matthias - I'm not sure whether I feel qualified to produce a wiki page as I consider what I am doing as experimenting rather than designing. I am assuming that 'Cutoff' defines the bandwidth away from the central carrier frequency so I thought that 810kHz was a little distant considering the (excessively - in my opinion) tight critical mask defined in the ETSI spec' so I chose 770kHz and a closer transition width and I shall do the off-screen shots of these and various other parameters and hopefully see the effects. I haven't tried using Soapy to drive the HackRF but does that really matter? Would it make the spectrum better or is it just an added complication to the already stretched PC resources?  I don't know.
Just to elaborate on my comment about the ETSI spec', it is probably relevant where kW transmissions are being produced but in the SSDAB world, we're only talking about hundred(s) of watts or less.
Mike D.

peter allridge

unread,
May 21, 2018, 9:46:30 AM5/21/18
to mmbtools
Hi Mike, I bought a gigabrix quadcore barebones pc ive installed the software but im in the middle of decorating so soon as ive tried it I will let you know how it goes.. least its got usb3 which should help..

Just wish I had a spectrum analyser or if theres anyone about around the northwest uk could let me do some testing that would be great? don't ask don't get.. 

Pete

mike....@gmail.com

unread,
May 21, 2018, 10:23:43 AM5/21/18
to mmbtools
Hi Pete - that PC should be powerful enough to do the business. Before I had access to a good spectrum analyser, I was getting good but not necessarily accurate spectra displays using a receive only SDR, a Watson, which because it has an up-converter for the low HF bands, is a bit pricy but there are cheaper SDR modules on Ebay. The best software I've found for looking at the HackRF output is SDR#. Take care with the gain settings of the receive module, though, in SDR#.
Mike D.

mike....@gmail.com

unread,
May 21, 2018, 10:27:33 AM5/21/18
to mmbtools
Just dawned on me. The HAckRF_One is only USB2 input so USB3 is going to downgrade to that anyway. -Mike D.

peter allridge

unread,
May 21, 2018, 10:28:40 AM5/21/18
to mmbtools
Hi Mike, I'm going to be running a limesdr mini so i will have the hackrf free to do the monitoring off not this USB freeview thing that isn't the best? What's your views on that any good software to run with it? Sharpsdr works well?

Pete

mike....@gmail.com

unread,
May 21, 2018, 10:51:36 AM5/21/18
to mmbtools
Hi Pete - I only tried the HackRF in receive mode with HDSDR and possibly SDR# on my Win7 PC for one session just after I got it about 8 months ago so it's a bit of a dim memory and I'm not sure it was better than the RTL820T and RTL2832 based Watson(all the dongles seem to use that chip-set). There's no reason for it to be worse.
Mike D. 

Matthias Brändli

unread,
May 21, 2018, 11:20:43 AM5/21/18
to crc-mm...@googlegroups.com
On 21/05/18 16:28, peter allridge wrote:
> What's your views on that any good software to run with it?

You could give gqrx a try too. http://gqrx.dk/

If you are on windows, Pothos might be easier to install than GNURadio +
gqrx https://github.com/pothosware/PothosSDR/wiki

mpb

pswiatki

unread,
May 21, 2018, 11:42:32 AM5/21/18
to mmbtools
I found an interesting piece od SDR software: http://www.sdr-radio.com/Software/Version3

Good for reception, but can also give you a nice spectrum view and a waterfall display.
Perhaps you will find it useful.

Peter
 

Matthias Brändli

unread,
May 21, 2018, 11:42:48 AM5/21/18
to crc-mm...@googlegroups.com
Hi Mike

On 21/05/18 12:37, mike....@gmail.com wrote:
> Hi Matthias - I'm not sure whether I feel qualified to produce a wiki
> page as I consider what I am doing as experimenting rather than
> designing.

The whole point of having the wiki is to encourage writing down and
sharing observations and experiments. It's easier to structure and
search than the mailing list.

If you feel your experiments have value for other users, do create a
wiki page and tell us about it on the list! Maybe other people will join
and contribute observations. And after some exchanges, we will hopefully
gain better insight into what are the best settings/values and we can
take a well-informed decision about what defaults to put into the tools.

"Remember kids, the only difference between Science and screwing around
is writing it down." -- MythBusters


> I am assuming that 'Cutoff' defines the bandwidth away from
> the central carrier frequency so I thought that 810kHz was a little
> distant considering the (excessively - in my opinion) tight critical
> mask defined in the ETSI spec' so I chose 770kHz and a closer transition
> width and I shall do the off-screen shots of these and various other
> parameters and hopefully see the effects.

Yes. One reason to keep the cutoff a bit further away from the edge of
the signal (in theory from -768kHz to 768kHz) is that the filter will
influence the phase of those carriers far from the centre frequency.

This does not only depend on the cutoff and the transition width, but
should be taken into account when designing a FIR filter:

https://en.wikipedia.org/wiki/Linear_phase

I don't know if GNURadio has some design tools, it would be great to
check phase behaviour of the current default FIR filter taps.

https://www.gnuradio.org/doc/doxygen-3.7.2/page_filter.html


> I haven't tried using Soapy to
> drive the HackRF but does that really matter? Would it make the spectrum
> better or is it just an added complication to the already stretched PC
> resources?  I don't know.

In terms of performance, it should be roughly equivalent, and I also
don't expect the spectrum to be any different.


> Just to elaborate on my comment about the ETSI spec', it is probably
> relevant where kW transmissions are being produced but in the SSDAB
> world, we're only talking about hundred(s) of watts or less.

True, but if the regulator tells you to respect a given mask, you need
to have the tools to achieve this.

The FIR filter, OFDM windowing, and digital predistortion can help, but
in many cases an appropriate mask filter needs to be put after the PA.

mpb
Reply all
Reply to author
Forward
0 new messages