discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: James Hayek
Subject: Re: Sample Rate & Hardware Considerations Tutorial: GNURadio.org
Date: Fri, 1 May 2020 21:35:21 -0400

Thanks for looking into this Christophe,

I am taking note on your points, and have a few questions in regard to some statements.

·         The sample rate should be higher than twice the *maximum frequency*

o   You mention this is approximately 75 kHz for FM Stereo Multiplex

§  Do you mean to say *maximum frequency deviation* from the center frequency?

·         FM (max frequency is in the MHz range)

·         http://hyperphysics.phy-astr.gsu.edu/hbase/Audio/radio.html shows “These FM stations have a 75 kHz maximum deviation from the center frequency, which leaves 25 kHz upper and lower "guard bands"”

·         Barry is correct (I couldn’t even do math right!)

o   75 + 75 + 25 + 25 = 200kHz bandwidth

§  (not 250 like I assumed)

 

·         Sampling rate shall be an integer multiple of the lowest frequency sampling rate

o   Confirmed

o   48 kHz is standard for most speakers (computer), I can understand that

o   Where I am coming upon confusion is why four was chosen for the audio_interp

§  The lesson https://wiki.gnuradio.org/index.php/Guided_Tutorial_Hardware_Considerations states there is a gotcha b/c the WBFM block performs a decimation by four

·         How would I know this if this wasn’t told to me?

 

·         Considering my “multiplier”, you are correct. I did a test where I hardcoded the multiplier as a 0.1 and the audio sounded terrible. Missing data left and right. I then set the variable “multiplier” back in with the default at 1, and adjusted the slider down to 0.1 and nothing changed

o   I guess this must be hardcoded as you mention

 

·         Thank you for the comments on the rest. I really appreciate the help in my journey. I will be mulling over the rest of your comments tonight with a follow up on anything I can not understand

Merci de bien vouloir! (Google Translate lol)


On Fri, May 1, 2020 at 4:53 PM Christophe Seguinot <address@hidden> wrote:

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. 

image.png


Any help is greatly appreciated. Thanks in advance! 

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


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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]