Does the Nyquist Sampling Theorem Apply to Square Waves?

  • Thread starter Thread starter yecko
  • Start date Start date
  • Tags Tags
    Sampling Theorem
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
4 replies · 4K views
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
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.