# Why coherence function calculation needs averaging of different segments of the signal?

I am trying to understand coherence function calculation. I am working with a non-linear system without any noise. Coherence function is defined as:

I understand that coherence is 1 for N=1, but I don't understand why coherence is different with segmentation? As far as understand with segmentation without any noise in system, each segment should give same values and them coherence will go to 1 again. I think I am missing something. I am quite new to this subject. Could anyone help me with this? Is there any good reference related to this where it has proved that why coherence is different with segmentation? I have gone through the following questions: Optimal segment length for coherence estimation and Magnitude-squared Coherence calculation inconsistence but I still it is not clear to me.

Thanks,

Swati

You can see how it falls out if you work through the simple case of N=2 (I've elided the 1/N for brevity)

$$$$\frac{(Y_{1}X_{1}^{*}+Y_{2}X_{2}^{*})(X_{1}Y_{1}^{*}+X_{2}Y_{2}^{*})} {(X_{1}X_{1}^{*}+X_{2}X_{2}^{*})(Y_{1}Y_{1}^{*}+Y_{2}Y_{2}^{*})}$$$$

It should be pretty obvious that there are now some cross products. Multiplying through:

$$$$\frac { X_{1}X_{1}^{*}Y_{1}Y_{1}^{*} + X_{1}^{*}X_{2}Y_{1}Y_{2}^{*} + X_{1}X_{2}^{*}Y_{2}Y_{1}^{*} + X_{2}X_{2}^{*}Y_{2}Y_{2}^{*} } { X_{1}X_{1}^{*}Y_{1}Y_{1}^{*} + X_{1}X_{1}^{*}Y_{2}Y_{2}^{*} + X_{2}X_{2}^{*}Y_{1}Y_{1}^{*} + X_{2}X_{2}^{*}Y_{2}Y_{2}^{*} }$$$$

The second and third terms of the numerator are no longer the same as the second and third terms of the denominator.

• Thank you for your response. But I think each X1 and X2 are going to be same and each Y1 and Y2 will be same. For example: for a sine wave, Fourier transform of each segment will be a delta function and if you divide sine wave into segments such that each segment length is equal to the length of the period than each X1 will be same as X2. Same will be true for Y's too. In that case Coherence value is again 1. – Swati Jain Jul 1 '20 at 13:40
• @SwatiJain . I'm not sure what you're getting at. If X=Y then the signals are going to correspond at every frequency and the coherence will be 1. What else would you expect? – jaket Jul 1 '20 at 19:13
• What I mean is that for X1=X2=X and Y1=Y2=Y, we get (XXYY*+XXYY*+XXYY+XXYY)/(XXYY*+XXYY*+XXYY+XXYY)=1 Since Fourier Transform of segment 1 should be equal to Fourier transform of segment2. – Swati Jain Jul 6 '20 at 17:39