You can never have too many PIDs…

Currently I have 7:

  • angular rate in X, Y, Z axes read from the gyro and nested within…
  • absolute angle from horizontal of X, Y, Z derived by integrating the gyro output over time
  • g force in Z direction read from the accelerometer to sustain hover at a given height

Having been tinkering with the top 6 PIDs, it’s just dawned on me that the Z direction actually needs a pair of nested PIDs too to replace the 7th PID above:

  • vertical acceleration in the Z direction read from the accelerometer and nested within…
  • vertical speed in Z direction derived by integrating the accelerometer output over time

That takes me up to 8 for now, and should enable controlled takeoff / landing at a specified constant speed (e.g 0.1m/s vertically), combined with a true hover (0 m/s vertically).

Once I include the X and Y directions into the accelerometer PIDs, that’s make 12 in total, and I have a funny feeling Euler is going to turn out to be useful again! But for now, I’ll stick with a stably hovering 8.

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.