Time delay measurement between two same sinusoidals signals
显示 更早的评论
Hello,
My goal is to measure time delay between two sinusoidals signals : I put a delay between two signals equal to 1/4 period (i should measure a phase difference equal to 90°) http://www.imagup.com/data/1154852130.html f= 35000; %frequency Hertz of generated signals len= 0.001; %length of generated signals in seconds sr = 1024000; %sampling rate
I try to use FFT method to calculate phase difference at 35000 Hz with angle fonction, but the result does not seem to be correct.
If you need other information and you want to help me, just ask. Thank you
回答(1 个)
Karthik
2012-6-20
0 个投票
I can think of two ways of doing this.
1. Using xcorr calculate the shift at which the xcorr output has a peak (could be max or min) and using the sampling frequency and signal frequency get the shift in radians
2. Using sinefit (search matlab file exchange) which fits the function a0 + a1*cos(2*pi*a2 + a3) to data. If you use the same time base for the two signals then you will be able to tell the phase difference of the two signal from a3.
Hope that helps.
Karthik
类别
在 帮助中心 和 File Exchange 中查找有关 Spectral Measurements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!