04-08-2024 01:56 AM - edited 04-08-2024 02:44 AM
I try to find the fastest way to extract the magnitude and phase from a defined frequency in my measured, noisy signal.
I inserted the ROIed extraction of the signal into this, since I work on a ROIed dataset of significant size and copying this dataset in my application is memory and time consuming.
My findings so far are the FFT block is pretty fast, but significantly outpaced by Goertzel algorithm.
I don't really get why using the complex DFT formula on a single frequency is that much slower.
In real application the Goertzel is not as fast as <10 ms, but it is still twice as fast as FFT block.
Any comments are appreciated
04-16-2024 06:58 AM
I dont know why his post disappeared, but @altenbach suggested to try multiplication with a preallocated complex waveform. The result is pretty similar to using exp block.
04-16-2024 08:31 AM
As a first step, make sure that you are benchmarking right. Force sequential execution of the frame structures by using the loop timers or something. The data array output from the innermost loops completeley kills the performance. Since the last loop does not have this output it wins easily. Then you need to use High Resolution Relative Seconds to compare runtimes.