Back to basics test results

  1. The kids playroom is not a suitable location for testing yet – Phoebe was drifting towards a chair and only stopped due to very short flight times I’d set combined with a panic flurry of ctrl-C’s!
  2. Moving outdoors, in a fight between a climbing rose branch and Phoebe’s blades, the branch was cut off clean – the blade was undamaged until it hit the iron railings supporting the rose – I did say the blades were dangerous, didn’t I!
  3. The inner PID tuning is a beauty to behold – beautiful stable hover with virtually no drift despite only roughly horizontal take-off surface i.e. the flattest piece of lawn I could find.
  4. In contrast, the absolute angle PID flight was a complete ‘mare.  Take-off from lawn or absolute horizontal platform both resulted in drift, generally a combination of forward and right, depending on the slope of the takeoff surface.  The drift would end after a bit and Phoebe would start heading back to where she came from.

Lessons learnt and next steps:

  • the sticky feet for Phoebe’s flight controller, plus the redesigned non-slip padding holding the battery in place worked like a dream – no slippage of either.
  • the drift and slow recovery is most likely due to a combination of 3 factors:
  1. the drift is usually in the same rough direction suggesting mismatched / damaged motors in that direction
  2. the complementary filter may need tuning so that any tilt induced by the mismatched motors gets corrected quicker by filtering a greater proportion of the (noisy) accelerometer earlier – it’s a case of compromise between noise and accuracy
  3. the absolute angle PID might need further tuning to increase P and / or D gain.

I’m going to test option 2 first, then 3 because any mismatch in motors should be compensated for by those two factors.

P.S. Just found option 4 for the cause of drift from a non-horizontal surface: the complementary filter initial values at take off assumed a horizontal take-off and then over time, the input from the Euler angles slowly corrects this, but while the gyro inputs were dominant, if the takeoff surface was not horizontal, drift would occur.  However, it’s possible to read accurate Euler angles (sans noise) prior to take off, and prime the complementary filter with an accurate initial setting to which subsequently the accelerometer can increasingly contribute.  I’ve updated the code (not on GitHub yet until tested) and I’ll also see about upping the fraction of Euler into the overall calculation of absolute tilt. angles.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.