# When should I use a kalman filter, if the observability function is known?

Assume that we have a nonlinear dynamical model, e.g called transition function

$$\hat x = f(x, u)$$

And $$y = x$$ as our observability function.

According to Mathworks

Kalman filters are used to optimally estimate the variables of interests when they can't be measured directly, but an indirect measurement is available. They are also used to find the best estimate of states by combining measurements from various sensors in the presence of noise.

In this case, practical case, the observability function is often an identity matrix because states are assumed as they were close as measurements.

So my question is:

If Mathworks says that Kalman filters are used when the user need to measure the states, when the output is only known. Then what if the states is the outputs. I'm most cases, the states are the output. Especially in system identification.

So what's is the use case for kalman filter then?

• @MrYui a Kalman filter would be an online state estimation optimization problem solver. While system identification is normally done offline and would in your case only try to find a mapping from $y_i$ to $y_{i+1}$ for many $i$ at the same time. The effect of the measurement noise should for certain model types average to zero and thus can be omitted. If this isn't the case then instead one could also try to find a mapping between $y_i-e_i$ to $y_{i+1}-e_{i+1}$ and also try to minimize the correlation between $e_i$ and $e_{i+1}$. Commented Dec 20, 2021 at 23:51
• @MrYui system identification should also identify $y=h(x)$. At least I assume that you apply system identification to a set input ($u$) and output ($y$) data? Note that the model is not unique, since one can always find an equivalent model by defining the state differently (also see similarity transformations for linear systems). Commented Dec 21, 2021 at 23:34