Forums

Unbiased Correlation Estimate

Started by porterboy February 20, 2004
The Matlab function xcorr has an 'unbiased' option whereby the
estimated correlation values are scaled by a value relative to their
lag. How does this give an unbiased estimate? Any good references?

A further question: I'm using xcorr to generate the correlation values
in the Weiner-Hopf equations for an FIR equalizer. Should I use the
'unbiased' option?

Cheers my Dears
"porterboy" <porterboy76@yahoo.com> wrote in message
news:c4b57fd0.0402200532.7cf38500@posting.google.com...
> The Matlab function xcorr has an 'unbiased' option whereby the > estimated correlation values are scaled by a value relative to their > lag. How does this give an unbiased estimate? Any good references? > > A further question: I'm using xcorr to generate the correlation values > in the Weiner-Hopf equations for an FIR equalizer. Should I use the > 'unbiased' option? > > Cheers my Dears
Hello Porterboy, Not knowing the matlab function, I just have to hazard a guess. But since linear correlation between two finite length sequences gives a bias towards zero lag, they are just compensating for it. Imagine doing the correlation of two constant vectors i.e., all elements are 1. then the correlation yields a triangular shaped function. Since the correlation (for this example) is technically the same at all offsets, then we need to weigh more heavily (inverse triangular function) the nonzero offset values. This triangular feature arises from the fact that as the offset increases, away from zero, that the correlation sum contains fewer and fewer terms. The sum contains n+m-1-k terms where m and n are the lengths of the vectors and k is the lag. So to put all offsets on the same footing, just scale the output by (n+m-1)/(n+m-1-k). IHTH, Clay -- Clay S. Turner, V.P. Wireless Systems Engineering, Inc. Satellite Beach, Florida 32937 (321) 777-7889 www.wse.biz csturner@wse.biz
Clay got is exactly right.  Yes, you should use this option for your
Weiner-Hopf equations.  However, be warned that correlation estimates become
increasingly inaccurate as you move away from zero (the center of the
xcorr() output) because there are fewer samples that were used to makes
these estimates.  In other words, don't solve for too many taps!  ("too
many" is relative of course.  sorry about that.)

Matt

"Clay S. Turner" <CSTurner@WSE.Biz> wrote in message
news:aopZb.38190$kR3.13307@bignews4.bellsouth.net...
> "porterboy" <porterboy76@yahoo.com> wrote in message > news:c4b57fd0.0402200532.7cf38500@posting.google.com... > > The Matlab function xcorr has an 'unbiased' option whereby the > > estimated correlation values are scaled by a value relative to their > > lag. How does this give an unbiased estimate? Any good references? > > > > A further question: I'm using xcorr to generate the correlation values > > in the Weiner-Hopf equations for an FIR equalizer. Should I use the > > 'unbiased' option? > > > > Cheers my Dears > > > Hello Porterboy, > > Not knowing the matlab function, I just have to hazard a guess. But since > linear correlation between two finite length sequences gives a bias
towards
> zero lag, they are just compensating for it. Imagine doing the correlation > of two constant vectors i.e., all elements are 1. then the correlation > yields a triangular shaped function. Since the correlation (for this > example) is technically the same at all offsets, then we need to weigh
more
> heavily (inverse triangular function) the nonzero offset values. This > triangular feature arises from the fact that as the offset increases, away > from zero, that the correlation sum contains fewer and fewer terms. The
sum
> contains n+m-1-k terms where m and n are the lengths of the vectors and k
is
> the lag. So to put all offsets on the same footing, just scale the output
by
> (n+m-1)/(n+m-1-k). > > IHTH, > Clay > > > -- > Clay S. Turner, V.P. > Wireless Systems Engineering, Inc. > Satellite Beach, Florida 32937 > (321) 777-7889 > www.wse.biz > csturner@wse.biz > > > >
"Matt Roos" <XXmatt.roos@verizon.net> wrote in message news:<OstZb.54798$1S1.23092@nwrddc01.gnilink.net>...
> Clay got is exactly right. Yes, you should use this option for your > Weiner-Hopf equations. However, be warned that correlation estimates become > increasingly inaccurate as you move away from zero (the center of the > xcorr() output) because there are fewer samples that were used to makes > these estimates. In other words, don't solve for too many taps! ("too > many" is relative of course. sorry about that.)
I think I may not have to use the unbiased option. Suppose I have two vectors of data of 1000 samples each, representing the channel input and output, call them x and y. Suppose the equaliser I am designing only has ten taps. Then I only need to estimate ryy and rxy over ten values. So if I use 990 of the thousand samples in x and y, and use a sliding window, then I have enough data support to ensure that outer estimates are unbiased. I suppose it could be argued that by using the full thousand samples and weighing the outer values to remove bias will result in a theoretically better estimate of ryy or rxy, however the improvement is probably too marginal to warrant the necessary computation. Anyway, thanks guys, you gave me a good understanding of the issue.