Hello everyone,
as part of a project course, three classmates and I designed our own hovering scheme for the Crazyflie. The algorithm uses an extended Kalman filter that combines barometer and accelerometer measurements to obtain estimates of the quadcopter's vertical velocity. There are actually more states being estimated by the EKF, but only the vertical velocity is used in the controller. We control the quad using an LQ controller with integral states, but it should be straightforward to include a simple PI controller in the original controller as well. Below are some videos of the hover mode in action:
https://www.youtube.com/watch?v=JoWU8qoAk84 - Static hovering/reference tracking
https://www.youtube.com/watch?v=0IYrcBMY4uM - Maneuvering
The velocity estimates provided by the EKF are free from drift, and are thus very suitable for control.
Let us know what you think!
Hover mode using sensor fusion
Re: Hover mode using sensor fusion
Hi,
This looks really great, awesome job! The performance are much better that the current, very simple, implementation.
Have you had problem when flying in a small room and closing/openning the door? We have seen huge pressure change when that happen and I am curious if an EKF can filter that out.
Are you planning of releasing the code? This would help me a lot in getting stable flight in the UWB local positioning system (currently I have crude PIDs and the thrust is the biggest issue).
This looks really great, awesome job! The performance are much better that the current, very simple, implementation.
Have you had problem when flying in a small room and closing/openning the door? We have seen huge pressure change when that happen and I am curious if an EKF can filter that out.
Are you planning of releasing the code? This would help me a lot in getting stable flight in the UWB local positioning system (currently I have crude PIDs and the thrust is the biggest issue).
Re: Hover mode using sensor fusion
Wow! That's a really stable hover. Very nice.
Crazyflier - my CF journal...
4x Crazyflie Nano (1.0) 10-DOF + NeoPixel Ring mod.
3x Crazyflie 2.0 + Qi Charger and LED Decks.
Raspberry Pi Ground Control.
Mac OS X Dev Environment.
Walkera Devo7e, ESky ET6I, PS3 and iOS Controllers.
4x Crazyflie Nano (1.0) 10-DOF + NeoPixel Ring mod.
3x Crazyflie 2.0 + Qi Charger and LED Decks.
Raspberry Pi Ground Control.
Mac OS X Dev Environment.
Walkera Devo7e, ESky ET6I, PS3 and iOS Controllers.
-
- Beginner
- Posts: 26
- Joined: Mon Apr 11, 2016 4:33 pm
Re: Hover mode using sensor fusion
Any chance to share the code. I would really like to try this out. Thanks!
Re: Hover mode using sensor fusion
Hi
Looks excellent.
Impatient to test this
JCM
Looks excellent.
Impatient to test this
JCM
Re: Hover mode using sensor fusion
Hi
Did you use Normal Flight Mode or Advanced one? Is it a pertinent question?
Have you modified PID coefficient of controller?
Thanks
Regards?
Jean-Claude
Did you use Normal Flight Mode or Advanced one? Is it a pertinent question?
Have you modified PID coefficient of controller?
Thanks
Regards?
Jean-Claude
Re: Hover mode using sensor fusion
Very nice!
I want to ask(a newbie question) about the difference between this method using Kalman filter and method used in current CF AltHold. This method with Kalman filter should fusion Baro and Acc values to estimate vertical velocity and perform a filtering. While CF doesn't do this? What method uses CF?
I want to ask(a newbie question) about the difference between this method using Kalman filter and method used in current CF AltHold. This method with Kalman filter should fusion Baro and Acc values to estimate vertical velocity and perform a filtering. While CF doesn't do this? What method uses CF?
Re: Hover mode using sensor fusion
Hi Yaro,
The CF currently use accelerometer and baro but using a complementary filter: the altitude is estimated with the accelerometer and a little bit of the pressure reading is added to it. So for short period the accelerometer is the main sensor but over longer time it will converge towards the pressure reading. Which is good because unlike the accelerometer the pressure is stable over time. The kallman filter will do the same but much better. I am no expert so you can look a wikipedia to see how complex and awesome a Kallman filter is: https://en.wikipedia.org/wiki/Kalman_filter, or maybe someone passing by could summarize the Kallman filter .
The CF currently use accelerometer and baro but using a complementary filter: the altitude is estimated with the accelerometer and a little bit of the pressure reading is added to it. So for short period the accelerometer is the main sensor but over longer time it will converge towards the pressure reading. Which is good because unlike the accelerometer the pressure is stable over time. The kallman filter will do the same but much better. I am no expert so you can look a wikipedia to see how complex and awesome a Kallman filter is: https://en.wikipedia.org/wiki/Kalman_filter, or maybe someone passing by could summarize the Kallman filter .