Control: closing the loop
420-302-VA · WEEK 10 · FALL 2026

Utility · for the week and after

Resources

Control is a century-old discipline with a deep literature; these are the entries that match this week's altitude, plus the one classic practitioner series every embedded programmer ends up reading.

References you will actually use

ResourceWhat it isUse it when
Wikipedia: PID controllerA thorough article: history, the math, tuning methods, limitations, industrial variantsA second pass over any term, or meeting a variant (PI-D, feed-forward) in the wild
Improving the Beginner's PIDBrett Beauregard's classic series: a naive PID upgraded step by step (sample time, derivative kick, windup, on-the-fly tuning) into the Arduino PID librarySeeing every refinement in this hub's class argued one at a time, in C, by the person who wrote the most-used hobbyist PID
Wikipedia: Ziegler–Nichols methodThe classical tuning rules, their table and their known aggressivenessRunning the ladder's rung 2, or citing the method's limits in your log
MicroPython: time moduleThe reference for ticks_ms, ticks_diff and friends, wrap semantics includedWriting or debugging the fixed-period loop's timing
Wikipedia: Control theoryThe wider field: stability, feedback, where PID sits in itCuriosity upward: what the loop looks like with the full mathematics turned on

Background reading, stage by stage

After reading…Deepen with
The loopWikipedia: Feedback, Bang–bang control and Hysteresis, the baseline controller and the band that tames its chatter
P, I, DWikipedia: Setpoint, Process variable and Low-pass filter, the vocabulary formalized, and the filter family your averaging belongs to
Tuning & the big loopWikipedia: Edge computing, SCADA and Programmable logic controller, the industrial names for where your two loops live

Practice between classes

  • Napkin drills. Draw the block diagram cold, five times this week, until the signal names place themselves. It is a final-exam staple and a job-interview staple in your field.
  • Trace drills. Invent three ticks of PV readings and hand-compute u with given gains, Week 7's trace-table habit on the controller. The quiz's first question is the template.
  • Curve flashcards. Sketch the five diagnosis shapes from memory with their one-line verdicts. Being able to see a tuning fault is the skill that transfers to every loop you will ever meet.
  • One more plant. If you kept the second LED or a resistor heater idea from the kit, tune a second loop and compare gains: nothing teaches "gains belong to the plant, not the algorithm" faster.
  • Project thinking. For each project idea you bring Monday, write its SP, PV, u and disturbances in one line each. An idea that fills those four blanks is a project; one that cannot is a demo.

Glossary

TermMeaning
Closed loop / feedbackMeasure the result, compare to the goal, correct, repeat; the structure that absorbs disturbances
Setpoint (SP)The target value the loop holds
Process variable (PV)The measured value; the controller's only window on reality
Error (e)SP − PV; signed, and the sign steers
Control output (u)The actuator command; here, LED duty in percent, clamped 0–100
PlantEverything between u and PV: LED, air, room, LDR
DisturbanceAn outside push on the plant the loop must cancel
Bang-bang controlTwo-level control with hysteresis; oscillates by design
Proportional / integral / derivativePush per present error / per accumulated error / against the error's trend
Gain (Kp, Ki, Kd)Each term's volume knob; speed bought at stability's price
Steady-state errorThe settled gap; nonzero under P-only, erased by I
Rise time / overshoot / settling timeThe step response's speed, excess and completion grades
SaturationThe actuator at its limit; where the math and the hardware disagree
WindupIntegral inflation during saturation, repaid later as overshoot
Anti-windupAny scheme that stops integrating while saturated; ours is conditional integration
Derivative on measurementDifferentiating −PV instead of e; same damping, no setpoint kick
Derivative kickThe one-cycle output spike from differentiating a setpoint step
Sample period (Δt)The loop's measured heartbeat; I and D both scale with it
Ultimate gain / period (Ku, Tu)The gain at steady oscillation and that oscillation's period; Ziegler–Nichols's two inputs
Supervisory controlA central layer adjusting local loops' setpoints; fast local, smart central
Edge computingRunning computation beside the physical process; the modern name for the PLC's oldest habit