I am trying to implement an indirect/error state kalman filter following Quaternion kinematics for the error-state Kalman filter. However, instead of modelling the orientation and error in orientation I have chosen to utilize Madwick to estimate the orientation.

The problem is that when I create the transition matrix from the first paper it expects the orientation error which it multiplies with the skew matrix of the measured acceleration and the accelerometer bias (page 40, equation 204). Since I have removed that from my states I can't use it, but then the measured acceleration is never considered (which I assume makes the filter worse). Is there any change I can make to the transition matrix so that it accounts for the acceleration?

  • $\begingroup$ "Instead of modelling the orientation and error in orientation I have chose to utilize [the Madwick filter]." What are you trying to measure with your filter, then? $\endgroup$
    – Chuck
    Commented Mar 28, 2017 at 13:45
  • $\begingroup$ Position, velocity and other factors. I have only removed orientation and gyroscope bias (since the Madwick filter accounts for bias). My thinking is that the Madwick filter is more than enough to model orientation, but I want position and velocity as well and so keep those state in the filter. $\endgroup$
    – Nordmoen
    Commented Mar 28, 2017 at 14:15
  • $\begingroup$ The Madgwick filter gives you position. $\endgroup$
    – Chuck
    Commented Mar 28, 2017 at 19:49
  • $\begingroup$ How does it do that? As far as I can see the only state that is kept in the paper is orientation, it also has no way of incorporating additional data like GPS or vision. $\endgroup$
    – Nordmoen
    Commented Mar 29, 2017 at 6:56

1 Answer 1


After careful reading of the first paper I think the solution to the problem is to simply not include the multiplication. From the proof of 172b and equation 177, in my filter I have $R_t$ (since I get that from the Madgwick filter) and can simply apply that to the error state. So equation 195b is instead $\delta v = \delta v - (R\delta a_b - \delta g)\Delta t + \mathbf{v_i}$, note that we don't multiply with $\theta$ since the Madgwick filter models that error.

The transition matrix does then not have to include any terms related to $\theta$ which means we only relate error in speed with error in accelerometer $\delta a_b$ and error in the gravity vector $\delta g$. In essence we remove the skew matrix multiplication.

Edit: I will hold of accepting this answer either until I have a chance to try the improvement or until someone else can vouch for it. Other answers are very welcome!


Your Answer

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

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