LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

coherence and cross correlation

Hello,
 
I have read many of the messages posted about coherence but did not see a very clear respond. Can someone please correct the attached simple example vi for all of us who need to find the coherence between two signals? Since there is one set of data for each signal, I get 1 for coherence.
 
I am trying this vi with simulated sine waves and as well as my real data. There are also cross correlation plots but I was not sure if this is how they are suppose to look.
 
 
Thank you very much.
0 Kudos
Message 1 of 5
(4,739 Views)
Hi,
Thanks for posting on National Instruments' forum.  This article gives a short explanation of what coherence is and what data is required to find it.  This knowledgebase has a very brief explanation of why you might find a coherence of 1. One for coherence basically means that the response is completely due to the stimulus.  I hope this helps but let us know if it does not.
Eric A.
National Instruments
Distributed I/O Product Support Engineer
0 Kudos
Message 2 of 5
(4,689 Views)

Hello,

I read the articles sent, and also read this thread http://forums.ni.com/ni/board/message?board.id=170&message.id=275482&query.id=141666#M275482.

The VI posted there is working fine (I guess), but I wanted to get coherence using

(B)

where SAB is the cross power spectrum, SAA is the power spectrum of A, and SBB is the power spectrum of B.

I do not know why but I cannot get the same plot using the vi that gives coherence directly with my formula based approach.

The reason I am doing is that I want to add phase information to the formula. I also tried that in the attached vi (modified version of the vi posted at the other thread), but that does not seem to work either. I used the complex form of the SAB to be able to plot negative coherence values.

Please comment anything you think that might help.

I will greatly appreciate  your help.

 

ilter

ps. VI and the test files are attached...Just convert txt to lvm.

0 Kudos
Message 3 of 5
(4,659 Views)
Hi Ilter,
Thanks for the response.  It sounds like your question might have more to do with the math involved in your application than LabVIEW.  My expertise is with LabVIEW so I might not be able to help you with the formula you are trying to implement.  I would suggest posing your question to a math forum such as http://www.mymathforum.com/.  I will help with subjects such as building arrays and displaying information but it sounds like the array you want to display simply does not have the correct data.  Try to determine why this is and let me know if I can assist you with the LabVIEW portion of your project.
Eric A.
National Instruments
Distributed I/O Product Support Engineer
0 Kudos
Message 4 of 5
(4,634 Views)

Hello,

I found what was wrong. Just change averaging method from "Vector" to "RMS" and it works.

I am attaching the vi for others who may want to use.You can test it with the files above.

 

 

0 Kudos
Message 5 of 5
(4,624 Views)