← ControlsCalc Home

What Is PID Control?

PID stands for Proportional, Integral, and Derivative. A PID controller continuously compares a desired value, called the setpoint, with the measured process value and adjusts an output to reduce the difference.

PID control is widely used for temperature, pressure, flow, level, speed, humidity, and other continuously varying processes.

The basic idea: measure the process, compare it to the desired value, calculate the error, and adjust the output.

For example, an HVAC controller may have a 72 °F room temperature setpoint while the measured room temperature is 68 °F. The PID controller uses that error to determine how much heating output is required.

The Basic Control Loop

A typical closed-loop control system contains several basic elements:

  1. Setpoint: the desired operating value.
  2. Process variable: the measured value.
  3. Controller: calculates the required output.
  4. Final control element: changes the process, such as a valve, damper, heater, or VFD.
  5. Process: the physical system being controlled.

The process variable is fed back to the controller, allowing the controller to continuously respond to changes.

Setpoint → Controller → Final Control Element → Process → Measurement → Controller

Understanding Error

Error is the difference between the setpoint and the measured process variable.

Error = Setpoint − Process Variable
Example: Setpoint = 75 °F
Process variable = 72 °F

Error = 75 − 72 = +3 °F

The sign of the error matters. Depending on whether the controller is configured for direct or reverse action, a positive error may cause the output to increase or decrease.

Proportional Control

The proportional term responds to the current error. A larger error produces a larger proportional contribution to the controller output.

Proportional Contribution = Kp × Error

Kp is the proportional gain.

If:
Error = 4
Kp = 2

Proportional Contribution = 2 × 4 = 8%

Increasing Proportional Gain

Increasing proportional gain makes the controller respond more strongly to a given error. Excessive gain can make a system oscillate or become unstable, while insufficient gain can make the response slow or leave substantial error.

Some controllers do not use gain directly. They may instead specify proportional band. The relationship between gain and proportional band depends on the controller's convention.

Integral Control

Integral action responds to accumulated error over time. Its purpose is to move the controller output when a persistent error remains.

This is particularly important in processes where a proportional-only controller settles with an offset from the setpoint.

Think of integral as accumulated correction. A small error that persists can eventually produce a significant change in controller output.

The integral term depends on both the magnitude and duration of the error. Different controllers implement reset/integral calculations using different conventions and time units.

Integral Windup

A common PID problem occurs when the controller output reaches a limit while integral action continues accumulating. When the process eventually moves back toward the operating range, the accumulated integral term can cause excessive output and a prolonged recovery.

Many modern controllers include some form of anti-reset windup to limit this behavior.

Derivative Control

Derivative action responds to the rate at which the error or process variable is changing.

Whereas proportional action looks at the current error and integral action considers accumulated error, derivative action provides information about how quickly the system is changing.

Derivative is predictive in nature. A rapidly changing process can produce a derivative response before the process reaches the setpoint.

Derivative action can help reduce overshoot in some processes, but it can also amplify measurement noise. For that reason, derivative filtering is common in practical controllers.

Bias and Manual Reset

Bias is the controller output around which the PID corrections operate. Depending on the controller, it may also be called manual reset.

Consider a heating system that normally requires approximately 40% valve output to maintain its operating temperature. A bias near that operating point gives the controller a useful starting output.

The exact terminology and behavior vary between controller manufacturers, so the controller documentation should always be checked.

PID Output Equation

A simplified representation of controller output is:

Output = Bias + Proportional Contribution + Integral Contribution + Derivative Contribution

Using proportional gain:

Output = Bias + (Kp × Error) + Integral Contribution + Derivative Contribution

The actual equation used by a particular PLC, DDC controller, or process controller may differ. Controller configuration can also include output limits, deadband, filtering, sample time, anti-windup, setpoint tracking, and direct/reverse action.

Practical PID Example

A temperature controller has:

Setpoint = 75 °F
Process Variable = 72 °F
Bias = 50%
Kp = 2
Integral contribution = 5%
Derivative contribution = 0%

Error = 75 − 72 = 3 °F

Output = 50 + (2 × 3) + 5 + 0

Output = 61%

This example illustrates the purpose of the individual terms. The bias provides the starting output, proportional action responds to the current error, and integral action adds a correction based on accumulated error.

PID Tuning

PID tuning is the process of selecting controller parameters that produce an acceptable response from the controlled process.

There is no single set of PID values that works for every process. The appropriate settings depend on the process dynamics, sensor behavior, final control element, loop scan time, delays, and the response that is required.

Common Tuning Considerations

  • How quickly does the process respond to an output change?
  • Is there significant process dead time?
  • Does the sensor introduce filtering or delay?
  • Can the final control element respond smoothly?
  • Is overshoot acceptable?
  • How much process noise is present?
  • What are the minimum and maximum output limits?

A loop that is stable but slow may require different tuning from a loop where rapid response is important.

Common PID Problems

Oscillation

Continuous oscillation can result from excessive gain, excessive integral action, process delay, or other loop dynamics.

Slow Response

A controller may respond slowly when proportional action is too weak, integral action is too slow, or the process itself has significant lag.

Overshoot

Overshoot occurs when the process moves beyond the desired operating point. Excessive gain, aggressive integral action, process delay, or accumulated integral can contribute.

Output Saturation

If the controller reaches 0% or 100% output, the final control element may no longer be able to provide additional correction. Integral windup can become a problem if the integral term continues accumulating.

Noisy Output

Measurement noise can cause frequent controller output changes, particularly when derivative action is enabled. Filtering or different tuning may be required.

PID in PLC and HVAC Controls

PID control appears throughout industrial automation and building automation.

  • Supply-air temperature control
  • Space temperature control
  • Chilled-water valve control
  • Heating-water valve control
  • Duct static-pressure control
  • Fan VFD speed control
  • Pump pressure control
  • Flow control
  • Tank level control
  • Process temperature control

In a typical BAS application, a temperature sensor provides the process variable, a controller executes the PID algorithm, and the resulting output modulates a valve, damper, or VFD.

In a PLC application, the same basic concept can be used for process variables such as pressure, flow, level, speed, or temperature.

Calculate PID Output

Use the ControlsCalc PID Output / Bias Calculator to work through the simplified controller-output equation.

PID Output / Bias Calculator → Calculate controller output from error, proportional gain, bias, and integral and derivative contributions.

Related Controls Tools