4
\$\begingroup\$

I am trying to reconstruct the trajectory of an object with an strapped down IMU on board to do dead reckoning. A Kalman filter seems to be in order. But the Kalman filter seems to be oriented toward real time updates of position. However I have the luxury of not having to figure out the position of the object while it is moving. At the end of the path I will have all the data(gyros and accelerometers and maybe magnetometers) I can use to calculate the path. Is there something better than Kalman that can be used?

Right now I have a superficial understanding of the Kalman filter so forgive me if this question is a little dumb. I did not want to get involved with the Kalman filter if it is sub optimal.

\$\endgroup\$
  • \$\begingroup\$ I believe the Kalman filter is still the optimal, since there is no advantage of having the future data as the "current" position is only dependent on the past. Unless you have some periodic precise position sensing.. \$\endgroup\$ – Eugene Sh. Feb 16 '17 at 14:56
  • \$\begingroup\$ @Eugene This reminds me a bit of Viterbi decoder. For it, rhe final position is helpful , since it eliminates some of the states. I'm not sure how would this fit in Kalman filter theory. \$\endgroup\$ – AndrejaKo Feb 16 '17 at 14:59
  • \$\begingroup\$ @AndrejaKo If we have the precise final position reading it would definitely help. Not sure about the math, though :) \$\endgroup\$ – Eugene Sh. Feb 16 '17 at 15:00
  • \$\begingroup\$ I believe the Data assimilation is the process you are talking about.. \$\endgroup\$ – Eugene Sh. Feb 16 '17 at 15:06
  • 3
    \$\begingroup\$ Kalman filter is optimal for nonstationary data. When all the data is known a Wiener filter is optimal. (Simplistic view, Kalman is like a infinite impulse response filter and Wiener is a finite response solution for the same problem.) \$\endgroup\$ – skvery Feb 16 '17 at 15:08
1
\$\begingroup\$

The Kalman Filter does more than just "filtering". It disambiguates translational accelerations from reorientations with respect to gravity, and uses inputs from accelerometers and gyros to produce something that resembles true position in space. You can't do that with single-input single-output filters.

\$\endgroup\$
  • \$\begingroup\$ Where the restriction on the number of inputs came from? \$\endgroup\$ – Eugene Sh. Feb 16 '17 at 18:26
  • \$\begingroup\$ It's not a restriction -- its that converting such signals to physical position and orientation is inherently ill-posed. \$\endgroup\$ – Scott Seidman Feb 16 '17 at 20:28
  • \$\begingroup\$ Well, probably we have a different interpretations of the question. I read it as "For the current and past measurements we have a Kalman filter to optimally approximate the current and past <values of whatever>. Is there a better method to approximate the whole history of the <value of whatever> given we have all of the historical measurements". \$\endgroup\$ – Eugene Sh. Feb 16 '17 at 20:33
-1
\$\begingroup\$

You can try filtfilt in Matlab. It filters data forward with FIR filter of your choice and then it turns backward. The filtered data have no lag or phase shift, compared to all real time filters. filtfilt practically determines the boundary and initial conditions, so it adapts to the first and last data in the data table/buffer.

EDIT:

https://github.com/xioTechnologies/Oscillatory-Motion-Tracking-With-x-IMU/blob/master/Script.m

I have found a matlab example from xio Technologies. The guy is the famous Madgwick, author of the fusion IMU algorithm used in quadcopters. Well, indeed he also uses filtfilt to compute data in Matlab.

\$\endgroup\$
  • \$\begingroup\$ filtfilt can do FIR and IIR filters, nice. \$\endgroup\$ – skvery Feb 16 '17 at 15:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.