# How to treat noise (in the acceleration) in a Kalman filter when tracking position?

I have an equation of motion for which I am wanting to track the position.

The equation looks like this:

$$\ddot{x}(t) = -a\dot{x}(t) - bx(t) + F(t)$$

where $F(t)$ is an external Stochastic force noise (like brownian motion).

I know if $F = 0$ I can build a Kalman filter like so:

$$\begin{bmatrix} \dot{x} \\ \ddot{x} \\ \end{bmatrix} = \begin{bmatrix} 0 & 1 \\ -b & -a \\ \end{bmatrix} . \begin{bmatrix} x \\ \dot{x} \\ \end{bmatrix}$$

And then transform $\begin{bmatrix} 0 & 1 \\ -b & -a \\ \end{bmatrix}$ like so:

\begin{align} A(t) & = \mathscr{L}^{-1}\left\{\left(s\vec{I} - \begin{bmatrix} 0 & 1 \\ -b & -a \\ \end{bmatrix}\right)^{-1}\right\}\\ & = \mathscr{L}^{-1}\left\{\left(\begin{bmatrix} s & 0 \\ 0 & s \\ \end{bmatrix} - \begin{bmatrix} 0 & 1 \\ -b & -a \\ \end{bmatrix}\right)^{-1}\right\}\\ &= \mathscr{L}^{-1}\left\{\left(\begin{bmatrix} s & -1 \\ b & s+a \\ \end{bmatrix}\right)^{-1}\right\} \end{align}

... (at this point I get stuck as I am using Sympy in python to calculate the inverse Laplace transform and it fails for this matrix).

But I want to know how I should treat this Stochastic effect in a Kalman filter.

• Since $F(t)$ is not a deterministic input but a random driving force, I would first try to use a process noise matrix in the computation of the Kalman gains during the Riccati iterations.... Have you tried it? Jan 26, 2017 at 22:12
• No, I haven't, I'm only just beginning to work on Kalman filters. I'll have a look into how to implement your suggestion, thanks for your input. Jan 26, 2017 at 22:20
• I suggest you the following book for nice introduction to Kalman filtering: Fundamentals of Kalman Filtering_Practical Approach_ZARCHAN the link: amazon.com/… Jan 26, 2017 at 22:26

## 1 Answer

Uh, this is the whole point of a Kálmán filter. It has a stochastic measurement model (noisy measurements) and a stochastic process state update model and uses the measurements for estimating the current state of the stochastic process.

If the process were deterministic, you would approach perfect information over time.

So you just plug the variation of your acceleration into the covariance matrix for the state update.

The exact way to do that depends on the conventions your course material employs (lots to choose from).