[Math] How to derive the process noise co-variance matrix Q in this Kalman Filter example

bayesian networkkalman filtersignal processing

How to understand the process co-variance matrix Q in the example below ( I extracted it from Wikipedia http://en.wikipedia.org/wiki/Kalman_filter )

Consider a truck on perfectly frictionless, infinitely long straight rails. Initially the truck is stationary at position 0, but it is buffeted this way and that by random acceleration. We measure the position of the truck every Δt seconds, but these measurements are imprecise; we want to maintain a model of where the truck is and what its velocity is. We show here how we derive the model from which we create our Kalman filter.
Since F, H, R and Q are constant, their time indices are dropped.

The position and velocity of the truck are described by the linear state space

$\textbf{x}_{k} = \begin{bmatrix} x \\ \dot{x} \end{bmatrix}$

where $\dot{x}$ is the velocity, that is, the derivative of position with respect to time.

We assume that between the $(k−1)$ and $k$ timestep the truck undergoes a constant acceleration of $a_k$ that is normally distributed, with mean $0$ and standard deviation $\sigma_a$. From Newton's laws of motion we conclude that

$\textbf{x}_{k} = \textbf{F} \textbf{x}_{k-1} + \textbf{G}a_{k}$

(note that there is no $\textbf{B}u$ term since we have no known control inputs)
where

$\textbf{F} = \begin{bmatrix} 1 & \Delta t \\ 0 & 1 \end{bmatrix}$

and

$\textbf{G} = \begin{bmatrix} \frac{\Delta t^{2}}{2} \\ \Delta t \end{bmatrix}$

so that

$\textbf{x}_{k} = \textbf{F} \textbf{x}_{k-1} + \textbf{w}_{k}$

where $\textbf{w}_{k} \sim N(0, \textbf{Q})$ and

$\textbf{Q}=\textbf{G}\textbf{G}^{\text{T}}\sigma_a^2 =\begin{bmatrix} \frac{\Delta t^4}{4} & \frac{\Delta t^3}{2} \\ \frac{\Delta t^3}{2} & \Delta t^2 \end{bmatrix}\sigma_a^2.$

[…]

I am not sure how the process noise co-variance matrix $\textbf{Q}=\textbf{G}\textbf{G}^{\text{T}}\sigma_a^2 =\begin{bmatrix} \frac{\Delta t^4}{4} & \frac{\Delta t^3}{2} \\ \frac{\Delta t^3}{2} & \Delta t^2 \end{bmatrix}\sigma_a^2$ is derived here, could someone shed light on this, please?

Best Answer

We know the process noise is $w_k = Ga_k$, where $a_k \sim N(0,\sigma_a^2)$. To find the covariance matrix of the noise, we take $$ Var(w_k) = \mathbb{E}[w_k w_k^T] - \mathbb{E}[w_k]\mathbb{E}[w_k]^T \\ = \mathbb{E}[w_k w_k^T] \\ = \mathbb{E}[Ga_k a_k^T G^T] \\ = G \, \mathbb{E}[a_k a_k^T] G^T \\ = G \sigma_a^2 G^T \\ = GG^T \sigma_a^2, $$ which is the expression you've got for $Q$.