File Exchange

image thumbnail

Kalman Filter and Linear Dynamic System

version 1.0.0.1 (6.1 KB) by Mo Chen
Kalman Filter and Linear Dynamic System for time series modeling

36 Downloads

Updated 30 Nov 2018

View License

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).

Cite As

Mo Chen (2019). Kalman Filter and Linear Dynamic System (https://www.mathworks.com/matlabcentral/fileexchange/55867-kalman-filter-and-linear-dynamic-system), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (5)

Xinke Shen

@Mo Chen, thanks for your kind reply!

Mo Chen

@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 ..

Xinke Shen

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!

Guo Bo

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).

Updates

1.0.0.1

Fix EM algorithm and add subspace method for learning LDS

MATLAB Release Compatibility
Created with R2018b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Acknowledgements

Inspired by: Pattern Recognition and Machine Learning Toolbox