where
x[n] : n-th sample of the time history
x
even
[n], x
odd
[n] : even- and odd-indexed samples
N : number of data points
E[k], O[k] : FFT of the even and odd samples
W
N
k
: twiddle factor, e−j2πk/N
X[k] : FFT result at frequency bin k
fs : sampling frequency [Hz]
j : imaginary unit
Coherence compares two signals frequency by frequency, so the time histories must first be converted to the frequency domain.
FFT is an algorithm that cuts the cost of the DFT to the order of N log N, repeating Bit Reversal ordering and Butterfly operations to obtain the magnitude and phase of each frequency component.
These results become the input for the PSD and CSD calculations.
where
Power spectrum : squared magnitude of the FFT result
PSD : power spectral density
N : number of data points
PSD shows at which frequencies the energy of a signal is concentrated.
The magnitude of the FFT result is squared to obtain the Power Spectrum, which is then normalized by the data length to give a value per unit frequency.
Because the PSDs of both signals appear in the denominator of the Coherence formula, they keep the result between 0 and 1.
where
FFT results1, FFT results2 : FFT results of the two signals
conj( ) : complex conjugate
Cross spectrum : product of one FFT and the conjugate of the other
CSD : cross spectral density
N1, N2 : data lengths of the two signals
CSD measures how much two signals move together at the same frequency.
It is obtained by multiplying the FFT of one signal by the complex conjugate of the other, so it carries the phase difference between the signals as well as the magnitude.
This value forms the numerator of the Coherence formula.
where
C
x,y
(f) : coherence between signals x and y
G
xy
(f) : cross spectral density (CSD) of x and y
G
xx
(f), G
yy
(f) : power spectral densities (PSD) of x and y
f : frequency [Hz]
Coherence is the squared magnitude of the CSD divided by the product of the two PSDs; 0 means the signals are unrelated and 1 means a perfect linear relationship.
In seismic qualification the three directional inputs must be independent, so this value is used to check the input time histories.
Averaging over several segments (Welch method) keeps noise from pushing the value toward 1.
This example checks the coherence between three-directional synthetic seismic accelerations (X and Y: PGA 0.30 g, Z: PGA 0.20 g, 20 s, dt = 0.005 s). The coherence is calculated with the Welch method (Hann window, 1024 points, 50 % overlap) and averaged in 1/3-octave bands from 0.5 Hz to 50 Hz. The average coherence of each pair is about 0.23 to 0.25 and the correlation coefficients are below 0.05, which shows that the three directional inputs are not correlated with each other.
Return to the Coherence Page