CalcWorldHub
Free online calculator · no signup

Segment averaged cross spectrum coherence calculator

Measure frequency-specific linear consistency between two simultaneously sampled channels.

4,000 tools
Segment averaged cross spectrum coherence calculator — Uniform samples (signal units), Paired samples, Sampling frequency (Hz) and calculation method
Segment averaged cross spectrum coherence calculator: inputs and calculation method.

How to use this calculator

Measure frequency-specific linear consistency between two simultaneously sampled channels.

  1. Enter Uniform samples (signal units), Paired samples, Sampling frequency (Hz), Segment length, then complete the remaining labeled fields. Match the units shown beside each field and review the result together with the assumptions below.
  2. Read the worked example below to check the expected input format and result.
  3. Compare another scenario by changing one input at a time. Use Reset to return to the starting values.
Calculation guide

Segment averaged cross spectrum coherence explained

Magnitude-squared coherence compares two sampled signals at one frequency after averaging windowed, overlapping segments. The phase comes from the averaged cross-spectrum; adequate segment count and consistent sampling are needed for a meaningful estimate.

Magnitude-squared coherence0.9966ratio
Magnitude-squared coherence: 0.996616 ratio in the worked scenario.

Inputs, symbols, and units

x — Uniform samples (signal units)
Chronological real samples; use a comma-separated list in the same signal units. Use comma-separated values in the stated order.
y — Paired samples
Simultaneous second-channel record with the same length. Use comma-separated values in the stated order.
fs — Sampling frequency (Hz)
Uniform samples per second; must be positive.
n — Segment length
Periodic Hann analysis length. Enter a whole number.
over — Segment overlap
Shared samples between adjacent sections. Enter a whole number.
bin — Analysis bin
One-sided bin to compare. Enter a whole number.

Formula and method

Cxy=|mean(conj(X)Y)|²/[mean(|X|²)mean(|Y|²)] after identical segment windowing. Phase=arg(mean(conj(X)Y)).

Use multiple complete Hann sections before forming the ratio. A single section always produces misleading unity coherence wherever both spectra are nonzero.

A worked scenario

Uniform samples (signal units) = [1, 0.5, -1, 0.2, 1, 0.2, -0.8, -0.1, 0.9, 0.4, -1, 0.1, 1.2, 0.1, -0.9, 0.2]; Paired samples = [0.8, 0.2, -0.7, 0.3, 0.9, 0.4, -0.6, 0.1, 0.7, 0.3, -0.8, 0.2, 1, 0.2, -0.5, 0.1]; Sampling frequency (Hz) = 8; Segment length = 8; Segment overlap = 4; Analysis bin = 2.

  • Magnitude-squared coherence: 0.996616 ratio
  • Cross-spectrum phase: 1.191855 deg
  • Analysis frequency: 2 Hz

The default paired sixteen-sample channels share a strong two-hertz component with differing local fluctuations.

Assumptions and edge cases

Small numbers of segments give biased estimates. A high value does not prove causation.

Reading the outputs

Coherence is bounded by zero and one; phase follows the second channel relative to the first under the conjugate-X convention.

Frequently asked questions

Why reject a single segment?

Its coherence ratio collapses to one and cannot assess repeatability.

Can high coherence show negative correlation?

Yes; phase can be near 180 degrees while coherence is high.

Must both channels use the same sample clock?

Yes; timing errors can change phase and coherence.

How do I use the Segment averaged cross spectrum coherence calculator?

Enter Uniform samples (signal units), Paired samples, Sampling frequency (Hz), Segment length, then complete the remaining labeled fields. Match the units shown beside each field and review the result together with the assumptions below.

What is a worked example of Segment averaged cross spectrum coherence?

Uniform samples (signal units) = [1, 0.5, -1, 0.2, 1, 0.2, -0.8, -0.1, 0.9, 0.4, -1, 0.1, 1.2, 0.1, -0.9, 0.2]; Paired samples = [0.8, 0.2, -0.7, 0.3, 0.9, 0.4, -0.6, 0.1, 0.7, 0.3, -0.8, 0.2, 1, 0.2, -0.5, 0.1]; Sampling frequency (Hz) = 8; Segment length = 8; Segment overlap = 4; Analysis bin = 2. Magnitude-squared coherence: 0.996616 ratio Cross-spectrum phase: 1.191855 deg Analysis frequency: 2 Hz The default paired sixteen-sample channels share a strong two-hertz component with differing local fluctuations.