FROM AGPEDIA — AGENCY THROUGH KNOWLEDGE

Nyquist–Shannon sampling theorem

The Nyquist–Shannon sampling theorem states that a signal containing no frequencies above a limit W is completely determined by its values at regularly spaced instants 1/2W apart, that is, by samples taken at more than twice its highest frequency, and can be rebuilt exactly from them.[1:1][2:1] It is what makes digital audio possible: it says how a continuous signal can be turned into a sequence of numbers for processing on a computer, and why audio sampled at 44,100 times a second can reproduce everything up to about 20 kHz, the upper limit of hearing.[3:1][2:2] It is also called Nyquist's or Shannon's sampling theorem, and has been traced to Whittaker, Kotelnikov and others as well.[2:3][3:2]

Statement

Claude Shannon stated it in 1949 as Theorem 1 of "Communication in the Presence of Noise": if a function f(t) contains no frequencies higher than W cycles per second, it is completely determined by giving its values at a series of points spaced 1/2W seconds apart. A signal confined to a band W and lasting T seconds is therefore described by 2TW numbers.[1:1]

The signal can be rebuilt by placing at each sample point a pulse of the shape sin(2πWt)/2πWt, scaled to the sample's value, and adding the pulses together.[1:1] In modern terms this is a sum of shifted sinc functions weighted by the samples.[2:1] Julius Smith's statement for audio is that a continuous signal can be reconstructed exactly from its samples if it has no energy at or above half the sampling rate. A component exactly at half the sampling rate has to be excluded: sampled at its zero crossings, for example, a sinusoid at that frequency gives nothing but zeros.[2:1][2:4]

What happens above the limit

If a signal does contain energy above half the sampling rate, sampling does not lose it but misplaces it: the energy reappears at a lower frequency, mirrored about half the sampling rate. This is aliasing.[2:4] In practice the signal is therefore passed through a low-pass anti-aliasing filter before sampling.[4:1]

History and names

Shannon did not present the result as new. He called it "common knowledge in the communication art", noted that mathematicians had given it in other forms, and credited Harry Nyquist and Dennis Gabor with showing that about 2TW numbers suffice; he named the interval 1/2W seconds the Nyquist interval for Nyquist's work on telegraphy.[1:1][1:2] Michael Unser, reviewing the subject fifty years later, gives Shannon full credit for formalizing the result and seeing its potential, and notes Shannon's awareness of the mathematician J. M. Whittaker's work; in the Russian literature, Vladimir Kotelnikov introduced the theorem to communication theory. The reconstruction formula is known in mathematics as the cardinal series, often attributed to Whittaker in 1915 but traced back further still. The term Nyquist frequency was Shannon's.[3:2]

The theorem is often traced to Nyquist's 1928 paper, with Shannon credited for reviving interest in it after the Second World War, hence its several names. Usage of "Nyquist rate" is inconsistent: it once meant the sampling rate itself, but in modern usage usually means half of it. Smith avoids the clash by calling half the sampling rate the Nyquist limit.[2:3]

Limits in practice

The theorem is an idealization. Real signals are never exactly band-limited, no ideal anti-aliasing or reconstruction low-pass filter exists, and Shannon's reconstruction formula is rarely used directly because the sinc function decays slowly.[3:1] Practical converters come very close nonetheless.[4:1] Unser reinterprets the theorem as a projection onto the space of band-limited signals, and generalizes it to a three-step scheme of prefiltering, sampling and postfiltering with filters that need not be ideal, including spline and wavelet models.[3:3]

In audio

Because hearing ends around 20 kHz, sampling at a little over 40 kHz is enough in principle; compact discs sample at 44,100 times a second.[2:2] Christopher Montgomery of Xiph.Org stresses what the theorem implies for listeners: everything below half the sampling rate is captured completely, sampling does not alter frequency response or phase, and the original analog signal can be reconstructed smoothly and with its exact timing.[4:1] Sampling itself loses no information when the input is band-limited; the loss in digital audio comes from quantizing each sample to a limited number of bits.[5:1]

  1. ^a ^b ^c ^d ↗ sh-theorem ^ ↗ sh-history Shannon, Claude E. (1949-01). Communication in the Presence of Noise. Proceedings of the IRE. https://doi.org/10.1109/JRPROC.1949.232969 https://web.cs.miami.edu/home/burt/learning/Csc524.092/docs/shannonpaper.pdf.
  2. ^a ^b ^c ↗ js-theorem ^a ^b ↗ js-intro ^a ^b ↗ js-naming ^a ^b ↗ js-aliasing Smith III, Julius O. (2007). Mathematics of the Discrete Fourier Transform (DFT), with Audio Applications. W3K Publishing. ISBN 978-0-9745607-4-8. https://ccrma.stanford.edu/~jos/mdft/.
  3. ^a ^b ↗ un-problems ^a ^b ↗ un-credit ^ ↗ un-paradigm Unser, Michael (2000-04). Sampling—50 Years After Shannon. Proceedings of the IEEE. https://doi.org/10.1109/5.843002 https://infoscience.epfl.ch/record/63072.
  4. ^a ^b ^c ↗ xi-sampling Montgomery, Christopher (2012-03-01). 24/192 Music Downloads ...and why they make no sense. Xiph.Org. https://people.xiph.org/~xiphmont/demo/neil-young.html.
  5. ^ ↗ lp-adc Lipshitz, Stanley P.; Wannamaker, Robert A.; Vanderkooy, John (1992-05). Quantization and Dither: A Theoretical Survey. Journal of the Audio Engineering Society. https://www.aes.org/e-lib/browse.cfm?elib=7047.

Wikidata: Q679800

Available in