I have a two vectors of spatial data (each about 2000 elements in length). One is a convolved version of the other. I am trying to determine the kernel that would produce such a convolution. I know that I can do this by finding the inverse Fourier transform of the ratio of the Fourier transforms of the output and input vectors. Indeed, when I do this I get more or less the shape I was expecting. However, my kernel vector has the same dimensionality as the two input vectors when in reality the convolution was only using about one fifth (~300-400) of the points. The fact that I am getting the right shape but the wrong number of points makes me think that I am not using the ifft and fft functions quite correctly. It seems like if I were really doing the right thing this should happen naturally. At the moment I am simply doing;

FTInput = fft(in); 
FtOutput = fft(out);
kernel = ifft(FtOutput./FTInput).

Is this correct and it's up to me to interpret the output vector correctly or have I oversimplified the task? I'm sure it's the latter, I'm just not sure where.

  • 2
    $\begingroup$ Is your input data zero-padded on both sides to the length of the convolution kernel? It should be, otherwise you loose information there, which might be the reason for these artifacts. $\endgroup$ Commented Dec 13, 2011 at 11:50

1 Answer 1


If you have noise present in your signal, the straightforward Fourier domain division will cause plenty of errors in your result. Some ways to avoid it are by using the so-called dual channel FFT (Part 1 and Part 2). I can also suggest deconvolution via adaptive filters, LMS or NLMS ([Normalized] Least Mean Squares) filters in particular are easy to understand are not hugely expensive in terms of CPU cycles in case your signals are long. LMS adaptive filters are very robust to noise.

  • $\begingroup$ That worked a treat thanks and I discovered a whole new type of thing I didn't know existed. $\endgroup$
    – Bowler
    Commented Dec 13, 2011 at 19:50
  • $\begingroup$ @Phonon are those links working? What is this a sign up for exactly? $\endgroup$
    – Spacey
    Commented Mar 17, 2012 at 5:54
  • $\begingroup$ @Mohammad: It's for accessing Brüel & Kjær technical review articles and books. Sign-up is free and gives access to many good articles. $\endgroup$
    – Thor
    Commented Jul 20, 2012 at 20:20

Your Answer

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

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