Selective Finite Memory Structure Filtering Using the Chi-Square Test Statistic for Temporarily Uncertain Systems

Featured Application: The current work might be appropriate for fast detection and identiﬁcation of unknown signals whose time of occurrence cannot be predicted, which can arise from diverse engineering problems such as fault detection and diagnosis of dynamic systems, maneuver detection and tracking of moving objects, etc. Abstract: In this paper, a ﬁnite memory structure (FMS) ﬁltering with two kinds of measurement windows is proposed using the chi-square test statistic to cover nominal systems as well as temporarily uncertain systems. First, the simple matrix form for the FMS ﬁlter is developed from the conditional density of the current state given ﬁnite past measurements. Then, one of the two FMS ﬁlters, the primary FMS ﬁlter or the secondary FMS ﬁlter, with different measurement windows is operated selectively according to the presence or absence of uncertainty, to obtain a valid estimate. The primary FMS ﬁlter is selected for the nominal system and the secondary FMS ﬁlter is selected for the temporarily uncertain system, respectively. A declaration rule is deﬁned to indicate the presence or absence of uncertainty, operate the suitable one from two ﬁlters, and then obtain the valid ﬁltered estimate. A test variable for the declaration rule is developed using a chi-square test statistic from the estimation error and compared to a precomputed threshold. In order to verify the proposed selective FMS ﬁltering and compare with the existing FMS ﬁlter and the inﬁnite memory structure (IMS) ﬁlter, computer simulations are performed for a selection of dynamic systems including a F404 gas turbine aircraft engine and an electric motor. Simulation results conﬁrm that the proposed selective FMS ﬁltering works well for nominal systems as well as temporarily uncertain systems. In addition, the proposed selective FMS ﬁltering is shown to be remarkably better than the IMS ﬁltering for the temporarily uncertain system.


Introduction
Feature selection is known as one of core concepts in the field of machine learning based fault diagnosis [1][2][3]. There are several feature selection approaches available such as information gain, mutual information, and the chi-square test [4][5][6]. Among them, the chi-square, also written as χ 2 , test statistic can be also used for abnormal signal detection [7,8]. The chi-square test statistic is developed from the difference between two variables such as the original state and its filtered estimate, and then compared with a precomputed threshold to detect abnormal signals.
Meanwhile, in contrast to the recursive infinite memory structure (IMS) filter like the traditionally used Kalman filter [9][10][11][12], the finite memory structure (FMS) filter has been known to have inherent good properties such as bounded-input, bounded-output (BIBO) stability and and more robustness against temporary uncertainties due to its processing manner of finite measurements on the most recent window [13][14][15][16]. Thus, the FMS filter has been applied successfully for various engineering problems [17][18][19][20][21][22][23]. As shown in [13][14][15][16], the FMS filter is known to have better noise suppression as the measurement window length grows. In other words, the noise suppression of the FMS filter is closely related to the measurement window length. However, even if the FMS filter can show greater noise suppression as the window length increases, the tracking speed of the state estimate for the actual state variable worsens in proportion to the window length, which can degrade the estimation performance of the FMS filter. This implies the FMS filter requires a compromise between the noise suppression and the tracking speed of the state estimate. According to this observation, the estimation error of the FMS filter with a short measurement window length is smaller than that of the FMS filter with a long measurement 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, if the FMS filter with a short window length is applied to temporarily uncertain systems, it can outperform the FMS filter with a long window length, although the FMS filter with a short window length is designed without considering the robustness.
This paper proposes an FMS filtering with two kinds of measurement windows using the chi-square test statistic to cover the nominal system as well as the temporarily uncertain system. The simple matrix form for the FMS filter is developed from the conditional density of the current state given finite past measurements. Then, one of the two FMS filters, the primary FMS filter and the secondary FMS filter, with different measurement windows is operated selectively to obtain the valid estimate according to presence or absence of uncertainty. The primary FMS filter is selected for the nominal system and the secondary FMS filter is selected for the temporarily uncertain system, respectively. A declaration rule is defined to indicate the presence or absence of uncertainty, operate the suitable one from two filters, and then obtain the valid filtered estimate. A test variable for the declaration rule is developed using a chi-square test statistic from the estimation error and compared with a precomputed threshold. Finally, computer simulations are performed for a two kinds of dynamic systems such as a F404 gas turbine aircraft engine and electric motor to verify the proposed selective FMS filtering with two kinds of measurement windows and compare with existing FMS filtering and IMS filtering. Through computer simulation works, it is confirmed that the proposed selective FMS filtering works well for the nominal system as well as the temporarily uncertain system. It is also shown that the proposed selective FMS filtering can be remarkably better than the IMS filtering for the temporarily uncertain system. This paper is organized as follows. In Section 2, the FMS filter is introduced. In Section 3, the selective FMS filtering with two kinds of measurement windows is proposed. In Section 4, computer simulations are performed. Finally, conclusions are presented in Section 5.

Finite Memory Structure Filter from the Conditional Density of the Current State Given Finite Measurements
As shown in [9][10][11][12][13][14][15][16][17][18][19][20][21][22][23], the state-space approach has been a general method for modeling, analyzing and designing a wide range of control and estimation problems in diverse dynamic systems, and has been especially suitable for digital computation techniques. Therefore, in this paper, a general discrete-time state space model with noises is considered as follows: where x i ∈ n is the unknown state vector of the state variables and z i ∈ q is the sensor measurement vector of the output variables. The state vector x i consists of n state variables and describes a dynamic system by a set of first-order difference equations with the state transition matrix A. A description of the dynamic system in terms of a set of state variables does not necessarily include all of the variables of direct engineering interest. Therefore, the sensor measurement vector z i is defined to be any system variable of interest using the output matrix C. Thus, the state transition matrix A is the property of the dynamic system and is determined by the system structure and elements. The output matrix C is determined by the particular choice of output variables. For example, in the electric motor system that will be covered in computer simulations, the state vector x i consists of two state variables such as armature current and rotational speed. The state transition matrix A contains physical elements such as armature resistance, armature inductance, motor inertial coefficient, etc. The sensor measurement vector z i is defined with the output matrix C to be the rotational speed that measured by corresponding sensor. The state vector x i 0 at the initial time i 0 of system is a random variable with a meanx i 0 and a covariance P i 0 . A dynamic system can often contains noises such as the system noise w i ∈ p and the measurement noise v i ∈ q . These noises are random variables with zero-mean white Gaussian and are mutually uncorrelated. In addition, these noises are also uncorrelated with the initial state vector x i 0 . The covariances of noises w i and v i are denoted by Q and R, respectively and they are assumed to be positive definite matrices. Since these noises can cause system performance degradation, the system output, i.e., the rotational speed in the electric motor system, should be corrected using the state estimation filtering.
To overcome shortcomings of the IMS filter like the traditionally used Kalman filter, the FMS filter has been developed by combining the Kalman filter with the moving window strategy [13][14][15][16]. The window of finite measurements moves forward with each sampling time when a new measurement is available from sensors. In other words, the FMS filter utilizes only the finite number of measurements on the most recent filtering window while discarding past measurements outside the filtering window.
The FMS filter, denoted byx i at the current time i, is developed using the finite number of measurements, denoted by Z M . From the discrete-time state space model (1) and (2), the finite measurements Z M on the most recent window [i − M, i] can be expressed by the following regression form in terms of the state x i at the current time i: where Z M , W M , V M and matrices Γ M , Λ M are defined as follows: where notations CA * and CA * G are shorthand for matrix multiplications C · A * and C · A * · G, respectively. The noise term (3) is zero-mean white Gaussian as follows: where N Z M ; 0, Π M denotes the Gaussian probability density function (pdf) evaluated at Z M with zero-mean and covariance matrix where diag(Q Q Q · · · Q) and diag(R R R · · · R) denote block-diagonal matrices with M elements of Q and R, respectively. As shown in Bayesian filtering approaches [15,16], the FMS filter can be interested in the pdf that is conditional on a finite past measurements Z M on the most recent window [i − M, i]. The most recent window [i − M, i] becomes the averaging window of M points. Existing FMS filters in [15,16] have an iterative form, while this paper develops an alternative FMS filter with a simple matrix form. To develop an alternative FMS filter, the conditional density of current state x i given finite measurements Z M is derived. (3), the conditional density of current state x i given finite measurements Z M has the following expression:

Proposition 1. From the linearity described in
where N x i ;x i , Σ M denotes the Gaussian pdf evaluated at x i with meanx i and covariance matrix Σ M as follows: with the noise term (6). Then, multiplying both sides of (10) by leads to Hence, for given finite measurements Z M , the Equation (11) clearly means that the current state x i is a multi-variate Gaussian with its mean and covariance Therefore, the conditional density of current state x i given finite measurements Z M has the following expression: This completes the proof.
Therefore, from the conditional density (8) of current state x i , the FMS filter with the following simple matrix formx provides the state estimatex i conditional on finite measurements Z M . As shown in [13], by applying the best linear unbiased estimation approach, the batch unbiased finite impulse response (FIR) filter with the matrix form was developed with the unbiased constraint when the covariance Π M of the noise term Λ M W M + V M (6) has an identity matrix. On the other hand, by applying the Bayesian approach in this paper, the simple matrix form (12) for the FMS filter is derived in an alternative way using meanx i and covariance value Σ M of Gaussian pdf evaluated at x i . There is a remarkable observation that the simple matrix form (12) for the FMS filter developed by applying the Bayesian approach is equivalent to the existing batch unbiased FIR filter if the covariance Π M of the noise term Λ M W M + V M is assumed as the identity matrix.
The simple matrix form (12) for the FMS filter can have several good intrinsic properties such as unbiasedness, deadbeat, and robustness according to [13][14][15][16]. Thus, the simple matrix form (12) for the FMS filter might be very useful for diverse filtering problems such as high accuracy measurement processing [24] and multilayer node event processing [25].
Note that the inverse of the state transition matrix A is required to implement the simple matrix form (12) for the FMS filter, which seems to limit practical implementations. However, even though most dynamic systems are modeled in continuous time, these continuous time dynamic systems are generally discretized because they are operated in a digital system environment for practical implementations. When a continuous-time state space modelẋ(t) = A c x(t) is discretized with the sampling time T, the corresponding sampled-data system is given by Therefore, the assumption for invertibility of state transition matrix A in the discrete-time state space model is not too restrictive for practical implementations. Actually, this assumption has been accepted in the IMS filter such as the information form of Kalman filter [10] as well as the FMS filter such as the batch unbiased FIR filter [13].

Temporary Model Uncertainty and Window Length
Even if many kinds of dynamic systems can be accurate on a long time scale, they may experience unpredictable situations, such as jumps in frequency, phase, and velocity. These are called temporary model uncertainties since these effects usually occur over a short time interval [13]. Unknown faults, unknown inputs, and modeling errors in dynamic systems can be temporary uncertainties. The FMS filter should be robust to minimize the effects of these temporary uncertainties.
To deal with temporary uncertainties, how to get a proper measurement window length M for the FMS filter might be important issue. The window length affects differently the performance of the FMS filter according to presence or absence of temporary uncertainties. The FMS filter is well known to have better noise suppression as the window length grows. In other words, the noise suppression of the FMS filter is closely related to the window length. However, even if the FMS filter can show greater noise suppression as the window length increases, the tracking speed of state estimate for actual state variable worsens in proportion to the window length, which can degrade the estimation performance of the FMS filter. This means that the FMS filter requires a compromise between the noise suppression and the tracking speed of the state estimate.

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 byx p i and has the window length M p as follows: and the secondary FMS filter is denoted byx s i and has the window length M s as follows: where Γ M p , Π M p , Z M p , Γ M s , Π M s and Z M s can be obtained from (5) (14)  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. 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 filterx p i as follows: The matrix Σ −1 M p is the covariance of x i −x p i and obtained from (9). Since the estimation error x i −x p i 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 χ 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 γ 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 −x p i . 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: where γ * stands for the threshold value.
Thus, when t i > γ * , the secondary FMS filterx s i is selected as the valid estimatex i , which indicates that the uncertainty occurs. And then, when t i < γ * , the primary FMS filterx p i is selected as the valid estimatex i , which indicates that the uncertainty disappears as follows: The overall operation flow of the proposed selective FMS filtering is shown in Figure 1.

Extensive Computer Simulations
To verify the applicability of the proposed selective FMS filtering with two kinds of measurement windows and to compare it with the standard FMS filter with one measurement window as well as the Kalman filter, extensive computer simulations using the well-known commercial software Matlab are performed for a couple of discrete-time dynamic systems such as a F404 gas turbine aircraft engine and electric motor.

F404 Gas Turbine Aircraft Engine and Electric Motor Systems
The F404 gas turbine aircraft engine is known as a reliable and high performance engine [21,26]. The discrete-time nominal F404 gas turbine aircraft engine model without model uncertainty is given as follows: Covariances for system and measurement noises are taken as Q = 0.5 2 and R = I 2×2 , respectively. Two kinds of measurement window lengths are taken as M p = 20 and M s = 10, respectively. An electric motor is an electrical machine that converts electrical energy into mechanical energy. In particular, the electric motor powered by direct current source is the most widely and successfully adopted in motor control systems due to the intrinsic good properties such as efficient cost, high performance, etc. [20,27]. The discrete-time nominal direct current electric motor model without model uncertainty is given as follows: where the electric motor is assumed to be operated without any payload. The electric motor encounters the input voltage to drive the motor as an external source which is treated as a control input and emulated by the unit step for simulations. Covariances for system and measurement noises are taken as Q = 0.01 2 I 2×2 and R = 0.01 2 , respectively. Two kinds of measurement window lengths are taken as M p = 20 and M s = 10, respectively. Both discrete-time state space models (17) and (18) are obtained from the Matlab function c2d which discretizes the continuous-time dynamic system model with sampling time 0.1 s. Simulations of 20 runs are performed using different system and measurement noises to make the comparison clearer. Each single simulation run lasts 600 samples.

Model Uncertainties
For simulations, a model uncertainty is considered as a temporary uncertainty. That is, considering temporary uncertainties, the actual state space model for the F404 gas turbine aircraft engine system and the electric motor system becomes where ∆A and ∆C for the F404 gas turbine aircraft engine system are emulated by and for the electric motor system are emulated by Hence, although two FMS filtersx p i (13) andx s i (14) are designed for the nominal state space models (17) and (18) with A and C, they are applied actually for the temporarily uncertain system (19) with model uncertainties (20) and (21), respectively.

Discussion of Simulation Results
For both systems, the threshold value is set to γ = 7.88 corresponding to PFA=0.0005 in the proposed selective FMS filtering. Figures 2 and 3 show test variables for uncertainty presence and absence declaration.
For the F404 gas turbine aircraft engine system, Figure 4 shows estimation errors for the second state indicating turbine temperature for three filters, the primary FMS filter with M p = 20, the secondary FMS filter with M s = 10, and the IMS filter. For the electric motor system, Figure 5 shows estimation errors for the second state indicating rotational speed for three filters, the primary FMS filter with M p = 20, the secondary FMS filter with M s = 10, and the IMS filter.   Table 1 for 20 simulations. As shown in simulation results, the proposed selective FMS filtering with two kinds of measurement windows can be better than the primary FMS filter and the IMS filter in terms of error magnitude and error convergence on the interval where modeling uncertainty exists. In addition, the proposed selective FMS filtering can be better than the secondary FMS filter when there is no temporary model uncertainty or after temporary model uncertainty is gone. These observations on computer simulations show that the proposed selective FMS filtering can work well in temporarily uncertain systems as well as in certain systems.

Conclusions
This paper has proposed selective FMS filtering estimation with two kinds of measurement windows using the chi-square test statistic in order to cover the nominal system as well as the temporarily uncertain system. The simple matrix form for the FMS filter has been developed from the conditional density of the current state given finite past measurements. Then, one of the two FMS filters, the primary FMS filter and the secondary FMS filter, with different measurement windows has been operated selectively to obtain the valid estimate according to the presence or absence of uncertainty. The primary FMS filter has been selected for the nominal system and the secondary FMS filter has been selected for the temporarily uncertain system, respectively. A declaration rule has been defined to indicate the presence or absence of uncertainty, operate the suitable one from two filters, and then obtain the valid filtered estimate. The test variables for the declaration rule have been defined using the chi-squared distribution with one degree of freedom. Finally, extensive computer simulations have been performed for an aircraft engine system as well as an electric motor system to verify the proposed selective FMS filtering with two kinds of measurement windows and compare with existing FMS filtering and IMS filtering. Through simulation results, it has been confirmed that the proposed selective FMS filtering estimation works well for both nominal systems and temporarily uncertain systems. It has been also shown that the proposed selective FMS filter can be remarkably better than the IMS filter for the temporarily uncertain system.
In fact, the research work for the FMS filter is relatively inactive in the case where the system and measurement noises are nonzero-mean Gaussian. Thus, an alternative selective FMS filtering for nonzero-mean noises can be researched as future work.