Time delay measurement between two same sinusoidals signals
5 views (last 30 days)
Show older comments
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
0 Comments
Answers (1)
Karthik
on 20 Jun 2012
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
0 Comments
See Also
Categories
Find more on Fourier Analysis and Filtering in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!