Computing Coherence of Two Signals

Hey there!

I've been looking into the math of coherence of signals, and I'm not quite sure how to compute it... Is there a phase variable in the Processing code, or even a coherence one? And in case there isn't, does anyone know any pointers as to how I can compute it? 

Any help would really be appreciated...

Cheers 
Luc :D

Comments

  • I should phrase it differently: 

    I've looked throught all the processing code, everything I could find seemed to be the FFT, so we have the Complex Discrete Fourier Transform. Is that sufficient for getting the coherence of two channels?
  • wjcroftwjcroft Mount Shasta, CA
  • Thanks a lot for the link!

    What helped me in the end was the following paper:


    I managed to compute the coherence of 2 FFTs in Processing, so it's in real time. If anyone is interested in the code, just PM me, or I can post it! :D

    Cheers
    Luc
  • wjcroftwjcroft Mount Shasta, CA
    Luc, that's great, thanks.

    Do you have a Github link? Or consider posting on Github.

    William

  • Sure, you can find it here:


    I am not sure whether or not I have computed it well though. The values are between 0 and 1, of course, but I have noticed the following:

    When measuring frontal alpha (8-12hz) coherence in an eyes closed sample session, the values are dancing around at about .8, which is way too high it seems, doesn't it? When I compare a sample eyes-closed session with a meditation session, my alpha coherence drops.

    Will do some more measurements, but I would be really thankful if someone could look over the code in order to see if there is an obvious mistake... But I'm pretty sure it's right :/

    Cheers

    Luc
Sign In or Register to comment.