I am following a probably well-known tutorial about Kalman filter.
From these lines of code:
figure;
plot(t,pos, t,posmeas, t,poshat);
grid;
xlabel('Time (sec)');
ylabel('Position (feet)');
title('Figure 1 - Vehicle Position (True, Measured, and Estimated)')
I understand that x is the true position, y is measured position, xhat is estimated position. Then, if we can compute x (this code: x = a * x + b * u + ProcessNoise;), why do we need to estimated x anymore?
…
OK, after a second look at the referenced article, I think I see the confusion. Apparently, the program in the article is a simulation of a linear system (and thus, it repeatedly generates new x‘s as new states in the simulated system). Then it also simulates a “noisy” measurement of x, and from that (simulated) noisy measurement, then demonstrates using a Kalman Filter on the noisy data to try to estimate the actual (simulated) x‘s.
So, the exact x calculations that you ask about are just part of the Simulation, and not part of the Kalman Filter itself or the data that is available to the Kalman Filter algorithm.