First, as a quick recap of “How To Tune A Drone: Part 1,” we learned about Control Systems and the super-awesome acronym, PID. You can re-read that article here.
This article is all about how we applied PID control systems and “bisectional algorithms” to the Modovolo Lift. Because as you read in “How To Tune A Drone: Part 1,” we couldn’t use standard tuning programs to tune the Lift. So that meant we needed to get creative and build our own tuning process.
PID and the Lift. Here’s what we found through our testing on how to apply PID to the Lift.
Proportional. “P” term is all about making the Lift more responsive to inputs, e.g., if I want it to bank left hard, then a hard throttle up on the left stick should cause the Lift to bank hard and fast. But if we made it too-responsive, then the Modovolo Lift had the shakes like it had drank too much coffee.
Integral. The “I” term is all about smoothing out disturbances, e.g., if I ask it to move five degrees but there is a continual disturbance (like wind) that makes it move an additional degree, then it will add a bias to your input so that your input holds the value at 5 degrees (and not six degrees). But the “I” term can be dangerous unless you have protections.
How dangerous? Well, some history for those of you who are tech and history nerds. The famed X-15 rocket broke up in flight and crashed because the pilot got into a spin and the “Integrator Term” restricted the pilot’s inputs, because the “Integrator Term” was thinking that it was “smoothing out disturbances” caused by the spin.
Check out our “Disturbance Rejection” video here to see how we were testing the “I” term. You’ll see in that video that Arion (our CTO) pushed one side of drone down and let it go. He wanted to see how it handled disturbance rejection which works kind of like a control input.
Distributed. The “D” term is similar to the P term because it also affects how responsive the Lift is. If you don’t have D tuned right, then you can just forget the P term.
The Bi-Sectional Algorithm. We found that the automated tuning tools like AutoTune (part of Arducopter) and QuickTune increase D or P until detecting oscillation of the drone (i.e., basically, the drone is kind of shaking), but, because the batteries are distributed to the outer edges (i.e., the batteries are located in each Lift Pod), the Lift has a high moment of inertia. This means that the Lift is incredibly stable and simply doesn’t “shake” (i.e., oscillate) – and that means that AutoTune and QuickTune have nothing to measure and get very confused. This is where the “Bi-Sectional Algorithm” comes in, which works by repeatedly dividing in half the portion of the list that could contain the item, until you’ve narrowed down the possible locations to just one.
Here’s how it works in detail:
Step 1: The algorithm sets one tuning parameter (i.e., P, I, or D) with two diametrically opposed values: (i) “way too high” and also “way too low.” At “way too low” the Lift is really sloppy and “way too high” the Lift is off-the-charts (almost uncontrollable) aggressively responsive.
Step 2: Then the algorithm sets a value in between the “way too low” value and the “way too high” value (the “In-Between Value”) in order to answer this question: is this new in-between value most like the “way too low” performance or the “way too high” performance”?
Step 3: Next the algorithm tries two new values: (i) halfway between the In-Between Value from Step 2 and the “way too low value” from Step 1 and (ii) halfway between the In-Between Value from Step 2 and the “way too hight value” – also from Step 1.
Step 4: Well, you just keep drinking coffee and for many days you iterate on Steps 2 and 3 until you obtain perfection. It’s that easy.
Not enough geek out? You can check out our tuning videos here and here to geek out more.