1
$\begingroup$

gain

estimated

Hi everybody. I'm very new in Kalman filter. Today I try to design Kalman filter to get estimated postion, velocity and acceleration from measurement position (by linear encoder). I don't use optimal input $u_k$ and my Kalman equations are:

$\displaystyle \quad\ \hat x_k^- = A\hat x_{k-1} $

$\displaystyle \quad\ P_k^- = AP_{k-1}A^T+Q $

$\displaystyle \quad\ K_k = P_k^-H^T(HP_k^-H^T+R)^{-1} $

$\displaystyle \quad\ \hat x_k = \hat x_k^- + K_k(z_k-H\hat x_k^-) $

$\displaystyle \quad\ P_k = (I-K_kH)P_k^- $

$A= \left[ \begin{array}{ccc} 1 & T_s & 0.5T_s^2 \\ 0 & 1 & T_s\\ 0 & 0 & 1\\ \end{array} \right]$, $Q= \left[ \begin{array}{ccc} 5.08*10^{-8} & 0 & 0\\ 0 & 0.00033 & 0\\ 0 & 0 & 0.48796\\ \end{array} \right]$

$R=Q_{11}=5.08*10^{-8}$

$T_s$ is sampling time. The results of estimated value and Kalman gain were showed in top. The estimated position, velocity and accleleration seem correctly. But about Kalman gain, why it still constant when position, velocity and acceleration change ($t = 1.8\rightarrow 2.3s $)?

Maybe I have mistake when assume acceleration $a_k = a_{k-1}$ (look at matrix $A$) because it change by time? I hear that extended Kalman filter can solve this problem. Can someone give me some advice for my system?

$\endgroup$

2 Answers 2

2
$\begingroup$

Have a look at how the gain is calculated:

$\displaystyle \quad\ P_k^- = AP_{k-1}A^T+Q $

$\displaystyle \quad\ K_k = P_k^-H^T(HP_k^-H^T+R)^{-1} $

There is zero dependence on the state estimate, the input nor the output of the Kalman filter. This is one reason that sometimes Kalman filter implementations just ignore $k \le \infty$ and just use $P_\infty$ and $K_\infty$ from the start: they can be pre-calculated (known) before running the filter at all.

The only thing that needs to happen is that $P_k$ and $K_k$ converge as $k \rightarrow \infty$.

Note: this assumes that $A$, $H$, $Q$, and $R$ are constant (not time-varying).


The $A$ matrix you're using is the standard one for one dimensional state of position, velocity and acceleration. Why do you think it should change with time? Unless you sampling rate is variable, or something else is changing, the system looks correct.

You say The estimated position, velocity and accleleration seem correctly. : that sounds like everything is working as it should. What is wrong (or disturbing you) that you're asking the question?


See this reference for the following paragraph: enter image description here

$\endgroup$
2
  • $\begingroup$ thanks for your answer. What do you think about matrix $A$? Should I change it to appropriate for my system? Or any suggest about this? $\endgroup$
    – Kho
    Commented Oct 7, 2013 at 5:39
  • $\begingroup$ Just think that Kalman gain should change when position, velocity, acceleration change (for example $t = 1.8\rightarrow 2.3s $). Sorry if my thinking is wrong. $\endgroup$
    – Kho
    Commented Oct 7, 2013 at 21:25
1
$\begingroup$

Kalman gain actually defines the amount of correction applied by Kalman filter to the incoming measurements to make them less noisy. As the number of iterations of Kalman filter increases, Kalman gain increases (which actually means the correction applied to noisy measurements increases)and consequently error covariance starts decreasing. i suppose you want to know why kalman gain become constant. Actually after a finite number of iteration the error covariance of the system decreases to a very low value and become constant. At that time Kalman gain reaches the maximum amount of correction it can provide to the incoming noisy inputs. Your above Kalman gain settles to a constant value in a very less time. This actually happen when you take process noise covariance very low and error covariance very high.In your above model value of value for diagonal elements of Q are very low which means that kalman filter assumes that your system is quite accurate(as process noise added by it into system is less due to less Q) hence it doesnot have to provide much correction and quickly settles down to a low error covariance value and a constant kalman gain value. one more thing is that all of your systems states vary with time and represents a non-linear system and you must use an extended kalman filter of unscented kalman filter

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.