# Convergence issue LEAST SQUARES

#### CHIPI

##### New Member
I'm computing the trajectory of a moving body and my net is composed by 5 stations.
My observations are DTOA: difference in time of Arrival (they have been linearized).
I am trying to use Least Squares with a linear model: Y Ax + b, where Y are the observed measurements (DTOA), A the design matrix, b is the known terms vector and X is a vector of estimates.
The algorithm processes data according to the epoch considered and iterate the process up to a value of 20 times, unless it reaches before a mm convergence.
Since it is an iterative process, the system requires an initialization at the starting point with approximated values for the unknowns, and here comes my problem: if I initialize the starting point with coordinates within the polygon formed by the five stations convergence is reached and the solution is successful, but if I initialize the point with coordinates outside the area formed by the stations the convergence is not reached and I’m not able to determine the trajectory.
Does anyone of you have an explanation for this?

#### katxt

##### Well-Known Member
This sounds like an interesting problem, but you will need to explain it in much simpler terms for those of us who aren't familiar with the situation.

#### Dason

##### Ambassador to the humans
And if could explain why you need an iterative algorithm that might help too. A standard linear model using least squares has a closed firm solution and nothing you said gives any info on why that wouldn't work for you.

#### katxt

##### Well-Known Member
It sounds like you are trying to locate a point (an animal perhaps?) which has emitted a sound. This sound is detected at 5 stations, and the arrival time referenced against a "zero" station. You then pick a point at random, find the distance to each station, work out what the times would have been for this point, and find the sum of the errors squared. You then wiggle the point about systematically until the sum is a minimum. Declare that to be the point. So far, this is a least squares minimization problem.
(If this isn't what is happening, then it sounds like an idea I could try.)
Having established a set of points, it may then be time to do a regression on these path points.