Delayed Thermostat
Try to reach a target temperature while your controller responds to the past.
A steady state becomes a point. Repeating motion traces a repeating path. A complicated path by itself does not prove chaos.
Instantaneous |T − T′| in °C; zero is clipped at 10⁻¹² for plotting. Growing separation is useful evidence, but a short trace alone is not proof.
Unmeasured · run the chaos check at fixed settings.
This estimates the largest Lyapunov exponent using a separate, fixed-setting run with repeated tiny perturbations to the complete delay history. A positive result indicates sensitive dependence. Small values near zero are inconclusive.
Advanced controls
Try this
- Watch delayed feedback. The blue curve is what the room is doing now. The amber curve is the old temperature the controller uses. Change the delay while it runs and watch the response.
- Stabilize the room. Select Stable thermostat and advance time. It should approach 22°C. Add delay or a heat pulse and see whether it settles again. Your goal is 30 continuous seconds inside the shaded ±0.5°C band.
- Compare overcorrection with chaos. Delayed overcorrection uses your error-squared rule with 14 seconds of delay. It can swing far past the target because it is correcting an old error. Its repeating swings are not labeled chaos. Chaos comparison uses a separate Mackey–Glass law with 23 seconds of delay; it starts after 1,000 seconds of computed settling.
- Follow nearby futures. Restart twins, then advance several times. The second room has the same settings and a temperature history shifted by just 0.001°C. There is no random forcing. In the chaotic regime the nearby futures eventually separate.
- Check the evidence. Run Check for chaos without changing settings. Compare the positive estimate in the chaos preset with the negative stable result and near-zero repeating result. Noisy-looking motion, overshoot, or a tangled portrait alone does not establish chaos.
The control laws
Let A = 16°C be ambient temperature, S the target, R = S − A, θ the thermal time constant, D the sensor delay, and Tᵈ = T(t − D). The room always obeys:
Your thermostat uses the delayed error e = S − Tᵈ. Its correction grows faster than linearly as the error increases. Positive corrections heat; negative corrections cool. A baseline R/θ offsets heat loss at the target:
The strength slider sets k = 0.1 × its value, in inverse °C. With k = 1, a 1°C error requests 3 units of correction, while a 2°C error requests 8, before division by θ and capacity limiting. The controller uses the sign of the old error, so it can keep heating after the actual room is already too warm. Capacity caps the attempted correction; the command includes baseline heating, so the displayed net HVAC rate can remain positive for a small cooling correction. Negative HVAC rates mean active cooling. Linear mode uses the same law with k = 0.
The separate Mackey–Glass comparison uses xᵈ = max(0, (Tᵈ − A)/R) and a Mackey–Glass response:
At θ = 10 s and MG exponent n = 10, the normalized temperature obeys dx/dt = 0.2x(t − D)/(1 + x(t − D)¹⁰) − 0.1x(t). With D = 23 s this is an established chaotic delay-equation regime. The MG law is an intentionally unusual, nonmonotonic controller: very cold readings also give low heater output. It is a mathematical chaos experiment in temperature units, not a typical household thermostat. The target remains an equilibrium reference; chaotic operation does not keep the room tightly at that target.
All three models contain actual delayed feedback. Stronger error correction can produce large, repeating swings; it does not by itself establish chaos. The comparison mode preserves a known chaotic system so you can measure the difference. The graphs are calculated from the equations and are not prerecorded waveforms. Heat pulses change current temperature, not the old sensor reading. The same pulse is applied to both twins. Settings apply live to both; changing them restarts the twin comparison and clears the previous chaos-check result. Delay portraits show only samples from the current settings segment.
Source: J. C. Sprott, University of Wisconsin — Lyapunov Exponents for Delay Differential Equations.
Numerics and interpretation
The simulator uses a fixed 0.02-second step, fourth-order Runge–Kutta integration, and linear interpolation of saved temperature history. Zero delay uses the current Runge–Kutta stage, rather than stale data. The delay range is 0–60 seconds in 0.1-second increments. Until enough real history exists, a constant prehistory equal to the initial temperature is used. The stable preset starts at 18°C; the nonlinear chaos preset starts with a constant 23.2°C history. The delayed-overcorrection preset includes 240 seconds of computed settling.
The divergence check calculates a fresh 1,000-second settling run, then compares a nearby full-history state. It renormalizes the perturbation every five seconds, discards a further 500 seconds, and averages logarithmic growth over 4,000 seconds. The reported exponent is per simulated second. The check pauses the displayed experiment and runs in small batches; changing controls cancels it. It estimates sensitive dependence over a finite run and is not a rigorous proof of chaos or a complete Lyapunov spectrum. Near-zero results may describe periodic motion or insufficient convergence.
Time pauses while this tab is hidden. Speed changes affect playback, not the integration step. Advance 120 s pauses playback and computes 120 additional seconds. The graph retains a bounded recent history and offers 120-, 240-, or 600-second views. Values and elapsed time are also shown as text. No account save or offline progression is used.