Sampling (signal processing)
From Free net encyclopedia
In signal processing, sampling is the reduction of a signal from continuous time to discrete time.
When generated by sampling, a discrete-time signal is a discrete representation of a continuous analog signal (for example, a real-world signal that might represent a pressure or a velocity). The continuous signal is usually sampled at regular intervals by an analog to digital converter (ADC) and the value of the continuous signal in that interval is represented by a discrete or quantized value.
This representation often introduces some error into the data. The error depends mostly on the sampling frequency relative to the frequency content of the continuous analog signal being sampled, and the number of bits used when quantizing. The sampling frequency or sampling rate is the rate at which samples are taken of the continuous signal. It represents the temporal or spatial accuracy of the discrete signal. The number of bits used for one value of the discrete signal indicates how accurately the signal magnitude is represented.
In a theoretical sampler, a continuous signal is multiplied by a Dirac comb, yielding another continuous signal. Only when this signal is quantized does it become a discrete signal where all three indices are discretized.
The Nyquist-Shannon sampling theorem, a fundamental theorem of signal processing, states that a sampled signal cannot unambiguously represent signal components with frequencies above half the sampling frequency. This frequency (half the sampling frequency) 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, 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.
Within the limitations of the sampling theorem, the original signal can be completely reconstructed to within the resolution of the sample values from the set of ideal samples. The reconstructed signal is formed by using each sample to weight a sinc function and summing the results, using the Nyquist-Shannon interpolation formula.
References
- Matt Pharr and Greg Humphreys, Physically Based Rendering: From Theory to Implementation, Morgan Kaufmann, July 2004. ISBN 012553180X — Chapter on sampling is nicely written with diagrams, core theory and code sample. The chapter on sampling from Physically Based Rendering is available on Matt Pharr's website: [1].