# Variance of an Implicit Function of Kalman State Vector

Given a state vector given by $x = {[r, v, a]}^{T}$ (Range, Velocity, Acceleration) the Time to Hit is the the time which holds the following: $$r + v {T}_{tth} + \frac{a {T}_{tth}^{2}}{2} = 0$$ Now, given the State Vector covariance $P$ what would the the Time to Hit Covariance?

If the Time to Hit was given by a regular function it would be easy to do given its Jacobian, yet how can it be for this kind of calculation (Implicit Function)?

• Couldn't you just use the quadratic formula to solve for $T_{tth}$ in terms of $r$, $v$, and $a$, then use the Jacobian method that you're already familiar with? – Jason R Jun 11 '14 at 11:28
• @JasonR, how would you handle the plus or minus? Go ahead and write the answer. I will mark it as right. – Royi Jun 11 '14 at 12:09
• I would have to work it out, which I don't have time to do right now, but I think that the variance should be the same for both solutions (plus and minus). – Jason R Jun 11 '14 at 13:36
• @JasonR, I don't think so. Since you calculating the derivative of the solution and it will be completely different for the + / -. – Royi Jun 11 '14 at 18:56
• You could be right. If you know some conditions on the shape of the parabola (i.e. whether $a$ is constrained to have a certain sign), then you might be able to discard one of the solutions. Based on the physical interpretation of the problem, there should be a unique solution for $t \ge 0$. But, it looks like you may have a real answer below anyway. – Jason R Jun 11 '14 at 19:15

I think I have the solution.
I'd be happy to hear others' thought.

Defining $F \left(r, v, a, {T}_{tth} \right) = r + v {T}_{tth} + \frac{a {{T}_{tth}}^{2}}{2}$ which is the implicit function which connects all variables. Since we're dealing with non linear function the variance is given by:

$$var \left( {T}_{tth} \right) = J P {J}^{T}$$

Where $P$ is the state vector covariance at a given time and $J = \left[ \frac{\partial {T}_{tth} }{\partial r} \frac{\partial {T}_{tth} }{\partial v} \frac{\partial {T}_{tth} }{\partial a} \right]$

Using Total Derivative Law on the Implicit Function: $$\frac{\partial {T}_{tth} }{\partial r} = -\frac{{F}_{r}}{{F}_{{T}_{tth}}}, \frac{\partial {T}_{tth} }{\partial v} = -\frac{{F}_{v}}{{F}_{{T}_{tth}}}, \frac{\partial {T}_{tth} }{\partial a} = -\frac{{F}_{a}}{{F}_{{T}_{tth}}}$$

Where ${F}_{x}$ is the partial derivative of $F$ with respect to $x$.

Each individual component would be:

$$\frac{\partial {T}_{tth} }{\partial r}=-\frac{1}{v+aT_{tth}}, \frac{\partial {T}_{tth} }{\partial v}=-\frac{T_{tth}}{v+aT_{tth}}, \frac{\partial {T}_{tth} }{\partial a}=-\frac{T^2_{tth}}{2\left(v+aT_{tth}\right)}$$

Transform the state covariance matrix with $J P {J}^{T}$ and you'd have the right solution.

Given a diagonal state covariance matrix, we should have:

$$P_{tth}=\frac{\sigma^2_r}{\left(v+aT_{tth}\right)^2}+\frac{T^2_{tth}\sigma^2_v}{\left(v+aT_{tth}\right)^2}+\frac{T^4_{tth}\sigma^2_a}{4\left(v+aT_{tth}\right)^2}$$

• I don't know much about the topic, but your math looks correct. – Phonon Jun 12 '14 at 18:37