I am learning about Kalman filters, and implementing the examples from the paper Kalman Filter Applications - Cornell University.
I have implemented example 2, which models a simple water tank, filling at a constant rate. We only measure the tank level, and the Kalman filter is supposed to infer the fill rate.
According to the model, the fill rate is a constant, so I assumed that over time, the Kalman filter would converge more and more accurately (and with less and less noise) on the correct fill rate. However, the amount of noise in the fill rate never seems to reduce after the first few iterations:
This graph shows how the fill rate part of the state vector changes over the course of 1000 iterations of the simulation.
Adjusting the Measurement Variance Matrix seems to have very little effect on the fill rate noise.
Also, the Kalman gain vector and State Variance matrix seem to be constant throughout the simulation. I assumed that the State Variance would reduce as the filter became more and more confident in its state estimate.
Questions: - Is this graph what I should expect to see? - Should the Kalman Gain vector and State Variance matrix change over time in this situation?