Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Obtaining meaningful velocity information from noisy position data

If this question is posted on the wrong stackexchange site - please suggest where I can migrate it to!

I'm studying the velocity of an object that undergoes multiple conditions with walls as well as with other objects. The raw data of the position of the object is slightly noisy, for two reasons: firstly, the resolution of the video is limited, and secondly, my tracking software also has some error in tracking the object (as the image of the object changes slightly over time).

If the velocity of the object is calculated simply by using the raw data of the position of the object, there is significant error (more than that of the velocity) as the object is being tracked at a high frame rate.

I am most interested in the velocity of the object during the time right before and after collisions, and this is thus a significant problem.

Possible options I've considered / attempted.

  • Applying a discrete Kalman Filter on the position data: This is a solution that comes out pretty often in posts about relate question. However, given that we have all the data when we begin to smooth our data, is the Kalman Filter the best way to make use of the available data? My understanding is that the filter is designed for data that is coming in over time (e.g. position data that is being received in real-time rather than a full set of position data).
  • Applying Savitsky-Golay smoothing on the position data: When I tried this on my data, I found that significant artifacts were introduced in the area of ±10 data points after each collision. I suspect this has something to do with the significant acceleration at collision, but after trying a range of parameters for the SG smoothing, I am unable to eliminate the artifacts.
  • Separating the data at collision, then smoothing velocities using a moving average: To overcome the problem introduced by the acceleration at each collision, I separated the data into multiple series at each collision point. For example, if there were three collisions, the data would be separated into four series. The velocity for each data series was then calculated and smoothed using a moving average.

In addition, some of my colleagues suggested passing the velocity information through a low-pass filter, which I have not attempted.

The two questions below are related to mine, and are provided as a reference.

Smooth of series data

Smooth GPS data

In addition, the paper below also seems to provide a good suggestion of how to implement the Kalman Filter, albeit for real-time data.

http://transportation.ce.gatech.edu/sites/default/files/files/smoothing_methods_designed_to_minimize_the_impact_of_gps_random_error_on_travel_distance_speed_and_acceleration_profile_estimates-trr.pdf

like image 362
Vincent Tjeng Avatar asked Oct 21 '22 18:10

Vincent Tjeng


1 Answers

Choosing an appropriate filtering algorithm depends mainly on the behavior of your object and your measurement errors (or noise). So I can only give some generic tips:

Differentiation, i.e., calculating the velocity from position data amplifies noise considerably. So probably you do need some kind of smoothing. My ad-hoc approach would be: Fourier-Transform your position data, do the derivative in Fourier space and play around to find an appropriate boundaries for low-path filtering. Applying other transfer functions to your transformed positioned data can be interpreted as kernel smoothing (though some mathematical insight in kernel methods is needed to do that properly).

The Kalman filter is state estimator, which works recursively. If you have a proper (discrete time) motion model & measurement model, it will yield in good results and give you a direct estimate for the velocity. The rules of thumb for such an approach:

  • Model in the 3D space or 6D space if your object has rotational degrees of freedom, not in image space (the noise behaves differently)
  • Carefully investigate your projection errors (camera calibration) & carefully choose the noise parameters
  • Use an Unscented Kalman filter (it is much better than an Extended Kalman filter) if non-linearities occur

Kalman filtering and low path filtering are closely related. For many simple applications the Kalman Filter can be thought of an adaptive low path filter, which does smoothing.

The non-recursive Kalman Filter is a called Gaussian process - though I only see advantages over the Kalman filter if your trajectories have a small number data points. Their application is not as straight forward as the KF.

like image 148
Dietrich Avatar answered Nov 15 '22 15:11

Dietrich