force singular value decomposition :: multiple solutions

232 Views Asked by At

Well I'm writing a code to solve a positioning problem. given arrival times from multiple sources I want to invert and get the receiver position. obviously I have the xyz of each receiver. so I linearized the problem and wrote my matrices in the form of "A*X=B" and used the singular value decomposition to get "X" I implemented my svd code from numerical recipes

so I generated some simulation data with 25 sources and one receiver where I know the exact xyz of all sources and receivers + arrival times

I did my computation to solve for the receiver xyz and compared with the previously known data (so the simulation is basically to make sure everything works fine)

the x and y were exactly the same, which is very good news. but the z value was completely different (instead of -2143 I got -6).

I think the reason for that is that there is 2 solution for the system and the dvd code uses the one with the smallest absolute value and thus returns "-6"

is there any way I can force svd to return the solution with the largest absolute value?

Many thanks