Questions tagged [cross-correlation]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
58
votes
8answers
93k views

How do I implement cross-correlation to prove two audio files are similar?

I have to do cross correlation of two audio file to prove they are similar. I have taken the FFT of the two audio files and have their power spectrum values in separate arrays. How should I proceed ...
47
votes
4answers
43k views

What is the difference between convolution and cross-correlation?

I've found on multiple sites that convolution and cross-correlation are similar (including the tag wiki for convolution), but I didn't find anywhere how they differ. What is the difference between ...
5
votes
4answers
4k views

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

I would like to calculate a delay between two signals in MATLAB. Normally, I would do this with a cross-correlation (xcorr), and then calculate the position of the ...
12
votes
5answers
14k views

Time delay estimation of oscilloscope signals using cross correlation

I have recorded 2 signals from an oscope. They look like this: I want to measure the time delay between them in Matlab. Each signal has 2000 samples with a sampling frequency of 2001000.5. The ...
20
votes
2answers
5k views

Examples of Independent and uncorrelated data in real-life, and ways to measure/detect them

We always hear about this vector of data VS this other vector of data being independent from each other, or uncorrelated, etc, and while it is easy to come across the math regarding those two concepts,...
3
votes
1answer
3k views

Cross correlation vs FFT for finding phase between 2 signals

I have been struggling with this issue for months now, trying to understand which one to pick: FFT or cross correlation. I am given a sine wave (with phase, amplitude, frequency and time vector ...
4
votes
1answer
296 views

Direct Correlation (DC) Time Delay Estimation: Variance Keeps Decreasing for Increasing SNR?

I'm trying to reproduce the results from this paper "Discrete time techniques for Time Delay Estimation" doi:10.1109/78.193195, for both the correlation and Least Squares. I've generated a random (...
1
vote
2answers
3k views

Matching 2 audio files

I'm doing research on how we can do matching between 2 audio files using Android to see if they have the same content or not. After doing lots of research, I have concluded that I must do 2 main ...
1
vote
1answer
746 views

Is Cross correlation between stationary random signal and noise zero for all lags?

If $x(n)$ is a stationary random process (let say small 20ms window of speech which can be assumed stationary) and $v(n)$ is said to be uncorrelated noise, can we say that cross correlation of $x(n)$ ...
2
votes
2answers
276 views

GPS CA Signal Acquisition

The coarse acquisition C/A GPS signal has a symbol rate or chip rate of 1.023 Mcps with code period of 1 ms. The code bandwidth is +/-1.023MHz (to 1st sinc nulls). I'd like to record this signal using ...
1
vote
2answers
2k views

How to find a maximal possible value of a cross correlation

Is there any way of calculating a maximal possible value of a cross correlation of two signals whose maximal amplitude and sample rate is known? To make things clearer, , signals in question are ...
12
votes
5answers
6k views

Is up-sampling prior to cross-correlation useless?

Consider a simple case where two signals from two different sensors are cross-correlated, and the time-delay-of-arrival computed from the absissa of the peak of their cross-correlation function. Now ...
9
votes
2answers
7k views

Phase Correlation - Poor Performance on Noisy/Blurred Images?

I have successfully tested 1D phase correlation algorithm to determine vertical shift between two synthetic images. When I moved to real images, however, it is not able to detect translation at all (...
2
votes
2answers
1k views

Problem with Generalized Cross Correlation (PHAT filter)

I have to calculate time delay between two signals.I am using the GCC-PHAT method. First, I cut the signals into smaller parts (~0.5s) and then try to calculate the delay. When I display those two ...
9
votes
1answer
6k views

Measuring time delay of audio signals

Before anyone yells at me I fully realize that this question has been asked numerous times. I assure you that I've read through the existing questions and answers but I am still confused about part of ...
8
votes
1answer
2k views

Synchronizing Two Audio Tracks

I would like to implement an algorithm that synchronizes two audio tracks. The two tracks are very similar; you can imagine they are two recordings of sound (not necessarily music) from two ...
1
vote
3answers
190 views

How do I know quantitatively if the correlation of two time series is significant?

I computed the correlation coefficient of two time series of daily observations, x and y, but noticed that the more sampling ...
4
votes
2answers
4k views

GCC-PHAT (Generalized cross correlation MATLAB)

I've been trying to implement generalized cross correlation with a PHAT weighting function for a while now, and cannot get it to work. I have tried correlating using MATLAB's xcorr.m file, and it ...
2
votes
3answers
820 views

Is possible to compare to audio samples with cross-correlation [duplicate]

Is it possible to compare two audio samples(meaning find word from one in another) realtime with cross-correlation?
1
vote
0answers
272 views

Train Pulse Recognition in Medium Voltage Networks

I just started a project in the Smart Grids area. It involves the recognition and quick extinction of earth faults in a medium voltage system. The system works automatically and pretty much gets rid ...
0
votes
1answer
3k views

How to find the period of a noisy signal using MATLAB's $\tt xcorr$?

Here is my code: function [ T ] = FindPeriodicity2(x,Fs) ac=xcorr(x,x); [~,locs]=findpeaks(ac); T=mean(diff(locs)/Fs); end and when I pass the signal ...
6
votes
2answers
3k views

Detecting a Signal Inside a Time Series Using MATLAB's $ \tt xcorr() $

I would like to find the exact replica of signal A in time series B. I am working with the simple toy example below, in which A is located starting at the 4th position in B. I thought that using <...
4
votes
1answer
729 views

Time delay estimation in low SNR

So I am interested in finding delay between two noisy narrowband signals,for example, two arterial pulse waveform. I can easily get a correct estimate of delay using cross-correlation method, but it ...
4
votes
2answers
1k views

Subtracting Original Audio Signal

here is my scenario: one speaker is sending a chirp, and a microphone is recording it as well as all following echoes. The function of the chirp is already know. My goal: subtract the original chirp ...
4
votes
3answers
8k views

How do I get the phase angle from Cross Correlation?

Im trying to cross correlate two signals in matlab and get the phase difference between the signals. For cross correlation (the idea is to do it without xcorr) I used: ...
3
votes
1answer
333 views

Cross-correlation, sharp peak at 0?

First of all, I have to stress that I am not a professional of coding, no more than a professional of signal processing. I am a chemist that happen to be working on a project involving both. So in ...
2
votes
2answers
4k views

Cross-correlation peak

How get cross-correlation peak and based on it calculate correlation score for similarity of two audio samples. SO far I've FFT two samples complex conjugate second multiply results IFFT cross-...
2
votes
1answer
528 views

Signals cross-correlation

I am trying to measure phase difference between two received waves which are recorded by two separate PC's (microphones). The two PC's starts recording at the same time, then I make a sine wave sound ...
2
votes
2answers
597 views

How can I align these two signals? Cross correlation isn't working properly

I have two radios sampling simultaneously, and I am trying to time-align their two signals (they will always start sampling at slightly different times with random delays due to hardware differences). ...
1
vote
1answer
424 views

GPS Coarse Acquisition PRN Codes

Are the actual 1023 bit sequences for each of the 32 GPS satellites available to consumers? I found the IS GPS 200 but it doesn't list the entire sequences. Are verified sequences available for ...
1
vote
1answer
699 views

Time delay estimation using ultrasound

I have a sound source that generates an ultrasonic pulse. I have two microphones seperated by a distance which are at a distance from the source. I want to find the time delay of arrival of the ...
0
votes
0answers
29 views

Matlab normxcorr for 1D signals

I am very surprised not to find a version of normxcorr2 for 1D signals in Matlab ! I implemented something like that by hand (with 2 for loops, and normalizing the template as well as the window under ...
0
votes
1answer
1k views

Real-time delay between signals

I currently have a real-time noise suppression algorithm based on two inputs from different microphones. It has passed most tests that I have thrown at it, however when the signal I am trying to ...
0
votes
1answer
73 views

Correlation between frequency and initial phase estimates using FFT

Why is there a high negative correlation between frequency estimation errors and initial phase estimation errors when measured using FFT? I have a simple code showing this negative correlation. is ...
0
votes
2answers
737 views

how to match 2 signals that have same information, though shifted and scaled

I have 2 signals S1 and S2 that contain the same information, but S2 is shifted and scaled compared to S1 by an unknown amount (but small; eg shift would be of the order of 1-10 samples). What is the ...
-1
votes
2answers
1k views

How to calculate Time Delay Estimation?

I have 2 data files, which links are attached below: Transmitted data Received data Those binary data are read by this MATLAB code: %% EDIT: clear all; close all; format long; ...