Kalman Filter Brief Theory

Speech Enhancement using Kalman Filter

Speech Enhancement using Kalman on STSA

 

 

Brief Kalman Filter Theory

Kalman Filter is an adaptive least square error filter that provides an efficient computational recursive solution for estimating a signal in presence of Gaussian noises. It is an algorithm which makes optimal use of imprecise data on a linear (or nearly linear) system with Gaussian errors to continuously update the best estimate of the system's current state.

 

Kalman filter theory is based on a state-space approach in which a state equation models the dynamics of the signal generation process and an observation equation  models the noisy and distorted observation signal. For a signal x(k) and noisy observation  y(k), equations describing the state process model and the observation model are defined as

 

x(k)=Ax(k-1)+w(k-1)                                    (1)

y(k)=Hx(k)+n(k)                                            (2)

 

where, x(k) is the P-dimensional signal vector, or the state parameter, at time k, A is a P × P dimensional state transition matrix that relates the states of the process at times k –1 and k, w(k) (process noise) is the P-dimensional uncorrelated input excitation vector of the state equation. w(k) is assumed to be a normal (Gaussian) process p(w(k))~N(0, Q), Q being the P × P covariance matrix of w(k) or process noise covariance. y(k) is the M dimensional noisy observation vector, H is a M × P dimensional matrix n(k) is the  M-dimensional noise vector, also known as measurement noise, n(k) is assumed to have a normal distribution  p(n(k))~N(0, R)) and R is the M ×  covariance matrix of n(k) (measurement noise covariance).

 

We define x(k|k-1) to be our a priori estimate (prediction) at step k from the previous trajectory of x, and x(k|k)  to be our a posteriori state estimate at step k given measurement y(k). Note that x(k|k-1) is a prediction of the value of x(k) which is based on the previous values and not on the current observation at time k. x(k|k) on the other hand, uses the information in the current observation (the notation |k is used to emphasize that this value is an estimation of x(k) based on the evidence or observation at time k). The a priori and a posteriori estimation errors are defined as:

 

e-(k)=x(k)-x(k|k-1)

e(k)=x(k)-x(k|k)

 

The a priori estimate error covariance then is:

 

P-(k)=E{e-(k)e-T(k)}                                       (5)

 

and the  a posteriori estimate error covariance is:

 

P(k)=E{e(k)eT(k)}                                           (6)

 

In deriving Kalman filter formulation, we begin with the goal of finding an equation that computes an a posteriori state estimate as a linear combination of an a priori estimate (prediction) and a weighted difference between an actual measurement and a measurement prediction (innovation). Hence, each estimate consists of a fraction which is predictable from the previous values and does not contain new information and a fraction that contains the new information extracted from the observation.

 

x(k|k)=x(k|k-1)+K(k)(y(k)-Hx(k|k-1))            (7)

 

The difference y(k)-Hx(k|k-1) in (7) is called the measurement innovation. The innovation reflects the discrepancy between the predicted value and the actual measurement. The P×M matrix, K(k), in (7) is chosen to be the gain or blending factor that minimizes the a posteriori error covariance (6). This minimization can be accomplished by first substituting (7) into the above definition for e(k), substituting that into (6), performing the indicated expectations, taking the derivative of the trace of the result with respect to K, setting that result equal to zero, and then solving for K. One form of the resulting K(k) that minimizes (6) is given by:

 

K(k)=P-(k)HT(HP-(k)HT +R)-1                      (8)

 

Looking at (8) we see that as the measurement noise covariance, R, approaches zero, the gain, K, weights the innovation more heavily. Specifically:

 

limK(k)=H-1                                                    (12)

R→0

 

On the other hand as the a priori estimate error covariance P-(k), approaches zero the gain, K, weights the innovation less heavily. Specifically:

 

limK(k)=0                                                    (13)

P-(k)→0

 

 

Another way of interpreting weighting by K is that as the measurement error covariance approaches zero, the actual measurement is “trusted” more, while the predicted measurement is trusted less. On the other hand, as the a priori estimate error covariance approaches zero the actual measurement is trusted less, while the predicted measurement is trusted more.

 

The Kalman filter estimates a process by using a form of feedback control: the filter estimates the process state at some time and then obtains feedback in the form of (noisy) measurements. As such, the equations for the Kalman filter fall into two groups: time update equations (prediction) and measurement update equations (correction). The time update equations are responsible for projecting forward (in time) the current state and error covariance estimates to obtain the a priori estimates for the next time step. The measurement update equations are responsible for the feedback i.e. for incorporating a new measurement into the a priori estimate to obtain an improved a posteriori estimate.

 

The time update equations can also be thought of as predictor equations, while the measurement update equations can be thought of as corrector equations. Indeed the final estimation algorithm resembles that of a predictor-corrector algorithm for solving numerical problems as shown below in figure 1.

 

 

Figure 1. The adaptive operation of the Kalman Filter, illustrating the interaction of the prediction and correction steps

Back