# Looking for beginner friendly sources of cross correlation and TDOA

After some research, I got a rough idea of how TDOA can be used by a microphone array to multilaterate the location of a sound source. Specifically, I'm not referring to a clustered array of many microphones that only give direction of arrival, instead I'm interested in a spread-out microphone array, similar to the ShotSpotter system. Many paper mentions "general cross correlation" or "cross correlation" but none really explains the concept. I see that cross correlation is a technique used to compare the similarity between 2 signals, but how exactly does that help with TDOA? A challenge for real world TDOA system is that the microphones must be time synchronized. Does cross-correlation play a role in helping to solve this issue?

but how exactly does that help with TDOA?

The basic idea is rather simple: The location of the maximum of the cross correlation is the delay between the two signals.

So the process would be the following

1. Pairwise calculate the cross correlation between all microphone signals
2. Estimate the delays by finding the maxima of the cross correlation
3. Triangulate the source location from the delays.

In practice this tends to be lot more complicated

1. Most acoustic recordings contain a lot of noise: background noise, traffic, HVAC, competing sources, electrical hum, etc
2. The acoustic transfer function is very complicated: it contains lot of reflections and reverb
3. It's often hard to distinguish between the direct sound and the early reflections (mostly from floor and ceiling).
4. The direct path between the source and the microphone may be blocked so you need to identify diffraction or diffusion pattern.
5. Level and spectral content of the source signal can vary a lot and maybe insufficient to get a decent delay estimate

In many cases you need to carefully optimize around your specific environment, setup and requirements to get decent results. Things get a whole lot easier if the source signal is known (i.e. from a loudspeaker and you know what the loudspeaker is playing).

• But all of that TDOA process requires that each signal is time synchronized right? If we are just given a bunch of random time drifted signals, I don't think cross-correlation can be applied. Commented Nov 27, 2022 at 19:27
• Yes: all microphone signals need a common time base. Otherwise TDOA doesn't work (no matter which algorithm you use). There are different ways to accomplish this, but it's by far the easiest to use the sampling clock for all microphones Commented Nov 28, 2022 at 6:34