08-09-2005 04:57 AM
08-09-2005 07:28 AM
F(x) F*(x) |F(x)|^2
Sxx = ------ * ------- = ---------- (no phase information)
N N N^2
F(y) F*(x)
Sxy = ------ * -------
N N
Cross power spectrum Sxy
Transfer function = ------------------------ = -----
Power spectrum Sxx
| Sxy | ^2
Coherence = -------------
Sxx * Syy
where:
F(x) is the complex Fourier transform of the time domain signal x, and
F*(x) is the complex conjugate of the Fourier transform of x, and
N is the number of points in x.
Note that SXX is the magnitude squared. It is faster to compute the square of the magnitude than it is to compute the magnitude. Although the complex-to-polar VI would look simpler on the diagram, it would take longer since it computes the magnitude proper, (an extra square-root operation), and it computes the angle (extra arc-tangent operations).
Since N^2 is a term in both Sxy and Sxx, and since we are dividing one by the other, we do not need to explicitly divide by N^2; it is cancelled automatically.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
08-09-2005 12:15 PM
08-31-2005 12:01 PM
Hi,
In this case did you manage to calculate the coherence using the power/cross power spectrum vi blocks?
08-31-2005 12:34 PM
Blog for (mostly LabVIEW) programmers: Tips And Tricks
08-31-2005 12:35 PM
Blog for (mostly LabVIEW) programmers: Tips And Tricks