How to Improve Yaw Estimator?

Discussions about all things Bitcraze
Post Reply
gabriel_lasec
Beginner
Posts: 5
Joined: Wed Jan 23, 2019 5:30 pm

How to Improve Yaw Estimator?

Post by gabriel_lasec » Mon Aug 19, 2019 5:53 pm

Hello dears crazyfliers!

Currently, i'm working in order to improve crazyflie's EKF, because it is not accurate in my tests :? Can you help me? Is it possible?

Yaw behavior: https://ibb.co/QM50zW7
Image

P.S: I'm using LPS.



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

Re: How to Improve Yaw Estimator?

Post by arnaud » Tue Aug 20, 2019 7:45 am

Hi,

What Crazyflie are you using (2.0 or 2.1) and are these measurement taken while flying or not?

The MEMS gyro of the Crazyflie will drift over time. The drift you observe is bigger than what I would have expected though (the gyro used in 2.1 is specified for a couple of degree drift per minute max).

When flying though, the LPS and the kalman filter should take care of the yaw and correct it using the flight dynamic.

gabriel_lasec
Beginner
Posts: 5
Joined: Wed Jan 23, 2019 5:30 pm

Re: How to Improve Yaw Estimator?

Post by gabriel_lasec » Tue Aug 20, 2019 12:18 pm

arnaud wrote:
Tue Aug 20, 2019 7:45 am
Hi,

What Crazyflie are you using (2.0 or 2.1) and are these measurement taken while flying or not?

The MEMS gyro of the Crazyflie will drift over time. The drift you observe is bigger than what I would have expected though (the gyro used in 2.1 is specified for a couple of degree drift per minute max).

When flying though, the LPS and the kalman filter should take care of the yaw and correct it using the flight dynamic.
I'm using CF 2.0 and these measurement was taked while flying. However, I did some tests while CF was not flying (docked in a base) and results are different than expected.

Yaw rate docked in a base: https://ibb.co/c2ph2BY

Can i improve the kalman filter? Is it possible to improve yaw stability?

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

Re: How to Improve Yaw Estimator?

Post by arnaud » Mon Aug 26, 2019 9:31 am

It is hard to tell what is happening without more informations, for example what is your flight trajectory while taking this yaw measurement.

Something that I have observed is that when flying circular motion in one direction, the YAW will tend to show a constant offset and this offset will depend of the flying direction. My assumption is that this is what is happening here.

I have been assuming that this is caused by a delay between the LPS measurement and the IMU measurement, but this theory has never been tested.

Since the estimation is better when not flying, one solution would be to have more trust in the Gyro. I think this can be achieved by reducing the gyro_way measurement noise: https://github.com/bitcraze/crazyflie-f ... ore.c#L147.

Post Reply