0
0
RosConceptBeginner · 3 min read

Nyquist Rate in Signal Processing: Definition and Examples

The Nyquist rate is the minimum sampling rate needed to capture a continuous signal without losing information. It is twice the highest frequency present in the signal, ensuring accurate digital representation without distortion called aliasing.
⚙️

How It Works

Imagine you want to record a song. The song has many sounds at different pitches (frequencies). To capture the song perfectly in digital form, you need to take snapshots of the sound wave often enough. The Nyquist rate tells you how often to take these snapshots.

If you sample slower than the Nyquist rate, the recorded sound will mix up different frequencies, causing a confusing effect called aliasing. Sampling at or above the Nyquist rate means you capture all the details without mixing frequencies.

Think of it like taking photos of a spinning wheel. If you take pictures too slowly, the wheel looks like it spins backward or stands still. Taking pictures fast enough (at least twice per spin) shows the true motion. This is the idea behind the Nyquist rate.

💻

Example

This example shows how to calculate the Nyquist rate for a signal with a highest frequency of 3000 Hz and check if a given sampling rate is enough.

python
highest_frequency = 3000  # in Hertz
nyquist_rate = 2 * highest_frequency

sampling_rate = 8000  # example sampling rate

if sampling_rate >= nyquist_rate:
    result = f"Sampling rate {sampling_rate} Hz is sufficient (>= Nyquist rate {nyquist_rate} Hz)."
else:
    result = f"Sampling rate {sampling_rate} Hz is NOT sufficient (< Nyquist rate {nyquist_rate} Hz)."

print(result)
Output
Sampling rate 8000 Hz is sufficient (>= Nyquist rate 6000 Hz).
🎯

When to Use

The Nyquist rate is essential when converting real-world signals like sound, images, or sensor data into digital form. It helps decide the minimum sampling frequency to avoid losing information.

For example, in audio recording, the highest audible frequency is about 20,000 Hz, so the Nyquist rate is 40,000 Hz. This is why CDs use a sampling rate of 44,100 Hz to capture sound accurately.

In medical devices like ECG machines, the Nyquist rate ensures heart signals are sampled correctly for diagnosis. In communication systems, it prevents signal distortion during transmission.

Key Points

  • The Nyquist rate is twice the highest frequency in a signal.
  • Sampling below the Nyquist rate causes aliasing, distorting the signal.
  • Sampling at or above the Nyquist rate preserves the original signal information.
  • It guides the choice of sampling frequency in digital signal processing.

Key Takeaways

The Nyquist rate is the minimum sampling frequency needed to capture a signal without distortion.
It equals twice the highest frequency present in the signal.
Sampling below the Nyquist rate causes aliasing, mixing frequencies incorrectly.
Use the Nyquist rate to choose proper sampling rates in audio, medical, and communication systems.