mscohere function : coherence always 1 ?

15 views (last 30 days)
cool dave
cool dave on 21 Jul 2016
Answered: Hugo Nunes on 13 Jan 2022
Hi everyone, i want to calculate the coherence between two different signals. And also to compare the coherence results for noise-free signals and noisy signals. In order to understand the working principle of "mscohere" function, i started by using a rectangular window (same length as the signals) with no overlapping for the signals first. Supposingly, based on my understanding i should get a different coherence results for both the noisy signals and noise-free signals but i always got my coherence = 1 for both noisy signals and noise-free signals. Even if i changed the window type to hann (for example), i still got coherence equals to one. The coherence results will only be changed if the signals are segmented > 10 % (for example), when i change the window length. Does anyone know what is the exact working principle of the window function in the mscohere? what window length should i choose and why? some references suggest using hann window with 50% overlapping but why? ____________________________________________________________________________________________ 1st set (noise-free) : s1 and s2 are my signals and have similar waveform but are different from each other with a time delay.
2nd set (noisy) : + noisy (random) signal to s1 and s2
[cxy,freq]=mscohere(s1,s2,rectwin(nfft),0,nfft,fs);

Answers (1)

Hugo Nunes
Hugo Nunes on 13 Jan 2022
The coherence is statistally meagninfull when you use an average of several windows. See link bellow:
https://dsp.stackexchange.com/questions/10012/magnitude-squared-coherence-calculation-inconsistence

Categories

Find more on Signal Generation and Preprocessing in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!