Commit Graph
16 Commits
Author SHA1 Message Date
jensandClaude Sonnet 5 f69d63c31b fix: split inner-loop yi_max clamp to fix HOLD-state windup overshoot
Renames pid_hold/pid_heat/pid_cool to pid_outer/pid_inner/pid_inner_cool
to match what actually runs when, and splits inner-loop config into
Inner.Heat/Inner.Hold/Inner.Cool so the same PID instance gets a tight
yi_max ceiling only while HOLD drives it, without capping legitimate
1.5 K/min ramps. Fixes the overshoot from docs/overshoot_hold_windup.md
where a cold-water disturbance during HOLD wound up pid_heat's integral
term with no anti-windup engagement, taking ~35s+ to unwind naturally.

Breaking config change: Hold/Heat/Cool -> Outer/Inner.{Heat,Hold,Cool}
in config.json, both .tpl templates, the pid/sud demo scripts, and
replay_sim.py's CLI flags. Adds tests/components/pid/ (stdlib unittest)
covering the Pid clamp/recovery behavior and closed-loop disturbance,
ramp, and HOLD<->HEAT transition cases.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DGQhVQ2Y3yXAQTXhrxVd5u
2026-07-05 21:23:55 +02:00
jensandClaude Sonnet 4.6 1e89a58370 Replace Pid.scale()'s mutable gain factor with a stateless process() arg
Pid.scale(k) set self.k as persistent state, mutated from outside the
class and never reset in reset(), so a stale scale factor could survive
a state-transition reset. Replace it with a plain scale=1.0 argument on
Pid.process(), and have temp_controller.py/temp_controller_smith.py
compute the heat-rate-overshoot compensation factor themselves and pass
it through process_pid() each tick instead of mutating pid_hold's state.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-19 17:37:55 +02:00
jens 6649a03d44 - PID: no params for constructor
- adedd dt
- fixed set_params
2020-12-21 12:23:56 +01:00
jens b9b1a1c613 - PID: added set_param() 2020-12-21 11:28:44 +01:00
jens 5f60312d4e - Pid: D-Part need not to be error based
- increased pot delay to 30 s
2020-12-20 18:23:14 +01:00
jens 24437329f0 - Compensate for max heat rate to reduce overshoot 2020-12-16 19:54:38 +01:00
jens 6dd0920010 - refactored 2020-12-16 17:13:57 +01:00
jens 8d57299d83 -added anti windup 2020-12-11 15:17:52 +01:00
jens 448afb3e9a - refactored PID params 2020-12-05 18:40:23 +01:00
jens 55aa043efb - tempcontroller: added heat rate control 2020-12-05 18:33:16 +01:00
jens 6a6ca8c92d - PID: reverted yi reset on sign(err) change 2020-12-02 11:30:28 +01:00
jens 6939650708 - PID: use pot for testing 2020-12-02 11:24:31 +01:00
jens d6037b33d3 - PID: Modified AWU code 2020-12-01 23:21:45 +01:00
jens 5260af8bbd - PID: Reset yi on error sign changes 2020-12-01 21:59:03 +01:00
jens 8b481a98b8 - removed dbug prints
- PID: added Anti Windup code
2020-12-01 21:17:30 +01:00
jens bf205742b1 - added Pid
- added Temp Controller
- added Kalman
2020-11-26 19:57:28 +01:00