# Time delay estimation of two sensor signals

I have two sensors which are placed around 30 to 40 cm apart , both of them measure the same signal say 'lambda signal'. so there is a delay in the measurement of the signal from the second sensor. During the travel there is some noise added to the signal. What are the procedure that I can use to calculate the time delay between them. According to my knowledge if I cross correlate both signals, the peak gives me the delay value of the second, but this is not working. Is there any other methods to find the time delay between eachother. Please guide me as I am new to signal processing.![Part of the signals][1]![Another part signal][2]

• What do you mean when exactly you say that cross correlation is "not working" ? Do you get a peak or not ? If you get a peak does it not correspond to the time difference ? Commented Jul 11, 2012 at 11:18
• @paul thanks for your immediately reply, I do get the peak but it is not corresponding to the time difference between them.As I am new to this community I cannot attach the pictures of the same.
– navi
Commented Jul 11, 2012 at 11:21
• If you put the images back into your question as links someone can edit them in for you so they display. Commented Jul 11, 2012 at 11:47
• 1) It's necessary to remove the /edit part in the end of each link in order to access them; 2) Even so, the documents look blank to me. Commented Jul 11, 2012 at 13:07
• @naveenbsrinivasa Oh, I didn't realize they were on Google Docs, well they need to be in a graphics format (jpg/png/etc) to display inline. Commented Jul 11, 2012 at 13:17

Comment: As a new user I am not allowed to add a comment to your question - hence this approach.

You mention that you do get a peak from the cross-correlation but that the lag estimation is incorrect. This implies that you know the correct result - is from a calibration signal or ..? And what is the lag roughly?

Could you explain what the signals look like (sinusoidals for example)? Also what is the SNR, sequence length, sampling frequency? Have you filtered the signals before sampling - if so how?

If the offset is incorrect it might be related to insufficient time resolution. Using a sampling frequency $f_s$ means that your time resolution is $T_\mathrm{s}=\frac{1}{f_\mathrm{s}}$. If this time resolution is not sufficiently small you may get an estimate that does not agree with your expectations.

There may be other techniques but this depends on the signals you have - and also if you for example know that the lag is always a fraction of a period time of a periodic signal. Some more details could help with this.

• as both signal share like properties, like the shape of both are almost same ,if I get a exact time lag I could overlap each other ,in result roughly only one signal could be seen. And the signals are not sinus they are randomly generated signals as they represent the amount of oxygen in the exhaust gas.
– navi
Commented Jul 11, 2012 at 12:50
• And the other issues about sampling frequency, the lag you expect etc.? Commented Jul 11, 2012 at 16:29
• depending on the frequency both have the same measuring frequency around 50hz. and the delay is not the fraction of the frequency, the delay keeps on changing as you throttle. so for analysis we consider only part by part say for every 10 seconds what is the delay and so on.
– navi
Commented Jul 11, 2012 at 17:01
• What is the delay roughly expected to be? Commented Jul 11, 2012 at 19:03
• depends around 5 samples to 15 samples. In which region you are searching
– navi
Commented Jul 11, 2012 at 19:14