This package contains Kalman filter, Kalman smoother and EM algorithm for fitting parameters of Linear Dynamic System.
This package is now a part of the PRML toolbox (http://www.mathworks.com/matlabcentral/fileexchange/55826-pattern-recognition-and-machine-learning-toolbox).
Mo Chen (2021). Kalman Filter and Linear Dynamic System (https://www.mathworks.com/matlabcentral/fileexchange/55867-kalman-filter-and-linear-dynamic-system), MATLAB Central File Exchange. Retrieved .
@Mo Chen, thanks for your kind reply!
@Xinke Shen, you are absolutely right. This package implements the textbook Kalman filter algorithm. The numerical unstable problem is the nature of the algorithm. Your way of improving is OK.
In principal, to overcome the numerical problem algorithmicly, you could use the so called squared root filter instead of standard Kalman filter. However, this package is intend to facility studying Kalman filter. So ..
The code is well written. But it seems to be numerical unstable. I usually got an error sayting that "sigma is not PD" in KalmanSmoother. So I added a 1e-6 to the diagonal line of "R", then the problem rarely comes out. I wonder if it is reasonable to do so? Thanks!
There appears to be a typing error due to the previous Bishop 2006 edition. If you check the addendum which can be found online (or simply the 2007 edition), you'll notice that equation 13.106 should read:
E[zn zn-1] = V_n * transpose(J_n-1) + mu_n * transpose(mu_n).
Inspired by: Pattern Recognition and Machine Learning Toolbox
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!