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.

Dynamic Signal Acquisition

cancel
Showing results for 
Search instead for 
Did you mean: 

Measuring coherence during Sine Sweep

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

0 Kudos
Message 1 of 7
(8,754 Views)

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.

Sincerely,
Jason Daming
Applications Engineer
National Instruments
http://www.ni.com/support
0 Kudos
Message 2 of 7
(8,739 Views)

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.

Doug
NI Sound and Vibration
Download All
0 Kudos
Message 3 of 7
(8,733 Views)

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

0 Kudos
Message 4 of 7
(8,728 Views)
To followup on this discussion, Doug, were the coherence results for the notch filter taken from an actual measurement (with unknown noise present) or simulated?
0 Kudos
Message 5 of 7
(8,665 Views)

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

Doug
NI Sound and Vibration
0 Kudos
Message 6 of 7
(8,657 Views)

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

 

 

0 Kudos
Message 7 of 7
(8,269 Views)