Analyse tracking error, and overrun time vs outdoor temperature and sun (Open-Meteo) #8
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Question
How well does blub track the target temperature, and what is systematic about the error? In particular, do outside temperature and sun through the windows explain how the heating responds? If so, is it worth adding outdoor sensors (e.g. a small zigbee weather station) to compensate for them?
Terms as in
GLOSSARY.md; the approach is indocs/adr/0001-on-off-control-with-anticipation.md.Background
The goal is a small tracking error without a systematic bias: the control temperature close to the target temperature, outside warm-ups and cool-downs. Users adjust targets by feel, but they look at the graphs and will notice systematic surprises. Overshoot (peak above target) and undershoot (trough below target) are symptoms. The band's width (hysteresis) and offset, and the anticipation, are tuning parameters for that outcome.
Anticipation switches off early by the predicted overrun: rise rate × learned overrun time. The overrun time is learned from each coast.
While heating, the rise rate is roughly
(heater power − UA·(T_in − T_out) + solar gain) / heat capacity. The anticipator measures that rate live, so the current outdoor conditions are already in it. Outdoor data could help with the overrun time, which is learned from past coasts:The fall rate (heater off) is much slower than the rise rate (heater on). That is why switch-on is not anticipated for now: undershoot ≈ fall rate × warm-up delay stays small.
The first measured coast (2026-10-28, buros sensor): overrun +0.48 °C after switch-off at 2.25 °C/h, so an overrun time of about 13 min. The peak was 1.1 °C above target.
Data already recorded
GET /api/history/anticipation?start=…&end=…:samples: one per control tick during a heating cycle or a coast (rise rate, predicted overrun, overrun time, peak so far)coast_records: one per learned coast (switch-off temp/time, rise rate, peak/time, measured/previous/new overrun time,settled)GET /api/history/export/json: all sensor readings, including off periodsGET /api/history/heating: heater on/off changes with reasonsWinter data, 2025-12 to 2026-02: blub's database also holds about 136k readings from January–February 2026. These are mostly the bathroom DS18B20 at 30 s intervals, plus sparse buros readings. There are also about 670 heater on/off changes, and heating events recording the target temperature at the time. There are no coast records from then, because anticipation didn't exist yet. The fall rate, the rise rate and the overrun per heating cycle can still be analysed against the weather from that period, so the analysis can start before end of November.
The API serves at most 30 days per request. Nothing is deleted yet (retention cleanup is not wired up).
Analysis outline
temperature_2m,shortwave_radiation, alsodirect_radiation/diffuse_radiation) for the house from the Open-Meteo archive API. It's free and needs no key. The home coordinates still need to be supplied.switch_off_at…peak_at).measured_overrun_time(and the prediction misspeak − (switch_off_temp + rise_rate × previous_overrun_time)) againstT_in − T_outand solar radiation. Check whether the residual spread matters compared with the tracking error.T_in − T_out. This gives the heat loss coefficient (UA/C) from many more hours than the coasts provide. Daytime off periods that cool slower than predicted measure the solar gain.Watch out for
Decision
Proposal if sensors are worth it
Prerequisites
anticipation_samples/coast_records):ecf8097, deployed 2026-10-28 10:00Analyse anticipation lag vs outdoor temperature and sun (Open-Meteo)to Analyse tracking error, and overrun time vs outdoor temperature and sun (Open-Meteo)Last winter's data is usable for this analysis: blub's database has about 136k readings from January–February 2026. They are mostly the bathroom DS18B20 (30 s), with sparse buros readings, about 670 heater on/off changes, and heating events that include the target temperature. I've started a first pass against Open-Meteo outdoor temperature and the solar irradiance on the SSW and WNW facades. It covers the fall rate, the rise rate and the overrun per heating cycle. Results follow here. The coordinates are supplied privately and kept out of this issue.
First pass: winter 2025–26 against Open-Meteo weather
Data: 2025-12-31 to 2026-02-15, 46 days. The control temperature was min(bathroom, study). Outdoor temperature and vertical irradiance on the SSW and WNW facades come from the Open-Meteo archive. An east facade was added as a placebo.
Conclusions
Outdoor conditions do not explain the variation in overrun time. Outdoor sensors are not worth adding for the anticipation.
Observations about last winter
Plan: confirm at the end of November
Re-run the same analysis on this autumn's data, which now has anticipation and coast records:
Caveats: this is one partial winter with an old controller (no anticipation, lockout bug, frequent manual overrides), a bathroom-heavy dataset, modelled (not measured) facade irradiance, and targets recovered from the event log for only about two thirds of the hours.
Data point 2026-10-29, first coast with anticipation (overrun time 13 min, rate window 20 min):
Most of the overrun (0.58) came within 30 minutes of switch-off. The last 0.04 was likely solar gain. Without anticipation the heater would have run until about 10:15, with a peak around 21.3.
The coast never dropped 0.2 °C below its peak before the 3 h timeout, because of the sun. From the next release, a coast also settles when the temperature levels off (less than 0.1 °C rise in 30 min), and a coast that times out is no longer learned from. Days with solar gain after switch-off should be tagged in this analysis.
Sensor reporting resolution: #15. Optimum start for the warm-up: #14.