Skip to content
Tactiverge

Trust one reading, or ten?

A greenhouse fan follows a noisy thermometer. How do you stop it flapping?

The rule: fan on above 30 °C. The air is 28.5 °C, then it really does heat up to 31 °C.

26°30°34°fan thresholdreally hot from hereeachavg 1
Dots: readings. Dashed: the true temperature. Blue line: the average of the last 1. Bottom strips: when the fan is on (orange = on for no reason, green = on when needed, pink = off when needed).
±1.5 °C
1 reading

Chance one averaged reading crosses 30 °C while it’s calm: 15.9%

Decisions: trusting each reading against averaging
Fan follows…On for no reasonOff when neededFlipsReaction delay
each reading313230 samples
average of 1313230 samples

Things to find · 0 of 3

  • Turn the noise to zero: is the fan ever wrong? (not yet)
  • With real noise, cut the false alarms by averaging (not yet)
  • Average 8 or more and spot what gets worse (not yet)

What’s going on? (try it first!)

Single readings near the threshold flip the fan on and off for no reason. Averaging N readings shrinks the noise by about √N, so false alarms almost vanish, but the fan now reacts later when it really does get hot. Less noise, more lag: you choose.

Honest about the model

One thermometer with Gaussian noise, a sudden 2.5 °C rise halfway, a fixed 30 °C threshold. Seeded noise, so the same settings always give the same run. Nothing you do here is saved.