Friday, May 1, 2020

Re: Sample Rate & Hardware Considerations Tutorial: GNURadio.org

Hi James

I've seen some error in your flowgraph which explain that you were not ble to get a correct sound after demodulation.

How to choose sample rate:

  • the sample rate should be higher then twice the maximum frequency which is approximately 75 KHz for an FM Stereo multiplex
  • the sample rate should be compatible with your hardware. Beware that SDR source sampling rate range for RTL2832 devices have two ranges ...
    • 225001 to 300000 and 900001 to 3200000.
  • search for your device capability.
  • I think that choosing a sampling rate which is an integer multiple of the low frequency sampling rate is a good practice.
    • audio rate = 48 khz for your flowgraph
    • intermediate rate = 192k = audio_rate * audio_interp
    • sampling_rate = some-multiplier* (audio_rate * audio_interp) choose integer multiplier to set sampling rate accordingly to your device

Multiplier in your flowgraph ? in the rational resampler you have interpolation:   int(multiplier*(audio_rate * audio_interp))

  • I think this block do not account for parameter changed during simulation, so taht only the default value (1) is considered.
  • Please can someone confirm this? *
  • I generally use such a multiplier in my flowgraph but it's a variable, which remains fixed during simulation.

QT Waterfall sink:

  • Adjust the Bandwidth to the signal sampling rate ie: audio_rate * audio_interp

FM demodulation:

  • you sampling rate is quite high, so your signal contain mutiple FM station(this is not a problem however...)
  • Isolating one station requires low-pass filtering at 75 Khz before demodulation
  • Most station transmit stereo multiplex, which should be FM demodulated, than  low-pass filtered at 16 kHz to recover left+right channel (filter after FM demodulation).
  • FM modulation use preemphasis. FM demodulation require FM deemphasis (with tau=50Us for Eu and 75 µs for US) (Deemphasis is applied to audio)

Center Frequency:

  • For FM demodulation, signal is in the range 88e6 to 108e6 , each channel are separated by 0.2e6 (French standard): set your frequency slider accordingly (start 88e6 stop  108e6step 0.1e6)


Please find attached:

  • your flowgraph modified
  • a flowgraph I used for my students (sorry comments are in french)

Regards, Christophe

On 01/05/2020 02:41, James Hayek wrote:
Morning All,

I have a question after following the sample rate tutorial and its implementation on the Guided Tutorial Hardware Considerations section on the official site: https://wiki.gnuradio.org/index.php/Guided_Tutorial_Hardware_Considerations

After the first portion of the lesson, one is asked to add new blocks shown below. 
  • 1x Rational Resampler
  • 1x WBFM Receiver
  • 1x Audio Sink
  • 2x Variable

For the Variable: samp_rate we are told to add the following:
  • ID: samp_rate
  • Value: 250e3

Now, I know the bandwidth of FM is 250 kHz. What I don't know is why we were asked to make this our sample rate. Coincidence? 
When I run the example (with a few changes for my hardware, and creating a few more variables) I get a signal stream that seems out of sync. 
The sound I hear is a constant drop or miss in signal about three times a second. Think waa-waa-waa, each second, in between the radio playing. 

I launched SDRSharp to compare output and noticed the sample rate is default at 2.4M 
I then changed this in my Variable samp_rate and low and behold, the stream is steady.

I have two questions. 
  1. Why was a sample rate of 250K chosen in the example?
  2. What is the goal of the multiplier?
    • In your (Barry Duggan's) example the multiplier helped to remove his static
    • In my file, setting this as a variable slider, and adjusting while playing, I see no difference to the sound

Below is my flowgraph, I also attached the .grc file. 




Any help is greatly appreciated. Thanks in advance! 

--
Thanks,
James G Hayek
Youtube.com/JamesHayek

No comments:

Post a Comment