Attitude values slowly converging to zero in EKF

Firmware/software/electronics
Post Reply
malintha
Beginner
Posts: 17
Joined: Thu Dec 07, 2017 4:58 pm

Attitude values slowly converging to zero in EKF

Post by malintha » Thu May 31, 2018 10:31 pm

Hi All,

I am required to calculate the instantaneous linear velocity, acceleration and attitude for the controller I'm working on. I'm using the EKF implemented by Hamer and I noticed that the attitude values are slowly converging to zero when even the drone is idle at a given pose. But when I use the default estimator the attitude values seem to be pretty solid. Is there a way to omit this convergence of EKF?

Thank in advance for your time!

malintha
Beginner
Posts: 17
Joined: Thu Dec 07, 2017 4:58 pm

Re: Attitude values slowly converging to zero in EKF

Post by malintha » Fri Jun 01, 2018 5:33 am

I think I figured it out. When I switch quadIsFlying=true, attitude values become stable. Apparently, we assume the drone's initial position is flat (R=I) and hence reverse the attitude to 0 with at a given rate when the accelerometer and gyroscope values are idle. Hence the attitude values should be stable when the drone is on the fly.
https://github.com/bitcraze/crazyflie-f ... cd2c8258e1

arnaud
Bitcraze
Posts: 1752
Joined: Tue Feb 06, 2007 12:36 pm

Re: Attitude values slowly converging to zero in EKF

Post by arnaud » Fri Jun 01, 2018 5:50 am

If you set "ROLLPITCH_ZERO_REVERSION" to 0 the convergence should not happen anymore.

Forcing isflying to true might not be good if you are not flying: when isflying is true the EKF will assume that the platform can only accelerate in the Z direction (like a quad flying in a vacuum :-)).

Post Reply