2
$\begingroup$

Currently I've implemented an overlap-add method using resources on the internet, but I couldn't find a well documented way to minimize the cost of the method. In other words, how do I pick the window size so that the algorithm would work with the best performance possible? For now I use impulse response size and a constant multiplier to determine window size, but since the input signal size might vary, how to determine multiplier in relation to the input signal size?

My concern is performance, but the bottleneck is not addition, but the amount of performed FFT convolutions. Experimentally I found out that for each impulse response size there is an optimal window size, yet it varies. For example, if I pick 40000 samples of input signal and 128 samples of impulse response signal the optimal ratio between window and impulse response lengths is approximately 1:24.

It seems that Wikipedia suggests to use 1:8 ratio for both methods, as seen in the pseudocode of both overlap-add and overlap-save methods, then in the next section they provide measures of complexity for the methods, but I'm unable to wrap my head around how to utilize this information.

$\endgroup$
8
  • $\begingroup$ Have you read the answer to this question and the article cited there? $\endgroup$
    – Matt L.
    Jan 27, 2020 at 11:54
  • $\begingroup$ @MattL. what article? It leads to the 404 page $\endgroup$
    – Ocelot
    Jan 27, 2020 at 12:24
  • $\begingroup$ Try again, it's there now. Google is your friend. $\endgroup$
    – Matt L.
    Jan 27, 2020 at 12:56
  • 1
    $\begingroup$ I have a comprehensive answer about this in another answer. You still have to come up with your relative cost coefficients, but if you have a 128 sample impulse response, i think you want an FFT size of either 512 or 1024. $\endgroup$ Oct 24, 2020 at 17:46
  • 1
    $\begingroup$ I recommend the paper by fred harris “On the Use of windows for harmonic analysis using the discrete Fourier transform” where he provides the analytic considerations you seek $\endgroup$ Jun 21, 2021 at 17:02

1 Answer 1

-1
$\begingroup$

The optimal size is likely not just algorithmic, but depends on the cache sizes and levels and the compute-to-memory-bandwidth ratio for the particular processors and systems(s) on which you plan to run this code. Also, your applications latency requirements (which filling big FFTs add).

$\endgroup$
1
  • 1
    $\begingroup$ Well I assume that's why we have big O notation. So what's the solution, can't we at least approximate the optimal size? $\endgroup$
    – Ocelot
    Jan 28, 2020 at 8:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.