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 &amp;=&amp; \mathbf{f}(\mathbf{x}_{k-1}, \mathbf{u}_k) + \mathbf{w}_k\\
\mathbf{z}_k &amp;=&amp; \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?
I will tell you something, even if it is differntiable, use Unscented Kalman Filter for any non linear case.

This flavor of Kalman Filter, based on the Unscented Transform, is almost always superior to the Extended Kalman due to its properties.
The main reason is it is able to better predict the mean and variance (Which all Kalman Filter needs) of the distribution after the non linear function applied.

In most cases it is even simpler to calculate hence more computationally efficient.
Think of it as Poor's man Particle Filter (Though the sampling points are deterministic).