Quote:
Originally Posted by masoug
Hi,
I am REALLY confused, but what are PID loops? I am getting all sorts of weird answers. I am looking for a definitive answer...
THANKS!!!
-Masoug
|
PID is an acronym for Proportional Integral Derivative. It is one very popular and effective way to do closed-loop control.
The easiest kind of PID loop to understand is the "P-only" loop - that is, it contains only Proportional control (no Integral or Derivative).
It is fairly easy to explain and understand intuitively. Let's say you have a wheel with an encoder on it which senses the wheel's speed. Let's say you want to be able to make the wheel turn at a desired speed by sending the necessary command to the drive motor.
To create a "P" loop to do this in software, you take the desired wheel speed (called the "set speed") and you subtract the actual wheel speed as measured by the sensor (sometimes called the "process variable"). This creates a "speed error". When the speed error is positive, it means that the wheel is turning slower than what you want. When the speed error is negative, it means the wheel is turning faster than what you want.
Take the speed error and multiply it by a gain, Kp. Kp is a constant in your software which you will "tune" (by experimenting) to get the right value. This product (Kp*error) becomes your command to the motor.
OK, start asking questions!
~