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, 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. 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.
Derivation
Kalman filter
Let 𝐱 denote the n-dimensional state vector of a model, and assume that it has Gaussian probability distribution with mean 𝝁 and covariance Q, i.e., its PDF is
p(𝐱)∝exp(−12(𝐱−𝝁)TQ−1(𝐱−𝝁)). Here and below, ∝ means proportional; a PDF is always scaled so that its integral over the whole space is one. This p(𝐱), 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 𝐝 is assumed to have Gaussian PDF with covariance R and mean H𝐱, where H is the so-called observation matrix. The covariance matrix R describes the estimate of the error of the data; if the random errors in the entries of the data vector 𝐝 are independent, R 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 𝐝. The value H𝐱 is what the value of the data would be for the state 𝐱 in the absence of data errors. Then the probability density p(𝐝|𝐱) of the data 𝐝 conditional of the system state 𝐱, called the data likelihood, is
p(𝐝|𝐱)∝exp(−12(𝐝−H𝐱)TR−1(𝐝−H𝐱)). The PDF of the state and the data likelihood are combined to give the new probability density of the system state 𝐱 conditional on the value of the data 𝐝 (the posterior) by the Bayes' theorem,
p(𝐱|𝐝)∝p(𝐝|𝐱)p(𝐱). The data 𝐝 is fixed once it is received, so denote the posterior state by 𝐱̂ instead of 𝐱|𝐝 and the posterior PDF by p(𝐱̂). It can be shown by algebraic manipulations that the posterior PDF is also Gaussian,
p(𝐱̂)∝exp(−12(𝐱̂−𝝁̂)TQ̂−1(𝐱̂−𝝁̂)), with the posterior mean 𝝁̂ and covariance Q̂ given by the Kalman update formulas
𝝁̂=𝝁+K(𝐝−H𝝁),Q̂=(I−KH)Q, where
K=QHT(HQHT+R)−1 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 𝐱. Instead, the PDF is represented by an ensemble
X=[𝐱1,…,𝐱N]=[𝐱i]. X is an n×N 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 𝐝 into an m×N matrix
D=[𝐝1,…,𝐝N]=[𝐝i],𝐝i=𝐝+𝝐𝐢,𝝐𝐢∼N(0,R), so that each column 𝐝i consists of the data vector 𝐝 plus a random vector from the m-dimensional normal distribution N(0,R). If, in addition, the columns of X are a sample from the prior probability distribution, then the columns of
X̂=X+K(D−HX) form a sample from the posterior probability distribution. To see this in the scalar case with H=1: Let xi=μ+ξi,ξi∼N(0,σx2), and di=d+ϵi,ϵi∼N(0,σd2). Then
x̂i=(1/σx21/σx2+1/σd2μ+1/σd21/σx2+1/σd2d)+(1/σx21/σx2+1/σd2ξi+1/σd21/σx2+1/σd2ϵi). The first sum is the posterior mean, and the second sum, in view of the independence, has a variance
(1/σx21/σx2+1/σd2)2σx2+(1/σd21/σx2+1/σd2)2σd2=11/σx2+1/σd2, which is the posterior variance. The EnKF is now obtained simply by replacing the state covariance Q in Kalman gain matrix K by the sample covariance C computed from the ensemble members (called the ensemble covariance), that is: K=CHT(HCHT+R)−1
Implementation
Basic formulation Here we follow . Suppose the ensemble matrix X and the data matrix D are as above. The ensemble mean and the covariance are
E(X)=1N∑k=1N𝐱k,C=AATN−1, where
A=X−E(X)𝐞1×N=X−1N(X𝐞N×1)𝐞1×N, and 𝐞 denotes the matrix of all ones of the indicated size. The posterior ensemble Xp is then given by
… excerpt ends here. Continue reading the full article.