LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Zoom FFT worth it it?

Hi all. I am questioning whether it might be worth it to use a Zoom FFT in my system. I know I benchmarking is the only sure way to tell, but I am hoping some of you have experience with the matter. The stats of the measurement:

 

System: Windows 10 with a recent i7
Sample Rate: 20 MS/s

Measure time: 4 ms

Number of samples: 80,000

Interesting Bandwidth: 200-400 kHz

No. of bands: 2
Number of acquisitions per measurement: ~65k

With these numbers an FFT takes about 8ms and we require 2-3 worker threads going to not get behind. CPU utilization hangs around 75% with regular spikes to 100% (probably 3rd worker thread kicking in).

So far as I can surmise a Zoom FFT depends on how efficient you can make anti-alias filtering. That is where I know longer have a strong grip on the fundamentals. I can say that phase is not so important to us, which makes FIR available. However, whether FIR or IIR makes more sense in this context, I do not know. Additionally, within the classes of filtering, is there any performance difference time wise of say Butterworth vs. Chebyshev? Also, what role would normal vs. cascading (default in the non-advanced versions) play here?

If you have any hints about this type of stuff before I spent a chunk of time setting up benchmarks, it would be greatly appreciated, even if you have some good references that I can check out on my own.

Thanks!

0 Kudos
Message 1 of 4
(1,979 Views)

Hi ConnerP,

 

      First a few clarifying questions: Are you interested in true zooming (so between 200 and 400 kHz) or are you looking for decimation for two different bands, resp. DC-200 kHz and DC-400 kHz?

       I am asking because I am not sure what you mean with No. of Bands = 2

 

       In general if you are only interested in frequencies up to 400 kHz your sample rate of 20 MS/s is pretty high and I would think a simple decimation could improve your performances. Whether you should use an FIR or IIR filter depends on your requirements. You mention that the phase response is not critical so I would go for IIR that require significantly fewer operations than FIR. A simple Butterworth or even an Elliptic filter should work. Which order to use depends on your passband ripple and stopband attenuation requirements. Let's take a few numerical examples.

 

Decimating from 20 MS/s to 1 MS/s (20 times)

    This requires a very sharp filter if your cut-off frequency is 400 kHz. I would go for Elliptic in this case and select design parameters like

passband frequency: 400 kHz

stopband frequency: 600 kHz

passband ripple: 1 dB or less

stopband attenuation: 80 dB or more

 

Decimating from 20 MS/s to 2.5 MS/s (8 times)

A -     An elliptic filter with a much lower order can be considered. Same specifications as before except for the stopband frequency that is now 2.5 - 0.4 = 2.1 MHz

 

B -     A Butterworth lowpass filter with cut-off at 400 kHz will attenuate approx 14.4 dB per 'order' at 2.1 MHz (20 * log (2.1 / 0.4)). A sixth order filter will therefore give you approx. 86 dB attenuation. The 3 dB attenuation at 400 kHz also needs to be considered.

 

   Once you've decimated your signal you can calculate the FFT directly. I don't think further zooming to remove the DC-200 kHz band is worth it.

 

    A few words about FIR and cascading.

  • FIR filters are generally more suitable for hardware decimation. You can take advantages of parallelization in your FPGA or DSP chip and even restrict the operations to the ones that are relevant for your result (no need to calculate intermediate samples that will be removed when decimating). These advantages are usually less obvious when calculating on a host processor
  • Cascading may not be worth the trouble for decimation <= 20x Also here this may be more relevant when your decimation is performed in hardware where operations like CIC can significantly improve performances.

All this is guessing but I hope it helps...

0 Kudos
Message 2 of 4
(1,956 Views)

Hi LocalDSP,


Sorry I wasn't clear enough. I meant that we are interested in a zoom on two different bands, each of width 200-400 kHz. So for example, we may be interested in the information within 400--800 kHz as well as 1800--2200 kHz from the same measurement. At present we only investigate up to max 3MHz, but that is an imposed limitation of the photodiode (with integrated filter) we use to capture our signal; we hope to go to gain access to higher frequencies in the future with a different photodiode setup.

0 Kudos
Message 3 of 4
(1,947 Views)

Ah... actually you were pretty clear, I just misread your specifications Smiley Frustrated.

Some thoughts.

  • If you choose to for example decimate by 8x the resulting FFT will run approx. 10 times faster
  • For 20x decimation the FFT will be approx. 25x faster at the cost of a more demanding filter
  • You'll need two set of operations since you need to analyze two bands
  • The overall speed increase is therefore 5x (for 8x decimation) but that has to be weighted against the two mixing. filtering, data management (decimation) and complex FFT that will be needed for the zoom

It may be tight so unfortunately I think you'll have to benchmark the different options in order to optimize your performances. Again the best trade-off may depend on your filtering requirements (passband and stopband specifications)

0 Kudos
Message 4 of 4
(1,934 Views)