How to use this calculator
Estimate broadband arrival-time differences while suppressing cross-spectrum amplitude weighting.
- Enter Uniform samples (signal units), Comparison channel, Sampling frequency (Hz). Match the units shown beside each field and review the result together with the assumptions below.
- Read the worked example below to check the expected input format and result.
- Compare another scenario by changing one input at a time. Use Reset to return to the starting values.
GCC PHAT broadband delay estimate explained
GCC-PHAT estimates relative delay by normalizing the cross spectrum before finding its correlation peak. A positive lag means the comparison channel arrives later than the reference channel.
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— Comparison channel- A second channel sharing the same clock; positive delay means this channel arrives later. Use comma-separated values in the stated order.
fs— Sampling frequency (Hz)- Uniform samples per second; must be positive.
Formula and method
Gxy[k]=conj(Xk)Yk/|conj(Xk)Yk| on nonzero bins; RPHAT=IDFT(Gxy), delay=argmaxlag RPHAT/fs.
Zero-pad to the linear correlation length, normalize each nonzero cross-spectral bin and search all admissible signed lags. This phase transform intentionally differs from raw correlation.
A worked scenario
Uniform samples (signal units) = [1, 0.2, -0.4, 0.1, 0, 0]; Comparison channel = [0, 1, 0.2, -0.4, 0.1, 0]; Sampling frequency (Hz) = 100.
- PHAT delay of comparison channel: 0.01 s
- Peak lag: 1 samples
- PHAT peak ordinate: 1 normalized DFT units
A broadband short pulse arrives one sample later in the second channel at 100 Hz; PHAT should identify a 0.01-second delay.
Assumptions and edge cases
Integer-sample timing only; spectral zeros are omitted with an absolute 1e−12 threshold, so extremely small-amplitude records should be rescaled. Reverberation and noise can create false peaks.
Reading the outputs
Delay is positive for later y; the peak ordinate is a phase-weighted alignment score, not Pearson correlation.
Frequently asked questions
Why normalize the spectrum?
It prevents the largest-amplitude frequency bins from dominating the alignment score.
Is PHAT always better than raw correlation?
No. Phase-only weighting can amplify unreliable weak spectral bins.
Are the two records allowed different lengths?
Yes, but they must use the same sampling interval.
How do I use the GCC PHAT broadband delay estimate calculator?
Enter Uniform samples (signal units), Comparison channel, Sampling frequency (Hz). Match the units shown beside each field and review the result together with the assumptions below.
What is a worked example of GCC PHAT broadband delay estimate?
Uniform samples (signal units) = [1, 0.2, -0.4, 0.1, 0, 0]; Comparison channel = [0, 1, 0.2, -0.4, 0.1, 0]; Sampling frequency (Hz) = 100. PHAT delay of comparison channel: 0.01 s Peak lag: 1 samples PHAT peak ordinate: 1 normalized DFT units A broadband short pulse arrives one sample later in the second channel at 100 Hz; PHAT should identify a 0.01-second delay.
Background or definition reference: MathWorks generalized cross correlation phase transform.
Read our calculation methodology.