0
$\begingroup$

I am using rtl-sdr at an adjustable sample rate to get stuff from a WBFM radio station. I then filter and demodulate it. When I sample at 2.4Msps, the sound is 'choppy'. I tied the sample rate to a slider on gnuradio, so I can vary the software radio sample rate by moving around the slider. It turns out the pitch of the person talking/singing's voice gets lower as I move the sample rate down, and higher as I move the sample rate up.

Why? 2.4 million samples / second is much greater than 2*20,000Hz. Why would there be a difference between sampling at 2.4 and 2.8 Msps? All the frequency content is already covered in both cases...

Also: in gnuradio I can adjust the width of the low pass filter that is placed before the FM demodulator. I thought that making the filter very narrow would remove the high frequency content of the audio. Well, it doesn't. It just makes the sound 'staticy'. Why?

$\endgroup$
  • $\begingroup$ It's impossible to answer your question without more information. Consider sharing your code, or at least a detailed block diagram. Also: Make sure your CPU is not dropping samples. And, if you want to remove high-frequency content from audio, you need to filter the L and R signals, not the signal before the demodulator. $\endgroup$ – MBaz Dec 18 '14 at 20:28
  • $\begingroup$ @mbaz - Here's an example: w7fu.com/wp-content/uploads/2014/07/Selection_004.png Changing the sampling rate of the RTL-SDR changes the pitch of the voice or music in the audio output, even though the sampling frequency is much greater than twice the highest expected frequency in the audio. In my case I am using 2.4Msps and the frequency varies as I movie it down lower, whereas in this diagram the sample rate is lower from the start. $\endgroup$ – horse hair Dec 18 '14 at 21:43
1
$\begingroup$

A couple of things jump out when looking at your diagram:

  1. The first low-pass filter has a decimation of 4, so the sampling rate at its output is 256 kHz. However, you have set the sampling rate of the FM receiver and the second LPF to 224 kHz. These should be 256 kHz.

  2. The cut-off frequency of the first LPF is 150 kHz. This means a total passband of 300 kHz. This is larger than necessary, so you'll end up picking up more noise than the optimum.

  3. You multiply the audio output by a constant factor of 2. This may be too little, or too much. I'd suggest using a slider to control the volume. If you connect a scope sink to the audio sink input, you'll be able to easily get the optimum gain: you want the signal to be withing [1,-1].

$\endgroup$
  • $\begingroup$ Good info... what about the pitch of the output audio changing as I change the rtl-sdr sample rate, even though the sample rate is always well over 2*highest audio freq? $\endgroup$ – horse hair Dec 18 '14 at 22:20
  • 1
    $\begingroup$ @horsehair, my guess is that the interplay between the wrong sampling rates you have defined cause that. If it still happens after you fix the rates, then we can look into that. $\endgroup$ – MBaz Dec 18 '14 at 22:28
  • $\begingroup$ Thanks for those answers. If you have time, please answer this as well: why is there gain in the LPF after the FM demodulator? What's the point? I see gain 'randomly' scattered around these block diagrams a lot... Also, you mention that LPF 150 kHz => 300 kHz pass-band. Shouldn't the passband be 0-150kHz in this case, as configured? $\endgroup$ – horse hair Dec 19 '14 at 5:11
  • $\begingroup$ @horsehair Many gnuradio blocks have gain because combining two operations (e.g. filtering and gain) is less computationally intensive than performing them one after the other. Regarding the LPF: note that all signals and blocks up to your FM demodulator are complex. This means that the spectrum is no longer necessarily symmetric around frequency zero. Nominally an FM channel is 200 kHz. So, after downconversion, the channel will cover from -100 kHz to 100 kHz. You need a 100 kHz LPF. $\endgroup$ – MBaz Dec 19 '14 at 15:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.