How to sample FM - Page 1
Forum section: electronics / rf-microwave

author: mariolucas75
author_rank: Contributor
timestamp: September 22, 2021, 10:45:22 am
content: Dear All,I am not sure whether this is the right place to post a question (may be it should go beginners section)...To sample a signal it is needed to have a sampling rate at least twice as the signal frequency... suppose i want to capture high frequency signal ~ 100Mhz so what does it mean - my SDR should have 200 Ms/s (mega samples / sec) rate ?If I have a FM signal - lets say carrier freq is 100Mhz and after modulation bandwidth is + - 100 Khz either side, so it means that my signal will have chunks of frequencies - min 100Mhz-100khz and max 100Mhz+100Khz... and i want to view / visualize this signal in time domain..... in another words something like a "spring with compressed coils or stretched coils".... so to sample that signal and try to visualize it do i need sampling rate two times (~ 200 Ms /s ) more ? Or how to do it ?Pls help

author: RoGeorge
author_rank: Super Contributor
timestamp: September 22, 2021, 12:43:21 pm
content: If f0is 100MHz with +/-100kHz deviation, than we can translate the spectrum around 0Hz, so we will have \$\Delta f = 200kHz\$ which will require a Nyquist sampling at 400 kilosamples/s (400kSa/s).If I got your question wright, what you are looking for isdecimation.In decimation, if it were to have all the samples taken at 200 MSa/s, than we can simply keep only each 50thsample and discard the other samples. That way we would get the same samples as if it we were sampling at 400 kSa/s (every 50thbecause 200 MSa/s = 200_000 kSa/s = 50 * 400 kSa/s).Keep in mind that decimation will fold down other spectral components into the same band, so usually this is done by first applying a low pass filter overallof the high speed 200 MSa/s samples, and only after filtering we can throw away the rest of the samples and keep only each 50thsample after low pass filtering the original high speed signal.The low pass filter in this numerical example must be at 200kHz, to cut out any higher spectral components. This is necessary only if higher than 200kHz frequencies are present in the FM signal, because by decimation all other multiple of 200kHz bands (e.g. 400kHz-600kHz, or 91.8MHz to 92.0MHz, etc.) will be folded into the first 200kHz, too, and there is no way to distinguish which is which.

author: mariolucas75
author_rank: Contributor
timestamp: September 22, 2021, 12:56:20 pm
content: Dear RoGeorge,Thank you so much for your reply...So it is possible to view real-time FM station signal obtained through rtl-sdr in time domain as a signal with chunks of different frequencies like a "spring with compressed or stretched coils" (the way FM is symbolically drawn in books ) ?Or how to do it....Sorry if my question sounds silly ... i am new but desperately want to learn this.....

author: srce
author_rank: Regular Contributor
timestamp: September 22, 2021, 12:57:49 pm
content: Quote from: mariolucas75 on September 22, 2021, 10:45:22 amYou could do it by sampling at 200MS/s, but this isn't the way most radios work.They work by mixing the received signal with a 100MHz local oscillator which downconverts the 100MHz signal to baseband, so you get a signal 200kHz wide centred at 0Hz (Or a low IF such as 1MHz). Thus your ADC only needs to run at 2 MHz not 200 MHz. The circuitry for this is inside your SDR.Google for Superheterodyne receiver.

author: langwadt
author_rank: Super Contributor
timestamp: September 22, 2021, 01:16:41 pm
content: Quote from: RoGeorge on September 22, 2021, 12:43:21 pmif you want the ~100MHz +/-100kHz signal from your 200MSa/s, you a bandpass filter around ~100MHz not a lowpass before decimation...

author: langwadt
author_rank: Super Contributor
timestamp: September 22, 2021, 01:18:47 pm
content: Quote from: srce on September 22, 2021, 12:57:49 pmand if the ADC has enough analog bandwidth (fast enough sample hold) the sampling itself can do the mixing

author: srce
author_rank: Regular Contributor
timestamp: September 22, 2021, 01:26:58 pm
content: Quote from: langwadt on September 22, 2021, 01:18:47 pmIt sounds like he's using an RTL SDR though - which is a superhet receiver with 2.4MSa/s ADC.

author: srce
author_rank: Regular Contributor
timestamp: September 22, 2021, 01:29:10 pm
content: Quote from: mariolucas75 on September 22, 2021, 12:56:20 pmYou can use the Channel Analyzer plugin in SDRangel with your RTL SDR:https://github.com/f4exb/sdrangel/blob/master/plugins/channelrx/chanalyzer/readme.md- this will of course show you the downconverted signal (but should be pretty much what you want to see)

author: RoGeorge
author_rank: Super Contributor
timestamp: September 22, 2021, 01:32:43 pm
content: Quote from: mariolucas75 on September 22, 2021, 12:56:20 pmMost probably, no. Because the "spring stretches" would be too small to notice them, even if you somehow "freeze" the 100 MHz carrier and zoom in into the signal.What are you trying to see, or do?- if it's just for learning, you can use Octave, or an online tool likeGeogebrato plot FM modulated signals and see for yourself how the 100MHz FM modulated carrier will look like- if it's just to make a cool display/visualization of the live signal from an FM station, then even when sampled at 200MSa/s I think you wouldn't distinguish much details (to "see" the FM modulation).Depending on the final goal you have, it might be either possible or impossible to see a stretching spring-like waveform with an SDR.So what is your final goal with it? Why do you want to see the stretching spring? What do you hope to get out of it?

author: RoGeorge
author_rank: Super Contributor
timestamp: September 23, 2021, 11:06:52 am
content: Quote from: langwadt on September 22, 2021, 01:16:41 pmI guess I was using the wrong words. AFAIK it's a low pass filter, not a band pass, and the cutting frequency is as low as the bandwidth of interest, near zero Hz.The signal path for decimation is like this:1. Analog signal with spectrum between 0-100 MHz --->2. High speed ADC sampling (200 MSa/s) --->3. Keep only the Nthsample and make all the other samples zero (so we still have 200 MSa/s) --->4. Apply low pass filter to keep only the bandwidth of interest (200 kHz) --->5. Copy each Nthsample into a new array, this last array is at low sampling rate (400 kSa/s), it's the final result of the decimation.I might have a working Python example to upload from some time ago when I was fiddling with decimation in GNU Radio.

author: mariolucas75
author_rank: Contributor
timestamp: September 23, 2021, 01:23:12 pm
content: Dear All,Thank you for your valuable inputs which definitely is useful for me.I want to learn GSM signals ... and prior to doing that i thought to learn interpretation of FM / AM signals for example.For example when you switch mobile on it is looking for so called "frequency correction burst" - which is in fact a pure sine wave with some microseconds duration. I wanted to visualize this microseconds sine wave etc etc....By the way don't you know any live forum where GSM technical topics are being discussed...

author: JoeyG
author_rank: Regular Contributor
timestamp: September 23, 2021, 01:58:33 pm
content: Why not mix the FM signal down to an IF frequency and a lower sampling rate will be required

author: mawyatt
author_rank: Super Contributor
timestamp: September 23, 2021, 03:45:33 pm
content: The sampling process is fundamentally a mixing process, and as RoGeorge mentioned can be cleverly utilized as an effective downconverter eliminating the need for a traditional mixer. Also mentioned is the need for a preselect filter to isolate the band of interest. Back in the 70s we called this RF sub-sampling, bringing Microwave signals down to baseband with a sampler.Best,

author: langwadt
author_rank: Super Contributor
timestamp: September 23, 2021, 07:49:34 pm
content: Quote from: RoGeorge on September 23, 2021, 11:06:52 amclose but, no..if you want to interpolate(upsample) you take your 400kSa/s stream insert zeros and lowpass filter the now 200MSa/s streamif you want to decimate(downsample) you take your 200MSa/s stream lowpass* filter and throw away* every nth sample to get 400kSa/s stream*using a lowpass/bandpass you pick the one image of the n*400kHz +/-200kHz that you want to keep*if using a FIR filter only calculate the samples you want to keep