Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [fast-convolution]

Fast convolution is using the FFT, multiplication in the frequency domain, and inverse FFT to perform convolution of a long signal with a long FIR.

Filter by
Sorted by
Tagged with
1 vote
2 answers
100 views

Linear convolution of a 100 sample time series and a 20 tap filter in the frequency domain

I came across this question on an internship application. For context, I'm three years into my bachelor's for electrical engineering right now. I have learned continuous and discreet convolutions, so ...
Ashik Islam's user avatar
0 votes
1 answer
58 views

Non-uniformly partitioned convolution in real time

I am implementing a real-time convolution reverb. I currently have a working implementation, doing frequency-domain multiplication after FFT, using uniformly partitioned block sizes. This answer on ...
Dani S.'s user avatar
  • 53
2 votes
0 answers
128 views

cyclic convolution: still have problems in understanding it correctly

I have the following scenario where there are 9 input boxes $S_{m\prime}$ and each box contain $L$ samples. I transfer the input samples of $S_{m\prime}$ to $G_m$ by multiplying and summing each ...
jomegaA's user avatar
  • 659
1 vote
1 answer
261 views

Convolution of two functions using FFTW

I'm trying to perform a discrete convolution of two functions, $f(x) = 1$ and $g(x) = \exp(-x)$ of length nsize using FFTW. I have followed the procedure for zero-...
gebegb's user avatar
  • 11
2 votes
1 answer
671 views

Convolving Image with Kernel with Fourier

I am trying to convolve an image with the code above using Convolution Theory and numpy's Fourier transform. However, my output seems to be slightly different than the result from scipy. I am not sure ...
Toast's user avatar
  • 23
7 votes
0 answers
300 views

Avoid circular convolution aliasing in weighted overlap-add (WOLA) method

This link gives the procedure of implementing the WOLA method. It can be summarized briefly as windowing the extractd data frame, FFT, modify the spectrum, IFFT and overlap-add the windowed IFFT ...
ecook's user avatar
  • 379
9 votes
2 answers
2k views

FFT-based fast convolution vs IIR filtering

I'm doing an multichannel audio equalizer system on a chip, which is parametric EQ, usually implemented in cascaded biquad IIR filters. My problem is that I use a lot of IIR filters due to multiple ...
DSP novice's user avatar
5 votes
3 answers
1k views

Why is sweeping in convolution so confusing

From this formula, I thought that time constant (m or tau) is the variable sweeping from -infinity to infinity. But in this visualisation https://lpsa.swarthmore.edu/Convolution/CI.html, it is t the ...
Struggling_In_Final's user avatar
0 votes
3 answers
120 views

Signature for the kernels in fast-convolution

Continuing the discussion from Convolution kernel in Bluestein's algorithm it has a very specific signature of the kernel ...
jomegaA's user avatar
  • 659
0 votes
1 answer
81 views

How to zero pad a 3d data and apply fast convolution?

I have two sequences, Let $A$ be the first sequence whose dimensions are $(5, 5, 3)$ takes complex values Let $B$ be the second sequence whose dimensions are $(5, 5, 1)$ also takes complex values I ...
jomegaA's user avatar
  • 659
0 votes
1 answer
240 views

What means `crop` in FFT calculation?

In soapy power manual: Crop: -o PERCENT, --overlap PERCENT percent of overlap when frequency hopping (incompatible with -k) -k PERCENT, --crop PERCENT percent of crop when frequency hopping (...
kittygirl's user avatar
  • 175
1 vote
3 answers
944 views

Are there any reasons to use overlap algorithm when one could do ifft(X * Y) from the complete signal as well in similiar time complexity

We learned that overlap add and overlap save are used as fast convolution methods, because they can be applied with fft due to the formula $x[n] * y[n] = \text{IFFT}(X[k] Y[k])$ So now I was wondering ...
OuttaSpaceTime's user avatar
1 vote
1 answer
489 views

Convolve audio signal with filter with different sampling rates

I would like to convolve two signals: Room impulse response that was obtained by deconvolution, measured at 48 kHz. Truncated to 8192 samples. Anechoic recording (.wav) recorded at 41.1 kHz If I ...
Mia1's user avatar
  • 13
0 votes
1 answer
120 views

Result of convolution using FFT method not accurate in time

I am trying to implement fast convolution between a signal and complex Morlet wavelets. To make the result equivalent to a linear convolution, I let the MATLAB fft function zero-pad both the signal ...
PerryMan2021's user avatar
4 votes
1 answer
320 views

Dealing with the Cyclic Boundary Conditions of Frequency Domain Convolution in Order to Apply Linear Convolution

...
Simon Balfe's user avatar
0 votes
0 answers
163 views

Subband Tuning in Matlab

Suppose you have an i/q stream with a sample rate of 20 MHz. You want to bandpass filter a 1 MHz bandwidth (ie passband from 5 to 6 MHz). You then want to heterodyne that 1 MHz chunk. How would you do ...
random_dsp_guy's user avatar
-1 votes
1 answer
170 views

FFT for Arbitrary time history

I have two Time-Speed histories one is real ( real measurements) the other is synthetically generated using formula. I need to compare both in the frequency domain using FFT given that: the time step ...
Khalid's user avatar
  • 1
5 votes
2 answers
531 views

Explain the Process of Spectral Pooling and Spectral Activation in the Context of CNN in Frequency Domain

I am reading the paper Design of an energy efficient accelerator for training of convolutional neural networks using frequency Domain Computation: which uses Frequency Pooling, from Spectral ...
Eduardo Reis's user avatar
2 votes
0 answers
157 views

Multiple 1D gaussian filter

Given $$ \begin{cases} &f_0(x)=1 \\ &f_{n+1}(x)= (\varphi*(f\mathbb{I}_{[a_n,b_n]}))(x)=\int_{-\infty}^{+\infty}\varphi(x-t)f_n(t)\mathbb{I}_{[a_n,b_n]}(t)dt = \int_{a_n}^{b_n}\varphi(x-t)f_n(...
NN2's user avatar
  • 143
2 votes
1 answer
878 views

Fast computation of a convolution integral with Gaussian kernel

Given a convolution integral with gaussian kernel $$ g(y) =\int_a^b\varphi(y-x)f(x)dx=\int_{-\infty}^{+\infty}\varphi(y-x)f(x)\mathbb{I}_{[a,b]}(x)dx $$ where $\varphi(x)= \frac{1}{\sqrt{2\pi}}\exp{\...
NN2's user avatar
  • 143
3 votes
1 answer
468 views

ringing artifacts using FFT-based gaussian blurring

I'm trying to do an FFT-based gaussian blur on a grayscale image, and it works, however it seems to introduce ringing artifacts to the result when compared to the expected direct filter. What can I do ...
Rotem Shalev's user avatar
0 votes
3 answers
299 views

Role of windowing in implementing FIR filters using Fast Convolution

In Fast Convolution the filtering is performed by taking FFT of both the signal and impulse response and multiplication in frequency domain using Overlap add/Overlap save method for processing ...
malik12's user avatar
  • 488
5 votes
2 answers
502 views

Why is FFT-based convolution efficient only for signals of large size?

According to the documentation of scipy.signal.fftconvolve This is generally much faster than convolve for large arrays (n > ~500), but can be slower when only ...
orbit's user avatar
  • 95
6 votes
3 answers
4k views

Can FFT convolution be faster than direct convolution for signals of large sizes?

Let's say I have a 1D signal of size $N$ and am trying to filter it with a 10-tap FIR filter mask. When $N$ is large, the number of multiply-accumulates would approximately equal $$2 \times 10 \times ...
Izzo's user avatar
  • 872
1 vote
1 answer
895 views

Computing Autocorrelation via FFT

I have seen several methods to calculate Autocorrelations using FFTs, and am confused about why they differ. Zero-Pad it to double its original length.Take the FFT. Then replace all the coefficients ...
Tom Huntington's user avatar
0 votes
1 answer
98 views

Confusion regarding plot of linear convolution vs fast convolution via FFT

Question [Example 5.23 of Digital Signal Processing Using MATLAB Third Edition By Vinay K. Ingle and John G. Proakis ] I am not getting same plot/results as book ...
DSP_CS's user avatar
  • 1,870
7 votes
0 answers
387 views

Efficient Convolution Without I/O Delay (Gardner 1995) implementation

I am trying to perform real-time convolution on an audio stream using a fairly large FIR for convolutional reverb. I found a great paper explaining how to do just that: Gardner, 1995. But, I'm new to ...
QuinnF's user avatar
  • 171
0 votes
0 answers
603 views

Handling stride>1 in FFT-based convolution

The Fourier transform of the convolution of two signals with stride 1 is equivalent to point-wise multiplication of their individual Fourier transforms. I need to perform stride-'n' convolution using ...
psj's user avatar
  • 71
2 votes
1 answer
499 views

How do I pick an optimal window size for overlap add/save method algorithmically

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 ...
Ocelot's user avatar
  • 121
1 vote
1 answer
4k views

How to manually implement convolution with FFTs?

I'm trying to manually implement a convolution using FFTs and it isn't working as expected. I know I'm probably missing some subtlety with padding, shifting, or conjugation, (all of which I've tried ...
argentum2f's user avatar
3 votes
0 answers
97 views

Understanding convolution of Chirp z algorithm

I dont´t understand how works the convolution part of the Chirp z. I understand how the DFT is transformed \begin{align*} x(k) = \sum_{n=0}^{N-1} x(n) W_N^{kn} \end{align*} to this expresion: \...
afa245's user avatar
  • 31
2 votes
1 answer
826 views

How does minimum-latency partitioned convolution reverb work when you receive input samples in chunks, rather than one at a time?

I'm writing a reverb system where I receive an input block of samples 480 elements long, do some operation on them, and pass the block on to the next effect. I've been reading up on partitioned ...
Ott's user avatar
  • 37
6 votes
1 answer
1k views

Overlap Add - which length to use?

I am doing realtime audio. Let's say I have a signal $x(n)$ which is passed in blocks of 512 (siobuffer) to the program filter/FFT method. Within this block I want to convolve the signal with the ...
f.f's user avatar
  • 101
2 votes
0 answers
204 views

Correct way of derivating in frequency domain with FFT

I believe I am very close to the answer and only need a small nudge to get to the answer. What I want: I want to take a signal, use FFT to transform it to the frequency domain (FD), multiply it by $...
Harry Svensson's user avatar
5 votes
1 answer
854 views

What is the Fastest Way Ever to Do 2D Correlation?

Here is what i gathered so far: Any sliding window classification, image filtering or similar can be fastly done by a FFT (flip the signal and do convolution). Also, if the template/filter kernel is ...
Pedro Henrique Monforte's user avatar
3 votes
0 answers
99 views

Convolution of signals sampled on a logarithmic grid

Is there a practical accelerated algorithm or a theoretical discrete (Fourier) transform based method to convolve discrete-time signals sampled on a logarithmic grid? What I mean is representing a ...
Olli Niemitalo's user avatar
1 vote
1 answer
239 views

Perform overlap add with available FFT size smaller than filter coefficients

I would like to process 12 to 20 seconds of incoming audio at a sample rate of 44100. I must process this audio in real time in an STM embedded kit (perhaps also an Android Smartphone). I'm trying to ...
VMMF's user avatar
  • 1,142
1 vote
2 answers
1k views

Linear Convolution in DSP and Hann window

My understanding is that when dealing with discrete finite sequences, convolution done thru FFT is circular. To obtain linear convolution, one would pad the input with zeros up some appropriate length....
Ong Beng Seong's user avatar
0 votes
2 answers
117 views

How to detect a long signal inside an even longer one?

I'm trying to detect a long pattern inside a long recorded audio. In order to do so I am implementing a matched filter in time by performing a FIR filtering using the coefficients of my pattern ...
VMMF's user avatar
  • 1,142
2 votes
1 answer
3k views

Decimation and filtering in the frequency domain

I'm working on a Software Defined Radio project where I'd like to low-pass filter and decimate an analytical signal (IQ) sampled at 96ksps. Let's say the low-pass filter has a cutoff at 5kHz and I'd ...
Albin Stigo's user avatar
1 vote
1 answer
79 views

position of useful filtered data inside DFT based filtered output

I'm trying to filter a 400 samples signal with various bandstop FIR filters (constant group delay), one at a time to see which one gives me the desired result. Every filter was build using the Kaiser ...
VMMF's user avatar
  • 1,142
10 votes
5 answers
2k views

Fast & accurate convolution algorithm (like FFT) for high dynamic range?

It seems that FFT-based convolution suffers from limited floating-point resolution due to evaluating everything around the roots of unity, as you can see in the $10^{14}$-factor error in this Python ...
user541686's user avatar
0 votes
1 answer
452 views

Amplitude not attenuated after bandpass filtering?

I want to make a bandpass filter for an IQ signal recorded from an Software Defined Radio with center frequency "Fc" & sampling frequency "Fs". For futhur analysis I wanted to focus upon signal ...
Andre Smith's user avatar
1 vote
0 answers
44 views

Can this robot trajectory smoothing function be expressed as a single convolution?

I have an Nx3 matrix of poses (x, y, theta) that I need to apply an algorithm on which will cause the trajectory to be smoothed. I am interested in performance and so would like to improve efficiency ...
Klik's user avatar
  • 107
3 votes
2 answers
575 views

Can I compute convolution through the overlap and add method without the IFFT?

So, I'm (I think) aware of how the overlap and add algorithm for linear convolution works, but my question is that, suppose I have a FFT-ed set of sequences that belong to a large sequence. Can I add ...
user3003467's user avatar
4 votes
2 answers
605 views

Understanding DFT-ODD operation in Gardner Efficient Convolution paper

As a newbie to DSP I am trying to understand and implement an efficient convolution engine as per JAES V43.3 1995/03 - Gardner - Efficient Convolution without I/O Delay. I'm pretty much there with a ...
Mark's user avatar
  • 225
2 votes
3 answers
951 views

Could there be any reason to prefer convolution-based calculation of autocorrelation?

Theoretically both of ways of calculating autocorrelation function are identical: strightforward convolution and Fourier-based method where we use FFT/iFFT in practice. And as it is well known, the ...
user3160867's user avatar
6 votes
1 answer
4k views

Implementing Convolution in Frequency Domain?

Suppose, we have a bitmap image represented as a 2D integer array, int [,] image2D; whose FFT is Complex[,] fftImage2D; ...
user avatar
0 votes
1 answer
351 views

Slight crackle with overlap-add frequency-domain convolution

I'm trying to make an FFT audio filter using overlap-add but there's some slight rhythmic distortion/crackle in the output. I have an irSize (impulse response size) of 512 samples and a blockSize of ...
Robert Clouth's user avatar
1 vote
0 answers
830 views

Overlap add / overlap save using FFTW

I'm working on a realtime FFT processing algorithm in C using PortAudio. Currently I'm just trying to test if I can do OLA / OLS in (semi) real time using FFTW. I'm getting some distortion in the ...
zhiguang's user avatar
  • 131