Home / Electrical Engineering / PID Controller Explained: Proportional-Integral-Derivative in Practice

PID Controller Explained: Proportional-Integral-Derivative in Practice

Electrical Engineering ✍ Oliver Adam ⏱ 10 min read August 20, 2026

A PID controller continuously corrects a system toward a setpoint. Proportional action reacts to present error, integral action erases past error, derivative action anticipates future error. Three gains, one sum, eighty years of industrial control.
> At a glance: 10 minute guide · part of the electrical engineering complete guide track · worked example, quick-reference table and field notes included.

## The three terms and their jobs

Output = Kp·e + Ki·∫e + Kd·(de/dt). P pushes back proportionally but leaves a steady offset alone. I keeps accumulating until offset reaches zero — and can wind up past sensible limits. D reacts to error slope, damping fast changes — and amplifies sensor noise.

## Tuning by the Ziegler-Nichols route

Raise Kp until the system oscillates steadily (Ku at period Tu), then set Kp = 0. 6Ku, Ki = 2Kp/Tu, Kd = Kp·Tu/8. It lands near workable for temperature and motor loops — then refine by observation. Slow oscillation means too much I, jitter means too much D.

## Practical realities

Anti-windup clamps the integral when output saturates. Derivative sits on the measurement, not the setpoint, to avoid kicks. Sample time consistency matters more than elegance — a PID tuned at 10 Hz behaves differently when the loop jitters.

| Symptom | Likely cause | Correction |
| — | — | — |
| Oscillates slowly | Integral too high | Cut Ki, check anti-windup |
| Never settles at setpoint | Integral too low | Raise Ki slowly |
| Jittery around target | D on noisy sensor | Filter, reduce Kd |
| Sluggish response | Kp too low | Increase with headroom |

## How to apply this in your build

Work through the sequence below. Each step assumes the previous one passed. The numbers that need arithmetic are covered by the linked tools at the end of this guide.
1. Start with I and D at zero, raise Kp alone
2. Add integral until offset disappears
3. Add derivative only if overshoot needs damping
4. Verify under real load, not just on the bench

### Worked example

An oven holding 150 °C with P-only sits at 147 °C forever (offset). Adding integral walks the error to zero within minutes — and with anti-windup, recovers from door-open disturbances without overshooting past 155 °C. Cross-check with the Electrical Power Calculator and the result should agree to within rounding.

> Practical note from the bench. First tuning exercise we assign: a fan and a paper windmill. Kp alone teaches more in ten minutes than a week of transfer functions.

## Who this guide is for

First-time readers get a single focused topic instead of a textbook chapter, with every term defined where it first appears. Returning readers use it as a reference. The table, the worked example and the mistake list answer the questions that come up mid-build. If you teach, the structure (theory, application, example, failure modes) maps cleanly onto a lab session.

## Prerequisites and preparation

Before starting. Start with i and d at zero, raise kp alone and add integral until offset disappears. Keep the [Electrical Power Calculator](/tools/electrical-power) open, every number in the worked example is reproducible. Total time including the bench steps: about 8 to 10 minutes.

## Common mistakes to avoid

Each of these has cost real hardware on someone’s bench, usually ours:
– Tuning all three gains at once and losing the thread
– Skipping anti-windup on outputs that saturate
– Derivative on setpoint changes, injecting a kick at every step

## Key takeaways

The three terms and their jobs — the foundation of this guide. Revisit it if any measurement here surprises you.
Tuning by the Ziegler-Nichols route — the foundation of this guide. Revisit it if any measurement here surprises you.
Practical realities — the foundation of this guide; revisit it if any measurement here surprises you.

### Quick reference card

| Aspect | Where to find it in this guide |
| — | — |
| Core theory | The three terms and their jobs |
| Application steps | How to apply this in your build |
| Worked numbers | Worked example |
| Failure modes | Common mistakes to avoid |

## How this fits the electrical engineering complete guide track

This guide is one stop in a structured path. Start from the [electrical engineering complete guide](/tutorial/electrical-engineering-complete-guide) pillar page for the full map, or continue with [motor starting methods](/tutorial/dol-starter-circuit) and [star-delta control](/tutorial/star-delta-connection-guide). For the arithmetic, open the [Electrical Power Calculator](/tools/electrical-power).

## Frequently asked questions

PID or on/off control?
On/off suits slow, tolerant loads (a fridge). PID earns its complexity wherever overshoot or hunting costs quality.

How do I know my tuning is good?
The classic quarter-amplitude decay: each oscillation roughly a quarter of the last, settling quickly to setpoint.

Is there a calculator for this?
Yes, the [Electrical Power Calculator](/tools/electrical-power) run the formulas from this guide instantly, client-side, no signup.

## Related guides and tools

– The complete electrical engineering guide: [Electrical Engineering complete guide](/tutorial/electrical-engineering-complete-guide)
– Read next: [single-phase vs three-phase power: the real differences](/tutorial/single-phase-vs-three-phase)
– Also in this track: [power factor explained: why real power is not apparent power](/tutorial/power-factor-explained)
– Continue with: [transformer types and where each one belongs](/tutorial/transformer-types-applications)
– Calculate as you go: [power calculator](/tools/electrical-power) · [transformer turns ratio tool](/tools/transformer-turns-ratio) · [cable sizing helper](/tools/wire-gauge-awg)
– From here, the natural continuation is the next guide in the track index. It assumes exactly the vocabulary this page built and adds the next layer of practice.

## Verification routine

The fastest way to internalise this topic is to change one variable deliberately and predict the result before measuring. Wrong predictions are the curriculum, they show exactly which mental model needs revisiting, and the bench grades honestly.

Component substitution is a legitimate experiment as long as it is deliberate. Swap one part, predict the effect, measure, and record. That single habit converts a parts bin into a teaching lab and makes every future guide in this track faster to absorb.
## Formulas and checks from this guide

Verification checklist for this track: isolate before touching, verify with a CAT-rated meter. Re-check protective device ratings after any load change. Mains discipline is a habit, not a step, and every guide here assumes it.

Bookmark this page against your next build in the track. The checklist above is the same one used across 27 guides in this series.

## Notes from the bench

Inrush from motors or supplies. Curve C breakers tolerate it, and sizing follows the datasheet.

Isolated low-voltage work, yes. Mains and panel work needs a qualified electrician, every time.