Thanks Michel .
- Though Harvey (1989) and some other authors assumes convergence
when the whole P matrix converges (and the whole P convergence was checked in the initial C++ Kalmn Filte implementations) I wander if we should implement the above gain matrix convergence as a sufficient criteria in the new C++ KalmnFilter instead.
If so, I can make checks work for t>0 only.
K is a smaller matrix than P, so testing the difference between K and Kold is faster than between P and Pold. The metric of the two tests is also different probably, that a tighter criterium should be used on K than on P, but otherwise the two tests should be equivalent. Stephane has an idea on how to calibrate the tolerance criterium, but he will not turn to it for a while. For the time being, implement the test on K rather than on P.
The implemented algorithm compares only the upper triangles of the symmetric n*n P matrices so that comparing n*n_obs gain matrices (K in kalman_fileter.m) is faster when number of observables n_obs < (n+1)/2 which is still in majority of cases so I will change KF to compare Ks instead.
Best regards George