# Alternative to Extended Kalman Filter when prediction function is not differentiable

I am looking at a tracking problem. It can be modelled similarly to the Extended Kalman Filter:

$$\begin{array}{rcl} \mathbf{x}_k &=& \mathbf{f}(\mathbf{x}_{k-1}, \mathbf{u}_k) + \mathbf{w}_k\\ \mathbf{z}_k &=& \mathbf{h}(\mathbf{x}_k) + \mathbf{v}_k \end{array}$$

Here $\mathbf{x}$ is what I want to track, $\mathbf{u}$ are the controls, $\mathbf{z}$ are measurements and $\mathbf{w}$ and $\mathbf{v}$ are noise. The function h is the identity in my case. My problem is that the nonlinear function $\mathbf{f}(\mathbf{x},\mathbf{u})$ is not given in closed form (it's not something simple like $\sin(\mathbf{x}^T \mathbf{u}))$. I can only write a function in Java (or another programming language) which evaluates $\mathbf{f}(\mathbf{x},\mathbf{u})$ with an algorithm. Hence, I can't use the Extended Kalman Filter, because I can't build a derivative of $\mathbf{f}(\mathbf{x},\mathbf{u})$.

The only alternative that came to my mind is to use a particle filter, where it should not be a problem that $\mathbf{f}()$ is computed by an algorithm. However, it will probably be too computationally expensive, because $\mathbf{f}$ is computationally expensive and I would need to call it for each particle.

Does anybody have an idea for an alternative filter?

• Look at the UKF – Stanley Pawlukiewicz Mar 5 '18 at 20:44
• Welcome to SE.DSP! I've changed your equations over to using MathJax -- the LaTeX-compatible math formatting system that we use. I hope I got it all right. Feel free to update if I didn't. – Peter K. Mar 5 '18 at 21:07
• @StanleyPawlukiewicz: Thanks, that looks promising! I will try it out using pykalman. – thomasfermi Mar 6 '18 at 8:40
• @PeterK. Thanks, I will use MathJax next time! – thomasfermi Mar 6 '18 at 8:41