LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Single Frequency Magnitude and Phase extraction comparison

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

 

Quiztus2_0-1712559274428.png

Phase and Magnitude Extraction Speed 24.png

0 Kudos
Message 1 of 3
(285 Views)

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.

Quiztus2_0-1713268638266.png

Benchmark.png

0 Kudos
Message 2 of 3
(154 Views)

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.

0 Kudos
Message 3 of 3
(142 Views)