File Exchange

## Kalman Filter and Linear Dynamic System

version 1.0.0.1 (6.1 KB) by Mo Chen

### Mo Chen (view profile)

Kalman Filter and Linear Dynamic System for time series modeling

Updated 30 Nov 2018

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 (2020). Kalman Filter and Linear Dynamic System (https://www.mathworks.com/matlabcentral/fileexchange/55867-kalman-filter-and-linear-dynamic-system), MATLAB Central File Exchange. Retrieved .

payam sh

Xinke Shen

Mo Chen

### Mo Chen (view profile)

@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

### Xinke Shen (view profile)

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

### Guo Bo (view profile)

Alexander Poremba

### Alexander Poremba (view profile)

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