Rune Allnor wrote:> > In practice, the problem with this is Doppler. The relative speeds > of certain sensor/target configurations are on the order of Mach 0.05, > which translates almost directly to a frequency shift of some 5% > either way. >Hello Rune et al, The way around the Doppler problem is to work in the frequency domain. Just take your two received signals and convert them each over to the freq. domain. Then conjugate one of them and form a product vector. By this I mean R[0] = conj(P[0]) * Q[0] R[1] = conj(P[1]) * Q[1] R[2] = conj(P[2]) * Q[2] R[3] = conj(P[3]) * Q[3] R[4] = conj(P[4]) * Q[4] R[5] = conj(P[5]) * Q[5] R[6] = conj(P[6]) * Q[6] R[7] = conj(P[7]) * Q[7] and so on for all of the frequency values. Here R[] is the resulting vector. P[] is the DFT of one of the signasls. Q[] is the DFT of the other signal. Next just form S[i] = arg R[i]. Then unwrap the phase. Finally regressively fit a straight line to the data. The slope will tell you the time offset and the intercept gives you the frequency offset. Hence the Doppler part of the problem is separated from the TDOA part of the problem. And you don't have to try to find the peak in cross correlated data. Alternatively you can form two vectors from the Hermitian inner product data namely I and Q where I[i] = Re(R[i]) and Q[i]=Im(R[i]). Then just apply QdI - I dQ/(I^2 + Q^2) to the data and then average the result to get the TDOA.. IHTH, Clay p.s. I have a patent on this approach.
Online · Live + on demand
February 9-11, 2027
Price goes up Jan 1: register now to lock in today's rate
Register Now →
How to calculate time differrent between two signals?
Started by ●October 3, 2006
Reply by ●October 18, 20062006-10-18
Reply by ●October 18, 20062006-10-18
"Hieu Le Trung" <silver_hieu@yahoo.co.uk> wrote in message news:gYadnWeDUq-0iavYnZ2dnUVZ_tKdnZ2d@giganews.com...>> > > One more thing, two signals are not the same. > > Thank you > Hieu >Please explain what you mean by "time different between two signals" given that the two signals are not the same.
Reply by ●October 19, 20062006-10-19
> >"Hieu Le Trung" <silver_hieu@yahoo.co.uk> wrote in message >news:gYadnWeDUq-0iavYnZ2dnUVZ_tKdnZ2d@giganews.com... >>> >> >> One more thing, two signals are not the same. >> >> Thank you >> Hieu >> > >Please explain what you mean by "time different between two >signals" given that the two signals are not the same. > > > >I have two signals captured at 22050Hz, it maybe noise, maybe some other sound (it means that two signals contain different phase, different frequency...). And i need to find out the different of position of those two signals. I think i can use the time different like TDOA or something else but i'm not sure. What should i do? Thanks Hieu
Reply by ●October 19, 20062006-10-19
"Hieu Le Trung" <silver_hieu@yahoo.co.uk> wrote in message news:K4udnSKSWPBLnarYnZ2dnUVZ_oCdnZ2d@giganews.com...> > >>"Hieu Le Trung" <silver_hieu@yahoo.co.uk> wrote in message >>news:gYadnWeDUq-0iavYnZ2dnUVZ_tKdnZ2d@giganews.com... >>>> >>> >>> One more thing, two signals are not the same. >>> >> >>Please explain what you mean by "time different between >>two >>signals" given that the two signals are not the same. >> > > I have two signals captured at 22050Hz, it maybe noise, > maybe some other > sound (it means that two signals contain different phase, > different > frequency...). And i need to find out the different of > position of those > two signals. I think i can use the time different like > TDOA or something > else but i'm not sure. > > What should i do? >At the risk of stating the obvious, before you can measure the time difference between two dissimilar events, you must establish the time at which each event occurred. Before you can establish the time, you must have some means to recognize that the event occurred. Correlation between the some signature characterizing the real event and some sort of "idealized template" can help you establish this, as can other pattern recognition techniques. Do you have any sort of "template" that characterizes each event?
Reply by ●October 19, 20062006-10-19
> >"Hieu Le Trung" <silver_hieu@yahoo.co.uk> wrote in message >news:K4udnSKSWPBLnarYnZ2dnUVZ_oCdnZ2d@giganews.com... >> > >>>"Hieu Le Trung" <silver_hieu@yahoo.co.uk> wrote in message >>>news:gYadnWeDUq-0iavYnZ2dnUVZ_tKdnZ2d@giganews.com... >>>>> >>>> >>>> One more thing, two signals are not the same. >>>> >>> >>>Please explain what you mean by "time different between >>>two >>>signals" given that the two signals are not the same. >>> >> >> I have two signals captured at 22050Hz, it maybe noise, >> maybe some other >> sound (it means that two signals contain different phase, >> different >> frequency...). And i need to find out the different of >> position of those >> two signals. I think i can use the time different like >> TDOA or something >> else but i'm not sure. >> >> What should i do? >> > >At the risk of stating the obvious, before you can measure >the time difference between two dissimilar events, you must >establish the time at which each event occurred. Before you >can establish the time, you must have some means to >recognize that the event occurred. Correlation between the >some signature characterizing the real event and some sort >of "idealized template" can help you establish this, as can >other pattern recognition techniques. Do you have any sort >of "template" that characterizes each event? > > > >I got nothing here, i think i can use the TDOA theory on two microphones which captured the signal, is it? By the way, i still don't understand the equation yet. In TDOA, we have correlation between two microphones is Rij: Rij(r) = Sum( xi(n)xj(n-r) ) (n=0->N-1) xi: signal captured by microphone 1 xj: signal captured by microphone 2 Rij: cross-correlation r: ??? And i don't know how can i find out the time different from the cross-correlation between two microphones? Hieu
Reply by ●October 19, 20062006-10-19
"Hieu Le Trung" <silver_hieu@yahoo.co.uk> wrote in message news:UvWdnQz2wdKg0qrYnZ2dnUVZ_q2dnZ2d@giganews.com...> >> > By the way, i still don't understand the equation yet. In > TDOA, we have > correlation between two microphones is Rij: > > Rij(r) = Sum( xi(n)xj(n-r) ) (n=0->N-1) > > xi: signal captured by microphone 1 > xj: signal captured by microphone 2 > Rij: cross-correlation > r: ??? > > And i don't know how can i find out the time different > from the > cross-correlation between two microphones? >I'm just guessing here, but I think your xi(n) and xj(n) represent the signal samples taken from the microphones. Let's say that we have several different, unknown sound bursts arriving at your two microphones while we are sampling so that the waveforms are captured in the sample sets xi and xj. Then let's modify your equation above slightly: Rij(r) = Sum( xi(n) * xj(n-r) ) (for n = 0, 1, ..., N-M-1) and evaluate it for r = 0, 1, ..., M-1. If you inspect the values of Rij(r), you may find that there are one or more peaks at values of r_p0, r_p1, ..., r_pk. If you are very lucky, the biggest abs(Rij(r)) will be the value corresponding to your target sound source. This is by no means assured. If T is your sampling interval (1/T is your sampling frequency), then the time-difference-of-arrival for your target sound at the two microphones will be r_p0*T, or r_p1*T, or r_p2*T, or ..., or r_pk*T. In an environment where many sound waves reach the two mics, you'll need some way of deciding which one of many r_pk corresponds to the target sound source. This brings us back to the need to establish that the signal we're correlating is the signal that corresponds to the target of interest.
Reply by ●October 20, 20062006-10-20
> >"Hieu Le Trung" <silver_hieu@yahoo.co.uk> wrote in message >news:UvWdnQz2wdKg0qrYnZ2dnUVZ_q2dnZ2d@giganews.com... >> > > >> >> By the way, i still don't understand the equation yet. In >> TDOA, we have >> correlation between two microphones is Rij: >> >> Rij(r) = Sum( xi(n)xj(n-r) ) (n=0->N-1) >> >> xi: signal captured by microphone 1 >> xj: signal captured by microphone 2 >> Rij: cross-correlation >> r: ??? >> >> And i don't know how can i find out the time different >> from the >> cross-correlation between two microphones? >> > >I'm just guessing here, but I think your xi(n) and xj(n) >represent the signal samples taken from the microphones. >Let's say that we have several different, unknown sound >bursts arriving at your two microphones while we are >sampling so that the waveforms are captured in the sample >sets xi and xj. > >Then let's modify your equation above slightly: > >Rij(r) = Sum( xi(n) * xj(n-r) ) (for n = 0, 1, ..., N-M-1) > >and evaluate it for r = 0, 1, ..., M-1. If you inspect the >values of Rij(r), you may find that there are one or more >peaks at values of r_p0, r_p1, ..., r_pk. If you are very >lucky, the biggest abs(Rij(r)) will be the value >corresponding to your target sound source. This is by no >means assured. > >If T is your sampling interval (1/T is your sampling >frequency), then the time-difference-of-arrival for your >target sound at the two microphones will be r_p0*T, or >r_p1*T, or r_p2*T, or ..., or r_pk*T. In an environment >where many sound waves reach the two mics, you'll need some >way of deciding which one of many r_pk corresponds to the >target sound source. This brings us back to the need to >establish that the signal we're correlating is the signal >that corresponds to the target of interest. > > > > > > >Seem it hard to understand... By the way, can I apply cross-correlation or generalized cross-correlation on two signals which don't contain same frequency, same phase, same amplitude? If not any other solution instead of cross-correlation?
Reply by ●October 21, 20062006-10-21
"Hieu Le Trung" <silver_hieu@yahoo.co.uk> wrote in message news:P7ydnYVOCfeDPqXYnZ2dnUVZ_u2dnZ2d@giganews.com...> >> > Seem it hard to understand...Master Yoda was never known as a DSP expert.> By the way, can I apply cross-correlation or generalized > cross-correlation > on two signals which don't contain same frequency, same > phase, same > amplitude? > If not any other solution instead of cross-correlation?Here is what I understand so far: You have two microphones, M_a and M_b, each of which recorded two sounds, S_a and S_b. Due to physical issues, there is a delay between the time S_a arrives a M_a, and the time it arrives at M_b. Likewise, there is a delay between when S_b arrives at M_a and when it arrives at M_b. Your question, as I understand it, is, "I would like to know if S_a and S_b were produced at the same location." You cannot answer this question with the information you have available. The main reason is that even if you can determine the time between when S_a arrives at M_a and the time when it arrives at M_b, you cannot establish a unique physical position in 3D space (or even on a 2D surface) for the S_a sound source with this information alone. (I believe the best you can get from a single TDOA on a 2D surface is a set of points on a hyperbola.) So long as M_a and M_b are in the same position, the lines of constant TDOA for S_a and S_b will either not intersect, or they will intersect at an infinite number of points. If the TDOAs are different, you can say with some certainty that S_a and S_b were *not* made from the same location. If the TDOAs are the same, the best you can say is that S_a and S_b were produced by sources somewhere on a line of constant TDOA, but you don't know if they are at the same point on this line.







