To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 27978
27977  |  27979
Subject: 
Re: Kalman Filter on the NXT
Newsgroups: 
lugnet.robotics
Date: 
Sat, 29 Dec 2012 10:38:16 GMT
Viewed: 
21353 times
  
In lugnet.robotics, "Bruce Boyes" <bboyes@systronix.com> wrote:
I have a memory from attempting to use the Kalman filter, starting with a
model, and working through the math, that it made some assumptions, which
importantly included an originally good sensor signal subsequently clouded
by noise. Kalman can recover most of the original signal...

That's what the Kalman filter is about. One of its important application areas
is navigation (from rockets to ships and robots). In our example, we try to
develop the implementation for a robot driving in one only dimension, the
x-axis. And the model is given by Galilei's law of motion, written as difference
equations with i as the time-dependent index:

x(i) = x(i-1)+ s(i-1)*dt + a*dt^2/2
s(i) = a*dt

where x=displacement, s=speed (both system states), dt=time tick
and a=acceleration (due to external forces)

So, at any moment, if we have an initial estimation of both state variables, we
can predict, where the vehicle will be next. This prediction is error-prone,
because it obviously depends on the quality of our starting estimation and some
noise due to irregularities of the environment and the robot caracteristics.
Now, if your robot is supposed to move in a more or less even plane, then you
can admit that the acceleration is a=0. Any non-zero component can be seen as
part of the noise. (Because we explicitely use the inclined plane, we directly
inject the measurement of the acceleration into the equations, as the
acceleration has non-zero values constantly).

Now, as the prediction is erroneous, we need some input from the environment
that allows us to correct it. And there's where the sensor(s) come in. If you
rely on one only sensor with bad caracteristics, of course, your correction will
not improve the prediction. One feature of the Kalman filter method is that you
can merge more sensor channels. And that's what we are trying to do in our
example.

The Kalman filter is not a wizzard that cleans your bad sensor. You should make
sure that its respons is linear, and that its errors have zero-mean. And you
should know its precision. (In many cases, you can linearize the sensor
caracteristics. That's one important part of the preparations, before being able
to successfully use the KF.)

The KF "learns" from the statistics! Imagine that you have an Ohm-meter, and
that you are measuring a 470 Ohm resistor that has 2% tolerance. From the color
code, you know that the resistor is a 470 Ohm type. Now, you want to have the
exact value. You know from the producer that your Ohm-meter has a precision of 5
Ohms on the 1kOhm scale. You measure once 510 Ohm. What is your best estimation:

It is the weighted average:

Resistance = (R * 470 + Q * 510)/ (Q + R), where

R = variance of the Ohm-meter (= square of the standard deviation) = 5^2 = 25
Q = variance of the prediction (at start of the model = (470*2%)^2 = 88)

Note that your model is the constant 470. So, you predict that the resistor is
470 Ohm, but you know that you are not totally right. You measure 510, and you
know that this is incorrect either. However, your measurement is statistically
better than your guess.

==> Resistance (best estimation) = 501.15 Ohm
The estimation variance is: P=Q*R/(Q+R)=19.47, much better than both initial
variances!!!)

There is an interesting video on http://www.youtube.com/watch?v=b7oyDZrECTc
showing some features of the KF with a robot.



Message is in Reply To:
  RE: Kalman Filter on the NXT
 
I have a memory from attempting to use the Kalman filter, starting with a model, and working through the math, that it made some assumptions, which importantly included an originally good sensor signal subsequently clouded by noise. Kalman can (...) (12 years ago, 28-Dec-12, to lugnet.robotics)

4 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    
Active threads in Robotics

 
Contact Recovery Nerd for Speedy USDT / BTC Recovery
8 hours ago
 
Different Sensors Available...
22 hours ago
Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR