How to handle a logarithmic term in Kalman filter? I am trying to implement a Kalman filter for an echo pulse detection application as similar to this paper. (an open source version is here (pg 16))
The measurement variable is $h(x,t)=A_0 (\dfrac{t-\tau}{T})^\alpha  \cdot \text{exp}{(\dfrac{t-\tau}{T})}$ and the state vector is $x=[A_0 \; \text{ } \alpha \; \text{ } T \text{ } \; \tau \text{ }]^T$.
In order to compute the measurement sensitivity matrix $H_k=\frac{\partial h}{\partial x}\Bigr|_{\substack{x=\hat{x}_{k^-}}}$, we need to compute the partial derivative with respect to $\alpha$. I obtain it as $\frac{\partial h}{\partial \alpha}=h \cdot log(\dfrac{t-\tau}{T})$.

$\tau$ would correspond to the start of the envelope of the pulse so it will be greater than first couple of time steps practically speaking. When I iterate the Kalman filter initialized with a real $\tau$ for example, then this partial derivative term becomes undefined for the start values of iterations because at $t=0, 1  \; time step, 2 \; time step \cdots$etc and so on are smaller than $\tau$ and the logarithm is undefined for negative values.
First of all, you're trying to evaluate the derivative of an exponential. If the base of the exponential is positive, the derivative exists. However, if the base is negative, the derivative does not exist. It would be pointless to use a Kalman filter when you have an exponential with a negative base.
Secondly, your model of the echo envelope is
$$ 
A(t) = A_0(\frac{t-\tau}{T})^{\alpha}e(\frac{t-\tau}{T}) 
$$
However, since it is an echo, it does not make sense for the echo envelope to be something else than 0 for $t &lt; \tau$ where $\tau$ is the time of flight
You could add a unit step to the equation to make sure that A(t) = 0 for t &lt; $\tau$
$$ 
A(t) = A_0(\frac{t-\tau}{T})^{\alpha} e(\frac{t-\tau}{T})  u(t-\tau)
$$