필터 지우기
필터 지우기

Cross Correlation and time lag

조회 수: 2 (최근 30일)
Jade Sen
Jade Sen 2015년 4월 19일
댓글: dpb 2015년 4월 20일
So in my project work, i placed two accelerometers on a single vibrating body and i want to find the timelag between the signals at either end...
[Correlation,lag]=xcorr(voltage1,voltage2);
corrlength=numel(Correlation);
[mag,Index] = max(abs(Correlation));
sampletime=0.003 ;%data acquisition
timelag=lag(Index)*(sampletime);
------------------------------------- voltage1 and voltage2 are bandpassed signals from the accelerometers in a specific noise range
But everytime i run the function, the timelag and lag amounts to zero, no matter how much i adjust the accelerometer sensitivity and position. Is it supposed to be zero? Or am i doing something wrong?
  댓글 수: 3
Jade Sen
Jade Sen 2015년 4월 19일
oh thanks, ill try increasing the sampling rate then. Im using a simple second order butterworth bandpass, btw.
dpb
dpb 2015년 4월 20일
I'd start by looking at the two raw data signals with a scope triggered off the input first, then Accel A and see if the experimental setup is ok first...

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Correlation and Convolution에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by