## 3 Selective FMS Filtering with Two Kinds of Measurement Windows
### Detecting Uncertainty and Selecting Valid Estimate Using Chi-Square Test Statistic
On the other hand, the uncertainty absence indicates that the uncertainty is gone. A test variable \(t_{i}\) required for the uncertainty presence and absence declaration is formulated by the estimation error of the primary FMS filter \(\hat{x}_{i}^{p}\) as follows:  
\[t_{i}=(x_{i}-\hat{x}_{i}^{p})^{T}\Sigma_{M_{p}}^{-1}(x_{i}-\hat{x}_{i}^{p}). \tag{15}\]The matrix \(\Sigma_{M_{p}}^{-1}\) is the covariance of \(x_{i}-\hat{x}_{i}^{p}\) and obtained from (9). Since the estimation error \(x_{i}-\hat{x}_{i}^{p}\) is in Gaussian distribution, the test variable (15) is in the chi-squared distribution with one degree of freedom. The chi-square, also written as \(\chi^{2}\), test statistic can be known as one of the feature selection methods [4; 5; 6]. As shown in (15), a chi-square test statistic is developed from the difference between a state and its filtered estimate and then compared with a precomputed threshold for uncertainty presence and absence declaration. The test variable \(t_{i}\) increases from the chi-squared distribution in proportion to the power of the uncertainty if an uncertainty appears. On the other hand, the test variable \(t_{i}\) decreases from the chi-squared distribution in proportion to the power of the uncertainty if an uncertainty disappears. Hence, comparing the test variable \(t_{i}\) to a threshold value \(\gamma\) can declare the presence or absence of uncertainty. A threshold value is precomputed to compare with the test variable. The threshold value is set relatively to the sensitivity of the estimation error \(x_{i}-\hat{x}_{i}^{p}\). That is, a too low threshold value causes an excessive false alarm rate, on the other hand, a too high one brings about insensitive uncertainty presence declaration. Hence, a threshold value can be precomputed from the chi-squared distribution function with the consideration of rational probability false alarm (PFA) because the test variable (15) forms a chi-squared distribution. The relationship between the threshold value and the PFA is represented by the following one degree of freedom chi-squared distribution function:  
\[PFA=1-P_{\chi^{2}}(\gamma_{*})=1-\frac{1}{2.5066}\int_{0}^{\gamma_{*}}\varepsilon ^{-1/2}e^{-\varepsilon/2}d\varepsilon,\]  
where \(\gamma_{*}\) stands for the threshold value. Thus, when \(t_{i}>\gamma_{*}\), the secondary FMS filter \(\hat{x}_{i}^{s}\) is selected as the valid estimate \(\hat{x}_{i}\), which indicates that the uncertainty occurs. And then, when \(t_{i}<\gamma_{*}\), the primary FMS filter \(\hat{x}_{i}^{p}\) is selected as the valid estimate \(\hat{x}_{i}\), which indicates that the uncertainty disappears as follows:  
\[\hat{x}_{i}= \begin{cases}\hat{x}_{i}^{p}&\text{if}\quad t_{i}\leq\gamma_{*} \text{ (uncertainty absence)},\\ \hat{x}_{i}^{s}&\text{if}\quad t_{i}>\gamma_{*}\text{ (uncertainty presence)}.\end{cases}  \tag{16}\]  
The overall operation flow of the proposed selective FMS filtering is shown in Figure 1.  
Figure 1: Operation flow for the proposed selective finite memory structure (FMS) filtering. False alarm (PFA).