71  Sampling & Nyquist Theorem Visualizer

Interactive Signal Sampling and Aliasing Demonstration

71.1 Interactive Sampling Visualizer

NoteLearning Objectives

By using this interactive tool, you will be able to:

  • Understand why sampling rate matters in IoT sensor systems
  • Visualize the Nyquist theorem and aliasing effects
  • Calculate minimum sampling rates for accurate signal capture
  • Apply these concepts to real sensor design decisions

Sampling converts continuous analog signals into discrete digital values.

Think of it like taking photos of a moving car:

Photo Rate Result
1 photo/second Can track slow movements
10 photos/second Captures walking speed
1000 photos/second Captures fast motion

The Nyquist Theorem says: To accurately capture a signal, you must sample at least 2x the highest frequency in that signal.

  • Signal at 50 Hz? Sample at minimum 100 Hz
  • Audio up to 20 kHz? Sample at minimum 40 kHz (CD uses 44.1 kHz)
  • Temperature changing slowly? Low sample rate is fine

71.2 Signal Generator

Create a signal to visualize sampling effects:


71.3 Sampling Configuration


71.4 Signal Visualization


71.5 IoT Sampling Scenarios

Apply sampling theory to real IoT applications:


71.6 Sampling Rate Calculator

Calculate the minimum sampling rate for your application:


71.7 Knowledge Check

NoteQuestion 1

A temperature sensor captures readings that change at most once per minute. What is the minimum sampling rate according to Nyquist?

  1. 1 sample/minute
  2. 2 samples/minute
  3. 1 sample/second
  4. 60 samples/second

B) 2 samples/minute - If the signal changes at most once per minute (1/60 Hz), Nyquist requires at least 2x that rate = 2 samples/minute. In practice, you’d sample more often for reliability.

NoteQuestion 2

A vibration sensor needs to detect frequencies up to 5 kHz. You’re seeing strange low-frequency patterns in the data. What’s likely happening?

  1. The sensor is broken
  2. Aliasing due to undersampling
  3. Electrical interference
  4. Temperature drift

B) Aliasing due to undersampling - High frequencies that aren’t properly sampled “fold back” and appear as lower frequencies. If sampling at less than 10 kHz (2 x 5 kHz), frequencies above Nyquist will alias to false lower frequencies.

NoteQuestion 3

Why do practical IoT systems often sample at 2.5-5x the Nyquist rate instead of exactly 2x?

  1. To waste power intentionally
  2. To allow for anti-aliasing filter rolloff and signal variations
  3. Because Nyquist is wrong
  4. To fill storage faster

B) To allow for anti-aliasing filter rolloff and signal variations - Real analog filters can’t cut off sharply at Nyquist. Extra margin allows the filter to attenuate high frequencies before they alias, and accommodates signals that occasionally exceed expected bandwidth.