1

I have an object that I am tracking with bluetooth indoor positioning system (angle measurement). The object usually moves with velocity around 30-50 km/h, but it can peak over 150 km/h. The object also makes sharp turns.

I have the absolutely raw data (xy-coordinates), but it has terrible noise. I also have radar data so I can verify the velocity with accuracy that is suitable for me. The object can move in 3d, but the z-coordinate is small.

The system gives me data between 1 to 100 ms. The interval is not even.

So far I have calculated the velocity from the noisy data, and then I have applied low pass filter (finite impulse response) to it. Yes, I loose the spikes, but the speed is way off compared to radar.

My goal is to find as good as possible velocity estimate for the peak between those sharp turns. That means when the object is going straight.

Does anyone have any tricks and tips for designing a filter for the noise from the positioning data?

Asaf Karagila
  • 393,674
  • I believe this is what a Kalman Filter is for (but I don't know much about this.) – Jair Taylor Jan 16 '18 at 18:57
  • The system comes with Kalman Filter and it does not work well with these kind of objects. The velocity plot has a shape that is nearly parabola which is far from reality. But note that I am not an expert on this area. –  Jan 16 '18 at 19:01
  • Are you resampling the data to even sample spacing prior to filtering? – AnonSubmitter85 Jan 17 '18 at 03:28
  • I haven't done that. –  Jan 17 '18 at 05:11
  • You need to resample the data to be evenly spaced prior to filtering. – AnonSubmitter85 Jan 17 '18 at 16:34
  • For example, if my first five data points come in at 1, 5, 17, 19, 45 ms, then how I can resample it? Somekind of interpolation? –  Jan 17 '18 at 19:26
  • @ardevealca Start by searching for information on nonuniform to uniform resampling. I don't know what environment you are working in, but if it's matlab, you'll find plenty of available functions for doing so. – AnonSubmitter85 Jan 18 '18 at 04:04
  • Before I request matlab licence from the IT deparment I ask that do you mean that I should resample x coordinate and y coordinate, and then apply for example some variant of Kalman filter or perhaps FIR to velocity calculated from the resampled coordinates? The licence is quite pricey for companies. –  Jan 20 '18 at 06:48
  • What I mean is that for the filters to have the desired effect, the input data need to sampled at evenly-spaced intervals. So, if you have x-y coordinates sampled at 1, 5, 17, 19, 45, ... seconds, you need to resample them your data to, say, 1, 5, 9, 13, 17, ... seconds. You can check out Octave (free, open-source) as an alternative to Matlab. – AnonSubmitter85 Jan 20 '18 at 18:24
  • Is resampling where one applies interpolation a good choice for starters? –  Jan 21 '18 at 15:44
  • @ardevealca Resampling is a form of interpolation. However, just using something like linear or cubic interpolation will lead to spectral artifacts. I'd find the shortest sampling interval you have and then use sinc-based interpolation to upsample the rest of the data to that rate. If you are not familiar with these topics, I'd just look for a built-in function that does it. For starters, however, any interpolation would do I suppose. I have no idea what your data look like, so maybe linear/cubic is good enough. – AnonSubmitter85 Jan 21 '18 at 17:20
  • @AnonSubmitter85 I will try this: https://www.gnu.org/software/octave/doc/v4.0.3/One_002ddimensional-Interpolation.html –  Jan 21 '18 at 19:01

1 Answers1

0

Suppose the incoming data is in variable y where y is a function of time, y(t). Suppose too that a new data point is collected each millisecond.

$Saved\_Data=y(t)\cdot.005+(1-.005)\cdot Saved\_Data$

By this method, at each millisecond, instead of saving the data value, y(t) , we save a very small part of it, $y(t)\cdot.005$ and add it to a very large part of the already saved data, $0.995\cdot Saved\_Data$.
I adjust the value 0.005 as needed since the data reception is slowed by the method - i.e. there is a lag, but it is usually not too bad.

Narlin
  • 1,201