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?