PDA

View Full Version : Coherence and window functions


Rune Allnor
04-11-2007, 09:49 AM
Hi folks.

I have been testing the coherence formula

cxy(f) = |Cxy(f)|^2/(|Cxx(f)||Cyy(f)|) [1]

where Cxy(f) is the xy cross spectrum coefficient at frequency f and
Cxx(f) and Cyy(f) are the periodogram coefficients at frequency f of
x and y, respectively.

I compute the spectra as

- Compute the correlation sequences rxx[m], rxy[m] and ryy[m]
- Apply a covariance bias function b[m]
- Apply a window function w[m]
- Transform to frequency domain
- Apply the spectra to formula [1] above

I have tested this formula with signals x[n] = sin(2*pi*f*n) and y[n]
= cos(2*pi*f*n)
with various noise and other degradations. In other words, these are
narrowband
signals.

I find that the behaviour of the coherence formula depends very
strongly
on the window functions used in the algorithm above.

================================================

--- Case 1: Biased covariance + rectangular window

If one uses the "usual" covariance estimator with bias window
b[m]=(N-|m|)/N
and a rectancular window function w[m] = 1, then cxy == 1 for all f.

--- Case 2: Unbiased covariance + rectangular window

If one corrects for the covariance bias such that b[m] = 1, the
coherence
fluctuates wildly cxy(f) >> 1 outside the band where the sinusoidals
are defined, and approaches unity near the frequencies of the sines.

--- Case 3: Biased covariance estimator + non-rectanguar window

If one uses the bias function b[m]=(N-|m|)/N with any winow function
other than the rectangular window, the coherence estimate equals
unity
inside the bandwidth where the sinusoidals are, and/or lower,
0 <= cxy(f) <= 1, elsewhere.

--- Case 4: Unbiased covariance estimator + non-rectangular window

In these cases the coherence estimate is still unity near the
sinusoidals
but fluctuates wildly (cxy(f)>> 1) elsewhere.

==================================================

I would like to understand what is happening here. One might say that
"there is no problem since the coherence always equals unity where
it ought to; what happens in the noise bands is irrelevant anyway."
While this might be true, it is of no help when one approaches the
borderline conditions with weak signals in noise.

The above has to be well-known material, and ought to be described
and discussed somewhere. I would appreciate any pointers to
where such discussions might be found.

Rune

dbd
04-11-2007, 11:58 AM
On Apr 11, 1:49 am, "Rune Allnor" <[email protected]> wrote:
> Hi folks.
>
> I have been testing the coherence formula
>
> cxy(f) = |Cxy(f)|^2/(|Cxx(f)||Cyy(f)|) [1]
>
> ...
>
> The above has to be well-known material, and ought to be described
> and discussed somewhere. I would appreciate any pointers to
> where such discussions might be found.
>
> Rune

Have you tried B&K?

Dual Channel FFT Analysis (Part I)
Technical review No. 1 - 1984
http://www.bksv.com/pdf/bv0013.pdf

and

Dual Channel FFT Analysis (Part II)
Technical review No. 2 - 1984
http://www.bksv.com/pdf/bv0014.pdf

Dale B. Dalrymple
http://dbdimages.com

drohm
04-11-2007, 07:57 PM
>Hi folks.
>
>I have been testing the coherence formula
>
>cxy(f) = |Cxy(f)|^2/(|Cxx(f)||Cyy(f)|) [1]
>
>where Cxy(f) is the xy cross spectrum coefficient at frequency f and
>Cxx(f) and Cyy(f) are the periodogram coefficients at frequency f of
>x and y, respectively.
>
>I compute the spectra as
>
>- Compute the correlation sequences rxx[m], rxy[m] and ryy[m]
>- Apply a covariance bias function b[m]
>- Apply a window function w[m]
>- Transform to frequency domain
>- Apply the spectra to formula [1] above
>
>I have tested this formula with signals x[n] = sin(2*pi*f*n) and y[n]
>= cos(2*pi*f*n)
>with various noise and other degradations. In other words, these are
>narrowband
>signals.
>
>I find that the behaviour of the coherence formula depends very
>strongly
>on the window functions used in the algorithm above.
>
>================================================
>
>--- Case 1: Biased covariance + rectangular window
>
>If one uses the "usual" covariance estimator with bias window
>b[m]=(N-|m|)/N
>and a rectancular window function w[m] = 1, then cxy == 1 for all f.
>
>--- Case 2: Unbiased covariance + rectangular window
>
>If one corrects for the covariance bias such that b[m] = 1, the
>coherence
>fluctuates wildly cxy(f) >> 1 outside the band where the sinusoidals
>are defined, and approaches unity near the frequencies of the sines.
>
>--- Case 3: Biased covariance estimator + non-rectanguar window
>
>If one uses the bias function b[m]=(N-|m|)/N with any winow function
>other than the rectangular window, the coherence estimate equals
>unity
>inside the bandwidth where the sinusoidals are, and/or lower,
>0 <= cxy(f) <= 1, elsewhere.
>
>--- Case 4: Unbiased covariance estimator + non-rectangular window
>
>In these cases the coherence estimate is still unity near the
>sinusoidals
>but fluctuates wildly (cxy(f)>> 1) elsewhere.
>
>==================================================
>
>I would like to understand what is happening here. One might say that
>"there is no problem since the coherence always equals unity where
>it ought to; what happens in the noise bands is irrelevant anyway."
>While this might be true, it is of no help when one approaches the
>borderline conditions with weak signals in noise.
>
>The above has to be well-known material, and ought to be described
>and discussed somewhere. I would appreciate any pointers to
>where such discussions might be found.
>
>Rune
>
>


Rune,

Without going into detail here, I would suggest that you look into th
following paper and book:

1. C. H. Knapp and G. C. Carter, “The Generalized
Correlation Method for Estimation of Time Delay”,
IEEE Trans. on Acoustics, Speech, and Signal
Processing, vol. ASSP-24, No. 4, August 1976.

2. G. C. Carter, “Coherence and time delay estimation”,
Proceedings of the IEEE, vol. 75, pp. 236–
255, February 1987.

I like to call the cxy(f) = |Cxy(f)|^2/(|Cxx(f)||Cyy(f)|) the normalize
cross-correlation instead of using the term coherence function. Since th
term coherence came out of early EM and optics theory it does not full
apply outside of narrow band signals. There are many ways to normalize th
cross-correlation and some depend on how much pre-detection knowledge yo
have about the signals and noise. I hope these references can help you.

take care,

DRO




_____________________________________
Do you know a company who employs DSP engineers?
Is it already listed at http://dsprelated.com/employers.php ?

Rune Allnor
04-11-2007, 11:46 PM
On 11 Apr, 20:57, "drohm" <[email protected]> wrote:

> Without going into detail here, I would suggest that you look into the
> following paper and book:
>
> 1. C. H. Knapp and G. C. Carter, "The Generalized
> Correlation Method for Estimation of Time Delay",
> IEEE Trans. on Acoustics, Speech, and Signal
> Processing, vol. ASSP-24, No. 4, August 1976.
>
> 2. G. C. Carter, "Coherence and time delay estimation",
> Proceedings of the IEEE, vol. 75, pp. 236-
> 255, February 1987.
>
> I like to call the cxy(f) = |Cxy(f)|^2/(|Cxx(f)||Cyy(f)|) the normalized
> cross-correlation instead of using the term coherence function. Since the
> term coherence came out of early EM and optics theory it does not fully
> apply outside of narrow band signals. There are many ways to normalize the
> cross-correlation and some depend on how much pre-detection knowledge you
> have about the signals and noise. I hope these references can help you.

Thanks, both of you, for the links. The B&K links were no problem,
the PDFs downloaded without a hitch. The above papers are available
on IEEExplore, and seem to be downloaded to my PC. For some reason
the latter paper doesn't close properly (and the first one took a
very long time to close after download), so I can't save it to disk.

Do anybody else experience similar problems?

Rune

Scott Seidman
04-12-2007, 12:56 AM
"Rune Allnor" <[email protected]> wrote in news:1176281363.105056.40810
@y80g2000hsf.googlegroups.com:

> I would like to understand what is happening here. One might say that
> "there is no problem since the coherence always equals unity where
> it ought to; what happens in the noise bands is irrelevant anyway."
> While this might be true, it is of no help when one approaches the
> borderline conditions with weak signals in noise.


Rune-

The bible for this sort of stuff is Bendat and Peirsol (a student has mine,
so Peirsol might be spelled wrong)

When you use one epoch of data to estimate the auto and cross spectral
densities, the coherence will be identically unity. Use some periodogram
averaging technique, like Welch (epochs overlapping by 50%) to get your
estimates, and try again.


--
Scott
Reverse name to reply