I have an equation system of the form Aix + Biy + Ciz = Di, where (x,y,z) is a unit vector, and (Ai,

Sabrina Burgess

Sabrina Burgess

Answered question

2022-06-02

I have an equation system of the form Aix + Biy + Ciz = Di, where (x,y,z) is a unit vector, and (Ai, Bi, Ci, Di) are sets of measurements from a noisy system (with typically 3-5 independant readings).
My first intuition to solve this problem was to pose this as an overdetermined linear equation system AX = B where X = (x,y,z), and to solve for X. However, with that approach, I have no way to enforce that the solution for vector X is a unit vector.
Is there an elegant (or standard) solution to that problem, or should I simply dive into non-linear equation solving solutions?

Answer & Explanation

Ashly Kaufman

Ashly Kaufman

Beginner2022-06-03Added 6 answers

Unfortunately, the problem is almost certainly innately non-linear, since your solution space is inherently so. Pragmatically, the best approach is probably to treat your overdetermined linear system as a minimization-problem, least-squares style; this gives you a (positive definite) function to be minimized. Find the (exact) minimum value in R 3 , project that down to S 2 (i.e., normalize your vector X) to find the closest point on the sphere, and use that as a starting point for some descent-based method (i.e., find the component of the gradient of your goodness-of-fit function tangent to the sphere, add that to your current point on S 2 and renormalize down to the sphere again, and keep doing that until you meet whatever convergence criterion you want to use. There's no guarantee that this will work if your data is particularly ill-conditioned, but in practice it's likely to be the most straightforward method.
Ayana Waller

Ayana Waller

Beginner2022-06-04Added 3 answers

This problem can be solved using singular value decomposition. The original problem can be stated as
m i n A x b 2 , x 2 = 1
By substituting
A = [ A ; b ] , x = w x ; w
and choosing w = x 2 x ; 1 2 we get x 2 = w x ; 1 2 = x 2 , so the problem becomes
m i n A x 2 , x 2 = 1
which is same as in this question: Minimizing A x 2 subject to x 2 = 1 It can be solved by decomposing A into U Σ V T and then taking the last column of V, which corresponds to the smallest singular value of A .
Finally x is calculated by dividing x by the last element, taking elements of x except the last one and then normalizing it.

Do you have a similar question?

Recalculate according to your conditions!

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?