• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

Sampling: What Nyquist Didn’t Say, and What to Do About It

formdissolve

Senior Member
Forum Donor
Joined
Jul 19, 2019
Messages
391
Likes
329
Location
USA

"The Nyquist-Shannon sampling theorem is useful, but often misused when engineers establish sampling rates or design anti-aliasing filters. This article explains how sampling affects a signal, and how to use this information to design a sampling system with known performance."

Some of this is a bit over my head with the math, but an interesting read.
 

DVDdoug

Major Contributor
Joined
May 27, 2021
Messages
3,035
Likes
4,000
I didn't read the whole thing, and my math is fuzzy.

I call BS. Nothing goes on between the samples.

And the theory is that band-limiting means there's nothing important, or nothing that can't be reconstructed in the analog between the sample points.

There are some limitations and misunderstandings, but fortunately our ears are imperfect too! ;)

If you generate a 7999Hz tone at a sample rate of 8KHz in Audacity you'll get 1Hz amplitude modulation that you can see and hear. You'll get something similar at 3999Hz but there is less modulation. You can theoretically reconstruct the full waveform if it's steady-state and the duration is long enough, but real audio isn't steady-state and real DACs don't do that kind of reconstruction. (The experiment is done at 8kHz because at 22050 and 44.1kHz you can't hear anything.).
 

Ron Texas

Master Contributor
Forum Donor
Joined
Jun 10, 2018
Messages
6,246
Likes
9,378
Nyquist or NyQuil?
 

SIY

Grand Contributor
Technical Expert
Joined
Apr 6, 2018
Messages
10,511
Likes
25,350
Location
Alfred, NY
"By ignoring anything that goes on between samples the sampling process throws away information about the original signal2"

I call BS. Nothing goes on between the samples.

Edited to add: They even show that stupid stair step graph.
To be fair, that’s correct. What’s thrown away is the information above the bandlimit. No information below that is lost, of course.
 

Audiofire

Addicted to Fun and Learning
Forum Donor
Joined
Feb 8, 2022
Messages
637
Likes
360
Location
Denmark
Nothing goes on between the samples.
The premise was "all the information that existed between the samples in the original signal is irretrievably lost in the sampling process".

Warning: Maintain minimum 25% clearance in the ADC. Remember the cutoff frequency is -3 dB.

W30151-low-headroom.png
 

BenjaminB

Member
Joined
Jan 14, 2023
Messages
84
Likes
61
No useful information is lost.
The Nyquist theorem is based on some conditions, ie regular and repeated patterns. These conditions are approximate valid for music, but not always fully. Hence some (most often very tiny) information may get lost.
If this is regarded useful or not is a matter of opinion. It is rather fair to say that it is difficult (very difficult) to hear any difference. Still, strictly speaking - some information may get lost.
 

SIY

Grand Contributor
Technical Expert
Joined
Apr 6, 2018
Messages
10,511
Likes
25,350
Location
Alfred, NY
No useful information is lost.
Correct. That was my point.
The Nyquist theorem is based on some conditions, ie regular and repeated patterns. These conditions are approximate valid for music, but not always fully. Hence some (most often very tiny) information may get lost.
This is incorrect. No information below the bandlimit is lost. That's the essence of the theorem.
 

BDWoody

Chief Cat Herder
Moderator
Forum Donor
Joined
Jan 9, 2019
Messages
7,082
Likes
23,540
Location
Mid-Atlantic, USA. (Maryland)
The Nyquist theorem is based on some conditions, ie regular and repeated patterns. These conditions are approximate valid for music, but not always fully.

You may want to revisit your understanding.
 

Koeitje

Major Contributor
Joined
Oct 10, 2019
Messages
2,306
Likes
3,965
The Nyquist theorem is based on some conditions, ie regular and repeated patterns. These conditions are approximate valid for music, but not always fully. Hence some (most often very tiny) information may get lost.
If this is regarded useful or not is a matter of opinion. It is rather fair to say that it is difficult (very difficult) to hear any difference. Still, strictly speaking - some information may get lost.
The Nyquist theorem literally defines the minimum sample rate needed to capture everything up to specific frequency. Data above that frequency is lost. So its not some information getting lost. You capture everything up to a point and nothing after that.

Also note that its a theorem, not a theory, its mathematically proven to be true. If you can disprove it you would win a Field Medal. So go ahead I'd say.
 

BenjaminB

Member
Joined
Jan 14, 2023
Messages
84
Likes
61
The Nyquist theorem literally defines the minimum sample rate needed to capture everything up to specific frequency. Data above that frequency is lost. So its not some information getting lost. You capture everything up to a point and nothing after that.

Also note that its a theorem, not a theory, its mathematically proven to be true. If you can disprove it you would win a Field Medal. So go ahead I
Strange how it is easy to get misinterpreted!

What I stated in my first post was simply that "music" may not fulfill all conditions for any given sampling. Typically the music may contain harmonics which may not be captured with a too low sample rate.

I did not argue against any aspect of Nyquist theorem, did not call it a theory (instead stated theorem ) so what is all this fuss about?
 
Last edited:

Audiofire

Addicted to Fun and Learning
Forum Donor
Joined
Feb 8, 2022
Messages
637
Likes
360
Location
Denmark
I did not argue against any aspect of Nyquist theorem, did not call it a theory (instead stated theorem ) so what is all this fuss about?
The Nyquist theorem is not based on a specific sample rate that causes aliasing. The theorem established a scientific principle that can be applied to any given sample rate.
 
Last edited:

Koeitje

Major Contributor
Joined
Oct 10, 2019
Messages
2,306
Likes
3,965
Strange how it is easy to get misinterpreted!

What I stated in my first post was simply that "music" may not fulfill all conditions for any given sampling. Typically the music may contain harmonics which may not be captured with a too low sample rate.

I did not argue against any aspect of Nyquist theorem, did not call it a theory (instead stated theorem ) so what is all this fuss about?
All harmonics within the sampling frequency divided by two will be captured. Harmonics above it won't be captured of course, but in practice that is all just supersonic sound outside the range of human hearing.

Yes, a 22kHz sampling rate will not capture all audible harmonics, but who even uses that for music? The minimum we see is 44.1kHz.

Seems you are the one misinterpreting what the theorem actually states. I said you are considering it a theory, because you aren't accepting the theorem. So can you please give some actual examples of what you are talking about and not just vague statements?
 

antcollinet

Master Contributor
Forum Donor
Joined
Sep 4, 2021
Messages
7,751
Likes
13,086
Location
UK/Cheshire
was simply that "music" may not fulfill all conditions for any given sampling
Plus something about regular and repeating patterns being required.

As far as I know the only way music might not fulfil a condition is in not being band limited. Which is what the pre-sampling filter is for.
 

DonH56

Master Contributor
Technical Expert
Forum Donor
Joined
Mar 15, 2016
Messages
7,909
Likes
16,735
Location
Monument, CO
The Nyquist theorem is based on some conditions, ie regular and repeated patterns.
That is false; nothing in the Nyquist Theorem states or implies patterns. All information below the Nyquist frequency (technically within the Nyquist bandwidth) is correctly captured (and can be correctly reconstructed). It just says you need >2 samples/period of the highest desired frequency, does not matter whether the samples are part of a pattern or not.

These conditions are approximate valid for music, but not always fully. Hence some (most often very tiny) information may get lost.
Patterns do not matter. If the music contains signal (information) above the Nyquist frequency then that will be (ideally) filtered out or (worst-case) aliased and either way the out-of-band information is lost. Again we are talking instantaneous bandwidth, the theorem works irrespective of any patterns in the signal (music or whatever).

If this is regarded useful or not is a matter of opinion. It is rather fair to say that it is difficult (very difficult) to hear any difference.
The only information lost is that outside the Nyquist bandwidth. It is useful to you if you need that information, in which case you need greater bandwidth and higher sampling rate. Whether you can hear the difference similarly depends upon your ability to hear and the signal bandwidth.

Still, strictly speaking - some information may get lost.
Information outside the Nyquist bandwidth is lost. The solution is choosing a sampling rate high enough to capture the desired signal bandwidth.

Note all of this is discussing sampling rate, not resolution, since that was the premise of your statement. Resolution, or bit depth, is not part of the theorem and is not related to sampling rate or bandwidth.
 

Cbdb2

Major Contributor
Joined
Sep 8, 2019
Messages
1,557
Likes
1,534
Location
Vancouver
The article is spot on. It talks about sampling in general, not just audio and shows how sampling rates can be used differently for some signals. It talks about the effect of anti aliasing filters, and that sometimes they are detrimental (as in better off without). It talks about time delays and sampling in control systems. It mostly says, in the real world, your BW is rarely 1/2 the sample rate, usually a little bellow.
"The theme of this paper can be summed up to this: the Nyquist rate isn’t a line in the sand
that you can toe up to with complete safety. It is more like an electric fence or a hot poker;
something that won’t hurt you if you keep your distance, but never something you want to
saunter up to and lean against.
So you should be aware of the Nyquist rate when you’re designing systems. But to really
determine an appropriate sampling rate for a system, or to determine the necessary anti-
alias and reconstruction filters for a system, you have to understand aliasing and filtering.
You have to know what aliasing is, how you can avoid it, and even whether avoiding it is
the best answer for the system at hand."
 
Top Bottom