4 ms·
This is a well explained and concise guide on theory and implementation behind it. But like many things, there's no replacement for getting your hands on a rea
by leon_sbt 7y ago
This is a well explained and concise guide on theory and implementation behind it.
But like many things, there's no replacement for getting your hands on a real life system and gaining real life intuition.
The best way to learn this? Get/make a test bench with safe-ish motor and encoder system. Play with values and measure at the performance in the system. Increasing the P value gains, makes the system "stiffer" but at the expense of stability. Put your hand on the flywheel and "fight it" safely. You can feel the I (Integral) value winding up against your steady state errors. It's quite magical.
As you start to chase the highest performance for your system, you start to think about alternative control strategies. Eventually you will dream up the concept of feedforward control loop. Try to automate the the picking of PID values, then you start to learn about Ziegler–Nichols tuning method. Gain Scheduling. Non Linear Control theory. It never stops.
(If you do any of this, please make sure the motor/flywheel won't kill you if it goes unstable, and please wire a E-stop that's easy to access when it's unstable)
- pietroglyph 7y agoThis is how I teach middle school and high school students basic controls. They implement and tune a proportional controller, then the derivative part, and then I give them a feedforward model for the plant (usually a brushed DC motor.) The PD controller and feedforward is very easy to write and is quite approachable once you see how simple it is, and it can be very exciting to see a motor “do as you command” before your eyes. I avoid integral control because it’s less effective and much harder to deal with than good feedforward. Most of the mechanisms we use (in the FIRST Robotics context) have a feedforward model and good system-identification tools so this works out well.
- computerex 7y agoReal life systems don't have to be physical. You can do a lot by playing around with digital PID controllers, graphing the sensor value over time and seeing how the graph changes as a response to changes in the gains. The benefit of this approach is that anyone with some programming skills can do it right away without any hardware.