📖 What is the Nyquist Theorem?
🎯 The Sampling Problem
When digitizing analog signals (temperature, pressure, audio, etc.), you need to decide how many samples per second to capture. Sample too slowly and you lose critical data (aliasing). Sample too fast and you waste memory, processing power, and battery life.
The Nyquist-Shannon Sampling Theorem states: To accurately reconstruct a signal, you must sample at at least twice the highest frequency present in that signal.
$f_s \geq 2 \times f_{max}$
Where:
- $f_s$: Sample rate (Hz)
- $f_{max}$: Maximum frequency in the signal (Hz)
- $2 \times f_{max}$: Nyquist frequency (minimum theoretical sample rate)
⚠️ What is Aliasing?
When you sample below the Nyquist frequency, high-frequency components in the signal appear as false low-frequency components in the reconstructed data. This is called aliasing.
Real-world example: Imagine recording a 1000 Hz tone at 1500 Hz (below the required 2000 Hz). The reconstructed signal will show a false 500 Hz tone instead!
💡 Use the visualizer below to see aliasing in action with different sample rates
🔧 Practical Guidelines
- Minimum: 2× signal frequency (Nyquist limit) - theoretically sufficient but not practical
- Recommended: 2.5× - 5× signal frequency - provides margin for real-world filters and reconstruction
- Audio Standard: 44.1 kHz for human hearing (up to ~20 kHz) - provides ~2.2× margin
- High-Fidelity: 10× or more - common in professional data acquisition and instrumentation
📐 Application Examples
- Temperature Monitoring: Room temperature changes slowly (~0.01 Hz), 1 sample/second is plenty
- 60 Hz Noise Filtering: Need at least 120 Hz sample rate (better: 240 Hz or higher)
- Audio Recording: Human hearing to 20 kHz requires minimum 40 kHz (standard: 44.1 kHz)
- Vibration Analysis: Machine vibrations at 500 Hz need 1 kHz minimum (better: 2.5-5 kHz)
- High-Speed Signals: 1 MHz clock signal requires minimum 2 MHz ADC (better: 10+ MHz)