pythonbeagleboneblackpid-controller

PID tuning in differential drive robots. using beagle-bone black, python, Encoder DC motors and H bridge driver


How to implement PID tuning in differential drive robot? I am using Beagle-bone black, 450 rpm 96 PPR encoder motors, H bridge motor driver.


Solution

  • This is all based on control theory. but lets begin, a fast RPM loop will generally just be a PI controller, if the input signal noise can be faster than its signal, you loose the Derivative, otherwise you get weird surging and instability.

    Next you will have to decide on what tuning method you wish to approach it with, e.g. if its a one off thing, a Ziegler-Nichols Tuning approach could be done, for a motor controller this would be it rolling along the ground, and brought into a P grain only oscillation, and from that calculate the gains. http://www.mstarlabs.com/control/znrule.html

    There are many different approaches, some involving step changes, others self trimming as they go (feedfoward controllers), this site gives a good breakdown of them, http://www.mstarlabs.com/control.html

    Though in reality, you probably just want to bolt on an import that does the job already. if so you can likely tweak this to work how you want, https://github.com/hirschmann/pid-autotune