From 519bbd485fbde45ada89cb74d8b09320e98c52bc Mon Sep 17 00:00:00 2001 From: Jens Ahrensfeld Date: Fri, 19 Jun 2026 17:27:47 +0200 Subject: [PATCH] Check off theta_amb backlog item now that it's config-driven Co-Authored-By: Claude Sonnet 4.6 --- components/plant/TODO.md | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/components/plant/TODO.md b/components/plant/TODO.md index 83776a9..f52ab64 100644 --- a/components/plant/TODO.md +++ b/components/plant/TODO.md @@ -27,11 +27,16 @@ the current `delay`-line rewrite of `Pot`. that nothing reads anymore — harmless but worth deleting (see `components/pid/TODO.md`'s config-validation item). -- [ ] **`theta_amb` is hardcoded, not configured.** Still true — - `brewpi.py`: `pot = Pot(DT, pot_params, 20)` passes a literal `20` - instead of reading it from config or a live ambient sensor. Real - ambient temperature drifts and is never modeled as a disturbance, so - the controller's robustness to it is untested. +- [x] **`theta_amb` is hardcoded, not configured.** Fixed: added a + top-level `ambient_temperature` key to `config.json`(`.templ`/`.sim`); + `brewpi.py` reads it once and passes it to both the real `Pot` and + (via a new `theta_amb` param) `temp_controller_smith.py`'s internal + models, so the Smith predictor's model matches the real plant's + assumed ambient instead of silently defaulting to 20. Real ambient + temperature still isn't modeled as a *drifting* disturbance (it's a + static config value, not a live sensor reading), so robustness to + ambient drift remains untested — that part of the original concern + stands. - [ ] **No actuator/process realism.** Partially improved: `process()` now clamps `self.temp` to `min(100, ...)` (won't simulate past