On-board velocity estimation using only gyro and accelerometer

Firmware/software/electronics/mechanics
Post Reply
asr
Beginner
Posts: 15
Joined: Sun May 31, 2020 3:07 am

On-board velocity estimation using only gyro and accelerometer

Post by asr »

I noticed that the stateEstimator() function in stabilizer.c is able to output x,y,z linear velocity estimates, and was wondering how accurate or noisy such estimates are. I had always thought that trying to use accelerometer data to estimate velocities, even when using an accurate dynamic model in a Kalman filter, could be extremely inaccurate. However, since I see it being used in the various Crazyflie on-board controllers I'm guessing either my assumption is incorrect (I hope this is the case), or you're doing something fancy in your state estimators.
kimberly
Bitcraze
Posts: 518
Joined: Fri Jul 06, 2018 11:13 am

Re: On-board velocity estimation using only gyro and accelerometer

Post by kimberly »

We have 2 estimators, a complementary filter and extended kalman filter. The first one is mostly used only with decks without any position capacity (for the exception of the zranger) and the last one is activated when the flowdeck, lighthouse deck, lps deck or motion capture is used.

To make a long story short, the stateEstimate velocities on purely only the onboard sensors (acc.meter) is not to be trusted at all. You need some extra information about the current state of the crazyflie.

Here is documentation about the stabilizer module which explains about the implementation of the controller and estimators.
Post Reply