Stage 6 of 6 · Lab session · Monday, November 9
Lab & hand-in
Assignment 2 is due at the start of class, submitted per the brief on Omnivox, demonstrations caught up in the first minutes for anyone scheduled. Then the lab climbs from a P-only local loop to supervisory control over the network, with a tuning log growing the whole way.
The two-hour plan
| Minutes | Block | Done means |
|---|---|---|
| 0–10 | A2 in; station up: both boards, broker from Week 9 confirmed alive, repo pulled | Submission confirmed; mosquitto_sub firehose running in a spare terminal |
| 10–30 | The controller: pid.py on the node, fixed-period loop, P-only run | Loop runs at 10 Hz; the P-only offset observed and matched against the formula |
| 30–55 | PI, then windup: offset dies; provoke windup, restore the cure | ess ≈ 0; the windup tail seen once and never again |
| 55–80 | Tuning: the recipe with CSV logs; D only if earned; verification tests | docs/tuning.md has the trial rows and final gains; flashlight test passes |
| 80–105 | The big loop: supervisory setpoints over MQTT, then the fully central version | Rungs 3–4 demonstrated; local vs central graded with log numbers |
| 105–115 | Ladder stretch or Ziegler–Nichols detour, station's choice | One more log section with a two-sentence verdict |
| 115–120 | Evidence committed and pushed; bench packed, full kit travels | Both boards home: the project phase starts next Monday |
Evidence to hand in
- Controller code:
pid.pyand the control-loopmain.py, plus the Pi-sideLightControllerif you reached rung 4, each runnable. docs/tuning.md: the trial table (gains, observation, change and why), final gains with a one-line justification each, and the verification-test grades. This file is the week's centrepiece: it proves method, not luck.- At least one step-test CSV from the logger, committed under
data/, with the curve's grades (rise, overshoot, settling) noted in the tuning log. - Journal entry in
station.txt: the worst behaviour you saw this afternoon (ringing, windup, shimmer), how the curve named it, and the knob that fixed it.
Exit ticket
Say or write, without notes:
- The closed-loop diagram's signals, on a napkin sketch, mapped to your bench.
- Why P alone parks short of the setpoint, with the ess formula's shape.
- What windup is, what provokes it, and the one-line cure your class ships.
- Your final gains, and which trial in your log earned each of them.
- Where control should live on your bench and in your project, in the fast-local, supervisory-central sentence.
Before next Monday
- Rest on A2; it is in. The post-mortem habit is still worth ten minutes: one journal paragraph on what the brief taught you that the hubs had not.
- Think project. Week 11 opens the LIA phase (40 % of the course) and deliverable D1 lands that same week: arrive Monday with one or two project ideas that your bench could plausibly sense, decide, act and report on. The best ideas name a quantity to hold or watch, which after this week you know how to do properly.
- Keep the bench runnable at home: the project phase assumes the Week 9–10 stack starts on demand, broker to loop, in minutes.
Next week: the project begins
Week 11 · Monday, November 16
Flask & the project begins
The Pi grows a web dashboard with Flask, the browser joins the architecture's last box, and the LIA project brief opens the build that carries to the final presentation. D1 (5 %) is due this week.
What you now have
A complete control stack
Sense, network, decide, act, tune: the full industrial pattern, at desk scale, in your own code. From here the course stops adding fundamentals and starts asking what you will build with them.