Related to this question: Convolution in frequency space with fft and ifft -> num output samples?

When doing convolution in time domain by doing multiplication in frequency domain, you apparently can zero pad the time domain samples if you want the time domain convolution result (ifft of the fft multiplication result), to make the resulting time domain convolution be the "correct" length (len(a)+len(b)-1).

What I'm wondering is what do you do if you don't have the time domain samples yet?

I'm generating two sets of IFFT bin data, doing convolution by multiplying in the frequency domain, and then using IFFT to turn the convolution result into time domain data.

When i do this, the result is the same length as my IFFT bins though, instead of the length i would expect.

How do I lengthen the result in the frequency domain?


  • $\begingroup$ "I'm generating two sets of IFFT bin data..." -- i'm gonna call them $H_1[k]$ and $H_2[k]$. what time-domain functions, $h_1[n]$ and $h_2[n]$ do they correspond to? do they appear zero-padded? $\endgroup$ – robert bristow-johnson Apr 10 '15 at 23:45
  • $\begingroup$ Hey RBJ, they are one period of a band limited saw wave and a bl square wave and no they don't look zero padded but I sure would like them to look like they were (: trying to make equivalent output (for demonstration purposes) of doing convolution both ways (frequency and time domain) when starting with ifft bin data. $\endgroup$ – Alan Wolfe Apr 10 '15 at 23:50
  • $\begingroup$ well, to convolve using the FFT, you have to guarantee that $X_1[k]$ and $X_2[k]$ are the DFT of discrete functions $x_1[n]$ and $x_2[n]$ that are zero-padded with a total of N-1 zeroed samples. (N is the FFT length.) so if you're constructing $X_1[k]$ and $X_2[k]$ directly in the frequency domain, you don't know that until you iFFT back to time domain and, likely window to zero samples or, say double the size (double N). $\endgroup$ – robert bristow-johnson Apr 10 '15 at 23:57
  • $\begingroup$ Oh wow, so is it basically not possible (or not easily done in the general case)? Thanks so much for the help (: $\endgroup$ – Alan Wolfe Apr 11 '15 at 0:01
  • 1
    $\begingroup$ hey, maybe you want circular convolution. the DFT is has periodicity built into it. $\endgroup$ – robert bristow-johnson Apr 11 '15 at 0:13

assuming I understand it, your question is interesting. I'm "shooting from the hip" here. I wonder if it would be useful to you to interpolate your two freq-domain sequences by a factor of two before the multiplication in the freq domain, and then performing your IFFT of the product? [-Rick-]


Per RBJ I can't do what I want to do, but maybe it isn't even what I want to do in the first place. Adding this to be able to close the question as answered.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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