# Interim Summary

It is a good place to stop for a short summary. Before going further, I would like to summarize what we have learned so far.

As you remember from the "One-dimensional Kalman Filter section" (if you don't remember, please review it again), the Kalman Filter computations are based on five equations.

Two prediction equations:

• State Extrapolation Equation - predicting or estimating the future state based on the known present estimation.
• Covariance Extrapolation Equation - the measure of uncertainty in our prediction.

Two update equations:

• State Update Equation - estimating the current state based on the known past estimation and present measurement.
• Covariance Update Equation - the measure of uncertainty in our estimation.

Kalman Gain Equation – required for computation of the update equations. The Kalman Gain is a "weighting" parameter for the measurement and the past estimations. It defines the weight of the past estimation and the weight of the measurement in estimating the current state.

So far, we have learned the two prediction equations in matrix notation and several auxiliary equations required for computing the main equations.

## Prediction equations

### State Extrapolation Equation

The general form of the state extrapolation equation in a matrix notation is:

$\boldsymbol{\hat{x}}_{n+1,n} = \boldsymbol{F\hat{x}}_{n,n} + \boldsymbol{Gu}_{n} + \boldsymbol{w}_{n}$
Where:
 $$\boldsymbol{\hat{x}}_{n+1,n}$$ is the predicted system state vector at time step $$n + 1$$ $$\boldsymbol{\hat{x}}_{n,n}$$ is the estimated system state vector at time step $$n$$ $$\boldsymbol{u}_{n}$$ is the control variable or input variable - a measurable (deterministic) input to the system $$\boldsymbol{w}_{n}$$ is the process noise or disturbance - an unmeasurable input that affects the state $$\boldsymbol{F}$$ is the state transition matrix $$\boldsymbol{G}$$ is the control matrix or input transition matrix (mapping control to state variables)

### Covariance Extrapolation Equation

The general form of the Covariance Extrapolation Equation is given by:

$\boldsymbol{P}_{n+1,n} = \boldsymbol{FP}_{n,n}\boldsymbol{F}^{T} + \boldsymbol{Q}$
Where:
 $$\boldsymbol{P}_{n,n}$$ is the uncertainty (covariance) matrix of the current state estimation $$\boldsymbol{P}_{n+1,n}$$ is the uncertainty (covariance) matrix of the next state estimation (prediction) $$\boldsymbol{F}$$ is the state transition matrix that we derived in the "Modeling linear dynamic systems" section $$\boldsymbol{Q}$$ is the process noise matrix

## Auxiliary equations

### Measurement Equation

The generalized measurement equation in a matrix form is given by:

$\boldsymbol{z}_{n} = \boldsymbol{Hx}_{n} + \boldsymbol{v}_{n}$
Where:
 $$\boldsymbol{z}_{n}$$ is the measurement vector $$\boldsymbol{x}_{n}$$ is the true system state (hidden state) $$\boldsymbol{v}_{n}$$ a random noise vector $$\boldsymbol{H}$$ is the observation matrix

### Covariance Equations

The terms $$\boldsymbol{w}$$ and $$\boldsymbol{v}$$, which correspond to the process and measurement noise, do not typically appear directly in the calculations since they are unknown.

Instead, these terms are used to model the uncertainty (or noise) in the equations themselves.

All covariance equations are covariance matrices in the form of:

$E \left( \boldsymbol{ee}^{T} \right)$

i.e., an expectation of a squared error. See the background break page for more details.

#### Measurement uncertainty

The measurement uncertainty is given by:

$\boldsymbol{R}_{n} = E\left( \boldsymbol{v}_{n}\boldsymbol{v}_{n}^{T} \right)$
Where:
 $$\boldsymbol{R}_{n}$$ is the covariance matrix of the measurement $$\boldsymbol{v}_{n}$$ is the measurement error

#### Process noise uncertainty

The process noise uncertainty is given by:

$\boldsymbol{Q_{n}} = E\left( \boldsymbol{w}_{n}\boldsymbol{w}_{n}^{T} \right)$
Where:
 $$\boldsymbol{Q}_{n}$$ is the covariance matrix of the process noise $$\boldsymbol{w}_{n}$$ is the process noise

#### Estimation uncertainty

The estimation uncertainty is given by:

$\boldsymbol{P}_{n,n} = E\left( \boldsymbol{e}_{n}\boldsymbol{e}_{n}^{T} \right) = E\left( \left( \boldsymbol{x}_{n} - \boldsymbol{\hat{x}}_{n,n} \right) \left( \boldsymbol{x}_{n} - \boldsymbol{\hat{x}}_{n,n} \right)^{T} \right)$
Where:
 $$\boldsymbol{P}_{n,n}$$ is the covariance matrix of the estimation error $$\boldsymbol{e}_{n}$$ is the estimation error $$\boldsymbol{x}_{n}$$ is the true system state (hidden state) $$\boldsymbol{\hat{x}}_{n,n}$$ is the estimated system state vector at time step $$n$$