Frequent Links
Sampling (signal processing)
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 signal) to a sequence of samples (a discretetime signal).
A sample is a value or set of values at a point in time and/or space.
A sampler is a subsystem or operation that extracts samples from a continuous signal.
A theoretical ideal sampler produces samples equivalent to the instantaneous value of the continuous signal at the desired points.
Contents
Theory
 See also: Nyquist–Shannon sampling theorem
Sampling can be done for functions varying in space, time, or any other dimension, and similar results are obtained in two or more dimensions.
For functions that vary with time, let s(t) be a continuous function (or "signal") to be sampled, and let sampling be performed by measuring the value of the continuous function every T seconds, which is called the sampling interval.^{[1]} Then the sampled function is given by the sequence:
 s(nT), for integer values of n.
The sampling frequency or sampling rate, f_{s}, is the average number of samples obtained in one second (samples per second), thus f_{s} = 1/T.
Reconstructing a continuous function from samples is done by interpolation algorithms. The Whittaker–Shannon interpolation formula is mathematically equivalent to an ideal lowpass filter whose input is a sequence of Dirac delta functions that are modulated (multiplied) by the sample values. When the time interval between adjacent samples is a constant (T), the sequence of delta functions is called a Dirac comb. Mathematically, the modulated Dirac comb is equivalent to the product of the comb function with s(t). That purely mathematical abstraction is sometimes referred to as impulse sampling.^{[2]}
Most sampled signals are not simply stored and reconstructed. But the fidelity of a theoretical reconstruction is a customary measure of the effectiveness of sampling. That fidelity is reduced when s(t) contains frequency components whose periodicity is smaller than 2 samples; or equivalently the ratio of cycles to samples exceeds ½ (see Aliasing). The quantity ½ cycles/sample × f_{s} samples/sec = f_{s}/2 cycles/sec (hertz) is known as the Nyquist frequency of the sampler. Therefore s(t) is usually the output of a lowpass filter, functionally known as an antialiasing filter. Without an antialiasing filter, frequencies higher than the Nyquist frequency will influence the samples in a way that is misinterpreted by the interpolation process.^{[3]}
Practical considerations
In practice, the continuous signal is sampled using an analogtodigital converter (ADC), a device with various physical limitations. This results in deviations from the theoretically perfect reconstruction, collectively referred to as distortion.
Various types of distortion can occur, including:
 Aliasing. Some amount of aliasing is inevitable because only theoretical, infinitely long, functions can have no frequency content above the Nyquist frequency. Aliasing can be made arbitrarily small by using a sufficiently large order of the antialiasing filter.
 Aperture error 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. In a capacitorbased sample and hold circuit, aperture error is introduced because the capacitor cannot instantly change voltage thus requiring the sample to have nonzero 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 the inability of the ADC input value to change sufficiently rapidly.
 Quantization as a consequence of the finite precision of words that represent the converted values.
 Error due to other nonlinear effects of the mapping of input voltage to converted output value (in addition to the effects of quantization).
Although the use of oversampling can completely eliminate aperture error and aliasing by shifting them out of the pass band, this technique cannot be practically used above a few GHz, and may be prohibitively expensive at much lower frequencies. Furthermore, while oversampling can reduce quantization error and nonlinearity, it cannot eliminate these entirely. Consequently, practical ADCs at audio frequencies typically do not exhibit aliasing, aperture error, and are not limited by quantization error. Instead, analog noise dominates. At RF and microwave frequencies where oversampling is impractical and filters are expensive, aperture error, quantization error and aliasing can be significant limitations.
Jitter, noise, and quantization are often analyzed by modeling them as random errors added to the sample values. Integration and zeroorder hold effects can be analyzed as a form of lowpass filtering. The nonlinearities of either ADC or DAC are analyzed by replacing the ideal linear function mapping with a proposed nonlinear function.
Applications
Audio sampling
Digital audio uses pulsecode modulation and digital signals for sound reproduction. This includes analogtodigital conversion (ADC), digitaltoanalog conversion (DAC), storage, and transmission. In effect, the system commonly referred to as digital is in fact a discretetime, discretelevel analog of a previous electrical analog. While modern systems can be quite subtle in their methods, the primary usefulness of a digital system is the ability to store, retrieve and transmit signals without any loss of quality.
Sampling rate
When it is necessary to capture audio covering the entire 20–20,000 Hz range of human hearing,^{[4]} such as when recording music or many types of acoustic events, audio waveforms are typically sampled at 44.1 kHz (CD), 48 kHz, 88.2 kHz, or 96 kHz.^{[5]} The approximately doublerate requirement is a consequence of the Nyquist theorem. Sampling rates higher than about 50 kHz to 60 kHz cannot supply more usable information for human listeners. Early professional audio equipment manufacturers chose sampling rates in the region of 50 kHz for this reason.
There has been an industry trend towards sampling rates well beyond the basic requirements: such as 96 kHz and even 192 kHz^{[6]} This is in contrast with laboratory experiments, which have failed to show that ultrasonic frequencies are audible to human observers; however in some cases ultrasonic sounds do interact with and modulate the audible part of the frequency spectrum (intermodulation distortion).^{[7]} It is noteworthy that intermodulation distortion is not present in the live audio and so it represents an artificial coloration to the live sound.^{[8]} One advantage of higher sampling rates is that they can relax the lowpass filter design requirements for ADCs and DACs, but with modern oversampling sigmadelta converters this advantage is less important.
The Audio Engineering Society recommends 48 kHz sampling rate for most applications but gives recognition to 44.1 kHz for Compact Disc and other consumer uses, 32 kHz for transmissionrelated applications, and 96 kHz for higher bandwidth or relaxed antialiasing filtering.^{[9]}
A more complete list of common audio sample rates is:
Sampling rate  Use 

8,000 Hz  Telephone and encrypted walkietalkie, wireless intercom^{[10]} and wireless microphone^{[11]} transmission; adequate for human speech but without sibilance; ess sounds like eff (/s/, /f/). 
11,025 Hz  One quarter the sampling rate of audio CDs; used for lowerquality PCM, MPEG audio and for audio analysis of subwoofer bandpasses.^{[citation needed]} 
16,000 Hz  Wideband frequency extension over standard telephone narrowband 8,000 Hz. Used in most modern VoIP and VVoIP communication products.^{[12]} 
22,050 Hz  One half the sampling rate of audio CDs; used for lowerquality PCM and MPEG audio and for audio analysis of low frequency energy. Suitable for digitizing early 20th century audio formats such as 78s.^{[13]} 
32,000 Hz  miniDV digital video camcorder, video tapes with extra channels of audio (e.g. DVCAM with 4 Channels of audio), DAT (LP mode), Germany's Digitales Satellitenradio, NICAM digital audio, used alongside analogue television sound in some countries. Highquality digital wireless microphones.^{[14]} Suitable for digitizing FM radio.^{[citation needed]} 
37,800 Hz  CDXA audio 
44,056 Hz  Used by digital audio locked to NTSC color video signals (3 samples per line, 245 lines per field, 59.94 fields per second = 29.97 frames per second). 
44,100 Hz  Audio CD, also most commonly used with MPEG1 audio (VCD, SVCD, MP3). Originally chosen by Sony because it could be recorded on modified video equipment running at either 25 frames per second (PAL) or 30 frame/s (using an NTSC monochrome video recorder) and cover the 20 kHz bandwidth thought necessary to match professional analog recording equipment of the time. A PCM adaptor would fit digital audio samples into the analog video channel of, for example, PAL video tapes using 3 samples per line, 588 lines per frame, 25 frames per second. 
47,250 Hz  world's first commercial PCM sound recorder by Nippon Columbia (Denon) 
48,000 Hz  The standard audio sampling rate used by professional digital video equipment such as tape recorders, video servers, vision mixers and so on. This rate was chosen because it could reconstruct frequencies up to 22 kHz and work with 29.97 frames per second NTSC video  as well as 25 frame/s, 30 frame/s and 24 frame/s systems. With 29.97 frame/s systems it is necessary to handle 1601.6 audio samples per frame delivering an integer number of audio samples only every fifth video frame.^{[9]} Also used for sound with consumer video formats like DV, digital TV, DVD, and films. The professional Serial Digital Interface (SDI) and Highdefinition Serial Digital Interface (HDSDI) used to connect broadcast television equipment together uses this audio sampling frequency. Most professional audio gear uses 48 kHz sampling, including mixing consoles, and digital recording devices. 
50,000 Hz  First commercial digital audio recorders from the late 70s from 3M and Soundstream. 
50,400 Hz  Sampling rate used by the Mitsubishi X80 digital audio recorder. 
88,200 Hz  Sampling rate used by some professional recording equipment when the destination is CD (multiples of 44,100 Hz). Some pro audio gear uses (or is able to select) 88.2 kHz sampling, including mixers, EQs, compressors, reverb, crossovers and recording devices. 
96,000 Hz  DVDAudio, some LPCM DVD tracks, BDROM (Bluray Disc) audio tracks, HD DVD (HighDefinition DVD) audio tracks. Some professional recording and production equipment is able to select 96 kHz sampling. This sampling frequency is twice the 48 kHz standard commonly used with audio on professional equipment. 
176,400 Hz  Sampling rate used by HDCD recorders and other professional applications for CD production. 
192,000 Hz  DVDAudio, some LPCM DVD tracks, BDROM (Bluray Disc) audio tracks, and HD DVD (HighDefinition DVD) audio tracks, HighDefinition audio recording devices and audio editing software. This sampling frequency is four times the 48 kHz standard commonly used with audio on professional video equipment. 
352,800 Hz  Digital eXtreme Definition, used for recording and editing Super Audio CDs, as 1bit DSD is not suited for editing. Eight times the frequency of 44.1 kHz. 
2,822,400 Hz  SACD, 1bit deltasigma modulation process known as Direct Stream Digital, codeveloped by Sony and Philips. 
5,644,800 Hz  DoubleRate DSD, 1bit Direct Stream Digital at 2x the rate of the SACD. Used in some professional DSD recorders. 
Bit depth
Audio is typically recorded at 8, 16, and 20bit depth, which yield a theoretical maximum Signaltoquantizationnoise ratio (SQNR) for a pure sine wave of, approximately, 49.93 dB, 98.09 dB and 122.17 dB.^{[15]} CD quality audio uses 16bit samples. Thermal noise limits the true number of bits that can be used in quantization. Few analog systems have signal to noise ratios (SNR) exceeding 120 dB. However, digital signal processing operations can have very high dynamic range, consequently it is common to perform mixing and mastering operations at 32bit precision and then convert to 16 or 24 bit for distribution.
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 5Hz4 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
This section needs additional citations for verification. (June 2007) 
Highdefinition television (HDTV) uses 720p (progressive), 1080i (interlaced), and 1080p (progressive, also known as FullHD).
In digital video, the temporal sampling rate is defined the frame rate – or rather the field rate – rather than the notional pixel clock. The image sampling frequency is the repetition rate of the sensor integration period. Since the integration period may be significantly shorter than the time between repetitions, the sampling frequency can be different from the inverse of the sample time:
Video digitaltoanalog converters operate in the megahertz range (from ~3 MHz for low quality composite video scalers in early games consoles, to 250 MHz or more for the highestresolution VGA output).
When analog video is converted to digital video, a different sampling process occurs, this time at the pixel frequency, corresponding to a spatial sampling rate along scan lines. A common pixel sampling rate is:
Spatial sampling in the other direction is determined by the spacing of scan lines in the raster. The sampling rates and resolutions in both spatial directions can be measured in units of lines per picture height.
Spatial aliasing of highfrequency luma or chroma video components shows up as a moiré pattern.
3D sampling
The process of volume rendering samples a 3D grid of voxels to produce 3D renderings of sliced (tomographic) data. The 3D grid is assumed to represent a continuous region of 3D space. Volume rendering is common in medial imaging, Xray computed tomography (CT/CAT), Magnetic resonance imaging (MRI), Positron Emission Tomography (PET) are some examples. It is also used for Seismic tomography and other applications.
Undersampling
When a bandpass signal is sampled slower than its Nyquist rate, the samples are indistinguishable from samples of a lowfrequency alias of the highfrequency signal. That is often done purposefully in such a way that the lowestfrequency alias satisfies the Nyquist criterion, because the bandpass signal is still uniquely represented and recoverable. Such undersampling is also known as bandpass sampling, harmonic sampling, IF sampling, and direct IF to digital conversion.^{[16]}
Oversampling
Oversampling is used in most modern analogtodigital converters to reduce the distortion introduced by practical digitaltoanalog converters, such as a zeroorder hold instead of idealizations like the Whittaker–Shannon interpolation formula.^{[17]}
Complex sampling
Complex sampling (I/Q sampling) is the simultaneous sampling of two different, but related, waveforms, resulting in pairs of samples that are subsequently treated as complex numbers.^{[note 1]} When one waveform<math>, \hat s(t),</math> is the Hilbert transform of the other waveform<math>, s(t),\,</math> the complexvalued function, <math>s_a(t)\ \stackrel{\text{def}}{=}\ s(t) + j\cdot \hat s(t),</math> is called an analytic signal, whose Fourier transform is zero for all negative values of frequency. In that case, the Nyquist rate for a waveform with no frequencies ≥ B can be reduced to just B (complex samples/sec), instead of 2B (real samples/sec).^{[note 2]} More apparently, the equivalent baseband waveform, <math>s_a(t)\cdot e^{j 2\pi \frac{B}{2} t},</math> also has a Nyquist rate of B, because all of its nonzero frequency content is shifted into the interval [B/2, B/2).
Although complexvalued samples can be obtained as described above, they are also created by manipulating samples of a realvalued waveform. For instance, the equivalent baseband waveform can be created without explicitly computing <math>\hat s(t),</math> by processing the product sequence<math>, \left [s(nT)\cdot e^{j 2 \pi \frac{B}{2}Tn}\right ],</math>^{[note 3]} through a digital lowpass filter whose cutoff frequency is B/2.^{[note 4]} Computing only every other sample of the output sequence reduces the samplerate commensurate with the reduced Nyquist rate. The result is half as many complexvalued samples as the original number of real samples. No information is lost, and the original s(t) waveform can be recovered, if necessary.
See also
 Downsampling
 Upsampling
 Multidimensional sampling
 Sample rate conversion
 Digitizing
 Sample and hold
 Beta encoder
 Kell factor
 Bit rate
Notes
 ^ Samplepairs are also sometimes viewed as points on a constellation diagram.
 ^ When the complex samplerate is B, a frequency component at 0.6 B, for instance, will have an alias at −0.4 B, which is unambiguous because of the constraint that the presampled signal was analytic. Also see Aliasing#Complex_sinusoids
 ^ When s(t) is sampled at the Nyquist frequency (1/T = 2B), the product sequence simplifies to <math>\left [s(nT)\cdot (j)^n\right ].</math>
 ^ The sequence of complex numbers is convolved with the impulse response of a filter with realvalued coefficients. That is equivalent to separately filtering the sequences of real parts and imaginary parts and reforming complex pairs at the outputs.
Citations
 ^ Martin H. Weik (1996). Communications Standard Dictionary. Springer. ISBN 0412083914.
 ^ Rao, R. Signals and Systems. PrenticeHall Of India Pvt. Limited. ISBN 9788120338593.
 ^ C. E. Shannon, "Communication in the presence of noise", Proc. Institute of Radio Engineers, vol. 37, no.1, pp. 10–21, Jan. 1949. Reprint as classic paper in: Proc. IEEE, Vol. 86, No. 2, (Feb 1998)
 ^ "Frequency Range of Human Hearing". The Physics Factbook.
 ^ Self, Douglas (2012). Audio Engineering Explained. Taylor & Francis US. pp. 200, 446. ISBN 0240812735.
 ^ "Digital Pro Sound". Retrieved 8 January 2014.
 ^ Colletti, Justin (February 4, 2013). "The Science of Sample Rates (When Higher Is Better—And When It Isn’t)". Trust Me I'm A Scientist. Retrieved February 6, 2013.
 ^ David Griesinger. "Perception of mid frequency and high frequency intermodulation distortion in loudspeakers, and its relationship to highdefinition audio". Archived from the original (POWERPOINT PRESENTATION) on 20080501.
 ^ ^{a} ^{b} AES52008: AES recommended practice for professional digital audio  Preferred sampling frequencies for applications employing pulsecode modulation, Audio Engineering Society, 2008, retrieved 20100118
 ^ "Telex BTR1 encrypted wireless intercom". Telexradiocom.com. Retrieved 20110118.
 ^ "Telex SAFE1000 wireless microphone". Telex.com. Retrieved 20110118.
 ^ http://www.voipsupply.com/ciscohdvoice^{[unreliable source?]}
 ^ "The restoration procedure  part 1". Restoring78s.co.uk. Archived from the original on 20090914. Retrieved 20110118.
For most records a sample rate of 22050 in stereo is adequate. An exception is likely to be recordings made in the second half of the century, which may need a sample rate of 44100.
 ^ "Zaxcom digital wireless transmitters". Zaxcom.com. Retrieved 20110118.
 ^ "MT001: Taking the Mystery out of the Infamous Formula, "SNR=6.02N + 1.76dB," and Why You Should Care" (PDF).
 ^ Walt Kester (2003). Mixedsignal and DSP design techniques. Newnes. p. 20. ISBN 9780750676113. Retrieved 8 January 2014.
 ^ William Morris Hartmann (1997). Signals, Sound, and Sensation. Springer. ISBN 1563962837.
Further reading
 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.
External links
 Journal devoted to Sampling Theory
 I/Q Data for Dummies A page trying to answer the question Why I/Q Data?
 Sampling of analog signals Interactive presentation in a webdemo. Institute of Telecommunications, University of Stuttgart
