Uncategorized

Nyquist theorem explanation

Here is the Nyquist explanation rewritten using pure ASCII diagrams (no Unicode).


Nyquist Theorem (ASCII Version)

The Nyquist theorem says:

To sample a signal correctly, you must sample
at least twice its highest frequency.
 
    sample_rate >= 2 * signal_frequency

This minimum rate is the Nyquist rate.


1. Sine wave (conceptual ASCII)

A sine wave at some frequency f:

   /``\    /``\    /``\ 
  /    \  /    \  /    \
 /      \/      \/      \

2. Proper sampling (sample rate >= 2f)

Two or more samples per cycle:

   /``\    /``\  
  / *  \  /  * \
 /      \/     *\
        *       

You can reconstruct the original wave.


3. Undersampling (sample rate < 2f)

Too few samples per cycle → aliasing:

   /``\    /``\  
  /    \  /    \
 *     * *     *
    *        *

The samples no longer match the real wave.
The system thinks the signal is a different, lower frequency.


4. Summary

Correct:     sample_rate >= 2 * frequency
Aliasing:    sample_rate < 2 * frequency

If you want, I can also produce:

  • A fully ASCII diagram showing aliasing (folded spectrum)
  • An ASCII discrete-time version (stem plot)
  • An ASCII spectrogram-style explanation

Just tell me!

You’re looking for the Nyquist theorem (often the Nyquist–Shannon sampling theorem) and how it describes a sine wave in sampling terms. Here’s a clear explanation:


Nyquist Theorem Explained (with a Sine Wave Example)

The Nyquist theorem states:

To sample a signal accurately, you must sample at at least twice its highest frequency.

This minimum required rate is called the Nyquist rate.


Applying it to a sine wave

Suppose you have a sine wave:

 
x(t) = A \sin(2\pi f t)

with frequency .

Nyquist condition:

You must sample at:

 
f_s \ge 2f

Otherwise, the wave will appear at the wrong frequency — this error is called aliasing.


Examples

1. Sine wave at 1 kHz

To sample properly:

  • Nyquist rate: 2 kHz
  • Good practice: sample at 5–10× the frequency (e.g. 10 kHz)

2. Sample too slowly (e.g. 1.5× the frequency)

The signal will appear to be a completely different sine wave or even look distorted. The system cannot distinguish between the original frequency and a lower “aliased” frequency.


Intuition

A sine wave has a smooth oscillation.
To capture its shape, you need at least two sample points per cycle:

  • One point to show the rising direction
  • One point to show the falling direction

More samples give a better representation.

Imagine drawing a wave with only one point per cycle—that point could fit an infinite number of possible waveforms. With two or more points, the shape becomes constrained.


Visual Summary (conceptual)

Sampling ≥ 2× frequency

✓ You capture the real sine wave.

Sampling < 2× frequency

✗ The sine wave “folds over” and appears at the wrong frequency → aliasing.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.