article

In signal processing, sampling is the reduction of a continuous signal to a discrete signal. A common example is the conversion of a sound wave (a continuous time signal) to a sequence of samples (a discrete time signal).

Theory


See also: Nyquist–Shannon sampling theorem

For convenience, we will discuss signals which vary with time. However, the same results can be applied to signals varying in space or in any other dimension.

Let x(t) be a continuous signal which is to be sampled, and that sampling is performed by measuring the value of the continuous signal every T seconds. Thus, the sampled signal x* is given by

x* = x(nT)
with n = 0, 1, 2, 3, ....

The sampling frequency or sampling rate f_s is defined as the number of samples obtained in one second, or f_s = 1/T. The sampling rate is measured in Hertz or in samples per second.

We can now ask: under what circumstances is it possible to reconstruct the original signal completely and exactly (perfect reconstruction)?

The answer is provided by the Nyquist–Shannon sampling theorem. The sampling theorem guarantees that bandlimited signals (i.e., signals which have a maximum frequency) can be reconstructed perfectly from their sampled version. Specifically, the sampling theorem states that reconstruction is possible if the sampling rate is more than twice the maximum frequency. Reconstruction is achieved using the Whittaker–Shannon interpolation formula.

The frequency equal to one half of the sampling rate is therefore the highest frequency that can be unambigiously represented by the sampled signal. This frequency (half the sampling rate) is called the Nyquist frequency. Frequencies above the Nyquist frequency N can be observed in the digital signal, but their frequency is ambiguous. That is, a frequency component with frequency f cannot be distinguished from another component with frequency 2N+f, 4N+f, etc. This ambiguity is called aliasing. To handle this problem as gracefully as possible, most analog signals are filtered with an anti-aliasing filter (usually a low-pass filter) at the Nyquist frequency before conversion to the digital representation.

A more general statement of the Nyquist-Shannon sampling theorem says that the signals with frequencies higher than the Nyquist frequency can be sampled, provided their bandwidth (non-zero frequency band) is small enough and the bandlimits are known.

Sampling interval

The sampling interval is a span of time during which a series of data samples are collected at regular intervals. More broadly, it can refer to any specific interval during which a set of data points is gathered, regardless of whether or not the data is periodic in nature. Thus a researcher might study the incidence of earthquakes and tsunamis over a particular time period, such as a year or a century.

The sampling interval is simply the span of time during which the data is studied, regardless of whether data so gathered represents a set of discrete events having arbitrary timing within the interval, or whether the samples are explicitly bound to specified sub-intervals.

Practical implications


In practice, the continuous signal is sampled using an analog-to-digital converter (ADC), a non-ideal device with various physical limitations. This results in deviations from the theoretically perfect reconstruction capabilities, collectively referred to as distortion.

Various types of distortion can occur, including:

  • Aliasing. A precondition of the sampling theorem is that the signal be bandlimited. However, in practice, no time-limited signal can be bandlimited. Since signals of interest are almost always time-limited (e.g., at most spanning the lifetime of the sampling device in question), it follows that they are not bandlimited. However, by designing a sampler with an appropriate guard band, it is possible to obtain output that is as accurate as necessary.
  • Integration effect or aperture effect. This results from the fact that the sample is obtained as a time average within a sampling region, rather than just being equal to the signal value at the sampling instant. The integration effect is readily noticeable in photography when the exposure is too long and creates a blur in the image. An ideal camera would have an exposure time of zero. In a capacitor-based sample and hold circuit, the integration effect is introduced because the capacitor cannot instantly change voltage thus requiring the sample to have non-zero width.
  • Jitter or deviation from the precise sample timing intervals.
  • Noise, including thermal sensor noise, analog circuit noise, etc.
  • Slew rate limit error, caused by an inability for an ADC output value to change sufficiently rapidly.
  • Quantization as a consquence of the finite precision of words that represent the converted values.
  • Error due to other non-linear effects of the mapping of input voltage to converted output value (in addition to the effects of quantization).

The conventional, practical digital-to-analog converter (DAC) does not output a sequence of dirac impulses (such that, if ideally low-pass filtered, result in the original signal before sampling) but instead output a sequence of piecewise constant values or rectangular pulses. This means that there is an inherent effect of the zero-order hold on the effective frequency response of the DAC resulting in a mild roll-off of gain at the higher frequencies (a 3.9224 dB loss at the Nyquist frequency). This zero-order hold effect is a consequence of the hold action of the DAC and is not due to the sample-and-hold that might precede a conventional ADC as is often misunderstood. The DAC can also suffer errors from jitter, noise, slewing, and non-linear mapping of input value to output voltage.

Jitter, noise, and quantization are often analyzed by modeling them as random errors added to the sample values. Integration and zero-order hold effects can be analyzed as a form of low-pass filtering. The non-linearities of either ADC or DAC are analyzed by replacing the ideal linear function mapping with a proposed nonlinear function.

Applications


Audio sampling

Audio waveforms are commonly sampled at 44.1k samples/s (CD) or 48k samples/s (professional audio). This is usually sufficient for any practical purpose, since the human auditory system is capable of discerning sounds up to about 15-20 kHz.

The recent trend towards higher sampling rates, at two or four times this basic requirement, has not been justified theoretically, or shown to make any audible difference, even under the most critical listening conditions. Nevertheless, a lot of 96kHz equipment is now used in studio recording, and 'superaudio' formats are being promised to consumers, mostly as a DVD option. Most articles purporting to justify a need for more than 48 kHz state that the 'dynamic range' of 16-bit audio is 96dB, a figure commonly derived from the simple ratio of quantizing level to full-scale level, which is 2^{16}, or 65536. This calculation fails to take into account the fact that peak level is not maximum permitted sine-wave signal level, and quantizing step size is not rms noise level, and even if it were it would not represent loudness, without the application of the ITU-R 468 noise weighting function. A proper analysis of typical programme levels throughout the audio chain reveals the fact that the capabilities of well engineered 16-bit recording far exceed those of the very best hi-fi systems, with the microphone noise and loudspeaker headroom being the real limiting factors.

Speech sampling

Speech signals, i.e., signals intended to carry only human speech, can usually be sampled at a much lower rate. For most phonemes, almost all of the energy is contained in the 0-4 kHz range, allowing a sampling rate of 8 kHz. This is the sampling rate used by nearly all telephony systems, which use the G.711 sampling and quantization specifications.

Video sampling

Standard-definition television (SDTV) uses 704 by 576 pixels (UK PAL 625-line) for the visible picture area.

High-definition television (HDTV) is currently moving towards two standards referred to as 720p (progressive) and 1080i (interlaced), which all 'HD-Ready' sets will be able to display.

Video reconstruction filtering
Most TV sets do not achieve basic SDTV quality, because they do not reconstruct the vertically sampled image properly. Digital video produces a 2-dimensional set of samples of each frame, which requires a 2-dimensional 'brick-wall' reconstruction filter for proper reproduction of the image. CRT displays produce a raster scan of horizontal lines, and the digital signal is low-pass filtered along the horizontal lines, giving good resolution of vertical lines without aliasing, but reconstruction is not usually attempted vertically, so that the resulting picture contains very visible artifacts (loss of resolution, staircasing effects, fringing pattern, sampling harmonics, and other adverse effects).

Proper 2-dimensional reconstruction requires a final display with many more pixels than the signal format, and modern HDTV sets can provide this, producing much better resolution pictures than even a top studio monitor can from SDTV signals (though they are not so good regarding grey-level accuracy, especially near black level).

As with audio, this theoretical need for reconstruction is not commonly realised, though it was recognised by the BBC who then backed off from broadcasting HDTV but started to record programmes in HDTV.

To get a true HDTV image you really need a 'super HDTV' display, with at least twice as many pixels again (3840 x 2160)!! Worth bearing in mind though not currently practical. Nevertheless, HDTV does a very significant increase in resolution over SDTV when both are compared on a HDTV set, the higher Nyquist frequency bringing improvements despite the fact that the image is not properly reconstructed on currently available displays.

See also


References


  • Matt Pharr and Greg Humphreys, Physically Based Rendering: From Theory to Implementation, Morgan Kaufmann, July 2004. ISBN 012553180X. The chapter on sampling (available online) is nicely written with diagrams, core theory and code sample.

Signal processing

Vzorek | Abtastung | Échantillonnage (signal) | Sample | 標本化 | Próbkowanie | 取樣

 

This article is licensed under the GNU Free Documentation License. It uses material from the "Sampling (signal processing)".

Home Pageartsbusinesscomputersgameshealthhospitalshomekids & teensnewsphysiciansrecreationreferenceregionalscienceshoppingsocietysportsworld