Control, Gateways & Networked Systems · Study deck

PID Tuning and Applications

Picture a room heater that reaches its target quickly but overshoots into an unsafe temperature.

Gateway Gus is your guide for this deck.

tuning
Gateway Gus, the module guide, in a scene from this chapter.
iotclass.org

After studying this chapter

Learning objectives

You will be able to:

  • Plan a PID tuning session with safe limits, test signals, and rollback criteria.
  • Use manual tuning and Ziegler-Nichols style tests as starting methods, not final proof.
  • Match P, PI, PD, or PID configurations to application dynamics and measurement quality.
  • Document tuning records so later changes can be checked without guesswork.
iotclass.org

Major section

Start With a Safe Test Change

Faster response is not an improvement when the physical result becomes risky.

  • An actuator means a part that turns an electrical command into physical action.
  • This runway does not prove that one tuning method suits every process.
  • The deeper sections explain each term, safe procedures, saturation, windup, noise, disturbances, and application limits.

Key terms

Tuning
Tuning is not a hunt for perfect numbers.
iotclass.org

Major section

Phoebe's Field Notes: What the Cold-Room Valve's Radio Actually Spends

The mathematical gist.: Under a 20 dBm EIRP ceiling, a 0 dBi antenna may conduct 20 dBm = 100 mW.

  • A 6 dBi patch must conduct only $20-6=14$ dBm = 25.1 mW, a 3.98× reduction.

Numbers to remember

20 dBma 0 dBi antenna may conduct 20 dBm = 100 mW.
100 mWa 0 dBi antenna may conduct 20 dBm = 100 mW.
25.1 mWA 6 dBi patch must conduct only $20-6=14$ dBm = 25.1 mW
iotclass.org

Major section

What Tuning Changes

Tuning chooses controller gains and supporting limits so the closed loop behaves well for the real application.

  • The gains are only part of the decision; sample period, output clamps, anti-windup, derivative filtering, sensor placement, and fallback behavior must be checked together.
  • Too little gives sluggish response or offset.
  • Removes persistent offset.
  • Adds damping from a rate estimate.
iotclass.org

Major section

Tuning Session Safety

Tune only when the loop has clear boundaries.

  • If a test can damage equipment, spoil product, or create an unsafe state, do not perform an aggressive oscillation test on the production loop.
A safe PID tuning workflow
A safe PID tuning workflow
iotclass.org

Major section

Manual Tuning Route

Manual tuning is useful when the process can be tested safely and when the team needs to understand how the loop reacts.

  • Retest under disturbance.: A setpoint step is not enough; load and disturbance rejection must also be checked.
Manual PID tuning route
Manual PID tuning route
iotclass.org

Major section

Ziegler-Nichols As a Starting Method

The classic closed-loop Ziegler-Nichols method raises proportional gain until the loop reaches sustained oscillation.

  • That gain is the ultimate gain Ku; the oscillation period is Tu.
  • These values are not a deployment certificate.
  • Ziegler-Nichols is useful only when its measured oscillation and later safety margin remain visible.

Key terms

Tu
Tu are measurements, not approvals.
Ziegler-Nichols closed-loop tuning proof
Ziegler-Nichols closed-loop tuning proof
iotclass.org

Major section

Application Patterns

Application context changes what "good" means.

  • A thermal loop may accept slow settling if it avoids overshoot.
  • A position loop may need damping and fast recovery.
  • A level loop may prioritize avoiding overflow and actuator cycling.
  • The same numerical gains do not mean the same thing on a heater, tank, motor, and position axis.

Key terms

Thermal
Thermal is often PI and trades slow response against overshoot; Level highlights saturation and the instruction to protect integrator.
PI
PI is common; derivative is useful only when the measurement path gives a stable rate estimate.
Overshoot and ringing
Overshoot and ringing are visible.
PID tuning patterns across application classes
PID tuning patterns across application classes
iotclass.org

Major section

Application Patterns (continued)

Damping, output limits, ramped setpoints, and mechanical backlash checks are usually important.

  • Thermal is often: PI and trades slow response against overshoot;: Level highlights saturation and the instruction to protect integrator.: Speed makes timing and rate noise visible, whereas: Position calls for damping and ramp setpoints.
  • Disturbance rejection and actuator limits matter.
  • Overshoot and ringing are visible.
iotclass.org

Major section

Operating Points and Gain Scheduling

One set of gains may not work everywhere.

  • A process can be gentle near one operating point and sensitive near another.
  • When the response shape changes across the allowed range, use conservative global gains or a documented gain schedule.
Gain scheduling and retest boundaries
Gain scheduling and retest boundaries
iotclass.org

Major section

Tuning Decision Record

Each accepted tuning change should leave a decision record.

  • The record does not need to be long, but it must be enough for another engineer to understand what was changed and why.
  • Loop identity.: Controlled variable, actuator, sensor location, sample period, output limits, and controller mode.
PID tuning decision record showing loop identity, starting state, test proof, approved gains, rollback condition, and next retest trigger.
PID tuning decision record showing loop identity, starting state, test proof, approved gains, rollback condition, and next retest trigger.
iotclass.org

Major section

Common Pitfalls

The method gives starting gains.

  • Loops can behave differently at low, middle, and high output.
  • Retest where process gain, delay, or actuator authority changes.
  • If the actuator is clamped, the integrator may keep accumulating.
  • Saturation and recovery proof must be part of the tuning record.

Why it matters

A short decision record prevents guesswork later.

iotclass.org

Major section

Common Pitfalls (continued)

Damping requires a trustworthy rate estimate.

  • If rate noise dominates the command, use PI, filtering, setpoint shaping, or sensor improvements.
  • Production tuning needs previous gains, abort criteria, and a way to return to a known stable state.
  • Future maintainers need to know the condition that justified each gain.
iotclass.org

Major section

Overview: Tuning Is Acceptance Proof

That makes tuning a proof process.

  • Every accepted change should connect a symptom to a term, a term to a recorded response, and the recorded response to an operating decision.
  • Without that chain, the numbers become private lore that the next maintainer cannot safely reuse.
The response evidence diagram keeps tuning tied to acceptance proof: symptoms such as sluggish response, oscillation, offset, noisy output, and stable tracking each point to a review action and a follow-up test instead of a blind gain change
The response evidence diagram keeps tuning tied to acceptance proof: symptoms such as sluggish response, oscillation, offset, noisy output, and stable tracking each point to a review action and a follow-up test instead of a blind gain change
iotclass.org

Major section

Single Traces Can Overfit

The same gains can become fragile when the process moves to a different load, delay, or saturation condition.

  • The accepted gains should have margin against noise, delay, output clamps, and expected disturbances.
  • If the process behaves differently across regions, a gain schedule needs transition proof; if the proof is not available, conservative global gains are usually safer than a hidden table that only worked once.
  • A gain set can look excellent on one step test because the operating point, disturbance shape, actuator authority, and sensor noise happen to match that run.
iotclass.org

Deck summary

Key takeaways

Faster response is not an improvement when the physical result becomes risky.

  • The mathematical gist.: Under a 20 dBm EIRP ceiling, a 0 dBi antenna may conduct 20 dBm = 100 mW.
  • Tuning chooses controller gains and supporting limits so the closed loop behaves well for the real application.
  • Tune only when the loop has clear boundaries.
  • Manual tuning is useful when the process can be tested safely and when the team needs to understand how the loop reacts.
iotclass.org

Retrieval practice

Recall check 1 of 3

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

Q1A PI loop is clean on a setpoint step, but after a disturbance the actuator saturates for a long time and the process overshoots on recovery. What is the best next diagnostic step?

ACheck output limits, integrator state, and anti-windup during the disturbance test
BRaise proportional and integral gains together to force a faster recovery trace
CAccept the tuning because the setpoint step already passed cleanly in the lab trace
DSwitch to aggressive derivative tuning before checking saturation or windup
Show answer

Answer: A Long saturation and recovery overshoot after a disturbance point to output limits, integrator state, and anti-windup behavior.

iotclass.org

Retrieval practice

Recall check 2 of 3

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

Q2A PI loop reaches the setpoint during a clean setpoint step, but after a disturbance the actuator stays saturated for a long time and the process overshoots during recovery. What is the best next diagnostic step?

AIncrease integral gain so the controller removes the disturbance faster.
BCheck output limits, integrator state, and anti-windup behavior during the disturbance test.
CAdd derivative damping and compare overshoot before changing the integral settings.
DAccept the tuning because the setpoint step looked clean.
Show answer

Answer: B A clean setpoint step does not prove the loop is ready.

iotclass.org

Retrieval practice

Recall check 3 of 3

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

Q3A warehouse heating loop has a clean setpoint trace at mild outdoor temperature, but during a cold morning the valve saturates and recovery overshoots. What should the tuning record do before approving the gains?

ATest the cold operating point, record saturation and anti-windup behavior, and set retest or fallback gains.
BApprove the mild-weather setpoint gains and leave cold-load recovery untested.
CRaise all gains until the cold-morning trace becomes faster, without changing the acceptance record.
DRemove output limits so the valve request can exceed the actuator range during cold starts.
Show answer

Answer: A PID tuning acceptance should include disturbance and saturation recovery proof across the relevant operating range, plus retest boundaries when one gain set may not remain valid.

iotclass.org

Print reference

Answers

Answer key.

  1. A · Long saturation and recovery overshoot after a disturbance point to output limits, integrator state, and anti-windup behavior.
  2. B · A clean setpoint step does not prove the loop is ready.
  3. A · PID tuning acceptance should include disturbance and saturation recovery proof across the relevant operating range, plus retest boundaries when one gain set may not remain valid.
iotclass.org