Home / Robotics & Controls / Control Systems / PID Controller Output

Formula & Calculator

PID Controller Output

A PID controller is the workhorse of automatic control. It keeps a system at the desired value (setpoint) by reacting to the error in three ways. The proportional term responds to how big the error is right now. The integral term responds to how long the error has persisted, gradually eliminating any leftover offset. The derivative term responds to how fast the error is changing, damping overshoot. For example, a drone keeping its altitude uses all three to stay steady in wind. Tuning the three gains Kp, Ki, and Kd is the core skill of control engineering.

Robotics Control Systems Feedback
CONTROL SYSTEMS TOOLS

PID Controller Output Calculator

Compute a PID controller's output end to end — solve for the output or any gain, see the P, I and D contributions, derive the integral and derivative from samples, and watch a closed-loop step response with your gains.

u(t) = Kp·e + Ki∫e dt + Kd·de/dt
Solve for
Controller Output (u) The control signal sent to the actuator: the sum of the proportional, integral and derivative terms.
units
Enter a valid output value.
Gains
Proportional Gain (Kp) Scales the present error. Larger Kp reacts harder and faster to the current error.
×
Enter a valid gain (0 or greater).
Integral Gain (Ki) Scales the accumulated error. Removes steady-state offset but can cause overshoot and windup.
1/s
Enter a valid gain (0 or greater).
Derivative Gain (Kd) Scales the rate of change of the error. Adds damping and anticipates where the error is heading.
s
Enter a valid gain (0 or greater).
Signals
Error (e) Setpoint minus measured process value at this instant.
units
Enter a valid error value.
Error Integral (∫e dt) Accumulated error over time. Enter it directly, or derive it from samples in Advanced mode.
units·s
Enter a valid integral value.
Error Derivative (de/dt) Rate of change of the error. Enter it directly, or derive it from samples in Advanced mode.
units/s
Enter a valid derivative value.
∫ += e·Δt
de/dt = (e − e[k−1]) / Δt
Enter a sample time greater than 0 and valid previous values.
Output minimum must be less than the maximum.
CONTROLLER OUTPUT
29.5units P-DOMINANT
P 20 + I 10 + D −0.5
u = Kp·e + Ki·∫e dt + Kd·de/dt
P term (Kp·e)
—
I term (Ki·∫e dt)
—
D term (Kd·de/dt)
—
Integral time Ti = Kp/Ki
—
Derivative time Td = Kd/Kp
—
Output after limits
—
Step-by-step solution
Sensitivity (±1% change)
Closed-loop step response with your gains

Simulates a unit setpoint step on a first-order plant (gain 1, time constant τ) using your Kp, Ki and Kd, with the derivative taken on the measurement. In Advanced mode the output limits are applied, with no anti-windup, so you can see saturation and integral windup.

PID control loop diagram
r(t) + − e(t) Kp Ki ∫ dt Kd d/dt Σ u(t) Plant y(t) measured output feedback

The error e = r − y feeds three parallel paths — proportional, integral and derivative — whose outputs are summed into the control signal u that drives the plant. The measured output y is fed back to form the error.

Reference values
Effect of increasing each gain
GainRise timeOvershootSettlingSteady-state error
Kp ↑DecreasesIncreasesSmall changeDecreases
Ki ↑DecreasesIncreasesIncreasesEliminated
Kd ↑Small changeDecreasesDecreasesNo effect
Ziegler–Nichols tuning (Ku = ultimate gain, Pu = ultimate period)
TypeKpTiTd
P0.50·Ku∞0
PI0.45·KuPu / 1.20
PID0.60·KuPu / 2Pu / 8

Conversion to parallel gains: Ki = Kp / Ti and Kd = Kp · Td.

What each term does

Proportional (present)

Responds to the error right now. Too low is sluggish; too high oscillates, and it can never fully remove a constant offset by itself.

Integral (past)

Accumulates error over time and keeps pushing until the offset is gone. Too much causes overshoot and integral windup when the output saturates.

Derivative (future)

Reacts to how fast the error is changing, adding damping. It amplifies measurement noise, so real controllers filter it.

What Is a PID Controller?

A PID controller is a feedback controller that continuously computes an error — the difference between a desired setpoint and a measured process value — and applies a correction made of three parts: a proportional term, an integral term and a derivative term. It is the most widely used control algorithm in industry, from thermostats and motor drives to flight controllers.

The PID Output Formula

u(t) = Kp·e(t) + Ki·∫e(t) dt + Kd·de(t)/dt

The proportional term Kp·e reacts to the present error. The integral term Ki·∫e dt sums the error over time, so a persistent small error eventually produces a large correction. The derivative term Kd·de/dt reacts to the error's rate of change, damping the response. This calculator uses the parallel (ideal) form, where each gain multiplies its term independently.

How to Calculate the Controller Output

Choose the unknown above, enter the remaining values, and the calculator rearranges the formula. To solve for a gain, the matching signal must be non-zero, since it appears as a divisor.

Solve forRearranged formula
uu = Kp·e + Ki·∫e dt + Kd·de/dt
KpKp = (u − Ki·∫e dt − Kd·de/dt) / e
KiKi = (u − Kp·e − Kd·de/dt) / ∫e dt
KdKd = (u − Kp·e − Ki·∫e dt) / (de/dt)

PID Formula Variables

SymbolMeaning
uController output (control signal sent to the actuator)
eError: setpoint minus measured process value
∫e dtIntegral of the error over time (accumulated error)
de/dtRate of change of the error
Kp, Ki, KdProportional, integral and derivative gains
Ti, TdIntegral time Kp/Ki and derivative time Kd/Kp (derived, not entered)

Computing the Integral and Derivative from Samples

A digital controller does not have a continuous integral or derivative, so it approximates them each sample. The integral is accumulated as the previous integral plus e·Δt, and the derivative is estimated as (e − e[k−1]) / Δt. Turn on the sampling option in Advanced mode to compute both values this way instead of typing them in.

Output Limits and Integral Windup

Real actuators saturate: a valve cannot open past 100%. If the integral term keeps accumulating while the output is pinned at its limit, it winds up and the controller overshoots badly once the error reverses. Advanced mode applies output limits so you can see when a result saturates; practical controllers add anti-windup, such as stopping integration while saturated.

PID Output Calculation Example

Given: Kp = 2, Ki = 0.5 1/s, Kd = 0.1 s, e = 10, ∫e dt = 20, de/dt = −5
P = 2 × 10 = 20,   I = 0.5 × 20 = 10,   D = 0.1 × (−5) = −0.5
u = 20 + 10 − 0.5 = 29.5 → Ti = Kp/Ki = 4 s, Td = Kd/Kp = 0.05 s

Frequently Asked Questions

The derivative tracks the error's direction of change. A positive error that is shrinking has a negative rate of change, so the D term subtracts from the output, easing off before the process reaches the setpoint and reducing overshoot.

This calculator uses the parallel form with independent gains Kp, Ki and Kd. The standard (ISA) form is u = Kp·(e + (1/Ti)∫e dt + Td·de/dt), where Ki = Kp/Ti and Kd = Kp·Td, so the stats panel shows Ti and Td for converting between the two.

Solving for a gain divides by its signal. If e, ∫e dt or de/dt is zero, that term contributes nothing to u whatever the gain is, so the gain cannot be determined from the output.

Moderate derivative action adds damping, but it amplifies high-frequency measurement noise and can make the output jittery. Practical implementations low-pass filter the derivative and often differentiate the measurement rather than the error to avoid kick on setpoint changes.

No. It is an illustration on a simple first-order plant with unit gain, useful for seeing how your gains trade speed against overshoot. Real plants have delays, higher-order dynamics and noise, so tune on the actual system.

Calculating PID Output...

Variables

Symbol Quantity Unit
u(t) Control output
e(t) Error signal
K_p,K_i,K_d Controller gains

What it means

The PID (Proportional‑Integral‑Derivative) controller is the most widely used feedback control algorithm. It calculates the control output u(t) based on the error e(t) = setpoint − measured value. The proportional term Kp·e provides immediate response to the current error; the integral term Ki∫e dt eliminates steady‑state error by summing past errors; the derivative term Kd·de/dt anticipates future error by reacting to the rate of change. The three gains (Kp, Ki, Kd) must be tuned to achieve desired performance (speed, stability, overshoot). PID controllers are used in temperature control, motor speed regulation, drone flight control, and many other applications. Understanding the PID formula is essential for control engineers to design stable and responsive systems. It is also the foundation for more advanced controllers like adaptive and predictive control.

Worked example

PID Controller Output – Two Detailed Examples

Real‑World
Scenario: A temperature control system for a chemical reactor uses a PID controller to maintain a setpoint of 100°C. The current error e(t) = 5°C, the integral of error over time is 10°C·s, and the derivative of error is 2°C/s. The controller gains are Kp = 2.0, Ki = 0.5, Kd = 0.1. The control engineer calculates the output u(t) = Kp·e(t) + Ki∫e(t)dt + Kd·de/dt = 2×5 + 0.5×10 + 0.1×2 = 10 + 5 + 0.2 = 15.2. This output signal is sent to the heating element to adjust the temperature, helping to minimise overshoot and steady‑state error.
ParameterValue
Kp2.0
Ki0.5
Kd0.1
e(t)5.0
∫e(t)dt10.0
de/dt2.0
1Proportional term = 2.0 × 5.0 = 10.0
2Integral term = 0.5 × 10.0 = 5.0
3Derivative term = 0.1 × 2.0 = 0.2
4u(t) = 10.0 + 5.0 + 0.2 = 15.2
Result 15.2 ✓ Controller output
Scenario: A DC motor speed controller uses a PID loop to maintain a desired RPM. The error e(t) = -3 rad/s (motor is too fast), integrated error = -5 rad, and derivative of error = -1 rad/s². Gains are Kp = 1.0, Ki = 0.2, Kd = 0.5. The output is u(t) = 1×(-3) + 0.2×(-5) + 0.5×(-1) = -3 - 1 - 0.5 = -4.5. This negative output reduces the motor voltage, slowing it down. The engineer uses this to achieve smooth speed regulation under varying loads.
ParameterValue
Kp1.0
Ki0.2
Kd0.5
e(t)-3.0
∫e(t)dt-5.0
de/dt-1.0
1Proportional = 1.0 × (-3.0) = -3.0
2Integral = 0.2 × (-5.0) = -1.0
3Derivative = 0.5 × (-1.0) = -0.5
4u(t) = -3.0 - 1.0 - 0.5 = -4.5
Result -4.5 ✓ Corrective output
Insight: The PID controller combines proportional, integral, and derivative actions. The proportional term responds to current error, the integral term eliminates steady‑state error, and the derivative term anticipates future error. Tuning the gains is critical for stable and responsive control.

Common mistakes

  • PID output: u(t) = Kp·e(t) + Ki∫e dt + Kd·de/dt – all three terms must be in the same units.
  • Error e(t): Setpoint − Process Variable – sign convention matters (positive error = below setpoint).
  • Integral windup: Integral term can accumulate large values – use anti‑windup techniques.
  • Derivative kick: A sudden change in setpoint causes a large derivative spike – use derivative on measurement (not error) to avoid.
  • Tuning: Gains must be tuned for the specific system – no universal values.

Applications

The PID controller output, u(t) = K_p·e(t) + K_i∫e(t)dt + K_d·de/dt, is the most widely used control algorithm in industrial and robotics applications. It combines proportional (P), integral (I), and derivative (D) actions to correct the error between a desired setpoint and the measured process variable. Each term contributes to the control signal: the P term responds to the current error, the I term eliminates steady‑state error by accumulating past errors, and the D term anticipates future error by reacting to the rate of change. Engineers use PID controllers for temperature regulation, motor speed control, robot joint positioning, and chemical process control. By tuning the three gains, they can achieve the desired trade‑off between responsiveness, stability, and precision. This versatile algorithm is implemented in programmable logic controllers (PLCs), microcontrollers, and embedded systems, making it essential for modern automation. Understanding PID control is fundamental for any control systems engineer.

  • Industrial process control (temperature, pressure, flow)
  • DC motor speed and position control in robotics
  • Quadcopter flight stabilisation and autopilot systems
  • Automotive cruise control and engine management
  • Heating, ventilation, and air conditioning (HVAC) control