PID control is one of the most widely used methods for making machines, robots, motors, heaters, and chemical processes reach and hold a desired condition. A PID controller compares a target value, called the setpoint, with a measured value from the system. The difference between them is the error, and the controller uses that error to decide how strongly to act.
This matters because good control makes systems faster, safer, smoother, and more accurate.
A PID controller combines three actions: proportional, integral, and derivative control. The proportional term reacts to the present error, the integral term corrects accumulated past error, and the derivative term predicts future error from the rate of change. In a closed loop, the controller output changes the plant, a sensor measures the result, and feedback returns the measurement for the next correction.
Tuning the gains Kp, Ki, and Kd changes rise time, overshoot, settling time, and steady-state error.
Key Facts
- Error signal: e(t) = r(t) - y(t), where r(t) is the setpoint and y(t) is the measured output.
- PID law: u(t) = Kp e(t) + Ki integral e(t) dt + Kd de(t)/dt.
- Proportional control increases correction in direct proportion to current error: P = Kp e(t).
- Integral control reduces steady-state error by accumulating error over time: I = Ki integral e(t) dt.
- Derivative control responds to how quickly the error is changing: D = Kd de(t)/dt.
- Increasing Kp usually decreases rise time but can increase overshoot and oscillation.
Vocabulary
- Setpoint
- The desired target value that the control system tries to reach and maintain.
- Process variable
- The measured output of the system, such as temperature, speed, position, or pressure.
- Error
- The difference between the setpoint and the measured process variable.
- Plant
- The physical system being controlled, such as a motor, furnace, drone, or valve.
- Feedback
- Information from the system output that is returned to the controller so it can correct future action.
Common Mistakes to Avoid
- Confusing the setpoint with the output: the setpoint is the desired target, while the output is what the system actually does.
- Using only a large proportional gain to remove all error: high Kp can reduce error quickly, but it may cause overshoot, oscillation, or instability.
- Adding too much integral gain: excessive Ki can make accumulated error drive the output past the target and cause slow oscillations called integral windup.
- Ignoring sensor noise when using derivative control: Kd reacts to rapid changes, so noisy measurements can make the controller output jitter.
Practice Questions
- 1 A temperature controller has setpoint r = 80 degrees C and measured output y = 72 degrees C. Find the error e = r - y, and find the proportional output if Kp = 3.
- 2 For a simple PID controller at one instant, e = 4, integral e dt = 10, de/dt = -2, Kp = 5, Ki = 0.8, and Kd = 1.5. Calculate u = Kp e + Ki integral e dt + Kd de/dt.
- 3 A motor reaches its target speed quickly but overshoots and oscillates before settling. Explain which PID gains might be adjusted to reduce overshoot and improve stability.