For the ship position/velocity example, even though it seems like the filter successfully tracks the state, I saw that the covariances (P) are actualy growing. I am not sure why this would happen. I have tried modifying the model and measurement errors (Q and R), but still the covariances keep growing. What confuses me is that the error covariance for the position estimate starts actually decreasing, and then after several simulation steps, it starts to increase to much higher values.
Covariances seem to successfully decrease for the 4-state example, indicating more confidence on the estimates.
I tested this buy placing a Scope in the Simulink model to monitor the covariances.
Excellent resource for those of us who are new to Kalman filtering. Thank you! What if the state of my system is given by a vector rather than a scalar? Can Kalman filtering work in n dimensions? If I want to train the filter on one set of data and then apply it to another, how would I do that? What if my observations are a sum of two or more signals, plus noise? How do I "tell" the Kalman filter which of the signals I want it to estimate?
Very nice implementation. But there is a minor mistake in the Kalman filter block. In propagation equation, 1/Z must be placed in somewhere else. We have P(k+1) = A.P(k).A' + Q. after this part we have to put 1/z to get P(k).
In other words, how to draw their values, provided they are stored in my data.mat?
Will the "plot" are the same and I have to use a loop "for"?
Ask directly about the code sample, it's here I deal with a couple of hours.