10 votes

What is the difference between convolution and cross-correlation?

As a student I was involved in the same problem as you are. Let me explain to you in the simplest words without any math. Convolution: It is used to convolve two functions. May sound redundant but I'...
Andres's user avatar
  • 101
7 votes
Accepted

How to calculate a delay (correlation peak) between two signals with a precision smaller than the sampling period?

This is basically what @hooman suggests: fit a parabola to the three points near the peak of the sample cross-correlation of the data. Using the formula for $p$ from Julius O. Smith - Peak Detection: $...
Peter K.'s user avatar
  • 25.7k
7 votes
Accepted

perfect sequences

Let $\theta_a$ and $\theta_c$ respectively denote the maximum magnitudes of the off-peak or out-of-phase periodic autocorrelation functions and the periodic crosscorrelation functions of a set of $K$ ...
Dilip Sarwate's user avatar
7 votes

Comparing multiple signals for similarity

...best results come from a weighted ensemble of techniques... Maybe they do, depending on the application. But each one of the similarities mentioned, is equivalent to the other at least when we are ...
A_A's user avatar
  • 10.7k
7 votes
Accepted

Matched filter and cross correlation in digital processing

I'll illustrate with an example: detecting a rectangular pulse in noise, in Matlab. Let's start with defining the signal that contains the pulse. ...
MBaz's user avatar
  • 15.3k
7 votes
Accepted

Correlation of independent random processes

No. Quoting Wikipedia's article Independence (probability theory): If $X$ and $Y$ are independent random variables, then the expectation operator $\operatorname{E}$ has the property $$\...
6 votes
Accepted

Cross correlate a 2D array

What you have (conceptually) is not a 2D array but a collection of 1D arrays. correlate2D is designed to perform a 2D correlation calculation, so that's not what ...
lxop's user avatar
  • 1,369
6 votes
Accepted

Cross correlation, when two signals are "uncorrelated"?

Cross correlation is a measure of similarity between two signals, where one signal is allowed to be time-shifted. In this sense, the correlation is not a single number, but a function of the time ...
MBaz's user avatar
  • 15.3k
6 votes

Cross-correlation seems defined backwards

Interesting question. For purposes of "pattern matching" the resulting peak of the auto-correlation function will either be consistent with the actual time offset between the matching ...
Dan Boschen's user avatar
6 votes

How to decide whether a recording contains a signal of interest?

Is it possible to decide based on the result of the cross-correlation whether a recording contains the signal of interest? Certainly. The easiest way would be look at the crest factor (peak to RMS ...
Hilmar's user avatar
  • 44.6k
6 votes

2D Cross-Correlation using 1D FFT

Your 2nd step is wrong, it's doing circular convolution. For circular cross-correlation, it should be: Multiplication between the output of the FFT applied on the first vector and the conjugate of ...
Jdip's user avatar
  • 6,030
6 votes

Is 2D circular cross-correlation with FFT done as described in this source?

For the question's approach of shifting the h input image spatially using ifftshift before frequency-domain complex-conjugation, ...
Olli Niemitalo's user avatar
5 votes
Accepted

How is cross-correlation related with orthogonality?

I suppose you mean the cross-correlation at lag zero. Well take an Hilbert space $H$ (i.e. a metric space in which you can define a scalar product $\langle\cdot ,\cdot\rangle$). Then $x,y\in H$ are ...
LJSilver's user avatar
  • 768
5 votes
Accepted

Cross-correlation or cross-covariance of non-zero mean signals

What are reasons to choose for cross-correlation or cross-covariance when comparing signals with non-zero mean? Well, part of the issue is that cross-correlation as defined in your equation: $$(f \...
Peter K.'s user avatar
  • 25.7k
5 votes

How can define an indicator which measures the degree of similarity between two signals?

The general topic of finding similarities between signals is wide ranging: are the signals of same sampling, length, offset, shift or scale? where do they take their values (discrete, real, complex)?...
Laurent Duval's user avatar
5 votes

How to calculate a delay (correlation peak) between two signals with a precision smaller than the sampling period?

Lagrange parabolic estimator The standard Lagrange polynomial parabolic interpolation peak finding formula from Peter's answer, $$p = \frac{1}{2} \frac{\alpha - \gamma}{\alpha - 2\beta + \gamma}$$ ...
Olli Niemitalo's user avatar
5 votes

When to use cross spectral density versus cross correlation?

The cross-spectral density is in the frequency domain while the cross-correlation function is in the time domain. The two are Fourier Transform pairs, the FT of the cross correlation function is the ...
Dan Boschen's user avatar
5 votes

Understanding time delay estimation for GPS?

For GPS, (simplifying for now by omitting corrections for ionsphere and orbit position and relativistic clock offsets), we determine the "Pseudo-range" to each satellite (SV), which will be the ...
Dan Boschen's user avatar
5 votes
Accepted

Maximum cross-correlation coefficient value for time delay estimation

As your plot shows, the second form allows for the correlation peak to be negative. Now, what does a strong negative cross correlation mean? It means the signals are very similar, except one has a ...
Florian's user avatar
  • 2,463
5 votes
Accepted

How to reliably compute the group delay of a comb filter

Since this is an FIR, the group delay is D=(N-1)/2=20 samples. No, since this is a linear phase (i.e. symmetric or anti-symmetric) filter, the group delay is half the length! (being a FIR isn't ...
Marcus Müller's user avatar
5 votes
Accepted

Confusion In DC power,Average Power,Ac Power and total Power

What you have studied doesn't seem to include a definition of Average Power. For deterministic signal $x(t)$, the instantaneous power delivered at time $t$ is $x^2(t)$ ${\big (}$yeh, yeh, nitpickers ...
Dilip Sarwate's user avatar
4 votes

Signals cross-correlation

When using a constant tone audio beacon, beware of room echoes causing multi-path interference and distortion, especially around the leading and trailing portions of your received waveforms. Try ...
hotpaw2's user avatar
  • 35.3k
4 votes
Accepted

How can define an indicator which measures the degree of similarity between two signals?

assuming finite power signals: $$ \lVert x \rVert^2 \triangleq \lim_{N \to \infty} \ \frac{1}{2N+1} \sum\limits_{n=-N}^{+N} \big|x[n] \big|^2 \ < +\infty $$ this is a Hilbert Space sorta thingie. ...
robert bristow-johnson's user avatar
4 votes

How can define an indicator which measures the degree of similarity between two signals?

if you are searching for similarity between two signals in frequency domain, you can go for coherence. Coherence indicates frequency components common to both signals
Akanksha 's user avatar
4 votes

How to calculate a delay (correlation peak) between two signals with a precision smaller than the sampling period?

You can fit a curve to the points around the peak of the cross-correlation obtained by xcor and find the peak of the fitted curve. Ideally, you know the cross-correlation function of your signals and ...
Hooman's user avatar
  • 321
4 votes
Accepted

Correlation as measure of similarity

As you correctly noted, similarity is not a rigorously defined mathematical term. However, "distance" can be defined mathematically. Quoting Wikipedia: In statistics and related fields, a ...
Atul Ingle's user avatar
  • 4,134
4 votes

Cross correlation, when two signals are "uncorrelated"?

While it may seem overly formal, this is the best way I know of to view this issue of correlation regarding deterministic or random signals. I'm gonna change the semantics a little. If $x(t)$ and $y(...
robert bristow-johnson's user avatar
4 votes

Cross correlation, when two signals are "uncorrelated"?

The cross-correlation function $R_{x,y}(\tau)$ of two deterministic finite-energy signals $x(t)$ and $y(t)$ can be defined as $$R_{x,y}(\tau) = \int_{-\infty}^\infty x^*(t)y(t+\tau) \,\mathrm dt,~-\...
Dilip Sarwate's user avatar
4 votes

How to calculate a delay between two signals in frequency domain?

Calculating a delay between two signals is not as simple as you described and it cannot be generalized as easily either. The case for two sinusoidal signals seems trivial, as the delay then ...
Rainer P.'s user avatar
  • 531
4 votes
Accepted

Parabolic fiting for sub-sample precision

You can use the formulas presented in the answers to: How to calculate a delay (correlation peak) between two signals with a precision smaller than the sampling period? To recap, find the largest ...
Olli Niemitalo's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible