fix: smooth HOLD→HEAT power transition (bumpless transfer + cascade timing)
Two root causes for the visible power dip at every ramp-to-ramp step boundary: 1. One-tick cascade delay: heatrate_soll was computed from pid_hold.get_y() before pid_hold.process() ran in that tick, so the first tick of a new ramp used the stale hold-phase output (≈0) as the rate setpoint, driving pid_heat to near zero. Fix: move heatrate_soll computation inside process_pid(), after pid_hold.process(). 2. Cold-start reset: pid_heat.reset() at HOLD→HEAT discarded the hold-phase integral, so pid_heat had to ramp up from zero on every new step. Fix: remove the reset (bumpless transfer) — the hold-phase integral is a warm starting point that carries the baseline hold power into the new ramp. Together these eliminate the ~1s dip to near-zero and replace the slow 20–30s integral ramp-up with an immediate start at roughly hold-level power, climbing monotonically to the target. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -64,10 +64,7 @@ class TempController(TempControllerBase):
|
||||
# Compensate for max heat rate to reduce overshoot
|
||||
hold_scale = 1.0/self.heatrate_soll_set if self.heatrate_soll_set > 0 else 1.0
|
||||
|
||||
self.heatrate_soll = self.heatrate_soll_set * self.pid_hold.get_y()
|
||||
theta_err = self.theta_soll_set - self.theta_ist
|
||||
heatrate_err = self.heatrate_soll - self.heatrate_ist
|
||||
|
||||
diff = self.theta_soll_set - self.theta_ist
|
||||
self.process_fsm(diff)
|
||||
self.process_pid(theta_err, heatrate_err, hold_scale)
|
||||
self.process_pid(theta_err, hold_scale)
|
||||
|
||||
Reference in New Issue
Block a user