Out of Control PIDs

This week’s post is less of a how-to and more of a “how-to?” I’ve got some ideas about the basics of PID controls, but this system is giving me trouble. I updated the PID control system on Egg-Bot Version 2. V2 currently holds a single position okay, but changes in the target are wild and guaranteed failure.

Control Loop Upgrade

First thing I did this week was add a non-linear adjustment to the PID loop to more accurately map the pendulum angle to the geometry of the robot. In this way a change in the output angle would reflect the center of gravity of the robot, rather than the center of rotation of the pendulum.

I think the reason for the failures is that the controller relies on the integral term to reach the target position. In a previous iteration of the controller, whenever I changed the target, I could observe a pretty wild perturbation where the integral term “unspooled” and had a big time delay until it could start moving towards the new target.

To combat this “spooling”/”unspooling” delay, in today’s PID version, I reset the integral term whenever a change in target was entered. This had a new effect where the robot would suddenly fall over on target changes due to the rapid change in that term. I want to investigate what’s done more commonly to address this challenge.

Egg Bot Version 3 – Body and Screen

Finally, I also got version 3 of the robot built. Version 3 includes a front and back cover and an 8×8 LED display. It looks really nice, but can’t stand on its own. I think it’s too top heavy for the pendulum to control. Time to do some actual static analysis instead of just guessing.

This entry was posted in 3D Printing, Projects, Robotics and tagged , , , . Bookmark the permalink.

Leave a Reply