Optimum start: reach a scheduled target when its time range starts #14

Open
opened 2026-10-29 11:36:42 +01:00 by pti · 1 comment
Owner

Problem

A scheduled target is reached well after its time range starts, because the heater only switches on when the range starts.

2026-10-29: the study was at 18.3 °C when the target went to 20 °C at 09:00 (outdoor about 10 °C). The temperature started rising in the reports at 09:24, then rose at about 2.3 °C/h, and reached 20 °C at 10:00. Of the 09:00–10:30 time range at 20 °C, only the last 30 minutes were at target. The first hour was the warm-up.

Workaround

Start the 20 °C time range an hour earlier in the schedule.

Proposal: optimum start

Start a warm-up early enough that the control temperature reaches the next target when its time range starts:

  • Learn the warm-up from recorded heating cycles: the delay before the temperature rises, and the rise rate. The rise rate depends on the outdoor temperature, which we don't measure yet (see #8).
  • Before a time range with a higher target, start heating at start − (delay + (target − control temperature) ÷ rise rate), capped at for example 2 h.
  • Rebuild what it learned from the recorded heating history at startup, like the anticipation does.

Open questions:

  • Is a warm-up that started early a heating cycle under the next target, and should the history chart show that?
  • Should it apply to every time range or only some, e.g. not after a night setback?
  • How does it interact with anticipation when the target is reached during the warm-up?
  • Add "warm-up" and "optimum start" to the glossary.
## Problem A scheduled target is reached well after its time range starts, because the heater only switches on when the range starts. 2026-10-29: the study was at 18.3 °C when the target went to 20 °C at 09:00 (outdoor about 10 °C). The temperature started rising in the reports at 09:24, then rose at about 2.3 °C/h, and reached 20 °C at 10:00. Of the 09:00–10:30 time range at 20 °C, only the last 30 minutes were at target. The first hour was the warm-up. ## Workaround Start the 20 °C time range an hour earlier in the schedule. ## Proposal: optimum start Start a warm-up early enough that the control temperature reaches the next target when its time range starts: - Learn the warm-up from recorded heating cycles: the delay before the temperature rises, and the rise rate. The rise rate depends on the outdoor temperature, which we don't measure yet (see #8). - Before a time range with a higher target, start heating at `start − (delay + (target − control temperature) ÷ rise rate)`, capped at for example 2 h. - Rebuild what it learned from the recorded heating history at startup, like the anticipation does. Open questions: - Is a warm-up that started early a heating cycle under the next target, and should the history chart show that? - Should it apply to every time range or only some, e.g. not after a night setback? - How does it interact with anticipation when the target is reached during the warm-up? - Add "warm-up" and "optimum start" to the glossary.
Author
Owner

Better criterion: halfway at the start of the time range

Instead of reaching the target when the time range starts, start the warm-up so that the control temperature is halfway between the warm-up's starting temperature and the target when the time range starts.

This minimises the squared tracking error for any rise curve: dead time, straight ramp or an approach that slows down near the target. The error is counted from the starting temperature before the time range and from the target after it.

Let f(x) be the rise above the starting temperature x after switch-on, ΔT the target minus the starting temperature, and x how long before the time range the warm-up starts:

E(x) = ∫₀ˣ f(u)² du  +  ∫ₓ^∞ (ΔT − f(u))² du
dE/dx = f(x)² − (ΔT − f(x))² = 0   ⇒   f(x) = ΔT / 2

The absolute error gives the same condition: f(x) − (ΔT − f(x)) = 0.

Notes

  • Reference before the time range: the reference is the temperature the room would have without heating, not the previous time range's target. If it were a lower setback target, the optimum would be halfway between the two targets. On 2026-10-29 that would have meant no early start at all: the room was at 18.3 °C against a 16 °C setback, and the midpoint between 16 and 20 is 18.
  • Asymmetric comfort: weighting being too cold during the time range w_a more than being too warm before it w_b moves the crossing point up to f/ΔT = √w_a / (√w_a + √w_b). Halfway is the neutral default. A weight could be a later tuning knob, in the spirit of the min aggregation.
  • When to start: the starting temperature drifts while waiting, so re-evaluate every control tick. With a learned delay d and rise rate r, start heating once now ≥ start − (d + (target − T) / (2r)).
  • 2026-10-29 example: with d ≈ 20 min, r = 2.34 °C/h and T = 18.34, it would have switched on at about 08:19, been at about 19.2 °C at 09:00 and at 20 °C at about 09:21. That compares with 10:00 without optimum start, and about 07:37 with the reach-the-target-at-the-start criterion.
  • Testing: this is easy to test as a pure domain function of (d, r, T, target, time range start), separate from learning d and r.
## Better criterion: halfway at the start of the time range Instead of reaching the target when the time range starts, start the warm-up so that the control temperature is **halfway between the warm-up's starting temperature and the target** when the time range starts. This minimises the squared tracking error for any rise curve: dead time, straight ramp or an approach that slows down near the target. The error is counted from the starting temperature before the time range and from the target after it. Let `f(x)` be the rise above the starting temperature `x` after switch-on, `ΔT` the target minus the starting temperature, and `x` how long before the time range the warm-up starts: E(x) = ∫₀ˣ f(u)² du + ∫ₓ^∞ (ΔT − f(u))² du dE/dx = f(x)² − (ΔT − f(x))² = 0 ⇒ f(x) = ΔT / 2 The absolute error gives the same condition: `f(x) − (ΔT − f(x)) = 0`. ### Notes - **Reference before the time range:** the reference is the temperature the room would have without heating, not the previous time range's target. If it were a lower setback target, the optimum would be halfway between the two targets. On 2026-10-29 that would have meant no early start at all: the room was at 18.3 °C against a 16 °C setback, and the midpoint between 16 and 20 is 18. - **Asymmetric comfort:** weighting being too cold during the time range `w_a` more than being too warm before it `w_b` moves the crossing point up to `f/ΔT = √w_a / (√w_a + √w_b)`. Halfway is the neutral default. A weight could be a later tuning knob, in the spirit of the `min` aggregation. - **When to start:** the starting temperature drifts while waiting, so re-evaluate every control tick. With a learned delay `d` and rise rate `r`, start heating once `now ≥ start − (d + (target − T) / (2r))`. - **2026-10-29 example:** with `d` ≈ 20 min, `r` = 2.34 °C/h and `T` = 18.34, it would have switched on at about 08:19, been at about 19.2 °C at 09:00 and at 20 °C at about 09:21. That compares with 10:00 without optimum start, and about 07:37 with the reach-the-target-at-the-start criterion. - **Testing:** this is easy to test as a pure domain function of (`d`, `r`, `T`, target, time range start), separate from learning `d` and `r`.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
pti/blubgo#14
No description provided.