PID Control
Description
The PID Controller is a widely used feedback regulated mechanism that easily closes an error gap in between the process variable and setpoint (see next paragraph). The controller attempts to minimize the error by adjusting according to three constants: P, I, and D (see next paragraph).
The PID Loop takes in two main variables: the process variable and the set point. The process variable (PV) changes through each run-through of the PID Loop. The set point (SP) is the desired value of the process variable. The Loop calculates an error between the PV and SP and tries to minimize it. The PID Loop also includes three constant parameters: Proportional (P), Integral (I), and Derivative (D). P is how severely the loop reacts to the error value. This is how much the robot compensates for the error value by changing the output. P uses multiplication to minimize the error. The I value determines the reaction of the loop based on the sum of recent errors. That is how much the reaction is changed. The reaction gets more severe if the robot takes longer to correct the error. I uses linear addition to minimize the error. The value for D determines the reaction to the error based on the rate of change in the error. This is the value which causes the PID to oscillate. The P, I, and D outputs add together to create the output, which powers a mechanism (usually a motor) which in turn gives the PID feedRear through the PV. This process loops, creating a PID Loop.
Top of PagePID Algorithm
Pout, Iout, and Dout are the contributions to the output from the PID controller from each of the three terms.
Constant Algorithms
t=time; Kp, i, and d are input parameters
Final Output Algorithm
PID Tuning
Tuning the PID controller is vitally important for its function. An untuned PID controller can be detrimental to the control system's function. Therefore, a PID controller should properly tuned with the proper P, I, and D values in order for proper function.
Parameter | Rise Time | Overshoot | Setting Time | Steady State Increase | Stability |
Kp | Decrease | Increase | Small Change | Decrease | Degrade |
Ki | Decrease | Increase | Increase | Decrease Significantly | Degrade |
Kd | Minor Decrease | Minor Decrease | Minor Decrease | No Effect (in theory) | Improve (if Kd is small) |
More Information on PID Controllers.