dstl / Stone-Soup

A software project to provide the target tracking community with a framework for the development and testing of tracking algorithms.
https://stonesoup.rtfd.io
MIT License
384 stars 126 forks source link

_noise_diff_coeff_ clarification #1027

Closed quantum-brutus closed 1 month ago

quantum-brutus commented 1 month ago

Hi,

I am having trouble understanding the argument that takes the ConstantVelocity class, that is to say _noise_diffcoeff

Here : https://stonesoup.readthedocs.io/en/v0.1b3/_modules/stonesoup/models/transition/linear.html#ConstantVelocity , it says that the process noise on the acceleration is modeled by a normal distribution with zero mean and a covariance matrix Q in the 1-D case. I do agree on that.

However, I have trouble understanding said matrix definition, and what q really means.

I doesn't seem to be the variance on the acceleration, because if so, the definition of the matrix Q is missing some Δt.

In the first tutorial, the input parameter to :class:~.ConstantVelocity, is defined the magnitude of the noise per Δt-sized timestep.

Could this mean that q is σa*2 Δt ? That is to say the assumed variance of the acceleration times the time interval ?

In that case I don't understand the name 'noise diffusion' coefficient for q as it does not have the dimension of a diffusion coefficient ( L^2/T^3 instead of L^2/T )

Either way, I think there is a problem in the definition of the Q matrix in the docs as the coefficient q[0][0] of the matrix is Δt^3/3 instead of Δt^3/4.

\begin{split}Q_t & = & \begin{bmatrix} \frac{dt^3}{3} & \frac{dt^2}{2} \\ \frac{dt^2}{2} & dt \end{bmatrix} q\end{split}

Could you help me on that ?

Thanks

sdhiscocks commented 1 month ago

@quantum-brutus Thanks for the question. Some others can hopefully give you a better answer, but I know I've found Sequentially Structured Bayesian Solutions by Simon Maskell very useful. Section 3 covers discretisation of models including constant velocity.

quantum-brutus commented 1 month ago

Thank you @sdhiscocks. I should have looked at it first. Helped me a lot to grasp the model assumptions.

What confused me was that every other constant velocity model I found on the internet (like this one : https://arxiv.org/pdf/2005.00844v4) implemented the derivation using the Jerk model, instead of Itô's or Laplace's one (which are more precise according to Maskell). This leads to different coefficient on the covariance matrix.

In StoneSoup model, the variance on the velocity is computed, instead on the typical variance on the acceleration of the Jerk model

As I had thought, the process noise coefficient q can be thought as σa^2 * Δt where σa^2 is the variance on the acceleration. And its units are in (m/s)^2/s i.e. the variance of the velocity divided by one timestep.

As for the "diffusion" name coined to the coefficient q, this comes from the Brownian motion-like equation of diffusion that appears in the thesis of Maskell.

Will now continue to enjoy this amazing framework, thanks a lot @sdhiscocks 👍