Content deleted Content added
change of notation for consistency with article Discrete-time Fourier transform |
fix typo |
||
(19 intermediate revisions by 14 users not shown) | |||
Line 1:
{{
The '''Nyquist–Shannon sampling theorem''' is an essential principle for [[digital signal processing]] linking the [[frequency range]] of a signal and the [[sample rate]] required to avoid a type of [[distortion]] called [[aliasing]]. The theorem states that the sample rate must be at least twice the [[Bandwidth (signal processing)|bandwidth]] of the signal to avoid aliasing. In practice, it is used to select [[band-limiting]] filters to keep aliasing below an acceptable amount when an analog signal is sampled or when sample rates are changed within a digital signal processing function.
Line 9:
Strictly speaking, the theorem only applies to a class of [[mathematical function]]s having a [[continuous Fourier transform|Fourier transform]] that is zero outside of a finite region of frequencies. Intuitively we expect that when one reduces a continuous function to a discrete sequence and [[interpolates]] back to a continuous function, the fidelity of the result depends on the density (or [[Sampling (signal processing)|sample rate]]) of the original samples. The sampling theorem introduces the concept of a sample rate that is sufficient for perfect fidelity for the class of functions that are [[bandlimiting|band-limited]] to a given bandwidth, such that no actual information is lost in the sampling process. It expresses the sufficient sample rate in terms of the bandwidth for the class of functions. The theorem also leads to a formula for perfectly reconstructing the original continuous-time function from the samples.
Perfect reconstruction may still be possible when the sample-rate criterion is not satisfied, provided other constraints on the signal are known (see {{
The name ''Nyquist–Shannon sampling theorem'' honours [[Harry Nyquist]] and [[Claude Shannon]], but the theorem was also previously discovered by [[E. T. Whittaker]] (published in 1915), and Shannon cited Whittaker's paper in his work. The theorem is thus also known by the names ''Whittaker–Shannon sampling theorem'', ''Whittaker–Shannon'', and ''Whittaker–Nyquist–Shannon'', and may also be referred to as the ''cardinal theorem of interpolation''.
Line 21:
A sufficient sample-rate is therefore anything larger than <math>2B</math> samples per second. Equivalently, for a given sample rate <math>f_s</math>, perfect reconstruction is guaranteed possible for a bandlimit <math>B < f_s/2</math>.
When the bandlimit is too high (or there is no bandlimit), the reconstruction exhibits imperfections known as [[aliasing]]. Modern statements of the theorem are sometimes careful to explicitly state that <math>x(t)</math> must contain no [[Sine wave|sinusoidal]] component at exactly frequency <math>B,</math> or that <math>B</math> must be strictly less than
[[File:Sinc function (normalized).svg|thumb|right|250px|The normalized [[sinc function]]: {{nowrap|sin(π{{var|x}}) / (π{{var|x}})}} ... showing the central peak at {{nowrap|1={{var|x}} = 0}}, and zero-crossings at the other integer values of {{var|x}}.]]
The symbol <math>T \triangleq 1/f_s</math> is customarily used to represent the interval between adjacent samples and is called the ''sample period'' or ''sampling interval''. The samples of function <math>x(t)</math> are commonly denoted by <math>x[n] \triangleq T\cdot x(nT)</math><ref>
{{cite book |last1=Ahmed |first1=N. |url=https://books.google.com/books?id=F-nvCAAAQBAJ |title=Orthogonal Transforms for Digital Signal Processing |last2=Rao |first2=K.R. |date=July 10, 1975 |publisher=Springer-Verlag |isbn=9783540065562 |edition=1 |___location=Berlin Heidelberg New York |language=English |doi=10.1007/978-3-642-45450-9}}</ref> (alternatively <math>x_n</math> in older signal processing literature), for all integer values of <math>n.</math>
A mathematically ideal way to interpolate the sequence involves the use of [[sinc function]]s. Each sample in the sequence is replaced by a sinc function, centered on the time axis at the original ___location of the sample <math>nT,</math> with the amplitude of the sinc function scaled to the sample value, <math>x(nT).</math> Subsequently, the sinc functions are summed into a continuous function. A mathematically equivalent method uses the [[Dirac comb#Sampling and aliasing|Dirac comb]] and proceeds by [[Convolution|convolving]] one sinc function with a series of [[Dirac delta]] pulses, weighted by the sample values. Neither method is numerically practical. Instead, some type of approximation of the sinc functions, finite in length, is used. The imperfections attributable to the approximation are known as ''interpolation error''.
Practical [[digital-to-analog converter]]s produce neither scaled and delayed [[sinc function]]s, nor ideal [[Dirac pulse]]s. Instead they produce a [[Step function|piecewise-constant
==Aliasing==
Line 40:
:<math>X(f)\ \triangleq\ \int_{-\infty}^{\infty} x(t) \ e^{- i 2 \pi f t} \ {\rm d}t,</math>
Then the samples
{{Equation box 1|title=
|indent=: |cellpadding= 0 |border= 0 |background colour=white
|equation = {{NumBlk||
|{{EquationRef|Eq.1}}}} }}
[[File:AliasedSpectrum.png|thumb|upright=1.8|right|<math>X(f)</math> (top blue) and <math>X_A(f)</math> (bottom blue) are continuous Fourier transforms of two {{em|different}} functions, <math>x(t)</math> and <math>x_A(t)</math> (not shown). When the functions are sampled at rate <math>f_s</math>, the images (green) are added to the original transforms (blue) when one examines the discrete-time Fourier transforms (DTFT) of the sequences. In this hypothetical example, the DTFTs are identical, which means {{em|the sampled sequences are identical}}, even though the original continuous pre-sampled functions are not. If these were audio signals, <math>x(t)</math> and <math>x_A(t)</math> might not sound the same. But their samples (taken at rate <math>f_s</math>) are identical and would lead to identical reproduced sounds; thus <math>x_A(t)</math> is an alias of <math>x(t)</math> at this sample rate.]]
Line 57 ⟶ 55:
As depicted, copies of <math>X(f)</math> are shifted by multiples of the sampling rate <math>f_s = 1/T</math> and combined by addition. For a band-limited function <math>(X(f) = 0, \text{ for all } |f| \ge B)</math> and sufficiently large <math>f_s,</math> it is possible for the copies to remain distinct from each other. But if the Nyquist criterion is not satisfied, adjacent copies overlap, and it is not possible in general to discern an unambiguous <math>X(f).</math> Any frequency component above <math>f_s/2</math> is indistinguishable from a lower-frequency component, called an ''alias'', associated with one of the copies. In such cases, the customary interpolation techniques produce the alias, rather than the original component. When the sample-rate is pre-determined by other considerations (such as an industry standard), <math>x(t)</math> is usually filtered to reduce its high frequencies to acceptable levels before it is sampled. The type of filter required is a [[lowpass filter]], and in this application it is called an [[anti-aliasing filter]].
[[File:ReconstructFilter.
[[File:Nyquist sampling.gif|upright=1.8|thumb|right|The figure on the left shows a function (in gray/black) being sampled and reconstructed (in gold) at steadily increasing sample-densities, while the figure on the right shows the frequency spectrum of the gray/black function, which does not change. The highest frequency in the spectrum is half the width of the entire spectrum. The width of the steadily-increasing pink shading is equal to the sample-rate. When it encompasses the entire frequency spectrum it is twice as large as the highest frequency, and that is when the reconstructed waveform matches the sampled one.]]
Line 102 ⟶ 100:
:because <math>X(\omega)</math> is assumed to be zero outside the band <math>\left|\tfrac{\omega}{2\pi}\right| < B.</math> If we let <math>t = \tfrac{n}{2B},</math> where <math>n</math> is any positive or negative integer, we obtain:
{{Equation box 1|title=
|indent=: |cellpadding= 0 |border= 0 |background colour=white
|equation = {{NumBlk|:|
|{{EquationRef|Eq.2}}}} }}
:On the left are values of <math>x(t)</math> at the sampling points. The integral on the right will be recognized as essentially{{
Line 119 ⟶ 115:
Shannon's proof of the theorem is complete at that point, but he goes on to discuss reconstruction via [[sinc function]]s, what we now call the [[Whittaker–Shannon interpolation formula]] as discussed above. He does not derive or prove the properties of the sinc function, as the Fourier pair relationship between the [[rectangular function|rect]] (the rectangular function) and sinc functions was well known by that time.<ref>{{cite book |last1=Campbell |first1=George |last2=Foster |first2=Ronald |title=Fourier Integrals for Practical Applications |date=1942 |publisher=Bell Telephone System Laboratories |___location=New York}}</ref>
{{
Let <math>x_n</math> be the <math>n^{th}</math> sample. Then the function <math>x(t)</math> is represented by:
Line 128 ⟶ 124:
===Notes===
<!---Bug report: The group=proof tag attracts the intended footnote, but it also attracts one of the
{{notelist|group=proof}}
Line 149 ⟶ 145:
[[File:CriticalFrequencyAliasing.svg|thumb|right|A family of sinusoids at the critical frequency, all having the same sample sequences of alternating +1 and –1. That is, they all are aliases of each other, even though their frequency is not above half the sample rate.]]
==Critical frequency==
To illustrate the necessity of <math>f_s>2B,</math> consider the family of sinusoids generated by different values of <math>\theta</math> in this formula:
Line 163 ⟶ 160:
As discussed by Shannon:<ref name="Shannon49"/>
{{
That is, a sufficient no-loss condition for sampling [[signal (information theory)|signal]]s that do not have [[baseband]] components exists that involves the ''width'' of the non-zero frequency interval as opposed to its highest frequency component. See ''[[Sampling (signal processing)|sampling]]'' for more details and examples.
For example, in order to sample [[FM broadcasting|FM radio]] signals in the frequency range of 100–102 [[megahertz|MHz]], it is not necessary to sample at 204 MHz (twice the upper frequency), but rather it is sufficient to sample at 4 MHz (twice the width of the frequency interval). (Reconstruction is not usually the goal with sampled IF or RF signals. Rather, the sample sequence can be treated as ordinary samples of the signal frequency-shifted to near baseband, and digital demodulation can proceed on that basis.)
:<math>\left(\frac{N}2 f_\mathrm{s}, \frac{N+1}2 f_\mathrm{s}\right),</math>
for some nonnegative integer <math>N</math> and some sampling frequency <math>f_\mathrm{s}</math>, it is possible to find an interpolation that reproduces the signal. Note that there may be several combinations of <math>N</math> and <math>f_\mathrm{s}</math> that work, including the normal baseband condition as the case <math>N=0.</math> The corresponding interpolation
▲The corresponding interpolation function is the impulse response of an ideal brick-wall [[bandpass filter]] (as opposed to the ideal [[brick-wall filter|brick-wall]] [[lowpass filter]] used above) with cutoffs at the upper and lower edges of the specified band, which is the difference between a pair of lowpass impulse responses:
<math display="block">(N+1)\,\operatorname{sinc} \left(\frac{(N+1)t}T\right) - N\,\operatorname{sinc}\left( \frac{Nt}T \right).</math>
This function is 1 at <math>t=0</math> and zero at any other multiple of <math>T</math> (as well as at other times if <math>N>0</math>).
Other generalizations, for example to signals occupying multiple non-contiguous bands, are possible as well. Even the most generalized form of the sampling theorem does not have a provably true converse. That is, one cannot conclude that information is necessarily lost just because the conditions of the sampling theorem are not satisfied; from an engineering perspective, however, it is generally safe to assume that if the sampling theorem is not satisfied then information will most likely be lost.
Line 197 ⟶ 194:
==Historical background==
The sampling theorem was implied by the work of [[Harry Nyquist]] in 1928,<ref>{{cite journal | last=Nyquist |first=Harry | author-link =Harry Nyquist | title =Certain topics in telegraph transmission theory | journal =Transactions of the AIEE | volume =47 | issue =2 | pages =617–644 | date =April 1928 | doi=10.1109/t-aiee.1928.5055024| bibcode =1928TAIEE..47..617N }} [https://web.archive.org/web/20130926031230/http://www.ieee.org/publications_standards/publications/proceedings/nyquist.pdf Reprint as classic paper] in: ''Proceedings of the IEEE'', Vol. 90, No. 2, February 2002.
The sampling theorem, essentially a [[duality (mathematics)|dual]] of Nyquist's result, was proved by [[Claude E. Shannon]].<ref name="Shannon49"/>
In 1948 and 1949, Claude E. Shannon published the two revolutionary articles in which he founded
<math display="block">f(t) = \sum_{n=-\infty}^\infty X_n \frac{\sin \pi(2Wt - n)}{\pi(2Wt - n)},</math>
where <math>X_n = f\left(\frac n {2W} \right).</math>
It was not until these articles were published that the theorem known as "Shannon's sampling theorem" became common property among communication engineers, although Shannon himself writes that this is a fact which is common knowledge in the communication art.{{efn-ua|group=bottom|[[#refShannon49|Shannon 1949]], p. 448.}} A few lines further on, however, he adds: "but in spite of its evident importance, [it] seems not to have appeared explicitly in the literature of [[communication theory]]". Despite his sampling theorem being published at the end of the 1940s, Shannon had derived his sampling theorem as early as 1940.<ref>{{Cite conference |last1=Stanković |first1=Raromir S. |last2=Astola |first2=Jaakko T. |last3=Karpovsky |first3=Mark G. |date=September 2006 |title=Some Historic Remarks On Sampling Theorem |url=https://sites.bu.edu/mark/files/2018/02/196.pdf |conference=Proceedings of the 2006 International TICSP Workshop on Spectral Methods and Multirate Signal Processing}}</ref>
===Other discoverers===
Others who have independently discovered or played roles in the development of the sampling theorem have been discussed in several historical articles, for example, by Jerri<ref>{{cite journal | last=Jerri | first=Abdul | author-link=Abdul Jerri | title=The Shannon Sampling Theorem—Its Various Extensions and Applications: A Tutorial Review | journal=Proceedings of the IEEE | volume=65 | issue=11 | pages=1565–1596 | date=November 1977 | doi=10.1109/proc.1977.10771 | bibcode=1977IEEEP..65.1565J | s2cid=37036141 }} See also {{cite journal | last=Jerri | first=Abdul | title=Correction to 'The Shannon sampling theorem—Its various extensions and applications: A tutorial review' | journal=Proceedings of the IEEE | volume=67 | issue=4 | page=695 | date=April 1979 | doi=10.1109/proc.1979.11307 }}</ref> and by Lüke.<ref>{{cite journal | last=Lüke | first=Hans Dieter | title =The Origins of the Sampling Theorem | journal =IEEE Communications Magazine | pages =106–108 | date =April 1999 | issue=4 | doi =10.1109/35.755459 | volume=37| url=http://www.hit.bme.hu/people/papay/edu/Conv/pdf/origins.pdf | citeseerx=10.1.1.163.2887 }}</ref> For example, Lüke points out that
{{
As pointed out by Higgins, the sampling theorem should really be considered in two parts, as done above: the first stating the fact that a bandlimited function is completely determined by its samples, the second describing how to reconstruct the function using its samples. Both parts of the sampling theorem were given in a somewhat different form by [[J. M. Whittaker]] and before him also by Ogura. They were probably not aware of the fact that the first part of the theorem had been stated as early as 1897 by [[Émile Borel|Borel]].{{refn|group= Meijering|Several authors, following Black, have claimed that this first part of the sampling theorem was stated even earlier by Cauchy, in a paper published in 1841. However, the paper of Cauchy does not contain such a statement, as has been pointed out by Higgins.}} As we have seen, Borel also used around that time what became known as the cardinal series. However, he appears not to have made the link. In later years it became known that the sampling theorem had been presented before Shannon to the Russian communication community by [[Vladimir Kotelnikov|Kotel'nikov]]. In more implicit, verbal form, it had also been described in the German literature by [[Herbert Raabe|Raabe]]. Several authors have mentioned that Someya introduced the theorem in the Japanese literature parallel to Shannon. In the English literature, Weston introduced it independently of Shannon around the same time.{{refn|group= Meijering|As a consequence of the discovery of the several independent introductions of the sampling theorem, people started to refer to the theorem by including the names of the aforementioned authors, resulting in such catchphrases as "the Whittaker–Kotel'nikov–Shannon (WKS) sampling theorem" or even "the Whittaker–Kotel'nikov–Raabe–Shannon–Someya sampling theorem". To avoid confusion, perhaps the best thing to do is to refer to it as the sampling theorem, "rather than trying to find a title that does justice to all claimants".}}
{{reflist|group= Meijering}}|Eric Meijering, "A Chronology of Interpolation From Ancient Astronomy to Modern Signal and Image Processing" (citations omitted)
}}
In Russian literature it is known as the Kotelnikov's theorem, named after [[Vladimir Kotelnikov]], who discovered it in 1933.<ref>Kotelnikov VA, ''On the transmission capacity of "ether" and wire in electrocommunications'', [http://ict.open.ac.uk/classics/1.pdf (English translation, PDF)] {{Webarchive|url=https://web.archive.org/web/20210301042517/http://ict.open.ac.uk/classics/1.pdf |date=2021-03-01 }}, Izd. Red. Upr. Svyazzi RKKA (1933), Reprint in ''[http://www.ieeta.pt/~pjf/MSTMA/ Modern Sampling Theory: Mathematics and Applications]'', Editors: J. J. Benedetto und PJSG Ferreira, Birkhauser (Boston) 2000, {{ISBN|0-8176-4023-1}}.</ref>
===Why Nyquist?===
Exactly how, when, or why [[Harry Nyquist]] had his name attached to the sampling theorem remains obscure. The term ''Nyquist Sampling Theorem'' (capitalized thus) appeared as early as 1959 in a book from his former employer, [[Bell Labs]],<ref>{{cite book | title = Transmission Systems for Communications | author = Members of the Technical Staff of Bell Telephone Lababoratories | year = 1959 | publisher = AT&T |
In 1958, [[R. B. Blackman|Blackman]] and [[J. W. Tukey|Tukey]] cited Nyquist's 1928 article as a reference for ''the sampling theorem of information theory'',<ref>{{cite journal
| last1 = Blackman | first1 = R. B. | author1-link = R. B. Blackman
| last2 = Tukey | first2 = J. W. | author2-link = J. W. Tukey
| doi = 10.1002/j.1538-7305.1958.tb03874.x
| journal = [[The Bell System Technical Journal]]
| mr = 102897
| pages = 185–282
| title = The measurement of power spectra from the point of view of communications engineering. I
| volume = 37
| year = 1958}} See glossary, pp. 269–279. Cardinal theorem is on p. 270 and sampling theorem is on p. 277.</ref> even though that article does not treat sampling and reconstruction of continuous signals as others did. Their glossary of terms includes these entries:
{{
{{glossary}}
{{term|Sampling theorem (of information theory)}}
Line 238 ⟶ 244:
Similarly, Nyquist's name was attached to ''[[Nyquist rate]]'' in 1953 by [[Harold Stephen Black|Harold S. Black]]:
{{blockquote|If the essential frequency range is limited to <math>B</math> cycles per second, <math>2B</math> was given by Nyquist as the maximum number of code elements per second that could be unambiguously resolved, assuming the peak interference is less than half a quantum step. This rate is generally referred to as '''signaling at the Nyquist rate''' and <math>\frac 1 {2B}</math> has been termed a ''Nyquist interval''.|Harold Black, ''Modulation Theory''<ref>{{cite book |first=Harold S. |last=Black |title=Modulation Theory |year=1953 }}</ref> (bold added for emphasis; italics as in the original)}}
According to the ''[[Oxford English Dictionary]]'', this may be the origin of the term ''Nyquist rate''. In Black's usage, it is not a sampling rate, but a signaling rate.
Line 295 ⟶ 301:
[[Category:Claude Shannon]]
[[Category:Telecommunication theory]]
[[Category:Data compression]]
|