Files
brewpi/config-sim.json.tpl
T
jensandClaude Sonnet 5 2d032bf9b2 fix: allow gentle negative HOLD floor to fix steady-state overshoot
Testing the windup-fix rework live against sude/sud_0030.json surfaced a
distinct bug: a HOLD overshoot from grain-fill-in cooling never decayed -
process_pid()'s pid_outer_y floor clamped to exactly 0.0, so pid_inner
fought the pot's own ambient loss to hold the overshot temperature flat
instead of declining back to setpoint (see docs/overshoot2.png).

Replace the hardcoded 0.0 floor with a configurable Outer.y_hold_min
(default 0.0, backward compatible), set to -0.1 in config.json, both
.tpl templates, and the demo scripts - small enough to avoid
reintroducing the bb5af3c limit cycle while letting HOLD request a
gentle decline matching passive ambient cooling.

Adds TestHoldOvershootRecoversToSetpoint and documents the finding in
docs/overshoot_hold_windup.md's Follow-up section and
components/pid/TODO.md. Confirmed against a live sud_0030 re-run, not
just the unit test.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M2ierBoxW3v7nUbDw3M2pE
2026-07-06 08:19:10 +02:00

66 lines
938 B
Smarty

{
"ambient_temperature": 20,
"log_interval": 300,
"TempCtrl": {
"pid_type": "Smith",
"beta": 0.05,
"Outer": {
"kp": 0.4,
"ki": 0.0,
"kd": 0.0,
"kt": 0.0,
"y_hold_min": -0.1
},
"Inner": {
"Heat": {
"kp": 0.08,
"ki": 0.02,
"kd": 0.0,
"kt": 1.5
},
"Hold": {
"kp": 0.08,
"ki": 0.02,
"kd": 0.0,
"kt": 1.5,
"yi_max": 0.3
},
"Cool": {
"kp": 0.08,
"ki": 0.02,
"kd": 0.0,
"kt": 1.5
}
},
"Thresholds": {
"HoldHeat": 1.0,
"HoldCool": 1.0,
"HeatHold": 1.0,
"HeatCool": 1.0,
"CoolHold": 1.0,
"CoolHeat": 1.0
}
},
"Heater": {
"type": "sim"
},
"Stirrer": {
"type": "sim"
},
"TempSensor": {
"type": "sim",
"temp_offset": 0.0,
"sigma": 0.05,
"stirrer_sigma": 0.0,
"stirrer_tau": 20.0
},
"Pot": {
"mass": 5.96,
"material": "Edelstahl 18/10",
"L": 0.2,
"Td": 17,
"water_mass": 22,
"volumen": 30
}
}