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.
de/dt = (e − e[k−1]) / Δt
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.
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.
| Gain | Rise time | Overshoot | Settling | Steady-state error |
|---|---|---|---|---|
| Kp ↑ | Decreases | Increases | Small change | Decreases |
| Ki ↑ | Decreases | Increases | Increases | Eliminated |
| Kd ↑ | Small change | Decreases | Decreases | No effect |
| Type | Kp | Ti | Td |
|---|---|---|---|
| P | 0.50·Ku | ∞ | 0 |
| PI | 0.45·Ku | Pu / 1.2 | 0 |
| PID | 0.60·Ku | Pu / 2 | Pu / 8 |
Conversion to parallel gains: Ki = Kp / Ti and Kd = Kp · Td.
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
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 for | Rearranged formula |
|---|---|
| u | u = Kp·e + Ki·∫e dt + Kd·de/dt |
| Kp | Kp = (u − Ki·∫e dt − Kd·de/dt) / e |
| Ki | Ki = (u − Kp·e − Kd·de/dt) / ∫e dt |
| Kd | Kd = (u − Kp·e − Ki·∫e dt) / (de/dt) |
PID Formula Variables
| Symbol | Meaning |
|---|---|
| u | Controller output (control signal sent to the actuator) |
| e | Error: setpoint minus measured process value |
| ∫e dt | Integral of the error over time (accumulated error) |
| de/dt | Rate of change of the error |
| Kp, Ki, Kd | Proportional, integral and derivative gains |
| Ti, Td | Integral 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
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.
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| Parameter | Value |
|---|---|
| Kp | 2.0 |
| Ki | 0.5 |
| Kd | 0.1 |
| e(t) | 5.0 |
| ∫e(t)dt | 10.0 |
| de/dt | 2.0 |
| Parameter | Value |
|---|---|
| Kp | 1.0 |
| Ki | 0.2 |
| Kd | 0.5 |
| e(t) | -3.0 |
| ∫e(t)dt | -5.0 |
| de/dt | -1.0 |
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
Related calculators · Control Systems
Recently updated formulas
Suggest an improvement
Found a mistake? Have a better example? Let us know.
You may send up to 3 suggestions per 24 hours.