2

I have a question about the computation of coherence between two signals with Welch's method.
The two signals are relatively short (e.g. 256 samples) and I would like as correct an estimate of shared frequencies between the signals as possible.
I am aware that I need to average over more than one segment of data for meaningful results and that overlapping segments will improve accuracy. Computational effort in the computation is not an issue, so I am using $noverlap = nseg-1$. Acquiring more samples is not possible.

The coherence is computed as $C_{xy} = \frac{|G_{xy}|^2}{G_{xx} G_{yy}}$ where $G_{xy}$ is the Cross-Spectral Density and $G_{xx}$ and $G_{yy}$ are the Power Spectral Densities of both signals, respectively.

My question is:
What is the optimal length of segments?
nseg=ndata (no averaging) leads to $C_{xy} = 1$ whereas a too small value of nseg leads to insufficient frequency resolution.
Is there any value for nseg for which an optimal compromise between sufficient averaging and frequency resolution can be found?

Both theoretical and best-practice suggestions would be appreciated!

2 Answers2

2

There is good news and bad news. You are actually showing magnitude squared coherence(MSC). There is a very complete treatment of MSC, including closed form equations for the sample MSC as a function of independent samples. There is also a discussion on overlap in:

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

The bad news is in the plot, which is the sample pdf for MSC where the true MSC is .3, in a single bin where the legend denotes the number of independent terms. If you want 256 frequency bins, you really need around $256^2$ data points.

enter image description here

You might want to look up the paper and note any recent citations where there is some scheme to reduce the amount of data you need, but 256 points is not anywhere near enough.

  • Thanks for the answer and the link to the paper. It seems to state the exact problem I was describing in the introduction. However, if I understand correctly the equations given are valid for MSC estimation without overlap. This is actually done in a paper by Bortel and Sovka "Approximation of statistical distribution of magnitude squared coherence estimated with segment overlapping". A follow-up question: Does it help to increase the sampling frequency? This would increase the number of used samples without requiring to collect data over longer time periods. – FirstSecondThird Apr 17 '18 at 06:17
  • If it did, I doubt by X 256. –  Apr 17 '18 at 10:23
  • invention is often the child of desperation, there is “boot strapping” –  Apr 17 '18 at 10:46
0

I agree 256 samples is not enough. According to the paper 1987 Coherence and Time Delay Estimation, G. Clifford Carter, the Magnitude squared coherence estimator suffers from bias and variance which can be minimized by using techniques such as :

  • Hanning window for each segment
  • Overlapping the segments at least 50%
  • Increasing observation-time resolution-bandwidth product (increasing number of averages and frequency resolution of the DFT of each)
  • If there is a time delay between the acquisition of the 2 signals to be used in the coherence, either we realign them before computing coherence or we make the ratio of the delay misalignment to the DFT size (before any zero padding) as small as possible (eq. 13b in the paper)

For instance I have felt confident enough about my magnitude squared coherence estimation by using similar parameters as in section 4.1.1 of 2011 Dynamic Testing of Data Acquisition Channels Using the Multiple Coherence Function, Troy C. Richards paper.

Also the paper from C.Carter shows a confidence interval graph indicating that a 95% certainty about the value of the magnitude square coherence (MSC) being between 0.62 and 0.75 exists, if we used 128 non-overlapped averages and we obtained a MSC estimate of 0.7

VMMF
  • 1,090
  • 1
  • 12
  • 23