I'm building quadcopter from scratch, software is implemented on STM32F4 microcontroller. Frequency of main control loop equals 400Hz.

I've though everything is almost finished but when i've mounted everything and started calibration of PIDs i faced a problem. It was impossible to adjust PID parameters properly. So i started test with lower power (not enough to fly) and i've managed quite fast adjust PID for roll but when i've increased power problems with control came back.

After that i've done more measurements. Roll angle with engines off Roll angle with engines on but without blades from complementary filter

I didn't make test with blades but probably this is even worse and that is why i cannot calibrate it.

  • If problem is due to vibration how can i fix it?
  • If something else is cause of that symptom, what is it?
  • Can i solve this through better controls and data fusion algorithms? Now i use complementary filter for acc and gyro sensors data fusion in roll and pitch.
  • $\begingroup$ fast comment: Tune the complementary filter (it must be slower) or use a more sophisticated approach like a kalman filter. Maybe I add a complete answer later. $\endgroup$
    – TobiasK
    Nov 21, 2015 at 20:55
  • 2
    $\begingroup$ You can't tune your controller without the blades. $\endgroup$ Nov 22, 2015 at 4:52
  • $\begingroup$ i've took off blades after all to take measurements if this is necessary i can mount it and measure it again but imho outcome will look even worse $\endgroup$
    – unitatem
    Nov 22, 2015 at 10:52

1 Answer 1


You have far too much vibration reaching your sensors. Mount the board you're using with vibration damping mounts, this should solve most of your problem. An easy way to do this is to attach each corner of your board to the frame using a small but thick piece of double stick squishy foam[1]. The board will now act as a spring mass damper attached to your frame. By making the pieces of foam narrower you will increase the cutoff frequency of the system. Here is a link to an arducopter page talking about vibration damping to solve this problem[2].

While a complementary filter may be suitable for your application, the correct tool for estimating attitude is a kalman filter capable of handling nonlinear system dynamics and measurement dynamics. The pixhawk uses an extended kalman filter to estimate attitude[3]. It may be overkill for your system depending on how far you want your quad to deviate from level hover.





Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.