{'fraction_non_alphanumeric': 0.03460962986582943, 'fraction_numerical': 0.00723589001447178, 'mean_word_length': 4.842648323301805, 'pattern_counts': {'":': 0, '<': 2, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
On the evaluation of uncertainties for state estimation with the Kalman filter

The Kalman filter is an established tool for the analysis of dynamic systems with normally distributed noise, and it has been successfully applied in numerous application areas. It provides sequentially calculated estimates of the system states along with a corresponding covariance matrix. For nonlinear systems, the extended Kalman filter is often used which is derived from the Kalman filter by linearization around the current estimate. A key issue in metrology is the evaluation of the uncertainty associated with the Kalman filter state estimates. The"Guide to the Expression of Uncertainty in Measurements"(GUM) and its supplements serve as the de facto standard for uncertainty evaluation in metrology. We explore the relationship between the covariance matrix produced by the Kalman filter and a GUM-compliant uncertainty analysis. In addition, also the results of a Bayesian analysis are considered. For the case of linear systems with known system matrices, we show that all three approaches are compatible. When the system matrices are not precisely known, however, or when the system is nonlinear, this equivalence breaks down and different results can be reached then. Though for precisely known nonlinear systems the result of the extended Kalman filter still corresponds to the linearized uncertainty propagation of GUM. The extended Kalman filter can suffer from linearization and convergence errors. These disadvantages can be avoided to some extent by applying Monte Carlo procedures, and we propose such a method which is GUM-compliant and can also be applied online during the estimation. We illustrate all procedures in terms of a two-dimensional dynamic system and compare the results with those obtained by particle filtering, which has been proposed for the approximate calculation of a Bayesian solution. Finally, we give some recommendations based on our findings.


Introduction
The Kalman filter is a standard approach in signal processing and control theory, and there is a huge number of applications where it has been successfully employed for estimation of system states [1,2,3]. Although originally developed for linear systems with normally distributed errors [4,5], several extensions and related methods have been developed since [6]. The challenge in the application of any signal processing method in metrology is the evaluation of uncertainties in compliance with the "Guide to the Expression of Uncertainty in Measurement" (GUM) [7] and its supplements (GUM S1 and GUM S2) [8,9]. Here we focus on supplement 2 to the GUM, which addresses multivariate measurands. For the evaluation of uncertainties, GUM S2 contains a propagation of covariance matrices based on a linearization of the measurement model and a multivariate Monte Carlo method for the propagation of probability density funtions; more details are given in Section 2. The Kalman filter calculates estimates and corresponding covariance matrices of the system states sequentially. It is common practice in the signal processing literature to consider these covariance matrices as a measure of confidence or estimation quality. However, a study of their relation to a GUM-compliant uncertainty evaluation is not yet available.
Dynamic metrology [10] often is concerned with dynamic systems in which the model is not precisely known. Direct application of the Kalman filter does not account for this, and evaluating the uncertainty associated with obtained state estimates is particularly challenging then. In the field of signal processing and control theory, the Kalman filter and related approaches for uncertain system models have been addressed by many authors in the field of signal processing and control theory, see, for instance, [11,12,13] and references therein. However, the focus of these studies and the aim of the proposed methods is rather a robustified state estimation than a reliable evaluation of measurement uncertainties. That is, the uncertainties are considered as a "defect" of the measurement setup that has to be mitigated by an adapted estimation method. In addition, many authors consider norm-bounded uncertainties, hence treating uncertainty as a worst-case limit for the obtained estimates [11]. Consequently, these approaches cannot be considered a GUM-compliant treatment of measurement uncertainties.
This paper provides GUM-compliant uncertainty evaluation procedures for the most common scenarios, including linear and nonlinear systems with and without uncertainty in the system model. We discuss and assess the relation of the state error covariance matrix of the Kalman filter to a GUM-compliant measurement uncertainty associated with the state estimates for the different settings. We show that for linear systems with known model, the Kalman filter, the application of GUM Monte Carlo and a Bayesian inference yield compatible results. For linear systems with uncertainty in the model, we consider two approaches; application of GUM Monte Carlo for the linear system and augmentation of the system states to include the uncertain model parameters. In the latter case the original linear dynamic system becomes nonlinear and the standard Kalman filter can no longer be applied. Therefore, we consider the often-used extended Kalman filter which is derived from the Kalman filter by linearization around the current state estimate. For the evaluation of uncertainties, we derive a GUM-compliant measurement model based on the extended Kalman filter. We show that for this model, the estimates and the corresponding covariance matrices calculated by the extended Kalman filter equal those obtained by application of linearized GUM. However, the linearization in the extended Kalman filter can result in significant estimation errors. Therefore, we also propose a GUM Monte Carlo method which, to some extent, is able to mitigate the impact of the linearization onto the state estimate and its corresponding covariance matrix.
The paper is organized as follows. In Section 2 we introduce the notation and the assumptions utilized throughout. Section 3 provides uncertainty evaluation for the Kalman filter for linear state-space systems, and Section 4 addresses the corresponding methods for the extended Kalman filter in case of nonlinear systems. In Section 5 we propose a GUM Monte Carlo method for the propagation of uncertainties through the linear Kalman filter and the extended Kalman filter. For general state-space systems, we recommend Bayesian inference and related approximate approaches, and we give a more detailed discussion of their relation to the GUM framework in Section 6. We illustrate the uncertainty propagation by a small example in Section 7. Finally, conclusions and recommendations are presented in Section 8.

Notation
The original Kalman filter [4] has been proposed for state estimation in linear systems with possibly time-varying system model matrices F, C, D, state vector x(k), measurement vector y(k) and independent Gaussian noise processes w(k) and v(k) with known covariance matrices Q(k) and R(k), respectively. For ease of presentation we consider D ≡ I, i.e., white noise in the state equation. The conclusions of our study remain basically the same for other choices of D. Throughout, we use canonical notation from system theory. That is, capital bold variables represent matrices, lower case bold variables represent vectors, and an estimate of a quantity x is denoted byx. The aim in the here considered state estimation is the sequential estimation of x(k) from knowledge about the system model matrices and the observations y(k). In a sequential estimation an estimatex(k) with associated covariance matrix P (k) is calculated from the estimate and its covariance matrix at the previous time step k − 1 and the measurement y(k) at the current time step, starting with an initial estimate and an initial covariance matrix for time k = 0.
The corresponding Kalman filter equations are given by [4] x with Kalman gain matrix Equations (3)-(4) denote the so-called prediction, and equations (5)-(6) the correction step. The Kalman filter equations can be derived in various ways, e.g. using orthogonal projection [4] or Bayes' theorem [14], see also Section 3.
In the classical interpretation, the matrix P (k) represents the error covariance matrix E (x(k) − x(k)) 2 , whereas in a Bayesian interpretation P (k) is the covariance matrix of the posterior distribution π(x(k)|x(k − 1), y(k)) [14]. The Kalman filter propagates the initial covariance matrix P (0) sequentially from time instant k = 0 using information about the state covariance matrix Q, the measurement covariance matrix R and the Kalman gain K. One aim of this paper is to address the relation of the matrix P (k) to a GUM-compliant uncertainty expression for the estimatex(k). Therefore, we consider GUM supplement 2 (GUM S2), which addresses multivariate quantities [9]. For the evaluation of uncertainties, GUM S2 contains two approaches: a propagation of estimates and covariance matrices based on a linearization of the measurement model, and a propagation of probability density functions (PDFs) using a Monte Carlo method. The application of the GUM framework for the evaluation of uncertainties requires a precise definition of the measurand, the mathematical model for its calculation, and estimates of the input quantities together with a corresponding covariance matrix (linearized GUM) or a PDF (GUM Monte Carlo) associated with the model input quantities. For the linearized GUM method, estimates and their associated covariance matrix for the input quantities are propagated through the linearized measurement model. The GUM Monte Carlo method does not require a linearization, but instead propagates samples drawn from the (joint) PDF of the input quantities through the measurement model. The result is a set of samples of the model output, which are considered a discrete representation of the PDF associated with the measurand. The estimate of the measurand and its associated uncertainty are then obtained as the mean and covariance matrix of that PDF, respectively.
For time-dependent measurands, two approaches are possible. When a closed time interval is considered, the whole sequence x = (x(1), . . . , x(N )) T can be taken as measurand. We refer to this as batch estimation. For a sequence with one-dimensional elements x(k), the result of batch estimation is an estimatê x = (x(0), . . . ,x(N )) T with an associated covariance matrix for linearized GUM or, respectively, a multivariate PDF for GUM Monte Carlo. In the case of multivariate elements x(k), either point-wise estimates and covariance matrices at the individual time instants are considered, or a re-ordering of the sequence is required. Batch estimation with the GUM Monte Carlo method is clearly challenging in terms of required computer resources for the case of longer time intervals. Therefore, one can consider as measurand the individual x(k) instead of the whole sequence x. We refer to this as sequential estimation. In this way, the dimension of the Monte Carlo draws does not increase with the length of the time interval, and required computer resources can be significantly reduced, see also [15,10]. The result of sequential estimation of the measurand x(k) is an estimatex(k) with associated covariance matrix U x(k) for the linearized GUM approach, and a multivariate PDF associated with x(k) for the GUM Monte Carlo method.

Uncertainty propagation for the linear Kalman filter
Uncertainty propagation in line with the GUM requires a measurement model for the measurand together with estimates and associated uncertainties for the input quantities (GUM), or a joint probability density function (PDF) as a state-of-knowledge distribution associated with the input quantities (GUM S1 and GUM S2). For the application of the linear Kalman filter (3)-(7) the measurement model is given by where with z(k) ∼ N (0, Q(k)). Basically two scenarios have to be addressed: known measurement model and uncertain measurement model.

Known measurement model
When the system model is considered to be known exactly, the only sources of uncertainty in the prediction of the current state estimate in (9) are the measurement y(k) and the state noise z(k). The uncertainty associated with y(k) is given by the covariance matrix R(k), which represents the noise covariance in the observations at time instant k. In the simplest case, the noise is assumed to be identically, independently distributed (i.i.d.) zero-mean Gaussian noise (i.e. white) with known standard deviation. For more complex noise structures, vector auto-regressive (VAR) models can be employed [16]. Assume that P (k − 1) = P k−1,k−1 associated withx(k − 1) represents a valid GUM-compliant uncertainty. Then, according to GUM Supplement 2 [9], the multivariate normal distribution models the state-of-knowledge about x k,k−1 . Note that Q(k) is the covariance matrix associated with the employed estimate 0 for z(k).
Knowledge about the measurement y(k) is modeled by the PDF Both input quantities are assumed to be obtained independently, which yields their joint distribution as the product of their associated PDFs. Since the measurement model (9) is linear in x k,k−1 and y(k), and as the state-of-knowledge distributions are normal distributions, the propagation of the joint PDF through the measurement model can be carried out analytically, resulting in the normal distribution with mean and covariance matrix where P k,k−1 = F (k)P k−1,k−1 F T (k) + Q(k). Hence, the PDF associated with the measurand x(k), calculated by a propagation of the joint PDF associated with the input quantities y(k) and x k,k−1 through the Kalman filter estimation equation (9) corresponds to the outcome of the linear Kalman filter itself. That is, the Kalman filter state estimatex(k) can be considered as an estimate of the measurand and the Kalman filter covariance matrix estimate P (k) = P k,k equals the uncertainty associated with the measurand in the sense of the GUM. It is well known that the linear Kalman filter for Gaussian independent noise processes w k , v k with known covariance matrices Q(k) and R(k) corresponds to a Bayesian inference [14] with • prior • posterior Consequently, the GUM Monte Carlo result under these assumptions produces the same distribution as a Bayesian inference.

Uncertainty in the model
We here assume that the state-space system matrices depend on a parameter vector θ = (θ 1 , . . . , θ M ) T which is not precisely known, i.e. F = F (θ, k) and C = C(θ, k). The corresponding equations for the correction step of the Kalman filter are then given by with Kalman gain The measurement model for the measurand x(k) is thus given by with input quantities now being x k,k−1 , y(k) and θ. In contrast to the case considered in the previous section, the measurement model is nonlinear in the input quantities. In principle, a linearization using, for instance, finite differences could be applied in line with GUM [7]. However, owing to the nonlinearity of the model, significant estimation errors can result, and a Monte Carlo method in accordance with GUM Supplement 2 [9] is recommended instead, see also Section 5. It is worth noting that a Bayesian approach to state-estimation as in the previous section does in general not provide a closed formula solution due to the nonlinearity of the model. Therefore, a Markov chain Monte Carlo method or similar techniques would have to be employed in order to calculate the posterior PDF of the state estimate x(k), cf. Section 6. An often applied technique for the treatment of the model parameter θ is the augmentation of the state-space model (1)-(2) such that the state vector also contains the parameter vector θ: with initial state error covariance matrix then defined as The resulting model is a nonlinear state-space model and the linear Kalman filter can no longer be applied. However, many modifications of the linear Kalman filter for nonlinear models can be found in the literature, the most famous being the so called extended Kalman filter, see also Section 4. One outcome of such a modified Kalman filter is the state estimate error covariance matrix P (k) which for the above model can be written in the following way The question arises whether the sub-matrix P x (k) can be considered a GUMcompliant representation of the uncertainty associated withx(k). In the following we show that this is not the case when the extended Kalman filter is applied for state estimation. The prediction and correction step of the Kalman filter and related approaches can be considered in separate equations for x(k) and θ(k) [17] x with and . Both parts of the state update depend on the parameter vector θ. In partic-ular, during the Kalman filter process, equation (27) updates the estimate of θ and equation (29) its associated uncertainty. Hence, the extended Kalman filter and any related approach do not solely propagate the uncertainty associated with the model parameters, but also alter their estimated value. This shows that with the extended Kalman filter for the augmented model, both, the original state vector x(k) and the model parameter vector θ, are estimated. With regard to the original measurement model (22), this would make θ an input quantity as well as an output quantity of the measurement model, rendering the model non-compliant with GUM. On the other hand, a Bayesian inference as for the linear case can be carried out for the case of uncertain systems in a natural way. That is, one may calculate the joint posterior of x(k) and θ at time instant k and obtain the posterior of x(k) by marginalization, treating θ as a nuisance parameter. In this way, the estimate of the parameter θ changes with time as new measurements y(k) are taken into account.
A GUM-compliant measurement model for the case of uncertainty in the model can be obtained by treating the parameter θ as time-dependent. That is, θ and U θ are interpreted as initial values for the extended Kalman filter just like x(0) and P (0). The parameters θ(k) at time instants k > 0 are then considered as individual measurands, i.e., one considers Θ = (θ(1), θ(2), . . . , θ(N )) T . As a result, at time instant k the parameter θ(k − 1) is the input quantity and θ(k) the output quantity of the measurement model, which is thus in accordance with GUM. Application of the extended Kalman filter then produces an estimate of the augmented state vector and its covariance matrix. In the following section we show that the result of the extended Kalman filter is equivalent to that obtained by an application of linearized GUM.

Uncertainty propagation for the extended Kalman filter
The extended Kalman filter (EKF) aims at state estimation for nonlinear statespace models of the form by linearizing around the current estimatex(k) and applying the Kalman filter [6]. The corresponding equations for the model (31)-(32) are given by with Kalman gain K(k) calculated as and derivatives In contrast to the linear Kalman filter, the extended Kalman filter is known to be a sub-optimal filter [18] and the amount of the difference to the result of a Bayesian inference depends on the effect of the nonlinearity, i.e. the linearization error of the filter equations.

Known measurement model
Similarly as for the linear state-space model in the previous section, our analysis starts with the uncertainty propagation for the case that at time instant k only the measurements y(k), the state noise z(k) and the previous state x(k − 1) are considered as uncertain input quantities for the measurand x(k). The measurement model is thus given by with input quantities x k,k−1 = f (x(k − 1), k) + z(k) and y(k) as in Section 3.1. In contrast to Section 3.1, however, the measurement model depends nonlinearly on the input quantity x k,k−1 . The Kalman gain K(k) is evaluated at the estimate f (x(k − 1), k). The application of the GUM linearization approach then results in with an associated uncertainty calculated as Hence, the result of GUM is identical to that of the extended Kalman filter. Similar to the difference between extended Kalman filter and a Bayesian inference, the deviation of the extended Kalman filter and a GUM Monte Carlo (GUM S1 or GUM S2) result depends on the effect of the nonlinearity of f (·) and h(·). An efficient sequential implementation of the GUM Monte Carlo method for the extended Kalman filter is given in Section 5. Note that the Monte Carlo method does not mitigate the linearization error of the extended Kalman filter itself. That is, the reliability of the estimation still depends on that linearization error. In principle, one could this take into account as an additional uncertainty contribution. However, since the linearization error depends nonlinearly on the estimation error, this is rather difficult in practice. As an alternative, other state estimation methods may have to be considered then, cf. Section 6.

Uncertainty in the model
Similar to the linear Kalman filter in section 3, we assume that the model functions depend on a parameter vector θ. Knowledge about θ is assumed to be available in terms of an estimateθ and an associated covariance matrix U θ . The aim is to propagate the uncertain knowledge about the model through the application of the extended Kalman filter. As for the case of a linear state-space model, we commence by extending the measurement model for the evaluation of the measurand through θ according to It is to be expected that in this way the nonlinearity of the measurement model increases, in the sense that errors owing to a linearization for the propagation of uncertainties increase. Thus, the application of a Monte Carlo method is recommended instead.
As for the linear model, the parameter θ can be considered for estimation and the state-space model augmented to with initial state error covariance matrix for the extended Kalman filter then defined as Application of the extended Kalman filter then utilizes the covariance matrix U θ as initial estimate of the state variance for that parameter and updates the estimate of θ over time. With the exception of the definition of D (x k,k−1 , θ k,k−1 ), the resulting formulas for the extended Kalman filter are the same as for the augmented linear state-space model. Consequently, the same conclusions hold for the nonlinear case. That is, the parameter vector θ and its associated uncertainty U θ can be considered as initial values for the extended Kalman filter with augmented state vector. On the other hand, when the parameter θ is not considered as input quantity to the measurement model, the estimated matrix P (k) coincides with a linearized GUM uncertainty evaluation, but neither with a Bayesian inference nor with GUM Monte Carlo.

GUM Monte Carlo for Kalman filter methods
Supplement 2 to the GUM [9] describes the propagation of uncertainties for multivariate quantities. Measurement uncertainty in that context is defined as the covariance matrix of a state of knowledge multivariate PDF. Consequently, the estimate is defined as the expectation of that PDF. Propagation of uncertainty then becomes a propagation of the (joint) multivariate PDF associated with the input quantities by drawing samples from that PDF and evaluating the measurement model for the drawn samples. The result is a sample from the PDF associated with the measurand. The propagation of PDFs via Monte Carlo is related to the change-of-variables formula for the PDF associated with the input quantities [19]. For sequential measurement models, such as filtering, basically two approaches to the implementation of the Monte Carlo method for uncertainty evaluation are possible: batch Monte Carlo and sequential Monte Carlo. Their main difference is in the definition of the measurand and the resulting dimensionality of the evaluated uncertainty. That is, for batch Monte Carlo the measurand is considered to be the sequence X = (x(1), . . . , x(N )) T , whereas for sequential Monte Carlo the measurand is x(k) for a particular time instant k.
In this section we outline batch Monte Carlo and sequential Monte Carlo for the propagation of uncertainty through a Kalman filter method. Both Monte Carlo methods are valid implementations of GUM Monte Carlo and yield identical results. The sequential GUM Monte Carlo, however, can be advantageous when online estimation is considered.

Batch Monte Carlo for GUM-compliant uncertainty evaluation
The Monte Carlo method of GUM Supplement 2 [9] could, in principle, be applied directly to the linear and nonlinear Kalman filter state estimation, irrespective of its nonlinearity. That is, the measurement model for the estimation of the measurand X = (x(1), . . . , x(N )) T could be considered to be given in The outcome of the Monte Carlo method is a sample of high-dimensional vectors, with dimension depending on the number of states and the number of time instants considered. The drawback of this approach is thus the amount of required computer memory, which increases drastically for an increased number of time samples. However, the implementation of the batch Monte Carlo method is straightforward and does not require a significant adaptation of the state estimation routine.

Sequential Monte Carlo for GUM-compliant uncertainty evaluation
For the sequential Monte Carlo method, x(k) is considered as measurand and x k,k−1 , y(k), θ, z(k) as input quantities, for which knowledge is assumed to be available in terms of the joint PDF Following the assumptions made, p y(k) and p z(k) are both taken as multivariate Gaussian distributions with meansŷ(k) and 0 together with the covariance matrices R(k) and Q(k), respectively. The PDF p x k,k−1 ,θ does not factorize since x k,k−1 and θ are not independent. This PDF evolves from the PDF p x(0),θ = p x(0) p θ according to the sequential estimation procedure, where p x(0) and p θ are assigned according to the prior knowledge about x(0) and θ. Consider the measurement model to be given by the prediction and correction steps of the Kalman filter, i.e. by the following pseudo-code.  k , θ (m) ) as samples from the PDF p x(k),θ 4. Set k = k + 1 and goto (2) When only the meanx(k) and the covariance matrix U x(k) and other pointwise statistics are sought, storage of all samples {x (m) (k)|m = 1, . . . , M ; k = 1, . . . , N } is not necessary. Instead, mean, covariance, credible intervals and other statistics can be calculated from the samples at the current time step and not required sets of samples discarded from computer memory, cf. [15].

Particle filtering and related methods
The drawbacks of the extended Kalman filter are a widely discussed topic in the signal processing literature and many alternative approaches have been proposed in the last decades. In particular, methods related to a Monte Carlo sampling for state estimation have been considered by many authors, e.g., [1,20,21,22]. In principle, one can translate the probabilistic derivation of state estimation from Section 3 to a Bayesian inference for a more general kind of state-space models [14] p(x(k)|y(k), x(k − 1)) ∝ p(y(k)|x(k))p(x(k)|x(k − 1)). (45) The implementation of the corresponding probability calculus can then be employed by using Markov chain Monte Carlo methods, cf. [23,24] or approximation methods [25]. In order to take advantage of the sequential character of the filtering process, typically sequential methods are advocated. For instance, a sequential Markov chain Monte Carlo method can take advantage of the sequential character of the model by reusing information about the Markov chains from the previous time step [26]. However, even then the computational costs are significant due to the highdimensionality of the time series. Therefore, several approximate sampling methods are proposed in the literature. The most often applied approach is the so-called particle filter, see, e.g. [1,14,21] and references therein. It uses a sequential Monte Carlo approach representing the information of the marginal multivariate PDF at the current time instant by a set of weight/sample pairs, called "particles". That is, the set {(x (m) (k), w (m) (k))|m = 1, . . . , N s } is considered a discrete approximation of the posterior PDF p(x(k)|y(k), x(k − 1)). The essential tasks of the particle filter are then the calculation of state values x (m) (k) and the update of the weights. For the state update the state model can be employed similar as in the Kalman filter prediction step with Q(k) denoting the covariance matrix of the process noise at time instant k. Note that in contrast to the Kalman filter the particle filter does not require the noise to be normally distributed, i.e. the distribution p() in (46) does not have to be a Gaussian. The weight update is based on importance sampling, i.e. sampling from an appropriate density q(x(k)|x(k − 1), y(k)) and evaluation of p(x(k)|y(k)) and p(x(k)|x(k − 1)) Thus, the particle filter carries out state estimation without the requirement of linearization or Gaussian PDFs for the noise processes The difference between the particle filter and the GUM Monte Carlo approach is the utilization of the Monte Carlo samples. Whereas the GUM Monte Carlo method aims at propagating samples through a given mathematical model relating the input quantities to the measurand, e.g. the extended Kalman filter, the particle filter has the goal to derive an improved estimate of the states based on the particle weights. Therefore, the particle filter does not correspond to a propagation of uncertainties, but rather to a probabilistic estimation procedure. A well-known disadvantage of the particle filter is that the weights deteriorate over time. That is, after a certain number of time steps, a large portion of the samples may have very small weights. Thus, the tails of the distribution are over-represented by the set of particles [14]. Many resampling schemes have been proposed as a remedy [20]. Such schemes rely on redrawing from the existing set of particles and their subsequent re-weighting. Beyond the particle filter, a number of other methods for state estimation for nonlinear state-space models have been proposed, the most famous being the so called unscented Kalman filter [6] and sigma-point filters [27]. In [28] such variants of the Kalman filter are summarized as linear regression Kalman filters, because they utilize sampling points for a statistical linear regression of the nonlinear model functions. In the literature, different strategies for choosing appropriate sampling points exist. The accuracy in the approximate evaluation of uncertainties depends on the chosen sampling points [28]. Another approach is the representation of the uncertainty associated with the input quantities in terms of intervals and their propagation through the state estimation process [12]. Although computationally inexpensive, this approach is not compliant with a GUM treatment of uncertainties, because of the strict treatment of uncertainties as bounds rather than probabilistic expressions.

Example
We illustrate the uncertainty propagation for the Kalman filter using the following example 1 . Consider a water tank where the filling changes in a sinusoidal way, corresponding to a harmonic sloshing. That is, the water level is modeled as with initial level L 0 = 100 cm, sloshing amplitude x s = 0.01 cm, frequency θ = 0.8 Hz and derivative We consider (noisy) measurements of the fill level and aim at estimating the actual fill level x L and the sloshing amplitude x s . The discrete-time state-space system describing the change of fill level is given by where state and measurement noise are modeled as η ∼ N (0, τ 2 ) and ν ∼ N (0, σ 2 ) with standard deviations τ = 0.01 and σ = 1.0. Figure 1 shows the simulated system states over time.

Linear system with uncertain model
When the sloshing frequency θ is not known exactly, the linear Kalman filter is no longer applicable. As described in Section 3.2, two main approaches are considered then, i.e., application of GUM Monte Carlo to the linear Kalman filter or augmentation of the system model (50)-(51) to a nonlinear system.

GUM Monte Carlo for linear Kalman filter
The measurement model for the GUM Monte Carlo method applied to the linear Kalman filter is given as The input quantities are then x(0), θ as well as all z(k) and y(k). In this example we consider knowledge about θ to be available in terms of the normal distribution N (θ, u 2 θ ) withθ equal the true value and u θ = 0.01 θ. The GUM Monte Carlo method is implemented in the sequential way described in Section 5. Realizations of θ ∼ N (θ, u 2 θ ) are drawn only once, at the initial time instant, and propagated through the application of the measurement model (52). The resulting estimates and point-wise standard uncertainties are shown in Figure 3.

Augmentation to nonlinear model
When knowledge about the parameter θ is to be updated using the measurements y(k), the linear system model (50)-(51) is augmented by considering the new state vector x = (x L , x s , θ) T : This model is nonlinear, and hence the linear Kalman filter cannot be applied. Therefore, the extended Kalman filter is considered with initial state estimate and its associate uncertainty given as The extended Kalman filter state estimate is then calculated as where z ∼ N (0,Q). The state augmentation ideally yieldsQ = diag((0, τ 2 , 0)), modelling θ as completely time-invariant. In our example, however, the extended Kalman filter tended to perform significantly better when introducing an additional process noise with variance α 2 << u 2 θ , i.e., usingQ = diag((0, τ 2 , α 2 )). That the process noise is a crucial "tuning" parameter of the extended Kalman filter and related methods is well-known and different strategies to choosing optimal process noise covariances are available in the literature [29,30].
As described in Section 3.2, in order to render equation (56) a GUM-compliant measurement model, the parameter θ has to be considered as time dependent. That is, θ is an input quantity only for the initial time step. With this adaptation, the GUM Monte Carlo method can be applied to the measurement model (56) with input quantities being x(0) and all z(k), y(k). Figure 3 shows the estimate and associated point-wise standard uncertainties for the original state variables x L and x s , for the three approaches to the treatment of model parameter uncertainty, i.e., GUM Monte Carlo for the linear model, extended Kalman filter and GUM Monte Carlo for the extended Kalman filter. For the Monte Carlo methods we carried out 100 000 trials.
The estimated water level x L is almost identical for all three approaches, whereas the uncertainties of the estimated sloshing amplitudes are slightly larger for the GUM Monte Carlo method applied to the linear model. The reason is that this approach does not alter the model parameter estimate nor its associated uncertainty. In contrast, the extended Kalman filter, and consequently the GUM Monte Carlo for the extended Kalman filter, calculate a new value of θ and its associated uncertainty in every time step. Provided that the extended Kalman filter converges, an improved estimate of the model parameter can potentially improve the overall estimation quality.
The estimates and standard uncertainties for the uncertain model parameter are shown in Figure 4, showing that the uncertainty associated with the sloshing frequency θ is decreased by the extended Kalman filter based on the sequential re-estimation of this parameter. That is, after a small number of time steps the extended Kalman filter shows an increased confidence in the estimated value of θ. The uncertainties calculated by the GUM Monte Carlo for the measurement

Approximate Bayesian inference
In general, the extended Kalman filter suffers from linearization errors which cannot be mitigated by an application of GUM Monte Carlo for the corresponding uncertainty evaluation, unless this error can be quantified and included in the uncertainty budget. Therefore, we compared the extended Kalman filter result with that obtained by a particle filter, implemented by carrying out the following calculations in each time step, where m denotes the index of the particle [18].
1. Calculate a new estimate of the state variable as with η(k) ∼ N (0,Q(k)) 2. Withŷ(k) the measurement at time instant k, evaluate the likelihood l(x (m) (k);ŷ(k)). The plots shown in Figure 5 illustrate the change in the marginal PDF associated with the sloshing frequency θ as determined by the particle filter with N s = 100 000 particles and resampling tolerance factor γ = 0.9. As for the extended Kalman filter, the estimation is initialized with P θ (0) = u 2 θ as initial variance, which decreased during the estimation process over time. Figure  5 shows that at time equal 8 s the PDF calculated by the particle filter is centered around the true value of θ, whereas the PDF obtained from the GUM Monte Carlo method for measurement model (56) is slightly shifted. Also shown in Figure 5 is the normal distribution obtained from the estimate and covariance matrix calculated by the extended Kalman filter. This PDF is also not centered around the true value at this point and has a larger spread than the PDFs obtained from the particle filter and the GUM Monte Carlo method. The difference between the PDFs obtained at time equal 8 s indicate a faster convergence rate of the particle filter in the example considered, with computational costs being comparable to those of the GUM Monte Carlo method.

Conclusions
The Kalman filter and related methods for state estimation are successfully employed in a wide range of areas. The Kalman filter sequentially produces an estimate of the state vector and characterizes its uncertainty by a covariance matrix that is updated during the sequential estimation. An implementation of the Kalman filter for metrological applications requires a reliable evaluation of the uncertainty associated with the obtained state estimate. Since the GUM [7] and its Supplements provide the de facto standard for uncertainty evaluation in metrology, the question arises whether the covariance matrix produced by the Kalman filter is a GUM-compliant uncertainty characterization. Recent supplements of the GUM [8,9] advocate the use of state of knowledge distributions for the characterization of the uncertainty about a measurand. Therefore, the equivalence or in-equivalence of a GUM uncertainty evaluation for Kalman state estimation and a Bayesian inference is of interest as well. We have addressed these issues and compared the different approaches for linear as well as nonlinear dynamic systems. In addition, the situation of not precisely known systems has been considered which is particularly important for dynamic metrology [10]. tion of such a GUM Monte Carlo method was proposed which can be applied for real-time applications.
For nonlinear, exactly known dynamic systems the results obtained by the extended Kalman filter correspond to those obtained by the GUM propagation of covariance matrices upon linearization. They are, however, no longer equivalent to the application of GUM Monte Carlo. The latter approach can improve the uncertainty results obtained by the extended Kalman filter to some extent. However, as the GUM model is based on a linearization of the dynamics (through the extended Kalman filter estimation), a GUM Monte Carlo approach cannot mitigate shortcomings due to that linearization. An alternative then is the application of a Bayesian inference which, however, can be expensive to implement. Nevertheless, an approximate Bayesian inference such as the considered particle filtering approach may provide an attractive alternative in this case. Similar conclusions hold when the nonlinear dynamic system is not known exactly.
In summary: For linear, exactly known systems application of the Kalman filter can be recommended as the method of choice for state estimation, providing a GUM-compliant uncertainty characterization which also is equivalent to a Bayesian inference. For linear, not exactly known systems we recommend to use the proposed sequential GUM Monte Carlo method based on the linear Kalman filter estimation. In the case of nonlinear, not exactly known dynamic systems both the extended Kalman filter as well as the application of a GUM uncertainty analysis based on the extended Kalman filter show shortcomings, and an approximate Bayesian method such as particle filtering may yield more adequate results then.