Author Topic: Help understanding FFT and digital IF  (Read 1772 times)

0 Members and 2 Guests are viewing this topic.

Offline SaabFANTopic starter

  • Frequent Contributor
  • **
  • Posts: 735
  • Country: de
Help understanding FFT and digital IF
« on: April 06, 2018, 10:03:07 am »
I'm trying to figure out how the digital IF of Spectrum Analyzers like the Rigol DSA815 works.

As fas ar I understand it, to take an FFT with a frequency resolution of 10 Hz, I have to sample the signal at least for one 10th of a second at at least twice the highest frequency I can expect (Nyquist-Frequency).
How are they achieving sweep times that are considerably shorter than this?

The solution I've come up so far is to up-convert the measured frequency and then measure that signal for a shorter amount of time at a higher sample rate - For example I want to get 10 Hz resolution in a 1 kHz-Signal and up-convert it to 1 MHz, measure that signal with a resolution of 1 kHz and divide the result by 1000.

Would this be correct, or am I completely wrong? :)

Offline dmills

  • Super Contributor
  • ***
  • Posts: 2093
  • Country: gb
Re: Help understanding FFT and digital IF
« Reply #1 on: April 06, 2018, 10:31:38 am »
You have to have 1/10th of a second in memory to be able to run the FFT, but you have a continuous stream of samples available from the ADC, so on paper you could do a new transform on the last 100ms of samples after every new sample comes in..... 

In practise that is kind of computationally expensive, so you do a new fft every time maybe 1/4 of the buffer has been replaced (Maybe one half, maybe 1/8th depends on how much FPGA is available.

Regards, Dan.
 

Offline SaabFANTopic starter

  • Frequent Contributor
  • **
  • Posts: 735
  • Country: de
Re: Help understanding FFT and digital IF
« Reply #2 on: April 06, 2018, 12:10:44 pm »
Okay, that makes more sense. Thanks for clearing that up :)

Now I just have to figure out how to do that in software :)

Offline dmills

  • Super Contributor
  • ***
  • Posts: 2093
  • Country: gb
Re: Help understanding FFT and digital IF
« Reply #3 on: April 06, 2018, 12:19:56 pm »
Ring buffer (Power of two sized is usually convenient as it saves a branch in the fast path), plus a counter to trigger the FFT, easy.

Slightly more sophisticated is to have multiple ring buffers so you can overlap the FFTs and the buffer loading and readout.

Regards, Dan.
 

Offline ejeffrey

  • Super Contributor
  • ***
  • Posts: 4849
  • Country: us
Re: Help understanding FFT and digital IF
« Reply #4 on: April 06, 2018, 03:41:22 pm »
Overlapping FFTs is also useful to avoid missing some of your signal.  When you FFT non-periodic data you normally multiply by a window function to reduce spectral leakage.  Window functions go to zero at the ends of the window, so those data points have small weight in your result.  Essentially you are throwing away signal.  By using overlapping windows, each individual datapoint is used at the beginning, middle, and end of a window.
 

Offline dmills

  • Super Contributor
  • ***
  • Posts: 2093
  • Country: gb
Re: Help understanding FFT and digital IF
« Reply #5 on: April 06, 2018, 09:04:57 pm »
Yep, overlap-add, very popular for FFT based convolution, but for a digital IF SA of that class I would be slightly surprised if it was actually managing a POI of 1 for a signal within its digital IF bandwidth.

Regards, Dan.
 

Offline CopperCone

  • Super Contributor
  • ***
  • Posts: 1415
  • Country: us
  • *knock knock*
Re: Help understanding FFT and digital IF
« Reply #6 on: April 06, 2018, 10:36:55 pm »
is that a boxcar filter?
 

Offline dmills

  • Super Contributor
  • ***
  • Posts: 2093
  • Country: gb
Re: Help understanding FFT and digital IF
« Reply #7 on: April 06, 2018, 10:50:51 pm »
Not if you apply a sane window.

Hamming/Hanning/Blackman/Blackman-Harris/Kaiser and a dozen or so more they all work and all optimise for different things, sometimes transition band, sometimes passband flatness, sometimes stopband attenuation, sometimes something else...

Rectangular windows (Your boxcar) are a thing and even have valid uses, but usually something else is well worth the computational load.

Regards, Dan.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

-->