f4exb / sdrangel

SDR Rx/Tx software for Airspy, Airspy HF+, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay and FunCube
GNU General Public License v3.0
2.91k stars 441 forks source link

HackRF decimation issue #165

Closed bdn76 closed 6 years ago

bdn76 commented 6 years ago

I'm need monitor 2MHz spectrum and listen around 8 channel but i'm hear audio distortion with sample rate more than ~600ks/s but i need more for listen spectrum distnce channel (with SQ of course). Why i can not use high sample rate for NBFM without decimation?

f4exb commented 6 years ago

Try to be more specific and describe exactly what you are trying to do with detailed steps to be able to reproduce.

Edit: supposing you are launching SDRangel with default options once you are all set up can you open a browser at http://127.0.0.1:8091/sdrangel and post the result?

bdn76 commented 6 years ago

I'm sorry for my english. In first example i use low decimation but nfm demodulator not work:

wide-spectrum-not-work

In second example i use high decimation and nfm demod work fine:

narrow-spectrum-work

How i can listent to channel with ~1MHz distance?

f4exb commented 6 years ago

Thanks for the screenshots this helps a lot. Well it looks like you are running a RTL-SDR not a HackRF. So I see a first issue with the settings of RTL-SDR: your gain is zero so you are not going to get much RF into the system anyway. The stripes you see on the waterfall are probably internal birdies. You should push this slider at least into the ~40 dB range and if you get overloaded by strong signals you can check the AGC checkbox next.

bdn76 commented 6 years ago

I'm provide screenshots for explanation only because i have not HackRF at hand now but problem exactly the same - nbfm rx channel work fine with low I/Q sample rate (up to ~300k) and not work with high I/Q sample rate (above ~300k). I can listen one channel with low sample rate perfectly but i can not listen two channel simultaneously with big frequency distance (1MHz as on second screenshot). Are you understand my explanation?

f4exb commented 6 years ago

Does it make any difference if at "high" I/Q sample rate (say 2.4 MS/s) you reduce the distance between channels to the same distance you are using for ~300k (with decimation)? This is to sort out if pb is due to sample rate or channel separation. Also can you provide a screenshot with the settings of the NFM demodulator?

bdn76 commented 6 years ago

I'm check now - no. With "high" I/Q sample rate i can not start even one channel but i can start two or more with "low" I/Q sample rate. Are you need screentshot?

f4exb commented 6 years ago

A few more questions first:

bdn76 commented 6 years ago

i5 M520 2.4G, 8GB. Compile from source. With "high" I/Q sample rate i can not use nfm demod at all - noise and rattle instead of voice but with "low" I/Q nbfm work fine.

f4exb commented 6 years ago

No problem here... (this is dev version but there are no differences with 3.14.4 for that matter). 2018-04-26-235519_1920x1080_scrot

bdn76 commented 6 years ago

I'm think this is phosphor issue. If i'm enable phosphor then CPU usage drop to 200% insead of 400% without phosphor.

Work fine (~400% CPU usage, all 4 core work): 20180427084435 20180427084221

Not work (~200% CPU usage, only 2 core work): 20180427084120 20180427084158

And thus if i use only 2 core i have I/Q processing limitation.

f4exb commented 6 years ago

OK I see... you have to set parameters sensibly. It does not make sense to run at 20 MS/s and have a RF filter at 1.75 MHz and run your demodulators at so closed space in the middle. 20 MS/s is very fast and needs powerful hardware (at least i7 8 core CPU) to be run properly. And this is if your USB system lets you go that far without dropping (a lot of) samples. It is interesting to notice however that the phosphor thing changes the way the CPU cores are used. For sure 209.6% for 2 CPU is too much while 379% for 4 CPU is still (barely) acceptable. I am wondering however how you can check how many CPUs are used.

This is very high CPU usage though. Did you compile with the 24 bit sample option on? You should turn it off (default) for such high speed operation and of course compile for release and not debug. Using multple demodulators at such high speed will be hard on the CPU anyway. Again use it sensibly...

f4exb commented 6 years ago

Not an issue.