## Kalman Filter – Detail Explanation,

Real Time System Notes | Sixth Semester,

BSc.CSIT | Tribhuvan University (TU)

**Kalman Filter**

Kalman filter is a commonly used means to improve the accuracy of measurements and to estimate model parameters in the presence of noise and uncertainty. Consider a simple monitor system that takes a measured value y_{k} every sampling period ‘k’ in order to estimate the value x_{k} of a state variable. Suppose starting from time 0, the value of this state variable is equal to a constant x. Because of noise, the measured value y_{k} is equal to where is a random variable whose average value is 0 and standard deviation is . The Kalman filter starts with the initial estimate and computes a new estimate each sampling period. Specifically, for k>1, the filter computes the estimate as follows:

—————(i)

where ———————–(ii)

Here, K_{k }= Kalman gain and P_{k} = variance of the estimation error

and ——————(iii)

This value of kalman gain gives the best compromise between the rate at which P_{k} decreases with k and the steady-state variance i.e; P_{k} for large k.

In a multivariate system, the state variable x_{k} is an n-dimensional vector where ‘n’ is the no. of variables whose values define the state of the plant. The measured value y_{k} is an vector, if during each sampling period, the readings of sensors are taken. Let A denote measurement matrix; which is matrix that relates measured variables to the n state variables. In other words,

y_{k }= Ax_{k} + e_{k}

where e_{k} = additive noise in each of the measured values

Equation (i) becomes an n-dimensional vector equation

Similarly kalman gain K_{k} and variance P_{k} are given by matrix version of equation (ii) and (iii). So the computation involves a few matrix multiplication and addition and one matrix inversion