Make ambient temperature configurable and wire it everywhere it was hardcoded

brewpi.py passed a literal 20 as theta_amb to Pot, and
temp_controller_smith.py's two internal Pot models (and every demo's
Pot/TempController instantiation) silently relied on Pot's default of
20 instead. Add a top-level ambient_temperature key to
config.json(.templ/.sim), thread it through brewpi.py into both the
real plant and the Smith predictor's models via a new theta_amb param
on TempController, and make the demos pass it explicitly too.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-19 17:16:57 +02:00
co-authored by Claude Sonnet 4.6
parent 6711ab2200
commit 80da55da85
7 changed files with 15 additions and 9 deletions
@@ -31,13 +31,14 @@ if __name__ == '__main__':
}
dt = 1.0
theta_amb = 20
k_noise = 0.001
temp_ist = 0
temp_soll = 20
heatrate_soll = 1.25
ctrl = TempController(dt, ctrl_params, plant_params)
plant = Pot(dt, plant_params)
ctrl = TempController(dt, ctrl_params, plant_params, theta_amb)
plant = Pot(dt, plant_params, theta_amb)
_y = np.empty(0)
_fb = np.empty(0)
_t = np.empty(0)