Origin of divergence in a divergent field (2D)

60 Views Asked by At

I have a field of measured vectors, see example of four vectors in image below. If there was no noise they would all point outward exactly from one "central point". i.e. there would be a circle whose tangent is perpendicular to all vectors. Unfortunately there is some noise in the measurement, I am looking for the best approximation for the center of this circle.

Thanks for your ideas!

Field of measured vectors

1

There are 1 best solutions below

0
On

I would try to minimize the sum of squares of distances from lines determined by the given vectors.

Let's say the vectors are $v_1,\dots,v_n$, positioned at $p_1,\dots,p_n$. Let $u_k$ be a unit vector perpendicular to $v_k$: namely, $$ u_k = \begin{pmatrix}0&1\\-1&0 \end{pmatrix}\frac{v_k}{\|v_k\|^2} $$ For a point $x\in \mathbb{R}^2$, the formula $|(x-p_k)\cdot u_k|$ gives the distance from $x$ to the line determined by the pair $(p_k,v_k)$.

So, the goal is to minimize $$F(x) = \sum_{k=1}^n (x\cdot u_k-p_k\cdot u_k)^2,\qquad x\in \mathbb{R}^2$$ This is easy because $F$ is quadratic in $x$. Its gradient is a linear function of $x$: $$\nabla F(x) = 2 \sum_{k=1}^n (x\cdot u_k-p_k\cdot u_k) u_k $$ The minimizing $x$ is the solution of the linear system $Ax=b$ with $$ A = \sum_{k=1}^n (u_k\otimes u_k),\qquad b = \sum_{k=1}^n (p_k\cdot u_k) u_k $$ (Using $\otimes$ for outer product).