Data assimilation

26 August 2023

Julien Arino

Department of Mathematics & Data Science Nexus
University of Manitoba*

Canadian Centre for Disease Modelling
PHAC-EMNID / REMMI-ASPC
NSERC-PHAC EID Modelling Consortium (CANMOD, MfPH, OMNI/RÉUNIS)

*The University of Manitoba campuses are located on original lands of Anishinaabeg, Cree, Oji-Cree, Dakota and Dene peoples, and on the homeland of the Métis Nation. We respect the Treaties that were made on these territories, we acknowledge the harms and mistakes of the past, and we dedicate ourselves to move forward in partnership with Indigenous communities in a spirit of reconciliation and collaboration.

Foreword

  • I have used ChatGPT and GitHub Copilot to generate some of this text
  • These tools are potential time savers, but they are not perfect (Copilot just suggested "but they are not perfect" 😄), so use them wisely: read the results carefully, and don't be afraid to edit them (again, this was suggested by Copilot 😄)

Outline

  • Data assimilation
  • Using a Kalman filter
  • Side note : observers

Data assimilation

Definition

Data assimilation is a process used in various scientific and engineering fields, such as meteorology, oceanography, geophysics, and hydrology, to combine observations with numerical models in order to produce more accurate and reliable predictions or estimates of a system's state or behaviour.

The goal of data assimilation is to merge real-world observations with model simulations to improve the overall understanding and prediction of complex systems.

In essence, data assimilation involves integrating observational data into a computational model to adjust and refine the model's predictions or estimations. This is particularly important in situations where the model's initial conditions or parameters are uncertain or incomplete. By incorporating actual observed data, the assimilation process helps correct any discrepancies between the model's predictions and the real-world observations.

The process of data assimilation typically involves the following steps:

  1. Model Prediction: The numerical model is used to simulate the behaviour of the system over a certain period of time, generating a prediction based on the current model state.

  2. Observations: Real-world observations, obtained from various sources such as satellites, sensors, and measurements, are collected and prepared for assimilation.

  3. Data-Matching: The observed data are compared to the model's predictions to identify differences or discrepancies between the two.

  1. Update: Based on the differences identified, adjustments are made to the model's state or parameters in a way that reduces the mismatch between observations and predictions. This update can be done through various mathematical techniques, such as Kalman filters, variational methods, or ensemble methods.

  2. Recalculation: The model is rerun using the updated state or parameters, providing a new prediction that incorporates both the model's dynamics and the assimilated data.

  3. Iterative Process: The process is often repeated iteratively, with subsequent observations being assimilated to continuously refine the model's predictions as new data becomes available.

Using a Kalman filter

(From Wikipedia)

To use the Kalman filter to estimate the internal state of a process given only a sequence of noisy observations, model the process in accordance with the following framework. Specify matrices, for each time-step :

  • , the state-transition model
  • , the observation model
  • , the covariance of the process noise
  • , the covariance of the observation noise
  • and sometimes , the control-input model as described below; if is included, then there is also
  • , the control vector, representing the controlling input into control-input model

The Kalman filter model assumes the true state at time is evolved from the state at according to

where

  • is the state transition model which is applied to the previous state
  • is the control-input model which is applied to the control vector
  • is the process noise, which is assumed to be drawn from a zero mean multivariate normal distribution, , with covariance matrix, : .

At time an observation (or measurement) of the true state is made according to

where

  • is the observation model, which maps the true state space into the observed space and
  • is the observation noise, which is assumed to be zero mean Gaussian white noise with covariance : .

The initial state, and the noise vectors at each step are all assumed to be mutually independent.

The Kalman filter is a recursive estimator. Only the estimated state from the previous time step and the current measurement are needed to compute the estimate for the current state

The notation represents the estimate of at time given observations up to and including at time

The state of the filter is represented by two variables:

  • , the a posteriori state estimate mean at time given observations up to and including at time
  • , the a posteriori estimate covariance matrix (a measure of the estimated accuracy of the state estimate)

The Kalman filter can be written as a single equation; however, it is most often conceptualized as two distinct phases:

  • The predict phase uses the state estimate from the previous timestep to produce an estimate of the state at the current timestep. This predicted state estimate is also known as the a priori state estimate because, although it is an estimate of the state at the current timestep, it does not include observation information from the current timestep

  • In the update phase, the innovation (the pre-fit residual), i.e. the difference between the current a priori prediction and the current observation information, is multiplied by the optimal Kalman gain and combined with the previous state estimate to refine the state estimate. This improved estimate based on the current observation is termed the a posteriori state estimate.

Typically, the two phases alternate, with the prediction advancing the state until the next scheduled observation, and the update incorporating the observation. However, this is not necessary;

  • if an observation is unavailable for some reason, the update may be skipped and multiple prediction procedures performed
  • if multiple independent observations are available at the same time, multiple update procedures may be performed (typically with different observation matrices )

Predict phase

Predicted (a priori) state estimate

Predicted (a priori) estimate covariance

Update phase

Innovation or measurement pre-fit residual

Innovation (or pre-fit residual) covariance

Optimal Kalman gain

Updated (a posteriori) state estimate

Update phase (cont'd)

Updated (a posteriori) estimate covariance

Measurement post-fit residual

The formula for the updated (a posteriori) estimate covariance above is valid for the optimal gain that minimizes the residual error, in which form it is most widely used in applications

Side note : state observers

A state observer or state estimator is a system that provides an estimate of the internal state of a given real system, from measurements of the input and output of the real system

It is typically computer-implemented, and provides the basis of many practical applications

Observable linear control system

A continuous-time linear system

where is observable if and only if the observability matrix

has rank

For a continuous-time linear system

where , the observer is

The observer error satisfies the equation

Eigenvalues of matrix can be chosen arbitrarily by appropriate choice of the observer gain when the pair is observable, i.e. the observability condition holds. In particular, it can be made Hurwitz (i.e., s.t. ), so the observer error when .

See this paper for state observers in epidemiological models

Merci / Miigwech / Thank you