0% found this document useful (0 votes)
26 views4 pages

Quick Guide to Kalman Filtering

Kalman filter finds the optimal averaging factor for each subsequent state to estimate signal values, while also retaining some information about past states. It does this by using a linear stochastic model and Gaussian noise assumptions to iteratively predict and correct estimates through time and measurement updates. The key is evaluating the optimal Kalman gain coefficient at each step.

Uploaded by

jojojo
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views4 pages

Quick Guide to Kalman Filtering

Kalman filter finds the optimal averaging factor for each subsequent state to estimate signal values, while also retaining some information about past states. It does this by using a linear stochastic model and Gaussian noise assumptions to iteratively predict and correct estimates through time and measurement updates. The key is evaluating the optimal Kalman gain coefficient at each step.

Uploaded by

jojojo
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

A Quick Insight

As I mentioned earlier, it's nearly impossible to grasp the full meaning of Kalman Filter by
starting from definitions and complicated equations (at least for us mere mortals).
For most cases, the state matrices drop out and we obtain the below equation, which is much
easier to start with.

Remember, the k's on the subscript are states. Here we can treat it as discrete time intervals,
such as k=1 means 1ms, k=2 means 2ms.

Our purpose is to find , the estimate of the signal x. And we wish to find it for each
consequent k's.

Also here, is the measurement value. Keep in mind that, we are not perfectly sure of these
values. Otherwise, we won't be needing to do all these. And is called "Kalman
Gain" (which is the key point of all these), and is the estimate of the signal on the
previous state.

The only unknown component in this equation is the Kalman gain. Because, we have the
measurement values, and we already have the previous estimated signal. You should calculate
this Kalman Gain for each consequent state. This is not easy of course, but we have all the
tools to do it.

On the other hand, let's assume be 0.5, what do we get? It's a simple averaging! In other
words, we should find smarter coefficients at each state. The bottom line is :


Kalman filter finds the most optimum averaging factor for each
consequent state. Also somehow remembers a little bit about
the past states.
Isn't this amazing?

Step-by-Step Guide
Here's a simple step-by-step guide for a quick start to Kalman filtering.

STEP 1 - Build a Model


It's the most important step. First of all, you must be sure that, Kalman filtering conditions fit to
your problem.
As we remember the two equations of Kalman Filter is as follows:

It means that each xk (our signal values) may be evaluated by using a linear stochastic
equation (the first one). Any xk is a linear combination of its previous value plus a control
signal k and a process noise (which may be hard to conceptualize). Remember that, most of
the time, there's no control signal uk.
The second equation tells that any measurement value (which we are not sure its accuracy) is a
linear combination of the signal value and the measurement noise. They are both considered
to be Gaussian.
The process noise and measurement noise are statistically independent.
The entities A, B and H are in general form matrices. But in most of our signal processing
problems, we use models such that these entities are just numeric values. Also as an additional
ease, while these values may change between states, most of the time, we can assume that
they're constant.
If we are pretty sure that our system fits into this model (most of the systems do by the way), the
only thing left is to estimate the mean and standard deviation of the noise functions Wk-1 and vk.
We know that, in real life, no signal is pure Gaussian, but we may assume it with some
approximation.
This is not a big problem, because we'll see that the Kalman Filtering Algorithm tries to
converge into correct estimations, even if the Gaussian noise parameters are poorly estimated.
The only thing to keep in mind is : "The better you estimate the noise parameters, the better
estimates you get."

STEP 2 - Start the Process


If you succeeded to fit your model into Kalman Filter, then the next step is to determine the
necessary parameters and your initial values.
We have two distinct set of equations : Time Update (prediction) and Measurement
Update (correction). Both equation sets are applied at each kth state.

Time Update Measurement Update


(prediction) (correction)
We made the modeling in STEP1, so we know the matrices A, B and H. Most probably, they will
be numerical constants. And even most probably, they'll be equal to 1.
I suggest you to re-write these equations and see how simplified will these equations
become. (if you're lazy enough not to do it, I'll do it for you in the Example below).
The most remaining painful thing is to determine R and Q. R is rather simple to find out,
because, in general, we're quite sure about the noise in the environment. But finding out Q is
not so obvious. And at this stage, I can't give you a specific method.
To start the process, we need to know the estimate of x0, and P0.

STEP 3 - Iterate
After we gathered all the information we need and started the process, now we can iterate
through the estimates. Keep in mind that the previous estimates will be the input for the current
state.

Here, is the prior estimate which in a way, means the rough estimate before the

measurement update correction. And also is the prior error covariance. We use these
prior values in our Measurement Update equations.
In Measurement Update equations, we really find which is the estimate of x at time k (the

very thing we wish to find). Also, we find which is necessary for the k+1 (future) estimate,
together with .

The Kalman Gain ( ) we evaluate is not needed for the next iteration step, it's a hidden,
mysterious and the most important part of this set of equations.
The values we evaluate at Measurement Update stage are also called posterior values.
Which also makes sense.

You might also like