Fast convolution algorithm

后端 未结 2 863
半阙折子戏
半阙折子戏 2021-01-14 04:52

I need to convolve two one dimensional signals, one has on average 500 points (This one is a Hanning window function), the other 125000. Per run, I need to apply three times

相关标签:
2条回答
  • 2021-01-14 05:19

    There are a lot of fast convolution algorithms out there. Most of them use FFT routines such as FFTW. This is because an operation like convolution (in the time domain) reduces to multiplication (of the frequency domain representations) in the frequency domain. A convolution operation that currently takes about 5 minutes (by your own estimates) may take as little as a few seconds once you implement convolution with FFT routines.

    Also, if there is a big difference between the length of your filter and the length of your signal, you may also want to consider using Overlap-Save or Overlap-Add. More information here. If coding in Delphi is not an overriding concern, you might want to use C/C++ if only for the reason that FFTW and some other libraries are available in C/C++ (not sure about scipy or Delphi).

    0 讨论(0)
  • 2021-01-14 05:28

    Fast convolution can be carried out using FFTs. Take the FFT of both input signals (with appropriate zero padding), multiply in the frequency domain, then do an inverse FFT. For large N (typically N > 100) this is faster than the direct method.

    0 讨论(0)
提交回复
热议问题