How can I infer a vector field from an arbitrary shape or equation?

69 Views Asked by At

For example, let's say I have a particle that is free to move in an XY plane. It's supposed to execute a task, which, to put it simply, is to travel through a given path.

If it is outside of this path, the particle should be redirected to it, preferably via a vector field (important note: this might not be the best solution to this type of problem. If it really isn't, let me know, but I'd like a solution in the form of a vector field regardless).

I managed to deduce a vector field for the straight line $y=mx+n$, which is $(u,v)=\left(x,\left(m+\dfrac{1}{m}\right)\cdot x\cdot e^{-\lvert y-mx-n\rvert}-\dfrac{x}{m}\right)$.

In other words, if the particle is very far away from this straight line, it'll go towards it perpendicularly. As it approaches the line, it transitions to the direction of the line (another note: the directions are somewhat correct, but the vectors point away from the line instead of towards it).

What I wanted to do was to generalize it, generate a similar vector field for a circle, a parabola, etc.

1

There are 1 best solutions below

2
On

If you have a reference variable $r(t) \in R^2$ and a measured variable $x(t) \in R^2$, you need the error $e(t)=x(t)-r(t)$ to be as small as possible, given the measured variable $x(t)$ depends on a controlled variable $u(t)$ in some unknown form $x(t)=A(t)\{u(t)\}$.

As you can understand, this is not new at all. This is called Automatic Control, and there are thousands of books about this, dozens of different flavours (Linear, Optimal, Predictive, Heuristic, Intelligent, etc.), hundreds of techniques.

The more information you have about $A(t)\{\cdot\}$, the better.

Note that, if you are not aware of any $A(t)$ constraining the $x(t)$ trajectory, you can simply move $x(t)$ close to $r(t)$ as instantaneously as you wish ($A=1, x(t)=r(t)$), which is a trivial unrealistic boring case.