Stage 3 of 6 · The numbers · one page, the whole semester
The semester's equations
The course's mathematics fits on one page, and that is a feature: each formula earned its place by governing a real bench decision, so each comes with the decision it governed. Review them as tools, not strings: for each, know what it computes, what each symbol is, and the bench number it once produced. An equation you can apply with the kit's values is yours; one you can only recite is the exam's.
How to use this page
Three passes, in the retrieval spirit of the next page. First pass: cover the right columns, and for each formula state meaning and a worked number from memory. Second pass: cover the formula column, and reconstruct each from its meaning. Third pass, the engineer's: for each, answer "what goes wrong on the bench if I ignore this?", because that is the form exam applications take. Derivations live in the home pages linked; this page is deliberately the card, not the lecture.
Where each equation lives
The card: all of them
| Equation | Says, in one line | Bench numbers, once | Home |
|---|---|---|---|
| I = (Vs − Vf) / R | The resistor sets the LED's current from what is left of the supply after the diode's drop | (3.3 − 2.0) / 330 ≈ 4 mA, comfortably inside the pin budget; 220 Ω ≈ 6 mA, still safe | W4 |
| Vout = Vin · R₂ / (R₁ + R₂) | The divider turns the LDR's changing resistance into a voltage the ADC can read | As the LDR's share of the total shrinks in bright light, Vout slides across the ADC's range | W8 |
| 12-bit ADC: 4096 levels | A continuous voltage lands on one of 2¹² discrete counts; resolution is range/4096 | GPIO34, ADC1 (the Wi-Fi-safe bank); full range ↦ counts 0 to 4095 | W8 |
| σmean = σ / √n | Averaging n samples cuts random noise by √n, the cheapest filter there is | read_avg with n = 16: noise ÷ 4, and the D-term downstream stops chattering | W8, W10 |
| silence > 1.5 × keepalive ⇒ client presumed dead | The broker's death test; what makes the LWT fire and status topics honest | keepalive = 30 s ⇒ a vanished node is declared within ~45 s | W9 |
| e = SP − PV | Error is want minus have; the sign tells the controller which way to push | SP 60 %, PV 42 % ⇒ e = +18: push brightness up | W10 |
| u = Kp·e + Ki·∫e dt + Kd·de/dt | The PID law: react to the error, to its accumulation, and to its rate | The A2 loop; W10's chosen gains Kp 2.0, Ki 3.0, Kd 0.18 cut overshoot and settling together | W10 |
| Ik = Ik−1 + Ki·e·Δt · · Dk = Kd·(e − ek−1)/Δt | The integral and derivative a loop can actually compute, one step at a time | With the node loop's Δt ≈ 0.1 s (PERIOD_MS = 100), each step adds a sliver and compares neighbours | W10 |
| ess = (SP − d) / (1 + K·Kp) | P-only control settles short by this much: gain shrinks the offset, only integral removes it | W10's derivation with bench numbers; octupling Kp shrank the offset and bought oscillation | W10 |
| derivative noise ∝ 2πf · amplitude | Differentiation amplifies fast wiggles in proportion to their frequency: the D-term's tax | Why raw ADC into Kd chatters, and read_avg's ÷4 is the first cure | W10 |
| staleness ≤ Tpub + Tpoll | The dashboard's number lags by at most one publish interval plus one poll interval | ~1 s publish + 2 s fetch ⇒ the "at most 3 s old" requirement, with the 3 defensible | W11 |
| contracts ≤ n(n − 1)/2 | Pairwise interfaces grow quadratically; each used one can fail on either side | Your chain uses about six; the skeleton exercises all of them in one afternoon | W12 |
| probes = ⌈log₂ n⌉ | Half-splitting finds one faulty segment among n in logarithmically few looks | n = 8 ⇒ 3 probes, guaranteed; one-by-one averages 4 and can cost 7 | W12 |
Symbols are half the marks
For every formula, be able to say what each symbol is and its unit, because application questions are usually symbol questions in disguise: handed a kit with Vf = 2.1 V and asked for a safe resistor, the work is identifying which symbol the 2.1 is. The Ziegler-Nichols table (0.6 Ku, 1.2 Ku/Tu, 0.075 KuTu) is the one table-shaped result; it lives with its honesty notes in Week 10.