0

I have a question about Kalman filter. I am using Kalman filter for a state space model as following:

X(k+1) = A(k)x(k)+B(k)u(k)+w(k), w(k) ∼ N(0,Q)
Y(k) = C(K)x(k)+D(k)u(k)+v(k), v(k) ∼ N(0,R)

Which the state space matrixes (A(k),B(k),C(k),D(k)) are updated in each sampling time but Q and R matrixes are considered to be constant. The equations which calculate the Kalman gain (K(k)) and covariance P matrix (P(k)) are as following:

K(k) = (P(k)*C(k)' )/(R + C(k)*P(k)*C(k)');
Pxx(k) = (eye(n)-K(k)*C(k))*P(k)*(eye(n)-K(k)*C (k))'+K(k)*R*K(k)';%Joseph form
P(k) = A(k)*Pxx(k)*A(k)' + Q; 

The problem that I face is related to stability of (A(k)-K(k)*C(k)). In some sampling times, the calculated Kalman gain can not stabilize the (A(k)-K(k)*C(k)) matrix and the eigenvalues of (A(k)-K(k)*C(k)) are outside of unit circle.

Could you please help me to figure out the reason for this problem? I am expecting that the Kalman filter gives me the gain which make the (A(k)-K(k)*C(k)) matrix stable with eigenvalues inside the unit circle.

Sardar Usama
  • 19,536
  • 9
  • 36
  • 58

1 Answers1

1

This can happen when the system is unobservable. Check the rank of the observability matrix

O = [C(k)
     C(k)A(k)
     C(k)A(k)^2
     ...
     C(k)A(k)^(n-1)]

where n is the dimension of the state space (i.e., A(k) is n X n matrix). If the row rank of O is less than n, then you have the problem.

In matlab, O = obsv(A,C) will compute the observability matrix and rank(O) will give its rank.

Hope this helps.

aichao
  • 7,375
  • 3
  • 16
  • 18
  • 1
    This could also happen if the system is uncontrollable. Observability and controllability are the two criteria for an asymptotically stable Kalman gain. – SavedByJESUS Jun 01 '20 at 08:45