Skip to content
Tactiverge

School/◇ Explorer/Week 8

Every sensor jitters

A thermostat reads 19.8 °C, then 20.3 °C, then 19.6 °C, all in the same minute. Is the room getting hotter or colder?

About 25 min · 3 goals · Checked by automated tests; not yet reviewed by an educator

1.Why should I care?

Robots, weather stations and medical monitors all live with noisy sensors. Engineers can't make noise vanish, but they can design around it. Averaging is the first and simplest trick.

  • ◇ Explain what sensor noise is and why every real sensor has some.
  • ◇ Use averaging to get a steadier reading from noisy data.
  • ◇ Describe a glitch (outlier) and why it should be checked, not trusted.

2.Predict

A noisy thermometer's single readings jump around by about ± 2 °C. If you average 16 readings, roughly how much does the average jump around?

Guess first. Being wrong here is how the surprise works.

3.Discover

Set noise to ± 2 °C and readings to 1. Press 'Take new readings' ten times and count how far the dot jumps. Now average 16 readings and do the same. How much steadier is the blue average line?

Every sensor jitters a little

Noisy thermometer

10 °C15 °C20 °C25 °C30 °Csetpointavg

Readings to average

New measurement

Readings: 19.2 °C. Average = 19.2 °C (error 0.2 °C). Heater: ON. Right call for the true temperature.
Each reading = true temperature + random noise (a bell-curve wobble whose typical size you set). Averaging N readings shrinks the typical wobble by about √N: 4 readings halve it, 16 readings quarter it. The heater rule is: if the average reading is below 20 °C, switch the heater on.
Can't use the interactive? Read a description instead

The noisy thermometer shows each reading as a dot on a number line from 10 to 30 °C, with the true temperature marked and the average shown as a line. With one reading the dot jumps widely each time you take a new set. With 16 readings averaged, the average line stays close to the true temperature.

4.Understand

What noise is

Noise is the random jitter in a sensor's readings. It comes from tiny electrical fluctuations, vibrations and air currents. Even when the true temperature is perfectly steady, a real thermometer's readings wobble a little up and down. Noise is random: it's not always too high or always too low.

Averaging tames noise

Because noise goes up as often as down, adding several readings lets the ups and downs partly cancel. The average is steadier than any single reading. The cost: you must wait for several readings, so the average reacts more slowly when the real temperature changes. Engineers balance steadiness against speed.

Glitches and outliers

Sometimes one reading is wildly wrong, like 85 °C in a 20 °C room, because of a loose wire or an electrical spike. This is an outlier. Engineers check for readings that are impossible or far from the rest, and investigate them rather than letting one glitch fool the whole system.

Explain it another way

Asking one person to guess the weight of a cake can be way off. Ask 16 people and average their guesses, and you'll usually land much closer.

Worked example 1

Readings: 20.4, 19.7, 20.1, 25.8, 19.8 °C. What's a sensible estimate of the temperature?

25.8 is far from the rest: probably a glitch, so check it and leave it out. Average the other four: (20.4 + 19.7 + 20.1 + 19.8) ÷ 4 = 80.0 ÷ 4 = 20.0 °C. Including the glitch would give 21.16 °C, over a degree too high.

Common mix-ups

  • A good sensor has no noise.
    ✓ Every real sensor has some noise. Good sensors have less, and good designs cope with what's left.
  • More averaging is always better.
    ✓ More averaging is steadier but slower. A smoke alarm that averaged for an hour would be useless.

5.Practice

Practice, not a test. Wrong answers get a hint and another try.

Practice 1

A thermometer in a perfectly steady room gives slightly different readings each second. Why?

Practice 2

What is the downside of averaging many readings?

Practice 3

Readings: 18.2, 18.5, 18.3, 61.0, 18.4 °C. What should the engineer do with 61.0?

Practice 4 · a fresh version every time

A thermometer gives 5 readings a few seconds apart: 20, 20.5, 19, 19.5, 19 °C. What is their average, in °C? (2 decimal places is fine.)

°C

6.Apply it

In the noisy-thermometer diagram, set the true temperature to 19.5 °C (just below the setpoint) and noise to ± 2 °C. Take 20 sets of single readings and count wrong heater decisions. Repeat with 16 readings averaged. Write up your counts in a table and explain the difference.

7.Reflect

Concepts: Noise and filtering · How sensors measure