|
Sample rate conversion is the process of converting a (usually digital) signal from one sampling rate to another, while changing the information carried by the signal as little as possible. Sample rate conversion is needed because different systems use different sampling rates, for engineering, economic, or historical reasons. The physics of sampling merely sets minimum sampling rate (an analog signal can be sampled at any rate above twice the highest frequency contained in the signal, see Nyquist frequency), and so other factors determine the actual rates used. For example, different audio systems use different rates of 44.1, 48, and 96 kHz. As another example, American television, European television, and movies all use different numbers of frames per second. Users would like to transfer source material between these systems. Just replaying the existing data at the new rate will not normally work — it introduces large changes in pitch (for audio) and movement as well (for video), plus it cannot be done in real time. Hence sample rate conversion is required. The Nyquist frequency, named after the Nyquist-Shannon sampling theorem, is half the sampling frequency for a signal. ...
Two basic approaches are: - Convert to analog, then re-sample at the new rate.
- Digital signal processing — compute the values of the new samples from the old samples.
Probably the most famous example of analog rate conversion was converting the slow-scan TV signals from the Apollo moon missions to the conventional TV rates for the viewers at home. Modern systems almost all use digital conversion, however, since this introduces less noise and distortion, and modern computing power makes this practical. Apollo Program insignia Apollo CSM in lunar orbit. ...
Digital sample rate conversion
If the two frequencies are in a fixed ratio, the conversion can be done as follows: Let F = least common multiple of the two frequencies. Generate a signal sampled at F by interpolating 0s in the original sample. This will also introduce aliases at multiples of the baseband frequency. Remove these with a digital low pass filter, until only the signals with less than half of the output sample frequency remain. Then reduce the sample rate by discarding the appropriate samples.
Example CDs are sampled at 44.1 kHz, but a Digital Audio Tape, or DAT is usually sampled at 48 kHz. How can material be converted from one sample rate to the other? First, note that 44.1 and 48 are in the ratio 147/160. Therefore to convert from 44.1 to 48, for example, the process is (conceptually): The Compact Disc logo was inspired by that of the previous Compact Cassette. ...
To meet Wikipedias quality standards, this article or section may require cleanup. ...
- Interpolate 159 zeros between every input sample. This raises the data rate to 7.056 MHz, the least common multiple of 44.1 and 48 kHz. Since this interpolation is equivalent to reconstructing with Dirac delta functions, it also creates images of frequency f at 44.1−f, 44.1+f, 88.2−f, 88.2+f, ...
- Remove the images with a digital filter, leaving a signal containing only 0–20 kHz information, but still sampled at a rate of 7.056 MHz.
- Discard 146 of every 147 output samples. It does not hurt to do so since the signal now has no significant content above 24 kHz. In practice, of course, there is no reason to compute the values of the samples that will be discarded.
This requires a digital filter (almost always an FIR filter since these can be designed to have no phase distortion) that is flat to 20 kHz, and down at least x dB at 24 kHz. How big does x need to be? A first impression might be about 100 dB, since the maximum signal size is roughly ±32767, and the input quantization ±1/2, so the input had a signal to broadband noise ratio of 98 dB at most. However, the noise in the stopband (20 kHz to 3.5 MHz) is all folded into the passband by the decimation in the third step, so another 22 dB (that's a ratio of 160:1 expressed in dB) of stopband rejection is required to account for the noise folding. Thus 120 dB rejection yields a broadband noise roughly equal to the original quantizing noise. In arithmetic and number theory the least common multiple or lowest common multiple (lcm) or smallest common multiple of two integers a and b is the smallest positive integer that is a multiple of both a and b. ...
The Dirac delta function, sometimes referred to as the unit impulse function and introduced by the British theoretical physicist Paul Dirac, can usually be informally thought of as a function δ(x) that has the value of infinity for x = 0, the value zero elsewhere. ...
An FIR filter In electronics, a digital filter is any electronic filter that works by performing digital math operations on an intermediate form of a signal. ...
A finite impulse response (FIR) filter is a type of a digital filter. ...
There is no requirement that the resampling in the ratio 160:147 all be done in one step. Using the same example, we could re-sample the original at a ratio of 10:7, then 8:7, then 2:3 (or do these in any order that does not reduce the sample rate below the initial or final rates, or use any other factorization of the ratios). There may be various technical reasons for using a single step or multi-step process — typically the single step process involves less total computation but requires more coefficient storage.
See also Upsampling is the process of increasing the sampling rate of a signal. ...
Downsampling (or subsampling) is the process of reducing the sampling rate of a signal. ...
In information theory, oversampling is the process of sampling a signal with a sampling frequency higher than twice the nyquist frequency. ...
References - Multirate Digital Signal Processing, by Crochiere and Rabiner. ISBN 0136051626 The classic text in the field.
|