# kalman filter with time-varying noise?

in regular discrete-time (1 dimensional) kalman filter, it is assumed that we have white gaussian noise affecting the transitions and the observations:

$x(t+1) = Ax + w$

$y(t) = Cx(t) + v$

assuming $w$ follows Gaussian(0, $\sigma_1$) and $v$ follows Gaussian(0, $\sigma_2$) distributions.

1. will the standard kalman filter not work or not be optimal if the gaussian noise variables are time varying, meaning $w$ and $v$ become $w(t)$ and $v(t)$ and somehow change with time, becoming systematically bigger or smaller?

2. related: the kalman filter generally has the behavior that its variance is decreasing with time. will that be true even if $w(t)$ and $v(t)$ are are time-varying even if they are assumed not to be? will the kalman filter's variance still get smaller even if the data are sampled from time-varying noise process?

1) It depends on what you call the standard Kalman filter -- I will call the equations in the picture below to be the "standard Kalman filter". You can easily derive an expression for the Kalman filter where the covariance matrices of the noise processes are time varying in terms of the covariances of the noise processes (and cross-covariance of the noise processes).

Moon and Stirling's Mathematical Methods and Algorithms for Signal Processing derives the Kalman filter under $w(t)$ has mean $0$, covariance $E[w(t) w(s)^T] = Q_t \delta_{ts}$, $v(t)$ is also mean zero with covariance $E[v(t) v(s)^T] = R_t \delta_{ts}$ and $E[w(t) v(s)^T] = M_t \delta_{ts}$ (if you assume $M(t) = 0$, the equations simplify considerably).

For the system model $x_{t+1} = A_t x_t + w_t , y_t = C_t x_t + v_t$ [$w_t = w(t), v_t=v(t)$] with $M_t = 0$, the following are the resultant Kalman equations (from Moon & Stirling) to get the predicted state estimate (13.45) and filtered state estimate (13.47): These equations can be shown to be optimal using either a Bayesian approach (MAP with Gaussianity assumptions) or Linear MMSE approach for the given system model.

2) Convergence of the Kalman filter is a bit of an annoying subject. You can read these notes for more details or check the book Stochastic Systems: Estimation, Identification and Adaptive Control by Pravin Variya and P.R. Kumar or one of the other texts on stochastic systems. Essentially, if the systems are controllable and reachable and yada yada, you can get some statements on convergence properties.

• to clarify 2: if some observations in a stretch of time deviate from the model wildly - a sudden nonlinearity - will that be reflected in the variance and/or Kalman gain? it looks to be me like the answer is no, it will not, and these kalman filter algorithm will still have a decreasing variance that takes these observations as seriously – user24823 Feb 18 '15 at 2:33
• If you deviate from the model, very bad things can happen and you don't have optimality or convergence guarantees (since those were derived under the assumptions of the model). If the deviation from the model occurs over a finite time, then you can use the Markov nature of the state space model to show that it doesn't affect the convergence properties you'd get. Note that the Kalman gain $K_t$ and the predicted and filtered error covariances $P_{t+1|t}, P_{t+1|t+1}$ don't depend on the observations, only $A_t, Q_t, R_t, C_t$, so they don't adapt on the observations. – Batman Feb 18 '15 at 2:48
• Thus, the filter can't adapt the Kalman gain or error covariances used in the filter if you have deviations from the model. In principle, the Kalman gain and $P$ matrices can be all computed ahead of time, since everything needed is specified from the state space model. – Batman Feb 18 '15 at 2:49
• so if you have a sequence of observations that deviate wildly from predictions in the middle of a run that otherwise matches the model, the deviance of observations won't be reflected in either gain or covariance estimate - kalman filter will take them as seriously as other observations then? and it will also not be reflected in estimate of uncertainty of the state then? i.e. the "innovation residual" does not affect the kalman gain and does not enter the calculation of variance at each time step right? – user24823 Feb 18 '15 at 2:51
• right. The kalman filter doesn't use anything to update its prediction and filtering methods other than the model. – Batman Feb 18 '15 at 5:16