The Normalized Innovation Squared (NIS) metric allows to check whether the Kalman filter is consistent with the measurement residual $$\nu (k)$$ and the associated innovation covariance matrix $$\mathbf{S}(k)$$.

The NIS hypothesis test uses the same mechanics as the NEES metric. It is therefore recommended to read this article first.

The measurement residual $$\nu (k)$$ is the difference of the measurement prediction $$\mathbf{\hat{y}}(k)$$ and the measurement $$\mathbf{y}(k)$$. The consistency check of the innovation covariance matrix uses the normalizing with the measurement residual $$\nu (k)$$

$\text{NIS} (\nu(k),\mathbf{S}(k)) = \epsilon_\nu (k) = \nu(k)^T \mathbf{S}(k)^{-1} \nu(k) \ .$

As with NEES, the quantity $$\epsilon_\nu (k)$$ is chi-squared distributed with $$\text{dim}( \nu(k) ) = n_z$$ degrees of freedom, i.e. the dimension of the measurement vector $$\mathbf{y}(k)$$.

In order to achieve an increased statistical significance, an averaged NIS can be calculated by running the test N times $\text{ANIS}( \epsilon^i_{\nu}(k) ) = \overline{\epsilon}_{\nu} (k) = \frac{1}{N} \sum^N_{i=1} \epsilon^i_\nu(k) .$

$$\epsilon_{\nu}$$ has the property that the mean converges towards $$N n_i$$ and that $$\epsilon_{\nu}$$ is chi-squared distributed with $$N n_z$$ degrees of freedom.

### Hypothesis testing

The hypothesis test is performed with the hypothesis

$H_0 : \text{The measurement residual  \nu (k) is consistent with the innovation covariance matrix \mathbf{S}(k)}$

and is accepted if

$\epsilon_{\nu} \in [r_1,r_2] .$

The acceptance interval is chosen such that the probability $$P$$ that $$H_0$$ is accepted is $$(1 - \alpha)$$, i.e.

$P \{ \epsilon_{\nu} \in [r_1,r_2] | H_0 \} = 1 - \alpha .$

The confidence interval $$[r_1,r_2]$$ can be calculated with the inverse cumulative distribution function $$F^{-1}$$ of the chi-squared distribution

$r_1 = F^{-1} ( \frac{\alpha}{2}, n_z ), \ r_2 = F^{-1} ( 1- \frac{\alpha}{2}, n_z ) .$

### Conclusion

The NIS metric in conjunction with a hypothesis test allows to check for the consistency of the innovation covariance matrix $$\mathbf{S}(k)$$. Since the innovation covariance matrix directly influences the Kalman matrix $$\mathbf{K}$$, the consistency of the innovation covariance matrix $$\mathbf{S}(k)$$ has a direct influence on the efficiency of the kalman filter. The hypothesis procedure is analogous to the NEES metric with the difference that for the NIS only the measurement space is used and not the full state-space. This is particularly relevant for practice, since ground truth data is not always available.