What Is PID and Why Use It

Proportional-integral-derivative (PID) is a method for automatically keeping a measured value close to a target. It repeatedly checks the difference and adjusts an output, such as heater power, a valve opening, or a motor command.

The letters stand for Proportional, Integral, and Derivative. They describe three ways the controller can work out how much correction to apply. You will meet them one at a time.

Explained like you're five

Imagine trying to drive at 60 km/h. Holding the accelerator in one position might work on a flat road, but the car slows when you reach a hill. You look at the speed, compare it with the speed you want, and adjust the accelerator.

A feedback controller does that kind of job repeatedly. You choose the target; it keeps watching the measurement and making corrections as conditions change.

What you will learn

  • Explain what a PID controller does and why feedback is useful.

  • Describe the basic jobs of P, I, and D in plain language.

  • Recognize a task that calls for process control and one that needs ordinary switching logic.

A simple job for PID

A heater starts at 20 °C. You want it to reach 50 °C and stay there. The controller chooses how much heater power to apply.

This is the standard Example: Perfect Process from PID Practice, with its prepared settings. Follow three things:

  • Target: the temperature you want, 50 °C.

  • Measured temperature: the green line showing how warm the heater is.

  • Heater output: the blue lower line showing the requested power, from 0% to 100%.

See automatic control work

Press Run and watch the full 60 simulated seconds. Slow Simulator speed to 1× if you want more time to watch, or use Pause and Resume. The controller settings are prepared for you.

Watch the measured temperature approach the target and the heater output change as it gets closer. Use Restart to repeat the same example.

The controller requests more power at the start, then eases back as the temperature approaches 50 °C. It continues supplying some heat to hold the temperature near the target.

You could watch the measurement and make those adjustments yourself. Feedback control takes over that repeated job: measure, compare with the target, adjust the output, and check again. The thing you are controlling is called the process; temperature, pressure, flow, liquid level, and speed are all examples of quantities you can regulate.

Why not just turn it fully on or off?

Sometimes that is enough. A simple thermostat can switch a heater on below one temperature and off above another, allowing the temperature to move within an acceptable range.

When you need closer control or smoother adjustments, PID gives you a way to choose intermediate commands, such as 30% or 55% heater power, and keep revising them. The aim is to bring the measurement toward its target and hold it there as conditions change.

The right choice depends on what the process needs. A wider temperature swing may be acceptable in one tank and a problem in another.

What do P, I, and D actually do?

The difference between the target and the measurement is called error. For the heater, being below the target means more heat is needed.

PartWhat it pays attention toIts job in the heater example
P — ProportionalHow large the error is right nowAsk for a stronger correction when the temperature is farther from the target.
I — IntegralError that persists over timeBuild up a correction when the temperature keeps remaining a little below the target.
D — DerivativeHow quickly the measurement is changingHelp ease off the correction when the temperature is approaching the target quickly.

These are contributions to one output command. You can begin with proportional control, add integral action to address a lasting gap, and use derivative action when it helps the response. A controller with P and I active and D set to zero is called proportional-integral (PI) control.

D responds to a measured trend; it does not know the future. More of any term is not automatically better. Choosing how strongly each term acts is called tuning, and the later lessons let you see the tradeoffs before choosing settings.

Where does PID fit in a PLC program?

PID is a control method that can run inside a programmable logic controller (PLC), a dedicated controller, or other software. A sensor supplies the measurement, and an actuator carries out the output command—for example, a valve or a heater.

Your PLC program might decide when heating is allowed and handle the operating sequence. The PID loop decides how much heat to request while automatic temperature control is active. A motor that only needs to start and stop may need switching logic; controlling its speed around a changing target is a different job.

Feedback also needs a useful measurement and an output that can influence the process. A wrong sensor reading or an undersized heater needs attention beyond changing PID settings.

Check yourself

  1. A heater must warm from 20 °C to 50 °C. What should the controller keep measuring, and what should it adjust?

  2. A conveyor only needs to turn on when Start is pressed and turn off when Stop is pressed. Does that requirement call for PID?

  3. A proportional controller leaves a small temperature gap that persists. Which additional term is intended to help remove that gap?

Check your explanation

The controller measures the temperature and adjusts the heater command. The target stays at 50 °C while the heater warms up.

The conveyor's stated requirement needs start/stop logic. There is no measured speed target to regulate in that requirement.

Integral action builds correction while error persists. Later, you will compare a P-only heater response with PI control and see both the benefit and the tradeoff.

Next, SP, PV, CV, and the Feedback Loop lets you practice identifying the target, measurement, and command, then read the heater's response in more detail.

Enable JavaScript to run the embedded simulator and complete the interactive exercises.