Monday, August 9, 2021

Re: Working Narrowband FM examples?

Several points:

1) Further reading: "Digital Signal Processing" by Steven Smith and "Understanding Digital Signal Processing" by Rick Lyons. Smith makes his book available for download at https://www.dspguide.com/. Lyons has many of his stuff scattered around "DSPRelated.com" (https://www.dsprelated.com/). Unlike your usual textbooks, these books actually *EXPLAIN* stuff, not just throw some math proofs at you and say, "See how easy it is to understand?"

2) What hardware are you actually using? USRP? RTL-SDR? HackRF? Something else? I've found that the HackRF, while it covers a huuuuuge frequency range relative to most other inexpensive SDRs, it also has a much worse noise figure.

3) 384k wasn't too *low*. I was guessing it was just *outside* of what the hardware can handle. If the hardware *could* handle it, then you would not have had the issue you did. The RTL-SDR, for example, can only handle sample rates between 200 kHz - 300 kHz, then jumps to 0.9 - 3.2 MHz. Anything outside of that range gets pushed to the closest sample rate the device can handle. The few times I've managed to play with a USRP, I've found that it can only handle sample rates that are values of 100 MHz / N, where "N" is an integer. As you discovered with whatever hardware you're actually using, if you use a sample rate that will work with the hardware, you can change it in Gnu Radio to whatever you *need* it to be.

4) I'm game for a comparison between GQRX and Gnu Radio. We need to make sure we have similar settings between them. I don't think the sample rate is the problem. So long as you're within the parameters that the particular SDR wants, AND you are meeting Nyquist, you should be golden. To me, so long as you're using the same hardware, the critical aspects of comparing audio from an FM signal are ensuring we have the same filters and that we're using the same demodulator. I'm willing to bet large sums that the GQRX is using a polar discriminator. That's the same as the "Quadrature Demod" block in Gnu Radio. Easy enough. But what of the filtering? I can't see what parameters you've selected for your lowpass filter in your attached PNG (and, by the way, you get major kudos for including those... makes troubleshooting infinitely easier!) What are your stop frequency and transition width for your lowpass filter (used in your "Frequency Xlating FIR Filter")?

Gary

*************************************************

Well, I guess it was the sample rate. As another message alluded to, 384kS/s seems too low. I'm not sure why that is; the arithmetic with decimation ought to result in a 48kHz audio output either way, but (with assistance from Andre Buhart who replied off-list) I upped the sample rate to 2.4M and now I can make out the audio (flowgraph attached).


However, playing with the gain settings to make them identical to gqrx I noticed that, quite simply, the audio quality was just plain better in gqrx compared to gnuradio. So, investigating further it seems that the default sample rate for hackrf in gqrx is 8MS/s.


Now, being a novice to DSP and SDR I conclude from this that a higher sample rate simply results in a better quality signal at the front end of the, uh, block chain. That is to say at 2.4M or 8M, the osmocom source must be emitting a better signal which translates to a better audio product at the other side of the flowgraph.


However, my understanding is that a 48kHz audio signal is "good enough", so I'm a little mystified as to why 384kS/s, which is more than double what I want on the other side, results in such poor audio. I hope I'm explaining that properly.


Can anyone point me in the right direction for further reading?

Thanks to all who responded thus far,

Nathan

On 8/5/21 4:10 AM, Mike Markowski wrote:

You bet, Nathan. I just verified that the flowgraph demods NWR, so either osmocom Source or Audio Sink needs configuring. You might try simply playing a recording into your audio sink. It might be as simple as adjusting audio rate. Regarding osmocom Source set up, another flowgraph for HackRF was mentioned in this thread, and you might compare that src setting to yours. (Also, not sure why I had RF gain maxed. Better to lower that...)


Good luck,
Mike

On 8/4/21 1:40 PM, Nathan Van Ymeren wrote:

Hi Mike,

That's exactly what I was looking for, thanks.

However: I swapped out the USRP source for an osmocom source, and it seems to be "mostly working" but the audio comes through like the adults from the old Charlie Brown show from when I was a kid. Instead of clearly-intelligible speech like I can hear through GQRX, using gnuradio I can only get speech that sounds like "mwah mwah mwah mwah"


Attached is a .png of my flowgraph, hope it's not too large for the list (about 100kB).


Appreciate any advice anyone might have.

Nathan

On 8/3/21 3:47 AM, Mike Markowski wrote:

Nathan,

When I was refreshing my gnuradio awareness - I hesitate to use the word "skills" :-) - I ran through the official tutorials and modified them as needed to work with a usrp b210. On the page


https://udel.edu/~mm/gr/

about halfway down is the title "Gnuradio Official Tutorials" with the link "Here are my versions" where you'll find nbfm.grc. It's very simple, using filter/squelch/NBFM Receive block and runs here on grc 3.8.2.0, a promising sign.


Hope it's useful,
Mike

On 8/3/21 2:40 AM, Nathan Van Ymeren wrote:

Hello,

I am seeking a working NBFM receiver example, as the one on the wiki[0] produces unintelligible output. I am confident that my hardware is functioning properly because if I tune to the same frequency (162.525 MHz ) in gqrx, I can hear the weather radio broadcasts clearly. I am on OpenSUSE Tumbleweed, running gnuradio 3.8.x with a HackRF One and a standard telescopic antenna.


I have reproduced [0] verbatim except with the following change: Instead of a ZeroMQ source, I am using an osmocom source for my hackrf.


I've also tried adapting the flowgraph from the "SDR with HackRF" tutorial[1], which implements a wideband FM receiver in gnuradio, but I wasn't able to make it produce anything resembling speech when I changed it to narrowband FM.


Additionally, I've tried a few NOAA weather radio flowgraphs found online but most of what I've found either didn't work or else was for an older version of gnuradio and thus had errors that I wasn't able to work around since I am a gnuradio novice.


Can anyone recommend a working flowgraph for narrowband FM, ideally something simple and working in gnuradio 3.8+?


Thanks,

Nathan

[0] https://wiki.gnuradio.org/index.php/Simulation_example:_Narrowband_FM_transceiver#NBFM_receiver

[1] https://greatscottgadgets.com/sdr/1/




Attachment: working nbfm receive.png
Description: PNG image

No comments:

Post a Comment