Confusion regarding usage of Mahalanobis distance for update rejection in Kalman filtering












3












$begingroup$


I recently came across some material that discussed a method for performing update rejection in Kalman filters when bad measurements are received. [Paper 1] [Paper 2: see Section III(E)] This method involves the usage of Mahalanobis distance to decide whether or not a newly obtained measurement is an 'outlier'.



As per my understanding, the method goes as follows: when a new measurement is obtained, the difference between the observed and predicted measurements: $(z^{i} - hat{z}^{i})$ is combined with the innovation covariance $S$ that is computed after the prediction step as



$$
gamma_k = (z^{i} - hat{z}^{i})^{T}S^{-1}(z^{i} - hat{z}^{i})
$$



Moving forward, the method states that assuming the process/measurement noises are Gaussian distributed (as is standard for Kalman filters), $gamma_k$ should be Chi-square distributed with $m$ degrees of freedom (which incidentally should also be the rank of $S$). So the method concludes that: for a pre-set confidence interval $alpha$, if $gamma_k$ were to exceed the $alpha$-quantile of the Chi square distribution for $m$ degrees of freedom, it should be treated as an outlier and can be rejected.



Hence, for example, for a system with 2 degrees of freedom and assuming 1% confidence threshold, this essentially states that if the value of $gamma_k$ ends up being more than 9.2 (ref: Chi square quantile table), the measurement has a 99% probability of being an outlier. I am confused by how this constant value is valid within the Kalman filter framework; because while $(z^{i} - hat{z}^{i})$ is definitely representative of how 'far' a measurement is compared to the prediction, $S$ depends entirely on the confidence of the filter till the current instant.



$$
S_k = H*hat{P}_k*H^T + R_k
$$



If the filter is receiving good measurements till time instant $k$, and the system is confident enough about the states, the predicted covariance $hat{P}_k$ should be a low value, ($H$ is a constant anyway) which makes $S$ dependent entirely on the measurement noise covariance, which is user choice: so how is the number 9.2 significant here?



I tried out the Mahalanobis distance method in a pose estimation system for a robot with six degrees of freedom: and when I received some obviously wrong 'outlier' measurements, I was able to spot the spike in the value of $gamma$, but it was nowhere close to the value for deciding if it was an outlier corresponding to six degrees of freedom (which is 16.8 for 1% threshold): instead, it was around 0.2. Am I wrong in my understanding/implementation of how update rejection works in this context?










share|cite|improve this question











$endgroup$

















    3












    $begingroup$


    I recently came across some material that discussed a method for performing update rejection in Kalman filters when bad measurements are received. [Paper 1] [Paper 2: see Section III(E)] This method involves the usage of Mahalanobis distance to decide whether or not a newly obtained measurement is an 'outlier'.



    As per my understanding, the method goes as follows: when a new measurement is obtained, the difference between the observed and predicted measurements: $(z^{i} - hat{z}^{i})$ is combined with the innovation covariance $S$ that is computed after the prediction step as



    $$
    gamma_k = (z^{i} - hat{z}^{i})^{T}S^{-1}(z^{i} - hat{z}^{i})
    $$



    Moving forward, the method states that assuming the process/measurement noises are Gaussian distributed (as is standard for Kalman filters), $gamma_k$ should be Chi-square distributed with $m$ degrees of freedom (which incidentally should also be the rank of $S$). So the method concludes that: for a pre-set confidence interval $alpha$, if $gamma_k$ were to exceed the $alpha$-quantile of the Chi square distribution for $m$ degrees of freedom, it should be treated as an outlier and can be rejected.



    Hence, for example, for a system with 2 degrees of freedom and assuming 1% confidence threshold, this essentially states that if the value of $gamma_k$ ends up being more than 9.2 (ref: Chi square quantile table), the measurement has a 99% probability of being an outlier. I am confused by how this constant value is valid within the Kalman filter framework; because while $(z^{i} - hat{z}^{i})$ is definitely representative of how 'far' a measurement is compared to the prediction, $S$ depends entirely on the confidence of the filter till the current instant.



    $$
    S_k = H*hat{P}_k*H^T + R_k
    $$



    If the filter is receiving good measurements till time instant $k$, and the system is confident enough about the states, the predicted covariance $hat{P}_k$ should be a low value, ($H$ is a constant anyway) which makes $S$ dependent entirely on the measurement noise covariance, which is user choice: so how is the number 9.2 significant here?



    I tried out the Mahalanobis distance method in a pose estimation system for a robot with six degrees of freedom: and when I received some obviously wrong 'outlier' measurements, I was able to spot the spike in the value of $gamma$, but it was nowhere close to the value for deciding if it was an outlier corresponding to six degrees of freedom (which is 16.8 for 1% threshold): instead, it was around 0.2. Am I wrong in my understanding/implementation of how update rejection works in this context?










    share|cite|improve this question











    $endgroup$















      3












      3








      3





      $begingroup$


      I recently came across some material that discussed a method for performing update rejection in Kalman filters when bad measurements are received. [Paper 1] [Paper 2: see Section III(E)] This method involves the usage of Mahalanobis distance to decide whether or not a newly obtained measurement is an 'outlier'.



      As per my understanding, the method goes as follows: when a new measurement is obtained, the difference between the observed and predicted measurements: $(z^{i} - hat{z}^{i})$ is combined with the innovation covariance $S$ that is computed after the prediction step as



      $$
      gamma_k = (z^{i} - hat{z}^{i})^{T}S^{-1}(z^{i} - hat{z}^{i})
      $$



      Moving forward, the method states that assuming the process/measurement noises are Gaussian distributed (as is standard for Kalman filters), $gamma_k$ should be Chi-square distributed with $m$ degrees of freedom (which incidentally should also be the rank of $S$). So the method concludes that: for a pre-set confidence interval $alpha$, if $gamma_k$ were to exceed the $alpha$-quantile of the Chi square distribution for $m$ degrees of freedom, it should be treated as an outlier and can be rejected.



      Hence, for example, for a system with 2 degrees of freedom and assuming 1% confidence threshold, this essentially states that if the value of $gamma_k$ ends up being more than 9.2 (ref: Chi square quantile table), the measurement has a 99% probability of being an outlier. I am confused by how this constant value is valid within the Kalman filter framework; because while $(z^{i} - hat{z}^{i})$ is definitely representative of how 'far' a measurement is compared to the prediction, $S$ depends entirely on the confidence of the filter till the current instant.



      $$
      S_k = H*hat{P}_k*H^T + R_k
      $$



      If the filter is receiving good measurements till time instant $k$, and the system is confident enough about the states, the predicted covariance $hat{P}_k$ should be a low value, ($H$ is a constant anyway) which makes $S$ dependent entirely on the measurement noise covariance, which is user choice: so how is the number 9.2 significant here?



      I tried out the Mahalanobis distance method in a pose estimation system for a robot with six degrees of freedom: and when I received some obviously wrong 'outlier' measurements, I was able to spot the spike in the value of $gamma$, but it was nowhere close to the value for deciding if it was an outlier corresponding to six degrees of freedom (which is 16.8 for 1% threshold): instead, it was around 0.2. Am I wrong in my understanding/implementation of how update rejection works in this context?










      share|cite|improve this question











      $endgroup$




      I recently came across some material that discussed a method for performing update rejection in Kalman filters when bad measurements are received. [Paper 1] [Paper 2: see Section III(E)] This method involves the usage of Mahalanobis distance to decide whether or not a newly obtained measurement is an 'outlier'.



      As per my understanding, the method goes as follows: when a new measurement is obtained, the difference between the observed and predicted measurements: $(z^{i} - hat{z}^{i})$ is combined with the innovation covariance $S$ that is computed after the prediction step as



      $$
      gamma_k = (z^{i} - hat{z}^{i})^{T}S^{-1}(z^{i} - hat{z}^{i})
      $$



      Moving forward, the method states that assuming the process/measurement noises are Gaussian distributed (as is standard for Kalman filters), $gamma_k$ should be Chi-square distributed with $m$ degrees of freedom (which incidentally should also be the rank of $S$). So the method concludes that: for a pre-set confidence interval $alpha$, if $gamma_k$ were to exceed the $alpha$-quantile of the Chi square distribution for $m$ degrees of freedom, it should be treated as an outlier and can be rejected.



      Hence, for example, for a system with 2 degrees of freedom and assuming 1% confidence threshold, this essentially states that if the value of $gamma_k$ ends up being more than 9.2 (ref: Chi square quantile table), the measurement has a 99% probability of being an outlier. I am confused by how this constant value is valid within the Kalman filter framework; because while $(z^{i} - hat{z}^{i})$ is definitely representative of how 'far' a measurement is compared to the prediction, $S$ depends entirely on the confidence of the filter till the current instant.



      $$
      S_k = H*hat{P}_k*H^T + R_k
      $$



      If the filter is receiving good measurements till time instant $k$, and the system is confident enough about the states, the predicted covariance $hat{P}_k$ should be a low value, ($H$ is a constant anyway) which makes $S$ dependent entirely on the measurement noise covariance, which is user choice: so how is the number 9.2 significant here?



      I tried out the Mahalanobis distance method in a pose estimation system for a robot with six degrees of freedom: and when I received some obviously wrong 'outlier' measurements, I was able to spot the spike in the value of $gamma$, but it was nowhere close to the value for deciding if it was an outlier corresponding to six degrees of freedom (which is 16.8 for 1% threshold): instead, it was around 0.2. Am I wrong in my understanding/implementation of how update rejection works in this context?







      probability-distributions kalman-filter chi-squared stochastic-filtering






      share|cite|improve this question















      share|cite|improve this question













      share|cite|improve this question




      share|cite|improve this question








      edited Dec 21 '18 at 22:06







      HighVoltage

















      asked Dec 20 '18 at 5:17









      HighVoltageHighVoltage

      1058




      1058






















          0






          active

          oldest

          votes











          Your Answer





          StackExchange.ifUsing("editor", function () {
          return StackExchange.using("mathjaxEditing", function () {
          StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
          StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
          });
          });
          }, "mathjax-editing");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "69"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          noCode: true, onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3047184%2fconfusion-regarding-usage-of-mahalanobis-distance-for-update-rejection-in-kalman%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Mathematics Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          Use MathJax to format equations. MathJax reference.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3047184%2fconfusion-regarding-usage-of-mahalanobis-distance-for-update-rejection-in-kalman%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Probability when a professor distributes a quiz and homework assignment to a class of n students.

          Aardman Animations

          Are they similar matrix