<<

Journal of Global Positioning Systems (2008) Vol. 7, No. 1 : 81-90

Test in Kalman Filtering

Jian-Guo Wang Faculty of Science and , York University

Abstract modelled deterministically, and (3) sensors do not provide perfect and complete data about a system. Many estimation problems can be modeled using a . One of the key requirements for Kalman Hence, a Kalman filter can function properly only if the filtering is to characterize various error sources, assumptions about its model structures, dynamical essentially for the quality assurance and quality control of process and measurement are correct or realistic. It a system. This characterization can be evaluated by can become divergent if any of the following situations applying the principle of multivariate statistics to the occurs [Schlee et al, 1967; Tarn et al, 1970; Gelb, 1974; system innovations and the measurement residuals. This Stöhr, 1986; Loffeld, 1990]: manuscript will systematically examine the test statistics • Improper system model; in Kalman filter on the ground of the normal, χ 2 -, t- and • False modeled process noise; F- distributions, and the strategies for global, regional and • False modeled measurement noise or local statistical tests as well. It is hoped that these test • Unexpected sudden changes of the state vectors statistics can generally help better understand and perform the statistical analysis in specific applications using a Correspondingly, one needs to study the behaviors of the Kalman filter. errors associated with the system model. This may be called as or system diagnostics, one Key words: Kalman filter, test statistics, normal of the advanced topics in Kalman filter. 2 distribution, χ distribution, t-distribution, F-distribution There are different ways to perform system identification. ______Statistic tests belong to the essential methods of system identification. Herewith, the system model under the Null 1 Introduction hypothesis is tested against one or multiple alternative hypotheses. The statistic can be divided into Since 1980s, Geomatics professionals both in research two categories. The first one is to make multiple and industry have increasingly shown their profound hypotheses about the stochastic characteristics of a system interest in applying the Kalman filter to various (Multiple Hypothesis Filter Detectors) [Willsky, Deyst, applications, such as kinematic positioning or Crawford, 1974, 1975; Willsky, 1976]. In order to reach a systems, image processing, and data processing of statistic decision, the posteriori probabilities of the state deformation monitoring etc. Undoubtedly, knowledge of vectors will be calculated, for instance, through the Kalman filtering has become essential to the Geomatics sequential probability ratio test- SPRT [Willsky, 1976; researchers and professionals. Yoshimura, et al, 1979]. The second one is to perform the system identification with the help of series of system A Kalman filter is simply an optimal recursive data innovations (“Innovation-based detection”) [Mehra, processing that blends all available information, Peschon, 1971; Stöhr, 1986; Salzmann, Teunissen, 1989; including measurement outputs, prior knowledge about etc.]. With this method, the signal is filtered using a the system and measuring sensors, to estimate the state normal model, until a failure is found through the statistic variables in such a manner that the error is statistically tests, for example, through GLR (Generalized likelihood minimized [Maybeck, 1979]. In practice, linear equation ratio) method [Willsky, 1976; Huep, 1986] or more often system with white Gaussian noises is commonly taken as through the specific test statistics based on normal, χ 2 , the standard model of a Kalman filter. However, one must t - or F - distribution. generally face the following facts [Maybeck, 1979]: (1) no mathematical model is perfect, (2) dynamic systems are driven not only by own control inputs, but also by Since the Kalman filter was introduced, how to disturbances which can neither be controlled nor characterize the error sources of a system, especially the Wang: Test Statistics in Kalman Filtering 82

series of the system innovation, has caught certain research attention. [Stöhr, 1986] studied the statistic tests 2. ALGORITHM OF KALMAN FILTERING on the ground of and χ 2 - The Kalman filter is a set of mathematical equations that Distribution using system innovation. [Salzmann, 1993] provide an efficient recursive means to estimate the state summarized a three-part test procedure as Detection, of a process through minimizing its mean squared errors. Identification and Adaptation (DIA) using system This section is to provide a brief introduction to the innovation for Kalman filter, in which the construction of discrete Kalman filter, which includes its description and test statistics is essential. [Wang, 1997] further discussed 2 some discussion of the algorithm. the test statistics not only on the basis of normal and χ - distributions, but also on the basis of t - and F - 2.1. The Model distributions using both of the system innovation and measurement residuals in Kalman filter. We consider a linear or linearized system with the state- space notation and assume that the data are available over A statistical test is no thing else, but a method of making a discrete { 10 K ttt N },,, , which will often be statistical decisions based on the existing system model simplified to { K N},,1,0 . Without loss of generality, a using experimental data. One needs statistic tests, for deterministic system input vector will be droped in all of example, to identify abnormal dynamic changes of the the expressions in this paper. Hence, at any time instant system states, or to statistically verify the significance of k (1≤ k ≤ N ) the system can be written as follows: the additional parameters, such as different sensor biases, in an integrated . Statistic tests can also x + = + kkAk x k + B kwk )()()(),1()1( (1) help with studying the whiteness of system innovation. The detection of measurement outliers definitely needs + = + + + Δ kkxkCkz + )1()1()1()1( (2) statistic tests. A lot more examples exist in practice. They show how essential statistic tests are in Kalman filter so where x k)( is the n-dimensional state-vector, z k)( is the that a developer has to be capable of constructing the p-dimensional observation vector, w k)( is the m- proper test statistics and applying them to practice. However, there is still a lack of systematic description of dimensional process noise vector, Δ k)( is the p- fundamentals of test statistics for Kalman filter in dimensional measurement noise vector, + kkA ),1( is the textbooks. Most of the available works have missed out × nn coefficient of x k)( , kB )( is the n × m this topic or, if not the case, the test statistics is mostly coefficient matrix of w k)( , kC )( is the × np based on the Normal Distribution and the χ 2 - coefficient matrix of kz )( . The random vectors kw )( and Distribution only using system innovation. Applying of Δ k)( are generally assumed to be Gaussian with zero- the t - and F - tests is not common. mean: From the perspective of both research and industry, it could be helpful to have a systematical understanding to kQoNkw ))(,(~)( (3) the fundamentals of test statistics for Kalman filter, in Δ kRoNk ))(,(~)( (4) order to use a Kalman filter well or develop new algorithms. However, the existing textbooks about where kQ )( and kR )( are positive definite Kalman filtering and applications do not normally talk about testing statistics, although they may be found matrices, respectively. Further assumptions about the miscellaneously in scientific publications of different random noise are made and specified as follows ( i ≠ j ): fields. This manuscript aims to fill the gaps between the textbooks and scientific papers in the context of Kalman ))(),(( = OjwiwCov (5) filter theory and applications. Δ Δ ))(),(( = OjiCov (6)

Δ ))(),(( = OjiwCov (7) This manuscript is organized as follows. The algorithm of Kalman filter is summarized in Section 2. Section 3 gives the estimation of the variance factor, or more Very often, we also have to assume the initial mean and precisely, the variance of unit weight. The statistic variance- matrix x )0( and D xx )0( for the characteristics of filtering solutions are described in system state at the time epoch 0. In addition, the initial Section 4. Sections 5 and 6 are dedicated to building up state x )0( is also assumed to be independent of w k)( various test statistics for system innovation and and Δ k)( for all k. measurement residuals. The concluding remarks are given in the last section.

Wang: Test Statistics in Kalman Filtering 83

The stochastic characteristics of d + kk )/1( are 2.2. Kalman Filtering Equations obviously the mixture of the stochastic information from

the real observation noise {Δ Δ K}),2(),1( and the system To derive the optimal estimate ˆ kx )( of x k)( , one may noise ww K}),1(),0({ . Traditionally, the system use one of several optimality criterions to construct the innovation sequences are analyzed and used to build up optimal filter. For example, if the least-squares method is the test statistics. used, the optimality is defined in the sense of linear unbiased minimum variance, namely, 2.3. An alternate Derivation of Kalman Filtering

ˆ { } = xxE ⎪⎫ Let us analyze the error sources in Kalman filter in a T ⎬ (8) {( ˆ)( xxxxE ˆ =−− min}) ⎭⎪ different way. The optimal estimate xˆ k + )1( of kx + )1( at the instant k is always associated with the where xˆ is the unbiased minimum variance estimate of stochastic information, which may be divided into three x . independent groups:

Under the given stochastic conditions in Section 2.1, one a. The real observation noise Δ k + )1( , can derive the Kalman filtering for the state vector at b. The system noise kw )( , k + 1: ˆ c. The noise from the predicted + kkx )/1( through ˆ )1( ˆ ++++=+ kkdkGkkxkx )/1()1()/1( (9) ˆ kx )( , on which the stochastic characteristics of Δ Δ ),2(),1({ K Δ k)}(, , ww K,),1(),0({ kw − )}1( are and its variance- propagated through the system state model.

++−=+ + kkDkCkGEkD )/1()}1()1({)1( If these different error resources could be studied xx xx (10) T kGkRkGkCkGE ++++++− )1()1()1()1()1({ separately, it could be very helpful to evaluate the performance of a system in Kalman filter. Along with this line of thinking, the system model as in 2.1 can be where reformulated through the three groups of the observation ˆ +=+ ),1()/1( ˆ kxkkAkkx )( (11) or residual equations as follows: +=+ T + kkAkDkkAkkD ),1()(),1()/1( xx xx (12) vl k )1( =+ ˆ + − kBkx )()1( ˆ kw )( − kl + )1( )()()( + T kBkQkB )()()( x x )17( kv )1( =+ ˆ kw )( kl +− )1( ( )18 )1()1()/1( ˆ ++−+=+ kkxkCkzkkd )/1( (13) lw w kC + )1( ˆ kx + )1( kl +− )1( )19( l kv )1( =+ z ++=+ T kCkkDkCkkD + )1()/1()1()/1( z dd xx (14) kR ++ )1( where the independent (pseudo-)observation groups are +=+ T −1 ++ kkDkCkkDkG )/1()1()/1()1( (15) simply listed by xx dd

+=+ ),1()1( ˆ kxkkAkl )( Here ˆ + kkx )/1( is the one-step of the state x )20( =+ kwkl )()1( )21( vector from the past epoch k with its variance matrix w 0 z kzkl +=+ )1()1( )22( xx + kkD )/1( , + kkd )/1( is the system innovation vector with its variance matrix + kkD )/1( , and dd with their variance-covariance matrices by kG + )1( is the Kalman gain matrix. +=+ T + kkAkDkkAkD ),1()(),1()1( (23) An essential characteristic of the sequence d )0/1( , …, ll xx xx + = kQkD )()1( (24) + iid )/1( , …, + kkd )/1( is that they are independent ll ww + = kRkD + )1()1( (25) from each other epochwise [Stöhr, 1986; Chui, Chen, ll zz 1987]:

x kl + )1( , w kl + )1( and z kzkl +=+ )1()1( are the n-, )}/1(),/1({ =++ OjjdiidCov for ( i ≠ j ) (16) m- and p-dimentional measurement or pseudo-

measurement vectors, respectively. Usually 0 kw )( = o .

Wang: Test Statistics in Kalman Filtering 84

Again, by applying the method, the identical = kDkDkDkD })(),(),(diag{)( (32) ll xx ww llllll zz estimate ˆ kx + )1( of kx + )1( as in the section 2.2 can be and kr )( is the number of the redundant measurements at obtained. For more details on this alternate derivation of Kalman filter and its advantages, the reader is referred to epoch k ( t0 < ≤ tt Nk ). An alternate expression exists: [Wang, 1997; Caspary and Wang, 1998]. T −1 2 − dd kkdkkDkkd −− )1/()1/()1/( This alternate derivation of Kalman filtering will directly σˆ l0 k)( = (33) make the measurement residual vectors available for error kr )( analysis and possibly to build up the test statistics in Kalman filter, since it is based on the measurement The proof of equivalence between (30) and (33) can be residual vectors. One can now analyse any of three referred to [Pelzer, 1987; Tao, 1992; Wang, 1997]. One 2 measurement vectors through their own residual vectors. can also estimate the variance factor σ 0 over a specific The measurement residual vectors are the functions of the time interval as the regional estimate of variance of unit system innovation vector epochwise weight. For example, over a certain specified time interval from epoch ( − sk + 1 ) to epoch k , one can order the = −1 − kkdkKkkDkDkv − )1/()()1/()()( (26) ll xx ll xx xx system innovation for these s epochs as follows T −1 ll −−= xx − kkdkKkkDkBkQkv − )1/()()1/()1()1()( ww T skskdd −+−+= ),2/1([(s) ...... (27) r (34) T T T = − kkdEkKkCkv − )1/(})()({)( (28) −+−+ kkdskskd − ])1/(),...,3/2( ll zz

Similar to (16), we can readily prove the following results with its variance matrix of independence: D dd (s)(s) = dd skskD −+−+ ),2/1(diag{ rr (35)

dd −+−+ dd kkDskskD − })1/(),...,3/2( )}(),({ = OjvivCov for ( ≠ ji ) (29) The regional estimate of σ 2 is then equal to 3. VARIANCE OF WEIGHT UNIT 0

T (s) −1 dDd (s) The posteriori estimation of the variance of weight unit rr sdsd )()( σˆ 2 k)( = (36) 2 r0 σ 0 is essential in Geomatics. Some confusion has been f r (s) out there in applications of Kalman filer, because the variance-covariance matrices are directly used in Kalman where f r (s) is the total number of the redundant filter. Surely the variance of weight unit, also called as measurements of s epochs: variance factor, should be close to unity for a perfect model of system. However, this barely happens in s practice. r ∑ +−= jskrf )((s) (37) j=1 An algorithm for the estimation of unknown variance 2 factor σ 0 was constructed on the ground of the normal- 2 Furthermore, the global estimate of σ 0 for all of the past Gamma distribution in [Koch, 1990]. It allows estimating k epochs can be calculated by the variance factor together with the state vector in 2 Kalman filter. Alternatively, σ 0 can also be estimated by T )( −1 kdDkd )( 2 g gg kdkd )()( taking advantages of the sequences of the system σˆ g0 k)( = (38) innovation or the measurement residual vectors in [Wang, g kf )( 1997 etc]. The single epoch estimate of σ 2 , also called as 0 where the local variance of unit weight, is given by T T T T g = ddkd K kkd − ])1/(,),1/2(),0/1([)( (39) T −1 D = DD kkD − })1/(),...,1/2(),0/1(diag{ 2 ll kvkDkv )()()( gg kdkd )()( dd dd dd σˆ l0 k)( = (30) kr )( … …(40) k where g = ∑ jrkf )()( (41) T T T T j=1 = l l l kvkvkvkv ])(),(),([)( (31) x w z

Wang: Test Statistics in Kalman Filtering 85

4. STATISTIC CHARACTERISTICS OF where, for i = 1, 2, …, n+m+p, FILTERING SOLUTIONS T gi = ( i ddkd i L i kkd − )1/(,),1/2(),0/1()( ) (51) In order to evaluate the quality of the solutions and construct different test statistics, the statistic distributions ri = ( i − + − i +− − skskdskskdsd + ),1/2(),/1()( of various random vectors are used in Kalman filter on the T L i kkd − )1/(, ) (52) ground of the hypothesis: the normal distributed process and measurement noise as given in 3.1 will be discussed. with their corresponding variance-covariance matrices At an arbitrary epoch k, all of the derived random variables or vectors are the functions of the measurement D = T T TT gigi kdkd )()( vector l( = x w z klklklk )](),(),([) (see (20) ~ (22)). diag( 2 σσ 2 ,,, σ 2 ) (53) 2 di )0/1( d i )1/2( L i kkd − )1/( Among them, /( kkd − )1 , ˆ kx )( , kv )( , σˆ 0 k)( are D = diag(σ 2 , σ 2 , essential for quality control of a system. By applying the riri sdsd )()( i −+− )/1( i skskdskskd +−+− )1/2( law of error propagation, their distributions are easily 2 , σ ) (54) known as: L i kkd − )1/(

The i-th component v k)( of kv )( is of the normal d( − dd kkDNkk − ))1/(,0(~)1/ (42) i distribution, too: xˆ( μ xxx kDNk ))(,(~) (43) v( vv kDNk ))(,0(~) (44) 2 i Nkv σ kv )( ),0(~)( d T − −1 kkdkkDkk −− )1/()1/()1/( i dd (45) (i = 1, 2, …, n+m+p; k = 1, 2, …, N) (55) T −1 2 = ll χ krkvkDkv ))((~)()()( For any arbitrary subvector of v k)( , e.g. v k)( , kv )( l x lw where N ba ),( represents a normal distribution with a or l kv )( , the normal distributions apply. The global and b as its expectation and variance, respectively. z cumulative measurement residual vector for all of the past The i-th component kkd − )1/( in kkd − )1/( is epochs can be defined as i normally distributed as follows: T T T T g = ( vvkv L kv )(,),2(),1()( ) (56) d − Nkk σ 2 ),0(~)1/( i i kkd − )1/( (i = 1, 2, …, p; k = 1, 2, … N) (46) and the regional cumulative from the past s epochs as

T T T T Any arbitrary subvector of kkd − )1/( is also normally r ( +−= skvskvsv +− L kv )(,),2(),1()( ) distributed. Based on the independency of the innovation … … (57) vectors between two arbitrary epochs shown in (16), the vectors r sd )( and g kd )( as in (34) and (39) belong to with the following corresponding variance-covariance the following normal distributions: matrices D = gg kvkv )()( DNsd ),0(~)( (47) r rr sdsd )()( (Ddiag vv D vv )2()2()1()1( L,,, D kvkv )()( ) (58) ,0(~)( DNkd ) (48) g gg kdkd )()( D = (Ddiag , D , rr svsv )()( skvskv +−+− skvskv +−+− )2()2()1()1(

L, D kvkv )()( ) (59) wherein D and D are as in (35) and rr sdsd )()( gg kdkd )()(

(40). Analog to (46), any arbitrary components gi kd )( So g kv )( and vr k)( are obviously normally distributed: and ri sd )( for the i-th type of observations also belong to ,0(~)( DNkv ) (60) the normal distribution: g gg kvkv )()(

r DNsv svsv )()( ),0(~)( (61) ,0(~)( DNkd ) (i = 1, 2, …, p) (49) rr gi gigi kdkd )()( ,0(~)( DNsd ) ( i = 1, 2, …, p) (50) Similar to (49) and (50), the individual components of ri riri sdsd )()( g kv )( and vr k)( :

Wang: Test Statistics in Kalman Filtering 86

T With all of the past k epochs together (k = 1, 2, …, N), the gi = (vvkv ii L i kv )(,),2(),1()( ) (62) null hypothesis about g kd )( ri ( i +−= i − skvskvsv + ),2(),1()( T L i kv )(, ) (63) 2 ~ 2 H : kd = 0)( or 0 EH kd )( )(: σχ 0 == 0.1 (68) 0 g g belong to the following normal distributions ,0(~)( DNkv ) (64) and its alternative gi gigi kvkv )()( DNsv ),0(~)( (65) 2 ~ 2 ri riri svsv )()( H : kd ≠ 0)( or EH )(: σχ =≠ 0.1 (69) 1 g 1 g kd )( 0

with i = 1, 2, …, n+m+p, where can be performed according to (48) by using the test D = diag( 2 σσ 2 ,,, σ 2 ) (66) gigi kvkv )()( vi )1( vi )2( L i kv )( statistic [Salzmann, Teunissen, 1989] 2 2 2 D svsv )()( = diag(σ skv +− )1( , σ skv +− )2( L,, σ kv )( ) riri i i i χ 2 = T )( −1 kdDkd 2 αχ kf ))(,(~)( (70) … … (67) g )( gkd gg )()( gkdkd gg

at a significance level with the Type I error α . are the variance matrices of gi kv )( and ri sv )( . g 2 αχ f ),( is the − α)1( - critical value from χ 2 – For multiple components in g kd )( , r sd )( , g kv )( or Distribution with the degrees of freedom of f after (41). kv )( , the same rule applies. The null hypothesis (68) will be rejected if r

χ 2 > 2 αχ kf ))(,( (71) 5. TEST STATISTICS FOR SYSTEM g kd )( gg INNOVATION The test can easily be extended to the i-th component This section will construct test statistics using system gi kd )( in g kd )( for i = 1, 2, …, p and k = 1, 2, …, N. innovation. Under the assumption that no outliers exist in Under the null hypothesis measurements, one could diagnose the possible failure caused by inappropriate state equations. Contrarily, one kdH = 0)(: (72) can identify the possible outliers under the assumption if 0 gi the system model is assumed to be correct. The cause of a failure may be ambiguous and need to be analyzed in against its alternative more details. 1 gi kdH ≠ 0)(: (73) In this and next sections, we turn to perform statistic tests the epoch k = 1, 2, … from the very beginning to an Based on (49), the test statistic can be given by arbitrary epoch. The statistic tests will be introduced in three different levels, namely, global for all of the past k χ 2 = T )( Dkd −1 χ 2 kkd )(~)( (74) epochs, regional for an arbitrary continuous epoch group, gi )( gikd gigi )()( gikdkd e.g., the s epochs in the past, and local for a single epoch If (often the current epoch). The first two tests are very 2 > 2 αχχ k),( (i = 1, …, p) (75) meaningful for the identification of systematic errors and gi kd )( gi the local one aims directly at the potential outliers or the unexpected sudden state changes. under the given significance level α gi , the null

hypothesis will be rejected. 5.1. Global Test Statistics 5.2. Regional Tests Global tests can be introduced in two different ways to investigate the system behaviors. Right after the first k For the regional system diagnose, the processed k epochs epochs are completed, one can perform the statistic tests can be grouped at the user’s wish. Without loss of the with all of the system innovation information from the generality, the discussion here will be limited to two past and with their individual components by constructing groups. We consider having the first group for the first k – 2 the corresponding χ – test statistics. s epochs (from 1 to epoch k – s) and the second group for

Wang: Test Statistics in Kalman Filtering 87

the rest of the epochs (from epoch k – s + 1 to epoch k) as 0 ri sdH = 0)(: (83) d r − sk )( (equivalent to d g (k − s) ) and r sd )( . against the alternative

1 ri sdH ≠ 0)(: (84) 2 The null hypothesis about d r s)( is by using the χ test statistics

χ 2 = T )( −1 χ 2 ssdDsd )(~)( (85) ri )( risd riri )()( risdsd H 0 r sd = 0.1)(: (76) against the alternative An F-test runs for their variance homogeneity between H sd ≠ 0)(: (77) 1 r (85) and (79) or (70) as follows

On the ground of the test statistic [Willsky, 1976; Stöhr, T −1 ri )( )()( risdsd /)( ssdDsd 1986; Salzmann, Teunissen, 1989], the following test is F = riri − skfsF ))(,(~ gi sd )( 2 g performed σˆ g0 − sk )(

… …(86) χ 2 = T )( −1 χ 2 sfsdDsd ))((~)( (78) dr )( rs rr )()( rsdsd r

for i = 1, …, p at the significant level of α ri . at the significance level of α r , where the number r sf )( is the degrees of freedom as in (37). For the second group 5.3. Local Tests ( − skd ) also has the χ 2 - distribution as r Through the local system diagnose, the tests can be

introduced for the innovation vector as a whole and for its χ 2 T −= )( Dskd −1 − skd )( d g − )( gsk g g −− )()( gskdskd components, respectively.

χ 2 ((~ kf − s)) (79) g At an arbitrary epoch k, the null hypothesis for kkd − )1/( An additional F–test statistic can be constructed to test the variance homogeneity between (78) and (79) or (70) kkdH − = 0)1/(: (86) because sd )( is independent from − skd )( . This F– 0 r r against the alternative Test is given by kkdH − ≠ 0)1/(: (87) 0

σˆ 2 s)( F = r0 − skfsfF ))(),((~ (80) can be given. Its test statistic runs dr s)( 2 gr σˆ g0 − sk )( T −1 2 T −1 )( sdDsd )( χ kkd − )1/( = − dd kkdkkDkkd −− )1/()1/()1/( 2 r rr )()( rsdsd with σˆ r0 s)( = (81) 2 r sf )( χ kr ))((~ (88) T − )( Dskd −1 − skd )( 2 g g r −− )()( gskdskd σˆ sk )( =− (82) at the significance level of α l with the degrees of g0 − skf )( g freedom r(k).

baF ),( in (80) is the critical value of the Fisher A further F–test statistic can be introduced as distribution with the 1st degrees of freedom a for the nd 2 numerator and the 2 one b for the denominator. This test σˆ 0 k)( is always one-sided under a user- specified Type I error F kkd − )1/( = r sfkrF ))(),((~ (k = 2, 3, …, N) (89) σˆ 2 s)( α as the significance level. An exchange between the r0 numerator and the denominator may need in case for the variance homogeneity between (81) and (33) or ˆ 2 ˆ 2 σ g0 − sk )( greater than σ r0 s)( . This test is commonly (88). s means arbitrary specific epochs between epoch 1 employed to diagnose the significant difference between and epoch k – 1. the first k – s epochs and the rest of s epochs.

For the i-th component ri sd )( in r sd )( , one can also The quadratic form in (45) contains the entire information 2 from the system innovation for an arbitrary epoch. construct a χ test based on (50) and another F–test Therefore, the causes of a system failure must be analogue to (80). It runs localized after the rejection of a χ 2 or F kkd − )1/( kkd − )1/( test. It should orient to the individual error sources, e.g.

Wang: Test Statistics in Kalman Filtering 88

the individual measurements or the individual process 6. TEST STATISTICS FOR MEASUREMENT noise factors etc. in kinematic positioning or navigation. RESIDUALS One should perform the further statistic tests for the individual measurements. As it can be seen, the system innovation mixes up different types of information. But it is transferred to the In order to perform the statistic tests for multiple individual measurement residuals epoch by epoch through components in d kk − )1/( , the method for detection of (26) ~ (28), i.e., the residual vector v k)( for the l x position displacements in deformation analysis can be predicted state vector, the residual vector v k)( for the employed. More on this can be found in [Chrzanowski, lw process noise and the residual vector v k)( for the direct Chen, 1986]. lz measurements. In this way, these different types of The test statistic for single component of d kk − )1/( can random information can separately be studied. On the directly be constructed on the ground of the normal basis of the fact that (30) and (33) are equivalent, the test distribution or the t–distribution. The null hypothesis is 2 2 2 statistics χ kd )( , χ and χ in (70), (78) and g r sd )( kkd − )1/( (88) can also be derived using the measurement residual H 0 i kkdE =− 0))1/((: (90) vector v k)( . But it is not necessary to be repeated here. with its alternative H kkdE ≠− 0))1/((: (91) Therefore, only the test statistics for the individual 1 i components will be discussed in this section.

for i = 1,2, …, p and k = 1, 2, …, N. According to (46) the test is performed 6.1. Global Tests

For the i-th component v k)( in kv )( , the null kkd − )1/( gi g N = i N )1,0(~ (92) i kkd − )1/( σ hypothesis is i kkd − )1/(

0 gi kvH = 0)(: (i = 1, 2, …, n+m+p) (95) at the significant level of α . The null hypothesis will be li against the alternative accepted if the two-sided test satisfies kvH ≠ 0)(: (96) 1 gi The test statistic is given by i kkd − )1/( − u ≤ ≤u 2 T −1 2 αli αli χ = )( kvDkv )( χ k)(~ (97) 1− σ 1− gi )( gikv gigi )()( gikvkv 2 i kkd − )1/( 2 (i = 1, 2, …, p; k = 1, 2, …, N) (93) with the degrees of freedom of k. The null hypothesis will be rejected if α li where u α is a 1( − ) -critical value from the 1− li 2 2 χ 2 > χ 2 k)( (i = 1, 2, …, n+m+p) (98) standard normal distribution. Furthermore, based on the Vkgi () past system information, (93) can be extended to the following t–test at the significant level of α gi .

i kkd − /)1/( σ kkd − )1/( 6.2. Regional Tests T = i sft ))((~ di kk − )1/( σˆ s)( r r0 2 (i = 1, 2, …, p; k = 2, 3, …, N) (94) For the i-th component vri s)( from vr s)( , a χ –test and a F–test can be constructed. The null hypothesis is The most common case is to test the current epoch k vs. the past k – 1 epochs. 0 ri svH = 0)(: (99) with the alternative The differences between (93)-(94) and (88)-(89) are 1 ri svH ≠ 0)(: (100) obvious. However, which one is preferable will absolutely The corresponding test statistic is given by depend on the user. A t-test or an F-test may deliver the more reliable results of fit to the real data, while a normal 2 T −1 2 2 χ = )( χ ssvDsv )(~)( or a χ test is introduced with respect to the a-priori ri )( risv riri )()( risvsv (i = 1, 2, …, n+m+p) (101) assumption.

Wang: Test Statistics in Kalman Filtering 89

with the degrees of freedom of s. For the variance normal, χ 2 -, t - and F -distributions in this manuscript. homogeneity between the independent χ 2 and ri sv )( This work can be conducive to better understanding of the χ 2 similar to (80), the F–test statistic can be statistic fundamentals in Kalman filter, provides some g − skd )( insights into statistic testing methods and applications. introduced as In particular, the system innovation vector is transformed T −1 to the residual vectors of three measurement and pseudo- ri )( )()( risvsv /)( ssvDsv F = riri − skfsF ))(,(~ measurement groups by the aid of an alternative gi sv )( 2 g σˆ g0 − sk )( derivation of Kalman filter algorithm. This makes … … (102) possible to construct test statistics directly using the measurement residual vectors so that the system diagnosis 6.3. Local Tests can directly aim at different error sources of interests to users. The given posteriori estimate of variance of weight The single outlier detection at a single epoch can be unit in Section 3 can be used either to scale the variance modeled through the null hypothesis and covariance matrices, or to reveal the difference between the model and the processed data set. On the ground of statistic characteristics of filter solutions H 0 i kv = 0)(: (103) summarized in the section 4, the test statistics using the against the alternative series of system innovation are constructed in the section H1 i kv ≠ 0)(: (104) 5 globally with χ 2 - test, regionally either with χ 2 - test for i = 1, 2, …, m+n+p and k = 1, 2, … after the test of its or F - test, and locally either with t - test or the normal standardized residual test according to the normal distribution. Analogous to the section 5, the section 6 constructs the corresponding test statistics using the measurement residuals. Fortunately, i kv )( N = N )1,0(~ (105) 2 i kv )( σ χ - test, F - test, t - test and the normal test are four i kv )( most commonly used statistic tests. The choice between a χ 2 - test and a F - test, or between a t - test and a at the significant level of α li . The null hypothesis (102) will be accepted if normal test, wherever two parallel tests are available, is left to the user.

i kv )( − u α ≤≤ u α How to construct a test statistics is more or less a 1− li σ 1− li 2 i kv )( 2 theoretical task. But how to efficiently design the (i = 1, 2, …, m+n+p; k = 1, 2, …, N) (106) procedures to introduce the statistic tests in practice mostly depends on the understanding about the theory and Besides a t-test between (105) and (78) or (70) can be the application. Practical experience plays an essential introduced as follows role in helping deliver a realistic and reliable test scheme. This manuscript however has limited to the testing kv /)( σˆ statistics for general purposes instead of a specific i kvi )( Tv k)( = r sft ))((~ application. i σ s)( r0 (i = 1, 2, …, n+m+p; k = 2, …, N) (107) References Caspary, Wilhelm; Wang, Jianguo (1998). For any epoch k, one can use v k)( , v k)( and v k)( , l x lw lz Redundanzanteile und Varianzkomponenten im along with v(k) to investigate the statistic characteristics Kalman Filter. Vol.123, No.4, 1998, pp.121-128. of measurement vectors (kl )(, l k) and kl )( , x w z Chrzanowski, A.; Chen, Y. Q. (1986). Report on the Ad especially two latter ones. Multiple components are Hoc Committee on the Analysis of Deformation possibly diagnosed together in the same way as Surveys. XVIII International Congress FIG, Toronto, mentioned in 5.3. Canada, 1~11 June 1986, pp. 166–185. Gelb, Arthur et al. (1974). Applied Optimal Estimation. 7. CONCLUDING REMARKS The Analytic Sciences Corporation & The M.I.T. Press, Cambridge Massachusetts London, 1974. Based on the standard model of Kalman filter, different test statistics have been elaborated on the basis of the

Wang: Test Statistics in Kalman Filtering 90

Huep, Wolfgang (1986). Zur Positionsschätzung im Stöhr, M. (1986). Der Kalman–Filter und seine gestörten Kalman–Filter am Beispiel eines Fehlerprozeße unter besonderer Berücksichtigung manövrierenden Wasserfahrzeuges. Dissertation, der Auswirkung von Modellfehlern. Forschung– Wissenschaftliche Arbeiten der Fachrichtung Ausbildung–Weiterbildung Bericht Heft 19, Vermessungswesen der Universität Hannover, Heft Universität Kaiserlautern, Fachbereich Mathematik, 143, Hannover, 1986. August 1986.

Koch, K. Rudolf (1990). Bayesian Inference with Geodetic Tao, Benzao (1992). Statistic Analysis of Measurements. Applications, 2nd edition, Springer-Verlag, Berlin, Publishing house of Surveying and Mapping, 1990. Beijing, June 1992.

Loffeld, Otmar. (1990). Estimationstheorie II, Tarn, T. J.; Zaborszky, J. (1970). A Practical, Anwendung–Kalman–Filter. R. Oldenbourg Verlag, Nondiverging Filter. AIAA Journal, Vol. 8, No. 6, München Wien, 1990. June 1970, pp.1127–1133.

Maybeck, Peter S. (1979). Stochastic models, estimation, Wang, Jianguo (1997). Filtermethoden zur and control. Volume 1, Academic Press, New York, fehlertoleranten kinematischen Positions- 1979. bestimmung. Schritenreihe Studiengang Vermessungswesen, Federal Arm-Forced University Mehra, R. K.; Peschon, J. (1971). An Innovations Munich, Germany, No. 52, Neubiberg, 1997. Approach to Fault Detection and Diagnosis in Dynamic Systems. Automatica, Vol. 16, 1971, S. 637– Willsky, Alan S., Deyst, J. J.; Crawford, B. S. (1974). 640. Adaptive Filtering and Self–Test Methods for Failure Detection and compensation. Proceedings of Pelzer, Hans (1987). Deformationsuntersuchungen auf the 1974 JACC, Austin, Texas, June 19–21, 1974. der Basis kinematischer Bewegungsmodelle. AVN, Year 94, No. 2, February 1987, pp. 49~62. Willsky, Alan S., Deyst, J. J.; Crawford, B. S. (1975). Two Self–Test Methods Applied to an Inertial System Salzmann, Martin; Teunissen, P.J.G. (1989). Quality Problem. Journal of Spacecraft, Vol. 12, No. 7, July Control in Kinematic Data Processing. Land 1975, S. 434–437. Vehicle Navigation 1989, DGON, Verlag TÜV Rheinland, Köln, 1989, pp. 355–366. Willsky, Alan S. (1976). A Survey of Design Methods for Failure Detection in Dynamic Systems. Automatica, Salzmann, Martin (1993). Least Squares Filtering and Vol. 12, 1976, pp. 601–611. Testing for Geodetic Navigation Applications. Number 37, Publication on Geodesy, Netherlands Yoshimura, Toshio; et al. (1979). A Sequential Failure Geodetic Commission, Delft, 1993. Detection Approach and the Identification of Failure Parameters. International Journal of System Schlee, F. H.; Standish, C. J.; et al (1967). Divergence in Science, Vol. 10, No. 7, 1979, S. 827 –836. the Kalman Filter. AIAA Journal, Vol. 5, No. 6, June 1967, pp.1114–1120.