Note: This page has been translated by MathWorks. Please click here

To view all translated materials including this page, select Japan from the country navigator on the bottom of this page.

To view all translated materials including this page, select Japan from the country navigator on the bottom of this page.

Generalized cross-correlation

`tau = gccphat(sig,refsig)`

`tau = gccphat(sig,refsig,fs)`

```
[tau,R,lag]
= gccphat(___)
```

`[___] = gccphat(sig)`

```
[___]
= gccphat(sig,fs)
```

computes
the time delay, `tau`

= gccphat(`sig`

,`refsig`

)`tau`

, between the signal, `sig`

,
and a reference signal, `refsig`

. Both `sig`

and `refsig`

can
have multiple channels. The function assumes that the signal and reference
signal come from a single source. To estimate the delay, `gccphat`

finds
the location of the peak of the cross-correlation between `sig`

and `refsig`

.
The cross-correlation is computed using the generalized cross-correlation
phase transform (GCC-PHAT) algorithm. Time delays are multiples of
the sample interval corresponding to the default sampling frequency
of one hertz.

`[___] = gccphat(`

or `sig`

)```
[___]
= gccphat(
```

returns
the estimated delays and cross correlations between all pairs of channels
in `sig`

,`fs`

)`sig`

. If `sig`

has *M* columns,
the resulting `tau`

and `R`

have *M ^{2}* columns.
In these syntaxes, no reference signal input is used. The first

`tau`

and `R`

contain the
delays and cross correlations that use the first channel as the reference.
The second [1] Knapp, C. H. and G.C. Carter, “The Generalized
Correlation Method for Estimation of Time Delay.” *IEEE
Transactions on Acoustics, Speech and Signal Processing.* Vol.
ASSP-24, No. 4, Aug 1976.

[2] G. C. Carter, “Coherence and Time Delay Estimation.” *Proceedings
of the IEEE.* Vol. 75, No. 2, Feb 1987.

Was this topic helpful?