Jump to content

Problems with rational resampler


Recommended Posts

Hello everyone,

I'm writing my first post in hope of shedding some light on rational resampling in FM radio. My idea was to get started with something easy to get me into the SDR programming and I chose FM radio. I have watched HAK5 SDR episode where the FM radio is built. I have also found similar graph on instructables (links below). I have tried to duplicate their graphs (with my own working frequencies), but without much success. My finished graphs produce loud cracking noise in my headphones. What I noticed, though, is what looks to me a strange discrepancy in the rational resampling and sample rate settings. Now, I'm quite sure I have some basic concept wrong, because it obviously works for both of them. Here's what is strange:

1. Sample rate starts at 2M at RTL-SDR Source

2. It is resampled with interplation 1 and decimation 4, which should produce the sample rate of 500k ("2M * 1/4", if I undestand correctly)

3. Low Pass Filter has also Sample Rate 2M (Shouldn't it be 500k?)

4. WBFM Receive has Quadrature rate of 500k and Decimation 1

5. It is resampled again with Interpolation 48 nad Decimation 500. If we take 2M sample rate from Low Pass Filter, it should produce 2M * (48 / 500) = 192 kHz. But if we take 500k sample rate, it should produce 48kHz, which is also the setting of the audio sink.

The problem is, if I put 500k as the Sample Rate of Low Pass Filter, instead of cracking noise I hear only silence. So my understanding is probably very much off. Can anyone shed some light on these problems? Is there another problem present, which is not tied to the GNURadio Companion and resampling? Here are the links:

HAK5 episode I watched:

Instructables:

http://www.instructables.com/id/RTL-SDR-FM-radio-receiver-with-GNU-Radio-Companion/?ALLSTEPS

Graph from instructables similar to HAK5's:

http://cdn.instructables.com/FFO/PKAD/HNE45JZQ/FFOPKADHNE45JZQ.LARGE.jpg

Rational resampling basics I read:

http://www.dspguru.com/dsp/faqs/multirate/resampling

Any help will be greatly appreciated.

Link to comment
Share on other sites

Hey! Thank you for your response. Although the problem in the end turned up to be something entirely different, the video you posted was very helpful. It got me to using a simple single frequency sound and osciloscope for testing my problems. Once I get GnuRadio to run flawlessly I'll definitely go through the whole series.

The problem seems to be running the GnuRadio Live DVD in the VmWare Player. When I was using a single frequency (1kHz), everything worked. When I shifted for 100Hz, I got underflow. That seemed strange because people in videos can change frequencies with sliders and without changing the sample rate. Also, having a plain simple variable to set the frequency (1kHz) worked while having a slider set the exact same frequency (1kHz) didn't. Not to mention adding a FFT block, which requires quite some computation power.

So the reason seems to be too slow simulation capabilities on a VM (or should I say computation power that my VM is currently not capable of doing). I should mention that I tried to remedy this by adding another vCPU (making VM a dual core VM) but it hasn't helped. I burned the DVD and booted from there. The examples kinda worked, but not fully. The new problem with booting from a live DVD is the system freezing (I can move my mouse, the sound is on, but all the windows are blocked and can't be closed), even when the throttle blocks are added. So the current problems are how to make VmWare work faster or better and / or how to make Live DVD work without freezing.

Any new info greatly appreciated (as always)!

Link to comment
Share on other sites

gnuradio and vm sound like a bad combo, probably should just run it live and save files to disk. you'll run into USB trouble, I guarantee it. All the os calls on both host and virtual machine are going to slow down any communication you have between devices and you're going to get larger delays on something that's trying to run realtime.

Link to comment
Share on other sites

You are right, I proved that with multiple failed attempts to make it work on my VM. As I said, booting from a burned Live DVD works, but I still sometimes get underruns and then the system freezes. I usually have to restart my computer. Luckily I went forward to fiddle with some digital signals (wireless weather station I have at home), so currently there's no need for me to dual-boot (I track the data transforms with the GUI elements which work fine in both VM and when booting the live DVD). I will have to make it happen soon, though. I'll send more info when I go around to do it (if it worked or not). Thanks for all the help!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...