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.
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.
All this is guessing but I hope it helps...
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.
Ah... actually you were pretty clear, I just misread your specifications .
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)