find the angles of a given vector sum

59 Views Asked by At

Assume you have n vectors in 2D space, with different fixed magnitudes $l_i$. The problem is to find the angle of each vector such that vector sum is a specific vector. That is,

$\sum l_i \cos \phi_i=v_x$

and

$\sum l_i \sin\phi_i=v_y$,

where $l_i$ is the (given) magnitude of vector i and $v_x$ and $v_y$ are the given x and y components of the target sum. The problem is to find the angles $\phi_i$'s.

Apparently, it can have infinite number of solutions and moreover there is no explicit solution for more than 3 vectors (?). Anyhow, what would be the best algorithm to find any angle set numerically. I tried defining an optimization problem as following:

$\min_{\phi_i} {(\sum l_i \cos\phi_i-v_x)^2}$

subject to $\sum l_i \sin \phi_i =v_y$

Furthermore, I linearize the expressions up to the 2nd order of $\phi_i$ around 0, and use the ADMM approach so solve it iteratively. I'm wondering if this is a good approach.