Close

Complementary Filter Working

A project log for Chiindii

Micro quadcopter from scratch

the-big-oneThe Big One 01/20/2016 at 18:290 Comments

After a long downtime, we have started work on the code now. We have finished the main architecture, and are now working from the bottom of the control stack to the top. Motor control (9 bit PWM in hardware) is completed, status lights are working (showing armed status, battery warning, and comm warning); attitude filtering was the next task.

We decided to go for a first order complementary filter due to its simplicity and small code size. We followed the logic demonstrated in the blog post at http://robottini.altervista.org/kalman-filter-vs-complementary-filter.

This is a graph of what we have currently:

As you can see, the filtered value is nice and smooth, and follows the accelerometer quite closely without inheriting the noise from either accel or gyro.

Next step will be communications followed by rate PID.

Cheers

Discussions