フィルターのクリア

time delay between two signals from the same source

4 ビュー (過去 30 日間)
Padma
Padma 2011 年 10 月 27 日
Hi
Could someone help me to find the time delay between two signals coming from the same source by using the concepts of correlation and autocorrelation. I am new to matlab, so could you please explain from the basic concepts?
Thanks in advance
  1 件のコメント
Daniel Shub
Daniel Shub 2011 年 10 月 27 日
Are the two signals correlated?

サインインしてコメントする。

採用された回答

Honglei Chen
Honglei Chen 2011 年 10 月 27 日
You can use xcorr to determine the delay in samples and then use sampling frequency to find out the exact delay in time.
fs = 100;
t = 0:1/fs:1;
x = sin(2*pi*t);
y = sin(2*pi*t+pi/10);
[c, lags] = xcorr(x,y)
If you examine c, the maximum is at index 106, which corresponds t a lag of (see lags) 5. This means the two signals match at a delay of 5 samples. You can translate that to time by dividing the number of samples with the sampling frequency. You can also use findpeaks to automate the peak search.
HTH

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDescriptive Statistics についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by