Prev: DSK 6713
Next: alternatives to correlation
From: jim on 23 Mar 2010 19:48 "Scott T." wrote: > > Thank you for your replies. I guess I should have made it more clear that > I am doing the filtering in the frequency domain by multiplying FFTs. This > corresponds to a circular convolution unless you zero pad both the input > and impulse response to L+P-1 before taking the DFT. OK I didn't catch that your implementation was multiplying in the frequency domain. The impulse response is usually short with respect to the length of the data. Is L the length of the impulse response and P is the length of the data? If so padding both time domain sequences to length L+P-1 before taking the DFT sounds correct to avoid wrap around. > I don't have an explicit version of the impulse response, so it is > difficult to just delay the response to make it causal. Although I suppose > I could multiply the frequency response function by a complex exponential > to create a delay. Yes, coming up with the correct complex exponential would amount to the same thing as deciding where to append the zeroes. See "FFT shift theorem". -jim > > My real question is where the zeros padding needs to be in a non-causal > filter for the output to be identical to linear convolution, not circular > convolution. In this case, I figured out that traditional zero padding > actually gives me a circularly shifted version of a linear convolution. > Knowing where to take the samples from solves the problem. |