## 3 Selective FMS Filtering with Two Kinds of Measurement Windows
### Detecting Uncertainty and Selecting Valid Estimate Using Chi-Square Test Statistic  
According to the above observation, the estimation error of the FMS filter with a short window length is smaller than that of the FMS filter with a long window length while uncertainty exists. In addition, the convergence of the estimation error for the FMS filter with a short window length is much faster than that of the FMS filter with a long window length when temporary uncertainty is disappearing. This means that the FMS filter with a short window length is superior in terms of the tracking ability. Thus, although the FMS filter with a short window length is designed without considering the robustness, the FMS filter with a short window length can outperform the FMS filter with a long window length when applied to temporarily uncertain systems. Meanwhile, the FMS filter with a long window length can be better than the FMS filter with a short window length for the nominal system where temporary uncertainty completely disappears or there is no temporary uncertainty. In this section, the FMS filtering estimation is proposed to cover the nominal system as well as the temporarily uncertain system by applying two kinds of FMS filters selectively. Two kinds of FMS filters are defined by the primary FMS filter with long window length \(M_{p}\) and the secondary FMS filter with short window length \(M_{s}\). That is, the window length \(M_{p}\) is larger than the window length \(M_{s}\). Using the simple matrix form (12) for the FMS filter, the primary FMS filter is denoted by \(\hat{x}_{i}^{p}\) and has the window length \(M_{p}\) as follows:  
\[\hat{x}_{i}^{p} = \left(\Gamma_{M_{p}}^{T}\Pi_{M_{p}}^{-1}\Gamma_{M_{p}}\right)^{ -1}\Gamma_{M_{p}}^{T}\Pi_{M_{p}}^{-1}Z_{M_{p}}, \tag{13}\]  
and the secondary FMS filter is denoted by \(\hat{x}_{i}^{s}\) and has the window length \(M_{s}\) as follows:  
\[\hat{x}_{i}^{s} = \left(\Gamma_{M_{s}}^{T}\Pi_{M_{s}}^{-1}\Gamma_{M_{s}}\right)^{ -1}\Gamma_{M_{s}}^{T}\Pi_{M_{s}}^{-1}Z_{M_{s}}, \tag{14}\]  
where \(\Gamma_{M_{p}}\), \(\Pi_{M_{p}}\), \(Z_{M_{p}}\), \(\Gamma_{M_{s}}\), \(\Pi_{M_{s}}\) and \(Z_{M_{s}}\) can be obtained from (5) and (7). Because \(\{A,C\}\) is observable for \(M_{p}\geq n\) and \(M_{s}\geq n\), matrices \(\Gamma_{M_{s}}\) and \(\Gamma_{M_{p}}\) are of full rank. Since matrices \(\Pi_{M_{p}}\) and \(\Pi_{M_{s}}\) are positive definite, their inversion exists. Thus, matrices \(\Gamma_{M_{p}}^{T}\Pi_{M_{p}}^{-1}\Gamma_{M_{p}}\) and \(\Gamma_{M_{s}}^{T}\Pi_{M_{s}}^{-1}\Gamma_{M_{s}}\) are nonsingular and thus their inversion also exists. Matrices \(\left(\Gamma_{M_{p}}^{T}\Pi_{M_{p}}^{-1}\Gamma_{M_{p}}\right)^{-1}\Gamma_{M_{ p}}^{T}\Pi_{M_{p}}^{-1}\) in (13) and \(\left(\Gamma_{M_{s}}^{T}\Pi_{M_{s}}^{-1}\Gamma_{M_{s}}\right)^{-1}\Gamma_{M_{s }}^{T}\Pi_{M_{s}}^{-1}\) in (14) need only one computation on the interval \([0,M_{p}]\) and \([0,M_{s}]\), respectively, once. And then, they are time-invariant for all moving windows. Thus, two FMS filters \(\hat{x}_{i}^{p}\) (13) and \(\hat{x}_{i}^{s}\) (14) are time-invariant. One of the two FMS filtered estimates is selected as the valid estimate according to presence or absence of uncertainty. The primary FMS filter \(\hat{x}_{i}^{p}\) is selected as the valid estimate \(\hat{x}_{i}\) for the nominal system and the secondary FMS filter \(\hat{x}_{i}^{s}\) is selected as the valid estimate \(\hat{x}_{i}\) for the temporarily uncertain system as follows:  
\[\hat{x}_{i}= \begin{cases}\hat{x}_{i}^{p}&\text{in case of nominal system,}\\ \hat{x}_{i}^{s}&\text{in case of temporarily uncertain system.}\end{cases} \]  
In order to indicate presence or absence of uncertainty, operate the suitable one from two filters, and then obtain the valid filtered estimate, a declaration rule is defined. The declaration rule determines two declaration cases of uncertainty presence and absence. The uncertainty presence indicates that the uncertainty occurs from the nominal system.