0

I'm trying to do sound triangulation mathematically, and I'm a little lost.

I have a list of latitudes, longitudes, heights and precise times, each representing the same sound as heard by a number of different detectors at different locations:

$$sample_1 = \{position_x,\quad position_y,\quad position_z,\quad time\}\\ sample_2 = \{position_x,\quad position_y,\quad position_z,\quad time\}\\ sample_3 = \{position_x,\quad position_y,\quad position_z,\quad time\}\\ sample_4 = \{position_x,\quad position_y,\quad position_z,\quad time\}\\ sample_5 = \{position_x,\quad position_y,\quad position_z,\quad time\} \\\vdots$$

I know that the origin point of the sound can be represented by a latitude, longitude, height and time:

$$origin = \{position_x,\quad position_y,\quad position_z,\quad time\}$$

I also know that there is an inherent link between different representations of the same sound, connected by the distance in space and time and the speed of sound. I'm trying to find the origin point, as a latitude, longitude, height and time, and I don't need someone to solve everything for me, I'm just looking for a starting point, some first steps that can help me figure out a complete solution that can be implemented algorithmically as a computer program.

  • Have you heard about Delaunay triangulation ? – Jean Marie Oct 07 '17 at 21:53
  • I have been working this problem recently in cartesian coordinates but I need at least four points since I consider that the unknowns are the coordinates of the transmitter plus the time at which the sound was produced. If you are able to transform the positions in cartesian coordinates, I could provide a simple solution. – Claude Leibovici Oct 08 '17 at 04:29
  • @ClaudeLeibovici I can definitely do Cartesian. The distances are small enough that curve distortion is very minimal, relative to the accuracy I'm looking for. Thanks a bunch – TheEnvironmentalist Oct 08 '17 at 07:41
  • I was expecting that you can do. But the problem to me is that you may be need at least four data points since the time at which the sound was produced is unknown. Do you agree with me or not ? – Claude Leibovici Oct 08 '17 at 07:57
  • @ClaudeLeibovici I have many more than four points, I just showed three above as an example. I edited it to reflect this, as I realized while thinking over this problem that adding in the z axis would necessitate a fourth data point – TheEnvironmentalist Oct 08 '17 at 08:16
  • Please let me know how it works. If you want to double check, send me test data (.txt file with $(x_i,y_i,z_i,t_i)$ on each line (and the value of $c$. My e-mail address is in my profile. By the way, you could also adjust $c$ ! – Claude Leibovici Oct 08 '17 at 09:03

1 Answers1

2

Using cartesian coordinates.

The model is $$t=T+\frac 1 c\sqrt{(x-X)^2+(y-Y)^2+(z-Z)^2}\tag 1$$ where $v$ is the speed of sound,and $X,Y,Z$ the coordinates of the transmitter.

You have $n$ data points $(x_i,y_i,z_i,t_i)$ which makes the problem looking like a nonlinear regression and, as usual, it is important to have good starting values. To get them, rewrite $(1)$ as $$e_i=(x_i-X)^2+(y_i-Y)^2+(z_i-Z)^2-c^2(t_i-T)^2 \tag 2$$ Now consider $$f_{ij}=e_i-e_j\tag 3$$ Develop, expand and group terms; this makes $\frac{n(n-1)}2$ equations which write $$\text{lhs}_{ij}=(x_j^2-x_i^2)+(y_j^2-y_i^2)+(z_j^2-z_i^2)+c^2(t_i^2-t_j^2)$$ $$\text{rhs}_{ij}=2(x_j-x_i)X+2(y_j-y_i)Y+2(z_j-z_i)Z+2c^2(t_i-t_j) T$$ So, a multilinear regression (or, better, matrix operations) will give you the estimates of $X,Y,Z,T$ from which you can very safely start the nonlinear regression (if you need to polish the estimates).

This works very well (I used this method for years in industry).

Edit

For illustration purposes, I took the following case ($c=300$ m/s) $$\left( \begin{array}{cccc} x_i & y_i & z_i & t_i \\ 123 & 234 & 456 & 50.20 \\ 234 & 456 & 789 & 49.48 \\ 345 & 678 & 901 & 48.92 \\ 456 & 789 & 12 & 49.10 \\ 567 & 890 & 123 & 48.54 \\ 789 & 12 & 345 & 49.40 \\ 890 & 123 & 456 & 48.85 \end{array} \right)$$

The first step leads to $$X=1241.10 \qquad Y=995.36 \qquad Z=656.36 \qquad T=45.624$$

Going to nonlinear regression leads to the following results $$\begin{array}{clclclclc} \text{} & \text{Estimate} & \text{Standard Error} \\ X & 1232.27 & 5.01 \\ Y & 987.67& 3.60 \\ Z & 653.59 & 2.13 \\ T & 45.682 & 0.019 \\ \end{array}$$ The data were generated using $X=1234$, $Y=987$, $Z=654$, $T=45.678$ and the times were rounded to the second decimal place.