kalman filter problem

All questions related to the configuration tool and groundstation

Moderator: lukasz

kalman filter problem

Postby khatarat » Sun Aug 07, 2011 12:57 pm

hi
i implemented a one dimension(one vector) kalman filter. but the output has some problem. the biggest problem is that accelerometer has more power in out put and when i move device rapidly up and down the output become incorrect as you can see in pic in region A.
Region A is when i move device up and down without rotating as you can see in gyro output that device has just a little rotation.

can any one tell me where is the problem?


i use this guid to implement kalman filter
http://tom.pycke.be/mav/71/kalman-filtering-of-imu-data

here is three constant values:
E(alpha2) = 0.001
E(bias2) = 0.003
Sz = 0.3 (radians = 17.2 degrees)


how can i calc this values of my sensors? i think this const values causes my problem that i expalin it in first post.
Attachments
kalman_output.jpg
kalman_output.jpg (53.25 KiB) Viewed 9877 times
khatarat
 
Posts: 6
Joined: Sun Aug 07, 2011 10:46 am

Re: kalman filter problem

Postby Tom » Sun Aug 07, 2011 7:32 pm

Good remark. You should change the

E(alpha2) = 0.001
E(bias2) = 0.003

constant values until the result satisfies you. Generally, the bias will more slowly converge to the correct one as you change it to what you want.
User avatar
Tom
Site Admin
 
Posts: 1016
Joined: Fri Nov 13, 2009 6:27 pm
Location: Belgium

Re: kalman filter problem

Postby khatarat » Sun Aug 07, 2011 7:59 pm

i have change this values many times but still moving device affect the output.
can you show me a way to get the best values.

another questeion is that is it possible to just use gyro and accelerometer to remove completely moving affect from output so just rotating device changes the output? or i have to use gps to achive this?
khatarat
 
Posts: 6
Joined: Sun Aug 07, 2011 10:46 am

Re: kalman filter problem

Postby khatarat » Sun Aug 07, 2011 8:59 pm

another question :)
i want to use kalman filter to get three vector output to use in motion capture and i need the output without any noise.

i use this for start
http://tom.pycke.be/mav/71/kalman-filtering-of-imu-data

do you think that it can do what i need? or i should use another kinds of kalman filter?
khatarat
 
Posts: 6
Joined: Sun Aug 07, 2011 10:46 am

Re: kalman filter problem

Postby Tom » Mon Aug 08, 2011 7:18 am

For 3D motion capture you can look at the gluonpilot code (especially the ahrs_quaternion code).

With the kalman filter you are currently using, the constant tell you how much the output should be like the accelerometer, or how much like the intergrated gyro. I propose to change the constant by a factor 10 at a time so you can see the difference.
User avatar
Tom
Site Admin
 
Posts: 1016
Joined: Fri Nov 13, 2009 6:27 pm
Location: Belgium

Re: kalman filter problem

Postby khatarat » Mon Aug 08, 2011 9:48 am

i use an ahrs_quaternion kalman filter code but it doesnt work. can you give me that code. is it has any document?


in this kalman filter can you tell me exactly witch of them is about power of gyro and witch of them is about power of accel. for example if i want to reduce the power of accel i will test this values.

E(alpha2) = 0.001,0.002,0.003,0.004
E(bias2) = 0.004,0.003,0.002,0.001

is this way is correct? whats your suggestion?
do i should change Sz too?

is there any way to get the best value automaticlly?
in motion capture i need 16 IMU. i should do this for all of them?


-----
another question is that what is the kind of this kalman filter? is it KF or Extended kalman filter?
what is the difference between them?
khatarat
 
Posts: 6
Joined: Sun Aug 07, 2011 10:46 am

Re: kalman filter problem

Postby Tom » Tue Aug 09, 2011 7:05 am

It is especially the ratio E(alpha2) / E(bias2) that is important, so don't change both values at the same time. Also, your changes should be bigger. You can start with a 10x incremental change.


This is a normal kalman filter. Extended kalman filters are better for non-linear problems.
User avatar
Tom
Site Admin
 
Posts: 1016
Joined: Fri Nov 13, 2009 6:27 pm
Location: Belgium

Re: kalman filter problem

Postby khatarat » Tue Aug 09, 2011 7:54 am

what about ahrs_quaternion?
is it have a sample code or documentation?
khatarat
 
Posts: 6
Joined: Sun Aug 07, 2011 10:46 am

Re: kalman filter problem

Postby khatarat » Wed Aug 17, 2011 7:15 am

i try to test various state of kalman by realtime changing E(alpha2) , E(bias2) , Sz on pre saved data from my imu.
but there is no value for them that remove error that i show you in my first post and drift together.

so i think i have to use gps to remove this two errors together. but in some products lik http://www.xsens.com/en/general/mtx they say that it has no drift and has accurat orintation output with no gps.
whats your opinnion?
khatarat
 
Posts: 6
Joined: Sun Aug 07, 2011 10:46 am

Re: kalman filter problem

Postby Tom » Wed Aug 17, 2011 12:44 pm

A GPS is used to overcome other dynamics, not for shaking the module.

All I can say is you need to tune the variables. I'm sorry it's not working for the moment, but it should. You can choose whether you kalman filter should be more like the integrated gyro, or more like the accelerometer. Clearly, it should be more like the integrated gyro. The wrong reading comes from your accelerometer.
User avatar
Tom
Site Admin
 
Posts: 1016
Joined: Fri Nov 13, 2009 6:27 pm
Location: Belgium


Return to Software

Who is online

Users browsing this forum: No registered users and 7 guests

cron