Search code examples
pythonmathsimulationkalman-filter

State Estimation of Steady Kalman Filter


I am working with discrete Kalman Filter on a system.

x(k+1)=A_k x(k)+B_k u(k)

y(k)=C_k x(k)

I have estimated the state from the available noised y(k), which one is generated from the same system state equations with Reference Trajectory of the state. Then I have tested it with wrong initial state x0 and a big initial co-variance (simulation 1). I have noticed that the KF works very well, after a few steps the gain k quickly converges to a very small value near zero. I think it is may be caused by the process noise Q. I have set it small because the Q stands for the accuracy of the model.

Now I want to modify it to a steady state Kalman Filter. I used the steady gain from simulation-1 as constant instead of the calculation in every iteration. And then, the five equations can be simplified to one equation:

x(k+1)^=(I-KC)A x(k)^+(I-KC)B u(k)+K y(k+1)

I want to test it with same initial state and co-variance matrix as the one in simulation-1. But the result is very different from reference trajectory and even the result of simulation-1. I have tested it with the co-variance matrix p_infi, which is solved from the Discrete Riccati Equation:

k_infi=p_infiC'/(Cp_infi*C'+R)

This neither works.

I am wondering-

  1. How should I apply steady state KF and how should I set the initial state for it?
  2. Is steady state KF used for scalar system?
  3. Should I use it with LQ-controller or some others?

Solution

  • Let me first simplify the discussion to a filter with a fixed transition matrix, A rather then A_k above. When the Kalman filter reaches steady-state in this case, one can extract the gains and make a fixed-gain filter that utilizes the steady-state Kalman gains. That filter is not a Kalman filter, it is a fixed-gain filter. It's start-up performance will generally be worse than the Kalman filter. That is the price one pays for replacing the Kalman gain computation with fixed gains.

    A fixed-gain filter has no covariance (P) and no Q or R.

    Given A, C and Q, the steady-state gains can be computed directly. Using the discrete Kalman filter model, and setting the a-posteriori covarance matrix equal to the propagated a-posteriori covariance matrix from the prior measurement cycle one has:

    P = (I - KC) (A P A^T + Q)

    Solving that equation for K results in the steady-state Kalman gains for fixed A, Q and C.

    Where is R? Well it has no role in the steady-state gain computation because the measurement noise has been averaged down in steady-state. Steady-state means the state estimate is as good as it can get with the amount of process noise (Q) we have.

    If A is time-varying, much of this discussion does not hold. There is no assurance that a Kalman filter will reach steady-state. There may be no Pinf.

    Another implicit assumption in using the steady-state gains from a Kalman filter in a fixed gain filter is that all of the measurements will remain available at the same rates. The Kalman filter is robust to measurement loss, the fixed-gain filter is not.