Control, Gateways & Networked Systems · Study deck

PID Control Theory

Proportional-integral-derivative (PID) control changes an output from the gap between a target and a measured result.

Gateway Gus is your guide for this deck.

controltheory
iotclass.org

After studying this chapter

Learning objectives

You will be able to:

  • Explain the PID control equation without treating it as a black box.
  • Describe how proportional, integral, and derivative actions change loop behavior.
  • Identify steady-state offset, overshoot, oscillation, windup, and derivative noise sensitivity.
  • Choose P, PI, PD, or PID based on response data rather than habit.
PID configuration choice map from P-only to PI, PD, and PID based on offset, overshoot, noise, and actuator limits.
PID configuration choice map from P-only to PI, PD, and PID based on offset, overshoot, noise, and actuator limits.
iotclass.org

Major section

Start With the Error You Can Measure

Proportional-integral-derivative (PID) control changes an output from the gap between a target and a measured result.

  • A calm demo may look stable.
  • Opening the lid, adding cold liquid, delaying the sensor, or limiting heater power can expose a slow response, a lasting error, or repeated overshoot.
  • A good graph does not prove safety.
PID control loop from setpoint and error through the controller and plant to the returned measurement.
PID control loop from setpoint and error through the controller and plant to the returned measurement.
iotclass.org

Major section

Start With the Error You Can Measure (continued)

A PID controller does not begin with three magic constants.

  • These plain checks come before any claim that the tune is good.
  • These results apply only to the tested plant, sensor, timing, and limits.
  • The proportional, integral, and derivative terms are three different answers to that gap.
Complete PID Controller - P (Present) + I (Past) + D (Future)
Complete PID Controller - P (Present) + I (Past) + D (Future)
iotclass.org

Major section

Everyday Analogy: Changing Lanes in a Crosswind

A steady crosswind can cancel out a fixed steering angle entirely, so the car keeps drifting straight no matter how the driver preset Kp.

  • The driver responds by gradually increasing the steering angle until the car actually starts moving toward the lane again.
  • At higher speed, the same steering input moves the car across lanes faster, so the correction needs to ease off sooner to avoid overshoot.
  • A compact way to keep the three terms straight: proportional corrects instances of error, integral corrects the accumulation of error, and derivative corrects the present error against the error the last time it was checked.
iotclass.org

Major section

Reading Response Shape

PID theory becomes practical when a team can look at a response shape and connect it to a term decision.

  • Windup points beyond gain selection to saturation handling, while a noisy output makes derivative filtering and sensor quality the first checks.
  • The before-and-after response is the evidence that the selected term or safeguard addressed the actual problem.
  • If the process settles away from the setpoint, proportional action may not be enough.

Why it matters

If the process crosses the target too aggressively, reduce excessive gain, check integral buildup, or add derivative damping when the measurement is clean enough.

Response-shape guide mapping offset, overshoot, oscillation, windup, and noisy output to PID term decision questions.
Response-shape guide mapping offset, overshoot, oscillation, windup, and noisy output to PID term decision questions.
iotclass.org

Major section

Windup and Derivative Filtering

When an actuator is already at its limit, the integral term may keep accumulating error.

  • When the process finally responds, the stored integral can drive a large overshoot.
  • Derivative action magnifies rapid measurement changes.
  • A noisy sensor can make the controller output jitter unless derivative filtering, sensor filtering, and sample timing are checked together.
Response-shape guide mapping offset, overshoot, oscillation, windup, and noisy output to PID term decision questions.
Response-shape guide mapping offset, overshoot, oscillation, windup, and noisy output to PID term decision questions.
iotclass.org

Major section

Control-Loop Decision Record

A PID loop record keeps theory, tuning, implementation, and proof connected.

  • Saturation and anti-windup belong beside output limits; filtering belongs beside the sensor noise and delay it changes.
  • The safety limit constrains what tuning may attempt, while the owner accepts residual behaviour and responds to faults.
  • Limits: Output bounds, integral bounds, actuator saturation, and fail-safe state.

Why it matters

This layout prevents a gain set from travelling alone after the conditions and protections that made it acceptable have changed.

PID control-loop decision record tying loop goal, term choice, tuning proof, saturation handling, filtering, safety limit, owner, and recheck trigger.
PID control-loop decision record tying loop goal, term choice, tuning proof, saturation handling, filtering, safety limit, owner, and recheck trigger.
iotclass.org

Major section

Common Pitfalls

Enabling all three terms before proving which loop problem each term solves makes tuning harder and hides root causes.

  • The equation does not document sample timing, actuator limits, filter choices, windup behavior, or safety fallback.
  • A controller designed as if actuators can follow every requested output may fail badly when real devices hit limits.
  • Derivative gain can turn ordinary sensor noise into control chatter when the measurement path is not filtered.
PID control-loop decision record tying loop goal, term choice, tuning proof, saturation handling, filtering, safety limit, owner, and recheck trigger.
PID control-loop decision record tying loop goal, term choice, tuning proof, saturation handling, filtering, safety limit, owner, and recheck trigger.
iotclass.org

Major section

Overview: PID Terms Are Evidence Claims

A PID setting is not just a number.

  • Each enabled term is a claim about the loop: proportional action claims the current error needs immediate correction, integral action claims persistent offset must be removed, and derivative action claims the trend needs damping.
  • The useful habit is to connect each term to an observed response shape and to the risk it introduces.
  • A controller that reaches the setpoint once is not fully proved until saturation, noise, disturbance, sampling, and recovery behavior have also been checked.
  • The returned measurement closes the loop only when it represents the controlled variable with known timing and sign.
PID control loop from setpoint and error through the controller and plant to the returned measurement.
PID control loop from setpoint and error through the controller and plant to the returned measurement.
iotclass.org

Major section

Sampled and Limited Loops

Real PID controllers run at a sample interval and drive a limited actuator.

  • Those states explain why a gain set that works in one trace can fail later.
  • A slower sample interval can make derivative action stale.
  • A saturated actuator can make integral action store a command the process cannot follow.
iotclass.org

Deck summary

Key takeaways

Proportional-integral-derivative (PID) control changes an output from the gap between a target and a measured result.

  • A PID controller does not begin with three magic constants.
  • A steady crosswind can cancel out a fixed steering angle entirely, so the car keeps drifting straight no matter how the driver preset Kp.
  • PID theory becomes practical when a team can look at a response shape and connect it to a term decision.
  • When an actuator is already at its limit, the integral term may keep accumulating error.
iotclass.org

Retrieval practice

Recall check 1 of 3

Gateway Gus says: answer from memory, then check your reasoning.

Q1In PID control, which action responds to accumulated (persistent) error over time?

AProportional action, reacting only to instantaneous error as if that clears offset.
BDerivative action, reacting to trend rather than accumulated error.
CIntegral action, accumulating persistent error but needing windup limits.
DUse feedforward action because the open-loop estimate already captures the process response.
Show answer

Answer: C Integral action responds to accumulated error, removing steady-state offset, but it can wind up if unbounded.

iotclass.org

Retrieval practice

Recall check 2 of 3

Gateway Gus says: answer from memory, then check your reasoning.

Q2A closed-loop controller is stable but settles below the setpoint. The actuator still has room to increase output. Which PID theory decision is most appropriate?

AIncrease derivative action as if it removes steady-state offset alone.
BDisable feedback because a stable offset means control is correct.
CUse full PID immediately without diagnosing the persistent offset.
DAdd integral action for persistent offset; verify anti-windup limits.
Show answer

Answer: D Integral action addresses persistent offset, but the loop record must also check actuator saturation and windup protection.

iotclass.org

Retrieval practice

Recall check 3 of 3

Gateway Gus says: answer from memory, then check your reasoning.

Q3A PI loop reaches the setpoint in a clean test, but during a field disturbance the actuator saturates for 40 seconds and the loop overshoots badly when the process recovers. What should the proof record require?

AKeep settings because one clean setpoint result proves field recovery.
BAdd derivative damping alone as a substitute for integral windup evidence.
CRecord saturation, integral limit, anti-windup, recovery trace, and clamp.
DRemove actuator limits from records because controller output alone captures the saturation behavior.
Show answer

Answer: C PID term choices need proof under real sampled-loop limits, including saturation, anti-windup, accumulator bounds, output clamps, recovery traces, and retest triggers.

iotclass.org

Print reference

Answers

Answer key.

  1. C · Integral action responds to accumulated error, removing steady-state offset, but it can wind up if unbounded.
  2. D · Integral action addresses persistent offset, but the loop record must also check actuator saturation and windup protection.
  3. C · PID term choices need proof under real sampled-loop limits, including saturation, anti-windup, accumulator bounds, output clamps, recovery traces, and retest triggers.
iotclass.org