Jump to content

Sampling (signal processing)

From Wikipedia, the free encyclopedia
(Redirected fromSampling rate)
Signal sampling representation. The continuous signalS(t) is represented with a green colored line while the discrete samples are indicated by the blue vertical lines.

Insignal processing,samplingis the reduction of acontinuous-time signalto adiscrete-time signal.A common example is the conversion of asound waveto a sequence of "samples". Asampleis a value of thesignalat a point in time and/or space; this definition differs fromthe term's usage in statistics,which refers to a set of such values.[A]

Asampleris a subsystem or operation that extracts samples from acontinuous signal.A theoreticalideal samplerproduces samples equivalent to the instantaneous value of the continuous signal at the desired points.

The original signal can be reconstructed from a sequence of samples, up to theNyquist limit,by passing the sequence of samples through areconstruction filter.

Theory[edit]

Functions of space, time, or any other dimension can be sampled, and similarly in two or more dimensions.

For functions that vary with time, letS(t) be a continuous function (or "signal" ) to be sampled, and let sampling be performed by measuring the value of the continuous function everyTseconds, which is called thesampling intervalorsampling period.[1]Then the sampled function is given by the sequence:

S(nT), for integer values ofn.

Thesampling frequencyorsampling rate,fs,is the average number of samples obtained in one second, thusfs= 1/T,with the unitsamples per second,sometimes referred to ashertz,for example 48 kHz is 48,000samples per second.

Reconstructing a continuous function from samples is done by interpolation algorithms. TheWhittaker–Shannon interpolation formulais mathematically equivalent to an ideallow-pass filterwhose input is a sequence ofDirac delta functionsthat 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 aDirac comb.Mathematically, the modulated Dirac comb is equivalent to the product of the comb function withs(t). That mathematical abstraction is sometimes referred to asimpulse sampling.[2]

Most sampled signals are not simply stored and reconstructed. The fidelity of a theoretical reconstruction is a common measure of the effectiveness of sampling. That fidelity is reduced whens(t) contains frequency components whose cycle length (period) is less than 2 sample intervals (seeAliasing). The corresponding frequency limit, incycles per second(hertz), is 0.5 cycle/sample ×fssamples/second =fs/2, known as theNyquist frequencyof the sampler. Therefore,s(t) is usually the output of alow-pass filter,functionally known as ananti-aliasing filter.Without an anti-aliasing filter, frequencies higher than the Nyquist frequency will influence the samples in a way that is misinterpreted by the interpolation process.[3]

Practical considerations[edit]

In practice, the continuous signal is sampled using ananalog-to-digital converter(ADC), a device with various physical limitations. This results in deviations from the theoretically perfect reconstruction, collectively referred to asdistortion.

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 madearbitrarily smallby using asufficiently largeorder of the anti-aliasing filter.
  • Aperture errorresults 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.[4]In acapacitor-basedsample and holdcircuit, aperture errors are introduced by multiple mechanisms. For example, the capacitor cannot instantly track the input signal and the capacitor can not instantly be isolated from the input signal.
  • Jitteror deviation from the precise sample timing intervals.
  • Noise,including thermal sensor noise,analog circuitnoise, etc.
  • Slew ratelimit error, caused by the inability of the ADC input value to change sufficiently rapidly.
  • Quantizationas a consequence of the finite precision of words that represent the converted values.
  • Error due to othernon-lineareffects of the mapping of input voltage to converted output value (in addition to the effects of quantization).

Although the use ofoversamplingcan completely eliminate aperture error and aliasing by shifting them out of the passband, 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 non-linearity, 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 zero-order hold effects can be analyzed as a form oflow-pass filtering.The non-linearities of either ADC or DAC are analyzed by replacing the ideallinear functionmapping with a proposednonlinear function.

Applications[edit]

Audio sampling[edit]

Digital audiousespulse-code modulation(PCM) and digital signals for sound reproduction. This includes analog-to-digital conversion (ADC), digital-to-analog conversion (DAC), storage, and transmission. In effect, the system commonly referred to as digital is in fact a discrete-time, discrete-level 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.

When it is necessary to capture audio covering the entire 20–20,000 Hz range ofhuman hearing[5]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.[6]The approximately double-rate requirement is a consequence of theNyquist theorem.Sampling rates higher than about 50 kHz to 60 kHz cannot supply more usable information for human listeners. Earlyprofessional audioequipment manufacturers chose sampling rates in the region of 40 to 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[7]Even thoughultrasonicfrequencies are inaudible to humans, recording and mi xing at higher sampling rates is effective in eliminating the distortion that can be caused byfoldback aliasing.Conversely, ultrasonic sounds may interact with and modulate the audible part of the frequency spectrum (intermodulation distortion),degradingthe fidelity.[8]One advantage of higher sampling rates is that they can relax the low-pass filter design requirements forADCsandDACs,but with modern oversamplingdelta-sigma-convertersthis advantage is less important.

TheAudio Engineering Societyrecommends 48 kHz sampling rate for most applications but gives recognition to 44.1 kHz for CD and other consumer uses, 32 kHz for transmission-related applications, and 96 kHz for higher bandwidth or relaxedanti-aliasing filtering.[9]Both Lavry Engineering and J. Robert Stuart state that the ideal sampling rate would be about 60 kHz, but since this is not a standard frequency, recommend 88.2 or 96 kHz for recording purposes.[10][11][12][13]

A more complete list of common audio sample rates is:

Sampling rate Use
8,000 Hz Telephoneand encryptedwalkie-talkie,wireless intercomandwireless microphonetransmission; adequate for human speech but withoutsibilance(esssounds likeeff(/s/,/f/)).
11,025 Hz One quarter the sampling rate of audio CDs; used for lower-quality PCM, MPEG audio and for audio analysis of subwoofer bandpasses.[citation needed]
16,000 Hz Widebandfrequency extension over standardtelephonenarrowband8,000 Hz. Used in most modernVoIPandVVoIPcommunication products.[14][unreliable source?]
22,050 Hz One half the sampling rate of audio CDs; used for lower-quality PCM and MPEG audio and for audio analysis of low frequency energy. Suitable for digitizing early 20th century audio formats such as78sandAM Radio.[15]
32,000 Hz miniDVdigital videocamcorder,video tapes with extra channels of audio (e.g.DVCAMwith four channels of audio),DAT(LP mode), Germany'sDigitales Satellitenradio,NICAMdigital audio, used alongside analogue television sound in some countries. High-quality digitalwireless microphones.[16]Suitable for digitizingFM radio.[citation needed]
37,800 Hz CD-XA audio
44,056 Hz Used by digital audio locked toNTSCcolorvideo signals (3 samples per line, 245 lines per field, 59.94 fields per second = 29.97frames per second).
44,100 Hz Audio CD,also most commonly used withMPEG-1audio (VCD,SVCD,MP3). Originally chosen bySonybecause it could be recorded on modified video equipment running at either 25 frames per second (PAL) or 30 frame/s (using an NTSCmonochromevideo recorder) and cover the 20 kHz bandwidth thought necessary to match professional analog recording equipment of the time. APCM adaptorwould fit digital audio samples into the analog video channel of, for example,PALvideo tapes using 3 samples per line, 588 lines per frame, 25 frames per second.
47,250 Hz world's first commercialPCMsound recorder byNippon 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 professionalserial digital interface(SDI) and High-definition Serial Digital Interface (HD-SDI) used to connect broadcast television equipment together uses this audio sampling frequency. Most professional audio gear uses 48 kHz sampling, includingmi xing consoles,anddigital recordingdevices.
50,000 Hz First commercial digital audio recorders from the late 70s from3MandSoundstream.
50,400 Hz Sampling rate used by theMitsubishi X-80digital audio recorder.
64,000 Hz Uncommonly used, but supported by some hardware[17][18]and software.[19][20]
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 DVD-Audio,someLPCMDVD tracks,BD-ROM(Blu-ray Disc) audio tracks,HD DVD(High-Definition 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 byHDCDrecorders and other professional applications for CD production. Four times the frequency of 44.1 kHz.
192,000 Hz DVD-Audio,someLPCMDVD tracks,BD-ROM(Blu-ray Disc) audio tracks, andHD DVD(High-Definition DVD) audio tracks, High-Definition 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 editingSuper Audio CDs,as 1-bitDirect Stream Digital (DSD)is not suited for editing. Eight times the frequency of 44.1 kHz.
2,822,400 Hz SACD,1-bitdelta-sigma modulationprocess known asDirect Stream Digital,co-developed bySonyandPhilips.
5,644,800 Hz Double-Rate DSD, 1-bitDirect Stream Digitalat 2× the rate of the SACD. Used in some professional DSD recorders.
11,289,600 Hz Quad-Rate DSD, 1-bitDirect Stream Digitalat 4× the rate of the SACD. Used in some uncommon professional DSD recorders.
22,579,200 Hz Octuple-Rate DSD, 1-bitDirect Stream Digitalat 8× the rate of the SACD. Used in rare experimental DSD recorders. Also known as DSD512.
45,158,400 Hz Sexdecuple-Rate DSD, 1-bitDirect Stream Digitalat 16× the rate of the SACD. Used in rare experimental DSD recorders. Also known as DSD1024.[B]

Bit depth[edit]

Audio is typically recorded at 8-, 16-, and 24-bit depth, which yield a theoretical maximumsignal-to-quantization-noise ratio(SQNR) for a puresine waveof, approximately, 49.93dB,98.09 dB and 122.17 dB.[21]CD quality audio uses 16-bit samples.Thermal noiselimits the true number of bits that can be used in quantization. Few analog systems havesignal to noise ratios (SNR)exceeding 120 dB. However,digital signal processingoperations can have very high dynamic range, consequently it is common to perform mi xing and mastering operations at 32-bit precision and then convert to 16- or 24-bit for distribution.

Speech sampling[edit]

Speech signals, i.e., signals intended to carry only humanspeech,can usually be sampled at a much lower rate. For mostphonemes,almost all of the energy is contained in the 100 Hz – 4 kHz range, allowing a sampling rate of 8 kHz. This is thesampling rateused by nearly alltelephonysystems, which use theG.711sampling and quantization specifications.[citation needed]

Video sampling[edit]

Standard-definition television(SDTV) uses either 720 by 480pixels(USNTSC525-line) or 720 by 576pixels(UKPAL625-line) for the visible picture area.

High-definition television(HDTV) uses720p(progressive),1080i(interlaced), and1080p(progressive, also known as Full-HD).

Indigital video,the temporal sampling rate is defined as theframe rate– or rather thefield rate– rather than the notionalpixel 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:

  • 50 Hz –PALvideo
  • 60 / 1.001 Hz ~= 59.94 Hz –NTSCvideo

Videodigital-to-analog convertersoperate in the megahertz range (from ~3 MHz for low quality composite video scalers in early games consoles, to 250 MHz or more for the highest-resolution VGA output).

When analog video is converted todigital video,a different sampling process occurs, this time at the pixel frequency, corresponding to a spatial sampling rate alongscan lines.A commonpixelsampling rate is:

Spatial sampling in the other direction is determined by the spacing of scan lines in theraster.The sampling rates and resolutions in both spatial directions can be measured in units of lines per picture height.

Spatialaliasingof high-frequencylumaorchromavideo components shows up as amoiré pattern.

3D sampling[edit]

The process ofvolume renderingsamples a 3D grid ofvoxelsto 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 medical imaging,X-ray computed tomography(CT/CAT),magnetic resonance imaging(MRI),positron emission tomography(PET) are some examples. It is also used forseismic tomographyand other applications.

The top two graphs depict Fourier transforms of two different functions that produce the same results when sampled at a particular rate. The baseband function is sampled faster than its Nyquist rate, and the bandpass function is undersampled, effectively converting it to baseband. The lower graphs indicate how identical spectral results are created by the aliases of the sampling process.

Undersampling[edit]

When abandpasssignal is sampled slower than itsNyquist rate,the samples are indistinguishable from samples of a low-frequencyaliasof the high-frequency signal. That is often done purposefully in such a way that the lowest-frequency alias satisfies theNyquist criterion,because the bandpass signal is still uniquely represented and recoverable. Suchundersamplingis also known asbandpass sampling,harmonic sampling,IF sampling,anddirect IF to digital conversion.[22]

Oversampling[edit]

Oversampling is used in most modern analog-to-digital converters to reduce the distortion introduced by practicaldigital-to-analog converters,such as azero-order holdinstead of idealizations like theWhittaker–Shannon interpolation formula.[23]

Complex sampling[edit]

Complex sampling(orI/Q sampling) is the simultaneous sampling of two different, but related, waveforms, resulting in pairs of samples that are subsequently treated ascomplex numbers.[C]When one waveformis theHilbert transformof the other waveformthe complex-valued function,is called ananalytic signal,whose Fourier transform is zero for all negative values of frequency. In that case, theNyquist ratefor a waveform with no frequencies ≥Bcan be reduced to justB(complex samples/sec), instead of 2B(real samples/sec).[D]More apparently, theequivalent baseband waveform,also has a Nyquist rate ofB,because all of its non-zero frequency content is shifted into the interval [-B/2, B/2).

Although complex-valued samples can be obtained as described above, they are also created by manipulating samples of a real-valued waveform. For instance, the equivalent baseband waveform can be created without explicitly computingby processing the product sequence[E]through a digital low-pass filter whose cutoff frequency isB/2.[F]Computing only every other sample of the output sequence reduces the sample-rate commensurate with the reduced Nyquist rate. The result is half as many complex-valued 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[edit]

Notes[edit]

  1. ^For example, "number of samples" in signal processing is roughly equivalent to "sample size"in statistics.
  2. ^Even higher DSD sampling rates exist, but the benefits of those are likely imperceptible, and the size of those files would be humongous.
  3. ^Sample-pairs are also sometimes viewed as points on aconstellation diagram.
  4. ^When the complex sample-rate isB,a frequency component at 0.6B,for instance, will have an alias at −0.4B,which is unambiguous because of the constraint that the pre-sampled signal was analytic. Also seeAliasing § Complex sinusoids.
  5. ^Whens(t) is sampled at the Nyquist frequency (1/T= 2B), the product sequence simplifies to
  6. ^The sequence of complex numbers is convolved with the impulse response of a filter with real-valued coefficients. That is equivalent to separately filtering the sequences of real parts and imaginary parts and reforming complex pairs at the outputs.

References[edit]

  1. ^Martin H. Weik (1996).Communications Standard Dictionary.Springer.ISBN0412083914.
  2. ^Rao, R. (2008).Signals and Systems.Prentice-Hall Of India Pvt. Limited.ISBN9788120338593.
  3. ^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)Archived2010-02-08 at theWayback Machine
  4. ^H.O. Johansson and C. Svensson, "Time resolution of NMOS sampling switches", IEEE J. Solid-State Circuits Volume: 33, Issue: 2, pp. 237–245, Feb 1998.
  5. ^ D'Ambrose, Christoper; Choudhary, Rizwan (2003). Elert, Glenn (ed.)."Frequency range of human hearing".The Physics Factbook.Retrieved2022-01-22.
  6. ^Self, Douglas (2012).Audio Engineering Explained.Taylor & Francis US. pp. 200, 446.ISBN978-0240812731.
  7. ^"Digital Pro Sound".Retrieved8 January2014.
  8. ^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.RetrievedFebruary 6,2013.in many cases, we can hear the sound of higher sample rates not because they are more transparent, but because they are less so. They can actually introduce unintended distortion in the audible spectrum
  9. ^abAES5-2008: AES recommended practice for professional digital audio – Preferred sampling frequencies for applications employing pulse-code modulation,Audio Engineering Society, 2008,retrieved2010-01-18
  10. ^Lavry, Dan (May 3, 2012)."The Optimal Sample Rate for Quality Audio"(PDF).Lavry Engineering Inc.Although 60 KHz would be closer to the ideal; given the existing standards, 88.2 KHz and 96 KHz are closest to the optimal sample rate.
  11. ^Lavry, Dan."The Optimal Sample Rate for Quality Audio".Gearslutz.Retrieved2018-11-10.I am trying to accommodate all ears, and there are reports of few people that can actually hear slightly above 20KHz. I do think that 48KHz is pretty good compromise, but 88.2 or 96KHz yields some additional margin.
  12. ^Lavry, Dan."To mix at 96k or not?".Gearslutz.Retrieved2018-11-10.Nowdays there are a number of good designers and ear people that find 60-70KHz sample rate to be the optimal rate for the ear. It is fast enough to include what we can hear, yet slow enough to do it pretty accurately.
  13. ^Stuart, J. Robert (1998).Coding High Quality Digital Audio.CiteSeerX10.1.1.501.6731.both psychoacoustic analysis and experience tell us that the minimum rectangular channel necessary to ensure transparency uses linear PCM with 18.2-bit samples at 58kHz.... there are strong arguments for maintaining integer relationships with existing sampling rates – which suggests that 88.2kHz or 96kHz should be adopted.
  14. ^"Cisco VoIP Phones, Networking and Accessories - VoIP Supply".
  15. ^"The restoration procedure – part 1".Restoring78s.co.uk. Archived fromthe originalon 2009-09-14.Retrieved2011-01-18.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.
  16. ^"Zaxcom digital wireless transmitters".Zaxcom. Archived fromthe originalon 2011-02-09.Retrieved2011-01-18.
  17. ^"RME: Hammerfall DSP 9632".rme-audio.de.Retrieved2018-12-18.Supported sample frequencies: Internally 32, 44.1, 48, 64, 88.2, 96, 176.4, 192 kHz.
  18. ^"SX-S30DAB | Pioneer".pioneer-audiovisual.eu.Retrieved2018-12-18.Supported sampling rates: 44.1 kHz, 48 kHz, 64 kHz, 88.2 kHz, 96 kHz, 176.4 kHz, 192 kHz
  19. ^Cristina Bachmann, Heiko Bischoff; Schütte, Benjamin."Customize Sample Rate Menu".Steinberg WaveLab Pro.Retrieved2018-12-18.Common Sample Rates: 64 000 Hz
  20. ^"M Track 2x2M Cubase Pro 9 can ́t change Sample Rate".M-Audio.Retrieved2018-12-18.[Screenshot of Cubase]
  21. ^"MT-001: Taking the Mystery out of the Infamous Formula," SNR=6.02N + 1.76dB, "and Why You Should Care"(PDF).
  22. ^ Walt Kester (2003).Mixed-signal and DSP design techniques.Newnes. p. 20.ISBN978-0-7506-7611-3.Retrieved8 January2014.
  23. ^William Morris Hartmann (1997).Signals, Sound, and Sensation.Springer.ISBN1563962837.

Further reading[edit]

  • Matt Pharr, Wenzel Jakob and Greg Humphreys,Physically Based Rendering: From Theory to Implementation, 3rd ed.,Morgan Kaufmann, November 2016.ISBN978-0128006450.The chapter on sampling (available online) is nicely written with diagrams, core theory and code sample.

External links[edit]