Hi, Just say I am using the FFT (in matlab) to compute the crosscorrelation of 2 discrete time signals, each of length N. I've tried 2 cases 1) zero-padding to a length of 2N, in order to avoid circular convolution (aliasing effects) 2) zero-padding to a length of 8N. I expected that case 2) would give me a better estimate on the lag, but it seems like the estimate is worse! Is there such thing as too much zero padding? Thanks!! This message was sent using the Comp.DSP web interface on DSPRelated.com

# Zero padding and Cross Correlations

Started by ●February 2, 2005

Reply by ●February 2, 20052005-02-02

"dspchick" <sarah.ali1@gmail.com> wrote in message news:1100t92ljn6vdc0@news.supernews.com...> Just say I am using the FFT (in matlab) to compute the crosscorrelation of > 2 discrete time signals, each of length N. I've tried 2 cases > > 1) zero-padding to a length of 2N, in order to avoid circular convolution > (aliasing effects) > > 2) zero-padding to a length of 8N. > > I expected that case 2) would give me a better estimate on the lag, but it > seems like the estimate is worse! Is there such thing as too much zero > padding?Hi Sarah, The result of the convolution should be exactly the same, except the 8N output buffer will have an extra 6N zeros in the middle. I can only guess that you're estimating the lag incorrectly. Remember that in the 8N convolution output, the 8N-xth sample corresponds to lag -x, not lag 8N-x, for x<=4N. Similarly, for the 2N output, the 2N-xth sample is for lag -x. Hope that helps, Matt