1

Several papers on the internet states that the coherence function is unity for all frequencies if only one reading is done, and that the coherence function requires an average of two or more readings of the input and output in order to get a valid result. Why does not the coherence function give a valid result for only one reading of the input and output? And what is the effect of dividing the readings into several segments?

  • I'm missing a bit of context here – how does "one reading" contain any frequency information, to begin with? Maybe explaining in which context you're working and linking to one or two of these papers would make it easier to understand? – Marcus Müller Nov 18 '19 at 10:56
  • The same phenomenon is also stated in the MATLAB function 'mscohere', where it is said "You must use at least two segments. Otherwise, the magnitude-squared coherence is 1 for all frequencies." I am wondering why this is the case? – hermanjakobsen Nov 19 '19 at 12:34
  • can you link to that? I don't even know what "segment" is in this context, sorry. – Marcus Müller Nov 19 '19 at 15:06
  • The quote is taken from the description of 'cxy = mscohere(x, y, window)' at the following https://www.mathworks.com/help/signal/ref/mscohere.html – hermanjakobsen Nov 20 '19 at 23:03
  • I found this Youtube very very helpful to understand why https://www.youtube.com/watch?v=2yA9aha3tfE – VMMF Jun 15 '23 at 23:34

1 Answers1

2

The definition of magnitude-squared coherence (MSC) is $$ C_{xy} = \frac{|S_{xy}|^2}{S_{xx}S_{yy}}$$ where $S_{uv}$ is the cross-PSD between $u$ and $v$ and given by $$ S_{u,v}(f) = U^\ast(f) V(f) = \mathcal{F}(U)^\ast \mathcal{F}(V) = \mathcal{F}(R_{uv}) $$ where $R_{uv} = u \star v$ is the cross-correlation between $u$ and $v$ (in time).

Denote by $X = \mathcal{F}(x)$ and $Y = \mathcal{F}(y)$ the Fourier transforms of $x$ and $y$, omitting the frequency index. Then insert these in the definition: $$ C_{xy} = \frac{|S_{xy}|^2}{S_{xx}S_{yy}} = \frac{ | X^\ast Y |^2 }{X^\ast X Y^\ast Y} = \frac{X^\ast Y Y^\ast X}{X^\ast X Y^\ast Y} = 1 $$ since all the term in the numerator and denominator cancel each other.

For more than one segment, this will not work, see Why coherence function calculation needs averaging of different segments of the signal? for details.

Triceratops
  • 398
  • 2
  • 13