Close

It can fly, but there's lots of ways to improve

A project log for TeensyFlight36

Writing a flight controller. Follow my progress @ https://github.com/dakejahl/TeensyFlight36

Jacob DahlJacob Dahl 09/24/2019 at 00:300 Comments

I spent the best part of 2 days now trying to tune this thing to fly the way I want... it is not easy! The primary problem I am having is with attitude response. The rates response is solid, and by reducing the cutoff frequency of the gyro filter, I have really been able to tighten up the rates controller. Attitude control on the other hand has been a struggle. I want to ONLY use proportional gain, however I am seeing that at large angle errors the response is very sluggish, however I cannot crank up the P gain any higher otherwise I get oscillations at hover. I think this problem is more complicated than simply controller tuning, there is probably a significant effect from airframe vibration coupled with my rudimentary attitude estimator. I think moving to an EKF -- and fusing in mag data -- would clean up the attitude estimation around hover dramatically. I really should implement logging so that I can verify these suspicions... yet another thing to do.

Overall I am extremely happy with the project, and I have effectively accomplished what I set out to do: make a drone fly. I will surely work on this project off and on for quite some time, but for now I want to turn my attention to solving real world problems. This has been a great learning exercise and an awesome experience, I can't wait for what's next!

Discussions