Sensor errors: faults, calibration and noise

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

Sensor errors: faults, calibration and noise

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. A temperature sensor in a classroom shows exactly 21.4 for six hours straight, even though the room warmed up in the afternoon. What is the most likely cause?
A A stuck reading from a faulty sensor
B The room temperature really stayed identical
2. A school weather station logs 22, 23, 23, 412, 24. What should you do with the 412?
A Flag it as an impossible spike and check it
B Keep it because every reading is automatically correct
3. What does calibrating a sensor against a known value mean?
A Taking more readings and averaging them without a reference
B Comparing its reading to a trusted reference and adjusting any offset
4. A thermometer is placed in ice water, which is about 0 degrees C, but it reads 3.2 degrees C. What does this show?
A The sensor has an offset and needs calibrating
B The sensor is perfectly accurate
5. Which is a cause of electrical noise in sensor data?
A The student typing the data into a spreadsheet correctly
B Interference from nearby electrical equipment causing random jumps

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
122.4, 22.4, 22.4, 22.4, 22.4, 22.4 Aoffset = 0.0 - reading_in_ice_water
221.8, 22.0, 150.3, 22.1, 21.9 BAssuming a sensor is always accurate. Ice water should read about 0, so the sensor has an offset and needs calibrating.
3Calibrate a sensor by comparing it with a known value and working out the offset CA stuck reading: the value never changes, which suggests a faulty sensor or a frozen logger
4Flag readings that fall outside the range the sensor can possibly give, as a check for spikes D=IF(OR(B2<-10,B2>50),"Check","OK")
5Sensor reads 3 degrees in ice water, so no action is needed because sensors are always accurate EAn impossible spike: one value far outside what is possible, likely caused by electrical noise or a fault
6A sudden reading of 999 is kept because it is real data and must never be questioned FKeeping an impossible spike without checking it. Readings that are out of range may be noise or a fault and should be checked.

Definitions

sensor error

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
=___(B2:B100)
2.
=IF(B3_B2,"Stuck","OK")
3.
=B2_E1
4.
=IF(B2_50,"Spike","OK")
5.
=_______(B2:B6)

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A readings = [21, 21, 21, 21]
B unique = set(readings)
C stuck = len(unique) == 4
D print(stuck)
Question 2
A MAX_TEMP = 5000
B reading = 480
C if reading > MAX_TEMP:
D print("Impossible spike")
Question 3
A known = 20.0
B reading = 22.5
C offset = reading - known
D corrected = reading + offset
E print(corrected)
Question 4
A window = [20.1, 19.9, 20.3
B total = sum(window)
C average = total / len(window)
D print(average)
Question 5
A previous, reading = 18, 18
B if reading = previous:
C print("Stuck sensor?")

Answer Key

Sensor errors: faults, calibration and noise
Section A: Quick Questions
Q1
A — A stuck reading from a faulty sensor
Q2
A — Flag it as an impossible spike and check it
Q3
B — Comparing its reading to a trusted reference and adjusting any offset
Q4
A — The sensor has an offset and needs calibrating
Q5
B — Interference from nearby electrical equipment causing random jumps
Section B: Match the Pairs
Q1
22.4, 22.4, 22.4, 22.4, 22.4, 22.4 → A stuck reading: the value never changes, which suggests a faulty sensor or a frozen logger
Q2
21.8, 22.0, 150.3, 22.1, 21.9 → An impossible spike: one value far outside what is possible, likely caused by electrical noise or a fault
Q3
Calibrate a sensor by comparing it with a known value and working out the offset → offset = 0.0 - reading_in_ice_water
Q4
Flag readings that fall outside the range the sensor can possibly give, as a check for spikes → =IF(OR(B2<-10,B2>50),"Check","OK")
Q5
Sensor reads 3 degrees in ice water, so no action is needed because sensors are always accurate → Assuming a sensor is always accurate. Ice water should read about 0, so the sensor has an offset and needs calibrating.
Q6
A sudden reading of 999 is kept because it is real data and must never be questioned → Keeping an impossible spike without checking it. Readings that are out of range may be noise or a fault and should be checked.
Section C: Definitions
Q1
sensor error — A reading that is wrong due to a faulty or uncalibrated sensor or electrical noise, so check for stuck values, impossible spikes and offsets against a known value.
Section D: Fill in the Blanks
Q1
=MAX(B2:B100)
Q2
=IF(B3=B2,"Stuck","OK")
Q3
=B2-E1
Q4
=IF(B2>50,"Spike","OK")
Q5
=AVERAGE(B2:B6)
Section E: Spot the Error
Q1
C — A stuck sensor repeats one value, so the set of unique readings has exactly 1 item. The check should be len(unique) == 1, not 4.
Q2
A — The limit is set far too high, so the impossible 480 reading would not be flagged. It should be a realistic maximum such as 50.
Q3
D — The offset is how far the sensor reads above the known value. To correct the reading you subtract it, not add it: reading - offset.
Q4
A — The list is missing its closing square bracket, which causes a syntax error. It should end with ]. Averaging a window of readings smooths out noise.
Q5
B — A single = assigns a value, but an if test needs == to compare. A repeated reading is compared with == to spot a stuck value.