Ensemble Kalman filter
The ensemble Kalman filter (EnKF) is a recursive filter suitable for problems with a large number of variables, such as discretizations of partial differential equations in geophysical models. The EnKF originated as a version of the Kalman filter for large problems (essentially, the covariance matrix is replaced by the sample covariance), and it is now an important data assimilation component of ensemble forecasting. EnKF is related to the particle filter (in this context, a particle is the same thing as an ensemble member) but the EnKF makes the assumption that all probability distributions involved are Gaussian; when it is applicable, it is much more efficient than the particle filter.
Introduction
The ensemble Kalman filter (EnKF) is a Monte Carlo implementation of the Bayesian update problem: given a probability density function (PDF) of the state of the modeled system (the prior, called often the forecast in geosciences) and the data likelihood, Bayes' theorem is used to obtain the PDF after the data likelihood has been taken into account (the posterior, often called the analysis). This is called a Bayesian update. The Bayesian update is combined with advancing the model in time, incorporating new data from time to time. The original Kalman filter, introduced in 1960,[1] assumes that all PDFs are Gaussian (the Gaussian assumption) and provides algebraic formulas for the change of the mean and the covariance matrix by the Bayesian update, as well as a formula for advancing the mean and covariance in time provided the system is linear. However, maintaining the covariance matrix is not feasible computationally for high-dimensional systems. For this reason, EnKFs were developed.[2][3] EnKFs represent the distribution of the system state using a collection of state vectors, called an ensemble, and replace the covariance matrix by the sample covariance computed from the ensemble. The ensemble is operated with as if it were a random sample, but the ensemble members are really not independent, as they all share the EnKF. One advantage of EnKFs is that advancing the PDF in time is achieved by simply advancing each member of the ensemble.[4]
Derivation
Kalman filter
Let [math]\displaystyle{ \mathbf{x} }[/math] denote the [math]\displaystyle{ n }[/math]-dimensional state vector of a model, and assume that it has Gaussian probability distribution with mean [math]\displaystyle{ \mathbf{\mu} }[/math] and covariance [math]\displaystyle{ Q }[/math], i.e., its PDF is
- [math]\displaystyle{ p(\mathbf{x})\propto\exp\left( -\frac{1}{2}(\mathbf{x}-\mathbf{\mu })^{\mathrm{T}}Q^{-1}(\mathbf{x}-\mathbf{\mu})\right) . }[/math]
Here and below, [math]\displaystyle{ \propto }[/math] means proportional; a PDF is always scaled so that its integral over the whole space is one. This [math]\displaystyle{ p(\mathbf{x}) }[/math], called the prior, was evolved in time by running the model and now is to be updated to account for new data. It is natural to assume that the error distribution of the data is known; data have to come with an error estimate, otherwise they are meaningless. Here, the data [math]\displaystyle{ \mathbf{d} }[/math] is assumed to have Gaussian PDF with covariance [math]\displaystyle{ R }[/math] and mean [math]\displaystyle{ H\mathbf{x} }[/math], where [math]\displaystyle{ H }[/math] is the so-called observation matrix. The covariance matrix [math]\displaystyle{ R }[/math] describes the estimate of the error of the data; if the random errors in the entries of the data vector [math]\displaystyle{ \mathbf{d} }[/math] are independent, [math]\displaystyle{ R }[/math] is diagonal and its diagonal entries are the squares of the standard deviation (“error size”) of the error of the corresponding entries of the data vector [math]\displaystyle{ \mathbf{d} }[/math]. The value [math]\displaystyle{ H\mathbf{x} }[/math] is what the value of the data would be for the state [math]\displaystyle{ \mathbf{x} }[/math] in the absence of data errors. Then the probability density [math]\displaystyle{ p(\mathbf{d}|\mathbf{x}) }[/math] of the data [math]\displaystyle{ \mathbf{d} }[/math] conditional of the system state [math]\displaystyle{ \mathbf{x} }[/math], called the data likelihood, is
- [math]\displaystyle{ p\left( \mathbf{d}|\mathbf{x}\right) \propto\exp\left( -\frac{1}{2}(\mathbf{d}-H\mathbf{x})^{\mathrm{T}}R^{-1}(\mathbf{d}-H\mathbf{x})\right) . }[/math]
The PDF of the state and the data likelihood are combined to give the new probability density of the system state [math]\displaystyle{ \mathbf{x} }[/math] conditional on the value of the data [math]\displaystyle{ \mathbf{d} }[/math] (the posterior) by the Bayes theorem,
- [math]\displaystyle{ p\left( \mathbf{x}|\mathbf{d}\right) \propto p\left( \mathbf{d}|\mathbf{x}\right) p(\mathbf{x}). }[/math]
The data [math]\displaystyle{ \mathbf{d} }[/math] is fixed once it is received, so denote the posterior state by [math]\displaystyle{ \mathbf{\hat{x}} }[/math] instead of [math]\displaystyle{ \mathbf{x}|\mathbf{d} }[/math] and the posterior PDF by [math]\displaystyle{ p\left( \mathbf{\hat{x}}\right) }[/math]. It can be shown by algebraic manipulations[5] that the posterior PDF is also Gaussian,
- [math]\displaystyle{ p\left( \mathbf{\hat{x}}\right) \propto\exp\left( -\frac{1}{2}(\mathbf{\hat{x}}-\mathbf{\hat{\mu}})^{\mathrm{T}}\hat{Q}^{-1}(\mathbf{\hat{x}}-\mathbf{\hat{\mu}})\right) , }[/math]
with the posterior mean [math]\displaystyle{ \mathbf{\hat{\mu}} }[/math] and covariance [math]\displaystyle{ \hat{Q} }[/math] given by the Kalman update formulas
- [math]\displaystyle{ \mathbf{\hat{\mu}}=\mathbf{\mu}+K\left( \mathbf{d}-H\mathbf{\mu}\right) ,\quad\hat{Q}=\left( I-KH\right) Q, }[/math]
where
- [math]\displaystyle{ K=QH^{\mathrm{T}}\left( HQH^{\mathrm{T}}+R\right) ^{-1} }[/math]
is the so-called Kalman gain matrix.
Ensemble Kalman Filter
The EnKF is a Monte Carlo approximation of the Kalman filter, which avoids evolving the covariance matrix of the PDF of the state vector [math]\displaystyle{ \mathbf{x} }[/math]. Instead, the PDF is represented by an ensemble
- [math]\displaystyle{ X=\left[ \mathbf{x}_{1},\ldots,\mathbf{x}_{N}\right] =\left[ \mathbf{x}_{i}\right]. }[/math]
[math]\displaystyle{ X }[/math] is an [math]\displaystyle{ n\times N }[/math] matrix whose columns are the ensemble members, and it is called the prior ensemble. Ideally, ensemble members would form a sample from the prior distribution. However, the ensemble members are not in general independent except in the initial ensemble, since every EnKF step ties them together. They are deemed to be approximately independent, and all calculations proceed as if they actually were independent.
Replicate the data [math]\displaystyle{ \mathbf{d} }[/math] into an [math]\displaystyle{ m\times N }[/math] matrix
- [math]\displaystyle{ D=\left[ \mathbf{d}_{1},\ldots,\mathbf{d}_{N}\right] =\left[ \mathbf{d}_{i}\right], \quad \mathbf{d}_{i}=\mathbf{d}+\mathbf{\epsilon_{i}}, \quad \mathbf{\epsilon_{i}} \sim N(0,R), }[/math]
so that each column [math]\displaystyle{ \mathbf{d}_{i} }[/math] consists of the data vector [math]\displaystyle{ \mathbf{d} }[/math] plus a random vector from the [math]\displaystyle{ m }[/math]-dimensional normal distribution [math]\displaystyle{ N(0,R) }[/math]. If, in addition, the columns of [math]\displaystyle{ X }[/math] are a sample from the prior probability distribution, then the columns of
- [math]\displaystyle{ \hat{X}=X+K(D-HX) }[/math]
form a sample from the posterior probability distribution. To see this in the scalar case with [math]\displaystyle{ H=1 }[/math]: Let [math]\displaystyle{ x_i = \mu + \xi_i, \; \xi_i \sim N(0, \sigma_x^2) }[/math], and [math]\displaystyle{ d_i = d + \epsilon_i, \; \epsilon_i \sim N(0, \sigma_d^2). }[/math] Then
- [math]\displaystyle{ \hat{x}_i = \left(\frac{1/\sigma_x^2}{1/\sigma_x^2 + 1/\sigma_d^2} \mu + \frac{1/\sigma_d^2}{1/\sigma_x^2 + 1/\sigma_d^2} d \right)+ \left(\frac{1/\sigma_x^2}{1/\sigma_x^2 + 1/\sigma_d^2} \xi_i + \frac{1/\sigma_d^2}{1/\sigma_x^2 + 1/\sigma_d^2} \epsilon_i \right) }[/math].
The first sum is the posterior mean, and the second sum, in view of the independence, has a variance
- [math]\displaystyle{ \left(\frac{1/\sigma_x^2}{1/\sigma_x^2 + 1/\sigma_d^2}\right)^2 \sigma_x^2 + \left(\frac{1/\sigma_d^2}{1/\sigma_x^2 + 1/\sigma_d^2}\right)^2 \sigma_d^2 = \frac{1}{1/\sigma_x^2 + 1/\sigma_d^2} }[/math],
which is the posterior variance.
The EnKF is now obtained simply by replacing the state covariance [math]\displaystyle{ Q }[/math] in Kalman gain matrix [math]\displaystyle{ K }[/math] by the sample covariance [math]\displaystyle{ C }[/math] computed from the ensemble members (called the ensemble covariance),[6] that is: [math]\displaystyle{ K=CH^{\mathrm{T}}\left( HCH^{\mathrm{T}}+R\right) ^{-1} }[/math]
Implementation
Basic formulation
Here we follow.[7][8] Suppose the ensemble matrix [math]\displaystyle{ X }[/math] and the data matrix [math]\displaystyle{ D }[/math] are as above. The ensemble mean and the covariance are
- [math]\displaystyle{ E\left( X\right) =\frac{1}{N}\sum_{k=1}^{N}\mathbf{x}_{k},\quad C=\frac{AA^{T}}{N-1}, }[/math]
where
- [math]\displaystyle{ A=X-E\left( X\right) \mathbf{e}_{1\times N} =X-\frac{1}{N}\left( X\mathbf{e}_{N\times1}\right) \mathbf{e}_{1\times N}, }[/math]
and [math]\displaystyle{ \mathbf{e} }[/math] denotes the matrix of all ones of the indicated size.
The posterior ensemble [math]\displaystyle{ X^{p} }[/math] is then given by
- [math]\displaystyle{ X^{p}=X+CH^{T}\left( HCH^{T}+R\right) ^{-1}(D-HX), }[/math]
where the perturbed data matrix [math]\displaystyle{ D }[/math] is as above.
Note that since [math]\displaystyle{ R }[/math] is a covariance matrix, it is always positive semidefinite and usually positive definite, so the inverse above exists and the formula can be implemented by the Cholesky decomposition.[9] In,[7][8] [math]\displaystyle{ R }[/math] is replaced by the sample covariance [math]\displaystyle{ \tilde{D} \tilde{D}^{T}/\left( N-1\right) }[/math] where [math]\displaystyle{ \tilde{D} = D - \frac{1}{N} d \, \mathbf{e}_{1\times N} }[/math]and the inverse is replaced by a pseudoinverse, computed using the singular-value decomposition (SVD) .
Since these formulas are matrix operations with dominant Level 3 operations,[10] they are suitable for efficient implementation using software packages such as LAPACK (on serial and shared memory computers) and ScaLAPACK (on distributed memory computers).[9] Instead of computing the inverse of a matrix and multiplying by it, it is much better (several times cheaper and also more accurate) to compute the Cholesky decomposition of the matrix and treat the multiplication by the inverse as solution of a linear system with many simultaneous right-hand sides.[10]
Observation matrix-free implementation
Since we have replaced the covariance matrix with ensemble covariance, this leads to a simpler formula where ensemble observations are directly used without explicitly specifying the matrix [math]\displaystyle{ H }[/math]. More specifically, define a function [math]\displaystyle{ h(\mathbf{x}) }[/math] of the form
- [math]\displaystyle{ h(\mathbf{x})=H\mathbf{x}. }[/math]
The function [math]\displaystyle{ h }[/math] is called the observation function or, in the inverse problems context, the forward operator. The value of [math]\displaystyle{ h(\mathbf{x}) }[/math] is what the value of the data would be for the state [math]\displaystyle{ \mathbf{x} }[/math] assuming the measurement is exact. Then the posterior ensemble can be rewritten as
- [math]\displaystyle{ X^{p}=X+\frac{1}{N-1}A\left( HA\right) ^{T}P^{-1}(D-HX) }[/math]
where
- [math]\displaystyle{ HA=HX-\frac{1}{N}\left( \left( HX\right) \mathbf{e}_{N\times1}\right) \mathbf{e}_{1\times N}, }[/math]
and
- [math]\displaystyle{ P=\frac{1}{N-1}HA\left( HA\right) ^{T}+R, }[/math]
with
- [math]\displaystyle{ \left[ HA\right] _{i} =H\mathbf{x}_{i}-H\frac{1}{N}\sum_{j=1}^{N}\mathbf{x}_{j}\ =h\left( \mathbf{x}_{i}\right) -\frac{1}{N}\sum_{j=1}^{N}h\left( \mathbf{x}_{j}\right) . }[/math]
Consequently, the ensemble update can be computed by evaluating the observation function [math]\displaystyle{ h }[/math] on each ensemble member once and the matrix [math]\displaystyle{ H }[/math] does not need to be known explicitly. This formula holds also[9] for an observation function [math]\displaystyle{ h(\mathbf{x})=H\mathbf{x+f} }[/math] with a fixed offset [math]\displaystyle{ \mathbf{f} }[/math], which also does not need to be known explicitly. The above formula has been commonly used for a nonlinear observation function [math]\displaystyle{ h }[/math], such as the position of a hurricane vortex.[11] In that case, the observation function is essentially approximated by a linear function from its values at ensemble members.
Implementation for a large number of data points
For a large number [math]\displaystyle{ m }[/math] of data points, the multiplication by [math]\displaystyle{ P^{-1} }[/math] becomes a bottleneck. The following alternative formula is advantageous when the number of data points [math]\displaystyle{ m }[/math] is large (such as when assimilating gridded or pixel data) and the data error covariance matrix [math]\displaystyle{ R }[/math] is diagonal (which is the case when the data errors are uncorrelated), or cheap to decompose (such as banded due to limited covariance distance). Using the Sherman–Morrison–Woodbury formula[12]
- [math]\displaystyle{ (R+UV^{T})^{-1}=R^{-1}-R^{-1}U(I+V^{T}R^{-1}U)^{-1}V^{T}R^{-1}, }[/math]
with
- [math]\displaystyle{ U=\frac{1}{N-1}HA,\quad V=HA, }[/math]
gives
- [math]\displaystyle{ \begin{align} P^{-1} & =\left( R+\frac{1}{N-1}HA\left( HA\right) ^{T}\right) ^{-1}\ = \\ & =R^{-1}\left[ I-\frac{1}{N-1}\left( HA\right) \left( I+\left( HA\right) ^{T}R^{-1}\frac{1}{N-1}\left( HA\right) \right) ^{-1}\left( HA\right) ^{T}R^{-1}\right] , \end{align} }[/math]
which requires only the solution of systems with the matrix [math]\displaystyle{ R }[/math] (assumed to be cheap) and of a system of size [math]\displaystyle{ N }[/math] with [math]\displaystyle{ m }[/math] right-hand sides. See[9] for operation counts.
Further extensions
The EnKF version described here involves randomization of data. For filters without randomization of data, see.[13][14][15]
Since the ensemble covariance is rank deficient (there are many more state variables, typically millions, than the ensemble members, typically less than a hundred), it has large terms for pairs of points that are spatially distant. Since in reality the values of physical fields at distant locations are not that much correlated, the covariance matrix is tapered off artificially based on the distance, which gives rise to localized EnKF algorithms.[16][17] These methods modify the covariance matrix used in the computations and, consequently, the posterior ensemble is no longer made only of linear combinations of the prior ensemble.
For nonlinear problems, EnKF can create posterior ensemble with non-physical states. This can be alleviated by regularization, such as penalization of states with large spatial gradients.[6]
For problems with coherent features, such as hurricanes, thunderstorms, firelines, squall lines, and rain fronts, there is a need to adjust the numerical model state by deforming the state in space (its grid) as well as by correcting the state amplitudes additively. In 2007, Ravela et al. introduce the joint position-amplitude adjustment model using ensembles, and systematically derive a sequential approximation which can be applied to both EnKF and other formulations.[18] Their method does not make the assumption that amplitudes and position errors are independent or jointly Gaussian, as others do. The morphing EnKF employs intermediate states, obtained by techniques borrowed from image registration and morphing, instead of linear combinations of states.[19][20]
Formally, EnKFs rely on the Gaussian assumption. In practice they can also be used for nonlinear problems, where the Gaussian assumption may not be satisfied. Related filters attempting to relax the Gaussian assumption in EnKF while preserving its advantages include filters that fit the state PDF with multiple Gaussian kernels,[21] filters that approximate the state PDF by Gaussian mixtures,[22] a variant of the particle filter with computation of particle weights by density estimation,[20] and a variant of the particle filter with thick tailed data PDF to alleviate particle filter degeneracy.[23]
See also
- Data assimilation
- Numerical weather prediction § Ensembles
- Particle filter
- Recursive Bayesian estimation
References
- ↑ Kalman, R. E. (1960). "A new approach to linear filtering and prediction problems". Journal of Basic Engineering 82 (1): 35–45. doi:10.1115/1.3662552.
- ↑ Evensen, G. (1994). "Sequential data assimilation with nonlinear quasi-geostrophic model using Monte Carlo methods to forecast error statistics". Journal of Geophysical Research 99 (C5): 143–162. doi:10.1029/94JC00572. Bibcode: 1994JGR....9910143E.
- ↑ Houtekamer, P.; Mitchell, H. L. (1998). "Data assimilation using an ensemble Kalman filter technique". Monthly Weather Review 126 (3): 796–811. doi:10.1175/1520-0493(1998)126<0796:DAUAEK>2.0.CO;2. Bibcode: 1998MWRv..126..796H.
- ↑ For a survey of EnKF and related data assimilation techniques, see Evensen, G. (2007). Data Assimilation : The Ensemble Kalman Filter. Berlin: Springer. ISBN 978-3-540-38300-0.
- ↑ Anderson, B. D. O.; Moore, J. B. (1979). Optimal Filtering. Englewood Cliffs, NJ: Prentice-Hall. ISBN 978-0-13-638122-8.
- ↑ 6.0 6.1 Johns, C. J.; Mandel, J. (2008). "A Two-Stage Ensemble Kalman Filter for Smooth Data Assimilation". Environmental and Ecological Statistics 15 (1): 101–110. doi:10.1007/s10651-007-0033-0.
- ↑ 7.0 7.1 Burgers, G.; van Leeuwen, P. J.; Evensen, G. (1998). "Analysis Scheme in the Ensemble Kalman Filter". Monthly Weather Review 126 (6): 1719–1724. doi:10.1175/1520-0493(1998)126<1719:ASITEK>2.0.CO;2. Bibcode: 1998MWRv..126.1719B.
- ↑ 8.0 8.1 Evensen, G. (2003). "The Ensemble Kalman Filter: Theoretical Formulation and Practical Implementation". Ocean Dynamics 53 (4): 343–367. doi:10.1007/s10236-003-0036-9. Bibcode: 2003OcDyn..53..343E.
- ↑ 9.0 9.1 9.2 9.3 Mandel, J. (June 2006). "Efficient Implementation of the Ensemble Kalman Filter". Center for Computational Mathematics Reports (University of Colorado at Denver and Health Sciences Center) 231. http://www.math.ucdenver.edu/ccm/reports/rep231.pdf.
- ↑ 10.0 10.1 Golub, G. H.; Loan, C. F. V. (1989). Matrix Computations (Second ed.). Baltimore: Johns Hopkins Univ. Press. ISBN 978-0-8018-3772-2.
- ↑ Chen, Y.; Snyder, C. (2007). "Assimilating Vortex Position with an Ensemble Kalman Filter". Monthly Weather Review 135 (5): 1828–1845. doi:10.1175/MWR3351.1. Bibcode: 2007MWRv..135.1828C.
- ↑ Hager, W. W. (1989). "Updating the inverse of a matrix". SIAM Review 31 (2): 221–239. doi:10.1137/1031049.
- ↑ Anderson, J. L. (2001). "An ensemble adjustment Kalman filter for data assimilation". Monthly Weather Review 129 (12): 2884–2903. doi:10.1175/1520-0493(2001)129<2884:AEAKFF>2.0.CO;2. Bibcode: 2001MWRv..129.2884A.
- ↑ Evensen, G. (2004). "Sampling strategies and square root analysis schemes for the EnKF". Ocean Dynamics 54 (6): 539–560. doi:10.1007/s10236-004-0099-2. Bibcode: 2004OcDyn..54..539E.
- ↑ Tippett, M. K.; Anderson, J. L.; Bishop, C. H.; Hamill, T. M.; Whitaker, J. S. (2003). "Ensemble square root filters". Monthly Weather Review 131 (7): 1485–1490. doi:10.1175/1520-0493(2003)131<1485:ESRF>2.0.CO;2. Bibcode: 2003MWRv..131.1485T.
- ↑ Anderson, J. L. (2003). "A local least squares framework for ensemble filtering". Monthly Weather Review 131 (4): 634–642. doi:10.1175/1520-0493(2003)131<0634:ALLSFF>2.0.CO;2. Bibcode: 2003MWRv..131..634A.
- ↑ Ott, E.; Hunt, B. R.; Szunyogh, I.; Zimin, A. V.; Kostelich, E. J.; Corazza, M.; Kalnay, E.; Patil, D. et al. (2004). "A local ensemble Kalman filter for atmospheric data assimilation". Tellus A 56 (5): 415–428. doi:10.3402/tellusa.v56i5.14462. Bibcode: 2004TellA..56..415O.
- ↑ Ravela, S.; Emanuel, K.; McLaughlin, D. (2007). "Data Assimilation by Field Alignment". Physica. D: Nonlinear Phenomena 230 (1–2): 127–145. doi:10.1016/j.physd.2006.09.035. Bibcode: 2007PhyD..230..127R.
- ↑ Beezley, J. D.; Mandel, J. (2008). "Morphing ensemble Kalman filters". Tellus A 60 (1): 131–140. doi:10.1111/j.1600-0870.2007.00275.x. Bibcode: 2008TellA..60..131B.
- ↑ 20.0 20.1 Mandel, J.; Beezley, J. D. (November 2006). "Predictor-corrector and morphing ensemble filters for the assimilation of sparse data into high dimensional nonlinear systems". 11th Symposium on Integrated Observing and Assimilation Systems for the Atmosphere, Oceans, and Land Surface (IOAS-AOLS), CD-ROM, Paper 4.12, 87th American Meteorological Society Annual Meeting, San Antonio, TX, January 2007. University of Colorado at Denver and Health Sciences Center. http://www.math.ucdenver.edu/ccm/reports/rep239.pdf.
- ↑ Anderson, J. L.; Anderson, S. L. (1999). "A Monte Carlo implementation of the nonlinear filtering problem to produce ensemble assimilations and forecasts". Monthly Weather Review 127 (12): 2741–2758. doi:10.1175/1520-0493(1999)127<2741:AMCIOT>2.0.CO;2. Bibcode: 1999MWRv..127.2741A.
- ↑ Bengtsson, T.; Snyder, C.; Nychka, D. (2003). "Toward a nonlinear ensemble filter for high dimensional systems". Journal of Geophysical Research: Atmospheres 108 (D24): STS 2–1–10. doi:10.1029/2002JD002900. Bibcode: 2003JGRD..108.8775B.
- ↑ van Leeuwen, P. (2003). "A variance-minimizing filter for large-scale applications". Monthly Weather Review 131 (9): 2071–2084. doi:10.1175/1520-0493(2003)131<2071:AVFFLA>2.0.CO;2. Bibcode: 2003MWRv..131.2071V.
External links
- EnKF webpage
- TOPAZ, real-time forecasting of the North Atlantic ocean and Arctic sea-ice with the EnKF
- EnKF-C, a compact framework for data assimilation into large-scale layered geophysical models with the EnKF
- PDAF – Parallel Data Assimilation Framework – an open-source software for data assimilation providing different variants of the EnKF
Original source: https://en.wikipedia.org/wiki/Ensemble Kalman filter.
Read more |