Neat demonstration of proportional and PID control systems

Neat demonstration of proportional and PID control systems

A very nice demo that shows the significant improvements to be had using a PID control vs. a simple P control via Makezine’s blog.

For your consideration when planning your own robot control system

Joe J.

If only I could tune ours half as well as that guy.

Don’t sell yourself short - I’ve seen some pretty amazing PID applications in FIRST. Remember that response is both torque and mass dependent, and as far as that goes he has a huge advantage (high torque for very low mass) that allows his motions to be much quicker than ours.

Not wanting to be one who splits hair… but in this case I will.
IMHO, his tuning needs a bit more work. There is still a bit of overshoot or ringing in it’s motion. I’ll bet it can be tuned even better.

P and I aren’t that hard to implement with some testing. D is hard to wrap your mind around a lot of the times as a newer programmer.

P helps make sure you get near your target, and decelerate as it approaches it
I makes sure you reach your target but overshots and undershots if gains are incorrect.
D is hard to explain.

In a nutshell:

P gives you fast dynamic response.

I gives you steady-state accuracy.

D allows P to be set to a higher gain for even better dynamic response. (D can remove some of the overshoot caused by high P values).


Think “D is for damping”. It is kind of like software friction. It always acts in the opposite direction of motion, and is proportional to how fast the object is moving. The faster the object moves, the more the D control tries to slow it down. This helps to settle out oscillation and remove overshoot.

Yup. That’s why you can crank up P if you add some D. Thereby getting even better dynamic response.


I love PID controls. Back in college, I had a project where I balanced a vertical bar mounted to a bearing on a swinging arm (like balancing a ruler in the palm of your hand). You could hit that bar all day and it would never fall over. Too bad my students were not interested by my retellings of that project. Maybe this video will spark their interest and show the benefits of PID controls (especially in the context of autonomous drivetrains). Thanks for sharing!

Unstable equilibrium. Some high-performance military aircraft today are aerodynamically unstable, and are able to fly only because high-speed computers control the flight surfaces. Computer goes down, aircraft goes down.


What I hate about PID control is that it allows the guess and check method of control without really coming up with a conclusion of why you tried certain values. It completely eliminates the analysis portion of closed loop feedback – analysis that could fundamentally improve even the mechanical side of the design.

Aside from that fundamental flaw, yes PID is good enough for FRC. Who has the time to truly model a subsystem in FRC anyways?

While you can tune PID controllers by trial and error, there are certainly plenty of analysis methods to make your tuning more efficient and at least get you in the right ballpark.

As for modeling subsystems, we do it quite often and find it very helpful.

I haven’t yet had the fortitude to do a real full-state feedback controller on a FIRST robot YET, but I see it coming. I should have proposed it this year.

There are tried-and-true methods of tuning PID controllers, based on theory and years of experience, that I would not characterize as “guess and check”. If the P, I, and D are tuned in the proper order, with the gain in each step being adjusted to obtain specific dynamic behaviors, a near-optimum solution can often be reached in only one or two passes.