DSPRelated.com
Forums

KALMAN FILTER - help for tuning

Started by Giovanna March 26, 2004
Hi!
I'm sorry for my english...

I need help for tuning of kalman filter in a vision problem.

The problem is the following:

There is a robot (kephera) moving on a white plane,with a camera that
look to the plane.


I've already build the algorithm that find the robot on the plane,and
by the omography I can come back to the coordinates on the plane.

The commands to the robot are sended by right wheel speed and left
whell speed,so I always know the angolar speed of the robot.

The linear speed is costant and know,but maybe with little errors.

now i'd like to introduce the kalman filter to remove some noise from
my camera-measurament and for have the state of the robot (x y angle
speed ang-speed).

I only know the worst-case of the variance of the misure of the
position of the robot,and I can suppose the error on the speed and
angolar speed very small.

how can I choose the noise matrices for kalman filter? (measurament:x
y ang-speed state:x y ang-speed speed angle)

thanks

Luca

(I'm really sorry for my english)
Luca wrote:

> Hi! > I'm sorry for my english...
...
> (I'm really sorry for my english)
If only my Italian (or French or Spanish or ...) were as good as your English! I'm sure someone will advise you soon. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
I think you might find that wheel slip will interfere with the process of
determining orientation & position accurately.  Just the act of turning
involves 'scuffing' the tyres somewhat.  The best you could do this way
would involve using stepper motors and counting the steps, and I suspect
that this will not be good enough to prevent serious position determination
errors within 1 minute.

You can get small tuning-fork style gyroscopes which can overcome this for
rotation, but because they are an accelerometer, they suffer from DC drift
over time (integration error).  They work quite well in the short term. 
You may be able to derive something from the video image (or some other
sensor) to provide longer-term referencing for the gyro.

I used a gyro o/p (thru a 10-sec TC HPF) & a magnetic compass sensor (thru a
complimentary 10-sec TC LPF), summing the filter o/ps to yield an o/p that
responded quickly (10's of mSecs, from the gyro), but in the long term was
referenced to magnetic north.  Sensitivity to local motor magnets, steel
tables etc. may kill this for you, though

Jim Adamthwaite.
Luca said:

> I'm sorry for my english...
No real problems at all!
> I need help for tuning of kalman filter in a vision problem. > > The problem is the following: > > There is a robot (kephera) moving on a white plane,with a camera that > look to the plane. > > I've already build the algorithm that find the robot on the plane,and > by the omography I can come back to the coordinates on the plane. > > The commands to the robot are sended by right wheel speed and left > whell speed,so I always know the angolar speed of the robot. > > The linear speed is costant and know,but maybe with little errors. > > now i'd like to introduce the kalman filter to remove some noise from > my camera-measurament and for have the state of the robot (x y angle > speed ang-speed). > > I only know the worst-case of the variance of the misure of the > position of the robot,and I can suppose the error on the speed and > angolar speed very small. > > how can I choose the noise matrices for kalman filter? (measurament:x > y ang-speed state:x y ang-speed speed angle)
The first thing you need to do is to come up with a model for how your state evolves. I assume you have this already. It usually looks something like: q(k+1) = A q(k) + B u(k) z(k) = C q(k) + D v(k) where v is your measurement noise, q(k) is the state at time k and u is your process noise. What you're asking is how to choose the covariance matrices of u and v. Generally, unless your model tells you something else, it's a good idea to start by assuming that Ruu and Rvv (i.e. the covariance matrices) are diagonal. Choose the size of the entries depending on what you know about those measurements / variations in the state. If you always know the angular speed of the robot, then it will have a low (but not zero) value on the appropriate diagonal entry. If your robot is jerking around all over the place, then have a large value for the x-position and y-position entries. If x and y don't vary much, then make these entries small (but again not zero). I hope this helps. Feel free to ask more questions; I'll try to answer them as I can. Ciao, Peter K. -- Peter J. Kootsookos "I will ignore all ideas for new works [..], the invention of which has reached its limits and for whose improvement I see no further hope." - Julius Frontinus, c. AD 84