Sign in

Not a member? | Forgot your Password?

Search Online Books

Search tips

Free Online Books

Free PDF Downloads

A Quadrature Signals Tutorial: Complex, But Not Complicated

Understanding the 'Phasing Method' of Single Sideband Demodulation

Complex Digital Signal Processing in Telecommunications

Introduction to Sound Processing

C++ Tutorial

Introduction of C Programming for DSP Applications

Fixed-Point Arithmetic: An Introduction

Cascaded Integrator-Comb (CIC) Filter Introduction


FFT Spectral Analysis Software

See Also

Embedded SystemsFPGA

Chapter Contents:

Search Mathematics of the DFT


Book Index | Global Index

Would you like to be notified by email when Julius Orion Smith III publishes a new entry into his blog?


Coherence Function

A function related to cross-correlation is the coherence function, defined in terms of power spectral densities and the cross-spectral density by

$\displaystyle C_{xy}(\omega) \isdef \frac{\vert R_{xy}(\omega)\vert^2}{R_x(\omega)R_y(\omega)}.

In practice, these quantities can be estimated by time-averaging $ \overline{X(\omega_k)}Y(\omega_k)$, $ \left\vert X(\omega_k)\right\vert^2$, and $ \left\vert Y(\omega_k)\right\vert^2$ over successive signal blocks. Let $ \{\cdot\}_m$ denote time averaging across frames as in Eq.$ \,$(8.3) above. Then an estimate of the coherence, the sample coherence function $ {\hat
C}_{xy}(\omega_k)$, may be defined by

$\displaystyle {\hat C}_{xy}(\omega_k) \isdef
...\vert^2\right\}_m\cdot\left\{\left\vert Y_m(\omega_k)\right\vert^2\right\}_m}.

Note that the averaging in the numerator occurs before the absolute value is taken.

The coherence $ C_{xy}(\omega)$ is a real function between zero and one which gives a measure of correlation between $ x$ and $ y$ at each frequency $ \omega$. For example, imagine that $ y$ is produced from $ x$ via an LTI filtering operation:

$\displaystyle y = h\ast x \;\implies\; Y(\omega_k) = H(\omega_k)X(\omega_k)

Then the magnitude-normalized cross-spectrum in each frame is

{\hat A}_{x_m y_m}(\omega_k) &\isdef &
= \frac{H(\omega_k)}{\left\vert H(\omega_k)\right\vert}

so that the coherence function becomes

$\displaystyle \left\vert{\hat C}_{xy}(\omega_k)\right\vert^2 =
\left\vert\frac{H(\omega_k)}{\left\vert H(\omega_k)\right\vert}\right\vert^2 = 1.

On the other hand, when $ x$ and $ y$ are uncorrelated (e.g., $ y$ is a noise process not derived from $ x$), the sample coherence converges to zero at all frequencies, as the number of blocks in the average goes to infinity.

A common use for the coherence function is in the validation of input/output data collected in an acoustics experiment for purposes of system identification. For example, $ x(n)$ might be a known signal which is input to an unknown system, such as a reverberant room, say, and $ y(n)$ is the recorded response of the room. Ideally, the coherence should be $ 1$ at all frequencies. However, if the microphone is situated at a null in the room response for some frequency, it may record mostly noise at that frequency. This is indicated in the measured coherence by a significant dip below 1. An example is shown in Book III [69] for the case of a measured guitar-bridge admittance. A more elementary example is given in the next section.

Previous: Power Spectral Density Estimation
Next: Coherence Function in Matlab

Order a Hardcopy of Mathematics of the DFT

About the Author: Julius Orion Smith III
Julius Smith's background is in electrical engineering (BS Rice 1975, PhD Stanford 1983). He is presently Professor of Music and (by courtesy) of Electrical Engineering at Stanford's Center for Computer Research in Music and Acoustics (CCRMA), teaching courses and pursuing research related to signal processing applied to music and audio systems. See for details.



kaushik200 wrote:

Hi, I understand this technique is a measure of the extent of correlation between 2 signals at a specific frequency. If I am interested in calculating the coherence of 2 signals over a range of frequencies, say 4-8 Hz, can I simply take the average of all coherence vlaues in this band or is there a more elegant method to handle my need?

JOS wrote:

Yes, averaging makes sense. Also, since the underlying spectral estimate uses a finite time-domain window, each coherence sample represents on the order of a "bin" frequency interval.

Add a Comment
You need to login before you can post a comment (best way to prevent spam). ( Not a member? )