If I have a state space model.
$$x(k + 1) = Ax(k) + Bu(k)$$
$$y(k) = Cx(k) + Du(k)$$
And a kalman gain matrix $K$. Then, how do I know if the kalman gain matrix $K$ is properly designed for my state space model?
I know that I can use my kalman gain matrix $K$ as an observer.
$$\hat x(k + 1) = A\hat x(k) + Bu(k) + Ke(k)$$
$$\hat y(k) = C\hat x(k) + Du(k)$$
Where $e(k) = y(k) – \hat y(k)$ is a gaussian white noise with zero mean.
Question:
Assuming that I have the model of the system and I know the noise $e(k)$ and the input $u(k)$. Can I just simulate a regular state space model like this
$$\hat x(k + 1) = A\hat x(k) + \begin{bmatrix}
B & K
\end{bmatrix}\begin{bmatrix}
u(k) \\
e(k)
\end{bmatrix}$$
$$\hat y(k) = C\hat x(k) + Du(k)$$
And then measure how "clean" $\hat y(k)$ compared to $y(k)$?
Or is there any theoretical proof I can to to verify if the $K$ matrix is OK?
Update:
My question is about checking if the generated kalman gain matrix $K$ is "OK". What I mean by that, is that I want to check its accuracy. But I don't know how to specify the accuracy. I want the best filtering as possible, but I cannot specify the best filtering due to lack of something to refere to.
If I would describe my kalman filter with words, then a good estimation results looks like this. Here we have a very noisy sensor and the estimation is going to follow the original coordinate. The sum of all square errors is going to be as small as possible
$$J_{\text{min}} = \sum(\hat y – y_{\text{original coordinate}})^2 $$
Question remains: How can I test this condition if I have
- The model
- Kalman filter gain matrix $K$
- Noise vector $e$
- Trajectory $y$
- Noisy trajectory $y_n$
- Input signal $u$
Best Answer
I kindly think that you're not asking the right question. The Kalman gain matrix $K$ is a multiplication of three matrices, so if you multiply them correctly (which is trivial) it's correct by definition: $$ K_k = \hat{P}_k H_k S_k^{-1}, $$ where
Now, what you want to know is if these three elements are correct. I recommend carefully reading the wiki KF page, which is very helpful imo.
In short: