The basic concept isn't too bad. A PID controller consists of three main parts:

That alone isn't sufficient to stabilize the system however. If the ball is rolling towards the center, it probably won't stop there, but roll through it. The ball could also sit still very close, but not exactly at the center. The tilt applied wouldn't be enough to correct that error. That's where the I and D parts come in:

Figuring out the math and how it applies to your physical system is a bit more tricky however, especially when you consider things like stability and damping. But the concept I described should give you a good idea of how they work in principle.

Comments ()

This is such a good example and description of PID loops. I'm a process engineer and spend a lot of time trying to explain PIDs to semi skilled plant operators, and fail miserably (I'm a terrible teacher), I am stealing and the video to help me lmao

Car cruise control was the example that really helped me first get the concepts, since it is something that I had a lot of actual experience, and it is easy to see the effect of the control on the system.

this video also does an excellent job of explaining it.

Controls can be esoteric and unintuitive so seeing it in action and explained so well helped.

I&C engineer here. Great explanation!

There's this vehicle building game on PC called Stormworks. PIDs are a common tool in this game but I never really quite understood them, just messed around with the values until it somewhat worked. Your explanation helps a lot!