-1
$\begingroup$

I have an object that is moving towards target points and I want to determine when it will reach or pass through them. I receive points in real time, which represent the current position of the object. The position is a 6-D vector. The data can be download from here

Initial approach

For each received point:

  • Calculate distance between current and target points.
  • As the object approaches the target, the distance decreases. If current distance is greater than previous distance, I consider that it has reached the target. It's good enough for me.

Problem

The problem is that the point can sometimes fluctuate a bit. It can increase and then decrease again (noise), even if it has not yet reached the target. But because of this fluctuation, my algorithm detects a false positive because the current distance is greater than the previous one.

The image shows false positives and true positives. When a real upward trend begins, I know that the object has reached the target point. My simple idea to start with is to get rid of false positives by using a smoothing filter and fit a curve. After that I can find when positive slope begins which tells me when object reached target.

I wonder if I should try this approach or any other recommendations including smoothing filters, fitting a curve, etc?

enter image description here

$\endgroup$
9
  • $\begingroup$ Please confirm if this is a 1D problem. (In 2D, the distance can form a minimum while being far from the origin.) $\endgroup$ Commented Jun 26, 2023 at 8:59
  • $\begingroup$ If 1D, why don't you just compare the distance to $0$ ? Or detect a change of sign ? $\endgroup$ Commented Jun 26, 2023 at 9:00
  • $\begingroup$ I suggest you show us one or two examples of real data: a plot of the sequence of points (connected by lines) in 1D, 2D, or 3D; a plot of the distance from the origin, as a function of time. Also, what do you know about the movement of the object? Does it tend to move in a straight line? Is it a physical object, with acceleration typically bounded (e.g., a car, a plane, etc.)? I don't think we can answer whether you should use noise filters; that will depend on the specific situation where this arises, and is beyond the scope of this site. $\endgroup$ Commented Jun 26, 2023 at 16:42
  • $\begingroup$ @D.W., I added an update in my post $\endgroup$ Commented Jun 27, 2023 at 5:39
  • $\begingroup$ Please don't use "UPDATE". Instead, revise your question so it reads well for someone who encounters it for the first time. See cs.meta.stackexchange.com/questions/657/… $\endgroup$ Commented Jun 27, 2023 at 7:50

1 Answer 1

0
$\begingroup$

No one can tell you what will be best; you'll have to try different approaches and see what works best in your setting.

I think one reasonable approach worth trying is to filter the data using a Kalman filter, then find the filtered point that is closest to the origin (or target) (without trying to look for upward/downward trends).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.