Does the Nyquist Sampling Theorem Apply to Square Waves?

  • Thread starter Thread starter yecko
  • Start date Start date
  • Tags Tags
    Sampling Theorem
AI Thread Summary
The Nyquist Sampling Theorem indicates that a square wave, which consists of odd harmonic sine waves, theoretically requires an infinite sampling frequency for perfect reconstruction due to its infinite bandwidth. In practice, higher sampling frequencies lead to clearer waveforms, as demonstrated by experimental results showing improved reconstruction at frequencies up to 2.5MHz for a 25kHz signal. Unlike square waves, sine waves can be perfectly reconstructed with a sampling frequency that is double their frequency, highlighting the differences in sampling requirements. While more samples may visually enhance the waveform, they may not be necessary for accurate reconstruction of band-limited signals. Ultimately, the Nyquist theorem emphasizes the importance of sampling frequency in achieving accurate signal representation.
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 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 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 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.
 
Back
Top