Lesson Learned: Obey parameter descriptions especially SCHED_LOOP_RATE

Background: I fly the Believer airplane a lot. It’s very efficient, and I have done a lot of testing with it.

Yesterday I decided to bump up the SCHED_LOOP_RATE to 400 in hopes of increasing performance (stability in gusts, precision, etc.). I effectively had all of the other parameters similar to previous flights. Unfortunately my flight was very short due to an incredibly nasty pitch oscillation at full power.

Being that I hand-launch, I find it easiest to let the plane stabilize itself and do automatic takeoffs. About 4 seconds after launch was where things got ugly. I probably should have taken manual control sooner, but at least you get to see what happens.

The result: an oscillation that resulted in pulling roughly 8g’s on the poor foam airplane. After enough forces were applied, the batteries slipped out of their straps and came flying down with the plane. Miraculously, the lightweight plane lost power when pulling neagative g’s to level the flight in manual mode. It lost power with nearly full-up elevator and neutral ailerons, so it did a deep-stall like landing that wasn’t captured. Upon post-crash inspection, the airplane was fine, and it flew again just fine using the SCHED_LOOP_RATE = 200 this morning.

What I learned:

  • I should have heeded the warning in the parameter description: “This controls the rate of the main control loop in Hz. This should only be changed by developers.

  • The frequency of control loops has a large effect on the proper PID gains, at least for pitch in plane.

  • Secure my batteries better for experimental flights.

  • Take over in manual mode quickly when things don’t seem right.

  • The believer at roughly 3500g can withstand structural loadings of 8g’s. At 6500g (fully loaded), that would be equivalent to about 4g’s. NEAT!

See the pitch pid values during takeoff below of my experiment 400hz vs a correctly autotuned airframe at 200hz.

If you want to look at the .BIN log yourslef, it’s here: https://www.dropbox.com/s/oj34hq2hg7ld4bs/00000006.BIN?dl=0