Coherence between signals

I have two signals, lets call them U_1 and U_2. Both are time series of wind speeds, measured at different locations. They are more or less coherent. What I would like to know is how does the coherence between these signals depends on the frequency.

How can I calculate such a “coherence spectrum”?

Take a look at DSP.jl here.

1 Like

GMT example not ported to GMT.jl but shouldn’t be difficult.

See also the function coherenceplot used in this example Frequency-domain estimation · ControlSystemIdentification Documentation

1 Like

Thanks!

What is the difference between a periodogram and a spectrum?

In signal processing, a periodogram is an estimate of the spectral density of a signal.

Well, this text does not explain the difference between a spectrum and a periodogram. Perhaps it is the same?

A periodigram is an estimate of the spectrum

OK. Thank you.

they are the same thing @ufechner7 ; the difference is the x-axis. in the power spectrum you plot over frequency, in periodogram you plot over period, which is 1/frequency.

They are not the same. The periodogram is an estimation of the power spectral density (PSD), i.e. a statistical description of the signal. The spectrum is one specific realization of the PSD. Practically, the periodogram is calculated by averaging over several spectrum measurements.

1 Like

can you define “spectrum” and “power spectral density”? Because in my background the words “power spectrum” and “power spectral density” mean exactly the same thing, yet in your post they mean different things.

I have always had this nagging feeling that the terminology is somewhat dependent upon which discipline you come from. I come from the mechanical engineering, vibration testing part of the world. A good summary of the terminology used is given in Appendix A of https://www.hpmemoryproject.org/an/pdf/an_243.pdf.
When your excitation is narrow band, such as a rotating component of a machine, you want to display your signal as the sqrt(autopower spectrum). When your excitation is broad band, such as that caused by turbulence you want to use psd or its sqrt, as then the amplitude is independent of the frequency bin width. If your signal is completely contained within the time block that you are processing, such as a gun firing, then you want to display the signal as ESD.
In my mental model, I think of spectrum as the result of an FFT, or more commonly as the sqrt(auto power spectrum).
I have always been confused by the term periodogram so thanks for the clarification above.

1 Like

Wikipedia’s article on this topic seems to agree with you. See the paragraph “Power spectral density”.

GMT uses the Welch method to compute the periodogram. See this old example that is a bit more complicated than it needs but is domain specific. See this in the spectrum1d man page (not yet translated to GMT.jl) for explanations