Hi, Everyone in our Matlab Community
I am trying to solve a time of arrival time problem with lsqnonlin function and find something interesting and I do not quite understand. Time of arrival problem is for a source at unknown location and time [x_s,y_s,z_s,t_s], its radiated wave travel to each station S1-S7 (i assumed 7 stations in my case) at the speed v, the locations of stations are known, the times of wave arrivals at each station are known as well ((x,y,z,ta) ). So I want to find out the time and location of the source from these knowns.
The equation used shown below:
t(i)=t_s+sqrt((x(i)-x_s)^2+(y(i)-y_s)^2+(z(i)-z_s)^2) % this is calculated time of arrival for station i, where x(i),y(i),z(i) are location of each station and are known, [t_s, x_s, y_s, z_s] are unknowns and what we want to get from lsqnonlin. ta(i) is the actual arrive time, which is known
To find out the best solution, we need to minimize the sum up of ((t(i)-ta(i))^2) for i from 1 to 7.
To do that, I first give faked a source at [5000 5000 8000] and let it radiate at time t=0 and travel at the speed of v. Locations of 7 stations are known, then I find out the arrival times for each station. After that, I try to go backward, try to use only the arrival times and location of stations to find out the source time and location by using lsqnonlin.
I found out when I set wave traveling speed v=3*1e3, the x output by lsqnonlin is correct and it takes 12 iterations, but when I set the wave traveling speed v=3*1e8, the output x are very far away from the true values of the faked source, but very close to the initial guess, actually it stops after the first iteration. Can someone tell me why and give suggestions to make it also work when I set v=3*1e8?