From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
04-06-2009 03:31 PM
Hello,
I'm looking to modify the SV sine sweep example code to also calculate coherence.
Has anyone already done this?
And, if so, can you provide any insight/pointers?
Thank you very much for your help,
Hunter
04-07-2009 11:30 AM
chc5e,
I am not sure exactly which Swept Sine example you are trying to modify, but many of the S&V VIs already have this output built in. If you cannot use any of these VIs (like SVFA Coherent Output Power.VI) then you can at least explore them to see how this is calculated and possible use similar methods in your modification.
If you do end up creating this I definately encourage you to post it on the community.
04-07-2009 11:29 PM
From the Sound and Vibration concepts manual (http://zone.ni.com/reference/en-XX/help/372416B-01/svtconcepts/averaging_para/) we see that the coherence for FFT-based measurements is defined by the equation
coherence = |<X*Y>|^2 / <X*X><Y*Y> (formula corrected here)
For swept sine measurements this is analogous to
(Gain)^2 * (Stimulus Level)^2 / (Response Level)^2
Attached is a VI that takes the results of the Sound and Vibration Toolkit example SVXMPL_Swept Sine FRF (DAQmx).vi as measured using a PCI 4461. The measured coherence for this analog notch filter looks as one would expect and also compares to the coherence measured by the SVFA Frequency Response (Mag-Phase) VI when using FFT-based techniques to measure the frequency response.
04-08-2009 08:33 AM
Good morning, Jason and Doug
Thanks for your notes. Yes, that's the sine sweep VI that I was referring to.
Doug,
Thanks so much for the example VI.
However, are you sure that it's as simple as that?
Do you have a reference for calculating coherence during sine sweep?
I'll look myself as well...checking Ewins and some others.
Have a good day,
Hunter
04-20-2009 10:01 AM
04-20-2009 12:52 PM
The previously posted measurements were taken with actual measurements with unknown/uncontrolled noise. The device under test was an analog notch filter with notch rejection at ~60 dB and centered at ~1094 Hz.
As for your previous questions regarding references; sorry, I have not had time to look it up. My derivation certainly was not rigorous, but is more based on the implementation of the swept sine measurement which uses dot products to measure the *coherent* gain between response and stimulus.
In my orginal post, I did not detail that I was actually starting with the assertion that the gain can be given by
swept-sine gain = coherent gain = sqrt(COH * ( response / stimulus )^2)
Then, COH must be given by
COH = ( CG * stimulus / response )^2
If this circular logic isn't convincing (even though I am also waving my hands wildly ; ) ), please forward me a reference that we can use as an acceptable common ground, and you and I can work from there. Email me at firstname.bendele@ni.com
06-29-2009 10:22 PM
Hi Doug,
Normally we calculate the gain with the formula Gain=Response/Stimulus.
Gain is analogus to Frequency Response H and H=Gxy/Gxx.
How to calculate the coherent gain ?
If we use the Gain=Response/Stimulus to calculate coherence( Gain^2*Stinulus^2/Response^2), the the coherence is always 1.
Your detailed explanation is highly appreciated.
Best Regards,
GoldDragon