Sensors & Measurement · Study deck
Sensor Processing: Sampling and Signals
A clean chart can hide aliasing, clipping, or lost detail.
Physics Phoebe is your guide for this deck.

After studying this chapter
Learning objectives
You will be able to:
- Implement and compare moving average, Kalman, and median filters to reduce sensor noise
- Execute two-point calibration procedures to correct sensor offset and gain errors
- Design data validation pipelines that detect anomalies and reject outliers
- Select and justify appropriate filtering strategies based on signal characteristics and resource constraints
Major section
Start With the Measurement Story
Bandwidth is the range of change a signal or link can carry.
- Smoothing may hide the jump, but it may also hide a real door-open event.
- No filter can recover facts that were never measured.
- A reading becomes information only after noise, drift, outliers, scaling, and timing are handled.
Major section
Phoebe's Field Notes: Where Vibration Nyquist Meets the Sensor's Own Step Size
The mathematical gist.: The chapter's 100 Hz ADXL345 stream has a 50 Hz Nyquist ceiling: higher vibration components fold to false lower frequencies before a median or moving-average filter can see them.
- Choosing the right filter depends on your signal characteristics and noise type.
Major section
Phoebe's Field Notes: Where Vibration Nyquist Meets the Sensor's Own Step Size (continued)
For most beginner IoT projects, do not start with Kalman.
- The order shows why noise reduction cannot repair bias and why calibrated values still require invalid-sample handling.
- The moving average filter is the simplest and most common approach.
- ESP32's floating-point unit makes Kalman practical.
Major section
Phoebe's Field Notes: Where Vibration Nyquist Meets the Sensor's Own Step Size (continued)
A single bad spike is ignored instead of being averaged into future readings.
- For a beginner, the behavior matters more than the implementation: a larger window gives a smoother line but reacts more slowly.
- The Kalman filter provides optimal noise reduction for linear systems with Gaussian noise by modeling the system dynamics.
- Kalman requires knowing process noise (Q) and measurement noise (R) -- wrong values degrade performance.
Major section
Phoebe's Field Notes: Where Vibration Nyquist Meets the Sensor's Own Step Size (continued)
It adapts based on measurement uncertainty and process noise. (For non-linear sensors such as thermistors or pH electrodes, Extended or Unscented Kalman Filters are needed instead.).
- When sensor data has occasional spike errors (outliers), a median filter is more effective than averaging.
- Kalman filter response varies based on Q and R parameters and is explored in the interactive calculator below.
- The moving average spreads a spike across its window, while the median rejects an isolated outlier, connecting signal shape to filter choice.
Major section
Phoebe's Field Notes: Where Vibration Nyquist Meets the Sensor's Own Step Size (continued)
The EMA is the most memory-efficient filter -- it requires only a single float (4 bytes) of state.
- Unlike a moving average that weights all N samples equally, the EMA gives exponentially decreasing weight to older samples.
- The smoothing factor alpha (0 to 1) controls responsiveness: lower alpha means smoother output but slower response.
- Decision Factors: For stationary signals with Gaussian noise (temperature averaging), moving average is simpler and nearly as effective.
- For tracking changing signals (position, velocity, acceleration) where latency matters, Kalman filters provide faster response with better noise rejection.
Deck summary
Key takeaways
Bandwidth is the range of change a signal or link can carry.
- The mathematical gist.: The chapter's 100 Hz ADXL345 stream has a 50 Hz Nyquist ceiling: higher vibration components fold to false lower frequencies before a median or moving-average filter can see them.
- For most beginner IoT projects, do not start with Kalman.
- A single bad spike is ignored instead of being averaged into future readings.
- It adapts based on measurement uncertainty and process noise. (For non-linear sensors such as thermistors or pH electrodes, Extended or Unscented Kalman Filters are needed instead.).
Retrieval practice
Recall check

Physics Phoebe says: answer from memory, then check your reasoning.
Q1What is the main purpose of sensor data processing before data is used for decisions?
Show answer
Answer: D Processing should improve interpretability for a use case while keeping measurement assumptions visible.
Print reference
Answers
Answer key.
- D · Processing should improve interpretability for a use case while keeping measurement assumptions visible.