Skip to content

Preliminaries of KF – Optimal Gain to minimize estimation error covariance


In the last post, we present an observer for a noisy system. We already know the estimator should be unbiased and minimum-variance. In this post, we shall show a how to choose the gain K to achieve minimum variance. I think my derivation is quite clear and this is a quite good memo. Note the optimal gain K^* and corresponding estimator presented here is still not Kalman Filter. We shall present the derivation of KF in the future.

Noisy system:




State estimation error:


Question:  how to find K_i to make P_{i+1}=E(\tilde{x}_{i+1}\tilde{x}_{i+1}^T) minimum? Note the gain K_i is varying with i.

AnswerI present the solution first and then give the derivation. The optimal gain is


Note: P_i is the covariance matrix of the state estimation error; R_{e,i} is the covariance matrix of the output estimation error!!! R_{e,i}=E(e_ie_i^T) where e_i=y_i-C\hat{x}_i=C\tilde{x}_i+v_i. It is easy to prove R_{e,i}=R+CP_iC^T.


Proof: The idea is easy, but notations may be complex.

1. \tilde{x}_{i+1}=(A-KC)\tilde{x}_{i}+Bw_i-Kv_i.

2. Becasue x_i, w_i, v_i are uncorrlated, i.e.,

E(\tilde{x}_{i}w_i)=0, E(\tilde{x}_{i}v_i)=0, E(v_iw_i)=0

and E(\tilde{x}_{i}\tilde{x}_{i})=P_i, E(w_iw_i^T)=Q, E(v_iv_i^T)=R. Therefore, we have


so that


3. Completion of squares:






where T=AP_iC^T(R+CP_iC^T)^{-1}.  Hence we have


4. Therefore, we claim K^*=AP_iC^T(R+CP_iC^T)^{-1} and the optimal P_{i+1} is


PS: Note the above equation is also applicable to time variant systems. That is if we change A,B,C,Q,R to A_i,B_i,C_i,Q_i,R_i, the results are the same.

No comments yet

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s