Does the Nyquist Sampling Theorem Apply to Square Waves?

  • Thread starter Thread starter yecko
  • Start date Start date
  • Tags Tags
    Sampling Theorem
Click For Summary

Discussion Overview

The discussion revolves around the application of the Nyquist Sampling Theorem to square waves, particularly in comparison to sine waves. Participants explore the implications of sampling frequency on the reconstruction of these waveforms, considering both theoretical and practical aspects.

Discussion Character

  • Homework-related
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant questions whether a higher or lower sampling frequency is needed to reconstruct a square wave compared to a sine wave.
  • Another participant notes that a square wave consists of odd harmonic sine waves, prompting a clarification on the intended application of the square wave.
  • It is proposed that a square wave has theoretically infinite bandwidth, suggesting that infinite sampling frequency is required for perfect reconstruction, while a sine wave can be perfectly reconstructed with a sampling frequency that is double its frequency.
  • A participant emphasizes that while higher sampling frequencies may yield clearer waveforms visually, this does not necessarily correlate with the ability to reconstruct a band-limited signal accurately.
  • One participant mentions that the basic Nyquist theorem pertains to achieving correct amplitude with infinite samples, and acknowledges the existence of more complex versions that address errors with limited samples.

Areas of Agreement / Disagreement

Participants express differing views on the implications of sampling frequency for square waves versus sine waves. There is no consensus on whether the Nyquist theorem applies uniformly to both types of waves, and the discussion remains unresolved regarding the practical requirements for sampling frequencies.

Contextual Notes

Participants highlight the theoretical nature of bandwidth in square waves and the practical limitations of sampling in real-world scenarios. The discussion includes assumptions about the ideal conditions for reconstruction and the necessity of infinite samples, which are not typically available.

yecko
Gold Member
Messages
275
Reaction score
15

Homework Statement


In comparison with the sampling sine wave, in order to reconstruct a square wave, do we need to increase or decrease sampling frequency?

Homework Equations


Aliasing effect
Leakage effect

The Attempt at a Solution


No matter square wave or sine wave, the experimental results shown the higher sampling frequency (10kHz, 25kHz, 100kHz, 250kHz, 2.5MHz) construct a clearer waveform (signal freq = 25kHz).

Is there difference between sine and square wave for "increase or decrease sampling frequency"?
Thank you
 
Physics news on Phys.org
The square wave is composed of odd harmonic sine waves of the fundamental frequency. What is it you are trying to do with the square wave?
 
  • Like
Likes   Reactions: yecko
A square wave has theoretically infinite bandwidth, so you theoretically need infinite sampling frequency to perfectly reconstruct it. This practically means that the higher the sampling frequency, the better reconstruction and there is no upper bound to the sampling frequency.
A sine wave has finite bandwidth and you can perfectly reconstruct it with sampling frequency that is double of the sine wave frequency.
 
  • Like
Likes   Reactions: yecko and scottdave
While I normally don't use Wikipedia as a single source for a subject, I think the Square Wave Wikipedia page does a nice job of explaining it. https://en.wikipedia.org/wiki/Square_wave

When you say the higher frequencies construct a clearer waveform for the Sine wave, are you referring to how it looks on the screen? This is different than being able to reconstruct a band limited signal from a set of samples.

While more samples may look nicer to the viewer, many of those extra samples are unnecessary to reconstruct the sine wave.
 
  • Like
Likes   Reactions: Delta2
I want to point out that the basic Nyquist theorum applies to the ability to get the correct amplitude given an infinite sample. Infinite samples are rare. There are more complicated versions that give bounds for the possible errors given a limited sample.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
13K
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
7
Views
4K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
Replies
17
Views
6K