You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Load twin stops learning when the heating prior is too high #1491
The legacy load twin can stop learning cold hours for good when its heating coefficient is too high:
Update skips the hour's base sample whenever heatingGain(coef, T) exceeds the measured load.
The coefficient adapts only in buckets with 8 trained days, which takes 8 weeks per hour of the week.
So a coefficient that overstates heating cannot correct itself, and the hours it overstates never train.
Evidence
The home box had weather.heating_w_per_degc: 300: about 2.4 kW of assumed heating at 10 °C against a measured night load of 0.35–0.45 kW. The plan's night load was about 2 kW too high every night.
Reproduction against loadmodel.Model: 300 W/°C, 400 W real load, ten days of 15-minute samples → 0 of 168 buckets warm, coefficient still 300, predicted 3,139 W at 10 °C (959 W at 17 °C).
Fix
Bound the coefficient by physics: over a day, heating cannot exceed the total load, so coef ≤ Σ load / Σ (18 °C − T) for that day's cold samples. Apply the bound at each day's end, independent of bucket warmth.
#1495 bounds the coefficient: once each of the last three cold days shows it above the house's own use, it moves halfway down. On the home box case (300 W/°C, flat 400 W at 10 °C) the 02:00 error falls from 2,650 W to 650 W.
This issue stays open for the rest. An hour still trains only when the heating estimate is at or below the measured load. The bound settles near the day's mean load ÷ mean ΔT, so in a house whose night load is below its daily mean, the night hours keep their prior. Simulated house without electric heat (mean 1,209 W, 300 W at night, 10 °C): 2,750 → about 1,560 W too high at 02:00.
Options:
Train a skipped hour with a base of zero. Simple; nights then predict the heating estimate alone, about 900 W too high in that house instead of 1,560 W.
Store each hour's mean load and mean ΔT, and predict around them. A coefficient change then moves only the temperature slope, never a trained level. Changes the model's state.
Activity
fix(loadmodel): bound the heating estimate by the house's own use
fix(loadmodel): bound the heating estimate by the house's own use
fix(loadmodel): bound the heating estimate by the house's own use
fix(loadmodel): bound the heating estimate by the house's own use (#1495
frahlg commentedon Oct 1, 2026
#1495 bounds the coefficient: once each of the last three cold days shows it above the house's own use, it moves halfway down. On the home box case (300 W/°C, flat 400 W at 10 °C) the 02:00 error falls from 2,650 W to 650 W.
This issue stays open for the rest. An hour still trains only when the heating estimate is at or below the measured load. The bound settles near the day's mean load ÷ mean ΔT, so in a house whose night load is below its daily mean, the night hours keep their prior. Simulated house without electric heat (mean 1,209 W, 300 W at night, 10 °C): 2,750 → about 1,560 W too high at 02:00.
Options: