'In Extended Kalman Filter how to test residual (innovation) any idea

Statistical test is required in terms of residual check.

How to test residual in matlab? I was plotting it.

  1. I found that innovation term is oscillating considerably around zero in a zig zag manner.
  2. Is innovation expected to zero? If yes how to do that?


Solution 1:[1]

As I understand in the EKF innovation after convergence should be a 0 centered normal distribution. But if you do exact initialization it's not a problem.

I'm doing this just in my head so I might have an error there - but their covariance matrix should be HPH'+R (following http://en.wikipedia.org/wiki/Extended_Kalman_filter notation).

To show the normality you could plot a histogram and/or a qq-plot. To confirm the 0 center a t-test might be good, maybe even a chi-square test if it agrees with the covariance matrix.

Just make sure you always scale properly using the covariance matrix.

As you describe big fluctuations it looks like some of the matrices are chosen improper.

Solution 2:[2]

To answer your question I direct you to a good resource on Kalman Filtering from the University of Sydney's ACFR Data Fusion Notes. Read around pages 55-60.

Here is an excerpt from pp.55, describing an image on pp.58:

The most important points to note are that the innovation sequence is zero mean and white, and that approximately 65% of all innovations lie within the ‘one-sigma’ standard deviation bounds.

In other words the innovation sequence should be zero-mean and have 65% of its values within one-standard-deviation of 0. In addition 95% of values should be within three standard deviations. These properties come from the definition of the Normal Distribution.

Solution 3:[3]

Here are three tests mentioned in [1]:

  1. Innovation magnitude bound test: basicaly Comparing innovations against sigma points obtained from matrix S.
  2. Chi-squared test on nomalized innovations squared: The normalied innovation squared is supposed to have a chi-squared distribution.
  3. Innovation whiteness (autocorrelation) test: Innovations are supposed to be white, hence the test on whiteness.

All the three are well explained in [1]. Another useful reference for performing the second test is [2].

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 Gouda
Solution 3 SaTa